@wordpress/customize-widgets 6.1.0 → 6.3.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 (152) hide show
  1. package/build/components/block-appender/index.cjs.map +1 -1
  2. package/build/components/customize-widgets/index.cjs +13 -11
  3. package/build/components/customize-widgets/index.cjs.map +1 -1
  4. package/build/components/customize-widgets/use-clear-selected-block.cjs.map +1 -1
  5. package/build/components/error-boundary/index.cjs +1 -1
  6. package/build/components/error-boundary/index.cjs.map +1 -1
  7. package/build/components/focus-control/index.cjs.map +1 -1
  8. package/build/components/focus-control/use-blocks-focus-control.cjs.map +1 -1
  9. package/build/components/header/index.cjs +23 -16
  10. package/build/components/header/index.cjs.map +1 -1
  11. package/build/components/inserter/use-inserter.cjs.map +1 -1
  12. package/build/components/keyboard-shortcut-help-modal/config.cjs +5 -0
  13. package/build/components/keyboard-shortcut-help-modal/config.cjs.map +1 -1
  14. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs +9 -7
  15. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs.map +1 -1
  16. package/build/components/keyboard-shortcut-help-modal/index.cjs +12 -11
  17. package/build/components/keyboard-shortcut-help-modal/index.cjs.map +1 -1
  18. package/build/components/keyboard-shortcut-help-modal/shortcut.cjs +35 -13
  19. package/build/components/keyboard-shortcut-help-modal/shortcut.cjs.map +1 -1
  20. package/build/components/keyboard-shortcuts/index.cjs.map +1 -1
  21. package/build/components/more-menu/index.cjs +14 -10
  22. package/build/components/more-menu/index.cjs.map +1 -1
  23. package/build/components/sidebar-block-editor/index.cjs +15 -13
  24. package/build/components/sidebar-block-editor/index.cjs.map +1 -1
  25. package/build/components/sidebar-block-editor/sidebar-adapter.cjs.map +1 -1
  26. package/build/components/sidebar-block-editor/sidebar-editor-provider.cjs +10 -8
  27. package/build/components/sidebar-block-editor/sidebar-editor-provider.cjs.map +1 -1
  28. package/build/components/sidebar-block-editor/use-sidebar-block-editor.cjs +9 -7
  29. package/build/components/sidebar-block-editor/use-sidebar-block-editor.cjs.map +1 -1
  30. package/build/controls/inserter-outer-section.cjs +2 -2
  31. package/build/controls/inserter-outer-section.cjs.map +1 -1
  32. package/build/controls/sidebar-control.cjs +10 -8
  33. package/build/controls/sidebar-control.cjs.map +1 -1
  34. package/build/controls/sidebar-section.cjs +8 -6
  35. package/build/controls/sidebar-section.cjs.map +1 -1
  36. package/build/index.cjs +12 -11
  37. package/build/index.cjs.map +1 -1
  38. package/build/store/index.cjs +11 -9
  39. package/build/store/index.cjs.map +1 -1
  40. package/build/utils.cjs.map +1 -1
  41. package/build-module/components/error-boundary/index.mjs +2 -2
  42. package/build-module/components/error-boundary/index.mjs.map +1 -1
  43. package/build-module/components/focus-control/use-blocks-focus-control.mjs.map +1 -1
  44. package/build-module/components/header/index.mjs +12 -7
  45. package/build-module/components/header/index.mjs.map +1 -1
  46. package/build-module/components/keyboard-shortcut-help-modal/config.mjs +5 -0
  47. package/build-module/components/keyboard-shortcut-help-modal/config.mjs.map +1 -1
  48. package/build-module/components/keyboard-shortcut-help-modal/index.mjs +1 -2
  49. package/build-module/components/keyboard-shortcut-help-modal/index.mjs.map +1 -1
  50. package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs +35 -13
  51. package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs.map +1 -1
  52. package/build-module/components/more-menu/index.mjs +6 -4
  53. package/build-module/components/more-menu/index.mjs.map +1 -1
  54. package/build-module/components/sidebar-block-editor/sidebar-adapter.mjs.map +1 -1
  55. package/build-module/controls/inserter-outer-section.mjs +3 -3
  56. package/build-module/controls/inserter-outer-section.mjs.map +1 -1
  57. package/build-module/index.mjs +1 -2
  58. package/build-module/index.mjs.map +1 -1
  59. package/build-module/utils.mjs.map +1 -1
  60. package/build-style/style-rtl.css +44 -25
  61. package/build-style/style.css +44 -25
  62. package/build-types/components/block-appender/index.d.ts +2 -0
  63. package/build-types/components/block-appender/index.d.ts.map +1 -0
  64. package/build-types/components/block-inspector-button/index.d.ts +7 -0
  65. package/build-types/components/block-inspector-button/index.d.ts.map +1 -0
  66. package/build-types/components/customize-widgets/index.d.ts +6 -0
  67. package/build-types/components/customize-widgets/index.d.ts.map +1 -0
  68. package/build-types/components/customize-widgets/use-clear-selected-block.d.ts +18 -0
  69. package/build-types/components/customize-widgets/use-clear-selected-block.d.ts.map +1 -0
  70. package/build-types/components/error-boundary/index.d.ts +14 -0
  71. package/build-types/components/error-boundary/index.d.ts.map +1 -0
  72. package/build-types/components/focus-control/index.d.ts +7 -0
  73. package/build-types/components/focus-control/index.d.ts.map +1 -0
  74. package/build-types/components/focus-control/use-blocks-focus-control.d.ts +2 -0
  75. package/build-types/components/focus-control/use-blocks-focus-control.d.ts.map +1 -0
  76. package/build-types/components/header/index.d.ts +9 -0
  77. package/build-types/components/header/index.d.ts.map +1 -0
  78. package/build-types/components/inserter/index.d.ts +5 -0
  79. package/build-types/components/inserter/index.d.ts.map +1 -0
  80. package/build-types/components/inserter/use-inserter.d.ts +2 -0
  81. package/build-types/components/inserter/use-inserter.d.ts.map +1 -0
  82. package/build-types/components/keyboard-shortcut-help-modal/config.d.ts +3 -0
  83. package/build-types/components/keyboard-shortcut-help-modal/config.d.ts.map +1 -0
  84. package/build-types/components/keyboard-shortcut-help-modal/dynamic-shortcut.d.ts +5 -0
  85. package/build-types/components/keyboard-shortcut-help-modal/dynamic-shortcut.d.ts.map +1 -0
  86. package/build-types/components/keyboard-shortcut-help-modal/index.d.ts +5 -0
  87. package/build-types/components/keyboard-shortcut-help-modal/index.d.ts.map +1 -0
  88. package/build-types/components/keyboard-shortcut-help-modal/shortcut.d.ts +25 -0
  89. package/build-types/components/keyboard-shortcut-help-modal/shortcut.d.ts.map +1 -0
  90. package/build-types/components/keyboard-shortcuts/index.d.ts +11 -0
  91. package/build-types/components/keyboard-shortcuts/index.d.ts.map +1 -0
  92. package/build-types/components/more-menu/index.d.ts +2 -0
  93. package/build-types/components/more-menu/index.d.ts.map +1 -0
  94. package/build-types/components/sidebar-block-editor/index.d.ts +7 -0
  95. package/build-types/components/sidebar-block-editor/index.d.ts.map +1 -0
  96. package/build-types/components/sidebar-block-editor/sidebar-adapter.d.ts +37 -0
  97. package/build-types/components/sidebar-block-editor/sidebar-adapter.d.ts.map +1 -0
  98. package/build-types/components/sidebar-block-editor/sidebar-editor-provider.d.ts +6 -0
  99. package/build-types/components/sidebar-block-editor/sidebar-editor-provider.d.ts.map +1 -0
  100. package/build-types/components/sidebar-block-editor/use-sidebar-block-editor.d.ts +2 -0
  101. package/build-types/components/sidebar-block-editor/use-sidebar-block-editor.d.ts.map +1 -0
  102. package/build-types/components/sidebar-controls/index.d.ts +9 -0
  103. package/build-types/components/sidebar-controls/index.d.ts.map +1 -0
  104. package/build-types/components/welcome-guide/index.d.ts +4 -0
  105. package/build-types/components/welcome-guide/index.d.ts.map +1 -0
  106. package/build-types/controls/inserter-outer-section.d.ts +9 -0
  107. package/build-types/controls/inserter-outer-section.d.ts.map +1 -0
  108. package/build-types/controls/inspector-section.d.ts +17 -0
  109. package/build-types/controls/inspector-section.d.ts.map +1 -0
  110. package/build-types/controls/sidebar-control.d.ts +19 -0
  111. package/build-types/controls/sidebar-control.d.ts.map +1 -0
  112. package/build-types/controls/sidebar-section.d.ts +22 -0
  113. package/build-types/controls/sidebar-section.d.ts.map +1 -0
  114. package/build-types/filters/index.d.ts +4 -0
  115. package/build-types/filters/index.d.ts.map +1 -0
  116. package/build-types/filters/move-to-sidebar.d.ts +2 -0
  117. package/build-types/filters/move-to-sidebar.d.ts.map +1 -0
  118. package/build-types/filters/replace-media-upload.d.ts +2 -0
  119. package/build-types/filters/replace-media-upload.d.ts.map +1 -0
  120. package/build-types/filters/wide-widget-display.d.ts +2 -0
  121. package/build-types/filters/wide-widget-display.d.ts.map +1 -0
  122. package/build-types/index.d.ts +10 -0
  123. package/build-types/index.d.ts.map +1 -0
  124. package/build-types/lock-unlock.d.ts +2 -0
  125. package/build-types/lock-unlock.d.ts.map +1 -0
  126. package/build-types/store/actions.d.ts +39 -0
  127. package/build-types/store/actions.d.ts.map +1 -0
  128. package/build-types/store/constants.d.ts +5 -0
  129. package/build-types/store/constants.d.ts.map +1 -0
  130. package/build-types/store/index.d.ts +9 -0
  131. package/build-types/store/index.d.ts.map +1 -0
  132. package/build-types/store/reducer.d.ts +14 -0
  133. package/build-types/store/reducer.d.ts.map +1 -0
  134. package/build-types/store/selectors.d.ts +35 -0
  135. package/build-types/store/selectors.d.ts.map +1 -0
  136. package/build-types/utils.d.ts +32 -0
  137. package/build-types/utils.d.ts.map +1 -0
  138. package/package.json +28 -28
  139. package/src/components/error-boundary/index.jsx +2 -2
  140. package/src/components/header/index.jsx +1 -1
  141. package/src/components/header/style.scss +27 -13
  142. package/src/components/header/test/index.jsdom.test.tsx +5 -0
  143. package/src/components/inserter/style.scss +14 -4
  144. package/src/components/keyboard-shortcut-help-modal/config.js +3 -0
  145. package/src/components/keyboard-shortcut-help-modal/index.jsx +0 -2
  146. package/src/components/keyboard-shortcut-help-modal/shortcut.jsx +39 -25
  147. package/src/components/keyboard-shortcut-help-modal/style.scss +1 -1
  148. package/src/components/more-menu/index.jsx +3 -8
  149. package/src/components/sidebar-block-editor/style.scss +9 -0
  150. package/src/controls/inserter-outer-section.js +3 -3
  151. package/src/index.jsx +1 -4
  152. package/src/utils.js +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/keyboard-shortcut-help-modal/index.jsx"],"names":[],"mappings":"AA6EA,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAE,EAClD,aAAa,EACb,WAAW,GACX;;;CAAA,sCA2DA"}
