@wordpress/edit-widgets 6.32.0 → 6.32.1-next.47f435fc9.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 (202) hide show
  1. package/build/blocks/widget-area/block.json +26 -0
  2. package/build/blocks/widget-area/edit/index.js +94 -87
  3. package/build/blocks/widget-area/edit/index.js.map +7 -1
  4. package/build/blocks/widget-area/edit/inner-blocks.js +68 -50
  5. package/build/blocks/widget-area/edit/inner-blocks.js.map +7 -1
  6. package/build/blocks/widget-area/edit/use-is-dragging-within.js +34 -40
  7. package/build/blocks/widget-area/edit/use-is-dragging-within.js.map +7 -1
  8. package/build/blocks/widget-area/index.js +49 -52
  9. package/build/blocks/widget-area/index.js.map +7 -1
  10. package/build/components/error-boundary/index.js +49 -51
  11. package/build/components/error-boundary/index.js.map +7 -1
  12. package/build/components/header/document-tools/index.js +104 -74
  13. package/build/components/header/document-tools/index.js.map +7 -1
  14. package/build/components/header/index.js +81 -62
  15. package/build/components/header/index.js.map +7 -1
  16. package/build/components/header/undo-redo/redo.js +50 -38
  17. package/build/components/header/undo-redo/redo.js.map +7 -1
  18. package/build/components/header/undo-redo/undo.js +49 -37
  19. package/build/components/header/undo-redo/undo.js.map +7 -1
  20. package/build/components/keyboard-shortcut-help-modal/config.js +74 -71
  21. package/build/components/keyboard-shortcut-help-modal/config.js.map +7 -1
  22. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +61 -44
  23. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +7 -1
  24. package/build/components/keyboard-shortcut-help-modal/index.js +154 -103
  25. package/build/components/keyboard-shortcut-help-modal/index.js.map +7 -1
  26. package/build/components/keyboard-shortcut-help-modal/shortcut.js +74 -56
  27. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +7 -1
  28. package/build/components/keyboard-shortcuts/index.js +89 -82
  29. package/build/components/keyboard-shortcuts/index.js.map +7 -1
  30. package/build/components/layout/index.js +75 -49
  31. package/build/components/layout/index.js.map +7 -1
  32. package/build/components/layout/interface.js +89 -75
  33. package/build/components/layout/interface.js.map +7 -1
  34. package/build/components/layout/unsaved-changes-warning.js +35 -42
  35. package/build/components/layout/unsaved-changes-warning.js.map +7 -1
  36. package/build/components/more-menu/index.js +189 -108
  37. package/build/components/more-menu/index.js.map +7 -1
  38. package/build/components/more-menu/tools-more-menu-group.js +29 -23
  39. package/build/components/more-menu/tools-more-menu-group.js.map +7 -1
  40. package/build/components/notices/index.js +62 -48
  41. package/build/components/notices/index.js.map +7 -1
  42. package/build/components/save-button/index.js +55 -47
  43. package/build/components/save-button/index.js.map +7 -1
  44. package/build/components/secondary-sidebar/index.js +41 -34
  45. package/build/components/secondary-sidebar/index.js.map +7 -1
  46. package/build/components/secondary-sidebar/inserter-sidebar.js +55 -46
  47. package/build/components/secondary-sidebar/inserter-sidebar.js.map +7 -1
  48. package/build/components/secondary-sidebar/list-view-sidebar.js +76 -67
  49. package/build/components/secondary-sidebar/list-view-sidebar.js.map +7 -1
  50. package/build/components/sidebar/index.js +149 -138
  51. package/build/components/sidebar/index.js.map +7 -1
  52. package/build/components/sidebar/widget-areas.js +73 -57
  53. package/build/components/sidebar/widget-areas.js.map +7 -1
  54. package/build/components/welcome-guide/index.js +182 -137
  55. package/build/components/welcome-guide/index.js.map +7 -1
  56. package/build/components/widget-areas-block-editor-content/index.js +64 -43
  57. package/build/components/widget-areas-block-editor-content/index.js.map +7 -1
  58. package/build/components/widget-areas-block-editor-provider/index.js +115 -92
  59. package/build/components/widget-areas-block-editor-provider/index.js.map +7 -1
  60. package/build/constants.js +30 -8
  61. package/build/constants.js.map +7 -1
  62. package/build/filters/index.js +3 -5
  63. package/build/filters/index.js.map +7 -1
  64. package/build/filters/move-to-widget-area.js +52 -59
  65. package/build/filters/move-to-widget-area.js.map +7 -1
  66. package/build/filters/replace-media-upload.js +9 -11
  67. package/build/filters/replace-media-upload.js.map +7 -1
  68. package/build/hooks/use-last-selected-widget-area.js +38 -44
  69. package/build/hooks/use-last-selected-widget-area.js.map +7 -1
  70. package/build/hooks/use-widget-library-insertion-point.js +60 -55
  71. package/build/hooks/use-widget-library-insertion-point.js.map +7 -1
  72. package/build/index.js +86 -93
  73. package/build/index.js.map +7 -1
  74. package/build/lock-unlock.js +31 -15
  75. package/build/lock-unlock.js.map +7 -1
  76. package/build/store/actions.js +181 -313
  77. package/build/store/actions.js.map +7 -1
  78. package/build/store/constants.js +27 -10
  79. package/build/store/constants.js.map +7 -1
  80. package/build/store/index.js +51 -51
  81. package/build/store/index.js.map +7 -1
  82. package/build/store/private-selectors.js +28 -7
  83. package/build/store/private-selectors.js.map +7 -1
  84. package/build/store/reducer.js +65 -118
  85. package/build/store/reducer.js.map +7 -1
  86. package/build/store/resolvers.js +64 -63
  87. package/build/store/resolvers.js.map +7 -1
  88. package/build/store/selectors.js +194 -231
  89. package/build/store/selectors.js.map +7 -1
  90. package/build/store/transformers.js +47 -41
  91. package/build/store/transformers.js.map +7 -1
  92. package/build/store/utils.js +47 -70
  93. package/build/store/utils.js.map +7 -1
  94. package/build-module/blocks/widget-area/block.json +26 -0
  95. package/build-module/blocks/widget-area/edit/index.js +63 -75
  96. package/build-module/blocks/widget-area/edit/index.js.map +7 -1
  97. package/build-module/blocks/widget-area/edit/inner-blocks.js +38 -41
  98. package/build-module/blocks/widget-area/edit/inner-blocks.js.map +7 -1
  99. package/build-module/blocks/widget-area/edit/use-is-dragging-within.js +14 -33
  100. package/build-module/blocks/widget-area/edit/use-is-dragging-within.js.map +7 -1
  101. package/build-module/blocks/widget-area/index.js +14 -46
  102. package/build-module/blocks/widget-area/index.js.map +7 -1
  103. package/build-module/components/error-boundary/index.js +30 -43
  104. package/build-module/components/error-boundary/index.js.map +7 -1
  105. package/build-module/components/header/document-tools/index.js +75 -66
  106. package/build-module/components/header/document-tools/index.js.map +7 -1
  107. package/build-module/components/header/index.js +52 -54
  108. package/build-module/components/header/index.js.map +7 -1
  109. package/build-module/components/header/undo-redo/redo.js +32 -32
  110. package/build-module/components/header/undo-redo/redo.js.map +7 -1
  111. package/build-module/components/header/undo-redo/undo.js +31 -31
  112. package/build-module/components/header/undo-redo/undo.js.map +7 -1
  113. package/build-module/components/keyboard-shortcut-help-modal/config.js +62 -75
  114. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +7 -1
  115. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +33 -37
  116. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +7 -1
  117. package/build-module/components/keyboard-shortcut-help-modal/index.js +130 -97
  118. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +7 -1
  119. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +56 -50
  120. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +7 -1
  121. package/build-module/components/keyboard-shortcuts/index.js +73 -75
  122. package/build-module/components/keyboard-shortcuts/index.js.map +7 -1
  123. package/build-module/components/layout/index.js +46 -41
  124. package/build-module/components/layout/index.js.map +7 -1
  125. package/build-module/components/layout/interface.js +63 -66
  126. package/build-module/components/layout/interface.js.map +7 -1
  127. package/build-module/components/layout/unsaved-changes-warning.js +17 -37
  128. package/build-module/components/layout/unsaved-changes-warning.js.map +7 -1
  129. package/build-module/components/more-menu/index.js +167 -102
  130. package/build-module/components/more-menu/index.js.map +7 -1
  131. package/build-module/components/more-menu/tools-more-menu-group.js +11 -17
  132. package/build-module/components/more-menu/tools-more-menu-group.js.map +7 -1
  133. package/build-module/components/notices/index.js +43 -42
  134. package/build-module/components/notices/index.js.map +7 -1
  135. package/build-module/components/save-button/index.js +37 -41
  136. package/build-module/components/save-button/index.js.map +7 -1
  137. package/build-module/components/secondary-sidebar/index.js +14 -27
  138. package/build-module/components/secondary-sidebar/index.js.map +7 -1
  139. package/build-module/components/secondary-sidebar/inserter-sidebar.js +26 -38
  140. package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +7 -1
  141. package/build-module/components/secondary-sidebar/list-view-sidebar.js +57 -60
  142. package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +7 -1
  143. package/build-module/components/sidebar/index.js +129 -127
  144. package/build-module/components/sidebar/index.js.map +7 -1
  145. package/build-module/components/sidebar/widget-areas.js +53 -49
  146. package/build-module/components/sidebar/widget-areas.js.map +7 -1
  147. package/build-module/components/welcome-guide/index.js +165 -132
  148. package/build-module/components/welcome-guide/index.js.map +7 -1
  149. package/build-module/components/widget-areas-block-editor-content/index.js +43 -36
  150. package/build-module/components/widget-areas-block-editor-content/index.js.map +7 -1
  151. package/build-module/components/widget-areas-block-editor-provider/index.js +85 -83
  152. package/build-module/components/widget-areas-block-editor-provider/index.js.map +7 -1
  153. package/build-module/constants.js +7 -3
  154. package/build-module/constants.js.map +7 -1
  155. package/build-module/filters/index.js +3 -6
  156. package/build-module/filters/index.js.map +7 -1
  157. package/build-module/filters/move-to-widget-area.js +52 -57
  158. package/build-module/filters/move-to-widget-area.js.map +7 -1
  159. package/build-module/filters/replace-media-upload.js +8 -7
  160. package/build-module/filters/replace-media-upload.js.map +7 -1
  161. package/build-module/hooks/use-last-selected-widget-area.js +20 -39
  162. package/build-module/hooks/use-last-selected-widget-area.js.map +7 -1
  163. package/build-module/hooks/use-widget-library-insertion-point.js +42 -49
  164. package/build-module/hooks/use-widget-library-insertion-point.js.map +7 -1
  165. package/build-module/index.js +60 -72
  166. package/build-module/index.js.map +7 -1
  167. package/build-module/lock-unlock.js +8 -7
  168. package/build-module/lock-unlock.js.map +7 -1
  169. package/build-module/store/actions.js +153 -293
  170. package/build-module/store/actions.js.map +7 -1
  171. package/build-module/store/constants.js +5 -5
  172. package/build-module/store/constants.js.map +7 -1
  173. package/build-module/store/index.js +16 -40
  174. package/build-module/store/index.js.map +7 -1
  175. package/build-module/store/private-selectors.js +7 -3
  176. package/build-module/store/private-selectors.js.map +7 -1
  177. package/build-module/store/reducer.js +42 -111
  178. package/build-module/store/reducer.js.map +7 -1
  179. package/build-module/store/resolvers.js +43 -51
  180. package/build-module/store/resolvers.js.map +7 -1
  181. package/build-module/store/selectors.js +171 -224
  182. package/build-module/store/selectors.js.map +7 -1
  183. package/build-module/store/transformers.js +23 -34
  184. package/build-module/store/transformers.js.map +7 -1
  185. package/build-module/store/utils.js +22 -63
  186. package/build-module/store/utils.js.map +7 -1
  187. package/build-style/style-rtl.css +216 -88
  188. package/build-style/style.css +216 -88
  189. package/package.json +36 -29
  190. package/src/blocks/widget-area/editor.scss +3 -0
  191. package/src/components/customizer-edit-widgets-initializer/style.scss +3 -0
  192. package/src/components/error-boundary/style.scss +2 -0
  193. package/src/components/header/style.scss +5 -0
  194. package/src/components/keyboard-shortcut-help-modal/style.scss +2 -0
  195. package/src/components/layout/style.scss +3 -0
  196. package/src/components/more-menu/style.scss +2 -0
  197. package/src/components/notices/style.scss +3 -0
  198. package/src/components/secondary-sidebar/style.scss +4 -0
  199. package/src/components/sidebar/style.scss +2 -0
  200. package/src/components/welcome-guide/style.scss +2 -0
  201. package/src/components/widget-areas-block-editor-content/style.scss +2 -0
  202. package/src/style.scss +16 -13
