@wordpress/edit-widgets 6.32.0 → 6.32.1-next.47f435fc9.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/block.json +26 -0
- package/build/blocks/widget-area/edit/index.js +94 -87
- package/build/blocks/widget-area/edit/index.js.map +7 -1
- package/build/blocks/widget-area/edit/inner-blocks.js +68 -50
- package/build/blocks/widget-area/edit/inner-blocks.js.map +7 -1
- package/build/blocks/widget-area/edit/use-is-dragging-within.js +34 -40
- package/build/blocks/widget-area/edit/use-is-dragging-within.js.map +7 -1
- package/build/blocks/widget-area/index.js +49 -52
- package/build/blocks/widget-area/index.js.map +7 -1
- package/build/components/error-boundary/index.js +49 -51
- package/build/components/error-boundary/index.js.map +7 -1
- package/build/components/header/document-tools/index.js +104 -74
- package/build/components/header/document-tools/index.js.map +7 -1
- package/build/components/header/index.js +81 -62
- package/build/components/header/index.js.map +7 -1
- package/build/components/header/undo-redo/redo.js +50 -38
- package/build/components/header/undo-redo/redo.js.map +7 -1
- package/build/components/header/undo-redo/undo.js +49 -37
- package/build/components/header/undo-redo/undo.js.map +7 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +74 -71
- package/build/components/keyboard-shortcut-help-modal/config.js.map +7 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +61 -44
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +7 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +154 -103
- package/build/components/keyboard-shortcut-help-modal/index.js.map +7 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +74 -56
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +7 -1
- package/build/components/keyboard-shortcuts/index.js +89 -82
- package/build/components/keyboard-shortcuts/index.js.map +7 -1
- package/build/components/layout/index.js +75 -49
- package/build/components/layout/index.js.map +7 -1
- package/build/components/layout/interface.js +89 -75
- package/build/components/layout/interface.js.map +7 -1
- package/build/components/layout/unsaved-changes-warning.js +35 -42
- package/build/components/layout/unsaved-changes-warning.js.map +7 -1
- package/build/components/more-menu/index.js +189 -108
- package/build/components/more-menu/index.js.map +7 -1
- package/build/components/more-menu/tools-more-menu-group.js +29 -23
- package/build/components/more-menu/tools-more-menu-group.js.map +7 -1
- package/build/components/notices/index.js +62 -48
- package/build/components/notices/index.js.map +7 -1
- package/build/components/save-button/index.js +55 -47
- package/build/components/save-button/index.js.map +7 -1
- package/build/components/secondary-sidebar/index.js +41 -34
- package/build/components/secondary-sidebar/index.js.map +7 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js +55 -46
- package/build/components/secondary-sidebar/inserter-sidebar.js.map +7 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +76 -67
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +7 -1
- package/build/components/sidebar/index.js +149 -138
- package/build/components/sidebar/index.js.map +7 -1
- package/build/components/sidebar/widget-areas.js +73 -57
- package/build/components/sidebar/widget-areas.js.map +7 -1
- package/build/components/welcome-guide/index.js +182 -137
- package/build/components/welcome-guide/index.js.map +7 -1
- package/build/components/widget-areas-block-editor-content/index.js +64 -43
- package/build/components/widget-areas-block-editor-content/index.js.map +7 -1
- package/build/components/widget-areas-block-editor-provider/index.js +115 -92
- package/build/components/widget-areas-block-editor-provider/index.js.map +7 -1
- package/build/constants.js +30 -8
- package/build/constants.js.map +7 -1
- package/build/filters/index.js +3 -5
- package/build/filters/index.js.map +7 -1
- package/build/filters/move-to-widget-area.js +52 -59
- package/build/filters/move-to-widget-area.js.map +7 -1
- package/build/filters/replace-media-upload.js +9 -11
- package/build/filters/replace-media-upload.js.map +7 -1
- package/build/hooks/use-last-selected-widget-area.js +38 -44
- package/build/hooks/use-last-selected-widget-area.js.map +7 -1
- package/build/hooks/use-widget-library-insertion-point.js +60 -55
- package/build/hooks/use-widget-library-insertion-point.js.map +7 -1
- package/build/index.js +86 -93
- package/build/index.js.map +7 -1
- package/build/lock-unlock.js +31 -15
- package/build/lock-unlock.js.map +7 -1
- package/build/store/actions.js +181 -313
- package/build/store/actions.js.map +7 -1
- package/build/store/constants.js +27 -10
- package/build/store/constants.js.map +7 -1
- package/build/store/index.js +51 -51
- package/build/store/index.js.map +7 -1
- package/build/store/private-selectors.js +28 -7
- package/build/store/private-selectors.js.map +7 -1
- package/build/store/reducer.js +65 -118
- package/build/store/reducer.js.map +7 -1
- package/build/store/resolvers.js +64 -63
- package/build/store/resolvers.js.map +7 -1
- package/build/store/selectors.js +194 -231
- package/build/store/selectors.js.map +7 -1
- package/build/store/transformers.js +47 -41
- package/build/store/transformers.js.map +7 -1
- package/build/store/utils.js +47 -70
- package/build/store/utils.js.map +7 -1
- package/build-module/blocks/widget-area/block.json +26 -0
- package/build-module/blocks/widget-area/edit/index.js +63 -75
- package/build-module/blocks/widget-area/edit/index.js.map +7 -1
- package/build-module/blocks/widget-area/edit/inner-blocks.js +38 -41
- package/build-module/blocks/widget-area/edit/inner-blocks.js.map +7 -1
- package/build-module/blocks/widget-area/edit/use-is-dragging-within.js +14 -33
- package/build-module/blocks/widget-area/edit/use-is-dragging-within.js.map +7 -1
- package/build-module/blocks/widget-area/index.js +14 -46
- package/build-module/blocks/widget-area/index.js.map +7 -1
- package/build-module/components/error-boundary/index.js +30 -43
- package/build-module/components/error-boundary/index.js.map +7 -1
- package/build-module/components/header/document-tools/index.js +75 -66
- package/build-module/components/header/document-tools/index.js.map +7 -1
- package/build-module/components/header/index.js +52 -54
- package/build-module/components/header/index.js.map +7 -1
- package/build-module/components/header/undo-redo/redo.js +32 -32
- package/build-module/components/header/undo-redo/redo.js.map +7 -1
- package/build-module/components/header/undo-redo/undo.js +31 -31
- package/build-module/components/header/undo-redo/undo.js.map +7 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js +62 -75
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +7 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +33 -37
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +7 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +130 -97
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +7 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +56 -50
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +7 -1
- package/build-module/components/keyboard-shortcuts/index.js +73 -75
- package/build-module/components/keyboard-shortcuts/index.js.map +7 -1
- package/build-module/components/layout/index.js +46 -41
- package/build-module/components/layout/index.js.map +7 -1
- package/build-module/components/layout/interface.js +63 -66
- package/build-module/components/layout/interface.js.map +7 -1
- package/build-module/components/layout/unsaved-changes-warning.js +17 -37
- package/build-module/components/layout/unsaved-changes-warning.js.map +7 -1
- package/build-module/components/more-menu/index.js +167 -102
- package/build-module/components/more-menu/index.js.map +7 -1
- package/build-module/components/more-menu/tools-more-menu-group.js +11 -17
- package/build-module/components/more-menu/tools-more-menu-group.js.map +7 -1
- package/build-module/components/notices/index.js +43 -42
- package/build-module/components/notices/index.js.map +7 -1
- package/build-module/components/save-button/index.js +37 -41
- package/build-module/components/save-button/index.js.map +7 -1
- package/build-module/components/secondary-sidebar/index.js +14 -27
- package/build-module/components/secondary-sidebar/index.js.map +7 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js +26 -38
- package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +7 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +57 -60
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +7 -1
- package/build-module/components/sidebar/index.js +129 -127
- package/build-module/components/sidebar/index.js.map +7 -1
- package/build-module/components/sidebar/widget-areas.js +53 -49
- package/build-module/components/sidebar/widget-areas.js.map +7 -1
- package/build-module/components/welcome-guide/index.js +165 -132
- package/build-module/components/welcome-guide/index.js.map +7 -1
- package/build-module/components/widget-areas-block-editor-content/index.js +43 -36
- package/build-module/components/widget-areas-block-editor-content/index.js.map +7 -1
- package/build-module/components/widget-areas-block-editor-provider/index.js +85 -83
- package/build-module/components/widget-areas-block-editor-provider/index.js.map +7 -1
- package/build-module/constants.js +7 -3
- package/build-module/constants.js.map +7 -1
- package/build-module/filters/index.js +3 -6
- package/build-module/filters/index.js.map +7 -1
- package/build-module/filters/move-to-widget-area.js +52 -57
- package/build-module/filters/move-to-widget-area.js.map +7 -1
- package/build-module/filters/replace-media-upload.js +8 -7
- package/build-module/filters/replace-media-upload.js.map +7 -1
- package/build-module/hooks/use-last-selected-widget-area.js +20 -39
- package/build-module/hooks/use-last-selected-widget-area.js.map +7 -1
- package/build-module/hooks/use-widget-library-insertion-point.js +42 -49
- package/build-module/hooks/use-widget-library-insertion-point.js.map +7 -1
- package/build-module/index.js +60 -72
- package/build-module/index.js.map +7 -1
- package/build-module/lock-unlock.js +8 -7
- package/build-module/lock-unlock.js.map +7 -1
- package/build-module/store/actions.js +153 -293
- package/build-module/store/actions.js.map +7 -1
- package/build-module/store/constants.js +5 -5
- package/build-module/store/constants.js.map +7 -1
- package/build-module/store/index.js +16 -40
- package/build-module/store/index.js.map +7 -1
- package/build-module/store/private-selectors.js +7 -3
- package/build-module/store/private-selectors.js.map +7 -1
- package/build-module/store/reducer.js +42 -111
- package/build-module/store/reducer.js.map +7 -1
- package/build-module/store/resolvers.js +43 -51
- package/build-module/store/resolvers.js.map +7 -1
- package/build-module/store/selectors.js +171 -224
- package/build-module/store/selectors.js.map +7 -1
- package/build-module/store/transformers.js +23 -34
- package/build-module/store/transformers.js.map +7 -1
- package/build-module/store/utils.js +22 -63
- package/build-module/store/utils.js.map +7 -1
- package/build-style/style-rtl.css +216 -88
- package/build-style/style.css +216 -88
- package/package.json +36 -29
- package/src/blocks/widget-area/editor.scss +3 -0
- package/src/components/customizer-edit-widgets-initializer/style.scss +3 -0
- package/src/components/error-boundary/style.scss +2 -0
- package/src/components/header/style.scss +5 -0
- package/src/components/keyboard-shortcut-help-modal/style.scss +2 -0
- package/src/components/layout/style.scss +3 -0
- package/src/components/more-menu/style.scss +2 -0
- package/src/components/notices/style.scss +3 -0
- package/src/components/secondary-sidebar/style.scss +4 -0
- package/src/components/sidebar/style.scss +2 -0
- package/src/components/welcome-guide/style.scss +2 -0
- package/src/components/widget-areas-block-editor-content/style.scss +2 -0
- package/src/style.scss +16 -13
|
@@ -1,112 +1,145 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import
|
|
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
|
-
className: clsx('edit-widgets-keyboard-shortcut-help-modal__section', className),
|
|
49
|
-
children: [!!title && /*#__PURE__*/_jsx("h2", {
|
|
50
|
-
className: "edit-widgets-keyboard-shortcut-help-modal__section-title",
|
|
51
|
-
children: title
|
|
52
|
-
}), /*#__PURE__*/_jsx(ShortcutList, {
|
|
53
|
-
shortcuts: shortcuts
|
|
54
|
-
})]
|
|
55
|
-
});
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { Modal } from "@wordpress/components";
|
|
4
|
+
import { __ } from "@wordpress/i18n";
|
|
5
|
+
import {
|
|
6
|
+
useShortcut,
|
|
7
|
+
store as keyboardShortcutsStore
|
|
8
|
+
} from "@wordpress/keyboard-shortcuts";
|
|
9
|
+
import { useSelect } from "@wordpress/data";
|
|
10
|
+
import { textFormattingShortcuts } from "./config";
|
|
11
|
+
import Shortcut from "./shortcut";
|
|
12
|
+
import DynamicShortcut from "./dynamic-shortcut";
|
|
13
|
+
const ShortcutList = ({ shortcuts }) => (
|
|
14
|
+
/*
|
|
15
|
+
* Disable reason: The `list` ARIA role is redundant but
|
|
16
|
+
* Safari+VoiceOver won't announce the list otherwise.
|
|
17
|
+
*/
|
|
18
|
+
/* eslint-disable jsx-a11y/no-redundant-roles */
|
|
19
|
+
/* @__PURE__ */ jsx(
|
|
20
|
+
"ul",
|
|
21
|
+
{
|
|
22
|
+
className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-list",
|
|
23
|
+
role: "list",
|
|
24
|
+
children: shortcuts.map((shortcut, index) => /* @__PURE__ */ jsx(
|
|
25
|
+
"li",
|
|
26
|
+
{
|
|
27
|
+
className: "edit-widgets-keyboard-shortcut-help-modal__shortcut",
|
|
28
|
+
children: typeof shortcut === "string" ? /* @__PURE__ */ jsx(DynamicShortcut, { name: shortcut }) : /* @__PURE__ */ jsx(Shortcut, { ...shortcut })
|
|
29
|
+
},
|
|
30
|
+
index
|
|
31
|
+
))
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
);
|
|
35
|
+
const ShortcutSection = ({ title, shortcuts, className }) => /* @__PURE__ */ jsxs(
|
|
36
|
+
"section",
|
|
37
|
+
{
|
|
38
|
+
className: clsx(
|
|
39
|
+
"edit-widgets-keyboard-shortcut-help-modal__section",
|
|
40
|
+
className
|
|
41
|
+
),
|
|
42
|
+
children: [
|
|
43
|
+
!!title && /* @__PURE__ */ jsx("h2", { className: "edit-widgets-keyboard-shortcut-help-modal__section-title", children: title }),
|
|
44
|
+
/* @__PURE__ */ jsx(ShortcutList, { shortcuts })
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
);
|
|
56
48
|
const ShortcutCategorySection = ({
|
|
57
49
|
title,
|
|
58
50
|
categoryName,
|
|
59
51
|
additionalShortcuts = []
|
|
60
52
|
}) => {
|
|
61
|
-
const categoryShortcuts = useSelect(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
53
|
+
const categoryShortcuts = useSelect(
|
|
54
|
+
(select) => {
|
|
55
|
+
return select(keyboardShortcutsStore).getCategoryShortcuts(
|
|
56
|
+
categoryName
|
|
57
|
+
);
|
|
58
|
+
},
|
|
59
|
+
[categoryName]
|
|
60
|
+
);
|
|
61
|
+
return /* @__PURE__ */ jsx(
|
|
62
|
+
ShortcutSection,
|
|
63
|
+
{
|
|
64
|
+
title,
|
|
65
|
+
shortcuts: categoryShortcuts.concat(additionalShortcuts)
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
68
|
};
|
|
69
|
-
|
|
69
|
+
function KeyboardShortcutHelpModal({
|
|
70
70
|
isModalActive,
|
|
71
71
|
toggleModal
|
|
72
72
|
}) {
|
|
73
|
-
useShortcut(
|
|
73
|
+
useShortcut("core/edit-widgets/keyboard-shortcuts", toggleModal, {
|
|
74
74
|
bindGlobal: true
|
|
75
75
|
});
|
|
76
76
|
if (!isModalActive) {
|
|
77
77
|
return null;
|
|
78
78
|
}
|
|
79
|
-
return
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
/*
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
79
|
+
return /* @__PURE__ */ jsxs(
|
|
80
|
+
Modal,
|
|
81
|
+
{
|
|
82
|
+
className: "edit-widgets-keyboard-shortcut-help-modal",
|
|
83
|
+
title: __("Keyboard shortcuts"),
|
|
84
|
+
onRequestClose: toggleModal,
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ jsx(
|
|
87
|
+
ShortcutSection,
|
|
88
|
+
{
|
|
89
|
+
className: "edit-widgets-keyboard-shortcut-help-modal__main-shortcuts",
|
|
90
|
+
shortcuts: ["core/edit-widgets/keyboard-shortcuts"]
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
/* @__PURE__ */ jsx(
|
|
94
|
+
ShortcutCategorySection,
|
|
95
|
+
{
|
|
96
|
+
title: __("Global shortcuts"),
|
|
97
|
+
categoryName: "global"
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
/* @__PURE__ */ jsx(
|
|
101
|
+
ShortcutCategorySection,
|
|
102
|
+
{
|
|
103
|
+
title: __("Selection shortcuts"),
|
|
104
|
+
categoryName: "selection"
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
/* @__PURE__ */ jsx(
|
|
108
|
+
ShortcutCategorySection,
|
|
109
|
+
{
|
|
110
|
+
title: __("Block shortcuts"),
|
|
111
|
+
categoryName: "block",
|
|
112
|
+
additionalShortcuts: [
|
|
113
|
+
{
|
|
114
|
+
keyCombination: { character: "/" },
|
|
115
|
+
description: __(
|
|
116
|
+
"Change the block type after adding a new paragraph."
|
|
117
|
+
),
|
|
118
|
+
/* translators: The forward-slash character. e.g. '/'. */
|
|
119
|
+
ariaLabel: __("Forward-slash")
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
/* @__PURE__ */ jsx(
|
|
125
|
+
ShortcutSection,
|
|
126
|
+
{
|
|
127
|
+
title: __("Text formatting"),
|
|
128
|
+
shortcuts: textFormattingShortcuts
|
|
129
|
+
}
|
|
130
|
+
),
|
|
131
|
+
/* @__PURE__ */ jsx(
|
|
132
|
+
ShortcutCategorySection,
|
|
133
|
+
{
|
|
134
|
+
title: __("List View shortcuts"),
|
|
135
|
+
categoryName: "list-view"
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
);
|
|
111
141
|
}
|
|
112
|
-
|
|
142
|
+
export {
|
|
143
|
+
KeyboardShortcutHelpModal as default
|
|
144
|
+
};
|
|
145
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/keyboard-shortcut-help-modal/index.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\n\nconst ShortcutList = ( { shortcuts } ) => (\n\t/*\n\t * Disable reason: The `list` ARIA role is redundant but\n\t * Safari+VoiceOver won't announce the list otherwise.\n\t */\n\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\t<ul\n\t\tclassName=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-list\"\n\t\trole=\"list\"\n\t>\n\t\t{ shortcuts.map( ( shortcut, index ) => (\n\t\t\t<li\n\t\t\t\tclassName=\"edit-widgets-keyboard-shortcut-help-modal__shortcut\"\n\t\t\t\tkey={ index }\n\t\t\t>\n\t\t\t\t{ typeof shortcut === 'string' ? (\n\t\t\t\t\t<DynamicShortcut name={ shortcut } />\n\t\t\t\t) : (\n\t\t\t\t\t<Shortcut { ...shortcut } />\n\t\t\t\t) }\n\t\t\t</li>\n\t\t) ) }\n\t</ul>\n\t/* eslint-enable jsx-a11y/no-redundant-roles */\n);\n\nconst ShortcutSection = ( { title, shortcuts, className } ) => (\n\t<section\n\t\tclassName={ clsx(\n\t\t\t'edit-widgets-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"edit-widgets-keyboard-shortcut-help-modal__section-title\">\n\t\t\t\t{ title }\n\t\t\t</h2>\n\t\t) }\n\t\t<ShortcutList shortcuts={ shortcuts } />\n\t</section>\n);\n\nconst ShortcutCategorySection = ( {\n\ttitle,\n\tcategoryName,\n\tadditionalShortcuts = [],\n} ) => {\n\tconst categoryShortcuts = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( keyboardShortcutsStore ).getCategoryShortcuts(\n\t\t\t\tcategoryName\n\t\t\t);\n\t\t},\n\t\t[ categoryName ]\n\t);\n\n\treturn (\n\t\t<ShortcutSection\n\t\t\ttitle={ title }\n\t\t\tshortcuts={ categoryShortcuts.concat( additionalShortcuts ) }\n\t\t/>\n\t);\n};\n\nexport default function KeyboardShortcutHelpModal( {\n\tisModalActive,\n\ttoggleModal,\n} ) {\n\tuseShortcut( 'core/edit-widgets/keyboard-shortcuts', toggleModal, {\n\t\tbindGlobal: true,\n\t} );\n\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"edit-widgets-keyboard-shortcut-help-modal\"\n\t\t\ttitle={ __( 'Keyboard shortcuts' ) }\n\t\t\tonRequestClose={ toggleModal }\n\t\t>\n\t\t\t<ShortcutSection\n\t\t\t\tclassName=\"edit-widgets-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/edit-widgets/keyboard-shortcuts' ] }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Global shortcuts' ) }\n\t\t\t\tcategoryName=\"global\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Selection shortcuts' ) }\n\t\t\t\tcategoryName=\"selection\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Block shortcuts' ) }\n\t\t\t\tcategoryName=\"block\"\n\t\t\t\tadditionalShortcuts={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tkeyCombination: { character: '/' },\n\t\t\t\t\t\tdescription: __(\n\t\t\t\t\t\t\t'Change the block type after adding a new paragraph.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t/* translators: The forward-slash character. e.g. '/'. */\n\t\t\t\t\t\tariaLabel: __( 'Forward-slash' ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t\t<ShortcutSection\n\t\t\t\ttitle={ __( 'Text formatting' ) }\n\t\t\t\tshortcuts={ textFormattingShortcuts }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'List View shortcuts' ) }\n\t\t\t\tcategoryName=\"list-view\"\n\t\t\t/>\n\t\t</Modal>\n\t);\n}\n"],
|
|
5
|
+
"mappings": "AAuCK,cAWJ,YAXI;AApCL,OAAO,UAAU;AAKjB,SAAS,aAAa;AACtB,SAAS,UAAU;AACnB;AAAA,EACC;AAAA,EACA,SAAS;AAAA,OACH;AACP,SAAS,iBAAiB;AAK1B,SAAS,+BAA+B;AACxC,OAAO,cAAc;AACrB,OAAO,qBAAqB;AAE5B,MAAM,eAAe,CAAE,EAAE,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMlC;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,MAAK;AAAA,MAEH,oBAAU,IAAK,CAAE,UAAU,UAC5B;AAAA,QAAC;AAAA;AAAA,UACA,WAAU;AAAA,UAGR,iBAAO,aAAa,WACrB,oBAAC,mBAAgB,MAAO,UAAW,IAEnC,oBAAC,YAAW,GAAG,UAAW;AAAA;AAAA,QALrB;AAAA,MAOP,CACC;AAAA;AAAA,EACH;AAAA;AAID,MAAM,kBAAkB,CAAE,EAAE,OAAO,WAAW,UAAU,MACvD;AAAA,EAAC;AAAA;AAAA,IACA,WAAY;AAAA,MACX;AAAA,MACA;AAAA,IACD;AAAA,IAEE;AAAA,OAAC,CAAE,SACJ,oBAAC,QAAG,WAAU,4DACX,iBACH;AAAA,MAED,oBAAC,gBAAa,WAAwB;AAAA;AAAA;AACvC;AAGD,MAAM,0BAA0B,CAAE;AAAA,EACjC;AAAA,EACA;AAAA,EACA,sBAAsB,CAAC;AACxB,MAAO;AACN,QAAM,oBAAoB;AAAA,IACzB,CAAE,WAAY;AACb,aAAO,OAAQ,sBAAuB,EAAE;AAAA,QACvC;AAAA,MACD;AAAA,IACD;AAAA,IACA,CAAE,YAAa;AAAA,EAChB;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,WAAY,kBAAkB,OAAQ,mBAAoB;AAAA;AAAA,EAC3D;AAEF;AAEe,SAAR,0BAA4C;AAAA,EAClD;AAAA,EACA;AACD,GAAI;AACH,cAAa,wCAAwC,aAAa;AAAA,IACjE,YAAY;AAAA,EACb,CAAE;AAEF,MAAK,CAAE,eAAgB;AACtB,WAAO;AAAA,EACR;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,OAAQ,GAAI,oBAAqB;AAAA,MACjC,gBAAiB;AAAA,MAEjB;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,WAAU;AAAA,YACV,WAAY,CAAE,sCAAuC;AAAA;AAAA,QACtD;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACA,OAAQ,GAAI,kBAAmB;AAAA,YAC/B,cAAa;AAAA;AAAA,QACd;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACA,OAAQ,GAAI,qBAAsB;AAAA,YAClC,cAAa;AAAA;AAAA,QACd;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACA,OAAQ,GAAI,iBAAkB;AAAA,YAC9B,cAAa;AAAA,YACb,qBAAsB;AAAA,cACrB;AAAA,gBACC,gBAAgB,EAAE,WAAW,IAAI;AAAA,gBACjC,aAAa;AAAA,kBACZ;AAAA,gBACD;AAAA;AAAA,gBAEA,WAAW,GAAI,eAAgB;AAAA,cAChC;AAAA,YACD;AAAA;AAAA,QACD;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACA,OAAQ,GAAI,iBAAkB;AAAA,YAC9B,WAAY;AAAA;AAAA,QACb;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACA,OAAQ,GAAI,qBAAsB;AAAA,YAClC,cAAa;AAAA;AAAA,QACd;AAAA;AAAA;AAAA,EACD;AAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,53 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
keyCombination
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const shortcut = keyCombination.modifier ? displayShortcutList[keyCombination.modifier](keyCombination.character) : keyCombination.character;
|
|
12
|
-
const ariaLabel = keyCombination.modifier ? shortcutAriaLabel[keyCombination.modifier](keyCombination.character) : keyCombination.character;
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment as Fragment2 } from "@wordpress/element";
|
|
3
|
+
import { displayShortcutList, shortcutAriaLabel } from "@wordpress/keycodes";
|
|
4
|
+
function KeyCombination({ keyCombination, forceAriaLabel }) {
|
|
5
|
+
const shortcut = keyCombination.modifier ? displayShortcutList[keyCombination.modifier](
|
|
6
|
+
keyCombination.character
|
|
7
|
+
) : keyCombination.character;
|
|
8
|
+
const ariaLabel = keyCombination.modifier ? shortcutAriaLabel[keyCombination.modifier](
|
|
9
|
+
keyCombination.character
|
|
10
|
+
) : keyCombination.character;
|
|
13
11
|
const shortcuts = Array.isArray(shortcut) ? shortcut : [shortcut];
|
|
14
|
-
return
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
"kbd",
|
|
14
|
+
{
|
|
15
|
+
className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-key-combination",
|
|
16
|
+
"aria-label": forceAriaLabel || ariaLabel,
|
|
17
|
+
children: shortcuts.map((character, index) => {
|
|
18
|
+
if (character === "+") {
|
|
19
|
+
return /* @__PURE__ */ jsx(Fragment2, { children: character }, index);
|
|
20
|
+
}
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
"kbd",
|
|
23
|
+
{
|
|
24
|
+
className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-key",
|
|
25
|
+
children: character
|
|
26
|
+
},
|
|
27
|
+
index
|
|
28
|
+
);
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
);
|
|
29
32
|
}
|
|
30
|
-
function Shortcut({
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
})
|
|
50
|
-
});
|
|
33
|
+
function Shortcut({ description, keyCombination, aliases = [], ariaLabel }) {
|
|
34
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
35
|
+
/* @__PURE__ */ jsx("div", { className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-description", children: description }),
|
|
36
|
+
/* @__PURE__ */ jsxs("div", { className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-term", children: [
|
|
37
|
+
/* @__PURE__ */ jsx(
|
|
38
|
+
KeyCombination,
|
|
39
|
+
{
|
|
40
|
+
keyCombination,
|
|
41
|
+
forceAriaLabel: ariaLabel
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
aliases.map((alias, index) => /* @__PURE__ */ jsx(
|
|
45
|
+
KeyCombination,
|
|
46
|
+
{
|
|
47
|
+
keyCombination: alias,
|
|
48
|
+
forceAriaLabel: ariaLabel
|
|
49
|
+
},
|
|
50
|
+
index
|
|
51
|
+
))
|
|
52
|
+
] })
|
|
53
|
+
] });
|
|
51
54
|
}
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
var shortcut_default = Shortcut;
|
|
56
|
+
export {
|
|
57
|
+
shortcut_default as default
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=shortcut.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/keyboard-shortcut-help-modal/shortcut.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst shortcuts = Array.isArray( shortcut ) ? shortcut : [ shortcut ];\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ shortcuts.map( ( character, index ) => {\n\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<kbd\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tclassName=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ character }\n\t\t\t\t\t</kbd>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"edit-widgets-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n"],
|
|
5
|
+
"mappings": "AA0BY,SAkBV,UAlBU,KAsBT,YAtBS;AAvBZ,SAAS,YAAAA,iBAAgB;AACzB,SAAS,qBAAqB,yBAAyB;AAEvD,SAAS,eAAgB,EAAE,gBAAgB,eAAe,GAAI;AAC7D,QAAM,WAAW,eAAe,WAC7B,oBAAqB,eAAe,QAAS;AAAA,IAC7C,eAAe;AAAA,EACf,IACA,eAAe;AAClB,QAAM,YAAY,eAAe,WAC9B,kBAAmB,eAAe,QAAS;AAAA,IAC3C,eAAe;AAAA,EACf,IACA,eAAe;AAClB,QAAM,YAAY,MAAM,QAAS,QAAS,IAAI,WAAW,CAAE,QAAS;AAEpE,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,cAAa,kBAAkB;AAAA,MAE7B,oBAAU,IAAK,CAAE,WAAW,UAAW;AACxC,YAAK,cAAc,KAAM;AACxB,iBAAO,oBAACA,WAAA,EAAyB,uBAAV,KAAqB;AAAA,QAC7C;AAEA,eACC;AAAA,UAAC;AAAA;AAAA,YAEA,WAAU;AAAA,YAER;AAAA;AAAA,UAHI;AAAA,QAIP;AAAA,MAEF,CAAE;AAAA;AAAA,EACH;AAEF;AAEA,SAAS,SAAU,EAAE,aAAa,gBAAgB,UAAU,CAAC,GAAG,UAAU,GAAI;AAC7E,SACC,iCACC;AAAA,wBAAC,SAAI,WAAU,mEACZ,uBACH;AAAA,IACA,qBAAC,SAAI,WAAU,4DACd;AAAA;AAAA,QAAC;AAAA;AAAA,UACA;AAAA,UACA,gBAAiB;AAAA;AAAA,MAClB;AAAA,MACE,QAAQ,IAAK,CAAE,OAAO,UACvB;AAAA,QAAC;AAAA;AAAA,UACA,gBAAiB;AAAA,UACjB,gBAAiB;AAAA;AAAA,QACX;AAAA,MACP,CACC;AAAA,OACH;AAAA,KACD;AAEF;AAEA,IAAO,mBAAQ;",
|
|
6
|
+
"names": ["Fragment"]
|
|
7
|
+
}
|
|
@@ -1,121 +1,119 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { isAppleOS } from
|
|
7
|
-
import { useDispatch } from
|
|
8
|
-
import { __ } from
|
|
9
|
-
import { store as coreStore } from
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Internal dependencies
|
|
13
|
-
*/
|
|
14
|
-
import { store as editWidgetsStore } from '../../store';
|
|
1
|
+
import { useEffect } from "@wordpress/element";
|
|
2
|
+
import {
|
|
3
|
+
useShortcut,
|
|
4
|
+
store as keyboardShortcutsStore
|
|
5
|
+
} from "@wordpress/keyboard-shortcuts";
|
|
6
|
+
import { isAppleOS } from "@wordpress/keycodes";
|
|
7
|
+
import { useDispatch } from "@wordpress/data";
|
|
8
|
+
import { __ } from "@wordpress/i18n";
|
|
9
|
+
import { store as coreStore } from "@wordpress/core-data";
|
|
10
|
+
import { store as editWidgetsStore } from "../../store";
|
|
15
11
|
function KeyboardShortcuts() {
|
|
16
|
-
const {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} = useDispatch(coreStore);
|
|
20
|
-
const {
|
|
21
|
-
saveEditedWidgetAreas
|
|
22
|
-
} = useDispatch(editWidgetsStore);
|
|
23
|
-
useShortcut('core/edit-widgets/undo', event => {
|
|
12
|
+
const { redo, undo } = useDispatch(coreStore);
|
|
13
|
+
const { saveEditedWidgetAreas } = useDispatch(editWidgetsStore);
|
|
14
|
+
useShortcut("core/edit-widgets/undo", (event) => {
|
|
24
15
|
undo();
|
|
25
16
|
event.preventDefault();
|
|
26
17
|
});
|
|
27
|
-
useShortcut(
|
|
18
|
+
useShortcut("core/edit-widgets/redo", (event) => {
|
|
28
19
|
redo();
|
|
29
20
|
event.preventDefault();
|
|
30
21
|
});
|
|
31
|
-
useShortcut(
|
|
22
|
+
useShortcut("core/edit-widgets/save", (event) => {
|
|
32
23
|
event.preventDefault();
|
|
33
24
|
saveEditedWidgetAreas();
|
|
34
25
|
});
|
|
35
26
|
return null;
|
|
36
27
|
}
|
|
37
28
|
function KeyboardShortcutsRegister() {
|
|
38
|
-
|
|
39
|
-
const {
|
|
40
|
-
registerShortcut
|
|
41
|
-
} = useDispatch(keyboardShortcutsStore);
|
|
29
|
+
const { registerShortcut } = useDispatch(keyboardShortcutsStore);
|
|
42
30
|
useEffect(() => {
|
|
43
31
|
registerShortcut({
|
|
44
|
-
name:
|
|
45
|
-
category:
|
|
46
|
-
description: __(
|
|
32
|
+
name: "core/edit-widgets/undo",
|
|
33
|
+
category: "global",
|
|
34
|
+
description: __("Undo your last changes."),
|
|
47
35
|
keyCombination: {
|
|
48
|
-
modifier:
|
|
49
|
-
character:
|
|
36
|
+
modifier: "primary",
|
|
37
|
+
character: "z"
|
|
50
38
|
}
|
|
51
39
|
});
|
|
52
40
|
registerShortcut({
|
|
53
|
-
name:
|
|
54
|
-
category:
|
|
55
|
-
description: __(
|
|
41
|
+
name: "core/edit-widgets/redo",
|
|
42
|
+
category: "global",
|
|
43
|
+
description: __("Redo your last undo."),
|
|
56
44
|
keyCombination: {
|
|
57
|
-
modifier:
|
|
58
|
-
character:
|
|
45
|
+
modifier: "primaryShift",
|
|
46
|
+
character: "z"
|
|
59
47
|
},
|
|
60
48
|
// Disable on Apple OS because it conflicts with the browser's
|
|
61
49
|
// history shortcut. It's a fine alias for both Windows and Linux.
|
|
62
50
|
// Since there's no conflict for Ctrl+Shift+Z on both Windows and
|
|
63
51
|
// Linux, we keep it as the default for consistency.
|
|
64
|
-
aliases: isAppleOS() ? [] : [
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
52
|
+
aliases: isAppleOS() ? [] : [
|
|
53
|
+
{
|
|
54
|
+
modifier: "primary",
|
|
55
|
+
character: "y"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
68
58
|
});
|
|
69
59
|
registerShortcut({
|
|
70
|
-
name:
|
|
71
|
-
category:
|
|
72
|
-
description: __(
|
|
60
|
+
name: "core/edit-widgets/save",
|
|
61
|
+
category: "global",
|
|
62
|
+
description: __("Save your changes."),
|
|
73
63
|
keyCombination: {
|
|
74
|
-
modifier:
|
|
75
|
-
character:
|
|
64
|
+
modifier: "primary",
|
|
65
|
+
character: "s"
|
|
76
66
|
}
|
|
77
67
|
});
|
|
78
68
|
registerShortcut({
|
|
79
|
-
name:
|
|
80
|
-
category:
|
|
81
|
-
description: __(
|
|
69
|
+
name: "core/edit-widgets/keyboard-shortcuts",
|
|
70
|
+
category: "main",
|
|
71
|
+
description: __("Display these keyboard shortcuts."),
|
|
82
72
|
keyCombination: {
|
|
83
|
-
modifier:
|
|
84
|
-
character:
|
|
73
|
+
modifier: "access",
|
|
74
|
+
character: "h"
|
|
85
75
|
}
|
|
86
76
|
});
|
|
87
77
|
registerShortcut({
|
|
88
|
-
name:
|
|
89
|
-
category:
|
|
90
|
-
description: __(
|
|
78
|
+
name: "core/edit-widgets/next-region",
|
|
79
|
+
category: "global",
|
|
80
|
+
description: __("Navigate to the next part of the editor."),
|
|
91
81
|
keyCombination: {
|
|
92
|
-
modifier:
|
|
93
|
-
character:
|
|
82
|
+
modifier: "ctrl",
|
|
83
|
+
character: "`"
|
|
94
84
|
},
|
|
95
|
-
aliases: [
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
85
|
+
aliases: [
|
|
86
|
+
{
|
|
87
|
+
modifier: "access",
|
|
88
|
+
character: "n"
|
|
89
|
+
}
|
|
90
|
+
]
|
|
99
91
|
});
|
|
100
92
|
registerShortcut({
|
|
101
|
-
name:
|
|
102
|
-
category:
|
|
103
|
-
description: __(
|
|
93
|
+
name: "core/edit-widgets/previous-region",
|
|
94
|
+
category: "global",
|
|
95
|
+
description: __("Navigate to the previous part of the editor."),
|
|
104
96
|
keyCombination: {
|
|
105
|
-
modifier:
|
|
106
|
-
character:
|
|
97
|
+
modifier: "ctrlShift",
|
|
98
|
+
character: "`"
|
|
107
99
|
},
|
|
108
|
-
aliases: [
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
100
|
+
aliases: [
|
|
101
|
+
{
|
|
102
|
+
modifier: "access",
|
|
103
|
+
character: "p"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
modifier: "ctrlShift",
|
|
107
|
+
character: "~"
|
|
108
|
+
}
|
|
109
|
+
]
|
|
115
110
|
});
|
|
116
111
|
}, [registerShortcut]);
|
|
117
112
|
return null;
|
|
118
113
|
}
|
|
119
114
|
KeyboardShortcuts.Register = KeyboardShortcutsRegister;
|
|
120
|
-
|
|
121
|
-
|
|
115
|
+
var keyboard_shortcuts_default = KeyboardShortcuts;
|
|
116
|
+
export {
|
|
117
|
+
keyboard_shortcuts_default as default
|
|
118
|
+
};
|
|
119
|
+
//# sourceMappingURL=index.js.map
|