@@ -0,0 +1,25 @@
1
+ export type ShortcutKeyCombination = {
2
+ /**
3
+ * Shortcut key.
4
+ */
5
+ character: string;
6
+ /**
7
+ * Optional shortcut modifier.
8
+ */
9
+ modifier?: import('@wordpress/keycodes').WPKeycodeModifier | null;
10
+ };
11
+ /**
12
+ * @param {Object} props Component props.
13
+ * @param {string} props.description Description of the shortcut action.
14
+ * @param {ShortcutKeyCombination} props.keyCombination Primary shortcut.
15
+ * @param {ShortcutKeyCombination[]} [props.aliases] Alternative shortcuts.
16
+ * @param {string} [props.ariaLabel] Custom readable shortcut label.
17
+ */
18
+ declare function Shortcut({ description, keyCombination, aliases, ariaLabel }: {
19
+ description: string;
20
+ keyCombination: ShortcutKeyCombination;
21
+ aliases?: ShortcutKeyCombination[];
22
+ ariaLabel?: string;
23
+ }): import("react").JSX.Element;
24
+ export default Shortcut;
25
+ //# sourceMappingURL=shortcut.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shortcut.d.ts","sourceRoot":"","sources":["../../../src/components/keyboard-shortcut-help-modal/shortcut.jsx"],"names":[],"mappings":"AAKG,YAAkB,sBAAsB,GACxC;;;;IAAmE,SAAS,EAAjE,MAAM,CACjB;;;;IAAoE,QAAQ,AAA5E,CACF,EADa,OAAO,qBAAqB,EAAE,iBAAiB,GAAG,IAAI,CACnE;CAAA,CAAA;AAuCD;;;;;;GAMG;AACH,iBAAS,QAAQ,CAAE,EAAE,WAAW,EAAE,cAAc,EAAE,OAAY,EAAE,SAAS,EAAE,EALxE;IAAwC,WAAW,EAA3C,MAAM,CACd;IAAwC,cAAc,EAA9C,sBAAsB,CAC9B;IAAyC,OAAO,AAAhD,CACA,EADQ,sBAAsB,EAAE,CAChC;IAAyC,SAAS,AAAlD,CACF,EADU,MAAM,CAChB;CAC0E,+BAqB1E;eAEc,QAAQ"}
@@ -0,0 +1,11 @@
1
+ declare function KeyboardShortcuts({ undo, redo, save }: {
2
+ redo: any;
3
+ save: any;
4
+ undo: any;
5
+ }): null;
6
+ declare namespace KeyboardShortcuts {
7
+ export { KeyboardShortcutsRegister as Register };
8
+ }
9
+ declare function KeyboardShortcutsRegister(): null;
10
+ export default KeyboardShortcuts;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/keyboard-shortcuts/index.js"],"names":[],"mappings":"AAaA,iBAAS,iBAAiB,CAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;;;;CAAA,QAuB/C;kBAvBQ,iBAAiB;aAmFG,yBAAyB;;AA1DtD,iBAAS,yBAAyB,SAwDjC;eAGc,iBAAiB"}
@@ -0,0 +1,2 @@
1
+ export default function MoreMenu(): import("react").JSX.Element;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/more-menu/index.jsx"],"names":[],"mappings":"AAcA,MAAM,CAAC,OAAO,UAAU,QAAQ,gCA8G/B"}
@@ -0,0 +1,7 @@
1
+ export default function SidebarBlockEditor({ blockEditorSettings, sidebar, inserter, inspector, }: {
2
+ blockEditorSettings: any;
3
+ inserter: any;
4
+ inspector: any;
5
+ sidebar: any;
6
+ }): import("react").JSX.Element;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar-block-editor/index.jsx"],"names":[],"mappings":"AA0BA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAE,EAC3C,mBAAmB,EACnB,OAAO,EACP,QAAQ,EACR,SAAS,GACT;;;;;CAAA,+BAkHA"}
@@ -0,0 +1,37 @@
1
+ export default class SidebarAdapter {
2
+ setting: any;
3
+ api: any;
4
+ locked: boolean;
5
+ widgetsCache: WeakMap<WeakKey, any>;
6
+ subscribers: Set<any>;
7
+ history: any[];
8
+ historyIndex: number;
9
+ historySubscribers: Set<any>;
10
+ _debounceSetHistory: Function;
11
+ constructor(setting: any, api: any);
12
+ subscribe(callback: any): () => void;
13
+ getWidgets(): any;
14
+ _emit(...args: any[]): void;
15
+ _getWidgetIds(): any;
16
+ _pushHistory(): void;
17
+ _replaceHistory(): void;
18
+ _handleSettingChange(): void;
19
+ _handleAllSettingsChange(setting: any): void;
20
+ _createWidget(widget: any): string;
21
+ _removeWidget(widget: any): void;
22
+ _updateWidget(widget: any): any;
23
+ getWidget(widgetId: any): any;
24
+ _updateWidgets(nextWidgets: any): any[];
25
+ setWidgets(nextWidgets: any): any[];
26
+ /**
27
+ * Undo/Redo related features
28
+ */
29
+ hasUndo(): boolean;
30
+ hasRedo(): boolean;
31
+ _seek(historyIndex: any): void;
32
+ undo(): void;
33
+ redo(): void;
34
+ subscribeHistory(listener: any): () => void;
35
+ save(): void;
36
+ }
37
+ //# sourceMappingURL=sidebar-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-adapter.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar-block-editor/sidebar-adapter.js"],"names":[],"mappings":"AA6DA,MAAM,CAAC,OAAO,OAAO,cAAc;IAE5B,OAAO;IACP,GAAG;IAEH,MAAM;IACN,YAAY;IACZ,WAAW;IAEX,OAAO;IAKP,YAAY;IACZ,kBAAkB;IAElB,mBAAmB;IAhBzB,YAAa,OAAO,KAAA,EAAE,GAAG,KAAA,EA4BxB;IAED,SAAS,CAAE,QAAQ,KAAA,cAMlB;IAED,UAAU,QAET;IAED,KAAK,CAAE,GAAG,IAAI,OAAA,QAIb;IAED,aAAa,QAEZ;IAED,YAAY,SAUX;IAED,eAAe,SAId;IAED,oBAAoB,SAUnB;IAED,wBAAwB,CAAE,OAAO,KAAA,QAmBhC;IAED,aAAa,CAAE,MAAM,KAAA,UAqCpB;IAED,aAAa,CAAE,MAAM,KAAA,QAUpB;IAED,aAAa,CAAE,MAAM,KAAA,OAsBpB;IAED,SAAS,CAAE,QAAQ,KAAA,OA6BlB;IAED,cAAc,CAAE,WAAW,KAAA,SA6B1B;IAED,UAAU,CAAE,WAAW,KAAA,SAMtB;IAED;;OAEG;IACH,OAAO,YAEN;IAED,OAAO,YAEN;IAED,KAAK,CAAE,YAAY,KAAA,QAalB;IAED,IAAI,SAMH;IAED,IAAI,SAMH;IAED,gBAAgB,CAAE,QAAQ,KAAA,cAMzB;IAED,IAAI,SAEH;CACD"}
@@ -0,0 +1,6 @@
1
+ export default function SidebarEditorProvider({ sidebar, settings, children, }: {
2
+ children: any;
3
+ settings: any;
4
+ sidebar: any;
5
+ }): import("react").JSX.Element;
6
+ //# sourceMappingURL=sidebar-editor-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-editor-provider.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar-block-editor/sidebar-editor-provider.jsx"],"names":[],"mappings":"AAOA,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAE,EAC9C,OAAO,EACP,QAAQ,EACR,QAAQ,GACR;;;;CAAA,+BAgBA"}
@@ -0,0 +1,2 @@
1
+ export default function useSidebarBlockEditor(sidebar: any): any[];
2
+ //# sourceMappingURL=use-sidebar-block-editor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-sidebar-block-editor.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar-block-editor/use-sidebar-block-editor.js"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAE,OAAO,KAAA,SA+GrD"}
@@ -0,0 +1,9 @@
1
+ export declare const SidebarControlsContext: import("react").Context<any>;
2
+ export default function SidebarControls({ sidebarControls, activeSidebarControl, children, }: {
3
+ activeSidebarControl: any;
4
+ children: any;
5
+ sidebarControls: any;
6
+ }): import("react").JSX.Element;
7
+ export declare function useSidebarControls(): any;
8
+ export declare function useActiveSidebarControl(): any;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar-controls/index.jsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,8BAAkB,CAAC;AAGtD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAE,EACxC,eAAe,EACf,oBAAoB,EACpB,QAAQ,GACR;;;;CAAA,+BAcA;AAED,wBAAgB,kBAAkB,QAIjC;AAED,wBAAgB,uBAAuB,QAItC"}
@@ -0,0 +1,4 @@
1
+ export default function WelcomeGuide({ sidebar }: {
2
+ sidebar: any;
3
+ }): import("react").JSX.Element;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/welcome-guide/index.jsx"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,EAAE,OAAO,EAAE;;CAAA,+BA4EhD"}
@@ -0,0 +1,9 @@
1
+ export default function getInserterOuterSection(): {
2
+ new (...args: any[]): {
3
+ activeElementBeforeExpanded: any;
4
+ isFromInternalAction: boolean;
5
+ open(): void;
6
+ close(): void;
7
+ };
8
+ };
9
+ //# sourceMappingURL=inserter-outer-section.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inserter-outer-section.d.ts","sourceRoot":"","sources":["../../src/controls/inserter-outer-section.js"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,uBAAuB;;;;;;;EA+H9C"}
@@ -0,0 +1,17 @@
1
+ export default function getInspectorSection(): {
2
+ new (id: any, options: any): {
3
+ parentSection: any;
4
+ returnFocusWhenClose: any;
5
+ _isOpen: boolean;
6
+ get isOpen(): boolean;
7
+ set isOpen(value: boolean);
8
+ ready(): void;
9
+ isContextuallyActive(): boolean;
10
+ onChangeExpanded(expanded: any, args: any): void;
11
+ open({ returnFocusWhenClose }?: {}): void;
12
+ close(): void;
13
+ collapse(options: any): void;
14
+ triggerActiveCallbacks(): void;
15
+ };
16
+ };
17
+ //# sourceMappingURL=inspector-section.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspector-section.d.ts","sourceRoot":"","sources":["../../src/controls/inspector-section.js"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,mBAAmB;;;;;;;;;;;;;;;EAiG1C"}
@@ -0,0 +1,19 @@
1
+ import SidebarAdapter from '../components/sidebar-block-editor/sidebar-adapter';
2
+ export default function getSidebarControl(): {
3
+ new (...args: any[]): {
4
+ subscribers: Set<any>;
5
+ ready(): void;
6
+ inserter: {
7
+ activeElementBeforeExpanded: any;
8
+ isFromInternalAction: boolean;
9
+ open(): void;
10
+ close(): void;
11
+ } | undefined;
12
+ sectionInstance: any;
13
+ inspector: any;
14
+ sidebarAdapter: SidebarAdapter | undefined;
15
+ subscribe(callback: any): () => void;
16
+ onChangeSectionExpanded(expanded: any, args: any): void;
17
+ };
18
+ };
19
+ //# sourceMappingURL=sidebar-control.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-control.d.ts","sourceRoot":"","sources":["../../src/controls/sidebar-control.js"],"names":[],"mappings":"AACA,OAAO,cAAc,MAAM,oDAAoD,CAAC;AAMhF,MAAM,CAAC,OAAO,UAAU,iBAAiB;;;;;;;;;;;;;;;;EAkDxC"}
@@ -0,0 +1,22 @@
1
+ export default function getSidebarSection(): {
2
+ new (): {
3
+ ready(): void;
4
+ inspector: {
5
+ parentSection: any;
6
+ returnFocusWhenClose: any;
7
+ _isOpen: boolean;
8
+ get isOpen(): boolean;
9
+ set isOpen(value: boolean);
10
+ ready(): void;
11
+ isContextuallyActive(): boolean;
12
+ onChangeExpanded(expanded: any, args: any): void;
13
+ open({ returnFocusWhenClose }?: {}): void;
14
+ close(): void;
15
+ collapse(options: any): void;
16
+ triggerActiveCallbacks(): void;
17
+ } | undefined;
18
+ hasSubSectionOpened(): any;
19
+ onChangeExpanded(expanded: any, _args: any): void;
20
+ };
21
+ };
22
+ //# sourceMappingURL=sidebar-section.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-section.d.ts","sourceRoot":"","sources":["../../src/controls/sidebar-section.js"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,iBAAiB;;;;;;;;;;;;;;;;;;;;EAoFxC"}
@@ -0,0 +1,4 @@
1
+ import './move-to-sidebar';
2
+ import './replace-media-upload';
3
+ import './wide-widget-display';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/filters/index.js"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,wBAAwB,CAAC;AAChC,OAAO,uBAAuB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=move-to-sidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"move-to-sidebar.d.ts","sourceRoot":"","sources":["../../src/filters/move-to-sidebar.jsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=replace-media-upload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replace-media-upload.d.ts","sourceRoot":"","sources":["../../src/filters/replace-media-upload.js"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=wide-widget-display.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wide-widget-display.d.ts","sourceRoot":"","sources":["../../src/filters/wide-widget-display.jsx"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import './filters';
2
+ /**
3
+ * Initializes the widgets block editor in the customizer.
4
+ *
5
+ * @param {string} editorName The editor name.
6
+ * @param {Object} blockEditorSettings Block editor settings.
7
+ */
8
+ export declare function initialize(editorName: string, blockEditorSettings: Object): void;
9
+ export { store } from './store';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.jsx"],"names":[],"mappings":"AAoBA,OAAO,WAAW,CAAC;AAWnB;;;;;GAKG;AACH,wBAAgB,UAAU,CAAE,UAAU,EAH3B,MAG2B,EAAE,mBAAmB,EAFhD,MAEgD,QAyD1D;AACD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const lock: (object: unknown, privateData: unknown) => void, unlock: <T = any>(object: unknown) => T;
2
+ //# sourceMappingURL=lock-unlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lock-unlock.d.ts","sourceRoot":"","sources":["../src/lock-unlock.js"],"names":[],"mappings":"AAEA,eAAO,MAAQ,IAAI,mDAAE,MAAM,iCAIzB,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Returns an action object used to open/close the inserter.
3
+ *
4
+ * @param {boolean|Object} value Whether the inserter should be
5
+ * opened (true) or closed (false).
6
+ * To specify an insertion point,
7
+ * use an object.
8
+ * @param {string} value.rootClientId The root client ID to insert at.
9
+ * @param {number} value.insertionIndex The index to insert at.
10
+ *
11
+ * @example
12
+ * ```js
13
+ * import { useState } from 'react';
14
+ * import { store as customizeWidgetsStore } from '@wordpress/customize-widgets';
15
+ * import { __ } from '@wordpress/i18n';
16
+ * import { useDispatch } from '@wordpress/data';
17
+ * import { Button } from '@wordpress/components';
18
+ *
19
+ * const ExampleComponent = () => {
20
+ * const { setIsInserterOpened } = useDispatch( customizeWidgetsStore );
21
+ * const [ isOpen, setIsOpen ] = useState( false );
22
+ *
23
+ * return (
24
+ * <Button
25
+ * onClick={ () => {
26
+ * setIsInserterOpened( ! isOpen );
27
+ * setIsOpen( ! isOpen );
28
+ * } }
29
+ * >
30
+ * { __( 'Open/close inserter' ) }
31
+ * </Button>
32
+ * );
33
+ * };
34
+ * ```
35
+ *
36
+ * @return {Object} Action object.
37
+ */
38
+ export declare function setIsInserterOpened(value: boolean | Object): Object;
39
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/store/actions.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,mBAAmB,CAAE,KAAK,EAlC/B,OAAO,GAAC,MAkCuB,GAF9B,MAAM,CAOjB"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Module Constants
3
+ */
4
+ export declare const STORE_NAME = "core/customize-widgets";
5
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/store/constants.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,UAAU,2BAA2B,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Store definition for the edit widgets namespace.
3
+ *
4
+ * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
5
+ *
6
+ * @type {Object}
7
+ */
8
+ export declare const store: Object;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.js"],"names":[],"mappings":"AAmBA;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,EAFR,MAEsD,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Reducer tracking whether the inserter is open.
3
+ *
4
+ * @param {boolean|Object} state
5
+ * @param {Object} action
6
+ */
7
+ declare function blockInserterPanel(state: boolean | Object | undefined, action: Object): any;
8
+ declare const _default: import("redux").Reducer<{
9
+ blockInserterPanel: typeof blockInserterPanel;
10
+ }, import("redux").Action<string>, Partial<{
11
+ blockInserterPanel: boolean | Object | undefined;
12
+ }>>;
13
+ export default _default;
14
+ //# sourceMappingURL=reducer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../src/store/reducer.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,iBAAS,kBAAkB,CAAE,KAAK,EAHvB,OAAO,GAAC,MAAM,YAGiB,EAAE,MAAM,EAFvC,MAEuC,OAMjD"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Returns true if the inserter is opened.
3
+ *
4
+ * @param {Object} state Global application state.
5
+ *
6
+ * @example
7
+ * ```js
8
+ * import { store as customizeWidgetsStore } from '@wordpress/customize-widgets';
9
+ * import { __ } from '@wordpress/i18n';
10
+ * import { useSelect } from '@wordpress/data';
11
+ *
12
+ * const ExampleComponent = () => {
13
+ * const { isInserterOpened } = useSelect(
14
+ * ( select ) => select( customizeWidgetsStore ),
15
+ * []
16
+ * );
17
+ *
18
+ * return isInserterOpened()
19
+ * ? __( 'Inserter is open' )
20
+ * : __( 'Inserter is closed.' );
21
+ * };
22
+ * ```
23
+ *
24
+ * @return {boolean} Whether the inserter is opened.
25
+ */
26
+ export declare function isInserterOpened(state: Object): boolean;
27
+ /**
28
+ * Get the insertion point for the inserter.
29
+ *
30
+ * @param {Object} state Global application state.
31
+ *
32
+ * @return {Object} The root client ID and index to insert at.
33
+ */
34
+ export declare function __experimentalGetInsertionPoint(state: Object): Object;
35
+ //# sourceMappingURL=selectors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/store/selectors.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,gBAAgB,CAAE,KAAK,EAtB5B,MAsB4B,GAF3B,OAAO,CAIlB;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAAE,KAAK,EAJ3C,MAI2C,GAF1C,MAAM,CAQjB"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Convert settingId to widgetId.
3
+ *
4
+ * @param {string} settingId The setting id.
5
+ * @return {string} The widget id.
6
+ */
7
+ export declare function settingIdToWidgetId(settingId: string): string;
8
+ /**
9
+ * Transform a block to a customizable widget.
10
+ *
11
+ * @param {WPBlock} block The block to be transformed from.
12
+ * @param {Object} existingWidget The widget to be extended from.
13
+ * @return {Object} The transformed widget.
14
+ */
15
+ export declare function blockToWidget(block: WPBlock, existingWidget?: Object): Object;
16
+ /**
17
+ * Transform a widget to a block.
18
+ *
19
+ * @param {Object} widget The widget to be transformed from.
20
+ * @param {string} widget.id The widget id.
21
+ * @param {string} widget.idBase The id base of the widget.
22
+ * @param {number} widget.number The number/index of the widget.
23
+ * @param {Object} widget.instance The instance of the widget.
24
+ * @return {WPBlock} The transformed block.
25
+ */
26
+ export declare function widgetToBlock({ id, idBase, number, instance }: {
27
+ id: string;
28
+ idBase: string;
29
+ number: number;
30
+ instance: Object;
31
+ }): WPBlock;
32
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAE,SAAS,EAHnC,MAGmC,GAFlC,MAAM,CAajB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAE,KAAK,EAJzB,OAIyB,EAAE,cAAc,GAHzC,MAGgD,GAF/C,MAAM,CAmDjB;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAE,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,EAN5D;IAAuB,EAAE,EAAjB,MAAM,CACd;IAAuB,MAAM,EAArB,MAAM,CACd;IAAuB,MAAM,EAArB,MAAM,CACd;IAAuB,QAAQ,EAAvB,MAAM,CACd;CAE4D,GAFnD,OAAO,CAsClB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/customize-widgets",
3
- "version": "6.1.0",
3
+ "version": "6.3.0",
4
4
  "description": "Widgets blocks in Customizer Module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -37,38 +37,38 @@
37
37
  },