@@ -1,41 +1,53 @@
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 redo_exports = {};
19
+ __export(redo_exports, {
20
+ default: () => redo_default
5
21
  });
6
- exports.default = void 0;
7
- var _i18n = require("@wordpress/i18n");
8
- var _components = require("@wordpress/components");
9
- var _data = require("@wordpress/data");
10
- var _icons = require("@wordpress/icons");
11
- var _keycodes = require("@wordpress/keycodes");
12
- var _coreData = require("@wordpress/core-data");
13
- var _element = require("@wordpress/element");
14
- var _jsxRuntime = require("react/jsx-runtime");
15
- /**
16
- * WordPress dependencies
17
- */
18
-
22
+ module.exports = __toCommonJS(redo_exports);
23
+ var import_jsx_runtime = require("react/jsx-runtime");
24
+ var import_i18n = require("@wordpress/i18n");
25
+ var import_components = require("@wordpress/components");
26
+ var import_data = require("@wordpress/data");
27
+ var import_icons = require("@wordpress/icons");
28
+ var import_keycodes = require("@wordpress/keycodes");
29
+ var import_core_data = require("@wordpress/core-data");
30
+ var import_element = require("@wordpress/element");
19
31
  function RedoButton(props, ref) {
20
- const shortcut = (0, _keycodes.isAppleOS)() ? _keycodes.displayShortcut.primaryShift('z') : _keycodes.displayShortcut.primary('y');
21
- const hasRedo = (0, _data.useSelect)(select => select(_coreData.store).hasRedo(), []);
22
- const {
23
- redo
24
- } = (0, _data.useDispatch)(_coreData.store);
25
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
26
- ...props,
27
- ref: ref,
28
- icon: !(0, _i18n.isRTL)() ? _icons.redo : _icons.undo,
29
- label: (0, _i18n.__)('Redo'),
30
- shortcut: shortcut
31
- // If there are no undo levels we don't want to actually disable this
32
- // button, because it will remove focus for keyboard users.
33
- // See: https://github.com/WordPress/gutenberg/issues/3486
34
- ,
35
- "aria-disabled": !hasRedo,
36
- onClick: hasRedo ? redo : undefined,
37
- size: "compact"
38
- });
32
+ const shortcut = (0, import_keycodes.isAppleOS)() ? import_keycodes.displayShortcut.primaryShift("z") : import_keycodes.displayShortcut.primary("y");
33
+ const hasRedo = (0, import_data.useSelect)(
34
+ (select) => select(import_core_data.store).hasRedo(),
35
+ []
36
+ );
37
+ const { redo } = (0, import_data.useDispatch)(import_core_data.store);
38
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
39
+ import_components.Button,
40
+ {
41
+ ...props,
42
+ ref,
43
+ icon: !(0, import_i18n.isRTL)() ? import_icons.redo : import_icons.undo,
44
+ label: (0, import_i18n.__)("Redo"),
45
+ shortcut,
46
+ "aria-disabled": !hasRedo,
47
+ onClick: hasRedo ? redo : void 0,
48
+ size: "compact"
49
+ }
50
+ );
39
51
  }
