@wordpress/customize-widgets 5.32.0 → 5.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/components/block-appender/index.js +33 -27
- package/build/components/block-appender/index.js.map +7 -1
- package/build/components/block-inspector-button/index.js +51 -36
- package/build/components/block-inspector-button/index.js.map +7 -1
- package/build/components/customize-widgets/index.js +83 -61
- package/build/components/customize-widgets/index.js.map +7 -1
- package/build/components/customize-widgets/use-clear-selected-block.js +56 -63
- package/build/components/customize-widgets/use-clear-selected-block.js.map +7 -1
- package/build/components/error-boundary/index.js +46 -45
- package/build/components/error-boundary/index.js.map +7 -1
- package/build/components/focus-control/index.js +69 -57
- package/build/components/focus-control/index.js.map +7 -1
- package/build/components/focus-control/use-blocks-focus-control.js +38 -31
- package/build/components/focus-control/use-blocks-focus-control.js.map +7 -1
- package/build/components/header/index.js +110 -71
- package/build/components/header/index.js.map +7 -1
- package/build/components/inserter/index.js +77 -53
- package/build/components/inserter/index.js.map +7 -1
- package/build/components/inserter/use-inserter.js +46 -29
- package/build/components/inserter/use-inserter.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 +155 -110
- package/build/components/keyboard-shortcut-help-modal/index.js.map +7 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +76 -56
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +7 -1
- package/build/components/keyboard-shortcuts/index.js +60 -51
- package/build/components/keyboard-shortcuts/index.js.map +7 -1
- package/build/components/more-menu/index.js +151 -90
- package/build/components/more-menu/index.js.map +7 -1
- package/build/components/sidebar-block-editor/index.js +133 -105
- package/build/components/sidebar-block-editor/index.js.map +7 -1
- package/build/components/sidebar-block-editor/sidebar-adapter.js +73 -67
- package/build/components/sidebar-block-editor/sidebar-adapter.js.map +7 -1
- package/build/components/sidebar-block-editor/sidebar-editor-provider.js +51 -33
- package/build/components/sidebar-block-editor/sidebar-editor-provider.js.map +7 -1
- package/build/components/sidebar-block-editor/use-sidebar-block-editor.js +100 -79
- package/build/components/sidebar-block-editor/use-sidebar-block-editor.js.map +7 -1
- package/build/components/sidebar-controls/index.js +45 -31
- package/build/components/sidebar-controls/index.js.map +7 -1
- package/build/components/welcome-guide/index.js +86 -58
- package/build/components/welcome-guide/index.js.map +7 -1
- package/build/controls/inserter-outer-section.js +49 -58
- package/build/controls/inserter-outer-section.js.map +7 -1
- package/build/controls/inspector-section.js +30 -36
- package/build/controls/inspector-section.js.map +7 -1
- package/build/controls/sidebar-control.js +51 -30
- package/build/controls/sidebar-control.js.map +7 -1
- package/build/controls/sidebar-section.js +71 -39
- package/build/controls/sidebar-section.js.map +7 -1
- package/build/filters/index.js +4 -6
- package/build/filters/index.js.map +7 -1
- package/build/filters/move-to-sidebar.js +77 -79
- package/build/filters/move-to-sidebar.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/filters/wide-widget-display.js +20 -25
- package/build/filters/wide-widget-display.js.map +7 -1
- package/build/index.js +81 -70
- 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 +27 -44
- 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 +44 -40
- package/build/store/index.js.map +7 -1
- package/build/store/reducer.js +25 -19
- package/build/store/reducer.js.map +7 -1
- package/build/store/selectors.js +31 -44
- package/build/store/selectors.js.map +7 -1
- package/build/utils.js +45 -73
- package/build/utils.js.map +7 -1
- package/build-module/components/block-appender/index.js +17 -20
- package/build-module/components/block-appender/index.js.map +7 -1
- package/build-module/components/block-inspector-button/index.js +33 -30
- package/build-module/components/block-inspector-button/index.js.map +7 -1
- package/build-module/components/customize-widgets/index.js +52 -51
- package/build-module/components/customize-widgets/index.js.map +7 -1
- package/build-module/components/customize-widgets/use-clear-selected-block.js +38 -58
- package/build-module/components/customize-widgets/use-clear-selected-block.js.map +7 -1
- package/build-module/components/error-boundary/index.js +27 -37
- package/build-module/components/error-boundary/index.js.map +7 -1
- package/build-module/components/focus-control/index.js +50 -45
- package/build-module/components/focus-control/index.js.map +7 -1
- package/build-module/components/focus-control/use-blocks-focus-control.js +17 -22
- package/build-module/components/focus-control/use-blocks-focus-control.js.map +7 -1
- package/build-module/components/header/index.js +81 -63
- package/build-module/components/header/index.js.map +7 -1
- package/build-module/components/inserter/index.js +59 -47
- package/build-module/components/inserter/index.js.map +7 -1
- package/build-module/components/inserter/use-inserter.js +28 -23
- package/build-module/components/inserter/use-inserter.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 -103
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +7 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +58 -50
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +7 -1
- package/build-module/components/keyboard-shortcuts/index.js +44 -44
- package/build-module/components/keyboard-shortcuts/index.js.map +7 -1
- package/build-module/components/more-menu/index.js +129 -84
- package/build-module/components/more-menu/index.js.map +7 -1
- package/build-module/components/sidebar-block-editor/index.js +109 -96
- package/build-module/components/sidebar-block-editor/index.js.map +7 -1
- package/build-module/components/sidebar-block-editor/sidebar-adapter.js +54 -59
- package/build-module/components/sidebar-block-editor/sidebar-adapter.js.map +7 -1
- package/build-module/components/sidebar-block-editor/sidebar-editor-provider.js +22 -25
- package/build-module/components/sidebar-block-editor/sidebar-editor-provider.js.map +7 -1
- package/build-module/components/sidebar-block-editor/use-sidebar-block-editor.js +70 -70
- package/build-module/components/sidebar-block-editor/use-sidebar-block-editor.js.map +7 -1
- package/build-module/components/sidebar-controls/index.js +24 -25
- package/build-module/components/sidebar-controls/index.js.map +7 -1
- package/build-module/components/welcome-guide/index.js +68 -52
- package/build-module/components/welcome-guide/index.js.map +7 -1
- package/build-module/controls/inserter-outer-section.js +31 -52
- package/build-module/controls/inserter-outer-section.js.map +7 -1
- package/build-module/controls/inspector-section.js +13 -32
- package/build-module/controls/inspector-section.js.map +7 -1
- package/build-module/controls/sidebar-control.js +22 -22
- package/build-module/controls/sidebar-control.js.map +7 -1
- package/build-module/controls/sidebar-section.js +43 -32
- package/build-module/controls/sidebar-section.js.map +7 -1
- package/build-module/filters/index.js +4 -7
- package/build-module/filters/index.js.map +7 -1
- package/build-module/filters/move-to-sidebar.js +83 -76
- package/build-module/filters/move-to-sidebar.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/filters/wide-widget-display.js +20 -22
- package/build-module/filters/wide-widget-display.js.map +7 -1
- package/build-module/index.js +53 -51
- 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 +6 -40
- 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 +10 -30
- package/build-module/store/index.js.map +7 -1
- package/build-module/store/reducer.js +7 -14
- package/build-module/store/reducer.js.map +7 -1
- package/build-module/store/selectors.js +10 -40
- package/build-module/store/selectors.js.map +7 -1
- package/build-module/utils.js +21 -66
- package/build-module/utils.js.map +7 -1
- package/build-style/style-rtl.css +14 -149
- package/build-style/style.css +14 -149
- package/package.json +30 -23
- package/src/components/block-inspector-button/style.scss +3 -0
- package/src/components/header/style.scss +5 -0
- package/src/components/inserter/style.scss +3 -0
- package/src/components/keyboard-shortcut-help-modal/style.scss +2 -0
- package/src/components/more-menu/style.scss +2 -0
- package/src/components/sidebar-block-editor/style.scss +2 -0
- package/src/components/welcome-guide/style.scss +2 -0
- package/src/controls/style.scss +2 -0
- package/src/style.scss +10 -8
|
@@ -1,36 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
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
|
+
var block_appender_exports = {};
|
|
19
|
+
__export(block_appender_exports, {
|
|
20
|
+
default: () => BlockAppender
|
|
5
21
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
/**
|
|
12
|
-
* WordPress dependencies
|
|
13
|
-
*/
|
|
14
|
-
|
|
22
|
+
module.exports = __toCommonJS(block_appender_exports);
|
|
23
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
|
+
var import_element = require("@wordpress/element");
|
|
25
|
+
var import_block_editor = require("@wordpress/block-editor");
|
|
26
|
+
var import_data = require("@wordpress/data");
|
|
15
27
|
function BlockAppender(props) {
|
|
16
|
-
const ref = (0,
|
|
17
|
-
const isBlocksListEmpty = (0,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
(0, _element.useEffect)(() => {
|
|
28
|
+
const ref = (0, import_element.useRef)();
|
|
29
|
+
const isBlocksListEmpty = (0, import_data.useSelect)(
|
|
30
|
+
(select) => select(import_block_editor.store).getBlockCount() === 0
|
|
31
|
+
);
|
|
32
|
+
(0, import_element.useEffect)(() => {
|
|
22
33
|
if (isBlocksListEmpty && ref.current) {
|
|
23
|
-
const {
|
|
24
|
-
ownerDocument
|
|
25
|
-
} = ref.current;
|
|
34
|
+
const { ownerDocument } = ref.current;
|
|
26
35
|
if (!ownerDocument.activeElement || ownerDocument.activeElement === ownerDocument.body) {
|
|
27
36
|
ref.current.focus();
|
|
28
37
|
}
|
|
29
38
|
}
|
|
30
39
|
}, [isBlocksListEmpty]);
|
|
31
|
-
return
|
|
32
|
-
...props,
|
|
33
|
-
ref: ref
|
|
34
|
-
});
|
|
40
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_block_editor.ButtonBlockAppender, { ...props, ref });
|
|
35
41
|
}
|
|
36
|
-
//# sourceMappingURL=index.js.map
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/block-appender/index.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport {\n\tButtonBlockAppender,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\n\nexport default function BlockAppender( props ) {\n\tconst ref = useRef();\n\tconst isBlocksListEmpty = useSelect(\n\t\t( select ) => select( blockEditorStore ).getBlockCount() === 0\n\t);\n\n\t// Move the focus to the block appender to prevent focus from\n\t// being lost when emptying the widget area.\n\tuseEffect( () => {\n\t\tif ( isBlocksListEmpty && ref.current ) {\n\t\t\tconst { ownerDocument } = ref.current;\n\n\t\t\tif (\n\t\t\t\t! ownerDocument.activeElement ||\n\t\t\t\townerDocument.activeElement === ownerDocument.body\n\t\t\t) {\n\t\t\t\tref.current.focus();\n\t\t\t}\n\t\t}\n\t}, [ isBlocksListEmpty ] );\n\n\treturn <ButtonBlockAppender { ...props } ref={ ref } />;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BQ;AA5BR,qBAAkC;AAClC,0BAGO;AACP,kBAA0B;AAEX,SAAR,cAAgC,OAAQ;AAC9C,QAAM,UAAM,uBAAO;AACnB,QAAM,wBAAoB;AAAA,IACzB,CAAE,WAAY,OAAQ,oBAAAA,KAAiB,EAAE,cAAc,MAAM;AAAA,EAC9D;AAIA,gCAAW,MAAM;AAChB,QAAK,qBAAqB,IAAI,SAAU;AACvC,YAAM,EAAE,cAAc,IAAI,IAAI;AAE9B,UACC,CAAE,cAAc,iBAChB,cAAc,kBAAkB,cAAc,MAC7C;AACD,YAAI,QAAQ,MAAM;AAAA,MACnB;AAAA,IACD;AAAA,EACD,GAAG,CAAE,iBAAkB,CAAE;AAEzB,SAAO,4CAAC,2CAAsB,GAAG,OAAQ,KAAY;AACtD;",
|
|
6
|
+
"names": ["blockEditorStore"]
|
|
7
|
+
}
|
|
@@ -1,38 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
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
|
+
var block_inspector_button_exports = {};
|
|
19
|
+
__export(block_inspector_button_exports, {
|
|
20
|
+
default: () => block_inspector_button_default
|
|
5
21
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
});
|
|
22
|
+
module.exports = __toCommonJS(block_inspector_button_exports);
|
|
23
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
|
+
var import_element = require("@wordpress/element");
|
|
25
|
+
var import_i18n = require("@wordpress/i18n");
|
|
26
|
+
var import_components = require("@wordpress/components");
|
|
27
|
+
var import_data = require("@wordpress/data");
|
|
28
|
+
var import_block_editor = require("@wordpress/block-editor");
|
|
29
|
+
function BlockInspectorButton({ inspector, closeMenu, ...props }) {
|
|
30
|
+
const selectedBlockClientId = (0, import_data.useSelect)(
|
|
31
|
+
(select) => select(import_block_editor.store).getSelectedBlockClientId(),
|
|
32
|
+
[]
|
|
33
|
+
);
|
|
34
|
+
const selectedBlock = (0, import_element.useMemo)(
|
|
35
|
+
() => document.getElementById(`block-${selectedBlockClientId}`),
|
|
36
|
+
[selectedBlockClientId]
|
|
37
|
+
);
|
|
38
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
39
|
+
import_components.MenuItem,
|
|
40
|
+
{
|
|
41
|
+
onClick: () => {
|
|
42
|
+
inspector.open({
|
|
43
|
+
returnFocusWhenClose: selectedBlock
|
|
44
|
+
});
|
|
45
|
+
closeMenu();
|
|
46
|
+
},
|
|
47
|
+
...props,
|
|
48
|
+
children: (0, import_i18n.__)("Show more settings")
|
|
49
|
+
}
|
|
50
|
+
);
|
|
36
51
|
}
|
|
37
|
-
var
|
|
38
|
-
//# sourceMappingURL=index.js.map
|
|
52
|
+
var block_inspector_button_default = BlockInspectorButton;
|
|
53
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/block-inspector-button/index.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\nfunction BlockInspectorButton( { inspector, closeMenu, ...props } ) {\n\tconst selectedBlockClientId = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSelectedBlockClientId(),\n\t\t[]\n\t);\n\n\tconst selectedBlock = useMemo(\n\t\t() => document.getElementById( `block-${ selectedBlockClientId }` ),\n\t\t[ selectedBlockClientId ]\n\t);\n\n\treturn (\n\t\t<MenuItem\n\t\t\tonClick={ () => {\n\t\t\t\t// Open the inspector.\n\t\t\t\tinspector.open( {\n\t\t\t\t\treturnFocusWhenClose: selectedBlock,\n\t\t\t\t} );\n\t\t\t\t// Then close the dropdown menu.\n\t\t\t\tcloseMenu();\n\t\t\t} }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ __( 'Show more settings' ) }\n\t\t</MenuItem>\n\t);\n}\n\nexport default BlockInspectorButton;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBE;AAlBF,qBAAwB;AACxB,kBAAmB;AACnB,wBAAyB;AACzB,kBAA0B;AAC1B,0BAA0C;AAE1C,SAAS,qBAAsB,EAAE,WAAW,WAAW,GAAG,MAAM,GAAI;AACnE,QAAM,4BAAwB;AAAA,IAC7B,CAAE,WAAY,OAAQ,oBAAAA,KAAiB,EAAE,yBAAyB;AAAA,IAClE,CAAC;AAAA,EACF;AAEA,QAAM,oBAAgB;AAAA,IACrB,MAAM,SAAS,eAAgB,SAAU,qBAAsB,EAAG;AAAA,IAClE,CAAE,qBAAsB;AAAA,EACzB;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,SAAU,MAAM;AAEf,kBAAU,KAAM;AAAA,UACf,sBAAsB;AAAA,QACvB,CAAE;AAEF,kBAAU;AAAA,MACX;AAAA,MACE,GAAG;AAAA,MAEH,8BAAI,oBAAqB;AAAA;AAAA,EAC5B;AAEF;AAEA,IAAO,iCAAQ;",
|
|
6
|
+
"names": ["blockEditorStore"]
|
|
7
|
+
}
|
|
@@ -1,71 +1,93 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
Object.
|
|
5
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
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
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var customize_widgets_exports = {};
|
|
29
|
+
__export(customize_widgets_exports, {
|
|
30
|
+
default: () => CustomizeWidgets
|
|
6
31
|
});
|
|
7
|
-
exports
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
/**
|
|
17
|
-
* WordPress dependencies
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Internal dependencies
|
|
22
|
-
*/
|
|
23
|
-
|
|
32
|
+
module.exports = __toCommonJS(customize_widgets_exports);
|
|
33
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
+
var import_element = require("@wordpress/element");
|
|
35
|
+
var import_components = require("@wordpress/components");
|
|
36
|
+
var import_error_boundary = __toESM(require("../error-boundary"));
|
|
37
|
+
var import_sidebar_block_editor = __toESM(require("../sidebar-block-editor"));
|
|
38
|
+
var import_focus_control = __toESM(require("../focus-control"));
|
|
39
|
+
var import_sidebar_controls = __toESM(require("../sidebar-controls"));
|
|
40
|
+
var import_use_clear_selected_block = __toESM(require("./use-clear-selected-block"));
|
|
24
41
|
function CustomizeWidgets({
|
|
25
42
|
api,
|
|
26
43
|
sidebarControls,
|
|
27
44
|
blockEditorSettings
|
|
28
45
|
}) {
|
|
29
|
-
const [activeSidebarControl, setActiveSidebarControl] = (0,
|
|
30
|
-
const parentContainer = document.getElementById(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
(0,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
46
|
+
const [activeSidebarControl, setActiveSidebarControl] = (0, import_element.useState)(null);
|
|
47
|
+
const parentContainer = document.getElementById(
|
|
48
|
+
"customize-theme-controls"
|
|
49
|
+
);
|
|
50
|
+
const popoverRef = (0, import_element.useRef)();
|
|
51
|
+
(0, import_use_clear_selected_block.default)(activeSidebarControl, popoverRef);
|
|
52
|
+
(0, import_element.useEffect)(() => {
|
|
53
|
+
const unsubscribers = sidebarControls.map(
|
|
54
|
+
(sidebarControl) => sidebarControl.subscribe((expanded) => {
|
|
55
|
+
if (expanded) {
|
|
56
|
+
setActiveSidebarControl(sidebarControl);
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
);
|
|
39
60
|
return () => {
|
|
40
|
-
unsubscribers.forEach(unsubscriber => unsubscriber());
|
|
61
|
+
unsubscribers.forEach((unsubscriber) => unsubscriber());
|
|
41
62
|
};
|
|
42
63
|
}, [sidebarControls]);
|
|
43
|
-
const activeSidebar = activeSidebarControl && (0,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
children:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
const activeSidebar = activeSidebarControl && (0, import_element.createPortal)(
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_error_boundary.default, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
66
|
+
import_sidebar_block_editor.default,
|
|
67
|
+
{
|
|
68
|
+
blockEditorSettings,
|
|
69
|
+
sidebar: activeSidebarControl.sidebarAdapter,
|
|
70
|
+
inserter: activeSidebarControl.inserter,
|
|
71
|
+
inspector: activeSidebarControl.inspector
|
|
72
|
+
},
|
|
73
|
+
activeSidebarControl.id
|
|
74
|
+
) }),
|
|
75
|
+
activeSidebarControl.container[0]
|
|
76
|
+
);
|
|
77
|
+
const popover = parentContainer && (0, import_element.createPortal)(
|
|
78
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "customize-widgets-popover", ref: popoverRef, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Popover.Slot, {}) }),
|
|
79
|
+
parentContainer
|
|
80
|
+
);
|
|
81
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.SlotFillProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
82
|
+
import_sidebar_controls.default,
|
|
83
|
+
{
|
|
84
|
+
sidebarControls,
|
|
85
|
+
activeSidebarControl,
|
|
86
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_focus_control.default, { api, sidebarControls, children: [
|
|
87
|
+
activeSidebar,
|
|
88
|
+
popover
|
|
89
|
+
] })
|
|
90
|
+
}
|
|
91
|
+
) });
|
|
70
92
|
}
|
|
71
|
-
//# sourceMappingURL=index.js.map
|
|
93
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/customize-widgets/index.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useState, useEffect, useRef, createPortal } from '@wordpress/element';\nimport { SlotFillProvider, Popover } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ErrorBoundary from '../error-boundary';\nimport SidebarBlockEditor from '../sidebar-block-editor';\nimport FocusControl from '../focus-control';\nimport SidebarControls from '../sidebar-controls';\nimport useClearSelectedBlock from './use-clear-selected-block';\n\nexport default function CustomizeWidgets( {\n\tapi,\n\tsidebarControls,\n\tblockEditorSettings,\n} ) {\n\tconst [ activeSidebarControl, setActiveSidebarControl ] = useState( null );\n\tconst parentContainer = document.getElementById(\n\t\t'customize-theme-controls'\n\t);\n\tconst popoverRef = useRef();\n\n\tuseClearSelectedBlock( activeSidebarControl, popoverRef );\n\n\tuseEffect( () => {\n\t\tconst unsubscribers = sidebarControls.map( ( sidebarControl ) =>\n\t\t\tsidebarControl.subscribe( ( expanded ) => {\n\t\t\t\tif ( expanded ) {\n\t\t\t\t\tsetActiveSidebarControl( sidebarControl );\n\t\t\t\t}\n\t\t\t} )\n\t\t);\n\n\t\treturn () => {\n\t\t\tunsubscribers.forEach( ( unsubscriber ) => unsubscriber() );\n\t\t};\n\t}, [ sidebarControls ] );\n\n\tconst activeSidebar =\n\t\tactiveSidebarControl &&\n\t\tcreatePortal(\n\t\t\t<ErrorBoundary>\n\t\t\t\t<SidebarBlockEditor\n\t\t\t\t\tkey={ activeSidebarControl.id }\n\t\t\t\t\tblockEditorSettings={ blockEditorSettings }\n\t\t\t\t\tsidebar={ activeSidebarControl.sidebarAdapter }\n\t\t\t\t\tinserter={ activeSidebarControl.inserter }\n\t\t\t\t\tinspector={ activeSidebarControl.inspector }\n\t\t\t\t/>\n\t\t\t</ErrorBoundary>,\n\t\t\tactiveSidebarControl.container[ 0 ]\n\t\t);\n\n\t// We have to portal this to the parent of both the editor and the inspector,\n\t// so that the popovers will appear above both of them.\n\tconst popover =\n\t\tparentContainer &&\n\t\tcreatePortal(\n\t\t\t<div className=\"customize-widgets-popover\" ref={ popoverRef }>\n\t\t\t\t<Popover.Slot />\n\t\t\t</div>,\n\t\t\tparentContainer\n\t\t);\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<SidebarControls\n\t\t\t\tsidebarControls={ sidebarControls }\n\t\t\t\tactiveSidebarControl={ activeSidebarControl }\n\t\t\t>\n\t\t\t\t<FocusControl api={ api } sidebarControls={ sidebarControls }>\n\t\t\t\t\t{ activeSidebar }\n\t\t\t\t\t{ popover }\n\t\t\t\t</FocusControl>\n\t\t\t</SidebarControls>\n\t\t</SlotFillProvider>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA8CI;AA3CJ,qBAA0D;AAC1D,wBAA0C;AAK1C,4BAA0B;AAC1B,kCAA+B;AAC/B,2BAAyB;AACzB,8BAA4B;AAC5B,sCAAkC;AAEnB,SAAR,iBAAmC;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,QAAM,CAAE,sBAAsB,uBAAwB,QAAI,yBAAU,IAAK;AACzE,QAAM,kBAAkB,SAAS;AAAA,IAChC;AAAA,EACD;AACA,QAAM,iBAAa,uBAAO;AAE1B,sCAAAA,SAAuB,sBAAsB,UAAW;AAExD,gCAAW,MAAM;AAChB,UAAM,gBAAgB,gBAAgB;AAAA,MAAK,CAAE,mBAC5C,eAAe,UAAW,CAAE,aAAc;AACzC,YAAK,UAAW;AACf,kCAAyB,cAAe;AAAA,QACzC;AAAA,MACD,CAAE;AAAA,IACH;AAEA,WAAO,MAAM;AACZ,oBAAc,QAAS,CAAE,iBAAkB,aAAa,CAAE;AAAA,IAC3D;AAAA,EACD,GAAG,CAAE,eAAgB,CAAE;AAEvB,QAAM,gBACL,4BACA;AAAA,IACC,4CAAC,sBAAAC,SAAA,EACA;AAAA,MAAC,4BAAAC;AAAA,MAAA;AAAA,QAEA;AAAA,QACA,SAAU,qBAAqB;AAAA,QAC/B,UAAW,qBAAqB;AAAA,QAChC,WAAY,qBAAqB;AAAA;AAAA,MAJ3B,qBAAqB;AAAA,IAK5B,GACD;AAAA,IACA,qBAAqB,UAAW,CAAE;AAAA,EACnC;AAID,QAAM,UACL,uBACA;AAAA,IACC,4CAAC,SAAI,WAAU,6BAA4B,KAAM,YAChD,sDAAC,0BAAQ,MAAR,EAAa,GACf;AAAA,IACA;AAAA,EACD;AAED,SACC,4CAAC,sCACA;AAAA,IAAC,wBAAAC;AAAA,IAAA;AAAA,MACA;AAAA,MACA;AAAA,MAEA,uDAAC,qBAAAC,SAAA,EAAa,KAAY,iBACvB;AAAA;AAAA,QACA;AAAA,SACH;AAAA;AAAA,EACD,GACD;AAEF;",
|
|
6
|
+
"names": ["useClearSelectedBlock", "ErrorBoundary", "SidebarBlockEditor", "SidebarControls", "FocusControl"]
|
|
7
|
+
}
|
|
@@ -1,75 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
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
|
+
var use_clear_selected_block_exports = {};
|
|
19
|
+
__export(use_clear_selected_block_exports, {
|
|
20
|
+
default: () => useClearSelectedBlock
|
|
5
21
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
/**
|
|
11
|
-
* WordPress dependencies
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* We can't just use <BlockSelectionClearer> because the customizer has
|
|
16
|
-
* many root nodes rather than just one in the post editor.
|
|
17
|
-
* We need to listen to the focus events in all those roots, and also in
|
|
18
|
-
* the preview iframe.
|
|
19
|
-
* This hook will clear the selected block when focusing outside the editor,
|
|
20
|
-
* with a few exceptions:
|
|
21
|
-
* 1. Focusing on popovers.
|
|
22
|
-
* 2. Focusing on the inspector.
|
|
23
|
-
* 3. Focusing on any modals/dialogs.
|
|
24
|
-
* These cases are normally triggered by user interactions from the editor,
|
|
25
|
-
* not by explicitly focusing outside the editor, hence no need for clearing.
|
|
26
|
-
*
|
|
27
|
-
* @param {Object} sidebarControl The sidebar control instance.
|
|
28
|
-
* @param {Object} popoverRef The ref object of the popover node container.
|
|
29
|
-
*/
|
|
22
|
+
module.exports = __toCommonJS(use_clear_selected_block_exports);
|
|
23
|
+
var import_element = require("@wordpress/element");
|
|
24
|
+
var import_data = require("@wordpress/data");
|
|
25
|
+
var import_block_editor = require("@wordpress/block-editor");
|
|
30
26
|
function useClearSelectedBlock(sidebarControl, popoverRef) {
|
|
31
|
-
const {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} = (0, _data.useSelect)(_blockEditor.store);
|
|
35
|
-
const {
|
|
36
|
-
clearSelectedBlock
|
|
37
|
-
} = (0, _data.useDispatch)(_blockEditor.store);
|
|
38
|
-
(0, _element.useEffect)(() => {
|
|
27
|
+
const { hasSelectedBlock, hasMultiSelection } = (0, import_data.useSelect)(import_block_editor.store);
|
|
28
|
+
const { clearSelectedBlock } = (0, import_data.useDispatch)(import_block_editor.store);
|
|
29
|
+
(0, import_element.useEffect)(() => {
|
|
39
30
|
if (popoverRef.current && sidebarControl) {
|
|
40
|
-
|
|
41
|
-
const container = sidebarControl.container[0];
|
|
42
|
-
const ownerDocument = container.ownerDocument;
|
|
43
|
-
const ownerWindow = ownerDocument.defaultView;
|
|
44
|
-
function handleClearSelectedBlock(element) {
|
|
31
|
+
let handleClearSelectedBlock = function(element) {
|
|
45
32
|
if (
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
// 4. The inspector should not be opened.
|
|
53
|
-
!inspector.expanded()) {
|
|
33
|
+
// 1. Make sure there are blocks being selected.
|
|
34
|
+
(hasSelectedBlock() || hasMultiSelection()) && // 2. The element should exist in the DOM (not deleted).
|
|
35
|
+
element && ownerDocument.contains(element) && // 3. It should also not exist in the container, the popover, nor the dialog.
|
|
36
|
+
!container.contains(element) && !popoverRef.current.contains(element) && !element.closest('[role="dialog"]') && // 4. The inspector should not be opened.
|
|
37
|
+
!inspector.expanded()
|
|
38
|
+
) {
|
|
54
39
|
clearSelectedBlock();
|
|
55
40
|
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// Handle mouse down in the same document.
|
|
59
|
-
function handleMouseDown(event) {
|
|
41
|
+
}, handleMouseDown = function(event) {
|
|
60
42
|
handleClearSelectedBlock(event.target);
|
|
61
|
-
}
|
|
62
|
-
// Handle focusing outside the current document, like to iframes.
|
|
63
|
-
function handleBlur() {
|
|
43
|
+
}, handleBlur = function() {
|
|
64
44
|
handleClearSelectedBlock(ownerDocument.activeElement);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
45
|
+
};
|
|
46
|
+
const inspector = sidebarControl.inspector;
|
|
47
|
+
const container = sidebarControl.container[0];
|
|
48
|
+
const ownerDocument = container.ownerDocument;
|
|
49
|
+
const ownerWindow = ownerDocument.defaultView;
|
|
50
|
+
ownerDocument.addEventListener("mousedown", handleMouseDown);
|
|
51
|
+
ownerWindow.addEventListener("blur", handleBlur);
|
|
68
52
|
return () => {
|
|
69
|
-
ownerDocument.removeEventListener(
|
|
70
|
-
|
|
53
|
+
ownerDocument.removeEventListener(
|
|
54
|
+
"mousedown",
|
|
55
|
+
handleMouseDown
|
|
56
|
+
);
|
|
57
|
+
ownerWindow.removeEventListener("blur", handleBlur);
|
|
71
58
|
};
|
|
72
59
|
}
|
|
73
|
-
}, [
|
|
60
|
+
}, [
|
|
61
|
+
popoverRef,
|
|
62
|
+
sidebarControl,
|
|
63
|
+
hasSelectedBlock,
|
|
64
|
+
hasMultiSelection,
|
|
65
|
+
clearSelectedBlock
|
|
66
|
+
]);
|
|
74
67
|
}
|
|
75
|
-
//# sourceMappingURL=use-clear-selected-block.js.map
|
|
68
|
+
//# sourceMappingURL=use-clear-selected-block.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/customize-widgets/use-clear-selected-block.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * We can't just use <BlockSelectionClearer> because the customizer has\n * many root nodes rather than just one in the post editor.\n * We need to listen to the focus events in all those roots, and also in\n * the preview iframe.\n * This hook will clear the selected block when focusing outside the editor,\n * with a few exceptions:\n * 1. Focusing on popovers.\n * 2. Focusing on the inspector.\n * 3. Focusing on any modals/dialogs.\n * These cases are normally triggered by user interactions from the editor,\n * not by explicitly focusing outside the editor, hence no need for clearing.\n *\n * @param {Object} sidebarControl The sidebar control instance.\n * @param {Object} popoverRef The ref object of the popover node container.\n */\nexport default function useClearSelectedBlock( sidebarControl, popoverRef ) {\n\tconst { hasSelectedBlock, hasMultiSelection } =\n\t\tuseSelect( blockEditorStore );\n\tconst { clearSelectedBlock } = useDispatch( blockEditorStore );\n\n\tuseEffect( () => {\n\t\tif ( popoverRef.current && sidebarControl ) {\n\t\t\tconst inspector = sidebarControl.inspector;\n\t\t\tconst container = sidebarControl.container[ 0 ];\n\t\t\tconst ownerDocument = container.ownerDocument;\n\t\t\tconst ownerWindow = ownerDocument.defaultView;\n\n\t\t\tfunction handleClearSelectedBlock( element ) {\n\t\t\t\tif (\n\t\t\t\t\t// 1. Make sure there are blocks being selected.\n\t\t\t\t\t( hasSelectedBlock() || hasMultiSelection() ) &&\n\t\t\t\t\t// 2. The element should exist in the DOM (not deleted).\n\t\t\t\t\telement &&\n\t\t\t\t\townerDocument.contains( element ) &&\n\t\t\t\t\t// 3. It should also not exist in the container, the popover, nor the dialog.\n\t\t\t\t\t! container.contains( element ) &&\n\t\t\t\t\t! popoverRef.current.contains( element ) &&\n\t\t\t\t\t! element.closest( '[role=\"dialog\"]' ) &&\n\t\t\t\t\t// 4. The inspector should not be opened.\n\t\t\t\t\t! inspector.expanded()\n\t\t\t\t) {\n\t\t\t\t\tclearSelectedBlock();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle mouse down in the same document.\n\t\t\tfunction handleMouseDown( event ) {\n\t\t\t\thandleClearSelectedBlock( event.target );\n\t\t\t}\n\t\t\t// Handle focusing outside the current document, like to iframes.\n\t\t\tfunction handleBlur() {\n\t\t\t\thandleClearSelectedBlock( ownerDocument.activeElement );\n\t\t\t}\n\n\t\t\townerDocument.addEventListener( 'mousedown', handleMouseDown );\n\t\t\townerWindow.addEventListener( 'blur', handleBlur );\n\n\t\t\treturn () => {\n\t\t\t\townerDocument.removeEventListener(\n\t\t\t\t\t'mousedown',\n\t\t\t\t\thandleMouseDown\n\t\t\t\t);\n\t\t\t\townerWindow.removeEventListener( 'blur', handleBlur );\n\t\t\t};\n\t\t}\n\t}, [\n\t\tpopoverRef,\n\t\tsidebarControl,\n\t\thasSelectedBlock,\n\t\thasMultiSelection,\n\t\tclearSelectedBlock,\n\t] );\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA0B;AAC1B,kBAAuC;AACvC,0BAA0C;AAkB3B,SAAR,sBAAwC,gBAAgB,YAAa;AAC3E,QAAM,EAAE,kBAAkB,kBAAkB,QAC3C,uBAAW,oBAAAA,KAAiB;AAC7B,QAAM,EAAE,mBAAmB,QAAI,yBAAa,oBAAAA,KAAiB;AAE7D,gCAAW,MAAM;AAChB,QAAK,WAAW,WAAW,gBAAiB;AAM3C,UAAS,2BAAT,SAAmC,SAAU;AAC5C;AAAA;AAAA,WAEG,iBAAiB,KAAK,kBAAkB;AAAA,UAE1C,WACA,cAAc,SAAU,OAAQ;AAAA,UAEhC,CAAE,UAAU,SAAU,OAAQ,KAC9B,CAAE,WAAW,QAAQ,SAAU,OAAQ,KACvC,CAAE,QAAQ,QAAS,iBAAkB;AAAA,UAErC,CAAE,UAAU,SAAS;AAAA,UACpB;AACD,6BAAmB;AAAA,QACpB;AAAA,MACD,GAGS,kBAAT,SAA0B,OAAQ;AACjC,iCAA0B,MAAM,MAAO;AAAA,MACxC,GAES,aAAT,WAAsB;AACrB,iCAA0B,cAAc,aAAc;AAAA,MACvD;AA9BA,YAAM,YAAY,eAAe;AACjC,YAAM,YAAY,eAAe,UAAW,CAAE;AAC9C,YAAM,gBAAgB,UAAU;AAChC,YAAM,cAAc,cAAc;AA6BlC,oBAAc,iBAAkB,aAAa,eAAgB;AAC7D,kBAAY,iBAAkB,QAAQ,UAAW;AAEjD,aAAO,MAAM;AACZ,sBAAc;AAAA,UACb;AAAA,UACA;AAAA,QACD;AACA,oBAAY,oBAAqB,QAAQ,UAAW;AAAA,MACrD;AAAA,IACD;AAAA,EACD,GAAG;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,CAAE;AACH;",
|
|
6
|
+
"names": ["blockEditorStore"]
|
|
7
|
+
}
|