@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,130 +1,175 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = KeyboardShortcutHelpModal;
8
- var _clsx = _interopRequireDefault(require("clsx"));
9
- var _components = require("@wordpress/components");
10
- var _i18n = require("@wordpress/i18n");
11
- var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
12
- var _data = require("@wordpress/data");
13
- var _element = require("@wordpress/element");
14
- var _config = require("./config");
15
- var _shortcut = _interopRequireDefault(require("./shortcut"));
16
- var _dynamicShortcut = _interopRequireDefault(require("./dynamic-shortcut"));
17
- var _jsxRuntime = require("react/jsx-runtime");
18
- /**
19
- * External dependencies
20
- */
21
-
22
- /**
23
- * WordPress dependencies
24
- */
25
-
26
- /**
27
- * Internal dependencies
28
- */
29
-
30
- const ShortcutList = ({
31
- shortcuts
32
- }) =>
33
- /*#__PURE__*/
34
- /*
35
- * Disable reason: The `list` ARIA role is redundant but
36
- * Safari+VoiceOver won't announce the list otherwise.
37
- */
38
- /* eslint-disable jsx-a11y/no-redundant-roles */
39
- (0, _jsxRuntime.jsx)("ul", {
40
- className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-list",
41
- role: "list",
42
- children: shortcuts.map((shortcut, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
43
- className: "customize-widgets-keyboard-shortcut-help-modal__shortcut",
44
- children: typeof shortcut === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_dynamicShortcut.default, {
45
- name: shortcut
46
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_shortcut.default, {
47
- ...shortcut
48
- })
49
- }, index))
50
- })
51
- /* eslint-enable jsx-a11y/no-redundant-roles */;
52
- const ShortcutSection = ({
53
- title,
54
- shortcuts,
55
- className
56
- }) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("section", {
57
- className: (0, _clsx.default)('customize-widgets-keyboard-shortcut-help-modal__section', className),
58
- children: [!!title && /*#__PURE__*/(0, _jsxRuntime.jsx)("h2", {
59
- className: "customize-widgets-keyboard-shortcut-help-modal__section-title",
60
- children: title
61
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(ShortcutList, {
62
- shortcuts: shortcuts
63
- })]
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ 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
+ 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;
18
+ };
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
+ var keyboard_shortcut_help_modal_exports = {};
29
+ __export(keyboard_shortcut_help_modal_exports, {
30
+ default: () => KeyboardShortcutHelpModal
64
31
  });
32
+ module.exports = __toCommonJS(keyboard_shortcut_help_modal_exports);
33
+ var import_jsx_runtime = require("react/jsx-runtime");
34
+ var import_clsx = __toESM(require("clsx"));
35
+ var import_components = require("@wordpress/components");
36
+ var import_i18n = require("@wordpress/i18n");
37
+ var import_keyboard_shortcuts = require("@wordpress/keyboard-shortcuts");
38
+ var import_data = require("@wordpress/data");
39
+ var import_element = require("@wordpress/element");
40
+ var import_config = require("./config");
41
+ var import_shortcut = __toESM(require("./shortcut"));
42
+ var import_dynamic_shortcut = __toESM(require("./dynamic-shortcut"));
43
+ const ShortcutList = ({ shortcuts }) => (
44
+ /*
45
+ * Disable reason: The `list` ARIA role is redundant but
46
+ * Safari+VoiceOver won't announce the list otherwise.
47
+ */
48
+ /* eslint-disable jsx-a11y/no-redundant-roles */
49
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
50
+ "ul",
51
+ {
52
+ className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-list",
53
+ role: "list",
54
+ children: shortcuts.map((shortcut, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
55
+ "li",
56
+ {
57
+ className: "customize-widgets-keyboard-shortcut-help-modal__shortcut",
58
+ 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 })
59
+ },
60
+ index
61
+ ))
62
+ }
63
+ )
64
+ );
65
+ const ShortcutSection = ({ title, shortcuts, className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
66
+ "section",
67
+ {
68
+ className: (0, import_clsx.default)(
69
+ "customize-widgets-keyboard-shortcut-help-modal__section",
70
+ className
71
+ ),
72
+ children: [
73
+ !!title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "customize-widgets-keyboard-shortcut-help-modal__section-title", children: title }),
74
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShortcutList, { shortcuts })
75
+ ]
76
+ }
77
+ );
65
78
  const ShortcutCategorySection = ({
66
79
  title,
67
80
  categoryName,
68
81
  additionalShortcuts = []
69
82
  }) => {
70
- const categoryShortcuts = (0, _data.useSelect)(select => {
71
- return select(_keyboardShortcuts.store).getCategoryShortcuts(categoryName);
72
- }, [categoryName]);
73
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(ShortcutSection, {
74
- title: title,
75
- shortcuts: categoryShortcuts.concat(additionalShortcuts)
76
- });
83
+ const categoryShortcuts = (0, import_data.useSelect)(
84
+ (select) => {
85
+ return select(import_keyboard_shortcuts.store).getCategoryShortcuts(
86
+ categoryName
87
+ );
88
+ },
89
+ [categoryName]
90
+ );
91
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
92
+ ShortcutSection,
93
+ {
94
+ title,
95
+ shortcuts: categoryShortcuts.concat(additionalShortcuts)
96
+ }
97
+ );
77
98
  };
