@wordpress/customize-widgets 5.57.0 → 6.1.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 (157) hide show
  1. package/build/components/block-appender/index.cjs +24 -41
  2. package/build/components/block-appender/index.cjs.map +1 -7
  3. package/build/components/block-inspector-button/index.cjs +24 -52
  4. package/build/components/block-inspector-button/index.cjs.map +1 -7
  5. package/build/components/customize-widgets/index.cjs +76 -95
  6. package/build/components/customize-widgets/index.cjs.map +1 -7
  7. package/build/components/customize-widgets/use-clear-selected-block.cjs +58 -67
  8. package/build/components/customize-widgets/use-clear-selected-block.cjs.map +1 -7
  9. package/build/components/error-boundary/index.cjs +115 -155
  10. package/build/components/error-boundary/index.cjs.map +1 -7
  11. package/build/components/focus-control/index.cjs +44 -84
  12. package/build/components/focus-control/index.cjs.map +1 -7
  13. package/build/components/focus-control/use-blocks-focus-control.cjs +28 -49
  14. package/build/components/focus-control/use-blocks-focus-control.cjs.map +1 -7
  15. package/build/components/header/index.cjs +84 -122
  16. package/build/components/header/index.cjs.map +1 -7
  17. package/build/components/inserter/index.cjs +43 -78
  18. package/build/components/inserter/index.cjs.map +1 -7
  19. package/build/components/inserter/use-inserter.cjs +22 -54
  20. package/build/components/inserter/use-inserter.cjs.map +1 -7
  21. package/build/components/keyboard-shortcut-help-modal/config.cjs +88 -85
  22. package/build/components/keyboard-shortcut-help-modal/config.cjs.map +1 -7
  23. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs +40 -57
  24. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs.map +1 -7
  25. package/build/components/keyboard-shortcut-help-modal/index.cjs +103 -165
  26. package/build/components/keyboard-shortcut-help-modal/index.cjs.map +1 -7
  27. package/build/components/keyboard-shortcut-help-modal/shortcut.cjs +37 -76
  28. package/build/components/keyboard-shortcut-help-modal/shortcut.cjs.map +1 -7
  29. package/build/components/keyboard-shortcuts/index.cjs +70 -100
  30. package/build/components/keyboard-shortcuts/index.cjs.map +1 -7
  31. package/build/components/more-menu/index.cjs +103 -151
  32. package/build/components/more-menu/index.cjs.map +1 -7
  33. package/build/components/sidebar-block-editor/index.cjs +122 -155
  34. package/build/components/sidebar-block-editor/index.cjs.map +1 -7
  35. package/build/components/sidebar-block-editor/sidebar-adapter.cjs +207 -270
  36. package/build/components/sidebar-block-editor/sidebar-adapter.cjs.map +1 -7
  37. package/build/components/sidebar-block-editor/sidebar-editor-provider.cjs +40 -50
  38. package/build/components/sidebar-block-editor/sidebar-editor-provider.cjs.map +1 -7
  39. package/build/components/sidebar-block-editor/use-sidebar-block-editor.cjs +75 -110
  40. package/build/components/sidebar-block-editor/use-sidebar-block-editor.cjs.map +1 -7
  41. package/build/components/sidebar-controls/index.cjs +27 -53
  42. package/build/components/sidebar-controls/index.cjs.map +1 -7
  43. package/build/components/welcome-guide/index.cjs +70 -94
  44. package/build/components/welcome-guide/index.cjs.map +1 -7
  45. package/build/controls/inserter-outer-section.cjs +68 -110
  46. package/build/controls/inserter-outer-section.cjs.map +1 -7
  47. package/build/controls/inspector-section.cjs +57 -90
  48. package/build/controls/inspector-section.cjs.map +1 -7
  49. package/build/controls/sidebar-control.cjs +55 -69
  50. package/build/controls/sidebar-control.cjs.map +1 -7
  51. package/build/controls/sidebar-section.cjs +79 -103
  52. package/build/controls/sidebar-section.cjs.map +1 -7
  53. package/build/filters/index.cjs +8 -5
  54. package/build/filters/move-to-sidebar.cjs +62 -78
  55. package/build/filters/move-to-sidebar.cjs.map +1 -7
  56. package/build/filters/replace-media-upload.cjs +11 -9
  57. package/build/filters/replace-media-upload.cjs.map +1 -7
  58. package/build/filters/wide-widget-display.cjs +20 -20
  59. package/build/filters/wide-widget-display.cjs.map +1 -7
  60. package/build/index.cjs +84 -91
  61. package/build/index.cjs.map +1 -7
  62. package/build/lock-unlock.cjs +10 -35
  63. package/build/lock-unlock.cjs.map +1 -7
  64. package/build/store/actions.cjs +49 -32
  65. package/build/store/actions.cjs.map +1 -7
  66. package/build/store/constants.cjs +12 -29
  67. package/build/store/constants.cjs.map +1 -7
  68. package/build/store/index.cjs +49 -41
  69. package/build/store/index.cjs.map +1 -7
  70. package/build/store/reducer.cjs +20 -33
  71. package/build/store/reducer.cjs.map +1 -7
  72. package/build/store/selectors.cjs +47 -38
  73. package/build/store/selectors.cjs.map +1 -7
  74. package/build/utils.cjs +81 -108
  75. package/build/utils.cjs.map +1 -7
  76. package/build-module/components/block-appender/index.mjs +18 -23
  77. package/build-module/components/block-appender/index.mjs.map +1 -7
  78. package/build-module/components/block-inspector-button/index.mjs +15 -28
  79. package/build-module/components/block-inspector-button/index.mjs.map +1 -7
  80. package/build-module/components/customize-widgets/index.mjs +46 -72
  81. package/build-module/components/customize-widgets/index.mjs.map +1 -7
  82. package/build-module/components/customize-widgets/use-clear-selected-block.mjs +52 -46
  83. package/build-module/components/customize-widgets/use-clear-selected-block.mjs.map +1 -7
  84. package/build-module/components/error-boundary/index.mjs +103 -128
  85. package/build-module/components/error-boundary/index.mjs.map +1 -7
  86. package/build-module/components/focus-control/index.mjs +37 -66
  87. package/build-module/components/focus-control/index.mjs.map +1 -7
  88. package/build-module/components/focus-control/use-blocks-focus-control.mjs +21 -27
  89. package/build-module/components/focus-control/use-blocks-focus-control.mjs.map +1 -7
  90. package/build-module/components/header/index.mjs +55 -92
  91. package/build-module/components/header/index.mjs.map +1 -7
  92. package/build-module/components/inserter/index.mjs +33 -53
  93. package/build-module/components/inserter/index.mjs.map +1 -7
  94. package/build-module/components/inserter/use-inserter.mjs +17 -34
  95. package/build-module/components/inserter/use-inserter.mjs.map +1 -7
  96. package/build-module/components/keyboard-shortcut-help-modal/config.mjs +83 -61
  97. package/build-module/components/keyboard-shortcut-help-modal/config.mjs.map +1 -7
  98. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs +19 -33
  99. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs.map +1 -7
  100. package/build-module/components/keyboard-shortcut-help-modal/index.mjs +75 -139
  101. package/build-module/components/keyboard-shortcut-help-modal/index.mjs.map +1 -7
  102. package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs +31 -55
  103. package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs.map +1 -7
  104. package/build-module/components/keyboard-shortcuts/index.mjs +62 -79
  105. package/build-module/components/keyboard-shortcuts/index.mjs.map +1 -7
  106. package/build-module/components/more-menu/index.mjs +76 -128
  107. package/build-module/components/more-menu/index.mjs.map +1 -7
  108. package/build-module/components/sidebar-block-editor/index.mjs +86 -128
  109. package/build-module/components/sidebar-block-editor/index.mjs.map +1 -7
  110. package/build-module/components/sidebar-block-editor/sidebar-adapter.mjs +202 -250
  111. package/build-module/components/sidebar-block-editor/sidebar-adapter.mjs.map +1 -7
  112. package/build-module/components/sidebar-block-editor/sidebar-editor-provider.mjs +17 -25
  113. package/build-module/components/sidebar-block-editor/sidebar-editor-provider.mjs.map +1 -7
  114. package/build-module/components/sidebar-block-editor/use-sidebar-block-editor.mjs +54 -86
  115. package/build-module/components/sidebar-block-editor/use-sidebar-block-editor.mjs.map +1 -7
  116. package/build-module/components/sidebar-controls/index.mjs +19 -27
  117. package/build-module/components/sidebar-controls/index.mjs.map +1 -7
  118. package/build-module/components/welcome-guide/index.mjs +62 -71
  119. package/build-module/components/welcome-guide/index.mjs.map +1 -7
  120. package/build-module/controls/inserter-outer-section.mjs +61 -88
  121. package/build-module/controls/inserter-outer-section.mjs.map +1 -7
  122. package/build-module/controls/inspector-section.mjs +52 -70
  123. package/build-module/controls/inspector-section.mjs.map +1 -7
  124. package/build-module/controls/sidebar-control.mjs +33 -45
  125. package/build-module/controls/sidebar-control.mjs.map +1 -7
  126. package/build-module/controls/sidebar-section.mjs +59 -80
  127. package/build-module/controls/sidebar-section.mjs.map +1 -7
  128. package/build-module/filters/index.mjs +0 -2
  129. package/build-module/filters/move-to-sidebar.mjs +52 -79
  130. package/build-module/filters/move-to-sidebar.mjs.map +1 -7
  131. package/build-module/filters/replace-media-upload.mjs +5 -8
  132. package/build-module/filters/replace-media-upload.mjs.map +1 -7
  133. package/build-module/filters/wide-widget-display.mjs +13 -18
  134. package/build-module/filters/wide-widget-display.mjs.map +1 -7
  135. package/build-module/index.mjs +53 -71
  136. package/build-module/index.mjs.map +1 -7
  137. package/build-module/lock-unlock.mjs +5 -10
  138. package/build-module/lock-unlock.mjs.map +1 -7
  139. package/build-module/store/actions.mjs +44 -8
  140. package/build-module/store/actions.mjs.map +1 -7
  141. package/build-module/store/constants.mjs +7 -5
  142. package/build-module/store/constants.mjs.map +1 -7
  143. package/build-module/store/index.mjs +15 -11
  144. package/build-module/store/index.mjs.map +1 -7
  145. package/build-module/store/reducer.mjs +15 -13
  146. package/build-module/store/reducer.mjs.map +1 -7
  147. package/build-module/store/selectors.mjs +41 -13
  148. package/build-module/store/selectors.mjs.map +1 -7
  149. package/build-module/utils.mjs +74 -82
  150. package/build-module/utils.mjs.map +1 -7
  151. package/package.json +30 -31
  152. package/src/components/customize-widgets/index.jsx +5 -2
  153. package/src/components/customize-widgets/use-clear-selected-block.js +2 -1
  154. package/src/components/welcome-guide/index.jsx +6 -2
  155. package/CHANGELOG.md +0 -289
  156. package/build/filters/index.cjs.map +0 -7
  157. package/build-module/filters/index.mjs.map +0 -7
