@wordpress/edit-widgets 6.57.0 → 7.1.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 +106 -116
- package/build/blocks/widget-area/edit/index.cjs.map +1 -7
- package/build/blocks/widget-area/edit/inner-blocks.cjs +44 -62
- package/build/blocks/widget-area/edit/inner-blocks.cjs.map +1 -7
- package/build/blocks/widget-area/edit/use-is-dragging-within.cjs +41 -53
- package/build/blocks/widget-area/edit/use-is-dragging-within.cjs.map +1 -7
- package/build/blocks/widget-area/index.cjs +40 -44
- package/build/blocks/widget-area/index.cjs.map +1 -7
- package/build/components/error-boundary/index.cjs +115 -155
- package/build/components/error-boundary/index.cjs.map +1 -7
- package/build/components/header/document-tools/index.cjs +80 -115
- package/build/components/header/document-tools/index.cjs.map +1 -7
- package/build/components/header/index.cjs +72 -80
- package/build/components/header/index.cjs.map +1 -7
- package/build/components/header/undo-redo/redo.cjs +30 -52
- package/build/components/header/undo-redo/redo.cjs.map +1 -7
- package/build/components/header/undo-redo/undo.cjs +29 -51
- package/build/components/header/undo-redo/undo.cjs.map +1 -7
- package/build/components/keyboard-shortcut-help-modal/config.cjs +88 -85
- package/build/components/keyboard-shortcut-help-modal/config.cjs.map +1 -7
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs +40 -57
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs.map +1 -7
- package/build/components/keyboard-shortcut-help-modal/index.cjs +94 -161
- package/build/components/keyboard-shortcut-help-modal/index.cjs.map +1 -7
- package/build/components/keyboard-shortcut-help-modal/shortcut.cjs +37 -75
- package/build/components/keyboard-shortcut-help-modal/shortcut.cjs.map +1 -7
- package/build/components/keyboard-shortcuts/index.cjs +107 -140
- package/build/components/keyboard-shortcuts/index.cjs.map +1 -7
- package/build/components/layout/index.cjs +65 -74
- package/build/components/layout/index.cjs.map +1 -7
- package/build/components/layout/interface.cjs +82 -102
- package/build/components/layout/interface.cjs.map +1 -7
- package/build/components/layout/unsaved-changes-warning.cjs +44 -48
- package/build/components/layout/unsaved-changes-warning.cjs.map +1 -7
- package/build/components/more-menu/index.cjs +125 -191
- package/build/components/more-menu/index.cjs.map +1 -7
- package/build/components/more-menu/tools-more-menu-group.cjs +9 -29
- package/build/components/more-menu/tools-more-menu-group.cjs.map +1 -7
- package/build/components/notices/index.cjs +19 -39
- package/build/components/notices/index.cjs.map +1 -7
- package/build/components/save-button/index.cjs +31 -58
- package/build/components/save-button/index.cjs.map +1 -7
- package/build/components/secondary-sidebar/index.cjs +38 -45
- package/build/components/secondary-sidebar/index.cjs.map +1 -7
- package/build/components/secondary-sidebar/inserter-sidebar.cjs +50 -51
- package/build/components/secondary-sidebar/inserter-sidebar.cjs.map +1 -7
- package/build/components/secondary-sidebar/list-view-sidebar.cjs +51 -82
- package/build/components/secondary-sidebar/list-view-sidebar.cjs.map +1 -7
- package/build/components/sidebar/index.cjs +117 -180
- package/build/components/sidebar/index.cjs.map +1 -7
- package/build/components/sidebar/widget-areas.cjs +43 -85
- package/build/components/sidebar/widget-areas.cjs.map +1 -7
- package/build/components/welcome-guide/index.cjs +110 -186
- package/build/components/welcome-guide/index.cjs.map +1 -7
- package/build/components/widget-areas-block-editor-content/index.cjs +59 -63
- package/build/components/widget-areas-block-editor-content/index.cjs.map +1 -7
- package/build/components/widget-areas-block-editor-provider/index.cjs +105 -140
- package/build/components/widget-areas-block-editor-provider/index.cjs.map +1 -7
- package/build/constants.cjs +11 -32
- package/build/constants.cjs.map +1 -7
- package/build/filters/index.cjs +7 -4
- package/build/filters/move-to-widget-area.cjs +38 -53
- package/build/filters/move-to-widget-area.cjs.map +1 -7
- package/build/filters/replace-media-upload.cjs +11 -9
- package/build/filters/replace-media-upload.cjs.map +1 -7
- package/build/hooks/use-last-selected-widget-area.cjs +28 -49
- package/build/hooks/use-last-selected-widget-area.cjs.map +1 -7
- package/build/hooks/use-widget-library-insertion-point.cjs +33 -67
- package/build/hooks/use-widget-library-insertion-point.cjs.map +1 -7
- package/build/index.cjs +96 -97
- package/build/index.cjs.map +1 -7
- package/build/lock-unlock.cjs +10 -35
- package/build/lock-unlock.cjs.map +1 -7
- package/build/store/actions.cjs +269 -278
- package/build/store/actions.cjs.map +1 -7
- package/build/store/constants.cjs +12 -29
- package/build/store/constants.cjs.map +1 -7
- package/build/store/index.cjs +61 -52
- package/build/store/index.cjs.map +1 -7
- package/build/store/private-selectors.cjs +11 -32
- package/build/store/private-selectors.cjs.map +1 -7
- package/build/store/reducer.cjs +107 -88
- package/build/store/reducer.cjs.map +1 -7
- package/build/store/resolvers.cjs +60 -91
- package/build/store/resolvers.cjs.map +1 -7
- package/build/store/selectors.cjs +196 -229
- package/build/store/selectors.cjs.map +1 -7
- package/build/store/transformers.cjs +51 -82
- package/build/store/transformers.cjs.map +1 -7
- package/build/store/utils.cjs +76 -63
- package/build/store/utils.cjs.map +1 -7
- package/build-module/blocks/widget-area/edit/index.mjs +82 -94
- package/build-module/blocks/widget-area/edit/index.mjs.map +1 -7
- package/build-module/blocks/widget-area/edit/inner-blocks.mjs +19 -35
- package/build-module/blocks/widget-area/edit/inner-blocks.mjs.map +1 -7
- package/build-module/blocks/widget-area/edit/use-is-dragging-within.mjs +36 -33
- package/build-module/blocks/widget-area/edit/use-is-dragging-within.mjs.map +1 -7
- package/build-module/blocks/widget-area/index.mjs +12 -15
- package/build-module/blocks/widget-area/index.mjs.map +1 -7
- package/build-module/components/error-boundary/index.mjs +103 -128
- package/build-module/components/error-boundary/index.mjs.map +1 -7
- package/build-module/components/header/document-tools/index.mjs +51 -84
- package/build-module/components/header/document-tools/index.mjs.map +1 -7
- package/build-module/components/header/index.mjs +40 -47
- package/build-module/components/header/index.mjs.map +1 -7
- package/build-module/components/header/undo-redo/redo.mjs +20 -27
- package/build-module/components/header/undo-redo/redo.mjs.map +1 -7
- package/build-module/components/header/undo-redo/undo.mjs +19 -26
- package/build-module/components/header/undo-redo/undo.mjs.map +1 -7
- package/build-module/components/keyboard-shortcut-help-modal/config.mjs +83 -61
- package/build-module/components/keyboard-shortcut-help-modal/config.mjs.map +1 -7
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs +19 -33
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs.map +1 -7
- package/build-module/components/keyboard-shortcut-help-modal/index.mjs +67 -136
- package/build-module/components/keyboard-shortcut-help-modal/index.mjs.map +1 -7
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs +31 -54
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs.map +1 -7
- package/build-module/components/keyboard-shortcuts/index.mjs +99 -119
- package/build-module/components/keyboard-shortcuts/index.mjs.map +1 -7
- package/build-module/components/layout/index.mjs +29 -40
- package/build-module/components/layout/index.mjs.map +1 -7
- package/build-module/components/layout/interface.mjs +53 -76
- package/build-module/components/layout/interface.mjs.map +1 -7
- package/build-module/components/layout/unsaved-changes-warning.mjs +37 -26
- package/build-module/components/layout/unsaved-changes-warning.mjs.map +1 -7
- package/build-module/components/more-menu/index.mjs +95 -162
- package/build-module/components/more-menu/index.mjs.map +1 -7
- package/build-module/components/more-menu/tools-more-menu-group.mjs +5 -9
- package/build-module/components/more-menu/tools-more-menu-group.mjs.map +1 -7
- package/build-module/components/notices/index.mjs +12 -17
- package/build-module/components/notices/index.mjs.map +1 -7
- package/build-module/components/save-button/index.mjs +23 -35
- package/build-module/components/save-button/index.mjs.map +1 -7
- package/build-module/components/secondary-sidebar/index.mjs +15 -20
- package/build-module/components/secondary-sidebar/index.mjs.map +1 -7
- package/build-module/components/secondary-sidebar/inserter-sidebar.mjs +27 -25
- package/build-module/components/secondary-sidebar/inserter-sidebar.mjs.map +1 -7
- package/build-module/components/secondary-sidebar/list-view-sidebar.mjs +39 -55
- package/build-module/components/secondary-sidebar/list-view-sidebar.mjs.map +1 -7
- package/build-module/components/sidebar/index.mjs +96 -162
- package/build-module/components/sidebar/index.mjs.map +1 -7
- package/build-module/components/sidebar/widget-areas.mjs +30 -57
- package/build-module/components/sidebar/widget-areas.mjs.map +1 -7
- package/build-module/components/welcome-guide/index.mjs +103 -164
- package/build-module/components/welcome-guide/index.mjs.map +1 -7
- package/build-module/components/widget-areas-block-editor-content/index.mjs +35 -44
- package/build-module/components/widget-areas-block-editor-content/index.mjs.map +1 -7
- package/build-module/components/widget-areas-block-editor-provider/index.mjs +76 -109
- package/build-module/components/widget-areas-block-editor-provider/index.mjs.map +1 -7
- package/build-module/constants.mjs +5 -7
- package/build-module/constants.mjs.map +1 -7
- package/build-module/filters/index.mjs +0 -2
- package/build-module/filters/move-to-widget-area.mjs +28 -48
- package/build-module/filters/move-to-widget-area.mjs.map +1 -7
- package/build-module/filters/replace-media-upload.mjs +5 -8
- package/build-module/filters/replace-media-upload.mjs.map +1 -7
- package/build-module/hooks/use-last-selected-widget-area.mjs +23 -29
- package/build-module/hooks/use-last-selected-widget-area.mjs.map +1 -7
- package/build-module/hooks/use-widget-library-insertion-point.mjs +28 -47
- package/build-module/hooks/use-widget-library-insertion-point.mjs.map +1 -7
- package/build-module/index.mjs +62 -79
- package/build-module/index.mjs.map +1 -7
- package/build-module/lock-unlock.mjs +5 -10
- package/build-module/lock-unlock.mjs.map +1 -7
- package/build-module/store/actions.mjs +250 -247
- package/build-module/store/actions.mjs.map +1 -7
- package/build-module/store/constants.mjs +7 -5
- package/build-module/store/constants.mjs.map +1 -7
- package/build-module/store/index.mjs +18 -16
- package/build-module/store/index.mjs.map +1 -7
- package/build-module/store/private-selectors.mjs +5 -7
- package/build-module/store/private-selectors.mjs.map +1 -7
- package/build-module/store/reducer.mjs +95 -58
- package/build-module/store/reducer.mjs.map +1 -7
- package/build-module/store/resolvers.mjs +52 -71
- package/build-module/store/resolvers.mjs.map +1 -7
- package/build-module/store/selectors.mjs +178 -199
- package/build-module/store/selectors.mjs.map +1 -7
- package/build-module/store/transformers.mjs +44 -56
- package/build-module/store/transformers.mjs.map +1 -7
- package/build-module/store/utils.mjs +64 -32
- package/build-module/store/utils.mjs.map +1 -7
- package/build-style/style-rtl.css +12 -12
- package/build-style/style.css +12 -12
- package/package.json +35 -36
- package/src/components/header/index.jsx +2 -2
- package/src/components/layout/interface.jsx +4 -1
- package/src/components/layout/style.scss +11 -0
- package/src/components/notices/style.scss +2 -2
- package/src/components/sidebar/index.jsx +18 -18
- package/src/components/welcome-guide/index.jsx +4 -2
- package/src/components/widget-areas-block-editor-content/index.jsx +4 -3
- package/CHANGELOG.md +0 -325
- package/build/filters/index.cjs.map +0 -7
- package/build-module/filters/index.mjs.map +0 -7
|
@@ -1,38 +1,70 @@
|
|
|
1
1
|
// packages/edit-widgets/src/store/utils.js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
/**
|
|
3
|
+
* "Kind" of the navigation post.
|
|
4
|
+
*
|
|
5
|
+
* @type {string}
|
|
6
|
+
*/
|
|
7
|
+
const KIND = "root";
|
|
8
|
+
/**
|
|
9
|
+
* "post type" of the navigation post.
|
|
10
|
+
*
|
|
11
|
+
* @type {string}
|
|
12
|
+
*/
|
|
13
|
+
const WIDGET_AREA_ENTITY_TYPE = "sidebar";
|
|
14
|
+
/**
|
|
15
|
+
* "post type" of the widget area post.
|
|
16
|
+
*
|
|
17
|
+
* @type {string}
|
|
18
|
+
*/
|
|
19
|
+
const POST_TYPE = "postType";
|
|
20
|
+
/**
|
|
21
|
+
* Builds an ID for a new widget area post.
|
|
22
|
+
*
|
|
23
|
+
* @param {number} widgetAreaId Widget area id.
|
|
24
|
+
* @return {string} An ID.
|
|
25
|
+
*/
|
|
26
|
+
const buildWidgetAreaPostId = (widgetAreaId) => `widget-area-${widgetAreaId}`;
|
|
27
|
+
/**
|
|
28
|
+
* Builds an ID for a global widget areas post.
|
|
29
|
+
*
|
|
30
|
+
* @return {string} An ID.
|
|
31
|
+
*/
|
|
32
|
+
const buildWidgetAreasPostId = () => `widget-areas`;
|
|
33
|
+
/**
|
|
34
|
+
* Builds a query to resolve sidebars.
|
|
35
|
+
*
|
|
36
|
+
* @return {Object} Query.
|
|
37
|
+
*/
|
|
7
38
|
function buildWidgetAreasQuery() {
|
|
8
|
-
|
|
9
|
-
per_page: -1
|
|
10
|
-
};
|
|
39
|
+
return { per_page: -1 };
|
|
11
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Builds a query to resolve widgets.
|
|
43
|
+
*
|
|
44
|
+
* @return {Object} Query.
|
|
45
|
+
*/
|
|
12
46
|
function buildWidgetsQuery() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
47
|
+
return {
|
|
48
|
+
per_page: -1,
|
|
49
|
+
_embed: "about"
|
|
50
|
+
};
|
|
17
51
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
blocks
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Creates a stub post with given id and set of blocks. Used as a governing entity records
|
|
54
|
+
* for all widget areas.
|
|
55
|
+
*
|
|
56
|
+
* @param {string} id Post ID.
|
|
57
|
+
* @param {Array} blocks The list of blocks.
|
|
58
|
+
* @return {Object} A stub post object formatted in compliance with the data layer.
|
|
59
|
+
*/
|
|
60
|
+
const createStubPost = (id, blocks) => ({
|
|
61
|
+
id,
|
|
62
|
+
slug: id,
|
|
63
|
+
status: "draft",
|
|
64
|
+
type: "page",
|
|
65
|
+
blocks,
|
|
66
|
+
meta: { widgetAreaId: id }
|
|
27
67
|
});
|
|
28
|
-
export {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
WIDGET_AREA_ENTITY_TYPE,
|
|
32
|
-
buildWidgetAreaPostId,
|
|
33
|
-
buildWidgetAreasPostId,
|
|
34
|
-
buildWidgetAreasQuery,
|
|
35
|
-
buildWidgetsQuery,
|
|
36
|
-
createStubPost
|
|
37
|
-
};
|
|
38
|
-
//# sourceMappingURL=utils.mjs.map
|
|
68
|
+
export { KIND, POST_TYPE, WIDGET_AREA_ENTITY_TYPE, buildWidgetAreaPostId, buildWidgetAreasPostId, buildWidgetAreasQuery, buildWidgetsQuery, createStubPost };
|
|
69
|
+
|
|
70
|
+
//# sourceMappingURL=utils.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/store/utils.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * \"Kind\" of the navigation post.\n *\n * @type {string}\n */\nexport const KIND = 'root';\n\n/**\n * \"post type\" of the navigation post.\n *\n * @type {string}\n */\nexport const WIDGET_AREA_ENTITY_TYPE = 'sidebar';\n\n/**\n * \"post type\" of the widget area post.\n *\n * @type {string}\n */\nexport const POST_TYPE = 'postType';\n\n/**\n * Builds an ID for a new widget area post.\n *\n * @param {number} widgetAreaId Widget area id.\n * @return {string} An ID.\n */\nexport const buildWidgetAreaPostId = ( widgetAreaId ) =>\n\t`widget-area-${ widgetAreaId }`;\n\n/**\n * Builds an ID for a global widget areas post.\n *\n * @return {string} An ID.\n */\nexport const buildWidgetAreasPostId = () => `widget-areas`;\n\n/**\n * Builds a query to resolve sidebars.\n *\n * @return {Object} Query.\n */\nexport function buildWidgetAreasQuery() {\n\treturn {\n\t\tper_page: -1,\n\t};\n}\n\n/**\n * Builds a query to resolve widgets.\n *\n * @return {Object} Query.\n */\nexport function buildWidgetsQuery() {\n\treturn {\n\t\tper_page: -1,\n\t\t_embed: 'about',\n\t};\n}\n\n/**\n * Creates a stub post with given id and set of blocks. Used as a governing entity records\n * for all widget areas.\n *\n * @param {string} id Post ID.\n * @param {Array} blocks The list of blocks.\n * @return {Object} A stub post object formatted in compliance with the data layer.\n */\nexport const createStubPost = ( id, blocks ) => ( {\n\tid,\n\tslug: id,\n\tstatus: 'draft',\n\ttype: 'page',\n\tblocks,\n\tmeta: {\n\t\twidgetAreaId: id,\n\t},\n} );\n"],
|
|
5
|
-
"mappings": ";AAKO,IAAM,OAAO;AAOb,IAAM,0BAA0B;AAOhC,IAAM,YAAY;AAQlB,IAAM,wBAAwB,CAAE,iBACtC,eAAgB,YAAa;AAOvB,IAAM,yBAAyB,MAAM;AAOrC,SAAS,wBAAwB;AACvC,SAAO;AAAA,IACN,UAAU;AAAA,EACX;AACD;AAOO,SAAS,oBAAoB;AACnC,SAAO;AAAA,IACN,UAAU;AAAA,IACV,QAAQ;AAAA,EACT;AACD;AAUO,IAAM,iBAAiB,CAAE,IAAI,YAAc;AAAA,EACjD;AAAA,EACA,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN;AAAA,EACA,MAAM;AAAA,IACL,cAAc;AAAA,EACf;AACD;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"utils.mjs","names":[],"sources":["../../src/store/utils.js"],"sourcesContent":["/**\n * \"Kind\" of the navigation post.\n *\n * @type {string}\n */\nexport const KIND = 'root';\n\n/**\n * \"post type\" of the navigation post.\n *\n * @type {string}\n */\nexport const WIDGET_AREA_ENTITY_TYPE = 'sidebar';\n\n/**\n * \"post type\" of the widget area post.\n *\n * @type {string}\n */\nexport const POST_TYPE = 'postType';\n\n/**\n * Builds an ID for a new widget area post.\n *\n * @param {number} widgetAreaId Widget area id.\n * @return {string} An ID.\n */\nexport const buildWidgetAreaPostId = ( widgetAreaId ) =>\n\t`widget-area-${ widgetAreaId }`;\n\n/**\n * Builds an ID for a global widget areas post.\n *\n * @return {string} An ID.\n */\nexport const buildWidgetAreasPostId = () => `widget-areas`;\n\n/**\n * Builds a query to resolve sidebars.\n *\n * @return {Object} Query.\n */\nexport function buildWidgetAreasQuery() {\n\treturn {\n\t\tper_page: -1,\n\t};\n}\n\n/**\n * Builds a query to resolve widgets.\n *\n * @return {Object} Query.\n */\nexport function buildWidgetsQuery() {\n\treturn {\n\t\tper_page: -1,\n\t\t_embed: 'about',\n\t};\n}\n\n/**\n * Creates a stub post with given id and set of blocks. Used as a governing entity records\n * for all widget areas.\n *\n * @param {string} id Post ID.\n * @param {Array} blocks The list of blocks.\n * @return {Object} A stub post object formatted in compliance with the data layer.\n */\nexport const createStubPost = ( id, blocks ) => ( {\n\tid,\n\tslug: id,\n\tstatus: 'draft',\n\ttype: 'page',\n\tblocks,\n\tmeta: {\n\t\twidgetAreaId: id,\n\t},\n} );\n"],"mappings":";;;;;;AAKA,MAAa,OAAO;;;;;;AAOpB,MAAa,0BAA0B;;;;;;AAOvC,MAAa,YAAY;;;;;;;AAQzB,MAAa,yBAA0B,iBACtC,eAAgB;;;;;;AAOjB,MAAa,+BAA+B;;;;;;AAO5C,SAAgB,wBAAwB;CACvC,OAAO,EACN,UAAU,GACX;AACD;;;;;;AAOA,SAAgB,oBAAoB;CACnC,OAAO;EACN,UAAU;EACV,QAAQ;CACT;AACD;;;;;;;;;AAUA,MAAa,kBAAmB,IAAI,YAAc;CACjD;CACA,MAAM;CACN,QAAQ;CACR,MAAM;CACN;CACA,MAAM,EACL,cAAc,GACf;AACD"}
|
|
@@ -485,16 +485,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
485
485
|
display: flex;
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
|
-
.interface-interface-skeleton__footer .block-editor-block-breadcrumb {
|
|
489
|
-
z-index: 30;
|
|
490
|
-
display: flex;
|
|
491
|
-
background: #fff;
|
|
492
|
-
height: var(--wpds-dimension-size-md, 32px);
|
|
493
|
-
align-items: center;
|
|
494
|
-
font-size: 13px;
|
|
495
|
-
padding: 0 18px;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
488
|
.interface-interface-skeleton__actions {
|
|
499
489
|
z-index: 100000;
|
|
500
490
|
position: fixed !important;
|
|
@@ -835,15 +825,25 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
835
825
|
}
|
|
836
826
|
|
|
837
827
|
.edit-widgets-notices.notices-inline-notices-wrapper,
|
|
838
|
-
.edit-widgets-notices .
|
|
828
|
+
.edit-widgets-notices .notices-inline-notices__list {
|
|
839
829
|
gap: 0;
|
|
840
830
|
}
|
|
841
831
|
|
|
842
|
-
.edit-widgets-notices .
|
|
832
|
+
.edit-widgets-notices .notices-inline-notices__notice {
|
|
843
833
|
border-top-width: 0;
|
|
844
834
|
border-inline-width: 0;
|
|
845
835
|
}
|
|
846
836
|
|
|
837
|
+
.edit-widgets-layout__footer {
|
|
838
|
+
flex: 1 1 auto;
|
|
839
|
+
min-width: 0;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
.edit-widgets-layout__breadcrumbs {
|
|
843
|
+
height: var(--wpds-dimension-size-md, 32px);
|
|
844
|
+
padding: 0 18px;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
847
|
.edit-widgets-layout__inserter-panel {
|
|
848
848
|
height: 100%;
|
|
849
849
|
display: flex;
|
package/build-style/style.css
CHANGED
|
@@ -485,16 +485,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
485
485
|
display: flex;
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
|
-
.interface-interface-skeleton__footer .block-editor-block-breadcrumb {
|
|
489
|
-
z-index: 30;
|
|
490
|
-
display: flex;
|
|
491
|
-
background: #fff;
|
|
492
|
-
height: var(--wpds-dimension-size-md, 32px);
|
|
493
|
-
align-items: center;
|
|
494
|
-
font-size: 13px;
|
|
495
|
-
padding: 0 18px;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
488
|
.interface-interface-skeleton__actions {
|
|
499
489
|
z-index: 100000;
|
|
500
490
|
position: fixed !important;
|
|
@@ -835,15 +825,25 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
835
825
|
}
|
|
836
826
|
|
|
837
827
|
.edit-widgets-notices.notices-inline-notices-wrapper,
|
|
838
|
-
.edit-widgets-notices .
|
|
828
|
+
.edit-widgets-notices .notices-inline-notices__list {
|
|
839
829
|
gap: 0;
|
|
840
830
|
}
|
|
841
831
|
|
|
842
|
-
.edit-widgets-notices .
|
|
832
|
+
.edit-widgets-notices .notices-inline-notices__notice {
|
|
843
833
|
border-top-width: 0;
|
|
844
834
|
border-inline-width: 0;
|
|
845
835
|
}
|
|
846
836
|
|
|
837
|
+
.edit-widgets-layout__footer {
|
|
838
|
+
flex: 1 1 auto;
|
|
839
|
+
min-width: 0;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
.edit-widgets-layout__breadcrumbs {
|
|
843
|
+
height: var(--wpds-dimension-size-md, 32px);
|
|
844
|
+
padding: 0 18px;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
847
|
.edit-widgets-layout__inserter-panel {
|
|
848
848
|
height: 100%;
|
|
849
849
|
display: flex;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-widgets",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"description": "Widgets Page module for WordPress..",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -20,15 +20,14 @@
|
|
|
20
20
|
"url": "https://github.com/WordPress/gutenberg/issues"
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|
|
23
|
-
"node": ">=
|
|
23
|
+
"node": ">=22.13.0"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
"src",
|
|
27
27
|
"build",
|
|
28
28
|
"build-module",
|
|
29
29
|
"build-style",
|
|
30
|
-
"build-types"
|
|
31
|
-
"*.md"
|
|
30
|
+
"build-types"
|
|
32
31
|
],
|
|
33
32
|
"main": "build/index.cjs",
|
|
34
33
|
"module": "build-module/index.mjs",
|
|
@@ -46,43 +45,43 @@
|
|
|
46
45
|
]
|
|
47
46
|
},
|
|
48
47
|
"dependencies": {
|
|
49
|
-
"@wordpress/a11y": "^
|
|
50
|
-
"@wordpress/admin-ui": "^
|
|
51
|
-
"@wordpress/api-fetch": "^
|
|
52
|
-
"@wordpress/base-styles": "^
|
|
53
|
-
"@wordpress/block-editor": "^
|
|
54
|
-
"@wordpress/block-library": "^
|
|
55
|
-
"@wordpress/blocks": "^
|
|
56
|
-
"@wordpress/components": "^
|
|
57
|
-
"@wordpress/compose": "^
|
|
58
|
-
"@wordpress/core-data": "^
|
|
59
|
-
"@wordpress/data": "^
|
|
60
|
-
"@wordpress/deprecated": "^
|
|
61
|
-
"@wordpress/dom": "^
|
|
62
|
-
"@wordpress/element": "^
|
|
63
|
-
"@wordpress/hooks": "^
|
|
64
|
-
"@wordpress/i18n": "^
|
|
65
|
-
"@wordpress/icons": "^
|
|
66
|
-
"@wordpress/interface": "^
|
|
67
|
-
"@wordpress/keyboard-shortcuts": "^
|
|
68
|
-
"@wordpress/keycodes": "^
|
|
69
|
-
"@wordpress/media-utils": "^
|
|
70
|
-
"@wordpress/notices": "^
|
|
71
|
-
"@wordpress/patterns": "^
|
|
72
|
-
"@wordpress/plugins": "^
|
|
73
|
-
"@wordpress/preferences": "^
|
|
74
|
-
"@wordpress/private-apis": "^
|
|
75
|
-
"@wordpress/theme": "^
|
|
76
|
-
"@wordpress/ui": "^0.
|
|
77
|
-
"@wordpress/url": "^
|
|
78
|
-
"@wordpress/widgets": "^
|
|
48
|
+
"@wordpress/a11y": "^5.1.0",
|
|
49
|
+
"@wordpress/admin-ui": "^3.1.0",
|
|
50
|
+
"@wordpress/api-fetch": "^8.1.0",
|
|
51
|
+
"@wordpress/base-styles": "^15.0.0",
|
|
52
|
+
"@wordpress/block-editor": "^20.0.0",
|
|
53
|
+
"@wordpress/block-library": "^12.1.0",
|
|
54
|
+
"@wordpress/blocks": "^17.1.0",
|
|
55
|
+
"@wordpress/components": "^44.0.0",
|
|
56
|
+
"@wordpress/compose": "^9.1.0",
|
|
57
|
+
"@wordpress/core-data": "^9.1.0",
|
|
58
|
+
"@wordpress/data": "^11.1.0",
|
|
59
|
+
"@wordpress/deprecated": "^5.1.0",
|
|
60
|
+
"@wordpress/dom": "^5.1.0",
|
|
61
|
+
"@wordpress/element": "^10.1.0",
|
|
62
|
+
"@wordpress/hooks": "^5.1.0",
|
|
63
|
+
"@wordpress/i18n": "^7.1.0",
|
|
64
|
+
"@wordpress/icons": "^20.0.0",
|
|
65
|
+
"@wordpress/interface": "^11.1.0",
|
|
66
|
+
"@wordpress/keyboard-shortcuts": "^6.1.0",
|
|
67
|
+
"@wordpress/keycodes": "^5.1.0",
|
|
68
|
+
"@wordpress/media-utils": "^6.1.0",
|
|
69
|
+
"@wordpress/notices": "^6.1.0",
|
|
70
|
+
"@wordpress/patterns": "^3.1.0",
|
|
71
|
+
"@wordpress/plugins": "^8.1.0",
|
|
72
|
+
"@wordpress/preferences": "^5.1.0",
|
|
73
|
+
"@wordpress/private-apis": "^3.1.0",
|
|
74
|
+
"@wordpress/theme": "^4.0.0",
|
|
75
|
+
"@wordpress/ui": "^0.26.0",
|
|
76
|
+
"@wordpress/url": "^5.1.0",
|
|
77
|
+
"@wordpress/widgets": "^5.1.0",
|
|
79
78
|
"clsx": "^2.1.1"
|
|
80
79
|
},
|
|
81
80
|
"devDependencies": {
|
|
82
81
|
"@testing-library/dom": "^10.4.2",
|
|
83
82
|
"@testing-library/react": "^16.3.3",
|
|
84
83
|
"deep-freeze": "^0.0.1",
|
|
85
|
-
"vitest": "^5.0.
|
|
84
|
+
"vitest": "^5.0.5"
|
|
86
85
|
},
|
|
87
86
|
"peerDependencies": {
|
|
88
87
|
"react": "^18 || ^19",
|
|
@@ -91,5 +90,5 @@
|
|
|
91
90
|
"publishConfig": {
|
|
92
91
|
"access": "public"
|
|
93
92
|
},
|
|
94
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "9b70363b9f93cff0583a1f3153738d383cf5a49e"
|
|
95
94
|
}
|
|
@@ -2,7 +2,7 @@ import { BlockToolbar } from '@wordpress/block-editor';
|
|
|
2
2
|
import { useSelect } from '@wordpress/data';
|
|
3
3
|
import { useRef } from '@wordpress/element';
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
|
-
import { Popover } from '@wordpress/components';
|
|
5
|
+
import { Popover as WCPopover } from '@wordpress/components';
|
|
6
6
|
import { PinnedItems } from '@wordpress/interface';
|
|
7
7
|
import { useViewportMatch } from '@wordpress/compose';
|
|
8
8
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
@@ -47,7 +47,7 @@ function Header() {
|
|
|
47
47
|
<div className="selected-block-tools-wrapper">
|
|
48
48
|
<BlockToolbar hideDragHandle />
|
|
49
49
|
</div>
|
|
50
|
-
<
|
|
50
|
+
<WCPopover.Slot
|
|
51
51
|
ref={ blockToolbarRef }
|
|
52
52
|
name="block-toolbar"
|
|
53
53
|
/>
|
|
@@ -90,7 +90,10 @@ function Interface( { blockEditorSettings } ) {
|
|
|
90
90
|
hasBlockBreadCrumbsEnabled &&
|
|
91
91
|
! isMobileViewport && (
|
|
92
92
|
<div className="edit-widgets-layout__footer">
|
|
93
|
-
<BlockBreadcrumb
|
|
93
|
+
<BlockBreadcrumb
|
|
94
|
+
className="edit-widgets-layout__breadcrumbs"
|
|
95
|
+
rootLabelText={ __( 'Widgets' ) }
|
|
96
|
+
/>
|
|
94
97
|
</div>
|
|
95
98
|
)
|
|
96
99
|
}
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
@use "@wordpress/base-styles/mixins" as *;
|
|
2
2
|
@use "@wordpress/base-styles/variables" as *;
|
|
3
3
|
|
|
4
|
+
.edit-widgets-layout__footer {
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
// Let the flex item shrink below the trail's content width so breadcrumbs can collapse.
|
|
7
|
+
min-width: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.edit-widgets-layout__breadcrumbs {
|
|
11
|
+
height: var(--wpds-dimension-size-md);
|
|
12
|
+
padding: 0 ($grid-unit-15 + 6px);
|
|
13
|
+
}
|
|
14
|
+
|
|
4
15
|
.edit-widgets-layout__inserter-panel {
|
|
5
16
|
height: 100%;
|
|
6
17
|
display: flex;
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.edit-widgets-notices.notices-inline-notices-wrapper,
|
|
9
|
-
.edit-widgets-notices .
|
|
9
|
+
.edit-widgets-notices .notices-inline-notices__list {
|
|
10
10
|
gap: 0;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.edit-widgets-notices .
|
|
13
|
+
.edit-widgets-notices .notices-inline-notices__notice {
|
|
14
14
|
border-top-width: 0;
|
|
15
15
|
border-inline-width: 0;
|
|
16
16
|
}
|
|
@@ -20,20 +20,20 @@ import WidgetAreas from './widget-areas';
|
|
|
20
20
|
import { store as editWidgetsStore } from '../../store';
|
|
21
21
|
import { unlock } from '../../lock-unlock';
|
|
22
22
|
|
|
23
|
-
const { Tabs } = unlock( componentsPrivateApis );
|
|
23
|
+
const { Tabs: WCTabs } = unlock( componentsPrivateApis );
|
|
24
24
|
|
|
25
25
|
function SidebarHeader( { selectedWidgetAreaBlock } ) {
|
|
26
26
|
return (
|
|
27
|
-
<
|
|
28
|
-
<
|
|
27
|
+
<WCTabs.TabList>
|
|
28
|
+
<WCTabs.Tab tabId={ WIDGET_AREAS_IDENTIFIER }>
|
|
29
29
|
{ selectedWidgetAreaBlock
|
|
30
30
|
? selectedWidgetAreaBlock.attributes.name
|
|
31
31
|
: __( 'Widget Areas' ) }
|
|
32
|
-
</
|
|
33
|
-
<
|
|
32
|
+
</WCTabs.Tab>
|
|
33
|
+
<WCTabs.Tab tabId={ BLOCK_INSPECTOR_IDENTIFIER }>
|
|
34
34
|
{ __( 'Block' ) }
|
|
35
|
-
</
|
|
36
|
-
</
|
|
35
|
+
</WCTabs.Tab>
|
|
36
|
+
</WCTabs.TabList>
|
|
37
37
|
);
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -71,17 +71,17 @@ function SidebarContent( {
|
|
|
71
71
|
// block selection changes, not sidebar state changes.
|
|
72
72
|
}, [ hasSelectedNonAreaBlock, enableComplementaryArea ] );
|
|
73
73
|
|
|
74
|
-
const tabsContextValue = useContext(
|
|
74
|
+
const tabsContextValue = useContext( WCTabs.Context );
|
|
75
75
|
|
|
76
76
|
return (
|
|
77
77
|
<ComplementaryArea
|
|
78
78
|
className="edit-widgets-sidebar"
|
|
79
79
|
header={
|
|
80
|
-
<
|
|
80
|
+
<WCTabs.Context.Provider value={ tabsContextValue }>
|
|
81
81
|
<SidebarHeader
|
|
82
82
|
selectedWidgetAreaBlock={ selectedWidgetAreaBlock }
|
|
83
83
|
/>
|
|
84
|
-
</
|
|
84
|
+
</WCTabs.Context.Provider>
|
|
85
85
|
}
|
|
86
86
|
headerClassName="edit-widgets-sidebar__panel-tabs"
|
|
87
87
|
/* translators: button label text should, if possible, be under 16 characters. */
|
|
@@ -92,8 +92,8 @@ function SidebarContent( {
|
|
|
92
92
|
icon={ isRTL() ? drawerLeft : drawerRight }
|
|
93
93
|
isActiveByDefault={ SIDEBAR_ACTIVE_BY_DEFAULT }
|
|
94
94
|
>
|
|
95
|
-
<
|
|
96
|
-
<
|
|
95
|
+
<WCTabs.Context.Provider value={ tabsContextValue }>
|
|
96
|
+
<WCTabs.TabPanel
|
|
97
97
|
tabId={ WIDGET_AREAS_IDENTIFIER }
|
|
98
98
|
focusable={ false }
|
|
99
99
|
>
|
|
@@ -102,8 +102,8 @@ function SidebarContent( {
|
|
|
102
102
|
selectedWidgetAreaBlock?.attributes.id
|
|
103
103
|
}
|
|
104
104
|
/>
|
|
105
|
-
</
|
|
106
|
-
<
|
|
105
|
+
</WCTabs.TabPanel>
|
|
106
|
+
<WCTabs.TabPanel
|
|
107
107
|
tabId={ BLOCK_INSPECTOR_IDENTIFIER }
|
|
108
108
|
focusable={ false }
|
|
109
109
|
>
|
|
@@ -116,8 +116,8 @@ function SidebarContent( {
|
|
|
116
116
|
{ __( 'No block selected.' ) }
|
|
117
117
|
</span>
|
|
118
118
|
) }
|
|
119
|
-
</
|
|
120
|
-
</
|
|
119
|
+
</WCTabs.TabPanel>
|
|
120
|
+
</WCTabs.Context.Provider>
|
|
121
121
|
</ComplementaryArea>
|
|
122
122
|
);
|
|
123
123
|
}
|
|
@@ -189,7 +189,7 @@ export default function Sidebar() {
|
|
|
189
189
|
);
|
|
190
190
|
|
|
191
191
|
return (
|
|
192
|
-
<
|
|
192
|
+
<WCTabs
|
|
193
193
|
// Due to how this component is controlled (via a value from the
|
|
194
194
|
// `interfaceStore`), when the sidebar closes the currently selected
|
|
195
195
|
// tab can't be found. This causes the component to continuously reset
|
|
@@ -205,6 +205,6 @@ export default function Sidebar() {
|
|
|
205
205
|
isGeneralSidebarOpen={ isGeneralSidebarOpen }
|
|
206
206
|
selectedWidgetAreaBlock={ selectedWidgetAreaBlock }
|
|
207
207
|
/>
|
|
208
|
-
</
|
|
208
|
+
</WCTabs>
|
|
209
209
|
);
|
|
210
210
|
}
|
|
@@ -15,7 +15,7 @@ export default function WelcomeGuide() {
|
|
|
15
15
|
[]
|
|
16
16
|
);
|
|
17
17
|
|
|
18
|
-
const {
|
|
18
|
+
const { set: setPreference } = useDispatch( preferencesStore );
|
|
19
19
|
|
|
20
20
|
const widgetAreas = useSelect(
|
|
21
21
|
( select ) =>
|
|
@@ -45,7 +45,9 @@ export default function WelcomeGuide() {
|
|
|
45
45
|
className="edit-widgets-welcome-guide"
|
|
46
46
|
contentLabel={ __( 'Welcome to block Widgets' ) }
|
|
47
47
|
finishButtonText={ __( 'Get started' ) }
|
|
48
|
-
onFinish={ () =>
|
|
48
|
+
onFinish={ () =>
|
|
49
|
+
setPreference( 'core/edit-widgets', 'welcomeGuide', false )
|
|
50
|
+
}
|
|
49
51
|
pages={ [
|
|
50
52
|
{
|
|
51
53
|
image: (
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from '@wordpress/block-editor';
|
|
9
9
|
import { useViewportMatch } from '@wordpress/compose';
|
|
10
10
|
import { useSelect } from '@wordpress/data';
|
|
11
|
-
import { useMemo } from '@wordpress/element';
|
|
11
|
+
import { useMemo, useRef } from '@wordpress/element';
|
|
12
12
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
13
13
|
import Notices from '../notices';
|
|
14
14
|
import KeyboardShortcuts from '../keyboard-shortcuts';
|
|
@@ -25,6 +25,7 @@ export default function WidgetAreasBlockEditorContent( {
|
|
|
25
25
|
[]
|
|
26
26
|
);
|
|
27
27
|
const isLargeViewport = useViewportMatch( 'medium' );
|
|
28
|
+
const contentRef = useRef();
|
|
28
29
|
|
|
29
30
|
const styles = useMemo( () => {
|
|
30
31
|
return hasThemeStyles ? blockEditorSettings.styles : [];
|
|
@@ -34,14 +35,14 @@ export default function WidgetAreasBlockEditorContent( {
|
|
|
34
35
|
<div className="edit-widgets-block-editor">
|
|
35
36
|
<Notices />
|
|
36
37
|
{ ! isLargeViewport && <BlockToolbar hideDragHandle /> }
|
|
37
|
-
<BlockTools>
|
|
38
|
+
<BlockTools __unstableContentRef={ contentRef }>
|
|
38
39
|
<KeyboardShortcuts />
|
|
39
40
|
<EditorStyles
|
|
40
41
|
styles={ styles }
|
|
41
42
|
scope=":where(.editor-styles-wrapper)"
|
|
42
43
|
/>
|
|
43
44
|
<BlockSelectionClearer>
|
|
44
|
-
<WritingFlow>
|
|
45
|
+
<WritingFlow ref={ contentRef }>
|
|
45
46
|
<BlockList className="edit-widgets-main-block-list" />
|
|
46
47
|
</WritingFlow>
|
|
47
48
|
</BlockSelectionClearer>
|