@wordpress/customize-widgets 5.32.0 → 5.32.1-next.ff1cebbba.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.
Files changed (164) hide show
  1. package/build/components/block-appender/index.js +33 -27
  2. package/build/components/block-appender/index.js.map +7 -1
  3. package/build/components/block-inspector-button/index.js +51 -36
  4. package/build/components/block-inspector-button/index.js.map +7 -1
  5. package/build/components/customize-widgets/index.js +83 -61
  6. package/build/components/customize-widgets/index.js.map +7 -1
  7. package/build/components/customize-widgets/use-clear-selected-block.js +56 -63
  8. package/build/components/customize-widgets/use-clear-selected-block.js.map +7 -1
  9. package/build/components/error-boundary/index.js +46 -45
  10. package/build/components/error-boundary/index.js.map +7 -1
  11. package/build/components/focus-control/index.js +69 -57
  12. package/build/components/focus-control/index.js.map +7 -1
  13. package/build/components/focus-control/use-blocks-focus-control.js +38 -31
  14. package/build/components/focus-control/use-blocks-focus-control.js.map +7 -1
  15. package/build/components/header/index.js +110 -71
  16. package/build/components/header/index.js.map +7 -1
  17. package/build/components/inserter/index.js +77 -53
  18. package/build/components/inserter/index.js.map +7 -1
  19. package/build/components/inserter/use-inserter.js +46 -29
  20. package/build/components/inserter/use-inserter.js.map +7 -1
  21. package/build/components/keyboard-shortcut-help-modal/config.js +74 -71
  22. package/build/components/keyboard-shortcut-help-modal/config.js.map +7 -1
  23. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +61 -44
  24. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +7 -1
  25. package/build/components/keyboard-shortcut-help-modal/index.js +155 -110
  26. package/build/components/keyboard-shortcut-help-modal/index.js.map +7 -1
  27. package/build/components/keyboard-shortcut-help-modal/shortcut.js +76 -56
  28. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +7 -1
  29. package/build/components/keyboard-shortcuts/index.js +60 -51
  30. package/build/components/keyboard-shortcuts/index.js.map +7 -1
  31. package/build/components/more-menu/index.js +151 -90
  32. package/build/components/more-menu/index.js.map +7 -1
  33. package/build/components/sidebar-block-editor/index.js +133 -105
  34. package/build/components/sidebar-block-editor/index.js.map +7 -1
  35. package/build/components/sidebar-block-editor/sidebar-adapter.js +73 -67
  36. package/build/components/sidebar-block-editor/sidebar-adapter.js.map +7 -1
  37. package/build/components/sidebar-block-editor/sidebar-editor-provider.js +51 -33
  38. package/build/components/sidebar-block-editor/sidebar-editor-provider.js.map +7 -1
  39. package/build/components/sidebar-block-editor/use-sidebar-block-editor.js +100 -79
  40. package/build/components/sidebar-block-editor/use-sidebar-block-editor.js.map +7 -1
  41. package/build/components/sidebar-controls/index.js +45 -31
  42. package/build/components/sidebar-controls/index.js.map +7 -1
  43. package/build/components/welcome-guide/index.js +86 -58
  44. package/build/components/welcome-guide/index.js.map +7 -1
  45. package/build/controls/inserter-outer-section.js +49 -58
  46. package/build/controls/inserter-outer-section.js.map +7 -1
  47. package/build/controls/inspector-section.js +30 -36
  48. package/build/controls/inspector-section.js.map +7 -1
  49. package/build/controls/sidebar-control.js +51 -30
  50. package/build/controls/sidebar-control.js.map +7 -1
  51. package/build/controls/sidebar-section.js +71 -39
  52. package/build/controls/sidebar-section.js.map +7 -1
  53. package/build/filters/index.js +4 -6
  54. package/build/filters/index.js.map +7 -1
  55. package/build/filters/move-to-sidebar.js +77 -79
  56. package/build/filters/move-to-sidebar.js.map +7 -1
  57. package/build/filters/replace-media-upload.js +9 -11
  58. package/build/filters/replace-media-upload.js.map +7 -1
  59. package/build/filters/wide-widget-display.js +20 -25
  60. package/build/filters/wide-widget-display.js.map +7 -1
  61. package/build/index.js +81 -70
  62. package/build/index.js.map +7 -1
  63. package/build/lock-unlock.js +31 -15
  64. package/build/lock-unlock.js.map +7 -1
  65. package/build/store/actions.js +27 -44
  66. package/build/store/actions.js.map +7 -1
  67. package/build/store/constants.js +27 -10
  68. package/build/store/constants.js.map +7 -1
  69. package/build/store/index.js +44 -40
  70. package/build/store/index.js.map +7 -1
  71. package/build/store/reducer.js +25 -19
  72. package/build/store/reducer.js.map +7 -1
  73. package/build/store/selectors.js +31 -44
  74. package/build/store/selectors.js.map +7 -1
  75. package/build/utils.js +45 -73
  76. package/build/utils.js.map +7 -1
  77. package/build-module/components/block-appender/index.js +17 -20
  78. package/build-module/components/block-appender/index.js.map +7 -1
  79. package/build-module/components/block-inspector-button/index.js +33 -30
  80. package/build-module/components/block-inspector-button/index.js.map +7 -1
  81. package/build-module/components/customize-widgets/index.js +52 -51
  82. package/build-module/components/customize-widgets/index.js.map +7 -1
  83. package/build-module/components/customize-widgets/use-clear-selected-block.js +38 -58
  84. package/build-module/components/customize-widgets/use-clear-selected-block.js.map +7 -1
  85. package/build-module/components/error-boundary/index.js +27 -37
  86. package/build-module/components/error-boundary/index.js.map +7 -1
  87. package/build-module/components/focus-control/index.js +50 -45
  88. package/build-module/components/focus-control/index.js.map +7 -1
  89. package/build-module/components/focus-control/use-blocks-focus-control.js +17 -22
  90. package/build-module/components/focus-control/use-blocks-focus-control.js.map +7 -1
  91. package/build-module/components/header/index.js +81 -63
  92. package/build-module/components/header/index.js.map +7 -1
  93. package/build-module/components/inserter/index.js +59 -47
  94. package/build-module/components/inserter/index.js.map +7 -1
  95. package/build-module/components/inserter/use-inserter.js +28 -23
  96. package/build-module/components/inserter/use-inserter.js.map +7 -1
  97. package/build-module/components/keyboard-shortcut-help-modal/config.js +62 -75
  98. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +7 -1
  99. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +33 -37
  100. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +7 -1
  101. package/build-module/components/keyboard-shortcut-help-modal/index.js +130 -103
  102. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +7 -1
  103. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +58 -50
  104. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +7 -1
  105. package/build-module/components/keyboard-shortcuts/index.js +44 -44
  106. package/build-module/components/keyboard-shortcuts/index.js.map +7 -1
  107. package/build-module/components/more-menu/index.js +129 -84
  108. package/build-module/components/more-menu/index.js.map +7 -1
  109. package/build-module/components/sidebar-block-editor/index.js +109 -96
  110. package/build-module/components/sidebar-block-editor/index.js.map +7 -1
  111. package/build-module/components/sidebar-block-editor/sidebar-adapter.js +54 -59
  112. package/build-module/components/sidebar-block-editor/sidebar-adapter.js.map +7 -1
  113. package/build-module/components/sidebar-block-editor/sidebar-editor-provider.js +22 -25
  114. package/build-module/components/sidebar-block-editor/sidebar-editor-provider.js.map +7 -1
  115. package/build-module/components/sidebar-block-editor/use-sidebar-block-editor.js +70 -70
  116. package/build-module/components/sidebar-block-editor/use-sidebar-block-editor.js.map +7 -1
  117. package/build-module/components/sidebar-controls/index.js +24 -25
  118. package/build-module/components/sidebar-controls/index.js.map +7 -1
  119. package/build-module/components/welcome-guide/index.js +68 -52
  120. package/build-module/components/welcome-guide/index.js.map +7 -1
  121. package/build-module/controls/inserter-outer-section.js +31 -52
  122. package/build-module/controls/inserter-outer-section.js.map +7 -1
  123. package/build-module/controls/inspector-section.js +13 -32
  124. package/build-module/controls/inspector-section.js.map +7 -1
  125. package/build-module/controls/sidebar-control.js +22 -22
  126. package/build-module/controls/sidebar-control.js.map +7 -1
  127. package/build-module/controls/sidebar-section.js +43 -32
  128. package/build-module/controls/sidebar-section.js.map +7 -1
  129. package/build-module/filters/index.js +4 -7
  130. package/build-module/filters/index.js.map +7 -1
  131. package/build-module/filters/move-to-sidebar.js +83 -76
  132. package/build-module/filters/move-to-sidebar.js.map +7 -1
  133. package/build-module/filters/replace-media-upload.js +8 -7
  134. package/build-module/filters/replace-media-upload.js.map +7 -1
  135. package/build-module/filters/wide-widget-display.js +20 -22
  136. package/build-module/filters/wide-widget-display.js.map +7 -1
  137. package/build-module/index.js +53 -51
  138. package/build-module/index.js.map +7 -1
  139. package/build-module/lock-unlock.js +8 -7
  140. package/build-module/lock-unlock.js.map +7 -1
  141. package/build-module/store/actions.js +6 -40
  142. package/build-module/store/actions.js.map +7 -1
  143. package/build-module/store/constants.js +5 -5
  144. package/build-module/store/constants.js.map +7 -1
  145. package/build-module/store/index.js +10 -30
  146. package/build-module/store/index.js.map +7 -1
  147. package/build-module/store/reducer.js +7 -14
  148. package/build-module/store/reducer.js.map +7 -1
  149. package/build-module/store/selectors.js +10 -40
  150. package/build-module/store/selectors.js.map +7 -1
  151. package/build-module/utils.js +21 -66
  152. package/build-module/utils.js.map +7 -1
  153. package/build-style/style-rtl.css +14 -149
  154. package/build-style/style.css +14 -149
  155. package/package.json +30 -23
  156. package/src/components/block-inspector-button/style.scss +3 -0
  157. package/src/components/header/style.scss +5 -0
  158. package/src/components/inserter/style.scss +3 -0
  159. package/src/components/keyboard-shortcut-help-modal/style.scss +2 -0
  160. package/src/components/more-menu/style.scss +2 -0
  161. package/src/components/sidebar-block-editor/style.scss +2 -0
  162. package/src/components/welcome-guide/style.scss +2 -0
  163. package/src/controls/style.scss +2 -0
  164. package/src/style.scss +10 -8