@@ -1,87 +1,90 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // packages/customize-widgets/src/components/keyboard-shortcut-help-modal/config.js
20
- var config_exports = {};
21
- __export(config_exports, {
22
- textFormattingShortcuts: () => textFormattingShortcuts
1
+ "use strict";
2
+ Object.defineProperties(exports, {
3
+ __esModule: { value: true },
4
+ [Symbol.toStringTag]: { value: "Module" }
23
5
  });
24
- module.exports = __toCommonJS(config_exports);
25
- var import_i18n = require("@wordpress/i18n");
26
- var textFormattingShortcuts = [
27
- {
28
- keyCombination: { modifier: "primary", character: "b" },
29
- description: (0, import_i18n.__)("Make the selected text bold.")
30
- },
31
- {
32
- keyCombination: { modifier: "primary", character: "i" },
33
- description: (0, import_i18n.__)("Make the selected text italic.")
34
- },
35
- {
36
- keyCombination: { modifier: "primary", character: "k" },
37
- description: (0, import_i18n.__)("Convert the selected text into a link.")
38
- },
39
- {
40
- keyCombination: { modifier: "primaryShift", character: "k" },
41
- description: (0, import_i18n.__)("Remove a link.")
42
- },
43
- {
44
- keyCombination: { character: "[[" },
45
- description: (0, import_i18n.__)("Insert a link to a post or page.")
46
- },
47
- {
48
- keyCombination: { modifier: "primary", character: "u" },
49
- description: (0, import_i18n.__)("Underline the selected text.")
50
- },
51
- {
52
- keyCombination: { modifier: "access", character: "d" },
53
- description: (0, import_i18n.__)("Strikethrough the selected text.")
54
- },
55
- {
56
- keyCombination: { modifier: "access", character: "x" },
57
- description: (0, import_i18n.__)("Make the selected text inline code.")
58
- },
59
- {
60
- keyCombination: {
61
- modifier: "access",
62
- character: "0"
63
- },
64
- aliases: [
65
- {
66
- modifier: "access",
67
- character: "7"
68
- }
69
- ],
70
- description: (0, import_i18n.__)("Convert the current heading to a paragraph.")
71
- },
72
- {
73
- keyCombination: { modifier: "access", character: "1-6" },
74
- description: (0, import_i18n.__)(
75
- "Convert the current paragraph or heading to a heading of level 1 to 6."
76
- )
77
- },
78
- {
79
- keyCombination: { modifier: "primaryShift", character: "SPACE" },
80
- description: (0, import_i18n.__)("Add non breaking space.")
81
- }
6
+ let _wordpress_i18n = require("@wordpress/i18n");
7
+ // packages/customize-widgets/src/components/keyboard-shortcut-help-modal/config.js
8
+ const textFormattingShortcuts = [
9
+ {
10
+ keyCombination: {
11
+ modifier: "primary",
12
+ character: "b"
13
+ },
14
+ description: (0, _wordpress_i18n.__)("Make the selected text bold.")
15
+ },
16
+ {
17
+ keyCombination: {
18
+ modifier: "primary",
19
+ character: "i"
20
+ },
21
+ description: (0, _wordpress_i18n.__)("Make the selected text italic.")
22
+ },
23
+ {
24
+ keyCombination: {
25
+ modifier: "primary",
26
+ character: "k"
27
+ },
28
+ description: (0, _wordpress_i18n.__)("Convert the selected text into a link.")
29
+ },
30
+ {
31
+ keyCombination: {
32
+ modifier: "primaryShift",
33
+ character: "k"
34
+ },
35
+ description: (0, _wordpress_i18n.__)("Remove a link.")
36
+ },
37
+ {
38
+ keyCombination: { character: "[[" },
39
+ description: (0, _wordpress_i18n.__)("Insert a link to a post or page.")
40
+ },
41
+ {
42
+ keyCombination: {
43
+ modifier: "primary",
44
+ character: "u"
45
+ },
46
+ description: (0, _wordpress_i18n.__)("Underline the selected text.")
47
+ },
48
+ {
49
+ keyCombination: {
50
+ modifier: "access",
51
+ character: "d"
52
+ },
53
+ description: (0, _wordpress_i18n.__)("Strikethrough the selected text.")
54
+ },
55
+ {
56
+ keyCombination: {
57
+ modifier: "access",
58
+ character: "x"
59
+ },
60
+ description: (0, _wordpress_i18n.__)("Make the selected text inline code.")
61
+ },
62
+ {
63
+ keyCombination: {
64
+ modifier: "access",
65
+ character: "0"
66
+ },
67
+ aliases: [{
68
+ modifier: "access",
69
+ character: "7"
70
+ }],
71
+ description: (0, _wordpress_i18n.__)("Convert the current heading to a paragraph.")
72
+ },
73
+ {
74
+ keyCombination: {
75
+ modifier: "access",
76
+ character: "1-6"
77
+ },
78
+ description: (0, _wordpress_i18n.__)("Convert the current paragraph or heading to a heading of level 1 to 6.")
79
+ },
80
+ {
81
+ keyCombination: {
82
+ modifier: "primaryShift",
83
+ character: "SPACE"
84
+ },
85
+ description: (0, _wordpress_i18n.__)("Add non breaking space.")
86
+ }
82
87
  ];
83
- // Annotate the CommonJS export names for ESM import in node:
84
- 0 && (module.exports = {
85
- textFormattingShortcuts
86
- });
87
- //# sourceMappingURL=config.cjs.map
88
+ exports.textFormattingShortcuts = textFormattingShortcuts;
89
+
90
+ //# sourceMappingURL=config.cjs.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/keyboard-shortcut-help-modal/config.js"],
4
- "sourcesContent": ["import { __ } 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": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAmB;AAEZ,IAAM,0BAA0B;AAAA,EACtC;AAAA,IACC,gBAAgB,EAAE,UAAU,WAAW,WAAW,IAAI;AAAA,IACtD,iBAAa,gBAAI,8BAA+B;AAAA,EACjD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,WAAW,WAAW,IAAI;AAAA,IACtD,iBAAa,gBAAI,gCAAiC;AAAA,EACnD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,WAAW,WAAW,IAAI;AAAA,IACtD,iBAAa,gBAAI,wCAAyC;AAAA,EAC3D;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,gBAAgB,WAAW,IAAI;AAAA,IAC3D,iBAAa,gBAAI,gBAAiB;AAAA,EACnC;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,WAAW,KAAK;AAAA,IAClC,iBAAa,gBAAI,kCAAmC;AAAA,EACrD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,WAAW,WAAW,IAAI;AAAA,IACtD,iBAAa,gBAAI,8BAA+B;AAAA,EACjD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,UAAU,WAAW,IAAI;AAAA,IACrD,iBAAa,gBAAI,kCAAmC;AAAA,EACrD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,UAAU,WAAW,IAAI;AAAA,IACrD,iBAAa,gBAAI,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,iBAAa,gBAAI,6CAA8C;AAAA,EAChE;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,UAAU,WAAW,MAAM;AAAA,IACvD,iBAAa;AAAA,MACZ;AAAA,IACD;AAAA,EACD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,gBAAgB,WAAW,QAAQ;AAAA,IAC/D,iBAAa,gBAAI,yBAA0B;AAAA,EAC5C;AACD;",
6
- "names": []
7
- }
1
+ {"version":3,"file":"config.cjs","names":["__"],"sources":["../../../src/components/keyboard-shortcut-help-modal/config.js"],"sourcesContent":["import { __ } 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":";;;;;;;AAEA,MAAa,0BAA0B;CACtC;EACC,gBAAgB;GAAE,UAAU;GAAW,WAAW;EAAI;EACtD,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,8BAA+B;CACjD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAW,WAAW;EAAI;EACtD,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,gCAAiC;CACnD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAW,WAAW;EAAI;EACtD,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,wCAAyC;CAC3D;CACA;EACC,gBAAgB;GAAE,UAAU;GAAgB,WAAW;EAAI;EAC3D,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,gBAAiB;CACnC;CACA;EACC,gBAAgB,EAAE,WAAW,KAAK;EAClC,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,kCAAmC;CACrD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAW,WAAW;EAAI;EACtD,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,8BAA+B;CACjD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAU,WAAW;EAAI;EACrD,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,kCAAmC;CACrD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAU,WAAW;EAAI;EACrD,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,qCAAsC;CACxD;CACA;EACC,gBAAgB;GACf,UAAU;GACV,WAAW;EACZ;EACA,SAAS,CACR;GACC,UAAU;GACV,WAAW;EACZ,CACD;EACA,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,6CAA8C;CAChE;CACA;EACC,gBAAgB;GAAE,UAAU;GAAU,WAAW;EAAM;EACvD,cAAA,GAAaA,gBAAAA,GAAAA,CACZ,wEACD;CACD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAgB,WAAW;EAAQ;EAC/D,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,yBAA0B;CAC5C;AACD"}
@@ -1,68 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, {
3
+ __esModule: { value: true },
4
+ [Symbol.toStringTag]: { value: "Module" }
5
+ });
6
+ // \0rolldown/runtime.js
1
7
  var __create = Object.create;
2
8
  var __defProp = Object.defineProperty;
3
9
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
10
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
11
  var __getProtoOf = Object.getPrototypeOf;
6
12
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
13
  var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
14
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
15
+ key = keys[i];
16
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: ((k) => from[k]).bind(null, key),
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
18
22
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
24
+ value: mod,
25
+ enumerable: true
26
+ }) : target, mod));
27
+ let _wordpress_data = require("@wordpress/data");
28
+ let _wordpress_keyboard_shortcuts = require("@wordpress/keyboard-shortcuts");
29
+ let __shortcut_jsx = require("./shortcut.cjs");
30
+ __shortcut_jsx = __toESM(__shortcut_jsx);
31
+ let react_jsx_runtime = require("react/jsx-runtime");
29
32
  // packages/customize-widgets/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.jsx
