@wordpress/block-library 9.11.0 → 9.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/button/index.js +1 -1
- package/build/button/index.js.map +1 -1
- package/build/cover/deprecated.js +140 -4
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit/block-controls.js +1 -1
- package/build/cover/edit/block-controls.js.map +1 -1
- package/build/cover/edit/cover-placeholder.js +1 -2
- package/build/cover/edit/cover-placeholder.js.map +1 -1
- package/build/cover/edit/index.js +22 -22
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/save.js +13 -13
- package/build/cover/save.js.map +1 -1
- package/build/details/index.js +1 -0
- package/build/details/index.js.map +1 -1
- package/build/file/edit.js +1 -1
- package/build/file/edit.js.map +1 -1
- package/build/gallery/edit.js +1 -1
- package/build/gallery/edit.js.map +1 -1
- package/build/image/edit.js +1 -1
- package/build/image/edit.js.map +1 -1
- package/build/image/image.js +144 -78
- package/build/image/image.js.map +1 -1
- package/build/image/index.js +1 -1
- package/build/latest-posts/edit.js +0 -1
- package/build/latest-posts/edit.js.map +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/navigation/edit/index.js +2 -23
- package/build/navigation/edit/index.js.map +1 -1
- package/build/paragraph/edit.js +1 -1
- package/build/paragraph/edit.js.map +1 -1
- package/build/post-content/index.js +13 -0
- package/build/post-content/index.js.map +1 -1
- package/build/post-template/edit.js +11 -0
- package/build/post-template/edit.js.map +1 -1
- package/build/post-template/index.js +1 -1
- package/build/query/edit/inspector-controls/index.js +2 -2
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/pattern-selection-modal.js +0 -3
- package/build/query/edit/pattern-selection-modal.js.map +1 -1
- package/build/query/edit/query-content.js +10 -12
- package/build/query/edit/query-content.js.map +1 -1
- package/build/query/index.js +1 -1
- package/build/query/utils.js +32 -1
- package/build/query/utils.js.map +1 -1
- package/build/template-part/edit/index.js +1 -4
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/selection-modal.js +0 -3
- package/build/template-part/edit/selection-modal.js.map +1 -1
- package/build/video/edit.js +1 -1
- package/build/video/edit.js.map +1 -1
- package/build/video/tracks-editor.js +0 -2
- package/build/video/tracks-editor.js.map +1 -1
- package/build-module/button/index.js +1 -1
- package/build-module/button/index.js.map +1 -1
- package/build-module/cover/deprecated.js +140 -4
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit/block-controls.js +1 -1
- package/build-module/cover/edit/block-controls.js.map +1 -1
- package/build-module/cover/edit/cover-placeholder.js +1 -2
- package/build-module/cover/edit/cover-placeholder.js.map +1 -1
- package/build-module/cover/edit/index.js +22 -22
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/save.js +13 -13
- package/build-module/cover/save.js.map +1 -1
- package/build-module/details/index.js +1 -0
- package/build-module/details/index.js.map +1 -1
- package/build-module/file/edit.js +1 -1
- package/build-module/file/edit.js.map +1 -1
- package/build-module/gallery/edit.js +1 -1
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/image/edit.js +1 -1
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/image.js +149 -83
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/index.js +1 -1
- package/build-module/latest-posts/edit.js +0 -1
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/navigation/edit/index.js +2 -23
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/paragraph/edit.js +1 -1
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/post-content/index.js +13 -0
- package/build-module/post-content/index.js.map +1 -1
- package/build-module/post-template/edit.js +11 -0
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-template/index.js +1 -1
- package/build-module/query/edit/inspector-controls/index.js +2 -2
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/pattern-selection-modal.js +0 -3
- package/build-module/query/edit/pattern-selection-modal.js.map +1 -1
- package/build-module/query/edit/query-content.js +10 -12
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query/index.js +1 -1
- package/build-module/query/utils.js +29 -0
- package/build-module/query/utils.js.map +1 -1
- package/build-module/template-part/edit/index.js +1 -4
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/selection-modal.js +0 -3
- package/build-module/template-part/edit/selection-modal.js.map +1 -1
- package/build-module/video/edit.js +1 -1
- package/build-module/video/edit.js.map +1 -1
- package/build-module/video/tracks-editor.js +0 -2
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-style/cover/editor-rtl.css +3 -5
- package/build-style/cover/editor.css +3 -5
- package/build-style/cover/style-rtl.css +19 -15
- package/build-style/cover/style.css +19 -15
- package/build-style/editor-rtl.css +7 -22
- package/build-style/editor.css +7 -22
- package/build-style/group/editor-rtl.css +0 -10
- package/build-style/group/editor.css +0 -10
- package/build-style/image/editor-rtl.css +4 -0
- package/build-style/image/editor.css +4 -0
- package/build-style/image/style-rtl.css +0 -2
- package/build-style/image/style.css +0 -2
- package/build-style/latest-posts/editor-rtl.css +0 -7
- package/build-style/latest-posts/editor.css +0 -7
- package/build-style/media-text/style-rtl.css +1 -1
- package/build-style/media-text/style.css +1 -1
- package/build-style/style-rtl.css +20 -18
- package/build-style/style.css +20 -18
- package/build-types/lock-unlock.d.ts +2 -0
- package/build-types/lock-unlock.d.ts.map +1 -0
- package/package.json +8 -8
- package/src/button/index.js +1 -1
- package/src/comments/block.json +3 -9
- package/src/cover/deprecated.js +182 -4
- package/src/cover/edit/block-controls.js +1 -1
- package/src/cover/edit/cover-placeholder.js +0 -3
- package/src/cover/edit/index.js +41 -26
- package/src/cover/editor.scss +4 -5
- package/src/cover/save.js +27 -20
- package/src/cover/style.scss +40 -16
- package/src/cover/test/__snapshots__/edit.native.js.snap +9 -9
- package/src/cover/test/__snapshots__/transforms.native.js.snap +4 -4
- package/src/cover/test/edit.native.js +4 -4
- package/src/cover/test/transforms.native.js +4 -4
- package/src/details/block.json +1 -0
- package/src/file/edit.js +1 -1
- package/src/gallery/edit.js +1 -1
- package/src/group/editor.scss +0 -12
- package/src/image/block.json +1 -1
- package/src/image/edit.js +1 -1
- package/src/image/editor.scss +4 -0
- package/src/image/image.js +200 -109
- package/src/image/style.scss +0 -1
- package/src/image/test/__snapshots__/transforms.native.js.snap +1 -1
- package/src/latest-posts/edit.js +0 -1
- package/src/latest-posts/editor.scss +0 -11
- package/src/media-text/style.scss +1 -1
- package/src/media-text/test/__snapshots__/transforms.native.js.snap +2 -2
- package/src/navigation/edit/index.js +3 -30
- package/src/navigation/index.php +1 -1
- package/src/paragraph/edit.js +1 -1
- package/src/post-content/block.json +14 -1
- package/src/post-template/block.json +2 -1
- package/src/post-template/edit.js +19 -0
- package/src/query/block.json +1 -1
- package/src/query/edit/inspector-controls/index.js +2 -2
- package/src/query/edit/pattern-selection-modal.js +0 -3
- package/src/query/edit/query-content.js +9 -17
- package/src/query/test/utils.js +59 -1
- package/src/query/utils.js +29 -0
- package/src/search/index.php +2 -2
- package/src/template-part/edit/index.js +1 -4
- package/src/template-part/edit/selection-modal.js +0 -3
- package/src/video/edit.js +1 -1
- package/src/video/test/__snapshots__/transforms.native.js.snap +1 -1
- package/src/video/tracks-editor.js +0 -2
- package/tsconfig.tsbuildinfo +1 -1
- /package/src/{lock-unlock.js → lock-unlock.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","button","icon","initBlock","deprecated","edit","metadata","$schema","apiVersion","name","title","category","parent","description","keywords","textdomain","attributes","tagName","type","textAlign","url","source","selector","attribute","role","text","linkTarget","rel","placeholder","backgroundColor","textColor","gradient","width","supports","anchor","splitting","align","alignWide","color","__experimentalSkipSerialization","gradients","__experimentalDefaultControls","background","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","__experimentalWritingMode","reusable","shadow","spacing","padding","__experimentalBorder","radius","style","__experimentalSelector","interactivity","clientNavigation","styles","label","isDefault","editorStyle","save","settings","example","className","merge","a","init"],"sources":["@wordpress/block-library/src/button/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { button as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tclassName: 'is-style-fill',\n\t\t\ttext: __( 'Call to
|
|
1
|
+
{"version":3,"names":["__","button","icon","initBlock","deprecated","edit","metadata","$schema","apiVersion","name","title","category","parent","description","keywords","textdomain","attributes","tagName","type","textAlign","url","source","selector","attribute","role","text","linkTarget","rel","placeholder","backgroundColor","textColor","gradient","width","supports","anchor","splitting","align","alignWide","color","__experimentalSkipSerialization","gradients","__experimentalDefaultControls","background","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","__experimentalWritingMode","reusable","shadow","spacing","padding","__experimentalBorder","radius","style","__experimentalSelector","interactivity","clientNavigation","styles","label","isDefault","editorStyle","save","settings","example","className","merge","a","init"],"sources":["@wordpress/block-library/src/button/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { button as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tclassName: 'is-style-fill',\n\t\t\ttext: __( 'Call to action' ),\n\t\t},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GAAG+C,CAAC;IACJ/C,IAAI,EAAE,CAAE+C,CAAC,CAAC/C,IAAI,IAAI,EAAE,IAAKA;EAC1B,CAAC;AACF,CAAC;AAED,OAAO,MAAMgD,IAAI,GAAGA,CAAA,KAAMtE,SAAS,CAAE;EAAEM,IAAI;EAAEH,QAAQ;EAAE8D;AAAS,CAAE,CAAC","ignoreList":[]}
|
|
@@ -145,7 +145,7 @@ const v8ToV11BlockAttributes = {
|
|
|
145
145
|
enum: ['all', 'insert', false]
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
|
-
const
|
|
148
|
+
const v12toV13BlockAttributes = {
|
|
149
149
|
...v8ToV11BlockAttributes,
|
|
150
150
|
useFeaturedImage: {
|
|
151
151
|
type: 'boolean',
|
|
@@ -156,6 +156,19 @@ const v12BlockAttributes = {
|
|
|
156
156
|
default: 'div'
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
|
+
const v14BlockAttributes = {
|
|
160
|
+
...v12toV13BlockAttributes,
|
|
161
|
+
isUserOverlayColor: {
|
|
162
|
+
type: 'boolean'
|
|
163
|
+
},
|
|
164
|
+
sizeSlug: {
|
|
165
|
+
type: 'string'
|
|
166
|
+
},
|
|
167
|
+
alt: {
|
|
168
|
+
type: 'string',
|
|
169
|
+
default: ''
|
|
170
|
+
}
|
|
171
|
+
};
|
|
159
172
|
const v7toV11BlockSupports = {
|
|
160
173
|
anchor: true,
|
|
161
174
|
align: true,
|
|
@@ -220,10 +233,133 @@ const v12BlockSupports = {
|
|
|
220
233
|
allowJustification: false
|
|
221
234
|
}
|
|
222
235
|
};
|
|
236
|
+
const v14BlockSupports = {
|
|
237
|
+
...v12BlockSupports,
|
|
238
|
+
shadow: true,
|
|
239
|
+
dimensions: {
|
|
240
|
+
aspectRatio: true
|
|
241
|
+
},
|
|
242
|
+
interactivity: {
|
|
243
|
+
clientNavigation: true
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
// Deprecation for blocks that have z-index.
|
|
248
|
+
const v14 = {
|
|
249
|
+
attributes: v14BlockAttributes,
|
|
250
|
+
supports: v14BlockSupports,
|
|
251
|
+
save({
|
|
252
|
+
attributes
|
|
253
|
+
}) {
|
|
254
|
+
const {
|
|
255
|
+
backgroundType,
|
|
256
|
+
gradient,
|
|
257
|
+
contentPosition,
|
|
258
|
+
customGradient,
|
|
259
|
+
customOverlayColor,
|
|
260
|
+
dimRatio,
|
|
261
|
+
focalPoint,
|
|
262
|
+
useFeaturedImage,
|
|
263
|
+
hasParallax,
|
|
264
|
+
isDark,
|
|
265
|
+
isRepeated,
|
|
266
|
+
overlayColor,
|
|
267
|
+
url,
|
|
268
|
+
alt,
|
|
269
|
+
id,
|
|
270
|
+
minHeight: minHeightProp,
|
|
271
|
+
minHeightUnit,
|
|
272
|
+
tagName: Tag,
|
|
273
|
+
sizeSlug
|
|
274
|
+
} = attributes;
|
|
275
|
+
const overlayColorClass = getColorClassName('background-color', overlayColor);
|
|
276
|
+
const gradientClass = __experimentalGetGradientClass(gradient);
|
|
277
|
+
const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
|
|
278
|
+
const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
|
|
279
|
+
const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
|
|
280
|
+
const isImgElement = !(hasParallax || isRepeated);
|
|
281
|
+
const style = {
|
|
282
|
+
minHeight: minHeight || undefined
|
|
283
|
+
};
|
|
284
|
+
const bgStyle = {
|
|
285
|
+
backgroundColor: !overlayColorClass ? customOverlayColor : undefined,
|
|
286
|
+
background: customGradient ? customGradient : undefined
|
|
287
|
+
};
|
|
288
|
+
const objectPosition =
|
|
289
|
+
// prettier-ignore
|
|
290
|
+
focalPoint && isImgElement ? mediaPosition(focalPoint) : undefined;
|
|
291
|
+
const backgroundImage = url ? `url(${url})` : undefined;
|
|
292
|
+
const backgroundPosition = mediaPosition(focalPoint);
|
|
293
|
+
const classes = clsx({
|
|
294
|
+
'is-light': !isDark,
|
|
295
|
+
'has-parallax': hasParallax,
|
|
296
|
+
'is-repeated': isRepeated,
|
|
297
|
+
'has-custom-content-position': !isContentPositionCenter(contentPosition)
|
|
298
|
+
}, getPositionClassName(contentPosition));
|
|
299
|
+
const imgClasses = clsx('wp-block-cover__image-background', id ? `wp-image-${id}` : null, {
|
|
300
|
+
[`size-${sizeSlug}`]: sizeSlug,
|
|
301
|
+
'has-parallax': hasParallax,
|
|
302
|
+
'is-repeated': isRepeated
|
|
303
|
+
});
|
|
304
|
+
const gradientValue = gradient || customGradient;
|
|
305
|
+
return /*#__PURE__*/_jsxs(Tag, {
|
|
306
|
+
...useBlockProps.save({
|
|
307
|
+
className: classes,
|
|
308
|
+
style
|
|
309
|
+
}),
|
|
310
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
311
|
+
"aria-hidden": "true",
|
|
312
|
+
className: clsx('wp-block-cover__background', overlayColorClass, dimRatioToClass(dimRatio), {
|
|
313
|
+
'has-background-dim': dimRatio !== undefined,
|
|
314
|
+
// For backwards compatibility. Former versions of the Cover Block applied
|
|
315
|
+
// `.wp-block-cover__gradient-background` in the presence of
|
|
316
|
+
// media, a gradient and a dim.
|
|
317
|
+
'wp-block-cover__gradient-background': url && gradientValue && dimRatio !== 0,
|
|
318
|
+
'has-background-gradient': gradientValue,
|
|
319
|
+
[gradientClass]: gradientClass
|
|
320
|
+
}),
|
|
321
|
+
style: bgStyle
|
|
322
|
+
}), !useFeaturedImage && isImageBackground && url && (isImgElement ? /*#__PURE__*/_jsx("img", {
|
|
323
|
+
className: imgClasses,
|
|
324
|
+
alt: alt,
|
|
325
|
+
src: url,
|
|
326
|
+
style: {
|
|
327
|
+
objectPosition
|
|
328
|
+
},
|
|
329
|
+
"data-object-fit": "cover",
|
|
330
|
+
"data-object-position": objectPosition
|
|
331
|
+
}) : /*#__PURE__*/_jsx("div", {
|
|
332
|
+
role: alt ? 'img' : undefined,
|
|
333
|
+
"aria-label": alt ? alt : undefined,
|
|
334
|
+
className: imgClasses,
|
|
335
|
+
style: {
|
|
336
|
+
backgroundPosition,
|
|
337
|
+
backgroundImage
|
|
338
|
+
}
|
|
339
|
+
})), isVideoBackground && url && /*#__PURE__*/_jsx("video", {
|
|
340
|
+
className: clsx('wp-block-cover__video-background', 'intrinsic-ignore'),
|
|
341
|
+
autoPlay: true,
|
|
342
|
+
muted: true,
|
|
343
|
+
loop: true,
|
|
344
|
+
playsInline: true,
|
|
345
|
+
src: url,
|
|
346
|
+
style: {
|
|
347
|
+
objectPosition
|
|
348
|
+
},
|
|
349
|
+
"data-object-fit": "cover",
|
|
350
|
+
"data-object-position": objectPosition
|
|
351
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
352
|
+
...useInnerBlocksProps.save({
|
|
353
|
+
className: 'wp-block-cover__inner-container'
|
|
354
|
+
})
|
|
355
|
+
})]
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
};
|
|
223
359
|
|
|
224
360
|
// Deprecation for blocks that does not have the aria-label when the image background is fixed or repeated.
|
|
225
361
|
const v13 = {
|
|
226
|
-
attributes:
|
|
362
|
+
attributes: v12toV13BlockAttributes,
|
|
227
363
|
supports: v12BlockSupports,
|
|
228
364
|
save({
|
|
229
365
|
attributes
|
|
@@ -333,7 +469,7 @@ const v13 = {
|
|
|
333
469
|
|
|
334
470
|
// Deprecation for blocks to prevent auto overlay color from overriding previously set values.
|
|
335
471
|
const v12 = {
|
|
336
|
-
attributes:
|
|
472
|
+
attributes: v12toV13BlockAttributes,
|
|
337
473
|
supports: v12BlockSupports,
|
|
338
474
|
isEligible(attributes) {
|
|
339
475
|
return (attributes.customOverlayColor !== undefined || attributes.overlayColor !== undefined) && attributes.isUserOverlayColor === undefined;
|
|
@@ -1422,5 +1558,5 @@ const v1 = {
|
|
|
1422
1558
|
})]];
|
|
1423
1559
|
}
|
|
1424
1560
|
};
|
|
1425
|
-
export default [v13, v12, v11, v10, v9, v8, v7, v6, v5, v4, v3, v2, v1];
|
|
1561
|
+
export default [v14, v13, v12, v11, v10, v9, v8, v7, v6, v5, v4, v3, v2, v1];
|
|
1426
1562
|
//# sourceMappingURL=deprecated.js.map
|