@wordpress/edit-site 4.4.0 → 4.5.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/block-editor/index.js +1 -1
- package/build/components/block-editor/index.js.map +1 -1
- package/build/components/global-styles/context-menu.js +3 -3
- package/build/components/global-styles/context-menu.js.map +1 -1
- package/build/components/global-styles/header.js +15 -11
- package/build/components/global-styles/header.js.map +1 -1
- package/build/components/global-styles/navigation-button.js +4 -4
- package/build/components/global-styles/navigation-button.js.map +1 -1
- package/build/components/global-styles/palette.js +1 -1
- package/build/components/global-styles/palette.js.map +1 -1
- package/build/components/global-styles/screen-block-list.js +1 -1
- package/build/components/global-styles/screen-block-list.js.map +1 -1
- package/build/components/global-styles/screen-colors.js +3 -3
- package/build/components/global-styles/screen-colors.js.map +1 -1
- package/build/components/global-styles/screen-root.js +13 -3
- package/build/components/global-styles/screen-root.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +1 -1
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +1 -5
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/index.js +1 -1
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar/navigation-menu-sidebar/navigation-menu.js +1 -5
- package/build/components/sidebar/navigation-menu-sidebar/navigation-menu.js.map +1 -1
- package/build/index.js +0 -1
- package/build/index.js.map +1 -1
- package/build-module/components/block-editor/index.js +2 -2
- package/build-module/components/block-editor/index.js.map +1 -1
- package/build-module/components/global-styles/context-menu.js +4 -4
- package/build-module/components/global-styles/context-menu.js.map +1 -1
- package/build-module/components/global-styles/header.js +16 -11
- package/build-module/components/global-styles/header.js.map +1 -1
- package/build-module/components/global-styles/navigation-button.js +3 -3
- package/build-module/components/global-styles/navigation-button.js.map +1 -1
- package/build-module/components/global-styles/palette.js +2 -2
- package/build-module/components/global-styles/palette.js.map +1 -1
- package/build-module/components/global-styles/screen-block-list.js +2 -2
- package/build-module/components/global-styles/screen-block-list.js.map +1 -1
- package/build-module/components/global-styles/screen-colors.js +4 -4
- package/build-module/components/global-styles/screen-colors.js.map +1 -1
- package/build-module/components/global-styles/screen-root.js +15 -5
- package/build-module/components/global-styles/screen-root.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js +2 -2
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +1 -5
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/components/sidebar/index.js +3 -3
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar/navigation-menu-sidebar/navigation-menu.js +1 -5
- package/build-module/components/sidebar/navigation-menu-sidebar/navigation-menu.js.map +1 -1
- package/build-module/index.js +0 -1
- package/build-module/index.js.map +1 -1
- package/build-style/style-rtl.css +19 -29
- package/build-style/style.css +19 -29
- package/package.json +29 -29
- package/src/components/block-editor/index.js +2 -2
- package/src/components/global-styles/context-menu.js +7 -7
- package/src/components/global-styles/header.js +20 -17
- package/src/components/global-styles/navigation-button.js +3 -3
- package/src/components/global-styles/palette.js +3 -3
- package/src/components/global-styles/screen-block-list.js +3 -3
- package/src/components/global-styles/screen-colors.js +7 -7
- package/src/components/global-styles/screen-root.js +34 -24
- package/src/components/global-styles/screen-typography.js +3 -3
- package/src/components/header/style.scss +14 -29
- package/src/components/secondary-sidebar/list-view-sidebar.js +1 -5
- package/src/components/sidebar/index.js +2 -2
- package/src/components/sidebar/navigation-menu-sidebar/navigation-menu.js +1 -7
- package/src/components/sidebar/style.scss +6 -0
- package/src/index.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-typography.js"],"names":["__","__experimentalItemGroup","ItemGroup","__experimentalVStack","VStack","__experimentalHStack","HStack","FlexItem","ScreenHeader","
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-typography.js"],"names":["__","__experimentalItemGroup","ItemGroup","__experimentalVStack","VStack","__experimentalHStack","HStack","FlexItem","ScreenHeader","NavigationButtonAsItem","useStyle","Subtitle","TypographyPanel","Item","name","parentMenu","element","label","hasSupport","prefix","extraStyles","textDecoration","fontFamily","fontStyle","fontWeight","letterSpacing","backgroundColor","gradientValue","color","background","ScreenTypography","undefined"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SACCC,uBAAuB,IAAIC,SAD5B,EAECC,oBAAoB,IAAIC,MAFzB,EAGCC,oBAAoB,IAAIC,MAHzB,EAICC,QAJD,QAKO,uBALP;AAOA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,UAAzB;AACA,SAASC,sBAAT,QAAuC,qBAAvC;AACA,SAASC,QAAT,QAAyB,SAAzB;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,eAAP,MAA4B,oBAA5B;;AAEA,SAASC,IAAT,OAAsD;AAAA,MAAvC;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,UAAR;AAAoBC,IAAAA,OAApB;AAA6BC,IAAAA;AAA7B,GAAuC;AACrD,QAAMC,UAAU,GAAG,CAAEJ,IAArB;AACA,QAAMK,MAAM,GACXH,OAAO,KAAK,MAAZ,IAAsB,CAAEA,OAAxB,GAAkC,EAAlC,GAAwC,YAAYA,OAAS,GAD9D;AAEA,QAAMI,WAAW,GAChBJ,OAAO,KAAK,MAAZ,GACG;AACAK,IAAAA,cAAc,EAAE;AADhB,GADH,GAIG,EALJ;AAMA,QAAM,CAAEC,UAAF,IAAiBZ,QAAQ,CAAES,MAAM,GAAG,uBAAX,EAAoCL,IAApC,CAA/B;AACA,QAAM,CAAES,SAAF,IAAgBb,QAAQ,CAAES,MAAM,GAAG,sBAAX,EAAmCL,IAAnC,CAA9B;AACA,QAAM,CAAEU,UAAF,IAAiBd,QAAQ,CAAES,MAAM,GAAG,uBAAX,E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AE,CACf,wDADe;AAFjB,IADD,EAQG,CAAEc,IAAF,IACD;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,cAAC,MAAD;AAAQ,IAAA,OAAO,EAAG;AAAlB,KACC,cAAC,QAAD,QAAYd,EAAE,CAAE,UAAF,CAAd,CADD,EAEC,cAAC,SAAD;AAAW,IAAA,UAAU,MAArB;AAAsB,IAAA,WAAW;AAAjC,KACC,cAAC,IAAD;AACC,IAAA,IAAI,EAAGc,IADR;AAEC,IAAA,UAAU,EAAGC,UAFd;AAGC,IAAA,OAAO,EAAC,MAHT;AAIC,IAAA,KAAK,EAAGf,EAAE,CAAE,MAAF;AAJX,IADD,EAOC,cAAC,IAAD;AACC,IAAA,IAAI,EAAGc,IADR;AAEC,IAAA,UAAU,EAAGC,UAFd;AAGC,IAAA,OAAO,EAAC,MAHT;AAIC,IAAA,KAAK,EAAGf,EAAE,CAAE,OAAF;AAJX,IAPD,CAFD,CADD,CATF,EA8BG,CAAC,CAAEc,IAAH,IAAW,cAAC,eAAD;AAAiB,IAAA,IAAI,EAAGA,IAAxB;AAA+B,IAAA,OAAO,EAAC;AAAvC,IA9Bd,CADD;AAkCA;;AAED,eAAegB,gBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tFlexItem,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { useStyle } from './hooks';\nimport Subtitle from './subtitle';\nimport TypographyPanel from './typography-panel';\n\nfunction Item( { name, parentMenu, element, label } ) {\n\tconst hasSupport = ! name;\n\tconst prefix =\n\t\telement === 'text' || ! element ? '' : `elements.${ element }.`;\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\tconst [ fontFamily ] = useStyle( prefix + 'typography.fontFamily', name );\n\tconst [ fontStyle ] = useStyle( prefix + 'typography.fontStyle', name );\n\tconst [ fontWeight ] = useStyle( prefix + 'typography.fontWeight', name );\n\tconst [ letterSpacing ] = useStyle(\n\t\tprefix + 'typography.letterSpacing',\n\t\tname\n\t);\n\tconst [ backgroundColor ] = useStyle( prefix + 'color.background', name );\n\tconst [ gradientValue ] = useStyle( prefix + 'color.gradient', name );\n\tconst [ color ] = useStyle( prefix + 'color.text', name );\n\n\tif ( ! hasSupport ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<NavigationButtonAsItem path={ parentMenu + '/typography/' + element }>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem\n\t\t\t\t\tclassName=\"edit-site-global-styles-screen-typography__indicator\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\t\t\tbackground: gradientValue ?? backgroundColor,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tfontStyle,\n\t\t\t\t\t\tfontWeight,\n\t\t\t\t\t\tletterSpacing,\n\t\t\t\t\t\t...extraStyles,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Aa' ) }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>{ label }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction ScreenTypography( { name } ) {\n\tconst parentMenu = name === undefined ? '' : '/blocks/' + name;\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Manage the typography settings for different elements.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t{ ! name && (\n\t\t\t\t<div className=\"edit-site-global-styles-screen-typography\">\n\t\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t\t<Subtitle>{ __( 'Elements' ) }</Subtitle>\n\t\t\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\t\tname={ name }\n\t\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\t\telement=\"text\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\t\tname={ name }\n\t\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\t\telement=\"link\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Links' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t</VStack>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ /* No typography elements support yet for blocks. */ }\n\t\t\t{ !! name && <TypographyPanel name={ name } element=\"text\" /> }\n\t\t</>\n\t);\n}\n\nexport default ScreenTypography;\n"]}
|
|
@@ -48,11 +48,7 @@ export default function ListViewSidebar() {
|
|
|
48
48
|
})), createElement("div", {
|
|
49
49
|
className: "edit-site-editor__list-view-panel-content",
|
|
50
50
|
ref: useMergeRefs([contentFocusReturnRef, focusOnMountRef])
|
|
51
|
-
}, createElement(ListView,
|
|
52
|
-
showNestedBlocks: true,
|
|
53
|
-
__experimentalFeatures: true,
|
|
54
|
-
__experimentalPersistentListViewFeatures: true
|
|
55
|
-
})))
|
|
51
|
+
}, createElement(ListView, null)))
|
|
56
52
|
);
|
|
57
53
|
}
|
|
58
54
|
//# sourceMappingURL=list-view-sidebar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/components/secondary-sidebar/list-view-sidebar.js"],"names":["__experimentalListView","ListView","Button","useFocusOnMount","useFocusReturn","useInstanceId","useMergeRefs","useDispatch","__","closeSmall","ESCAPE","store","editSiteStore","ListViewSidebar","setIsListViewOpened","focusOnMountRef","headerFocusReturnRef","contentFocusRetur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KAAK,EAAGD,EAAE,CAAE,yBAAF,CAFX;AAGC,MAAA,OAAO,EAAG,MAAMM,mBAAmB,CAAE,KAAF;AAHpC,MALD,CALD,EAgBC;AACC,MAAA,SAAS,EAAC,2CADX;AAEC,MAAA,GAAG,EAAGR,YAAY,CAAE,CACnBW,qBADmB,EAEnBF,eAFmB,CAAF;AAFnB,OAOC,cAAC,QAAD
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/secondary-sidebar/list-view-sidebar.js"],"names":["__experimentalListView","ListView","Button","useFocusOnMount","useFocusReturn","useInstanceId","useMergeRefs","useDispatch","__","closeSmall","ESCAPE","store","editSiteStore","ListViewSidebar","setIsListViewOpened","focusOnMountRef","headerFocusReturnRef","contentFocusReturnRef","closeOnEscape","event","keyCode","defaultPrevented","instanceId","labelId"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,sBAAsB,IAAIC,QAAnC,QAAmD,yBAAnD;AACA,SAASC,MAAT,QAAuB,uBAAvB;AACA,SACCC,eADD,EAECC,cAFD,EAGCC,aAHD,EAICC,YAJD,QAKO,oBALP;AAMA,SAASC,WAAT,QAA4B,iBAA5B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,UAAT,QAA2B,kBAA3B;AACA,SAASC,MAAT,QAAuB,qBAAvB;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,aAAvC;AAEA,eAAe,SAASC,eAAT,GAA2B;AACzC,QAAM;AAAEC,IAAAA;AAAF,MAA0BP,WAAW,CAAEK,aAAF,CAA3C;AAEA,QAAMG,eAAe,GAAGZ,eAAe,CAAE,cAAF,CAAvC;AACA,QAAMa,oBAAoB,GAAGZ,cAAc,EAA3C;AACA,QAAMa,qBAAqB,GAAGb,cAAc,EAA5C;;AACA,WAASc,aAAT,CAAwBC,KAAxB,EAAgC;AAC/B,QAAKA,KAAK,CAACC,OAAN,KAAkBV,MAAlB,IAA4B,CAAES,KAAK,CAACE,gBAAzC,EAA4D;AAC3DP,MAAAA,mBAAmB,CAAE,KAAF,CAAnB;AACA;AACD;;AAED,QAAMQ,UAAU,GAAGjB,aAAa,CAAEQ,eAAF,CAAhC;AACA,QAAMU,OAAO,GAAI,2CAA2CD,UAAY,EAAxE;AAEA,SACC;AACA;AACC,yBAAkBC,OADnB;AAEC,MAAA,SAAS,EAAC,mCAFX;AAGC,MAAA,SAAS,EAAGL;AAHb,OAKC;AACC,MAAA,SAAS,EAAC,0CADX;AAEC,MAAA,GAAG,EAAGF;AAFP,OAIC;AAAQ,MAAA,EAAE,EAAGO;AAAb,OAAyBf,EAAE,CAAE,WAAF,CAA3B,CAJD,EAKC,cAAC,MAAD;AACC,MAAA,IAAI,EAAGC,UADR;AAEC,MAAA,KAAK,EAAGD,EAAE,CAAE,yBAAF,CAFX;AAGC,MAAA,OAAO,EAAG,MAAMM,mBAAmB,CAAE,KAAF;AAHpC,MALD,CALD,EAgBC;AACC,MAAA,SAAS,EAAC,2CADX;AAEC,MAAA,GAAG,EAAGR,YAAY,CAAE,CACnBW,qBADmB,EAEnBF,eAFmB,CAAF;AAFnB,OAOC,cAAC,QAAD,OAPD,CAhBD;AAFD;AA6BA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalListView as ListView } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport {\n\tuseFocusOnMount,\n\tuseFocusReturn,\n\tuseInstanceId,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\nimport { ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\n\nexport default function ListViewSidebar() {\n\tconst { setIsListViewOpened } = useDispatch( editSiteStore );\n\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\tconst headerFocusReturnRef = useFocusReturn();\n\tconst contentFocusReturnRef = useFocusReturn();\n\tfunction closeOnEscape( event ) {\n\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\tsetIsListViewOpened( false );\n\t\t}\n\t}\n\n\tconst instanceId = useInstanceId( ListViewSidebar );\n\tconst labelId = `edit-site-editor__list-view-panel-label-${ instanceId }`;\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\taria-labelledby={ labelId }\n\t\t\tclassName=\"edit-site-editor__list-view-panel\"\n\t\t\tonKeyDown={ closeOnEscape }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-site-editor__list-view-panel-header\"\n\t\t\t\tref={ headerFocusReturnRef }\n\t\t\t>\n\t\t\t\t<strong id={ labelId }>{ __( 'List View' ) }</strong>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\tlabel={ __( 'Close List View Sidebar' ) }\n\t\t\t\t\tonClick={ () => setIsListViewOpened( false ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-site-editor__list-view-panel-content\"\n\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\tcontentFocusReturnRef,\n\t\t\t\t\tfocusOnMountRef,\n\t\t\t\t] ) }\n\t\t\t>\n\t\t\t\t<ListView />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElement
|
|
1
|
+
import { createElement } from "@wordpress/element";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* WordPress dependencies
|
|
@@ -6,7 +6,7 @@ import { createElement, Fragment } from "@wordpress/element";
|
|
|
6
6
|
import { createSlotFill, PanelBody } from '@wordpress/components';
|
|
7
7
|
import { __ } from '@wordpress/i18n';
|
|
8
8
|
import { cog } from '@wordpress/icons';
|
|
9
|
-
import { useEffect } from '@wordpress/element';
|
|
9
|
+
import { useEffect, Fragment } from '@wordpress/element';
|
|
10
10
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
11
11
|
import { store as interfaceStore } from '@wordpress/interface';
|
|
12
12
|
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
@@ -63,7 +63,7 @@ export function SidebarComplementaryAreaFills() {
|
|
|
63
63
|
// See https://github.com/WordPress/gutenberg/blob/trunk/docs/how-to-guides/feature-flags.md#dead-code-elimination.
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
let MaybeNavigationMenuSidebar =
|
|
66
|
+
let MaybeNavigationMenuSidebar = Fragment;
|
|
67
67
|
|
|
68
68
|
if (process.env.IS_GUTENBERG_PLUGIN) {
|
|
69
69
|
MaybeNavigationMenuSidebar = NavigationMenuSidebar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar/index.js"],"names":["createSlotFill","PanelBody","__","cog","useEffect","useSelect","useDispatch","store","interfaceStore","blockEditorStore","DefaultSidebar","GlobalStylesSidebar","NavigationMenuSidebar","STORE_NAME","SettingsHeader","TemplateCard","SIDEBAR_BLOCK","SIDEBAR_TEMPLATE","Slot","InspectorSlot","Fill","InspectorFill","SidebarInspectorFill","SidebarComplementaryAreaFills","sidebar","isEditorSidebarOpened","hasBlockSelection","select","_sidebar","getActiveComplementaryArea","_isEditorSidebarOpened","includes","getBlockSelectionStart","enableComplementaryArea","sidebarName","MaybeNavigationMenuSidebar","process","env","IS_GUTENBERG_PLUGIN"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,cAAT,EAAyBC,SAAzB,QAA0C,uBAA1C;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,GAAT,QAAoB,kBAApB;AACA,SAASC,SAAT,
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar/index.js"],"names":["createSlotFill","PanelBody","__","cog","useEffect","Fragment","useSelect","useDispatch","store","interfaceStore","blockEditorStore","DefaultSidebar","GlobalStylesSidebar","NavigationMenuSidebar","STORE_NAME","SettingsHeader","TemplateCard","SIDEBAR_BLOCK","SIDEBAR_TEMPLATE","Slot","InspectorSlot","Fill","InspectorFill","SidebarInspectorFill","SidebarComplementaryAreaFills","sidebar","isEditorSidebarOpened","hasBlockSelection","select","_sidebar","getActiveComplementaryArea","_isEditorSidebarOpened","includes","getBlockSelectionStart","enableComplementaryArea","sidebarName","MaybeNavigationMenuSidebar","process","env","IS_GUTENBERG_PLUGIN"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,cAAT,EAAyBC,SAAzB,QAA0C,uBAA1C;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,GAAT,QAAoB,kBAApB;AACA,SAASC,SAAT,EAAoBC,QAApB,QAAoC,oBAApC;AACA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,KAAK,IAAIC,cAAlB,QAAwC,sBAAxC;AACA,SAASD,KAAK,IAAIE,gBAAlB,QAA0C,yBAA1C;AAEA;AACA;AACA;;AACA,OAAOC,cAAP,MAA2B,mBAA3B;AACA,OAAOC,mBAAP,MAAgC,yBAAhC;AACA,OAAOC,qBAAP,MAAkC,2BAAlC;AACA,SAASC,UAAT,QAA2B,uBAA3B;AACA,OAAOC,cAAP,MAA2B,mBAA3B;AACA,OAAOC,YAAP,MAAyB,iBAAzB;AACA,SAASC,aAAT,EAAwBC,gBAAxB,QAAgD,aAAhD;AAEA,MAAM;AAAEC,EAAAA,IAAI,EAAEC,aAAR;AAAuBC,EAAAA,IAAI,EAAEC;AAA7B,IAA+CtB,cAAc,CAClE,0BADkE,CAAnE;AAGA,OAAO,MAAMuB,oBAAoB,GAAGD,aAA7B;AAEP,OAAO,SAASE,6BAAT,GAAyC;AAC/C,QAAM;AAAEC,IAAAA,OAAF;AAAWC,IAAAA,qBAAX;AAAkCC,IAAAA;AAAlC,MAAwDrB,SAAS,CACpEsB,MAAF,IAAc;AACb,UAAMC,QAAQ,GAAGD,MAAM,CACtBnB,cADsB,CAAN,CAEfqB,0BAFe,CAEahB,UAFb,CA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AAAgB,MAAA,WAAW,EAAGiC;AAA9B,MALV;AAMC,IAAA,eAAe,EAAC;AANjB,KAQGA,WAAW,KAAKjB,gBAAhB,IACD,cAAC,SAAD,QACC,cAAC,YAAD,OADD,CATF,EAaGiB,WAAW,KAAKlB,aAAhB,IACD,cAAC,aAAD;AAAe,IAAA,gBAAgB;AAA/B,IAdF,CADD,EAkBC,cAAC,mBAAD,OAlBD,EAmBC,cAAC,0BAAD,OAnBD,CADD;AAuBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { cog } from '@wordpress/icons';\nimport { useEffect, Fragment } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport DefaultSidebar from './default-sidebar';\nimport GlobalStylesSidebar from './global-styles-sidebar';\nimport NavigationMenuSidebar from './navigation-menu-sidebar';\nimport { STORE_NAME } from '../../store/constants';\nimport SettingsHeader from './settings-header';\nimport TemplateCard from './template-card';\nimport { SIDEBAR_BLOCK, SIDEBAR_TEMPLATE } from './constants';\n\nconst { Slot: InspectorSlot, Fill: InspectorFill } = createSlotFill(\n\t'EditSiteSidebarInspector'\n);\nexport const SidebarInspectorFill = InspectorFill;\n\nexport function SidebarComplementaryAreaFills() {\n\tconst { sidebar, isEditorSidebarOpened, hasBlockSelection } = useSelect(\n\t\t( select ) => {\n\t\t\tconst _sidebar = select(\n\t\t\t\tinterfaceStore\n\t\t\t).getActiveComplementaryArea( STORE_NAME );\n\t\t\tconst _isEditorSidebarOpened = [\n\t\t\t\tSIDEBAR_BLOCK,\n\t\t\t\tSIDEBAR_TEMPLATE,\n\t\t\t].includes( _sidebar );\n\t\t\treturn {\n\t\t\t\tsidebar: _sidebar,\n\t\t\t\tisEditorSidebarOpened: _isEditorSidebarOpened,\n\t\t\t\thasBlockSelection: !! select(\n\t\t\t\t\tblockEditorStore\n\t\t\t\t).getBlockSelectionStart(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\tuseEffect( () => {\n\t\tif ( ! isEditorSidebarOpened ) return;\n\t\tif ( hasBlockSelection ) {\n\t\t\tenableComplementaryArea( STORE_NAME, SIDEBAR_BLOCK );\n\t\t} else {\n\t\t\tenableComplementaryArea( STORE_NAME, SIDEBAR_TEMPLATE );\n\t\t}\n\t}, [ hasBlockSelection, isEditorSidebarOpened ] );\n\tlet sidebarName = sidebar;\n\tif ( ! isEditorSidebarOpened ) {\n\t\tsidebarName = hasBlockSelection ? SIDEBAR_BLOCK : SIDEBAR_TEMPLATE;\n\t}\n\n\t// Conditionally include NavMenu sidebar in Plugin only.\n\t// Optimise for dead code elimination.\n\t// See https://github.com/WordPress/gutenberg/blob/trunk/docs/how-to-guides/feature-flags.md#dead-code-elimination.\n\tlet MaybeNavigationMenuSidebar = Fragment;\n\n\tif ( process.env.IS_GUTENBERG_PLUGIN ) {\n\t\tMaybeNavigationMenuSidebar = NavigationMenuSidebar;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<DefaultSidebar\n\t\t\t\tidentifier={ sidebarName }\n\t\t\t\ttitle={ __( 'Settings' ) }\n\t\t\t\ticon={ cog }\n\t\t\t\tcloseLabel={ __( 'Close settings sidebar' ) }\n\t\t\t\theader={ <SettingsHeader sidebarName={ sidebarName } /> }\n\t\t\t\theaderClassName=\"edit-site-sidebar__panel-tabs\"\n\t\t\t>\n\t\t\t\t{ sidebarName === SIDEBAR_TEMPLATE && (\n\t\t\t\t\t<PanelBody>\n\t\t\t\t\t\t<TemplateCard />\n\t\t\t\t\t</PanelBody>\n\t\t\t\t) }\n\t\t\t\t{ sidebarName === SIDEBAR_BLOCK && (\n\t\t\t\t\t<InspectorSlot bubblesVirtually />\n\t\t\t\t) }\n\t\t\t</DefaultSidebar>\n\t\t\t<GlobalStylesSidebar />\n\t\t\t<MaybeNavigationMenuSidebar />\n\t\t</>\n\t);\n}\n"]}
|
|
@@ -35,11 +35,7 @@ export default function NavigationMenu(_ref) {
|
|
|
35
35
|
});
|
|
36
36
|
}, [updateBlockListSettings, innerBlocks]);
|
|
37
37
|
return createElement(Fragment, null, createElement(ListView, {
|
|
38
|
-
id: id
|
|
39
|
-
showNestedBlocks: true,
|
|
40
|
-
expandNested: false,
|
|
41
|
-
__experimentalFeatures: true,
|
|
42
|
-
__experimentalPersistentListViewFeatures: true
|
|
38
|
+
id: id
|
|
43
39
|
}));
|
|
44
40
|
}
|
|
45
41
|
//# sourceMappingURL=navigation-menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar/navigation-menu-sidebar/navigation-menu.js"],"names":["__experimentalListView","ListView","store","blockEditorStore","useEffect","useDispatch","ALLOWED_BLOCKS","NavigationMenu","innerBlocks","id","updateBlockListSettings","allowedBlocks","forEach","block","name","clientId"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,sBAAsB,IAAIC,QAD3B,EAECC,KAAK,IAAIC,gBAFV,QAGO,yBAHP;AAIA,SAASC,SAAT,QAA0B,oBAA1B;AACA,SAASC,WAAT,QAA4B,iBAA5B;AAEA,MAAMC,cAAc,GAAG;AACtB,qBAAmB,CAClB,sBADkB,EAElB,aAFkB,EAGlB,mBAHkB,EAIlB,gBAJkB,EAKlB,aALkB,EAMlB,gBANkB,EAOlB,iBAPkB,EAQlB,gBARkB,EASlB,yBATkB,CADG;AAYtB,uBAAqB,CAAE,kBAAF,CAZC;AAatB,6BAA2B,CAC1B,sBAD0B,EAE1B,yBAF0B,CAbL;AAiBtB,0BAAwB,CACvB,sBADuB,EAEvB,yBAFuB;AAjBF,CAAvB;AAuBA,eAAe,SAASC,cAAT,OAA+C;AAAA,MAAtB;AAAEC,IAAAA,WAAF;AAAeC,IAAAA;AAAf,GAAsB;AAC7D,QAAM;AAAEC,IAAAA;AAAF,MAA8BL,WAAW,CAAEF,gBAAF,CAA/C,CAD6D,CAG7D;AACA;;AACAC,EAAAA,SAAS,CAAE,MAAM;AAChBM,IAAAA,uBAAuB,CAAE,EAAF,EAAM;AAC5BC,MAAAA,aAAa,EAAEL,cAAc,CAAE,iBAAF;AADD,KAAN,CAAvB;AAGAE,IAAAA,WAAW,CAACI,OAAZ,CAAuBC,KAAF,IAAa;AACjC,UAAKP,cAAc,CAAEO,KAAK,CAACC,IAAR,CAAnB,EAAoC;AACnCJ,QAAAA,uBAAuB,CAAEG,KAAK,CAACE,QAAR,EAAkB;AACxCJ,UAAAA,aAAa,EAAEL,cAAc,CAAEO,KAAK,CAACC,IAAR;AADW,SAAlB,CAAvB;AAGA;AACD,KAND;AAOA,GAXQ,EAWN,CAAEJ,uBAAF,EAA2BF,WAA3B,CAXM,CAAT;AAYA,SACC,8BACC,cAAC,QAAD;
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar/navigation-menu-sidebar/navigation-menu.js"],"names":["__experimentalListView","ListView","store","blockEditorStore","useEffect","useDispatch","ALLOWED_BLOCKS","NavigationMenu","innerBlocks","id","updateBlockListSettings","allowedBlocks","forEach","block","name","clientId"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,sBAAsB,IAAIC,QAD3B,EAECC,KAAK,IAAIC,gBAFV,QAGO,yBAHP;AAIA,SAASC,SAAT,QAA0B,oBAA1B;AACA,SAASC,WAAT,QAA4B,iBAA5B;AAEA,MAAMC,cAAc,GAAG;AACtB,qBAAmB,CAClB,sBADkB,EAElB,aAFkB,EAGlB,mBAHkB,EAIlB,gBAJkB,EAKlB,aALkB,EAMlB,gBANkB,EAOlB,iBAPkB,EAQlB,gBARkB,EASlB,yBATkB,CADG;AAYtB,uBAAqB,CAAE,kBAAF,CAZC;AAatB,6BAA2B,CAC1B,sBAD0B,EAE1B,yBAF0B,CAbL;AAiBtB,0BAAwB,CACvB,sBADuB,EAEvB,yBAFuB;AAjBF,CAAvB;AAuBA,eAAe,SAASC,cAAT,OAA+C;AAAA,MAAtB;AAAEC,IAAAA,WAAF;AAAeC,IAAAA;AAAf,GAAsB;AAC7D,QAAM;AAAEC,IAAAA;AAAF,MAA8BL,WAAW,CAAEF,gBAAF,CAA/C,CAD6D,CAG7D;AACA;;AACAC,EAAAA,SAAS,CAAE,MAAM;AAChBM,IAAAA,uBAAuB,CAAE,EAAF,EAAM;AAC5BC,MAAAA,aAAa,EAAEL,cAAc,CAAE,iBAAF;AADD,KAAN,CAAvB;AAGAE,IAAAA,WAAW,CAACI,OAAZ,CAAuBC,KAAF,IAAa;AACjC,UAAKP,cAAc,CAAEO,KAAK,CAACC,IAAR,CAAnB,EAAoC;AACnCJ,QAAAA,uBAAuB,CAAEG,KAAK,CAACE,QAAR,EAAkB;AACxCJ,UAAAA,aAAa,EAAEL,cAAc,CAAEO,KAAK,CAACC,IAAR;AADW,SAAlB,CAAvB;AAGA;AACD,KAND;AAOA,GAXQ,EAWN,CAAEJ,uBAAF,EAA2BF,WAA3B,CAXM,CAAT;AAYA,SACC,8BACC,cAAC,QAAD;AAAU,IAAA,EAAE,EAAGC;AAAf,IADD,CADD;AAKA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalListView as ListView,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\n\nconst ALLOWED_BLOCKS = {\n\t'core/navigation': [\n\t\t'core/navigation-link',\n\t\t'core/search',\n\t\t'core/social-links',\n\t\t'core/page-list',\n\t\t'core/spacer',\n\t\t'core/home-link',\n\t\t'core/site-title',\n\t\t'core/site-logo',\n\t\t'core/navigation-submenu',\n\t],\n\t'core/social-links': [ 'core/social-link' ],\n\t'core/navigation-submenu': [\n\t\t'core/navigation-link',\n\t\t'core/navigation-submenu',\n\t],\n\t'core/navigation-link': [\n\t\t'core/navigation-link',\n\t\t'core/navigation-submenu',\n\t],\n};\n\nexport default function NavigationMenu( { innerBlocks, id } ) {\n\tconst { updateBlockListSettings } = useDispatch( blockEditorStore );\n\n\t//TODO: Block settings are normally updated as a side effect of rendering InnerBlocks in BlockList\n\t//Think through a better way of doing this, possible with adding allowed blocks to block library metadata\n\tuseEffect( () => {\n\t\tupdateBlockListSettings( '', {\n\t\t\tallowedBlocks: ALLOWED_BLOCKS[ 'core/navigation' ],\n\t\t} );\n\t\tinnerBlocks.forEach( ( block ) => {\n\t\t\tif ( ALLOWED_BLOCKS[ block.name ] ) {\n\t\t\t\tupdateBlockListSettings( block.clientId, {\n\t\t\t\t\tallowedBlocks: ALLOWED_BLOCKS[ block.name ],\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t}, [ updateBlockListSettings, innerBlocks ] );\n\treturn (\n\t\t<>\n\t\t\t<ListView id={ id } />\n\t\t</>\n\t);\n}\n"]}
|
package/build-module/index.js
CHANGED
|
@@ -87,7 +87,6 @@ export function initializeEditor(id, settings) {
|
|
|
87
87
|
settings.__experimentalFetchLinkSuggestions = (search, searchOptions) => fetchLinkSuggestions(search, searchOptions, settings);
|
|
88
88
|
|
|
89
89
|
settings.__experimentalFetchRichUrlData = fetchUrlData;
|
|
90
|
-
settings.__experimentalSpotlightEntityBlocks = ['core/template-part'];
|
|
91
90
|
const target = document.getElementById(id);
|
|
92
91
|
|
|
93
92
|
dispatch(blocksStore).__experimentalReapplyBlockTypeFilters();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/index.js"],"names":["store","blocksStore","registerCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","dispatch","select","render","unmountComponentAtNode","__experimentalFetchLinkSuggestions","fetchLinkSuggestions","__experimentalFetchUrlData","fetchUrlData","editorStore","preferencesStore","__","viewportStore","getQueryArgs","editSiteStore","EditSiteApp","getIsListPage","ErrorBoundaryWarning","reinitializeEditor","target","settings","__unstableHomeTemplate","reboot","bind","setDefaults","editorMode","fixedToolbar","focusMode","keepCaretInsideBlock","welcomeGuide","welcomeGuideStyles","updateSettings","updateEditorSettings","defaultTemplateTypes","defaultTemplatePartAreas","isLandingOnListPage","window","location","href","setIsNavigationPanelOpened","isViewportMatch","initializeEditor","id","search","searchOptions","__experimentalFetchRichUrlData","
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/index.js"],"names":["store","blocksStore","registerCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","dispatch","select","render","unmountComponentAtNode","__experimentalFetchLinkSuggestions","fetchLinkSuggestions","__experimentalFetchUrlData","fetchUrlData","editorStore","preferencesStore","__","viewportStore","getQueryArgs","editSiteStore","EditSiteApp","getIsListPage","ErrorBoundaryWarning","reinitializeEditor","target","settings","__unstableHomeTemplate","reboot","bind","setDefaults","editorMode","fixedToolbar","focusMode","keepCaretInsideBlock","welcomeGuide","welcomeGuideStyles","updateSettings","updateEditorSettings","defaultTemplateTypes","defaultTemplatePartAreas","isLandingOnListPage","window","location","href","setIsNavigationPanelOpened","isViewportMatch","initializeEditor","id","search","searchOptions","__experimentalFetchRichUrlData","document","getElementById","__experimentalReapplyBlockTypeFilters","process","env","IS_GUTENBERG_PLUGIN","enableFSEBlocks","default","__experimentalMainDashboardButton","__experimentalNavigationToggle","PluginSidebar","PluginSidebarMoreMenuItem","PluginMoreMenuItem"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAlB,QAAqC,mBAArC;AACA,SACCC,kBADD,EAECC,4CAFD,QAGO,0BAHP;AAIA,SAASC,QAAT,EAAmBC,MAAnB,QAAiC,iBAAjC;AACA,SAASC,MAAT,EAAiBC,sBAAjB,QAA+C,oBAA/C;AACA,SACCC,kCAAkC,IAAIC,oBADvC,EAECC,0BAA0B,IAAIC,YAF/B,QAGO,sBAHP;AAIA,SAASX,KAAK,IAAIY,WAAlB,QAAqC,mBAArC;AACA,SAASZ,KAAK,IAAIa,gBAAlB,QAA0C,wBAA1C;AACA,SAASC,EAAT,QAAmB,iBAAnB;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;AACA,SAASF,OAAO,IAAIG,aAApB,QAAyC,qCAAzC;AACA,SAASH,OAAO,IAAII,yBAApB,QAAqD,mDAArD;AACA,SAASJ,OAAO,IAAIK,kBAApB,QAA8C,2CAA9C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch, select } from '@wordpress/data';\nimport { render, unmountComponentAtNode } from '@wordpress/element';\nimport {\n\t__experimentalFetchLinkSuggestions as fetchLinkSuggestions,\n\t__experimentalFetchUrlData as fetchUrlData,\n} from '@wordpress/core-data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { __ } from '@wordpress/i18n';\nimport { store as viewportStore } from '@wordpress/viewport';\nimport { getQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport { store as editSiteStore } from './store';\nimport EditSiteApp from './components/app';\nimport getIsListPage from './utils/get-is-list-page';\nimport ErrorBoundaryWarning from './components/error-boundary/warning';\n\n/**\n * Reinitializes the editor after the user chooses to reboot the editor after\n * an unhandled error occurs, replacing previously mounted editor element using\n * an initial state from prior to the crash.\n *\n * @param {Element} target DOM node in which editor is rendered.\n * @param {?Object} settings Editor settings object.\n */\nexport function reinitializeEditor( target, settings ) {\n\t// Display warning if editor wasn't able to resolve homepage template.\n\tif ( ! settings.__unstableHomeTemplate ) {\n\t\trender(\n\t\t\t<ErrorBoundaryWarning\n\t\t\t\tmessage={ __(\n\t\t\t\t\t'The editor is unable to find a block template for the homepage.'\n\t\t\t\t) }\n\t\t\t\tdashboardLink=\"index.php\"\n\t\t\t/>,\n\t\t\ttarget\n\t\t);\n\t\treturn;\n\t}\n\n\t// This will be a no-op if the target doesn't have any React nodes.\n\tunmountComponentAtNode( target );\n\tconst reboot = reinitializeEditor.bind( null, target, settings );\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\t{\n\t\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\t\teditorMode: 'visual',\n\t\t\tfixedToolbar: false,\n\t\t\tfocusMode: false,\n\t\t\tkeepCaretInsideBlock: false,\n\t\t\twelcomeGuide: true,\n\t\t\twelcomeGuideStyles: true,\n\t\t} );\n\n\t\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t\t// Keep the defaultTemplateTypes in the core/editor settings too,\n\t\t// so that they can be selected with core/editor selectors in any editor.\n\t\t// This is needed because edit-site doesn't initialize with EditorProvider,\n\t\t// which internally uses updateEditorSettings as well.\n\t\tdispatch( editorStore ).updateEditorSettings( {\n\t\t\tdefaultTemplateTypes: settings.defaultTemplateTypes,\n\t\t\tdefaultTemplatePartAreas: settings.defaultTemplatePartAreas,\n\t\t} );\n\n\t\tconst isLandingOnListPage = getIsListPage(\n\t\t\tgetQueryArgs( window.location.href )\n\t\t);\n\n\t\tif ( isLandingOnListPage ) {\n\t\t\t// Default the navigation panel to be opened when we're in a bigger\n\t\t\t// screen and land in the list screen.\n\t\t\tdispatch( editSiteStore ).setIsNavigationPanelOpened(\n\t\t\t\tselect( viewportStore ).isViewportMatch( 'medium' )\n\t\t\t);\n\t\t}\n\t}\n\n\trender( <EditSiteApp reboot={ reboot } />, target );\n}\n\n/**\n * Initializes the site editor screen.\n *\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializeEditor( id, settings ) {\n\tsettings.__experimentalFetchLinkSuggestions = ( search, searchOptions ) =>\n\t\tfetchLinkSuggestions( search, searchOptions, settings );\n\tsettings.__experimentalFetchRichUrlData = fetchUrlData;\n\n\tconst target = document.getElementById( id );\n\n\tdispatch( blocksStore ).__experimentalReapplyBlockTypeFilters();\n\tregisterCoreBlocks();\n\tif ( process.env.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\treinitializeEditor( target, settings );\n}\n\nexport { default as __experimentalMainDashboardButton } from './components/main-dashboard-button';\nexport { default as __experimentalNavigationToggle } from './components/navigation-sidebar/navigation-toggle';\nexport { default as PluginSidebar } from './components/sidebar/plugin-sidebar';\nexport { default as PluginSidebarMoreMenuItem } from './components/header/plugin-sidebar-more-menu-item';\nexport { default as PluginMoreMenuItem } from './components/header/plugin-more-menu-item';\n"]}
|
|
@@ -430,6 +430,8 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
430
430
|
|
|
431
431
|
.interface-pinned-items {
|
|
432
432
|
display: flex;
|
|
433
|
+
gap: 4px;
|
|
434
|
+
margin-left: -4px;
|
|
433
435
|
}
|
|
434
436
|
.interface-pinned-items .components-button:not(:first-child) {
|
|
435
437
|
display: none;
|
|
@@ -440,7 +442,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
440
442
|
}
|
|
441
443
|
}
|
|
442
444
|
.interface-pinned-items .components-button {
|
|
443
|
-
margin
|
|
445
|
+
margin: 0;
|
|
444
446
|
}
|
|
445
447
|
.interface-pinned-items .components-button svg {
|
|
446
448
|
max-width: 24px;
|
|
@@ -900,42 +902,30 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
|
|
|
900
902
|
}
|
|
901
903
|
|
|
902
904
|
/**
|
|
903
|
-
* Buttons
|
|
905
|
+
* Buttons on the right side
|
|
904
906
|
*/
|
|
905
907
|
.edit-site-header__actions {
|
|
906
908
|
display: inline-flex;
|
|
907
909
|
align-items: center;
|
|
908
910
|
padding-left: 4px;
|
|
911
|
+
gap: 4px;
|
|
909
912
|
}
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
@media (min-width: 782px) {
|
|
914
|
-
.edit-site-header__actions .interface-pinned-items {
|
|
915
|
-
display: inline-flex;
|
|
913
|
+
@media (min-width: 600px) {
|
|
914
|
+
.edit-site-header__actions {
|
|
915
|
+
padding-left: 10px;
|
|
916
916
|
}
|
|
917
917
|
}
|
|
918
|
-
.edit-site-header__actions .editor-post-saved-state,
|
|
919
|
-
.edit-site-header__actions .components-button.components-button {
|
|
920
|
-
margin-left: 4px;
|
|
921
|
-
}
|
|
922
918
|
@media (min-width: 600px) {
|
|
923
|
-
.edit-site-header__actions
|
|
924
|
-
|
|
925
|
-
margin-left: 12px;
|
|
919
|
+
.edit-site-header__actions {
|
|
920
|
+
gap: 8px;
|
|
926
921
|
}
|
|
927
922
|
}
|
|
928
|
-
.edit-site-header__actions .
|
|
929
|
-
|
|
930
|
-
padding: 0 6px;
|
|
931
|
-
}
|
|
932
|
-
.edit-site-header__actions .edit-site-more-menu .components-button,
|
|
933
|
-
.edit-site-header__actions .interface-pinned-items .components-button {
|
|
934
|
-
margin-left: 0;
|
|
923
|
+
.edit-site-header__actions .interface-pinned-items {
|
|
924
|
+
display: none;
|
|
935
925
|
}
|
|
936
|
-
@media (min-width:
|
|
937
|
-
.edit-site-header__actions {
|
|
938
|
-
|
|
926
|
+
@media (min-width: 782px) {
|
|
927
|
+
.edit-site-header__actions .interface-pinned-items {
|
|
928
|
+
display: inline-flex;
|
|
939
929
|
}
|
|
940
930
|
}
|
|
941
931
|
|
|
@@ -974,10 +964,6 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
|
|
|
974
964
|
.show-icon-labels .edit-site-header .edit-site-save-button__button {
|
|
975
965
|
padding-right: 6px;
|
|
976
966
|
padding-left: 6px;
|
|
977
|
-
margin-left: 4px;
|
|
978
|
-
}
|
|
979
|
-
.show-icon-labels .edit-site-header .block-editor-post-preview__button-toggle {
|
|
980
|
-
margin-left: 4px;
|
|
981
967
|
}
|
|
982
968
|
.show-icon-labels .edit-site-header .edit-site-header-toolbar__inserter-toggle.edit-site-header-toolbar__inserter-toggle,
|
|
983
969
|
.show-icon-labels .edit-site-header .edit-site-document-actions__get-info.edit-site-document-actions__get-info.edit-site-document-actions__get-info {
|
|
@@ -1594,6 +1580,10 @@ body.is-fullscreen-mode .edit-site-list-header {
|
|
|
1594
1580
|
margin-bottom: -52px !important;
|
|
1595
1581
|
}
|
|
1596
1582
|
}
|
|
1583
|
+
.edit-site-global-styles-sidebar hr {
|
|
1584
|
+
margin: 0;
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1597
1587
|
.components-panel__header.edit-site-sidebar__panel-tabs {
|
|
1598
1588
|
justify-content: flex-start;
|
|
1599
1589
|
padding-right: 0;
|
package/build-style/style.css
CHANGED
|
@@ -430,6 +430,8 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
430
430
|
|
|
431
431
|
.interface-pinned-items {
|
|
432
432
|
display: flex;
|
|
433
|
+
gap: 4px;
|
|
434
|
+
margin-right: -4px;
|
|
433
435
|
}
|
|
434
436
|
.interface-pinned-items .components-button:not(:first-child) {
|
|
435
437
|
display: none;
|
|
@@ -440,7 +442,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
440
442
|
}
|
|
441
443
|
}
|
|
442
444
|
.interface-pinned-items .components-button {
|
|
443
|
-
margin
|
|
445
|
+
margin: 0;
|
|
444
446
|
}
|
|
445
447
|
.interface-pinned-items .components-button svg {
|
|
446
448
|
max-width: 24px;
|
|
@@ -900,42 +902,30 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
|
|
|
900
902
|
}
|
|
901
903
|
|
|
902
904
|
/**
|
|
903
|
-
* Buttons
|
|
905
|
+
* Buttons on the right side
|
|
904
906
|
*/
|
|
905
907
|
.edit-site-header__actions {
|
|
906
908
|
display: inline-flex;
|
|
907
909
|
align-items: center;
|
|
908
910
|
padding-right: 4px;
|
|
911
|
+
gap: 4px;
|
|
909
912
|
}
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
@media (min-width: 782px) {
|
|
914
|
-
.edit-site-header__actions .interface-pinned-items {
|
|
915
|
-
display: inline-flex;
|
|
913
|
+
@media (min-width: 600px) {
|
|
914
|
+
.edit-site-header__actions {
|
|
915
|
+
padding-right: 10px;
|
|
916
916
|
}
|
|
917
917
|
}
|
|
918
|
-
.edit-site-header__actions .editor-post-saved-state,
|
|
919
|
-
.edit-site-header__actions .components-button.components-button {
|
|
920
|
-
margin-right: 4px;
|
|
921
|
-
}
|
|
922
918
|
@media (min-width: 600px) {
|
|
923
|
-
.edit-site-header__actions
|
|
924
|
-
|
|
925
|
-
margin-right: 12px;
|
|
919
|
+
.edit-site-header__actions {
|
|
920
|
+
gap: 8px;
|
|
926
921
|
}
|
|
927
922
|
}
|
|
928
|
-
.edit-site-header__actions .
|
|
929
|
-
|
|
930
|
-
padding: 0 6px;
|
|
931
|
-
}
|
|
932
|
-
.edit-site-header__actions .edit-site-more-menu .components-button,
|
|
933
|
-
.edit-site-header__actions .interface-pinned-items .components-button {
|
|
934
|
-
margin-right: 0;
|
|
923
|
+
.edit-site-header__actions .interface-pinned-items {
|
|
924
|
+
display: none;
|
|
935
925
|
}
|
|
936
|
-
@media (min-width:
|
|
937
|
-
.edit-site-header__actions {
|
|
938
|
-
|
|
926
|
+
@media (min-width: 782px) {
|
|
927
|
+
.edit-site-header__actions .interface-pinned-items {
|
|
928
|
+
display: inline-flex;
|
|
939
929
|
}
|
|
940
930
|
}
|
|
941
931
|
|
|
@@ -974,10 +964,6 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
|
|
|
974
964
|
.show-icon-labels .edit-site-header .edit-site-save-button__button {
|
|
975
965
|
padding-left: 6px;
|
|
976
966
|
padding-right: 6px;
|
|
977
|
-
margin-right: 4px;
|
|
978
|
-
}
|
|
979
|
-
.show-icon-labels .edit-site-header .block-editor-post-preview__button-toggle {
|
|
980
|
-
margin-right: 4px;
|
|
981
967
|
}
|
|
982
968
|
.show-icon-labels .edit-site-header .edit-site-header-toolbar__inserter-toggle.edit-site-header-toolbar__inserter-toggle,
|
|
983
969
|
.show-icon-labels .edit-site-header .edit-site-document-actions__get-info.edit-site-document-actions__get-info.edit-site-document-actions__get-info {
|
|
@@ -1594,6 +1580,10 @@ body.is-fullscreen-mode .edit-site-list-header {
|
|
|
1594
1580
|
margin-bottom: -52px !important;
|
|
1595
1581
|
}
|
|
1596
1582
|
}
|
|
1583
|
+
.edit-site-global-styles-sidebar hr {
|
|
1584
|
+
margin: 0;
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1597
1587
|
.components-panel__header.edit-site-sidebar__panel-tabs {
|
|
1598
1588
|
justify-content: flex-start;
|
|
1599
1589
|
padding-left: 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-site",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "Edit Site Page module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -27,33 +27,33 @@
|
|
|
27
27
|
"react-native": "src/index",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@babel/runtime": "^7.16.0",
|
|
30
|
-
"@wordpress/a11y": "^3.
|
|
31
|
-
"@wordpress/api-fetch": "^6.
|
|
32
|
-
"@wordpress/block-editor": "^
|
|
33
|
-
"@wordpress/block-library": "^7.
|
|
34
|
-
"@wordpress/blocks": "^11.
|
|
35
|
-
"@wordpress/components": "^19.
|
|
36
|
-
"@wordpress/compose": "^5.
|
|
37
|
-
"@wordpress/core-data": "^4.
|
|
38
|
-
"@wordpress/data": "^6.
|
|
39
|
-
"@wordpress/deprecated": "^3.
|
|
40
|
-
"@wordpress/editor": "^12.
|
|
41
|
-
"@wordpress/element": "^4.
|
|
42
|
-
"@wordpress/hooks": "^3.
|
|
43
|
-
"@wordpress/html-entities": "^3.
|
|
44
|
-
"@wordpress/i18n": "^4.
|
|
45
|
-
"@wordpress/icons": "^8.
|
|
46
|
-
"@wordpress/interface": "^4.
|
|
47
|
-
"@wordpress/keyboard-shortcuts": "^3.
|
|
48
|
-
"@wordpress/keycodes": "^3.
|
|
49
|
-
"@wordpress/media-utils": "^3.
|
|
50
|
-
"@wordpress/notices": "^3.
|
|
51
|
-
"@wordpress/plugins": "^4.
|
|
52
|
-
"@wordpress/preferences": "^
|
|
53
|
-
"@wordpress/reusable-blocks": "^3.
|
|
54
|
-
"@wordpress/style-engine": "^0.
|
|
55
|
-
"@wordpress/url": "^3.
|
|
56
|
-
"@wordpress/viewport": "^4.
|
|
30
|
+
"@wordpress/a11y": "^3.8.0",
|
|
31
|
+
"@wordpress/api-fetch": "^6.5.0",
|
|
32
|
+
"@wordpress/block-editor": "^9.0.0",
|
|
33
|
+
"@wordpress/block-library": "^7.5.0",
|
|
34
|
+
"@wordpress/blocks": "^11.7.0",
|
|
35
|
+
"@wordpress/components": "^19.10.0",
|
|
36
|
+
"@wordpress/compose": "^5.6.0",
|
|
37
|
+
"@wordpress/core-data": "^4.6.0",
|
|
38
|
+
"@wordpress/data": "^6.8.0",
|
|
39
|
+
"@wordpress/deprecated": "^3.8.0",
|
|
40
|
+
"@wordpress/editor": "^12.7.0",
|
|
41
|
+
"@wordpress/element": "^4.6.0",
|
|
42
|
+
"@wordpress/hooks": "^3.8.0",
|
|
43
|
+
"@wordpress/html-entities": "^3.8.0",
|
|
44
|
+
"@wordpress/i18n": "^4.8.0",
|
|
45
|
+
"@wordpress/icons": "^8.4.0",
|
|
46
|
+
"@wordpress/interface": "^4.7.0",
|
|
47
|
+
"@wordpress/keyboard-shortcuts": "^3.6.0",
|
|
48
|
+
"@wordpress/keycodes": "^3.8.0",
|
|
49
|
+
"@wordpress/media-utils": "^3.6.0",
|
|
50
|
+
"@wordpress/notices": "^3.8.0",
|
|
51
|
+
"@wordpress/plugins": "^4.6.0",
|
|
52
|
+
"@wordpress/preferences": "^2.0.0",
|
|
53
|
+
"@wordpress/reusable-blocks": "^3.6.0",
|
|
54
|
+
"@wordpress/style-engine": "^0.7.0",
|
|
55
|
+
"@wordpress/url": "^3.9.0",
|
|
56
|
+
"@wordpress/viewport": "^4.6.0",
|
|
57
57
|
"classnames": "^2.3.1",
|
|
58
58
|
"downloadjs": "^1.4.7",
|
|
59
59
|
"history": "^5.1.0",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "4631d515033397fcfeda77e5755960253caef9bf"
|
|
72
72
|
}
|
|
@@ -7,7 +7,7 @@ import classnames from 'classnames';
|
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
9
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
10
|
-
import { useCallback, useRef } from '@wordpress/element';
|
|
10
|
+
import { useCallback, useRef, Fragment } from '@wordpress/element';
|
|
11
11
|
import { useEntityBlockEditor, store as coreStore } from '@wordpress/core-data';
|
|
12
12
|
import {
|
|
13
13
|
BlockList,
|
|
@@ -127,7 +127,7 @@ export default function BlockEditor( { setIsInserterOpen } ) {
|
|
|
127
127
|
// Conditionally include NavMenu sidebar in Plugin only.
|
|
128
128
|
// Optimise for dead code elimination.
|
|
129
129
|
// See https://github.com/WordPress/gutenberg/blob/trunk/docs/how-to-guides/feature-flags.md#dead-code-elimination.
|
|
130
|
-
let MaybeNavMenuSidebarToggle =
|
|
130
|
+
let MaybeNavMenuSidebarToggle = Fragment;
|
|
131
131
|
|
|
132
132
|
if ( process.env.IS_GUTENBERG_PLUGIN ) {
|
|
133
133
|
MaybeNavMenuSidebarToggle = NavMenuSidebarToggle;
|
|
@@ -12,7 +12,7 @@ import { useHasBorderPanel } from './border-panel';
|
|
|
12
12
|
import { useHasColorPanel } from './color-utils';
|
|
13
13
|
import { useHasDimensionsPanel } from './dimensions-panel';
|
|
14
14
|
import { useHasTypographyPanel } from './typography-panel';
|
|
15
|
-
import {
|
|
15
|
+
import { NavigationButtonAsItem } from './navigation-button';
|
|
16
16
|
|
|
17
17
|
function ContextMenu( { name, parentMenu = '' } ) {
|
|
18
18
|
const hasTypographyPanel = useHasTypographyPanel( name );
|
|
@@ -24,28 +24,28 @@ function ContextMenu( { name, parentMenu = '' } ) {
|
|
|
24
24
|
return (
|
|
25
25
|
<ItemGroup>
|
|
26
26
|
{ hasTypographyPanel && (
|
|
27
|
-
<
|
|
27
|
+
<NavigationButtonAsItem
|
|
28
28
|
icon={ typography }
|
|
29
29
|
path={ parentMenu + '/typography' }
|
|
30
30
|
>
|
|
31
31
|
{ __( 'Typography' ) }
|
|
32
|
-
</
|
|
32
|
+
</NavigationButtonAsItem>
|
|
33
33
|
) }
|
|
34
34
|
{ hasColorPanel && (
|
|
35
|
-
<
|
|
35
|
+
<NavigationButtonAsItem
|
|
36
36
|
icon={ color }
|
|
37
37
|
path={ parentMenu + '/colors' }
|
|
38
38
|
>
|
|
39
39
|
{ __( 'Colors' ) }
|
|
40
|
-
</
|
|
40
|
+
</NavigationButtonAsItem>
|
|
41
41
|
) }
|
|
42
42
|
{ hasLayoutPanel && (
|
|
43
|
-
<
|
|
43
|
+
<NavigationButtonAsItem
|
|
44
44
|
icon={ layout }
|
|
45
45
|
path={ parentMenu + '/layout' }
|
|
46
46
|
>
|
|
47
47
|
{ __( 'Layout' ) }
|
|
48
|
-
</
|
|
48
|
+
</NavigationButtonAsItem>
|
|
49
49
|
) }
|
|
50
50
|
</ItemGroup>
|
|
51
51
|
);
|
|
@@ -7,30 +7,33 @@ import {
|
|
|
7
7
|
__experimentalSpacer as Spacer,
|
|
8
8
|
__experimentalHeading as Heading,
|
|
9
9
|
__experimentalView as View,
|
|
10
|
+
__experimentalNavigatorBackButton as NavigatorBackButton,
|
|
10
11
|
} from '@wordpress/components';
|
|
11
12
|
import { isRTL, __ } from '@wordpress/i18n';
|
|
12
13
|
import { chevronRight, chevronLeft } from '@wordpress/icons';
|
|
13
14
|
|
|
14
|
-
/**
|
|
15
|
-
* Internal dependencies
|
|
16
|
-
*/
|
|
17
|
-
import { NavigationBackButton } from './navigation-button';
|
|
18
|
-
|
|
19
15
|
function ScreenHeader( { title, description } ) {
|
|
20
16
|
return (
|
|
21
|
-
<VStack spacing={
|
|
22
|
-
<
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
<VStack spacing={ 0 }>
|
|
18
|
+
<View>
|
|
19
|
+
<Spacer marginBottom={ 0 } paddingX={ 4 } paddingY={ 3 }>
|
|
20
|
+
<HStack spacing={ 2 }>
|
|
21
|
+
<NavigatorBackButton
|
|
22
|
+
style={
|
|
23
|
+
// TODO: This style override is also used in ToolsPanelHeader.
|
|
24
|
+
// It should be supported out-of-the-box by Button.
|
|
25
|
+
{ minWidth: 24, padding: 0 }
|
|
26
|
+
}
|
|
27
|
+
icon={ isRTL() ? chevronRight : chevronLeft }
|
|
28
|
+
isSmall
|
|
29
|
+
aria-label={ __( 'Navigate to the previous view' ) }
|
|
30
|
+
/>
|
|
31
|
+
<Spacer>
|
|
32
|
+
<Heading level={ 5 }>{ title }</Heading>
|
|
33
|
+
</Spacer>
|
|
34
|
+
</HStack>
|
|
32
35
|
</Spacer>
|
|
33
|
-
</
|
|
36
|
+
</View>
|
|
34
37
|
{ description && (
|
|
35
38
|
<p className="edit-site-global-styles-header__description">
|
|
36
39
|
{ description }
|
|
@@ -28,12 +28,12 @@ function GenericNavigationButton( { icon, children, ...props } ) {
|
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
function
|
|
31
|
+
function NavigationButtonAsItem( props ) {
|
|
32
32
|
return <NavigatorButton as={ GenericNavigationButton } { ...props } />;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
function
|
|
35
|
+
function NavigationBackButtonAsItem( props ) {
|
|
36
36
|
return <NavigatorBackButton as={ GenericNavigationButton } { ...props } />;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
export {
|
|
39
|
+
export { NavigationButtonAsItem, NavigationBackButtonAsItem };
|