30
- var dynamic_shortcut_exports = {};
31
- __export(dynamic_shortcut_exports, {
32
- default: () => dynamic_shortcut_default
33
- });
34
- module.exports = __toCommonJS(dynamic_shortcut_exports);
35
- var import_data = require("@wordpress/data");
36
- var import_keyboard_shortcuts = require("@wordpress/keyboard-shortcuts");
37
- var import_shortcut = __toESM(require("./shortcut.cjs"));
38
- var import_jsx_runtime = require("react/jsx-runtime");
39
33
  function DynamicShortcut({ name }) {
40
- const { keyCombination, description, aliases } = (0, import_data.useSelect)(
41
- (select) => {
42
- const {
43
- getShortcutKeyCombination,
44
- getShortcutDescription,
45
- getShortcutAliases
46
- } = select(import_keyboard_shortcuts.store);
47
- return {
48
- keyCombination: getShortcutKeyCombination(name),
49
- aliases: getShortcutAliases(name),
50
- description: getShortcutDescription(name)
51
- };
52
- },
53
- [name]
54
- );
55
- if (!keyCombination) {
56
- return null;
57
- }
58
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
59
- import_shortcut.default,
60
- {
61
- keyCombination,
62
- description,
63
- aliases
64
- }
65
- );
34
+ const { keyCombination, description, aliases } = (0, _wordpress_data.useSelect)((select) => {
35
+ const { getShortcutKeyCombination, getShortcutDescription, getShortcutAliases } = select(_wordpress_keyboard_shortcuts.store);
36
+ return {
37
+ keyCombination: getShortcutKeyCombination(name),
38
+ aliases: getShortcutAliases(name),
39
+ description: getShortcutDescription(name)
40
+ };
41
+ }, [name]);
42
+ if (!keyCombination) return null;
43
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__shortcut_jsx.default, {
44
+ keyCombination,
45
+ description,
46
+ aliases
47
+ });
66
48
  }
