@wordpress/block-library 7.3.0 → 7.3.3
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/audio/edit.js +1 -1
- package/build/audio/edit.js.map +1 -1
- package/build/comment-template/edit.js +3 -1
- package/build/comment-template/edit.js.map +1 -1
- package/build/comment-template/hooks.js +14 -4
- package/build/comment-template/hooks.js.map +1 -1
- package/build/comments-pagination/edit.js +18 -1
- package/build/comments-pagination/edit.js.map +1 -1
- package/build/comments-query-loop/edit.js +2 -2
- package/build/comments-query-loop/edit.js.map +1 -1
- package/build/comments-title/edit.js +149 -0
- package/build/comments-title/edit.js.map +1 -0
- package/build/comments-title/index.js +101 -0
- package/build/comments-title/index.js.map +1 -0
- package/build/cover/transforms.js +33 -32
- package/build/cover/transforms.js.map +1 -1
- package/build/index.js +6 -4
- package/build/index.js.map +1 -1
- package/build/list/index.js +13 -2
- package/build/list/index.js.map +1 -1
- package/build/navigation/edit/index.js +17 -1
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/navigation-menu-selector.js +7 -2
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/post-comments/edit.js +141 -35
- package/build/post-comments/edit.js.map +1 -1
- package/build/post-comments/index.js +6 -4
- package/build/post-comments/index.js.map +1 -1
- package/build/post-comments-form/edit.js +22 -1
- package/build/post-comments-form/edit.js.map +1 -1
- package/build/post-comments-form/index.js +1 -0
- package/build/post-comments-form/index.js.map +1 -1
- package/build/post-featured-image/edit.js +19 -7
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/query/edit/index.js +84 -22
- package/build/query/edit/index.js.map +1 -1
- package/build/query/edit/query-placeholder.js +7 -14
- package/build/query/edit/query-placeholder.js.map +1 -1
- package/build/query/edit/query-toolbar.js +6 -1
- package/build/query/edit/query-toolbar.js.map +1 -1
- package/build/query-no-results/edit.js +1 -1
- package/build/query-no-results/edit.js.map +1 -1
- package/build/quote/index.js +13 -2
- package/build/quote/index.js.map +1 -1
- package/build-module/audio/edit.js +1 -1
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/comment-template/edit.js +3 -1
- package/build-module/comment-template/edit.js.map +1 -1
- package/build-module/comment-template/hooks.js +14 -4
- package/build-module/comment-template/hooks.js.map +1 -1
- package/build-module/comments-pagination/edit.js +19 -2
- package/build-module/comments-pagination/edit.js.map +1 -1
- package/build-module/comments-query-loop/edit.js +2 -2
- package/build-module/comments-query-loop/edit.js.map +1 -1
- package/build-module/comments-title/edit.js +133 -0
- package/build-module/comments-title/edit.js.map +1 -0
- package/build-module/comments-title/index.js +88 -0
- package/build-module/comments-title/index.js.map +1 -0
- package/build-module/cover/transforms.js +33 -32
- package/build-module/cover/transforms.js.map +1 -1
- package/build-module/index.js +5 -4
- package/build-module/index.js.map +1 -1
- package/build-module/list/index.js +9 -3
- package/build-module/list/index.js.map +1 -1
- package/build-module/navigation/edit/index.js +17 -1
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +6 -2
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/post-comments/edit.js +143 -38
- package/build-module/post-comments/edit.js.map +1 -1
- package/build-module/post-comments/index.js +6 -4
- package/build-module/post-comments/index.js.map +1 -1
- package/build-module/post-comments-form/edit.js +21 -1
- package/build-module/post-comments-form/edit.js.map +1 -1
- package/build-module/post-comments-form/index.js +1 -0
- package/build-module/post-comments-form/index.js.map +1 -1
- package/build-module/post-featured-image/edit.js +19 -7
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/query/edit/index.js +87 -26
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/edit/query-placeholder.js +8 -15
- package/build-module/query/edit/query-placeholder.js.map +1 -1
- package/build-module/query/edit/query-toolbar.js +6 -1
- package/build-module/query/edit/query-toolbar.js.map +1 -1
- package/build-module/query-no-results/edit.js +1 -1
- package/build-module/query-no-results/edit.js.map +1 -1
- package/build-module/quote/index.js +9 -3
- package/build-module/quote/index.js.map +1 -1
- package/build-style/comments-title/editor-rtl.css +79 -0
- package/build-style/comments-title/editor.css +79 -0
- package/build-style/editor-rtl.css +51 -0
- package/build-style/editor.css +51 -0
- package/build-style/post-comments/editor-rtl.css +79 -0
- package/build-style/post-comments/editor.css +79 -0
- package/build-style/post-comments/style-rtl.css +1 -3
- package/build-style/post-comments/style.css +1 -3
- package/build-style/post-comments-form/editor-rtl.css +79 -0
- package/build-style/post-comments-form/editor.css +79 -0
- package/build-style/post-comments-form/style-rtl.css +9 -0
- package/build-style/post-comments-form/style.css +9 -0
- package/build-style/query/editor-rtl.css +39 -0
- package/build-style/query/editor.css +39 -0
- package/build-style/style-rtl.css +10 -3
- package/build-style/style.css +10 -3
- package/package.json +28 -28
- package/src/audio/edit.js +1 -1
- package/src/comment-edit-link/index.php +1 -4
- package/src/comment-reply-link/index.php +1 -4
- package/src/comment-template/edit.js +5 -2
- package/src/comment-template/hooks.js +15 -2
- package/src/comment-template/index.php +23 -2
- package/src/comments-pagination/edit.js +23 -0
- package/src/comments-query-loop/edit.js +2 -0
- package/src/comments-title/block.json +70 -0
- package/src/comments-title/edit.js +197 -0
- package/src/comments-title/editor.scss +4 -0
- package/src/comments-title/index.js +18 -0
- package/src/comments-title/index.php +68 -0
- package/src/cover/transforms.js +51 -28
- package/src/editor.scss +3 -0
- package/src/index.js +8 -2
- package/src/list/index.js +7 -3
- package/src/navigation/edit/index.js +24 -0
- package/src/navigation/edit/navigation-menu-selector.js +15 -9
- package/src/post-comments/block.json +6 -4
- package/src/post-comments/edit.js +204 -44
- package/src/post-comments/editor.scss +3 -0
- package/src/post-comments/style.scss +1 -5
- package/src/post-comments-form/block.json +1 -0
- package/src/post-comments-form/edit.js +39 -2
- package/src/post-comments-form/editor.scss +3 -0
- package/src/post-comments-form/index.php +12 -4
- package/src/post-comments-form/style.scss +11 -0
- package/src/post-featured-image/edit.js +24 -12
- package/src/query/edit/index.js +125 -26
- package/src/query/edit/query-placeholder.js +3 -13
- package/src/query/edit/query-toolbar.js +6 -0
- package/src/query/editor.scss +38 -0
- package/src/query-no-results/edit.js +1 -1
- package/src/quote/index.js +7 -3
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.settings = exports.name = exports.metadata = void 0;
|
|
9
|
+
|
|
10
|
+
var _icons = require("@wordpress/icons");
|
|
11
|
+
|
|
12
|
+
var _edit = _interopRequireDefault(require("./edit"));
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* WordPress dependencies
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Internal dependencies
|
|
20
|
+
*/
|
|
21
|
+
const metadata = {
|
|
22
|
+
$schema: "https://schemas.wp.org/trunk/block.json",
|
|
23
|
+
apiVersion: 2,
|
|
24
|
+
name: "core/comments-title",
|
|
25
|
+
title: "Comments Title",
|
|
26
|
+
category: "theme",
|
|
27
|
+
ancestor: ["core/comments-query-loop"],
|
|
28
|
+
description: "Displays a title with the number of comments",
|
|
29
|
+
textdomain: "default",
|
|
30
|
+
usesContext: ["postId", "postType"],
|
|
31
|
+
attributes: {
|
|
32
|
+
textAlign: {
|
|
33
|
+
type: "string"
|
|
34
|
+
},
|
|
35
|
+
singleCommentLabel: {
|
|
36
|
+
type: "string"
|
|
37
|
+
},
|
|
38
|
+
multipleCommentsLabel: {
|
|
39
|
+
type: "string"
|
|
40
|
+
},
|
|
41
|
+
showPostTitle: {
|
|
42
|
+
type: "boolean",
|
|
43
|
+
"default": true
|
|
44
|
+
},
|
|
45
|
+
showCommentsCount: {
|
|
46
|
+
type: "boolean",
|
|
47
|
+
"default": true
|
|
48
|
+
},
|
|
49
|
+
level: {
|
|
50
|
+
type: "number",
|
|
51
|
+
"default": 2
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
supports: {
|
|
55
|
+
anchor: false,
|
|
56
|
+
align: true,
|
|
57
|
+
html: false,
|
|
58
|
+
__experimentalBorder: {
|
|
59
|
+
radius: true,
|
|
60
|
+
color: true,
|
|
61
|
+
width: true,
|
|
62
|
+
style: true
|
|
63
|
+
},
|
|
64
|
+
color: {
|
|
65
|
+
gradients: true,
|
|
66
|
+
__experimentalDefaultControls: {
|
|
67
|
+
background: true,
|
|
68
|
+
text: true
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
spacing: {
|
|
72
|
+
margin: true,
|
|
73
|
+
padding: true
|
|
74
|
+
},
|
|
75
|
+
typography: {
|
|
76
|
+
fontSize: true,
|
|
77
|
+
lineHeight: true,
|
|
78
|
+
__experimentalFontStyle: true,
|
|
79
|
+
__experimentalFontWeight: true,
|
|
80
|
+
__experimentalFontFamily: true,
|
|
81
|
+
__experimentalTextTransform: true,
|
|
82
|
+
__experimentalDefaultControls: {
|
|
83
|
+
fontSize: true,
|
|
84
|
+
__experimentalFontFamily: true,
|
|
85
|
+
__experimentalFontStyle: true,
|
|
86
|
+
__experimentalFontWeight: true
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
exports.metadata = metadata;
|
|
92
|
+
const {
|
|
93
|
+
name
|
|
94
|
+
} = metadata;
|
|
95
|
+
exports.name = name;
|
|
96
|
+
const settings = {
|
|
97
|
+
icon: _icons.commentTitle,
|
|
98
|
+
edit: _edit.default
|
|
99
|
+
};
|
|
100
|
+
exports.settings = settings;
|
|
101
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/comments-title/index.js"],"names":["name","metadata","settings","icon","edit"],"mappings":";;;;;;;;;AAGA;;AAMA;;AATA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,mBADuB;AAEvBC,EAAAA,IAAI,EAAJA;AAFuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentTitle as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n"]}
|
|
@@ -77,48 +77,49 @@ const transforms = {
|
|
|
77
77
|
}, {
|
|
78
78
|
type: 'block',
|
|
79
79
|
blocks: ['core/group'],
|
|
80
|
-
|
|
81
|
-
var _style$color2, _style$color3;
|
|
82
|
-
|
|
83
|
-
let {
|
|
84
|
-
backgroundColor,
|
|
85
|
-
gradient,
|
|
86
|
-
style
|
|
87
|
-
} = _ref3;
|
|
80
|
+
transform: (attributes, innerBlocks) => {
|
|
81
|
+
var _style$color2, _style$color3, _style$color4, _style$color5, _attributes$style;
|
|
88
82
|
|
|
89
|
-
|
|
90
|
-
* Make this transformation available only if the Group has background
|
|
91
|
-
* or gradient set, because otherwise `Cover` block displays a Placeholder.
|
|
92
|
-
*
|
|
93
|
-
* This helps avoid arbitrary decisions about the Cover block's background
|
|
94
|
-
* and user confusion about the existence of previous content.
|
|
95
|
-
*/
|
|
96
|
-
return backgroundColor || (style === null || style === void 0 ? void 0 : (_style$color2 = style.color) === null || _style$color2 === void 0 ? void 0 : _style$color2.background) || (style === null || style === void 0 ? void 0 : (_style$color3 = style.color) === null || _style$color3 === void 0 ? void 0 : _style$color3.gradient) || gradient;
|
|
97
|
-
},
|
|
98
|
-
transform: (_ref4, innerBlocks) => {
|
|
99
|
-
var _style$color4, _style$color5;
|
|
100
|
-
|
|
101
|
-
let {
|
|
83
|
+
const {
|
|
102
84
|
align,
|
|
103
85
|
anchor,
|
|
104
86
|
backgroundColor,
|
|
105
87
|
gradient,
|
|
106
88
|
style
|
|
107
|
-
} =
|
|
108
|
-
|
|
89
|
+
} = attributes; // If no background or gradient color is provided, default to 50% opacity.
|
|
90
|
+
// This matches the styling of a Cover block with a background image,
|
|
91
|
+
// in the state where a background image has been removed.
|
|
92
|
+
|
|
93
|
+
const dimRatio = backgroundColor || gradient || style !== null && style !== void 0 && (_style$color2 = style.color) !== null && _style$color2 !== void 0 && _style$color2.background || style !== null && style !== void 0 && (_style$color3 = style.color) !== null && _style$color3 !== void 0 && _style$color3.gradient ? undefined : 50; // Move the background or gradient color to the parent Cover block.
|
|
94
|
+
|
|
95
|
+
const parentAttributes = {
|
|
109
96
|
align,
|
|
110
97
|
anchor,
|
|
98
|
+
dimRatio,
|
|
111
99
|
overlayColor: backgroundColor,
|
|
112
100
|
customOverlayColor: style === null || style === void 0 ? void 0 : (_style$color4 = style.color) === null || _style$color4 === void 0 ? void 0 : _style$color4.background,
|
|
113
101
|
gradient,
|
|
114
102
|
customGradient: style === null || style === void 0 ? void 0 : (_style$color5 = style.color) === null || _style$color5 === void 0 ? void 0 : _style$color5.gradient
|
|
115
|
-
}
|
|
103
|
+
};
|
|
104
|
+
const attributesWithoutBackgroundColors = { ...attributes,
|
|
105
|
+
backgroundColor: undefined,
|
|
106
|
+
gradient: undefined,
|
|
107
|
+
style: { ...(attributes === null || attributes === void 0 ? void 0 : attributes.style),
|
|
108
|
+
color: { ...(attributes === null || attributes === void 0 ? void 0 : (_attributes$style = attributes.style) === null || _attributes$style === void 0 ? void 0 : _attributes$style.color),
|
|
109
|
+
background: undefined,
|
|
110
|
+
gradient: undefined
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}; // Preserve the block by nesting it within the Cover block,
|
|
114
|
+
// instead of converting the Group block directly to the Cover block.
|
|
115
|
+
|
|
116
|
+
return (0, _blocks.createBlock)('core/cover', parentAttributes, [(0, _blocks.createBlock)('core/group', attributesWithoutBackgroundColors, innerBlocks)]);
|
|
116
117
|
}
|
|
117
118
|
}],
|
|
118
119
|
to: [{
|
|
119
120
|
type: 'block',
|
|
120
121
|
blocks: ['core/image'],
|
|
121
|
-
isMatch:
|
|
122
|
+
isMatch: _ref3 => {
|
|
122
123
|
let {
|
|
123
124
|
backgroundType,
|
|
124
125
|
url,
|
|
@@ -126,7 +127,7 @@ const transforms = {
|
|
|
126
127
|
customOverlayColor,
|
|
127
128
|
gradient,
|
|
128
129
|
customGradient
|
|
129
|
-
} =
|
|
130
|
+
} = _ref3;
|
|
130
131
|
|
|
131
132
|
if (url) {
|
|
132
133
|
// If a url exists the transform could happen if that URL represents an image background.
|
|
@@ -136,7 +137,7 @@ const transforms = {
|
|
|
136
137
|
|
|
137
138
|
return !overlayColor && !customOverlayColor && !gradient && !customGradient;
|
|
138
139
|
},
|
|
139
|
-
transform:
|
|
140
|
+
transform: _ref4 => {
|
|
140
141
|
var _style$color6;
|
|
141
142
|
|
|
142
143
|
let {
|
|
@@ -147,7 +148,7 @@ const transforms = {
|
|
|
147
148
|
id,
|
|
148
149
|
anchor,
|
|
149
150
|
style
|
|
150
|
-
} =
|
|
151
|
+
} = _ref4;
|
|
151
152
|
return (0, _blocks.createBlock)('core/image', {
|
|
152
153
|
caption: title,
|
|
153
154
|
url,
|
|
@@ -165,7 +166,7 @@ const transforms = {
|
|
|
165
166
|
}, {
|
|
166
167
|
type: 'block',
|
|
167
168
|
blocks: ['core/video'],
|
|
168
|
-
isMatch:
|
|
169
|
+
isMatch: _ref5 => {
|
|
169
170
|
let {
|
|
170
171
|
backgroundType,
|
|
171
172
|
url,
|
|
@@ -173,7 +174,7 @@ const transforms = {
|
|
|
173
174
|
customOverlayColor,
|
|
174
175
|
gradient,
|
|
175
176
|
customGradient
|
|
176
|
-
} =
|
|
177
|
+
} = _ref5;
|
|
177
178
|
|
|
178
179
|
if (url) {
|
|
179
180
|
// If a url exists the transform could happen if that URL represents a video background.
|
|
@@ -183,14 +184,14 @@ const transforms = {
|
|
|
183
184
|
|
|
184
185
|
return !overlayColor && !customOverlayColor && !gradient && !customGradient;
|
|
185
186
|
},
|
|
186
|
-
transform:
|
|
187
|
+
transform: _ref6 => {
|
|
187
188
|
let {
|
|
188
189
|
title,
|
|
189
190
|
url,
|
|
190
191
|
align,
|
|
191
192
|
id,
|
|
192
193
|
anchor
|
|
193
|
-
} =
|
|
194
|
+
} = _ref6;
|
|
194
195
|
return (0, _blocks.createBlock)('core/video', {
|
|
195
196
|
caption: title,
|
|
196
197
|
src: url,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/cover/transforms.js"],"names":["transforms","from","type","blocks","transform","caption","url","alt","align","id","anchor","style","dimRatio","color","duotone","content","fontSize","src","backgroundType","VIDEO_BACKGROUND_TYPE","
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/cover/transforms.js"],"names":["transforms","from","type","blocks","transform","caption","url","alt","align","id","anchor","style","dimRatio","color","duotone","content","fontSize","src","backgroundType","VIDEO_BACKGROUND_TYPE","attributes","innerBlocks","backgroundColor","gradient","background","undefined","parentAttributes","overlayColor","customOverlayColor","customGradient","attributesWithoutBackgroundColors","to","isMatch","IMAGE_BACKGROUND_TYPE","title"],"mappings":";;;;;;;AAGA;;AAKA;;AARA;AACA;AACA;;AAGA;AACA;AACA;AAGA,MAAMA,UAAU,GAAG;AAClBC,EAAAA,IAAI,EAAE,CACL;AACCC,IAAAA,IAAI,EAAE,OADP;AAECC,IAAAA,MAAM,EAAE,CAAE,YAAF,CAFT;AAGCC,IAAAA,SAAS,EAAE;AAAA;;AAAA,UAAE;AAAEC,QAAAA,OAAF;AAAWC,QAAAA,GAAX;AAAgBC,QAAAA,GAAhB;AAAqBC,QAAAA,KAArB;AAA4BC,QAAAA,EAA5B;AAAgCC,QAAAA,MAAhC;AAAwCC,QAAAA;AAAxC,OAAF;AAAA,aACV,yBACC,YADD,EAEC;AACCC,QAAAA,QAAQ,EA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EVZ,QAAAA,GAFU;AAGVqB,QAAAA,YAHU;AAIVC,QAAAA,kBAJU;AAKVL,QAAAA,QALU;AAMVM,QAAAA;AANU,OAOJ;;AACN,UAAKvB,GAAL,EAAW;AACV;AACA,eAAOY,cAAc,KAAKC,6BAA1B;AACA,OAJK,CAKN;;;AACA,aACC,CAAEQ,YAAF,IACA,CAAEC,kBADF,IAEA,CAAEL,QAFF,IAGA,CAAEM,cAJH;AAMA,KAtBF;AAuBCzB,IAAAA,SAAS,EAAE;AAAA,UAAE;AAAE8B,QAAAA,KAAF;AAAS5B,QAAAA,GAAT;AAAcE,QAAAA,KAAd;AAAqBC,QAAAA,EAArB;AAAyBC,QAAAA;AAAzB,OAAF;AAAA,aACV,yBAAa,YAAb,EAA2B;AAC1BL,QAAAA,OAAO,EAAE6B,KADiB;AAE1BjB,QAAAA,GAAG,EAAEX,GAFqB;AAG1BG,QAAAA,EAH0B;AAI1BD,QAAAA,KAJ0B;AAK1BE,QAAAA;AAL0B,OAA3B,CADU;AAAA;AAvBZ,GAvCG;AAjHc,CAAnB;eA2LeV,U","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { IMAGE_BACKGROUND_TYPE, VIDEO_BACKGROUND_TYPE } from './shared';\n\nconst transforms = {\n\tfrom: [\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/image' ],\n\t\t\ttransform: ( { caption, url, alt, align, id, anchor, style } ) =>\n\t\t\t\tcreateBlock(\n\t\t\t\t\t'core/cover',\n\t\t\t\t\t{\n\t\t\t\t\t\tdimRatio: 50,\n\t\t\t\t\t\turl,\n\t\t\t\t\t\talt,\n\t\t\t\t\t\talign,\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tanchor,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\t\tduotone: style?.color?.duotone,\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\t[\n\t\t\t\t\t\tcreateBlock( 'core/paragraph', {\n\t\t\t\t\t\t\tcontent: caption,\n\t\t\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\t\t\talign: 'center',\n\t\t\t\t\t\t} ),\n\t\t\t\t\t]\n\t\t\t\t),\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/video' ],\n\t\t\ttransform: ( { caption, src, align, id, anchor } ) =>\n\t\t\t\tcreateBlock(\n\t\t\t\t\t'core/cover',\n\t\t\t\t\t{\n\t\t\t\t\t\tdimRatio: 50,\n\t\t\t\t\t\turl: src,\n\t\t\t\t\t\talign,\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tbackgroundType: VIDEO_BACKGROUND_TYPE,\n\t\t\t\t\t\tanchor,\n\t\t\t\t\t},\n\t\t\t\t\t[\n\t\t\t\t\t\tcreateBlock( 'core/paragraph', {\n\t\t\t\t\t\t\tcontent: caption,\n\t\t\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\t\t\talign: 'center',\n\t\t\t\t\t\t} ),\n\t\t\t\t\t]\n\t\t\t\t),\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/group' ],\n\t\t\ttransform: ( attributes, innerBlocks ) => {\n\t\t\t\tconst {\n\t\t\t\t\talign,\n\t\t\t\t\tanchor,\n\t\t\t\t\tbackgroundColor,\n\t\t\t\t\tgradient,\n\t\t\t\t\tstyle,\n\t\t\t\t} = attributes;\n\n\t\t\t\t// If no background or gradient color is provided, default to 50% opacity.\n\t\t\t\t// This matches the styling of a Cover block with a background image,\n\t\t\t\t// in the state where a background image has been removed.\n\t\t\t\tconst dimRatio =\n\t\t\t\t\tbackgroundColor ||\n\t\t\t\t\tgradient ||\n\t\t\t\t\tstyle?.color?.background ||\n\t\t\t\t\tstyle?.color?.gradient\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: 50;\n\n\t\t\t\t// Move the background or gradient color to the parent Cover block.\n\t\t\t\tconst parentAttributes = {\n\t\t\t\t\talign,\n\t\t\t\t\tanchor,\n\t\t\t\t\tdimRatio,\n\t\t\t\t\toverlayColor: backgroundColor,\n\t\t\t\t\tcustomOverlayColor: style?.color?.background,\n\t\t\t\t\tgradient,\n\t\t\t\t\tcustomGradient: style?.color?.gradient,\n\t\t\t\t};\n\n\t\t\t\tconst attributesWithoutBackgroundColors = {\n\t\t\t\t\t...attributes,\n\t\t\t\t\tbackgroundColor: undefined,\n\t\t\t\t\tgradient: undefined,\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...attributes?.style,\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\t...attributes?.style?.color,\n\t\t\t\t\t\t\tbackground: undefined,\n\t\t\t\t\t\t\tgradient: undefined,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\t// Preserve the block by nesting it within the Cover block,\n\t\t\t\t// instead of converting the Group block directly to the Cover block.\n\t\t\t\treturn createBlock( 'core/cover', parentAttributes, [\n\t\t\t\t\tcreateBlock(\n\t\t\t\t\t\t'core/group',\n\t\t\t\t\t\tattributesWithoutBackgroundColors,\n\t\t\t\t\t\tinnerBlocks\n\t\t\t\t\t),\n\t\t\t\t] );\n\t\t\t},\n\t\t},\n\t],\n\tto: [\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/image' ],\n\t\t\tisMatch: ( {\n\t\t\t\tbackgroundType,\n\t\t\t\turl,\n\t\t\t\toverlayColor,\n\t\t\t\tcustomOverlayColor,\n\t\t\t\tgradient,\n\t\t\t\tcustomGradient,\n\t\t\t} ) => {\n\t\t\t\tif ( url ) {\n\t\t\t\t\t// If a url exists the transform could happen if that URL represents an image background.\n\t\t\t\t\treturn backgroundType === IMAGE_BACKGROUND_TYPE;\n\t\t\t\t}\n\t\t\t\t// If a url is not set the transform could happen if the cover has no background color or gradient;\n\t\t\t\treturn (\n\t\t\t\t\t! overlayColor &&\n\t\t\t\t\t! customOverlayColor &&\n\t\t\t\t\t! gradient &&\n\t\t\t\t\t! customGradient\n\t\t\t\t);\n\t\t\t},\n\t\t\ttransform: ( { title, url, alt, align, id, anchor, style } ) =>\n\t\t\t\tcreateBlock( 'core/image', {\n\t\t\t\t\tcaption: title,\n\t\t\t\t\turl,\n\t\t\t\t\talt,\n\t\t\t\t\talign,\n\t\t\t\t\tid,\n\t\t\t\t\tanchor,\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\tduotone: style?.color?.duotone,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t} ),\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/video' ],\n\t\t\tisMatch: ( {\n\t\t\t\tbackgroundType,\n\t\t\t\turl,\n\t\t\t\toverlayColor,\n\t\t\t\tcustomOverlayColor,\n\t\t\t\tgradient,\n\t\t\t\tcustomGradient,\n\t\t\t} ) => {\n\t\t\t\tif ( url ) {\n\t\t\t\t\t// If a url exists the transform could happen if that URL represents a video background.\n\t\t\t\t\treturn backgroundType === VIDEO_BACKGROUND_TYPE;\n\t\t\t\t}\n\t\t\t\t// If a url is not set the transform could happen if the cover has no background color or gradient;\n\t\t\t\treturn (\n\t\t\t\t\t! overlayColor &&\n\t\t\t\t\t! customOverlayColor &&\n\t\t\t\t\t! gradient &&\n\t\t\t\t\t! customGradient\n\t\t\t\t);\n\t\t\t},\n\t\t\ttransform: ( { title, url, align, id, anchor } ) =>\n\t\t\t\tcreateBlock( 'core/video', {\n\t\t\t\t\tcaption: title,\n\t\t\t\t\tsrc: url,\n\t\t\t\t\tid,\n\t\t\t\t\talign,\n\t\t\t\t\tanchor,\n\t\t\t\t} ),\n\t\t},\n\t],\n};\n\nexport default transforms;\n"]}
|
package/build/index.js
CHANGED
|
@@ -53,6 +53,8 @@ var commentsPaginationNext = _interopRequireWildcard(require("./comments-paginat
|
|
|
53
53
|
|
|
54
54
|
var commentsPaginationNumbers = _interopRequireWildcard(require("./comments-pagination-numbers"));
|
|
55
55
|
|
|
56
|
+
var commentsTitle = _interopRequireWildcard(require("./comments-title"));
|
|
57
|
+
|
|
56
58
|
var cover = _interopRequireWildcard(require("./cover"));
|
|
57
59
|
|
|
58
60
|
var embed = _interopRequireWildcard(require("./embed"));
|
|
@@ -240,11 +242,11 @@ const registerBlock = block => {
|
|
|
240
242
|
|
|
241
243
|
const __experimentalGetCoreBlocks = () => [// Common blocks are grouped at the top to prioritize their display
|
|
242
244
|
// in various contexts — like the inserter and auto-complete components.
|
|
243
|
-
paragraph, image, heading, gallery, list,
|
|
245
|
+
paragraph, image, heading, gallery, list, quote, // Register all remaining core blocks.
|
|
244
246
|
archives, audio, button, buttons, calendar, categories, window.wp && window.wp.oldEditor ? classic : null, // Only add the classic block in WP Context.
|
|
245
247
|
code, column, columns, cover, embed, file, group, html, latestComments, latestPosts, mediaText, missing, more, nextpage, pageList, pattern, preformatted, pullquote, reusableBlock, rss, search, separator, shortcode, socialLink, socialLinks, spacer, table, // tableOfContents,
|
|
246
248
|
tagCloud, textColumns, verse, video, // theme blocks
|
|
247
|
-
navigation, navigationLink, navigationSubmenu, siteLogo, siteTitle, siteTagline, query, templatePart, avatar, postTitle, postExcerpt, postFeaturedImage, postContent, postAuthor, postDate, postTerms, postNavigationLink, postTemplate, queryPagination, queryPaginationNext, queryPaginationNumbers, queryPaginationPrevious, queryNoResults, readMore, commentAuthorName, commentContent, commentDate, commentEditLink, commentReplyLink, commentTemplate, commentsQueryLoop, commentsPagination, commentsPaginationNext, commentsPaginationNumbers, commentsPaginationPrevious, postComments, homeLink, logInOut, termDescription, queryTitle, postAuthorBiography];
|
|
249
|
+
navigation, navigationLink, navigationSubmenu, siteLogo, siteTitle, siteTagline, query, templatePart, avatar, postTitle, postExcerpt, postFeaturedImage, postContent, postAuthor, postDate, postTerms, postNavigationLink, postTemplate, queryPagination, queryPaginationNext, queryPaginationNumbers, queryPaginationPrevious, queryNoResults, readMore, commentAuthorName, commentContent, commentDate, commentEditLink, commentReplyLink, commentTemplate, commentsTitle, commentsQueryLoop, commentsPagination, commentsPaginationNext, commentsPaginationNumbers, commentsPaginationPrevious, postComments, postCommentsForm, homeLink, logInOut, termDescription, queryTitle, postAuthorBiography];
|
|
248
250
|
/**
|
|
249
251
|
* Function to register core blocks provided by the block editor.
|
|
250
252
|
*
|
|
@@ -293,8 +295,8 @@ const __experimentalRegisterExperimentalCoreBlocks = process.env.IS_GUTENBERG_PL
|
|
|
293
295
|
enableFSEBlocks
|
|
294
296
|
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
295
297
|
[// Experimental blocks.
|
|
296
|
-
postAuthorName, // Full Site Editing blocks.
|
|
297
|
-
...(enableFSEBlocks ? [commentAuthorAvatar, navigationArea, postComment, postCommentsCount,
|
|
298
|
+
postAuthorName, ...(window.__experimentalEnableListBlockV2 ? [listItem] : []), // Full Site Editing blocks.
|
|
299
|
+
...(enableFSEBlocks ? [commentAuthorAvatar, navigationArea, postComment, postCommentsCount, postCommentsLink] : [])].forEach(registerBlock);
|
|
298
300
|
} : undefined;
|
|
299
301
|
|
|
300
302
|
exports.__experimentalRegisterExperimentalCoreBlocks = __experimentalRegisterExperimentalCoreBlocks;
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/index.js"],"names":["registerBlock","block","metadata","settings","name","__experimentalGetCoreBlocks","paragraph","image","heading","gallery","list","listItem","quote","archives","audio","button","buttons","calendar","categories","window","wp","oldEditor","classic","code","column","columns","cover","embed","file","group","html","latestComments","latestPosts","mediaText","missing","more","nextpage","pageList","pattern","preformatted","pullquote","reusableBlock","rss","search","separator","shortcode","socialLink","socialLinks","spacer","table","tagCloud","textColumns","verse","video","navigation","navigationLink","navigationSubmenu","siteLogo","siteTitle","siteTagline","query","templatePart","avatar","postTitle","postExcerpt","postFeaturedImage","postContent","postAuthor","postDate","postTerms","postNavigationLink","postTemplate","queryPagination","queryPaginationNext","queryPaginationNumbers","queryPaginationPrevious","queryNoResults","readMore","commentAuthorName","commentContent","commentDate","commentEditLink","commentReplyLink","commentTemplate","commentsQueryLoop","commentsPagination","commentsPaginationNext","commentsPaginationNumbers","commentsPaginationPrevious","postComments","homeLink","logInOut","termDescription","queryTitle","postAuthorBiography","registerCoreBlocks","blocks","forEach","__experimentalRegisterExperimentalCoreBlocks","process","env","IS_GUTENBERG_PLUGIN","enableFSEBlocks","postAuthorName","commentAuthorAvatar","navigationArea","postComment","postCommentsCount","postCommentsForm","postCommentsLink","undefined"],"mappings":";;;;;;;AAGA;;AAWA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AA1GA;AACA;AACA;;AASA;AACA;AACA;;AA+FA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,aAAa,GAAKC,KAAF,IAAa;AAClC,MAAK,CAAEA,KAAP,EAAe;AACd;AACA;;AACD,QAAM;AAAEC,IAAAA,QAAF;AAAYC,IAAAA,QAAZ;AAAsBC,IAAAA;AAAtB,MAA+BH,KAArC;AACA,iCAA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CACAE,mBADA,EAEAC,cAFA,EAGAC,WAHA,EAIAC,iBAJA,EAKAC,gBALA,EAMAC,gBANA,CADiB,GASjB,EATH,CAJD,EAcEZ,OAdF,CAcWjG,aAdX;AAeC,CAlBwD,GAmBzD8G,SAnBI","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tregisterBlockType,\n\tsetDefaultBlockName,\n\tsetFreeformContentHandlerName,\n\tsetUnregisteredTypeHandlerName,\n\tsetGroupingBlockName,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport * as archives from './archives';\nimport * as avatar from './avatar';\nimport * as audio from './audio';\nimport * as button from './button';\nimport * as buttons from './buttons';\nimport * as calendar from './calendar';\nimport * as categories from './categories';\nimport * as classic from './freeform';\nimport * as code from './code';\nimport * as column from './column';\nimport * as columns from './columns';\nimport * as commentAuthorAvatar from './comment-author-avatar';\nimport * as commentAuthorName from './comment-author-name';\nimport * as commentContent from './comment-content';\nimport * as commentDate from './comment-date';\nimport * as commentEditLink from './comment-edit-link';\nimport * as commentReplyLink from './comment-reply-link';\nimport * as commentTemplate from './comment-template';\nimport * as commentsPaginationPrevious from './comments-pagination-previous';\nimport * as commentsQueryLoop from './comments-query-loop';\nimport * as commentsPagination from './comments-pagination';\nimport * as commentsPaginationNext from './comments-pagination-next';\nimport * as commentsPaginationNumbers from './comments-pagination-numbers';\nimport * as cover from './cover';\nimport * as embed from './embed';\nimport * as file from './file';\nimport * as gallery from './gallery';\nimport * as group from './group';\nimport * as heading from './heading';\nimport * as homeLink from './home-link';\nimport * as html from './html';\nimport * as image from './image';\nimport * as latestComments from './latest-comments';\nimport * as latestPosts from './latest-posts';\nimport * as list from './list';\nimport * as listItem from './list-item';\nimport * as logInOut from './loginout';\nimport * as mediaText from './media-text';\nimport * as missing from './missing';\nimport * as more from './more';\nimport * as navigation from './navigation';\nimport * as navigationArea from './navigation-area';\nimport * as navigationLink from './navigation-link';\nimport * as navigationSubmenu from './navigation-submenu';\nimport * as nextpage from './nextpage';\nimport * as pattern from './pattern';\nimport * as pageList from './page-list';\nimport * as paragraph from './paragraph';\nimport * as postAuthor from './post-author';\nimport * as postAuthorName from './post-author-name';\nimport * as postAuthorBiography from './post-author-biography';\nimport * as postComment from './post-comment';\nimport * as postComments from './post-comments';\nimport * as postCommentsCount from './post-comments-count';\nimport * as postCommentsForm from './post-comments-form';\nimport * as postCommentsLink from './post-comments-link';\nimport * as postContent from './post-content';\nimport * as postDate from './post-date';\nimport * as postExcerpt from './post-excerpt';\nimport * as postFeaturedImage from './post-featured-image';\nimport * as postNavigationLink from './post-navigation-link';\nimport * as postTemplate from './post-template';\nimport * as postTerms from './post-terms';\nimport * as postTitle from './post-title';\nimport * as preformatted from './preformatted';\nimport * as pullquote from './pullquote';\nimport * as query from './query';\nimport * as queryNoResults from './query-no-results';\nimport * as queryPagination from './query-pagination';\nimport * as queryPaginationNext from './query-pagination-next';\nimport * as queryPaginationNumbers from './query-pagination-numbers';\nimport * as queryPaginationPrevious from './query-pagination-previous';\nimport * as queryTitle from './query-title';\nimport * as quote from './quote';\nimport * as reusableBlock from './block';\nimport * as readMore from './read-more';\nimport * as rss from './rss';\nimport * as search from './search';\nimport * as separator from './separator';\nimport * as shortcode from './shortcode';\nimport * as siteLogo from './site-logo';\nimport * as siteTagline from './site-tagline';\nimport * as siteTitle from './site-title';\nimport * as socialLink from './social-link';\nimport * as socialLinks from './social-links';\nimport * as spacer from './spacer';\nimport * as table from './table';\nimport * as tagCloud from './tag-cloud';\nimport * as templatePart from './template-part';\nimport * as termDescription from './term-description';\nimport * as textColumns from './text-columns';\nimport * as verse from './verse';\nimport * as video from './video';\n\n/**\n * Function to register an individual block.\n *\n * @param {Object} block The block to be registered.\n *\n */\nconst registerBlock = ( block ) => {\n\tif ( ! block ) {\n\t\treturn;\n\t}\n\tconst { metadata, settings, name } = block;\n\tregisterBlockType( { name, ...metadata }, settings );\n};\n\n/**\n * Function to get all the core blocks in an array.\n *\n * @example\n * ```js\n * import { __experimentalGetCoreBlocks } from '@wordpress/block-library';\n *\n * const coreBlocks = __experimentalGetCoreBlocks();\n * ```\n */\nexport const __experimentalGetCoreBlocks = () => [\n\t// Common blocks are grouped at the top to prioritize their display\n\t// in various contexts — like the inserter and auto-complete components.\n\tparagraph,\n\timage,\n\theading,\n\tgallery,\n\tlist,\n\tlistItem,\n\tquote,\n\n\t// Register all remaining core blocks.\n\tarchives,\n\taudio,\n\tbutton,\n\tbuttons,\n\tcalendar,\n\tcategories,\n\twindow.wp && window.wp.oldEditor ? classic : null, // Only add the classic block in WP Context.\n\tcode,\n\tcolumn,\n\tcolumns,\n\tcover,\n\tembed,\n\tfile,\n\tgroup,\n\thtml,\n\tlatestComments,\n\tlatestPosts,\n\tmediaText,\n\tmissing,\n\tmore,\n\tnextpage,\n\tpageList,\n\tpattern,\n\tpreformatted,\n\tpullquote,\n\treusableBlock,\n\trss,\n\tsearch,\n\tseparator,\n\tshortcode,\n\tsocialLink,\n\tsocialLinks,\n\tspacer,\n\ttable,\n\t// tableOfContents,\n\ttagCloud,\n\ttextColumns,\n\tverse,\n\tvideo,\n\n\t// theme blocks\n\tnavigation,\n\tnavigationLink,\n\tnavigationSubmenu,\n\tsiteLogo,\n\tsiteTitle,\n\tsiteTagline,\n\tquery,\n\ttemplatePart,\n\tavatar,\n\tpostTitle,\n\tpostExcerpt,\n\tpostFeaturedImage,\n\tpostContent,\n\tpostAuthor,\n\tpostDate,\n\tpostTerms,\n\tpostNavigationLink,\n\tpostTemplate,\n\tqueryPagination,\n\tqueryPaginationNext,\n\tqueryPaginationNumbers,\n\tqueryPaginationPrevious,\n\tqueryNoResults,\n\treadMore,\n\tcommentAuthorName,\n\tcommentContent,\n\tcommentDate,\n\tcommentEditLink,\n\tcommentReplyLink,\n\tcommentTemplate,\n\tcommentsQueryLoop,\n\tcommentsPagination,\n\tcommentsPaginationNext,\n\tcommentsPaginationNumbers,\n\tcommentsPaginationPrevious,\n\tpostComments,\n\thomeLink,\n\tlogInOut,\n\ttermDescription,\n\tqueryTitle,\n\tpostAuthorBiography,\n];\n\n/**\n * Function to register core blocks provided by the block editor.\n *\n * @param {Array} blocks An optional array of the core blocks being registered.\n *\n * @example\n * ```js\n * import { registerCoreBlocks } from '@wordpress/block-library';\n *\n * registerCoreBlocks();\n * ```\n */\nexport const registerCoreBlocks = (\n\tblocks = __experimentalGetCoreBlocks()\n) => {\n\tblocks.forEach( registerBlock );\n\n\tsetDefaultBlockName( paragraph.name );\n\tif ( window.wp && window.wp.oldEditor ) {\n\t\tsetFreeformContentHandlerName( classic.name );\n\t}\n\tsetUnregisteredTypeHandlerName( missing.name );\n\tsetGroupingBlockName( group.name );\n};\n\n/**\n * Function to register experimental core blocks depending on editor settings.\n *\n * @param {boolean} enableFSEBlocks Whether to enable the full site editing blocks.\n * @example\n * ```js\n * import { __experimentalRegisterExperimentalCoreBlocks } from '@wordpress/block-library';\n *\n * __experimentalRegisterExperimentalCoreBlocks( settings );\n * ```\n */\nexport const __experimentalRegisterExperimentalCoreBlocks = process.env\n\t.IS_GUTENBERG_PLUGIN\n\t? ( { enableFSEBlocks } = {} ) => {\n\t\t\t[\n\t\t\t\t// Experimental blocks.\n\t\t\t\tpostAuthorName,\n\t\t\t\t// Full Site Editing blocks.\n\t\t\t\t...( enableFSEBlocks\n\t\t\t\t\t? [\n\t\t\t\t\t\t\tcommentAuthorAvatar,\n\t\t\t\t\t\t\tnavigationArea,\n\t\t\t\t\t\t\tpostComment,\n\t\t\t\t\t\t\tpostCommentsCount,\n\t\t\t\t\t\t\tpostCommentsForm,\n\t\t\t\t\t\t\tpostCommentsLink,\n\t\t\t\t\t ]\n\t\t\t\t\t: [] ),\n\t\t\t].forEach( registerBlock );\n\t }\n\t: undefined;\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/index.js"],"names":["registerBlock","block","metadata","settings","name","__experimentalGetCoreBlocks","paragraph","image","heading","gallery","list","quote","archives","audio","button","buttons","calendar","categories","window","wp","oldEditor","classic","code","column","columns","cover","embed","file","group","html","latestComments","latestPosts","mediaText","missing","more","nextpage","pageList","pattern","preformatted","pullquote","reusableBlock","rss","search","separator","shortcode","socialLink","socialLinks","spacer","table","tagCloud","textColumns","verse","video","navigation","navigationLink","navigationSubmenu","siteLogo","siteTitle","siteTagline","query","templatePart","avatar","postTitle","postExcerpt","postFeaturedImage","postContent","postAuthor","postDate","postTerms","postNavigationLink","postTemplate","queryPagination","queryPaginationNext","queryPaginationNumbers","queryPaginationPrevious","queryNoResults","readMore","commentAuthorName","commentContent","commentDate","commentEditLink","commentReplyLink","commentTemplate","commentsTitle","commentsQueryLoop","commentsPagination","commentsPaginationNext","commentsPaginationNumbers","commentsPaginationPrevious","postComments","postCommentsForm","homeLink","logInOut","termDescription","queryTitle","postAuthorBiography","registerCoreBlocks","blocks","forEach","__experimentalRegisterExperimentalCoreBlocks","process","env","IS_GUTENBERG_PLUGIN","enableFSEBlocks","postAuthorName","__experimentalEnableListBlockV2","listItem","commentAuthorAvatar","navigationArea","postComment","postCommentsCount","postCommentsLink","undefined"],"mappings":";;;;;;;AAGA;;AAWA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;A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ACxB,IAA5B;AACA,CAXM;AAaP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AACO,MAAM+F,4CAA4C,GAAGC,OAAO,CAACC,GAAR,CAC1DC,mBAD0D,GAEzD,YAAgC;AAAA,MAA9B;AAAEC,IAAAA;AAAF,GAA8B,uEAAR,EAAQ;AAChC,GACC;AACAC,EAAAA,cAFD,EAGC,IAAKtF,MAAM,CAACuF,+BAAP,GACF,CAAEC,QAAF,CADE,GAEF,EAFH,CAHD,EAOC;AACA,MAAKH,eAAe,GACjB,CACAI,mBADA,EAEAC,cAFA,EAGAC,WAHA,EAIAC,iBAJA,EAKAC,gBALA,CADiB,GAQjB,EARH,CARD,EAiBEb,OAjBF,CAiBWlG,aAjBX;AAkBC,CArBwD,GAsBzDgH,SAtBI","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tregisterBlockType,\n\tsetDefaultBlockName,\n\tsetFreeformContentHandlerName,\n\tsetUnregisteredTypeHandlerName,\n\tsetGroupingBlockName,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport * as archives from './archives';\nimport * as avatar from './avatar';\nimport * as audio from './audio';\nimport * as button from './button';\nimport * as buttons from './buttons';\nimport * as calendar from './calendar';\nimport * as categories from './categories';\nimport * as classic from './freeform';\nimport * as code from './code';\nimport * as column from './column';\nimport * as columns from './columns';\nimport * as commentAuthorAvatar from './comment-author-avatar';\nimport * as commentAuthorName from './comment-author-name';\nimport * as commentContent from './comment-content';\nimport * as commentDate from './comment-date';\nimport * as commentEditLink from './comment-edit-link';\nimport * as commentReplyLink from './comment-reply-link';\nimport * as commentTemplate from './comment-template';\nimport * as commentsPaginationPrevious from './comments-pagination-previous';\nimport * as commentsQueryLoop from './comments-query-loop';\nimport * as commentsPagination from './comments-pagination';\nimport * as commentsPaginationNext from './comments-pagination-next';\nimport * as commentsPaginationNumbers from './comments-pagination-numbers';\nimport * as commentsTitle from './comments-title';\nimport * as cover from './cover';\nimport * as embed from './embed';\nimport * as file from './file';\nimport * as gallery from './gallery';\nimport * as group from './group';\nimport * as heading from './heading';\nimport * as homeLink from './home-link';\nimport * as html from './html';\nimport * as image from './image';\nimport * as latestComments from './latest-comments';\nimport * as latestPosts from './latest-posts';\nimport * as list from './list';\nimport * as listItem from './list-item';\nimport * as logInOut from './loginout';\nimport * as mediaText from './media-text';\nimport * as missing from './missing';\nimport * as more from './more';\nimport * as navigation from './navigation';\nimport * as navigationArea from './navigation-area';\nimport * as navigationLink from './navigation-link';\nimport * as navigationSubmenu from './navigation-submenu';\nimport * as nextpage from './nextpage';\nimport * as pattern from './pattern';\nimport * as pageList from './page-list';\nimport * as paragraph from './paragraph';\nimport * as postAuthor from './post-author';\nimport * as postAuthorName from './post-author-name';\nimport * as postAuthorBiography from './post-author-biography';\nimport * as postComment from './post-comment';\nimport * as postComments from './post-comments';\nimport * as postCommentsCount from './post-comments-count';\nimport * as postCommentsForm from './post-comments-form';\nimport * as postCommentsLink from './post-comments-link';\nimport * as postContent from './post-content';\nimport * as postDate from './post-date';\nimport * as postExcerpt from './post-excerpt';\nimport * as postFeaturedImage from './post-featured-image';\nimport * as postNavigationLink from './post-navigation-link';\nimport * as postTemplate from './post-template';\nimport * as postTerms from './post-terms';\nimport * as postTitle from './post-title';\nimport * as preformatted from './preformatted';\nimport * as pullquote from './pullquote';\nimport * as query from './query';\nimport * as queryNoResults from './query-no-results';\nimport * as queryPagination from './query-pagination';\nimport * as queryPaginationNext from './query-pagination-next';\nimport * as queryPaginationNumbers from './query-pagination-numbers';\nimport * as queryPaginationPrevious from './query-pagination-previous';\nimport * as queryTitle from './query-title';\nimport * as quote from './quote';\nimport * as reusableBlock from './block';\nimport * as readMore from './read-more';\nimport * as rss from './rss';\nimport * as search from './search';\nimport * as separator from './separator';\nimport * as shortcode from './shortcode';\nimport * as siteLogo from './site-logo';\nimport * as siteTagline from './site-tagline';\nimport * as siteTitle from './site-title';\nimport * as socialLink from './social-link';\nimport * as socialLinks from './social-links';\nimport * as spacer from './spacer';\nimport * as table from './table';\nimport * as tagCloud from './tag-cloud';\nimport * as templatePart from './template-part';\nimport * as termDescription from './term-description';\nimport * as textColumns from './text-columns';\nimport * as verse from './verse';\nimport * as video from './video';\n\n/**\n * Function to register an individual block.\n *\n * @param {Object} block The block to be registered.\n *\n */\nconst registerBlock = ( block ) => {\n\tif ( ! block ) {\n\t\treturn;\n\t}\n\tconst { metadata, settings, name } = block;\n\tregisterBlockType( { name, ...metadata }, settings );\n};\n\n/**\n * Function to get all the core blocks in an array.\n *\n * @example\n * ```js\n * import { __experimentalGetCoreBlocks } from '@wordpress/block-library';\n *\n * const coreBlocks = __experimentalGetCoreBlocks();\n * ```\n */\nexport const __experimentalGetCoreBlocks = () => [\n\t// Common blocks are grouped at the top to prioritize their display\n\t// in various contexts — like the inserter and auto-complete components.\n\tparagraph,\n\timage,\n\theading,\n\tgallery,\n\tlist,\n\tquote,\n\n\t// Register all remaining core blocks.\n\tarchives,\n\taudio,\n\tbutton,\n\tbuttons,\n\tcalendar,\n\tcategories,\n\twindow.wp && window.wp.oldEditor ? classic : null, // Only add the classic block in WP Context.\n\tcode,\n\tcolumn,\n\tcolumns,\n\tcover,\n\tembed,\n\tfile,\n\tgroup,\n\thtml,\n\tlatestComments,\n\tlatestPosts,\n\tmediaText,\n\tmissing,\n\tmore,\n\tnextpage,\n\tpageList,\n\tpattern,\n\tpreformatted,\n\tpullquote,\n\treusableBlock,\n\trss,\n\tsearch,\n\tseparator,\n\tshortcode,\n\tsocialLink,\n\tsocialLinks,\n\tspacer,\n\ttable,\n\t// tableOfContents,\n\ttagCloud,\n\ttextColumns,\n\tverse,\n\tvideo,\n\n\t// theme blocks\n\tnavigation,\n\tnavigationLink,\n\tnavigationSubmenu,\n\tsiteLogo,\n\tsiteTitle,\n\tsiteTagline,\n\tquery,\n\ttemplatePart,\n\tavatar,\n\tpostTitle,\n\tpostExcerpt,\n\tpostFeaturedImage,\n\tpostContent,\n\tpostAuthor,\n\tpostDate,\n\tpostTerms,\n\tpostNavigationLink,\n\tpostTemplate,\n\tqueryPagination,\n\tqueryPaginationNext,\n\tqueryPaginationNumbers,\n\tqueryPaginationPrevious,\n\tqueryNoResults,\n\treadMore,\n\tcommentAuthorName,\n\tcommentContent,\n\tcommentDate,\n\tcommentEditLink,\n\tcommentReplyLink,\n\tcommentTemplate,\n\tcommentsTitle,\n\tcommentsQueryLoop,\n\tcommentsPagination,\n\tcommentsPaginationNext,\n\tcommentsPaginationNumbers,\n\tcommentsPaginationPrevious,\n\n\tpostComments,\n\tpostCommentsForm,\n\thomeLink,\n\tlogInOut,\n\ttermDescription,\n\tqueryTitle,\n\tpostAuthorBiography,\n];\n\n/**\n * Function to register core blocks provided by the block editor.\n *\n * @param {Array} blocks An optional array of the core blocks being registered.\n *\n * @example\n * ```js\n * import { registerCoreBlocks } from '@wordpress/block-library';\n *\n * registerCoreBlocks();\n * ```\n */\nexport const registerCoreBlocks = (\n\tblocks = __experimentalGetCoreBlocks()\n) => {\n\tblocks.forEach( registerBlock );\n\n\tsetDefaultBlockName( paragraph.name );\n\tif ( window.wp && window.wp.oldEditor ) {\n\t\tsetFreeformContentHandlerName( classic.name );\n\t}\n\tsetUnregisteredTypeHandlerName( missing.name );\n\tsetGroupingBlockName( group.name );\n};\n\n/**\n * Function to register experimental core blocks depending on editor settings.\n *\n * @param {boolean} enableFSEBlocks Whether to enable the full site editing blocks.\n * @example\n * ```js\n * import { __experimentalRegisterExperimentalCoreBlocks } from '@wordpress/block-library';\n *\n * __experimentalRegisterExperimentalCoreBlocks( settings );\n * ```\n */\nexport const __experimentalRegisterExperimentalCoreBlocks = process.env\n\t.IS_GUTENBERG_PLUGIN\n\t? ( { enableFSEBlocks } = {} ) => {\n\t\t\t[\n\t\t\t\t// Experimental blocks.\n\t\t\t\tpostAuthorName,\n\t\t\t\t...( window.__experimentalEnableListBlockV2\n\t\t\t\t\t? [ listItem ]\n\t\t\t\t\t: [] ),\n\n\t\t\t\t// Full Site Editing blocks.\n\t\t\t\t...( enableFSEBlocks\n\t\t\t\t\t? [\n\t\t\t\t\t\t\tcommentAuthorAvatar,\n\t\t\t\t\t\t\tnavigationArea,\n\t\t\t\t\t\t\tpostComment,\n\t\t\t\t\t\t\tpostCommentsCount,\n\t\t\t\t\t\t\tpostCommentsLink,\n\t\t\t\t\t ]\n\t\t\t\t\t: [] ),\n\t\t\t].forEach( registerBlock );\n\t }\n\t: undefined;\n"]}
|
package/build/list/index.js
CHANGED
|
@@ -19,8 +19,13 @@ var _transforms = _interopRequireDefault(require("./transforms"));
|
|
|
19
19
|
|
|
20
20
|
var _v = _interopRequireDefault(require("./v2"));
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
/**
|
|
23
|
+
* WordPress dependencies
|
|
24
|
+
*/
|
|
23
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Internal dependencies
|
|
28
|
+
*/
|
|
24
29
|
const metadata = {
|
|
25
30
|
$schema: "https://schemas.wp.org/trunk/block.json",
|
|
26
31
|
apiVersion: 2,
|
|
@@ -120,6 +125,12 @@ const settingsV1 = {
|
|
|
120
125
|
save: _save.default,
|
|
121
126
|
deprecated: _deprecated.default
|
|
122
127
|
};
|
|
123
|
-
|
|
128
|
+
let settings = settingsV1;
|
|
124
129
|
exports.settings = settings;
|
|
130
|
+
|
|
131
|
+
if (process.env.IS_GUTENBERG_PLUGIN) {
|
|
132
|
+
var _window;
|
|
133
|
+
|
|
134
|
+
exports.settings = settings = (_window = window) !== null && _window !== void 0 && _window.__experimentalEnableListBlockV2 ? _v.default : settingsV1;
|
|
135
|
+
}
|
|
125
136
|
//# sourceMappingURL=index.js.map
|
package/build/list/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/list/index.js"],"names":["name","metadata","settingsV1","icon","example","attributes","values","transforms","merge","attributesToMerge","edit","save","deprecated","settings","window","__experimentalEnableListBlockV2","settingsV2"],"mappings":";;;;;;;;;AAGA;;AAKA;;AACA;;AAEA;;AACA;;AACA
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/list/index.js"],"names":["name","metadata","settingsV1","icon","example","attributes","values","transforms","merge","attributesToMerge","edit","save","deprecated","settings","process","env","IS_GUTENBERG_PLUGIN","window","__experimentalEnableListBlockV2","settingsV2"],"mappings":";;;;;;;;;AAGA;;AAKA;;AACA;;AAEA;;AACA;;AACA;;AAbA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIA,MAAMC,UAAU,GAAG;AAClBC,EAAAA,IAAI,EAAJA,WADkB;AAElBC,EAAAA,OAAO,EAAE;AACRC,IAAAA,UAAU,EAAE;AACXC,MAAAA,MAAM,EACL;AAFU;AADJ,GAFS;AAQlBC,EAAAA,UAAU,EAAVA,mBARkB;;AASlBC,EAAAA,KAAK,CAAEH,UAAF,EAAcI,iBAAd,EAAkC;AACtC,UAAM;AAAEH,MAAAA;AAAF,QAAaG,iBAAnB;;AAEA,QAAK,CAAEH,MAAF,IAAYA,MAAM,KAAK,WAA5B,EAA0C;AACzC,aAAOD,UAAP;AACA;;AAED,WAAO,EACN,GAAGA,UADG;AAENC,MAAAA,MAAM,EAAED,UAAU,CAACC,MAAX,GAAoBA;AAFtB,KAAP;AAIA,GApBiB;;AAqBlBI,EAAAA,IAAI,EAAJA,aArBkB;AAsBlBC,EAAAA,IAAI,EAAJA,aAtBkB;AAuBlBC,EAAAA,UAAU,EAAVA;AAvBkB,CAAnB;AA0BA,IAAIC,QAAQ,GAAGX,UAAf;;;AACA,IAAKY,OAAO,CAACC,GAAR,CAAYC,mBAAjB,EAAuC;AAAA;;AACtC,qBAAAH,QAAQ,GAAG,WAAAI,MAAM,UAAN,kCAAQC,+BAAR,GACRC,UADQ,GAERjB,UAFH;AAGA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { list as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\nimport settingsV2 from './v2';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nconst settingsV1 = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tvalues:\n\t\t\t\t'<li>Alice.</li><li>The White Rabbit.</li><li>The Cheshire Cat.</li><li>The Mad Hatter.</li><li>The Queen of Hearts.</li>',\n\t\t},\n\t},\n\ttransforms,\n\tmerge( attributes, attributesToMerge ) {\n\t\tconst { values } = attributesToMerge;\n\n\t\tif ( ! values || values === '<li></li>' ) {\n\t\t\treturn attributes;\n\t\t}\n\n\t\treturn {\n\t\t\t...attributes,\n\t\t\tvalues: attributes.values + values,\n\t\t};\n\t},\n\tedit,\n\tsave,\n\tdeprecated,\n};\n\nlet settings = settingsV1;\nif ( process.env.IS_GUTENBERG_PLUGIN ) {\n\tsettings = window?.__experimentalEnableListBlockV2\n\t\t? settingsV2\n\t\t: settingsV1;\n}\nexport { settings };\n"]}
|
|
@@ -381,6 +381,8 @@ function Navigation(_ref) {
|
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
}, [isSelected, isInnerBlockSelected, canUserUpdateNavigationMenu, hasResolvedCanUserUpdateNavigationMenu, canUserCreateNavigationMenu, hasResolvedCanUserCreateNavigationMenu, ref]);
|
|
384
|
+
const navigationSelectorRef = (0, _element.useRef)();
|
|
385
|
+
const [shouldFocusNavigationSelector, setShouldFocusNavigationSelector] = (0, _element.useState)(false);
|
|
384
386
|
const handleSelectNavigation = (0, _element.useCallback)(navPostOrClassicMenu => {
|
|
385
387
|
if (!navPostOrClassicMenu) {
|
|
386
388
|
return;
|
|
@@ -393,7 +395,20 @@ function Navigation(_ref) {
|
|
|
393
395
|
} else {
|
|
394
396
|
handleUpdateMenu(navPostOrClassicMenu.id);
|
|
395
397
|
}
|
|
396
|
-
|
|
398
|
+
|
|
399
|
+
setShouldFocusNavigationSelector(true);
|
|
400
|
+
}, [convert, handleUpdateMenu]); // Focus support after menu selection.
|
|
401
|
+
|
|
402
|
+
(0, _element.useEffect)(() => {
|
|
403
|
+
var _navigationSelectorRe;
|
|
404
|
+
|
|
405
|
+
if (isDraftNavigationMenu || !isEntityAvailable || !shouldFocusNavigationSelector) {
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
navigationSelectorRef === null || navigationSelectorRef === void 0 ? void 0 : (_navigationSelectorRe = navigationSelectorRef.current) === null || _navigationSelectorRe === void 0 ? void 0 : _navigationSelectorRe.focus();
|
|
410
|
+
setShouldFocusNavigationSelector(false);
|
|
411
|
+
}, [isDraftNavigationMenu, isEntityAvailable, shouldFocusNavigationSelector]);
|
|
397
412
|
const resetToEmptyBlock = (0, _element.useCallback)(() => {
|
|
398
413
|
registry.batch(() => {
|
|
399
414
|
if (navigationArea) {
|
|
@@ -481,6 +496,7 @@ function Navigation(_ref) {
|
|
|
481
496
|
}, (0, _element.createElement)(RecursionProvider, null, (0, _element.createElement)(_blockEditor.BlockControls, null, !isDraftNavigationMenu && isEntityAvailable && (0, _element.createElement)(_components.ToolbarGroup, {
|
|
482
497
|
className: "wp-block-navigation__toolbar-menu-selector"
|
|
483
498
|
}, (0, _element.createElement)(_navigationMenuSelector.default, {
|
|
499
|
+
ref: navigationSelectorRef,
|
|
484
500
|
currentMenuId: ref,
|
|
485
501
|
clientId: clientId,
|
|
486
502
|
onSelect: handleSelectNavigation,
|