@wordpress/edit-post 7.35.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/build/commands/use-commands.js +56 -0
- package/build/commands/use-commands.js.map +1 -0
- package/build/components/{header/fullscreen-mode-close/index.js → back-button/fullscreen-mode-close.js} +16 -14
- package/build/components/back-button/fullscreen-mode-close.js.map +1 -0
- package/build/components/back-button/index.js +57 -0
- package/build/components/back-button/index.js.map +1 -0
- package/build/components/header/header-toolbar/index.native.js +63 -62
- package/build/components/header/header-toolbar/index.native.js.map +1 -1
- package/build/components/header/index.native.js +2 -2
- package/build/components/header/index.native.js.map +1 -1
- package/build/components/init-pattern-modal/index.js +50 -43
- package/build/components/init-pattern-modal/index.js.map +1 -1
- package/build/components/layout/index.js +92 -146
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/index.native.js +28 -21
- package/build/components/layout/index.native.js.map +1 -1
- package/build/components/layout/use-padding-appender.js.map +1 -0
- package/build/components/layout/use-should-iframe.js +46 -0
- package/build/components/layout/use-should-iframe.js.map +1 -0
- package/build/components/meta-boxes/index.js +10 -9
- package/build/components/meta-boxes/index.js.map +1 -1
- package/build/components/meta-boxes/meta-boxes-area/index.js +11 -11
- package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build/components/more-menu/index.js +49 -0
- package/build/components/more-menu/index.js.map +1 -0
- package/build/components/{header/more-menu → more-menu}/manage-patterns-menu-item.js +5 -4
- package/build/components/more-menu/manage-patterns-menu-item.js.map +1 -0
- package/build/components/{header/more-menu → more-menu}/welcome-guide-menu-item.js +2 -2
- package/build/components/more-menu/welcome-guide-menu-item.js.map +1 -0
- package/build/components/preferences-modal/enable-custom-fields.js +23 -18
- package/build/components/preferences-modal/enable-custom-fields.js.map +1 -1
- package/build/components/preferences-modal/index.js +4 -4
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/preferences-modal/meta-boxes-section.js +13 -13
- package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build/components/visual-editor/header.native.js +11 -10
- package/build/components/visual-editor/header.native.js.map +1 -1
- package/build/components/visual-editor/index.native.js +3 -3
- package/build/components/visual-editor/index.native.js.map +1 -1
- package/build/components/welcome-guide/default.js +50 -33
- package/build/components/welcome-guide/default.js.map +1 -1
- package/build/components/welcome-guide/image.js +13 -12
- package/build/components/welcome-guide/image.js.map +1 -1
- package/build/components/welcome-guide/index.js +2 -2
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/components/welcome-guide/template.js +12 -8
- package/build/components/welcome-guide/template.js.map +1 -1
- package/build/deprecated.js +9 -9
- package/build/deprecated.js.map +1 -1
- package/build/editor.js +16 -11
- package/build/editor.js.map +1 -1
- package/build/editor.native.js +18 -12
- package/build/editor.native.js.map +1 -1
- package/build/index.js +12 -13
- package/build/index.js.map +1 -1
- package/build/index.native.js +2 -2
- package/build/index.native.js.map +1 -1
- package/build/store/selectors.js +1 -1
- package/build/store/selectors.js.map +1 -1
- package/build-module/commands/use-commands.js +49 -0
- package/build-module/commands/use-commands.js.map +1 -0
- package/build-module/components/{header/fullscreen-mode-close/index.js → back-button/fullscreen-mode-close.js} +16 -14
- package/build-module/components/back-button/fullscreen-mode-close.js.map +1 -0
- package/build-module/components/back-button/index.js +49 -0
- package/build-module/components/back-button/index.js.map +1 -0
- package/build-module/components/header/header-toolbar/index.native.js +64 -62
- package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
- package/build-module/components/header/index.native.js +2 -2
- package/build-module/components/header/index.native.js.map +1 -1
- package/build-module/components/init-pattern-modal/index.js +52 -43
- package/build-module/components/init-pattern-modal/index.js.map +1 -1
- package/build-module/components/layout/index.js +97 -149
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/index.native.js +30 -21
- package/build-module/components/layout/index.native.js.map +1 -1
- package/build-module/components/layout/use-padding-appender.js.map +1 -0
- package/build-module/components/layout/use-should-iframe.js +39 -0
- package/build-module/components/layout/use-should-iframe.js.map +1 -0
- package/build-module/components/meta-boxes/index.js +12 -9
- package/build-module/components/meta-boxes/index.js.map +1 -1
- package/build-module/components/meta-boxes/meta-boxes-area/index.js +11 -9
- package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
- package/build-module/components/more-menu/index.js +43 -0
- package/build-module/components/more-menu/index.js.map +1 -0
- package/build-module/components/{header/more-menu → more-menu}/manage-patterns-menu-item.js +5 -4
- package/build-module/components/more-menu/manage-patterns-menu-item.js.map +1 -0
- package/build-module/components/{header/more-menu → more-menu}/welcome-guide-menu-item.js +2 -2
- package/build-module/components/more-menu/welcome-guide-menu-item.js.map +1 -0
- package/build-module/components/preferences-modal/enable-custom-fields.js +25 -18
- package/build-module/components/preferences-modal/enable-custom-fields.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +4 -4
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/preferences-modal/meta-boxes-section.js +14 -13
- package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build-module/components/visual-editor/header.native.js +11 -10
- package/build-module/components/visual-editor/header.native.js.map +1 -1
- package/build-module/components/visual-editor/index.native.js +3 -3
- package/build-module/components/visual-editor/index.native.js.map +1 -1
- package/build-module/components/welcome-guide/default.js +52 -33
- package/build-module/components/welcome-guide/default.js.map +1 -1
- package/build-module/components/welcome-guide/image.js +14 -12
- package/build-module/components/welcome-guide/image.js.map +1 -1
- package/build-module/components/welcome-guide/index.js +2 -2
- package/build-module/components/welcome-guide/index.js.map +1 -1
- package/build-module/components/welcome-guide/template.js +14 -8
- package/build-module/components/welcome-guide/template.js.map +1 -1
- package/build-module/deprecated.js +9 -9
- package/build-module/deprecated.js.map +1 -1
- package/build-module/editor.js +17 -11
- package/build-module/editor.js.map +1 -1
- package/build-module/editor.native.js +18 -12
- package/build-module/editor.native.js.map +1 -1
- package/build-module/index.js +10 -7
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +2 -2
- package/build-module/index.native.js.map +1 -1
- package/build-module/store/selectors.js +1 -1
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +27 -128
- package/build-style/style.css +27 -128
- package/package.json +32 -32
- package/src/commands/use-commands.js +48 -0
- package/src/components/{header/fullscreen-mode-close/index.js → back-button/fullscreen-mode-close.js} +1 -1
- package/src/components/back-button/index.js +34 -0
- package/src/components/{header/fullscreen-mode-close → back-button}/style.scss +16 -2
- package/src/components/{header/fullscreen-mode-close/test/index.js → back-button/test/fullscreen-mode-close.js} +1 -1
- package/src/components/layout/index.js +85 -194
- package/src/components/layout/style.scss +9 -17
- package/src/components/layout/use-should-iframe.js +40 -0
- package/src/components/{header/more-menu → more-menu}/index.js +2 -2
- package/src/index.js +11 -6
- package/src/store/selectors.js +8 -5
- package/src/style.scss +2 -5
- package/src/test/__snapshots__/editor.native.js.snap +72 -0
- package/src/test/editor.native.js +77 -0
- package/build/components/header/fullscreen-mode-close/index.js.map +0 -1
- package/build/components/header/index.js +0 -69
- package/build/components/header/index.js.map +0 -1
- package/build/components/header/main-dashboard-button/index.js +0 -33
- package/build/components/header/main-dashboard-button/index.js.map +0 -1
- package/build/components/header/more-menu/index.js +0 -43
- package/build/components/header/more-menu/index.js.map +0 -1
- package/build/components/header/more-menu/manage-patterns-menu-item.js.map +0 -1
- package/build/components/header/more-menu/welcome-guide-menu-item.js.map +0 -1
- package/build/components/text-editor/index.js +0 -61
- package/build/components/text-editor/index.js.map +0 -1
- package/build/components/visual-editor/block-inspector-button.js +0 -55
- package/build/components/visual-editor/block-inspector-button.js.map +0 -1
- package/build/components/visual-editor/index.js +0 -98
- package/build/components/visual-editor/index.js.map +0 -1
- package/build/components/visual-editor/use-padding-appender.js.map +0 -1
- package/build/hooks/commands/use-common-commands.js +0 -119
- package/build/hooks/commands/use-common-commands.js.map +0 -1
- package/build/hooks/components/index.js +0 -11
- package/build/hooks/components/index.js.map +0 -1
- package/build/hooks/index.js +0 -5
- package/build/hooks/index.js.map +0 -1
- package/build/hooks/validate-multiple-use/index.js +0 -134
- package/build/hooks/validate-multiple-use/index.js.map +0 -1
- package/build-module/components/header/fullscreen-mode-close/index.js.map +0 -1
- package/build-module/components/header/index.js +0 -61
- package/build-module/components/header/index.js.map +0 -1
- package/build-module/components/header/main-dashboard-button/index.js +0 -26
- package/build-module/components/header/main-dashboard-button/index.js.map +0 -1
- package/build-module/components/header/more-menu/index.js +0 -35
- package/build-module/components/header/more-menu/index.js.map +0 -1
- package/build-module/components/header/more-menu/manage-patterns-menu-item.js.map +0 -1
- package/build-module/components/header/more-menu/welcome-guide-menu-item.js.map +0 -1
- package/build-module/components/text-editor/index.js +0 -54
- package/build-module/components/text-editor/index.js.map +0 -1
- package/build-module/components/visual-editor/block-inspector-button.js +0 -47
- package/build-module/components/visual-editor/block-inspector-button.js.map +0 -1
- package/build-module/components/visual-editor/index.js +0 -90
- package/build-module/components/visual-editor/index.js.map +0 -1
- package/build-module/components/visual-editor/use-padding-appender.js.map +0 -1
- package/build-module/hooks/commands/use-common-commands.js +0 -112
- package/build-module/hooks/commands/use-common-commands.js.map +0 -1
- package/build-module/hooks/components/index.js +0 -8
- package/build-module/hooks/components/index.js.map +0 -1
- package/build-module/hooks/index.js +0 -6
- package/build-module/hooks/index.js.map +0 -1
- package/build-module/hooks/validate-multiple-use/index.js +0 -132
- package/build-module/hooks/validate-multiple-use/index.js.map +0 -1
- package/src/components/header/index.js +0 -53
- package/src/components/header/main-dashboard-button/index.js +0 -28
- package/src/components/header/style.scss +0 -14
- package/src/components/text-editor/index.js +0 -63
- package/src/components/text-editor/style.scss +0 -71
- package/src/components/visual-editor/block-inspector-button.js +0 -59
- package/src/components/visual-editor/index.js +0 -108
- package/src/components/visual-editor/style.scss +0 -53
- package/src/hooks/commands/use-common-commands.js +0 -126
- package/src/hooks/components/index.js +0 -13
- package/src/hooks/index.js +0 -5
- package/src/hooks/validate-multiple-use/index.js +0 -163
- /package/build/components/{visual-editor → layout}/use-padding-appender.js +0 -0
- /package/build-module/components/{visual-editor → layout}/use-padding-appender.js +0 -0
- /package/src/components/{header/fullscreen-mode-close/test/__snapshots__/index.js.snap → back-button/test/__snapshots__/fullscreen-mode-close.js.snap} +0 -0
- /package/src/components/{visual-editor → layout}/use-padding-appender.js +0 -0
- /package/src/components/{header/more-menu → more-menu}/manage-patterns-menu-item.js +0 -0
- /package/src/components/{header/more-menu → more-menu}/welcome-guide-menu-item.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Component","BlockList","Header","VisualEditor","constructor","props","renderHeader","bind","setTitleRef","
|
|
1
|
+
{"version":3,"names":["Component","BlockList","Header","jsx","_jsx","VisualEditor","constructor","props","renderHeader","bind","setTitleRef","render","safeAreaBottomInset","header"],"sources":["@wordpress/edit-post/src/components/visual-editor/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { BlockList } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport Header from './header';\n\nexport default class VisualEditor extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.renderHeader = this.renderHeader.bind( this );\n\t}\n\n\trenderHeader() {\n\t\tconst { setTitleRef } = this.props;\n\t\treturn <Header setTitleRef={ setTitleRef } />;\n\t}\n\n\trender() {\n\t\tconst { safeAreaBottomInset } = this.props;\n\n\t\treturn (\n\t\t\t<BlockList\n\t\t\t\theader={ this.renderHeader }\n\t\t\t\tsafeAreaBottomInset={ safeAreaBottomInset }\n\t\t\t/>\n\t\t);\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,SAAS,QAAQ,yBAAyB;;AAEnD;AACA;AACA;AACA,OAAOC,MAAM,MAAM,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE9B,eAAe,MAAMC,YAAY,SAASL,SAAS,CAAC;EACnDM,WAAWA,CAAEC,KAAK,EAAG;IACpB,KAAK,CAAEA,KAAM,CAAC;IACd,IAAI,CAACC,YAAY,GAAG,IAAI,CAACA,YAAY,CAACC,IAAI,CAAE,IAAK,CAAC;EACnD;EAEAD,YAAYA,CAAA,EAAG;IACd,MAAM;MAAEE;IAAY,CAAC,GAAG,IAAI,CAACH,KAAK;IAClC,oBAAOH,IAAA,CAACF,MAAM;MAACQ,WAAW,EAAGA;IAAa,CAAE,CAAC;EAC9C;EAEAC,MAAMA,CAAA,EAAG;IACR,MAAM;MAAEC;IAAoB,CAAC,GAAG,IAAI,CAACL,KAAK;IAE1C,oBACCH,IAAA,CAACH,SAAS;MACTY,MAAM,EAAG,IAAI,CAACL,YAAc;MAC5BI,mBAAmB,EAAGA;IAAqB,CAC3C,CAAC;EAEJ;AACD","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement, Fragment } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* WordPress dependencies
|
|
4
3
|
*/
|
|
@@ -12,62 +11,82 @@ import { createInterpolateElement } from '@wordpress/element';
|
|
|
12
11
|
*/
|
|
13
12
|
import WelcomeGuideImage from './image';
|
|
14
13
|
import { store as editPostStore } from '../../store';
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
16
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
17
|
export default function WelcomeGuideDefault() {
|
|
16
18
|
const {
|
|
17
19
|
toggleFeature
|
|
18
20
|
} = useDispatch(editPostStore);
|
|
19
|
-
return
|
|
21
|
+
return /*#__PURE__*/_jsx(Guide, {
|
|
20
22
|
className: "edit-post-welcome-guide",
|
|
21
23
|
contentLabel: __('Welcome to the block editor'),
|
|
22
24
|
finishButtonText: __('Get started'),
|
|
23
25
|
onFinish: () => toggleFeature('welcomeGuide'),
|
|
24
26
|
pages: [{
|
|
25
|
-
image:
|
|
27
|
+
image: /*#__PURE__*/_jsx(WelcomeGuideImage, {
|
|
26
28
|
nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.svg",
|
|
27
29
|
animatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.gif"
|
|
28
30
|
}),
|
|
29
|
-
content:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
content: /*#__PURE__*/_jsxs(_Fragment, {
|
|
32
|
+
children: [/*#__PURE__*/_jsx("h1", {
|
|
33
|
+
className: "edit-post-welcome-guide__heading",
|
|
34
|
+
children: __('Welcome to the block editor')
|
|
35
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
36
|
+
className: "edit-post-welcome-guide__text",
|
|
37
|
+
children: __('In the WordPress editor, each paragraph, image, or video is presented as a distinct “block” of content.')
|
|
38
|
+
})]
|
|
39
|
+
})
|
|
34
40
|
}, {
|
|
35
|
-
image:
|
|
41
|
+
image: /*#__PURE__*/_jsx(WelcomeGuideImage, {
|
|
36
42
|
nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-editor.svg",
|
|
37
43
|
animatedSrc: "https://s.w.org/images/block-editor/welcome-editor.gif"
|
|
38
44
|
}),
|
|
39
|
-
content:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
content: /*#__PURE__*/_jsxs(_Fragment, {
|
|
46
|
+
children: [/*#__PURE__*/_jsx("h1", {
|
|
47
|
+
className: "edit-post-welcome-guide__heading",
|
|
48
|
+
children: __('Make each block your own')
|
|
49
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
50
|
+
className: "edit-post-welcome-guide__text",
|
|
51
|
+
children: __('Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.')
|
|
52
|
+
})]
|
|
53
|
+
})
|
|
44
54
|
}, {
|
|
45
|
-
image:
|
|
55
|
+
image: /*#__PURE__*/_jsx(WelcomeGuideImage, {
|
|
46
56
|
nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-library.svg",
|
|
47
57
|
animatedSrc: "https://s.w.org/images/block-editor/welcome-library.gif"
|
|
48
58
|
}),
|
|
49
|
-
content:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
content: /*#__PURE__*/_jsxs(_Fragment, {
|
|
60
|
+
children: [/*#__PURE__*/_jsx("h1", {
|
|
61
|
+
className: "edit-post-welcome-guide__heading",
|
|
62
|
+
children: __('Get to know the block library')
|
|
63
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
64
|
+
className: "edit-post-welcome-guide__text",
|
|
65
|
+
children: createInterpolateElement(__('All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon.'), {
|
|
66
|
+
InserterIconImage: /*#__PURE__*/_jsx("img", {
|
|
67
|
+
alt: __('inserter'),
|
|
68
|
+
src: "data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A"
|
|
69
|
+
})
|
|
70
|
+
})
|
|
71
|
+
})]
|
|
72
|
+
})
|
|
59
73
|
}, {
|
|
60
|
-
image:
|
|
74
|
+
image: /*#__PURE__*/_jsx(WelcomeGuideImage, {
|
|
61
75
|
nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.svg",
|
|
62
76
|
animatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.gif"
|
|
63
77
|
}),
|
|
64
|
-
content:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
78
|
+
content: /*#__PURE__*/_jsxs(_Fragment, {
|
|
79
|
+
children: [/*#__PURE__*/_jsx("h1", {
|
|
80
|
+
className: "edit-post-welcome-guide__heading",
|
|
81
|
+
children: __('Learn how to use the block editor')
|
|
82
|
+
}), /*#__PURE__*/_jsxs("p", {
|
|
83
|
+
className: "edit-post-welcome-guide__text",
|
|
84
|
+
children: [__('New to the block editor? Want to learn more about using it? '), /*#__PURE__*/_jsx(ExternalLink, {
|
|
85
|
+
href: __('https://wordpress.org/documentation/article/wordpress-block-editor/'),
|
|
86
|
+
children: __("Here's a detailed guide.")
|
|
87
|
+
})]
|
|
88
|
+
})]
|
|
89
|
+
})
|
|
71
90
|
}]
|
|
72
91
|
});
|
|
73
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useDispatch","ExternalLink","Guide","__","createInterpolateElement","WelcomeGuideImage","store","editPostStore","
|
|
1
|
+
{"version":3,"names":["useDispatch","ExternalLink","Guide","__","createInterpolateElement","WelcomeGuideImage","store","editPostStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","WelcomeGuideDefault","toggleFeature","className","contentLabel","finishButtonText","onFinish","pages","image","nonAnimatedSrc","animatedSrc","content","children","InserterIconImage","alt","src","href"],"sources":["@wordpress/edit-post/src/components/welcome-guide/default.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { ExternalLink, Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { createInterpolateElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport WelcomeGuideImage from './image';\nimport { store as editPostStore } from '../../store';\n\nexport default function WelcomeGuideDefault() {\n\tconst { toggleFeature } = useDispatch( editPostStore );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-post-welcome-guide\"\n\t\t\tcontentLabel={ __( 'Welcome to the block editor' ) }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () => toggleFeature( 'welcomeGuide' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-canvas.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-canvas.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-post-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Welcome to the block editor' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-post-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'In the WordPress editor, each paragraph, image, or video is presented as a distinct “block” of content.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-editor.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-editor.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-post-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Make each block your own' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-post-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-library.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-library.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-post-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Get to know the block library' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-post-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tInserterIconImage: (\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\talt={ __( 'inserter' ) }\n\t\t\t\t\t\t\t\t\t\t\t\tsrc=\"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-documentation.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-documentation.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-post-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Learn how to use the block editor' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-post-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'New to the block editor? Want to learn more about using it? '\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/wordpress-block-editor/'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( \"Here's a detailed guide.\" ) }\n\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t] }\n\t\t/>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,YAAY,EAAEC,KAAK,QAAQ,uBAAuB;AAC3D,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,wBAAwB,QAAQ,oBAAoB;;AAE7D;AACA;AACA;AACA,OAAOC,iBAAiB,MAAM,SAAS;AACvC,SAASC,KAAK,IAAIC,aAAa,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAErD,eAAe,SAASC,mBAAmBA,CAAA,EAAG;EAC7C,MAAM;IAAEC;EAAc,CAAC,GAAGf,WAAW,CAAEO,aAAc,CAAC;EAEtD,oBACCE,IAAA,CAACP,KAAK;IACLc,SAAS,EAAC,yBAAyB;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AS,EAAC,+BAA+B;UAAAS,QAAA,EACzCrB,wBAAwB,CACzBD,EAAE,CACD,+HACD,CAAC,EACD;YACCuB,iBAAiB,eAChBjB,IAAA;cACCkB,GAAG,EAAGxB,EAAE,CAAE,UAAW,CAAG;cACxByB,GAAG,EAAC;YAA2Q,CAC/Q;UAEH,CACD;QAAC,CACC,CAAC;MAAA,CACH;IAEJ,CAAC,EACD;MACCP,KAAK,eACJZ,IAAA,CAACJ,iBAAiB;QACjBiB,cAAc,EAAC,+DAA+D;QAC9EC,WAAW,EAAC;MAA+D,CAC3E,CACD;MACDC,OAAO,eACNX,KAAA,CAAAF,SAAA;QAAAc,QAAA,gBACChB,IAAA;UAAIO,SAAS,EAAC,kCAAkC;UAAAS,QAAA,EAC7CtB,EAAE,CAAE,mCAAoC;QAAC,CACxC,CAAC,eACLU,KAAA;UAAGG,SAAS,EAAC,+BAA+B;UAAAS,QAAA,GACzCtB,EAAE,CACH,8DACD,CAAC,eACDM,IAAA,CAACR,YAAY;YACZ4B,IAAI,EAAG1B,EAAE,CACR,qEACD,CAAG;YAAAsB,QAAA,EAEDtB,EAAE,CAAE,0BAA2B;UAAC,CACrB,CAAC;QAAA,CACb,CAAC;MAAA,CACH;IAEJ,CAAC;EACC,CACH,CAAC;AAEJ","ignoreList":[]}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
export default function WelcomeGuideImage({
|
|
3
4
|
nonAnimatedSrc,
|
|
4
5
|
animatedSrc
|
|
5
6
|
}) {
|
|
6
|
-
return
|
|
7
|
-
className: "edit-post-welcome-guide__image"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
return /*#__PURE__*/_jsxs("picture", {
|
|
8
|
+
className: "edit-post-welcome-guide__image",
|
|
9
|
+
children: [/*#__PURE__*/_jsx("source", {
|
|
10
|
+
srcSet: nonAnimatedSrc,
|
|
11
|
+
media: "(prefers-reduced-motion: reduce)"
|
|
12
|
+
}), /*#__PURE__*/_jsx("img", {
|
|
13
|
+
src: animatedSrc,
|
|
14
|
+
width: "312",
|
|
15
|
+
height: "240",
|
|
16
|
+
alt: ""
|
|
17
|
+
})]
|
|
18
|
+
});
|
|
17
19
|
}
|
|
18
20
|
//# sourceMappingURL=image.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["WelcomeGuideImage","nonAnimatedSrc","animatedSrc","
|
|
1
|
+
{"version":3,"names":["WelcomeGuideImage","nonAnimatedSrc","animatedSrc","_jsxs","className","children","_jsx","srcSet","media","src","width","height","alt"],"sources":["@wordpress/edit-post/src/components/welcome-guide/image.js"],"sourcesContent":["export default function WelcomeGuideImage( { nonAnimatedSrc, animatedSrc } ) {\n\treturn (\n\t\t<picture className=\"edit-post-welcome-guide__image\">\n\t\t\t<source\n\t\t\t\tsrcSet={ nonAnimatedSrc }\n\t\t\t\tmedia=\"(prefers-reduced-motion: reduce)\"\n\t\t\t/>\n\t\t\t<img src={ animatedSrc } width=\"312\" height=\"240\" alt=\"\" />\n\t\t</picture>\n\t);\n}\n"],"mappings":";;AAAA,eAAe,SAASA,iBAAiBA,CAAE;EAAEC,cAAc;EAAEC;AAAY,CAAC,EAAG;EAC5E,oBACCC,KAAA;IAASC,SAAS,EAAC,gCAAgC;IAAAC,QAAA,gBAClDC,IAAA;MACCC,MAAM,EAAGN,cAAgB;MACzBO,KAAK,EAAC;IAAkC,CACxC,CAAC,eACFF,IAAA;MAAKG,GAAG,EAAGP,WAAa;MAACQ,KAAK,EAAC,KAAK;MAACC,MAAM,EAAC,KAAK;MAACC,GAAG,EAAC;IAAE,CAAE,CAAC;EAAA,CACnD,CAAC;AAEZ","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* WordPress dependencies
|
|
4
3
|
*/
|
|
@@ -11,6 +10,7 @@ import { store as editorStore } from '@wordpress/editor';
|
|
|
11
10
|
import WelcomeGuideDefault from './default';
|
|
12
11
|
import WelcomeGuideTemplate from './template';
|
|
13
12
|
import { store as editPostStore } from '../../store';
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
export default function WelcomeGuide() {
|
|
15
15
|
const {
|
|
16
16
|
isActive,
|
|
@@ -32,6 +32,6 @@ export default function WelcomeGuide() {
|
|
|
32
32
|
if (!isActive) {
|
|
33
33
|
return null;
|
|
34
34
|
}
|
|
35
|
-
return isEditingTemplate ?
|
|
35
|
+
return isEditingTemplate ? /*#__PURE__*/_jsx(WelcomeGuideTemplate, {}) : /*#__PURE__*/_jsx(WelcomeGuideDefault, {});
|
|
36
36
|
}
|
|
37
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useSelect","store","editorStore","WelcomeGuideDefault","WelcomeGuideTemplate","editPostStore","WelcomeGuide","isActive","isEditingTemplate","select","isFeatureActive","getCurrentPostType","_isEditingTemplate","feature"
|
|
1
|
+
{"version":3,"names":["useSelect","store","editorStore","WelcomeGuideDefault","WelcomeGuideTemplate","editPostStore","jsx","_jsx","WelcomeGuide","isActive","isEditingTemplate","select","isFeatureActive","getCurrentPostType","_isEditingTemplate","feature"],"sources":["@wordpress/edit-post/src/components/welcome-guide/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport WelcomeGuideDefault from './default';\nimport WelcomeGuideTemplate from './template';\nimport { store as editPostStore } from '../../store';\n\nexport default function WelcomeGuide() {\n\tconst { isActive, isEditingTemplate } = useSelect( ( select ) => {\n\t\tconst { isFeatureActive } = select( editPostStore );\n\t\tconst { getCurrentPostType } = select( editorStore );\n\t\tconst _isEditingTemplate = getCurrentPostType() === 'wp_template';\n\n\t\tconst feature = _isEditingTemplate\n\t\t\t? 'welcomeGuideTemplate'\n\t\t\t: 'welcomeGuide';\n\n\t\treturn {\n\t\t\tisActive: isFeatureActive( feature ),\n\t\t\tisEditingTemplate: _isEditingTemplate,\n\t\t};\n\t}, [] );\n\n\tif ( ! isActive ) {\n\t\treturn null;\n\t}\n\n\treturn isEditingTemplate ? (\n\t\t<WelcomeGuideTemplate />\n\t) : (\n\t\t<WelcomeGuideDefault />\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;;AAExD;AACA;AACA;AACA,OAAOC,mBAAmB,MAAM,WAAW;AAC3C,OAAOC,oBAAoB,MAAM,YAAY;AAC7C,SAASH,KAAK,IAAII,aAAa,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAErD,eAAe,SAASC,YAAYA,CAAA,EAAG;EACtC,MAAM;IAAEC,QAAQ;IAAEC;EAAkB,CAAC,GAAGV,SAAS,CAAIW,MAAM,IAAM;IAChE,MAAM;MAAEC;IAAgB,CAAC,GAAGD,MAAM,CAAEN,aAAc,CAAC;IACnD,MAAM;MAAEQ;IAAmB,CAAC,GAAGF,MAAM,CAAET,WAAY,CAAC;IACpD,MAAMY,kBAAkB,GAAGD,kBAAkB,CAAC,CAAC,KAAK,aAAa;IAEjE,MAAME,OAAO,GAAGD,kBAAkB,GAC/B,sBAAsB,GACtB,cAAc;IAEjB,OAAO;MACNL,QAAQ,EAAEG,eAAe,CAAEG,OAAQ,CAAC;MACpCL,iBAAiB,EAAEI;IACpB,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,IAAK,CAAEL,QAAQ,EAAG;IACjB,OAAO,IAAI;EACZ;EAEA,OAAOC,iBAAiB,gBACvBH,IAAA,CAACH,oBAAoB,IAAE,CAAC,gBAExBG,IAAA,CAACJ,mBAAmB,IAAE,CACtB;AACF","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement, Fragment } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* WordPress dependencies
|
|
4
3
|
*/
|
|
@@ -11,25 +10,32 @@ import { __ } from '@wordpress/i18n';
|
|
|
11
10
|
*/
|
|
12
11
|
import WelcomeGuideImage from './image';
|
|
13
12
|
import { store as editPostStore } from '../../store';
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
16
|
export default function WelcomeGuideTemplate() {
|
|
15
17
|
const {
|
|
16
18
|
toggleFeature
|
|
17
19
|
} = useDispatch(editPostStore);
|
|
18
|
-
return
|
|
20
|
+
return /*#__PURE__*/_jsx(Guide, {
|
|
19
21
|
className: "edit-template-welcome-guide",
|
|
20
22
|
contentLabel: __('Welcome to the template editor'),
|
|
21
23
|
finishButtonText: __('Get started'),
|
|
22
24
|
onFinish: () => toggleFeature('welcomeGuideTemplate'),
|
|
23
25
|
pages: [{
|
|
24
|
-
image:
|
|
26
|
+
image: /*#__PURE__*/_jsx(WelcomeGuideImage, {
|
|
25
27
|
nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-template-editor.svg",
|
|
26
28
|
animatedSrc: "https://s.w.org/images/block-editor/welcome-template-editor.gif"
|
|
27
29
|
}),
|
|
28
|
-
content:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
content: /*#__PURE__*/_jsxs(_Fragment, {
|
|
31
|
+
children: [/*#__PURE__*/_jsx("h1", {
|
|
32
|
+
className: "edit-post-welcome-guide__heading",
|
|
33
|
+
children: __('Welcome to the template editor')
|
|
34
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
35
|
+
className: "edit-post-welcome-guide__text",
|
|
36
|
+
children: __('Templates help define the layout of the site. You can customize all aspects of your posts and pages using blocks and patterns in this editor.')
|
|
37
|
+
})]
|
|
38
|
+
})
|
|
33
39
|
}]
|
|
34
40
|
});
|
|
35
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useDispatch","Guide","__","WelcomeGuideImage","store","editPostStore","
|
|
1
|
+
{"version":3,"names":["useDispatch","Guide","__","WelcomeGuideImage","store","editPostStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","WelcomeGuideTemplate","toggleFeature","className","contentLabel","finishButtonText","onFinish","pages","image","nonAnimatedSrc","animatedSrc","content","children"],"sources":["@wordpress/edit-post/src/components/welcome-guide/template.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport WelcomeGuideImage from './image';\nimport { store as editPostStore } from '../../store';\n\nexport default function WelcomeGuideTemplate() {\n\tconst { toggleFeature } = useDispatch( editPostStore );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-template-welcome-guide\"\n\t\t\tcontentLabel={ __( 'Welcome to the template editor' ) }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () => toggleFeature( 'welcomeGuideTemplate' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-template-editor.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-template-editor.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-post-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Welcome to the template editor' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-post-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Templates help define the layout of the site. You can customize all aspects of your posts and pages using blocks and patterns in this editor.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t] }\n\t\t/>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,iBAAiB,MAAM,SAAS;AACvC,SAASC,KAAK,IAAIC,aAAa,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAErD,eAAe,SAASC,oBAAoBA,CAAA,EAAG;EAC9C,MAAM;IAAEC;EAAc,CAAC,GAAGb,WAAW,CAAEK,aAAc,CAAC;EAEtD,oBACCE,IAAA,CAACN,KAAK;IACLa,SAAS,EAAC,6BAA6B;IACvCC,YAAY,EAAGb,EAAE,CAAE,gCAAiC,CAAG;IACvDc,gBAAgB,EAAGd,EAAE,CAAE,aAAc,CAAG;IACxCe,QAAQ,EAAGA,CAAA,KAAMJ,aAAa,CAAE,sBAAuB,CAAG;IAC1DK,KAAK,EAAG,CACP;MACCC,KAAK,eACJZ,IAAA,CAACJ,iBAAiB;QACjBiB,cAAc,EAAC,iEAAiE;QAChFC,WAAW,EAAC;MAAiE,CAC7E,CACD;MACDC,OAAO,eACNX,KAAA,CAAAF,SAAA;QAAAc,QAAA,gBACChB,IAAA;UAAIO,SAAS,EAAC,kCAAkC;UAAAS,QAAA,EAC7CrB,EAAE,CAAE,gCAAiC;QAAC,CACrC,CAAC,eACLK,IAAA;UAAGO,SAAS,EAAC,+BAA+B;UAAAS,QAAA,EACzCrB,EAAE,CACH,+IACD;QAAC,CACC,CAAC;MAAA,CACH;IAEJ,CAAC;EACC,CACH,CAAC;AAEJ","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* WordPress dependencies
|
|
4
3
|
*/
|
|
@@ -9,6 +8,7 @@ import deprecated from '@wordpress/deprecated';
|
|
|
9
8
|
* Internal dependencies
|
|
10
9
|
*/
|
|
11
10
|
import { unlock } from './lock-unlock';
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
const {
|
|
13
13
|
PluginPostExcerpt
|
|
14
14
|
} = unlock(editorPrivateApis);
|
|
@@ -25,7 +25,7 @@ const deprecateSlot = name => {
|
|
|
25
25
|
*/
|
|
26
26
|
export function PluginBlockSettingsMenuItem(props) {
|
|
27
27
|
deprecateSlot('PluginBlockSettingsMenuItem');
|
|
28
|
-
return
|
|
28
|
+
return /*#__PURE__*/_jsx(EditorPluginBlockSettingsMenuItem, {
|
|
29
29
|
...props
|
|
30
30
|
});
|
|
31
31
|
}
|
|
@@ -35,7 +35,7 @@ export function PluginBlockSettingsMenuItem(props) {
|
|
|
35
35
|
*/
|
|
36
36
|
export function PluginDocumentSettingPanel(props) {
|
|
37
37
|
deprecateSlot('PluginDocumentSettingPanel');
|
|
38
|
-
return
|
|
38
|
+
return /*#__PURE__*/_jsx(EditorPluginDocumentSettingPanel, {
|
|
39
39
|
...props
|
|
40
40
|
});
|
|
41
41
|
}
|
|
@@ -45,7 +45,7 @@ export function PluginDocumentSettingPanel(props) {
|
|
|
45
45
|
*/
|
|
46
46
|
export function PluginMoreMenuItem(props) {
|
|
47
47
|
deprecateSlot('PluginMoreMenuItem');
|
|
48
|
-
return
|
|
48
|
+
return /*#__PURE__*/_jsx(EditorPluginMoreMenuItem, {
|
|
49
49
|
...props
|
|
50
50
|
});
|
|
51
51
|
}
|
|
@@ -55,7 +55,7 @@ export function PluginMoreMenuItem(props) {
|
|
|
55
55
|
*/
|
|
56
56
|
export function PluginPrePublishPanel(props) {
|
|
57
57
|
deprecateSlot('PluginPrePublishPanel');
|
|
58
|
-
return
|
|
58
|
+
return /*#__PURE__*/_jsx(EditorPluginPrePublishPanel, {
|
|
59
59
|
...props
|
|
60
60
|
});
|
|
61
61
|
}
|
|
@@ -65,7 +65,7 @@ export function PluginPrePublishPanel(props) {
|
|
|
65
65
|
*/
|
|
66
66
|
export function PluginPostPublishPanel(props) {
|
|
67
67
|
deprecateSlot('PluginPostPublishPanel');
|
|
68
|
-
return
|
|
68
|
+
return /*#__PURE__*/_jsx(EditorPluginPostPublishPanel, {
|
|
69
69
|
...props
|
|
70
70
|
});
|
|
71
71
|
}
|
|
@@ -75,7 +75,7 @@ export function PluginPostPublishPanel(props) {
|
|
|
75
75
|
*/
|
|
76
76
|
export function PluginPostStatusInfo(props) {
|
|
77
77
|
deprecateSlot('PluginPostStatusInfo');
|
|
78
|
-
return
|
|
78
|
+
return /*#__PURE__*/_jsx(EditorPluginPostStatusInfo, {
|
|
79
79
|
...props
|
|
80
80
|
});
|
|
81
81
|
}
|
|
@@ -85,7 +85,7 @@ export function PluginPostStatusInfo(props) {
|
|
|
85
85
|
*/
|
|
86
86
|
export function PluginSidebar(props) {
|
|
87
87
|
deprecateSlot('PluginSidebar');
|
|
88
|
-
return
|
|
88
|
+
return /*#__PURE__*/_jsx(EditorPluginSidebar, {
|
|
89
89
|
...props
|
|
90
90
|
});
|
|
91
91
|
}
|
|
@@ -95,7 +95,7 @@ export function PluginSidebar(props) {
|
|
|
95
95
|
*/
|
|
96
96
|
export function PluginSidebarMoreMenuItem(props) {
|
|
97
97
|
deprecateSlot('PluginSidebarMoreMenuItem');
|
|
98
|
-
return
|
|
98
|
+
return /*#__PURE__*/_jsx(EditorPluginSidebarMoreMenuItem, {
|
|
99
99
|
...props
|
|
100
100
|
});
|
|
101
101
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["privateApis","editorPrivateApis","PluginBlockSettingsMenuItem","EditorPluginBlockSettingsMenuItem","PluginDocumentSettingPanel","EditorPluginDocumentSettingPanel","PluginMoreMenuItem","EditorPluginMoreMenuItem","PluginPrePublishPanel","EditorPluginPrePublishPanel","PluginPostPublishPanel","EditorPluginPostPublishPanel","PluginPostStatusInfo","EditorPluginPostStatusInfo","PluginSidebar","EditorPluginSidebar","PluginSidebarMoreMenuItem","EditorPluginSidebarMoreMenuItem","deprecated","unlock","PluginPostExcerpt","deprecateSlot","name","since","alternative","props","
|
|
1
|
+
{"version":3,"names":["privateApis","editorPrivateApis","PluginBlockSettingsMenuItem","EditorPluginBlockSettingsMenuItem","PluginDocumentSettingPanel","EditorPluginDocumentSettingPanel","PluginMoreMenuItem","EditorPluginMoreMenuItem","PluginPrePublishPanel","EditorPluginPrePublishPanel","PluginPostPublishPanel","EditorPluginPostPublishPanel","PluginPostStatusInfo","EditorPluginPostStatusInfo","PluginSidebar","EditorPluginSidebar","PluginSidebarMoreMenuItem","EditorPluginSidebarMoreMenuItem","deprecated","unlock","jsx","_jsx","PluginPostExcerpt","deprecateSlot","name","since","alternative","props","__experimentalPluginPostExcerpt","hint","link"],"sources":["@wordpress/edit-post/src/deprecated.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as editorPrivateApis,\n\tPluginBlockSettingsMenuItem as EditorPluginBlockSettingsMenuItem,\n\tPluginDocumentSettingPanel as EditorPluginDocumentSettingPanel,\n\tPluginMoreMenuItem as EditorPluginMoreMenuItem,\n\tPluginPrePublishPanel as EditorPluginPrePublishPanel,\n\tPluginPostPublishPanel as EditorPluginPostPublishPanel,\n\tPluginPostStatusInfo as EditorPluginPostStatusInfo,\n\tPluginSidebar as EditorPluginSidebar,\n\tPluginSidebarMoreMenuItem as EditorPluginSidebarMoreMenuItem,\n} from '@wordpress/editor';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from './lock-unlock';\nconst { PluginPostExcerpt } = unlock( editorPrivateApis );\n\nconst deprecateSlot = ( name ) => {\n\tdeprecated( `wp.editPost.${ name }`, {\n\t\tsince: '6.6',\n\t\talternative: `wp.editor.${ name }`,\n\t} );\n};\n\n/* eslint-disable jsdoc/require-param */\n/**\n * @see PluginBlockSettingsMenuItem in @wordpress/editor package.\n */\nexport function PluginBlockSettingsMenuItem( props ) {\n\tdeprecateSlot( 'PluginBlockSettingsMenuItem' );\n\treturn <EditorPluginBlockSettingsMenuItem { ...props } />;\n}\n\n/**\n * @see PluginDocumentSettingPanel in @wordpress/editor package.\n */\nexport function PluginDocumentSettingPanel( props ) {\n\tdeprecateSlot( 'PluginDocumentSettingPanel' );\n\treturn <EditorPluginDocumentSettingPanel { ...props } />;\n}\n\n/**\n * @see PluginMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginMoreMenuItem( props ) {\n\tdeprecateSlot( 'PluginMoreMenuItem' );\n\treturn <EditorPluginMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPrePublishPanel in @wordpress/editor package.\n */\nexport function PluginPrePublishPanel( props ) {\n\tdeprecateSlot( 'PluginPrePublishPanel' );\n\treturn <EditorPluginPrePublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostPublishPanel in @wordpress/editor package.\n */\nexport function PluginPostPublishPanel( props ) {\n\tdeprecateSlot( 'PluginPostPublishPanel' );\n\treturn <EditorPluginPostPublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostStatusInfo in @wordpress/editor package.\n */\nexport function PluginPostStatusInfo( props ) {\n\tdeprecateSlot( 'PluginPostStatusInfo' );\n\treturn <EditorPluginPostStatusInfo { ...props } />;\n}\n\n/**\n * @see PluginSidebar in @wordpress/editor package.\n */\nexport function PluginSidebar( props ) {\n\tdeprecateSlot( 'PluginSidebar' );\n\treturn <EditorPluginSidebar { ...props } />;\n}\n\n/**\n * @see PluginSidebarMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginSidebarMoreMenuItem( props ) {\n\tdeprecateSlot( 'PluginSidebarMoreMenuItem' );\n\treturn <EditorPluginSidebarMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPostExcerpt in @wordpress/editor package.\n */\nexport function __experimentalPluginPostExcerpt() {\n\tdeprecated( 'wp.editPost.__experimentalPluginPostExcerpt', {\n\t\tsince: '6.6',\n\t\thint: 'Core and custom panels can be access programmatically using their panel name.',\n\t\tlink: 'https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically',\n\t} );\n\treturn PluginPostExcerpt;\n}\n\n/* eslint-enable jsdoc/require-param */\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,WAAW,IAAIC,iBAAiB,EAChCC,2BAA2B,IAAIC,iCAAiC,EAChEC,0BAA0B,IAAIC,gCAAgC,EAC9DC,kBAAkB,IAAIC,wBAAwB,EAC9CC,qBAAqB,IAAIC,2BAA2B,EACpDC,sBAAsB,IAAIC,4BAA4B,EACtDC,oBAAoB,IAAIC,0BAA0B,EAClDC,aAAa,IAAIC,mBAAmB,EACpCC,yBAAyB,IAAIC,+BAA+B,QACtD,mBAAmB;AAC1B,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA,SAASC,MAAM,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AACvC,MAAM;EAAEC;AAAkB,CAAC,GAAGH,MAAM,CAAElB,iBAAkB,CAAC;AAEzD,MAAMsB,aAAa,GAAKC,IAAI,IAAM;EACjCN,UAAU,CAAG,eAAeM,IAAM,EAAC,EAAE;IACpCC,KAAK,EAAE,KAAK;IACZC,WAAW,EAAG,aAAaF,IAAM;EAClC,CAAE,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,SAAStB,2BAA2BA,CAAEyB,KAAK,EAAG;EACpDJ,aAAa,CAAE,6BAA8B,CAAC;EAC9C,oBAAOF,IAAA,CAACl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AMU;EAAK,CAAI,CAAC;AACxD;;AAEA;AACA;AACA;AACA,OAAO,SAASC,+BAA+BA,CAAA,EAAG;EACjDV,UAAU,CAAE,6CAA6C,EAAE;IAC1DO,KAAK,EAAE,KAAK;IACZI,IAAI,EAAE,+EAA+E;IACrFC,IAAI,EAAE;EACP,CAAE,CAAC;EACH,OAAOR,iBAAiB;AACzB;;AAEA","ignoreList":[]}
|
package/build-module/editor.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* WordPress dependencies
|
|
4
3
|
*/
|
|
@@ -17,6 +16,8 @@ import EditorInitialization from './components/editor-initialization';
|
|
|
17
16
|
import { store as editPostStore } from './store';
|
|
18
17
|
import { unlock } from './lock-unlock';
|
|
19
18
|
import useNavigateToEntityRecord from './hooks/use-navigate-to-entity-record';
|
|
19
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
21
|
const {
|
|
21
22
|
ExperimentalEditorProvider
|
|
22
23
|
} = unlock(editorPrivateApis);
|
|
@@ -72,16 +73,21 @@ function Editor({
|
|
|
72
73
|
if (!post) {
|
|
73
74
|
return null;
|
|
74
75
|
}
|
|
75
|
-
return
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
76
|
+
return /*#__PURE__*/_jsx(SlotFillProvider, {
|
|
77
|
+
children: /*#__PURE__*/_jsxs(ExperimentalEditorProvider, {
|
|
78
|
+
settings: editorSettings,
|
|
79
|
+
post: post,
|
|
80
|
+
initialEdits: initialEdits,
|
|
81
|
+
useSubRegistry: false,
|
|
82
|
+
__unstableTemplate: template,
|
|
83
|
+
...props,
|
|
84
|
+
children: [/*#__PURE__*/_jsxs(ErrorBoundary, {
|
|
85
|
+
children: [/*#__PURE__*/_jsx(CommandMenu, {}), /*#__PURE__*/_jsx(EditorInitialization, {}), /*#__PURE__*/_jsx(Layout, {
|
|
86
|
+
initialPost: initialPost
|
|
87
|
+
})]
|
|
88
|
+
}), /*#__PURE__*/_jsx(PostLockedModal, {})]
|
|
89
|
+
})
|
|
90
|
+
});
|
|
85
91
|
}
|
|
86
92
|
export default Editor;
|
|
87
93
|
//# sourceMappingURL=editor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useSelect","ErrorBoundary","PostLockedModal","store","editorStore","privateApis","editorPrivateApis","useMemo","SlotFillProvider","coreStore","CommandMenu","Layout","EditorInitialization","editPostStore","unlock","useNavigateToEntityRecord","ExperimentalEditorProvider","Editor","postId","initialPostId","postType","initialPostType","settings","initialEdits","props","currentPost","onNavigateToEntityRecord","onNavigateToPreviousEntityRecord","post","template","select","_getPostType$viewable","getEditedPostTemplate","getEntityRecord","getPostType","canUser","getEditorSettings","postObject","supportsTemplateMode","isViewable","viewable","canViewTemplate","editorSettings","defaultRenderingMode","initialPost","type","id","
|
|
1
|
+
{"version":3,"names":["useSelect","ErrorBoundary","PostLockedModal","store","editorStore","privateApis","editorPrivateApis","useMemo","SlotFillProvider","coreStore","CommandMenu","Layout","EditorInitialization","editPostStore","unlock","useNavigateToEntityRecord","jsx","_jsx","jsxs","_jsxs","ExperimentalEditorProvider","Editor","postId","initialPostId","postType","initialPostType","settings","initialEdits","props","currentPost","onNavigateToEntityRecord","onNavigateToPreviousEntityRecord","post","template","select","_getPostType$viewable","getEditedPostTemplate","getEntityRecord","getPostType","canUser","getEditorSettings","postObject","supportsTemplateMode","isViewable","viewable","canViewTemplate","editorSettings","defaultRenderingMode","initialPost","type","id","children","useSubRegistry","__unstableTemplate"],"sources":["@wordpress/edit-post/src/editor.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tErrorBoundary,\n\tPostLockedModal,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useMemo } from '@wordpress/element';\nimport { SlotFillProvider } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { CommandMenu } from '@wordpress/commands';\n\n/**\n * Internal dependencies\n */\nimport Layout from './components/layout';\nimport EditorInitialization from './components/editor-initialization';\nimport { store as editPostStore } from './store';\nimport { unlock } from './lock-unlock';\nimport useNavigateToEntityRecord from './hooks/use-navigate-to-entity-record';\n\nconst { ExperimentalEditorProvider } = unlock( editorPrivateApis );\n\nfunction Editor( {\n\tpostId: initialPostId,\n\tpostType: initialPostType,\n\tsettings,\n\tinitialEdits,\n\t...props\n} ) {\n\tconst {\n\t\tcurrentPost,\n\t\tonNavigateToEntityRecord,\n\t\tonNavigateToPreviousEntityRecord,\n\t} = useNavigateToEntityRecord(\n\t\tinitialPostId,\n\t\tinitialPostType,\n\t\t'post-only'\n\t);\n\n\tconst { post, template } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedPostTemplate } = select( editPostStore );\n\t\t\tconst { getEntityRecord, getPostType, canUser } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst { getEditorSettings } = select( editorStore );\n\n\t\t\tconst postObject = getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tcurrentPost.postType,\n\t\t\t\tcurrentPost.postId\n\t\t\t);\n\n\t\t\tconst supportsTemplateMode =\n\t\t\t\tgetEditorSettings().supportsTemplateMode;\n\t\t\tconst isViewable =\n\t\t\t\tgetPostType( currentPost.postType )?.viewable ?? false;\n\t\t\tconst canViewTemplate = canUser( 'read', 'templates' );\n\t\t\treturn {\n\t\t\t\ttemplate:\n\t\t\t\t\tsupportsTemplateMode &&\n\t\t\t\t\tisViewable &&\n\t\t\t\t\tcanViewTemplate &&\n\t\t\t\t\tcurrentPost.postType !== 'wp_template'\n\t\t\t\t\t\t? getEditedPostTemplate()\n\t\t\t\t\t\t: null,\n\t\t\t\tpost: postObject,\n\t\t\t};\n\t\t},\n\t\t[ currentPost.postType, currentPost.postId ]\n\t);\n\n\tconst editorSettings = useMemo(\n\t\t() => ( {\n\t\t\t...settings,\n\t\t\tonNavigateToEntityRecord,\n\t\t\tonNavigateToPreviousEntityRecord,\n\t\t\tdefaultRenderingMode: 'post-only',\n\t\t} ),\n\t\t[ settings, onNavigateToEntityRecord, onNavigateToPreviousEntityRecord ]\n\t);\n\n\tconst initialPost = useMemo( () => {\n\t\treturn {\n\t\t\ttype: initialPostType,\n\t\t\tid: initialPostId,\n\t\t};\n\t}, [ initialPostType, initialPostId ] );\n\n\tif ( ! post ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<ExperimentalEditorProvider\n\t\t\t\tsettings={ editorSettings }\n\t\t\t\tpost={ post }\n\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t__unstableTemplate={ template }\n\t\t\t\t{ ...props }\n\t\t\t>\n\t\t\t\t<ErrorBoundary>\n\t\t\t\t\t<CommandMenu />\n\t\t\t\t\t<EditorInitialization />\n\t\t\t\t\t<Layout initialPost={ initialPost } />\n\t\t\t\t</ErrorBoundary>\n\t\t\t\t<PostLockedModal />\n\t\t\t</ExperimentalEditorProvider>\n\t\t</SlotFillProvider>\n\t);\n}\n\nexport default Editor;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SACCC,aAAa,EACbC,eAAe,EACfC,KAAK,IAAIC,WAAW,EACpBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;AAC1B,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,gBAAgB,QAAQ,uBAAuB;AACxD,SAASL,KAAK,IAAIM,SAAS,QAAQ,sBAAsB;AACzD,SAASC,WAAW,QAAQ,qBAAqB;;AAEjD;AACA;AACA;AACA,OAAOC,MAAM,MAAM,qBAAqB;AACxC,OAAOC,oBAAoB,MAAM,oCAAoC;AACrE,SAAST,KAAK,IAAIU,aAAa,QAA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|
3
2
|
* External dependencies
|
|
4
3
|
*/
|
|
@@ -22,6 +21,7 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
22
21
|
* Internal dependencies
|
|
23
22
|
*/
|
|
24
23
|
import Layout from './components/layout';
|
|
24
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
25
|
class Editor extends Component {
|
|
26
26
|
constructor(props) {
|
|
27
27
|
super(...arguments);
|
|
@@ -113,19 +113,25 @@ class Editor extends Component {
|
|
|
113
113
|
status: 'draft',
|
|
114
114
|
meta: []
|
|
115
115
|
};
|
|
116
|
-
return
|
|
116
|
+
return /*#__PURE__*/_jsx(GestureHandlerRootView, {
|
|
117
117
|
style: {
|
|
118
118
|
flex: 1
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
119
|
+
},
|
|
120
|
+
children: /*#__PURE__*/_jsx(SlotFillProvider, {
|
|
121
|
+
children: /*#__PURE__*/_jsx(EditorProvider, {
|
|
122
|
+
settings: editorSettings,
|
|
123
|
+
post: normalizedPost,
|
|
124
|
+
initialEdits: initialEdits,
|
|
125
|
+
useSubRegistry: false,
|
|
126
|
+
...props,
|
|
127
|
+
children: /*#__PURE__*/_jsx(ErrorBoundary, {
|
|
128
|
+
children: /*#__PURE__*/_jsx(Layout, {
|
|
129
|
+
setTitleRef: this.setTitleRef
|
|
130
|
+
})
|
|
131
|
+
})
|
|
132
|
+
})
|
|
133
|
+
})
|
|
134
|
+
});
|
|
129
135
|
}
|
|
130
136
|
}
|
|
131
137
|
export default compose([withSelect(select => {
|