67
- var dynamic_shortcut_default = DynamicShortcut;
68
- //# sourceMappingURL=dynamic-shortcut.cjs.map
49
+ exports.default = DynamicShortcut;
50
+
51
+ //# sourceMappingURL=dynamic-shortcut.cjs.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/keyboard-shortcut-help-modal/dynamic-shortcut.jsx"],
4
- "sourcesContent": ["import { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA0B;AAC1B,gCAAgD;AAChD,sBAAqB;AAyBnB;AAvBF,SAAS,gBAAiB,EAAE,KAAK,GAAI;AACpC,QAAM,EAAE,gBAAgB,aAAa,QAAQ,QAAI;AAAA,IAChD,CAAE,WAAY;AACb,YAAM;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,MACD,IAAI,OAAQ,0BAAAA,KAAuB;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,gBAAAC;AAAA,IAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACD;AAEF;AAEA,IAAO,2BAAQ;",
6
- "names": ["keyboardShortcutsStore", "Shortcut"]
7
- }
1
+ {"version":3,"file":"dynamic-shortcut.cjs","names":["useSelect","keyboardShortcutsStore","Shortcut"],"sources":["../../../src/components/keyboard-shortcut-help-modal/dynamic-shortcut.jsx"],"sourcesContent":["import { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAAS,gBAAiB,EAAE,QAAS;CACpC,MAAM,EAAE,gBAAgB,aAAa,aAAA,GAAYA,gBAAAA,UAAAA,EAC9C,WAAY;EACb,MAAM,EACL,2BACA,wBACA,uBACG,OAAQC,8BAAAA,KAAuB;EAEnC,OAAO;GACN,gBAAgB,0BAA2B,IAAK;GAChD,SAAS,mBAAoB,IAAK;GAClC,aAAa,uBAAwB,IAAK;EAC3C;CACD,GACA,CAAE,IAAK,CACR;CAEA,IAAK,CAAE,gBACN,OAAO;CAGR,OACC,iBAAA,GAAA,kBAAA,IAAA,CAACC,eAAAA,SAAD;EACkB;EACH;EACJ;CACV,CAAA;AAEH"}
@@ -1,177 +1,115 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, {
3
+ __esModule: { value: true },
4
+ [Symbol.toStringTag]: { value: "Module" }
5
+ });
6
+ // \0rolldown/runtime.js
1
7
  var __create = Object.create;