@@ -1,75 +1,62 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { __ } from '@wordpress/i18n';
5
- export const textFormattingShortcuts = [{
6
- keyCombination: {
7
- modifier: 'primary',
8
- character: 'b'
9
- },
10
- description: __('Make the selected text bold.')
11
- }, {
12
- keyCombination: {
13
- modifier: 'primary',
14
- character: 'i'
15
- },
16
- description: __('Make the selected text italic.')
17
- }, {
18
- keyCombination: {
19
- modifier: 'primary',
20
- character: 'k'
21
- },
22
- description: __('Convert the selected text into a link.')
23
- }, {
24
- keyCombination: {
25
- modifier: 'primaryShift',
26
- character: 'k'
27
- },
28
- description: __('Remove a link.')
29
- }, {
30
- keyCombination: {
31
- character: '[['
32
- },
33
- description: __('Insert a link to a post or page.')
34
- }, {
35
- keyCombination: {
36
- modifier: 'primary',
37
- character: 'u'
38
- },
39
- description: __('Underline the selected text.')
40
- }, {
41
- keyCombination: {
42
- modifier: 'access',
43
- character: 'd'
44
- },
45
- description: __('Strikethrough the selected text.')
46
- }, {
47
- keyCombination: {
48
- modifier: 'access',
49
- character: 'x'
50
- },
51
- description: __('Make the selected text inline code.')
52
- }, {
53
- keyCombination: {
54
- modifier: 'access',
55
- character: '0'
56
- },
57
- aliases: [{
58
- modifier: 'access',
59
- character: '7'
60
- }],
61
- description: __('Convert the current heading to a paragraph.')
62
- }, {
63
- keyCombination: {
64
- modifier: 'access',
65
- character: '1-6'
66
- },
67
- description: __('Convert the current paragraph or heading to a heading of level 1 to 6.')
68
- }, {
69
- keyCombination: {
70
- modifier: 'primaryShift',
71
- character: 'SPACE'
72
- },
73
- description: __('Add non breaking space.')
74
- }];
75
- //# sourceMappingURL=config.js.map
1
+ import { __ } from "@wordpress/i18n";
2
+ const textFormattingShortcuts = [
3
+ {
4
+ keyCombination: { modifier: "primary", character: "b" },
5
+ description: __("Make the selected text bold.")
6
+ },
7
+ {
8
+ keyCombination: { modifier: "primary", character: "i" },
9
+ description: __("Make the selected text italic.")
10
+ },
11
+ {
12
+ keyCombination: { modifier: "primary", character: "k" },
13
+ description: __("Convert the selected text into a link.")
14
+ },
15
+ {
16
+ keyCombination: { modifier: "primaryShift", character: "k" },
17
+ description: __("Remove a link.")
18
+ },
19
+ {
20
+ keyCombination: { character: "[[" },
21
+ description: __("Insert a link to a post or page.")
22
+ },
23
+ {
24
+ keyCombination: { modifier: "primary", character: "u" },
25
+ description: __("Underline the selected text.")
26
+ },
27
+ {
28
+ keyCombination: { modifier: "access", character: "d" },
29
+ description: __("Strikethrough the selected text.")
30
+ },
31
+ {
32
+ keyCombination: { modifier: "access", character: "x" },
33
+ description: __("Make the selected text inline code.")
34
+ },
35
+ {
36
+ keyCombination: {
37
+ modifier: "access",
38
+ character: "0"
39
+ },
40
+ aliases: [
41
+ {
42
+ modifier: "access",
43
+ character: "7"
44
+ }
45
+ ],
46
+ description: __("Convert the current heading to a paragraph.")
47
+ },
48
+ {
49
+ keyCombination: { modifier: "access", character: "1-6" },
50
+ description: __(
51
+ "Convert the current paragraph or heading to a heading of level 1 to 6."
52
+ )
53
+ },
54
+ {
55
+ keyCombination: { modifier: "primaryShift", character: "SPACE" },
56
+ description: __("Add non breaking space.")
57
+ }
58
+ ];
59
+ export {
60
+ textFormattingShortcuts
61
+ };
62
+ //# sourceMappingURL=config.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["__","textFormattingShortcuts","keyCombination","modifier","character","description","aliases"],"sources":["@wordpress/customize-widgets/src/components/keyboard-shortcut-help-modal/config.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const textFormattingShortcuts = [\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'b' },\n\t\tdescription: __( 'Make the selected text bold.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'i' },\n\t\tdescription: __( 'Make the selected text italic.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'k' },\n\t\tdescription: __( 'Convert the selected text into a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'k' },\n\t\tdescription: __( 'Remove a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { character: '[[' },\n\t\tdescription: __( 'Insert a link to a post or page.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'u' },\n\t\tdescription: __( 'Underline the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'd' },\n\t\tdescription: __( 'Strikethrough the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'x' },\n\t\tdescription: __( 'Make the selected text inline code.' ),\n\t},\n\t{\n\t\tkeyCombination: {\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: '0',\n\t\t},\n\t\taliases: [\n\t\t\t{\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: '7',\n\t\t\t},\n\t\t],\n\t\tdescription: __( 'Convert the current heading to a paragraph.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '1-6' },\n\t\tdescription: __(\n\t\t\t'Convert the current paragraph or heading to a heading of level 1 to 6.'\n\t\t),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'SPACE' },\n\t\tdescription: __( 'Add non breaking space.' ),\n\t},\n];\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AAEpC,OAAO,MAAMC,uBAAuB,GAAG,CACtC;EACCC,cAAc,EAAE;IAAEC,QAAQ,EAAE,SAAS;IAAEC,SAAS,EAAE;EAAI,CAAC;EACvDC,WAAW,EAAEL,EAAE,CAAE,8BAA+B;AACjD,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,SAAS;IAAEC,SAAS,EAAE;EAAI,CAAC;EACvDC,WAAW,EAAEL,EAAE,CAAE,gCAAiC;AACnD,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,SAAS;IAAEC,SAAS,EAAE;EAAI,CAAC;EACvDC,WAAW,EAAEL,EAAE,CAAE,wCAAyC;AAC3D,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,cAAc;IAAEC,SAAS,EAAE;EAAI,CAAC;EAC5DC,WAAW,EAAEL,EAAE,CAAE,gBAAiB;AACnC,CAAC,EACD;EACCE,cAAc,EAAE;IAAEE,SAAS,EAAE;EAAK,CAAC;EACnCC,WAAW,EAAEL,EAAE,CAAE,kCAAmC;AACrD,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,SAAS;IAAEC,SAAS,EAAE;EAAI,CAAC;EACvDC,WAAW,EAAEL,EAAE,CAAE,8BAA+B;AACjD,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,QAAQ;IAAEC,SAAS,EAAE;EAAI,CAAC;EACtDC,WAAW,EAAEL,EAAE,CAAE,kCAAmC;AACrD,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,QAAQ;IAAEC,SAAS,EAAE;EAAI,CAAC;EACtDC,WAAW,EAAEL,EAAE,CAAE,qCAAsC;AACxD,CAAC,EACD;EACCE,cAAc,EAAE;IACfC,QAAQ,EAAE,QAAQ;IAClBC,SAAS,EAAE;EACZ,CAAC;EACDE,OAAO,EAAE,CACR;IACCH,QAAQ,EAAE,QAAQ;IAClBC,SAAS,EAAE;EACZ,CAAC,CACD;EACDC,WAAW,EAAEL,EAAE,CAAE,6CAA8C;AAChE,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,QAAQ;IAAEC,SAAS,EAAE;EAAM,CAAC;EACxDC,WAAW,EAAEL,EAAE,CACd,wEACD;AACD,CAAC,EACD;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,cAAc;IAAEC,SAAS,EAAE;EAAQ,CAAC;EAChEC,WAAW,EAAEL,EAAE,CAAE,yBAA0B;AAC5C,CAAC,CACD","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/keyboard-shortcut-help-modal/config.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const textFormattingShortcuts = [\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'b' },\n\t\tdescription: __( 'Make the selected text bold.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'i' },\n\t\tdescription: __( 'Make the selected text italic.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'k' },\n\t\tdescription: __( 'Convert the selected text into a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'k' },\n\t\tdescription: __( 'Remove a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { character: '[[' },\n\t\tdescription: __( 'Insert a link to a post or page.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'u' },\n\t\tdescription: __( 'Underline the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'd' },\n\t\tdescription: __( 'Strikethrough the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'x' },\n\t\tdescription: __( 'Make the selected text inline code.' ),\n\t},\n\t{\n\t\tkeyCombination: {\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: '0',\n\t\t},\n\t\taliases: [\n\t\t\t{\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: '7',\n\t\t\t},\n\t\t],\n\t\tdescription: __( 'Convert the current heading to a paragraph.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '1-6' },\n\t\tdescription: __(\n\t\t\t'Convert the current paragraph or heading to a heading of level 1 to 6.'\n\t\t),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'SPACE' },\n\t\tdescription: __( 'Add non breaking space.' ),\n\t},\n];\n"],
5
+ "mappings": "AAGA,SAAS,UAAU;AAEZ,MAAM,0BAA0B;AAAA,EACtC;AAAA,IACC,gBAAgB,EAAE,UAAU,WAAW,WAAW,IAAI;AAAA,IACtD,aAAa,GAAI,8BAA+B;AAAA,EACjD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,WAAW,WAAW,IAAI;AAAA,IACtD,aAAa,GAAI,gCAAiC;AAAA,EACnD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,WAAW,WAAW,IAAI;AAAA,IACtD,aAAa,GAAI,wCAAyC;AAAA,EAC3D;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,gBAAgB,WAAW,IAAI;AAAA,IAC3D,aAAa,GAAI,gBAAiB;AAAA,EACnC;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,WAAW,KAAK;AAAA,IAClC,aAAa,GAAI,kCAAmC;AAAA,EACrD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,WAAW,WAAW,IAAI;AAAA,IACtD,aAAa,GAAI,8BAA+B;AAAA,EACjD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,UAAU,WAAW,IAAI;AAAA,IACrD,aAAa,GAAI,kCAAmC;AAAA,EACrD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,UAAU,WAAW,IAAI;AAAA,IACrD,aAAa,GAAI,qCAAsC;AAAA,EACxD;AAAA,EACA;AAAA,IACC,gBAAgB;AAAA,MACf,UAAU;AAAA,MACV,WAAW;AAAA,IACZ;AAAA,IACA,SAAS;AAAA,MACR;AAAA,QACC,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,IACD;AAAA,IACA,aAAa,GAAI,6CAA8C;AAAA,EAChE;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,UAAU,WAAW,MAAM;AAAA,IACvD,aAAa;AAAA,MACZ;AAAA,IACD;AAAA,EACD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,gBAAgB,WAAW,QAAQ;AAAA,IAC/D,aAAa,GAAI,yBAA0B;AAAA,EAC5C;AACD;",
6
+ "names": []
7
+ }
@@ -1,41 +1,37 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { useSelect } from '@wordpress/data';
5
- import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
6
-
7
- /**
8
- * Internal dependencies
9
- */
10
- import Shortcut from './shortcut';
11
- import { jsx as _jsx } from "react/jsx-runtime";
12
- function DynamicShortcut({
13
- name
14
- }) {
15
- const {
16
- keyCombination,
17
- description,
18
- aliases
19
- } = useSelect(select => {
20
- const {
21
- getShortcutKeyCombination,
22
- getShortcutDescription,
23
- getShortcutAliases
24
- } = select(keyboardShortcutsStore);
25
- return {
26
- keyCombination: getShortcutKeyCombination(name),
27
- aliases: getShortcutAliases(name),
28
- description: getShortcutDescription(name)
29
- };
30
- }, [name]);
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useSelect } from "@wordpress/data";
3
+ import { store as keyboardShortcutsStore } from "@wordpress/keyboard-shortcuts";
4
+ import Shortcut from "./shortcut";
5
+ function DynamicShortcut({ name }) {
6
+ const { keyCombination, description, aliases } = useSelect(
7
+ (select) => {
8
+ const {
9
+ getShortcutKeyCombination,
10
+ getShortcutDescription,
11
+ getShortcutAliases
12
+ } = select(keyboardShortcutsStore);
13
+ return {
14
+ keyCombination: getShortcutKeyCombination(name),
15
+ aliases: getShortcutAliases(name),
16
+ description: getShortcutDescription(name)
17
+ };
18
+ },
19
+ [name]
20
+ );
31
21
  if (!keyCombination) {
32
22
  return null;
33
23
  }
34
- return /*#__PURE__*/_jsx(Shortcut, {
35
- keyCombination: keyCombination,
36
- description: description,
37
- aliases: aliases
38
- });
24
+ return /* @__PURE__ */ jsx(
25
+ Shortcut,
26
+ {
27
+ keyCombination,
28
+ description,
29
+ aliases
30
+ }
31
+ );
39
32
  }
