@wordpress/edit-widgets 6.48.0 → 6.48.2-next.v.202606191442.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/CHANGELOG.md +3 -1
- package/build/components/save-button/index.cjs +1 -1
- package/build/components/save-button/index.cjs.map +2 -2
- package/build/components/sidebar/index.cjs +1 -4
- package/build/components/sidebar/index.cjs.map +2 -2
- package/build/components/sidebar/widget-areas.cjs +1 -1
- package/build/components/sidebar/widget-areas.cjs.map +1 -1
- package/build/components/welcome-guide/index.cjs +4 -4
- package/build/components/welcome-guide/index.cjs.map +1 -1
- package/build-module/components/save-button/index.mjs +1 -1
- package/build-module/components/save-button/index.mjs.map +2 -2
- package/build-module/components/sidebar/index.mjs +2 -10
- package/build-module/components/sidebar/index.mjs.map +2 -2
- package/build-module/components/sidebar/widget-areas.mjs +1 -1
- package/build-module/components/sidebar/widget-areas.mjs.map +1 -1
- package/build-module/components/welcome-guide/index.mjs +4 -4
- package/build-module/components/welcome-guide/index.mjs.map +1 -1
- package/build-style/style-rtl.css +2 -1
- package/build-style/style.css +2 -1
- package/package.json +33 -32
- package/src/components/sidebar/index.js +2 -10
package/CHANGELOG.md
CHANGED
|
@@ -53,7 +53,7 @@ function SaveButton() {
|
|
|
53
53
|
"aria-disabled": isDisabled,
|
|
54
54
|
onClick: isDisabled ? void 0 : saveEditedWidgetAreas,
|
|
55
55
|
size: "compact",
|
|
56
|
-
children: isSaving ? (0, import_i18n.__)("Saving
|
|
56
|
+
children: isSaving ? (0, import_i18n.__)("Saving…") : (0, import_i18n.__)("Update")
|
|
57
57
|
}
|
|
58
58
|
);
|
|
59
59
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/save-button/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nfunction SaveButton() {\n\tconst { hasEditedWidgetAreaIds, isSaving, isWidgetSaveLocked } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEditedWidgetAreas,\n\t\t\t\tisSavingWidgetAreas,\n\t\t\t\tisWidgetSavingLocked,\n\t\t\t} = select( editWidgetsStore );\n\n\t\t\treturn {\n\t\t\t\thasEditedWidgetAreaIds: getEditedWidgetAreas()?.length > 0,\n\t\t\t\tisSaving: isSavingWidgetAreas(),\n\t\t\t\tisWidgetSaveLocked: isWidgetSavingLocked(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );\n\n\tconst isDisabled =\n\t\tisWidgetSaveLocked || isSaving || ! hasEditedWidgetAreaIds;\n\n\treturn (\n\t\t<Button\n\t\t\tvariant=\"primary\"\n\t\t\tisBusy={ isSaving }\n\t\t\taria-disabled={ isDisabled }\n\t\t\tonClick={ isDisabled ? undefined : saveEditedWidgetAreas }\n\t\t\tsize=\"compact\"\n\t\t>\n\t\t\t{ isSaving ? __( 'Saving
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAuB;AACvB,kBAAmB;AACnB,kBAAuC;AAKvC,mBAA0C;AAyBxC;AAvBF,SAAS,aAAa;AACrB,QAAM,EAAE,wBAAwB,UAAU,mBAAmB,QAAI;AAAA,IAChE,CAAE,WAAY;AACb,YAAM;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,MACD,IAAI,OAAQ,aAAAA,KAAiB;AAE7B,aAAO;AAAA,QACN,wBAAwB,qBAAqB,GAAG,SAAS;AAAA,QACzD,UAAU,oBAAoB;AAAA,QAC9B,oBAAoB,qBAAqB;AAAA,MAC1C;AAAA,IACD;AAAA,IACA,CAAC;AAAA,EACF;AACA,QAAM,EAAE,sBAAsB,QAAI,yBAAa,aAAAA,KAAiB;AAEhE,QAAM,aACL,sBAAsB,YAAY,CAAE;AAErC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,SAAQ;AAAA,MACR,QAAS;AAAA,MACT,iBAAgB;AAAA,MAChB,SAAU,aAAa,SAAY;AAAA,MACnC,MAAK;AAAA,MAEH,yBAAW,gBAAI,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nfunction SaveButton() {\n\tconst { hasEditedWidgetAreaIds, isSaving, isWidgetSaveLocked } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEditedWidgetAreas,\n\t\t\t\tisSavingWidgetAreas,\n\t\t\t\tisWidgetSavingLocked,\n\t\t\t} = select( editWidgetsStore );\n\n\t\t\treturn {\n\t\t\t\thasEditedWidgetAreaIds: getEditedWidgetAreas()?.length > 0,\n\t\t\t\tisSaving: isSavingWidgetAreas(),\n\t\t\t\tisWidgetSaveLocked: isWidgetSavingLocked(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );\n\n\tconst isDisabled =\n\t\tisWidgetSaveLocked || isSaving || ! hasEditedWidgetAreaIds;\n\n\treturn (\n\t\t<Button\n\t\t\tvariant=\"primary\"\n\t\t\tisBusy={ isSaving }\n\t\t\taria-disabled={ isDisabled }\n\t\t\tonClick={ isDisabled ? undefined : saveEditedWidgetAreas }\n\t\t\tsize=\"compact\"\n\t\t>\n\t\t\t{ isSaving ? __( 'Saving…' ) : __( 'Update' ) }\n\t\t</Button>\n\t);\n}\n\nexport default SaveButton;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAuB;AACvB,kBAAmB;AACnB,kBAAuC;AAKvC,mBAA0C;AAyBxC;AAvBF,SAAS,aAAa;AACrB,QAAM,EAAE,wBAAwB,UAAU,mBAAmB,QAAI;AAAA,IAChE,CAAE,WAAY;AACb,YAAM;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,MACD,IAAI,OAAQ,aAAAA,KAAiB;AAE7B,aAAO;AAAA,QACN,wBAAwB,qBAAqB,GAAG,SAAS;AAAA,QACzD,UAAU,oBAAoB;AAAA,QAC9B,oBAAoB,qBAAqB;AAAA,MAC1C;AAAA,IACD;AAAA,IACA,CAAC;AAAA,EACF;AACA,QAAM,EAAE,sBAAsB,QAAI,yBAAa,aAAAA,KAAiB;AAEhE,QAAM,aACL,sBAAsB,YAAY,CAAE;AAErC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,SAAQ;AAAA,MACR,QAAS;AAAA,MACT,iBAAgB;AAAA,MAChB,SAAU,aAAa,SAAY;AAAA,MACnC,MAAK;AAAA,MAEH,yBAAW,gBAAI,SAAU,QAAI,gBAAI,QAAS;AAAA;AAAA,EAC7C;AAEF;AAEA,IAAO,sBAAQ;",
|
|
6
6
|
"names": ["editWidgetsStore"]
|
|
7
7
|
}
|
|
@@ -43,10 +43,7 @@ var import_widget_areas = __toESM(require("./widget-areas.cjs"));
|
|
|
43
43
|
var import_store = require("../../store/index.cjs");
|
|
44
44
|
var import_lock_unlock = require("../../lock-unlock.cjs");
|
|
45
45
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
46
|
-
var SIDEBAR_ACTIVE_BY_DEFAULT =
|
|
47
|
-
web: true,
|
|
48
|
-
native: false
|
|
49
|
-
});
|
|
46
|
+
var SIDEBAR_ACTIVE_BY_DEFAULT = true;
|
|
50
47
|
var BLOCK_INSPECTOR_IDENTIFIER = "edit-widgets/block-inspector";
|
|
51
48
|
var WIDGET_AREAS_IDENTIFIER = "edit-widgets/block-areas";
|
|
52
49
|
var { Tabs } = (0, import_lock_unlock.unlock)(import_components.privateApis);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/sidebar/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useEffect, useContext, useCallback } from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport {\n\tComplementaryArea,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport {\n\tBlockInspector,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\nimport { drawerLeft, drawerRight } from '@wordpress/icons';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\nconst SIDEBAR_ACTIVE_BY_DEFAULT = true;\n\nconst BLOCK_INSPECTOR_IDENTIFIER = 'edit-widgets/block-inspector';\n\n// Widget areas were once called block areas, so use 'edit-widgets/block-areas'\n// for backwards compatibility.\nconst WIDGET_AREAS_IDENTIFIER = 'edit-widgets/block-areas';\n\n/**\n * Internal dependencies\n */\nimport WidgetAreas from './widget-areas';\nimport { store as editWidgetsStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nfunction SidebarHeader( { selectedWidgetAreaBlock } ) {\n\treturn (\n\t\t<Tabs.TabList>\n\t\t\t<Tabs.Tab tabId={ WIDGET_AREAS_IDENTIFIER }>\n\t\t\t\t{ selectedWidgetAreaBlock\n\t\t\t\t\t? selectedWidgetAreaBlock.attributes.name\n\t\t\t\t\t: __( 'Widget Areas' ) }\n\t\t\t</Tabs.Tab>\n\t\t\t<Tabs.Tab tabId={ BLOCK_INSPECTOR_IDENTIFIER }>\n\t\t\t\t{ __( 'Block' ) }\n\t\t\t</Tabs.Tab>\n\t\t</Tabs.TabList>\n\t);\n}\n\nfunction SidebarContent( {\n\thasSelectedNonAreaBlock,\n\tcurrentArea,\n\tisGeneralSidebarOpen,\n\tselectedWidgetAreaBlock,\n} ) {\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\thasSelectedNonAreaBlock &&\n\t\t\tcurrentArea === WIDGET_AREAS_IDENTIFIER &&\n\t\t\tisGeneralSidebarOpen\n\t\t) {\n\t\t\tenableComplementaryArea(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\tBLOCK_INSPECTOR_IDENTIFIER\n\t\t\t);\n\t\t}\n\t\tif (\n\t\t\t! hasSelectedNonAreaBlock &&\n\t\t\tcurrentArea === BLOCK_INSPECTOR_IDENTIFIER &&\n\t\t\tisGeneralSidebarOpen\n\t\t) {\n\t\t\tenableComplementaryArea(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\tWIDGET_AREAS_IDENTIFIER\n\t\t\t);\n\t\t}\n\t\t// We're intentionally leaving `currentArea` and `isGeneralSidebarOpen`\n\t\t// out of the dep array because we want this effect to run based on\n\t\t// block selection changes, not sidebar state changes.\n\t}, [ hasSelectedNonAreaBlock, enableComplementaryArea ] );\n\n\tconst tabsContextValue = useContext( Tabs.Context );\n\n\treturn (\n\t\t<ComplementaryArea\n\t\t\tclassName=\"edit-widgets-sidebar\"\n\t\t\theader={\n\t\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t\t<SidebarHeader\n\t\t\t\t\t\tselectedWidgetAreaBlock={ selectedWidgetAreaBlock }\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Context.Provider>\n\t\t\t}\n\t\t\theaderClassName=\"edit-widgets-sidebar__panel-tabs\"\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\ttitle={ __( 'Settings' ) }\n\t\t\tcloseLabel={ __( 'Close Settings' ) }\n\t\t\tscope=\"core/edit-widgets\"\n\t\t\tidentifier={ currentArea }\n\t\t\ticon={ isRTL() ? drawerLeft : drawerRight }\n\t\t\tisActiveByDefault={ SIDEBAR_ACTIVE_BY_DEFAULT }\n\t\t>\n\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\ttabId={ WIDGET_AREAS_IDENTIFIER }\n\t\t\t\t\tfocusable={ false }\n\t\t\t\t>\n\t\t\t\t\t<WidgetAreas\n\t\t\t\t\t\tselectedWidgetAreaId={\n\t\t\t\t\t\t\tselectedWidgetAreaBlock?.attributes.id\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\ttabId={ BLOCK_INSPECTOR_IDENTIFIER }\n\t\t\t\t\tfocusable={ false }\n\t\t\t\t>\n\t\t\t\t\t{ hasSelectedNonAreaBlock ? (\n\t\t\t\t\t\t<BlockInspector />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t// Pretend that Widget Areas are part of the UI by not\n\t\t\t\t\t\t// showing the Block Inspector when one is selected.\n\t\t\t\t\t\t<span className=\"block-editor-block-inspector__no-blocks\">\n\t\t\t\t\t\t\t{ __( 'No block selected.' ) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs.Context.Provider>\n\t\t</ComplementaryArea>\n\t);\n}\n\nexport default function Sidebar() {\n\tconst {\n\t\tcurrentArea,\n\t\thasSelectedNonAreaBlock,\n\t\tisGeneralSidebarOpen,\n\t\tselectedWidgetAreaBlock,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSelectedBlock, getBlock, getBlockParentsByBlockName } =\n\t\t\tselect( blockEditorStore );\n\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\n\t\tconst selectedBlock = getSelectedBlock();\n\n\t\tconst activeArea = getActiveComplementaryArea( editWidgetsStore.name );\n\n\t\tlet currentSelection = activeArea;\n\t\tif ( ! currentSelection ) {\n\t\t\tif ( selectedBlock ) {\n\t\t\t\tcurrentSelection = BLOCK_INSPECTOR_IDENTIFIER;\n\t\t\t} else {\n\t\t\t\tcurrentSelection = WIDGET_AREAS_IDENTIFIER;\n\t\t\t}\n\t\t}\n\n\t\tlet widgetAreaBlock;\n\t\tif ( selectedBlock ) {\n\t\t\tif ( selectedBlock.name === 'core/widget-area' ) {\n\t\t\t\twidgetAreaBlock = selectedBlock;\n\t\t\t} else {\n\t\t\t\twidgetAreaBlock = getBlock(\n\t\t\t\t\tgetBlockParentsByBlockName(\n\t\t\t\t\t\tselectedBlock.clientId,\n\t\t\t\t\t\t'core/widget-area'\n\t\t\t\t\t)[ 0 ]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tcurrentArea: currentSelection,\n\t\t\thasSelectedNonAreaBlock: !! (\n\t\t\t\tselectedBlock && selectedBlock.name !== 'core/widget-area'\n\t\t\t),\n\t\t\tisGeneralSidebarOpen: !! activeArea,\n\t\t\tselectedWidgetAreaBlock: widgetAreaBlock,\n\t\t};\n\t}, [] );\n\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\t// `newSelectedTabId` could technically be falsy if no tab is selected (i.e.\n\t// the initial render) or when we don't want a tab displayed (i.e. the\n\t// sidebar is closed). These cases should both be covered by the `!!` check\n\t// below, so we shouldn't need any additional falsy handling.\n\tconst onTabSelect = useCallback(\n\t\t( newSelectedTabId ) => {\n\t\t\tif ( !! newSelectedTabId ) {\n\t\t\t\tenableComplementaryArea(\n\t\t\t\t\teditWidgetsStore.name,\n\t\t\t\t\tnewSelectedTabId\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ enableComplementaryArea ]\n\t);\n\n\treturn (\n\t\t<Tabs\n\t\t\t// Due to how this component is controlled (via a value from the\n\t\t\t// `interfaceStore`), when the sidebar closes the currently selected\n\t\t\t// tab can't be found. This causes the component to continuously reset\n\t\t\t// the selection to `null` in an infinite loop. Proactively setting\n\t\t\t// the selected tab to `null` avoids that.\n\t\t\tselectedTabId={ isGeneralSidebarOpen ? currentArea : null }\n\t\t\tonSelect={ onTabSelect }\n\t\t\tselectOnMove={ false }\n\t\t>\n\t\t\t<SidebarContent\n\t\t\t\thasSelectedNonAreaBlock={ hasSelectedNonAreaBlock }\n\t\t\t\tcurrentArea={ currentArea }\n\t\t\t\tisGeneralSidebarOpen={ isGeneralSidebarOpen }\n\t\t\t\tselectedWidgetAreaBlock={ selectedWidgetAreaBlock }\n\t\t\t/>\n\t\t</Tabs>\n\t);\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["componentsPrivateApis", "interfaceStore", "WidgetAreas", "blockEditorStore", "editWidgetsStore"]
|
|
7
7
|
}
|
|
@@ -47,7 +47,7 @@ function WidgetAreas({ selectedWidgetAreaId }) {
|
|
|
47
47
|
if (!selectedWidgetArea) {
|
|
48
48
|
description = (0, import_i18n.__)(
|
|
49
49
|
// eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts
|
|
50
|
-
"Widget Areas are global parts in your site
|
|
50
|
+
"Widget Areas are global parts in your site’s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer."
|
|
51
51
|
);
|
|
52
52
|
} else if (selectedWidgetAreaId === "wp_inactive_widgets") {
|
|
53
53
|
description = (0, import_i18n.__)(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/sidebar/widget-areas.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { blockDefault } from '@wordpress/icons';\nimport { BlockIcon } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { safeHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function WidgetAreas( { selectedWidgetAreaId } ) {\n\tconst widgetAreas = useSelect(\n\t\t( select ) => select( editWidgetsStore ).getWidgetAreas(),\n\t\t[]\n\t);\n\n\tconst selectedWidgetArea = useMemo(\n\t\t() =>\n\t\t\tselectedWidgetAreaId &&\n\t\t\twidgetAreas?.find(\n\t\t\t\t( widgetArea ) => widgetArea.id === selectedWidgetAreaId\n\t\t\t),\n\t\t[ selectedWidgetAreaId, widgetAreas ]\n\t);\n\n\tlet description;\n\tif ( ! selectedWidgetArea ) {\n\t\tdescription = __(\n\t\t\t// eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts\n\t\t\t'Widget Areas are global parts in your site
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { blockDefault } from '@wordpress/icons';\nimport { BlockIcon } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { safeHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function WidgetAreas( { selectedWidgetAreaId } ) {\n\tconst widgetAreas = useSelect(\n\t\t( select ) => select( editWidgetsStore ).getWidgetAreas(),\n\t\t[]\n\t);\n\n\tconst selectedWidgetArea = useMemo(\n\t\t() =>\n\t\t\tselectedWidgetAreaId &&\n\t\t\twidgetAreas?.find(\n\t\t\t\t( widgetArea ) => widgetArea.id === selectedWidgetAreaId\n\t\t\t),\n\t\t[ selectedWidgetAreaId, widgetAreas ]\n\t);\n\n\tlet description;\n\tif ( ! selectedWidgetArea ) {\n\t\tdescription = __(\n\t\t\t// eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts\n\t\t\t'Widget Areas are global parts in your site’s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer.'\n\t\t);\n\t} else if ( selectedWidgetAreaId === 'wp_inactive_widgets' ) {\n\t\tdescription = __(\n\t\t\t'Blocks in this Widget Area will not be displayed in your site.'\n\t\t);\n\t} else {\n\t\tdescription = selectedWidgetArea.description;\n\t}\n\n\treturn (\n\t\t<div className=\"edit-widgets-widget-areas\">\n\t\t\t<div className=\"edit-widgets-widget-areas__top-container\">\n\t\t\t\t<BlockIcon icon={ blockDefault } />\n\t\t\t\t<div>\n\t\t\t\t\t<p\n\t\t\t\t\t\t// Use `dangerouslySetInnerHTML` to keep backwards\n\t\t\t\t\t\t// compatibility. Basic markup in the description is an\n\t\t\t\t\t\t// established feature of WordPress.\n\t\t\t\t\t\t// @see https://github.com/WordPress/gutenberg/issues/33106\n\t\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t\t__html: safeHTML( description ),\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ widgetAreas?.length === 0 && (\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Your theme does not contain any Widget Areas.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! selectedWidgetArea && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\thref={ addQueryArgs( 'customize.php', {\n\t\t\t\t\t\t\t\t'autofocus[panel]': 'widgets',\n\t\t\t\t\t\t\t\treturn: window.location.pathname,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Manage with live preview' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAA0B;AAC1B,qBAAwB;AACxB,mBAA6B;AAC7B,0BAA0B;AAC1B,wBAAuB;AACvB,kBAAmB;AACnB,iBAA6B;AAC7B,iBAAyB;AAKzB,mBAA0C;AAkCtC;AAhCW,SAAR,YAA8B,EAAE,qBAAqB,GAAI;AAC/D,QAAM,kBAAc;AAAA,IACnB,CAAE,WAAY,OAAQ,aAAAA,KAAiB,EAAE,eAAe;AAAA,IACxD,CAAC;AAAA,EACF;AAEA,QAAM,yBAAqB;AAAA,IAC1B,MACC,wBACA,aAAa;AAAA,MACZ,CAAE,eAAgB,WAAW,OAAO;AAAA,IACrC;AAAA,IACD,CAAE,sBAAsB,WAAY;AAAA,EACrC;AAEA,MAAI;AACJ,MAAK,CAAE,oBAAqB;AAC3B,sBAAc;AAAA;AAAA,MAEb;AAAA,IACD;AAAA,EACD,WAAY,yBAAyB,uBAAwB;AAC5D,sBAAc;AAAA,MACb;AAAA,IACD;AAAA,EACD,OAAO;AACN,kBAAc,mBAAmB;AAAA,EAClC;AAEA,SACC,4CAAC,SAAI,WAAU,6BACd,uDAAC,SAAI,WAAU,4CACd;AAAA,gDAAC,iCAAU,MAAO,2BAAe;AAAA,IACjC,6CAAC,SACA;AAAA;AAAA,QAAC;AAAA;AAAA,UAKA,yBAA0B;AAAA,YACzB,YAAQ,qBAAU,WAAY;AAAA,UAC/B;AAAA;AAAA,MACD;AAAA,MACE,aAAa,WAAW,KACzB,4CAAC,OACE;AAAA,QACD;AAAA,MACD,GACD;AAAA,MAEC,CAAE,sBACH;AAAA,QAAC;AAAA;AAAA,UACA,uBAAqB;AAAA,UACrB,UAAO,yBAAc,iBAAiB;AAAA,YACrC,oBAAoB;AAAA,YACpB,QAAQ,OAAO,SAAS;AAAA,UACzB,CAAE;AAAA,UACF,SAAQ;AAAA,UAEN,8BAAI,0BAA2B;AAAA;AAAA,MAClC;AAAA,OAEF;AAAA,KACD,GACD;AAEF;",
|
|
6
6
|
"names": ["editWidgetsStore"]
|
|
7
7
|
}
|
|
@@ -74,14 +74,14 @@ function WelcomeGuide() {
|
|
|
74
74
|
isEntirelyBlockWidgets ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_i18n.sprintf)(
|
|
75
75
|
// Translators: %s: Number of block areas in the current theme.
|
|
76
76
|
(0, import_i18n._n)(
|
|
77
|
-
"Your theme provides %s
|
|
78
|
-
"Your theme provides %s different
|
|
77
|
+
"Your theme provides %s “block” area for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.",
|
|
78
|
+
"Your theme provides %s different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.",
|
|
79
79
|
numWidgetAreas
|
|
80
80
|
),
|
|
81
81
|
numWidgetAreas
|
|
82
82
|
) }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
83
83
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_i18n.__)(
|
|
84
|
-
"You can now add any block to your site
|
|
84
|
+
"You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly."
|
|
85
85
|
) }),
|
|
86
86
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "edit-widgets-welcome-guide__text", children: [
|
|
87
87
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: (0, import_i18n.__)(
|
|
@@ -130,7 +130,7 @@ function WelcomeGuide() {
|
|
|
130
130
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "edit-widgets-welcome-guide__heading", children: (0, import_i18n.__)("Explore all blocks") }),
|
|
131
131
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "edit-widgets-welcome-guide__text", children: (0, import_element.createInterpolateElement)(
|
|
132
132
|
(0, import_i18n.__)(
|
|
133
|
-
"All of the blocks available to you live in the block library. You
|
|
133
|
+
"All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon."
|
|
134
134
|
),
|
|
135
135
|
{
|
|
136
136
|
InserterIconImage: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/welcome-guide/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { ExternalLink, Guide } from '@wordpress/components';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function WelcomeGuide() {\n\tconst isActive = useSelect(\n\t\t( select ) =>\n\t\t\t!! select( preferencesStore ).get(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\t'welcomeGuide'\n\t\t\t),\n\t\t[]\n\t);\n\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst widgetAreas = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editWidgetsStore ).getWidgetAreas( { per_page: -1 } ),\n\t\t[]\n\t);\n\n\tif ( ! isActive ) {\n\t\treturn null;\n\t}\n\n\tconst isEntirelyBlockWidgets = widgetAreas?.every(\n\t\t( widgetArea ) =>\n\t\t\twidgetArea.id === 'wp_inactive_widgets' ||\n\t\t\twidgetArea.widgets.every( ( widgetId ) =>\n\t\t\t\twidgetId.startsWith( 'block-' )\n\t\t\t)\n\t);\n\n\tconst numWidgetAreas =\n\t\twidgetAreas?.filter(\n\t\t\t( widgetArea ) => widgetArea.id !== 'wp_inactive_widgets'\n\t\t).length ?? 0;\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-widgets-welcome-guide\"\n\t\t\tcontentLabel={ __( 'Welcome to block Widgets' ) }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-widgets', 'welcomeGuide' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-canvas.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-canvas.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Welcome to block Widgets' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t{ isEntirelyBlockWidgets ? (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t\t\t\t// Translators: %s: Number of block areas in the current theme.\n\t\t\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t\t\t'Your theme provides %s
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { ExternalLink, Guide } from '@wordpress/components';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function WelcomeGuide() {\n\tconst isActive = useSelect(\n\t\t( select ) =>\n\t\t\t!! select( preferencesStore ).get(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\t'welcomeGuide'\n\t\t\t),\n\t\t[]\n\t);\n\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst widgetAreas = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editWidgetsStore ).getWidgetAreas( { per_page: -1 } ),\n\t\t[]\n\t);\n\n\tif ( ! isActive ) {\n\t\treturn null;\n\t}\n\n\tconst isEntirelyBlockWidgets = widgetAreas?.every(\n\t\t( widgetArea ) =>\n\t\t\twidgetArea.id === 'wp_inactive_widgets' ||\n\t\t\twidgetArea.widgets.every( ( widgetId ) =>\n\t\t\t\twidgetId.startsWith( 'block-' )\n\t\t\t)\n\t);\n\n\tconst numWidgetAreas =\n\t\twidgetAreas?.filter(\n\t\t\t( widgetArea ) => widgetArea.id !== 'wp_inactive_widgets'\n\t\t).length ?? 0;\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-widgets-welcome-guide\"\n\t\t\tcontentLabel={ __( 'Welcome to block Widgets' ) }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-widgets', 'welcomeGuide' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-canvas.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-canvas.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Welcome to block Widgets' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t{ isEntirelyBlockWidgets ? (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t\t\t\t// Translators: %s: Number of block areas in the current theme.\n\t\t\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t\t\t'Your theme provides %s “block” area for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.',\n\t\t\t\t\t\t\t\t\t\t\t\t'Your theme provides %s different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.',\n\t\t\t\t\t\t\t\t\t\t\t\tnumWidgetAreas\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tnumWidgetAreas\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t\t\t<strong>\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Want to stick with the old widgets?'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</strong>{ ' ' }\n\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/plugins/classic-widgets/'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Get the Classic Widgets plugin.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-editor.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-editor.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Customize each block' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-library.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-library.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Explore all blocks' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tInserterIconImage: (\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"edit-widgets-welcome-guide__inserter-icon\"\n\t\t\t\t\t\t\t\t\t\t\t\talt={ __( 'inserter' ) }\n\t\t\t\t\t\t\t\t\t\t\t\tsrc=\"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-documentation.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-documentation.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Learn more' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\"New to the block editor? Want to learn more about using it? <a>Here's a detailed guide.</a>\"\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ta: (\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/wordpress-block-editor/'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t] }\n\t\t/>\n\t);\n}\n\nfunction WelcomeGuideImage( { nonAnimatedSrc, animatedSrc } ) {\n\treturn (\n\t\t<picture className=\"edit-widgets-welcome-guide__image\">\n\t\t\t<source\n\t\t\t\tsrcSet={ nonAnimatedSrc }\n\t\t\t\tmedia=\"(prefers-reduced-motion: reduce)\"\n\t\t\t/>\n\t\t\t<img src={ animatedSrc } width=\"312\" height=\"240\" alt=\"\" />\n\t\t</picture>\n\t);\n}\n"],
|
|
5
5
|
"mappings": "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",
|
|
6
6
|
"names": ["preferencesStore", "editWidgetsStore"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/save-button/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nfunction SaveButton() {\n\tconst { hasEditedWidgetAreaIds, isSaving, isWidgetSaveLocked } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEditedWidgetAreas,\n\t\t\t\tisSavingWidgetAreas,\n\t\t\t\tisWidgetSavingLocked,\n\t\t\t} = select( editWidgetsStore );\n\n\t\t\treturn {\n\t\t\t\thasEditedWidgetAreaIds: getEditedWidgetAreas()?.length > 0,\n\t\t\t\tisSaving: isSavingWidgetAreas(),\n\t\t\t\tisWidgetSaveLocked: isWidgetSavingLocked(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );\n\n\tconst isDisabled =\n\t\tisWidgetSaveLocked || isSaving || ! hasEditedWidgetAreaIds;\n\n\treturn (\n\t\t<Button\n\t\t\tvariant=\"primary\"\n\t\t\tisBusy={ isSaving }\n\t\t\taria-disabled={ isDisabled }\n\t\t\tonClick={ isDisabled ? undefined : saveEditedWidgetAreas }\n\t\t\tsize=\"compact\"\n\t\t>\n\t\t\t{ isSaving ? __( 'Saving
|
|
5
|
-
"mappings": ";AAGA,SAAS,cAAc;AACvB,SAAS,UAAU;AACnB,SAAS,aAAa,iBAAiB;AAKvC,SAAS,SAAS,wBAAwB;AAyBxC;AAvBF,SAAS,aAAa;AACrB,QAAM,EAAE,wBAAwB,UAAU,mBAAmB,IAAI;AAAA,IAChE,CAAE,WAAY;AACb,YAAM;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,MACD,IAAI,OAAQ,gBAAiB;AAE7B,aAAO;AAAA,QACN,wBAAwB,qBAAqB,GAAG,SAAS;AAAA,QACzD,UAAU,oBAAoB;AAAA,QAC9B,oBAAoB,qBAAqB;AAAA,MAC1C;AAAA,IACD;AAAA,IACA,CAAC;AAAA,EACF;AACA,QAAM,EAAE,sBAAsB,IAAI,YAAa,gBAAiB;AAEhE,QAAM,aACL,sBAAsB,YAAY,CAAE;AAErC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,SAAQ;AAAA,MACR,QAAS;AAAA,MACT,iBAAgB;AAAA,MAChB,SAAU,aAAa,SAAY;AAAA,MACnC,MAAK;AAAA,MAEH,qBAAW,GAAI,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nfunction SaveButton() {\n\tconst { hasEditedWidgetAreaIds, isSaving, isWidgetSaveLocked } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEditedWidgetAreas,\n\t\t\t\tisSavingWidgetAreas,\n\t\t\t\tisWidgetSavingLocked,\n\t\t\t} = select( editWidgetsStore );\n\n\t\t\treturn {\n\t\t\t\thasEditedWidgetAreaIds: getEditedWidgetAreas()?.length > 0,\n\t\t\t\tisSaving: isSavingWidgetAreas(),\n\t\t\t\tisWidgetSaveLocked: isWidgetSavingLocked(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );\n\n\tconst isDisabled =\n\t\tisWidgetSaveLocked || isSaving || ! hasEditedWidgetAreaIds;\n\n\treturn (\n\t\t<Button\n\t\t\tvariant=\"primary\"\n\t\t\tisBusy={ isSaving }\n\t\t\taria-disabled={ isDisabled }\n\t\t\tonClick={ isDisabled ? undefined : saveEditedWidgetAreas }\n\t\t\tsize=\"compact\"\n\t\t>\n\t\t\t{ isSaving ? __( 'Saving…' ) : __( 'Update' ) }\n\t\t</Button>\n\t);\n}\n\nexport default SaveButton;\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,cAAc;AACvB,SAAS,UAAU;AACnB,SAAS,aAAa,iBAAiB;AAKvC,SAAS,SAAS,wBAAwB;AAyBxC;AAvBF,SAAS,aAAa;AACrB,QAAM,EAAE,wBAAwB,UAAU,mBAAmB,IAAI;AAAA,IAChE,CAAE,WAAY;AACb,YAAM;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,MACD,IAAI,OAAQ,gBAAiB;AAE7B,aAAO;AAAA,QACN,wBAAwB,qBAAqB,GAAG,SAAS;AAAA,QACzD,UAAU,oBAAoB;AAAA,QAC9B,oBAAoB,qBAAqB;AAAA,MAC1C;AAAA,IACD;AAAA,IACA,CAAC;AAAA,EACF;AACA,QAAM,EAAE,sBAAsB,IAAI,YAAa,gBAAiB;AAEhE,QAAM,aACL,sBAAsB,YAAY,CAAE;AAErC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,SAAQ;AAAA,MACR,QAAS;AAAA,MACT,iBAAgB;AAAA,MAChB,SAAU,aAAa,SAAY;AAAA,MACnC,MAAK;AAAA,MAEH,qBAAW,GAAI,SAAU,IAAI,GAAI,QAAS;AAAA;AAAA,EAC7C;AAEF;AAEA,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
// packages/edit-widgets/src/components/sidebar/index.js
|
|
2
|
-
import {
|
|
3
|
-
useEffect,
|
|
4
|
-
Platform,
|
|
5
|
-
useContext,
|
|
6
|
-
useCallback
|
|
7
|
-
} from "@wordpress/element";
|
|
2
|
+
import { useEffect, useContext, useCallback } from "@wordpress/element";
|
|
8
3
|
import { isRTL, __ } from "@wordpress/i18n";
|
|
9
4
|
import {
|
|
10
5
|
ComplementaryArea,
|
|
@@ -21,10 +16,7 @@ import WidgetAreas from "./widget-areas.mjs";
|
|
|
21
16
|
import { store as editWidgetsStore } from "../../store/index.mjs";
|
|
22
17
|
import { unlock } from "../../lock-unlock.mjs";
|
|
23
18
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
24
|
-
var SIDEBAR_ACTIVE_BY_DEFAULT =
|
|
25
|
-
web: true,
|
|
26
|
-
native: false
|
|
27
|
-
});
|
|
19
|
+
var SIDEBAR_ACTIVE_BY_DEFAULT = true;
|
|
28
20
|
var BLOCK_INSPECTOR_IDENTIFIER = "edit-widgets/block-inspector";
|
|
29
21
|
var WIDGET_AREAS_IDENTIFIER = "edit-widgets/block-areas";
|
|
30
22
|
var { Tabs } = unlock(componentsPrivateApis);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/sidebar/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {
|
|
5
|
-
"mappings": ";AAGA
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useEffect, useContext, useCallback } from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport {\n\tComplementaryArea,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport {\n\tBlockInspector,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\nimport { drawerLeft, drawerRight } from '@wordpress/icons';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\nconst SIDEBAR_ACTIVE_BY_DEFAULT = true;\n\nconst BLOCK_INSPECTOR_IDENTIFIER = 'edit-widgets/block-inspector';\n\n// Widget areas were once called block areas, so use 'edit-widgets/block-areas'\n// for backwards compatibility.\nconst WIDGET_AREAS_IDENTIFIER = 'edit-widgets/block-areas';\n\n/**\n * Internal dependencies\n */\nimport WidgetAreas from './widget-areas';\nimport { store as editWidgetsStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nfunction SidebarHeader( { selectedWidgetAreaBlock } ) {\n\treturn (\n\t\t<Tabs.TabList>\n\t\t\t<Tabs.Tab tabId={ WIDGET_AREAS_IDENTIFIER }>\n\t\t\t\t{ selectedWidgetAreaBlock\n\t\t\t\t\t? selectedWidgetAreaBlock.attributes.name\n\t\t\t\t\t: __( 'Widget Areas' ) }\n\t\t\t</Tabs.Tab>\n\t\t\t<Tabs.Tab tabId={ BLOCK_INSPECTOR_IDENTIFIER }>\n\t\t\t\t{ __( 'Block' ) }\n\t\t\t</Tabs.Tab>\n\t\t</Tabs.TabList>\n\t);\n}\n\nfunction SidebarContent( {\n\thasSelectedNonAreaBlock,\n\tcurrentArea,\n\tisGeneralSidebarOpen,\n\tselectedWidgetAreaBlock,\n} ) {\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\thasSelectedNonAreaBlock &&\n\t\t\tcurrentArea === WIDGET_AREAS_IDENTIFIER &&\n\t\t\tisGeneralSidebarOpen\n\t\t) {\n\t\t\tenableComplementaryArea(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\tBLOCK_INSPECTOR_IDENTIFIER\n\t\t\t);\n\t\t}\n\t\tif (\n\t\t\t! hasSelectedNonAreaBlock &&\n\t\t\tcurrentArea === BLOCK_INSPECTOR_IDENTIFIER &&\n\t\t\tisGeneralSidebarOpen\n\t\t) {\n\t\t\tenableComplementaryArea(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\tWIDGET_AREAS_IDENTIFIER\n\t\t\t);\n\t\t}\n\t\t// We're intentionally leaving `currentArea` and `isGeneralSidebarOpen`\n\t\t// out of the dep array because we want this effect to run based on\n\t\t// block selection changes, not sidebar state changes.\n\t}, [ hasSelectedNonAreaBlock, enableComplementaryArea ] );\n\n\tconst tabsContextValue = useContext( Tabs.Context );\n\n\treturn (\n\t\t<ComplementaryArea\n\t\t\tclassName=\"edit-widgets-sidebar\"\n\t\t\theader={\n\t\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t\t<SidebarHeader\n\t\t\t\t\t\tselectedWidgetAreaBlock={ selectedWidgetAreaBlock }\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Context.Provider>\n\t\t\t}\n\t\t\theaderClassName=\"edit-widgets-sidebar__panel-tabs\"\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\ttitle={ __( 'Settings' ) }\n\t\t\tcloseLabel={ __( 'Close Settings' ) }\n\t\t\tscope=\"core/edit-widgets\"\n\t\t\tidentifier={ currentArea }\n\t\t\ticon={ isRTL() ? drawerLeft : drawerRight }\n\t\t\tisActiveByDefault={ SIDEBAR_ACTIVE_BY_DEFAULT }\n\t\t>\n\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\ttabId={ WIDGET_AREAS_IDENTIFIER }\n\t\t\t\t\tfocusable={ false }\n\t\t\t\t>\n\t\t\t\t\t<WidgetAreas\n\t\t\t\t\t\tselectedWidgetAreaId={\n\t\t\t\t\t\t\tselectedWidgetAreaBlock?.attributes.id\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\ttabId={ BLOCK_INSPECTOR_IDENTIFIER }\n\t\t\t\t\tfocusable={ false }\n\t\t\t\t>\n\t\t\t\t\t{ hasSelectedNonAreaBlock ? (\n\t\t\t\t\t\t<BlockInspector />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t// Pretend that Widget Areas are part of the UI by not\n\t\t\t\t\t\t// showing the Block Inspector when one is selected.\n\t\t\t\t\t\t<span className=\"block-editor-block-inspector__no-blocks\">\n\t\t\t\t\t\t\t{ __( 'No block selected.' ) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs.Context.Provider>\n\t\t</ComplementaryArea>\n\t);\n}\n\nexport default function Sidebar() {\n\tconst {\n\t\tcurrentArea,\n\t\thasSelectedNonAreaBlock,\n\t\tisGeneralSidebarOpen,\n\t\tselectedWidgetAreaBlock,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSelectedBlock, getBlock, getBlockParentsByBlockName } =\n\t\t\tselect( blockEditorStore );\n\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\n\t\tconst selectedBlock = getSelectedBlock();\n\n\t\tconst activeArea = getActiveComplementaryArea( editWidgetsStore.name );\n\n\t\tlet currentSelection = activeArea;\n\t\tif ( ! currentSelection ) {\n\t\t\tif ( selectedBlock ) {\n\t\t\t\tcurrentSelection = BLOCK_INSPECTOR_IDENTIFIER;\n\t\t\t} else {\n\t\t\t\tcurrentSelection = WIDGET_AREAS_IDENTIFIER;\n\t\t\t}\n\t\t}\n\n\t\tlet widgetAreaBlock;\n\t\tif ( selectedBlock ) {\n\t\t\tif ( selectedBlock.name === 'core/widget-area' ) {\n\t\t\t\twidgetAreaBlock = selectedBlock;\n\t\t\t} else {\n\t\t\t\twidgetAreaBlock = getBlock(\n\t\t\t\t\tgetBlockParentsByBlockName(\n\t\t\t\t\t\tselectedBlock.clientId,\n\t\t\t\t\t\t'core/widget-area'\n\t\t\t\t\t)[ 0 ]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tcurrentArea: currentSelection,\n\t\t\thasSelectedNonAreaBlock: !! (\n\t\t\t\tselectedBlock && selectedBlock.name !== 'core/widget-area'\n\t\t\t),\n\t\t\tisGeneralSidebarOpen: !! activeArea,\n\t\t\tselectedWidgetAreaBlock: widgetAreaBlock,\n\t\t};\n\t}, [] );\n\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\t// `newSelectedTabId` could technically be falsy if no tab is selected (i.e.\n\t// the initial render) or when we don't want a tab displayed (i.e. the\n\t// sidebar is closed). These cases should both be covered by the `!!` check\n\t// below, so we shouldn't need any additional falsy handling.\n\tconst onTabSelect = useCallback(\n\t\t( newSelectedTabId ) => {\n\t\t\tif ( !! newSelectedTabId ) {\n\t\t\t\tenableComplementaryArea(\n\t\t\t\t\teditWidgetsStore.name,\n\t\t\t\t\tnewSelectedTabId\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ enableComplementaryArea ]\n\t);\n\n\treturn (\n\t\t<Tabs\n\t\t\t// Due to how this component is controlled (via a value from the\n\t\t\t// `interfaceStore`), when the sidebar closes the currently selected\n\t\t\t// tab can't be found. This causes the component to continuously reset\n\t\t\t// the selection to `null` in an infinite loop. Proactively setting\n\t\t\t// the selected tab to `null` avoids that.\n\t\t\tselectedTabId={ isGeneralSidebarOpen ? currentArea : null }\n\t\t\tonSelect={ onTabSelect }\n\t\t\tselectOnMove={ false }\n\t\t>\n\t\t\t<SidebarContent\n\t\t\t\thasSelectedNonAreaBlock={ hasSelectedNonAreaBlock }\n\t\t\t\tcurrentArea={ currentArea }\n\t\t\t\tisGeneralSidebarOpen={ isGeneralSidebarOpen }\n\t\t\t\tselectedWidgetAreaBlock={ selectedWidgetAreaBlock }\n\t\t\t/>\n\t\t</Tabs>\n\t);\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -24,7 +24,7 @@ function WidgetAreas({ selectedWidgetAreaId }) {
|
|
|
24
24
|
if (!selectedWidgetArea) {
|
|
25
25
|
description = __(
|
|
26
26
|
// eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts
|
|
27
|
-
"Widget Areas are global parts in your site
|
|
27
|
+
"Widget Areas are global parts in your site’s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer."
|
|
28
28
|
);
|
|
29
29
|
} else if (selectedWidgetAreaId === "wp_inactive_widgets") {
|
|
30
30
|
description = __(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/sidebar/widget-areas.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { blockDefault } from '@wordpress/icons';\nimport { BlockIcon } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { safeHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function WidgetAreas( { selectedWidgetAreaId } ) {\n\tconst widgetAreas = useSelect(\n\t\t( select ) => select( editWidgetsStore ).getWidgetAreas(),\n\t\t[]\n\t);\n\n\tconst selectedWidgetArea = useMemo(\n\t\t() =>\n\t\t\tselectedWidgetAreaId &&\n\t\t\twidgetAreas?.find(\n\t\t\t\t( widgetArea ) => widgetArea.id === selectedWidgetAreaId\n\t\t\t),\n\t\t[ selectedWidgetAreaId, widgetAreas ]\n\t);\n\n\tlet description;\n\tif ( ! selectedWidgetArea ) {\n\t\tdescription = __(\n\t\t\t// eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts\n\t\t\t'Widget Areas are global parts in your site
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { blockDefault } from '@wordpress/icons';\nimport { BlockIcon } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { safeHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function WidgetAreas( { selectedWidgetAreaId } ) {\n\tconst widgetAreas = useSelect(\n\t\t( select ) => select( editWidgetsStore ).getWidgetAreas(),\n\t\t[]\n\t);\n\n\tconst selectedWidgetArea = useMemo(\n\t\t() =>\n\t\t\tselectedWidgetAreaId &&\n\t\t\twidgetAreas?.find(\n\t\t\t\t( widgetArea ) => widgetArea.id === selectedWidgetAreaId\n\t\t\t),\n\t\t[ selectedWidgetAreaId, widgetAreas ]\n\t);\n\n\tlet description;\n\tif ( ! selectedWidgetArea ) {\n\t\tdescription = __(\n\t\t\t// eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts\n\t\t\t'Widget Areas are global parts in your site’s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer.'\n\t\t);\n\t} else if ( selectedWidgetAreaId === 'wp_inactive_widgets' ) {\n\t\tdescription = __(\n\t\t\t'Blocks in this Widget Area will not be displayed in your site.'\n\t\t);\n\t} else {\n\t\tdescription = selectedWidgetArea.description;\n\t}\n\n\treturn (\n\t\t<div className=\"edit-widgets-widget-areas\">\n\t\t\t<div className=\"edit-widgets-widget-areas__top-container\">\n\t\t\t\t<BlockIcon icon={ blockDefault } />\n\t\t\t\t<div>\n\t\t\t\t\t<p\n\t\t\t\t\t\t// Use `dangerouslySetInnerHTML` to keep backwards\n\t\t\t\t\t\t// compatibility. Basic markup in the description is an\n\t\t\t\t\t\t// established feature of WordPress.\n\t\t\t\t\t\t// @see https://github.com/WordPress/gutenberg/issues/33106\n\t\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t\t__html: safeHTML( description ),\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ widgetAreas?.length === 0 && (\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Your theme does not contain any Widget Areas.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! selectedWidgetArea && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\thref={ addQueryArgs( 'customize.php', {\n\t\t\t\t\t\t\t\t'autofocus[panel]': 'widgets',\n\t\t\t\t\t\t\t\treturn: window.location.pathname,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Manage with live preview' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],
|
|
5
5
|
"mappings": ";AAGA,SAAS,iBAAiB;AAC1B,SAAS,eAAe;AACxB,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,cAAc;AACvB,SAAS,UAAU;AACnB,SAAS,oBAAoB;AAC7B,SAAS,gBAAgB;AAKzB,SAAS,SAAS,wBAAwB;AAkCtC,cACA,YADA;AAhCW,SAAR,YAA8B,EAAE,qBAAqB,GAAI;AAC/D,QAAM,cAAc;AAAA,IACnB,CAAE,WAAY,OAAQ,gBAAiB,EAAE,eAAe;AAAA,IACxD,CAAC;AAAA,EACF;AAEA,QAAM,qBAAqB;AAAA,IAC1B,MACC,wBACA,aAAa;AAAA,MACZ,CAAE,eAAgB,WAAW,OAAO;AAAA,IACrC;AAAA,IACD,CAAE,sBAAsB,WAAY;AAAA,EACrC;AAEA,MAAI;AACJ,MAAK,CAAE,oBAAqB;AAC3B,kBAAc;AAAA;AAAA,MAEb;AAAA,IACD;AAAA,EACD,WAAY,yBAAyB,uBAAwB;AAC5D,kBAAc;AAAA,MACb;AAAA,IACD;AAAA,EACD,OAAO;AACN,kBAAc,mBAAmB;AAAA,EAClC;AAEA,SACC,oBAAC,SAAI,WAAU,6BACd,+BAAC,SAAI,WAAU,4CACd;AAAA,wBAAC,aAAU,MAAO,cAAe;AAAA,IACjC,qBAAC,SACA;AAAA;AAAA,QAAC;AAAA;AAAA,UAKA,yBAA0B;AAAA,YACzB,QAAQ,SAAU,WAAY;AAAA,UAC/B;AAAA;AAAA,MACD;AAAA,MACE,aAAa,WAAW,KACzB,oBAAC,OACE;AAAA,QACD;AAAA,MACD,GACD;AAAA,MAEC,CAAE,sBACH;AAAA,QAAC;AAAA;AAAA,UACA,uBAAqB;AAAA,UACrB,MAAO,aAAc,iBAAiB;AAAA,YACrC,oBAAoB;AAAA,YACpB,QAAQ,OAAO,SAAS;AAAA,UACzB,CAAE;AAAA,UACF,SAAQ;AAAA,UAEN,aAAI,0BAA2B;AAAA;AAAA,MAClC;AAAA,OAEF;AAAA,KACD,GACD;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -51,14 +51,14 @@ function WelcomeGuide() {
|
|
|
51
51
|
isEntirelyBlockWidgets ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("p", { className: "edit-widgets-welcome-guide__text", children: sprintf(
|
|
52
52
|
// Translators: %s: Number of block areas in the current theme.
|
|
53
53
|
_n(
|
|
54
|
-
"Your theme provides %s
|
|
55
|
-
"Your theme provides %s different
|
|
54
|
+
"Your theme provides %s “block” area for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.",
|
|
55
|
+
"Your theme provides %s different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.",
|
|
56
56
|
numWidgetAreas
|
|
57
57
|
),
|
|
58
58
|
numWidgetAreas
|
|
59
59
|
) }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
60
60
|
/* @__PURE__ */ jsx("p", { className: "edit-widgets-welcome-guide__text", children: __(
|
|
61
|
-
"You can now add any block to your site
|
|
61
|
+
"You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly."
|
|
62
62
|
) }),
|
|
63
63
|
/* @__PURE__ */ jsxs("p", { className: "edit-widgets-welcome-guide__text", children: [
|
|
64
64
|
/* @__PURE__ */ jsx("strong", { children: __(
|
|
@@ -107,7 +107,7 @@ function WelcomeGuide() {
|
|
|
107
107
|
/* @__PURE__ */ jsx("h1", { className: "edit-widgets-welcome-guide__heading", children: __("Explore all blocks") }),
|
|
108
108
|
/* @__PURE__ */ jsx("p", { className: "edit-widgets-welcome-guide__text", children: createInterpolateElement(
|
|
109
109
|
__(
|
|
110
|
-
"All of the blocks available to you live in the block library. You
|
|
110
|
+
"All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon."
|
|
111
111
|
),
|
|
112
112
|
{
|
|
113
113
|
InserterIconImage: /* @__PURE__ */ jsx(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/welcome-guide/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { ExternalLink, Guide } from '@wordpress/components';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function WelcomeGuide() {\n\tconst isActive = useSelect(\n\t\t( select ) =>\n\t\t\t!! select( preferencesStore ).get(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\t'welcomeGuide'\n\t\t\t),\n\t\t[]\n\t);\n\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst widgetAreas = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editWidgetsStore ).getWidgetAreas( { per_page: -1 } ),\n\t\t[]\n\t);\n\n\tif ( ! isActive ) {\n\t\treturn null;\n\t}\n\n\tconst isEntirelyBlockWidgets = widgetAreas?.every(\n\t\t( widgetArea ) =>\n\t\t\twidgetArea.id === 'wp_inactive_widgets' ||\n\t\t\twidgetArea.widgets.every( ( widgetId ) =>\n\t\t\t\twidgetId.startsWith( 'block-' )\n\t\t\t)\n\t);\n\n\tconst numWidgetAreas =\n\t\twidgetAreas?.filter(\n\t\t\t( widgetArea ) => widgetArea.id !== 'wp_inactive_widgets'\n\t\t).length ?? 0;\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-widgets-welcome-guide\"\n\t\t\tcontentLabel={ __( 'Welcome to block Widgets' ) }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-widgets', 'welcomeGuide' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-canvas.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-canvas.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Welcome to block Widgets' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t{ isEntirelyBlockWidgets ? (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t\t\t\t// Translators: %s: Number of block areas in the current theme.\n\t\t\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t\t\t'Your theme provides %s
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { ExternalLink, Guide } from '@wordpress/components';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function WelcomeGuide() {\n\tconst isActive = useSelect(\n\t\t( select ) =>\n\t\t\t!! select( preferencesStore ).get(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\t'welcomeGuide'\n\t\t\t),\n\t\t[]\n\t);\n\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst widgetAreas = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editWidgetsStore ).getWidgetAreas( { per_page: -1 } ),\n\t\t[]\n\t);\n\n\tif ( ! isActive ) {\n\t\treturn null;\n\t}\n\n\tconst isEntirelyBlockWidgets = widgetAreas?.every(\n\t\t( widgetArea ) =>\n\t\t\twidgetArea.id === 'wp_inactive_widgets' ||\n\t\t\twidgetArea.widgets.every( ( widgetId ) =>\n\t\t\t\twidgetId.startsWith( 'block-' )\n\t\t\t)\n\t);\n\n\tconst numWidgetAreas =\n\t\twidgetAreas?.filter(\n\t\t\t( widgetArea ) => widgetArea.id !== 'wp_inactive_widgets'\n\t\t).length ?? 0;\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-widgets-welcome-guide\"\n\t\t\tcontentLabel={ __( 'Welcome to block Widgets' ) }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-widgets', 'welcomeGuide' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-canvas.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-canvas.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Welcome to block Widgets' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t{ isEntirelyBlockWidgets ? (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t\t\t\t// Translators: %s: Number of block areas in the current theme.\n\t\t\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t\t\t'Your theme provides %s “block” area for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.',\n\t\t\t\t\t\t\t\t\t\t\t\t'Your theme provides %s different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.',\n\t\t\t\t\t\t\t\t\t\t\t\tnumWidgetAreas\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tnumWidgetAreas\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t\t\t<strong>\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Want to stick with the old widgets?'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</strong>{ ' ' }\n\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/plugins/classic-widgets/'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Get the Classic Widgets plugin.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-editor.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-editor.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Customize each block' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-library.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-library.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Explore all blocks' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tInserterIconImage: (\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"edit-widgets-welcome-guide__inserter-icon\"\n\t\t\t\t\t\t\t\t\t\t\t\talt={ __( 'inserter' ) }\n\t\t\t\t\t\t\t\t\t\t\t\tsrc=\"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-documentation.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-documentation.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Learn more' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\"New to the block editor? Want to learn more about using it? <a>Here's a detailed guide.</a>\"\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ta: (\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/wordpress-block-editor/'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t] }\n\t\t/>\n\t);\n}\n\nfunction WelcomeGuideImage( { nonAnimatedSrc, animatedSrc } ) {\n\treturn (\n\t\t<picture className=\"edit-widgets-welcome-guide__image\">\n\t\t\t<source\n\t\t\t\tsrcSet={ nonAnimatedSrc }\n\t\t\t\tmedia=\"(prefers-reduced-motion: reduce)\"\n\t\t\t/>\n\t\t\t<img src={ animatedSrc } width=\"312\" height=\"240\" alt=\"\" />\n\t\t</picture>\n\t);\n}\n"],
|
|
5
5
|
"mappings": ";AAGA,SAAS,WAAW,mBAAmB;AACvC,SAAS,cAAc,aAAa;AACpC,SAAS,IAAI,SAAS,UAAU;AAChC,SAAS,gCAAgC;AACzC,SAAS,SAAS,wBAAwB;AAK1C,SAAS,SAAS,wBAAwB;AA8CpC,SAWE,UAXF,KA+BG,YA/BH;AA5CS,SAAR,eAAgC;AACtC,QAAM,WAAW;AAAA,IAChB,CAAE,WACD,CAAC,CAAE,OAAQ,gBAAiB,EAAE;AAAA,MAC7B;AAAA,MACA;AAAA,IACD;AAAA,IACD,CAAC;AAAA,EACF;AAEA,QAAM,EAAE,OAAO,IAAI,YAAa,gBAAiB;AAEjD,QAAM,cAAc;AAAA,IACnB,CAAE,WACD,OAAQ,gBAAiB,EAAE,eAAgB,EAAE,UAAU,GAAG,CAAE;AAAA,IAC7D,CAAC;AAAA,EACF;AAEA,MAAK,CAAE,UAAW;AACjB,WAAO;AAAA,EACR;AAEA,QAAM,yBAAyB,aAAa;AAAA,IAC3C,CAAE,eACD,WAAW,OAAO,yBAClB,WAAW,QAAQ;AAAA,MAAO,CAAE,aAC3B,SAAS,WAAY,QAAS;AAAA,IAC/B;AAAA,EACF;AAEA,QAAM,iBACL,aAAa;AAAA,IACZ,CAAE,eAAgB,WAAW,OAAO;AAAA,EACrC,EAAE,UAAU;AAEb,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,cAAe,GAAI,0BAA2B;AAAA,MAC9C,kBAAmB,GAAI,aAAc;AAAA,MACrC,UAAW,MAAM,OAAQ,qBAAqB,cAAe;AAAA,MAC7D,OAAQ;AAAA,QACP;AAAA,UACC,OACC;AAAA,YAAC;AAAA;AAAA,cACA,gBAAe;AAAA,cACf,aAAY;AAAA;AAAA,UACb;AAAA,UAED,SACC,iCACC;AAAA,gCAAC,QAAG,WAAU,uCACX,aAAI,0BAA2B,GAClC;AAAA,YACE,yBACD,gCACC,8BAAC,OAAE,WAAU,oCACV;AAAA;AAAA,cAED;AAAA,gBACC;AAAA,gBACA;AAAA,gBACA;AAAA,cACD;AAAA,cACA;AAAA,YACD,GACD,GACD,IAEA,iCACC;AAAA,kCAAC,OAAE,WAAU,oCACV;AAAA,gBACD;AAAA,cACD,GACD;AAAA,cACA,qBAAC,OAAE,WAAU,oCACZ;AAAA,oCAAC,YACE;AAAA,kBACD;AAAA,gBACD,GACD;AAAA,gBAAW;AAAA,gBACX;AAAA,kBAAC;AAAA;AAAA,oBACA,MAAO;AAAA,sBACN;AAAA,oBACD;AAAA,oBAEE;AAAA,sBACD;AAAA,oBACD;AAAA;AAAA,gBACD;AAAA,iBACD;AAAA,eACD;AAAA,aAEF;AAAA,QAEF;AAAA,QACA;AAAA,UACC,OACC;AAAA,YAAC;AAAA;AAAA,cACA,gBAAe;AAAA,cACf,aAAY;AAAA;AAAA,UACb;AAAA,UAED,SACC,iCACC;AAAA,gCAAC,QAAG,WAAU,uCACX,aAAI,sBAAuB,GAC9B;AAAA,YACA,oBAAC,OAAE,WAAU,oCACV;AAAA,cACD;AAAA,YACD,GACD;AAAA,aACD;AAAA,QAEF;AAAA,QACA;AAAA,UACC,OACC;AAAA,YAAC;AAAA;AAAA,cACA,gBAAe;AAAA,cACf,aAAY;AAAA;AAAA,UACb;AAAA,UAED,SACC,iCACC;AAAA,gCAAC,QAAG,WAAU,uCACX,aAAI,oBAAqB,GAC5B;AAAA,YACA,oBAAC,OAAE,WAAU,oCACV;AAAA,cACD;AAAA,gBACC;AAAA,cACD;AAAA,cACA;AAAA,gBACC,mBACC;AAAA,kBAAC;AAAA;AAAA,oBACA,WAAU;AAAA,oBACV,KAAM,GAAI,UAAW;AAAA,oBACrB,KAAI;AAAA;AAAA,gBACL;AAAA,cAEF;AAAA,YACD,GACD;AAAA,aACD;AAAA,QAEF;AAAA,QACA;AAAA,UACC,OACC;AAAA,YAAC;AAAA;AAAA,cACA,gBAAe;AAAA,cACf,aAAY;AAAA;AAAA,UACb;AAAA,UAED,SACC,iCACC;AAAA,gCAAC,QAAG,WAAU,uCACX,aAAI,YAAa,GACpB;AAAA,YACA,oBAAC,OAAE,WAAU,oCACV;AAAA,cACD;AAAA,gBACC;AAAA,cACD;AAAA,cACA;AAAA,gBACC,GACC;AAAA,kBAAC;AAAA;AAAA,oBACA,MAAO;AAAA,sBACN;AAAA,oBACD;AAAA;AAAA,gBACD;AAAA,cAEF;AAAA,YACD,GACD;AAAA,aACD;AAAA,QAEF;AAAA,MACD;AAAA;AAAA,EACD;AAEF;AAEA,SAAS,kBAAmB,EAAE,gBAAgB,YAAY,GAAI;AAC7D,SACC,qBAAC,aAAQ,WAAU,qCAClB;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,QAAS;AAAA,QACT,OAAM;AAAA;AAAA,IACP;AAAA,IACA,oBAAC,SAAI,KAAM,aAAc,OAAM,OAAM,QAAO,OAAM,KAAI,IAAG;AAAA,KAC1D;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -833,7 +833,8 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
833
833
|
.edit-widgets-welcome-guide__image > img {
|
|
834
834
|
display: block;
|
|
835
835
|
max-width: 100%;
|
|
836
|
-
object-fit: cover;
|
|
836
|
+
-o-object-fit: cover;
|
|
837
|
+
object-fit: cover;
|
|
837
838
|
}
|
|
838
839
|
.edit-widgets-welcome-guide__heading {
|
|
839
840
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
package/build-style/style.css
CHANGED
|
@@ -833,7 +833,8 @@ body.is-dragging-components-draggable .wp-block[data-type="core/widget-area"] .c
|
|
|
833
833
|
.edit-widgets-welcome-guide__image > img {
|
|
834
834
|
display: block;
|
|
835
835
|
max-width: 100%;
|
|
836
|
-
object-fit: cover;
|
|
836
|
+
-o-object-fit: cover;
|
|
837
|
+
object-fit: cover;
|
|
837
838
|
}
|
|
838
839
|
.edit-widgets-welcome-guide__heading {
|
|
839
840
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-widgets",
|
|
3
|
-
"version": "6.48.0",
|
|
3
|
+
"version": "6.48.2-next.v.202606191442.0+17fe7db8a",
|
|
4
4
|
"description": "Widgets Page module for WordPress..",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
},
|
|
41
41
|
"./package.json": "./package.json"
|
|
42
42
|
},
|
|
43
|
-
"react-native": "src/index",
|
|
44
43
|
"wpScript": true,
|
|
45
44
|
"wpCopyFiles": {
|
|
46
45
|
"files": [
|
|
@@ -48,38 +47,40 @@
|
|
|
48
47
|
]
|
|
49
48
|
},
|
|
50
49
|
"dependencies": {
|
|
51
|
-
"@wordpress/api-fetch": "^7.48.0",
|
|
52
|
-
"@wordpress/base-styles": "^
|
|
53
|
-
"@wordpress/block-editor": "^15.
|
|
54
|
-
"@wordpress/block-library": "^
|
|
55
|
-
"@wordpress/blocks": "^15.21.0",
|
|
56
|
-
"@wordpress/components": "^35.
|
|
57
|
-
"@wordpress/compose": "^8.1.0",
|
|
58
|
-
"@wordpress/core-data": "^7.48.0",
|
|
59
|
-
"@wordpress/data": "^10.48.0",
|
|
60
|
-
"@wordpress/deprecated": "^4.48.0",
|
|
61
|
-
"@wordpress/dom": "^4.48.0",
|
|
62
|
-
"@wordpress/element": "^8.0.0",
|
|
63
|
-
"@wordpress/hooks": "^4.48.0",
|
|
64
|
-
"@wordpress/i18n": "^6.21.0",
|
|
65
|
-
"@wordpress/icons": "^
|
|
66
|
-
"@wordpress/interface": "^9.33.0",
|
|
67
|
-
"@wordpress/keyboard-shortcuts": "^5.48.0",
|
|
68
|
-
"@wordpress/keycodes": "^4.48.0",
|
|
69
|
-
"@wordpress/media-utils": "^5.48.0",
|
|
70
|
-
"@wordpress/notices": "^5.48.0",
|
|
71
|
-
"@wordpress/patterns": "^2.48.0",
|
|
72
|
-
"@wordpress/plugins": "^7.48.0",
|
|
73
|
-
"@wordpress/preferences": "^4.48.0",
|
|
74
|
-
"@wordpress/private-apis": "^1.48.0",
|
|
75
|
-
"@wordpress/reusable-blocks": "^5.48.0",
|
|
76
|
-
"@wordpress/ui": "^0.
|
|
77
|
-
"@wordpress/url": "^4.48.0",
|
|
78
|
-
"@wordpress/widgets": "^4.48.0",
|
|
50
|
+
"@wordpress/api-fetch": "^7.48.2-next.v.202606191442.0+17fe7db8a",
|
|
51
|
+
"@wordpress/base-styles": "^10.0.2-next.v.202606191442.0+17fe7db8a",
|
|
52
|
+
"@wordpress/block-editor": "^15.22.1-next.v.202606191442.0+17fe7db8a",
|
|
53
|
+
"@wordpress/block-library": "^10.0.1-next.v.202606191442.0+17fe7db8a",
|
|
54
|
+
"@wordpress/blocks": "^15.21.3-next.v.202606191442.0+17fe7db8a",
|
|
55
|
+
"@wordpress/components": "^35.1.1-next.v.202606191442.0+17fe7db8a",
|
|
56
|
+
"@wordpress/compose": "^8.1.2-next.v.202606191442.0+17fe7db8a",
|
|
57
|
+
"@wordpress/core-data": "^7.48.2-next.v.202606191442.0+17fe7db8a",
|
|
58
|
+
"@wordpress/data": "^10.48.2-next.v.202606191442.0+17fe7db8a",
|
|
59
|
+
"@wordpress/deprecated": "^4.48.2-next.v.202606191442.0+17fe7db8a",
|
|
60
|
+
"@wordpress/dom": "^4.48.2-next.v.202606191442.0+17fe7db8a",
|
|
61
|
+
"@wordpress/element": "^8.0.2-next.v.202606191442.0+17fe7db8a",
|
|
62
|
+
"@wordpress/hooks": "^4.48.2-next.v.202606191442.0+17fe7db8a",
|
|
63
|
+
"@wordpress/i18n": "^6.21.2-next.v.202606191442.0+17fe7db8a",
|
|
64
|
+
"@wordpress/icons": "^14.0.2-next.v.202606191442.0+17fe7db8a",
|
|
65
|
+
"@wordpress/interface": "^9.33.2-next.v.202606191442.0+17fe7db8a",
|
|
66
|
+
"@wordpress/keyboard-shortcuts": "^5.48.2-next.v.202606191442.0+17fe7db8a",
|
|
67
|
+
"@wordpress/keycodes": "^4.48.2-next.v.202606191442.0+17fe7db8a",
|
|
68
|
+
"@wordpress/media-utils": "^5.48.2-next.v.202606191442.0+17fe7db8a",
|
|
69
|
+
"@wordpress/notices": "^5.48.2-next.v.202606191442.0+17fe7db8a",
|
|
70
|
+
"@wordpress/patterns": "^2.48.2-next.v.202606191442.0+17fe7db8a",
|
|
71
|
+
"@wordpress/plugins": "^7.48.2-next.v.202606191442.0+17fe7db8a",
|
|
72
|
+
"@wordpress/preferences": "^4.48.2-next.v.202606191442.0+17fe7db8a",
|
|
73
|
+
"@wordpress/private-apis": "^1.48.2-next.v.202606191442.0+17fe7db8a",
|
|
74
|
+
"@wordpress/reusable-blocks": "^5.48.2-next.v.202606191442.0+17fe7db8a",
|
|
75
|
+
"@wordpress/ui": "^0.16.1-next.v.202606191442.0+17fe7db8a",
|
|
76
|
+
"@wordpress/url": "^4.48.2-next.v.202606191442.0+17fe7db8a",
|
|
77
|
+
"@wordpress/widgets": "^4.48.2-next.v.202606191442.0+17fe7db8a",
|
|
79
78
|
"clsx": "^2.1.1"
|
|
80
79
|
},
|
|
81
80
|
"devDependencies": {
|
|
82
|
-
"
|
|
81
|
+
"@testing-library/dom": "^10.4.1",
|
|
82
|
+
"@testing-library/react": "^16.3.2",
|
|
83
|
+
"deep-freeze": "^0.0.1"
|
|
83
84
|
},
|
|
84
85
|
"peerDependencies": {
|
|
85
86
|
"react": "^18.0.0",
|
|
@@ -88,5 +89,5 @@
|
|
|
88
89
|
"publishConfig": {
|
|
89
90
|
"access": "public"
|
|
90
91
|
},
|
|
91
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "1b6a19222df5a88f161880b5789efb3171d8f425"
|
|
92
93
|
}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
useEffect,
|
|
6
|
-
Platform,
|
|
7
|
-
useContext,
|
|
8
|
-
useCallback,
|
|
9
|
-
} from '@wordpress/element';
|
|
4
|
+
import { useEffect, useContext, useCallback } from '@wordpress/element';
|
|
10
5
|
import { isRTL, __ } from '@wordpress/i18n';
|
|
11
6
|
import {
|
|
12
7
|
ComplementaryArea,
|
|
@@ -21,10 +16,7 @@ import { drawerLeft, drawerRight } from '@wordpress/icons';
|
|
|
21
16
|
import { privateApis as componentsPrivateApis } from '@wordpress/components';
|
|
22
17
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
23
18
|
|
|
24
|
-
const SIDEBAR_ACTIVE_BY_DEFAULT =
|
|
25
|
-
web: true,
|
|
26
|
-
native: false,
|
|
27
|
-
} );
|
|
19
|
+
const SIDEBAR_ACTIVE_BY_DEFAULT = true;
|
|
28
20
|
|
|
29
21
|
const BLOCK_INSPECTOR_IDENTIFIER = 'edit-widgets/block-inspector';
|
|
30
22
|
|