2
8
  var __defProp = Object.defineProperty;
3
9
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
10
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
11
  var __getProtoOf = Object.getPrototypeOf;
6
12
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
13
  var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
14
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
15
+ key = keys[i];
16
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: ((k) => from[k]).bind(null, key),
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
18
22
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
24
+ value: mod,
25
+ enumerable: true
26
+ }) : target, mod));
27
+ let clsx = require("clsx");
28
+ clsx = __toESM(clsx);
29
+ let _wordpress_components = require("@wordpress/components");
30
+ let _wordpress_i18n = require("@wordpress/i18n");
31
+ let _wordpress_keyboard_shortcuts = require("@wordpress/keyboard-shortcuts");
32
+ let _wordpress_data = require("@wordpress/data");
33
+ let _wordpress_element = require("@wordpress/element");
34
+ let __config_js = require("./config.cjs");
35
+ let __shortcut_jsx = require("./shortcut.cjs");
36
+ __shortcut_jsx = __toESM(__shortcut_jsx);
37
+ let __dynamic_shortcut_jsx = require("./dynamic-shortcut.cjs");
38
+ __dynamic_shortcut_jsx = __toESM(__dynamic_shortcut_jsx);
39
+ let react_jsx_runtime = require("react/jsx-runtime");
29
40
  // packages/customize-widgets/src/components/keyboard-shortcut-help-modal/index.jsx