78
99
  function KeyboardShortcutHelpModal({
79
100
  isModalActive,
80
101
  toggleModal
81
102
  }) {
82
- const {
83
- registerShortcut
84
- } = (0, _data.useDispatch)(_keyboardShortcuts.store);
85
- (0, _element.useEffect)(() => {
103
+ const { registerShortcut } = (0, import_data.useDispatch)(import_keyboard_shortcuts.store);
104
+ (0, import_element.useEffect)(() => {
86
105
  registerShortcut({
87
- name: 'core/customize-widgets/keyboard-shortcuts',
88
- category: 'main',
89
- description: (0, _i18n.__)('Display these keyboard shortcuts.'),
106
+ name: "core/customize-widgets/keyboard-shortcuts",
107
+ category: "main",
108
+ description: (0, import_i18n.__)("Display these keyboard shortcuts."),
90
109
  keyCombination: {
91
- modifier: 'access',
92
- character: 'h'
110
+ modifier: "access",
111
+ character: "h"
93
112
  }
94
113
  });
95
114
  }, [registerShortcut]);
96
- (0, _keyboardShortcuts.useShortcut)('core/customize-widgets/keyboard-shortcuts', toggleModal);
115
+ (0, import_keyboard_shortcuts.useShortcut)("core/customize-widgets/keyboard-shortcuts", toggleModal);
97
116
  if (!isModalActive) {
98
117
  return null;
99
118
  }
100
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Modal, {
101
- className: "customize-widgets-keyboard-shortcut-help-modal",
102
- title: (0, _i18n.__)('Keyboard shortcuts'),
103
- onRequestClose: toggleModal,
104
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ShortcutSection, {
105
- className: "customize-widgets-keyboard-shortcut-help-modal__main-shortcuts",
106
- shortcuts: ['core/customize-widgets/keyboard-shortcuts']
107
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(ShortcutCategorySection, {
108
- title: (0, _i18n.__)('Global shortcuts'),
109
- categoryName: "global"
110
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(ShortcutCategorySection, {
111
- title: (0, _i18n.__)('Selection shortcuts'),
112
- categoryName: "selection"
113
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(ShortcutCategorySection, {
114
- title: (0, _i18n.__)('Block shortcuts'),
115
- categoryName: "block",
116
- additionalShortcuts: [{
117
- keyCombination: {
118
- character: '/'
119
- },
120
- description: (0, _i18n.__)('Change the block type after adding a new paragraph.'),
121
- /* translators: The forward-slash character. e.g. '/'. */
122
- ariaLabel: (0, _i18n.__)('Forward-slash')
123
- }]
124
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(ShortcutSection, {
125
- title: (0, _i18n.__)('Text formatting'),
126
- shortcuts: _config.textFormattingShortcuts
127
- })]
128
- });
119
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
120
+ import_components.Modal,
121
+ {
122
+ className: "customize-widgets-keyboard-shortcut-help-modal",
123
+ title: (0, import_i18n.__)("Keyboard shortcuts"),
124
+ onRequestClose: toggleModal,
125
+ children: [
126
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
127
+ ShortcutSection,
128
+ {
129
+ className: "customize-widgets-keyboard-shortcut-help-modal__main-shortcuts",
130
+ shortcuts: ["core/customize-widgets/keyboard-shortcuts"]
131
+ }
132
+ ),
133
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
134
+ ShortcutCategorySection,
135
+ {
136
+ title: (0, import_i18n.__)("Global shortcuts"),
137
+ categoryName: "global"
138
+ }
139
+ ),
140
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
141
+ ShortcutCategorySection,
142
+ {
143
+ title: (0, import_i18n.__)("Selection shortcuts"),
144
+ categoryName: "selection"
145
+ }
146
+ ),
147
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
148
+ ShortcutCategorySection,
149
+ {
150
+ title: (0, import_i18n.__)("Block shortcuts"),
151
+ categoryName: "block",
152
+ additionalShortcuts: [
153
+ {
154
+ keyCombination: { character: "/" },
155
+ description: (0, import_i18n.__)(
156
+ "Change the block type after adding a new paragraph."
157
+ ),
158
+ /* translators: The forward-slash character. e.g. '/'. */
159
+ ariaLabel: (0, import_i18n.__)("Forward-slash")
160
+ }
161
+ ]
162
+ }
163
+ ),
164
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
165
+ ShortcutSection,
166
+ {
167
+ title: (0, import_i18n.__)("Text formatting"),
168
+ shortcuts: import_config.textFormattingShortcuts
169
+ }
170
+ )
171
+ ]
172
+ }
173
+ );
129
174
  }
130
- //# sourceMappingURL=index.js.map
175
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_i18n","_keyboardShortcuts","_data","_element","_config","_shortcut","_dynamicShortcut","_jsxRuntime","ShortcutList","shortcuts","jsx","className","role","children","map","shortcut","index","default","name","ShortcutSection","title","jsxs","clsx","ShortcutCategorySection","categoryName","additionalShortcuts","categoryShortcuts","useSelect","select","keyboardShortcutsStore","getCategoryShortcuts","concat","KeyboardShortcutHelpModal","isModalActive","toggleModal","registerShortcut","useDispatch","useEffect","category","description","__","keyCombination","modifier","character","useShortcut","Modal","onRequestClose","ariaLabel","textFormattingShortcuts"],"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":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAIA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAKA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA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MACvBH,KAAK,EAAG,IAAAoB,QAAE,EAAE,kBAAmB,CAAG;MAClChB,YAAY,EAAC;IAAQ,CACrB,CAAC,eAEF,IAAAjB,WAAA,CAAAG,GAAA,EAACa,uBAAuB;MACvBH,KAAK,EAAG,IAAAoB,QAAE,EAAE,qBAAsB,CAAG;MACrChB,YAAY,EAAC;IAAW,CACxB,CAAC,eAEF,IAAAjB,WAAA,CAAAG,GAAA,EAACa,uBAAuB;MACvBH,KAAK,EAAG,IAAAoB,QAAE,EAAE,iBAAkB,CAAG;MACjChB,YAAY,EAAC,OAAO;MACpBC,mBAAmB,EAAG,CACrB;QACCgB,cAAc,EAAE;UAAEE,SAAS,EAAE;QAAI,CAAC;QAClCJ,WAAW,EAAE,IAAAC,QAAE,EACd,qDACD,CAAC;QACD;QACAO,SAAS,EAAE,IAAAP,QAAE,EAAE,eAAgB;MAChC,CAAC;IACC,CACH,CAAC,eACF,IAAAjC,WAAA,CAAAG,GAAA,EAACS,eAAe;MACfC,KAAK,EAAG,IAAAoB,QAAE,EAAE,iBAAkB,CAAG;MACjC/B,SAAS,EAAGuC;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</Mod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", "keyboardShortcutsStore"]
7
+ }
@@ -1,59 +1,79 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
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
+ var shortcut_exports = {};
19
+ __export(shortcut_exports, {
20
+ default: () => shortcut_default
5
21
  });