40
- var _default = exports.default = (0, _element.forwardRef)(RedoButton);
41
- //# sourceMappingURL=redo.js.map
52
+ var redo_default = (0, import_element.forwardRef)(RedoButton);
53
+ //# sourceMappingURL=redo.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_i18n","require","_components","_data","_icons","_keycodes","_coreData","_element","_jsxRuntime","RedoButton","props","ref","shortcut","isAppleOS","displayShortcut","primaryShift","primary","hasRedo","useSelect","select","coreStore","redo","useDispatch","jsx","Button","icon","isRTL","redoIcon","undoIcon","label","__","onClick","undefined","size","_default","exports","default","forwardRef"],"sources":["@wordpress/edit-widgets/src/components/header/undo-redo/redo.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { redo as redoIcon, undo as undoIcon } from '@wordpress/icons';\nimport { displayShortcut, isAppleOS } from '@wordpress/keycodes';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { forwardRef } from '@wordpress/element';\n\nfunction RedoButton( props, ref ) {\n\tconst shortcut = isAppleOS()\n\t\t? displayShortcut.primaryShift( 'z' )\n\t\t: displayShortcut.primary( 'y' );\n\n\tconst hasRedo = useSelect(\n\t\t( select ) => select( coreStore ).hasRedo(),\n\t\t[]\n\t);\n\tconst { redo } = useDispatch( coreStore );\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? redoIcon : undoIcon }\n\t\t\tlabel={ __( 'Redo' ) }\n\t\t\tshortcut={ shortcut }\n\t\t\t// If there are no undo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasRedo }\n\t\t\tonClick={ hasRedo ? redo : undefined }\n\t\t\tsize=\"compact\"\n\t\t/>\n\t);\n}\n\nexport default forwardRef( RedoButton );\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAAgD,IAAAO,WAAA,GAAAP,OAAA;AAThD;AACA;AACA;;AASA,SAASQ,UAAUA,CAAEC,KAAK,EAAEC,GAAG,EAAG;EACjC,MAAMC,QAAQ,GAAG,IAAAC,mBAAS,EAAC,CAAC,GACzBC,yBAAe,CAACC,YAAY,CAAE,GAAI,CAAC,GACnCD,yBAAe,CAACE,OAAO,CAAE,GAAI,CAAC;EAEjC,MAAMC,OAAO,GAAG,IAAAC,eAAS,EACtBC,MAAM,IAAMA,MAAM,CAAEC,eAAU,CAAC,CAACH,OAAO,CAAC,CAAC,EAC3C,EACD,CAAC;EACD,MAAM;IAAEI;EAAK,CAAC,GAAG,IAAAC,iBAAW,EAAEF,eAAU,CAAC;EACzC,oBACC,IAAAZ,WAAA,CAAAe,GAAA,EAACrB,WAAA,CAAAsB,MAAM;IAAA,GACDd,KAAK;IACVC,GAAG,EAAGA,GAAK;IACXc,IAAI,EAAG,CAAE,IAAAC,WAAK,EAAC,CAAC,GAAGC,WAAQ,GAAGC,WAAU;IACxCC,KAAK,EAAG,IAAAC,QAAE,EAAE,MAAO,CAAG;IACtBlB,QAAQ,EAAGA;IACX;IACA;IACA;IAAA;IACA,iBAAgB,CAAEK,OAAS;IAC3Bc,OAAO,EAAGd,OAAO,GAAGI,IAAI,GAAGW,SAAW;IACtCC,IAAI,EAAC;EAAS,CACd,CAAC;AAEJ;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,mBAAU,EAAE5B,UAAW,CAAC","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/components/header/undo-redo/redo.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { redo as redoIcon, undo as undoIcon } from '@wordpress/icons';\nimport { displayShortcut, isAppleOS } from '@wordpress/keycodes';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { forwardRef } from '@wordpress/element';\n\nfunction RedoButton( props, ref ) {\n\tconst shortcut = isAppleOS()\n\t\t? displayShortcut.primaryShift( 'z' )\n\t\t: displayShortcut.primary( 'y' );\n\n\tconst hasRedo = useSelect(\n\t\t( select ) => select( coreStore ).hasRedo(),\n\t\t[]\n\t);\n\tconst { redo } = useDispatch( coreStore );\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? redoIcon : undoIcon }\n\t\t\tlabel={ __( 'Redo' ) }\n\t\t\tshortcut={ shortcut }\n\t\t\t// If there are no undo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasRedo }\n\t\t\tonClick={ hasRedo ? redo : undefined }\n\t\t\tsize=\"compact\"\n\t\t/>\n\t);\n}\n\nexport default forwardRef( RedoButton );\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBE;AAnBF,kBAA0B;AAC1B,wBAAuB;AACvB,kBAAuC;AACvC,mBAAmD;AACnD,sBAA2C;AAC3C,uBAAmC;AACnC,qBAA2B;AAE3B,SAAS,WAAY,OAAO,KAAM;AACjC,QAAM,eAAW,2BAAU,IACxB,gCAAgB,aAAc,GAAI,IAClC,gCAAgB,QAAS,GAAI;AAEhC,QAAM,cAAU;AAAA,IACf,CAAE,WAAY,OAAQ,iBAAAA,KAAU,EAAE,QAAQ;AAAA,IAC1C,CAAC;AAAA,EACF;AACA,QAAM,EAAE,KAAK,QAAI,yBAAa,iBAAAA,KAAU;AACxC,SACC;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACL;AAAA,MACA,MAAO,KAAE,mBAAM,IAAI,aAAAC,OAAW,aAAAC;AAAA,MAC9B,WAAQ,gBAAI,MAAO;AAAA,MACnB;AAAA,MAIA,iBAAgB,CAAE;AAAA,MAClB,SAAU,UAAU,OAAO;AAAA,MAC3B,MAAK;AAAA;AAAA,EACN;AAEF;AAEA,IAAO,mBAAQ,2BAAY,UAAW;",
6
+ "names": ["coreStore", "redoIcon", "undoIcon"]
7
+ }
@@ -1,40 +1,52 @@
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 undo_exports = {};
19
+ __export(undo_exports, {
20
+ default: () => undo_default
5
21
  });
