@wordpress/edit-widgets 7.0.0 → 7.2.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 +77 -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 +38 -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 -108
- package/build/components/layout/interface.cjs.map +1 -7
- package/build/components/layout/unsaved-changes-warning.cjs +41 -48
- package/build/components/layout/unsaved-changes-warning.cjs.map +1 -7
- package/build/components/more-menu/index.cjs +124 -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 -64
- 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 +276 -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 +104 -129
- 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 +44 -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 +32 -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 -82
- package/build-module/components/layout/interface.mjs.map +1 -7
- package/build-module/components/layout/unsaved-changes-warning.mjs +35 -27
- package/build-module/components/layout/unsaved-changes-warning.mjs.map +1 -7
- package/build-module/components/more-menu/index.mjs +94 -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 +34 -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 +257 -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 +32 -11
- package/build-style/style.css +32 -11
- package/package.json +33 -33
- package/src/components/error-boundary/index.jsx +2 -2
- package/src/components/header/index.jsx +13 -4
- package/src/components/header/style.scss +30 -3
- package/src/components/keyboard-shortcut-help-modal/shortcut.jsx +1 -0
- 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 +18 -18
- package/src/components/welcome-guide/index.jsx +4 -2
- package/src/store/actions.js +25 -2
- package/src/store/test/actions.jsdom.test.js +230 -0
- package/build/filters/index.cjs.map +0 -7
- package/build-module/filters/index.mjs.map +0 -7
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { useSelect, useDispatch } from "@wordpress/data";
|
|
1
|
+
import { useDispatch, useSelect } from "@wordpress/data";
|
|
3
2
|
import { __, _x } from "@wordpress/i18n";
|
|
4
3
|
import { Button, ToolbarItem } from "@wordpress/components";
|
|
5
4
|
import { NavigableToolbar } from "@wordpress/block-editor";
|
|
@@ -8,89 +7,57 @@ import { useCallback } from "@wordpress/element";
|
|
|
8
7
|
import { useViewportMatch } from "@wordpress/compose";
|
|
9
8
|
import UndoButton from "../undo-redo/undo.mjs";
|
|
10
9
|
import RedoButton from "../undo-redo/redo.mjs";
|
|
11
|
-
import { store
|
|
10
|
+
import { store } from "../../../store/index.mjs";
|
|
12
11
|
import { unlock } from "../../../lock-unlock.mjs";
|
|
13
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
// packages/edit-widgets/src/components/header/document-tools/index.jsx
|
|
14
14
|
function DocumentTools() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
event.preventDefault();
|
|
61
|
-
},
|
|
62
|
-
onClick: toggleInserterSidebar,
|
|
63
|
-
icon: plus,
|
|
64
|
-
label: _x(
|
|
65
|
-
"Block Inserter",
|
|
66
|
-
"Generic label for block inserter button"
|
|
67
|
-
),
|
|
68
|
-
size: "compact"
|
|
69
|
-
}
|
|
70
|
-
),
|
|
71
|
-
isMediumViewport && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
72
|
-
/* @__PURE__ */ jsx(ToolbarItem, { as: UndoButton }),
|
|
73
|
-
/* @__PURE__ */ jsx(ToolbarItem, { as: RedoButton }),
|
|
74
|
-
/* @__PURE__ */ jsx(
|
|
75
|
-
ToolbarItem,
|
|
76
|
-
{
|
|
77
|
-
as: Button,
|
|
78
|
-
className: "edit-widgets-header-toolbar__list-view-toggle",
|
|
79
|
-
icon: listView,
|
|
80
|
-
isPressed: isListViewOpen,
|
|
81
|
-
label: __("List View"),
|
|
82
|
-
onClick: toggleListView,
|
|
83
|
-
ref: listViewToggleRef,
|
|
84
|
-
size: "compact"
|
|
85
|
-
}
|
|
86
|
-
)
|
|
87
|
-
] })
|
|
88
|
-
]
|
|
89
|
-
}
|
|
90
|
-
);
|
|
15
|
+
const isMediumViewport = useViewportMatch("medium");
|
|
16
|
+
const { isInserterOpen, isListViewOpen, inserterSidebarToggleRef, listViewToggleRef } = useSelect((select) => {
|
|
17
|
+
const { isInserterOpened, getInserterSidebarToggleRef, isListViewOpened, getListViewToggleRef } = unlock(select(store));
|
|
18
|
+
return {
|
|
19
|
+
isInserterOpen: isInserterOpened(),
|
|
20
|
+
isListViewOpen: isListViewOpened(),
|
|
21
|
+
inserterSidebarToggleRef: getInserterSidebarToggleRef(),
|
|
22
|
+
listViewToggleRef: getListViewToggleRef()
|
|
23
|
+
};
|
|
24
|
+
}, []);
|
|
25
|
+
const { setIsInserterOpened, setIsListViewOpened } = useDispatch(store);
|
|
26
|
+
const toggleListView = useCallback(() => setIsListViewOpened(!isListViewOpen), [setIsListViewOpened, isListViewOpen]);
|
|
27
|
+
const toggleInserterSidebar = useCallback(() => setIsInserterOpened(!isInserterOpen), [setIsInserterOpened, isInserterOpen]);
|
|
28
|
+
return /* @__PURE__ */ jsxs(NavigableToolbar, {
|
|
29
|
+
className: "edit-widgets-header-toolbar",
|
|
30
|
+
"aria-label": __("Document tools"),
|
|
31
|
+
variant: "unstyled",
|
|
32
|
+
children: [/* @__PURE__ */ jsx(ToolbarItem, {
|
|
33
|
+
ref: inserterSidebarToggleRef,
|
|
34
|
+
as: Button,
|
|
35
|
+
className: "edit-widgets-header-toolbar__inserter-toggle",
|
|
36
|
+
variant: "primary",
|
|
37
|
+
isPressed: isInserterOpen,
|
|
38
|
+
onMouseDown: (event) => {
|
|
39
|
+
event.preventDefault();
|
|
40
|
+
},
|
|
41
|
+
onClick: toggleInserterSidebar,
|
|
42
|
+
icon: plus,
|
|
43
|
+
label: _x("Block Inserter", "Generic label for block inserter button"),
|
|
44
|
+
size: "compact"
|
|
45
|
+
}), isMediumViewport && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
46
|
+
/* @__PURE__ */ jsx(ToolbarItem, { as: UndoButton }),
|
|
47
|
+
/* @__PURE__ */ jsx(ToolbarItem, { as: RedoButton }),
|
|
48
|
+
/* @__PURE__ */ jsx(ToolbarItem, {
|
|
49
|
+
as: Button,
|
|
50
|
+
className: "edit-widgets-header-toolbar__list-view-toggle",
|
|
51
|
+
icon: listView,
|
|
52
|
+
isPressed: isListViewOpen,
|
|
53
|
+
label: __("List View"),
|
|
54
|
+
onClick: toggleListView,
|
|
55
|
+
ref: listViewToggleRef,
|
|
56
|
+
size: "compact"
|
|
57
|
+
})
|
|
58
|
+
] })]
|
|
59
|
+
});
|
|
91
60
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
};
|
|
96
|
-
//# sourceMappingURL=index.mjs.map
|
|
61
|
+
export { DocumentTools as default };
|
|
62
|
+
|
|
63
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/components/header/document-tools/index.jsx"],
|
|
4
|
-
"sourcesContent": ["import { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport { Button, ToolbarItem } from '@wordpress/components';\nimport { NavigableToolbar } from '@wordpress/block-editor';\nimport { listView, plus } from '@wordpress/icons';\nimport { useCallback } from '@wordpress/element';\nimport { useViewportMatch } from '@wordpress/compose';\nimport UndoButton from '../undo-redo/undo';\nimport RedoButton from '../undo-redo/redo';\nimport { store as editWidgetsStore } from '../../../store';\nimport { unlock } from '../../../lock-unlock';\n\nfunction DocumentTools() {\n\tconst isMediumViewport = useViewportMatch( 'medium' );\n\n\tconst {\n\t\tisInserterOpen,\n\t\tisListViewOpen,\n\t\tinserterSidebarToggleRef,\n\t\tlistViewToggleRef,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tisInserterOpened,\n\t\t\tgetInserterSidebarToggleRef,\n\t\t\tisListViewOpened,\n\t\t\tgetListViewToggleRef,\n\t\t} = unlock( select( editWidgetsStore ) );\n\t\treturn {\n\t\t\tisInserterOpen: isInserterOpened(),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\tinserterSidebarToggleRef: getInserterSidebarToggleRef(),\n\t\t\tlistViewToggleRef: getListViewToggleRef(),\n\t\t};\n\t}, [] );\n\tconst { setIsInserterOpened, setIsListViewOpened } =\n\t\tuseDispatch( editWidgetsStore );\n\n\tconst toggleListView = useCallback(\n\t\t() => setIsListViewOpened( ! isListViewOpen ),\n\t\t[ setIsListViewOpened, isListViewOpen ]\n\t);\n\n\tconst toggleInserterSidebar = useCallback(\n\t\t() => setIsInserterOpened( ! isInserterOpen ),\n\t\t[ setIsInserterOpened, isInserterOpen ]\n\t);\n\n\treturn (\n\t\t<NavigableToolbar\n\t\t\tclassName=\"edit-widgets-header-toolbar\"\n\t\t\taria-label={ __( 'Document tools' ) }\n\t\t\tvariant=\"unstyled\"\n\t\t>\n\t\t\t<ToolbarItem\n\t\t\t\tref={ inserterSidebarToggleRef }\n\t\t\t\tas={ Button }\n\t\t\t\tclassName=\"edit-widgets-header-toolbar__inserter-toggle\"\n\t\t\t\tvariant=\"primary\"\n\t\t\t\tisPressed={ isInserterOpen }\n\t\t\t\tonMouseDown={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t} }\n\t\t\t\tonClick={ toggleInserterSidebar }\n\t\t\t\ticon={ plus }\n\t\t\t\t/* translators: button label text should, if possible, be under 16\n\t\t\t\t\tcharacters. */\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'Block Inserter',\n\t\t\t\t\t'Generic label for block inserter button'\n\t\t\t\t) }\n\t\t\t\tsize=\"compact\"\n\t\t\t/>\n\t\t\t{ isMediumViewport && (\n\t\t\t\t<>\n\t\t\t\t\t<ToolbarItem as={ UndoButton } />\n\t\t\t\t\t<ToolbarItem as={ RedoButton } />\n\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\tclassName=\"edit-widgets-header-toolbar__list-view-toggle\"\n\t\t\t\t\t\ticon={ listView }\n\t\t\t\t\t\tisPressed={ isListViewOpen }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'List View' ) }\n\t\t\t\t\t\tonClick={ toggleListView }\n\t\t\t\t\t\tref={ listViewToggleRef }\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</NavigableToolbar>\n\t);\n}\n\nexport default DocumentTools;\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,WAAW,mBAAmB;AACvC,SAAS,IAAI,UAAU;AACvB,SAAS,QAAQ,mBAAmB;AACpC,SAAS,wBAAwB;AACjC,SAAS,UAAU,YAAY;AAC/B,SAAS,mBAAmB;AAC5B,SAAS,wBAAwB;AACjC,OAAO,gBAAgB;AACvB,OAAO,gBAAgB;AACvB,SAAS,SAAS,wBAAwB;AAC1C,SAAS,cAAc;AA2CpB,SAoBC,UApBD,KAoBC,YApBD;AAzCH,SAAS,gBAAgB;AACxB,QAAM,mBAAmB,iBAAkB,QAAS;AAEpD,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,IAAI,UAAW,CAAE,WAAY;AAC5B,UAAM;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD,IAAI,OAAQ,OAAQ,gBAAiB,CAAE;AACvC,WAAO;AAAA,MACN,gBAAgB,iBAAiB;AAAA,MACjC,gBAAgB,iBAAiB;AAAA,MACjC,0BAA0B,4BAA4B;AAAA,MACtD,mBAAmB,qBAAqB;AAAA,IACzC;AAAA,EACD,GAAG,CAAC,CAAE;AACN,QAAM,EAAE,qBAAqB,oBAAoB,IAChD,YAAa,gBAAiB;AAE/B,QAAM,iBAAiB;AAAA,IACtB,MAAM,oBAAqB,CAAE,cAAe;AAAA,IAC5C,CAAE,qBAAqB,cAAe;AAAA,EACvC;AAEA,QAAM,wBAAwB;AAAA,IAC7B,MAAM,oBAAqB,CAAE,cAAe;AAAA,IAC5C,CAAE,qBAAqB,cAAe;AAAA,EACvC;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,cAAa,GAAI,gBAAiB;AAAA,MAClC,SAAQ;AAAA,MAER;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,KAAM;AAAA,YACN,IAAK;AAAA,YACL,WAAU;AAAA,YACV,SAAQ;AAAA,YACR,WAAY;AAAA,YACZ,aAAc,CAAE,UAAW;AAC1B,oBAAM,eAAe;AAAA,YACtB;AAAA,YACA,SAAU;AAAA,YACV,MAAO;AAAA,YAGP,OAAQ;AAAA,cACP;AAAA,cACA;AAAA,YACD;AAAA,YACA,MAAK;AAAA;AAAA,QACN;AAAA,QACE,oBACD,iCACC;AAAA,8BAAC,eAAY,IAAK,YAAa;AAAA,UAC/B,oBAAC,eAAY,IAAK,YAAa;AAAA,UAC/B;AAAA,YAAC;AAAA;AAAA,cACA,IAAK;AAAA,cACL,WAAU;AAAA,cACV,MAAO;AAAA,cACP,WAAY;AAAA,cAEZ,OAAQ,GAAI,WAAY;AAAA,cACxB,SAAU;AAAA,cACV,KAAM;AAAA,cACN,MAAK;AAAA;AAAA,UACN;AAAA,WACD;AAAA;AAAA;AAAA,EAEF;AAEF;AAEA,IAAO,yBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["editWidgetsStore"],"sources":["../../../../src/components/header/document-tools/index.jsx"],"sourcesContent":["import { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport { Button, ToolbarItem } from '@wordpress/components';\nimport { NavigableToolbar } from '@wordpress/block-editor';\nimport { listView, plus } from '@wordpress/icons';\nimport { useCallback } from '@wordpress/element';\nimport { useViewportMatch } from '@wordpress/compose';\nimport UndoButton from '../undo-redo/undo';\nimport RedoButton from '../undo-redo/redo';\nimport { store as editWidgetsStore } from '../../../store';\nimport { unlock } from '../../../lock-unlock';\n\nfunction DocumentTools() {\n\tconst isMediumViewport = useViewportMatch( 'medium' );\n\n\tconst {\n\t\tisInserterOpen,\n\t\tisListViewOpen,\n\t\tinserterSidebarToggleRef,\n\t\tlistViewToggleRef,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tisInserterOpened,\n\t\t\tgetInserterSidebarToggleRef,\n\t\t\tisListViewOpened,\n\t\t\tgetListViewToggleRef,\n\t\t} = unlock( select( editWidgetsStore ) );\n\t\treturn {\n\t\t\tisInserterOpen: isInserterOpened(),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\tinserterSidebarToggleRef: getInserterSidebarToggleRef(),\n\t\t\tlistViewToggleRef: getListViewToggleRef(),\n\t\t};\n\t}, [] );\n\tconst { setIsInserterOpened, setIsListViewOpened } =\n\t\tuseDispatch( editWidgetsStore );\n\n\tconst toggleListView = useCallback(\n\t\t() => setIsListViewOpened( ! isListViewOpen ),\n\t\t[ setIsListViewOpened, isListViewOpen ]\n\t);\n\n\tconst toggleInserterSidebar = useCallback(\n\t\t() => setIsInserterOpened( ! isInserterOpen ),\n\t\t[ setIsInserterOpened, isInserterOpen ]\n\t);\n\n\treturn (\n\t\t<NavigableToolbar\n\t\t\tclassName=\"edit-widgets-header-toolbar\"\n\t\t\taria-label={ __( 'Document tools' ) }\n\t\t\tvariant=\"unstyled\"\n\t\t>\n\t\t\t<ToolbarItem\n\t\t\t\tref={ inserterSidebarToggleRef }\n\t\t\t\tas={ Button }\n\t\t\t\tclassName=\"edit-widgets-header-toolbar__inserter-toggle\"\n\t\t\t\tvariant=\"primary\"\n\t\t\t\tisPressed={ isInserterOpen }\n\t\t\t\tonMouseDown={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t} }\n\t\t\t\tonClick={ toggleInserterSidebar }\n\t\t\t\ticon={ plus }\n\t\t\t\t/* translators: button label text should, if possible, be under 16\n\t\t\t\t\tcharacters. */\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'Block Inserter',\n\t\t\t\t\t'Generic label for block inserter button'\n\t\t\t\t) }\n\t\t\t\tsize=\"compact\"\n\t\t\t/>\n\t\t\t{ isMediumViewport && (\n\t\t\t\t<>\n\t\t\t\t\t<ToolbarItem as={ UndoButton } />\n\t\t\t\t\t<ToolbarItem as={ RedoButton } />\n\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\tclassName=\"edit-widgets-header-toolbar__list-view-toggle\"\n\t\t\t\t\t\ticon={ listView }\n\t\t\t\t\t\tisPressed={ isListViewOpen }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'List View' ) }\n\t\t\t\t\t\tonClick={ toggleListView }\n\t\t\t\t\t\tref={ listViewToggleRef }\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</NavigableToolbar>\n\t);\n}\n\nexport default DocumentTools;\n"],"mappings":";;;;;;;;;;;;;AAYA,SAAS,gBAAgB;CACxB,MAAM,mBAAmB,iBAAkB,QAAS;CAEpD,MAAM,EACL,gBACA,gBACA,0BACA,sBACG,WAAa,WAAY;EAC5B,MAAM,EACL,kBACA,6BACA,kBACA,yBACG,OAAQ,OAAQA,KAAiB,CAAE;EACvC,OAAO;GACN,gBAAgB,iBAAiB;GACjC,gBAAgB,iBAAiB;GACjC,0BAA0B,4BAA4B;GACtD,mBAAmB,qBAAqB;EACzC;CACD,GAAG,CAAC,CAAE;CACN,MAAM,EAAE,qBAAqB,wBAC5B,YAAaA,KAAiB;CAE/B,MAAM,iBAAiB,kBAChB,oBAAqB,CAAE,cAAe,GAC5C,CAAE,qBAAqB,cAAe,CACvC;CAEA,MAAM,wBAAwB,kBACvB,oBAAqB,CAAE,cAAe,GAC5C,CAAE,qBAAqB,cAAe,CACvC;CAEA,OACC,qBAAC,kBAAD;EACC,WAAU;EACV,cAAa,GAAI,gBAAiB;EAClC,SAAQ;EAHT,UAAA,CAKC,oBAAC,aAAD;GACC,KAAM;GACN,IAAK;GACL,WAAU;GACV,SAAQ;GACR,WAAY;GACZ,cAAgB,UAAW;IAC1B,MAAM,eAAe;GACtB;GACA,SAAU;GACV,MAAO;GAGP,OAAQ,GACP,kBACA,yCACD;GACA,MAAK;EACL,CAAA,GACC,oBACD,qBAAA,UAAA,EAAA,UAAA;GACC,oBAAC,aAAD,EAAa,IAAK,WAAc,CAAA;GAChC,oBAAC,aAAD,EAAa,IAAK,WAAc,CAAA;GAChC,oBAAC,aAAD;IACC,IAAK;IACL,WAAU;IACV,MAAO;IACP,WAAY;IAEZ,OAAQ,GAAI,WAAY;IACxB,SAAU;IACV,KAAM;IACN,MAAK;GACL,CAAA;EACA,EAAA,CAAA,CAEc;;AAEpB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import clsx from "clsx";
|
|
2
2
|
import { BlockToolbar } from "@wordpress/block-editor";
|
|
3
3
|
import { useSelect } from "@wordpress/data";
|
|
4
4
|
import { useRef } from "@wordpress/element";
|
|
@@ -6,56 +6,53 @@ import { __ } from "@wordpress/i18n";
|
|
|
6
6
|
import { Popover } from "@wordpress/components";
|
|
7
7
|
import { PinnedItems } from "@wordpress/interface";
|
|
8
8
|
import { useViewportMatch } from "@wordpress/compose";
|
|
9
|
-
import { store
|
|
9
|
+
import { store } from "@wordpress/preferences";
|
|
10
10
|
import { VisuallyHidden } from "@wordpress/ui";
|
|
11
11
|
import DocumentTools from "./document-tools/index.mjs";
|
|
12
12
|
import SaveButton from "../save-button/index.mjs";
|
|
13
13
|
import MoreMenu from "../more-menu/index.mjs";
|
|
14
14
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
// packages/edit-widgets/src/components/header/index.jsx
|
|
15
16
|
function Header() {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
] })
|
|
55
|
-
] }) });
|
|
17
|
+
const isLargeViewport = useViewportMatch("medium");
|
|
18
|
+
const blockToolbarRef = useRef();
|
|
19
|
+
const { hasFixedToolbar, showIconLabels } = useSelect((select) => ({
|
|
20
|
+
hasFixedToolbar: !!select(store).get("core/edit-widgets", "fixedToolbar"),
|
|
21
|
+
showIconLabels: select(store).get("core", "showIconLabels")
|
|
22
|
+
}), []);
|
|
23
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", {
|
|
24
|
+
className: clsx("edit-widgets-header", { "has-icon-labels": showIconLabels }),
|
|
25
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
26
|
+
className: "edit-widgets-header__navigable-toolbar-wrapper",
|
|
27
|
+
children: [
|
|
28
|
+
isLargeViewport && /* @__PURE__ */ jsx("h1", {
|
|
29
|
+
className: "edit-widgets-header__title",
|
|
30
|
+
children: __("Widgets")
|
|
31
|
+
}),
|
|
32
|
+
!isLargeViewport && /* @__PURE__ */ jsx(VisuallyHidden, {
|
|
33
|
+
className: "edit-widgets-header__title",
|
|
34
|
+
render: /* @__PURE__ */ jsx("h1", {}),
|
|
35
|
+
children: __("Widgets")
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ jsx(DocumentTools, {}),
|
|
38
|
+
hasFixedToolbar && isLargeViewport && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
39
|
+
className: "selected-block-tools-wrapper",
|
|
40
|
+
children: /* @__PURE__ */ jsx(BlockToolbar, { hideDragHandle: true })
|
|
41
|
+
}), /* @__PURE__ */ jsx(Popover.Slot, {
|
|
42
|
+
ref: blockToolbarRef,
|
|
43
|
+
name: "block-toolbar"
|
|
44
|
+
})] })
|
|
45
|
+
]
|
|
46
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
47
|
+
className: "edit-widgets-header__actions",
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ jsx(PinnedItems.Slot, { scope: "core/edit-widgets" }),
|
|
50
|
+
/* @__PURE__ */ jsx(SaveButton, {}),
|
|
51
|
+
/* @__PURE__ */ jsx(MoreMenu, {})
|
|
52
|
+
]
|
|
53
|
+
})]
|
|
54
|
+
}) });
|
|
56
55
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
};
|
|
61
|
-
//# sourceMappingURL=index.mjs.map
|
|
56
|
+
export { Header as default };
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/header/index.jsx"],
|
|
4
|
-
"sourcesContent": ["import { BlockToolbar } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { useRef } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Popover } from '@wordpress/components';\nimport { PinnedItems } from '@wordpress/interface';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { VisuallyHidden } from '@wordpress/ui';\nimport DocumentTools from './document-tools';\nimport SaveButton from '../save-button';\nimport MoreMenu from '../more-menu';\n\nfunction Header() {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst blockToolbarRef = useRef();\n\tconst { hasFixedToolbar } = useSelect(\n\t\t( select ) => ( {\n\t\t\thasFixedToolbar: !! select( preferencesStore ).get(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\t'fixedToolbar'\n\t\t\t),\n\t\t} ),\n\t\t[]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-widgets-header\">\n\t\t\t\t<div className=\"edit-widgets-header__navigable-toolbar-wrapper\">\n\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t<h1 className=\"edit-widgets-header__title\">\n\t\t\t\t\t\t\t{ __( 'Widgets' ) }\n\t\t\t\t\t\t</h1>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! isLargeViewport && (\n\t\t\t\t\t\t<VisuallyHidden\n\t\t\t\t\t\t\tclassName=\"edit-widgets-header__title\"\n\t\t\t\t\t\t\trender={ <h1 /> }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Widgets' ) }\n\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t) }\n\t\t\t\t\t<DocumentTools />\n\t\t\t\t\t{ hasFixedToolbar && isLargeViewport && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"selected-block-tools-wrapper\">\n\t\t\t\t\t\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Popover.Slot\n\t\t\t\t\t\t\t\tref={ blockToolbarRef }\n\t\t\t\t\t\t\t\tname=\"block-toolbar\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t\t<div className=\"edit-widgets-header__actions\">\n\t\t\t\t\t<PinnedItems.Slot scope=\"core/edit-widgets\" />\n\t\t\t\t\t<SaveButton />\n\t\t\t\t\t<MoreMenu />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Header;\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,cAAc;AACvB,SAAS,UAAU;AACnB,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAC5B,SAAS,wBAAwB;AACjC,SAAS,SAAS,wBAAwB;AAC1C,SAAS,sBAAsB;AAC/B,OAAO,mBAAmB;AAC1B,OAAO,gBAAgB;AACvB,OAAO,cAAc;AAoBf,SAcA,UAdA,KAcA,YAdA;AAlBN,SAAS,SAAS;AACjB,QAAM,kBAAkB,iBAAkB,QAAS;AACnD,QAAM,kBAAkB,OAAO;AAC/B,QAAM,EAAE,gBAAgB,IAAI;AAAA,IAC3B,CAAE,YAAc;AAAA,MACf,iBAAiB,CAAC,CAAE,OAAQ,gBAAiB,EAAE;AAAA,QAC9C;AAAA,QACA;AAAA,MACD;AAAA,IACD;AAAA,IACA,CAAC;AAAA,EACF;AAEA,SACC,gCACC,+BAAC,SAAI,WAAU,uBACd;AAAA,yBAAC,SAAI,WAAU,kDACZ;AAAA,yBACD,oBAAC,QAAG,WAAU,8BACX,aAAI,SAAU,GACjB;AAAA,MAEC,CAAE,mBACH;AAAA,QAAC;AAAA;AAAA,UACA,WAAU;AAAA,UACV,QAAS,oBAAC,QAAG;AAAA,UAEX,aAAI,SAAU;AAAA;AAAA,MACjB;AAAA,MAED,oBAAC,iBAAc;AAAA,MACb,mBAAmB,mBACpB,iCACC;AAAA,4BAAC,SAAI,WAAU,gCACd,8BAAC,gBAAa,gBAAc,MAAC,GAC9B;AAAA,QACA;AAAA,UAAC,QAAQ;AAAA,UAAR;AAAA,YACA,KAAM;AAAA,YACN,MAAK;AAAA;AAAA,QACN;AAAA,SACD;AAAA,OAEF;AAAA,IACA,qBAAC,SAAI,WAAU,gCACd;AAAA,0BAAC,YAAY,MAAZ,EAAiB,OAAM,qBAAoB;AAAA,MAC5C,oBAAC,cAAW;AAAA,MACZ,oBAAC,YAAS;AAAA,OACX;AAAA,KACD,GACD;AAEF;AAEA,IAAO,iBAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["preferencesStore","WCPopover"],"sources":["../../../src/components/header/index.jsx"],"sourcesContent":["import clsx from 'clsx';\nimport { BlockToolbar } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { useRef } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Popover as WCPopover } from '@wordpress/components';\nimport { PinnedItems } from '@wordpress/interface';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { VisuallyHidden } from '@wordpress/ui';\nimport DocumentTools from './document-tools';\nimport SaveButton from '../save-button';\nimport MoreMenu from '../more-menu';\n\nfunction Header() {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst blockToolbarRef = useRef();\n\tconst { hasFixedToolbar, showIconLabels } = useSelect(\n\t\t( select ) => ( {\n\t\t\thasFixedToolbar: !! select( preferencesStore ).get(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\t'fixedToolbar'\n\t\t\t),\n\t\t\tshowIconLabels: select( preferencesStore ).get(\n\t\t\t\t'core',\n\t\t\t\t'showIconLabels'\n\t\t\t),\n\t\t} ),\n\t\t[]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'edit-widgets-header', {\n\t\t\t\t\t'has-icon-labels': showIconLabels,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<div className=\"edit-widgets-header__navigable-toolbar-wrapper\">\n\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t<h1 className=\"edit-widgets-header__title\">\n\t\t\t\t\t\t\t{ __( 'Widgets' ) }\n\t\t\t\t\t\t</h1>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! isLargeViewport && (\n\t\t\t\t\t\t<VisuallyHidden\n\t\t\t\t\t\t\tclassName=\"edit-widgets-header__title\"\n\t\t\t\t\t\t\trender={ <h1 /> }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Widgets' ) }\n\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t) }\n\t\t\t\t\t<DocumentTools />\n\t\t\t\t\t{ hasFixedToolbar && isLargeViewport && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"selected-block-tools-wrapper\">\n\t\t\t\t\t\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<WCPopover.Slot\n\t\t\t\t\t\t\t\tref={ blockToolbarRef }\n\t\t\t\t\t\t\t\tname=\"block-toolbar\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t\t<div className=\"edit-widgets-header__actions\">\n\t\t\t\t\t<PinnedItems.Slot scope=\"core/edit-widgets\" />\n\t\t\t\t\t<SaveButton />\n\t\t\t\t\t<MoreMenu />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Header;\n"],"mappings":";;;;;;;;;;;;;;;AAcA,SAAS,SAAS;CACjB,MAAM,kBAAkB,iBAAkB,QAAS;CACnD,MAAM,kBAAkB,OAAO;CAC/B,MAAM,EAAE,iBAAiB,mBAAmB,WACzC,YAAc;EACf,iBAAiB,CAAC,CAAE,OAAQA,KAAiB,CAAC,CAAC,IAC9C,qBACA,cACD;EACA,gBAAgB,OAAQA,KAAiB,CAAC,CAAC,IAC1C,QACA,gBACD;CACD,IACA,CAAC,CACF;CAEA,OACC,oBAAA,UAAA,EAAA,UACC,qBAAC,OAAD;EACC,WAAY,KAAM,uBAAuB,EACxC,mBAAmB,eACpB,CAAE;EAHH,UAAA,CAKC,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA;IACG,mBACD,oBAAC,MAAD;KAAI,WAAU;KACX,UAAA,GAAI,SAAU;IACb,CAAA;IAEH,CAAE,mBACH,oBAAC,gBAAD;KACC,WAAU;KACV,QAAS,oBAAC,MAAD,CAAK,CAAA;KAEZ,UAAA,GAAI,SAAU;IACD,CAAA;IAEjB,oBAAC,eAAD,CAAgB,CAAA;IACd,mBAAmB,mBACpB,qBAAA,UAAA,EAAA,UAAA,CACC,oBAAC,OAAD;KAAK,WAAU;KACd,UAAA,oBAAC,cAAD,EAAc,gBAAA,KAAgB,CAAA;IAC1B,CAAA,GACL,oBAACC,QAAU,MAAX;KACC,KAAM;KACN,MAAK;IACL,CAAA,CACA,EAAA,CAAA;GAEC;EACL,CAAA,GAAA,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA;IACC,oBAAC,YAAY,MAAb,EAAkB,OAAM,oBAAqB,CAAA;IAC7C,oBAAC,YAAD,CAAa,CAAA;IACb,oBAAC,UAAD,CAAW,CAAA;GACP;EACD,CAAA,CAAA;CACJ,CAAA,EAAA,CAAA;AAEJ"}
|
|
@@ -1,35 +1,28 @@
|
|
|
1
|
-
// packages/edit-widgets/src/components/header/undo-redo/redo.jsx
|
|
2
1
|
import { __, isRTL } from "@wordpress/i18n";
|
|
3
2
|
import { Button } from "@wordpress/components";
|
|
4
|
-
import {
|
|
5
|
-
import { redo
|
|
3
|
+
import { useDispatch, useSelect } from "@wordpress/data";
|
|
4
|
+
import { redo, undo } from "@wordpress/icons";
|
|
6
5
|
import { displayShortcut, isAppleOS } from "@wordpress/keycodes";
|
|
7
|
-
import { store
|
|
6
|
+
import { store } from "@wordpress/core-data";
|
|
8
7
|
import { forwardRef } from "@wordpress/element";
|
|
9
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
// packages/edit-widgets/src/components/header/undo-redo/redo.jsx
|
|
10
10
|
function RedoButton(props, ref) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
shortcut,
|
|
25
|
-
"aria-disabled": !hasRedo,
|
|
26
|
-
onClick: hasRedo ? redo : void 0,
|
|
27
|
-
size: "compact"
|
|
28
|
-
}
|
|
29
|
-
);
|
|
11
|
+
const shortcut = isAppleOS() ? displayShortcut.primaryShift("z") : displayShortcut.primary("y");
|
|
12
|
+
const hasRedo = useSelect((select) => select(store).hasRedo(), []);
|
|
13
|
+
const { redo: redo$1 } = useDispatch(store);
|
|
14
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
15
|
+
...props,
|
|
16
|
+
ref,
|
|
17
|
+
icon: !isRTL() ? redo : undo,
|
|
18
|
+
label: __("Redo"),
|
|
19
|
+
shortcut,
|
|
20
|
+
"aria-disabled": !hasRedo,
|
|
21
|
+
onClick: hasRedo ? redo$1 : void 0,
|
|
22
|
+
size: "compact"
|
|
23
|
+
});
|
|
30
24
|
}
|
|
31
25
|
var redo_default = forwardRef(RedoButton);
|
|
32
|
-
export {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
//# sourceMappingURL=redo.mjs.map
|
|
26
|
+
export { redo_default as default };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=redo.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/components/header/undo-redo/redo.jsx"],
|
|
4
|
-
"sourcesContent": ["import { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { redo as redoIcon, undo as undoIcon } from '@wordpress/icons';\nimport { displayShortcut, isAppleOS } from '@wordpress/keycodes';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { forwardRef } from '@wordpress/element';\n\nfunction RedoButton( props, ref ) {\n\tconst shortcut = isAppleOS()\n\t\t? displayShortcut.primaryShift( 'z' )\n\t\t: displayShortcut.primary( 'y' );\n\n\tconst hasRedo = useSelect(\n\t\t( select ) => select( coreStore ).hasRedo(),\n\t\t[]\n\t);\n\tconst { redo } = useDispatch( coreStore );\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? redoIcon : undoIcon }\n\t\t\tlabel={ __( 'Redo' ) }\n\t\t\tshortcut={ shortcut }\n\t\t\t// If there are no undo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasRedo }\n\t\t\tonClick={ hasRedo ? redo : undefined }\n\t\t\tsize=\"compact\"\n\t\t/>\n\t);\n}\n\nexport default forwardRef( RedoButton );\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,IAAI,aAAa;AAC1B,SAAS,cAAc;AACvB,SAAS,WAAW,mBAAmB;AACvC,SAAS,QAAQ,UAAU,QAAQ,gBAAgB;AACnD,SAAS,iBAAiB,iBAAiB;AAC3C,SAAS,SAAS,iBAAiB;AACnC,SAAS,kBAAkB;AAazB;AAXF,SAAS,WAAY,OAAO,KAAM;AACjC,QAAM,WAAW,UAAU,IACxB,gBAAgB,aAAc,GAAI,IAClC,gBAAgB,QAAS,GAAI;AAEhC,QAAM,UAAU;AAAA,IACf,CAAE,WAAY,OAAQ,SAAU,EAAE,QAAQ;AAAA,IAC1C,CAAC;AAAA,EACF;AACA,QAAM,EAAE,KAAK,IAAI,YAAa,SAAU;AACxC,SACC;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACL;AAAA,MACA,MAAO,CAAE,MAAM,IAAI,WAAW;AAAA,MAC9B,OAAQ,GAAI,MAAO;AAAA,MACnB;AAAA,MAIA,iBAAgB,CAAE;AAAA,MAClB,SAAU,UAAU,OAAO;AAAA,MAC3B,MAAK;AAAA;AAAA,EACN;AAEF;AAEA,IAAO,eAAQ,WAAY,UAAW;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"redo.mjs","names":["coreStore","redoIcon","undoIcon","redo"],"sources":["../../../../src/components/header/undo-redo/redo.jsx"],"sourcesContent":["import { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { redo as redoIcon, undo as undoIcon } from '@wordpress/icons';\nimport { displayShortcut, isAppleOS } from '@wordpress/keycodes';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { forwardRef } from '@wordpress/element';\n\nfunction RedoButton( props, ref ) {\n\tconst shortcut = isAppleOS()\n\t\t? displayShortcut.primaryShift( 'z' )\n\t\t: displayShortcut.primary( 'y' );\n\n\tconst hasRedo = useSelect(\n\t\t( select ) => select( coreStore ).hasRedo(),\n\t\t[]\n\t);\n\tconst { redo } = useDispatch( coreStore );\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? redoIcon : undoIcon }\n\t\t\tlabel={ __( 'Redo' ) }\n\t\t\tshortcut={ shortcut }\n\t\t\t// If there are no undo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasRedo }\n\t\t\tonClick={ hasRedo ? redo : undefined }\n\t\t\tsize=\"compact\"\n\t\t/>\n\t);\n}\n\nexport default forwardRef( RedoButton );\n"],"mappings":";;;;;;;;;AAQA,SAAS,WAAY,OAAO,KAAM;CACjC,MAAM,WAAW,UAAU,IACxB,gBAAgB,aAAc,GAAI,IAClC,gBAAgB,QAAS,GAAI;CAEhC,MAAM,UAAU,WACb,WAAY,OAAQA,KAAU,CAAC,CAAC,QAAQ,GAC1C,CAAC,CACF;CACA,MAAM,EAAE,MAAA,WAAS,YAAaA,KAAU;CACxC,OACC,oBAAC,QAAD;EACC,GAAK;EACC;EACN,MAAO,CAAE,MAAM,IAAIC,OAAWC;EAC9B,OAAQ,GAAI,MAAO;EACR;EAIX,iBAAgB,CAAE;EAClB,SAAU,UAAUC,SAAO,KAAA;EAC3B,MAAK;CACL,CAAA;AAEH;AAEA,IAAA,eAAe,WAAY,UAAW"}
|
|
@@ -1,34 +1,27 @@
|
|
|
1
|
-
// packages/edit-widgets/src/components/header/undo-redo/undo.jsx
|
|
2
1
|
import { __, isRTL } from "@wordpress/i18n";
|
|
3
2
|
import { Button } from "@wordpress/components";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { useDispatch, useSelect } from "@wordpress/data";
|
|
4
|
+
import { redo, undo } from "@wordpress/icons";
|
|
6
5
|
import { displayShortcut } from "@wordpress/keycodes";
|
|
7
|
-
import { store
|
|
6
|
+
import { store } from "@wordpress/core-data";
|
|
8
7
|
import { forwardRef } from "@wordpress/element";
|
|
9
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
// packages/edit-widgets/src/components/header/undo-redo/undo.jsx
|
|
10
10
|
function UndoButton(props, ref) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
shortcut: displayShortcut.primary("z"),
|
|
24
|
-
"aria-disabled": !hasUndo,
|
|
25
|
-
onClick: hasUndo ? undo : void 0,
|
|
26
|
-
size: "compact"
|
|
27
|
-
}
|
|
28
|
-
);
|
|
11
|
+
const hasUndo = useSelect((select) => select(store).hasUndo(), []);
|
|
12
|
+
const { undo: undo$1 } = useDispatch(store);
|
|
13
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
14
|
+
...props,
|
|
15
|
+
ref,
|
|
16
|
+
icon: !isRTL() ? undo : redo,
|
|
17
|
+
label: __("Undo"),
|
|
18
|
+
shortcut: displayShortcut.primary("z"),
|
|
19
|
+
"aria-disabled": !hasUndo,
|
|
20
|
+
onClick: hasUndo ? undo$1 : void 0,
|
|
21
|
+
size: "compact"
|
|
22
|
+
});
|
|
29
23
|
}
|
|
30
24
|
var undo_default = forwardRef(UndoButton);
|
|
31
|
-
export {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
//# sourceMappingURL=undo.mjs.map
|
|
25
|
+
export { undo_default as default };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=undo.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/components/header/undo-redo/undo.jsx"],
|
|
4
|
-
"sourcesContent": ["import { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { undo as undoIcon, redo as redoIcon } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { forwardRef } from '@wordpress/element';\n\nfunction UndoButton( props, ref ) {\n\tconst hasUndo = useSelect(\n\t\t( select ) => select( coreStore ).hasUndo(),\n\t\t[]\n\t);\n\tconst { undo } = useDispatch( coreStore );\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? undoIcon : redoIcon }\n\t\t\tlabel={ __( 'Undo' ) }\n\t\t\tshortcut={ displayShortcut.primary( 'z' ) }\n\t\t\t// If there are no undo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasUndo }\n\t\t\tonClick={ hasUndo ? undo : undefined }\n\t\t\tsize=\"compact\"\n\t\t/>\n\t);\n}\n\nexport default forwardRef( UndoButton );\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,IAAI,aAAa;AAC1B,SAAS,cAAc;AACvB,SAAS,WAAW,mBAAmB;AACvC,SAAS,QAAQ,UAAU,QAAQ,gBAAgB;AACnD,SAAS,uBAAuB;AAChC,SAAS,SAAS,iBAAiB;AACnC,SAAS,kBAAkB;AASzB;AAPF,SAAS,WAAY,OAAO,KAAM;AACjC,QAAM,UAAU;AAAA,IACf,CAAE,WAAY,OAAQ,SAAU,EAAE,QAAQ;AAAA,IAC1C,CAAC;AAAA,EACF;AACA,QAAM,EAAE,KAAK,IAAI,YAAa,SAAU;AACxC,SACC;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACL;AAAA,MACA,MAAO,CAAE,MAAM,IAAI,WAAW;AAAA,MAC9B,OAAQ,GAAI,MAAO;AAAA,MACnB,UAAW,gBAAgB,QAAS,GAAI;AAAA,MAIxC,iBAAgB,CAAE;AAAA,MAClB,SAAU,UAAU,OAAO;AAAA,MAC3B,MAAK;AAAA;AAAA,EACN;AAEF;AAEA,IAAO,eAAQ,WAAY,UAAW;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"undo.mjs","names":["coreStore","undoIcon","redoIcon","undo"],"sources":["../../../../src/components/header/undo-redo/undo.jsx"],"sourcesContent":["import { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { undo as undoIcon, redo as redoIcon } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { forwardRef } from '@wordpress/element';\n\nfunction UndoButton( props, ref ) {\n\tconst hasUndo = useSelect(\n\t\t( select ) => select( coreStore ).hasUndo(),\n\t\t[]\n\t);\n\tconst { undo } = useDispatch( coreStore );\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? undoIcon : redoIcon }\n\t\t\tlabel={ __( 'Undo' ) }\n\t\t\tshortcut={ displayShortcut.primary( 'z' ) }\n\t\t\t// If there are no undo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasUndo }\n\t\t\tonClick={ hasUndo ? undo : undefined }\n\t\t\tsize=\"compact\"\n\t\t/>\n\t);\n}\n\nexport default forwardRef( UndoButton );\n"],"mappings":";;;;;;;;;AAQA,SAAS,WAAY,OAAO,KAAM;CACjC,MAAM,UAAU,WACb,WAAY,OAAQA,KAAU,CAAC,CAAC,QAAQ,GAC1C,CAAC,CACF;CACA,MAAM,EAAE,MAAA,WAAS,YAAaA,KAAU;CACxC,OACC,oBAAC,QAAD;EACC,GAAK;EACC;EACN,MAAO,CAAE,MAAM,IAAIC,OAAWC;EAC9B,OAAQ,GAAI,MAAO;EACnB,UAAW,gBAAgB,QAAS,GAAI;EAIxC,iBAAgB,CAAE;EAClB,SAAU,UAAUC,SAAO,KAAA;EAC3B,MAAK;CACL,CAAA;AAEH;AAEA,IAAA,eAAe,WAAY,UAAW"}
|
|
@@ -1,63 +1,85 @@
|
|
|
1
|
-
// packages/edit-widgets/src/components/keyboard-shortcut-help-modal/config.js
|
|
2
1
|
import { __ } from "@wordpress/i18n";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
2
|
+
// packages/edit-widgets/src/components/keyboard-shortcut-help-modal/config.js
|
|
3
|
+
const textFormattingShortcuts = [
|
|
4
|
+
{
|
|
5
|
+
keyCombination: {
|
|
6
|
+
modifier: "primary",
|
|
7
|
+
character: "b"
|
|
8
|
+
},
|
|
9
|
+
description: __("Make the selected text bold.")
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
keyCombination: {
|
|
13
|
+
modifier: "primary",
|
|
14
|
+
character: "i"
|
|
15
|
+
},
|
|
16
|
+
description: __("Make the selected text italic.")
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
keyCombination: {
|
|
20
|
+
modifier: "primary",
|
|
21
|
+
character: "k"
|
|
22
|
+
},
|
|
23
|
+
description: __("Convert the selected text into a link.")
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
keyCombination: {
|
|
27
|
+
modifier: "primaryShift",
|
|
28
|
+
character: "k"
|
|
29
|
+
},
|
|
30
|
+
description: __("Remove a link.")
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
keyCombination: { character: "[[" },
|
|
34
|
+
description: __("Insert a link to a post or page.")
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
keyCombination: {
|
|
38
|
+
modifier: "primary",
|
|
39
|
+
character: "u"
|
|
40
|
+
},
|
|
41
|
+
description: __("Underline the selected text.")
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
keyCombination: {
|
|
45
|
+
modifier: "access",
|
|
46
|
+
character: "d"
|
|
47
|
+
},
|
|
48
|
+
description: __("Strikethrough the selected text.")
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
keyCombination: {
|
|
52
|
+
modifier: "access",
|
|
53
|
+
character: "x"
|
|
54
|
+
},
|
|
55
|
+
description: __("Make the selected text inline code.")
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
keyCombination: {
|
|
59
|
+
modifier: "access",
|
|
60
|
+
character: "0"
|
|
61
|
+
},
|
|
62
|
+
aliases: [{
|
|
63
|
+
modifier: "access",
|
|
64
|
+
character: "7"
|
|
65
|
+
}],
|
|
66
|
+
description: __("Convert the current heading to a paragraph.")
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
keyCombination: {
|
|
70
|
+
modifier: "access",
|
|
71
|
+
character: "1-6"
|
|
72
|
+
},
|
|
73
|
+
description: __("Convert the current paragraph or heading to a heading of level 1 to 6.")
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
keyCombination: {
|
|
77
|
+
modifier: "primaryShift",
|
|
78
|
+
character: "SPACE"
|
|
79
|
+
},
|
|
80
|
+
description: __("Add non breaking space.")
|
|
81
|
+
}
|
|
59
82
|
];
|
|
60
|
-
export {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
//# sourceMappingURL=config.mjs.map
|
|
83
|
+
export { textFormattingShortcuts };
|
|
84
|
+
|
|
85
|
+
//# sourceMappingURL=config.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/keyboard-shortcut-help-modal/config.js"],
|
|
4
|
-
"sourcesContent": ["import { __ } from '@wordpress/i18n';\n\nexport const textFormattingShortcuts = [\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'b' },\n\t\tdescription: __( 'Make the selected text bold.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'i' },\n\t\tdescription: __( 'Make the selected text italic.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'k' },\n\t\tdescription: __( 'Convert the selected text into a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'k' },\n\t\tdescription: __( 'Remove a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { character: '[[' },\n\t\tdescription: __( 'Insert a link to a post or page.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'u' },\n\t\tdescription: __( 'Underline the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'd' },\n\t\tdescription: __( 'Strikethrough the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'x' },\n\t\tdescription: __( 'Make the selected text inline code.' ),\n\t},\n\t{\n\t\tkeyCombination: {\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: '0',\n\t\t},\n\t\taliases: [\n\t\t\t{\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: '7',\n\t\t\t},\n\t\t],\n\t\tdescription: __( 'Convert the current heading to a paragraph.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '1-6' },\n\t\tdescription: __(\n\t\t\t'Convert the current paragraph or heading to a heading of level 1 to 6.'\n\t\t),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'SPACE' },\n\t\tdescription: __( 'Add non breaking space.' ),\n\t},\n];\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,UAAU;AAEZ,IAAM,0BAA0B;AAAA,EACtC;AAAA,IACC,gBAAgB,EAAE,UAAU,WAAW,WAAW,IAAI;AAAA,IACtD,aAAa,GAAI,8BAA+B;AAAA,EACjD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,WAAW,WAAW,IAAI;AAAA,IACtD,aAAa,GAAI,gCAAiC;AAAA,EACnD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,WAAW,WAAW,IAAI;AAAA,IACtD,aAAa,GAAI,wCAAyC;AAAA,EAC3D;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,gBAAgB,WAAW,IAAI;AAAA,IAC3D,aAAa,GAAI,gBAAiB;AAAA,EACnC;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,WAAW,KAAK;AAAA,IAClC,aAAa,GAAI,kCAAmC;AAAA,EACrD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,WAAW,WAAW,IAAI;AAAA,IACtD,aAAa,GAAI,8BAA+B;AAAA,EACjD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,UAAU,WAAW,IAAI;AAAA,IACrD,aAAa,GAAI,kCAAmC;AAAA,EACrD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,UAAU,WAAW,IAAI;AAAA,IACrD,aAAa,GAAI,qCAAsC;AAAA,EACxD;AAAA,EACA;AAAA,IACC,gBAAgB;AAAA,MACf,UAAU;AAAA,MACV,WAAW;AAAA,IACZ;AAAA,IACA,SAAS;AAAA,MACR;AAAA,QACC,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,IACD;AAAA,IACA,aAAa,GAAI,6CAA8C;AAAA,EAChE;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,UAAU,WAAW,MAAM;AAAA,IACvD,aAAa;AAAA,MACZ;AAAA,IACD;AAAA,EACD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,gBAAgB,WAAW,QAAQ;AAAA,IAC/D,aAAa,GAAI,yBAA0B;AAAA,EAC5C;AACD;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"config.mjs","names":[],"sources":["../../../src/components/keyboard-shortcut-help-modal/config.js"],"sourcesContent":["import { __ } from '@wordpress/i18n';\n\nexport const textFormattingShortcuts = [\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'b' },\n\t\tdescription: __( 'Make the selected text bold.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'i' },\n\t\tdescription: __( 'Make the selected text italic.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'k' },\n\t\tdescription: __( 'Convert the selected text into a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'k' },\n\t\tdescription: __( 'Remove a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { character: '[[' },\n\t\tdescription: __( 'Insert a link to a post or page.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'u' },\n\t\tdescription: __( 'Underline the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'd' },\n\t\tdescription: __( 'Strikethrough the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'x' },\n\t\tdescription: __( 'Make the selected text inline code.' ),\n\t},\n\t{\n\t\tkeyCombination: {\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: '0',\n\t\t},\n\t\taliases: [\n\t\t\t{\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: '7',\n\t\t\t},\n\t\t],\n\t\tdescription: __( 'Convert the current heading to a paragraph.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '1-6' },\n\t\tdescription: __(\n\t\t\t'Convert the current paragraph or heading to a heading of level 1 to 6.'\n\t\t),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'SPACE' },\n\t\tdescription: __( 'Add non breaking space.' ),\n\t},\n];\n"],"mappings":";;AAEA,MAAa,0BAA0B;CACtC;EACC,gBAAgB;GAAE,UAAU;GAAW,WAAW;EAAI;EACtD,aAAa,GAAI,8BAA+B;CACjD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAW,WAAW;EAAI;EACtD,aAAa,GAAI,gCAAiC;CACnD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAW,WAAW;EAAI;EACtD,aAAa,GAAI,wCAAyC;CAC3D;CACA;EACC,gBAAgB;GAAE,UAAU;GAAgB,WAAW;EAAI;EAC3D,aAAa,GAAI,gBAAiB;CACnC;CACA;EACC,gBAAgB,EAAE,WAAW,KAAK;EAClC,aAAa,GAAI,kCAAmC;CACrD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAW,WAAW;EAAI;EACtD,aAAa,GAAI,8BAA+B;CACjD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAU,WAAW;EAAI;EACrD,aAAa,GAAI,kCAAmC;CACrD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAU,WAAW;EAAI;EACrD,aAAa,GAAI,qCAAsC;CACxD;CACA;EACC,gBAAgB;GACf,UAAU;GACV,WAAW;EACZ;EACA,SAAS,CACR;GACC,UAAU;GACV,WAAW;EACZ,CACD;EACA,aAAa,GAAI,6CAA8C;CAChE;CACA;EACC,gBAAgB;GAAE,UAAU;GAAU,WAAW;EAAM;EACvD,aAAa,GACZ,wEACD;CACD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAgB,WAAW;EAAQ;EAC/D,aAAa,GAAI,yBAA0B;CAC5C;AACD"}
|