@wordpress/keyboard-shortcuts 3.11.0 → 3.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 3.12.0 (2022-07-27)
6
+
5
7
  ## 3.11.0 (2022-07-13)
6
8
 
7
9
  ## 3.10.0 (2022-06-29)
@@ -22,7 +22,7 @@ var _store = require("../store");
22
22
  /**
23
23
  * Returns a function to check if a keyboard event matches a shortcut name.
24
24
  *
25
- * @return {Function} A function to to check if a keyboard event matches a
25
+ * @return {Function} A function to check if a keyboard event matches a
26
26
  * predefined shortcut combination.
27
27
  */
28
28
  function useShortcutEventMatch() {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/keyboard-shortcuts/src/hooks/use-shortcut-event-match.js"],"names":["useShortcutEventMatch","getAllShortcutKeyCombinations","keyboardShortcutsStore","isMatch","name","event","some","modifier","character","isKeyboardEvent"],"mappings":";;;;;;;AAGA;;AACA;;AAKA;;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,qBAAT,GAAiC;AAC/C,QAAM;AAAEC,IAAAA;AAAF,MAAoC,qBACzCC,YADyC,CAA1C;AAIA;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACC,WAASC,OAAT,CAAkBC,IAAlB,EAAwBC,KAAxB,EAAgC;AAC/B,WAAOJ,6BAA6B,CAAEG,IAAF,CAA7B,CAAsCE,IAAtC,CACN,QAA+B;AAAA,UAA7B;AAAEC,QAAAA,QAAF;AAAYC,QAAAA;AAAZ,OAA6B;AAC9B,aAAOC,0BAAiBF,QAAjB,EAA6BF,KAA7B,EAAoCG,SAApC,CAAP;AACA,KAHK,CAAP;AAKA;;AAED,SAAOL,OAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { isKeyboardEvent } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as keyboardShortcutsStore } from '../store';\n\n/**\n * Returns a function to check if a keyboard event matches a shortcut name.\n *\n * @return {Function} A function to to check if a keyboard event matches a\n * predefined shortcut combination.\n */\nexport default function useShortcutEventMatch() {\n\tconst { getAllShortcutKeyCombinations } = useSelect(\n\t\tkeyboardShortcutsStore\n\t);\n\n\t/**\n\t * A function to check if a keyboard event matches a predefined shortcut\n\t * combination.\n\t *\n\t * @param {string} name Shortcut name.\n\t * @param {KeyboardEvent} event Event to check.\n\t *\n\t * @return {boolean} True if the event matches any shortcuts, false if not.\n\t */\n\tfunction isMatch( name, event ) {\n\t\treturn getAllShortcutKeyCombinations( name ).some(\n\t\t\t( { modifier, character } ) => {\n\t\t\t\treturn isKeyboardEvent[ modifier ]( event, character );\n\t\t\t}\n\t\t);\n\t}\n\n\treturn isMatch;\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/keyboard-shortcuts/src/hooks/use-shortcut-event-match.js"],"names":["useShortcutEventMatch","getAllShortcutKeyCombinations","keyboardShortcutsStore","isMatch","name","event","some","modifier","character","isKeyboardEvent"],"mappings":";;;;;;;AAGA;;AACA;;AAKA;;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,qBAAT,GAAiC;AAC/C,QAAM;AAAEC,IAAAA;AAAF,MAAoC,qBACzCC,YADyC,CAA1C;AAIA;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACC,WAASC,OAAT,CAAkBC,IAAlB,EAAwBC,KAAxB,EAAgC;AAC/B,WAAOJ,6BAA6B,CAAEG,IAAF,CAA7B,CAAsCE,IAAtC,CACN,QAA+B;AAAA,UAA7B;AAAEC,QAAAA,QAAF;AAAYC,QAAAA;AAAZ,OAA6B;AAC9B,aAAOC,0BAAiBF,QAAjB,EAA6BF,KAA7B,EAAoCG,SAApC,CAAP;AACA,KAHK,CAAP;AAKA;;AAED,SAAOL,OAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { isKeyboardEvent } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as keyboardShortcutsStore } from '../store';\n\n/**\n * Returns a function to check if a keyboard event matches a shortcut name.\n *\n * @return {Function} A function to check if a keyboard event matches a\n * predefined shortcut combination.\n */\nexport default function useShortcutEventMatch() {\n\tconst { getAllShortcutKeyCombinations } = useSelect(\n\t\tkeyboardShortcutsStore\n\t);\n\n\t/**\n\t * A function to check if a keyboard event matches a predefined shortcut\n\t * combination.\n\t *\n\t * @param {string} name Shortcut name.\n\t * @param {KeyboardEvent} event Event to check.\n\t *\n\t * @return {boolean} True if the event matches any shortcuts, false if not.\n\t */\n\tfunction isMatch( name, event ) {\n\t\treturn getAllShortcutKeyCombinations( name ).some(\n\t\t\t( { modifier, character } ) => {\n\t\t\t\treturn isKeyboardEvent[ modifier ]( event, character );\n\t\t\t}\n\t\t);\n\t}\n\n\treturn isMatch;\n}\n"]}