6
- exports.default = void 0;
7
- var _element = require("@wordpress/element");
8
- var _keycodes = require("@wordpress/keycodes");
9
- var _jsxRuntime = require("react/jsx-runtime");
10
- /**
11
- * WordPress dependencies
12
- */
13
-
14
- function KeyCombination({
15
- keyCombination,
16
- forceAriaLabel
17
- }) {
18
- const shortcut = keyCombination.modifier ? _keycodes.displayShortcutList[keyCombination.modifier](keyCombination.character) : keyCombination.character;
19
- const ariaLabel = keyCombination.modifier ? _keycodes.shortcutAriaLabel[keyCombination.modifier](keyCombination.character) : keyCombination.character;
20
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("kbd", {
21
- className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination",
22
- "aria-label": forceAriaLabel || ariaLabel,
23
- children: (Array.isArray(shortcut) ? shortcut : [shortcut]).map((character, index) => {
24
- if (character === '+') {
25
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_element.Fragment, {
26
- children: character
27
- }, index);
28
- }
29
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("kbd", {
30
- className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key",
31
- children: character
32
- }, index);
33
- })
34
- });
22
+ module.exports = __toCommonJS(shortcut_exports);
23
+ var import_jsx_runtime = require("react/jsx-runtime");
24
+ var import_element = require("@wordpress/element");
25
+ var import_keycodes = require("@wordpress/keycodes");
26
+ function KeyCombination({ keyCombination, forceAriaLabel }) {
27
+ const shortcut = keyCombination.modifier ? import_keycodes.displayShortcutList[keyCombination.modifier](
28
+ keyCombination.character
29
+ ) : keyCombination.character;
30
+ const ariaLabel = keyCombination.modifier ? import_keycodes.shortcutAriaLabel[keyCombination.modifier](
31
+ keyCombination.character
32
+ ) : keyCombination.character;
33
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
34
+ "kbd",
35
+ {
36
+ className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination",
37
+ "aria-label": forceAriaLabel || ariaLabel,
38
+ children: (Array.isArray(shortcut) ? shortcut : [shortcut]).map(
39
+ (character, index) => {
40
+ if (character === "+") {
41
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_element.Fragment, { children: character }, index);
42
+ }
43
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
+ "kbd",
45
+ {
46
+ className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-key",
47
+ children: character
48
+ },
49
+ index
50
+ );
51
+ }
52
+ )
53
+ }
54
+ );
35
55
  }
