@wordpress/customize-widgets 5.57.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/block-appender/index.cjs +24 -41
- package/build/components/block-appender/index.cjs.map +1 -7
- package/build/components/block-inspector-button/index.cjs +24 -52
- package/build/components/block-inspector-button/index.cjs.map +1 -7
- package/build/components/customize-widgets/index.cjs +76 -95
- package/build/components/customize-widgets/index.cjs.map +1 -7
- package/build/components/customize-widgets/use-clear-selected-block.cjs +58 -67
- package/build/components/customize-widgets/use-clear-selected-block.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/focus-control/index.cjs +44 -84
- package/build/components/focus-control/index.cjs.map +1 -7
- package/build/components/focus-control/use-blocks-focus-control.cjs +28 -49
- package/build/components/focus-control/use-blocks-focus-control.cjs.map +1 -7
- package/build/components/header/index.cjs +84 -122
- package/build/components/header/index.cjs.map +1 -7
- package/build/components/inserter/index.cjs +43 -78
- package/build/components/inserter/index.cjs.map +1 -7
- package/build/components/inserter/use-inserter.cjs +22 -54
- package/build/components/inserter/use-inserter.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 +103 -165
- package/build/components/keyboard-shortcut-help-modal/index.cjs.map +1 -7
- package/build/components/keyboard-shortcut-help-modal/shortcut.cjs +37 -76
- package/build/components/keyboard-shortcut-help-modal/shortcut.cjs.map +1 -7
- package/build/components/keyboard-shortcuts/index.cjs +70 -100
- package/build/components/keyboard-shortcuts/index.cjs.map +1 -7
- package/build/components/more-menu/index.cjs +103 -151
- package/build/components/more-menu/index.cjs.map +1 -7
- package/build/components/sidebar-block-editor/index.cjs +122 -155
- package/build/components/sidebar-block-editor/index.cjs.map +1 -7
- package/build/components/sidebar-block-editor/sidebar-adapter.cjs +207 -270
- package/build/components/sidebar-block-editor/sidebar-adapter.cjs.map +1 -7
- package/build/components/sidebar-block-editor/sidebar-editor-provider.cjs +40 -50
- package/build/components/sidebar-block-editor/sidebar-editor-provider.cjs.map +1 -7
- package/build/components/sidebar-block-editor/use-sidebar-block-editor.cjs +75 -110
- package/build/components/sidebar-block-editor/use-sidebar-block-editor.cjs.map +1 -7
- package/build/components/sidebar-controls/index.cjs +27 -53
- package/build/components/sidebar-controls/index.cjs.map +1 -7
- package/build/components/welcome-guide/index.cjs +70 -94
- package/build/components/welcome-guide/index.cjs.map +1 -7
- package/build/controls/inserter-outer-section.cjs +68 -110
- package/build/controls/inserter-outer-section.cjs.map +1 -7
- package/build/controls/inspector-section.cjs +57 -90
- package/build/controls/inspector-section.cjs.map +1 -7
- package/build/controls/sidebar-control.cjs +55 -69
- package/build/controls/sidebar-control.cjs.map +1 -7
- package/build/controls/sidebar-section.cjs +79 -103
- package/build/controls/sidebar-section.cjs.map +1 -7
- package/build/filters/index.cjs +8 -5
- package/build/filters/move-to-sidebar.cjs +62 -78
- package/build/filters/move-to-sidebar.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/filters/wide-widget-display.cjs +20 -20
- package/build/filters/wide-widget-display.cjs.map +1 -7
- package/build/index.cjs +84 -91
- 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 +49 -32
- 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 +49 -41
- package/build/store/index.cjs.map +1 -7
- package/build/store/reducer.cjs +20 -33
- package/build/store/reducer.cjs.map +1 -7
- package/build/store/selectors.cjs +47 -38
- package/build/store/selectors.cjs.map +1 -7
- package/build/utils.cjs +81 -108
- package/build/utils.cjs.map +1 -7
- package/build-module/components/block-appender/index.mjs +18 -23
- package/build-module/components/block-appender/index.mjs.map +1 -7
- package/build-module/components/block-inspector-button/index.mjs +15 -28
- package/build-module/components/block-inspector-button/index.mjs.map +1 -7
- package/build-module/components/customize-widgets/index.mjs +46 -72
- package/build-module/components/customize-widgets/index.mjs.map +1 -7
- package/build-module/components/customize-widgets/use-clear-selected-block.mjs +52 -46
- package/build-module/components/customize-widgets/use-clear-selected-block.mjs.map +1 -7
- package/build-module/components/error-boundary/index.mjs +103 -128
- package/build-module/components/error-boundary/index.mjs.map +1 -7
- package/build-module/components/focus-control/index.mjs +37 -66
- package/build-module/components/focus-control/index.mjs.map +1 -7
- package/build-module/components/focus-control/use-blocks-focus-control.mjs +21 -27
- package/build-module/components/focus-control/use-blocks-focus-control.mjs.map +1 -7
- package/build-module/components/header/index.mjs +55 -92
- package/build-module/components/header/index.mjs.map +1 -7
- package/build-module/components/inserter/index.mjs +33 -53
- package/build-module/components/inserter/index.mjs.map +1 -7
- package/build-module/components/inserter/use-inserter.mjs +17 -34
- package/build-module/components/inserter/use-inserter.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 +75 -139
- package/build-module/components/keyboard-shortcut-help-modal/index.mjs.map +1 -7
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs +31 -55
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs.map +1 -7
- package/build-module/components/keyboard-shortcuts/index.mjs +62 -79
- package/build-module/components/keyboard-shortcuts/index.mjs.map +1 -7
- package/build-module/components/more-menu/index.mjs +76 -128
- package/build-module/components/more-menu/index.mjs.map +1 -7
- package/build-module/components/sidebar-block-editor/index.mjs +86 -128
- package/build-module/components/sidebar-block-editor/index.mjs.map +1 -7
- package/build-module/components/sidebar-block-editor/sidebar-adapter.mjs +202 -250
- package/build-module/components/sidebar-block-editor/sidebar-adapter.mjs.map +1 -7
- package/build-module/components/sidebar-block-editor/sidebar-editor-provider.mjs +17 -25
- package/build-module/components/sidebar-block-editor/sidebar-editor-provider.mjs.map +1 -7
- package/build-module/components/sidebar-block-editor/use-sidebar-block-editor.mjs +54 -86
- package/build-module/components/sidebar-block-editor/use-sidebar-block-editor.mjs.map +1 -7
- package/build-module/components/sidebar-controls/index.mjs +19 -27
- package/build-module/components/sidebar-controls/index.mjs.map +1 -7
- package/build-module/components/welcome-guide/index.mjs +62 -71
- package/build-module/components/welcome-guide/index.mjs.map +1 -7
- package/build-module/controls/inserter-outer-section.mjs +61 -88
- package/build-module/controls/inserter-outer-section.mjs.map +1 -7
- package/build-module/controls/inspector-section.mjs +52 -70
- package/build-module/controls/inspector-section.mjs.map +1 -7
- package/build-module/controls/sidebar-control.mjs +33 -45
- package/build-module/controls/sidebar-control.mjs.map +1 -7
- package/build-module/controls/sidebar-section.mjs +59 -80
- package/build-module/controls/sidebar-section.mjs.map +1 -7
- package/build-module/filters/index.mjs +0 -2
- package/build-module/filters/move-to-sidebar.mjs +52 -79
- package/build-module/filters/move-to-sidebar.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/filters/wide-widget-display.mjs +13 -18
- package/build-module/filters/wide-widget-display.mjs.map +1 -7
- package/build-module/index.mjs +53 -71
- 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 +44 -8
- 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 +15 -11
- package/build-module/store/index.mjs.map +1 -7
- package/build-module/store/reducer.mjs +15 -13
- package/build-module/store/reducer.mjs.map +1 -7
- package/build-module/store/selectors.mjs +41 -13
- package/build-module/store/selectors.mjs.map +1 -7
- package/build-module/utils.mjs +74 -82
- package/build-module/utils.mjs.map +1 -7
- package/package.json +30 -31
- package/src/components/customize-widgets/index.jsx +5 -2
- package/src/components/customize-widgets/use-clear-selected-block.js +2 -1
- package/src/components/welcome-guide/index.jsx +6 -2
- package/CHANGELOG.md +0 -289
- package/build/filters/index.cjs.map +0 -7
- package/build-module/filters/index.mjs.map +0 -7
|
@@ -1,87 +1,90 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// packages/customize-widgets/src/components/keyboard-shortcut-help-modal/config.js
|
|
20
|
-
var config_exports = {};
|
|
21
|
-
__export(config_exports, {
|
|
22
|
-
textFormattingShortcuts: () => textFormattingShortcuts
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, {
|
|
3
|
+
__esModule: { value: true },
|
|
4
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
23
5
|
});
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
6
|
+
let _wordpress_i18n = require("@wordpress/i18n");
|
|
7
|
+
// packages/customize-widgets/src/components/keyboard-shortcut-help-modal/config.js
|
|
8
|
+
const textFormattingShortcuts = [
|
|
9
|
+
{
|
|
10
|
+
keyCombination: {
|
|
11
|
+
modifier: "primary",
|
|
12
|
+
character: "b"
|
|
13
|
+
},
|
|
14
|
+
description: (0, _wordpress_i18n.__)("Make the selected text bold.")
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
keyCombination: {
|
|
18
|
+
modifier: "primary",
|
|
19
|
+
character: "i"
|
|
20
|
+
},
|
|
21
|
+
description: (0, _wordpress_i18n.__)("Make the selected text italic.")
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
keyCombination: {
|
|
25
|
+
modifier: "primary",
|
|
26
|
+
character: "k"
|
|
27
|
+
},
|
|
28
|
+
description: (0, _wordpress_i18n.__)("Convert the selected text into a link.")
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
keyCombination: {
|
|
32
|
+
modifier: "primaryShift",
|
|
33
|
+
character: "k"
|
|
34
|
+
},
|
|
35
|
+
description: (0, _wordpress_i18n.__)("Remove a link.")
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
keyCombination: { character: "[[" },
|
|
39
|
+
description: (0, _wordpress_i18n.__)("Insert a link to a post or page.")
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
keyCombination: {
|
|
43
|
+
modifier: "primary",
|
|
44
|
+
character: "u"
|
|
45
|
+
},
|
|
46
|
+
description: (0, _wordpress_i18n.__)("Underline the selected text.")
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
keyCombination: {
|
|
50
|
+
modifier: "access",
|
|
51
|
+
character: "d"
|
|
52
|
+
},
|
|
53
|
+
description: (0, _wordpress_i18n.__)("Strikethrough the selected text.")
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
keyCombination: {
|
|
57
|
+
modifier: "access",
|
|
58
|
+
character: "x"
|
|
59
|
+
},
|
|
60
|
+
description: (0, _wordpress_i18n.__)("Make the selected text inline code.")
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
keyCombination: {
|
|
64
|
+
modifier: "access",
|
|
65
|
+
character: "0"
|
|
66
|
+
},
|
|
67
|
+
aliases: [{
|
|
68
|
+
modifier: "access",
|
|
69
|
+
character: "7"
|
|
70
|
+
}],
|
|
71
|
+
description: (0, _wordpress_i18n.__)("Convert the current heading to a paragraph.")
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
keyCombination: {
|
|
75
|
+
modifier: "access",
|
|
76
|
+
character: "1-6"
|
|
77
|
+
},
|
|
78
|
+
description: (0, _wordpress_i18n.__)("Convert the current paragraph or heading to a heading of level 1 to 6.")
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
keyCombination: {
|
|
82
|
+
modifier: "primaryShift",
|
|
83
|
+
character: "SPACE"
|
|
84
|
+
},
|
|
85
|
+
description: (0, _wordpress_i18n.__)("Add non breaking space.")
|
|
86
|
+
}
|
|
82
87
|
];
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
});
|
|
87
|
-
//# sourceMappingURL=config.cjs.map
|
|
88
|
+
exports.textFormattingShortcuts = textFormattingShortcuts;
|
|
89
|
+
|
|
90
|
+
//# sourceMappingURL=config.cjs.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;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAmB;AAEZ,IAAM,0BAA0B;AAAA,EACtC;AAAA,IACC,gBAAgB,EAAE,UAAU,WAAW,WAAW,IAAI;AAAA,IACtD,iBAAa,gBAAI,8BAA+B;AAAA,EACjD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,WAAW,WAAW,IAAI;AAAA,IACtD,iBAAa,gBAAI,gCAAiC;AAAA,EACnD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,WAAW,WAAW,IAAI;AAAA,IACtD,iBAAa,gBAAI,wCAAyC;AAAA,EAC3D;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,gBAAgB,WAAW,IAAI;AAAA,IAC3D,iBAAa,gBAAI,gBAAiB;AAAA,EACnC;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,WAAW,KAAK;AAAA,IAClC,iBAAa,gBAAI,kCAAmC;AAAA,EACrD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,WAAW,WAAW,IAAI;AAAA,IACtD,iBAAa,gBAAI,8BAA+B;AAAA,EACjD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,UAAU,WAAW,IAAI;AAAA,IACrD,iBAAa,gBAAI,kCAAmC;AAAA,EACrD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,UAAU,WAAW,IAAI;AAAA,IACrD,iBAAa,gBAAI,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,iBAAa,gBAAI,6CAA8C;AAAA,EAChE;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,UAAU,WAAW,MAAM;AAAA,IACvD,iBAAa;AAAA,MACZ;AAAA,IACD;AAAA,EACD;AAAA,EACA;AAAA,IACC,gBAAgB,EAAE,UAAU,gBAAgB,WAAW,QAAQ;AAAA,IAC/D,iBAAa,gBAAI,yBAA0B;AAAA,EAC5C;AACD;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"config.cjs","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,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,8BAA+B;CACjD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAW,WAAW;EAAI;EACtD,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,gCAAiC;CACnD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAW,WAAW;EAAI;EACtD,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,wCAAyC;CAC3D;CACA;EACC,gBAAgB;GAAE,UAAU;GAAgB,WAAW;EAAI;EAC3D,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,gBAAiB;CACnC;CACA;EACC,gBAAgB,EAAE,WAAW,KAAK;EAClC,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,kCAAmC;CACrD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAW,WAAW;EAAI;EACtD,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,8BAA+B;CACjD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAU,WAAW;EAAI;EACrD,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,kCAAmC;CACrD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAU,WAAW;EAAI;EACrD,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,qCAAsC;CACxD;CACA;EACC,gBAAgB;GACf,UAAU;GACV,WAAW;EACZ;EACA,SAAS,CACR;GACC,UAAU;GACV,WAAW;EACZ,CACD;EACA,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,6CAA8C;CAChE;CACA;EACC,gBAAgB;GAAE,UAAU;GAAU,WAAW;EAAM;EACvD,cAAA,GAAaA,gBAAAA,GAAAA,CACZ,wEACD;CACD;CACA;EACC,gBAAgB;GAAE,UAAU;GAAgB,WAAW;EAAQ;EAC/D,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,yBAA0B;CAC5C;AACD"}
|
|
@@ -1,68 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, {
|
|
3
|
+
__esModule: { value: true },
|
|
4
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
5
|
+
});
|
|
6
|
+
// \0rolldown/runtime.js
|
|
1
7
|
var __create = Object.create;
|
|
2
8
|
var __defProp = Object.defineProperty;
|
|
3
9
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
10
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
11
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
12
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
13
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
15
|
+
key = keys[i];
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: ((k) => from[k]).bind(null, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
18
22
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
+
value: mod,
|
|
25
|
+
enumerable: true
|
|
26
|
+
}) : target, mod));
|
|
27
|
+
let _wordpress_data = require("@wordpress/data");
|
|
28
|
+
let _wordpress_keyboard_shortcuts = require("@wordpress/keyboard-shortcuts");
|
|
29
|
+
let __shortcut_jsx = require("./shortcut.cjs");
|
|
30
|
+
__shortcut_jsx = __toESM(__shortcut_jsx);
|
|
31
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
29
32
|
// packages/customize-widgets/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.jsx
|
|
30
|
-
var dynamic_shortcut_exports = {};
|
|
31
|
-
__export(dynamic_shortcut_exports, {
|
|
32
|
-
default: () => dynamic_shortcut_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(dynamic_shortcut_exports);
|
|
35
|
-
var import_data = require("@wordpress/data");
|
|
36
|
-
var import_keyboard_shortcuts = require("@wordpress/keyboard-shortcuts");
|
|
37
|
-
var import_shortcut = __toESM(require("./shortcut.cjs"));
|
|
38
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
33
|
function DynamicShortcut({ name }) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
);
|
|
55
|
-
if (!keyCombination) {
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
59
|
-
import_shortcut.default,
|
|
60
|
-
{
|
|
61
|
-
keyCombination,
|
|
62
|
-
description,
|
|
63
|
-
aliases
|
|
64
|
-
}
|
|
65
|
-
);
|
|
34
|
+
const { keyCombination, description, aliases } = (0, _wordpress_data.useSelect)((select) => {
|
|
35
|
+
const { getShortcutKeyCombination, getShortcutDescription, getShortcutAliases } = select(_wordpress_keyboard_shortcuts.store);
|
|
36
|
+
return {
|
|
37
|
+
keyCombination: getShortcutKeyCombination(name),
|
|
38
|
+
aliases: getShortcutAliases(name),
|
|
39
|
+
description: getShortcutDescription(name)
|
|
40
|
+
};
|
|
41
|
+
}, [name]);
|
|
42
|
+
if (!keyCombination) return null;
|
|
43
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__shortcut_jsx.default, {
|
|
44
|
+
keyCombination,
|
|
45
|
+
description,
|
|
46
|
+
aliases
|
|
47
|
+
});
|
|
66
48
|
}
|
|
67
|
-
|
|
68
|
-
|
|
49
|
+
exports.default = DynamicShortcut;
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=dynamic-shortcut.cjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/keyboard-shortcut-help-modal/dynamic-shortcut.jsx"],
|
|
4
|
-
"sourcesContent": ["import { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA0B;AAC1B,gCAAgD;AAChD,sBAAqB;AAyBnB;AAvBF,SAAS,gBAAiB,EAAE,KAAK,GAAI;AACpC,QAAM,EAAE,gBAAgB,aAAa,QAAQ,QAAI;AAAA,IAChD,CAAE,WAAY;AACb,YAAM;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,MACD,IAAI,OAAQ,0BAAAA,KAAuB;AAEnC,aAAO;AAAA,QACN,gBAAgB,0BAA2B,IAAK;AAAA,QAChD,SAAS,mBAAoB,IAAK;AAAA,QAClC,aAAa,uBAAwB,IAAK;AAAA,MAC3C;AAAA,IACD;AAAA,IACA,CAAE,IAAK;AAAA,EACR;AAEA,MAAK,CAAE,gBAAiB;AACvB,WAAO;AAAA,EACR;AAEA,SACC;AAAA,IAAC,gBAAAC;AAAA,IAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACD;AAEF;AAEA,IAAO,2BAAQ;",
|
|
6
|
-
"names": ["keyboardShortcutsStore", "Shortcut"]
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"dynamic-shortcut.cjs","names":["useSelect","keyboardShortcutsStore","Shortcut"],"sources":["../../../src/components/keyboard-shortcut-help-modal/dynamic-shortcut.jsx"],"sourcesContent":["import { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAAS,gBAAiB,EAAE,QAAS;CACpC,MAAM,EAAE,gBAAgB,aAAa,aAAA,GAAYA,gBAAAA,UAAAA,EAC9C,WAAY;EACb,MAAM,EACL,2BACA,wBACA,uBACG,OAAQC,8BAAAA,KAAuB;EAEnC,OAAO;GACN,gBAAgB,0BAA2B,IAAK;GAChD,SAAS,mBAAoB,IAAK;GAClC,aAAa,uBAAwB,IAAK;EAC3C;CACD,GACA,CAAE,IAAK,CACR;CAEA,IAAK,CAAE,gBACN,OAAO;CAGR,OACC,iBAAA,GAAA,kBAAA,IAAA,CAACC,eAAAA,SAAD;EACkB;EACH;EACJ;CACV,CAAA;AAEH"}
|
|
@@ -1,177 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, {
|
|
3
|
+
__esModule: { value: true },
|
|
4
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
5
|
+
});
|
|
6
|
+
// \0rolldown/runtime.js
|
|
1
7
|
var __create = Object.create;
|
|
2
8
|
var __defProp = Object.defineProperty;
|
|
3
9
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
10
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
11
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
12
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
13
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
15
|
+
key = keys[i];
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: ((k) => from[k]).bind(null, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
18
22
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
+
value: mod,
|
|
25
|
+
enumerable: true
|
|
26
|
+
}) : target, mod));
|
|
27
|
+
let clsx = require("clsx");
|
|
28
|
+
clsx = __toESM(clsx);
|
|
29
|
+
let _wordpress_components = require("@wordpress/components");
|
|
30
|
+
let _wordpress_i18n = require("@wordpress/i18n");
|
|
31
|
+
let _wordpress_keyboard_shortcuts = require("@wordpress/keyboard-shortcuts");
|
|
32
|
+
let _wordpress_data = require("@wordpress/data");
|
|
33
|
+
let _wordpress_element = require("@wordpress/element");
|
|
34
|
+
let __config_js = require("./config.cjs");
|
|
35
|
+
let __shortcut_jsx = require("./shortcut.cjs");
|
|
36
|
+
__shortcut_jsx = __toESM(__shortcut_jsx);
|
|
37
|
+
let __dynamic_shortcut_jsx = require("./dynamic-shortcut.cjs");
|
|
38
|
+
__dynamic_shortcut_jsx = __toESM(__dynamic_shortcut_jsx);
|
|
39
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
29
40
|
// packages/customize-widgets/src/components/keyboard-shortcut-help-modal/index.jsx
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
41
|
+
const ShortcutList = ({ shortcuts }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
42
|
+
className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-list",
|
|
43
|
+
role: "list",
|
|
44
|
+
children: shortcuts.map((shortcut, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
|
|
45
|
+
className: "customize-widgets-keyboard-shortcut-help-modal__shortcut",
|
|
46
|
+
children: typeof shortcut === "string" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__dynamic_shortcut_jsx.default, { name: shortcut }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__shortcut_jsx.default, { ...shortcut })
|
|
47
|
+
}, index))
|
|
33
48
|
});
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
*/
|
|
50
|
-
/* eslint-disable jsx-a11y/no-redundant-roles */
|
|
51
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
52
|
-
"ul",
|
|
53
|
-
{
|
|
54
|
-
className: "customize-widgets-keyboard-shortcut-help-modal__shortcut-list",
|
|
55
|
-
role: "list",
|
|
56
|
-
children: shortcuts.map((shortcut, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
57
|
-
"li",
|
|
58
|
-
{
|
|
59
|
-
className: "customize-widgets-keyboard-shortcut-help-modal__shortcut",
|
|
60
|
-
children: typeof shortcut === "string" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dynamic_shortcut.default, { name: shortcut }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_shortcut.default, { ...shortcut })
|
|
61
|
-
},
|
|
62
|
-
index
|
|
63
|
-
))
|
|
64
|
-
}
|
|
65
|
-
)
|
|
66
|
-
);
|
|
67
|
-
var ShortcutSection = ({ title, shortcuts, className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
68
|
-
"section",
|
|
69
|
-
{
|
|
70
|
-
className: (0, import_clsx.default)(
|
|
71
|
-
"customize-widgets-keyboard-shortcut-help-modal__section",
|
|
72
|
-
className
|
|
73
|
-
),
|
|
74
|
-
children: [
|
|
75
|
-
!!title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "customize-widgets-keyboard-shortcut-help-modal__section-title", children: title }),
|
|
76
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShortcutList, { shortcuts })
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
var ShortcutCategorySection = ({
|
|
81
|
-
title,
|
|
82
|
-
categoryName,
|
|
83
|
-
additionalShortcuts = []
|
|
84
|
-
}) => {
|
|
85
|
-
const categoryShortcuts = (0, import_data.useSelect)(
|
|
86
|
-
(select) => {
|
|
87
|
-
return select(import_keyboard_shortcuts.store).getCategoryShortcuts(
|
|
88
|
-
categoryName
|
|
89
|
-
);
|
|
90
|
-
},
|
|
91
|
-
[categoryName]
|
|
92
|
-
);
|
|
93
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
94
|
-
ShortcutSection,
|
|
95
|
-
{
|
|
96
|
-
title,
|
|
97
|
-
shortcuts: categoryShortcuts.concat(additionalShortcuts)
|
|
98
|
-
}
|
|
99
|
-
);
|
|
49
|
+
const ShortcutSection = ({ title, shortcuts, className }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
50
|
+
className: (0, clsx.default)("customize-widgets-keyboard-shortcut-help-modal__section", className),
|
|
51
|
+
children: [!!title && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
|
|
52
|
+
className: "customize-widgets-keyboard-shortcut-help-modal__section-title",
|
|
53
|
+
children: title
|
|
54
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShortcutList, { shortcuts })]
|
|
55
|
+
});
|
|
56
|
+
const ShortcutCategorySection = ({ title, categoryName, additionalShortcuts = [] }) => {
|
|
57
|
+
const categoryShortcuts = (0, _wordpress_data.useSelect)((select) => {
|
|
58
|
+
return select(_wordpress_keyboard_shortcuts.store).getCategoryShortcuts(categoryName);
|
|
59
|
+
}, [categoryName]);
|
|
60
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShortcutSection, {
|
|
61
|
+
title,
|
|
62
|
+
shortcuts: categoryShortcuts.concat(additionalShortcuts)
|
|
63
|
+
});
|
|
100
64
|
};
|
|
101
|
-
function KeyboardShortcutHelpModal({
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
),
|
|
149
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
150
|
-
ShortcutCategorySection,
|
|
151
|
-
{
|
|
152
|
-
title: (0, import_i18n.__)("Block shortcuts"),
|
|
153
|
-
categoryName: "block",
|
|
154
|
-
additionalShortcuts: [
|
|
155
|
-
{
|
|
156
|
-
keyCombination: { character: "/" },
|
|
157
|
-
description: (0, import_i18n.__)(
|
|
158
|
-
"Change the block type after adding a new paragraph."
|
|
159
|
-
),
|
|
160
|
-
/* translators: The forward-slash character. e.g. '/'. */
|
|
161
|
-
ariaLabel: (0, import_i18n.__)("Forward-slash")
|
|
162
|
-
}
|
|
163
|
-
]
|
|
164
|
-
}
|
|
165
|
-
),
|
|
166
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
167
|
-
ShortcutSection,
|
|
168
|
-
{
|
|
169
|
-
title: (0, import_i18n.__)("Text formatting"),
|
|
170
|
-
shortcuts: import_config.textFormattingShortcuts
|
|
171
|
-
}
|
|
172
|
-
)
|
|
173
|
-
]
|
|
174
|
-
}
|
|
175
|
-
);
|
|
65
|
+
function KeyboardShortcutHelpModal({ isModalActive, toggleModal }) {
|
|
66
|
+
const { registerShortcut } = (0, _wordpress_data.useDispatch)(_wordpress_keyboard_shortcuts.store);
|
|
67
|
+
(0, _wordpress_element.useEffect)(() => {
|
|
68
|
+
registerShortcut({
|
|
69
|
+
name: "core/customize-widgets/keyboard-shortcuts",
|
|
70
|
+
category: "main",
|
|
71
|
+
description: (0, _wordpress_i18n.__)("Display these keyboard shortcuts."),
|
|
72
|
+
keyCombination: {
|
|
73
|
+
modifier: "access",
|
|
74
|
+
character: "h"
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}, [registerShortcut]);
|
|
78
|
+
(0, _wordpress_keyboard_shortcuts.useShortcut)("core/customize-widgets/keyboard-shortcuts", toggleModal);
|
|
79
|
+
if (!isModalActive) return null;
|
|
80
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_wordpress_components.Modal, {
|
|
81
|
+
className: "customize-widgets-keyboard-shortcut-help-modal",
|
|
82
|
+
title: (0, _wordpress_i18n.__)("Keyboard shortcuts"),
|
|
83
|
+
onRequestClose: toggleModal,
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShortcutSection, {
|
|
86
|
+
className: "customize-widgets-keyboard-shortcut-help-modal__main-shortcuts",
|
|
87
|
+
shortcuts: ["core/customize-widgets/keyboard-shortcuts"]
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShortcutCategorySection, {
|
|
90
|
+
title: (0, _wordpress_i18n.__)("Global shortcuts"),
|
|
91
|
+
categoryName: "global"
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShortcutCategorySection, {
|
|
94
|
+
title: (0, _wordpress_i18n.__)("Selection shortcuts"),
|
|
95
|
+
categoryName: "selection"
|
|
96
|
+
}),
|
|
97
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShortcutCategorySection, {
|
|
98
|
+
title: (0, _wordpress_i18n.__)("Block shortcuts"),
|
|
99
|
+
categoryName: "block",
|
|
100
|
+
additionalShortcuts: [{
|
|
101
|
+
keyCombination: { character: "/" },
|
|
102
|
+
description: (0, _wordpress_i18n.__)("Change the block type after adding a new paragraph."),
|
|
103
|
+
ariaLabel: (0, _wordpress_i18n.__)("Forward-slash")
|
|
104
|
+
}]
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ShortcutSection, {
|
|
107
|
+
title: (0, _wordpress_i18n.__)("Text formatting"),
|
|
108
|
+
shortcuts: __config_js.textFormattingShortcuts
|
|
109
|
+
})
|
|
110
|
+
]
|
|
111
|
+
});
|
|
176
112
|
}
|
|
177
|
-
|
|
113
|
+
exports.default = KeyboardShortcutHelpModal;
|
|
114
|
+
|
|
115
|
+
//# sourceMappingURL=index.cjs.map
|