6
- exports.default = void 0;
7
- var _i18n = require("@wordpress/i18n");
8
- var _components = require("@wordpress/components");
9
- var _data = require("@wordpress/data");
10
- var _icons = require("@wordpress/icons");
11
- var _keycodes = require("@wordpress/keycodes");
12
- var _coreData = require("@wordpress/core-data");
13
- var _element = require("@wordpress/element");
14
- var _jsxRuntime = require("react/jsx-runtime");
15
- /**
16
- * WordPress dependencies
17
- */
18
-
22
+ module.exports = __toCommonJS(undo_exports);
23
+ var import_jsx_runtime = require("react/jsx-runtime");
24
+ var import_i18n = require("@wordpress/i18n");
25
+ var import_components = require("@wordpress/components");
26
+ var import_data = require("@wordpress/data");
27
+ var import_icons = require("@wordpress/icons");
28
+ var import_keycodes = require("@wordpress/keycodes");
29
+ var import_core_data = require("@wordpress/core-data");
30
+ var import_element = require("@wordpress/element");
19
31
  function UndoButton(props, ref) {
20
- const hasUndo = (0, _data.useSelect)(select => select(_coreData.store).hasUndo(), []);
21
- const {
22
- undo
23
- } = (0, _data.useDispatch)(_coreData.store);
24
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
25
- ...props,
26
- ref: ref,
27
- icon: !(0, _i18n.isRTL)() ? _icons.undo : _icons.redo,
28
- label: (0, _i18n.__)('Undo'),
29
- shortcut: _keycodes.displayShortcut.primary('z')
30
- // If there are no undo levels we don't want to actually disable this
31
- // button, because it will remove focus for keyboard users.
32
- // See: https://github.com/WordPress/gutenberg/issues/3486
33
- ,
34
- "aria-disabled": !hasUndo,
35
- onClick: hasUndo ? undo : undefined,
36
- size: "compact"
37
- });
32
+ const hasUndo = (0, import_data.useSelect)(
33
+ (select) => select(import_core_data.store).hasUndo(),
34
+ []
35
+ );
36
+ const { undo } = (0, import_data.useDispatch)(import_core_data.store);
37
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
38
+ import_components.Button,
39
+ {
40
+ ...props,
41
+ ref,
42
+ icon: !(0, import_i18n.isRTL)() ? import_icons.undo : import_icons.redo,
43
+ label: (0, import_i18n.__)("Undo"),
44
+ shortcut: import_keycodes.displayShortcut.primary("z"),
45
+ "aria-disabled": !hasUndo,
46
+ onClick: hasUndo ? undo : void 0,
47
+ size: "compact"
48
+ }
49
+ );
38
50
  }