36
- function Shortcut({
37
- description,
38
- keyCombination,
39
- aliases = [],
40
- ariaLabel
41
- }) {
42
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
43
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
44
- className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-description",
45
- children: description
46
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
47
- className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-term",
48
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(KeyCombination, {
49
- keyCombination: keyCombination,
50
- forceAriaLabel: ariaLabel
51
- }), aliases.map((alias, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(KeyCombination, {
52
- keyCombination: alias,
53
- forceAriaLabel: ariaLabel
54
- }, index))]
55
- })]
56
- });
56
+ function Shortcut({ description, keyCombination, aliases = [], ariaLabel }) {
57
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
58
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-description", children: description }),
59
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-term", children: [
60
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
61
+ KeyCombination,
62
+ {
63
+ keyCombination,
64
+ forceAriaLabel: ariaLabel
65
+ }
66
+ ),
67
+ aliases.map((alias, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
68
+ KeyCombination,
69
+ {
70
+ keyCombination: alias,
71
+ forceAriaLabel: ariaLabel
72
+ },
73
+ index
74
+ ))
75
+ ] })
76
+ ] });
57
77
  }
58
- var _default = exports.default = Shortcut;
59
- //# sourceMappingURL=shortcut.js.map
78
+ var shortcut_default = Shortcut;
79
+ //# sourceMappingURL=shortcut.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_element","require","_keycodes","_jsxRuntime","KeyCombination","keyCombination","forceAriaLabel","shortcut","modifier","displayShortcutList","character","ariaLabel","shortcutAriaLabel","jsx","className","children","Array","isArray","map","index","Fragment","Shortcut","description","aliases","jsxs","alias","_default","exports","default"],"sources":["@wordpress/customize-widgets/src/components/keyboard-shortcut-help-modal/shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ ( Array.isArray( shortcut ) ? shortcut : [ shortcut ] ).map(\n\t\t\t\t( character, index ) => {\n\t\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<kbd\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ character }\n\t\t\t\t\t\t</kbd>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ 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B,OAAO,GAAG,EAAE;EAAEZ;AAAU,CAAC,EAAG;EAC7E,oBACC,IAAAR,WAAA,CAAAqB,IAAA,EAAArB,WAAA,CAAAiB,QAAA;IAAAL,QAAA,gBACC,IAAAZ,WAAA,CAAAU,GAAA;MAAKC,SAAS,EAAC,sEAAsE;MAAAC,QAAA,EAClFO;IAAW,CACT,CAAC,eACN,IAAAnB,WAAA,CAAAqB,IAAA;MAAKV,SAAS,EAAC,+DAA+D;MAAAC,QAAA,gBAC7E,IAAAZ,WAAA,CAAAU,GAAA,EAACT,cAAc;QACdC,cAAc,EAAGA,cAAgB;QACjCC,cAAc,EAAGK;MAAW,CAC5B,CAAC,EACAY,OAAO,CAACL,GAAG,CAAE,CAAEO,KAAK,EAAEN,KAAK,kBAC5B,IAAAhB,WAAA,CAAAU,GAAA,EAACT,cAAc;QACdC,cAAc,EAAGoB,KAAO;QACxBnB,cAAc,EAAGK;MAAW,GACtBQ,KACN,CACA,CAAC;IAAA,CACC,CAAC;EAAA,CACL,CAAC;AAEL;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcP,QAAQ","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/keyboard-shortcut-help-modal/shortcut.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ ( Array.isArray( shortcut ) ? shortcut : [ shortcut ] ).map(\n\t\t\t\t( character, index ) => {\n\t\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<kbd\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tclassName=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ character }\n\t\t\t\t\t\t</kbd>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA0Ba;AAvBb,qBAAyB;AACzB,sBAAuD;AAEvD,SAAS,eAAgB,EAAE,gBAAgB,eAAe,GAAI;AAC7D,QAAM,WAAW,eAAe,WAC7B,oCAAqB,eAAe,QAAS;AAAA,IAC7C,eAAe;AAAA,EACf,IACA,eAAe;AAClB,QAAM,YAAY,eAAe,WAC9B,kCAAmB,eAAe,QAAS;AAAA,IAC3C,eAAe;AAAA,EACf,IACA,eAAe;AAElB,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,cAAa,kBAAkB;AAAA,MAE3B,iBAAM,QAAS,QAAS,IAAI,WAAW,CAAE,QAAS,GAAI;AAAA,QACzD,CAAE,WAAW,UAAW;AACvB,cAAK,cAAc,KAAM;AACxB,mBAAO,4CAAC,2BAAyB,uBAAV,KAAqB;AAAA,UAC7C;AAEA,iBACC;AAAA,YAAC;AAAA;AAAA,cAEA,WAAU;AAAA,cAER;AAAA;AAAA,YAHI;AAAA,UAIP;AAAA,QAEF;AAAA,MACD;AAAA;AAAA,EACD;AAEF;AAEA,SAAS,SAAU,EAAE,aAAa,gBAAgB,UAAU,CAAC,GAAG,UAAU,GAAI;AAC7E,SACC,4EACC;AAAA,gDAAC,SAAI,WAAU,wEACZ,uBACH;AAAA,IACA,6CAAC,SAAI,WAAU,iEACd;AAAA;AAAA,QAAC;AAAA;AAAA,UACA;AAAA,UACA,gBAAiB;AAAA;AAAA,MAClB;AAAA,MACE,QAAQ,IAAK,CAAE,OAAO,UACvB;AAAA,QAAC;AAAA;AAAA,UACA,gBAAiB;AAAA,UACjB,gBAAiB;AAAA;AAAA,QACX;AAAA,MACP,CACC;AAAA,OACH;AAAA,KACD;AAEF;AAEA,IAAO,mBAAQ;",
6
+ "names": []
7
+ }
@@ -1,86 +1,95 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
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
+ var keyboard_shortcuts_exports = {};
19
+ __export(keyboard_shortcuts_exports, {
20
+ default: () => keyboard_shortcuts_default
5
21
  });
