@wordpress/customize-widgets 5.57.0 → 6.0.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/customize-widgets/index.cjs +2 -0
- package/build/components/customize-widgets/index.cjs.map +2 -2
- package/build/components/customize-widgets/use-clear-selected-block.cjs +1 -1
- package/build/components/customize-widgets/use-clear-selected-block.cjs.map +2 -2
- package/build-module/components/customize-widgets/index.mjs +2 -0
- package/build-module/components/customize-widgets/index.mjs.map +2 -2
- package/build-module/components/customize-widgets/use-clear-selected-block.mjs +1 -1
- package/build-module/components/customize-widgets/use-clear-selected-block.mjs.map +2 -2
- package/package.json +29 -30
- package/src/components/customize-widgets/index.jsx +3 -0
- package/src/components/customize-widgets/use-clear-selected-block.js +2 -1
- package/CHANGELOG.md +0 -289
|
@@ -36,6 +36,7 @@ var import_admin_ui = require("@wordpress/admin-ui");
|
|
|
36
36
|
var import_element = require("@wordpress/element");
|
|
37
37
|
var import_components = require("@wordpress/components");
|
|
38
38
|
var import_theme = require("@wordpress/theme");
|
|
39
|
+
var import_ui = require("@wordpress/ui");
|
|
39
40
|
var import_error_boundary = __toESM(require("../error-boundary/index.cjs"));
|
|
40
41
|
var import_sidebar_block_editor = __toESM(require("../sidebar-block-editor/index.cjs"));
|
|
41
42
|
var import_focus_control = __toESM(require("../focus-control/index.cjs"));
|
|
@@ -53,6 +54,7 @@ function CustomizeWidgets({
|
|
|
53
54
|
);
|
|
54
55
|
const popoverRef = (0, import_element.useRef)();
|
|
55
56
|
const adminPrimary = (0, import_element.useMemo)(() => (0, import_admin_ui.getAdminThemeColors)().primary, []);
|
|
57
|
+
(0, import_ui.useEnableWpCompatOverlaySlot)();
|
|
56
58
|
(0, import_use_clear_selected_block.default)(activeSidebarControl, popoverRef);
|
|
57
59
|
(0, import_element.useEffect)(() => {
|
|
58
60
|
const unsubscribers = sidebarControls.map(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/customize-widgets/index.jsx"],
|
|
4
|
-
"sourcesContent": ["import { getAdminThemeColors } from '@wordpress/admin-ui';\nimport {\n\tuseState,\n\tuseEffect,\n\tuseRef,\n\tcreatePortal,\n\tuseMemo,\n} from '@wordpress/element';\nimport { SlotFillProvider, Popover } from '@wordpress/components';\nimport { ThemeProvider } from '@wordpress/theme';\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\tconst adminPrimary = useMemo( () => getAdminThemeColors().primary, [] );\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<ThemeProvider isRoot color={ { primary: adminPrimary } }>\n\t\t\t\t<SidebarControls\n\t\t\t\t\tsidebarControls={ sidebarControls }\n\t\t\t\t\tactiveSidebarControl={ activeSidebarControl }\n\t\t\t\t>\n\t\t\t\t\t<FocusControl\n\t\t\t\t\t\tapi={ api }\n\t\t\t\t\t\tsidebarControls={ sidebarControls }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ activeSidebar }\n\t\t\t\t\t\t{ popover }\n\t\t\t\t\t</FocusControl>\n\t\t\t\t</SidebarControls>\n\t\t\t</ThemeProvider>\n\t\t</SlotFillProvider>\n\t);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAoC;AACpC,qBAMO;AACP,wBAA0C;AAC1C,mBAA8B;AAC9B,4BAA0B;AAC1B,kCAA+B;AAC/B,2BAAyB;AACzB,8BAA4B;AAC5B,sCAAkC;
|
|
4
|
+
"sourcesContent": ["import { getAdminThemeColors } from '@wordpress/admin-ui';\nimport {\n\tuseState,\n\tuseEffect,\n\tuseRef,\n\tcreatePortal,\n\tuseMemo,\n} from '@wordpress/element';\nimport { SlotFillProvider, Popover } from '@wordpress/components';\nimport { ThemeProvider } from '@wordpress/theme';\nimport { useEnableWpCompatOverlaySlot } from '@wordpress/ui';\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\tconst adminPrimary = useMemo( () => getAdminThemeColors().primary, [] );\n\n\t// `useClearSelectedBlock` relies on the slot marker to spot overlays.\n\tuseEnableWpCompatOverlaySlot();\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<ThemeProvider isRoot color={ { primary: adminPrimary } }>\n\t\t\t\t<SidebarControls\n\t\t\t\t\tsidebarControls={ sidebarControls }\n\t\t\t\t\tactiveSidebarControl={ activeSidebarControl }\n\t\t\t\t>\n\t\t\t\t\t<FocusControl\n\t\t\t\t\t\tapi={ api }\n\t\t\t\t\t\tsidebarControls={ sidebarControls }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ activeSidebar }\n\t\t\t\t\t\t{ popover }\n\t\t\t\t\t</FocusControl>\n\t\t\t\t</SidebarControls>\n\t\t\t</ThemeProvider>\n\t\t</SlotFillProvider>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAoC;AACpC,qBAMO;AACP,wBAA0C;AAC1C,mBAA8B;AAC9B,gBAA6C;AAC7C,4BAA0B;AAC1B,kCAA+B;AAC/B,2BAAyB;AACzB,8BAA4B;AAC5B,sCAAkC;AAoC9B;AAlCW,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;AAC1B,QAAM,mBAAe,wBAAS,UAAM,qCAAoB,EAAE,SAAS,CAAC,CAAE;AAGtE,8CAA6B;AAC7B,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,sDAAC,8BAAc,QAAM,MAAC,OAAQ,EAAE,SAAS,aAAa,GACrD;AAAA,IAAC,wBAAAC;AAAA,IAAA;AAAA,MACA;AAAA,MACA;AAAA,MAEA;AAAA,QAAC,qBAAAC;AAAA,QAAA;AAAA,UACA;AAAA,UACA;AAAA,UAEE;AAAA;AAAA,YACA;AAAA;AAAA;AAAA,MACH;AAAA;AAAA,EACD,GACD,GACD;AAEF;",
|
|
6
6
|
"names": ["useClearSelectedBlock", "ErrorBoundary", "SidebarBlockEditor", "SidebarControls", "FocusControl"]
|
|
7
7
|
}
|
|
@@ -35,7 +35,7 @@ function useClearSelectedBlock(sidebarControl, popoverRef) {
|
|
|
35
35
|
// 1. Make sure there are blocks being selected.
|
|
36
36
|
(hasSelectedBlock() || hasMultiSelection()) && // 2. The element should exist in the DOM (not deleted).
|
|
37
37
|
element && ownerDocument.contains(element) && // 3. It should also not exist in the container, the popover, nor the dialog.
|
|
38
|
-
!container.contains(element) && !popoverRef.current.contains(element) && !element.closest('[role="dialog"]') && // 4. The inspector should not be opened.
|
|
38
|
+
!container.contains(element) && !popoverRef.current.contains(element) && !element.closest("[data-wp-compat-overlay-slot]") && !element.closest('[role="dialog"]') && // 4. The inspector should not be opened.
|
|
39
39
|
!inspector.expanded()
|
|
40
40
|
) {
|
|
41
41
|
clearSelectedBlock();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/customize-widgets/use-clear-selected-block.js"],
|
|
4
|
-
"sourcesContent": ["import { 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;AAAA,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;
|
|
4
|
+
"sourcesContent": ["import { 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, including `@wordpress/ui` overlays.\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( '[data-wp-compat-overlay-slot]' ) &&\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;AAAA,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,+BAAgC,KACnD,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;AA/BA,YAAM,YAAY,eAAe;AACjC,YAAM,YAAY,eAAe,UAAW,CAAE;AAC9C,YAAM,gBAAgB,UAAU;AAChC,YAAM,cAAc,cAAc;AA8BlC,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
6
|
"names": ["blockEditorStore"]
|
|
7
7
|
}
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
} from "@wordpress/element";
|
|
10
10
|
import { SlotFillProvider, Popover } from "@wordpress/components";
|
|
11
11
|
import { ThemeProvider } from "@wordpress/theme";
|
|
12
|
+
import { useEnableWpCompatOverlaySlot } from "@wordpress/ui";
|
|
12
13
|
import ErrorBoundary from "../error-boundary/index.mjs";
|
|
13
14
|
import SidebarBlockEditor from "../sidebar-block-editor/index.mjs";
|
|
14
15
|
import FocusControl from "../focus-control/index.mjs";
|
|
@@ -26,6 +27,7 @@ function CustomizeWidgets({
|
|
|
26
27
|
);
|
|
27
28
|
const popoverRef = useRef();
|
|
28
29
|
const adminPrimary = useMemo(() => getAdminThemeColors().primary, []);
|
|
30
|
+
useEnableWpCompatOverlaySlot();
|
|
29
31
|
useClearSelectedBlock(activeSidebarControl, popoverRef);
|
|
30
32
|
useEffect(() => {
|
|
31
33
|
const unsubscribers = sidebarControls.map(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/customize-widgets/index.jsx"],
|
|
4
|
-
"sourcesContent": ["import { getAdminThemeColors } from '@wordpress/admin-ui';\nimport {\n\tuseState,\n\tuseEffect,\n\tuseRef,\n\tcreatePortal,\n\tuseMemo,\n} from '@wordpress/element';\nimport { SlotFillProvider, Popover } from '@wordpress/components';\nimport { ThemeProvider } from '@wordpress/theme';\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\tconst adminPrimary = useMemo( () => getAdminThemeColors().primary, [] );\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<ThemeProvider isRoot color={ { primary: adminPrimary } }>\n\t\t\t\t<SidebarControls\n\t\t\t\t\tsidebarControls={ sidebarControls }\n\t\t\t\t\tactiveSidebarControl={ activeSidebarControl }\n\t\t\t\t>\n\t\t\t\t\t<FocusControl\n\t\t\t\t\t\tapi={ api }\n\t\t\t\t\t\tsidebarControls={ sidebarControls }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ activeSidebar }\n\t\t\t\t\t\t{ popover }\n\t\t\t\t\t</FocusControl>\n\t\t\t\t</SidebarControls>\n\t\t\t</ThemeProvider>\n\t\t</SlotFillProvider>\n\t);\n}\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,2BAA2B;AACpC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,kBAAkB,eAAe;AAC1C,SAAS,qBAAqB;AAC9B,OAAO,mBAAmB;AAC1B,OAAO,wBAAwB;AAC/B,OAAO,kBAAkB;AACzB,OAAO,qBAAqB;AAC5B,OAAO,2BAA2B;
|
|
4
|
+
"sourcesContent": ["import { getAdminThemeColors } from '@wordpress/admin-ui';\nimport {\n\tuseState,\n\tuseEffect,\n\tuseRef,\n\tcreatePortal,\n\tuseMemo,\n} from '@wordpress/element';\nimport { SlotFillProvider, Popover } from '@wordpress/components';\nimport { ThemeProvider } from '@wordpress/theme';\nimport { useEnableWpCompatOverlaySlot } from '@wordpress/ui';\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\tconst adminPrimary = useMemo( () => getAdminThemeColors().primary, [] );\n\n\t// `useClearSelectedBlock` relies on the slot marker to spot overlays.\n\tuseEnableWpCompatOverlaySlot();\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<ThemeProvider isRoot color={ { primary: adminPrimary } }>\n\t\t\t\t<SidebarControls\n\t\t\t\t\tsidebarControls={ sidebarControls }\n\t\t\t\t\tactiveSidebarControl={ activeSidebarControl }\n\t\t\t\t>\n\t\t\t\t\t<FocusControl\n\t\t\t\t\t\tapi={ api }\n\t\t\t\t\t\tsidebarControls={ sidebarControls }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ activeSidebar }\n\t\t\t\t\t\t{ popover }\n\t\t\t\t\t</FocusControl>\n\t\t\t\t</SidebarControls>\n\t\t\t</ThemeProvider>\n\t\t</SlotFillProvider>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,2BAA2B;AACpC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,kBAAkB,eAAe;AAC1C,SAAS,qBAAqB;AAC9B,SAAS,oCAAoC;AAC7C,OAAO,mBAAmB;AAC1B,OAAO,wBAAwB;AAC/B,OAAO,kBAAkB;AACzB,OAAO,qBAAqB;AAC5B,OAAO,2BAA2B;AAoC9B,cA6BC,YA7BD;AAlCW,SAAR,iBAAmC;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,QAAM,CAAE,sBAAsB,uBAAwB,IAAI,SAAU,IAAK;AACzE,QAAM,kBAAkB,SAAS;AAAA,IAChC;AAAA,EACD;AACA,QAAM,aAAa,OAAO;AAC1B,QAAM,eAAe,QAAS,MAAM,oBAAoB,EAAE,SAAS,CAAC,CAAE;AAGtE,+BAA6B;AAC7B,wBAAuB,sBAAsB,UAAW;AAExD,YAAW,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,wBACA;AAAA,IACC,oBAAC,iBACA;AAAA,MAAC;AAAA;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,mBACA;AAAA,IACC,oBAAC,SAAI,WAAU,6BAA4B,KAAM,YAChD,8BAAC,QAAQ,MAAR,EAAa,GACf;AAAA,IACA;AAAA,EACD;AAED,SACC,oBAAC,oBACA,8BAAC,iBAAc,QAAM,MAAC,OAAQ,EAAE,SAAS,aAAa,GACrD;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACA;AAAA,UACA;AAAA,UAEE;AAAA;AAAA,YACA;AAAA;AAAA;AAAA,MACH;AAAA;AAAA,EACD,GACD,GACD;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -12,7 +12,7 @@ function useClearSelectedBlock(sidebarControl, popoverRef) {
|
|
|
12
12
|
// 1. Make sure there are blocks being selected.
|
|
13
13
|
(hasSelectedBlock() || hasMultiSelection()) && // 2. The element should exist in the DOM (not deleted).
|
|
14
14
|
element && ownerDocument.contains(element) && // 3. It should also not exist in the container, the popover, nor the dialog.
|
|
15
|
-
!container.contains(element) && !popoverRef.current.contains(element) && !element.closest('[role="dialog"]') && // 4. The inspector should not be opened.
|
|
15
|
+
!container.contains(element) && !popoverRef.current.contains(element) && !element.closest("[data-wp-compat-overlay-slot]") && !element.closest('[role="dialog"]') && // 4. The inspector should not be opened.
|
|
16
16
|
!inspector.expanded()
|
|
17
17
|
) {
|
|
18
18
|
clearSelectedBlock();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/customize-widgets/use-clear-selected-block.js"],
|
|
4
|
-
"sourcesContent": ["import { 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,SAAS,iBAAiB;AAC1B,SAAS,aAAa,iBAAiB;AACvC,SAAS,SAAS,wBAAwB;AAkB3B,SAAR,sBAAwC,gBAAgB,YAAa;AAC3E,QAAM,EAAE,kBAAkB,kBAAkB,IAC3C,UAAW,gBAAiB;AAC7B,QAAM,EAAE,mBAAmB,IAAI,YAAa,gBAAiB;AAE7D,YAAW,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;
|
|
4
|
+
"sourcesContent": ["import { 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, including `@wordpress/ui` overlays.\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( '[data-wp-compat-overlay-slot]' ) &&\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,SAAS,iBAAiB;AAC1B,SAAS,aAAa,iBAAiB;AACvC,SAAS,SAAS,wBAAwB;AAkB3B,SAAR,sBAAwC,gBAAgB,YAAa;AAC3E,QAAM,EAAE,kBAAkB,kBAAkB,IAC3C,UAAW,gBAAiB;AAC7B,QAAM,EAAE,mBAAmB,IAAI,YAAa,gBAAiB;AAE7D,YAAW,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,+BAAgC,KACnD,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;AA/BA,YAAM,YAAY,eAAe;AACjC,YAAM,YAAY,eAAe,UAAW,CAAE;AAC9C,YAAM,gBAAgB,UAAU;AAChC,YAAM,cAAc,cAAc;AA8BlC,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
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/customize-widgets",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Widgets blocks in Customizer Module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -17,15 +17,14 @@
|
|
|
17
17
|
"url": "https://github.com/WordPress/gutenberg/issues"
|
|
18
18
|
},
|
|
19
19
|
"engines": {
|
|
20
|
-
"node": ">=
|
|
20
|
+
"node": ">=22.13.0"
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"src",
|
|
24
24
|
"build",
|
|
25
25
|
"build-module",
|
|
26
26
|
"build-style",
|
|
27
|
-
"build-types"
|
|
28
|
-
"*.md"
|
|
27
|
+
"build-types"
|
|
29
28
|
],
|
|
30
29
|
"main": "build/index.cjs",
|
|
31
30
|
"module": "build-module/index.mjs",
|
|
@@ -38,37 +37,37 @@
|
|
|
38
37
|
},
|
|
39
38
|
"wpScript": true,
|
|
40
39
|
"dependencies": {
|
|
41
|
-
"@wordpress/a11y": "^
|
|
42
|
-
"@wordpress/admin-ui": "^
|
|
43
|
-
"@wordpress/base-styles": "^
|
|
44
|
-
"@wordpress/block-editor": "^
|
|
45
|
-
"@wordpress/block-library": "^
|
|
46
|
-
"@wordpress/blocks": "^
|
|
47
|
-
"@wordpress/components": "^
|
|
48
|
-
"@wordpress/compose": "^
|
|
49
|
-
"@wordpress/core-data": "^
|
|
50
|
-
"@wordpress/data": "^
|
|
51
|
-
"@wordpress/dom": "^
|
|
52
|
-
"@wordpress/element": "^
|
|
53
|
-
"@wordpress/hooks": "^
|
|
54
|
-
"@wordpress/i18n": "^
|
|
55
|
-
"@wordpress/icons": "^
|
|
56
|
-
"@wordpress/is-shallow-equal": "^
|
|
57
|
-
"@wordpress/keyboard-shortcuts": "^
|
|
58
|
-
"@wordpress/keycodes": "^
|
|
59
|
-
"@wordpress/media-utils": "^
|
|
60
|
-
"@wordpress/preferences": "^
|
|
61
|
-
"@wordpress/private-apis": "^
|
|
62
|
-
"@wordpress/theme": "^
|
|
63
|
-
"@wordpress/ui": "^0.
|
|
64
|
-
"@wordpress/widgets": "^
|
|
40
|
+
"@wordpress/a11y": "^5.0.0",
|
|
41
|
+
"@wordpress/admin-ui": "^3.0.0",
|
|
42
|
+
"@wordpress/base-styles": "^14.0.0",
|
|
43
|
+
"@wordpress/block-editor": "^19.0.0",
|
|
44
|
+
"@wordpress/block-library": "^12.0.0",
|
|
45
|
+
"@wordpress/blocks": "^17.0.0",
|
|
46
|
+
"@wordpress/components": "^43.0.0",
|
|
47
|
+
"@wordpress/compose": "^9.0.0",
|
|
48
|
+
"@wordpress/core-data": "^9.0.0",
|
|
49
|
+
"@wordpress/data": "^11.0.0",
|
|
50
|
+
"@wordpress/dom": "^5.0.0",
|
|
51
|
+
"@wordpress/element": "^10.0.0",
|
|
52
|
+
"@wordpress/hooks": "^5.0.0",
|
|
53
|
+
"@wordpress/i18n": "^7.0.0",
|
|
54
|
+
"@wordpress/icons": "^19.0.0",
|
|
55
|
+
"@wordpress/is-shallow-equal": "^6.0.0",
|
|
56
|
+
"@wordpress/keyboard-shortcuts": "^6.0.0",
|
|
57
|
+
"@wordpress/keycodes": "^5.0.0",
|
|
58
|
+
"@wordpress/media-utils": "^6.0.0",
|
|
59
|
+
"@wordpress/preferences": "^5.0.0",
|
|
60
|
+
"@wordpress/private-apis": "^3.0.0",
|
|
61
|
+
"@wordpress/theme": "^3.0.0",
|
|
62
|
+
"@wordpress/ui": "^0.25.0",
|
|
63
|
+
"@wordpress/widgets": "^5.0.0",
|
|
65
64
|
"clsx": "^2.1.1",
|
|
66
65
|
"fast-deep-equal": "^3.1.3"
|
|
67
66
|
},
|
|
68
67
|
"devDependencies": {
|
|
69
68
|
"@testing-library/dom": "^10.4.2",
|
|
70
69
|
"@testing-library/react": "^16.3.3",
|
|
71
|
-
"@testing-library/user-event": "^14.6.
|
|
70
|
+
"@testing-library/user-event": "^14.6.8",
|
|
72
71
|
"vitest": "^5.0.3"
|
|
73
72
|
},
|
|
74
73
|
"peerDependencies": {
|
|
@@ -78,5 +77,5 @@
|
|
|
78
77
|
"publishConfig": {
|
|
79
78
|
"access": "public"
|
|
80
79
|
},
|
|
81
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "8d30f92cbbde3ddf781c8799443c649befbbcb88"
|
|
82
81
|
}
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
} from '@wordpress/element';
|
|
9
9
|
import { SlotFillProvider, Popover } from '@wordpress/components';
|
|
10
10
|
import { ThemeProvider } from '@wordpress/theme';
|
|
11
|
+
import { useEnableWpCompatOverlaySlot } from '@wordpress/ui';
|
|
11
12
|
import ErrorBoundary from '../error-boundary';
|
|
12
13
|
import SidebarBlockEditor from '../sidebar-block-editor';
|
|
13
14
|
import FocusControl from '../focus-control';
|
|
@@ -26,6 +27,8 @@ export default function CustomizeWidgets( {
|
|
|
26
27
|
const popoverRef = useRef();
|
|
27
28
|
const adminPrimary = useMemo( () => getAdminThemeColors().primary, [] );
|
|
28
29
|
|
|
30
|
+
// `useClearSelectedBlock` relies on the slot marker to spot overlays.
|
|
31
|
+
useEnableWpCompatOverlaySlot();
|
|
29
32
|
useClearSelectedBlock( activeSidebarControl, popoverRef );
|
|
30
33
|
|
|
31
34
|
useEffect( () => {
|
|
@@ -9,7 +9,7 @@ import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
|
9
9
|
* the preview iframe.
|
|
10
10
|
* This hook will clear the selected block when focusing outside the editor,
|
|
11
11
|
* with a few exceptions:
|
|
12
|
-
* 1. Focusing on popovers.
|
|
12
|
+
* 1. Focusing on popovers, including `@wordpress/ui` overlays.
|
|
13
13
|
* 2. Focusing on the inspector.
|
|
14
14
|
* 3. Focusing on any modals/dialogs.
|
|
15
15
|
* These cases are normally triggered by user interactions from the editor,
|
|
@@ -40,6 +40,7 @@ export default function useClearSelectedBlock( sidebarControl, popoverRef ) {
|
|
|
40
40
|
// 3. It should also not exist in the container, the popover, nor the dialog.
|
|
41
41
|
! container.contains( element ) &&
|
|
42
42
|
! popoverRef.current.contains( element ) &&
|
|
43
|
+
! element.closest( '[data-wp-compat-overlay-slot]' ) &&
|
|
43
44
|
! element.closest( '[role="dialog"]' ) &&
|
|
44
45
|
// 4. The inspector should not be opened.
|
|
45
46
|
! inspector.expanded()
|
package/CHANGELOG.md
DELETED
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
<!-- Learn how to maintain this file at https://github.com/WordPress/gutenberg/tree/HEAD/packages#maintaining-changelogs. -->
|
|
2
|
-
|
|
3
|
-
## Unreleased
|
|
4
|
-
|
|
5
|
-
## 5.57.0 (2026-10-07)
|
|
6
|
-
|
|
7
|
-
### Bug Fixes
|
|
8
|
-
|
|
9
|
-
- Error boundary: Explicitly announce the error title and description, excluding action labels ([#82737](https://github.com/WordPress/gutenberg/pull/82737)).
|
|
10
|
-
|
|
11
|
-
## 5.56.0 (2026-09-23)
|
|
12
|
-
|
|
13
|
-
### Bug Fixes
|
|
14
|
-
|
|
15
|
-
- Open the Welcome Guide from a plain menu item instead of a preference toggle, so the Options menu no longer announces "Preference activated - Welcome Guide" ([#82395](https://github.com/WordPress/gutenberg/pull/82395)).
|
|
16
|
-
- Use `aria-disabled` for the Undo and Redo buttons of the document tools so they stay focusable when there is nothing to undo or redo, and make the focus style of all the document tools buttons visible ([#82412](https://github.com/WordPress/gutenberg/pull/82412)).
|
|
17
|
-
|
|
18
|
-
## 5.55.0 (2026-09-10)
|
|
19
|
-
|
|
20
|
-
### Enhancements
|
|
21
|
-
|
|
22
|
-
- Error boundary: Surface debugging details ([#82099](https://github.com/WordPress/gutenberg/pull/82099)).
|
|
23
|
-
|
|
24
|
-
### Internal
|
|
25
|
-
|
|
26
|
-
- Stop passing the unused `editorTool` block editor setting; the selector that read it was removed with the Write/Design tool in [#72193](https://github.com/WordPress/gutenberg/pull/72193) ([#82677](https://github.com/WordPress/gutenberg/pull/82677)).
|
|
27
|
-
- Remove unused dependency `@wordpress/interface` ([#82103](https://github.com/WordPress/gutenberg/pull/82103)).
|
|
28
|
-
- Use the `.jsx` extension for JavaScript source files that contain JSX ([#80990](https://github.com/WordPress/gutenberg/pull/80990)).
|
|
29
|
-
|
|
30
|
-
## 5.54.0 (2026-08-26)
|
|
31
|
-
|
|
32
|
-
## 5.53.0 (2026-08-12)
|
|
33
|
-
|
|
34
|
-
### Enhancements
|
|
35
|
-
|
|
36
|
-
- Wrap the Customizer widgets editor in `ThemeProvider`, seeded with the active admin color scheme primary color ([#81174](https://github.com/WordPress/gutenberg/pull/81174)).
|
|
37
|
-
|
|
38
|
-
## 5.52.0 (2026-07-29)
|
|
39
|
-
|
|
40
|
-
## 5.51.0 (2026-07-14)
|
|
41
|
-
|
|
42
|
-
### Enhancements
|
|
43
|
-
|
|
44
|
-
- Widen React peer dependency ranges to `^18 || ^19` to support both React 18 and React 19 environments ([#80024](https://github.com/WordPress/gutenberg/pull/80024)).
|
|
45
|
-
|
|
46
|
-
## 5.50.0 (2026-07-01)
|
|
47
|
-
|
|
48
|
-
## 5.49.0 (2026-06-24)
|
|
49
|
-
|
|
50
|
-
## 5.48.1 (2026-06-16)
|
|
51
|
-
|
|
52
|
-
## 5.48.0 (2026-06-10)
|
|
53
|
-
|
|
54
|
-
## 5.47.0 (2026-05-27)
|
|
55
|
-
|
|
56
|
-
## 5.46.0 (2026-05-14)
|
|
57
|
-
|
|
58
|
-
## 5.45.0 (2026-04-29)
|
|
59
|
-
|
|
60
|
-
## 5.44.0 (2026-04-15)
|
|
61
|
-
|
|
62
|
-
## 5.43.0 (2026-04-01)
|
|
63
|
-
|
|
64
|
-
## 5.42.0 (2026-03-18)
|
|
65
|
-
|
|
66
|
-
## 5.41.0 (2026-03-04)
|
|
67
|
-
|
|
68
|
-
## 5.40.0 (2026-02-18)
|
|
69
|
-
|
|
70
|
-
## 5.39.0 (2026-01-29)
|
|
71
|
-
|
|
72
|
-
## 5.38.0 (2026-01-16)
|
|
73
|
-
|
|
74
|
-
## 5.36.0 (2025-11-26)
|
|
75
|
-
|
|
76
|
-
## 5.35.0 (2025-11-12)
|
|
77
|
-
|
|
78
|
-
## 5.34.0 (2025-10-29)
|
|
79
|
-
|
|
80
|
-
## 5.33.0 (2025-10-17)
|
|
81
|
-
|
|
82
|
-
## 5.32.0 (2025-10-01)
|
|
83
|
-
|
|
84
|
-
## 5.31.0 (2025-09-17)
|
|
85
|
-
|
|
86
|
-
## 5.30.0 (2025-09-03)
|
|
87
|
-
|
|
88
|
-
## 5.29.0 (2025-08-20)
|
|
89
|
-
|
|
90
|
-
## 5.28.0 (2025-08-07)
|
|
91
|
-
|
|
92
|
-
## 5.27.0 (2025-07-23)
|
|
93
|
-
|
|
94
|
-
## 5.26.0 (2025-06-25)
|
|
95
|
-
|
|
96
|
-
## 5.25.0 (2025-06-04)
|
|
97
|
-
|
|
98
|
-
## 5.24.0 (2025-05-22)
|
|
99
|
-
|
|
100
|
-
## 5.23.0 (2025-05-07)
|
|
101
|
-
|
|
102
|
-
## 5.22.0 (2025-04-11)
|
|
103
|
-
|
|
104
|
-
## 5.21.0 (2025-03-27)
|
|
105
|
-
|
|
106
|
-
## 5.20.0 (2025-03-13)
|
|
107
|
-
|
|
108
|
-
## 5.19.0 (2025-02-28)
|
|
109
|
-
|
|
110
|
-
## 5.18.0 (2025-02-12)
|
|
111
|
-
|
|
112
|
-
## 5.17.0 (2025-01-29)
|
|
113
|
-
|
|
114
|
-
## 5.16.0 (2025-01-15)
|
|
115
|
-
|
|
116
|
-
## 5.15.0 (2025-01-02)
|
|
117
|
-
|
|
118
|
-
## 5.14.0 (2024-12-11)
|
|
119
|
-
|
|
120
|
-
## 5.13.0 (2024-11-27)
|
|
121
|
-
|
|
122
|
-
## 5.12.0 (2024-11-16)
|
|
123
|
-
|
|
124
|
-
## 5.11.0 (2024-10-30)
|
|
125
|
-
|
|
126
|
-
## 5.10.0 (2024-10-16)
|
|
127
|
-
|
|
128
|
-
## 5.9.0 (2024-10-03)
|
|
129
|
-
|
|
130
|
-
## 5.8.0 (2024-09-19)
|
|
131
|
-
|
|
132
|
-
## 5.7.0 (2024-09-05)
|
|
133
|
-
|
|
134
|
-
## 5.6.0 (2024-08-21)
|
|
135
|
-
|
|
136
|
-
## 5.5.0 (2024-08-07)
|
|
137
|
-
|
|
138
|
-
## 5.4.0 (2024-07-24)
|
|
139
|
-
|
|
140
|
-
## 5.3.0 (2024-07-10)
|
|
141
|
-
|
|
142
|
-
## 5.2.0 (2024-06-26)
|
|
143
|
-
|
|
144
|
-
## 5.1.0 (2024-06-15)
|
|
145
|
-
|
|
146
|
-
## 5.0.0 (2024-05-31)
|
|
147
|
-
|
|
148
|
-
### Breaking Changes
|
|
149
|
-
|
|
150
|
-
- Variables like `process.env.IS_GUTENBERG_PLUGIN` have been replaced by `globalThis.IS_GUTENBERG_PLUGIN`. Build systems using `process.env` should be updated ([#61486](https://github.com/WordPress/gutenberg/pull/61486)).
|
|
151
|
-
- Increase the minimum required Node.js version to v18.12.0 matching long-term support releases ([#31270](https://github.com/WordPress/gutenberg/pull/61930)). Learn more about [Node.js releases](https://nodejs.org/en/about/previous-releases).
|
|
152
|
-
|
|
153
|
-
## 4.35.0 (2024-05-16)
|
|
154
|
-
|
|
155
|
-
## 4.34.0 (2024-05-02)
|
|
156
|
-
|
|
157
|
-
## 4.33.0 (2024-04-19)
|
|
158
|
-
|
|
159
|
-
## 4.32.0 (2024-04-03)
|
|
160
|
-
|
|
161
|
-
## 4.31.0 (2024-03-21)
|
|
162
|
-
|
|
163
|
-
## 4.30.0 (2024-03-06)
|
|
164
|
-
|
|
165
|
-
## 4.29.0 (2024-02-21)
|
|
166
|
-
|
|
167
|
-
## 4.28.0 (2024-02-09)
|
|
168
|
-
|
|
169
|
-
## 4.27.0 (2024-01-24)
|
|
170
|
-
|
|
171
|
-
## 4.26.0 (2024-01-10)
|
|
172
|
-
|
|
173
|
-
## 4.25.0 (2023-12-13)
|
|
174
|
-
|
|
175
|
-
## 4.24.0 (2023-11-29)
|
|
176
|
-
|
|
177
|
-
## 4.23.0 (2023-11-16)
|
|
178
|
-
|
|
179
|
-
## 4.22.0 (2023-11-02)
|
|
180
|
-
|
|
181
|
-
## 4.21.0 (2023-10-18)
|
|
182
|
-
|
|
183
|
-
## 4.20.0 (2023-10-05)
|
|
184
|
-
|
|
185
|
-
## 4.19.0 (2023-09-20)
|
|
186
|
-
|
|
187
|
-
## 4.18.0 (2023-08-31)
|
|
188
|
-
|
|
189
|
-
## 4.17.0 (2023-08-16)
|
|
190
|
-
|
|
191
|
-
## 4.16.0 (2023-08-10)
|
|
192
|
-
|
|
193
|
-
## 4.15.0 (2023-07-20)
|
|
194
|
-
|
|
195
|
-
## 4.14.0 (2023-07-05)
|
|
196
|
-
|
|
197
|
-
## 4.13.0 (2023-06-23)
|
|
198
|
-
|
|
199
|
-
## 4.12.0 (2023-06-07)
|
|
200
|
-
|
|
201
|
-
## 4.11.0 (2023-05-24)
|
|
202
|
-
|
|
203
|
-
## 4.10.0 (2023-05-10)
|
|
204
|
-
|
|
205
|
-
## 4.9.0 (2023-04-26)
|
|
206
|
-
|
|
207
|
-
## 4.8.0 (2023-04-12)
|
|
208
|
-
|
|
209
|
-
## 4.7.0 (2023-03-29)
|
|
210
|
-
|
|
211
|
-
## 4.6.0 (2023-03-15)
|
|
212
|
-
|
|
213
|
-
## 4.5.0 (2023-03-01)
|
|
214
|
-
|
|
215
|
-
## 4.4.0 (2023-02-15)
|
|
216
|
-
|
|
217
|
-
## 4.3.0 (2023-02-01)
|
|
218
|
-
|
|
219
|
-
## 4.2.0 (2023-01-11)
|
|
220
|
-
|
|
221
|
-
## 4.1.0 (2023-01-02)
|
|
222
|
-
|
|
223
|
-
## 4.0.0 (2022-12-14)
|
|
224
|
-
|
|
225
|
-
### Breaking Changes
|
|
226
|
-
|
|
227
|
-
- Updated dependencies to require React 18 ([45235](https://github.com/WordPress/gutenberg/pull/45235))
|
|
228
|
-
|
|
229
|
-
## 3.19.0 (2022-11-16)
|
|
230
|
-
|
|
231
|
-
## 3.18.0 (2022-11-02)
|
|
232
|
-
|
|
233
|
-
## 3.17.0 (2022-10-19)
|
|
234
|
-
|
|
235
|
-
## 3.16.0 (2022-10-05)
|
|
236
|
-
|
|
237
|
-
## 3.15.0 (2022-09-21)
|
|
238
|
-
|
|
239
|
-
## 3.14.0 (2022-09-13)
|
|
240
|
-
|
|
241
|
-
## 3.13.0 (2022-08-24)
|
|
242
|
-
|
|
243
|
-
## 3.12.0 (2022-08-10)
|
|
244
|
-
|
|
245
|
-
## 3.11.0 (2022-07-27)
|
|
246
|
-
|
|
247
|
-
## 3.10.0 (2022-07-13)
|
|
248
|
-
|
|
249
|
-
## 3.9.0 (2022-06-29)
|
|
250
|
-
|
|
251
|
-
## 3.8.0 (2022-06-15)
|
|
252
|
-
|
|
253
|
-
## 3.7.0 (2022-06-01)
|
|
254
|
-
|
|
255
|
-
## 3.6.0 (2022-05-18)
|
|
256
|
-
|
|
257
|
-
## 3.5.0 (2022-05-04)
|
|
258
|
-
|
|
259
|
-
## 3.4.0 (2022-04-21)
|
|
260
|
-
|
|
261
|
-
## 3.3.0 (2022-04-08)
|
|
262
|
-
|
|
263
|
-
## 3.2.0 (2022-03-23)
|
|
264
|
-
|
|
265
|
-
## 3.1.0 (2022-03-11)
|
|
266
|
-
|
|
267
|
-
## 3.0.0 (2022-02-10)
|
|
268
|
-
|
|
269
|
-
### Breaking Changes
|
|
270
|
-
|
|
271
|
-
- The `GUTENBERG_PHASE` environment variable has been renamed to `IS_GUTENBERG_PLUGIN` and is now a boolean ([#38202](https://github.com/WordPress/gutenberg/pull/38202)).
|
|
272
|
-
|
|
273
|
-
### Bug Fixes
|
|
274
|
-
|
|
275
|
-
- Removed unused `@wordpress/a11y` dependency ([#38388](https://github.com/WordPress/gutenberg/pull/38388)).
|
|
276
|
-
|
|
277
|
-
## 2.1.0 (2022-01-27)
|
|
278
|
-
|
|
279
|
-
## 2.0.0 (2021-07-29)
|
|
280
|
-
|
|
281
|
-
### Breaking Changes
|
|
282
|
-
|
|
283
|
-
- Upgraded React components to work with v17.0 ([#29118](https://github.com/WordPress/gutenberg/pull/29118)). There are no new features in React v17.0 as explained in the [blog post](https://reactjs.org/blog/2020/10/20/react-v17.html).
|
|
284
|
-
|
|
285
|
-
## 1.1.0 (2021-07-21)
|
|
286
|
-
|
|
287
|
-
## 1.0.0 (2021-05-24)
|
|
288
|
-
|
|
289
|
-
- Initial release of the package.
|