40
- export default DynamicShortcut;
41
- //# sourceMappingURL=dynamic-shortcut.js.map
33
+ var dynamic_shortcut_default = DynamicShortcut;
34
+ export {
35
+ dynamic_shortcut_default as default
36
+ };
37
+ //# sourceMappingURL=dynamic-shortcut.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["useSelect","store","keyboardShortcutsStore","Shortcut","jsx","_jsx","DynamicShortcut","name","keyCombination","description","aliases","select","getShortcutKeyCombination","getShortcutDescription","getShortcutAliases"],"sources":["@wordpress/customize-widgets/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,sBAAsB,QAAQ,+BAA+B;;AAE/E;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElC,SAASC,eAAeA,CAAE;EAAEC;AAAK,CAAC,EAAG;EACpC,MAAM;IAAEC,cAAc;IAAEC,WAAW;IAAEC;EAAQ,CAAC,GAAGV,SAAS,CACvDW,MAAM,IAAM;IACb,MAAM;MACLC,yBAAyB;MACzBC,sBAAsB;MACtBC;IACD,CAAC,GAAGH,MAAM,CAAET,sBAAuB,CAAC;IAEpC,OAAO;MACNM,cAAc,EAAEI,yBAAyB,CAAEL,IAAK,CAAC;MACjDG,OAAO,EAAEI,kBAAkB,CAAEP,IAAK,CAAC;MACnCE,WAAW,EAAEI,sBAAsB,CAAEN,IAAK;IAC3C,CAAC;EACF,CAAC,EACD,CAAEA,IAAI,CACP,CAAC;EAED,IAAK,CAAEC,cAAc,EAAG;IACvB,OAAO,IAAI;EACZ;EAEA,oBACCH,IAAA,CAACF,QAAQ;IACRK,cAAc,EAAGA,cAAgB;IACjCC,WAAW,EAAGA,WAAa;IAC3BC,OAAO,EAAGA;EAAS,CACnB,CAAC;AAEJ;AAEA,eAAeJ,eAAe","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n"],
5
+ "mappings": "AAkCE;AA/BF,SAAS,iBAAiB;AAC1B,SAAS,SAAS,8BAA8B;AAKhD,OAAO,cAAc;AAErB,SAAS,gBAAiB,EAAE,KAAK,GAAI;AACpC,QAAM,EAAE,gBAAgB,aAAa,QAAQ,IAAI;AAAA,IAChD,CAAE,WAAY;AACb,YAAM;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,MACD,IAAI,OAAQ,sBAAuB;AAEnC,aAAO;AAAA,QACN,gBAAgB,0BAA2B,IAAK;AAAA,QAChD,SAAS,mBAAoB,IAAK;AAAA,QAClC,aAAa,uBAAwB,IAAK;AAAA,MAC3C;AAAA,IACD;AAAA,IACA,CAAE,IAAK;AAAA,EACR;AAEA,MAAK,CAAE,gBAAiB;AACvB,WAAO;AAAA,EACR;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACD;AAEF;AAEA,IAAO,2BAAQ;",
6
+ "names": []
7
+ }
@@ -1,122 +1,149 @@
1
- /**
2
- * External dependencies
3
- */
4
- import clsx from 'clsx';
5
-
6
- /**
7
- * WordPress dependencies
8
- */
9
- import { Modal } from '@wordpress/components';
10
- import { __ } from '@wordpress/i18n';
11
- import { useShortcut, store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
12
- import { useDispatch, useSelect } from '@wordpress/data';
13
- import { useEffect } from '@wordpress/element';
14
-
15
- /**
16
- * Internal dependencies
17
- */
18
- import { textFormattingShortcuts } from './config';
19
- import Shortcut from './shortcut';
20
- import DynamicShortcut from './dynamic-shortcut';
21
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
- const ShortcutList = ({
23
- shortcuts
24
- }) =>
25
- /*#__PURE__*/
26
- /*
27
- * Disable reason: The `list` ARIA role is redundant but
28
- * Safari+VoiceOver won't announce the list otherwise.
29
- */
30
- /* eslint-disable jsx-a11y/no-redundant-roles */
31
- _jsx("ul", {
32
- className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-list",
33
- role: "list",
34
- children: shortcuts.map((shortcut, index) => /*#__PURE__*/_jsx("li", {
35
- className: "customize-widgets-keyboard-shortcut-help-modal__shortcut",
36
- children: typeof shortcut === 'string' ? /*#__PURE__*/_jsx(DynamicShortcut, {
37
- name: shortcut
38
- }) : /*#__PURE__*/_jsx(Shortcut, {
39
- ...shortcut
40
- })
41
- }, index))
42
- })
43
- /* eslint-enable jsx-a11y/no-redundant-roles */;
44
- const ShortcutSection = ({
45
- title,
46
- shortcuts,
47
- className
48
- }) => /*#__PURE__*/_jsxs("section", {
49
- className: clsx('customize-widgets-keyboard-shortcut-help-modal__section', className),
50
- children: [!!title && /*#__PURE__*/_jsx("h2", {
51
- className: "customize-widgets-keyboard-shortcut-help-modal__section-title",
52
- children: title
53
- }), /*#__PURE__*/_jsx(ShortcutList, {
54
- shortcuts: shortcuts
55
- })]
56
- });
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { Modal } from "@wordpress/components";
4
+ import { __ } from "@wordpress/i18n";
5
+ import {
6
+ useShortcut,
7
+ store as keyboardShortcutsStore
8
+ } from "@wordpress/keyboard-shortcuts";
9
+ import { useDispatch, useSelect } from "@wordpress/data";
10
+ import { useEffect } from "@wordpress/element";
11
+ import { textFormattingShortcuts } from "./config";
12
+ import Shortcut from "./shortcut";
13
+ import DynamicShortcut from "./dynamic-shortcut";
14
+ const ShortcutList = ({ shortcuts }) => (
15
+ /*
16
+ * Disable reason: The `list` ARIA role is redundant but
17
+ * Safari+VoiceOver won't announce the list otherwise.
18
+ */
19
+ /* eslint-disable jsx-a11y/no-redundant-roles */
20
+ /* @__PURE__ */ jsx(
21
+ "ul",
22
+ {
23
+ className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-list",
24
+ role: "list",
25
+ children: shortcuts.map((shortcut, index) => /* @__PURE__ */ jsx(
26
+ "li",
27
+ {
28
+ className: "customize-widgets-keyboard-shortcut-help-modal__shortcut",
29
+ children: typeof shortcut === "string" ? /* @__PURE__ */ jsx(DynamicShortcut, { name: shortcut }) : /* @__PURE__ */ jsx(Shortcut, { ...shortcut })
30
+ },
31
+ index
32
+ ))
33
+ }
34
+ )
35
+ );
36
+ const ShortcutSection = ({ title, shortcuts, className }) => /* @__PURE__ */ jsxs(
37
+ "section",
38
+ {
39
+ className: clsx(
40
+ "customize-widgets-keyboard-shortcut-help-modal__section",
41
+ className
42
+ ),
43
+ children: [
44
+ !!title && /* @__PURE__ */ jsx("h2", { className: "customize-widgets-keyboard-shortcut-help-modal__section-title", children: title }),
45
+ /* @__PURE__ */ jsx(ShortcutList, { shortcuts })
46
+ ]
47
+ }
48
+ );
57
49
  const ShortcutCategorySection = ({
58
50
  title,
59
51
  categoryName,
60
52
  additionalShortcuts = []
61
53
  }) => {
62
- const categoryShortcuts = useSelect(select => {
63
- return select(keyboardShortcutsStore).getCategoryShortcuts(categoryName);
64
- }, [categoryName]);
65
- return /*#__PURE__*/_jsx(ShortcutSection, {
66
- title: title,
67
- shortcuts: categoryShortcuts.concat(additionalShortcuts)
68
- });
54
+ const categoryShortcuts = useSelect(
55
+ (select) => {
56
+ return select(keyboardShortcutsStore).getCategoryShortcuts(
57
+ categoryName
58
+ );
59
+ },
60
+ [categoryName]
61
+ );
62
+ return /* @__PURE__ */ jsx(
63
+ ShortcutSection,
64
+ {
65
+ title,
66
+ shortcuts: categoryShortcuts.concat(additionalShortcuts)
67
+ }
68
+ );
69
69
  };
70
- export default function KeyboardShortcutHelpModal({
70
+ function KeyboardShortcutHelpModal({
71
71
  isModalActive,
72
72
  toggleModal
73
73
  }) {
74
- const {
75
- registerShortcut
76
- } = useDispatch(keyboardShortcutsStore);
74
+ const { registerShortcut } = useDispatch(keyboardShortcutsStore);
77
75
  useEffect(() => {
78
76
  registerShortcut({
79
- name: 'core/customize-widgets/keyboard-shortcuts',
80
- category: 'main',
81
- description: __('Display these keyboard shortcuts.'),
77
+ name: "core/customize-widgets/keyboard-shortcuts",
78
+ category: "main",
79
+ description: __("Display these keyboard shortcuts."),
82
80
  keyCombination: {
83
- modifier: 'access',
84
- character: 'h'
81
+ modifier: "access",
82
+ character: "h"
85
83
  }
86
84
  });
87
85
  }, [registerShortcut]);
88
- useShortcut('core/customize-widgets/keyboard-shortcuts', toggleModal);
86
+ useShortcut("core/customize-widgets/keyboard-shortcuts", toggleModal);
89
87
  if (!isModalActive) {
90
88
  return null;
91
89
  }
92
- return /*#__PURE__*/_jsxs(Modal, {
93
- className: "customize-widgets-keyboard-shortcut-help-modal",
94
- title: __('Keyboard shortcuts'),
95
- onRequestClose: toggleModal,
96
- children: [/*#__PURE__*/_jsx(ShortcutSection, {
97
- className: "customize-widgets-keyboard-shortcut-help-modal__main-shortcuts",
98
- shortcuts: ['core/customize-widgets/keyboard-shortcuts']
99
- }), /*#__PURE__*/_jsx(ShortcutCategorySection, {
100
- title: __('Global shortcuts'),
101
- categoryName: "global"
102
- }), /*#__PURE__*/_jsx(ShortcutCategorySection, {
103
- title: __('Selection shortcuts'),
104
- categoryName: "selection"
105
- }), /*#__PURE__*/_jsx(ShortcutCategorySection, {
106
- title: __('Block shortcuts'),
107
- categoryName: "block",
108
- additionalShortcuts: [{
109
- keyCombination: {
110
- character: '/'
111
- },
112
- description: __('Change the block type after adding a new paragraph.'),
113
- /* translators: The forward-slash character. e.g. '/'. */
114
- ariaLabel: __('Forward-slash')
115
- }]
116
- }), /*#__PURE__*/_jsx(ShortcutSection, {
117
- title: __('Text formatting'),
118
- shortcuts: textFormattingShortcuts
119
- })]
120
- });
90
+ return /* @__PURE__ */ jsxs(
91
+ Modal,
92
+ {
93
+ className: "customize-widgets-keyboard-shortcut-help-modal",
94
+ title: __("Keyboard shortcuts"),
95
+ onRequestClose: toggleModal,
96
+ children: [
97
+ /* @__PURE__ */ jsx(
98
+ ShortcutSection,
99
+ {
100
+ className: "customize-widgets-keyboard-shortcut-help-modal__main-shortcuts",
101
+ shortcuts: ["core/customize-widgets/keyboard-shortcuts"]
102
+ }
103
+ ),
104
+ /* @__PURE__ */ jsx(
105
+ ShortcutCategorySection,
106
+ {
107
+ title: __("Global shortcuts"),
108
+ categoryName: "global"
109
+ }
110
+ ),
111
+ /* @__PURE__ */ jsx(
112
+ ShortcutCategorySection,
113
+ {
114
+ title: __("Selection shortcuts"),
115
+ categoryName: "selection"
116
+ }
117
+ ),
118
+ /* @__PURE__ */ jsx(
119
+ ShortcutCategorySection,
120
+ {
121
+ title: __("Block shortcuts"),
122
+ categoryName: "block",
123
+ additionalShortcuts: [
124
+ {
125
+ keyCombination: { character: "/" },
126
+ description: __(
127
+ "Change the block type after adding a new paragraph."
128
+ ),
129
+ /* translators: The forward-slash character. e.g. '/'. */
130
+ ariaLabel: __("Forward-slash")
131
+ }
132
+ ]
133
+ }
134
+ ),
135
+ /* @__PURE__ */ jsx(
136
+ ShortcutSection,
137
+ {
138
+ title: __("Text formatting"),
139
+ shortcuts: textFormattingShortcuts
140
+ }
141
+ )
142
+ ]
143
+ }
144
+ );
121
145
  }
122
- //# sourceMappingURL=index.js.map
146
+ export {
147
+ KeyboardShortcutHelpModal as default
148
+ };
149
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["clsx","Modal","__","useShortcut","store","keyboardShortcutsStore","useDispatch","useSelect","useEffect","textFormattingShortcuts","Shortcut","DynamicShortcut","jsx","_jsx","jsxs","_jsxs","ShortcutList","shortcuts","className","role","children","map","shortcut","index","name","ShortcutSection","title","ShortcutCategorySection","categoryName","additionalShortcuts","categoryShortcuts","select","getCategoryShortcuts","concat","KeyboardShortcutHelpModal","isModalActive","toggleModal","registerShortcut","category","description","keyCombination","modifier","character","onRequestClose","ariaLabel"],"sources":["@wordpress/customize-widgets/src/components/keyboard-shortcut-help-modal/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\n\nconst ShortcutList = ( { shortcuts } ) => (\n\t/*\n\t * Disable reason: The `list` ARIA role is redundant but\n\t * Safari+VoiceOver won't announce the list otherwise.\n\t */\n\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\t<ul\n\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-list\"\n\t\trole=\"list\"\n\t>\n\t\t{ shortcuts.map( ( shortcut, index ) => (\n\t\t\t<li\n\t\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut\"\n\t\t\t\tkey={ index }\n\t\t\t>\n\t\t\t\t{ typeof shortcut === 'string' ? (\n\t\t\t\t\t<DynamicShortcut name={ shortcut } />\n\t\t\t\t) : (\n\t\t\t\t\t<Shortcut { ...shortcut } />\n\t\t\t\t) }\n\t\t\t</li>\n\t\t) ) }\n\t</ul>\n\t/* eslint-enable jsx-a11y/no-redundant-roles */\n);\n\nconst ShortcutSection = ( { title, shortcuts, className } ) => (\n\t<section\n\t\tclassName={ clsx(\n\t\t\t'customize-widgets-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"customize-widgets-keyboard-shortcut-help-modal__section-title\">\n\t\t\t\t{ title }\n\t\t\t</h2>\n\t\t) }\n\t\t<ShortcutList shortcuts={ shortcuts } />\n\t</section>\n);\n\nconst ShortcutCategorySection = ( {\n\ttitle,\n\tcategoryName,\n\tadditionalShortcuts = [],\n} ) => {\n\tconst categoryShortcuts = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( keyboardShortcutsStore ).getCategoryShortcuts(\n\t\t\t\tcategoryName\n\t\t\t);\n\t\t},\n\t\t[ categoryName ]\n\t);\n\n\treturn (\n\t\t<ShortcutSection\n\t\t\ttitle={ title }\n\t\t\tshortcuts={ categoryShortcuts.concat( additionalShortcuts ) }\n\t\t/>\n\t);\n};\n\nexport default function KeyboardShortcutHelpModal( {\n\tisModalActive,\n\ttoggleModal,\n} ) {\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/customize-widgets/keyboard-shortcuts',\n\t\t\tcategory: 'main',\n\t\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'h',\n\t\t\t},\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\tuseShortcut( 'core/customize-widgets/keyboard-shortcuts', toggleModal );\n\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal\"\n\t\t\ttitle={ __( 'Keyboard shortcuts' ) }\n\t\t\tonRequestClose={ toggleModal }\n\t\t>\n\t\t\t<ShortcutSection\n\t\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/customize-widgets/keyboard-shortcuts' ] }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Global shortcuts' ) }\n\t\t\t\tcategoryName=\"global\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Selection shortcuts' ) }\n\t\t\t\tcategoryName=\"selection\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Block shortcuts' ) }\n\t\t\t\tcategoryName=\"block\"\n\t\t\t\tadditionalShortcuts={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tkeyCombination: { character: '/' },\n\t\t\t\t\t\tdescription: __(\n\t\t\t\t\t\t\t'Change the block type after adding a new paragraph.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t/* translators: The forward-slash character. e.g. '/'. */\n\t\t\t\t\t\tariaLabel: __( 'Forward-slash' ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t\t<ShortcutSection\n\t\t\t\ttitle={ __( 'Text formatting' ) }\n\t\t\t\tshortcuts={ textFormattingShortcuts }\n\t\t\t/>\n\t\t</Modal>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,WAAW,EACXC,KAAK,IAAIC,sBAAsB,QACzB,+BAA+B;AACtC,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,SAAS,QAAQ,oBAAoB;;AAE9C;AACA;AACA;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AAE,iBAAkB,CAAG;MACjC0B,YAAY,EAAC,OAAO;MACpBC,mBAAmB,EAAG,CACrB;QACCW,cAAc,EAAE;UAAEE,SAAS,EAAE;QAAI,CAAC;QAClCH,WAAW,EAAErC,EAAE,CACd,qDACD,CAAC;QACD;QACA0C,SAAS,EAAE1C,EAAE,CAAE,eAAgB;MAChC,CAAC;IACC,CACH,CAAC,eACFW,IAAA,CAACY,eAAe;MACfC,KAAK,EAAGxB,EAAE,CAAE,iBAAkB,CAAG;MACjCe,SAAS,EAAGR;IAAyB,CACrC,CAAC;EAAA,CACI,CAAC;AAEV","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/keyboard-shortcut-help-modal/index.js"],
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\n\nconst ShortcutList = ( { shortcuts } ) => (\n\t/*\n\t * Disable reason: The `list` ARIA role is redundant but\n\t * Safari+VoiceOver won't announce the list otherwise.\n\t */\n\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\t<ul\n\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-list\"\n\t\trole=\"list\"\n\t>\n\t\t{ shortcuts.map( ( shortcut, index ) => (\n\t\t\t<li\n\t\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut\"\n\t\t\t\tkey={ index }\n\t\t\t>\n\t\t\t\t{ typeof shortcut === 'string' ? (\n\t\t\t\t\t<DynamicShortcut name={ shortcut } />\n\t\t\t\t) : (\n\t\t\t\t\t<Shortcut { ...shortcut } />\n\t\t\t\t) }\n\t\t\t</li>\n\t\t) ) }\n\t</ul>\n\t/* eslint-enable jsx-a11y/no-redundant-roles */\n);\n\nconst ShortcutSection = ( { title, shortcuts, className } ) => (\n\t<section\n\t\tclassName={ clsx(\n\t\t\t'customize-widgets-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"customize-widgets-keyboard-shortcut-help-modal__section-title\">\n\t\t\t\t{ title }\n\t\t\t</h2>\n\t\t) }\n\t\t<ShortcutList shortcuts={ shortcuts } />\n\t</section>\n);\n\nconst ShortcutCategorySection = ( {\n\ttitle,\n\tcategoryName,\n\tadditionalShortcuts = [],\n} ) => {\n\tconst categoryShortcuts = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( keyboardShortcutsStore ).getCategoryShortcuts(\n\t\t\t\tcategoryName\n\t\t\t);\n\t\t},\n\t\t[ categoryName ]\n\t);\n\n\treturn (\n\t\t<ShortcutSection\n\t\t\ttitle={ title }\n\t\t\tshortcuts={ categoryShortcuts.concat( additionalShortcuts ) }\n\t\t/>\n\t);\n};\n\nexport default function KeyboardShortcutHelpModal( {\n\tisModalActive,\n\ttoggleModal,\n} ) {\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/customize-widgets/keyboard-shortcuts',\n\t\t\tcategory: 'main',\n\t\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'h',\n\t\t\t},\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\tuseShortcut( 'core/customize-widgets/keyboard-shortcuts', toggleModal );\n\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal\"\n\t\t\ttitle={ __( 'Keyboard shortcuts' ) }\n\t\t\tonRequestClose={ toggleModal }\n\t\t>\n\t\t\t<ShortcutSection\n\t\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/customize-widgets/keyboard-shortcuts' ] }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Global shortcuts' ) }\n\t\t\t\tcategoryName=\"global\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Selection shortcuts' ) }\n\t\t\t\tcategoryName=\"selection\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Block shortcuts' ) }\n\t\t\t\tcategoryName=\"block\"\n\t\t\t\tadditionalShortcuts={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tkeyCombination: { character: '/' },\n\t\t\t\t\t\tdescription: __(\n\t\t\t\t\t\t\t'Change the block type after adding a new paragraph.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t/* translators: The forward-slash character. e.g. '/'. */\n\t\t\t\t\t\tariaLabel: __( 'Forward-slash' ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t\t<ShortcutSection\n\t\t\t\ttitle={ __( 'Text formatting' ) }\n\t\t\t\tshortcuts={ textFormattingShortcuts }\n\t\t\t/>\n\t\t</Modal>\n\t);\n}\n"],
5
+ "mappings": "AAwCK,cAWJ,YAXI;AArCL,OAAO,UAAU;AAKjB,SAAS,aAAa;AACtB,SAAS,UAAU;AACnB;AAAA,EACC;AAAA,EACA,SAAS;AAAA,OACH;AACP,SAAS,aAAa,iBAAiB;AACvC,SAAS,iBAAiB;AAK1B,SAAS,+BAA+B;AACxC,OAAO,cAAc;AACrB,OAAO,qBAAqB;AAE5B,MAAM,eAAe,CAAE,EAAE,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMlC;AAAA,IAAC;AAAA;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