39
- var _default = exports.default = (0, _element.forwardRef)(UndoButton);
40
- //# sourceMappingURL=undo.js.map
51
+ var undo_default = (0, import_element.forwardRef)(UndoButton);
52
+ //# sourceMappingURL=undo.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_i18n","require","_components","_data","_icons","_keycodes","_coreData","_element","_jsxRuntime","UndoButton","props","ref","hasUndo","useSelect","select","coreStore","undo","useDispatch","jsx","Button","icon","isRTL","undoIcon","redoIcon","label","__","shortcut","displayShortcut","primary","onClick","undefined","size","_default","exports","default","forwardRef"],"sources":["@wordpress/edit-widgets/src/components/header/undo-redo/undo.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { undo as undoIcon, redo as redoIcon } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { forwardRef } from '@wordpress/element';\n\nfunction UndoButton( props, ref ) {\n\tconst hasUndo = useSelect(\n\t\t( select ) => select( coreStore ).hasUndo(),\n\t\t[]\n\t);\n\tconst { undo } = useDispatch( coreStore );\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? undoIcon : redoIcon }\n\t\t\tlabel={ __( 'Undo' ) }\n\t\t\tshortcut={ displayShortcut.primary( 'z' ) }\n\t\t\t// If there are no undo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasUndo }\n\t\t\tonClick={ hasUndo ? undo : undefined }\n\t\t\tsize=\"compact\"\n\t\t/>\n\t);\n}\n\nexport default forwardRef( UndoButton );\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAAgD,IAAAO,WAAA,GAAAP,OAAA;AAThD;AACA;AACA;;AASA,SAASQ,UAAUA,CAAEC,KAAK,EAAEC,GAAG,EAAG;EACjC,MAAMC,OAAO,GAAG,IAAAC,eAAS,EACtBC,MAAM,IAAMA,MAAM,CAAEC,eAAU,CAAC,CAACH,OAAO,CAAC,CAAC,EAC3C,EACD,CAAC;EACD,MAAM;IAAEI;EAAK,CAAC,GAAG,IAAAC,iBAAW,EAAEF,eAAU,CAAC;EACzC,oBACC,IAAAP,WAAA,CAAAU,GAAA,EAAChB,WAAA,CAAAiB,MAAM;IAAA,GACDT,KAAK;IACVC,GAAG,EAAGA,GAAK;IACXS,IAAI,EAAG,CAAE,IAAAC,WAAK,EAAC,CAAC,GAAGC,WAAQ,GAAGC,WAAU;IACxCC,KAAK,EAAG,IAAAC,QAAE,EAAE,MAAO,CAAG;IACtBC,QAAQ,EAAGC,yBAAe,CAACC,OAAO,CAAE,GAAI;IACxC;IACA;IACA;IAAA;IACA,iBAAgB,CAAEhB,OAAS;IAC3BiB,OAAO,EAAGjB,OAAO,GAAGI,IAAI,GAAGc,SAAW;IACtCC,IAAI,EAAC;EAAS,CACd,CAAC;AAEJ;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,mBAAU,EAAE1B,UAAW,CAAC","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/components/header/undo-redo/undo.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { undo as undoIcon, redo as redoIcon } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { forwardRef } from '@wordpress/element';\n\nfunction UndoButton( props, ref ) {\n\tconst hasUndo = useSelect(\n\t\t( select ) => select( coreStore ).hasUndo(),\n\t\t[]\n\t);\n\tconst { undo } = useDispatch( coreStore );\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? undoIcon : redoIcon }\n\t\t\tlabel={ __( 'Undo' ) }\n\t\t\tshortcut={ displayShortcut.primary( 'z' ) }\n\t\t\t// If there are no undo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasUndo }\n\t\t\tonClick={ hasUndo ? undo : undefined }\n\t\t\tsize=\"compact\"\n\t\t/>\n\t);\n}\n\nexport default forwardRef( UndoButton );\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBE;AAfF,kBAA0B;AAC1B,wBAAuB;AACvB,kBAAuC;AACvC,mBAAmD;AACnD,sBAAgC;AAChC,uBAAmC;AACnC,qBAA2B;AAE3B,SAAS,WAAY,OAAO,KAAM;AACjC,QAAM,cAAU;AAAA,IACf,CAAE,WAAY,OAAQ,iBAAAA,KAAU,EAAE,QAAQ;AAAA,IAC1C,CAAC;AAAA,EACF;AACA,QAAM,EAAE,KAAK,QAAI,yBAAa,iBAAAA,KAAU;AACxC,SACC;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACL;AAAA,MACA,MAAO,KAAE,mBAAM,IAAI,aAAAC,OAAW,aAAAC;AAAA,MAC9B,WAAQ,gBAAI,MAAO;AAAA,MACnB,UAAW,gCAAgB,QAAS,GAAI;AAAA,MAIxC,iBAAgB,CAAE;AAAA,MAClB,SAAU,UAAU,OAAO;AAAA,MAC3B,MAAK;AAAA;AAAA,EACN;AAEF;AAEA,IAAO,mBAAQ,2BAAY,UAAW;",
6
+ "names": ["coreStore", "undoIcon", "redoIcon"]
7
+ }
@@ -1,82 +1,85 @@
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 config_exports = {};
19
+ __export(config_exports, {
20
+ textFormattingShortcuts: () => textFormattingShortcuts
5
21
  });