38
38
  "wpScript": true,
39
39
  "dependencies": {
40
- "@wordpress/a11y": "^5.1.0",
41
- "@wordpress/admin-ui": "^3.1.0",
42
- "@wordpress/base-styles": "^15.0.0",
43
- "@wordpress/block-editor": "^20.0.0",
44
- "@wordpress/block-library": "^12.1.0",
45
- "@wordpress/blocks": "^17.1.0",
46
- "@wordpress/components": "^44.0.0",
47
- "@wordpress/compose": "^9.1.0",
48
- "@wordpress/core-data": "^9.1.0",
49
- "@wordpress/data": "^11.1.0",
50
- "@wordpress/dom": "^5.1.0",
51
- "@wordpress/element": "^10.1.0",
52
- "@wordpress/hooks": "^5.1.0",
53
- "@wordpress/i18n": "^7.1.0",
54
- "@wordpress/icons": "^20.0.0",
55
- "@wordpress/is-shallow-equal": "^6.1.0",
56
- "@wordpress/keyboard-shortcuts": "^6.1.0",
57
- "@wordpress/keycodes": "^5.1.0",
58
- "@wordpress/media-utils": "^6.1.0",
59
- "@wordpress/preferences": "^5.1.0",
60
- "@wordpress/private-apis": "^3.1.0",
61
- "@wordpress/theme": "^4.0.0",
62
- "@wordpress/ui": "^0.26.0",
63
- "@wordpress/widgets": "^5.1.0",
40
+ "@wordpress/a11y": "^5.3.0",
41
+ "@wordpress/admin-ui": "^3.3.0",
42
+ "@wordpress/base-styles": "^15.2.0",
43
+ "@wordpress/block-editor": "^20.2.0",
44
+ "@wordpress/block-library": "^12.3.0",
45
+ "@wordpress/blocks": "^17.3.0",
46
+ "@wordpress/components": "^45.1.0",
47
+ "@wordpress/compose": "^9.3.0",
48
+ "@wordpress/core-data": "^9.3.0",
49
+ "@wordpress/data": "^11.3.0",
50
+ "@wordpress/dom": "^5.3.0",
51
+ "@wordpress/element": "^10.3.0",
52
+ "@wordpress/hooks": "^5.3.0",
53
+ "@wordpress/i18n": "^7.3.0",
54
+ "@wordpress/icons": "^21.1.0",
55
+ "@wordpress/is-shallow-equal": "^6.3.0",
56
+ "@wordpress/keyboard-shortcuts": "^6.3.0",
57
+ "@wordpress/keycodes": "^5.3.0",
58
+ "@wordpress/media-utils": "^6.3.0",
59
+ "@wordpress/preferences": "^5.3.0",
60
+ "@wordpress/private-apis": "^3.3.0",
61
+ "@wordpress/theme": "^5.1.0",
62
+ "@wordpress/ui": "^0.28.0",
63
+ "@wordpress/widgets": "^5.3.0",
64
64
  "clsx": "^2.1.1",
65
65
  "fast-deep-equal": "^3.1.3"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@testing-library/dom": "^10.4.2",
69
69
  "@testing-library/react": "^16.3.3",
70
- "@testing-library/user-event": "^14.6.8",
71
- "vitest": "^5.0.5"
70
+ "@testing-library/user-event": "^14.6.13",
71
+ "vitest": "^5.1.1"
72
72
  },
