@wordpress/edit-widgets 7.0.0 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/blocks/widget-area/edit/index.cjs +106 -116
- package/build/blocks/widget-area/edit/index.cjs.map +1 -7
- package/build/blocks/widget-area/edit/inner-blocks.cjs +44 -62
- package/build/blocks/widget-area/edit/inner-blocks.cjs.map +1 -7
- package/build/blocks/widget-area/edit/use-is-dragging-within.cjs +41 -53
- package/build/blocks/widget-area/edit/use-is-dragging-within.cjs.map +1 -7
- package/build/blocks/widget-area/index.cjs +40 -44
- package/build/blocks/widget-area/index.cjs.map +1 -7
- package/build/components/error-boundary/index.cjs +115 -155
- package/build/components/error-boundary/index.cjs.map +1 -7
- package/build/components/header/document-tools/index.cjs +80 -115
- package/build/components/header/document-tools/index.cjs.map +1 -7
- package/build/components/header/index.cjs +72 -80
- package/build/components/header/index.cjs.map +1 -7
- package/build/components/header/undo-redo/redo.cjs +30 -52
- package/build/components/header/undo-redo/redo.cjs.map +1 -7
- package/build/components/header/undo-redo/undo.cjs +29 -51
- package/build/components/header/undo-redo/undo.cjs.map +1 -7
- package/build/components/keyboard-shortcut-help-modal/config.cjs +88 -85
- package/build/components/keyboard-shortcut-help-modal/config.cjs.map +1 -7
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs +40 -57
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs.map +1 -7
- package/build/components/keyboard-shortcut-help-modal/index.cjs +94 -161
- package/build/components/keyboard-shortcut-help-modal/index.cjs.map +1 -7
- package/build/components/keyboard-shortcut-help-modal/shortcut.cjs +37 -75
- package/build/components/keyboard-shortcut-help-modal/shortcut.cjs.map +1 -7
- package/build/components/keyboard-shortcuts/index.cjs +107 -140
- package/build/components/keyboard-shortcuts/index.cjs.map +1 -7
- package/build/components/layout/index.cjs +65 -74
- package/build/components/layout/index.cjs.map +1 -7
- package/build/components/layout/interface.cjs +82 -108
- package/build/components/layout/interface.cjs.map +1 -7
- package/build/components/layout/unsaved-changes-warning.cjs +44 -48
- package/build/components/layout/unsaved-changes-warning.cjs.map +1 -7
- package/build/components/more-menu/index.cjs +125 -191
- package/build/components/more-menu/index.cjs.map +1 -7
- package/build/components/more-menu/tools-more-menu-group.cjs +9 -29
- package/build/components/more-menu/tools-more-menu-group.cjs.map +1 -7
- package/build/components/notices/index.cjs +19 -39
- package/build/components/notices/index.cjs.map +1 -7
- package/build/components/save-button/index.cjs +31 -58
- package/build/components/save-button/index.cjs.map +1 -7
- package/build/components/secondary-sidebar/index.cjs +38 -45
- package/build/components/secondary-sidebar/index.cjs.map +1 -7
- package/build/components/secondary-sidebar/inserter-sidebar.cjs +50 -51
- package/build/components/secondary-sidebar/inserter-sidebar.cjs.map +1 -7
- package/build/components/secondary-sidebar/list-view-sidebar.cjs +51 -82
- package/build/components/secondary-sidebar/list-view-sidebar.cjs.map +1 -7
- package/build/components/sidebar/index.cjs +117 -180
- package/build/components/sidebar/index.cjs.map +1 -7
- package/build/components/sidebar/widget-areas.cjs +43 -85
- package/build/components/sidebar/widget-areas.cjs.map +1 -7
- package/build/components/welcome-guide/index.cjs +110 -186
- package/build/components/welcome-guide/index.cjs.map +1 -7
- package/build/components/widget-areas-block-editor-content/index.cjs +59 -64
- package/build/components/widget-areas-block-editor-content/index.cjs.map +1 -7
- package/build/components/widget-areas-block-editor-provider/index.cjs +105 -140
- package/build/components/widget-areas-block-editor-provider/index.cjs.map +1 -7
- package/build/constants.cjs +11 -32
- package/build/constants.cjs.map +1 -7
- package/build/filters/index.cjs +7 -4
- package/build/filters/move-to-widget-area.cjs +38 -53
- package/build/filters/move-to-widget-area.cjs.map +1 -7
- package/build/filters/replace-media-upload.cjs +11 -9
- package/build/filters/replace-media-upload.cjs.map +1 -7
- package/build/hooks/use-last-selected-widget-area.cjs +28 -49
- package/build/hooks/use-last-selected-widget-area.cjs.map +1 -7
- package/build/hooks/use-widget-library-insertion-point.cjs +33 -67
- package/build/hooks/use-widget-library-insertion-point.cjs.map +1 -7
- package/build/index.cjs +96 -97
- package/build/index.cjs.map +1 -7
- package/build/lock-unlock.cjs +10 -35
- package/build/lock-unlock.cjs.map +1 -7
- package/build/store/actions.cjs +269 -278
- package/build/store/actions.cjs.map +1 -7
- package/build/store/constants.cjs +12 -29
- package/build/store/constants.cjs.map +1 -7
- package/build/store/index.cjs +61 -52
- package/build/store/index.cjs.map +1 -7
- package/build/store/private-selectors.cjs +11 -32
- package/build/store/private-selectors.cjs.map +1 -7
- package/build/store/reducer.cjs +107 -88
- package/build/store/reducer.cjs.map +1 -7
- package/build/store/resolvers.cjs +60 -91
- package/build/store/resolvers.cjs.map +1 -7
- package/build/store/selectors.cjs +196 -229
- package/build/store/selectors.cjs.map +1 -7
- package/build/store/transformers.cjs +51 -82
- package/build/store/transformers.cjs.map +1 -7
- package/build/store/utils.cjs +76 -63
- package/build/store/utils.cjs.map +1 -7
- package/build-module/blocks/widget-area/edit/index.mjs +82 -94
- package/build-module/blocks/widget-area/edit/index.mjs.map +1 -7
- package/build-module/blocks/widget-area/edit/inner-blocks.mjs +19 -35
- package/build-module/blocks/widget-area/edit/inner-blocks.mjs.map +1 -7
- package/build-module/blocks/widget-area/edit/use-is-dragging-within.mjs +36 -33
- package/build-module/blocks/widget-area/edit/use-is-dragging-within.mjs.map +1 -7
- package/build-module/blocks/widget-area/index.mjs +12 -15
- package/build-module/blocks/widget-area/index.mjs.map +1 -7
- package/build-module/components/error-boundary/index.mjs +103 -128
- package/build-module/components/error-boundary/index.mjs.map +1 -7
- package/build-module/components/header/document-tools/index.mjs +51 -84
- package/build-module/components/header/document-tools/index.mjs.map +1 -7
- package/build-module/components/header/index.mjs +40 -47
- package/build-module/components/header/index.mjs.map +1 -7
- package/build-module/components/header/undo-redo/redo.mjs +20 -27
- package/build-module/components/header/undo-redo/redo.mjs.map +1 -7
- package/build-module/components/header/undo-redo/undo.mjs +19 -26
- package/build-module/components/header/undo-redo/undo.mjs.map +1 -7
- package/build-module/components/keyboard-shortcut-help-modal/config.mjs +83 -61
- package/build-module/components/keyboard-shortcut-help-modal/config.mjs.map +1 -7
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs +19 -33
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs.map +1 -7
- package/build-module/components/keyboard-shortcut-help-modal/index.mjs +67 -136
- package/build-module/components/keyboard-shortcut-help-modal/index.mjs.map +1 -7
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs +31 -54
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs.map +1 -7
- package/build-module/components/keyboard-shortcuts/index.mjs +99 -119
- package/build-module/components/keyboard-shortcuts/index.mjs.map +1 -7
- package/build-module/components/layout/index.mjs +29 -40
- package/build-module/components/layout/index.mjs.map +1 -7
- package/build-module/components/layout/interface.mjs +53 -82
- package/build-module/components/layout/interface.mjs.map +1 -7
- package/build-module/components/layout/unsaved-changes-warning.mjs +37 -26
- package/build-module/components/layout/unsaved-changes-warning.mjs.map +1 -7
- package/build-module/components/more-menu/index.mjs +95 -162
- package/build-module/components/more-menu/index.mjs.map +1 -7
- package/build-module/components/more-menu/tools-more-menu-group.mjs +5 -9
- package/build-module/components/more-menu/tools-more-menu-group.mjs.map +1 -7
- package/build-module/components/notices/index.mjs +12 -17
- package/build-module/components/notices/index.mjs.map +1 -7
- package/build-module/components/save-button/index.mjs +23 -35
- package/build-module/components/save-button/index.mjs.map +1 -7
- package/build-module/components/secondary-sidebar/index.mjs +15 -20
- package/build-module/components/secondary-sidebar/index.mjs.map +1 -7
- package/build-module/components/secondary-sidebar/inserter-sidebar.mjs +27 -25
- package/build-module/components/secondary-sidebar/inserter-sidebar.mjs.map +1 -7
- package/build-module/components/secondary-sidebar/list-view-sidebar.mjs +39 -55
- package/build-module/components/secondary-sidebar/list-view-sidebar.mjs.map +1 -7
- package/build-module/components/sidebar/index.mjs +96 -162
- package/build-module/components/sidebar/index.mjs.map +1 -7
- package/build-module/components/sidebar/widget-areas.mjs +30 -57
- package/build-module/components/sidebar/widget-areas.mjs.map +1 -7
- package/build-module/components/welcome-guide/index.mjs +103 -164
- package/build-module/components/welcome-guide/index.mjs.map +1 -7
- package/build-module/components/widget-areas-block-editor-content/index.mjs +34 -44
- package/build-module/components/widget-areas-block-editor-content/index.mjs.map +1 -7
- package/build-module/components/widget-areas-block-editor-provider/index.mjs +76 -109
- package/build-module/components/widget-areas-block-editor-provider/index.mjs.map +1 -7
- package/build-module/constants.mjs +5 -7
- package/build-module/constants.mjs.map +1 -7
- package/build-module/filters/index.mjs +0 -2
- package/build-module/filters/move-to-widget-area.mjs +28 -48
- package/build-module/filters/move-to-widget-area.mjs.map +1 -7
- package/build-module/filters/replace-media-upload.mjs +5 -8
- package/build-module/filters/replace-media-upload.mjs.map +1 -7
- package/build-module/hooks/use-last-selected-widget-area.mjs +23 -29
- package/build-module/hooks/use-last-selected-widget-area.mjs.map +1 -7
- package/build-module/hooks/use-widget-library-insertion-point.mjs +28 -47
- package/build-module/hooks/use-widget-library-insertion-point.mjs.map +1 -7
- package/build-module/index.mjs +62 -79
- package/build-module/index.mjs.map +1 -7
- package/build-module/lock-unlock.mjs +5 -10
- package/build-module/lock-unlock.mjs.map +1 -7
- package/build-module/store/actions.mjs +250 -247
- package/build-module/store/actions.mjs.map +1 -7
- package/build-module/store/constants.mjs +7 -5
- package/build-module/store/constants.mjs.map +1 -7
- package/build-module/store/index.mjs +18 -16
- package/build-module/store/index.mjs.map +1 -7
- package/build-module/store/private-selectors.mjs +5 -7
- package/build-module/store/private-selectors.mjs.map +1 -7
- package/build-module/store/reducer.mjs +95 -58
- package/build-module/store/reducer.mjs.map +1 -7
- package/build-module/store/resolvers.mjs +52 -71
- package/build-module/store/resolvers.mjs.map +1 -7
- package/build-module/store/selectors.mjs +178 -199
- package/build-module/store/selectors.mjs.map +1 -7
- package/build-module/store/transformers.mjs +44 -56
- package/build-module/store/transformers.mjs.map +1 -7
- package/build-module/store/utils.mjs +64 -32
- package/build-module/store/utils.mjs.map +1 -7
- package/package.json +33 -33
- package/src/components/header/index.jsx +2 -2
- package/src/components/sidebar/index.jsx +18 -18
- package/src/components/welcome-guide/index.jsx +4 -2
- package/build/filters/index.cjs.map +0 -7
- package/build-module/filters/index.mjs.map +0 -7
|
@@ -1,171 +1,110 @@
|
|
|
1
|
-
|
|
2
|
-
import { useSelect, useDispatch } from "@wordpress/data";
|
|
1
|
+
import { useDispatch, useSelect } from "@wordpress/data";
|
|
3
2
|
import { ExternalLink, Guide } from "@wordpress/components";
|
|
4
|
-
import { __,
|
|
3
|
+
import { __, _n, sprintf } from "@wordpress/i18n";
|
|
5
4
|
import { createInterpolateElement } from "@wordpress/element";
|
|
6
|
-
import { store
|
|
7
|
-
import { store as
|
|
5
|
+
import { store } from "@wordpress/preferences";
|
|
6
|
+
import { store as store$1 } from "../../store/index.mjs";
|
|
8
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
// packages/edit-widgets/src/components/welcome-guide/index.jsx
|
|
9
9
|
function WelcomeGuide() {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
/* @__PURE__ */ jsx("p", { className: "edit-widgets-welcome-guide__text", children: __(
|
|
94
|
-
"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."
|
|
95
|
-
) })
|
|
96
|
-
] })
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
image: /* @__PURE__ */ jsx(
|
|
100
|
-
WelcomeGuideImage,
|
|
101
|
-
{
|
|
102
|
-
nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-library.svg",
|
|
103
|
-
animatedSrc: "https://s.w.org/images/block-editor/welcome-library.gif"
|
|
104
|
-
}
|
|
105
|
-
),
|
|
106
|
-
content: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
107
|
-
/* @__PURE__ */ jsx("h1", { className: "edit-widgets-welcome-guide__heading", children: __("Explore all blocks") }),
|
|
108
|
-
/* @__PURE__ */ jsx("p", { className: "edit-widgets-welcome-guide__text", children: createInterpolateElement(
|
|
109
|
-
__(
|
|
110
|
-
"All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon."
|
|
111
|
-
),
|
|
112
|
-
{
|
|
113
|
-
InserterIconImage: /* @__PURE__ */ jsx(
|
|
114
|
-
"img",
|
|
115
|
-
{
|
|
116
|
-
className: "edit-widgets-welcome-guide__inserter-icon",
|
|
117
|
-
alt: __("inserter"),
|
|
118
|
-
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"
|
|
119
|
-
}
|
|
120
|
-
)
|
|
121
|
-
}
|
|
122
|
-
) })
|
|
123
|
-
] })
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
image: /* @__PURE__ */ jsx(
|
|
127
|
-
WelcomeGuideImage,
|
|
128
|
-
{
|
|
129
|
-
nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.svg",
|
|
130
|
-
animatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.gif"
|
|
131
|
-
}
|
|
132
|
-
),
|
|
133
|
-
content: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
134
|
-
/* @__PURE__ */ jsx("h1", { className: "edit-widgets-welcome-guide__heading", children: __("Learn more") }),
|
|
135
|
-
/* @__PURE__ */ jsx("p", { className: "edit-widgets-welcome-guide__text", children: createInterpolateElement(
|
|
136
|
-
__(
|
|
137
|
-
"New to the block editor? Want to learn more about using it? <a>Here's a detailed guide.</a>"
|
|
138
|
-
),
|
|
139
|
-
{
|
|
140
|
-
a: /* @__PURE__ */ jsx(
|
|
141
|
-
ExternalLink,
|
|
142
|
-
{
|
|
143
|
-
href: __(
|
|
144
|
-
"https://wordpress.org/documentation/article/wordpress-block-editor/"
|
|
145
|
-
)
|
|
146
|
-
}
|
|
147
|
-
)
|
|
148
|
-
}
|
|
149
|
-
) })
|
|
150
|
-
] })
|
|
151
|
-
}
|
|
152
|
-
]
|
|
153
|
-
}
|
|
154
|
-
);
|
|
10
|
+
const isActive = useSelect((select) => !!select(store).get("core/edit-widgets", "welcomeGuide"), []);
|
|
11
|
+
const { set: setPreference } = useDispatch(store);
|
|
12
|
+
const widgetAreas = useSelect((select) => select(store$1).getWidgetAreas({ per_page: -1 }), []);
|
|
13
|
+
if (!isActive) return null;
|
|
14
|
+
const isEntirelyBlockWidgets = widgetAreas?.every((widgetArea) => widgetArea.id === "wp_inactive_widgets" || widgetArea.widgets.every((widgetId) => widgetId.startsWith("block-")));
|
|
15
|
+
const numWidgetAreas = widgetAreas?.filter((widgetArea) => widgetArea.id !== "wp_inactive_widgets").length ?? 0;
|
|
16
|
+
return /* @__PURE__ */ jsx(Guide, {
|
|
17
|
+
className: "edit-widgets-welcome-guide",
|
|
18
|
+
contentLabel: __("Welcome to block Widgets"),
|
|
19
|
+
finishButtonText: __("Get started"),
|
|
20
|
+
onFinish: () => setPreference("core/edit-widgets", "welcomeGuide", false),
|
|
21
|
+
pages: [
|
|
22
|
+
{
|
|
23
|
+
image: /* @__PURE__ */ jsx(WelcomeGuideImage, {
|
|
24
|
+
nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.svg",
|
|
25
|
+
animatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.gif"
|
|
26
|
+
}),
|
|
27
|
+
content: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("h1", {
|
|
28
|
+
className: "edit-widgets-welcome-guide__heading",
|
|
29
|
+
children: __("Welcome to block Widgets")
|
|
30
|
+
}), isEntirelyBlockWidgets ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("p", {
|
|
31
|
+
className: "edit-widgets-welcome-guide__text",
|
|
32
|
+
children: sprintf(_n("Your theme provides %s “block” area for you to add and edit content.\xA0Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.", "Your theme provides %s different “block” areas for you to add and edit content.\xA0Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.", numWidgetAreas), numWidgetAreas)
|
|
33
|
+
}) }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("p", {
|
|
34
|
+
className: "edit-widgets-welcome-guide__text",
|
|
35
|
+
children: __("You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly.")
|
|
36
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
37
|
+
className: "edit-widgets-welcome-guide__text",
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ jsx("strong", { children: __("Want to stick with the old widgets?") }),
|
|
40
|
+
" ",
|
|
41
|
+
/* @__PURE__ */ jsx(ExternalLink, {
|
|
42
|
+
href: __("https://wordpress.org/plugins/classic-widgets/"),
|
|
43
|
+
children: __("Get the Classic Widgets plugin.")
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
})] })] })
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
image: /* @__PURE__ */ jsx(WelcomeGuideImage, {
|
|
50
|
+
nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-editor.svg",
|
|
51
|
+
animatedSrc: "https://s.w.org/images/block-editor/welcome-editor.gif"
|
|
52
|
+
}),
|
|
53
|
+
content: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("h1", {
|
|
54
|
+
className: "edit-widgets-welcome-guide__heading",
|
|
55
|
+
children: __("Customize each block")
|
|
56
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
57
|
+
className: "edit-widgets-welcome-guide__text",
|
|
58
|
+
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.")
|
|
59
|
+
})] })
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
image: /* @__PURE__ */ jsx(WelcomeGuideImage, {
|
|
63
|
+
nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-library.svg",
|
|
64
|
+
animatedSrc: "https://s.w.org/images/block-editor/welcome-library.gif"
|
|
65
|
+
}),
|
|
66
|
+
content: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("h1", {
|
|
67
|
+
className: "edit-widgets-welcome-guide__heading",
|
|
68
|
+
children: __("Explore all blocks")
|
|
69
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
70
|
+
className: "edit-widgets-welcome-guide__text",
|
|
71
|
+
children: createInterpolateElement(__("All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon."), { InserterIconImage: /* @__PURE__ */ jsx("img", {
|
|
72
|
+
className: "edit-widgets-welcome-guide__inserter-icon",
|
|
73
|
+
alt: __("inserter"),
|
|
74
|
+
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"
|
|
75
|
+
}) })
|
|
76
|
+
})] })
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
image: /* @__PURE__ */ jsx(WelcomeGuideImage, {
|
|
80
|
+
nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.svg",
|
|
81
|
+
animatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.gif"
|
|
82
|
+
}),
|
|
83
|
+
content: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("h1", {
|
|
84
|
+
className: "edit-widgets-welcome-guide__heading",
|
|
85
|
+
children: __("Learn more")
|
|
86
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
87
|
+
className: "edit-widgets-welcome-guide__text",
|
|
88
|
+
children: createInterpolateElement(__("New to the block editor? Want to learn more about using it? <a>Here's a detailed guide.</a>"), { a: /* @__PURE__ */ jsx(ExternalLink, { href: __("https://wordpress.org/documentation/article/wordpress-block-editor/") }) })
|
|
89
|
+
})] })
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
});
|
|
155
93
|
}
|
|
156
94
|
function WelcomeGuideImage({ nonAnimatedSrc, animatedSrc }) {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
95
|
+
return /* @__PURE__ */ jsxs("picture", {
|
|
96
|
+
className: "edit-widgets-welcome-guide__image",
|
|
97
|
+
children: [/* @__PURE__ */ jsx("source", {
|
|
98
|
+
srcSet: nonAnimatedSrc,
|
|
99
|
+
media: "(prefers-reduced-motion: reduce)"
|
|
100
|
+
}), /* @__PURE__ */ jsx("img", {
|
|
101
|
+
src: animatedSrc,
|
|
102
|
+
width: "312",
|
|
103
|
+
height: "240",
|
|
104
|
+
alt: ""
|
|
105
|
+
})]
|
|
106
|
+
});
|
|
167
107
|
}
|
|
168
|
-
export {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
//# sourceMappingURL=index.mjs.map
|
|
108
|
+
export { WelcomeGuide as default };
|
|
109
|
+
|
|
110
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/welcome-guide/index.jsx"],
|
|
4
|
-
"sourcesContent": ["import { useSelect, useDispatch } from '@wordpress/data';\nimport { ExternalLink, Guide } from '@wordpress/components';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function WelcomeGuide() {\n\tconst isActive = useSelect(\n\t\t( select ) =>\n\t\t\t!! select( preferencesStore ).get(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\t'welcomeGuide'\n\t\t\t),\n\t\t[]\n\t);\n\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst widgetAreas = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editWidgetsStore ).getWidgetAreas( { per_page: -1 } ),\n\t\t[]\n\t);\n\n\tif ( ! isActive ) {\n\t\treturn null;\n\t}\n\n\tconst isEntirelyBlockWidgets = widgetAreas?.every(\n\t\t( widgetArea ) =>\n\t\t\twidgetArea.id === 'wp_inactive_widgets' ||\n\t\t\twidgetArea.widgets.every( ( widgetId ) =>\n\t\t\t\twidgetId.startsWith( 'block-' )\n\t\t\t)\n\t);\n\n\tconst numWidgetAreas =\n\t\twidgetAreas?.filter(\n\t\t\t( widgetArea ) => widgetArea.id !== 'wp_inactive_widgets'\n\t\t).length ?? 0;\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-widgets-welcome-guide\"\n\t\t\tcontentLabel={ __( 'Welcome to block Widgets' ) }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-widgets', 'welcomeGuide' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-canvas.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-canvas.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Welcome to block Widgets' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t{ isEntirelyBlockWidgets ? (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t\t\t\t// Translators: %s: Number of block areas in the current theme.\n\t\t\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t\t\t'Your theme provides %s “block” area for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.',\n\t\t\t\t\t\t\t\t\t\t\t\t'Your theme provides %s different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.',\n\t\t\t\t\t\t\t\t\t\t\t\tnumWidgetAreas\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tnumWidgetAreas\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t\t\t<strong>\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Want to stick with the old widgets?'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</strong>{ ' ' }\n\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/plugins/classic-widgets/'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Get the Classic Widgets plugin.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-editor.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-editor.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Customize each block' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-library.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-library.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Explore all blocks' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tInserterIconImage: (\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"edit-widgets-welcome-guide__inserter-icon\"\n\t\t\t\t\t\t\t\t\t\t\t\talt={ __( 'inserter' ) }\n\t\t\t\t\t\t\t\t\t\t\t\tsrc=\"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-documentation.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-documentation.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Learn more' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\"New to the block editor? Want to learn more about using it? <a>Here's a detailed guide.</a>\"\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ta: (\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/wordpress-block-editor/'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t] }\n\t\t/>\n\t);\n}\n\nfunction WelcomeGuideImage( { nonAnimatedSrc, animatedSrc } ) {\n\treturn (\n\t\t<picture className=\"edit-widgets-welcome-guide__image\">\n\t\t\t<source\n\t\t\t\tsrcSet={ nonAnimatedSrc }\n\t\t\t\tmedia=\"(prefers-reduced-motion: reduce)\"\n\t\t\t/>\n\t\t\t<img src={ animatedSrc } width=\"312\" height=\"240\" alt=\"\" />\n\t\t</picture>\n\t);\n}\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,WAAW,mBAAmB;AACvC,SAAS,cAAc,aAAa;AACpC,SAAS,IAAI,SAAS,UAAU;AAChC,SAAS,gCAAgC;AACzC,SAAS,SAAS,wBAAwB;AAC1C,SAAS,SAAS,wBAAwB;AA8CpC,SAWE,UAXF,KA+BG,YA/BH;AA5CS,SAAR,eAAgC;AACtC,QAAM,WAAW;AAAA,IAChB,CAAE,WACD,CAAC,CAAE,OAAQ,gBAAiB,EAAE;AAAA,MAC7B;AAAA,MACA;AAAA,IACD;AAAA,IACD,CAAC;AAAA,EACF;AAEA,QAAM,EAAE,OAAO,IAAI,YAAa,gBAAiB;AAEjD,QAAM,cAAc;AAAA,IACnB,CAAE,WACD,OAAQ,gBAAiB,EAAE,eAAgB,EAAE,UAAU,GAAG,CAAE;AAAA,IAC7D,CAAC;AAAA,EACF;AAEA,MAAK,CAAE,UAAW;AACjB,WAAO;AAAA,EACR;AAEA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|
1
|
+
{"version":3,"file":"index.mjs","names":["preferencesStore","editWidgetsStore"],"sources":["../../../src/components/welcome-guide/index.jsx"],"sourcesContent":["import { useSelect, useDispatch } from '@wordpress/data';\nimport { ExternalLink, Guide } from '@wordpress/components';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as editWidgetsStore } from '../../store';\n\nexport default function WelcomeGuide() {\n\tconst isActive = useSelect(\n\t\t( select ) =>\n\t\t\t!! select( preferencesStore ).get(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\t'welcomeGuide'\n\t\t\t),\n\t\t[]\n\t);\n\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\n\tconst widgetAreas = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editWidgetsStore ).getWidgetAreas( { per_page: -1 } ),\n\t\t[]\n\t);\n\n\tif ( ! isActive ) {\n\t\treturn null;\n\t}\n\n\tconst isEntirelyBlockWidgets = widgetAreas?.every(\n\t\t( widgetArea ) =>\n\t\t\twidgetArea.id === 'wp_inactive_widgets' ||\n\t\t\twidgetArea.widgets.every( ( widgetId ) =>\n\t\t\t\twidgetId.startsWith( 'block-' )\n\t\t\t)\n\t);\n\n\tconst numWidgetAreas =\n\t\twidgetAreas?.filter(\n\t\t\t( widgetArea ) => widgetArea.id !== 'wp_inactive_widgets'\n\t\t).length ?? 0;\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-widgets-welcome-guide\"\n\t\t\tcontentLabel={ __( 'Welcome to block Widgets' ) }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () =>\n\t\t\t\tsetPreference( 'core/edit-widgets', 'welcomeGuide', false )\n\t\t\t}\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-canvas.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-canvas.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Welcome to block Widgets' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t{ isEntirelyBlockWidgets ? (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t\t\t\t// Translators: %s: Number of block areas in the current theme.\n\t\t\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t\t\t'Your theme provides %s “block” area for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.',\n\t\t\t\t\t\t\t\t\t\t\t\t'Your theme provides %s different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.',\n\t\t\t\t\t\t\t\t\t\t\t\tnumWidgetAreas\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tnumWidgetAreas\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t\t\t<strong>\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Want to stick with the old widgets?'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</strong>{ ' ' }\n\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/plugins/classic-widgets/'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Get the Classic Widgets plugin.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-editor.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-editor.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Customize each block' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-library.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-library.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Explore all blocks' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tInserterIconImage: (\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"edit-widgets-welcome-guide__inserter-icon\"\n\t\t\t\t\t\t\t\t\t\t\t\talt={ __( 'inserter' ) }\n\t\t\t\t\t\t\t\t\t\t\t\tsrc=\"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-documentation.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-documentation.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-widgets-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Learn more' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-widgets-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\"New to the block editor? Want to learn more about using it? <a>Here's a detailed guide.</a>\"\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ta: (\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/wordpress-block-editor/'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t] }\n\t\t/>\n\t);\n}\n\nfunction WelcomeGuideImage( { nonAnimatedSrc, animatedSrc } ) {\n\treturn (\n\t\t<picture className=\"edit-widgets-welcome-guide__image\">\n\t\t\t<source\n\t\t\t\tsrcSet={ nonAnimatedSrc }\n\t\t\t\tmedia=\"(prefers-reduced-motion: reduce)\"\n\t\t\t/>\n\t\t\t<img src={ animated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M;GAAc,OAAM;GAAM,QAAO;GAAM,KAAI;EAAI,CAAA,CAClD;;AAEX"}
|
|
@@ -1,51 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
BlockList,
|
|
4
|
-
BlockToolbar,
|
|
5
|
-
BlockTools,
|
|
6
|
-
BlockSelectionClearer,
|
|
7
|
-
WritingFlow,
|
|
8
|
-
__unstableEditorStyles as EditorStyles
|
|
9
|
-
} from "@wordpress/block-editor";
|
|
1
|
+
import { BlockList, BlockSelectionClearer, BlockToolbar, BlockTools, WritingFlow, __unstableEditorStyles } from "@wordpress/block-editor";
|
|
10
2
|
import { useViewportMatch } from "@wordpress/compose";
|
|
11
3
|
import { useSelect } from "@wordpress/data";
|
|
12
4
|
import { useMemo, useRef } from "@wordpress/element";
|
|
13
|
-
import { store
|
|
5
|
+
import { store } from "@wordpress/preferences";
|
|
14
6
|
import Notices from "../notices/index.mjs";
|
|
15
7
|
import KeyboardShortcuts from "../keyboard-shortcuts/index.mjs";
|
|
16
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
] });
|
|
9
|
+
// packages/edit-widgets/src/components/widget-areas-block-editor-content/index.jsx
|
|
10
|
+
function WidgetAreasBlockEditorContent({ blockEditorSettings }) {
|
|
11
|
+
const hasThemeStyles = useSelect((select) => !!select(store).get("core/edit-widgets", "themeStyles"), []);
|
|
12
|
+
const isLargeViewport = useViewportMatch("medium");
|
|
13
|
+
const contentRef = useRef();
|
|
14
|
+
const styles = useMemo(() => {
|
|
15
|
+
return hasThemeStyles ? blockEditorSettings.styles : [];
|
|
16
|
+
}, [blockEditorSettings, hasThemeStyles]);
|
|
17
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
18
|
+
className: "edit-widgets-block-editor",
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ jsx(Notices, {}),
|
|
21
|
+
!isLargeViewport && /* @__PURE__ */ jsx(BlockToolbar, { hideDragHandle: true }),
|
|
22
|
+
/* @__PURE__ */ jsxs(BlockTools, {
|
|
23
|
+
__unstableContentRef: contentRef,
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ jsx(KeyboardShortcuts, {}),
|
|
26
|
+
/* @__PURE__ */ jsx(__unstableEditorStyles, {
|
|
27
|
+
styles,
|
|
28
|
+
scope: ":where(.editor-styles-wrapper)"
|
|
29
|
+
}),
|
|
30
|
+
/* @__PURE__ */ jsx(BlockSelectionClearer, { children: /* @__PURE__ */ jsx(WritingFlow, {
|
|
31
|
+
ref: contentRef,
|
|
32
|
+
children: /* @__PURE__ */ jsx(BlockList, { className: "edit-widgets-main-block-list" })
|
|
33
|
+
}) })
|
|
34
|
+
]
|
|
35
|
+
})
|
|
36
|
+
]
|
|
37
|
+
});
|
|
47
38
|
}
|
|
48
|
-
export {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
//# sourceMappingURL=index.mjs.map
|
|
39
|
+
export { WidgetAreasBlockEditorContent as default };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/widget-areas-block-editor-content/index.jsx"],
|
|
4
|
-
"sourcesContent": ["import {\n\tBlockList,\n\tBlockToolbar,\n\tBlockTools,\n\tBlockSelectionClearer,\n\tWritingFlow,\n\t__unstableEditorStyles as EditorStyles,\n} from '@wordpress/block-editor';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo, useRef } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport Notices from '../notices';\nimport KeyboardShortcuts from '../keyboard-shortcuts';\n\nexport default function WidgetAreasBlockEditorContent( {\n\tblockEditorSettings,\n} ) {\n\tconst hasThemeStyles = useSelect(\n\t\t( select ) =>\n\t\t\t!! select( preferencesStore ).get(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\t'themeStyles'\n\t\t\t),\n\t\t[]\n\t);\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst contentRef = useRef();\n\n\tconst styles = useMemo( () => {\n\t\treturn hasThemeStyles ? blockEditorSettings.styles : [];\n\t}, [ blockEditorSettings, hasThemeStyles ] );\n\n\treturn (\n\t\t<div className=\"edit-widgets-block-editor\">\n\t\t\t<Notices />\n\t\t\t{ ! isLargeViewport && <BlockToolbar hideDragHandle /> }\n\t\t\t<BlockTools __unstableContentRef={ contentRef }>\n\t\t\t\t<KeyboardShortcuts />\n\t\t\t\t<EditorStyles\n\t\t\t\t\tstyles={ styles }\n\t\t\t\t\tscope=\":where(.editor-styles-wrapper)\"\n\t\t\t\t/>\n\t\t\t\t<BlockSelectionClearer>\n\t\t\t\t\t<WritingFlow ref={ contentRef }>\n\t\t\t\t\t\t<BlockList className=\"edit-widgets-main-block-list\" />\n\t\t\t\t\t</WritingFlow>\n\t\t\t\t</BlockSelectionClearer>\n\t\t\t</BlockTools>\n\t\t</div>\n\t);\n}\n"],
|
|
5
|
-
"mappings": ";AAAA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,0BAA0B;AAAA,OACpB;AACP,SAAS,wBAAwB;AACjC,SAAS,iBAAiB;AAC1B,SAAS,SAAS,cAAc;AAChC,SAAS,SAAS,wBAAwB;AAC1C,OAAO,aAAa;AACpB,OAAO,uBAAuB;AAsB3B,cAEA,YAFA;AApBY,SAAR,8BAAgD;AAAA,EACtD;AACD,GAAI;AACH,QAAM,iBAAiB;AAAA,IACtB,CAAE,WACD,CAAC,CAAE,OAAQ,gBAAiB,EAAE;AAAA,MAC7B;AAAA,MACA;AAAA,IACD;AAAA,IACD,CAAC;AAAA,EACF;AACA,QAAM,kBAAkB,iBAAkB,QAAS;AACnD,QAAM,aAAa,OAAO;AAE1B,QAAM,SAAS,QAAS,MAAM;AAC7B,WAAO,iBAAiB,oBAAoB,SAAS,CAAC;AAAA,EACvD,GAAG,CAAE,qBAAqB,cAAe,CAAE;AAE3C,SACC,qBAAC,SAAI,WAAU,6BACd;AAAA,wBAAC,WAAQ;AAAA,IACP,CAAE,mBAAmB,oBAAC,gBAAa,gBAAc,MAAC;AAAA,IACpD,qBAAC,cAAW,sBAAuB,YAClC;AAAA,0BAAC,qBAAkB;AAAA,MACnB;AAAA,QAAC;AAAA;AAAA,UACA;AAAA,UACA,OAAM;AAAA;AAAA,MACP;AAAA,MACA,oBAAC,yBACA,8BAAC,eAAY,KAAM,YAClB,8BAAC,aAAU,WAAU,gCAA+B,GACrD,GACD;AAAA,OACD;AAAA,KACD;AAEF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["preferencesStore","EditorStyles"],"sources":["../../../src/components/widget-areas-block-editor-content/index.jsx"],"sourcesContent":["import {\n\tBlockList,\n\tBlockToolbar,\n\tBlockTools,\n\tBlockSelectionClearer,\n\tWritingFlow,\n\t__unstableEditorStyles as EditorStyles,\n} from '@wordpress/block-editor';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo, useRef } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport Notices from '../notices';\nimport KeyboardShortcuts from '../keyboard-shortcuts';\n\nexport default function WidgetAreasBlockEditorContent( {\n\tblockEditorSettings,\n} ) {\n\tconst hasThemeStyles = useSelect(\n\t\t( select ) =>\n\t\t\t!! select( preferencesStore ).get(\n\t\t\t\t'core/edit-widgets',\n\t\t\t\t'themeStyles'\n\t\t\t),\n\t\t[]\n\t);\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst contentRef = useRef();\n\n\tconst styles = useMemo( () => {\n\t\treturn hasThemeStyles ? blockEditorSettings.styles : [];\n\t}, [ blockEditorSettings, hasThemeStyles ] );\n\n\treturn (\n\t\t<div className=\"edit-widgets-block-editor\">\n\t\t\t<Notices />\n\t\t\t{ ! isLargeViewport && <BlockToolbar hideDragHandle /> }\n\t\t\t<BlockTools __unstableContentRef={ contentRef }>\n\t\t\t\t<KeyboardShortcuts />\n\t\t\t\t<EditorStyles\n\t\t\t\t\tstyles={ styles }\n\t\t\t\t\tscope=\":where(.editor-styles-wrapper)\"\n\t\t\t\t/>\n\t\t\t\t<BlockSelectionClearer>\n\t\t\t\t\t<WritingFlow ref={ contentRef }>\n\t\t\t\t\t\t<BlockList className=\"edit-widgets-main-block-list\" />\n\t\t\t\t\t</WritingFlow>\n\t\t\t\t</BlockSelectionClearer>\n\t\t\t</BlockTools>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;AAeA,SAAwB,8BAA+B,EACtD,uBACG;CACH,MAAM,iBAAiB,WACpB,WACD,CAAC,CAAE,OAAQA,KAAiB,CAAC,CAAC,IAC7B,qBACA,aACD,GACD,CAAC,CACF;CACA,MAAM,kBAAkB,iBAAkB,QAAS;CACnD,MAAM,aAAa,OAAO;CAE1B,MAAM,SAAS,cAAe;EAC7B,OAAO,iBAAiB,oBAAoB,SAAS,CAAC;CACvD,GAAG,CAAE,qBAAqB,cAAe,CAAE;CAE3C,OACC,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACC,oBAAC,SAAD,CAAU,CAAA;GACR,CAAE,mBAAmB,oBAAC,cAAD,EAAc,gBAAA,KAAgB,CAAA;GACrD,qBAAC,YAAD;IAAY,sBAAuB;IAAnC,UAAA;KACC,oBAAC,mBAAD,CAAoB,CAAA;KACpB,oBAACC,wBAAD;MACU;MACT,OAAM;KACN,CAAA;KACD,oBAAC,uBAAD,EAAA,UACC,oBAAC,aAAD;MAAa,KAAM;MAClB,UAAA,oBAAC,WAAD,EAAW,WAAU,+BAAgC,CAAA;KACzC,CAAA,EACS,CAAA;IACZ;;EACR;;AAEP"}
|