@@ -11,7 +11,7 @@ import { store as keyboardShortcutsStore } from '../store';
11
11
  /**
12
12
  * Returns a function to check if a keyboard event matches a shortcut name.
13
13
  *
14
- * @return {Function} A function to to check if a keyboard event matches a
14
+ * @return {Function} A function to check if a keyboard event matches a
15
15
  * predefined shortcut combination.
16
16
  */
17
17
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/keyboard-shortcuts/src/hooks/use-shortcut-event-match.js"],"names":["useSelect","isKeyboardEvent","store","keyboardShortcutsStore","useShortcutEventMatch","getAllShortcutKeyCombinations","isMatch","name","event","some","modifier","character"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,iBAA1B;AACA,SAASC,eAAT,QAAgC,qBAAhC;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,sBAAlB,QAAgD,UAAhD;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAe,SAASC,qBAAT,GAAiC;AAC/C,QAAM;AAAEC,IAAAA;AAAF,MAAoCL,SAAS,CAClDG,sBADkD,CAAnD;AAIA;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACC,WAASG,OAAT,CAAkBC,IAAlB,EAAwBC,KAAxB,EAAgC;AAC/B,WAAOH,6BAA6B,CAAEE,IAAF,CAA7B,CAAsCE,IAAtC,CACN,QAA+B;AAAA,UAA7B;AAAEC,QAAAA,QAAF;AAAYC,QAAAA;AAAZ,OAA6B;AAC9B,aAAOV,eAAe,CAAES,QAAF,CAAf,CAA6BF,KAA7B,EAAoCG,SAApC,CAAP;AACA,KAHK,CAAP;AAKA;;AAED,SAAOL,OAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { isKeyboardEvent } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as keyboardShortcutsStore } from '../store';\n\n/**\n * Returns a function to check if a keyboard event matches a shortcut name.\n *\n * @return {Function} A function to to check if a keyboard event matches a\n * predefined shortcut combination.\n */\nexport default function useShortcutEventMatch() {\n\tconst { getAllShortcutKeyCombinations } = useSelect(\n\t\tkeyboardShortcutsStore\n\t);\n\n\t/**\n\t * A function to check if a keyboard event matches a predefined shortcut\n\t * combination.\n\t *\n\t * @param {string} name Shortcut name.\n\t * @param {KeyboardEvent} event Event to check.\n\t *\n\t * @return {boolean} True if the event matches any shortcuts, false if not.\n\t */\n\tfunction isMatch( name, event ) {\n\t\treturn getAllShortcutKeyCombinations( name ).some(\n\t\t\t( { modifier, character } ) => {\n\t\t\t\treturn isKeyboardEvent[ modifier ]( event, character );\n\t\t\t}\n\t\t);\n\t}\n\n\treturn isMatch;\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/keyboard-shortcuts/src/hooks/use-shortcut-event-match.js"],"names":["useSelect","isKeyboardEvent","store","keyboardShortcutsStore","useShortcutEventMatch","getAllShortcutKeyCombinations","isMatch","name","event","some","modifier","character"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,iBAA1B;AACA,SAASC,eAAT,QAAgC,qBAAhC;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,sBAAlB,QAAgD,UAAhD;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAe,SAASC,qBAAT,GAAiC;AAC/C,QAAM;AAAEC,IAAAA;AAAF,MAAoCL,SAAS,CAClDG,sBADkD,CAAnD;AAIA;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACC,WAASG,OAAT,CAAkBC,IAAlB,EAAwBC,KAAxB,EAAgC;AAC/B,WAAOH,6BAA6B,CAAEE,IAAF,CAA7B,CAAsCE,IAAtC,CACN,QAA+B;AAAA,UAA7B;AAAEC,QAAAA,QAAF;AAAYC,QAAAA;AAAZ,OAA6B;AAC9B,aAAOV,eAAe,CAAES,QAAF,CAAf,CAA6BF,KAA7B,EAAoCG,SAApC,CAAP;AACA,KAHK,CAAP;AAKA;;AAED,SAAOL,OAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { isKeyboardEvent } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as keyboardShortcutsStore } from '../store';\n\n/**\n * Returns a function to check if a keyboard event matches a shortcut name.\n *\n * @return {Function} A function to check if a keyboard event matches a\n * predefined shortcut combination.\n */\nexport default function useShortcutEventMatch() {\n\tconst { getAllShortcutKeyCombinations } = useSelect(\n\t\tkeyboardShortcutsStore\n\t);\n\n\t/**\n\t * A function to check if a keyboard event matches a predefined shortcut\n\t * combination.\n\t *\n\t * @param {string} name Shortcut name.\n\t * @param {KeyboardEvent} event Event to check.\n\t *\n\t * @return {boolean} True if the event matches any shortcuts, false if not.\n\t */\n\tfunction isMatch( name, event ) {\n\t\treturn getAllShortcutKeyCombinations( name ).some(\n\t\t\t( { modifier, character } ) => {\n\t\t\t\treturn isKeyboardEvent[ modifier ]( event, character );\n\t\t\t}\n\t\t);\n\t}\n\n\treturn isMatch;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/keyboard-shortcuts",
3
- "version": "3.11.0",
3
+ "version": "3.12.0",
4
4
  "description": "Handling keyboard shortcuts.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -26,9 +26,9 @@
26
26
  "react-native": "src/index",
27
27
  "dependencies": {
28
28
  "@babel/runtime": "^7.16.0",
29
- "@wordpress/data": "^6.13.0",
30
- "@wordpress/element": "^4.11.0",
31
- "@wordpress/keycodes": "^3.13.0",
29
+ "@wordpress/data": "^6.14.0",
30
+ "@wordpress/element": "^4.12.0",
31
+ "@wordpress/keycodes": "^3.14.0",
32
32
  "rememo": "^4.0.0"
33
33
  },
34
34
  "peerDependencies": {
@@ -37,5 +37,5 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "9d9d33bbdf317a4381b8ca1713e43bb50df653b3"
40
+ "gitHead": "0315dbc240cb2aa146d7c1bafd251f004b88300e"
41
41
  }
@@ -12,7 +12,7 @@ import { store as keyboardShortcutsStore } from '../store';
12
12
  /**
13
13
  * Returns a function to check if a keyboard event matches a shortcut name.
14
14
  *
15
- * @return {Function} A function to to check if a keyboard event matches a
15
+ * @return {Function} A function to check if a keyboard event matches a
16
16
  * predefined shortcut combination.
17
17
  */
18
18
  export default function useShortcutEventMatch() {