@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,55 +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 inserter_exports = {};
19
+ __export(inserter_exports, {
20
+ default: () => inserter_default
5
21
  });
6
- exports.default = void 0;
7
- var _i18n = require("@wordpress/i18n");
8
- var _blockEditor = require("@wordpress/block-editor");
9
- var _components = require("@wordpress/components");
10
- var _compose = require("@wordpress/compose");
11
- var _data = require("@wordpress/data");
12
- var _icons = require("@wordpress/icons");
13
- var _store = require("../../store");
14
- var _jsxRuntime = require("react/jsx-runtime");
15
- /**
16
- * WordPress dependencies
17
- */
18
-
19
- /**
20
- * Internal dependencies
21
- */
22
-
23
- function Inserter({
24
- setIsOpened
25
- }) {
26
- const inserterTitleId = (0, _compose.useInstanceId)(Inserter, 'customize-widget-layout__inserter-panel-title');
27
- const insertionPoint = (0, _data.useSelect)(select => select(_store.store).__experimentalGetInsertionPoint(), []);
28
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
29
- className: "customize-widgets-layout__inserter-panel",
30
- "aria-labelledby": inserterTitleId,
31
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
32
- className: "customize-widgets-layout__inserter-panel-header",
33
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h2", {
34
- id: inserterTitleId,
35
- className: "customize-widgets-layout__inserter-panel-header-title",
36
- children: (0, _i18n.__)('Add a block')
37
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
38
- size: "small",
39
- icon: _icons.closeSmall,
40
- onClick: () => setIsOpened(false),
41
- "aria-label": (0, _i18n.__)('Close inserter')
42
- })]
43
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
44
- className: "customize-widgets-layout__inserter-panel-content",
45
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.__experimentalLibrary, {
46
- rootClientId: insertionPoint.rootClientId,
47
- __experimentalInsertionIndex: insertionPoint.insertionIndex,
48
- showInserterHelpPanel: true,
49
- onSelect: () => setIsOpened(false)
50
- })
51
- })]
52
- });
22
+ module.exports = __toCommonJS(inserter_exports);
23
+ var import_jsx_runtime = require("react/jsx-runtime");
24
+ var import_i18n = require("@wordpress/i18n");
25
+ var import_block_editor = require("@wordpress/block-editor");
26
+ var import_components = require("@wordpress/components");
27
+ var import_compose = require("@wordpress/compose");
28
+ var import_data = require("@wordpress/data");
29
+ var import_icons = require("@wordpress/icons");
30
+ var import_store = require("../../store");
31
+ function Inserter({ setIsOpened }) {
32
+ const inserterTitleId = (0, import_compose.useInstanceId)(
33
+ Inserter,
34
+ "customize-widget-layout__inserter-panel-title"
35
+ );
36
+ const insertionPoint = (0, import_data.useSelect)(
37
+ (select) => select(import_store.store).__experimentalGetInsertionPoint(),
38
+ []
39
+ );
40
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
41
+ "div",
42
+ {
43
+ className: "customize-widgets-layout__inserter-panel",
44
+ "aria-labelledby": inserterTitleId,
45
+ children: [
46
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "customize-widgets-layout__inserter-panel-header", children: [
47
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
48
+ "h2",
49
+ {
50
+ id: inserterTitleId,
51
+ className: "customize-widgets-layout__inserter-panel-header-title",
52
+ children: (0, import_i18n.__)("Add a block")
53
+ }
54
+ ),
55
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
56
+ import_components.Button,
57
+ {
58
+ size: "small",
59
+ icon: import_icons.closeSmall,
60
+ onClick: () => setIsOpened(false),
61
+ "aria-label": (0, import_i18n.__)("Close inserter")
62
+ }
63
+ )
64
+ ] }),
65
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "customize-widgets-layout__inserter-panel-content", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
66
+ import_block_editor.__experimentalLibrary,
67
+ {
68
+ rootClientId: insertionPoint.rootClientId,
69
+ __experimentalInsertionIndex: insertionPoint.insertionIndex,
70
+ showInserterHelpPanel: true,
71
+ onSelect: () => setIsOpened(false)
72
+ }
73
+ ) })
74
+ ]
75
+ }
76
+ );
53
77
  }
