@wordpress/block-library 9.10.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 +4 -0
- package/README.md +10 -5
- package/build/archives/index.js +6 -0
- package/build/archives/index.js.map +1 -1
- package/build/avatar/hooks.js +2 -3
- package/build/avatar/hooks.js.map +1 -1
- package/build/button/get-updated-link-attributes.js +1 -1
- package/build/button/get-updated-link-attributes.js.map +1 -1
- package/build/button/index.js +1 -1
- package/build/button/index.js.map +1 -1
- package/build/comments/index.js +12 -0
- package/build/comments/index.js.map +1 -1
- package/build/cover/constants.js +8 -0
- package/build/cover/constants.js.map +1 -0
- 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 +42 -21
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +40 -2
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/cover/index.js +3 -0
- package/build/cover/index.js.map +1 -1
- package/build/cover/save.js +16 -14
- 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 +2 -3
- package/build/file/edit.js.map +1 -1
- package/build/gallery/constants.js +2 -1
- package/build/gallery/constants.js.map +1 -1
- package/build/gallery/edit.js +12 -3
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/utils.js +26 -5
- package/build/gallery/utils.js.map +1 -1
- package/build/html/edit.js +5 -1
- package/build/html/edit.js.map +1 -1
- package/build/html/preview.js +2 -2
- package/build/html/preview.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 +3 -9
- package/build/latest-posts/edit.js.map +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/navigation/edit/menu-inspector-controls.js +1 -1
- package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
- package/build/navigation/edit/navigation-menu-selector.js +2 -2
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/paragraph/edit.js +2 -2
- 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-featured-image/edit.js +1 -1
- package/build/post-featured-image/edit.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/post-time-to-read/edit.js +2 -2
- package/build/post-time-to-read/edit.js.map +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/inspector-controls/order-control.js +2 -2
- package/build/query/edit/inspector-controls/order-control.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/query-title/edit.js +1 -1
- package/build/query-title/edit.js.map +1 -1
- package/build/search/edit.js +19 -14
- package/build/search/edit.js.map +1 -1
- package/build/separator/transforms.js +12 -0
- package/build/separator/transforms.js.map +1 -1
- package/build/social-links/edit.js +0 -1
- package/build/social-links/edit.js.map +1 -1
- package/build/spacer/index.js +2 -0
- package/build/spacer/index.js.map +1 -1
- package/build/spacer/transforms.js +27 -0
- package/build/spacer/transforms.js.map +1 -0
- package/build/table/edit.js +0 -1
- package/build/table/edit.js.map +1 -1
- package/build/table-of-contents/edit.js +2 -7
- package/build/table-of-contents/edit.js.map +1 -1
- package/build/template-part/edit/index.js +2 -5
- 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 +1 -3
- package/build/video/tracks-editor.js.map +1 -1
- package/build-module/archives/index.js +6 -0
- package/build-module/archives/index.js.map +1 -1
- package/build-module/avatar/hooks.js +2 -3
- package/build-module/avatar/hooks.js.map +1 -1
- package/build-module/button/get-updated-link-attributes.js +1 -1
- package/build-module/button/get-updated-link-attributes.js.map +1 -1
- package/build-module/button/index.js +1 -1
- package/build-module/button/index.js.map +1 -1
- package/build-module/comments/index.js +12 -0
- package/build-module/comments/index.js.map +1 -1
- package/build-module/cover/constants.js +2 -0
- package/build-module/cover/constants.js.map +1 -0
- 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 +42 -21
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +41 -3
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/cover/index.js +3 -0
- package/build-module/cover/index.js.map +1 -1
- package/build-module/cover/save.js +16 -14
- 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 +2 -3
- package/build-module/file/edit.js.map +1 -1
- package/build-module/gallery/constants.js +1 -0
- package/build-module/gallery/constants.js.map +1 -1
- package/build-module/gallery/edit.js +15 -6
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/utils.js +27 -6
- package/build-module/gallery/utils.js.map +1 -1
- package/build-module/html/edit.js +6 -2
- package/build-module/html/edit.js.map +1 -1
- package/build-module/html/preview.js +2 -2
- package/build-module/html/preview.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 +3 -9
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/navigation/edit/menu-inspector-controls.js +1 -3
- package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +2 -2
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/paragraph/edit.js +2 -2
- 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-featured-image/edit.js +1 -1
- package/build-module/post-featured-image/edit.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/post-time-to-read/edit.js +2 -2
- package/build-module/post-time-to-read/edit.js.map +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/inspector-controls/order-control.js +2 -2
- package/build-module/query/edit/inspector-controls/order-control.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/query-title/edit.js +2 -2
- package/build-module/query-title/edit.js.map +1 -1
- package/build-module/search/edit.js +20 -15
- package/build-module/search/edit.js.map +1 -1
- package/build-module/separator/transforms.js +12 -0
- package/build-module/separator/transforms.js.map +1 -1
- package/build-module/social-links/edit.js +0 -1
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/spacer/index.js +2 -0
- package/build-module/spacer/index.js.map +1 -1
- package/build-module/spacer/transforms.js +20 -0
- package/build-module/spacer/transforms.js.map +1 -0
- package/build-module/table/edit.js +0 -1
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table-of-contents/edit.js +2 -7
- package/build-module/table-of-contents/edit.js.map +1 -1
- package/build-module/template-part/edit/index.js +2 -5
- 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 +2 -4
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-style/archives/editor-rtl.css +5 -0
- package/build-style/archives/editor.css +5 -0
- package/build-style/button/style-rtl.css +3 -0
- package/build-style/button/style.css +3 -0
- package/build-style/comments/editor-rtl.css +4 -0
- package/build-style/comments/editor.css +4 -0
- package/build-style/comments/style-rtl.css +4 -0
- package/build-style/comments/style.css +4 -0
- 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 -10
- package/build-style/cover/style.css +19 -10
- package/build-style/editor-rtl.css +17 -12
- package/build-style/editor.css +17 -12
- package/build-style/image/editor-rtl.css +4 -0
- package/build-style/image/editor.css +4 -0
- 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/navigation/editor-rtl.css +1 -0
- package/build-style/navigation/editor.css +1 -0
- package/build-style/style-rtl.css +27 -11
- package/build-style/style.css +27 -11
- package/build-types/lock-unlock.d.ts +2 -0
- package/build-types/lock-unlock.d.ts.map +1 -0
- package/package.json +41 -40
- package/src/archives/block.json +6 -0
- package/src/archives/editor.scss +8 -0
- package/src/avatar/hooks.js +2 -3
- package/src/avatar/index.php +4 -5
- package/src/button/get-updated-link-attributes.js +1 -1
- package/src/button/index.js +1 -1
- package/src/button/style.scss +3 -0
- package/src/button/test/get-updated-link-attributes.js +15 -0
- package/src/comment-author-avatar/index.php +1 -1
- package/src/comments/block.json +12 -0
- package/src/comments/style.scss +4 -1
- package/src/cover/block.json +3 -0
- package/src/cover/constants.js +1 -0
- 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 +57 -24
- package/src/cover/edit/inspector-controls.js +46 -1
- package/src/cover/editor.scss +4 -5
- package/src/cover/save.js +29 -20
- package/src/cover/style.scss +40 -10
- 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.js +1 -3
- 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 +2 -3
- package/src/gallery/constants.js +1 -0
- package/src/gallery/edit.js +26 -3
- package/src/gallery/utils.js +23 -2
- package/src/html/edit.js +7 -1
- package/src/html/preview.js +3 -2
- 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/test/__snapshots__/transforms.native.js.snap +1 -1
- package/src/latest-posts/edit.js +3 -8
- package/src/latest-posts/editor.scss +0 -11
- package/src/latest-posts/index.php +1 -1
- package/src/media-text/style.scss +1 -1
- package/src/media-text/test/__snapshots__/transforms.native.js.snap +2 -2
- package/src/navigation/edit/menu-inspector-controls.js +2 -2
- package/src/navigation/edit/navigation-menu-selector.js +2 -2
- package/src/navigation/editor.scss +1 -0
- package/src/navigation/index.php +1 -1
- package/src/paragraph/edit.js +2 -2
- package/src/post-content/block.json +14 -1
- package/src/post-featured-image/edit.js +1 -1
- package/src/post-template/block.json +2 -1
- package/src/post-template/edit.js +19 -0
- package/src/post-time-to-read/edit.js +2 -2
- package/src/post-time-to-read/index.php +1 -1
- package/src/query/block.json +1 -1
- package/src/query/edit/inspector-controls/index.js +2 -2
- package/src/query/edit/inspector-controls/order-control.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/query-title/edit.js +2 -2
- package/src/rss/index.php +1 -1
- package/src/search/edit.js +28 -25
- package/src/search/index.php +2 -2
- package/src/separator/test/__snapshots__/transforms.native.js.snap +6 -0
- package/src/separator/test/transforms.native.js +1 -1
- package/src/separator/transforms.js +11 -0
- package/src/social-links/edit.js +0 -1
- package/src/spacer/index.js +2 -0
- package/src/spacer/test/__snapshots__/transforms.native.js.snap +6 -0
- package/src/spacer/test/transforms.native.js +1 -1
- package/src/spacer/transforms.js +20 -0
- package/src/table/edit.js +0 -1
- package/src/table-of-contents/edit.js +2 -6
- package/src/template-part/edit/index.js +2 -5
- 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 +2 -4
- package/tsconfig.tsbuildinfo +1 -1
- /package/src/{lock-unlock.js → lock-unlock.ts} +0 -0
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -98,21 +98,26 @@ To find out more about contributing to this package or Gutenberg as a whole, ple
|
|
|
98
98
|
|
|
99
99
|
This file is used when using the option to register individual block from the `@wordpress/block-library` package.
|
|
100
100
|
|
|
101
|
-
4. If
|
|
101
|
+
4. If the block exposes a script module on the front end, it must be included in the package's `package.json` file in the `wpScriptModules` object. This will include the script module when it's bundled for use in WordPress. See [the packages README for more details.](../README.md):
|
|
102
102
|
|
|
103
103
|
```json
|
|
104
104
|
{
|
|
105
|
-
"
|
|
105
|
+
"name": "@wordpress/block-library",
|
|
106
|
+
"wpScriptModuleExports": {
|
|
107
|
+
"./blinking-paragraph/view": "./build-module/blinking-paragraph/view.js",
|
|
108
|
+
"./image/view": "./build-module/image/view.js"
|
|
109
|
+
// Add any new script modules here.
|
|
110
|
+
}
|
|
106
111
|
}
|
|
107
112
|
```
|
|
108
113
|
|
|
109
|
-
|
|
114
|
+
For every dynamic block, you need to manually enqueue the view script module in `render_callback` of the block, example:
|
|
110
115
|
|
|
111
116
|
```php
|
|
112
117
|
function render_block_core_blinking_paragraph( $attributes, $content ) {
|
|
113
|
-
$should_load_view_script = ! empty( $attributes['isInteractive'] )
|
|
118
|
+
$should_load_view_script = ! empty( $attributes['isInteractive'] );
|
|
114
119
|
if ( $should_load_view_script ) {
|
|
115
|
-
|
|
120
|
+
wp_enqueue_script_module( '@wordpress/block-library/blinking-paragraph' );
|
|
116
121
|
}
|
|
117
122
|
|
|
118
123
|
return $content;
|
package/build/archives/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","metadata","exports","$schema","apiVersion","name","title","category","description","textdomain","attributes","displayAsDropdown","type","showLabel","showPostCounts","supports","align","html","spacing","margin","padding","__experimentalDefaultControls","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","editorStyle","settings","icon","example","edit","init","initBlock"],"sources":["@wordpress/block-library/src/archives/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { archive as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {},\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AAVA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAI,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,iBAAA;MAAAC,IAAA;MAAA;IAAA;IAAAC,SAAA;MAAAD,IAAA;MAAA;IAAA;IAAAE,cAAA;MAAAF,IAAA;MAAA;IAAA;IAAAA,IAAA;MAAAA,IAAA;MAAA;IAAA;EAAA;EAAAG,QAAA;IAAAC,KAAA;IAAAC,IAAA;IAAAC,OAAA;MAAAC,MAAA;MAAAC,OAAA;MAAAC,6BAAA;QAAAF,MAAA;QAAAC,OAAA;MAAA;IAAA;IAAAE,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAT,6BAAA;QAAAE,QAAA;MAAA;IAAA;IAAAQ,aAAA;MAAAC,gBAAA;IAAA;EAAA;EAAAC,WAAA;AAAA;AAOA,MAAM;
|
|
1
|
+
{"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","metadata","exports","$schema","apiVersion","name","title","category","description","textdomain","attributes","displayAsDropdown","type","showLabel","showPostCounts","supports","align","__experimentalBorder","radius","color","width","style","html","spacing","margin","padding","__experimentalDefaultControls","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","editorStyle","settings","icon","example","edit","init","initBlock"],"sources":["@wordpress/block-library/src/archives/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { archive as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\n\nexport {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;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAEvC,IAAI;EAAEJ,QAAQ;EAAEsC;AAAS,CAAE,CAAC;AAACrC,OAAA,CAAAyC,IAAA,GAAAA,IAAA","ignoreList":[]}
|
package/build/avatar/hooks.js
CHANGED
|
@@ -52,9 +52,8 @@ function useCommentAvatar({
|
|
|
52
52
|
src: avatarUrls ? avatarUrls[avatarUrls.length - 1] : defaultAvatar,
|
|
53
53
|
minSize,
|
|
54
54
|
maxSize,
|
|
55
|
-
// translators: %s is the Author name.
|
|
56
55
|
alt: authorName ?
|
|
57
|
-
// translators: %s
|
|
56
|
+
// translators: %s: Author name.
|
|
58
57
|
(0, _i18n.sprintf)((0, _i18n.__)('%s Avatar'), authorName) : (0, _i18n.__)('Default Avatar')
|
|
59
58
|
};
|
|
60
59
|
}
|
|
@@ -92,7 +91,7 @@ function useUserAvatar({
|
|
|
92
91
|
minSize,
|
|
93
92
|
maxSize,
|
|
94
93
|
alt: authorDetails ?
|
|
95
|
-
// translators: %s
|
|
94
|
+
// translators: %s: Author name.
|
|
96
95
|
(0, _i18n.sprintf)((0, _i18n.__)('%s Avatar'), authorDetails?.name) : (0, _i18n.__)('Default Avatar')
|
|
97
96
|
};
|
|
98
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_blockEditor","require","_coreData","_i18n","_data","getAvatarSizes","sizes","minSize","maxSize","length","maxSizeBuffer","Math","floor","useDefaultAvatar","avatarURL","defaultAvatarUrl","useSelect","select","getSettings","blockEditorStore","__experimentalDiscussionSettings","useCommentAvatar","commentId","avatars","useEntityProp","authorName","avatarUrls","Object","values","keys","defaultAvatar","src","alt","sprintf","__","useUserAvatar","userId","postId","postType","authorDetails","getEditedEntityRecord","getUser","coreStore","_authorId","author","avatar_urls","name"],"sources":["@wordpress/block-library/src/avatar/hooks.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore, useEntityProp } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\n\nfunction getAvatarSizes( sizes ) {\n\tconst minSize = sizes ? sizes[ 0 ] : 24;\n\tconst maxSize = sizes ? sizes[ sizes.length - 1 ] : 96;\n\tconst maxSizeBuffer = Math.floor( maxSize * 2.5 );\n\treturn {\n\t\tminSize,\n\t\tmaxSize: maxSizeBuffer,\n\t};\n}\n\nfunction useDefaultAvatar() {\n\tconst { avatarURL: defaultAvatarUrl } = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst { __experimentalDiscussionSettings } = getSettings();\n\t\treturn __experimentalDiscussionSettings;\n\t} );\n\treturn defaultAvatarUrl;\n}\n\nexport function useCommentAvatar( { commentId } ) {\n\tconst [ avatars ] = useEntityProp(\n\t\t'root',\n\t\t'comment',\n\t\t'author_avatar_urls',\n\t\tcommentId\n\t);\n\n\tconst [ authorName ] = useEntityProp(\n\t\t'root',\n\t\t'comment',\n\t\t'author_name',\n\t\tcommentId\n\t);\n\tconst avatarUrls = avatars ? Object.values( avatars ) : null;\n\tconst sizes = avatars ? Object.keys( avatars ) : null;\n\tconst { minSize, maxSize } = getAvatarSizes( sizes );\n\tconst defaultAvatar = useDefaultAvatar();\n\treturn {\n\t\tsrc: avatarUrls ? avatarUrls[ avatarUrls.length - 1 ] : defaultAvatar,\n\t\tminSize,\n\t\tmaxSize,\n\t\
|
|
1
|
+
{"version":3,"names":["_blockEditor","require","_coreData","_i18n","_data","getAvatarSizes","sizes","minSize","maxSize","length","maxSizeBuffer","Math","floor","useDefaultAvatar","avatarURL","defaultAvatarUrl","useSelect","select","getSettings","blockEditorStore","__experimentalDiscussionSettings","useCommentAvatar","commentId","avatars","useEntityProp","authorName","avatarUrls","Object","values","keys","defaultAvatar","src","alt","sprintf","__","useUserAvatar","userId","postId","postType","authorDetails","getEditedEntityRecord","getUser","coreStore","_authorId","author","avatar_urls","name"],"sources":["@wordpress/block-library/src/avatar/hooks.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore, useEntityProp } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\n\nfunction getAvatarSizes( sizes ) {\n\tconst minSize = sizes ? sizes[ 0 ] : 24;\n\tconst maxSize = sizes ? sizes[ sizes.length - 1 ] : 96;\n\tconst maxSizeBuffer = Math.floor( maxSize * 2.5 );\n\treturn {\n\t\tminSize,\n\t\tmaxSize: maxSizeBuffer,\n\t};\n}\n\nfunction useDefaultAvatar() {\n\tconst { avatarURL: defaultAvatarUrl } = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst { __experimentalDiscussionSettings } = getSettings();\n\t\treturn __experimentalDiscussionSettings;\n\t} );\n\treturn defaultAvatarUrl;\n}\n\nexport function useCommentAvatar( { commentId } ) {\n\tconst [ avatars ] = useEntityProp(\n\t\t'root',\n\t\t'comment',\n\t\t'author_avatar_urls',\n\t\tcommentId\n\t);\n\n\tconst [ authorName ] = useEntityProp(\n\t\t'root',\n\t\t'comment',\n\t\t'author_name',\n\t\tcommentId\n\t);\n\tconst avatarUrls = avatars ? Object.values( avatars ) : null;\n\tconst sizes = avatars ? Object.keys( avatars ) : null;\n\tconst { minSize, maxSize } = getAvatarSizes( sizes );\n\tconst defaultAvatar = useDefaultAvatar();\n\treturn {\n\t\tsrc: avatarUrls ? avatarUrls[ avatarUrls.length - 1 ] : defaultAvatar,\n\t\tminSize,\n\t\tmaxSize,\n\t\talt: authorName\n\t\t\t? // translators: %s: Author name.\n\t\t\t sprintf( __( '%s Avatar' ), authorName )\n\t\t\t: __( 'Default Avatar' ),\n\t};\n}\n\nexport function useUserAvatar( { userId, postId, postType } ) {\n\tconst { authorDetails } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord, getUser } = select( coreStore );\n\t\t\tif ( userId ) {\n\t\t\t\treturn {\n\t\t\t\t\tauthorDetails: getUser( userId ),\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst _authorId = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t)?.author;\n\n\t\t\treturn {\n\t\t\t\tauthorDetails: _authorId ? getUser( _authorId ) : null,\n\t\t\t};\n\t\t},\n\t\t[ postType, postId, userId ]\n\t);\n\tconst avatarUrls = authorDetails?.avatar_urls\n\t\t? Object.values( authorDetails.avatar_urls )\n\t\t: null;\n\tconst sizes = authorDetails?.avatar_urls\n\t\t? Object.keys( authorDetails.avatar_urls )\n\t\t: null;\n\tconst { minSize, maxSize } = getAvatarSizes( sizes );\n\tconst defaultAvatar = useDefaultAvatar();\n\treturn {\n\t\tsrc: avatarUrls ? avatarUrls[ avatarUrls.length - 1 ] : defaultAvatar,\n\t\tminSize,\n\t\tmaxSize,\n\t\talt: authorDetails\n\t\t\t? // translators: %s: Author name.\n\t\t\t sprintf( __( '%s Avatar' ), authorDetails?.name )\n\t\t\t: __( 'Default Avatar' ),\n\t};\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AANA;AACA;AACA;;AAMA,SAASI,cAAcA,CAAEC,KAAK,EAAG;EAChC,MAAMC,OAAO,GAAGD,KAAK,GAAGA,KAAK,CAAE,CAAC,CAAE,GAAG,EAAE;EACvC,MAAME,OAAO,GAAGF,KAAK,GAAGA,KAAK,CAAEA,KAAK,CAACG,MAAM,GAAG,CAAC,CAAE,GAAG,EAAE;EACtD,MAAMC,aAAa,GAAGC,IAAI,CAACC,KAAK,CAAEJ,OAAO,GAAG,GAAI,CAAC;EACjD,OAAO;IACND,OAAO;IACPC,OAAO,EAAEE;EACV,CAAC;AACF;AAEA,SAASG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40
40
|
updatedRel = updatedRel?.replace(relRegex, '').trim();
|
|
41
41
|
}
|
|
42
42
|
if (nofollow) {
|
|
43
|
-
updatedRel = updatedRel?.includes(_constants.NOFOLLOW_REL) ? updatedRel : updatedRel + ` ${_constants.NOFOLLOW_REL}
|
|
43
|
+
updatedRel = updatedRel?.includes(_constants.NOFOLLOW_REL) ? updatedRel : (updatedRel + ` ${_constants.NOFOLLOW_REL}`).trim();
|
|
44
44
|
} else {
|
|
45
45
|
const relRegex = new RegExp(`\\b${_constants.NOFOLLOW_REL}\\s*`, 'g');
|
|
46
46
|
updatedRel = updatedRel?.replace(relRegex, '').trim();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_constants","require","_url","getUpdatedLinkAttributes","rel","url","opensInNewTab","nofollow","newLinkTarget","updatedRel","NEW_TAB_TARGET","includes","NEW_TAB_REL","relRegex","RegExp","replace","trim","NOFOLLOW_REL","prependHTTP","linkTarget","undefined"],"sources":["@wordpress/block-library/src/button/get-updated-link-attributes.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { NEW_TAB_REL, NEW_TAB_TARGET, NOFOLLOW_REL } from './constants';\n\n/**\n * WordPress dependencies\n */\nimport { prependHTTP } from '@wordpress/url';\n\n/**\n * Updates the link attributes.\n *\n * @param {Object} attributes The current block attributes.\n * @param {string} attributes.rel The current link rel attribute.\n * @param {string} attributes.url The current link url.\n * @param {boolean} attributes.opensInNewTab Whether the link should open in a new window.\n * @param {boolean} attributes.nofollow Whether the link should be marked as nofollow.\n */\nexport function getUpdatedLinkAttributes( {\n\trel = '',\n\turl = '',\n\topensInNewTab,\n\tnofollow,\n} ) {\n\tlet newLinkTarget;\n\t// Since `rel` is editable attribute, we need to check for existing values and proceed accordingly.\n\tlet updatedRel = rel;\n\n\tif ( opensInNewTab ) {\n\t\tnewLinkTarget = NEW_TAB_TARGET;\n\t\tupdatedRel = updatedRel?.includes( NEW_TAB_REL )\n\t\t\t? updatedRel\n\t\t\t: updatedRel + ` ${ NEW_TAB_REL }`;\n\t} else {\n\t\tconst relRegex = new RegExp( `\\\\b${ NEW_TAB_REL }\\\\s*`, 'g' );\n\t\tupdatedRel = updatedRel?.replace( relRegex, '' ).trim();\n\t}\n\n\tif ( nofollow ) {\n\t\tupdatedRel = updatedRel?.includes( NOFOLLOW_REL )\n\t\t\t? updatedRel\n\t\t\t: updatedRel + ` ${ NOFOLLOW_REL }
|
|
1
|
+
{"version":3,"names":["_constants","require","_url","getUpdatedLinkAttributes","rel","url","opensInNewTab","nofollow","newLinkTarget","updatedRel","NEW_TAB_TARGET","includes","NEW_TAB_REL","relRegex","RegExp","replace","trim","NOFOLLOW_REL","prependHTTP","linkTarget","undefined"],"sources":["@wordpress/block-library/src/button/get-updated-link-attributes.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { NEW_TAB_REL, NEW_TAB_TARGET, NOFOLLOW_REL } from './constants';\n\n/**\n * WordPress dependencies\n */\nimport { prependHTTP } from '@wordpress/url';\n\n/**\n * Updates the link attributes.\n *\n * @param {Object} attributes The current block attributes.\n * @param {string} attributes.rel The current link rel attribute.\n * @param {string} attributes.url The current link url.\n * @param {boolean} attributes.opensInNewTab Whether the link should open in a new window.\n * @param {boolean} attributes.nofollow Whether the link should be marked as nofollow.\n */\nexport function getUpdatedLinkAttributes( {\n\trel = '',\n\turl = '',\n\topensInNewTab,\n\tnofollow,\n} ) {\n\tlet newLinkTarget;\n\t// Since `rel` is editable attribute, we need to check for existing values and proceed accordingly.\n\tlet updatedRel = rel;\n\n\tif ( opensInNewTab ) {\n\t\tnewLinkTarget = NEW_TAB_TARGET;\n\t\tupdatedRel = updatedRel?.includes( NEW_TAB_REL )\n\t\t\t? updatedRel\n\t\t\t: updatedRel + ` ${ NEW_TAB_REL }`;\n\t} else {\n\t\tconst relRegex = new RegExp( `\\\\b${ NEW_TAB_REL }\\\\s*`, 'g' );\n\t\tupdatedRel = updatedRel?.replace( relRegex, '' ).trim();\n\t}\n\n\tif ( nofollow ) {\n\t\tupdatedRel = updatedRel?.includes( NOFOLLOW_REL )\n\t\t\t? updatedRel\n\t\t\t: ( updatedRel + ` ${ NOFOLLOW_REL }` ).trim();\n\t} else {\n\t\tconst relRegex = new RegExp( `\\\\b${ NOFOLLOW_REL }\\\\s*`, 'g' );\n\t\tupdatedRel = updatedRel?.replace( relRegex, '' ).trim();\n\t}\n\n\treturn {\n\t\turl: prependHTTP( url ),\n\t\tlinkTarget: newLinkTarget,\n\t\trel: updatedRel || undefined,\n\t};\n}\n"],"mappings":";;;;;;AAGA,IAAAA,UAAA,GAAAC,OAAA;AAKA,IAAAC,IAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,wBAAwBA,CAAE;EACzCC,GAAG,GAAG,EAAE;EACRC,GAAG,GAAG,EAAE;EACRC,aAAa;EACbC;AACD,CAAC,EAAG;EACH,IAAIC,aAAa;EACjB;EACA,IAAIC,UAAU,GAAGL,GAAG;EAEpB,IAAKE,aAAa,EAAG;IACpBE,aAAa,GAAGE,yBAAc;IAC9BD,UAAU,GAAGA,UAAU,EAAEE,QAAQ,CAAEC,sBAAY,CAAC,GAC7CH,UAAU,GACVA,UAAU,GAAG,IAAKG,sBAAW,EAAG;EACpC,CAAC,MAAM;IACN,MAAMC,QAAQ,GAAG,IAAIC,MAAM,CAAE,MAAOF,sBAAW,MAAO,EAAE,GAAI,CAAC;IAC7DH,UAAU,GAAGA,UAAU,EAAEM,OAAO,CAAEF,QAAQ,EAAE,EAAG,CAAC,CAACG,IAAI,CAAC,CAAC;EACxD;EAEA,IAAKT,QAAQ,EAAG;IACfE,UAAU,GAAGA,UAAU,EAAEE,QAAQ,CAAEM,uBAAa,CAAC,GAC9CR,UAAU,GACV,CAAEA,UAAU,GAAG,IAAKQ,uBAAY,EAAG,EAAGD,IAAI,CAAC,CAAC;EAChD,CAAC,MAAM;IACN,MAAMH,QAAQ,GAAG,IAAIC,MAAM,CAAE,MAAOG,uBAAY,MAAO,EAAE,GAAI,CAAC;IAC9DR,UAAU,GAAGA,UAAU,EAAEM,OAAO,CAAEF,QAAQ,EAAE,EAAG,CAAC,CAACG,IAAI,CAAC,CAAC;EACxD;EAEA,OAAO;IACNX,GAAG,EAAE,IAAAa,gBAAW,EAAEb,GAAI,CAAC;IACvBc,UAAU,EAAEX,aAAa;IACzBJ,GAAG,EAAEK,UAAU,IAAIW;EACpB,CAAC;AACF","ignoreList":[]}
|
package/build/button/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_icons","_initBlock","_interopRequireDefault","_deprecated","_edit","_save","metadata","exports","$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","settings","icon","example","className","__","edit","save","deprecated","merge","a","init","initBlock"],"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":["_i18n","require","_icons","_initBlock","_interopRequireDefault","_deprecated","_edit","_save","metadata","exports","$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","settings","icon","example","className","__","edit","save","deprecated","merge","a","init","initBlock"],"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},\n\t},\n\tedit,\n\tsave,\n\tdeprecated,\n\tmerge: ( a, { text = '' } ) => ( {\n\t\t...a,\n\t\ttext: ( a.text || '' ) + text,\n\t} ),\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,WAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,KAAA,GAAAF,sBAAA,CAAAH,OAAA;AAEA,IAAAM,KAAA,GAAAH,sBAAA,CAAAH,OAAA;AAbA;AACA;AACA;AAIA;AACA;AACA;AAFA,M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 +63,18 @@ const metadata = exports.metadata = {
|
|
|
63
63
|
__experimentalDefaultControls: {
|
|
64
64
|
fontSize: true
|
|
65
65
|
}
|
|
66
|
+
},
|
|
67
|
+
__experimentalBorder: {
|
|
68
|
+
radius: true,
|
|
69
|
+
color: true,
|
|
70
|
+
width: true,
|
|
71
|
+
style: true,
|
|
72
|
+
__experimentalDefaultControls: {
|
|
73
|
+
radius: true,
|
|
74
|
+
color: true,
|
|
75
|
+
width: true,
|
|
76
|
+
style: true
|
|
77
|
+
}
|
|
66
78
|
}
|
|
67
79
|
},
|
|
68
80
|
editorStyle: "wp-block-comments-editor",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_deprecated","_edit","_save","metadata","exports","$schema","apiVersion","name","title","category","description","textdomain","attributes","tagName","type","legacy","supports","align","html","color","gradients","heading","link","__experimentalDefaultControls","background","text","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","editorStyle","usesContext","settings","icon","edit","save","deprecated","init","initBlock"],"sources":["@wordpress/block-library/src/comments/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postComments as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,KAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,KAAA,GAAAH,sBAAA,CAAAF,OAAA;AAZA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAM,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,OAAA;MAAAC,IAAA;MAAA;IAAA;IAAAC,MAAA;MAAAD,IAAA;MAAA;IAAA;EAAA;EAAAE,QAAA;IAAAC,KAAA;IAAAC,IAAA;IAAAC,KAAA;MAAAC,SAAA;MAAAC,OAAA;MAAAC,IAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;QAAAH,IAAA;MAAA;IAAA;IAAAI,OAAA;MAAAC,MAAA;MAAAC,OAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAd,6BAAA;QAAAO,QAAA;MAAA;IAAA;EAAA;
|
|
1
|
+
{"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_deprecated","_edit","_save","metadata","exports","$schema","apiVersion","name","title","category","description","textdomain","attributes","tagName","type","legacy","supports","align","html","color","gradients","heading","link","__experimentalDefaultControls","background","text","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","__experimentalBorder","radius","width","style","editorStyle","usesContext","settings","icon","edit","save","deprecated","init","initBlock"],"sources":["@wordpress/block-library/src/comments/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postComments as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\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AA;AAGnB,MAAMqC,QAAQ,GAAAxC,OAAA,CAAAwC,QAAA,GAAG;EACvBC,IAAI,EAAJA,mBAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,UAAU,EAAVA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAE3C,IAAI;EAAEJ,QAAQ;EAAEyC;AAAS,CAAE,CAAC;AAACxC,OAAA,CAAA6C,IAAA,GAAAA,IAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DEFAULT_MEDIA_SIZE_SLUG","exports"],"sources":["@wordpress/block-library/src/cover/constants.js"],"sourcesContent":["export const DEFAULT_MEDIA_SIZE_SLUG = 'full';\n"],"mappings":";;;;;;AAAO,MAAMA,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,MAAM","ignoreList":[]}
|
|
@@ -153,7 +153,7 @@ const v8ToV11BlockAttributes = {
|
|
|
153
153
|
enum: ['all', 'insert', false]
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
|
-
const
|
|
156
|
+
const v12toV13BlockAttributes = {
|
|
157
157
|
...v8ToV11BlockAttributes,
|
|
158
158
|
useFeaturedImage: {
|
|
159
159
|
type: 'boolean',
|
|
@@ -164,6 +164,19 @@ const v12BlockAttributes = {
|
|
|
164
164
|
default: 'div'
|
|
165
165
|
}
|
|
166
166
|
};
|
|
167
|
+
const v14BlockAttributes = {
|
|
168
|
+
...v12toV13BlockAttributes,
|
|
169
|
+
isUserOverlayColor: {
|
|
170
|
+
type: 'boolean'
|
|
171
|
+
},
|
|
172
|
+
sizeSlug: {
|
|
173
|
+
type: 'string'
|
|
174
|
+
},
|
|
175
|
+
alt: {
|
|
176
|
+
type: 'string',
|
|
177
|
+
default: ''
|
|
178
|
+
}
|
|
179
|
+
};
|
|
167
180
|
const v7toV11BlockSupports = {
|
|
168
181
|
anchor: true,
|
|
169
182
|
align: true,
|
|
@@ -228,10 +241,133 @@ const v12BlockSupports = {
|
|
|
228
241
|
allowJustification: false
|
|
229
242
|
}
|
|
230
243
|
};
|
|
244
|
+
const v14BlockSupports = {
|
|
245
|
+
...v12BlockSupports,
|
|
246
|
+
shadow: true,
|
|
247
|
+
dimensions: {
|
|
248
|
+
aspectRatio: true
|
|
249
|
+
},
|
|
250
|
+
interactivity: {
|
|
251
|
+
clientNavigation: true
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
// Deprecation for blocks that have z-index.
|
|
256
|
+
const v14 = {
|
|
257
|
+
attributes: v14BlockAttributes,
|
|
258
|
+
supports: v14BlockSupports,
|
|
259
|
+
save({
|
|
260
|
+
attributes
|
|
261
|
+
}) {
|
|
262
|
+
const {
|
|
263
|
+
backgroundType,
|
|
264
|
+
gradient,
|
|
265
|
+
contentPosition,
|
|
266
|
+
customGradient,
|
|
267
|
+
customOverlayColor,
|
|
268
|
+
dimRatio,
|
|
269
|
+
focalPoint,
|
|
270
|
+
useFeaturedImage,
|
|
271
|
+
hasParallax,
|
|
272
|
+
isDark,
|
|
273
|
+
isRepeated,
|
|
274
|
+
overlayColor,
|
|
275
|
+
url,
|
|
276
|
+
alt,
|
|
277
|
+
id,
|
|
278
|
+
minHeight: minHeightProp,
|
|
279
|
+
minHeightUnit,
|
|
280
|
+
tagName: Tag,
|
|
281
|
+
sizeSlug
|
|
282
|
+
} = attributes;
|
|
283
|
+
const overlayColorClass = (0, _blockEditor.getColorClassName)('background-color', overlayColor);
|
|
284
|
+
const gradientClass = (0, _blockEditor.__experimentalGetGradientClass)(gradient);
|
|
285
|
+
const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
|
|
286
|
+
const isImageBackground = _shared.IMAGE_BACKGROUND_TYPE === backgroundType;
|
|
287
|
+
const isVideoBackground = _shared.VIDEO_BACKGROUND_TYPE === backgroundType;
|
|
288
|
+
const isImgElement = !(hasParallax || isRepeated);
|
|
289
|
+
const style = {
|
|
290
|
+
minHeight: minHeight || undefined
|
|
291
|
+
};
|
|
292
|
+
const bgStyle = {
|
|
293
|
+
backgroundColor: !overlayColorClass ? customOverlayColor : undefined,
|
|
294
|
+
background: customGradient ? customGradient : undefined
|
|
295
|
+
};
|
|
296
|
+
const objectPosition =
|
|
297
|
+
// prettier-ignore
|
|
298
|
+
focalPoint && isImgElement ? (0, _shared.mediaPosition)(focalPoint) : undefined;
|
|
299
|
+
const backgroundImage = url ? `url(${url})` : undefined;
|
|
300
|
+
const backgroundPosition = (0, _shared.mediaPosition)(focalPoint);
|
|
301
|
+
const classes = (0, _clsx.default)({
|
|
302
|
+
'is-light': !isDark,
|
|
303
|
+
'has-parallax': hasParallax,
|
|
304
|
+
'is-repeated': isRepeated,
|
|
305
|
+
'has-custom-content-position': !(0, _shared.isContentPositionCenter)(contentPosition)
|
|
306
|
+
}, (0, _shared.getPositionClassName)(contentPosition));
|
|
307
|
+
const imgClasses = (0, _clsx.default)('wp-block-cover__image-background', id ? `wp-image-${id}` : null, {
|
|
308
|
+
[`size-${sizeSlug}`]: sizeSlug,
|
|
309
|
+
'has-parallax': hasParallax,
|
|
310
|
+
'is-repeated': isRepeated
|
|
311
|
+
});
|
|
312
|
+
const gradientValue = gradient || customGradient;
|
|
313
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Tag, {
|
|
314
|
+
..._blockEditor.useBlockProps.save({
|
|
315
|
+
className: classes,
|
|
316
|
+
style
|
|
317
|
+
}),
|
|
318
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
319
|
+
"aria-hidden": "true",
|
|
320
|
+
className: (0, _clsx.default)('wp-block-cover__background', overlayColorClass, (0, _shared.dimRatioToClass)(dimRatio), {
|
|
321
|
+
'has-background-dim': dimRatio !== undefined,
|
|
322
|
+
// For backwards compatibility. Former versions of the Cover Block applied
|
|
323
|
+
// `.wp-block-cover__gradient-background` in the presence of
|
|
324
|
+
// media, a gradient and a dim.
|
|
325
|
+
'wp-block-cover__gradient-background': url && gradientValue && dimRatio !== 0,
|
|
326
|
+
'has-background-gradient': gradientValue,
|
|
327
|
+
[gradientClass]: gradientClass
|
|
328
|
+
}),
|
|
329
|
+
style: bgStyle
|
|
330
|
+
}), !useFeaturedImage && isImageBackground && url && (isImgElement ? /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
331
|
+
className: imgClasses,
|
|
332
|
+
alt: alt,
|
|
333
|
+
src: url,
|
|
334
|
+
style: {
|
|
335
|
+
objectPosition
|
|
336
|
+
},
|
|
337
|
+
"data-object-fit": "cover",
|
|
338
|
+
"data-object-position": objectPosition
|
|
339
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
340
|
+
role: alt ? 'img' : undefined,
|
|
341
|
+
"aria-label": alt ? alt : undefined,
|
|
342
|
+
className: imgClasses,
|
|
343
|
+
style: {
|
|
344
|
+
backgroundPosition,
|
|
345
|
+
backgroundImage
|
|
346
|
+
}
|
|
347
|
+
})), isVideoBackground && url && /*#__PURE__*/(0, _jsxRuntime.jsx)("video", {
|
|
348
|
+
className: (0, _clsx.default)('wp-block-cover__video-background', 'intrinsic-ignore'),
|
|
349
|
+
autoPlay: true,
|
|
350
|
+
muted: true,
|
|
351
|
+
loop: true,
|
|
352
|
+
playsInline: true,
|
|
353
|
+
src: url,
|
|
354
|
+
style: {
|
|
355
|
+
objectPosition
|
|
356
|
+
},
|
|
357
|
+
"data-object-fit": "cover",
|
|
358
|
+
"data-object-position": objectPosition
|
|
359
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
360
|
+
..._blockEditor.useInnerBlocksProps.save({
|
|
361
|
+
className: 'wp-block-cover__inner-container'
|
|
362
|
+
})
|
|
363
|
+
})]
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
};
|
|
231
367
|
|
|
232
368
|
// Deprecation for blocks that does not have the aria-label when the image background is fixed or repeated.
|
|
233
369
|
const v13 = {
|
|
234
|
-
attributes:
|
|
370
|
+
attributes: v12toV13BlockAttributes,
|
|
235
371
|
supports: v12BlockSupports,
|
|
236
372
|
save({
|
|
237
373
|
attributes
|
|
@@ -341,7 +477,7 @@ const v13 = {
|
|
|
341
477
|
|
|
342
478
|
// Deprecation for blocks to prevent auto overlay color from overriding previously set values.
|
|
343
479
|
const v12 = {
|
|
344
|
-
attributes:
|
|
480
|
+
attributes: v12toV13BlockAttributes,
|
|
345
481
|
supports: v12BlockSupports,
|
|
346
482
|
isEligible(attributes) {
|
|
347
483
|
return (attributes.customOverlayColor !== undefined || attributes.overlayColor !== undefined) && attributes.isUserOverlayColor === undefined;
|
|
@@ -1430,5 +1566,5 @@ const v1 = {
|
|
|
1430
1566
|
})]];
|
|
1431
1567
|
}
|
|
1432
1568
|
};
|
|
1433
|
-
var _default = exports.default = [v13, v12, v11, v10, v9, v8, v7, v6, v5, v4, v3, v2, v1];
|
|
1569
|
+
var _default = exports.default = [v14, v13, v12, v11, v10, v9, v8, v7, v6, v5, v4, v3, v2, v1];
|
|
1434
1570
|
//# sourceMappingURL=deprecated.js.map
|