6
- exports.textFormattingShortcuts = void 0;
7
- var _i18n = require("@wordpress/i18n");
8
- /**
9
- * WordPress dependencies
10
- */
11
-
12
- const textFormattingShortcuts = exports.textFormattingShortcuts = [{
13
- keyCombination: {
14
- modifier: 'primary',
15
- character: 'b'
22
+ module.exports = __toCommonJS(config_exports);
23
+ var import_i18n = require("@wordpress/i18n");
24
+ const textFormattingShortcuts = [
25
+ {
26
+ keyCombination: { modifier: "primary", character: "b" },
27
+ description: (0, import_i18n.__)("Make the selected text bold.")
16
28
  },
17
- description: (0, _i18n.__)('Make the selected text bold.')
18
- }, {
19
- keyCombination: {
20
- modifier: 'primary',
21
- character: 'i'
29
+ {
30
+ keyCombination: { modifier: "primary", character: "i" },
31
+ description: (0, import_i18n.__)("Make the selected text italic.")
22
32
  },
23
- description: (0, _i18n.__)('Make the selected text italic.')
24
- }, {
25
- keyCombination: {
26
- modifier: 'primary',
27
- character: 'k'
33
+ {
34
+ keyCombination: { modifier: "primary", character: "k" },
35
+ description: (0, import_i18n.__)("Convert the selected text into a link.")
28
36
  },
29
- description: (0, _i18n.__)('Convert the selected text into a link.')
30
- }, {
31
- keyCombination: {
32
- modifier: 'primaryShift',
33
- character: 'k'
37
+ {
38
+ keyCombination: { modifier: "primaryShift", character: "k" },
39
+ description: (0, import_i18n.__)("Remove a link.")
34
40
  },
35
- description: (0, _i18n.__)('Remove a link.')
36
- }, {
37
- keyCombination: {
38
- character: '[['
41
+ {
42
+ keyCombination: { character: "[[" },
43
+ description: (0, import_i18n.__)("Insert a link to a post or page.")
39
44
  },
40
- description: (0, _i18n.__)('Insert a link to a post or page.')
41
- }, {
42
- keyCombination: {
43
- modifier: 'primary',
44
- character: 'u'
45
+ {
46
+ keyCombination: { modifier: "primary", character: "u" },
47
+ description: (0, import_i18n.__)("Underline the selected text.")
45
48
  },
46
- description: (0, _i18n.__)('Underline the selected text.')
47
- }, {
48
- keyCombination: {
49
- modifier: 'access',
50
- character: 'd'
49
+ {
50
+ keyCombination: { modifier: "access", character: "d" },
51
+ description: (0, import_i18n.__)("Strikethrough the selected text.")
51
52
  },
52
- description: (0, _i18n.__)('Strikethrough the selected text.')
53
- }, {
54
- keyCombination: {
55
- modifier: 'access',
56
- character: 'x'
53
+ {
54
+ keyCombination: { modifier: "access", character: "x" },
55
+ description: (0, import_i18n.__)("Make the selected text inline code.")
57
56
  },
58
- description: (0, _i18n.__)('Make the selected text inline code.')
59
- }, {
60
- keyCombination: {
61
- modifier: 'access',
62
- character: '0'
57
+ {
58
+ keyCombination: {
59
+ modifier: "access",
60
+ character: "0"
61
+ },
62
+ aliases: [
63
+ {
64
+ modifier: "access",
65
+ character: "7"
66
+ }
67
+ ],
68
+ description: (0, import_i18n.__)("Convert the current heading to a paragraph.")
63
69
  },
64
- aliases: [{
65
- modifier: 'access',
66
- character: '7'
67
- }],
68
- description: (0, _i18n.__)('Convert the current heading to a paragraph.')
69
- }, {
70
- keyCombination: {
71
- modifier: 'access',
72
- character: '1-6'
70
+ {
71
+ keyCombination: { modifier: "access", character: "1-6" },
72
+ description: (0, import_i18n.__)(
73
+ "Convert the current paragraph or heading to a heading of level 1 to 6."
74
+ )
73
75
  },
74
- description: (0, _i18n.__)('Convert the current paragraph or heading to a heading of level 1 to 6.')
75
- }, {
76
- keyCombination: {
77
- modifier: 'primaryShift',
78
- character: 'SPACE'
79
- },
80
- description: (0, _i18n.__)('Add non breaking space.')
81
- }];
82
- //# sourceMappingURL=config.js.map
76
+ {
77
+ keyCombination: { modifier: "primaryShift", character: "SPACE" },
78
+ description: (0, import_i18n.__)("Add non breaking space.")
79
+ }
80
+ ];
81
+ // Annotate the CommonJS export names for ESM import in node:
82
+ 0 && (module.exports = {
83
+ textFormattingShortcuts
84
+ });
85
+ //# sourceMappingURL=config.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_i18n","require","textFormattingShortcuts","exports","keyCombination","modifier","character","description","__","aliases"],"sources":["@wordpress/edit-widgets/src/components/keyboard-shortcut-help-modal/config.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const textFormattingShortcuts = [\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'b' },\n\t\tdescription: __( 'Make the selected text bold.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'i' },\n\t\tdescription: __( 'Make the selected text italic.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'k' },\n\t\tdescription: __( 'Convert the selected text into a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'k' },\n\t\tdescription: __( 'Remove a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { character: '[[' },\n\t\tdescription: __( 'Insert a link to a post or page.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'u' },\n\t\tdescription: __( 'Underline the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'd' },\n\t\tdescription: __( 'Strikethrough the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'x' },\n\t\tdescription: __( 'Make the selected text inline code.' ),\n\t},\n\t{\n\t\tkeyCombination: {\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: '0',\n\t\t},\n\t\taliases: [\n\t\t\t{\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: '7',\n\t\t\t},\n\t\t],\n\t\tdescription: __( 'Convert the current heading to a paragraph.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '1-6' },\n\t\tdescription: __(\n\t\t\t'Convert the current paragraph or heading to a heading of level 1 to 6.'\n\t\t),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'SPACE' },\n\t\tdescription: __( 'Add non breaking space.' ),\n\t},\n];\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,CACtC;EACCE,cAAc,EAAE;IAAEC,QAAQ,EAAE,SAAS;IAAEC,SAAS,EAAE;EAAI,CAAC;EACvDC,WAAW,EAAE,IAAAC,QAAE,EAAE,8BAA+B;AACjD,CAAC,EACD;EACCJ,cAAc,EAAE;IAAEC,QAAQ,EAAE,SAAS;IAAEC,SAAS,EAAE;EAAI,CAAC;EACvDC,WAAW,EAAE,IAAAC,QAAE,EAAE,gCAAiC;AACnD,CAAC,EACD;EACCJ,cAAc,EAAE;IAAEC,QAAQ,EAAE,SAAS;IAAEC,SAAS,EAAE;EAAI,CAAC;EACvDC,WAAW,EAAE,IAAAC,QAAE,EAAE,wCAAyC;AAC3D,CAAC,EACD;EACCJ,cAAc,EAAE;IAAEC,QAAQ,EAAE,cAAc;IAAEC,SAAS,EAAE;EAAI,CAAC;EAC5DC,WAAW,EAAE,IAAAC,QAAE,EAAE,gBAAiB;AACnC,CAAC,EACD;EACCJ,cAAc,EAAE;IAAEE,SAAS,EAAE;EAAK,CAAC;EACnCC,WAAW,EAAE,IAAAC,QAAE,EAAE,kCAAmC;AACrD,CAAC,EACD;EACCJ,cAAc,EAAE;IAAEC,QAAQ,EAAE,SAAS;IAAEC,SAAS,EAAE;EAAI,CAAC;EACvDC,WAAW,EAAE,IAAAC,QAAE,EAAE,8BAA+B;AACjD,CAAC,EACD;EACCJ,cAAc,EAAE;IAAEC,QAAQ,EAAE,QAAQ;IAAEC,SAAS,EAAE;EAAI,CAAC;EACtDC,WAAW,EAAE,IAAAC,QAAE,EAAE,kCAAmC;AACrD,CAAC,EACD;EACCJ,cAAc,EAAE;IAAEC,QAAQ,EAAE,QAAQ;IAAEC,SAAS,EAAE;EAAI,CAAC;EACtDC,WAAW,EAAE,IAAAC,QAAE,EAAE,qCAAsC;AACxD,CAAC,EACD;EACCJ,cAAc,EAAE;IACfC,QAAQ,EAAE,QAAQ;IAClBC,SAAS,EAAE;EACZ,CAAC;EACDG,OAAO,EAAE,CACR;IACCJ,QAAQ,EAAE,QAAQ;IAClBC,SAAS,EAAE;EACZ,CAAC,CACD;EACDC,WAAW,EAAE,IAAAC,QAAE,EAAE,6CAA8C;AAChE,CAAC,EACD;EACCJ,cAAc,EAAE;IAAEC,QAAQ,EAAE,QAAQ;IAAEC,SAAS,EAAE;EAAM,CAAC;EACxDC,WAAW,EAAE,IAAAC,QAAE,EACd,wEACD;AACD,CAAC,EACD;EACCJ,cAAc,EAAE;IAAEC,QAAQ,EAAE,cAAc;IAAEC,SAAS,EAAE;EAAQ,CAAC;EAChEC,WAAW,EAAE,IAAAC,QAAE,EAAE,yBAA0B;AAC5C,CAAC,CACD","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/keyboard-shortcut-help-modal/config.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const textFormattingShortcuts = [\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'b' },\n\t\tdescription: __( 'Make the selected text bold.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'i' },\n\t\tdescription: __( 'Make the selected text italic.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'k' },\n\t\tdescription: __( 'Convert the selected text into a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'k' },\n\t\tdescription: __( 'Remove a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { character: '[[' },\n\t\tdescription: __( 'Insert a link to a post or page.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'u' },\n\t\tdescription: __( 'Underline the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'd' },\n\t\tdescription: __( 'Strikethrough the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'x' },\n\t\tdescription: __( 'Make the selected text inline code.' ),\n\t},\n\t{\n\t\tkeyCombination: {\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: '0',\n\t\t},\n\t\taliases: [\n\t\t\t{\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: '7',\n\t\t\t},\n\t\t],\n\t\tdescription: __( 'Convert the current heading to a paragraph.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '1-6' },\n\t\tdescription: __(\n\t\t\t'Convert the current paragraph or heading to a heading of level 1 to 6.'\n\t\t),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'SPACE' },\n\t\tdescription: __( 'Add non breaking space.' ),\n\t},\n];\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AAEZ,MAAM,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,49 +1,66 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
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 dynamic_shortcut_exports = {};
29
+ __export(dynamic_shortcut_exports, {
30
+ default: () => dynamic_shortcut_default
6
31
  });
7
- exports.default = void 0;
8
- var _data = require("@wordpress/data");
9
- var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
10
- var _shortcut = _interopRequireDefault(require("./shortcut"));
11
- var _jsxRuntime = require("react/jsx-runtime");
12
- /**
13
- * WordPress dependencies
14
- */
15
-
16
- /**
17
- * Internal dependencies
18
- */
19
-
20
- function DynamicShortcut({
21
- name
22
- }) {
23
- const {
24
- keyCombination,
25
- description,
26
- aliases
27
- } = (0, _data.useSelect)(select => {
28
- const {
29
- getShortcutKeyCombination,
30
- getShortcutDescription,
31
- getShortcutAliases
32
- } = select(_keyboardShortcuts.store);
33
- return {
34
- keyCombination: getShortcutKeyCombination(name),
35
- aliases: getShortcutAliases(name),
36
- description: getShortcutDescription(name)
37
- };
38
- }, [name]);
32
+ module.exports = __toCommonJS(dynamic_shortcut_exports);
33
+ var import_jsx_runtime = require("react/jsx-runtime");
34
+ var import_data = require("@wordpress/data");
35
+ var import_keyboard_shortcuts = require("@wordpress/keyboard-shortcuts");
36
+ var import_shortcut = __toESM(require("./shortcut"));
37
+ function DynamicShortcut({ name }) {
38
+ const { keyCombination, description, aliases } = (0, import_data.useSelect)(
39
+ (select) => {
40
+ const {
41
+ getShortcutKeyCombination,
42
+ getShortcutDescription,
43
+ getShortcutAliases
44
+ } = select(import_keyboard_shortcuts.store);
45
+ return {
46
+ keyCombination: getShortcutKeyCombination(name),
47
+ aliases: getShortcutAliases(name),
48
+ description: getShortcutDescription(name)
49
+ };
50
+ },
51
+ [name]
52
+ );
39
53
  if (!keyCombination) {
40
54
  return null;
41
55
  }
42
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_shortcut.default, {
43
- keyCombination: keyCombination,
44
- description: description,
45
- aliases: aliases
46
- });
56
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
57
+ import_shortcut.default,
58
+ {
59
+ keyCombination,
60
+ description,
61
+ aliases
62
+ }
63
+ );
47
64
  }
48
- var _default = exports.default = DynamicShortcut;
49
- //# sourceMappingURL=dynamic-shortcut.js.map
65
+ var dynamic_shortcut_default = DynamicShortcut;
66
+ //# sourceMappingURL=dynamic-shortcut.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_data","require","_keyboardShortcuts","_shortcut","_interopRequireDefault","_jsxRuntime","DynamicShortcut","name","keyCombination","description","aliases","useSelect","select","getShortcutKeyCombination","getShortcutDescription","getShortcutAliases","keyboardShortcutsStore","jsx","default","_default","exports"],"sources":["@wordpress/edit-widgets/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AAKA,IAAAE,SAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAkC,IAAAI,WAAA,GAAAJ,OAAA;AATlC;AACA;AACA;;AAIA;AACA;AACA;;AAGA,SAASK,eAAeA,CAAE;EAAEC;AAAK,CAAC,EAAG;EACpC,MAAM;IAAEC,cAAc;IAAEC,WAAW;IAAEC;EAAQ,CAAC,GAAG,IAAAC,eAAS,EACvDC,MAAM,IAAM;IACb,MAAM;MACLC,yBAAyB;MACzBC,sBAAsB;MACtBC;IACD,CAAC,GAAGH,MAAM,CAAEI,wBAAuB,CAAC;IAEpC,OAAO;MACNR,cAAc,EAAEK,yBAAyB,CAAEN,IAAK,CAAC;MACjDG,OAAO,EAAEK,kBAAkB,CAAER,IAAK,CAAC;MACnCE,WAAW,EAAEK,sBAAsB,CAAEP,IAAK;IAC3C,CAAC;EACF,CAAC,EACD,CAAEA,IAAI,CACP,CAAC;EAED,IAAK,CAAEC,cAAc,EAAG;IACvB,OAAO,IAAI;EACZ;EAEA,oBACC,IAAAH,WAAA,CAAAY,GAAA,EAACd,SAAA,CAAAe,OAAQ;IACRV,cAAc,EAAGA,cAAgB;IACjCC,WAAW,EAAGA,WAAa;IAC3BC,OAAO,EAAGA;EAAS,CACnB,CAAC;AAEJ;AAAC,IAAAS,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAEcZ,eAAe","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkCE;AA/BF,kBAA0B;AAC1B,gCAAgD;AAKhD,sBAAqB;AAErB,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
+ }