@wordpress/edit-site 7.0.0 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/components/canvas-loader/index.cjs +8 -3
- package/build/components/canvas-loader/index.cjs.map +3 -3
- package/build/components/editor/use-editor-title.cjs +1 -2
- package/build/components/editor/use-editor-title.cjs.map +3 -3
- package/build/components/save-button/index.cjs +3 -3
- package/build/components/save-button/index.cjs.map +3 -3
- package/build/components/save-panel/index.cjs +7 -4
- package/build/components/save-panel/index.cjs.map +3 -3
- package/build/components/sidebar-navigation-screen-patterns/index.cjs +3 -2
- package/build/components/sidebar-navigation-screen-patterns/index.cjs.map +3 -3
- package/build/components/site-editor-routes/styles.cjs +17 -12
- package/build/components/site-editor-routes/styles.cjs.map +2 -2
- package/build-module/components/canvas-loader/index.mjs +9 -7
- package/build-module/components/canvas-loader/index.mjs.map +2 -2
- package/build-module/components/editor/use-editor-title.mjs +5 -3
- package/build-module/components/editor/use-editor-title.mjs.map +2 -2
- package/build-module/components/save-button/index.mjs +6 -6
- package/build-module/components/save-button/index.mjs.map +2 -2
- package/build-module/components/save-panel/index.mjs +9 -7
- package/build-module/components/save-panel/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-patterns/index.mjs +2 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.mjs.map +2 -2
- package/build-module/components/site-editor-routes/styles.mjs +17 -12
- package/build-module/components/site-editor-routes/styles.mjs.map +2 -2
- package/build-style/style-rtl.css +19 -8
- package/build-style/style.css +19 -8
- package/package.json +48 -49
- package/src/components/canvas-loader/index.js +6 -10
- package/src/components/canvas-loader/style.scss +3 -4
- package/src/components/editor/use-editor-title.js +5 -3
- package/src/components/save-button/index.js +6 -6
- package/src/components/save-panel/index.js +9 -7
- package/src/components/sidebar-navigation-screen-patterns/index.js +2 -1
- package/src/components/site-editor-routes/styles.js +19 -11
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { NavigableRegion } from "@wordpress/admin-ui";
|
|
4
4
|
import { Button, Modal } from "@wordpress/components";
|
|
5
|
-
import {
|
|
6
|
-
EntitiesSavedStates,
|
|
7
|
-
useEntitiesSavedStatesIsDirty,
|
|
8
|
-
privateApis
|
|
9
|
-
} from "@wordpress/editor";
|
|
10
5
|
import { useDispatch, useSelect } from "@wordpress/data";
|
|
11
6
|
import { __, sprintf } from "@wordpress/i18n";
|
|
12
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
store as coreStore,
|
|
9
|
+
privateApis as coreDataPrivateApis
|
|
10
|
+
} from "@wordpress/core-data";
|
|
13
11
|
import { privateApis as routerPrivateApis } from "@wordpress/router";
|
|
14
12
|
import { useEffect } from "@wordpress/element";
|
|
15
13
|
import { store as editSiteStore } from "../../store/index.mjs";
|
|
@@ -18,8 +16,12 @@ import { useActivateTheme } from "../../utils/use-activate-theme.mjs";
|
|
|
18
16
|
import { useActualCurrentTheme } from "../../utils/use-actual-current-theme.mjs";
|
|
19
17
|
import { isPreviewingTheme } from "../../utils/is-previewing-theme.mjs";
|
|
20
18
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
21
|
-
var { EntitiesSavedStatesExtensible } = unlock(privateApis);
|
|
22
19
|
var { useLocation } = unlock(routerPrivateApis);
|
|
20
|
+
var {
|
|
21
|
+
EntitiesSavedStatesExtensible,
|
|
22
|
+
EntitiesSavedStates,
|
|
23
|
+
useEntitiesSavedStatesIsDirty
|
|
24
|
+
} = unlock(coreDataPrivateApis);
|
|
23
25
|
var EntitiesSavedStatesForPreview = ({
|
|
24
26
|
onClose,
|
|
25
27
|
renderDialog,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/save-panel/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { NavigableRegion } from '@wordpress/admin-ui';\nimport { Button, Modal } from '@wordpress/components';\nimport {
|
|
5
|
-
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,uBAAuB;AAChC,SAAS,QAAQ,aAAa;AAC9B
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { NavigableRegion } from '@wordpress/admin-ui';\nimport { Button, Modal } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tstore as coreStore,\n\tprivateApis as coreDataPrivateApis,\n} from '@wordpress/core-data';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { useActivateTheme } from '../../utils/use-activate-theme';\nimport { useActualCurrentTheme } from '../../utils/use-actual-current-theme';\nimport { isPreviewingTheme } from '../../utils/is-previewing-theme';\n\nconst { useLocation } = unlock( routerPrivateApis );\nconst {\n\tEntitiesSavedStatesExtensible,\n\tEntitiesSavedStates,\n\tuseEntitiesSavedStatesIsDirty,\n} = unlock( coreDataPrivateApis );\n\nconst EntitiesSavedStatesForPreview = ( {\n\tonClose,\n\trenderDialog,\n\tvariant,\n} ) => {\n\tconst isDirtyProps = useEntitiesSavedStatesIsDirty();\n\tlet activateSaveLabel, successNoticeContent;\n\tif ( isDirtyProps.isDirty ) {\n\t\tactivateSaveLabel = __( 'Activate & Save' );\n\t\tsuccessNoticeContent = __( 'Theme activated and site updated.' );\n\t} else {\n\t\tactivateSaveLabel = __( 'Activate' );\n\t\tsuccessNoticeContent = __( 'Theme activated.' );\n\t}\n\n\tconst currentTheme = useActualCurrentTheme();\n\n\tconst previewingTheme = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme(),\n\t\t[]\n\t);\n\n\tconst additionalPrompt = (\n\t\t<p>\n\t\t\t{ sprintf(\n\t\t\t\t/* translators: 1: The name of active theme, 2: The name of theme to be activated. */\n\t\t\t\t__(\n\t\t\t\t\t'Saving your changes will change your active theme from %1$s to %2$s.'\n\t\t\t\t),\n\t\t\t\tcurrentTheme?.name?.rendered ?? '...',\n\t\t\t\tpreviewingTheme?.name?.rendered ?? '...'\n\t\t\t) }\n\t\t</p>\n\t);\n\n\tconst activateTheme = useActivateTheme();\n\tconst onSave = async () => {\n\t\tawait activateTheme();\n\t};\n\n\treturn (\n\t\t<EntitiesSavedStatesExtensible\n\t\t\t{ ...{\n\t\t\t\t...isDirtyProps,\n\t\t\t\tadditionalPrompt,\n\t\t\t\tclose: onClose,\n\t\t\t\tonSave,\n\t\t\t\tsaveEnabled: true,\n\t\t\t\tsaveLabel: activateSaveLabel,\n\t\t\t\trenderDialog,\n\t\t\t\tvariant,\n\t\t\t\tsuccessNoticeContent,\n\t\t\t} }\n\t\t/>\n\t);\n};\n\nconst _EntitiesSavedStates = ( { onClose, renderDialog, variant } ) => {\n\tif ( isPreviewingTheme() ) {\n\t\treturn (\n\t\t\t<EntitiesSavedStatesForPreview\n\t\t\t\tonClose={ onClose }\n\t\t\t\trenderDialog={ renderDialog }\n\t\t\t\tvariant={ variant }\n\t\t\t/>\n\t\t);\n\t}\n\treturn (\n\t\t<EntitiesSavedStates\n\t\t\tclose={ onClose }\n\t\t\trenderDialog={ renderDialog }\n\t\t\tvariant={ variant }\n\t\t/>\n\t);\n};\n\nexport default function SavePanel() {\n\tconst { query } = useLocation();\n\tconst { canvas = 'view' } = query;\n\tconst { isSaveViewOpen, isDirty, isSaving } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\t__experimentalGetDirtyEntityRecords,\n\t\t\tisSavingEntityRecord,\n\t\t\tisResolving,\n\t\t} = select( coreStore );\n\t\tconst dirtyEntityRecords = __experimentalGetDirtyEntityRecords();\n\t\tconst isActivatingTheme = isResolving( 'activateTheme' );\n\t\tconst { isSaveViewOpened } = unlock( select( editSiteStore ) );\n\n\t\t// The currently selected entity to display.\n\t\t// Typically template or template part in the site editor.\n\t\treturn {\n\t\t\tisSaveViewOpen: isSaveViewOpened(),\n\t\t\tisDirty: dirtyEntityRecords.length > 0,\n\t\t\tisSaving:\n\t\t\t\tdirtyEntityRecords.some( ( record ) =>\n\t\t\t\t\tisSavingEntityRecord( record.kind, record.name, record.key )\n\t\t\t\t) || isActivatingTheme,\n\t\t};\n\t}, [] );\n\tconst { setIsSaveViewOpened } = useDispatch( editSiteStore );\n\tconst onClose = () => setIsSaveViewOpened( false );\n\tuseEffect( () => {\n\t\tsetIsSaveViewOpened( false );\n\t}, [ canvas, setIsSaveViewOpened ] );\n\n\tif ( canvas === 'view' ) {\n\t\treturn isSaveViewOpen ? (\n\t\t\t<Modal\n\t\t\t\tclassName=\"edit-site-save-panel__modal\"\n\t\t\t\tonRequestClose={ onClose }\n\t\t\t\ttitle={ __( 'Review changes' ) }\n\t\t\t\tsize=\"small\"\n\t\t\t>\n\t\t\t\t<_EntitiesSavedStates onClose={ onClose } variant=\"inline\" />\n\t\t\t</Modal>\n\t\t) : null;\n\t}\n\tconst activateSaveEnabled = isPreviewingTheme() || isDirty;\n\tconst disabled = isSaving || ! activateSaveEnabled;\n\treturn (\n\t\t<NavigableRegion\n\t\t\tclassName={ clsx( 'edit-site-layout__actions', {\n\t\t\t\t'is-entity-save-view-open': isSaveViewOpen,\n\t\t\t} ) }\n\t\t\tariaLabel={ __( 'Save panel' ) }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'edit-site-editor__toggle-save-panel', {\n\t\t\t\t\t'screen-reader-text': isSaveViewOpen,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tclassName=\"edit-site-editor__toggle-save-panel-button\"\n\t\t\t\t\tonClick={ () => setIsSaveViewOpened( true ) }\n\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Open save panel' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t\t{ isSaveViewOpen && (\n\t\t\t\t<_EntitiesSavedStates onClose={ onClose } renderDialog />\n\t\t\t) }\n\t\t</NavigableRegion>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,uBAAuB;AAChC,SAAS,QAAQ,aAAa;AAC9B,SAAS,aAAa,iBAAiB;AACvC,SAAS,IAAI,eAAe;AAC5B;AAAA,EACC,SAAS;AAAA,EACT,eAAe;AAAA,OACT;AACP,SAAS,eAAe,yBAAyB;AACjD,SAAS,iBAAiB;AAK1B,SAAS,SAAS,qBAAqB;AACvC,SAAS,cAAc;AACvB,SAAS,wBAAwB;AACjC,SAAS,6BAA6B;AACtC,SAAS,yBAAyB;AAgChC,cAkGA,YAlGA;AA9BF,IAAM,EAAE,YAAY,IAAI,OAAQ,iBAAkB;AAClD,IAAM;AAAA,EACL;AAAA,EACA;AAAA,EACA;AACD,IAAI,OAAQ,mBAAoB;AAEhC,IAAM,gCAAgC,CAAE;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AACD,MAAO;AACN,QAAM,eAAe,8BAA8B;AACnD,MAAI,mBAAmB;AACvB,MAAK,aAAa,SAAU;AAC3B,wBAAoB,GAAI,iBAAkB;AAC1C,2BAAuB,GAAI,mCAAoC;AAAA,EAChE,OAAO;AACN,wBAAoB,GAAI,UAAW;AACnC,2BAAuB,GAAI,kBAAmB;AAAA,EAC/C;AAEA,QAAM,eAAe,sBAAsB;AAE3C,QAAM,kBAAkB;AAAA,IACvB,CAAE,WAAY,OAAQ,SAAU,EAAE,gBAAgB;AAAA,IAClD,CAAC;AAAA,EACF;AAEA,QAAM,mBACL,oBAAC,OACE;AAAA;AAAA,IAED;AAAA,MACC;AAAA,IACD;AAAA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IAAI,YAAa,aAAc;AAC3D,QAAM,UAAU,MAAM,oBAAqB,KAAM;AACjD,YAAW,MAAM;AAChB,wBAAqB,KAAM;AAAA,EAC5B,GAAG,CAAE,QAAQ,mBAAoB,CAAE;AAEnC,MAAK,WAAW,QAAS;AACxB,WAAO,iBACN;AAAA,MAAC;AAAA;AAAA,QACA,WAAU;AAAA,QACV,gBAAiB;AAAA,QACjB,OAAQ,GAAI,gBAAiB;AAAA,QAC7B,MAAK;AAAA,QAEL,8BAAC,wBAAqB,SAAoB,SAAQ,UAAS;AAAA;AAAA,IAC5D,IACG;AAAA,EACL;AACA,QAAM,sBAAsB,kBAAkB,KAAK;AACnD,QAAM,WAAW,YAAY,CAAE;AAC/B,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAY,KAAM,6BAA6B;AAAA,QAC9C,4BAA4B;AAAA,MAC7B,CAAE;AAAA,MACF,WAAY,GAAI,YAAa;AAAA,MAE7B;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,WAAY,KAAM,uCAAuC;AAAA,cACxD,sBAAsB;AAAA,YACvB,CAAE;AAAA,YAEF;AAAA,cAAC;AAAA;AAAA,gBACA,uBAAqB;AAAA,gBACrB,SAAQ;AAAA,gBACR,WAAU;AAAA,gBACV,SAAU,MAAM,oBAAqB,IAAK;AAAA,gBAC1C,iBAAc;AAAA,gBACd;AAAA,gBACA,wBAAsB;AAAA,gBAEpB,aAAI,iBAAkB;AAAA;AAAA,YACzB;AAAA;AAAA,QACD;AAAA,QACE,kBACD,oBAAC,wBAAqB,SAAoB,cAAY,MAAC;AAAA;AAAA;AAAA,EAEzD;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
__experimentalItemGroup as ItemGroup,
|
|
4
4
|
__experimentalItem as Item
|
|
5
5
|
} from "@wordpress/components";
|
|
6
|
-
import { getTemplatePartIcon } from "@wordpress/editor";
|
|
7
6
|
import { useMemo } from "@wordpress/element";
|
|
8
7
|
import { __ } from "@wordpress/i18n";
|
|
9
8
|
import { file } from "@wordpress/icons";
|
|
10
9
|
import { privateApis as routerPrivateApis } from "@wordpress/router";
|
|
10
|
+
import { privateApis as coreDataPrivateApis } from "@wordpress/core-data";
|
|
11
11
|
import { useViewConfig } from "@wordpress/views";
|
|
12
12
|
import SidebarNavigationScreen from "../sidebar-navigation-screen/index.mjs";
|
|
13
13
|
import CategoryItem from "./category-item.mjs";
|
|
@@ -23,6 +23,7 @@ import { unlock } from "../../lock-unlock.mjs";
|
|
|
23
23
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
24
24
|
var VIEW_CONFIG_FIELDS = ["view_list"];
|
|
25
25
|
var { useLocation } = unlock(routerPrivateApis);
|
|
26
|
+
var { getTemplatePartIcon } = unlock(coreDataPrivateApis);
|
|
26
27
|
function CategoriesGroup({
|
|
27
28
|
templatePartViews,
|
|
28
29
|
patternViews,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/sidebar-navigation-screen-patterns/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalItem as Item,\n} from '@wordpress/components';\nimport {
|
|
5
|
-
"mappings": ";AAGA;AAAA,EACC,2BAA2B;AAAA,EAC3B,sBAAsB;AAAA,OAChB;AACP,SAAS,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalItem as Item,\n} from '@wordpress/components';\nimport { useMemo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { file } from '@wordpress/icons';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { privateApis as coreDataPrivateApis } from '@wordpress/core-data';\nimport { useViewConfig } from '@wordpress/views';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport CategoryItem from './category-item';\nimport {\n\tPATTERN_DEFAULT_CATEGORY,\n\tPATTERN_TYPES,\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_PART_ALL_AREAS_CATEGORY,\n} from '../../utils/constants';\nimport usePatternCategories from './use-pattern-categories';\nimport useTemplatePartAreas from './use-template-part-areas';\nimport { unlock } from '../../lock-unlock';\n\nconst VIEW_CONFIG_FIELDS = [ 'view_list' ];\n\nconst { useLocation } = unlock( routerPrivateApis );\nconst { getTemplatePartIcon } = unlock( coreDataPrivateApis );\n\nfunction CategoriesGroup( {\n\ttemplatePartViews,\n\tpatternViews,\n\ttemplatePartCounts,\n\tpatternCounts,\n\tcurrentCategory,\n\tcurrentType,\n} ) {\n\treturn (\n\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-patterns__group\">\n\t\t\t{ templatePartViews?.map( ( view ) => (\n\t\t\t\t<CategoryItem\n\t\t\t\t\tkey={ view.slug }\n\t\t\t\t\tcount={ templatePartCounts[ view.slug ] }\n\t\t\t\t\ticon={ getTemplatePartIcon(\n\t\t\t\t\t\tview.slug === TEMPLATE_PART_ALL_AREAS_CATEGORY\n\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t: view.slug\n\t\t\t\t\t) }\n\t\t\t\t\tlabel={ view.title }\n\t\t\t\t\tid={ view.slug }\n\t\t\t\t\ttype={ TEMPLATE_PART_POST_TYPE }\n\t\t\t\t\tisActive={\n\t\t\t\t\t\tcurrentCategory === view.slug &&\n\t\t\t\t\t\tcurrentType === TEMPLATE_PART_POST_TYPE\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t\t<div className=\"edit-site-sidebar-navigation-screen-patterns__divider\" />\n\t\t\t{ patternViews?.map( ( view ) => (\n\t\t\t\t<CategoryItem\n\t\t\t\t\tkey={ view.slug }\n\t\t\t\t\tcount={ patternCounts[ view.slug ] }\n\t\t\t\t\tlabel={ view.title }\n\t\t\t\t\ticon={ file }\n\t\t\t\t\tid={ view.slug }\n\t\t\t\t\ttype={ PATTERN_TYPES.user }\n\t\t\t\t\tisActive={\n\t\t\t\t\t\tcurrentCategory === `${ view.slug }` &&\n\t\t\t\t\t\tcurrentType === PATTERN_TYPES.user\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</ItemGroup>\n\t);\n}\n\nexport default function SidebarNavigationScreenPatterns( { backPath } ) {\n\tconst {\n\t\tquery: { postType = 'wp_block', categoryId },\n\t} = useLocation();\n\tconst currentCategory =\n\t\tcategoryId ||\n\t\t( postType === PATTERN_TYPES.user\n\t\t\t? PATTERN_DEFAULT_CATEGORY\n\t\t\t: TEMPLATE_PART_ALL_AREAS_CATEGORY );\n\n\tconst { view_list: templatePartViews } = useViewConfig( {\n\t\tkind: 'postType',\n\t\tname: TEMPLATE_PART_POST_TYPE,\n\t\tfields: VIEW_CONFIG_FIELDS,\n\t} );\n\tconst { view_list: patternViews } = useViewConfig( {\n\t\tkind: 'postType',\n\t\tname: PATTERN_TYPES.user,\n\t\tfields: VIEW_CONFIG_FIELDS,\n\t} );\n\n\tconst { templatePartAreas, isLoading, hasTemplateParts } =\n\t\tuseTemplatePartAreas();\n\tconst templatePartCounts = useMemo( () => {\n\t\tconst counts = { [ TEMPLATE_PART_ALL_AREAS_CATEGORY ]: 0 };\n\t\tObject.entries( templatePartAreas ).forEach(\n\t\t\t( [ area, { templateParts } ] ) => {\n\t\t\t\tconst count = templateParts?.length || 0;\n\t\t\t\tcounts[ area ] = count;\n\t\t\t\tcounts[ TEMPLATE_PART_ALL_AREAS_CATEGORY ] += count;\n\t\t\t}\n\t\t);\n\t\treturn counts;\n\t}, [ templatePartAreas ] );\n\tconst { patternCategories } = usePatternCategories();\n\tconst patternCounts = useMemo( () => {\n\t\tconst counts = {};\n\t\tpatternCategories.forEach( ( cat ) => {\n\t\t\tcounts[ cat.name ] = cat.count;\n\t\t} );\n\t\treturn counts;\n\t}, [ patternCategories ] );\n\n\tconst hasPatterns = patternCounts[ PATTERN_DEFAULT_CATEGORY ] > 0;\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ __( 'Patterns' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Manage what patterns are available when editing the site.'\n\t\t\t) }\n\t\t\tisRoot={ ! backPath }\n\t\t\tbackPath={ backPath }\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ isLoading && __( 'Loading items…' ) }\n\t\t\t\t\t{ ! isLoading && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ ! hasTemplateParts && ! hasPatterns && (\n\t\t\t\t\t\t\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-patterns__group\">\n\t\t\t\t\t\t\t\t\t<Item>{ __( 'No items found' ) }</Item>\n\t\t\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<CategoriesGroup\n\t\t\t\t\t\t\t\ttemplatePartViews={ templatePartViews }\n\t\t\t\t\t\t\t\tpatternViews={ patternViews }\n\t\t\t\t\t\t\t\ttemplatePartCounts={ templatePartCounts }\n\t\t\t\t\t\t\t\tpatternCounts={ patternCounts }\n\t\t\t\t\t\t\t\tcurrentCategory={ currentCategory }\n\t\t\t\t\t\t\t\tcurrentType={ postType }\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}\n\t\t/>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";AAGA;AAAA,EACC,2BAA2B;AAAA,EAC3B,sBAAsB;AAAA,OAChB;AACP,SAAS,eAAe;AACxB,SAAS,UAAU;AACnB,SAAS,YAAY;AACrB,SAAS,eAAe,yBAAyB;AACjD,SAAS,eAAe,2BAA2B;AACnD,SAAS,qBAAqB;AAK9B,OAAO,6BAA6B;AACpC,OAAO,kBAAkB;AACzB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,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;AAAA,UACf;AAAA,WACD;AAAA,SAEF;AAAA;AAAA,EAEF;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -8,11 +8,11 @@ import SidebarNavigationScreenGlobalStyles from "../sidebar-navigation-screen-gl
|
|
|
8
8
|
import SidebarGlobalStyles from "../sidebar-global-styles/index.mjs";
|
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
|
10
10
|
var { useLocation, useHistory } = unlock(routerPrivateApis);
|
|
11
|
-
var { StyleBookPreview } = unlock(editorPrivateApis);
|
|
12
|
-
function
|
|
11
|
+
var { StyleBookPreview, useGlobalStyles } = unlock(editorPrivateApis);
|
|
12
|
+
function StyleBookPreviewArea({ siteData }) {
|
|
13
13
|
const { path, query } = useLocation();
|
|
14
14
|
const history = useHistory();
|
|
15
|
-
const
|
|
15
|
+
const { user: userConfig } = useGlobalStyles();
|
|
16
16
|
const section = query.section ?? "/";
|
|
17
17
|
const onChangeSection = (updatedSection) => {
|
|
18
18
|
history.navigate(
|
|
@@ -21,15 +21,20 @@ function StylesPreviewArea({ siteData }) {
|
|
|
21
21
|
})
|
|
22
22
|
);
|
|
23
23
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
StyleBookPreview,
|
|
26
|
+
{
|
|
27
|
+
path: section,
|
|
28
|
+
onPathChange: onChangeSection,
|
|
29
|
+
settings: siteData.editorSettings,
|
|
30
|
+
userConfig
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
function StylesPreviewArea({ siteData }) {
|
|
35
|
+
const { query } = useLocation();
|
|
36
|
+
if (query.preview === "stylebook") {
|
|
37
|
+
return /* @__PURE__ */ jsx(StyleBookPreviewArea, { siteData });
|
|
33
38
|
}
|
|
34
39
|
return /* @__PURE__ */ jsx(Editor, {});
|
|
35
40
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/styles.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport { unlock } from '../../lock-unlock';\nimport SidebarNavigationScreenGlobalStyles from '../sidebar-navigation-screen-global-styles';\nimport SidebarGlobalStyles from '../sidebar-global-styles';\n\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\nconst { StyleBookPreview } = unlock( editorPrivateApis );\n\nfunction
|
|
5
|
-
"mappings": ";AAGA,SAAS,eAAe,yBAAyB;AACjD,SAAS,eAAe,yBAAyB;AACjD,SAAS,oBAAoB;AAK7B,OAAO,YAAY;AACnB,SAAS,cAAc;AACvB,OAAO,yCAAyC;AAChD,OAAO,yBAAyB;
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport { unlock } from '../../lock-unlock';\nimport SidebarNavigationScreenGlobalStyles from '../sidebar-navigation-screen-global-styles';\nimport SidebarGlobalStyles from '../sidebar-global-styles';\n\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\nconst { StyleBookPreview, useGlobalStyles } = unlock( editorPrivateApis );\n\nfunction StyleBookPreviewArea( { siteData } ) {\n\tconst { path, query } = useLocation();\n\tconst history = useHistory();\n\tconst { user: userConfig } = useGlobalStyles();\n\n\t// Get section from URL query params\n\tconst section = query.section ?? '/';\n\tconst onChangeSection = ( updatedSection ) => {\n\t\thistory.navigate(\n\t\t\taddQueryArgs( path, {\n\t\t\t\tsection: updatedSection,\n\t\t\t} )\n\t\t);\n\t};\n\n\treturn (\n\t\t<StyleBookPreview\n\t\t\tpath={ section }\n\t\t\tonPathChange={ onChangeSection }\n\t\t\tsettings={ siteData.editorSettings }\n\t\t\t// Without userConfig the preview falls back to the static `settings` styles and unsaved global styles edits are not shown.\n\t\t\tuserConfig={ userConfig }\n\t\t/>\n\t);\n}\n\nfunction StylesPreviewArea( { siteData } ) {\n\tconst { query } = useLocation();\n\n\tif ( query.preview === 'stylebook' ) {\n\t\treturn <StyleBookPreviewArea siteData={ siteData } />;\n\t}\n\n\treturn <Editor />;\n}\n\nexport const stylesRoute = {\n\tname: 'styles',\n\tpath: '/styles',\n\tareas: {\n\t\tcontent: <SidebarGlobalStyles />,\n\t\tsidebar: <SidebarNavigationScreenGlobalStyles backPath=\"/\" />,\n\t\tpreview: ( { siteData } ) => (\n\t\t\t<StylesPreviewArea siteData={ siteData } />\n\t\t),\n\t\tmobileContent: <SidebarGlobalStyles />,\n\t},\n\twidths: {\n\t\tcontent: 380,\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,eAAe,yBAAyB;AACjD,SAAS,eAAe,yBAAyB;AACjD,SAAS,oBAAoB;AAK7B,OAAO,YAAY;AACnB,SAAS,cAAc;AACvB,OAAO,yCAAyC;AAChD,OAAO,yBAAyB;AAqB9B;AAnBF,IAAM,EAAE,aAAa,WAAW,IAAI,OAAQ,iBAAkB;AAC9D,IAAM,EAAE,kBAAkB,gBAAgB,IAAI,OAAQ,iBAAkB;AAExE,SAAS,qBAAsB,EAAE,SAAS,GAAI;AAC7C,QAAM,EAAE,MAAM,MAAM,IAAI,YAAY;AACpC,QAAM,UAAU,WAAW;AAC3B,QAAM,EAAE,MAAM,WAAW,IAAI,gBAAgB;AAG7C,QAAM,UAAU,MAAM,WAAW;AACjC,QAAM,kBAAkB,CAAE,mBAAoB;AAC7C,YAAQ;AAAA,MACP,aAAc,MAAM;AAAA,QACnB,SAAS;AAAA,MACV,CAAE;AAAA,IACH;AAAA,EACD;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,MAAO;AAAA,MACP,cAAe;AAAA,MACf,UAAW,SAAS;AAAA,MAEpB;AAAA;AAAA,EACD;AAEF;AAEA,SAAS,kBAAmB,EAAE,SAAS,GAAI;AAC1C,QAAM,EAAE,MAAM,IAAI,YAAY;AAE9B,MAAK,MAAM,YAAY,aAAc;AACpC,WAAO,oBAAC,wBAAqB,UAAsB;AAAA,EACpD;AAEA,SAAO,oBAAC,UAAO;AAChB;AAEO,IAAM,cAAc;AAAA,EAC1B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,SAAS,oBAAC,uBAAoB;AAAA,IAC9B,SAAS,oBAAC,uCAAoC,UAAS,KAAI;AAAA,IAC3D,SAAS,CAAE,EAAE,SAAS,MACrB,oBAAC,qBAAkB,UAAsB;AAAA,IAE1C,eAAe,oBAAC,uBAAoB;AAAA,EACrC;AAAA,EACA,QAAQ;AAAA,IACP,SAAS;AAAA,EACV;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -238,6 +238,10 @@
|
|
|
238
238
|
transition: padding ease-out 0.1s;
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
|
+
.dataviews__search {
|
|
242
|
+
flex-grow: 1;
|
|
243
|
+
}
|
|
244
|
+
|
|
241
245
|
.dataviews-no-results,
|
|
242
246
|
.dataviews-loading {
|
|
243
247
|
padding: 0 var(--wpds-dimension-padding-2xl, 24px);
|
|
@@ -562,6 +566,7 @@
|
|
|
562
566
|
font-weight: var(--wpds-typography-font-weight-default, 400);
|
|
563
567
|
font-size: 13px;
|
|
564
568
|
line-height: 20px;
|
|
569
|
+
color: var(--wpds-color-foreground-interactive-neutral, #1e1e1e);
|
|
565
570
|
}
|
|
566
571
|
|
|
567
572
|
.dataviews-filters__search-widget-listitem:last-child {
|
|
@@ -570,6 +575,7 @@
|
|
|
570
575
|
|
|
571
576
|
.dataviews-filters__search-widget-listitem:hover, .dataviews-filters__search-widget-listitem[data-active-item], .dataviews-filters__search-widget-listitem:focus {
|
|
572
577
|
background-color: var(--wpds-color-background-interactive-brand-weak-active, color-mix(in oklch, var(--wp-admin-theme-color, #3858e9) 12%, white));
|
|
578
|
+
color: var(--wpds-color-foreground-interactive-neutral-active, #1e1e1e);
|
|
573
579
|
}
|
|
574
580
|
|
|
575
581
|
.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-single-selection, .dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-single-selection, .dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-single-selection {
|
|
@@ -592,6 +598,10 @@
|
|
|
592
598
|
background: var(--wpds-color-background-interactive-brand-strong-active, color-mix(in oklch, var(--wp-admin-theme-color, #3858e9) 93%, black));
|
|
593
599
|
}
|
|
594
600
|
|
|
601
|
+
.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-description, .dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-description, .dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-description {
|
|
602
|
+
color: var(--wpds-color-foreground-interactive-neutral-weak-active, #1e1e1e);
|
|
603
|
+
}
|
|
604
|
+
|
|
595
605
|
.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-value {
|
|
596
606
|
overflow: hidden;
|
|
597
607
|
text-overflow: ellipsis;
|
|
@@ -605,7 +615,7 @@
|
|
|
605
615
|
text-overflow: ellipsis;
|
|
606
616
|
font-size: var(--wpds-typography-font-size-sm, 12px);
|
|
607
617
|
line-height: 16px;
|
|
608
|
-
color: var(--wpds-color-foreground-
|
|
618
|
+
color: var(--wpds-color-foreground-interactive-neutral-weak, #707070);
|
|
609
619
|
}
|
|
610
620
|
|
|
611
621
|
.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection {
|
|
@@ -944,8 +954,7 @@
|
|
|
944
954
|
}
|
|
945
955
|
|
|
946
956
|
.dataviews-search {
|
|
947
|
-
|
|
948
|
-
width: fit-content;
|
|
957
|
+
flex-basis: 210px;
|
|
949
958
|
}
|
|
950
959
|
|
|
951
960
|
.dataviews-filters__user-input-widget {
|
|
@@ -1718,7 +1727,7 @@ div.dataviews-view-list {
|
|
|
1718
1727
|
font-size: var(--wpds-typography-font-size-lg, 15px);
|
|
1719
1728
|
font-weight: var(--wpds-typography-font-weight-emphasis, 600);
|
|
1720
1729
|
color: var(--wpds-color-foreground-content-neutral, #1e1e1e);
|
|
1721
|
-
margin: 0 0 var(--wpds-dimension-gap-
|
|
1730
|
+
margin: 0 0 var(--wpds-dimension-gap-lg, 16px) 0;
|
|
1722
1731
|
padding: 0 var(--wpds-dimension-padding-2xl, 24px);
|
|
1723
1732
|
}
|
|
1724
1733
|
|
|
@@ -3688,11 +3697,15 @@ fieldset.fields__media-edit .fields__media-edit-expanded:not(.is-empty) .fields_
|
|
|
3688
3697
|
}
|
|
3689
3698
|
|
|
3690
3699
|
@media (min-width: 600px) {
|
|
3691
|
-
.font-library__page-selection .
|
|
3700
|
+
.font-library__page-selection .components-select-control__input {
|
|
3692
3701
|
font-size: 11px !important;
|
|
3693
3702
|
font-weight: var(--wpds-typography-font-weight-emphasis, 600);
|
|
3694
3703
|
}
|
|
3695
3704
|
}
|
|
3705
|
+
.font-library__search {
|
|
3706
|
+
width: 240px;
|
|
3707
|
+
}
|
|
3708
|
+
|
|
3696
3709
|
.font-library__fonts-title {
|
|
3697
3710
|
text-transform: uppercase;
|
|
3698
3711
|
font-size: 11px;
|
|
@@ -4461,6 +4474,7 @@ button.font-library__upload-area {
|
|
|
4461
4474
|
}
|
|
4462
4475
|
|
|
4463
4476
|
.edit-site-canvas-loader {
|
|
4477
|
+
--wp-components-color-foreground: var(--color);
|
|
4464
4478
|
width: 100%;
|
|
4465
4479
|
height: 100%;
|
|
4466
4480
|
display: flex;
|
|
@@ -4477,9 +4491,6 @@ button.font-library__upload-area {
|
|
|
4477
4491
|
animation-fill-mode: forwards;
|
|
4478
4492
|
}
|
|
4479
4493
|
}
|
|
4480
|
-
.edit-site-canvas-loader > div {
|
|
4481
|
-
width: 160px;
|
|
4482
|
-
}
|
|
4483
4494
|
|
|
4484
4495
|
@keyframes edit-site-canvas-loader__fade-in-animation {
|
|
4485
4496
|
from {
|
package/build-style/style.css
CHANGED
|
@@ -238,6 +238,10 @@
|
|
|
238
238
|
transition: padding ease-out 0.1s;
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
|
+
.dataviews__search {
|
|
242
|
+
flex-grow: 1;
|
|
243
|
+
}
|
|
244
|
+
|
|
241
245
|
.dataviews-no-results,
|
|
242
246
|
.dataviews-loading {
|
|
243
247
|
padding: 0 var(--wpds-dimension-padding-2xl, 24px);
|
|
@@ -562,6 +566,7 @@
|
|
|
562
566
|
font-weight: var(--wpds-typography-font-weight-default, 400);
|
|
563
567
|
font-size: 13px;
|
|
564
568
|
line-height: 20px;
|
|
569
|
+
color: var(--wpds-color-foreground-interactive-neutral, #1e1e1e);
|
|
565
570
|
}
|
|
566
571
|
|
|
567
572
|
.dataviews-filters__search-widget-listitem:last-child {
|
|
@@ -570,6 +575,7 @@
|
|
|
570
575
|
|
|
571
576
|
.dataviews-filters__search-widget-listitem:hover, .dataviews-filters__search-widget-listitem[data-active-item], .dataviews-filters__search-widget-listitem:focus {
|
|
572
577
|
background-color: var(--wpds-color-background-interactive-brand-weak-active, color-mix(in oklch, var(--wp-admin-theme-color, #3858e9) 12%, white));
|
|
578
|
+
color: var(--wpds-color-foreground-interactive-neutral-active, #1e1e1e);
|
|
573
579
|
}
|
|
574
580
|
|
|
575
581
|
.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-single-selection, .dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-single-selection, .dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-single-selection {
|
|
@@ -592,6 +598,10 @@
|
|
|
592
598
|
background: var(--wpds-color-background-interactive-brand-strong-active, color-mix(in oklch, var(--wp-admin-theme-color, #3858e9) 93%, black));
|
|
593
599
|
}
|
|
594
600
|
|
|
601
|
+
.dataviews-filters__search-widget-listitem:hover .dataviews-filters__search-widget-listitem-description, .dataviews-filters__search-widget-listitem[data-active-item] .dataviews-filters__search-widget-listitem-description, .dataviews-filters__search-widget-listitem:focus .dataviews-filters__search-widget-listitem-description {
|
|
602
|
+
color: var(--wpds-color-foreground-interactive-neutral-weak-active, #1e1e1e);
|
|
603
|
+
}
|
|
604
|
+
|
|
595
605
|
.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-value {
|
|
596
606
|
overflow: hidden;
|
|
597
607
|
text-overflow: ellipsis;
|
|
@@ -605,7 +615,7 @@
|
|
|
605
615
|
text-overflow: ellipsis;
|
|
606
616
|
font-size: var(--wpds-typography-font-size-sm, 12px);
|
|
607
617
|
line-height: 16px;
|
|
608
|
-
color: var(--wpds-color-foreground-
|
|
618
|
+
color: var(--wpds-color-foreground-interactive-neutral-weak, #707070);
|
|
609
619
|
}
|
|
610
620
|
|
|
611
621
|
.dataviews-filters__search-widget-listitem .dataviews-filters__search-widget-listitem-single-selection {
|
|
@@ -944,8 +954,7 @@
|
|
|
944
954
|
}
|
|
945
955
|
|
|
946
956
|
.dataviews-search {
|
|
947
|
-
|
|
948
|
-
width: fit-content;
|
|
957
|
+
flex-basis: 210px;
|
|
949
958
|
}
|
|
950
959
|
|
|
951
960
|
.dataviews-filters__user-input-widget {
|
|
@@ -1718,7 +1727,7 @@ div.dataviews-view-list {
|
|
|
1718
1727
|
font-size: var(--wpds-typography-font-size-lg, 15px);
|
|
1719
1728
|
font-weight: var(--wpds-typography-font-weight-emphasis, 600);
|
|
1720
1729
|
color: var(--wpds-color-foreground-content-neutral, #1e1e1e);
|
|
1721
|
-
margin: 0 0 var(--wpds-dimension-gap-
|
|
1730
|
+
margin: 0 0 var(--wpds-dimension-gap-lg, 16px) 0;
|
|
1722
1731
|
padding: 0 var(--wpds-dimension-padding-2xl, 24px);
|
|
1723
1732
|
}
|
|
1724
1733
|
|
|
@@ -3688,11 +3697,15 @@ fieldset.fields__media-edit .fields__media-edit-expanded:not(.is-empty) .fields_
|
|
|
3688
3697
|
}
|
|
3689
3698
|
|
|
3690
3699
|
@media (min-width: 600px) {
|
|
3691
|
-
.font-library__page-selection .
|
|
3700
|
+
.font-library__page-selection .components-select-control__input {
|
|
3692
3701
|
font-size: 11px !important;
|
|
3693
3702
|
font-weight: var(--wpds-typography-font-weight-emphasis, 600);
|
|
3694
3703
|
}
|
|
3695
3704
|
}
|
|
3705
|
+
.font-library__search {
|
|
3706
|
+
width: 240px;
|
|
3707
|
+
}
|
|
3708
|
+
|
|
3696
3709
|
.font-library__fonts-title {
|
|
3697
3710
|
text-transform: uppercase;
|
|
3698
3711
|
font-size: 11px;
|
|
@@ -4463,6 +4476,7 @@ button.font-library__upload-area {
|
|
|
4463
4476
|
}
|
|
4464
4477
|
|
|
4465
4478
|
.edit-site-canvas-loader {
|
|
4479
|
+
--wp-components-color-foreground: var(--color);
|
|
4466
4480
|
width: 100%;
|
|
4467
4481
|
height: 100%;
|
|
4468
4482
|
display: flex;
|
|
@@ -4479,9 +4493,6 @@ button.font-library__upload-area {
|
|
|
4479
4493
|
animation-fill-mode: forwards;
|
|
4480
4494
|
}
|
|
4481
4495
|
}
|
|
4482
|
-
.edit-site-canvas-loader > div {
|
|
4483
|
-
width: 160px;
|
|
4484
|
-
}
|
|
4485
4496
|
|
|
4486
4497
|
@keyframes edit-site-canvas-loader__fade-in-animation {
|
|
4487
4498
|
from {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-site",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"description": "Edit Site Page module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -47,57 +47,56 @@
|
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@react-spring/web": "^9.4.5",
|
|
50
|
-
"@wordpress/a11y": "^4.
|
|
51
|
-
"@wordpress/admin-ui": "^2.
|
|
52
|
-
"@wordpress/api-fetch": "^7.
|
|
53
|
-
"@wordpress/base-styles": "^
|
|
54
|
-
"@wordpress/blob": "^4.
|
|
55
|
-
"@wordpress/block-editor": "^16.
|
|
56
|
-
"@wordpress/block-library": "^10.
|
|
57
|
-
"@wordpress/blocks": "^15.
|
|
58
|
-
"@wordpress/commands": "^1.
|
|
59
|
-
"@wordpress/components": "^
|
|
60
|
-
"@wordpress/compose": "^8.
|
|
61
|
-
"@wordpress/core-data": "^7.
|
|
62
|
-
"@wordpress/data": "^10.
|
|
63
|
-
"@wordpress/dataviews": "^17.
|
|
64
|
-
"@wordpress/date": "^5.
|
|
65
|
-
"@wordpress/deprecated": "^4.
|
|
66
|
-
"@wordpress/dom": "^4.
|
|
67
|
-
"@wordpress/editor": "^14.
|
|
68
|
-
"@wordpress/element": "^8.
|
|
69
|
-
"@wordpress/escape-html": "^3.
|
|
70
|
-
"@wordpress/fields": "^0.
|
|
71
|
-
"@wordpress/global-styles-engine": "^1.
|
|
72
|
-
"@wordpress/global-styles-ui": "^1.
|
|
73
|
-
"@wordpress/hooks": "^4.
|
|
74
|
-
"@wordpress/html-entities": "^4.
|
|
75
|
-
"@wordpress/i18n": "^6.
|
|
76
|
-
"@wordpress/icons": "^15.
|
|
77
|
-
"@wordpress/keyboard-shortcuts": "^5.
|
|
78
|
-
"@wordpress/keycodes": "^4.
|
|
79
|
-
"@wordpress/media-utils": "^5.
|
|
80
|
-
"@wordpress/notices": "^5.
|
|
81
|
-
"@wordpress/patterns": "^2.
|
|
82
|
-
"@wordpress/plugins": "^7.
|
|
83
|
-
"@wordpress/preferences": "^4.
|
|
84
|
-
"@wordpress/primitives": "^4.
|
|
85
|
-
"@wordpress/private-apis": "^1.
|
|
86
|
-
"@wordpress/reusable-blocks": "^5.
|
|
87
|
-
"@wordpress/router": "^1.
|
|
88
|
-
"@wordpress/style-engine": "^2.
|
|
89
|
-
"@wordpress/theme": "^1.
|
|
90
|
-
"@wordpress/ui": "^0.
|
|
91
|
-
"@wordpress/url": "^4.
|
|
92
|
-
"@wordpress/viewport": "^6.
|
|
93
|
-
"@wordpress/views": "^1.
|
|
94
|
-
"@wordpress/widgets": "^4.
|
|
95
|
-
"@wordpress/wordcount": "^4.
|
|
50
|
+
"@wordpress/a11y": "^4.52.0",
|
|
51
|
+
"@wordpress/admin-ui": "^2.7.0",
|
|
52
|
+
"@wordpress/api-fetch": "^7.52.0",
|
|
53
|
+
"@wordpress/base-styles": "^12.0.0",
|
|
54
|
+
"@wordpress/blob": "^4.52.0",
|
|
55
|
+
"@wordpress/block-editor": "^16.1.0",
|
|
56
|
+
"@wordpress/block-library": "^10.3.0",
|
|
57
|
+
"@wordpress/blocks": "^15.25.0",
|
|
58
|
+
"@wordpress/commands": "^1.52.0",
|
|
59
|
+
"@wordpress/components": "^38.0.0",
|
|
60
|
+
"@wordpress/compose": "^8.5.0",
|
|
61
|
+
"@wordpress/core-data": "^7.52.0",
|
|
62
|
+
"@wordpress/data": "^10.52.0",
|
|
63
|
+
"@wordpress/dataviews": "^17.3.0",
|
|
64
|
+
"@wordpress/date": "^5.52.0",
|
|
65
|
+
"@wordpress/deprecated": "^4.52.0",
|
|
66
|
+
"@wordpress/dom": "^4.52.0",
|
|
67
|
+
"@wordpress/editor": "^14.52.0",
|
|
68
|
+
"@wordpress/element": "^8.4.0",
|
|
69
|
+
"@wordpress/escape-html": "^3.52.0",
|
|
70
|
+
"@wordpress/fields": "^0.44.0",
|
|
71
|
+
"@wordpress/global-styles-engine": "^1.19.0",
|
|
72
|
+
"@wordpress/global-styles-ui": "^1.19.0",
|
|
73
|
+
"@wordpress/hooks": "^4.52.0",
|
|
74
|
+
"@wordpress/html-entities": "^4.52.0",
|
|
75
|
+
"@wordpress/i18n": "^6.25.0",
|
|
76
|
+
"@wordpress/icons": "^15.3.0",
|
|
77
|
+
"@wordpress/keyboard-shortcuts": "^5.52.0",
|
|
78
|
+
"@wordpress/keycodes": "^4.52.0",
|
|
79
|
+
"@wordpress/media-utils": "^5.52.0",
|
|
80
|
+
"@wordpress/notices": "^5.52.0",
|
|
81
|
+
"@wordpress/patterns": "^2.52.0",
|
|
82
|
+
"@wordpress/plugins": "^7.52.0",
|
|
83
|
+
"@wordpress/preferences": "^4.52.0",
|
|
84
|
+
"@wordpress/primitives": "^4.52.0",
|
|
85
|
+
"@wordpress/private-apis": "^1.52.0",
|
|
86
|
+
"@wordpress/reusable-blocks": "^5.52.0",
|
|
87
|
+
"@wordpress/router": "^1.52.0",
|
|
88
|
+
"@wordpress/style-engine": "^2.52.0",
|
|
89
|
+
"@wordpress/theme": "^1.1.0",
|
|
90
|
+
"@wordpress/ui": "^0.19.0",
|
|
91
|
+
"@wordpress/url": "^4.52.0",
|
|
92
|
+
"@wordpress/viewport": "^6.52.0",
|
|
93
|
+
"@wordpress/views": "^1.19.0",
|
|
94
|
+
"@wordpress/widgets": "^4.52.0",
|
|
95
|
+
"@wordpress/wordcount": "^4.52.0",
|
|
96
96
|
"change-case": "^4.1.2",
|
|
97
97
|
"clsx": "^2.1.1",
|
|
98
98
|
"colord": "^2.9.3",
|
|
99
99
|
"fast-deep-equal": "^3.1.3",
|
|
100
|
-
"memize": "^2.1.0",
|
|
101
100
|
"react-autosize-textarea": "^7.1.0"
|
|
102
101
|
},
|
|
103
102
|
"peerDependencies": {
|
|
@@ -107,5 +106,5 @@
|
|
|
107
106
|
"publishConfig": {
|
|
108
107
|
"access": "public"
|
|
109
108
|
},
|
|
110
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "7e8b17a983f9391d3ebc7717af2a1c9ed7efc7ab"
|
|
111
110
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
privateApis as componentsPrivateApis,
|
|
6
|
-
ProgressBar,
|
|
7
|
-
} from '@wordpress/components';
|
|
4
|
+
import { ProgressBar } from '@wordpress/components';
|
|
8
5
|
import { store as coreStore } from '@wordpress/core-data';
|
|
9
6
|
import { useSelect } from '@wordpress/data';
|
|
10
7
|
import { privateApis as editorPrivateApis } from '@wordpress/editor';
|
|
@@ -14,12 +11,10 @@ import { privateApis as editorPrivateApis } from '@wordpress/editor';
|
|
|
14
11
|
*/
|
|
15
12
|
import { unlock } from '../../lock-unlock';
|
|
16
13
|
|
|
17
|
-
const { Theme } = unlock( componentsPrivateApis );
|
|
18
14
|
const { useStyle } = unlock( editorPrivateApis );
|
|
19
15
|
|
|
20
16
|
export default function CanvasLoader( { id } ) {
|
|
21
17
|
const textColor = useStyle( 'color.text' );
|
|
22
|
-
const backgroundColor = useStyle( 'color.background' );
|
|
23
18
|
const { elapsed, total } = useSelect( ( select ) => {
|
|
24
19
|
const selectorsByStatus = select( coreStore ).countSelectorsByStatus();
|
|
25
20
|
const resolving = selectorsByStatus.resolving ?? 0;
|
|
@@ -31,10 +26,11 @@ export default function CanvasLoader( { id } ) {
|
|
|
31
26
|
}, [] );
|
|
32
27
|
|
|
33
28
|
return (
|
|
34
|
-
<div
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
<div
|
|
30
|
+
className="edit-site-canvas-loader"
|
|
31
|
+
style={ textColor ? { '--color': textColor } : undefined }
|
|
32
|
+
>
|
|
33
|
+
<ProgressBar id={ id } max={ total } value={ elapsed } />
|
|
38
34
|
</div>
|
|
39
35
|
);
|
|
40
36
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
.edit-site-canvas-loader {
|
|
2
|
+
// TODO: Use design tokens with ThemeProvider.
|
|
3
|
+
--wp-components-color-foreground: var(--color);
|
|
4
|
+
|
|
2
5
|
width: 100%;
|
|
3
6
|
height: 100%;
|
|
4
7
|
display: flex;
|
|
@@ -13,10 +16,6 @@
|
|
|
13
16
|
animation: 0.5s ease 0.2s edit-site-canvas-loader__fade-in-animation;
|
|
14
17
|
animation-fill-mode: forwards;
|
|
15
18
|
}
|
|
16
|
-
|
|
17
|
-
& > div {
|
|
18
|
-
width: 160px;
|
|
19
|
-
}
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
@keyframes edit-site-canvas-loader__fade-in-animation {
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { _x, sprintf } from '@wordpress/i18n';
|
|
5
5
|
import { useSelect } from '@wordpress/data';
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
store as coreStore,
|
|
8
|
+
privateApis as coreDataPrivateApis,
|
|
9
|
+
} from '@wordpress/core-data';
|
|
7
10
|
import { decodeEntities } from '@wordpress/html-entities';
|
|
8
|
-
import { privateApis as editorPrivateApis } from '@wordpress/editor';
|
|
9
11
|
|
|
10
12
|
/**
|
|
11
13
|
* Internal dependencies
|
|
@@ -14,7 +16,7 @@ import useTitle from '../routes/use-title';
|
|
|
14
16
|
import { POST_TYPE_LABELS, TEMPLATE_POST_TYPE } from '../../utils/constants';
|
|
15
17
|
import { unlock } from '../../lock-unlock';
|
|
16
18
|
|
|
17
|
-
const { getTemplateInfo } = unlock(
|
|
19
|
+
const { getTemplateInfo } = unlock( coreDataPrivateApis );
|
|
18
20
|
|
|
19
21
|
function useEditorTitle( postType, postId ) {
|
|
20
22
|
const { title, isLoaded } = useSelect(
|