@wordpress/edit-site 4.13.1-next.957ca95e4c.0 → 4.14.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 +20 -10
- package/build/components/block-editor/index.js.map +1 -1
- package/build/components/block-editor/resizable-editor.js +8 -1
- package/build/components/block-editor/resizable-editor.js.map +1 -1
- package/build/components/editor/index.js +9 -4
- package/build/components/editor/index.js.map +1 -1
- package/build/components/global-styles/gradients-palette-panel.js +6 -2
- package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build/components/global-styles/hooks.js +4 -2
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +41 -29
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/header/index.js +41 -5
- package/build/components/header/index.js.map +1 -1
- package/build/components/list/header.js +15 -2
- package/build/components/list/header.js.map +1 -1
- package/build/components/navigation-sidebar/navigation-panel/index.js +10 -4
- package/build/components/navigation-sidebar/navigation-panel/index.js.map +1 -1
- package/build/components/sidebar/index.js +8 -3
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/template-part-converter/convert-to-template-part.js +16 -0
- package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build/index.js +4 -1
- package/build/index.js.map +1 -1
- package/build-module/components/block-editor/index.js +20 -9
- package/build-module/components/block-editor/index.js.map +1 -1
- package/build-module/components/block-editor/resizable-editor.js +9 -2
- package/build-module/components/block-editor/resizable-editor.js.map +1 -1
- package/build-module/components/editor/index.js +10 -5
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/global-styles/gradients-palette-panel.js +6 -2
- package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +5 -3
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +42 -30
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/header/index.js +42 -7
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/list/header.js +14 -2
- package/build-module/components/list/header.js.map +1 -1
- package/build-module/components/navigation-sidebar/navigation-panel/index.js +11 -5
- package/build-module/components/navigation-sidebar/navigation-panel/index.js.map +1 -1
- package/build-module/components/sidebar/index.js +7 -3
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/template-part-converter/convert-to-template-part.js +16 -1
- package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build-module/index.js +4 -1
- package/build-module/index.js.map +1 -1
- package/build-style/style-rtl.css +28 -16
- package/build-style/style.css +28 -16
- package/package.json +29 -29
- package/src/components/block-editor/index.js +34 -16
- package/src/components/block-editor/resizable-editor.js +10 -3
- package/src/components/code-editor/style.scss +2 -3
- package/src/components/editor/index.js +12 -5
- package/src/components/global-styles/gradients-palette-panel.js +25 -12
- package/src/components/global-styles/hooks.js +5 -3
- package/src/components/global-styles/use-global-styles-output.js +66 -57
- package/src/components/header/index.js +61 -21
- package/src/components/header/style.scss +9 -0
- package/src/components/list/header.js +15 -5
- package/src/components/navigation-sidebar/navigation-panel/index.js +30 -24
- package/src/components/sidebar/index.js +23 -20
- package/src/components/template-part-converter/convert-to-template-part.js +14 -1
- package/src/index.js +4 -0
- package/src/style.scss +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/components/navigation-sidebar/navigation-panel/index.js"],"names":["classnames","__experimentalNavigation","Navigation","__experimentalNavigationBackButton","NavigationBackButton","__experimentalNavigationGroup","NavigationGroup","__experimentalNavigationItem","NavigationItem","__experimentalNavigationMenu","NavigationMenu","store","coreDataStore","useSelect","useDispatch","__","ESCAPE","decodeEntities","home","siteIcon","layout","templateIcon","symbolFilled","templatePartIcon","useLink","MainDashboardButton","editSiteStore","SITE_EDITOR_KEY","NavLink","params","replace","props","linkProps","NavigationPanel","activeItem","homeTemplate","isNavigationOpen","siteTitle","select","getEntityRecord","getSettings","isNavigationOpened","siteData","undefined","
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/navigation-sidebar/navigation-panel/index.js"],"names":["classnames","__experimentalNavigation","Navigation","__experimentalNavigationBackButton","NavigationBackButton","__experimentalNavigationGroup","NavigationGroup","__experimentalNavigationItem","NavigationItem","__experimentalNavigationMenu","NavigationMenu","store","coreDataStore","useSelect","useDispatch","__","ESCAPE","decodeEntities","home","siteIcon","layout","templateIcon","symbolFilled","templatePartIcon","useLink","MainDashboardButton","editSiteStore","SITE_EDITOR_KEY","NavLink","params","replace","props","linkProps","NavigationPanel","activeItem","homeTemplate","isNavigationOpen","isTemplatePartsMode","siteTitle","select","getEntityRecord","getSettings","isNavigationOpened","siteData","undefined","supportsTemplatePartsMode","__unstableHomeTemplate","name","setIsNavigationPanelOpened","closeOnEscape","event","keyCode","defaultPrevented","preventDefault","postId","postType"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SACCC,wBAAwB,IAAIC,UAD7B,EAECC,kCAAkC,IAAIC,oBAFvC,EAGCC,6BAA6B,IAAIC,eAHlC,EAICC,4BAA4B,IAAIC,cAJjC,EAKCC,4BAA4B,IAAIC,cALjC,QAMO,uBANP;AAOA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,sBAAvC;AACA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,MAAT,QAAuB,qBAAvB;AACA,SAASC,cAAT,QAA+B,0BAA/B;AACA,SACCC,IAAI,IAAIC,QADT,EAECC,MAAM,IAAIC,YAFX,EAGCC,YAAY,IAAIC,gBAHjB,QAIO,kBAJP;AAMA;AACA;AACA;;AACA,SAASC,OAAT,QAAwB,mBAAxB;AACA,OAAOC,mBAAP,MAAgC,6BAAhC;AACA,SAASd,KAAK,IAAIe,aAAlB,QAAuC,gBAAvC;A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,MAAM,EAAEV,SADA;AAERW,QAAAA,QAAQ,EAAE;AAFF;AAJV,MAXD,CAFF,EAwBC,cAAC,OAAD;AACC,MAAA,IAAI,EAAGhC,gBADR;AAEC,MAAA,KAAK,EAAGR,EAAE,CAAE,gBAAF,CAFX;AAGC,MAAA,IAAI,EAAC,kBAHN;AAIC,MAAA,MAAM,EAAG;AACRuC,QAAAA,MAAM,EAAEV,SADA;AAERW,QAAAA,QAAQ,EAAE;AAFF;AAJV,MAxBD,CADD,CATD,CADD,CAND,CAND;AAFD;AAiEA,CA5FD;;AA8FA,eAAetB,eAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalNavigation as Navigation,\n\t__experimentalNavigationBackButton as NavigationBackButton,\n\t__experimentalNavigationGroup as NavigationGroup,\n\t__experimentalNavigationItem as NavigationItem,\n\t__experimentalNavigationMenu as NavigationMenu,\n} from '@wordpress/components';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { ESCAPE } from '@wordpress/keycodes';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport {\n\thome as siteIcon,\n\tlayout as templateIcon,\n\tsymbolFilled as templatePartIcon,\n} from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { useLink } from '../../routes/link';\nimport MainDashboardButton from '../../main-dashboard-button';\nimport { store as editSiteStore } from '../../../store';\n\nconst SITE_EDITOR_KEY = 'site-editor';\n\nfunction NavLink( { params, replace, ...props } ) {\n\tconst linkProps = useLink( params, replace );\n\n\treturn <NavigationItem { ...linkProps } { ...props } />;\n}\n\nconst NavigationPanel = ( { activeItem = SITE_EDITOR_KEY } ) => {\n\tconst { homeTemplate, isNavigationOpen, isTemplatePartsMode, siteTitle } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst { getEntityRecord } = select( coreDataStore );\n\t\t\tconst { getSettings, isNavigationOpened } = select( editSiteStore );\n\n\t\t\tconst siteData =\n\t\t\t\tgetEntityRecord( 'root', '__unstableBase', undefined ) || {};\n\t\t\tconst { supportsTemplatePartsMode, __unstableHomeTemplate } =\n\t\t\t\tgetSettings();\n\n\t\t\treturn {\n\t\t\t\tsiteTitle: siteData.name,\n\t\t\t\thomeTemplate: __unstableHomeTemplate,\n\t\t\t\tisNavigationOpen: isNavigationOpened(),\n\t\t\t\tisTemplatePartsMode: !! supportsTemplatePartsMode,\n\t\t\t};\n\t\t}, [] );\n\tconst { setIsNavigationPanelOpened } = useDispatch( editSiteStore );\n\n\tconst closeOnEscape = ( event ) => {\n\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\tevent.preventDefault();\n\t\t\tsetIsNavigationPanelOpened( false );\n\t\t}\n\t};\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tclassName={ classnames( `edit-site-navigation-panel`, {\n\t\t\t\t'is-open': isNavigationOpen,\n\t\t\t} ) }\n\t\t\tonKeyDown={ closeOnEscape }\n\t\t>\n\t\t\t<div className=\"edit-site-navigation-panel__inner\">\n\t\t\t\t<div className=\"edit-site-navigation-panel__site-title-container\">\n\t\t\t\t\t<div className=\"edit-site-navigation-panel__site-title\">\n\t\t\t\t\t\t{ decodeEntities( siteTitle ) }\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"edit-site-navigation-panel__scroll-container\">\n\t\t\t\t\t<Navigation activeItem={ activeItem }>\n\t\t\t\t\t\t<MainDashboardButton.Slot>\n\t\t\t\t\t\t\t<NavigationBackButton\n\t\t\t\t\t\t\t\tbackButtonLabel={ __( 'Dashboard' ) }\n\t\t\t\t\t\t\t\tclassName=\"edit-site-navigation-panel__back-to-dashboard\"\n\t\t\t\t\t\t\t\thref=\"index.php\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MainDashboardButton.Slot>\n\n\t\t\t\t\t\t<NavigationMenu>\n\t\t\t\t\t\t\t<NavigationGroup title={ __( 'Editor' ) }>\n\t\t\t\t\t\t\t\t{ ! isTemplatePartsMode && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<NavLink\n\t\t\t\t\t\t\t\t\t\t\ticon={ siteIcon }\n\t\t\t\t\t\t\t\t\t\t\ttitle={ __( 'Site' ) }\n\t\t\t\t\t\t\t\t\t\t\titem={ SITE_EDITOR_KEY }\n\t\t\t\t\t\t\t\t\t\t\tparams={ {\n\t\t\t\t\t\t\t\t\t\t\t\tpostId: homeTemplate?.postId,\n\t\t\t\t\t\t\t\t\t\t\t\tpostType:\n\t\t\t\t\t\t\t\t\t\t\t\t\thomeTemplate?.postType,\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<NavLink\n\t\t\t\t\t\t\t\t\t\t\ticon={ templateIcon }\n\t\t\t\t\t\t\t\t\t\t\ttitle={ __( 'Templates' ) }\n\t\t\t\t\t\t\t\t\t\t\titem=\"wp_template\"\n\t\t\t\t\t\t\t\t\t\t\tparams={ {\n\t\t\t\t\t\t\t\t\t\t\t\tpostId: undefined,\n\t\t\t\t\t\t\t\t\t\t\t\tpostType: 'wp_template',\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<NavLink\n\t\t\t\t\t\t\t\t\ticon={ templatePartIcon }\n\t\t\t\t\t\t\t\t\ttitle={ __( 'Template Parts' ) }\n\t\t\t\t\t\t\t\t\titem=\"wp_template_part\"\n\t\t\t\t\t\t\t\t\tparams={ {\n\t\t\t\t\t\t\t\t\t\tpostId: undefined,\n\t\t\t\t\t\t\t\t\t\tpostType: 'wp_template_part',\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</NavigationGroup>\n\t\t\t\t\t\t</NavigationMenu>\n\t\t\t\t\t</Navigation>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default NavigationPanel;\n"]}
|
|
@@ -21,6 +21,7 @@ import { STORE_NAME } from '../../store/constants';
|
|
|
21
21
|
import SettingsHeader from './settings-header';
|
|
22
22
|
import TemplateCard from './template-card';
|
|
23
23
|
import { SIDEBAR_BLOCK, SIDEBAR_TEMPLATE } from './constants';
|
|
24
|
+
import { store as editSiteStore } from '../../store';
|
|
24
25
|
const {
|
|
25
26
|
Slot: InspectorSlot,
|
|
26
27
|
Fill: InspectorFill
|
|
@@ -30,16 +31,19 @@ export function SidebarComplementaryAreaFills() {
|
|
|
30
31
|
const {
|
|
31
32
|
sidebar,
|
|
32
33
|
isEditorSidebarOpened,
|
|
33
|
-
hasBlockSelection
|
|
34
|
+
hasBlockSelection,
|
|
35
|
+
supportsGlobalStyles
|
|
34
36
|
} = useSelect(select => {
|
|
35
37
|
const _sidebar = select(interfaceStore).getActiveComplementaryArea(STORE_NAME);
|
|
36
38
|
|
|
37
39
|
const _isEditorSidebarOpened = [SIDEBAR_BLOCK, SIDEBAR_TEMPLATE].includes(_sidebar);
|
|
38
40
|
|
|
41
|
+
const settings = select(editSiteStore).getSettings();
|
|
39
42
|
return {
|
|
40
43
|
sidebar: _sidebar,
|
|
41
44
|
isEditorSidebarOpened: _isEditorSidebarOpened,
|
|
42
|
-
hasBlockSelection: !!select(blockEditorStore).getBlockSelectionStart()
|
|
45
|
+
hasBlockSelection: !!select(blockEditorStore).getBlockSelectionStart(),
|
|
46
|
+
supportsGlobalStyles: !(settings !== null && settings !== void 0 && settings.supportsTemplatePartsMode)
|
|
43
47
|
};
|
|
44
48
|
}, []);
|
|
45
49
|
const {
|
|
@@ -80,6 +84,6 @@ export function SidebarComplementaryAreaFills() {
|
|
|
80
84
|
headerClassName: "edit-site-sidebar__panel-tabs"
|
|
81
85
|
}, sidebarName === SIDEBAR_TEMPLATE && createElement(PanelBody, null, createElement(TemplateCard, null)), sidebarName === SIDEBAR_BLOCK && createElement(InspectorSlot, {
|
|
82
86
|
bubblesVirtually: true
|
|
83
|
-
})), createElement(GlobalStylesSidebar, null), createElement(MaybeNavigationMenuSidebar, null));
|
|
87
|
+
})), supportsGlobalStyles && createElement(GlobalStylesSidebar, null), createElement(MaybeNavigationMenuSidebar, null));
|
|
84
88
|
}
|
|
85
89
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
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+
|
|
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","editSiteStore","Slot","InspectorSlot","Fill","InspectorFill","SidebarInspectorFill","SidebarComplementaryAreaFills","sidebar","isEditorSidebarOpened","hasBlockSelection","supportsGlobalStyles","select","_sidebar","getActiveComplementaryArea","_isEditorSidebarOpened","includes","settings","getSettings","getBlockSelectionStart","supportsTemplatePartsMode","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,OA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,CAAvB;AACA,KAFD,MAEO;AACNsB,MAAAA,uBAAuB,CAAEzB,UAAF,EAAcI,gBAAd,CAAvB;AACA;AACD,GAPQ,EAON,CAAEU,iBAAF,EAAqBD,qBAArB,CAPM,CAAT;AASA,MAAIa,WAAW,GAAGd,OAAlB;;AACA,MAAK,CAAEC,qBAAP,EAA+B;AAC9Ba,IAAAA,WAAW,GAAGZ,iBAAiB,GAAGX,aAAH,GAAmBC,gBAAlD;AACA,GApC8C,CAsC/C;AACA;AACA;;;AACA,MAAIuB,0BAA0B,GAAGpC,QAAjC;;AAEA,MAAKqC,OAAO,CAACC,GAAR,CAAYC,mBAAjB,EAAuC;AACtCH,IAAAA,0BAA0B,GAAG5B,qBAA7B;AACA;;AAED,SACC,8BACC,cAAC,cAAD;AACC,IAAA,UAAU,EAAG2B,WADd;AAEC,IAAA,KAAK,EAAGtC,EAAE,CAAE,UAAF,CAFX;AAGC,IAAA,IAAI,EAAGC,GAHR;AAIC,IAAA,UAAU,EAAGD,EAAE,CAAE,wBAAF,CAJhB;AAKC,IAAA,MAAM,EAAG,cAAC,cAAD;AAAgB,MAAA,WAAW,EAAGsC;AAA9B,MALV;AAMC,IAAA,eAAe,EAAC;AANjB,KAQGA,WAAW,KAAKtB,gBAAhB,IACD,cAAC,SAAD,QACC,cAAC,YAAD,OADD,CATF,EAaGsB,WAAW,KAAKvB,aAAhB,IACD,cAAC,aAAD;AAAe,IAAA,gBAAgB;AAA/B,IAdF,CADD,EAkBGY,oBAAoB,IAAI,cAAC,mBAAD,OAlB3B,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';\nimport { store as editSiteStore } from '../../store';\n\nconst { Slot: InspectorSlot, Fill: InspectorFill } = createSlotFill(\n\t'EditSiteSidebarInspector'\n);\nexport const SidebarInspectorFill = InspectorFill;\n\nexport function SidebarComplementaryAreaFills() {\n\tconst {\n\t\tsidebar,\n\t\tisEditorSidebarOpened,\n\t\thasBlockSelection,\n\t\tsupportsGlobalStyles,\n\t} = useSelect( ( select ) => {\n\t\tconst _sidebar =\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea( STORE_NAME );\n\t\tconst _isEditorSidebarOpened = [\n\t\t\tSIDEBAR_BLOCK,\n\t\t\tSIDEBAR_TEMPLATE,\n\t\t].includes( _sidebar );\n\t\tconst settings = select( editSiteStore ).getSettings();\n\t\treturn {\n\t\t\tsidebar: _sidebar,\n\t\t\tisEditorSidebarOpened: _isEditorSidebarOpened,\n\t\t\thasBlockSelection:\n\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\tsupportsGlobalStyles: ! settings?.supportsTemplatePartsMode,\n\t\t};\n\t}, [] );\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\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\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{ supportsGlobalStyles && <GlobalStylesSidebar /> }\n\t\t\t<MaybeNavigationMenuSidebar />\n\t\t</>\n\t);\n}\n"]}
|
|
@@ -8,7 +8,7 @@ import { kebabCase } from 'lodash';
|
|
|
8
8
|
* WordPress dependencies
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import { useDispatch } from '@wordpress/data';
|
|
11
|
+
import { useDispatch, useSelect } from '@wordpress/data';
|
|
12
12
|
import { BlockSettingsMenuControls, store as blockEditorStore } from '@wordpress/block-editor';
|
|
13
13
|
import { MenuItem } from '@wordpress/components';
|
|
14
14
|
import { createBlock, serialize } from '@wordpress/blocks';
|
|
@@ -22,6 +22,7 @@ import { symbolFilled } from '@wordpress/icons';
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
import CreateTemplatePartModal from '../create-template-part-modal';
|
|
25
|
+
import { store as editSiteStore } from '../../store';
|
|
25
26
|
export default function ConvertToTemplatePart(_ref) {
|
|
26
27
|
let {
|
|
27
28
|
clientIds,
|
|
@@ -37,6 +38,20 @@ export default function ConvertToTemplatePart(_ref) {
|
|
|
37
38
|
const {
|
|
38
39
|
createSuccessNotice
|
|
39
40
|
} = useDispatch(noticesStore);
|
|
41
|
+
const {
|
|
42
|
+
canCreate
|
|
43
|
+
} = useSelect(select => {
|
|
44
|
+
const {
|
|
45
|
+
supportsTemplatePartsMode
|
|
46
|
+
} = select(editSiteStore).getSettings();
|
|
47
|
+
return {
|
|
48
|
+
canCreate: !supportsTemplatePartsMode
|
|
49
|
+
};
|
|
50
|
+
}, []);
|
|
51
|
+
|
|
52
|
+
if (!canCreate) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
40
55
|
|
|
41
56
|
const onConvert = async _ref2 => {
|
|
42
57
|
let {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/components/template-part-converter/convert-to-template-part.js"],"names":["kebabCase","useDispatch","BlockSettingsMenuControls","store","blockEditorStore","MenuItem","createBlock","serialize","__","useState","coreStore","noticesStore","symbolFilled","CreateTemplatePartModal","ConvertToTemplatePart","clientIds","blocks","isModalOpen","setIsModalOpen","replaceBlocks","saveEntityRecord","createSuccessNotice","onConvert","title","area","cleanSlug","replace","templatePart","slug","content","theme","type"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,QAA1B;AAEA;AACA;AACA;;AACA,SAASC,WAAT,
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/template-part-converter/convert-to-template-part.js"],"names":["kebabCase","useDispatch","useSelect","BlockSettingsMenuControls","store","blockEditorStore","MenuItem","createBlock","serialize","__","useState","coreStore","noticesStore","symbolFilled","CreateTemplatePartModal","editSiteStore","ConvertToTemplatePart","clientIds","blocks","isModalOpen","setIsModalOpen","replaceBlocks","saveEntityRecord","createSuccessNotice","canCreate","select","supportsTemplatePartsMode","getSettings","onConvert","title","area","cleanSlug","replace","templatePart","slug","content","theme","type"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,QAA1B;AAEA;AACA;AACA;;AACA,SAASC,WAAT,EAAsBC,SAAtB,QAAuC,iBAAvC;AACA,SACCC,yBADD,EAECC,KAAK,IAAIC,gBAFV,QAGO,yBAHP;AAIA,SAASC,QAAT,QAAyB,uBAAzB;AACA,SAASC,WAAT,EAAsBC,SAAtB,QAAuC,mBAAvC;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASC,QAAT,QAAyB,oBAAzB;AACA,SAASN,KAAK,IAAIO,SAAlB,QAAmC,sBAAnC;AACA,SAASP,KAAK,IAAIQ,YAAlB,QAAsC,oBAAtC;AACA,SAASC,YAAT,QAA6B,kBAA7B;AAEA;AACA;AACA;;AACA,OAAOC,uBAAP,MAAoC,+BAApC;AACA,SAASV,KAAK,IAAIW,aAAlB,QAAuC,aAAvC;AAEA,eAAe,SAASC,qBAAT,OAAwD;AAAA,MAAxB;AAAEC,IAAAA,SAAF;AAAaC,IAAAA;AAAb,GAAwB;AACtE,QAAM,CAAEC,WAAF,EAAeC,cAAf,IAAkCV,QAAQ,CAAE,KAAF,CAAhD;AACA,QAAM;AAAEW,IAAAA;AAAF,MAAoBpB,WAAW,CAAEI,gBAAF,CAArC;AACA,QAAM;AAAEiB,IAAAA;AAAF,MAAuBrB,WAAW,CAAEU,SAAF,CAAxC;AACA,QAAM;AAAEY,IAAAA;AAAF,MAA0BtB,WAAW,CAAEW,YAAF,CAA3C;AAEA,QAAM;AAAEY,IAAAA;AAAF,MAAgBtB,SAAS,CAAIuB,MAAF,IAAc;AAC9C,UAAM;AAAEC,MAAAA;AAAF,QACLD,MAAM,CAAEV,aAAF,CAAN,CAAwBY,WAAxB,EADD;AAEA,WAAO;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AAJZ,IAdF,CADD;AAwBA","sourcesContent":["/**\n * External dependencies\n */\nimport { kebabCase } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tBlockSettingsMenuControls,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { MenuItem } from '@wordpress/components';\nimport { createBlock, serialize } from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { symbolFilled } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport CreateTemplatePartModal from '../create-template-part-modal';\nimport { store as editSiteStore } from '../../store';\n\nexport default function ConvertToTemplatePart( { clientIds, blocks } ) {\n\tconst [ isModalOpen, setIsModalOpen ] = useState( false );\n\tconst { replaceBlocks } = useDispatch( blockEditorStore );\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\n\tconst { canCreate } = useSelect( ( select ) => {\n\t\tconst { supportsTemplatePartsMode } =\n\t\t\tselect( editSiteStore ).getSettings();\n\t\treturn {\n\t\t\tcanCreate: ! supportsTemplatePartsMode,\n\t\t};\n\t}, [] );\n\n\tif ( ! canCreate ) {\n\t\treturn null;\n\t}\n\n\tconst onConvert = async ( { title, area } ) => {\n\t\t// Currently template parts only allow latin chars.\n\t\t// Fallback slug will receive suffix by default.\n\t\tconst cleanSlug =\n\t\t\tkebabCase( title ).replace( /[^\\w-]+/g, '' ) || 'wp-custom-part';\n\n\t\tconst templatePart = await saveEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_template_part',\n\t\t\t{\n\t\t\t\tslug: cleanSlug,\n\t\t\t\ttitle,\n\t\t\t\tcontent: serialize( blocks ),\n\t\t\t\tarea,\n\t\t\t}\n\t\t);\n\t\treplaceBlocks(\n\t\t\tclientIds,\n\t\t\tcreateBlock( 'core/template-part', {\n\t\t\t\tslug: templatePart.slug,\n\t\t\t\ttheme: templatePart.theme,\n\t\t\t} )\n\t\t);\n\t\tcreateSuccessNotice( __( 'Template part created.' ), {\n\t\t\ttype: 'snackbar',\n\t\t} );\n\n\t\t// The modal and this component will be unmounted because of `replaceBlocks` above,\n\t\t// so no need to call `closeModal` or `onClose`.\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<BlockSettingsMenuControls>\n\t\t\t\t{ () => (\n\t\t\t\t\t<MenuItem\n\t\t\t\t\t\ticon={ symbolFilled }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetIsModalOpen( true );\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Create Template part' ) }\n\t\t\t\t\t</MenuItem>\n\t\t\t\t) }\n\t\t\t</BlockSettingsMenuControls>\n\t\t\t{ isModalOpen && (\n\t\t\t\t<CreateTemplatePartModal\n\t\t\t\t\tcloseModal={ () => {\n\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t} }\n\t\t\t\t\tonCreate={ onConvert }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"]}
|
package/build-module/index.js
CHANGED
|
@@ -79,7 +79,10 @@ export function reinitializeEditor(target, settings) {
|
|
|
79
79
|
// screen and land in the list screen.
|
|
80
80
|
dispatch(editSiteStore).setIsNavigationPanelOpened(select(viewportStore).isViewportMatch('medium'));
|
|
81
81
|
}
|
|
82
|
-
}
|
|
82
|
+
} // Prevent the default browser action for files dropped outside of dropzones.
|
|
83
|
+
|
|
84
|
+
window.addEventListener('dragover', e => e.preventDefault(), false);
|
|
85
|
+
window.addEventListener('drop', e => e.preventDefault(), false);
|
|
83
86
|
render(createElement(EditSiteApp, {
|
|
84
87
|
reboot: reboot
|
|
85
88
|
}), target);
|
|
@@ -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","interfaceStore","preferencesStore","__","viewportStore","getQueryArgs","editSiteStore","EditSiteApp","getIsListPage","ErrorBoundaryWarning","reinitializeEditor","target","settings","__unstableHomeTemplate","reboot","bind","setDefaults","editorMode","fixedToolbar","focusMode","keepCaretInsideBlock","welcomeGuide","welcomeGuideStyles","showListViewByDefault","get","setIsListViewOpened","setDefaultComplementaryArea","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,cAAlB,QAAwC,sBAAxC;AACA,SAASb,KAAK,IAAIc,gBAAlB,QAA0C,wBAA1C;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SAASf,KAAK,IAAIgB,aAAlB,QAAuC,qBAAvC;AACA,SAASC,YAAT,QAA6B,gBAA7B;AAEA;AACA;AACA;;AACA,OAAO,SAAP;AACA,SAASjB,KAAK,IAAIkB,aAAlB,QAAuC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AAEc,aAAF,CAAR,CAA0BqB,cAA1B,CAA0Cf,QAA1C,EA1BD,CA4BC;AACA;AACA;AACA;;AACApB,IAAAA,QAAQ,CAAEQ,WAAF,CAAR,CAAwB4B,oBAAxB,CAA8C;AAC7CC,MAAAA,oBAAoB,EAAEjB,QAAQ,CAACiB,oBADc;AAE7CC,MAAAA,wBAAwB,EAAElB,QAAQ,CAACkB;AAFU,KAA9C;AAKA,UAAMC,mBAAmB,GAAGvB,aAAa,CACxCH,YAAY,CAAE2B,MAAM,CAACC,QAAP,CAAgBC,IAAlB,CAD4B,CAAzC;;AAIA,QAAKH,mBAAL,EAA2B;AAC1B;AACA;AACAvC,MAAAA,QAAQ,CAAEc,aAAF,CAAR,CAA0B6B,0BAA1B,CACC1C,MAAM,CAAEW,aAAF,CAAN,CAAwBgC,eAAxB,CAAyC,QAAzC,CADD;AAGA;AACD;
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/index.js"],"names":["store","blocksStore","registerCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","dispatch","select","render","unmountComponentAtNode","__experimentalFetchLinkSuggestions","fetchLinkSuggestions","__experimentalFetchUrlData","fetchUrlData","editorStore","interfaceStore","preferencesStore","__","viewportStore","getQueryArgs","editSiteStore","EditSiteApp","getIsListPage","ErrorBoundaryWarning","reinitializeEditor","target","settings","__unstableHomeTemplate","reboot","bind","setDefaults","editorMode","fixedToolbar","focusMode","keepCaretInsideBlock","welcomeGuide","welcomeGuideStyles","showListViewByDefault","get","setIsListViewOpened","setDefaultComplementaryArea","updateSettings","updateEditorSettings","defaultTemplateTypes","defaultTemplatePartAreas","isLandingOnListPage","window","location","href","setIsNavigationPanelOpened","isViewportMatch","addEventListener","e","preventDefault","initializeEditor","id","search","searchOptions","__experimentalFetchRichUrlData","document","getElementById","__experimentalReapplyBlockTypeFilters","process","env","IS_GUTENBERG_PLUGIN","enableFSEBlocks","default","__experimentalMainDashboardButton","__experimentalNavigationToggle","PluginSidebar","PluginSidebar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ocks';\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 interfaceStore } from '@wordpress/interface';\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\tshowListViewByDefault: false,\n\t\t} );\n\n\t\t// Check if the block list view should be open by default.\n\t\tif (\n\t\t\tselect( preferencesStore ).get(\n\t\t\t\t'core/edit-site',\n\t\t\t\t'showListViewByDefault'\n\t\t\t)\n\t\t) {\n\t\t\tdispatch( editSiteStore ).setIsListViewOpened( true );\n\t\t}\n\n\t\tdispatch( interfaceStore ).setDefaultComplementaryArea(\n\t\t\t'core/edit-site',\n\t\t\t'edit-site/template'\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\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\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"]}
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
top: 0;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
.interface-complementary-area p {
|
|
163
|
+
.interface-complementary-area p:not(.components-base-control__help) {
|
|
164
164
|
margin-top: 0;
|
|
165
165
|
}
|
|
166
166
|
.interface-complementary-area h2 {
|
|
@@ -505,6 +505,10 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
505
505
|
margin: 0;
|
|
506
506
|
}
|
|
507
507
|
|
|
508
|
+
.interface-preferences-modal__section-legend {
|
|
509
|
+
margin-bottom: 8px;
|
|
510
|
+
}
|
|
511
|
+
|
|
508
512
|
.interface-preferences-modal__section-title {
|
|
509
513
|
font-size: 0.9rem;
|
|
510
514
|
font-weight: 600;
|
|
@@ -518,20 +522,12 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
518
522
|
color: #757575;
|
|
519
523
|
}
|
|
520
524
|
|
|
521
|
-
.interface-preferences-modal__option
|
|
522
|
-
|
|
523
|
-
display: flex;
|
|
524
|
-
margin-bottom: 0;
|
|
525
|
-
}
|
|
526
|
-
.interface-preferences-modal__option .components-base-control .components-base-control__field > label {
|
|
527
|
-
flex-grow: 1;
|
|
528
|
-
padding: 0.6rem 10px 0.6rem 0;
|
|
525
|
+
.interface-preferences-modal__option + .interface-preferences-modal__option {
|
|
526
|
+
margin-top: 16px;
|
|
529
527
|
}
|
|
530
528
|
.interface-preferences-modal__option .components-base-control__help {
|
|
531
|
-
margin:
|
|
532
|
-
|
|
533
|
-
font-style: normal;
|
|
534
|
-
color: #757575;
|
|
529
|
+
margin-top: 0;
|
|
530
|
+
margin-right: 48px;
|
|
535
531
|
}
|
|
536
532
|
|
|
537
533
|
.edit-site-block-editor__editor-styles-wrapper .components-button {
|
|
@@ -609,15 +605,14 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
609
605
|
}
|
|
610
606
|
.edit-site-code-editor__body {
|
|
611
607
|
width: 100%;
|
|
612
|
-
padding:
|
|
608
|
+
padding: 12px;
|
|
613
609
|
max-width: 1080px;
|
|
614
610
|
margin-right: auto;
|
|
615
611
|
margin-left: auto;
|
|
616
612
|
}
|
|
617
613
|
@media (min-width: 960px) {
|
|
618
614
|
.edit-site-code-editor__body {
|
|
619
|
-
padding:
|
|
620
|
-
padding: 0 24px 24px 24px;
|
|
615
|
+
padding: 24px;
|
|
621
616
|
}
|
|
622
617
|
}
|
|
623
618
|
.edit-site-code-editor__toolbar {
|
|
@@ -940,6 +935,14 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
|
|
|
940
935
|
}
|
|
941
936
|
}
|
|
942
937
|
|
|
938
|
+
.edit-site-header__actions__preview-options {
|
|
939
|
+
opacity: 1;
|
|
940
|
+
transition: opacity 0.3s;
|
|
941
|
+
}
|
|
942
|
+
.edit-site-header__actions__preview-options.is-zoomed-out {
|
|
943
|
+
opacity: 0;
|
|
944
|
+
}
|
|
945
|
+
|
|
943
946
|
.edit-site-header__actions-more-menu {
|
|
944
947
|
margin-right: -4px;
|
|
945
948
|
}
|
|
@@ -2204,31 +2207,40 @@ html.wp-toolbar {
|
|
|
2204
2207
|
background: #fff;
|
|
2205
2208
|
}
|
|
2206
2209
|
|
|
2210
|
+
body.appearance_page_gutenberg-template-parts,
|
|
2207
2211
|
body.site-editor-php {
|
|
2208
2212
|
background: #fff;
|
|
2209
2213
|
/* We hide legacy notices in Gutenberg Based Pages, because they were not designed in a way that scaled well.
|
|
2210
2214
|
Plugins can use Gutenberg notices if they need to pass on information to the user when they are editing. */
|
|
2211
2215
|
}
|
|
2216
|
+
body.appearance_page_gutenberg-template-parts #wpcontent,
|
|
2212
2217
|
body.site-editor-php #wpcontent {
|
|
2213
2218
|
padding-right: 0;
|
|
2214
2219
|
}
|
|
2220
|
+
body.appearance_page_gutenberg-template-parts #wpbody-content,
|
|
2215
2221
|
body.site-editor-php #wpbody-content {
|
|
2216
2222
|
padding-bottom: 0;
|
|
2217
2223
|
}
|
|
2224
|
+
body.appearance_page_gutenberg-template-parts #wpbody-content > div:not(.edit-site):not(#screen-meta),
|
|
2218
2225
|
body.site-editor-php #wpbody-content > div:not(.edit-site):not(#screen-meta) {
|
|
2219
2226
|
display: none;
|
|
2220
2227
|
}
|
|
2228
|
+
body.appearance_page_gutenberg-template-parts #wpfooter,
|
|
2221
2229
|
body.site-editor-php #wpfooter {
|
|
2222
2230
|
display: none;
|
|
2223
2231
|
}
|
|
2232
|
+
body.appearance_page_gutenberg-template-parts .a11y-speak-region,
|
|
2224
2233
|
body.site-editor-php .a11y-speak-region {
|
|
2225
2234
|
right: -1px;
|
|
2226
2235
|
top: -1px;
|
|
2227
2236
|
}
|
|
2237
|
+
body.appearance_page_gutenberg-template-parts ul#adminmenu a.wp-has-current-submenu::after,
|
|
2238
|
+
body.appearance_page_gutenberg-template-parts ul#adminmenu > li.current > a.current::after,
|
|
2228
2239
|
body.site-editor-php ul#adminmenu a.wp-has-current-submenu::after,
|
|
2229
2240
|
body.site-editor-php ul#adminmenu > li.current > a.current::after {
|
|
2230
2241
|
border-left-color: #fff;
|
|
2231
2242
|
}
|
|
2243
|
+
body.appearance_page_gutenberg-template-parts .media-frame select.attachment-filters:last-of-type,
|
|
2232
2244
|
body.site-editor-php .media-frame select.attachment-filters:last-of-type {
|
|
2233
2245
|
width: auto;
|
|
2234
2246
|
max-width: 100%;
|
package/build-style/style.css
CHANGED
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
top: 0;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
.interface-complementary-area p {
|
|
163
|
+
.interface-complementary-area p:not(.components-base-control__help) {
|
|
164
164
|
margin-top: 0;
|
|
165
165
|
}
|
|
166
166
|
.interface-complementary-area h2 {
|
|
@@ -505,6 +505,10 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
505
505
|
margin: 0;
|
|
506
506
|
}
|
|
507
507
|
|
|
508
|
+
.interface-preferences-modal__section-legend {
|
|
509
|
+
margin-bottom: 8px;
|
|
510
|
+
}
|
|
511
|
+
|
|
508
512
|
.interface-preferences-modal__section-title {
|
|
509
513
|
font-size: 0.9rem;
|
|
510
514
|
font-weight: 600;
|
|
@@ -518,20 +522,12 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
518
522
|
color: #757575;
|
|
519
523
|
}
|
|
520
524
|
|
|
521
|
-
.interface-preferences-modal__option
|
|
522
|
-
|
|
523
|
-
display: flex;
|
|
524
|
-
margin-bottom: 0;
|
|
525
|
-
}
|
|
526
|
-
.interface-preferences-modal__option .components-base-control .components-base-control__field > label {
|
|
527
|
-
flex-grow: 1;
|
|
528
|
-
padding: 0.6rem 0 0.6rem 10px;
|
|
525
|
+
.interface-preferences-modal__option + .interface-preferences-modal__option {
|
|
526
|
+
margin-top: 16px;
|
|
529
527
|
}
|
|
530
528
|
.interface-preferences-modal__option .components-base-control__help {
|
|
531
|
-
margin:
|
|
532
|
-
|
|
533
|
-
font-style: normal;
|
|
534
|
-
color: #757575;
|
|
529
|
+
margin-top: 0;
|
|
530
|
+
margin-left: 48px;
|
|
535
531
|
}
|
|
536
532
|
|
|
537
533
|
.edit-site-block-editor__editor-styles-wrapper .components-button {
|
|
@@ -609,15 +605,14 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
609
605
|
}
|
|
610
606
|
.edit-site-code-editor__body {
|
|
611
607
|
width: 100%;
|
|
612
|
-
padding:
|
|
608
|
+
padding: 12px;
|
|
613
609
|
max-width: 1080px;
|
|
614
610
|
margin-left: auto;
|
|
615
611
|
margin-right: auto;
|
|
616
612
|
}
|
|
617
613
|
@media (min-width: 960px) {
|
|
618
614
|
.edit-site-code-editor__body {
|
|
619
|
-
padding:
|
|
620
|
-
padding: 0 24px 24px 24px;
|
|
615
|
+
padding: 24px;
|
|
621
616
|
}
|
|
622
617
|
}
|
|
623
618
|
.edit-site-code-editor__toolbar {
|
|
@@ -940,6 +935,14 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
|
|
|
940
935
|
}
|
|
941
936
|
}
|
|
942
937
|
|
|
938
|
+
.edit-site-header__actions__preview-options {
|
|
939
|
+
opacity: 1;
|
|
940
|
+
transition: opacity 0.3s;
|
|
941
|
+
}
|
|
942
|
+
.edit-site-header__actions__preview-options.is-zoomed-out {
|
|
943
|
+
opacity: 0;
|
|
944
|
+
}
|
|
945
|
+
|
|
943
946
|
.edit-site-header__actions-more-menu {
|
|
944
947
|
margin-left: -4px;
|
|
945
948
|
}
|
|
@@ -2204,31 +2207,40 @@ html.wp-toolbar {
|
|
|
2204
2207
|
background: #fff;
|
|
2205
2208
|
}
|
|
2206
2209
|
|
|
2210
|
+
body.appearance_page_gutenberg-template-parts,
|
|
2207
2211
|
body.site-editor-php {
|
|
2208
2212
|
background: #fff;
|
|
2209
2213
|
/* We hide legacy notices in Gutenberg Based Pages, because they were not designed in a way that scaled well.
|
|
2210
2214
|
Plugins can use Gutenberg notices if they need to pass on information to the user when they are editing. */
|
|
2211
2215
|
}
|
|
2216
|
+
body.appearance_page_gutenberg-template-parts #wpcontent,
|
|
2212
2217
|
body.site-editor-php #wpcontent {
|
|
2213
2218
|
padding-left: 0;
|
|
2214
2219
|
}
|
|
2220
|
+
body.appearance_page_gutenberg-template-parts #wpbody-content,
|
|
2215
2221
|
body.site-editor-php #wpbody-content {
|
|
2216
2222
|
padding-bottom: 0;
|
|
2217
2223
|
}
|
|
2224
|
+
body.appearance_page_gutenberg-template-parts #wpbody-content > div:not(.edit-site):not(#screen-meta),
|
|
2218
2225
|
body.site-editor-php #wpbody-content > div:not(.edit-site):not(#screen-meta) {
|
|
2219
2226
|
display: none;
|
|
2220
2227
|
}
|
|
2228
|
+
body.appearance_page_gutenberg-template-parts #wpfooter,
|
|
2221
2229
|
body.site-editor-php #wpfooter {
|
|
2222
2230
|
display: none;
|
|
2223
2231
|
}
|
|
2232
|
+
body.appearance_page_gutenberg-template-parts .a11y-speak-region,
|
|
2224
2233
|
body.site-editor-php .a11y-speak-region {
|
|
2225
2234
|
left: -1px;
|
|
2226
2235
|
top: -1px;
|
|
2227
2236
|
}
|
|
2237
|
+
body.appearance_page_gutenberg-template-parts ul#adminmenu a.wp-has-current-submenu::after,
|
|
2238
|
+
body.appearance_page_gutenberg-template-parts ul#adminmenu > li.current > a.current::after,
|
|
2228
2239
|
body.site-editor-php ul#adminmenu a.wp-has-current-submenu::after,
|
|
2229
2240
|
body.site-editor-php ul#adminmenu > li.current > a.current::after {
|
|
2230
2241
|
border-right-color: #fff;
|
|
2231
2242
|
}
|
|
2243
|
+
body.appearance_page_gutenberg-template-parts .media-frame select.attachment-filters:last-of-type,
|
|
2232
2244
|
body.site-editor-php .media-frame select.attachment-filters:last-of-type {
|
|
2233
2245
|
width: auto;
|
|
2234
2246
|
max-width: 100%;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-site",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.14.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": "^
|
|
36
|
-
"@wordpress/compose": "^5.
|
|
37
|
-
"@wordpress/core-data": "^5.0.
|
|
38
|
-
"@wordpress/data": "^7.
|
|
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": "^9.
|
|
46
|
-
"@wordpress/interface": "^4.
|
|
47
|
-
"@wordpress/keyboard-shortcuts": "^3.
|
|
48
|
-
"@wordpress/keycodes": "^3.
|
|
49
|
-
"@wordpress/media-utils": "^4.
|
|
50
|
-
"@wordpress/notices": "^3.
|
|
51
|
-
"@wordpress/plugins": "^4.
|
|
52
|
-
"@wordpress/preferences": "^2.
|
|
53
|
-
"@wordpress/reusable-blocks": "^3.
|
|
54
|
-
"@wordpress/style-engine": "^0.
|
|
55
|
-
"@wordpress/url": "^3.
|
|
56
|
-
"@wordpress/viewport": "^4.
|
|
30
|
+
"@wordpress/a11y": "^3.17.0",
|
|
31
|
+
"@wordpress/api-fetch": "^6.14.0",
|
|
32
|
+
"@wordpress/block-editor": "^10.0.0",
|
|
33
|
+
"@wordpress/block-library": "^7.14.0",
|
|
34
|
+
"@wordpress/blocks": "^11.16.0",
|
|
35
|
+
"@wordpress/components": "^21.0.0",
|
|
36
|
+
"@wordpress/compose": "^5.15.0",
|
|
37
|
+
"@wordpress/core-data": "^5.0.0",
|
|
38
|
+
"@wordpress/data": "^7.1.0",
|
|
39
|
+
"@wordpress/deprecated": "^3.17.0",
|
|
40
|
+
"@wordpress/editor": "^12.16.0",
|
|
41
|
+
"@wordpress/element": "^4.15.0",
|
|
42
|
+
"@wordpress/hooks": "^3.17.0",
|
|
43
|
+
"@wordpress/html-entities": "^3.17.0",
|
|
44
|
+
"@wordpress/i18n": "^4.17.0",
|
|
45
|
+
"@wordpress/icons": "^9.8.0",
|
|
46
|
+
"@wordpress/interface": "^4.16.0",
|
|
47
|
+
"@wordpress/keyboard-shortcuts": "^3.15.0",
|
|
48
|
+
"@wordpress/keycodes": "^3.17.0",
|
|
49
|
+
"@wordpress/media-utils": "^4.8.0",
|
|
50
|
+
"@wordpress/notices": "^3.17.0",
|
|
51
|
+
"@wordpress/plugins": "^4.15.0",
|
|
52
|
+
"@wordpress/preferences": "^2.9.0",
|
|
53
|
+
"@wordpress/reusable-blocks": "^3.15.0",
|
|
54
|
+
"@wordpress/style-engine": "^0.16.0",
|
|
55
|
+
"@wordpress/url": "^3.18.0",
|
|
56
|
+
"@wordpress/viewport": "^4.15.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": "0d732d4b184adcb28cc83087603e81b764390d4b"
|
|
72
72
|
}
|