6
- exports.default = void 0;
7
- var _element = require("@wordpress/element");
8
- var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
9
- var _keycodes = require("@wordpress/keycodes");
10
- var _data = require("@wordpress/data");
11
- var _i18n = require("@wordpress/i18n");
12
- /**
13
- * WordPress dependencies
14
- */
15
-
16
- function KeyboardShortcuts({
17
- undo,
18
- redo,
19
- save
20
- }) {
21
- (0, _keyboardShortcuts.useShortcut)('core/customize-widgets/undo', event => {
22
+ module.exports = __toCommonJS(keyboard_shortcuts_exports);
23
+ var import_element = require("@wordpress/element");
24
+ var import_keyboard_shortcuts = require("@wordpress/keyboard-shortcuts");
25
+ var import_keycodes = require("@wordpress/keycodes");
26
+ var import_data = require("@wordpress/data");
27
+ var import_i18n = require("@wordpress/i18n");
28
+ function KeyboardShortcuts({ undo, redo, save }) {
29
+ (0, import_keyboard_shortcuts.useShortcut)("core/customize-widgets/undo", (event) => {
22
30
  undo();
23
31
  event.preventDefault();
24
32
  });
25
- (0, _keyboardShortcuts.useShortcut)('core/customize-widgets/redo', event => {
33
+ (0, import_keyboard_shortcuts.useShortcut)("core/customize-widgets/redo", (event) => {
26
34
  redo();
27
35
  event.preventDefault();
28
36
  });
29
- (0, _keyboardShortcuts.useShortcut)('core/customize-widgets/save', event => {
37
+ (0, import_keyboard_shortcuts.useShortcut)("core/customize-widgets/save", (event) => {
30
38
  event.preventDefault();
31
39
  save();
32
40
  });
33
41
  return null;
34
42
  }
35
43
  function KeyboardShortcutsRegister() {
36
- const {
37
- registerShortcut,
38
- unregisterShortcut
39
- } = (0, _data.useDispatch)(_keyboardShortcuts.store);
40
- (0, _element.useEffect)(() => {
44
+ const { registerShortcut, unregisterShortcut } = (0, import_data.useDispatch)(
45
+ import_keyboard_shortcuts.store
46
+ );
47
+ (0, import_element.useEffect)(() => {
41
48
  registerShortcut({
42
- name: 'core/customize-widgets/undo',
43
- category: 'global',
44
- description: (0, _i18n.__)('Undo your last changes.'),
49
+ name: "core/customize-widgets/undo",
50
+ category: "global",
51
+ description: (0, import_i18n.__)("Undo your last changes."),
45
52
  keyCombination: {
46
- modifier: 'primary',
47
- character: 'z'
53
+ modifier: "primary",
54
+ character: "z"
48
55
  }
49
56
  });
50
57
  registerShortcut({
51
- name: 'core/customize-widgets/redo',
52
- category: 'global',
53
- description: (0, _i18n.__)('Redo your last undo.'),
58
+ name: "core/customize-widgets/redo",
59
+ category: "global",
60
+ description: (0, import_i18n.__)("Redo your last undo."),
54
61
  keyCombination: {
55
- modifier: 'primaryShift',
56
- character: 'z'
62
+ modifier: "primaryShift",
63
+ character: "z"
57
64
  },
58
65
  // Disable on Apple OS because it conflicts with the browser's
59
66
  // history shortcut. It's a fine alias for both Windows and Linux.
60
67
  // Since there's no conflict for Ctrl+Shift+Z on both Windows and
61
68
  // Linux, we keep it as the default for consistency.
62
- aliases: (0, _keycodes.isAppleOS)() ? [] : [{
63
- modifier: 'primary',
64
- character: 'y'
65
- }]
69
+ aliases: (0, import_keycodes.isAppleOS)() ? [] : [
70
+ {
71
+ modifier: "primary",
72
+ character: "y"
73
+ }
74
+ ]
66
75
  });
67
76
  registerShortcut({
68
- name: 'core/customize-widgets/save',
69
- category: 'global',
70
- description: (0, _i18n.__)('Save your changes.'),
77
+ name: "core/customize-widgets/save",
78
+ category: "global",
79
+ description: (0, import_i18n.__)("Save your changes."),
71
80
  keyCombination: {
72
- modifier: 'primary',
73
- character: 's'
81
+ modifier: "primary",
82
+ character: "s"
74
83
  }
75
84
  });
76
85
  return () => {
77
- unregisterShortcut('core/customize-widgets/undo');
78
- unregisterShortcut('core/customize-widgets/redo');
79
- unregisterShortcut('core/customize-widgets/save');
86
+ unregisterShortcut("core/customize-widgets/undo");
87
+ unregisterShortcut("core/customize-widgets/redo");
88
+ unregisterShortcut("core/customize-widgets/save");
80
89
  };
81
90
  }, [registerShortcut]);
82
91
  return null;
83
92
  }
84
93
  KeyboardShortcuts.Register = KeyboardShortcutsRegister;
85
- var _default = exports.default = KeyboardShortcuts;
86
- //# sourceMappingURL=index.js.map
94
+ var keyboard_shortcuts_default = KeyboardShortcuts;
95
+ //# sourceMappingURL=index.js.map