first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
+685
View File
@@ -0,0 +1,685 @@
{
"name": "@fluentui/keyboard-key",
"entries": [
{
"date": "Tue, 30 Jan 2024 07:26:36 GMT",
"tag": "@fluentui/keyboard-key_v0.4.14",
"version": "0.4.14",
"comments": {
"none": [
{
"author": "martinhochel@microsoft.com",
"package": "@fluentui/keyboard-key",
"commit": "41c129b1db39c32ba410be8e614750a079fb2ab8",
"comment": "chore: setup monosize for measuring bundle size which will replace-size auditor bot"
}
]
}
},
{
"date": "Tue, 26 Sep 2023 07:44:56 GMT",
"tag": "@fluentui/keyboard-key_v0.4.11",
"version": "0.4.11",
"comments": {
"none": [
{
"author": "martinhochel@microsoft.com",
"package": "@fluentui/keyboard-key",
"commit": "ccc380cada5d9a6057bd8fca127700b700815fdc",
"comment": "chore: add ES2015.Iterable to tsconfig lib as jest types need it"
}
]
}
},
{
"date": "Wed, 28 Jun 2023 07:37:34 GMT",
"tag": "@fluentui/keyboard-key_v0.4.11",
"version": "0.4.11",
"comments": {
"none": [
{
"author": "martinhochel@microsoft.com",
"package": "@fluentui/keyboard-key",
"commit": "fbe878e9c9785588197481f172c42c2c0a230292",
"comment": "fix: update .npmignore to unify v8 packages and exclude project.json"
}
]
}
},
{
"date": "Fri, 05 May 2023 18:14:05 GMT",
"tag": "@fluentui/keyboard-key_v0.4.9",
"version": "0.4.9",
"comments": {
"patch": [
{
"author": "tristan.watanabe@gmail.com",
"package": "@fluentui/keyboard-key",
"commit": "0475089ff40110402c8f1e31f8c52c17f8b2e0e2",
"comment": "fix: explicitly ship dist/ folder."
}
]
}
},
{
"date": "Tue, 02 May 2023 00:58:15 GMT",
"tag": "@fluentui/keyboard-key_v0.4.8",
"version": "0.4.8",
"comments": {
"patch": [
{
"author": "tristan.watanabe@gmail.com",
"package": "@fluentui/keyboard-key",
"commit": "c2326dc86037b18a6673697885703b5953ffd0c2",
"comment": "fix: esm, cjs, and amd folders should all be published correctly."
}
]
}
},
{
"date": "Wed, 01 Mar 2023 07:45:39 GMT",
"tag": "@fluentui/keyboard-key_v0.4.5",
"version": "0.4.5",
"comments": {
"none": [
{
"author": "martinhochel@microsoft.com",
"package": "@fluentui/keyboard-key",
"commit": "dd0f5b76fc8905c067cc58556ec1f9626dcfc640",
"comment": "chore: update tsconfig lib as jest now requires at least ES2015"
}
]
}
},
{
"date": "Wed, 11 Jan 2023 07:50:53 GMT",
"tag": "@fluentui/keyboard-key_v0.4.4",
"version": "0.4.4",
"comments": {
"none": [
{
"author": "martinhochel@microsoft.com",
"package": "@fluentui/keyboard-key",
"commit": "64bb45980d68de1219c6b36a7db5363f0a9cff9f",
"comment": "chore: migrate to packaged scripts"
}
]
}
},
{
"date": "Mon, 02 Jan 2023 07:46:43 GMT",
"tag": "@fluentui/keyboard-key_v0.4.3",
"version": "0.4.3",
"comments": {
"none": [
{
"author": "martinhochel@microsoft.com",
"package": "@fluentui/keyboard-key",
"commit": "4ec2b998b294d6d9c3196d3d82893bdd97d0c105",
"comment": "chore(scripts): move index.ts to to follow sub-folder domain packaging"
}
]
}
},
{
"date": "Fri, 30 Dec 2022 07:51:01 GMT",
"tag": "@fluentui/keyboard-key_v0.4.3",
"version": "0.4.3",
"comments": {
"none": [
{
"author": "martinhochel@microsoft.com",
"package": "@fluentui/keyboard-key",
"commit": "194b0cf0cc27c1c1233aa945f09b3ad29778d8ca",
"comment": "chore(scripts): use for @fluentui/scripts version within all package.json"
}
]
}
},
{
"date": "Thu, 01 Dec 2022 07:57:09 GMT",
"tag": "@fluentui/keyboard-key_v0.4.3",
"version": "0.4.3",
"comments": {
"none": [
{
"author": "martinhochel@microsoft.com",
"package": "@fluentui/keyboard-key",
"commit": "c46ff8dec351ebf57efb4114366016010b285429",
"comment": "chore: enable isolateModules"
}
]
}
},
{
"date": "Thu, 03 Mar 2022 07:24:26 GMT",
"tag": "@fluentui/keyboard-key_v0.4.0",
"version": "0.4.0",
"comments": {
"minor": [
{
"author": "dzearing@microsoft.com",
"package": "@fluentui/keyboard-key",
"commit": "f2f1c0ea948cc3517eeb442c05433eb0918def29",
"comment": "Adding explicit export maps on all consumer packages for FUIR 8 and 9."
}
]
}
},
{
"date": "Mon, 20 Sep 2021 07:36:26 GMT",
"tag": "@fluentui/keyboard-key_v0.3.4",
"version": "0.3.4",
"comments": {
"none": [
{
"author": "lingfangao@hotmail.com",
"package": "@fluentui/keyboard-key",
"comment": "chore: use versioon eslint-plugin and react-conformance in dev dependencies",
"commit": "b8a304770f77c0353553a152dad34421070400a6"
}
]
}
},
{
"date": "Tue, 24 Aug 2021 07:34:48 GMT",
"tag": "@fluentui/keyboard-key_v0.3.4",
"version": "0.3.4",
"comments": {
"none": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.4.1",
"author": "dzearing@hotmail.com",
"commit": "0abd957c8d4421018e6d792c2a4aa8876967392b",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Fri, 20 Aug 2021 07:37:28 GMT",
"tag": "@fluentui/keyboard-key_v0.3.4",
"version": "0.3.4",
"comments": {
"none": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.4.0",
"author": "behowell@microsoft.com",
"commit": "21df8406417c5c5c1d053561a498b920ac962b4b",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Tue, 03 Aug 2021 07:39:30 GMT",
"tag": "@fluentui/keyboard-key_v0.3.4",
"version": "0.3.4",
"comments": {
"patch": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.3.3",
"author": "behowell@microsoft.com",
"commit": "86476ee0511ad2693c2829b959f93a87ad10f095",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Fri, 09 Jul 2021 07:39:31 GMT",
"tag": "@fluentui/keyboard-key_v0.3.3",
"version": "0.3.3",
"comments": {
"patch": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.3.2",
"author": "martinhochel@microsoft.com",
"commit": "18902eb64710aa6253a79781357b8390bb13665c",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Mon, 07 Jun 2021 07:38:15 GMT",
"tag": "@fluentui/keyboard-key_v0.3.2",
"version": "0.3.2",
"comments": {
"patch": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.3.1",
"author": "martinhochel@microsoft.com",
"commit": "f856cb3f7fbc3edb3646204c0c7e435fc7678dd1",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Thu, 20 May 2021 07:41:54 GMT",
"tag": "@fluentui/keyboard-key_v0.3.1",
"version": "0.3.1",
"comments": {
"patch": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.3.0",
"author": "elcraig@microsoft.com",
"commit": "630b71c415cd40ed0e36773eab99d62cd02a30fb",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Fri, 30 Apr 2021 07:42:23 GMT",
"tag": "@fluentui/keyboard-key_v0.3.0",
"version": "0.3.0",
"comments": {
"minor": [
{
"comment": "Upgrade to typescript 4.1.5",
"author": "joschect@microsoft.com",
"commit": "2b62c457bb860f6675fae4acae86ee6c0b06c279",
"package": "@fluentui/keyboard-key"
}
],
"patch": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.2.0",
"author": "joschect@microsoft.com",
"commit": "2b62c457bb860f6675fae4acae86ee6c0b06c279",
"package": "@fluentui/keyboard-key"
},
{
"comment": "Bump @fluentui/scripts to v1.0.0",
"author": "joschect@microsoft.com",
"commit": "2b62c457bb860f6675fae4acae86ee6c0b06c279",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Fri, 23 Apr 2021 07:37:10 GMT",
"tag": "@fluentui/keyboard-key_v0.2.17",
"version": "0.2.17",
"comments": {
"patch": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.1.1",
"author": "olfedias@microsoft.com",
"commit": "7d1a9a8aee217022e55b8c39c723b1390b5d8095",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Wed, 31 Mar 2021 00:53:43 GMT",
"tag": "@fluentui/keyboard-key_v0.2.16",
"version": "0.2.16",
"comments": {
"patch": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.1.0",
"author": "elcraig@microsoft.com",
"commit": "d41b79242e6b682dfa58fcd76797ecfd9146d4cf",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Tue, 30 Mar 2021 07:34:45 GMT",
"tag": "@fluentui/keyboard-key_v0.2.15",
"version": "0.2.15",
"comments": {
"patch": [
{
"comment": "chore: restore \"sideEffects\" to enable treeshaking",
"author": "olfedias@microsoft.com",
"commit": "8d6eb6f174660017e96d2c539a08e1d64ccdf4a3",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Fri, 26 Feb 2021 01:16:27 GMT",
"tag": "@fluentui/keyboard-key_v0.2.14",
"version": "0.2.14",
"comments": {
"none": [
{
"comment": "Update beachball config and devDependencies versions",
"author": "elcraig@microsoft.com",
"commit": "71f0a43b375b4a932ecbcf6778288422db2dc267",
"package": "@fluentui/keyboard-key"
}
],
"patch": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.0.1",
"author": "elcraig@microsoft.com",
"commit": "71f0a43b375b4a932ecbcf6778288422db2dc267",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Thu, 18 Feb 2021 12:27:34 GMT",
"tag": "@fluentui/keyboard-key_v0.2.13",
"version": "0.2.13",
"comments": {
"prerelease": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.0.0-beta.2",
"author": "elcraig@microsoft.com",
"commit": "1072765ed2e0ffda34688d84d376a8bc4bf928f0",
"package": "@fluentui/keyboard-key"
},
{
"comment": "Bump @fluentui/scripts to v1.0.0",
"author": "elcraig@microsoft.com",
"commit": "1072765ed2e0ffda34688d84d376a8bc4bf928f0",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Wed, 17 Feb 2021 12:21:39 GMT",
"tag": "@fluentui/keyboard-key_v0.2.13",
"version": "0.2.13",
"comments": {
"none": [
{
"comment": "chore: apply single version policy on jest",
"author": "martinhochel@microsoft.com",
"commit": "0de01d003589b5e2f166bc070729dca20125a091",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Thu, 11 Feb 2021 12:18:41 GMT",
"tag": "@fluentui/keyboard-key_v0.2.13",
"version": "0.2.13",
"comments": {
"none": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.0.0-beta.1",
"author": "martinhochel@microsoft.com",
"commit": "7566015a7edd355b4fcd3796bc8f44f732ef0877",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Wed, 03 Feb 2021 05:51:40 GMT",
"tag": "@fluentui/keyboard-key_v0.2.13",
"version": "0.2.13",
"comments": {
"none": [
{
"comment": "refactor: remove unused .npmrc in packages",
"author": "hantatsang@gmail.com",
"commit": "c688ee2ea6f192c4874974ebf11598523ccf6db9",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Mon, 01 Feb 2021 12:23:48 GMT",
"tag": "@fluentui/keyboard-key_v0.2.13",
"version": "0.2.13",
"comments": {
"patch": [
{
"comment": "add prerelease in disallowed change type for version packages and fix current versioning.",
"author": "xgao@microsoft.com",
"commit": "9ec4369a9e7850d7ab37803f931d1a0cf30743a9",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Thu, 28 Jan 2021 12:25:56 GMT",
"tag": "@fluentui/keyboard-key_v0.2.13-0",
"version": "0.2.13-0",
"comments": {
"none": [
{
"comment": "Delete update-api script which is no longer needed",
"author": "elcraig@microsoft.com",
"commit": "943a9ef5768a9cd77ade84217d142f93b1be6127",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Fri, 23 Oct 2020 03:26:15 GMT",
"tag": "@fluentui/keyboard-key_v0.2.12",
"version": "0.2.12",
"comments": {
"none": [
{
"comment": "Update npmignore",
"author": "elcraig@microsoft.com",
"commit": "aec02d96e7cef745e9867c03a528426a5ad28038",
"package": "@fluentui/keyboard-key"
},
{
"comment": "Rename build-related packages",
"author": "elcraig@microsoft.com",
"commit": "32a158fd2c7fca8dc308a3e41f692817e6c26c44",
"package": "@fluentui/keyboard-key"
},
{
"comment": "Update package version for @fluentui/react version 8 beta release.",
"author": "xgao@microsoft.com",
"commit": "ee2622a8572c11f1eeb9d7f1c8d759d6ae0281ca",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Fri, 25 Sep 2020 12:25:17 GMT",
"tag": "@fluentui/keyboard-key_v0.2.12",
"version": "0.2.12",
"comments": {
"none": [
{
"comment": "Remove same-package path aliases",
"author": "elcraig@microsoft.com",
"commit": "85432b281ce55e1a990dd811e5adebbad84e7cb8",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Wed, 16 Sep 2020 12:27:22 GMT",
"tag": "@fluentui/keyboard-key_v0.2.12",
"version": "0.2.12",
"comments": {
"none": [
{
"comment": "Update API Extractor settings to share config and handle newlines better",
"author": "elcraig@microsoft.com",
"commit": "7d093f59a06527fc39656c903cab4470650e3acd",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Mon, 13 Jul 2020 23:14:39 GMT",
"tag": "@fluentui/keyboard-key_v0.2.5",
"version": "0.2.5",
"comments": {
"none": [
{
"comment": "Replace tslint with eslint",
"author": "elcraig@microsoft.com",
"commit": "e7b119a05ef8a4aa254df00320f3672298617ade",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Thu, 02 Jul 2020 12:42:11 GMT",
"tag": "@fluentui/keyboard-key_v0.2.4",
"version": "0.2.4",
"comments": {
"patch": [
{
"comment": "Resolve side effects in keyboard-key/codes.ts",
"author": "connorjsmith101@gmail.com",
"commit": "6a33fd5c4919b378ce306c1877aa52d384a91019",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Fri, 26 Jun 2020 12:36:28 GMT",
"tag": "@fluentui/keyboard-key_v0.2.3",
"version": "0.2.3",
"comments": {
"none": [
{
"comment": "Update config files in preparation for enabling ESLint",
"author": "elcraig@microsoft.com",
"commit": "94ab6757c1050007b9f8343986f19c7685fed6d7",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Tue, 26 May 2020 12:46:29 GMT",
"tag": "@fluentui/keyboard-key_v0.2.0",
"version": "0.2.0",
"comments": {
"none": [
{
"comment": "docs: update README.md to show proper usage",
"author": "olfedias@microsoft.com",
"commit": "b72ef4c92db4c3f239d2ee35dee36234a9776bf3",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Thu, 14 May 2020 12:34:32 GMT",
"tag": "@fluentui/keyboard-key_v0.2.0",
"version": "0.2.0",
"comments": {
"none": [
{
"author": "czearing@outlook.com",
"commit": "630f25da48bc86270288fbc5ccd4703cf6ea4d46",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Fri, 08 May 2020 12:35:40 GMT",
"tag": "@fluentui/keyboard-key_v0.2.0",
"version": "0.2.0",
"comments": {
"minor": [
{
"comment": "keyboard-key: Reducing bundle size.",
"author": "humbertomakotomorimoto@gmail.com",
"commit": "ce5c014aa4c23951afe4d1ca5e45ddb711e2f0fc",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Thu, 07 May 2020 01:06:55 GMT",
"tag": "@fluentui/keyboard-key_v0.1.7",
"version": "0.1.7",
"comments": {
"patch": [
{
"comment": "Addressing commonjs imports.",
"author": "dzearing@microsoft.com",
"commit": "f4a995d4166c7812976b13c6638fb1ae32a8667d",
"package": "@fluentui/keyboard-key"
}
]
}
},
{
"date": "Wed, 25 Mar 2020 12:30:04 GMT",
"tag": "@fluentui/keyboard-key_v0.1.4",
"version": "0.1.4",
"comments": {
"patch": [
{
"comment": "Changing references of Fabric to Fluent",
"author": "mgodbolt@microsoft.com",
"commit": "3ec9a0efa90dc462104e717dc0f9c41e1b4fcd60"
}
]
}
},
{
"date": "Mon, 23 Mar 2020 12:28:29 GMT",
"tag": "@fluentui/keyboard-key_v0.1.3",
"version": "0.1.3",
"comments": {
"patch": [
{
"comment": "Replace OfficeDev/office-ui-fabric-react with microsoft/fluentui",
"author": "elcraig@microsoft.com",
"commit": "94a0cc4f2c7129b66cb69159889f0ac95e8c88ee"
}
]
}
},
{
"date": "Thu, 19 Mar 2020 12:29:37 GMT",
"tag": "@fluentui/keyboard-key_v0.1.2",
"version": "0.1.2",
"comments": {
"none": [
{
"comment": "Run prettier on all files",
"author": "elcraig@microsoft.com",
"commit": "f3befc0bad68483270afcfbdaff4473cd68939cb"
}
]
}
},
{
"date": "Tue, 17 Mar 2020 12:28:58 GMT",
"tag": "@fluentui/keyboard-key_v0.1.1",
"version": "0.1.1",
"comments": {
"patch": [
{
"comment": "Creating a fork of the keyboard-key library to convert to typescript, produce es6, add typings, and reduce bundle. Hooking up to bundle validation as well.",
"author": "dzearing@microsoft.com",
"commit": "d4c7a9dfb5c92bf9512d6f9df1a954f292d8cc76"
}
]
}
}
]
}
+183
View File
@@ -0,0 +1,183 @@
# Change Log - @fluentui/keyboard-key
This log was last generated on Fri, 05 May 2023 18:14:05 GMT and should not be manually modified.
<!-- Start content -->
## [0.4.9](https://github.com/microsoft/fluentui/tree/@fluentui/keyboard-key_v0.4.9)
Fri, 05 May 2023 18:14:05 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/keyboard-key_v0.4.8..@fluentui/keyboard-key_v0.4.9)
### Patches
- fix: explicitly ship dist/ folder. ([PR #27769](https://github.com/microsoft/fluentui/pull/27769) by tristan.watanabe@gmail.com)
## [0.4.8](https://github.com/microsoft/fluentui/tree/@fluentui/keyboard-key_v0.4.8)
Tue, 02 May 2023 00:58:15 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/keyboard-key_v0.4.5..@fluentui/keyboard-key_v0.4.8)
### Patches
- fix: esm, cjs, and amd folders should all be published correctly. ([PR #27736](https://github.com/microsoft/fluentui/pull/27736) by tristan.watanabe@gmail.com)
## [0.4.0](https://github.com/microsoft/fluentui/tree/@fluentui/keyboard-key_v0.4.0)
Thu, 03 Mar 2022 07:24:26 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/keyboard-key_v0.3.4..@fluentui/keyboard-key_v0.4.0)
### Minor changes
- Adding explicit export maps on all consumer packages for FUIR 8 and 9. ([PR #21508](https://github.com/microsoft/fluentui/pull/21508) by dzearing@microsoft.com)
## [0.3.4](https://github.com/microsoft/fluentui/tree/@fluentui/keyboard-key_v0.3.4)
Tue, 03 Aug 2021 07:39:30 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/keyboard-key_v0.3.3..@fluentui/keyboard-key_v0.3.4)
### Patches
- Bump @fluentui/eslint-plugin to v1.3.3 ([PR #19169](https://github.com/microsoft/fluentui/pull/19169) by behowell@microsoft.com)
## [0.3.3](https://github.com/microsoft/fluentui/tree/@fluentui/keyboard-key_v0.3.3)
Fri, 09 Jul 2021 07:39:31 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/keyboard-key_v0.3.2..@fluentui/keyboard-key_v0.3.3)
### Patches
- Bump @fluentui/eslint-plugin to v1.3.2 ([PR #18808](https://github.com/microsoft/fluentui/pull/18808) by martinhochel@microsoft.com)
## [0.3.2](https://github.com/microsoft/fluentui/tree/@fluentui/keyboard-key_v0.3.2)
Mon, 07 Jun 2021 07:38:15 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/keyboard-key_v0.3.1..@fluentui/keyboard-key_v0.3.2)
### Patches
- Bump @fluentui/eslint-plugin to v1.3.1 ([PR #18437](https://github.com/microsoft/fluentui/pull/18437) by martinhochel@microsoft.com)
## [0.3.1](https://github.com/microsoft/fluentui/tree/@fluentui/keyboard-key_v0.3.1)
Thu, 20 May 2021 07:41:54 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/keyboard-key_v0.3.0..@fluentui/keyboard-key_v0.3.1)
### Patches
- Bump @fluentui/eslint-plugin to v1.3.0 ([PR #18024](https://github.com/microsoft/fluentui/pull/18024) by elcraig@microsoft.com)
## [0.3.0](https://github.com/microsoft/fluentui/tree/@fluentui/keyboard-key_v0.3.0)
Fri, 30 Apr 2021 07:42:23 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/keyboard-key_v0.2.17..@fluentui/keyboard-key_v0.3.0)
### Minor changes
- Upgrade to typescript 4.1.5 ([PR #17932](https://github.com/microsoft/fluentui/pull/17932) by joschect@microsoft.com)
### Patches
- Bump @fluentui/eslint-plugin to v1.2.0 ([PR #17932](https://github.com/microsoft/fluentui/pull/17932) by joschect@microsoft.com)
- Bump @fluentui/scripts to v1.0.0 ([PR #17932](https://github.com/microsoft/fluentui/pull/17932) by joschect@microsoft.com)
## [0.2.17](https://github.com/microsoft/fluentui/tree/@fluentui/keyboard-key_v0.2.17)
Fri, 23 Apr 2021 07:37:10 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/keyboard-key_v0.2.16..@fluentui/keyboard-key_v0.2.17)
### Patches
- Bump @fluentui/eslint-plugin to v1.1.1 ([PR #17894](https://github.com/microsoft/fluentui/pull/17894) by olfedias@microsoft.com)
## [0.2.16](https://github.com/microsoft/fluentui/tree/@fluentui/keyboard-key_v0.2.16)
Wed, 31 Mar 2021 00:53:43 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/keyboard-key_v0.2.15..@fluentui/keyboard-key_v0.2.16)
### Patches
- Bump @fluentui/eslint-plugin to v1.1.0 ([PR #17568](https://github.com/microsoft/fluentui/pull/17568) by elcraig@microsoft.com)
## [0.2.15](https://github.com/microsoft/fluentui/tree/@fluentui/keyboard-key_v0.2.15)
Tue, 30 Mar 2021 07:34:45 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/keyboard-key_v0.2.14..@fluentui/keyboard-key_v0.2.15)
### Patches
- chore: restore "sideEffects" to enable treeshaking ([PR #17584](https://github.com/microsoft/fluentui/pull/17584) by olfedias@microsoft.com)
## [0.2.14](https://github.com/microsoft/fluentui/tree/@fluentui/keyboard-key_v0.2.14)
Fri, 26 Feb 2021 01:16:27 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/keyboard-key_v0.2.13..@fluentui/keyboard-key_v0.2.14)
### Patches
- Bump @fluentui/eslint-plugin to v1.0.1 ([PR #17169](https://github.com/microsoft/fluentui/pull/17169) by elcraig@microsoft.com)
## [0.2.13](https://github.com/microsoft/fluentui/tree/@fluentui/keyboard-key_v0.2.13)
Thu, 18 Feb 2021 12:27:34 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/keyboard-key_v0.2.13..@fluentui/keyboard-key_v0.2.13)
### Changes
- Bump @fluentui/eslint-plugin to v1.0.0-beta.2 ([PR #16975](https://github.com/microsoft/fluentui/pull/16975) by elcraig@microsoft.com)
- Bump @fluentui/scripts to v1.0.0 ([PR #16975](https://github.com/microsoft/fluentui/pull/16975) by elcraig@microsoft.com)
## [0.2.13](https://github.com/microsoft/fluentui/tree/@fluentui/keyboard-key_v0.2.13)
Mon, 01 Feb 2021 12:23:48 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/keyboard-key_v0.2.13-0..@fluentui/keyboard-key_v0.2.13)
### Patches
- add prerelease in disallowed change type for version packages and fix current versioning. ([PR #16696](https://github.com/microsoft/fluentui/pull/16696) by xgao@microsoft.com)
## [0.2.4](https://github.com/microsoft/fluentui/tree/@fluentui/keyboard-key_v0.2.4)
Thu, 02 Jul 2020 12:42:11 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/keyboard-key_v0.2.3..@fluentui/keyboard-key_v0.2.4)
### Patches
- Resolve side effects in keyboard-key/codes.ts ([PR #13729](https://github.com/microsoft/fluentui/pull/13729) by connorjsmith101@gmail.com)
## [0.2.0](https://github.com/microsoft/fluentui/tree/@fluentui/keyboard-key_v0.2.0)
Fri, 08 May 2020 12:35:40 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/keyboard-key_v0.1.7..@fluentui/keyboard-key_v0.2.0)
### Minor changes
- keyboard-key: Reducing bundle size. ([PR #12339](https://github.com/microsoft/fluentui/pull/12339) by humbertomakotomorimoto@gmail.com)
## [0.1.7](https://github.com/microsoft/fluentui/tree/@fluentui/keyboard-key_v0.1.7)
Thu, 07 May 2020 01:06:55 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/keyboard-key_v0.1.4..@fluentui/keyboard-key_v0.1.7)
### Patches
- Addressing commonjs imports. ([PR #13031](https://github.com/microsoft/fluentui/pull/13031) by dzearing@microsoft.com)
## 0.1.4
Wed, 25 Mar 2020 12:30:04 GMT
### Patches
- Changing references of Fabric to Fluent (mgodbolt@microsoft.com)
## 0.1.3
Mon, 23 Mar 2020 12:28:29 GMT
### Patches
- Replace OfficeDev/office-ui-fabric-react with microsoft/fluentui (elcraig@microsoft.com)
## 0.1.1
Tue, 17 Mar 2020 12:28:58 GMT
### Patches
- Creating a fork of the keyboard-key library to convert to typescript, produce es6, add typings, and reduce bundle. Hooking up to bundle validation as well. (dzearing@microsoft.com)
+15
View File
@@ -0,0 +1,15 @@
@fluentui/keyboard-key
Copyright (c) Microsoft Corporation
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Note: Usage of the fonts and icons referenced in Fluent UI React is subject to the terms listed at https://aka.ms/fluentui-assets-license
+87
View File
@@ -0,0 +1,87 @@
# @fluentui/keyboard-key
A simple utility for determining the `KeyboardEvent.key` property from a keyboard event.
<!-- toc -->
- [Install](#install)
- [Usage](#usage)
- [getKey()](#getkey)
- [getCode()](#getcode)
- [Why?](#why)
- [Locale Caveat](#locale-caveat)
<!-- tocstop -->
## Install
```
yarn add keyboard-key
# or
npm install keyboard-key
```
## Usage
### getKey()
Get the `key` property value from an event.
```js
document.addEventListener('keydown', event => {
const key = keyboardKey.getKey(event);
switch (key) {
case 'Escape':
// handle escape key
break;
default:
break;
}
});
```
> See [MDN][2] or the source for a full list of `key` values.
### getCode()
You can also get the normalized `keyCode` from an event. `@fluentui/keyboard-key` includes a hash of `key` names to `keyCode`s for easy comparisons:
```js
document.addEventListener('keydown', event => {
const code = getCode(event);
switch (code) {
case keyboardKey.Escape: // 27
// handle escape key
break;
default:
break;
}
});
```
## Why?
Most previous key identifying KeyboardEvent properties have been pressed have been deprecated in favor of `Keyboard.key`.
:-1: `KeyboardEvent.char`
:-1: `KeyboardEvent.charCode`
:-1: `KeyboardEvent.keyCode`
:-1: `KeyboardEvent.keyIdentifier`
:-1: `KeyboardEvent.keyLocation`
:-1: `KeyboardEvent.which`
:+1: `KeyboardEvent.key`
Unfortunately, `KeyboardEvent.key` does not yet have full [browser support][3]. Leaving the browsers without a reliable property for identifying keyboard event keys.
## Locale Caveat
This utility interprets use of the shift key when inferring event `key` values. Example, an event describing <kbd>shift</kbd>+<kbd>/</kbd> would result in a `key` value of <kbd>?</kbd>. This logic assumes an `en-US` locale keyboard layout. This will **not work** if you are using a different locale such as a German layout where <kbd>/</kbd> is <kbd>shift</kbd>+<kbd>7</kbd>.
[1]: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key
[2]: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values
[3]: http://caniuse.com/#feat=keyboardevent-key
+7
View File
@@ -0,0 +1,7 @@
import * as p from '@fluentui/keyboard-key';
console.log(p);
export default {
name: 'keyboard-key package',
};
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "@fluentui/scripts-api-extractor/api-extractor.common.json"
}
+293
View File
@@ -0,0 +1,293 @@
export declare const AmpersandKey: 55;
export declare const ArrowDownKey: 40;
export declare const ArrowLeftKey: 37;
export declare const ArrowRightKey: 39;
export declare const ArrowUpKey: 38;
export declare const AtSignKey: 50;
export declare const BackSlashKey: 220;
export declare const CaretKey: 54;
export declare const ColonKey: 186;
export declare const CommaKey: 188;
export declare const DecimalKey: 190;
export declare const Digit0Key: 48;
export declare const Digit1Key: 49;
export declare const Digit2Key: 50;
export declare const Digit3Key: 51;
export declare const Digit4Key: 52;
export declare const Digit5Key: 53;
export declare const Digit6Key: 54;
export declare const Digit7Key: 55;
export declare const Digit8Key: 56;
export declare const Digit9Key: 57;
export declare const DivisionSignKey: 191;
export declare const DoubleQuoteKey: 222;
export declare const EndKey: 35;
export declare const EnterKey: 13;
export declare const EqualsSignKey: 187;
export declare const ExclamationPointKey: 49;
/**
* Get the `keyCode` or `which` value from a keyboard event or `key` name.
* If an object is provided, the precedence of properties is `keyCode`, `which`, `key`.
* @param eventOrKey - A keyboard event-like object or `key` name. If an object, at least one of
* `key`, `keyCode`, or `which` must be defined.
*/
export declare function getCode(eventOrKey: Partial<KeyboardEventLike> | string): number | undefined;
/**
* Get the key name from a keyboard event, `keyCode`, or `which` value.
* If an object is provided, the precedence of properties is `key`, `keyCode`, `which`.
* @param eventOrCode - A keyboard event-like object or key code. If an object, at least one of
* `key`, `keyCode`, or `which` must be defined.
*/
export declare function getKey(eventOrCode: Partial<KeyboardEventLike> | number): string | undefined;
export declare const GraveAccentKey: 192;
export declare const HomeKey: 36;
export declare type KeyboardEventLike = Pick<KeyboardEvent, 'key' | 'keyCode' | 'which' | 'shiftKey'>;
/**
* Mapping of keyboard keys with aliases and codes.
*/
export declare const keyboardKey: KeyNames;
export declare interface KeyNames {
Cancel: 3;
Help: 6;
Backspace: 8;
Tab: 9;
Clear: 12;
Enter: 13;
Shift: 16;
Control: 17;
Alt: 18;
Pause: 19;
CapsLock: 20;
Escape: 27;
Convert: 28;
NonConvert: 29;
Accept: 30;
ModeChange: 31;
' ': 32;
PageUp: 33;
PageDown: 34;
End: 35;
Home: 36;
ArrowLeft: 37;
ArrowUp: 38;
ArrowRight: 39;
ArrowDown: 40;
Select: 41;
Print: 42;
Execute: 43;
PrintScreen: 44;
Insert: 45;
Delete: 46;
0: 48;
')': 48;
1: 49;
'!': 49;
2: 50;
'@': 50;
3: 51;
'#': 51;
4: 52;
$: 52;
5: 53;
'%': 53;
6: 54;
'^': 54;
7: 55;
'&': 55;
8: 56;
'*': 56;
9: 57;
'(': 57;
a: 65;
A: 65;
b: 66;
B: 66;
c: 67;
C: 67;
d: 68;
D: 68;
e: 69;
E: 69;
f: 70;
F: 70;
g: 71;
G: 71;
h: 72;
H: 72;
i: 73;
I: 73;
j: 74;
J: 74;
k: 75;
K: 75;
l: 76;
L: 76;
m: 77;
M: 77;
n: 78;
N: 78;
o: 79;
O: 79;
p: 80;
P: 80;
q: 81;
Q: 81;
r: 82;
R: 82;
s: 83;
S: 83;
t: 84;
T: 84;
u: 85;
U: 85;
v: 86;
V: 86;
w: 87;
W: 87;
x: 88;
X: 88;
y: 89;
Y: 89;
z: 90;
Z: 90;
OS: 91;
ContextMenu: 93;
F1: 112;
F2: 113;
F3: 114;
F4: 115;
F5: 116;
F6: 117;
F7: 118;
F8: 119;
F9: 120;
F10: 121;
F11: 122;
F12: 123;
F13: 124;
F14: 125;
F15: 126;
F16: 127;
F17: 128;
F18: 129;
F19: 130;
F20: 131;
F21: 132;
F22: 133;
F23: 134;
F24: 135;
NumLock: 144;
ScrollLock: 145;
VolumeMute: 181;
VolumeDown: 182;
VolumeUp: 183;
';': 186;
':': 186;
'=': 187;
'+': 187;
',': 188;
'<': 188;
'-': 189;
_: 189;
'.': 190;
'>': 190;
'/': 191;
'?': 191;
'`': 192;
'~': 192;
'[': 219;
'{': 219;
'\\': 220;
'|': 220;
']': 221;
'}': 221;
"'": 222;
'"': 222;
Meta: 224;
AltGraph: 225;
Attn: 246;
CrSel: 247;
ExSel: 248;
EraseEof: 249;
Play: 250;
ZoomOut: 251;
}
export declare const LeftAngleBracketKey: 188;
export declare const LeftCurlyBraceKey: 219;
export declare const LeftParenthesisKey: 57;
export declare const LeftSquareBracketKey: 219;
export declare const MinusSignKey: 189;
export declare const MultiplicationSignKey: 56;
export declare const PageDownKey: 34;
export declare const PageUpKey: 33;
export declare const PercentSignKey: 53;
export declare const PipeKey: 220;
export declare const PlusSignKey: 187;
export declare const PoundSignKey: 51;
export declare const QuestionMarkKey: 191;
export declare const RightAngleBracketKey: 190;
export declare const RightCurlyBraceKey: 221;
export declare const RightParenthesisKey: 48;
export declare const RightSquareBracketKey: 221;
export declare const SemicolonKey: 186;
export declare const SingleQuoteKey: 222;
export declare const SpacebarKey: 32;
export declare const TabKey: 9;
export declare const TildeKey: 192;
export { }
+507
View File
@@ -0,0 +1,507 @@
## API Report File for "@fluentui/keyboard-key"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
// @public (undocumented)
export const AmpersandKey: 55;
// @public (undocumented)
export const ArrowDownKey: 40;
// @public (undocumented)
export const ArrowLeftKey: 37;
// @public (undocumented)
export const ArrowRightKey: 39;
// @public (undocumented)
export const ArrowUpKey: 38;
// @public (undocumented)
export const AtSignKey: 50;
// @public (undocumented)
export const BackSlashKey: 220;
// @public (undocumented)
export const CaretKey: 54;
// @public (undocumented)
export const ColonKey: 186;
// @public (undocumented)
export const CommaKey: 188;
// @public (undocumented)
export const DecimalKey: 190;
// @public (undocumented)
export const Digit0Key: 48;
// @public (undocumented)
export const Digit1Key: 49;
// @public (undocumented)
export const Digit2Key: 50;
// @public (undocumented)
export const Digit3Key: 51;
// @public (undocumented)
export const Digit4Key: 52;
// @public (undocumented)
export const Digit5Key: 53;
// @public (undocumented)
export const Digit6Key: 54;
// @public (undocumented)
export const Digit7Key: 55;
// @public (undocumented)
export const Digit8Key: 56;
// @public (undocumented)
export const Digit9Key: 57;
// @public (undocumented)
export const DivisionSignKey: 191;
// @public (undocumented)
export const DoubleQuoteKey: 222;
// @public (undocumented)
export const EndKey: 35;
// @public (undocumented)
export const EnterKey: 13;
// @public (undocumented)
export const EqualsSignKey: 187;
// @public (undocumented)
export const ExclamationPointKey: 49;
// @public
export function getCode(eventOrKey: Partial<KeyboardEventLike> | string): number | undefined;
// @public
export function getKey(eventOrCode: Partial<KeyboardEventLike> | number): string | undefined;
// @public (undocumented)
export const GraveAccentKey: 192;
// @public (undocumented)
export const HomeKey: 36;
// @public (undocumented)
export type KeyboardEventLike = Pick<KeyboardEvent, 'key' | 'keyCode' | 'which' | 'shiftKey'>;
// @public
export const keyboardKey: KeyNames;
// @public (undocumented)
export interface KeyNames {
// (undocumented)
' ': 32;
// (undocumented)
'!': 49;
// (undocumented)
'#': 51;
// (undocumented)
'%': 53;
// (undocumented)
'&': 55;
// (undocumented)
"'": 222;
// (undocumented)
'(': 57;
// (undocumented)
')': 48;
// (undocumented)
'*': 56;
// (undocumented)
'+': 187;
// (undocumented)
',': 188;
// (undocumented)
'-': 189;
// (undocumented)
'.': 190;
// (undocumented)
'/': 191;
// (undocumented)
0: 48;
// (undocumented)
1: 49;
// (undocumented)
2: 50;
// (undocumented)
3: 51;
// (undocumented)
4: 52;
// (undocumented)
5: 53;
// (undocumented)
6: 54;
// (undocumented)
7: 55;
// (undocumented)
8: 56;
// (undocumented)
9: 57;
// (undocumented)
':': 186;
// (undocumented)
';': 186;
// (undocumented)
'<': 188;
// (undocumented)
'=': 187;
// (undocumented)
'>': 190;
// (undocumented)
'?': 191;
// (undocumented)
'@': 50;
// (undocumented)
'[': 219;
// (undocumented)
'"': 222;
// (undocumented)
'\\': 220;
// (undocumented)
']': 221;
// (undocumented)
'^': 54;
// (undocumented)
'`': 192;
// (undocumented)
'{': 219;
// (undocumented)
'|': 220;
// (undocumented)
'}': 221;
// (undocumented)
'~': 192;
// (undocumented)
$: 52;
// (undocumented)
_: 189;
// (undocumented)
A: 65;
// (undocumented)
a: 65;
// (undocumented)
Accept: 30;
// (undocumented)
Alt: 18;
// (undocumented)
AltGraph: 225;
// (undocumented)
ArrowDown: 40;
// (undocumented)
ArrowLeft: 37;
// (undocumented)
ArrowRight: 39;
// (undocumented)
ArrowUp: 38;
// (undocumented)
Attn: 246;
// (undocumented)
B: 66;
// (undocumented)
b: 66;
// (undocumented)
Backspace: 8;
// (undocumented)
C: 67;
// (undocumented)
c: 67;
// (undocumented)
Cancel: 3;
// (undocumented)
CapsLock: 20;
// (undocumented)
Clear: 12;
// (undocumented)
ContextMenu: 93;
// (undocumented)
Control: 17;
// (undocumented)
Convert: 28;
// (undocumented)
CrSel: 247;
// (undocumented)
D: 68;
// (undocumented)
d: 68;
// (undocumented)
Delete: 46;
// (undocumented)
E: 69;
// (undocumented)
e: 69;
// (undocumented)
End: 35;
// (undocumented)
Enter: 13;
// (undocumented)
EraseEof: 249;
// (undocumented)
Escape: 27;
// (undocumented)
Execute: 43;
// (undocumented)
ExSel: 248;
// (undocumented)
F: 70;
// (undocumented)
f: 70;
// (undocumented)
F1: 112;
// (undocumented)
F10: 121;
// (undocumented)
F11: 122;
// (undocumented)
F12: 123;
// (undocumented)
F13: 124;
// (undocumented)
F14: 125;
// (undocumented)
F15: 126;
// (undocumented)
F16: 127;
// (undocumented)
F17: 128;
// (undocumented)
F18: 129;
// (undocumented)
F19: 130;
// (undocumented)
F2: 113;
// (undocumented)
F20: 131;
// (undocumented)
F21: 132;
// (undocumented)
F22: 133;
// (undocumented)
F23: 134;
// (undocumented)
F24: 135;
// (undocumented)
F3: 114;
// (undocumented)
F4: 115;
// (undocumented)
F5: 116;
// (undocumented)
F6: 117;
// (undocumented)
F7: 118;
// (undocumented)
F8: 119;
// (undocumented)
F9: 120;
// (undocumented)
G: 71;
// (undocumented)
g: 71;
// (undocumented)
H: 72;
// (undocumented)
h: 72;
// (undocumented)
Help: 6;
// (undocumented)
Home: 36;
// (undocumented)
I: 73;
// (undocumented)
i: 73;
// (undocumented)
Insert: 45;
// (undocumented)
J: 74;
// (undocumented)
j: 74;
// (undocumented)
K: 75;
// (undocumented)
k: 75;
// (undocumented)
L: 76;
// (undocumented)
l: 76;
// (undocumented)
M: 77;
// (undocumented)
m: 77;
// (undocumented)
Meta: 224;
// (undocumented)
ModeChange: 31;
// (undocumented)
N: 78;
// (undocumented)
n: 78;
// (undocumented)
NonConvert: 29;
// (undocumented)
NumLock: 144;
// (undocumented)
O: 79;
// (undocumented)
o: 79;
// (undocumented)
OS: 91;
// (undocumented)
P: 80;
// (undocumented)
p: 80;
// (undocumented)
PageDown: 34;
// (undocumented)
PageUp: 33;
// (undocumented)
Pause: 19;
// (undocumented)
Play: 250;
// (undocumented)
Print: 42;
// (undocumented)
PrintScreen: 44;
// (undocumented)
Q: 81;
// (undocumented)
q: 81;
// (undocumented)
R: 82;
// (undocumented)
r: 82;
// (undocumented)
S: 83;
// (undocumented)
s: 83;
// (undocumented)
ScrollLock: 145;
// (undocumented)
Select: 41;
// (undocumented)
Shift: 16;
// (undocumented)
T: 84;
// (undocumented)
t: 84;
// (undocumented)
Tab: 9;
// (undocumented)
U: 85;
// (undocumented)
u: 85;
// (undocumented)
V: 86;
// (undocumented)
v: 86;
// (undocumented)
VolumeDown: 182;
// (undocumented)
VolumeMute: 181;
// (undocumented)
VolumeUp: 183;
// (undocumented)
W: 87;
// (undocumented)
w: 87;
// (undocumented)
X: 88;
// (undocumented)
x: 88;
// (undocumented)
Y: 89;
// (undocumented)
y: 89;
// (undocumented)
Z: 90;
// (undocumented)
z: 90;
// (undocumented)
ZoomOut: 251;
}
// @public (undocumented)
export const LeftAngleBracketKey: 188;
// @public (undocumented)
export const LeftCurlyBraceKey: 219;
// @public (undocumented)
export const LeftParenthesisKey: 57;
// @public (undocumented)
export const LeftSquareBracketKey: 219;
// @public (undocumented)
export const MinusSignKey: 189;
// @public (undocumented)
export const MultiplicationSignKey: 56;
// @public (undocumented)
export const PageDownKey: 34;
// @public (undocumented)
export const PageUpKey: 33;
// @public (undocumented)
export const PercentSignKey: 53;
// @public (undocumented)
export const PipeKey: 220;
// @public (undocumented)
export const PlusSignKey: 187;
// @public (undocumented)
export const PoundSignKey: 51;
// @public (undocumented)
export const QuestionMarkKey: 191;
// @public (undocumented)
export const RightAngleBracketKey: 190;
// @public (undocumented)
export const RightCurlyBraceKey: 221;
// @public (undocumented)
export const RightParenthesisKey: 48;
// @public (undocumented)
export const RightSquareBracketKey: 221;
// @public (undocumented)
export const SemicolonKey: 186;
// @public (undocumented)
export const SingleQuoteKey: 222;
// @public (undocumented)
export const SpacebarKey: 32;
// @public (undocumented)
export const TabKey: 9;
// @public (undocumented)
export const TildeKey: 192;
// (No @packageDocumentation comment for this package)
```
+3
View File
@@ -0,0 +1,3 @@
import { preset } from '@fluentui/scripts-tasks';
preset();
+7
View File
@@ -0,0 +1,7 @@
/**
* Mapping from numeric key code to key name. If the value is an array, the first element is the
* primary key name, and the second element is the key name when shift is pressed.
*/
export declare const codes: {
[code: string]: string | string[];
};
+132
View File
@@ -0,0 +1,132 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.codes = void 0;
/**
* Mapping from numeric key code to key name. If the value is an array, the first element is the
* primary key name, and the second element is the key name when shift is pressed.
*/
exports.codes = {
// ----------------------------------------
// By Code
// ----------------------------------------
3: 'Cancel',
6: 'Help',
8: 'Backspace',
9: 'Tab',
12: 'Clear',
13: 'Enter',
16: 'Shift',
17: 'Control',
18: 'Alt',
19: 'Pause',
20: 'CapsLock',
27: 'Escape',
28: 'Convert',
29: 'NonConvert',
30: 'Accept',
31: 'ModeChange',
32: ' ',
33: 'PageUp',
34: 'PageDown',
35: 'End',
36: 'Home',
37: 'ArrowLeft',
38: 'ArrowUp',
39: 'ArrowRight',
40: 'ArrowDown',
41: 'Select',
42: 'Print',
43: 'Execute',
44: 'PrintScreen',
45: 'Insert',
46: 'Delete',
48: ['0', ')'],
49: ['1', '!'],
50: ['2', '@'],
51: ['3', '#'],
52: ['4', '$'],
53: ['5', '%'],
54: ['6', '^'],
55: ['7', '&'],
56: ['8', '*'],
57: ['9', '('],
65: ['a', 'A'],
66: ['b', 'B'],
67: ['c', 'C'],
68: ['d', 'D'],
69: ['e', 'E'],
70: ['f', 'F'],
71: ['g', 'G'],
72: ['h', 'H'],
73: ['i', 'I'],
74: ['j', 'J'],
75: ['k', 'K'],
76: ['l', 'L'],
77: ['m', 'M'],
78: ['n', 'N'],
79: ['o', 'O'],
80: ['p', 'P'],
81: ['q', 'Q'],
82: ['r', 'R'],
83: ['s', 'S'],
84: ['t', 'T'],
85: ['u', 'U'],
86: ['v', 'V'],
87: ['w', 'W'],
88: ['x', 'X'],
89: ['y', 'Y'],
90: ['z', 'Z'],
91: 'OS',
93: 'ContextMenu',
112: 'F1',
113: 'F2',
114: 'F3',
115: 'F4',
116: 'F5',
117: 'F6',
118: 'F7',
119: 'F8',
120: 'F9',
121: 'F10',
122: 'F11',
123: 'F12',
124: 'F13',
125: 'F14',
126: 'F15',
127: 'F16',
128: 'F17',
129: 'F18',
130: 'F19',
131: 'F20',
132: 'F21',
133: 'F22',
134: 'F23',
135: 'F24',
144: 'NumLock',
145: 'ScrollLock',
181: 'VolumeMute',
182: 'VolumeDown',
183: 'VolumeUp',
186: [';', ':'],
187: ['=', '+'],
188: [',', '<'],
189: ['-', '_'],
190: ['.', '>'],
191: ['/', '?'],
192: ['`', '~'],
219: ['[', '{'],
220: ['\\', '|'],
221: [']', '}'],
222: ["'", '"'],
224: 'Meta',
225: 'AltGraph',
246: 'Attn',
247: 'CrSel',
248: 'ExSel',
249: 'EraseEof',
250: 'Play',
251: 'ZoomOut',
};
});
//# sourceMappingURL=codes.js.map
File diff suppressed because one or more lines are too long
+236
View File
@@ -0,0 +1,236 @@
export type KeyboardEventLike = Pick<KeyboardEvent, 'key' | 'keyCode' | 'which' | 'shiftKey'>;
export interface KeyNames {
Cancel: 3;
Help: 6;
Backspace: 8;
Tab: 9;
Clear: 12;
Enter: 13;
Shift: 16;
Control: 17;
Alt: 18;
Pause: 19;
CapsLock: 20;
Escape: 27;
Convert: 28;
NonConvert: 29;
Accept: 30;
ModeChange: 31;
' ': 32;
PageUp: 33;
PageDown: 34;
End: 35;
Home: 36;
ArrowLeft: 37;
ArrowUp: 38;
ArrowRight: 39;
ArrowDown: 40;
Select: 41;
Print: 42;
Execute: 43;
PrintScreen: 44;
Insert: 45;
Delete: 46;
0: 48;
')': 48;
1: 49;
'!': 49;
2: 50;
'@': 50;
3: 51;
'#': 51;
4: 52;
$: 52;
5: 53;
'%': 53;
6: 54;
'^': 54;
7: 55;
'&': 55;
8: 56;
'*': 56;
9: 57;
'(': 57;
a: 65;
A: 65;
b: 66;
B: 66;
c: 67;
C: 67;
d: 68;
D: 68;
e: 69;
E: 69;
f: 70;
F: 70;
g: 71;
G: 71;
h: 72;
H: 72;
i: 73;
I: 73;
j: 74;
J: 74;
k: 75;
K: 75;
l: 76;
L: 76;
m: 77;
M: 77;
n: 78;
N: 78;
o: 79;
O: 79;
p: 80;
P: 80;
q: 81;
Q: 81;
r: 82;
R: 82;
s: 83;
S: 83;
t: 84;
T: 84;
u: 85;
U: 85;
v: 86;
V: 86;
w: 87;
W: 87;
x: 88;
X: 88;
y: 89;
Y: 89;
z: 90;
Z: 90;
OS: 91;
ContextMenu: 93;
F1: 112;
F2: 113;
F3: 114;
F4: 115;
F5: 116;
F6: 117;
F7: 118;
F8: 119;
F9: 120;
F10: 121;
F11: 122;
F12: 123;
F13: 124;
F14: 125;
F15: 126;
F16: 127;
F17: 128;
F18: 129;
F19: 130;
F20: 131;
F21: 132;
F22: 133;
F23: 134;
F24: 135;
NumLock: 144;
ScrollLock: 145;
VolumeMute: 181;
VolumeDown: 182;
VolumeUp: 183;
';': 186;
':': 186;
'=': 187;
'+': 187;
',': 188;
'<': 188;
'-': 189;
_: 189;
'.': 190;
'>': 190;
'/': 191;
'?': 191;
'`': 192;
'~': 192;
'[': 219;
'{': 219;
'\\': 220;
'|': 220;
']': 221;
'}': 221;
"'": 222;
'"': 222;
Meta: 224;
AltGraph: 225;
Attn: 246;
CrSel: 247;
ExSel: 248;
EraseEof: 249;
Play: 250;
ZoomOut: 251;
}
/**
* Get the `keyCode` or `which` value from a keyboard event or `key` name.
* If an object is provided, the precedence of properties is `keyCode`, `which`, `key`.
* @param eventOrKey - A keyboard event-like object or `key` name. If an object, at least one of
* `key`, `keyCode`, or `which` must be defined.
*/
export declare function getCode(eventOrKey: Partial<KeyboardEventLike> | string): number | undefined;
/**
* Get the key name from a keyboard event, `keyCode`, or `which` value.
* If an object is provided, the precedence of properties is `key`, `keyCode`, `which`.
* @param eventOrCode - A keyboard event-like object or key code. If an object, at least one of
* `key`, `keyCode`, or `which` must be defined.
*/
export declare function getKey(eventOrCode: Partial<KeyboardEventLike> | number): string | undefined;
/**
* Mapping of keyboard keys with aliases and codes.
*/
export declare const keyboardKey: KeyNames;
export declare const SpacebarKey: 32;
export declare const Digit0Key: 48;
export declare const Digit1Key: 49;
export declare const Digit2Key: 50;
export declare const Digit3Key: 51;
export declare const Digit4Key: 52;
export declare const Digit5Key: 53;
export declare const Digit6Key: 54;
export declare const Digit7Key: 55;
export declare const Digit8Key: 56;
export declare const Digit9Key: 57;
export declare const TildeKey: 192;
export declare const GraveAccentKey: 192;
export declare const ExclamationPointKey: 49;
export declare const AtSignKey: 50;
export declare const PoundSignKey: 51;
export declare const PercentSignKey: 53;
export declare const CaretKey: 54;
export declare const AmpersandKey: 55;
export declare const PlusSignKey: 187;
export declare const MinusSignKey: 189;
export declare const EqualsSignKey: 187;
export declare const DivisionSignKey: 191;
export declare const MultiplicationSignKey: 56;
export declare const CommaKey: 188;
export declare const DecimalKey: 190;
export declare const ColonKey: 186;
export declare const SemicolonKey: 186;
export declare const PipeKey: 220;
export declare const BackSlashKey: 220;
export declare const QuestionMarkKey: 191;
export declare const SingleQuoteKey: 222;
export declare const DoubleQuoteKey: 222;
export declare const LeftCurlyBraceKey: 219;
export declare const RightCurlyBraceKey: 221;
export declare const LeftParenthesisKey: 57;
export declare const RightParenthesisKey: 48;
export declare const LeftAngleBracketKey: 188;
export declare const RightAngleBracketKey: 190;
export declare const LeftSquareBracketKey: 219;
export declare const RightSquareBracketKey: 221;
export declare const ArrowDownKey: 40;
export declare const ArrowLeftKey: 37;
export declare const ArrowRightKey: 39;
export declare const ArrowUpKey: 38;
export declare const EndKey: 35;
export declare const EnterKey: 13;
export declare const HomeKey: 36;
export declare const PageDownKey: 34;
export declare const PageUpKey: 33;
export declare const TabKey: 9;
+124
View File
@@ -0,0 +1,124 @@
define(["require", "exports", "./codes"], function (require, exports, codes_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TabKey = exports.PageUpKey = exports.PageDownKey = exports.HomeKey = exports.EnterKey = exports.EndKey = exports.ArrowUpKey = exports.ArrowRightKey = exports.ArrowLeftKey = exports.ArrowDownKey = exports.RightSquareBracketKey = exports.LeftSquareBracketKey = exports.RightAngleBracketKey = exports.LeftAngleBracketKey = exports.RightParenthesisKey = exports.LeftParenthesisKey = exports.RightCurlyBraceKey = exports.LeftCurlyBraceKey = exports.DoubleQuoteKey = exports.SingleQuoteKey = exports.QuestionMarkKey = exports.BackSlashKey = exports.PipeKey = exports.SemicolonKey = exports.ColonKey = exports.DecimalKey = exports.CommaKey = exports.MultiplicationSignKey = exports.DivisionSignKey = exports.EqualsSignKey = exports.MinusSignKey = exports.PlusSignKey = exports.AmpersandKey = exports.CaretKey = exports.PercentSignKey = exports.PoundSignKey = exports.AtSignKey = exports.ExclamationPointKey = exports.GraveAccentKey = exports.TildeKey = exports.Digit9Key = exports.Digit8Key = exports.Digit7Key = exports.Digit6Key = exports.Digit5Key = exports.Digit4Key = exports.Digit3Key = exports.Digit2Key = exports.Digit1Key = exports.Digit0Key = exports.SpacebarKey = exports.keyboardKey = exports.getKey = exports.getCode = void 0;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var isObject = function (val) {
return val !== null && !Array.isArray(val) && typeof val === 'object';
};
/**
* Get the `keyCode` or `which` value from a keyboard event or `key` name.
* If an object is provided, the precedence of properties is `keyCode`, `which`, `key`.
* @param eventOrKey - A keyboard event-like object or `key` name. If an object, at least one of
* `key`, `keyCode`, or `which` must be defined.
*/
function getCode(eventOrKey) {
if (isObject(eventOrKey)) {
// eslint-disable-next-line deprecation/deprecation, @typescript-eslint/no-explicit-any
return eventOrKey.keyCode || eventOrKey.which || exports.keyboardKey[eventOrKey.key];
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return exports.keyboardKey[eventOrKey];
}
exports.getCode = getCode;
/**
* Get the key name from a keyboard event, `keyCode`, or `which` value.
* If an object is provided, the precedence of properties is `key`, `keyCode`, `which`.
* @param eventOrCode - A keyboard event-like object or key code. If an object, at least one of
* `key`, `keyCode`, or `which` must be defined.
*/
function getKey(eventOrCode) {
var isEvent = isObject(eventOrCode);
var event = eventOrCode;
// handle events with a `key` already defined
if (isEvent && event.key) {
return event.key;
}
// eslint-disable-next-line deprecation/deprecation
var name = codes_1.codes[(isEvent ? event.keyCode || event.which : eventOrCode)];
if (Array.isArray(name)) {
if (isEvent) {
name = name[event.shiftKey ? 1 : 0];
}
else {
name = name[0];
}
}
return name;
}
exports.getKey = getKey;
/**
* Mapping of keyboard keys with aliases and codes.
*/
exports.keyboardKey = {};
// Populate names on keyboardKey.
for (var code in codes_1.codes) {
if (codes_1.codes.hasOwnProperty(code)) {
var value = codes_1.codes[code];
if (typeof value === 'string') {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
exports.keyboardKey[value] = Number(code);
}
else {
// Array of valid values which map to the same code.
for (var i = 0; i < value.length; i++) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
exports.keyboardKey[value[i]] = Number(code);
}
}
}
}
// As single exports for keys that normally have special functionality attached to them.
exports.SpacebarKey = exports.keyboardKey[' '];
exports.Digit0Key = exports.keyboardKey['0'];
exports.Digit1Key = exports.keyboardKey['1'];
exports.Digit2Key = exports.keyboardKey['2'];
exports.Digit3Key = exports.keyboardKey['3'];
exports.Digit4Key = exports.keyboardKey['4'];
exports.Digit5Key = exports.keyboardKey['5'];
exports.Digit6Key = exports.keyboardKey['6'];
exports.Digit7Key = exports.keyboardKey['7'];
exports.Digit8Key = exports.keyboardKey['8'];
exports.Digit9Key = exports.keyboardKey['9'];
exports.TildeKey = exports.keyboardKey['~'];
exports.GraveAccentKey = exports.keyboardKey['`'];
exports.ExclamationPointKey = exports.keyboardKey['!'];
exports.AtSignKey = exports.keyboardKey['@'];
exports.PoundSignKey = exports.keyboardKey['#'];
exports.PercentSignKey = exports.keyboardKey['%'];
exports.CaretKey = exports.keyboardKey['^'];
exports.AmpersandKey = exports.keyboardKey['&'];
exports.PlusSignKey = exports.keyboardKey['+'];
exports.MinusSignKey = exports.keyboardKey['-'];
exports.EqualsSignKey = exports.keyboardKey['='];
exports.DivisionSignKey = exports.keyboardKey['/'];
exports.MultiplicationSignKey = exports.keyboardKey['*'];
exports.CommaKey = exports.keyboardKey[','];
exports.DecimalKey = exports.keyboardKey['.'];
exports.ColonKey = exports.keyboardKey[':'];
exports.SemicolonKey = exports.keyboardKey[';'];
exports.PipeKey = exports.keyboardKey['|'];
exports.BackSlashKey = exports.keyboardKey['\\'];
exports.QuestionMarkKey = exports.keyboardKey['?'];
exports.SingleQuoteKey = exports.keyboardKey["'"];
exports.DoubleQuoteKey = exports.keyboardKey['"'];
exports.LeftCurlyBraceKey = exports.keyboardKey['{'];
exports.RightCurlyBraceKey = exports.keyboardKey['}'];
exports.LeftParenthesisKey = exports.keyboardKey['('];
exports.RightParenthesisKey = exports.keyboardKey[')'];
exports.LeftAngleBracketKey = exports.keyboardKey['<'];
exports.RightAngleBracketKey = exports.keyboardKey['>'];
exports.LeftSquareBracketKey = exports.keyboardKey['['];
exports.RightSquareBracketKey = exports.keyboardKey[']'];
exports.ArrowDownKey = exports.keyboardKey.ArrowDown;
exports.ArrowLeftKey = exports.keyboardKey.ArrowLeft;
exports.ArrowRightKey = exports.keyboardKey.ArrowRight;
exports.ArrowUpKey = exports.keyboardKey.ArrowUp;
exports.EndKey = exports.keyboardKey.End;
exports.EnterKey = exports.keyboardKey.Enter;
exports.HomeKey = exports.keyboardKey.Home;
exports.PageDownKey = exports.keyboardKey.PageDown;
exports.PageUpKey = exports.keyboardKey.PageUp;
exports.TabKey = exports.keyboardKey.Tab;
});
//# sourceMappingURL=index.js.map
File diff suppressed because one or more lines are too long
+7
View File
@@ -0,0 +1,7 @@
/**
* Mapping from numeric key code to key name. If the value is an array, the first element is the
* primary key name, and the second element is the key name when shift is pressed.
*/
export declare const codes: {
[code: string]: string | string[];
};
+130
View File
@@ -0,0 +1,130 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.codes = void 0;
/**
* Mapping from numeric key code to key name. If the value is an array, the first element is the
* primary key name, and the second element is the key name when shift is pressed.
*/
exports.codes = {
// ----------------------------------------
// By Code
// ----------------------------------------
3: 'Cancel',
6: 'Help',
8: 'Backspace',
9: 'Tab',
12: 'Clear',
13: 'Enter',
16: 'Shift',
17: 'Control',
18: 'Alt',
19: 'Pause',
20: 'CapsLock',
27: 'Escape',
28: 'Convert',
29: 'NonConvert',
30: 'Accept',
31: 'ModeChange',
32: ' ',
33: 'PageUp',
34: 'PageDown',
35: 'End',
36: 'Home',
37: 'ArrowLeft',
38: 'ArrowUp',
39: 'ArrowRight',
40: 'ArrowDown',
41: 'Select',
42: 'Print',
43: 'Execute',
44: 'PrintScreen',
45: 'Insert',
46: 'Delete',
48: ['0', ')'],
49: ['1', '!'],
50: ['2', '@'],
51: ['3', '#'],
52: ['4', '$'],
53: ['5', '%'],
54: ['6', '^'],
55: ['7', '&'],
56: ['8', '*'],
57: ['9', '('],
65: ['a', 'A'],
66: ['b', 'B'],
67: ['c', 'C'],
68: ['d', 'D'],
69: ['e', 'E'],
70: ['f', 'F'],
71: ['g', 'G'],
72: ['h', 'H'],
73: ['i', 'I'],
74: ['j', 'J'],
75: ['k', 'K'],
76: ['l', 'L'],
77: ['m', 'M'],
78: ['n', 'N'],
79: ['o', 'O'],
80: ['p', 'P'],
81: ['q', 'Q'],
82: ['r', 'R'],
83: ['s', 'S'],
84: ['t', 'T'],
85: ['u', 'U'],
86: ['v', 'V'],
87: ['w', 'W'],
88: ['x', 'X'],
89: ['y', 'Y'],
90: ['z', 'Z'],
91: 'OS',
93: 'ContextMenu',
112: 'F1',
113: 'F2',
114: 'F3',
115: 'F4',
116: 'F5',
117: 'F6',
118: 'F7',
119: 'F8',
120: 'F9',
121: 'F10',
122: 'F11',
123: 'F12',
124: 'F13',
125: 'F14',
126: 'F15',
127: 'F16',
128: 'F17',
129: 'F18',
130: 'F19',
131: 'F20',
132: 'F21',
133: 'F22',
134: 'F23',
135: 'F24',
144: 'NumLock',
145: 'ScrollLock',
181: 'VolumeMute',
182: 'VolumeDown',
183: 'VolumeUp',
186: [';', ':'],
187: ['=', '+'],
188: [',', '<'],
189: ['-', '_'],
190: ['.', '>'],
191: ['/', '?'],
192: ['`', '~'],
219: ['[', '{'],
220: ['\\', '|'],
221: [']', '}'],
222: ["'", '"'],
224: 'Meta',
225: 'AltGraph',
246: 'Attn',
247: 'CrSel',
248: 'ExSel',
249: 'EraseEof',
250: 'Play',
251: 'ZoomOut',
};
//# sourceMappingURL=codes.js.map
File diff suppressed because one or more lines are too long
+236
View File
@@ -0,0 +1,236 @@
export type KeyboardEventLike = Pick<KeyboardEvent, 'key' | 'keyCode' | 'which' | 'shiftKey'>;
export interface KeyNames {
Cancel: 3;
Help: 6;
Backspace: 8;
Tab: 9;
Clear: 12;
Enter: 13;
Shift: 16;
Control: 17;
Alt: 18;
Pause: 19;
CapsLock: 20;
Escape: 27;
Convert: 28;
NonConvert: 29;
Accept: 30;
ModeChange: 31;
' ': 32;
PageUp: 33;
PageDown: 34;
End: 35;
Home: 36;
ArrowLeft: 37;
ArrowUp: 38;
ArrowRight: 39;
ArrowDown: 40;
Select: 41;
Print: 42;
Execute: 43;
PrintScreen: 44;
Insert: 45;
Delete: 46;
0: 48;
')': 48;
1: 49;
'!': 49;
2: 50;
'@': 50;
3: 51;
'#': 51;
4: 52;
$: 52;
5: 53;
'%': 53;
6: 54;
'^': 54;
7: 55;
'&': 55;
8: 56;
'*': 56;
9: 57;
'(': 57;
a: 65;
A: 65;
b: 66;
B: 66;
c: 67;
C: 67;
d: 68;
D: 68;
e: 69;
E: 69;
f: 70;
F: 70;
g: 71;
G: 71;
h: 72;
H: 72;
i: 73;
I: 73;
j: 74;
J: 74;
k: 75;
K: 75;
l: 76;
L: 76;
m: 77;
M: 77;
n: 78;
N: 78;
o: 79;
O: 79;
p: 80;
P: 80;
q: 81;
Q: 81;
r: 82;
R: 82;
s: 83;
S: 83;
t: 84;
T: 84;
u: 85;
U: 85;
v: 86;
V: 86;
w: 87;
W: 87;
x: 88;
X: 88;
y: 89;
Y: 89;
z: 90;
Z: 90;
OS: 91;
ContextMenu: 93;
F1: 112;
F2: 113;
F3: 114;
F4: 115;
F5: 116;
F6: 117;
F7: 118;
F8: 119;
F9: 120;
F10: 121;
F11: 122;
F12: 123;
F13: 124;
F14: 125;
F15: 126;
F16: 127;
F17: 128;
F18: 129;
F19: 130;
F20: 131;
F21: 132;
F22: 133;
F23: 134;
F24: 135;
NumLock: 144;
ScrollLock: 145;
VolumeMute: 181;
VolumeDown: 182;
VolumeUp: 183;
';': 186;
':': 186;
'=': 187;
'+': 187;
',': 188;
'<': 188;
'-': 189;
_: 189;
'.': 190;
'>': 190;
'/': 191;
'?': 191;
'`': 192;
'~': 192;
'[': 219;
'{': 219;
'\\': 220;
'|': 220;
']': 221;
'}': 221;
"'": 222;
'"': 222;
Meta: 224;
AltGraph: 225;
Attn: 246;
CrSel: 247;
ExSel: 248;
EraseEof: 249;
Play: 250;
ZoomOut: 251;
}
/**
* Get the `keyCode` or `which` value from a keyboard event or `key` name.
* If an object is provided, the precedence of properties is `keyCode`, `which`, `key`.
* @param eventOrKey - A keyboard event-like object or `key` name. If an object, at least one of
* `key`, `keyCode`, or `which` must be defined.
*/
export declare function getCode(eventOrKey: Partial<KeyboardEventLike> | string): number | undefined;
/**
* Get the key name from a keyboard event, `keyCode`, or `which` value.
* If an object is provided, the precedence of properties is `key`, `keyCode`, `which`.
* @param eventOrCode - A keyboard event-like object or key code. If an object, at least one of
* `key`, `keyCode`, or `which` must be defined.
*/
export declare function getKey(eventOrCode: Partial<KeyboardEventLike> | number): string | undefined;
/**
* Mapping of keyboard keys with aliases and codes.
*/
export declare const keyboardKey: KeyNames;
export declare const SpacebarKey: 32;
export declare const Digit0Key: 48;
export declare const Digit1Key: 49;
export declare const Digit2Key: 50;
export declare const Digit3Key: 51;
export declare const Digit4Key: 52;
export declare const Digit5Key: 53;
export declare const Digit6Key: 54;
export declare const Digit7Key: 55;
export declare const Digit8Key: 56;
export declare const Digit9Key: 57;
export declare const TildeKey: 192;
export declare const GraveAccentKey: 192;
export declare const ExclamationPointKey: 49;
export declare const AtSignKey: 50;
export declare const PoundSignKey: 51;
export declare const PercentSignKey: 53;
export declare const CaretKey: 54;
export declare const AmpersandKey: 55;
export declare const PlusSignKey: 187;
export declare const MinusSignKey: 189;
export declare const EqualsSignKey: 187;
export declare const DivisionSignKey: 191;
export declare const MultiplicationSignKey: 56;
export declare const CommaKey: 188;
export declare const DecimalKey: 190;
export declare const ColonKey: 186;
export declare const SemicolonKey: 186;
export declare const PipeKey: 220;
export declare const BackSlashKey: 220;
export declare const QuestionMarkKey: 191;
export declare const SingleQuoteKey: 222;
export declare const DoubleQuoteKey: 222;
export declare const LeftCurlyBraceKey: 219;
export declare const RightCurlyBraceKey: 221;
export declare const LeftParenthesisKey: 57;
export declare const RightParenthesisKey: 48;
export declare const LeftAngleBracketKey: 188;
export declare const RightAngleBracketKey: 190;
export declare const LeftSquareBracketKey: 219;
export declare const RightSquareBracketKey: 221;
export declare const ArrowDownKey: 40;
export declare const ArrowLeftKey: 37;
export declare const ArrowRightKey: 39;
export declare const ArrowUpKey: 38;
export declare const EndKey: 35;
export declare const EnterKey: 13;
export declare const HomeKey: 36;
export declare const PageDownKey: 34;
export declare const PageUpKey: 33;
export declare const TabKey: 9;
+124
View File
@@ -0,0 +1,124 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EnterKey = exports.EndKey = exports.ArrowUpKey = exports.ArrowRightKey = exports.ArrowLeftKey = exports.ArrowDownKey = exports.RightSquareBracketKey = exports.LeftSquareBracketKey = exports.RightAngleBracketKey = exports.LeftAngleBracketKey = exports.RightParenthesisKey = exports.LeftParenthesisKey = exports.RightCurlyBraceKey = exports.LeftCurlyBraceKey = exports.DoubleQuoteKey = exports.SingleQuoteKey = exports.QuestionMarkKey = exports.BackSlashKey = exports.PipeKey = exports.SemicolonKey = exports.ColonKey = exports.DecimalKey = exports.CommaKey = exports.MultiplicationSignKey = exports.DivisionSignKey = exports.EqualsSignKey = exports.MinusSignKey = exports.PlusSignKey = exports.AmpersandKey = exports.CaretKey = exports.PercentSignKey = exports.PoundSignKey = exports.AtSignKey = exports.ExclamationPointKey = exports.GraveAccentKey = exports.TildeKey = exports.Digit9Key = exports.Digit8Key = exports.Digit7Key = exports.Digit6Key = exports.Digit5Key = exports.Digit4Key = exports.Digit3Key = exports.Digit2Key = exports.Digit1Key = exports.Digit0Key = exports.SpacebarKey = exports.keyboardKey = exports.getKey = exports.getCode = void 0;
exports.TabKey = exports.PageUpKey = exports.PageDownKey = exports.HomeKey = void 0;
var codes_1 = require("./codes");
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var isObject = function (val) {
return val !== null && !Array.isArray(val) && typeof val === 'object';
};
/**
* Get the `keyCode` or `which` value from a keyboard event or `key` name.
* If an object is provided, the precedence of properties is `keyCode`, `which`, `key`.
* @param eventOrKey - A keyboard event-like object or `key` name. If an object, at least one of
* `key`, `keyCode`, or `which` must be defined.
*/
function getCode(eventOrKey) {
if (isObject(eventOrKey)) {
// eslint-disable-next-line deprecation/deprecation, @typescript-eslint/no-explicit-any
return eventOrKey.keyCode || eventOrKey.which || exports.keyboardKey[eventOrKey.key];
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return exports.keyboardKey[eventOrKey];
}
exports.getCode = getCode;
/**
* Get the key name from a keyboard event, `keyCode`, or `which` value.
* If an object is provided, the precedence of properties is `key`, `keyCode`, `which`.
* @param eventOrCode - A keyboard event-like object or key code. If an object, at least one of
* `key`, `keyCode`, or `which` must be defined.
*/
function getKey(eventOrCode) {
var isEvent = isObject(eventOrCode);
var event = eventOrCode;
// handle events with a `key` already defined
if (isEvent && event.key) {
return event.key;
}
// eslint-disable-next-line deprecation/deprecation
var name = codes_1.codes[(isEvent ? event.keyCode || event.which : eventOrCode)];
if (Array.isArray(name)) {
if (isEvent) {
name = name[event.shiftKey ? 1 : 0];
}
else {
name = name[0];
}
}
return name;
}
exports.getKey = getKey;
/**
* Mapping of keyboard keys with aliases and codes.
*/
exports.keyboardKey = {};
// Populate names on keyboardKey.
for (var code in codes_1.codes) {
if (codes_1.codes.hasOwnProperty(code)) {
var value = codes_1.codes[code];
if (typeof value === 'string') {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
exports.keyboardKey[value] = Number(code);
}
else {
// Array of valid values which map to the same code.
for (var i = 0; i < value.length; i++) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
exports.keyboardKey[value[i]] = Number(code);
}
}
}
}
// As single exports for keys that normally have special functionality attached to them.
exports.SpacebarKey = exports.keyboardKey[' '];
exports.Digit0Key = exports.keyboardKey['0'];
exports.Digit1Key = exports.keyboardKey['1'];
exports.Digit2Key = exports.keyboardKey['2'];
exports.Digit3Key = exports.keyboardKey['3'];
exports.Digit4Key = exports.keyboardKey['4'];
exports.Digit5Key = exports.keyboardKey['5'];
exports.Digit6Key = exports.keyboardKey['6'];
exports.Digit7Key = exports.keyboardKey['7'];
exports.Digit8Key = exports.keyboardKey['8'];
exports.Digit9Key = exports.keyboardKey['9'];
exports.TildeKey = exports.keyboardKey['~'];
exports.GraveAccentKey = exports.keyboardKey['`'];
exports.ExclamationPointKey = exports.keyboardKey['!'];
exports.AtSignKey = exports.keyboardKey['@'];
exports.PoundSignKey = exports.keyboardKey['#'];
exports.PercentSignKey = exports.keyboardKey['%'];
exports.CaretKey = exports.keyboardKey['^'];
exports.AmpersandKey = exports.keyboardKey['&'];
exports.PlusSignKey = exports.keyboardKey['+'];
exports.MinusSignKey = exports.keyboardKey['-'];
exports.EqualsSignKey = exports.keyboardKey['='];
exports.DivisionSignKey = exports.keyboardKey['/'];
exports.MultiplicationSignKey = exports.keyboardKey['*'];
exports.CommaKey = exports.keyboardKey[','];
exports.DecimalKey = exports.keyboardKey['.'];
exports.ColonKey = exports.keyboardKey[':'];
exports.SemicolonKey = exports.keyboardKey[';'];
exports.PipeKey = exports.keyboardKey['|'];
exports.BackSlashKey = exports.keyboardKey['\\'];
exports.QuestionMarkKey = exports.keyboardKey['?'];
exports.SingleQuoteKey = exports.keyboardKey["'"];
exports.DoubleQuoteKey = exports.keyboardKey['"'];
exports.LeftCurlyBraceKey = exports.keyboardKey['{'];
exports.RightCurlyBraceKey = exports.keyboardKey['}'];
exports.LeftParenthesisKey = exports.keyboardKey['('];
exports.RightParenthesisKey = exports.keyboardKey[')'];
exports.LeftAngleBracketKey = exports.keyboardKey['<'];
exports.RightAngleBracketKey = exports.keyboardKey['>'];
exports.LeftSquareBracketKey = exports.keyboardKey['['];
exports.RightSquareBracketKey = exports.keyboardKey[']'];
exports.ArrowDownKey = exports.keyboardKey.ArrowDown;
exports.ArrowLeftKey = exports.keyboardKey.ArrowLeft;
exports.ArrowRightKey = exports.keyboardKey.ArrowRight;
exports.ArrowUpKey = exports.keyboardKey.ArrowUp;
exports.EndKey = exports.keyboardKey.End;
exports.EnterKey = exports.keyboardKey.Enter;
exports.HomeKey = exports.keyboardKey.Home;
exports.PageDownKey = exports.keyboardKey.PageDown;
exports.PageUpKey = exports.keyboardKey.PageUp;
exports.TabKey = exports.keyboardKey.Tab;
//# sourceMappingURL=index.js.map
File diff suppressed because one or more lines are too long
+7
View File
@@ -0,0 +1,7 @@
/**
* Mapping from numeric key code to key name. If the value is an array, the first element is the
* primary key name, and the second element is the key name when shift is pressed.
*/
export declare const codes: {
[code: string]: string | string[];
};
+127
View File
@@ -0,0 +1,127 @@
/**
* Mapping from numeric key code to key name. If the value is an array, the first element is the
* primary key name, and the second element is the key name when shift is pressed.
*/
export var codes = {
// ----------------------------------------
// By Code
// ----------------------------------------
3: 'Cancel',
6: 'Help',
8: 'Backspace',
9: 'Tab',
12: 'Clear',
13: 'Enter',
16: 'Shift',
17: 'Control',
18: 'Alt',
19: 'Pause',
20: 'CapsLock',
27: 'Escape',
28: 'Convert',
29: 'NonConvert',
30: 'Accept',
31: 'ModeChange',
32: ' ',
33: 'PageUp',
34: 'PageDown',
35: 'End',
36: 'Home',
37: 'ArrowLeft',
38: 'ArrowUp',
39: 'ArrowRight',
40: 'ArrowDown',
41: 'Select',
42: 'Print',
43: 'Execute',
44: 'PrintScreen',
45: 'Insert',
46: 'Delete',
48: ['0', ')'],
49: ['1', '!'],
50: ['2', '@'],
51: ['3', '#'],
52: ['4', '$'],
53: ['5', '%'],
54: ['6', '^'],
55: ['7', '&'],
56: ['8', '*'],
57: ['9', '('],
65: ['a', 'A'],
66: ['b', 'B'],
67: ['c', 'C'],
68: ['d', 'D'],
69: ['e', 'E'],
70: ['f', 'F'],
71: ['g', 'G'],
72: ['h', 'H'],
73: ['i', 'I'],
74: ['j', 'J'],
75: ['k', 'K'],
76: ['l', 'L'],
77: ['m', 'M'],
78: ['n', 'N'],
79: ['o', 'O'],
80: ['p', 'P'],
81: ['q', 'Q'],
82: ['r', 'R'],
83: ['s', 'S'],
84: ['t', 'T'],
85: ['u', 'U'],
86: ['v', 'V'],
87: ['w', 'W'],
88: ['x', 'X'],
89: ['y', 'Y'],
90: ['z', 'Z'],
91: 'OS',
93: 'ContextMenu',
112: 'F1',
113: 'F2',
114: 'F3',
115: 'F4',
116: 'F5',
117: 'F6',
118: 'F7',
119: 'F8',
120: 'F9',
121: 'F10',
122: 'F11',
123: 'F12',
124: 'F13',
125: 'F14',
126: 'F15',
127: 'F16',
128: 'F17',
129: 'F18',
130: 'F19',
131: 'F20',
132: 'F21',
133: 'F22',
134: 'F23',
135: 'F24',
144: 'NumLock',
145: 'ScrollLock',
181: 'VolumeMute',
182: 'VolumeDown',
183: 'VolumeUp',
186: [';', ':'],
187: ['=', '+'],
188: [',', '<'],
189: ['-', '_'],
190: ['.', '>'],
191: ['/', '?'],
192: ['`', '~'],
219: ['[', '{'],
220: ['\\', '|'],
221: [']', '}'],
222: ["'", '"'],
224: 'Meta',
225: 'AltGraph',
246: 'Attn',
247: 'CrSel',
248: 'ExSel',
249: 'EraseEof',
250: 'Play',
251: 'ZoomOut',
};
//# sourceMappingURL=codes.js.map
File diff suppressed because one or more lines are too long
+236
View File
@@ -0,0 +1,236 @@
export type KeyboardEventLike = Pick<KeyboardEvent, 'key' | 'keyCode' | 'which' | 'shiftKey'>;
export interface KeyNames {
Cancel: 3;
Help: 6;
Backspace: 8;
Tab: 9;
Clear: 12;
Enter: 13;
Shift: 16;
Control: 17;
Alt: 18;
Pause: 19;
CapsLock: 20;
Escape: 27;
Convert: 28;
NonConvert: 29;
Accept: 30;
ModeChange: 31;
' ': 32;
PageUp: 33;
PageDown: 34;
End: 35;
Home: 36;
ArrowLeft: 37;
ArrowUp: 38;
ArrowRight: 39;
ArrowDown: 40;
Select: 41;
Print: 42;
Execute: 43;
PrintScreen: 44;
Insert: 45;
Delete: 46;
0: 48;
')': 48;
1: 49;
'!': 49;
2: 50;
'@': 50;
3: 51;
'#': 51;
4: 52;
$: 52;
5: 53;
'%': 53;
6: 54;
'^': 54;
7: 55;
'&': 55;
8: 56;
'*': 56;
9: 57;
'(': 57;
a: 65;
A: 65;
b: 66;
B: 66;
c: 67;
C: 67;
d: 68;
D: 68;
e: 69;
E: 69;
f: 70;
F: 70;
g: 71;
G: 71;
h: 72;
H: 72;
i: 73;
I: 73;
j: 74;
J: 74;
k: 75;
K: 75;
l: 76;
L: 76;
m: 77;
M: 77;
n: 78;
N: 78;
o: 79;
O: 79;
p: 80;
P: 80;
q: 81;
Q: 81;
r: 82;
R: 82;
s: 83;
S: 83;
t: 84;
T: 84;
u: 85;
U: 85;
v: 86;
V: 86;
w: 87;
W: 87;
x: 88;
X: 88;
y: 89;
Y: 89;
z: 90;
Z: 90;
OS: 91;
ContextMenu: 93;
F1: 112;
F2: 113;
F3: 114;
F4: 115;
F5: 116;
F6: 117;
F7: 118;
F8: 119;
F9: 120;
F10: 121;
F11: 122;
F12: 123;
F13: 124;
F14: 125;
F15: 126;
F16: 127;
F17: 128;
F18: 129;
F19: 130;
F20: 131;
F21: 132;
F22: 133;
F23: 134;
F24: 135;
NumLock: 144;
ScrollLock: 145;
VolumeMute: 181;
VolumeDown: 182;
VolumeUp: 183;
';': 186;
':': 186;
'=': 187;
'+': 187;
',': 188;
'<': 188;
'-': 189;
_: 189;
'.': 190;
'>': 190;
'/': 191;
'?': 191;
'`': 192;
'~': 192;
'[': 219;
'{': 219;
'\\': 220;
'|': 220;
']': 221;
'}': 221;
"'": 222;
'"': 222;
Meta: 224;
AltGraph: 225;
Attn: 246;
CrSel: 247;
ExSel: 248;
EraseEof: 249;
Play: 250;
ZoomOut: 251;
}
/**
* Get the `keyCode` or `which` value from a keyboard event or `key` name.
* If an object is provided, the precedence of properties is `keyCode`, `which`, `key`.
* @param eventOrKey - A keyboard event-like object or `key` name. If an object, at least one of
* `key`, `keyCode`, or `which` must be defined.
*/
export declare function getCode(eventOrKey: Partial<KeyboardEventLike> | string): number | undefined;
/**
* Get the key name from a keyboard event, `keyCode`, or `which` value.
* If an object is provided, the precedence of properties is `key`, `keyCode`, `which`.
* @param eventOrCode - A keyboard event-like object or key code. If an object, at least one of
* `key`, `keyCode`, or `which` must be defined.
*/
export declare function getKey(eventOrCode: Partial<KeyboardEventLike> | number): string | undefined;
/**
* Mapping of keyboard keys with aliases and codes.
*/
export declare const keyboardKey: KeyNames;
export declare const SpacebarKey: 32;
export declare const Digit0Key: 48;
export declare const Digit1Key: 49;
export declare const Digit2Key: 50;
export declare const Digit3Key: 51;
export declare const Digit4Key: 52;
export declare const Digit5Key: 53;
export declare const Digit6Key: 54;
export declare const Digit7Key: 55;
export declare const Digit8Key: 56;
export declare const Digit9Key: 57;
export declare const TildeKey: 192;
export declare const GraveAccentKey: 192;
export declare const ExclamationPointKey: 49;
export declare const AtSignKey: 50;
export declare const PoundSignKey: 51;
export declare const PercentSignKey: 53;
export declare const CaretKey: 54;
export declare const AmpersandKey: 55;
export declare const PlusSignKey: 187;
export declare const MinusSignKey: 189;
export declare const EqualsSignKey: 187;
export declare const DivisionSignKey: 191;
export declare const MultiplicationSignKey: 56;
export declare const CommaKey: 188;
export declare const DecimalKey: 190;
export declare const ColonKey: 186;
export declare const SemicolonKey: 186;
export declare const PipeKey: 220;
export declare const BackSlashKey: 220;
export declare const QuestionMarkKey: 191;
export declare const SingleQuoteKey: 222;
export declare const DoubleQuoteKey: 222;
export declare const LeftCurlyBraceKey: 219;
export declare const RightCurlyBraceKey: 221;
export declare const LeftParenthesisKey: 57;
export declare const RightParenthesisKey: 48;
export declare const LeftAngleBracketKey: 188;
export declare const RightAngleBracketKey: 190;
export declare const LeftSquareBracketKey: 219;
export declare const RightSquareBracketKey: 221;
export declare const ArrowDownKey: 40;
export declare const ArrowLeftKey: 37;
export declare const ArrowRightKey: 39;
export declare const ArrowUpKey: 38;
export declare const EndKey: 35;
export declare const EnterKey: 13;
export declare const HomeKey: 36;
export declare const PageDownKey: 34;
export declare const PageUpKey: 33;
export declare const TabKey: 9;
+118
View File
@@ -0,0 +1,118 @@
import { codes } from './codes';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var isObject = function (val) {
return val !== null && !Array.isArray(val) && typeof val === 'object';
};
/**
* Get the `keyCode` or `which` value from a keyboard event or `key` name.
* If an object is provided, the precedence of properties is `keyCode`, `which`, `key`.
* @param eventOrKey - A keyboard event-like object or `key` name. If an object, at least one of
* `key`, `keyCode`, or `which` must be defined.
*/
export function getCode(eventOrKey) {
if (isObject(eventOrKey)) {
// eslint-disable-next-line deprecation/deprecation, @typescript-eslint/no-explicit-any
return eventOrKey.keyCode || eventOrKey.which || keyboardKey[eventOrKey.key];
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return keyboardKey[eventOrKey];
}
/**
* Get the key name from a keyboard event, `keyCode`, or `which` value.
* If an object is provided, the precedence of properties is `key`, `keyCode`, `which`.
* @param eventOrCode - A keyboard event-like object or key code. If an object, at least one of
* `key`, `keyCode`, or `which` must be defined.
*/
export function getKey(eventOrCode) {
var isEvent = isObject(eventOrCode);
var event = eventOrCode;
// handle events with a `key` already defined
if (isEvent && event.key) {
return event.key;
}
// eslint-disable-next-line deprecation/deprecation
var name = codes[(isEvent ? event.keyCode || event.which : eventOrCode)];
if (Array.isArray(name)) {
if (isEvent) {
name = name[event.shiftKey ? 1 : 0];
}
else {
name = name[0];
}
}
return name;
}
/**
* Mapping of keyboard keys with aliases and codes.
*/
export var keyboardKey = {};
// Populate names on keyboardKey.
for (var code in codes) {
if (codes.hasOwnProperty(code)) {
var value = codes[code];
if (typeof value === 'string') {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
keyboardKey[value] = Number(code);
}
else {
// Array of valid values which map to the same code.
for (var i = 0; i < value.length; i++) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
keyboardKey[value[i]] = Number(code);
}
}
}
}
// As single exports for keys that normally have special functionality attached to them.
export var SpacebarKey = keyboardKey[' '];
export var Digit0Key = keyboardKey['0'];
export var Digit1Key = keyboardKey['1'];
export var Digit2Key = keyboardKey['2'];
export var Digit3Key = keyboardKey['3'];
export var Digit4Key = keyboardKey['4'];
export var Digit5Key = keyboardKey['5'];
export var Digit6Key = keyboardKey['6'];
export var Digit7Key = keyboardKey['7'];
export var Digit8Key = keyboardKey['8'];
export var Digit9Key = keyboardKey['9'];
export var TildeKey = keyboardKey['~'];
export var GraveAccentKey = keyboardKey['`'];
export var ExclamationPointKey = keyboardKey['!'];
export var AtSignKey = keyboardKey['@'];
export var PoundSignKey = keyboardKey['#'];
export var PercentSignKey = keyboardKey['%'];
export var CaretKey = keyboardKey['^'];
export var AmpersandKey = keyboardKey['&'];
export var PlusSignKey = keyboardKey['+'];
export var MinusSignKey = keyboardKey['-'];
export var EqualsSignKey = keyboardKey['='];
export var DivisionSignKey = keyboardKey['/'];
export var MultiplicationSignKey = keyboardKey['*'];
export var CommaKey = keyboardKey[','];
export var DecimalKey = keyboardKey['.'];
export var ColonKey = keyboardKey[':'];
export var SemicolonKey = keyboardKey[';'];
export var PipeKey = keyboardKey['|'];
export var BackSlashKey = keyboardKey['\\'];
export var QuestionMarkKey = keyboardKey['?'];
export var SingleQuoteKey = keyboardKey["'"];
export var DoubleQuoteKey = keyboardKey['"'];
export var LeftCurlyBraceKey = keyboardKey['{'];
export var RightCurlyBraceKey = keyboardKey['}'];
export var LeftParenthesisKey = keyboardKey['('];
export var RightParenthesisKey = keyboardKey[')'];
export var LeftAngleBracketKey = keyboardKey['<'];
export var RightAngleBracketKey = keyboardKey['>'];
export var LeftSquareBracketKey = keyboardKey['['];
export var RightSquareBracketKey = keyboardKey[']'];
export var ArrowDownKey = keyboardKey.ArrowDown;
export var ArrowLeftKey = keyboardKey.ArrowLeft;
export var ArrowRightKey = keyboardKey.ArrowRight;
export var ArrowUpKey = keyboardKey.ArrowUp;
export var EndKey = keyboardKey.End;
export var EnterKey = keyboardKey.Enter;
export var HomeKey = keyboardKey.Home;
export var PageDownKey = keyboardKey.PageDown;
export var PageUpKey = keyboardKey.PageUp;
export var TabKey = keyboardKey.Tab;
//# sourceMappingURL=index.js.map
File diff suppressed because one or more lines are too long
+40
View File
@@ -0,0 +1,40 @@
{
"name": "@fluentui/keyboard-key",
"version": "0.4.23",
"description": "A simple utility for determining the KeyboardEvent.key property from a keyboard event.",
"main": "lib-commonjs/index.js",
"module": "lib/index.js",
"typings": "lib/index.d.ts",
"sideEffects": false,
"repository": {
"type": "git",
"url": "https://github.com/microsoft/fluentui"
},
"license": "MIT",
"scripts": {
"bundle-size": "monosize measure",
"build": "just-scripts build",
"clean": "just-scripts clean",
"code-style": "just-scripts code-style",
"just": "just-scripts",
"lint": "just-scripts lint",
"start-test": "just-scripts jest-watch",
"test": "just-scripts test"
},
"devDependencies": {
"@fluentui/eslint-plugin": "*",
"@fluentui/scripts-api-extractor": "*",
"@fluentui/scripts-jest": "*",
"@fluentui/scripts-tasks": "*"
},
"dependencies": {
"tslib": "^2.1.0"
},
"exports": {
".": {
"types": "./lib/index.d.ts",
"import": "./lib/index.js",
"require": "./lib-commonjs/index.js"
}
}
}