30
- var keyboard_shortcut_help_modal_exports = {};
31
- __export(keyboard_shortcut_help_modal_exports, {
32
- default: () => KeyboardShortcutHelpModal
41
+ const ShortcutList = ({ shortcuts }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
42
+ className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-list",
43
+ role: "list",
44
+ children: shortcuts.map((shortcut, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
45
+ className: "customize-widgets-keyboard-shortcut-help-modal__shortcut",
46
+ children: typeof shortcut === "string" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__dynamic_shortcut_jsx.default, { name: shortcut }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__shortcut_jsx.default, { ...shortcut })
47
+ }, index))
33
48
  });
34
- module.exports = __toCommonJS(keyboard_shortcut_help_modal_exports);
35
- var import_clsx = __toESM(require("clsx"));
36
- var import_components = require("@wordpress/components");
37
- var import_i18n = require("@wordpress/i18n");
38
- var import_keyboard_shortcuts = require("@wordpress/keyboard-shortcuts");
39
- var import_data = require("@wordpress/data");
40
- var import_element = require("@wordpress/element");
41
- var import_config = require("./config.cjs");
42
- var import_shortcut = __toESM(require("./shortcut.cjs"));
43
- var import_dynamic_shortcut = __toESM(require("./dynamic-shortcut.cjs"));
44
- var import_jsx_runtime = require("react/jsx-runtime");
45
- var ShortcutList = ({ shortcuts }) => (
46
- /*
47
- * Disable reason: The `list` ARIA role is redundant but
48
- * Safari+VoiceOver won't announce the list otherwise.
49
- */
50
- /* eslint-disable jsx-a11y/no-redundant-roles */
51
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
52
- "ul",
53
- {
54
- className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-list",
55
- role: "list",
56
- children: shortcuts.map((shortcut, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
57
- "li",
58
- {
59
- className: "customize-widgets-keyboard-shortcut-help-modal__shortcut",
60
- children: typeof shortcut === "string" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dynamic_shortcut.default, { name: shortcut }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_shortcut.default, { ...shortcut })
61
- },
62
- index
63
- ))
64
- }
65
- )
66
- );
67
- var ShortcutSection = ({ title, shortcuts, className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
68
- "section",
69
- {
70
- className: (0, import_clsx.default)(
71
- "customize-widgets-keyboard-shortcut-help-modal__section",
72
- className
73
- ),
74
- children: [
75
- !!title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "customize-widgets-keyboard-shortcut-help-modal__section-title", children: title }),
76
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShortcutList, { shortcuts })
77
- ]
78
- }
79
- );
80
- var ShortcutCategorySection = ({
81
- title,
82
- categoryName,
83
- additionalShortcuts = []
84
- }) => {
85
- const categoryShortcuts = (0, import_data.useSelect)(
86
- (select) => {
87
- return select(import_keyboard_shortcuts.store).getCategoryShortcuts(
88
- categoryName
89
- );
90
- },
91
- [categoryName]
92
- );
93
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
94
- ShortcutSection,
95
- {
96
- title,
97
- shortcuts: categoryShortcuts.concat(additionalShortcuts)
98
- }
99
- );
49
+ const ShortcutSection = ({ title, shortcuts, className }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
50
+ className: (0, clsx.default)("customize-widgets-keyboard-shortcut-help-modal__section", className),
51
+ children: [!!title && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
52
+ className: "customize-widgets-keyboard-shortcut-help-modal__section-title",
53
+ children: title
54
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShortcutList, { shortcuts })]
55
+ });
56
+ const ShortcutCategorySection = ({ title, categoryName, additionalShortcuts = [] }) => {
57
+ const categoryShortcuts = (0, _wordpress_data.useSelect)((select) => {
58
+ return select(_wordpress_keyboard_shortcuts.store).getCategoryShortcuts(categoryName);
59
+ }, [categoryName]);
60
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShortcutSection, {
61
+ title,
62
+ shortcuts: categoryShortcuts.concat(additionalShortcuts)
63
+ });
100
64
  };
