@wordpress/edit-widgets 7.1.0 → 7.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.
- package/build/blocks/widget-area/edit/index.cjs +10 -8
- package/build/blocks/widget-area/edit/index.cjs.map +1 -1
- package/build/blocks/widget-area/edit/inner-blocks.cjs +10 -8
- package/build/blocks/widget-area/edit/inner-blocks.cjs.map +1 -1
- package/build/blocks/widget-area/edit/use-is-dragging-within.cjs.map +1 -1
- package/build/blocks/widget-area/index.cjs +9 -7
- package/build/blocks/widget-area/index.cjs.map +1 -1
- package/build/components/error-boundary/index.cjs +1 -1
- package/build/components/error-boundary/index.cjs.map +1 -1
- package/build/components/header/document-tools/index.cjs +20 -10
- package/build/components/header/document-tools/index.cjs.map +1 -1
- package/build/components/header/index.cjs +18 -11
- package/build/components/header/index.cjs.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.cjs +5 -0
- package/build/components/keyboard-shortcut-help-modal/config.cjs.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs +9 -7
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.cjs +12 -11
- package/build/components/keyboard-shortcut-help-modal/index.cjs.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.cjs +35 -13
- package/build/components/keyboard-shortcut-help-modal/shortcut.cjs.map +1 -1
- package/build/components/keyboard-shortcuts/index.cjs.map +1 -1
- package/build/components/layout/index.cjs +19 -13
- package/build/components/layout/index.cjs.map +1 -1
- package/build/components/layout/interface.cjs +27 -13
- package/build/components/layout/interface.cjs.map +1 -1
- package/build/components/layout/unsaved-changes-warning.cjs +3 -6
- package/build/components/layout/unsaved-changes-warning.cjs.map +1 -1
- package/build/components/more-menu/index.cjs +14 -10
- package/build/components/more-menu/index.cjs.map +1 -1
- package/build/components/secondary-sidebar/index.cjs +10 -8
- package/build/components/secondary-sidebar/index.cjs.map +1 -1
- package/build/components/secondary-sidebar/inserter-sidebar.cjs +9 -7
- package/build/components/secondary-sidebar/inserter-sidebar.cjs.map +1 -1
- package/build/components/sidebar/index.cjs +23 -15
- package/build/components/sidebar/index.cjs.map +1 -1
- package/build/components/welcome-guide/index.cjs +5 -1
- package/build/components/welcome-guide/index.cjs.map +1 -1
- package/build/components/widget-areas-block-editor-content/index.cjs +10 -8
- package/build/components/widget-areas-block-editor-content/index.cjs.map +1 -1
- package/build/components/widget-areas-block-editor-provider/index.cjs +10 -8
- package/build/components/widget-areas-block-editor-provider/index.cjs.map +1 -1
- package/build/constants.cjs +0 -2
- package/build/constants.cjs.map +1 -1
- package/build/index.cjs +12 -10
- package/build/index.cjs.map +1 -1
- package/build/store/actions.cjs +20 -9
- package/build/store/actions.cjs.map +1 -1
- package/build/store/index.cjs +14 -12
- package/build/store/index.cjs.map +1 -1
- package/build/store/selectors.cjs +3 -1
- package/build/store/selectors.cjs.map +1 -1
- package/build-module/blocks/widget-area/index.mjs.map +1 -1
- package/build-module/components/error-boundary/index.mjs +2 -2
- package/build-module/components/error-boundary/index.mjs.map +1 -1
- package/build-module/components/header/document-tools/index.mjs +10 -2
- package/build-module/components/header/document-tools/index.mjs.map +1 -1
- package/build-module/components/header/index.mjs +6 -2
- package/build-module/components/header/index.mjs.map +1 -1
- package/build-module/components/header/undo-redo/redo.mjs.map +1 -1
- package/build-module/components/header/undo-redo/undo.mjs.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.mjs +5 -0
- package/build-module/components/keyboard-shortcut-help-modal/config.mjs.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.mjs +1 -2
- package/build-module/components/keyboard-shortcut-help-modal/index.mjs.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs +35 -13
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs.map +1 -1
- package/build-module/components/layout/index.mjs +5 -1
- package/build-module/components/layout/index.mjs.map +1 -1
- package/build-module/components/layout/interface.mjs +16 -4
- package/build-module/components/layout/interface.mjs.map +1 -1
- package/build-module/components/layout/unsaved-changes-warning.mjs +3 -6
- package/build-module/components/layout/unsaved-changes-warning.mjs.map +1 -1
- package/build-module/components/more-menu/index.mjs +4 -2
- package/build-module/components/more-menu/index.mjs.map +1 -1
- package/build-module/components/sidebar/index.mjs +14 -8
- package/build-module/components/sidebar/index.mjs.map +1 -1
- package/build-module/components/welcome-guide/index.mjs +5 -1
- package/build-module/components/welcome-guide/index.mjs.map +1 -1
- package/build-module/constants.mjs +1 -2
- package/build-module/constants.mjs.map +1 -1
- package/build-module/index.mjs +2 -2
- package/build-module/index.mjs.map +1 -1
- package/build-module/store/actions.mjs +20 -9
- package/build-module/store/actions.mjs.map +1 -1
- package/build-module/store/selectors.mjs +3 -1
- package/build-module/store/selectors.mjs.map +1 -1
- package/build-style/style-rtl.css +72 -46
- package/build-style/style.css +72 -46
- package/build-types/blocks/widget-area/edit/index.d.ts +10 -0
- package/build-types/blocks/widget-area/edit/index.d.ts.map +1 -0
- package/build-types/blocks/widget-area/edit/inner-blocks.d.ts +4 -0
- package/build-types/blocks/widget-area/edit/inner-blocks.d.ts.map +1 -0
- package/build-types/blocks/widget-area/edit/use-is-dragging-within.d.ts +12 -0
- package/build-types/blocks/widget-area/edit/use-is-dragging-within.d.ts.map +1 -0
- package/build-types/blocks/widget-area/index.d.ts +14 -0
- package/build-types/blocks/widget-area/index.d.ts.map +1 -0
- package/build-types/components/error-boundary/index.d.ts +14 -0
- package/build-types/components/error-boundary/index.d.ts.map +1 -0
- package/build-types/components/header/document-tools/index.d.ts +3 -0
- package/build-types/components/header/document-tools/index.d.ts.map +1 -0
- package/build-types/components/header/index.d.ts +3 -0
- package/build-types/components/header/index.d.ts.map +1 -0
- package/build-types/components/header/undo-redo/redo.d.ts +3 -0
- package/build-types/components/header/undo-redo/redo.d.ts.map +1 -0
- package/build-types/components/header/undo-redo/undo.d.ts +3 -0
- package/build-types/components/header/undo-redo/undo.d.ts.map +1 -0
- package/build-types/components/keyboard-shortcut-help-modal/config.d.ts +3 -0
- package/build-types/components/keyboard-shortcut-help-modal/config.d.ts.map +1 -0
- package/build-types/components/keyboard-shortcut-help-modal/dynamic-shortcut.d.ts +5 -0
- package/build-types/components/keyboard-shortcut-help-modal/dynamic-shortcut.d.ts.map +1 -0
- package/build-types/components/keyboard-shortcut-help-modal/index.d.ts +5 -0
- package/build-types/components/keyboard-shortcut-help-modal/index.d.ts.map +1 -0
- package/build-types/components/keyboard-shortcut-help-modal/shortcut.d.ts +25 -0
- package/build-types/components/keyboard-shortcut-help-modal/shortcut.d.ts.map +1 -0
- package/build-types/components/keyboard-shortcuts/index.d.ts +7 -0
- package/build-types/components/keyboard-shortcuts/index.d.ts.map +1 -0
- package/build-types/components/layout/index.d.ts +5 -0
- package/build-types/components/layout/index.d.ts.map +1 -0
- package/build-types/components/layout/interface.d.ts +5 -0
- package/build-types/components/layout/interface.d.ts.map +1 -0
- package/build-types/components/layout/unsaved-changes-warning.d.ts +10 -0
- package/build-types/components/layout/unsaved-changes-warning.d.ts.map +1 -0
- package/build-types/components/more-menu/index.d.ts +2 -0
- package/build-types/components/more-menu/index.d.ts.map +1 -0
- package/build-types/components/more-menu/tools-more-menu-group.d.ts +6 -0
- package/build-types/components/more-menu/tools-more-menu-group.d.ts.map +1 -0
- package/build-types/components/notices/index.d.ts +3 -0
- package/build-types/components/notices/index.d.ts.map +1 -0
- package/build-types/components/save-button/index.d.ts +3 -0
- package/build-types/components/save-button/index.d.ts.map +1 -0
- package/build-types/components/secondary-sidebar/index.d.ts +2 -0
- package/build-types/components/secondary-sidebar/index.d.ts.map +1 -0
- package/build-types/components/secondary-sidebar/inserter-sidebar.d.ts +2 -0
- package/build-types/components/secondary-sidebar/inserter-sidebar.d.ts.map +1 -0
- package/build-types/components/secondary-sidebar/list-view-sidebar.d.ts +2 -0
- package/build-types/components/secondary-sidebar/list-view-sidebar.d.ts.map +1 -0
- package/build-types/components/sidebar/index.d.ts +2 -0
- package/build-types/components/sidebar/index.d.ts.map +1 -0
- package/build-types/components/sidebar/widget-areas.d.ts +4 -0
- package/build-types/components/sidebar/widget-areas.d.ts.map +1 -0
- package/build-types/components/welcome-guide/index.d.ts +2 -0
- package/build-types/components/welcome-guide/index.d.ts.map +1 -0
- package/build-types/components/widget-areas-block-editor-content/index.d.ts +4 -0
- package/build-types/components/widget-areas-block-editor-content/index.d.ts.map +1 -0
- package/build-types/components/widget-areas-block-editor-provider/index.d.ts +6 -0
- package/build-types/components/widget-areas-block-editor-provider/index.d.ts.map +1 -0
- package/build-types/constants.d.ts +2 -0
- package/build-types/constants.d.ts.map +1 -0
- package/build-types/filters/index.d.ts +3 -0
- package/build-types/filters/index.d.ts.map +1 -0
- package/build-types/filters/move-to-widget-area.d.ts +2 -0
- package/build-types/filters/move-to-widget-area.d.ts.map +1 -0
- package/build-types/filters/replace-media-upload.d.ts +2 -0
- package/build-types/filters/replace-media-upload.d.ts.map +1 -0
- package/build-types/hooks/use-last-selected-widget-area.d.ts +9 -0
- package/build-types/hooks/use-last-selected-widget-area.d.ts.map +1 -0
- package/build-types/hooks/use-widget-library-insertion-point.d.ts +3 -0
- package/build-types/hooks/use-widget-library-insertion-point.d.ts.map +1 -0
- package/build-types/index.d.ts +16 -0
- package/build-types/index.d.ts.map +1 -0
- package/build-types/lock-unlock.d.ts +2 -0
- package/build-types/lock-unlock.d.ts.map +1 -0
- package/build-types/store/actions.d.ts +144 -0
- package/build-types/store/actions.d.ts.map +1 -0
- package/build-types/store/constants.d.ts +5 -0
- package/build-types/store/constants.d.ts.map +1 -0
- package/build-types/store/index.d.ts +9 -0
- package/build-types/store/index.d.ts.map +1 -0
- package/build-types/store/private-selectors.d.ts +3 -0
- package/build-types/store/private-selectors.d.ts.map +1 -0
- package/build-types/store/reducer.d.ts +73 -0
- package/build-types/store/reducer.d.ts.map +1 -0
- package/build-types/store/resolvers.d.ts +17 -0
- package/build-types/store/resolvers.d.ts.map +1 -0
- package/build-types/store/selectors.d.ts +159 -0
- package/build-types/store/selectors.d.ts.map +1 -0
- package/build-types/store/transformers.d.ts +16 -0
- package/build-types/store/transformers.d.ts.map +1 -0
- package/build-types/store/utils.d.ts +53 -0
- package/build-types/store/utils.d.ts.map +1 -0
- package/package.json +33 -33
- package/src/components/error-boundary/index.jsx +2 -2
- package/src/components/header/index.jsx +11 -2
- package/src/components/header/style.scss +30 -3
- package/src/components/keyboard-shortcut-help-modal/config.js +3 -0
- package/src/components/keyboard-shortcut-help-modal/index.jsx +0 -2
- package/src/components/keyboard-shortcut-help-modal/shortcut.jsx +44 -29
- package/src/components/keyboard-shortcut-help-modal/style.scss +1 -1
- package/src/components/layout/style.scss +5 -9
- package/src/components/layout/unsaved-changes-warning.js +4 -9
- package/src/components/more-menu/index.jsx +0 -1
- package/src/components/sidebar/index.jsx +1 -1
- package/src/components/sidebar/style.scss +6 -0
- package/src/components/welcome-guide/style.scss +1 -1
- package/src/components/widget-areas-block-editor-content/style.scss +1 -1
- package/src/constants.js +0 -1
- package/src/index.jsx +2 -7
- package/src/store/actions.js +33 -14
- package/src/store/selectors.js +4 -1
- package/src/store/test/actions.jsdom.test.js +275 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/header/document-tools/index.jsx"],"names":[],"mappings":"AAYA,iBAAS,aAAa,gCA+ErB;eAEc,aAAa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/header/index.jsx"],"names":[],"mappings":"AAcA,iBAAS,MAAM,gCA2Dd;eAEc,MAAM"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redo.d.ts","sourceRoot":"","sources":["../../../../src/components/header/undo-redo/redo.jsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"undo.d.ts","sourceRoot":"","sources":["../../../../src/components/header/undo-redo/undo.jsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/components/keyboard-shortcut-help-modal/config.js"],"names":[],"mappings":"AAEA,yFAAyF;AACzF,eAAO,MAAM,uBAAuB,EADzB,KAAK,CAAC,OAAO,OAAO,EAAE,cAAc,CAAC,cAAc,YAAY,EAAE,OAAO,CAAC,CA2DnF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-shortcut.d.ts","sourceRoot":"","sources":["../../../src/components/keyboard-shortcut-help-modal/dynamic-shortcut.jsx"],"names":[],"mappings":"AAIA,iBAAS,eAAe,CAAE,EAAE,IAAI,EAAE;;CAAA,sCA6BjC;eAEc,eAAe"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/keyboard-shortcut-help-modal/index.jsx"],"names":[],"mappings":"AA4EA,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAE,EAClD,aAAa,EACb,WAAW,GACX;;;CAAA,sCAmDA"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/keyboard-shortcuts/index.js"],"names":[],"mappings":"AAeA,iBAAS,iBAAiB,SA0BzB;kBA1BQ,iBAAiB;aA4HG,yBAAyB;;AAhGtD,iBAAS,yBAAyB,SA8FjC;eAGc,iBAAiB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/layout/index.jsx"],"names":[],"mappings":"AAeA,iBAAS,MAAM,CAAE,EAAE,mBAAmB,EAAE;;CAAA,+BAqCvC;eAEc,MAAM"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/components/layout/interface.jsx"],"names":[],"mappings":"AA2BA,iBAAS,SAAS,CAAE,EAAE,mBAAmB,EAAE;;CAAA,+BA0E1C;eAEc,SAAS"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Warns the user if there are unsaved changes before leaving the editor.
|
|
3
|
+
*
|
|
4
|
+
* This is a duplicate of the component implemented in the editor package.
|
|
5
|
+
* Duplicated here as edit-widgets doesn't depend on editor.
|
|
6
|
+
*
|
|
7
|
+
* @return {Component} The component.
|
|
8
|
+
*/
|
|
9
|
+
export default function UnsavedChangesWarning(): Component;
|
|
10
|
+
//# sourceMappingURL=unsaved-changes-warning.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unsaved-changes-warning.d.ts","sourceRoot":"","sources":["../../../src/components/layout/unsaved-changes-warning.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,qBAAqB,IAFjC,SAAS,CA+BpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/more-menu/index.jsx"],"names":[],"mappings":"AAgBA,MAAM,CAAC,OAAO,UAAU,QAAQ,gCA6I/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools-more-menu-group.d.ts","sourceRoot":"","sources":["../../../src/components/more-menu/tools-more-menu-group.jsx"],"names":[],"mappings":"AAEA,QAAA,MAAc,kBAAkB;;;CAE/B,CAAC;eAIa,kBAAkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/notices/index.jsx"],"names":[],"mappings":"AAGA,iBAAS,OAAO,gCAWf;eAEc,OAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/save-button/index.jsx"],"names":[],"mappings":"AAKA,iBAAS,UAAU,gCAiClB;eAEc,UAAU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/secondary-sidebar/index.jsx"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,gBAAgB,uCAiBvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inserter-sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/secondary-sidebar/inserter-sidebar.jsx"],"names":[],"mappings":"AAOA,MAAM,CAAC,OAAO,UAAU,eAAe,gCA0BtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-view-sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/secondary-sidebar/list-view-sidebar.jsx"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,UAAU,eAAe,gCA+CtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/index.jsx"],"names":[],"mappings":"AA4HA,MAAM,CAAC,OAAO,UAAU,OAAO,gCAqF9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-areas.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/widget-areas.jsx"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,EAAE,oBAAoB,EAAE;;CAAA,+BAkE5D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/welcome-guide/index.jsx"],"names":[],"mappings":"AAOA,MAAM,CAAC,OAAO,UAAU,YAAY,uCAuLnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/widget-areas-block-editor-content/index.jsx"],"names":[],"mappings":"AAeA,MAAM,CAAC,OAAO,UAAU,6BAA6B,CAAE,EACtD,mBAAmB,GACnB;;CAAA,+BAkCA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/widget-areas-block-editor-provider/index.jsx"],"names":[],"mappings":"AAqBA,MAAM,CAAC,OAAO,UAAU,8BAA8B,CAAE,EACvD,mBAAmB,EACnB,QAAQ,EACR,GAAG,KAAK,EACR;;;;CAAA,+BAmGA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.js"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/filters/index.js"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAC;AAC/B,OAAO,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"move-to-widget-area.d.ts","sourceRoot":"","sources":["../../src/filters/move-to-widget-area.jsx"],"names":[],"mappings":""}
|
|
@@ -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,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A react hook that returns the client id of the last widget area to have
|
|
3
|
+
* been selected, or to have a selected block within it.
|
|
4
|
+
*
|
|
5
|
+
* @return {string} clientId of the widget area last selected.
|
|
6
|
+
*/
|
|
7
|
+
declare const useLastSelectedWidgetArea: () => string;
|
|
8
|
+
export default useLastSelectedWidgetArea;
|
|
9
|
+
//# sourceMappingURL=use-last-selected-widget-area.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-last-selected-widget-area.d.ts","sourceRoot":"","sources":["../../src/hooks/use-last-selected-widget-area.js"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,QAAA,MAAM,yBAAyB,QAFnB,MA+BJ,CAAC;eAEM,yBAAyB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-widget-library-insertion-point.d.ts","sourceRoot":"","sources":["../../src/hooks/use-widget-library-insertion-point.js"],"names":[],"mappings":"AAMA,QAAA,MAAM,8BAA8B,WAkDnC,CAAC;eAEa,8BAA8B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import './store';
|
|
2
|
+
import './filters';
|
|
3
|
+
/**
|
|
4
|
+
* Initializes the block editor in the widgets screen.
|
|
5
|
+
*
|
|
6
|
+
* @param {string} id ID of the root element to render the screen in.
|
|
7
|
+
* @param {Object} settings Block editor settings.
|
|
8
|
+
*/
|
|
9
|
+
export declare function initializeEditor(id: string, settings: Object): import("react-dom/client").Root;
|
|
10
|
+
/**
|
|
11
|
+
* Compatibility export under the old `initialize` name.
|
|
12
|
+
*/
|
|
13
|
+
export declare const initialize: typeof initializeEditor;
|
|
14
|
+
export declare function reinitializeEditor(): void;
|
|
15
|
+
export { store } from './store';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.jsx"],"names":[],"mappings":"AAqBA,OAAO,SAAS,CAAC;AACjB,OAAO,WAAW,CAAC;AAYnB;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAE,EAAE,EAHzB,MAGyB,EAAE,QAAQ,EAFnC,MAEmC,mCAgD7C;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,yBAAmB,CAAC;AAE3C,wBAAgB,kBAAkB,SAKjC;AAkBD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -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,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persists a stub post with given ID to core data store. The post is meant to be in-memory only and
|
|
3
|
+
* shouldn't be saved via the API.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} id Post ID.
|
|
6
|
+
* @param {Array} blocks Blocks the post should consist of.
|
|
7
|
+
* @return {Object} The post object.
|
|
8
|
+
*/
|
|
9
|
+
export declare const persistStubPost: (id: string, blocks: any[]) => Object;
|
|
10
|
+
/**
|
|
11
|
+
* Converts all the blocks from edited widget areas into widgets,
|
|
12
|
+
* and submits a batch request to save everything at once.
|
|
13
|
+
*
|
|
14
|
+
* Creates a snackbar notice on either success or error.
|
|
15
|
+
*
|
|
16
|
+
* @return {Function} An action creator.
|
|
17
|
+
*/
|
|
18
|
+
export declare const saveEditedWidgetAreas: () => Function;
|
|
19
|
+
/**
|
|
20
|
+
* Converts all the blocks from specified widget areas into widgets,
|
|
21
|
+
* and submits a batch request to save everything at once.
|
|
22
|
+
*
|
|
23
|
+
* @param {Object[]} widgetAreas Widget areas to save.
|
|
24
|
+
* @return {Function} An action creator.
|
|
25
|
+
*/
|
|
26
|
+
export declare const saveWidgetAreas: (widgetAreas: Object[]) => Function;
|
|
27
|
+
/**
|
|
28
|
+
* Converts all the blocks from a widget area specified by ID into widgets,
|
|
29
|
+
* and submits a batch request to save everything at once.
|
|
30
|
+
*
|
|
31
|
+
* @param {string} widgetAreaId ID of the widget area to process.
|
|
32
|
+
* @return {Function} An action creator.
|
|
33
|
+
*/
|
|
34
|
+
export declare const saveWidgetArea: (widgetAreaId: string) => Function;
|
|
35
|
+
/**
|
|
36
|
+
* Sets the clientId stored for a particular widgetId.
|
|
37
|
+
*
|
|
38
|
+
* @param {number} clientId Client id.
|
|
39
|
+
* @param {number} widgetId Widget id.
|
|
40
|
+
*
|
|
41
|
+
* @return {Object} Action.
|
|
42
|
+
*/
|
|
43
|
+
export declare function setWidgetIdForClientId(clientId: number, widgetId: number): Object;
|
|
44
|
+
/**
|
|
45
|
+
* Sets the open state of all the widget areas.
|
|
46
|
+
*
|
|
47
|
+
* @param {Object} widgetAreasOpenState The open states of all the widget areas.
|
|
48
|
+
*
|
|
49
|
+
* @return {Object} Action.
|
|
50
|
+
*/
|
|
51
|
+
export declare function setWidgetAreasOpenState(widgetAreasOpenState: Object): Object;
|
|
52
|
+
/**
|
|
53
|
+
* Sets the open state of the widget area.
|
|
54
|
+
*
|
|
55
|
+
* @param {string} clientId The clientId of the widget area.
|
|
56
|
+
* @param {boolean} isOpen Whether the widget area should be opened.
|
|
57
|
+
*
|
|
58
|
+
* @return {Object} Action.
|
|
59
|
+
*/
|
|
60
|
+
export declare function setIsWidgetAreaOpen(clientId: string, isOpen: boolean): Object;
|
|
61
|
+
/**
|
|
62
|
+
* Returns an action object used to open/close the inserter.
|
|
63
|
+
*
|
|
64
|
+
* @param {boolean|Object} value Whether the inserter should be
|
|
65
|
+
* opened (true) or closed (false).
|
|
66
|
+
* To specify an insertion point,
|
|
67
|
+
* use an object.
|
|
68
|
+
* @param {string} value.rootClientId The root client ID to insert at.
|
|
69
|
+
* @param {number} value.insertionIndex The index to insert at.
|
|
70
|
+
*
|
|
71
|
+
* @return {Object} Action object.
|
|
72
|
+
*/
|
|
73
|
+
export declare function setIsInserterOpened(value: boolean | Object): Object;
|
|
74
|
+
/**
|
|
75
|
+
* Returns an action object used to open/close the list view.
|
|
76
|
+
*
|
|
77
|
+
* @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.
|
|
78
|
+
* @return {Object} Action object.
|
|
79
|
+
*/
|
|
80
|
+
export declare function setIsListViewOpened(isOpen: boolean): Object;
|
|
81
|
+
/**
|
|
82
|
+
* Returns an action object signalling that the user closed the sidebar.
|
|
83
|
+
*
|
|
84
|
+
* @return {Object} Action creator.
|
|
85
|
+
*/
|
|
86
|
+
export declare const closeGeneralSidebar: () => Object;
|
|
87
|
+
/**
|
|
88
|
+
* Action that handles moving a block between widget areas
|
|
89
|
+
*
|
|
90
|
+
* @param {string} clientId The clientId of the block to move.
|
|
91
|
+
* @param {string} widgetAreaId The id of the widget area to move the block to.
|
|
92
|
+
*/
|
|
93
|
+
export declare const moveBlockToWidgetArea: (clientId: string, widgetAreaId: string) => ({ dispatch, select, registry }: {
|
|
94
|
+
dispatch: any;
|
|
95
|
+
registry: any;
|
|
96
|
+
select: any;
|
|
97
|
+
}) => Promise<void>;
|
|
98
|
+
/**
|
|
99
|
+
* Returns an action object used to signal that widget saving is unlocked.
|
|
100
|
+
*
|
|
101
|
+
* @param {string} lockName The lock name.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```js
|
|
105
|
+
* import { store as widgetStore } from '@wordpress/edit-widgets';
|
|
106
|
+
* import { useDispatch } from '@wordpress/data';
|
|
107
|
+
*
|
|
108
|
+
* const ExampleComponent = () => {
|
|
109
|
+
* const { unlockWidgetSaving } = useDispatch( widgetStore );
|
|
110
|
+
* return (
|
|
111
|
+
* <Button onClick={ () => unlockWidgetSaving( 'lockName' ) }>
|
|
112
|
+
* { __( 'Unlock Widget Saving' ) }
|
|
113
|
+
* </Button>
|
|
114
|
+
* );
|
|
115
|
+
* };
|
|
116
|
+
* ```
|
|
117
|
+
*
|
|
118
|
+
* @return {Object} Action object
|
|
119
|
+
*/
|
|
120
|
+
export declare function unlockWidgetSaving(lockName: string): Object;
|
|
121
|
+
/**
|
|
122
|
+
* Returns an action object used to signal that widget saving is locked.
|
|
123
|
+
*
|
|
124
|
+
* @param {string} lockName The lock name.
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```js
|
|
128
|
+
* import { store as widgetStore } from '@wordpress/edit-widgets';
|
|
129
|
+
* import { useDispatch } from '@wordpress/data';
|
|
130
|
+
*
|
|
131
|
+
* const ExampleComponent = () => {
|
|
132
|
+
* const { lockWidgetSaving } = useDispatch( widgetStore );
|
|
133
|
+
* return (
|
|
134
|
+
* <Button onClick={ () => lockWidgetSaving( 'lockName' ) }>
|
|
135
|
+
* { __( 'Lock Widget Saving' ) }
|
|
136
|
+
* </Button>
|
|
137
|
+
* );
|
|
138
|
+
* };
|
|
139
|
+
* ```
|
|
140
|
+
*
|
|
141
|
+
* @return {Object} Action object
|
|
142
|
+
*/
|
|
143
|
+
export declare function lockWidgetSaving(lockName: string): Object;
|
|
144
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/store/actions.js"],"names":[],"mappings":"AAiBA;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,OAJjB,MAAM,oBAEL,MAgBV,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,gBAuBhC,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,gBAHjB,MAAM,EAAE,aAqBjB,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,iBAHhB,MAAM,aAwMf,CAAC;AAEH;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAE,QAAQ,EALrC,MAKqC,EAAE,QAAQ,EAJ/C,MAI+C,GAF9C,MAAM,CAQjB;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAE,oBAAoB,EAJlD,MAIkD,GAFjD,MAAM,CAOjB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAE,QAAQ,EALlC,MAKkC,EAAE,MAAM,EAJ1C,OAI0C,GAFzC,MAAM,CAQjB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAE,KAAK,EAT/B,OAAO,GAAC,MASuB,GAF9B,MAAM,CAOjB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAE,MAAM,EAHhC,OAGgC,GAF/B,MAAM,CAOjB;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,QAFpB,MAQV,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,aAHvB,MAAM,gBACN,MAAM;;;;mBA0Cf,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,kBAAkB,CAAE,QAAQ,EAnBjC,MAmBiC,GAFhC,MAAM,CAOjB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAAE,QAAQ,EAnB/B,MAmB+B,GAF9B,MAAM,CAOjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/store/constants.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,UAAU,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.js"],"names":[],"mappings":"AAwBA;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,EAFR,MAEsD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-selectors.d.ts","sourceRoot":"","sources":["../../src/store/private-selectors.js"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,CAAE,KAAK,KAAA,OAE1C;AAED,wBAAgB,2BAA2B,CAAE,KAAK,KAAA,OAEjD"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Controls the open state of the widget areas.
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} state Redux state.
|
|
5
|
+
* @param {Object} action Redux action.
|
|
6
|
+
*
|
|
7
|
+
* @return {Array} Updated state.
|
|
8
|
+
*/
|
|
9
|
+
export declare function widgetAreasOpenState(state: Object | undefined, action: Object): any[];
|
|
10
|
+
/**
|
|
11
|
+
* Reducer to set the block inserter panel open or closed.
|
|
12
|
+
*
|
|
13
|
+
* Note: this reducer interacts with the list view panel reducer
|
|
14
|
+
* to make sure that only one of the two panels is open at the same time.
|
|
15
|
+
*
|
|
16
|
+
* @param {Object} state Current state.
|
|
17
|
+
* @param {Object} action Dispatched action.
|
|
18
|
+
*/
|
|
19
|
+
export declare function blockInserterPanel(state: Object | undefined, action: Object): any;
|
|
20
|
+
/**
|
|
21
|
+
* Reducer to set the list view panel open or closed.
|
|
22
|
+
*
|
|
23
|
+
* Note: this reducer interacts with the inserter panel reducer
|
|
24
|
+
* to make sure that only one of the two panels is open at the same time.
|
|
25
|
+
*
|
|
26
|
+
* @param {Object} state Current state.
|
|
27
|
+
* @param {Object} action Dispatched action.
|
|
28
|
+
*/
|
|
29
|
+
export declare function listViewPanel(state: Object | undefined, action: Object): any;
|
|
30
|
+
/**
|
|
31
|
+
* This reducer does nothing aside initializing a ref to the list view toggle.
|
|
32
|
+
* We will have a unique ref per "editor" instance.
|
|
33
|
+
*
|
|
34
|
+
* @param {Object} state
|
|
35
|
+
* @return {Object} Reference to the list view toggle button.
|
|
36
|
+
*/
|
|
37
|
+
export declare function listViewToggleRef(state?: Object): Object;
|
|
38
|
+
/**
|
|
39
|
+
* This reducer does nothing aside initializing a ref to the inserter sidebar toggle.
|
|
40
|
+
* We will have a unique ref per "editor" instance.
|
|
41
|
+
*
|
|
42
|
+
* @param {Object} state
|
|
43
|
+
* @return {Object} Reference to the inserter sidebar toggle button.
|
|
44
|
+
*/
|
|
45
|
+
export declare function inserterSidebarToggleRef(state?: Object): Object;
|
|
46
|
+
/**
|
|
47
|
+
* Widget saving lock.
|
|
48
|
+
*
|
|
49
|
+
* When widget saving is locked, the widget cannot be updated.
|
|
50
|
+
*
|
|
51
|
+
* @param {Object} state Current state.
|
|
52
|
+
* @param {Object} action Dispatched action.
|
|
53
|
+
*
|
|
54
|
+
* @return {Object} Updated state.
|
|
55
|
+
*/
|
|
56
|
+
export declare function widgetSavingLock(state: Object | undefined, action: Object): Object;
|
|
57
|
+
declare const _default: import("redux").Reducer<{
|
|
58
|
+
blockInserterPanel: typeof blockInserterPanel;
|
|
59
|
+
inserterSidebarToggleRef: Object;
|
|
60
|
+
listViewPanel: typeof listViewPanel;
|
|
61
|
+
listViewToggleRef: Object;
|
|
62
|
+
widgetAreasOpenState: any[];
|
|
63
|
+
widgetSavingLock: Object;
|
|
64
|
+
}, import("redux").Action<string>, Partial<{
|
|
65
|
+
blockInserterPanel: Object | undefined;
|
|
66
|
+
inserterSidebarToggleRef: Object | undefined;
|
|
67
|
+
listViewPanel: Object | undefined;
|
|
68
|
+
listViewToggleRef: Object | undefined;
|
|
69
|
+
widgetAreasOpenState: Object | undefined;
|
|
70
|
+
widgetSavingLock: Object | undefined;
|
|
71
|
+
}>>;
|
|
72
|
+
export default _default;
|
|
73
|
+
//# sourceMappingURL=reducer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../src/store/reducer.js"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAE,KAAK,EALhC,MAAM,YAK+B,EAAE,MAAM,EAJ7C,MAI6C,SAiBvD;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAE,KAAK,EAH9B,MAAM,YAGgC,EAAE,MAAM,EAF9C,MAE8C,OAQxD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAE,KAAK,EAHzB,MAAM,YAG2B,EAAE,MAAM,EAFzC,MAEyC,OAQnD;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAE,KAAK,GAH7B,MAGiD,GAFhD,MAAM,CAIjB;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAE,KAAK,GAHpC,MAGwD,GAFvD,MAAM,CAIjB;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAE,KAAK,EAL5B,MAAM,YAK2B,EAAE,MAAM,EAJzC,MAIyC,GAFxC,MAAM,CAejB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a "stub" widgets post reflecting all available widget areas. The
|
|
3
|
+
* post is meant as a convenient to only exists in runtime and should never be saved. It
|
|
4
|
+
* enables a convenient way of editing the widgets by using a regular post editor.
|
|
5
|
+
*
|
|
6
|
+
* Fetches all widgets from all widgets aras, converts them into blocks, and hydrates a new post with them.
|
|
7
|
+
*
|
|
8
|
+
* @return {Function} An action creator.
|
|
9
|
+
*/
|
|
10
|
+
export declare const getWidgetAreas: () => Function;
|
|
11
|
+
/**
|
|
12
|
+
* Fetches all widgets from all widgets ares, and groups them by widget area Id.
|
|
13
|
+
*
|
|
14
|
+
* @return {Function} An action creator.
|
|
15
|
+
*/
|
|
16
|
+
export declare const getWidgets: () => Function;
|
|
17
|
+
//# sourceMappingURL=resolvers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../src/store/resolvers.js"],"names":[],"mappings":"AAaA;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,gBAgDzB,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,UAAU,gBA4BrB,CAAC"}
|