54
- var _default = exports.default = Inserter;
55
- //# sourceMappingURL=index.js.map
78
+ var inserter_default = Inserter;
79
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_i18n","require","_blockEditor","_components","_compose","_data","_icons","_store","_jsxRuntime","Inserter","setIsOpened","inserterTitleId","useInstanceId","insertionPoint","useSelect","select","customizeWidgetsStore","__experimentalGetInsertionPoint","jsxs","className","children","jsx","id","__","Button","size","icon","closeSmall","onClick","__experimentalLibrary","rootClientId","__experimentalInsertionIndex","insertionIndex","showInserterHelpPanel","onSelect","_default","exports","default"],"sources":["@wordpress/customize-widgets/src/components/inserter/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalLibrary as Library } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { store as customizeWidgetsStore } from '../../store';\n\nfunction Inserter( { setIsOpened } ) {\n\tconst inserterTitleId = useInstanceId(\n\t\tInserter,\n\t\t'customize-widget-layout__inserter-panel-title'\n\t);\n\tconst insertionPoint = useSelect(\n\t\t( select ) =>\n\t\t\tselect( customizeWidgetsStore ).__experimentalGetInsertionPoint(),\n\t\t[]\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"customize-widgets-layout__inserter-panel\"\n\t\t\taria-labelledby={ inserterTitleId }\n\t\t>\n\t\t\t<div className=\"customize-widgets-layout__inserter-panel-header\">\n\t\t\t\t<h2\n\t\t\t\t\tid={ inserterTitleId }\n\t\t\t\t\tclassName=\"customize-widgets-layout__inserter-panel-header-title\"\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Add a block' ) }\n\t\t\t\t</h2>\n\t\t\t\t<Button\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\tonClick={ () => setIsOpened( false ) }\n\t\t\t\t\taria-label={ __( 'Close inserter' ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div className=\"customize-widgets-layout__inserter-panel-content\">\n\t\t\t\t<Library\n\t\t\t\t\trootClientId={ insertionPoint.rootClientId }\n\t\t\t\t\t__experimentalInsertionIndex={\n\t\t\t\t\t\tinsertionPoint.insertionIndex\n\t\t\t\t\t}\n\t\t\t\t\tshowInserterHelpPanel\n\t\t\t\t\tonSelect={ () => setIsOpened( false ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport default Inserter;\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAKA,IAAAM,MAAA,GAAAN,OAAA;AAA6D,IAAAO,WAAA,GAAAP,OAAA;AAb7D;AACA;AACA;;AAQA;AACA;AACA;;AAGA,SAASQ,QAAQA,CAAE;EAAEC;AAAY,CAAC,EAAG;EACpC,MAAMC,eAAe,GAAG,IAAAC,sBAAa,EACpCH,QAAQ,EACR,+CACD,CAAC;EACD,MAAMI,cAAc,GAAG,IAAAC,eAAS,EAC7BC,MAAM,IACPA,MAAM,CAAEC,YAAsB,CAAC,CAACC,+BAA+B,CAAC,CAAC,EAClE,EACD,CAAC;EAED,oBACC,IAAAT,WAAA,CAAAU,IAAA;IACCC,SAAS,EAAC,0CAA0C;IACpD,mBAAkBR,eAAiB;IAAAS,QAAA,gBAEnC,IAAAZ,WAAA,CAAAU,IAAA;MAAKC,SAAS,EAAC,iDAAiD;MAAAC,QAAA,gBAC/D,IAAAZ,WAAA,CAAAa,GAAA;QACCC,EAAE,EAAGX,eAAiB;QACtBQ,SAAS,EAAC,uDAAuD;QAAAC,QAAA,EAE/D,IAAAG,QAAE,EAAE,aAAc;MAAC,CAClB,CAAC,eACL,IAAAf,WAAA,CAAAa,GAAA,EAAClB,WAAA,CAAAqB,MAAM;QACNC,IAAI,EAAC,OAAO;QACZC,IAAI,EAAGC,iBAAY;QACnBC,OAAO,EAAGA,CAAA,KAAMlB,WAAW,CAAE,KAAM,CAAG;QACtC,cAAa,IAAAa,QAAE,EAAE,gBAAiB;MAAG,CACrC,CAAC;IAAA,CACE,CAAC,eACN,IAAAf,WAAA,CAAAa,GAAA;MAAKF,SAAS,EAAC,kDAAkD;MAAAC,QAAA,eAChE,IAAAZ,WAAA,CAAAa,GAAA,EAACnB,YAAA,CAAA2B,qBAAO;QACPC,YAAY,EAAGjB,cAAc,CAACiB,YAAc;QAC5CC,4BAA4B,EAC3BlB,cAAc,CAACmB,cACf;QACDC,qBAAqB;QACrBC,QAAQ,EAAGA,CAAA,KAAMxB,WAAW,CAAE,KAAM;MAAG,CACvC;IAAC,CACE,CAAC;EAAA,CACF,CAAC;AAER;AAAC,IAAAyB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc5B,QAAQ","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/inserter/index.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalLibrary as Library } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { store as customizeWidgetsStore } from '../../store';\n\nfunction Inserter( { setIsOpened } ) {\n\tconst inserterTitleId = useInstanceId(\n\t\tInserter,\n\t\t'customize-widget-layout__inserter-panel-title'\n\t);\n\tconst insertionPoint = useSelect(\n\t\t( select ) =>\n\t\t\tselect( customizeWidgetsStore ).__experimentalGetInsertionPoint(),\n\t\t[]\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"customize-widgets-layout__inserter-panel\"\n\t\t\taria-labelledby={ inserterTitleId }\n\t\t>\n\t\t\t<div className=\"customize-widgets-layout__inserter-panel-header\">\n\t\t\t\t<h2\n\t\t\t\t\tid={ inserterTitleId }\n\t\t\t\t\tclassName=\"customize-widgets-layout__inserter-panel-header-title\"\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Add a block' ) }\n\t\t\t\t</h2>\n\t\t\t\t<Button\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\tonClick={ () => setIsOpened( false ) }\n\t\t\t\t\taria-label={ __( 'Close inserter' ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div className=\"customize-widgets-layout__inserter-panel-content\">\n\t\t\t\t<Library\n\t\t\t\t\trootClientId={ insertionPoint.rootClientId }\n\t\t\t\t\t__experimentalInsertionIndex={\n\t\t\t\t\t\tinsertionPoint.insertionIndex\n\t\t\t\t\t}\n\t\t\t\t\tshowInserterHelpPanel\n\t\t\t\t\tonSelect={ () => setIsOpened( false ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport default Inserter;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BG;AA5BH,kBAAmB;AACnB,0BAAiD;AACjD,wBAAuB;AACvB,qBAA8B;AAC9B,kBAA0B;AAC1B,mBAA2B;AAK3B,mBAA+C;AAE/C,SAAS,SAAU,EAAE,YAAY,GAAI;AACpC,QAAM,sBAAkB;AAAA,IACvB;AAAA,IACA;AAAA,EACD;AACA,QAAM,qBAAiB;AAAA,IACtB,CAAE,WACD,OAAQ,aAAAA,KAAsB,EAAE,gCAAgC;AAAA,IACjE,CAAC;AAAA,EACF;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,mBAAkB;AAAA,MAElB;AAAA,qDAAC,SAAI,WAAU,mDACd;AAAA;AAAA,YAAC;AAAA;AAAA,cACA,IAAK;AAAA,cACL,WAAU;AAAA,cAER,8BAAI,aAAc;AAAA;AAAA,UACrB;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACA,MAAK;AAAA,cACL,MAAO;AAAA,cACP,SAAU,MAAM,YAAa,KAAM;AAAA,cACnC,kBAAa,gBAAI,gBAAiB;AAAA;AAAA,UACnC;AAAA,WACD;AAAA,QACA,4CAAC,SAAI,WAAU,oDACd;AAAA,UAAC,oBAAAC;AAAA,UAAA;AAAA,YACA,cAAe,eAAe;AAAA,YAC9B,8BACC,eAAe;AAAA,YAEhB,uBAAqB;AAAA,YACrB,UAAW,MAAM,YAAa,KAAM;AAAA;AAAA,QACrC,GACD;AAAA;AAAA;AAAA,EACD;AAEF;AAEA,IAAO,mBAAQ;",
6
+ "names": ["customizeWidgetsStore", "Library"]
7
+ }
@@ -1,38 +1,55 @@
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 use_inserter_exports = {};
19
+ __export(use_inserter_exports, {
20
+ default: () => useInserter
5
21
  });
6
- exports.default = useInserter;
7
- var _element = require("@wordpress/element");
8
- var _data = require("@wordpress/data");
9
- var _store = require("../../store");
10
- /**
11
- * WordPress dependencies
12
- */
13
-
14
- /**
15
- * Internal dependencies
16
- */
17
-
22
+ module.exports = __toCommonJS(use_inserter_exports);
23
+ var import_element = require("@wordpress/element");
24
+ var import_data = require("@wordpress/data");
25
+ var import_store = require("../../store");
18
26
  function useInserter(inserter) {
19
- const isInserterOpened = (0, _data.useSelect)(select => select(_store.store).isInserterOpened(), []);
20
- const {
21
- setIsInserterOpened
22
- } = (0, _data.useDispatch)(_store.store);
23
- (0, _element.useEffect)(() => {
27
+ const isInserterOpened = (0, import_data.useSelect)(
28
+ (select) => select(import_store.store).isInserterOpened(),
29
+ []
30
+ );
31
+ const { setIsInserterOpened } = (0, import_data.useDispatch)(import_store.store);
32
+ (0, import_element.useEffect)(() => {
24
33
  if (isInserterOpened) {
25
34
  inserter.open();
26
35
  } else {
27
36
  inserter.close();
28
37
  }
29
38
  }, [inserter, isInserterOpened]);
30
- return [isInserterOpened, (0, _element.useCallback)(updater => {
31
- let isOpen = updater;
32
- if (typeof updater === 'function') {
33
- isOpen = updater((0, _data.select)(_store.store).isInserterOpened());
34
- }
35
- setIsInserterOpened(isOpen);
36
- }, [setIsInserterOpened])];
39
+ return [
40
+ isInserterOpened,
41
+ (0, import_element.useCallback)(
42
+ (updater) => {
43
+ let isOpen = updater;
44
+ if (typeof updater === "function") {
45
+ isOpen = updater(
46
+ (0, import_data.select)(import_store.store).isInserterOpened()
47
+ );
48
+ }
49
+ setIsInserterOpened(isOpen);
50
+ },
51
+ [setIsInserterOpened]
52
+ )
53
+ ];
37
54
  }
38
- //# sourceMappingURL=use-inserter.js.map
55
+ //# sourceMappingURL=use-inserter.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_element","require","_data","_store","useInserter","inserter","isInserterOpened","useSelect","select","customizeWidgetsStore","setIsInserterOpened","useDispatch","useEffect","open","close","useCallback","updater","isOpen","selectStore"],"sources":["@wordpress/customize-widgets/src/components/inserter/use-inserter.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect, useCallback } from '@wordpress/element';\nimport { useSelect, useDispatch, select as selectStore } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as customizeWidgetsStore } from '../../store';\n\nexport default function useInserter( inserter ) {\n\tconst isInserterOpened = useSelect(\n\t\t( select ) => select( customizeWidgetsStore ).isInserterOpened(),\n\t\t[]\n\t);\n\tconst { setIsInserterOpened } = useDispatch( customizeWidgetsStore );\n\n\tuseEffect( () => {\n\t\tif ( isInserterOpened ) {\n\t\t\tinserter.open();\n\t\t} else {\n\t\t\tinserter.close();\n\t\t}\n\t}, [ inserter, isInserterOpened ] );\n\n\treturn [\n\t\tisInserterOpened,\n\t\tuseCallback(\n\t\t\t( updater ) => {\n\t\t\t\tlet isOpen = updater;\n\t\t\t\tif ( typeof updater === 'function' ) {\n\t\t\t\t\tisOpen = updater(\n\t\t\t\t\t\tselectStore( customizeWidgetsStore ).isInserterOpened()\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tsetIsInserterOpened( isOpen );\n\t\t\t},\n\t\t\t[ setIsInserterOpened ]\n\t\t),\n\t];\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGe,SAASG,WAAWA,CAAEC,QAAQ,EAAG;EAC/C,MAAMC,gBAAgB,GAAG,IAAAC,eAAS,EAC/BC,MAAM,IAAMA,MAAM,CAAEC,YAAsB,CAAC,CAACH,gBAAgB,CAAC,CAAC,EAChE,EACD,CAAC;EACD,MAAM;IAAEI;EAAoB,CAAC,GAAG,IAAAC,iBAAW,EAAEF,YAAsB,CAAC;EAEpE,IAAAG,kBAAS,EAAE,MAAM;IAChB,IAAKN,gBAAgB,EAAG;MACvBD,QAAQ,CAACQ,IAAI,CAAC,CAAC;IAChB,CAAC,MAAM;MACNR,QAAQ,CAACS,KAAK,CAAC,CAAC;IACjB;EACD,CAAC,EAAE,CAAET,QAAQ,EAAEC,gBAAgB,CAAG,CAAC;EAEnC,OAAO,CACNA,gBAAgB,EAChB,IAAAS,oBAAW,EACRC,OAAO,IAAM;IACd,IAAIC,MAAM,GAAGD,OAAO;IACpB,IAAK,OAAOA,OAAO,KAAK,UAAU,EAAG;MACpCC,MAAM,GAAGD,OAAO,CACf,IAAAE,YAAW,EAAET,YAAsB,CAAC,CAACH,gBAAgB,CAAC,CACvD,CAAC;IACF;IAEAI,mBAAmB,CAAEO,MAAO,CAAC;EAC9B,CAAC,EACD,CAAEP,mBAAmB,CACtB,CAAC,CACD;AACF","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/inserter/use-inserter.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useEffect, useCallback } from '@wordpress/element';\nimport { useSelect, useDispatch, select as selectStore } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as customizeWidgetsStore } from '../../store';\n\nexport default function useInserter( inserter ) {\n\tconst isInserterOpened = useSelect(\n\t\t( select ) => select( customizeWidgetsStore ).isInserterOpened(),\n\t\t[]\n\t);\n\tconst { setIsInserterOpened } = useDispatch( customizeWidgetsStore );\n\n\tuseEffect( () => {\n\t\tif ( isInserterOpened ) {\n\t\t\tinserter.open();\n\t\t} else {\n\t\t\tinserter.close();\n\t\t}\n\t}, [ inserter, isInserterOpened ] );\n\n\treturn [\n\t\tisInserterOpened,\n\t\tuseCallback(\n\t\t\t( updater ) => {\n\t\t\t\tlet isOpen = updater;\n\t\t\t\tif ( typeof updater === 'function' ) {\n\t\t\t\t\tisOpen = updater(\n\t\t\t\t\t\tselectStore( customizeWidgetsStore ).isInserterOpened()\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tsetIsInserterOpened( isOpen );\n\t\t\t},\n\t\t\t[ setIsInserterOpened ]\n\t\t),\n\t];\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAuC;AACvC,kBAA8D;AAK9D,mBAA+C;AAEhC,SAAR,YAA8B,UAAW;AAC/C,QAAM,uBAAmB;AAAA,IACxB,CAAE,WAAY,OAAQ,aAAAA,KAAsB,EAAE,iBAAiB;AAAA,IAC/D,CAAC;AAAA,EACF;AACA,QAAM,EAAE,oBAAoB,QAAI,yBAAa,aAAAA,KAAsB;AAEnE,gCAAW,MAAM;AAChB,QAAK,kBAAmB;AACvB,eAAS,KAAK;AAAA,IACf,OAAO;AACN,eAAS,MAAM;AAAA,IAChB;AAAA,EACD,GAAG,CAAE,UAAU,gBAAiB,CAAE;AAElC,SAAO;AAAA,IACN;AAAA,QACA;AAAA,MACC,CAAE,YAAa;AACd,YAAI,SAAS;AACb,YAAK,OAAO,YAAY,YAAa;AACpC,mBAAS;AAAA,gBACR,YAAAC,QAAa,aAAAD,KAAsB,EAAE,iBAAiB;AAAA,UACvD;AAAA,QACD;AAEA,4BAAqB,MAAO;AAAA,MAC7B;AAAA,MACA,CAAE,mBAAoB;AAAA,IACvB;AAAA,EACD;AACD;",
6
+ "names": ["customizeWidgetsStore", "selectStore"]
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/customize-widgets/src/components/keyboard-shortcut-help-modal/config.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const textFormattingShortcuts = [\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'b' },\n\t\tdescription: __( 'Make the selected text bold.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'i' },\n\t\tdescription: __( 'Make the selected text italic.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'k' },\n\t\tdescription: __( 'Convert the selected text into a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'k' },\n\t\tdescription: __( 'Remove a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { character: '[[' },\n\t\tdescription: __( 'Insert a link to a post or page.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'u' },\n\t\tdescription: __( 'Underline the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'd' },\n\t\tdescription: __( 'Strikethrough the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'x' },\n\t\tdescription: __( 'Make the selected text inline code.' ),\n\t},\n\t{\n\t\tkeyCombination: {\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: '0',\n\t\t},\n\t\taliases: [\n\t\t\t{\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: '7',\n\t\t\t},\n\t\t],\n\t\tdescription: __( 'Convert the current heading to a paragraph.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '1-6' },\n\t\tdescription: __(\n\t\t\t'Convert the current paragraph or heading to a heading of level 1 to 6.'\n\t\t),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'SPACE' },\n\t\tdescription: __( 'Add non breaking space.' ),\n\t},\n];\n"],"mappings":";;;;;;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/customize-widgets/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n"],"mappings":";;;;;;;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
+ }