101
- function KeyboardShortcutHelpModal({
102
- isModalActive,
103
- toggleModal
104
- }) {
105
- const { registerShortcut } = (0, import_data.useDispatch)(import_keyboard_shortcuts.store);
106
- (0, import_element.useEffect)(() => {
107
- registerShortcut({
108
- name: "core/customize-widgets/keyboard-shortcuts",
109
- category: "main",
110
- description: (0, import_i18n.__)("Display these keyboard shortcuts."),
111
- keyCombination: {
112
- modifier: "access",
113
- character: "h"
114
- }
115
- });
116
- }, [registerShortcut]);
117
- (0, import_keyboard_shortcuts.useShortcut)("core/customize-widgets/keyboard-shortcuts", toggleModal);
118
- if (!isModalActive) {
119
- return null;
120
- }
121
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
122
- import_components.Modal,
123
- {
124
- className: "customize-widgets-keyboard-shortcut-help-modal",
125
- title: (0, import_i18n.__)("Keyboard shortcuts"),
126
- onRequestClose: toggleModal,
127
- children: [
128
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
129
- ShortcutSection,
130
- {
131
- className: "customize-widgets-keyboard-shortcut-help-modal__main-shortcuts",
132
- shortcuts: ["core/customize-widgets/keyboard-shortcuts"]
133
- }
134
- ),
135
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
136
- ShortcutCategorySection,
137
- {
138
- title: (0, import_i18n.__)("Global shortcuts"),
139
- categoryName: "global"
140
- }
141
- ),
142
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
143
- ShortcutCategorySection,
144
- {
145
- title: (0, import_i18n.__)("Selection shortcuts"),
146
- categoryName: "selection"
147
- }
148
- ),
149
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
150
- ShortcutCategorySection,
151
- {
152
- title: (0, import_i18n.__)("Block shortcuts"),
153
- categoryName: "block",
154
- additionalShortcuts: [
155
- {
156
- keyCombination: { character: "/" },
157
- description: (0, import_i18n.__)(
158
- "Change the block type after adding a new paragraph."
159
- ),
160
- /* translators: The forward-slash character. e.g. '/'. */
161
- ariaLabel: (0, import_i18n.__)("Forward-slash")
162
- }
163
- ]
164
- }
165
- ),
166
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
167
- ShortcutSection,
168
- {
169
- title: (0, import_i18n.__)("Text formatting"),
170
- shortcuts: import_config.textFormattingShortcuts
171
- }
172
- )
173
- ]
174
- }
175
- );
65
+ function KeyboardShortcutHelpModal({ isModalActive, toggleModal }) {
66
+ const { registerShortcut } = (0, _wordpress_data.useDispatch)(_wordpress_keyboard_shortcuts.store);
67
+ (0, _wordpress_element.useEffect)(() => {
68
+ registerShortcut({
69
+ name: "core/customize-widgets/keyboard-shortcuts",
70
+ category: "main",
71
+ description: (0, _wordpress_i18n.__)("Display these keyboard shortcuts."),
72
+ keyCombination: {
73
+ modifier: "access",
74
+ character: "h"
75
+ }
76
+ });
77
+ }, [registerShortcut]);
78
+ (0, _wordpress_keyboard_shortcuts.useShortcut)("core/customize-widgets/keyboard-shortcuts", toggleModal);
79
+ if (!isModalActive) return null;
80
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_wordpress_components.Modal, {
81
+ className: "customize-widgets-keyboard-shortcut-help-modal",
82
+ title: (0, _wordpress_i18n.__)("Keyboard shortcuts"),
83
+ onRequestClose: toggleModal,
84
+ children: [
85
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShortcutSection, {
86
+ className: "customize-widgets-keyboard-shortcut-help-modal__main-shortcuts",
87
+ shortcuts: ["core/customize-widgets/keyboard-shortcuts"]
88
+ }),
89
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShortcutCategorySection, {
90
+ title: (0, _wordpress_i18n.__)("Global shortcuts"),
91
+ categoryName: "global"
92
+ }),
93
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShortcutCategorySection, {
94
+ title: (0, _wordpress_i18n.__)("Selection shortcuts"),
95
+ categoryName: "selection"
96
+ }),
97
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShortcutCategorySection, {
98
+ title: (0, _wordpress_i18n.__)("Block shortcuts"),
99
+ categoryName: "block",
100
+ additionalShortcuts: [{
101
+ keyCombination: { character: "/" },
102
+ description: (0, _wordpress_i18n.__)("Change the block type after adding a new paragraph."),
103
+ ariaLabel: (0, _wordpress_i18n.__)("Forward-slash")
104
+ }]
105
+ }),
106
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShortcutSection, {
107
+ title: (0, _wordpress_i18n.__)("Text formatting"),
108
+ shortcuts: __config_js.textFormattingShortcuts
109
+ })
110
+ ]
111
+ });
176
112
  }
177
- //# sourceMappingURL=index.cjs.map
113
+ exports.default = KeyboardShortcutHelpModal;
114
+
115
+ //# sourceMappingURL=index.cjs.map