73
73
  "peerDependencies": {
74
74
  "react": "^18 || ^19",
@@ -77,5 +77,5 @@
77
77
  "publishConfig": {
78
78
  "access": "public"
79
79
  },
80
- "gitHead": "9b70363b9f93cff0583a1f3153738d383cf5a49e"
80
+ "gitHead": "7f19202f61aeba8f4bdce892a1a0df485ad76e2b"
81
81
  }
@@ -1,6 +1,6 @@
1
1
  import { Component } from '@wordpress/element';
2
2
  import { speak } from '@wordpress/a11y';
3
- import { __ } from '@wordpress/i18n';
3
+ import { __, _x } from '@wordpress/i18n';
4
4
  import { Card, CollapsibleCard, Notice, Stack, Text } from '@wordpress/ui';
5
5
  import { useCopyToClipboard } from '@wordpress/compose';
6
6
  import { doAction } from '@wordpress/hooks';
@@ -168,7 +168,7 @@ export default class ErrorBoundary extends Component {
168
168
  getErrorReport( error, componentStack )
169
169
  }
170
170
  >
171
- { __( 'Copy error' ) }
171
+ { _x( 'Copy error', 'button label' ) }
172
172
  </CopyButton>
173
173
  </Notice.Actions>
174
174
  </Notice.Root>
@@ -85,8 +85,8 @@ function Header( {
85
85
  } }
86
86
  size="compact"
87
87
  />
88
- <MoreMenu />
89
88
  </NavigableToolbar>
89
+ <MoreMenu />
90
90
  </div>
91
91
 
92
92
  { createPortal(