@wordpress/block-library 9.21.0 → 9.23.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/build/calendar/index.js +1 -0
- package/build/calendar/index.js.map +1 -1
- package/build/comments/edit/comments-inspector-controls.js +13 -13
- package/build/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build/comments/edit/index.js +4 -2
- package/build/comments/edit/index.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +9 -12
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/cover/index.js +1 -1
- package/build/cover/index.js.map +1 -1
- package/build/details/edit.js +1 -5
- package/build/details/edit.js.map +1 -1
- package/build/details/index.js +1 -1
- package/build/details/index.js.map +1 -1
- package/build/group/edit.js +17 -13
- package/build/group/edit.js.map +1 -1
- package/build/image/edit.js +0 -6
- package/build/image/edit.js.map +1 -1
- package/build/latest-posts/edit.js +100 -54
- package/build/latest-posts/edit.js.map +1 -1
- package/build/navigation/view.js +2 -1
- package/build/navigation/view.js.map +1 -1
- package/build/navigation-link/edit.js +0 -21
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-link/index.js +0 -3
- package/build/navigation-link/index.js.map +1 -1
- package/build/navigation-link/transforms.js +0 -2
- package/build/navigation-link/transforms.js.map +1 -1
- package/build/navigation-link/update-attributes.js +0 -1
- package/build/navigation-link/update-attributes.js.map +1 -1
- package/build/navigation-submenu/edit.js +1 -24
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/navigation-submenu/index.js +0 -3
- package/build/navigation-submenu/index.js.map +1 -1
- package/build/post-comments-count/index.js +0 -1
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-link/index.js +0 -1
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-featured-image/edit.js +15 -5
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +47 -59
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/inspector-controls/parent-control.js +2 -2
- package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build/query/edit/inspector-controls/taxonomy-controls.js +2 -2
- package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build/query/edit/query-content.js +15 -29
- package/build/query/edit/query-content.js.map +1 -1
- package/build/quote/index.js +1 -1
- package/build/quote/index.js.map +1 -1
- package/build/separator/edit.js +13 -12
- package/build/separator/edit.js.map +1 -1
- package/build/social-links/edit.js +29 -31
- package/build/social-links/edit.js.map +1 -1
- package/build/table/index.js +3 -3
- package/build/table/index.js.map +1 -1
- package/build/table/transforms.js +11 -3
- package/build/table/transforms.js.map +1 -1
- package/build/table-of-contents/edit.js +1 -1
- package/build/table-of-contents/edit.js.map +1 -1
- package/build/table-of-contents/hooks.js +6 -3
- package/build/table-of-contents/hooks.js.map +1 -1
- package/build/template-part/edit/advanced-controls.js +14 -12
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/template-part/edit/index.js +2 -1
- package/build/template-part/edit/index.js.map +1 -1
- package/build-module/calendar/index.js +1 -0
- package/build-module/calendar/index.js.map +1 -1
- package/build-module/comments/edit/comments-inspector-controls.js +14 -14
- package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build-module/comments/edit/index.js +4 -2
- package/build-module/comments/edit/index.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +10 -13
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/cover/index.js +1 -1
- package/build-module/cover/index.js.map +1 -1
- package/build-module/details/edit.js +1 -5
- package/build-module/details/edit.js.map +1 -1
- package/build-module/details/index.js +1 -1
- package/build-module/details/index.js.map +1 -1
- package/build-module/group/edit.js +16 -14
- package/build-module/group/edit.js.map +1 -1
- package/build-module/image/edit.js +0 -6
- package/build-module/image/edit.js.map +1 -1
- package/build-module/latest-posts/edit.js +100 -54
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/navigation/view.js +2 -1
- package/build-module/navigation/view.js.map +1 -1
- package/build-module/navigation-link/edit.js +0 -21
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-link/index.js +0 -3
- package/build-module/navigation-link/index.js.map +1 -1
- package/build-module/navigation-link/transforms.js +0 -2
- package/build-module/navigation-link/transforms.js.map +1 -1
- package/build-module/navigation-link/update-attributes.js +0 -1
- package/build-module/navigation-link/update-attributes.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +1 -24
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/navigation-submenu/index.js +0 -3
- package/build-module/navigation-submenu/index.js.map +1 -1
- package/build-module/post-comments-count/index.js +0 -1
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-link/index.js +0 -1
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-featured-image/edit.js +15 -5
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +49 -61
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/parent-control.js +2 -2
- package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js +2 -2
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build-module/query/edit/query-content.js +16 -30
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/quote/index.js +1 -1
- package/build-module/quote/index.js.map +1 -1
- package/build-module/separator/edit.js +15 -14
- package/build-module/separator/edit.js.map +1 -1
- package/build-module/social-links/edit.js +30 -32
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/table/index.js +3 -3
- package/build-module/table/index.js.map +1 -1
- package/build-module/table/transforms.js +11 -3
- package/build-module/table/transforms.js.map +1 -1
- package/build-module/table-of-contents/edit.js +1 -1
- package/build-module/table-of-contents/edit.js.map +1 -1
- package/build-module/table-of-contents/hooks.js +6 -3
- package/build-module/table-of-contents/hooks.js.map +1 -1
- package/build-module/template-part/edit/advanced-controls.js +14 -12
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/template-part/edit/index.js +2 -1
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-style/editor-rtl.css +1 -50
- package/build-style/editor.css +1 -50
- package/build-style/media-text/style-rtl.css +0 -2
- package/build-style/media-text/style.css +0 -2
- package/build-style/search/style-rtl.css +1 -0
- package/build-style/search/style.css +1 -0
- package/build-style/social-links/editor-rtl.css +1 -50
- package/build-style/social-links/editor.css +1 -50
- package/build-style/style-rtl.css +1 -6
- package/build-style/style.css +1 -6
- package/build-style/tag-cloud/style-rtl.css +0 -4
- package/build-style/tag-cloud/style.css +0 -4
- package/package.json +35 -35
- package/src/button/index.php +2 -3
- package/src/calendar/block.json +1 -0
- package/src/comments/edit/comments-inspector-controls.js +14 -12
- package/src/comments/edit/index.js +2 -1
- package/src/cover/edit/inspector-controls.js +9 -12
- package/src/cover/index.js +1 -1
- package/src/details/edit.js +6 -8
- package/src/details/index.js +1 -1
- package/src/file/index.php +2 -3
- package/src/group/edit.js +11 -10
- package/src/image/edit.js +0 -4
- package/src/latest-comments/index.php +1 -1
- package/src/latest-posts/edit.js +113 -81
- package/src/latest-posts/index.php +3 -0
- package/src/loginout/index.php +5 -1
- package/src/media-text/style.scss +0 -2
- package/src/navigation/index.php +1 -2
- package/src/navigation/view.js +2 -1
- package/src/navigation-link/block.json +0 -3
- package/src/navigation-link/edit.js +1 -22
- package/src/navigation-link/index.php +2 -6
- package/src/navigation-link/transforms.js +1 -2
- package/src/navigation-link/update-attributes.js +0 -1
- package/src/navigation-submenu/block.json +0 -3
- package/src/navigation-submenu/edit.js +1 -24
- package/src/navigation-submenu/index.php +1 -5
- package/src/post-author/index.php +1 -1
- package/src/post-author-name/index.php +1 -1
- package/src/post-comments-count/block.json +0 -1
- package/src/post-comments-count/index.php +4 -0
- package/src/post-comments-link/block.json +0 -1
- package/src/post-comments-link/index.php +4 -0
- package/src/post-featured-image/edit.js +94 -77
- package/src/query/edit/inspector-controls/index.js +66 -91
- package/src/query/edit/inspector-controls/parent-control.js +2 -2
- package/src/query/edit/inspector-controls/taxonomy-controls.js +2 -2
- package/src/query/edit/query-content.js +17 -27
- package/src/quote/index.js +1 -1
- package/src/search/index.php +12 -9
- package/src/search/style.scss +1 -0
- package/src/separator/edit.js +16 -12
- package/src/social-links/edit.js +29 -30
- package/src/social-links/editor.scss +1 -59
- package/src/table/index.js +3 -3
- package/src/table/transforms.js +14 -2
- package/src/table-of-contents/edit.js +1 -1
- package/src/table-of-contents/hooks.js +5 -2
- package/src/tag-cloud/style.scss +0 -5
- package/src/template-part/edit/advanced-controls.js +9 -8
- package/src/template-part/edit/index.js +1 -0
- package/build/utils/messages.js +0 -22
- package/build/utils/messages.js.map +0 -1
- package/build-module/utils/messages.js +0 -15
- package/build-module/utils/messages.js.map +0 -1
- package/src/utils/messages.js +0 -31
|
@@ -13,7 +13,8 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
13
13
|
export default function CommentsEdit(props) {
|
|
14
14
|
const {
|
|
15
15
|
attributes,
|
|
16
|
-
setAttributes
|
|
16
|
+
setAttributes,
|
|
17
|
+
clientId
|
|
17
18
|
} = props;
|
|
18
19
|
const {
|
|
19
20
|
tagName: TagName,
|
|
@@ -31,7 +32,8 @@ export default function CommentsEdit(props) {
|
|
|
31
32
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
32
33
|
children: [/*#__PURE__*/_jsx(CommentsInspectorControls, {
|
|
33
34
|
attributes: attributes,
|
|
34
|
-
setAttributes: setAttributes
|
|
35
|
+
setAttributes: setAttributes,
|
|
36
|
+
clientId: clientId
|
|
35
37
|
}), /*#__PURE__*/_jsx(TagName, {
|
|
36
38
|
...innerBlocksProps
|
|
37
39
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useBlockProps","useInnerBlocksProps","CommentsInspectorControls","CommentsLegacy","TEMPLATE","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","CommentsEdit","props","attributes","setAttributes","tagName","TagName","legacy","blockProps","innerBlocksProps","template","children"],"sources":["@wordpress/block-library/src/comments/edit/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport CommentsInspectorControls from './comments-inspector-controls';\nimport CommentsLegacy from './comments-legacy';\nimport TEMPLATE from './template';\n\nexport default function CommentsEdit( props ) {\n\tconst { attributes, setAttributes } = props;\n\tconst { tagName: TagName, legacy } = attributes;\n\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t} );\n\n\tif ( legacy ) {\n\t\treturn <CommentsLegacy { ...props } />;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<CommentsInspectorControls\n\t\t\t\tattributes={ attributes }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t/>\n\t\t\t<TagName { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAa,EAAEC,mBAAmB,QAAQ,yBAAyB;;AAE5E;AACA;AACA;AACA,OAAOC,yBAAyB,MAAM,+BAA+B;AACrE,OAAOC,cAAc,MAAM,mBAAmB;AAC9C,OAAOC,QAAQ,MAAM,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAElC,eAAe,SAASC,YAAYA,CAAEC,KAAK,EAAG;EAC7C,MAAM;IAAEC,UAAU;IAAEC;
|
|
1
|
+
{"version":3,"names":["useBlockProps","useInnerBlocksProps","CommentsInspectorControls","CommentsLegacy","TEMPLATE","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","CommentsEdit","props","attributes","setAttributes","clientId","tagName","TagName","legacy","blockProps","innerBlocksProps","template","children"],"sources":["@wordpress/block-library/src/comments/edit/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport CommentsInspectorControls from './comments-inspector-controls';\nimport CommentsLegacy from './comments-legacy';\nimport TEMPLATE from './template';\n\nexport default function CommentsEdit( props ) {\n\tconst { attributes, setAttributes, clientId } = props;\n\tconst { tagName: TagName, legacy } = attributes;\n\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t} );\n\n\tif ( legacy ) {\n\t\treturn <CommentsLegacy { ...props } />;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<CommentsInspectorControls\n\t\t\t\tattributes={ attributes }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\tclientId={ clientId }\n\t\t\t/>\n\t\t\t<TagName { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAa,EAAEC,mBAAmB,QAAQ,yBAAyB;;AAE5E;AACA;AACA;AACA,OAAOC,yBAAyB,MAAM,+BAA+B;AACrE,OAAOC,cAAc,MAAM,mBAAmB;AAC9C,OAAOC,QAAQ,MAAM,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAElC,eAAe,SAASC,YAAYA,CAAEC,KAAK,EAAG;EAC7C,MAAM;IAAEC,UAAU;IAAEC,aAAa;IAAEC;EAAS,CAAC,GAAGH,KAAK;EACrD,MAAM;IAAEI,OAAO,EAAEC,OAAO;IAAEC;EAAO,CAAC,GAAGL,UAAU;EAE/C,MAAMM,UAAU,GAAGnB,aAAa,CAAC,CAAC;EAClC,MAAMoB,gBAAgB,GAAGnB,mBAAmB,CAAEkB,UAAU,EAAE;IACzDE,QAAQ,EAAEjB;EACX,CAAE,CAAC;EAEH,IAAKc,MAAM,EAAG;IACb,oBAAOZ,IAAA,CAACH,cAAc;MAAA,GAAMS;IAAK,CAAI,CAAC;EACvC;EAEA,oBACCF,KAAA,CAAAF,SAAA;IAAAc,QAAA,gBACChB,IAAA,CAACJ,yBAAyB;MACzBW,UAAU,EAAGA,UAAY;MACzBC,aAAa,EAAGA,aAAe;MAC/BC,QAAQ,EAAGA;IAAU,CACrB,CAAC,eACFT,IAAA,CAACW,OAAO;MAAA,GAAMG;IAAgB,CAAI,CAAC;EAAA,CAClC,CAAC;AAEL","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { useMemo } from '@wordpress/element';
|
|
5
|
-
import { ExternalLink, FocalPointPicker, RangeControl, TextareaControl, ToggleControl,
|
|
5
|
+
import { ExternalLink, FocalPointPicker, RangeControl, TextareaControl, ToggleControl, __experimentalUseCustomUnits as useCustomUnits, __experimentalToolsPanel as ToolsPanel, __experimentalToolsPanelItem as ToolsPanelItem, __experimentalUnitControl as UnitControl, __experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue } from '@wordpress/components';
|
|
6
6
|
import { useInstanceId } from '@wordpress/compose';
|
|
7
7
|
import { InspectorControls, useSettings, store as blockEditorStore, __experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown, __experimentalUseGradient, __experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients, privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
8
8
|
import { __ } from '@wordpress/i18n';
|
|
@@ -16,11 +16,11 @@ import { COVER_MIN_HEIGHT, mediaPosition } from '../shared';
|
|
|
16
16
|
import { unlock } from '../../lock-unlock';
|
|
17
17
|
import { useToolsPanelDropdownMenuProps } from '../../utils/hooks';
|
|
18
18
|
import { DEFAULT_MEDIA_SIZE_SLUG } from '../constants';
|
|
19
|
-
import { htmlElementMessages } from '../../utils/messages';
|
|
20
19
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
20
|
const {
|
|
22
21
|
cleanEmptyObject,
|
|
23
|
-
ResolutionTool
|
|
22
|
+
ResolutionTool,
|
|
23
|
+
HTMLElementControl
|
|
24
24
|
} = unlock(blockEditorPrivateApis);
|
|
25
25
|
function CoverHeightInput({
|
|
26
26
|
onChange,
|
|
@@ -321,10 +321,12 @@ export default function CoverInspectorControls({
|
|
|
321
321
|
})
|
|
322
322
|
}), /*#__PURE__*/_jsx(InspectorControls, {
|
|
323
323
|
group: "advanced",
|
|
324
|
-
children: /*#__PURE__*/_jsx(
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
324
|
+
children: /*#__PURE__*/_jsx(HTMLElementControl, {
|
|
325
|
+
tagName: tagName,
|
|
326
|
+
onChange: value => setAttributes({
|
|
327
|
+
tagName: value
|
|
328
|
+
}),
|
|
329
|
+
clientId: clientId,
|
|
328
330
|
options: [{
|
|
329
331
|
label: __('Default (<div>)'),
|
|
330
332
|
value: 'div'
|
|
@@ -346,12 +348,7 @@ export default function CoverInspectorControls({
|
|
|
346
348
|
}, {
|
|
347
349
|
label: '<footer>',
|
|
348
350
|
value: 'footer'
|
|
349
|
-
}]
|
|
350
|
-
value: tagName,
|
|
351
|
-
onChange: value => setAttributes({
|
|
352
|
-
tagName: value
|
|
353
|
-
}),
|
|
354
|
-
help: htmlElementMessages[tagName]
|
|
351
|
+
}]
|
|
355
352
|
})
|
|
356
353
|
})]
|
|
357
354
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","ExternalLink","FocalPointPicker","RangeControl","TextareaControl","ToggleControl","SelectControl","__experimentalUseCustomUnits","useCustomUnits","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","__experimentalUnitControl","UnitControl","__experimentalParseQuantityAndUnitFromRawValue","parseQuantityAndUnitFromRawValue","useInstanceId","InspectorControls","useSettings","store","blockEditorStore","__experimentalColorGradientSettingsDropdown","ColorGradientSettingsDropdown","__experimentalUseGradient","__experimentalUseMultipleOriginColorsAndGradients","useMultipleOriginColorsAndGradients","privateApis","blockEditorPrivateApis","__","useSelect","coreStore","COVER_MIN_HEIGHT","mediaPosition","unlock","useToolsPanelDropdownMenuProps","DEFAULT_MEDIA_SIZE_SLUG","htmlElementMessages","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","cleanEmptyObject","ResolutionTool","CoverHeightInput","onChange","onUnitChange","unit","value","instanceId","inputId","isPx","availableUnits","units","defaultValues","px","em","rem","vw","vh","handleOnChange","unprocessedValue","inputValue","parseFloat","undefined","isNaN","computedValue","parsedQuantity","join","min","__next40pxDefaultSize","label","id","isResetValueOnUnitChange","CoverInspectorControls","attributes","setAttributes","clientId","setOverlayColor","coverRef","currentSettings","updateDimRatio","featuredImage","useFeaturedImage","dimRatio","focalPoint","hasParallax","isRepeated","minHeight","minHeightUnit","alt","tagName","isVideoBackground","isImageBackground","mediaElement","url","overlayColor","sizeSlug","gradientValue","setGradient","getSettings","imageSizes","image","select","getMedia","context","currentBackgroundImage","updateImage","newSizeSlug","newUrl","media_details","sizes","source_url","imageSizeOptions","filter","slug","map","name","toggleParallax","toggleIsRepeated","showFocalPointPicker","imperativeFocalPointPreview","styleOfRef","property","current","style","colorGradientSettings","dropdownMenuProps","children","resetAll","isShownByDefault","hasValue","onDeselect","__nextHasNoMarginBottom","checked","onDragStart","onDrag","newFocalPoint","newAlt","help","href","length","options","defaultValue","hasColorsOrGradients","group","__experimentalIsRenderedInSidebar","settings","colorValue","color","onColorChange","onGradientChange","resetAllFilter","customOverlayColor","gradient","customGradient","clearable","panelId","newDimRatio","max","step","required","className","dimensions","aspectRatio","newMinHeight","nextUnit"],"sources":["@wordpress/block-library/src/cover/edit/inspector-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport {\n\tExternalLink,\n\tFocalPointPicker,\n\tRangeControl,\n\tTextareaControl,\n\tToggleControl,\n\tSelectControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tInspectorControls,\n\tuseSettings,\n\tstore as blockEditorStore,\n\t__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,\n\t__experimentalUseGradient,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { COVER_MIN_HEIGHT, mediaPosition } from '../shared';\nimport { unlock } from '../../lock-unlock';\nimport { useToolsPanelDropdownMenuProps } from '../../utils/hooks';\nimport { DEFAULT_MEDIA_SIZE_SLUG } from '../constants';\nimport { htmlElementMessages } from '../../utils/messages';\n\nconst { cleanEmptyObject, ResolutionTool } = unlock( blockEditorPrivateApis );\n\nfunction CoverHeightInput( {\n\tonChange,\n\tonUnitChange,\n\tunit = 'px',\n\tvalue = '',\n} ) {\n\tconst instanceId = useInstanceId( UnitControl );\n\tconst inputId = `block-cover-height-input-${ instanceId }`;\n\tconst isPx = unit === 'px';\n\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ 'px', 'em', 'rem', 'vw', 'vh' ],\n\t\tdefaultValues: { px: 430, '%': 20, em: 20, rem: 20, vw: 20, vh: 50 },\n\t} );\n\n\tconst handleOnChange = ( unprocessedValue ) => {\n\t\tconst inputValue =\n\t\t\tunprocessedValue !== ''\n\t\t\t\t? parseFloat( unprocessedValue )\n\t\t\t\t: undefined;\n\n\t\tif ( isNaN( inputValue ) && inputValue !== undefined ) {\n\t\t\treturn;\n\t\t}\n\t\tonChange( inputValue );\n\t};\n\n\tconst computedValue = useMemo( () => {\n\t\tconst [ parsedQuantity ] = parseQuantityAndUnitFromRawValue( value );\n\t\treturn [ parsedQuantity, unit ].join( '' );\n\t}, [ unit, value ] );\n\n\tconst min = isPx ? COVER_MIN_HEIGHT : 0;\n\n\treturn (\n\t\t<UnitControl\n\t\t\t__next40pxDefaultSize\n\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\tid={ inputId }\n\t\t\tisResetValueOnUnitChange\n\t\t\tmin={ min }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonUnitChange={ onUnitChange }\n\t\t\tunits={ units }\n\t\t\tvalue={ computedValue }\n\t\t/>\n\t);\n}\nexport default function CoverInspectorControls( {\n\tattributes,\n\tsetAttributes,\n\tclientId,\n\tsetOverlayColor,\n\tcoverRef,\n\tcurrentSettings,\n\tupdateDimRatio,\n\tfeaturedImage,\n} ) {\n\tconst {\n\t\tuseFeaturedImage,\n\t\tid,\n\t\tdimRatio,\n\t\tfocalPoint,\n\t\thasParallax,\n\t\tisRepeated,\n\t\tminHeight,\n\t\tminHeightUnit,\n\t\talt,\n\t\ttagName,\n\t} = attributes;\n\tconst {\n\t\tisVideoBackground,\n\t\tisImageBackground,\n\t\tmediaElement,\n\t\turl,\n\t\toverlayColor,\n\t} = currentSettings;\n\n\tconst sizeSlug = attributes.sizeSlug || DEFAULT_MEDIA_SIZE_SLUG;\n\n\tconst { gradientValue, setGradient } = __experimentalUseGradient();\n\tconst { getSettings } = useSelect( blockEditorStore );\n\n\tconst imageSizes = getSettings()?.imageSizes;\n\n\tconst image = useSelect(\n\t\t( select ) =>\n\t\t\tid && isImageBackground\n\t\t\t\t? select( coreStore ).getMedia( id, { context: 'view' } )\n\t\t\t\t: null,\n\t\t[ id, isImageBackground ]\n\t);\n\n\tconst currentBackgroundImage = useFeaturedImage ? featuredImage : image;\n\n\tfunction updateImage( newSizeSlug ) {\n\t\tconst newUrl =\n\t\t\tcurrentBackgroundImage?.media_details?.sizes?.[ newSizeSlug ]\n\t\t\t\t?.source_url;\n\t\tif ( ! newUrl ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tsetAttributes( {\n\t\t\turl: newUrl,\n\t\t\tsizeSlug: newSizeSlug,\n\t\t} );\n\t}\n\n\tconst imageSizeOptions = imageSizes\n\t\t?.filter(\n\t\t\t( { slug } ) =>\n\t\t\t\tcurrentBackgroundImage?.media_details?.sizes?.[ slug ]\n\t\t\t\t\t?.source_url\n\t\t)\n\t\t?.map( ( { name, slug } ) => ( { value: slug, label: name } ) );\n\n\tconst toggleParallax = () => {\n\t\tsetAttributes( {\n\t\t\thasParallax: ! hasParallax,\n\t\t\t...( ! hasParallax ? { focalPoint: undefined } : {} ),\n\t\t} );\n\t};\n\n\tconst toggleIsRepeated = () => {\n\t\tsetAttributes( {\n\t\t\tisRepeated: ! isRepeated,\n\t\t} );\n\t};\n\n\tconst showFocalPointPicker =\n\t\tisVideoBackground ||\n\t\t( isImageBackground && ( ! hasParallax || isRepeated ) );\n\n\tconst imperativeFocalPointPreview = ( value ) => {\n\t\tconst [ styleOfRef, property ] = mediaElement.current\n\t\t\t? [ mediaElement.current.style, 'objectPosition' ]\n\t\t\t: [ coverRef.current.style, 'backgroundPosition' ];\n\t\tstyleOfRef[ property ] = mediaPosition( value );\n\t};\n\n\tconst colorGradientSettings = useMultipleOriginColorsAndGradients();\n\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t{ !! url && (\n\t\t\t\t\t<ToolsPanel\n\t\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\thasParallax: false,\n\t\t\t\t\t\t\t\tfocalPoint: undefined,\n\t\t\t\t\t\t\t\tisRepeated: false,\n\t\t\t\t\t\t\t\talt: '',\n\t\t\t\t\t\t\t\tsizeSlug: undefined,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ isImageBackground && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Fixed background' ) }\n\t\t\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\t\t\thasValue={ () => hasParallax }\n\t\t\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\t\thasParallax: false,\n\t\t\t\t\t\t\t\t\t\t\tfocalPoint: undefined,\n\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Fixed background' ) }\n\t\t\t\t\t\t\t\t\t\tchecked={ hasParallax }\n\t\t\t\t\t\t\t\t\t\tonChange={ toggleParallax }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</ToolsPanelItem>\n\n\t\t\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Repeated background' ) }\n\t\t\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\t\t\thasValue={ () => isRepeated }\n\t\t\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\t\tisRepeated: false,\n\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Repeated background' ) }\n\t\t\t\t\t\t\t\t\t\tchecked={ isRepeated }\n\t\t\t\t\t\t\t\t\t\tonChange={ toggleIsRepeated }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showFocalPointPicker && (\n\t\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\t\tlabel={ __( 'Focal point' ) }\n\t\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\t\thasValue={ () => !! focalPoint }\n\t\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tfocalPoint: undefined,\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FocalPointPicker\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Focal point' ) }\n\t\t\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\t\t\tvalue={ focalPoint }\n\t\t\t\t\t\t\t\t\tonDragStart={ imperativeFocalPointPreview }\n\t\t\t\t\t\t\t\t\tonDrag={ imperativeFocalPointPreview }\n\t\t\t\t\t\t\t\t\tonChange={ ( newFocalPoint ) =>\n\t\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\t\tfocalPoint: newFocalPoint,\n\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! useFeaturedImage && url && ! isVideoBackground && (\n\t\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\t\thasValue={ () => !! alt }\n\t\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\t\tsetAttributes( { alt: '' } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<TextareaControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\t\t\tvalue={ alt }\n\t\t\t\t\t\t\t\t\tonChange={ ( newAlt ) =>\n\t\t\t\t\t\t\t\t\t\tsetAttributes( { alt: newAlt } )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\t\t\t// translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.\n\t\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'https://www.w3.org/WAI/tutorials/images/decision-tree/'\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Describe the purpose of the image.'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Leave empty if decorative.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ !! imageSizeOptions?.length && (\n\t\t\t\t\t\t\t<ResolutionTool\n\t\t\t\t\t\t\t\tvalue={ sizeSlug }\n\t\t\t\t\t\t\t\tonChange={ updateImage }\n\t\t\t\t\t\t\t\toptions={ imageSizeOptions }\n\t\t\t\t\t\t\t\tdefaultValue={ DEFAULT_MEDIA_SIZE_SLUG }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</ToolsPanel>\n\t\t\t\t) }\n\t\t\t</InspectorControls>\n\t\t\t{ colorGradientSettings.hasColorsOrGradients && (\n\t\t\t\t<InspectorControls group=\"color\">\n\t\t\t\t\t<ColorGradientSettingsDropdown\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\tsettings={ [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcolorValue: overlayColor.color,\n\t\t\t\t\t\t\t\tgradientValue,\n\t\t\t\t\t\t\t\tlabel: __( 'Overlay' ),\n\t\t\t\t\t\t\t\tonColorChange: setOverlayColor,\n\t\t\t\t\t\t\t\tonGradientChange: setGradient,\n\t\t\t\t\t\t\t\tisShownByDefault: true,\n\t\t\t\t\t\t\t\tresetAllFilter: () => ( {\n\t\t\t\t\t\t\t\t\toverlayColor: undefined,\n\t\t\t\t\t\t\t\t\tcustomOverlayColor: undefined,\n\t\t\t\t\t\t\t\t\tgradient: undefined,\n\t\t\t\t\t\t\t\t\tcustomGradient: undefined,\n\t\t\t\t\t\t\t\t} ),\n\t\t\t\t\t\t\t\tclearable: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t\t{ ...colorGradientSettings }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => {\n\t\t\t\t\t\t\t// If there's a media background the dimRatio will be\n\t\t\t\t\t\t\t// defaulted to 50 whereas it will be 100 for colors.\n\t\t\t\t\t\t\treturn dimRatio === undefined\n\t\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t\t: dimRatio !== ( url ? 50 : 100 );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\tonDeselect={ () => updateDimRatio( url ? 50 : 100 ) }\n\t\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\t\tdimRatio: url ? 50 : 100,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t>\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\t\tvalue={ dimRatio }\n\t\t\t\t\t\t\tonChange={ ( newDimRatio ) =>\n\t\t\t\t\t\t\t\tupdateDimRatio( newDimRatio )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tmax={ 100 }\n\t\t\t\t\t\t\tstep={ 10 }\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<InspectorControls group=\"dimensions\">\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tclassName=\"single-column\"\n\t\t\t\t\thasValue={ () => !! minHeight }\n\t\t\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tminHeight: undefined,\n\t\t\t\t\t\t\tminHeightUnit: undefined,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\tminHeight: undefined,\n\t\t\t\t\t\tminHeightUnit: undefined,\n\t\t\t\t\t} ) }\n\t\t\t\t\tisShownByDefault\n\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<CoverHeightInput\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tattributes?.style?.dimensions?.aspectRatio\n\t\t\t\t\t\t\t\t? ''\n\t\t\t\t\t\t\t\t: minHeight\n\t\t\t\t\t\t}\n\t\t\t\t\t\tunit={ minHeightUnit }\n\t\t\t\t\t\tonChange={ ( newMinHeight ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tminHeight: newMinHeight,\n\t\t\t\t\t\t\t\tstyle: cleanEmptyObject( {\n\t\t\t\t\t\t\t\t\t...attributes?.style,\n\t\t\t\t\t\t\t\t\tdimensions: {\n\t\t\t\t\t\t\t\t\t\t...attributes?.style?.dimensions,\n\t\t\t\t\t\t\t\t\t\taspectRatio: undefined, // Reset aspect ratio when minHeight is set.\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t} ),\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonUnitChange={ ( nextUnit ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tminHeightUnit: nextUnit,\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</ToolsPanelItem>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'HTML element' ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{ label: __( 'Default (<div>)' ), value: 'div' },\n\t\t\t\t\t\t{ label: '<header>', value: 'header' },\n\t\t\t\t\t\t{ label: '<main>', value: 'main' },\n\t\t\t\t\t\t{ label: '<section>', value: 'section' },\n\t\t\t\t\t\t{ label: '<article>', value: 'article' },\n\t\t\t\t\t\t{ label: '<aside>', value: 'aside' },\n\t\t\t\t\t\t{ label: '<footer>', value: 'footer' },\n\t\t\t\t\t] }\n\t\t\t\t\tvalue={ tagName }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { tagName: value } )\n\t\t\t\t\t}\n\t\t\t\t\thelp={ htmlElementMessages[ tagName ] }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SACCC,YAAY,EACZC,gBAAgB,EAChBC,YAAY,EACZC,eAAe,EACfC,aAAa,EACbC,aAAa,EACbC,4BAA4B,IAAIC,cAAc,EAC9CC,wBAAwB,IAAIC,UAAU,EACtCC,4BAA4B,IAAIC,cAAc,EAC9CC,yBAAyB,IAAIC,WAAW,EACxCC,8CAA8C,IAAIC,gCAAgC,QAC5E,uBAAuB;AAC9B,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SACCC,iBAAiB,EACjBC,WAAW,EACXC,KAAK,IAAIC,gBAAgB,EACzBC,2CAA2C,IAAIC,6BAA6B,EAC5EC,yBAAyB,EACzBC,iDAAiD,IAAIC,mCAAmC,EACxFC,WAAW,IAAIC,sBAAsB,QAC/B,yBAAyB;AAChC,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASV,KAAK,IAAIW,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,SAASC,gBAAgB,EAAEC,aAAa,QAAQ,WAAW;AAC3D,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,8BAA8B,QAAQ,mBAAmB;AAClE,SAASC,uBAAuB,QAAQ,cAAc;AACtD,SAASC,mBAAmB,QAA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CAAC;UAAEqB,KAAK,EAAE;QAAM,CAAC,EAChD;UAAEuB,KAAK,EAAE,UAAU;UAAEvB,KAAK,EAAE;QAAS,CAAC,EACtC;UAAEuB,KAAK,EAAE,QAAQ;UAAEvB,KAAK,EAAE;QAAO,CAAC,EAClC;UAAEuB,KAAK,EAAE,WAAW;UAAEvB,KAAK,EAAE;QAAU,CAAC,EACxC;UAAEuB,KAAK,EAAE,WAAW;UAAEvB,KAAK,EAAE;QAAU,CAAC,EACxC;UAAEuB,KAAK,EAAE,SAAS;UAAEvB,KAAK,EAAE;QAAQ,CAAC,EACpC;UAAEuB,KAAK,EAAE,UAAU;UAAEvB,KAAK,EAAE;QAAS,CAAC,CACpC;QACHA,KAAK,EAAG2C,OAAS;QACjB9C,QAAQ,EAAKG,KAAK,IACjB4B,aAAa,CAAE;UAAEe,OAAO,EAAE3C;QAAM,CAAE,CAClC;QACD2F,IAAI,EAAGxG,mBAAmB,CAAEwD,OAAO;MAAI,CACvC;IAAC,CACgB,CAAC;EAAA,CACnB,CAAC;AAEL","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["useMemo","ExternalLink","FocalPointPicker","RangeControl","TextareaControl","ToggleControl","__experimentalUseCustomUnits","useCustomUnits","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","__experimentalUnitControl","UnitControl","__experimentalParseQuantityAndUnitFromRawValue","parseQuantityAndUnitFromRawValue","useInstanceId","InspectorControls","useSettings","store","blockEditorStore","__experimentalColorGradientSettingsDropdown","ColorGradientSettingsDropdown","__experimentalUseGradient","__experimentalUseMultipleOriginColorsAndGradients","useMultipleOriginColorsAndGradients","privateApis","blockEditorPrivateApis","__","useSelect","coreStore","COVER_MIN_HEIGHT","mediaPosition","unlock","useToolsPanelDropdownMenuProps","DEFAULT_MEDIA_SIZE_SLUG","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","cleanEmptyObject","ResolutionTool","HTMLElementControl","CoverHeightInput","onChange","onUnitChange","unit","value","instanceId","inputId","isPx","availableUnits","units","defaultValues","px","em","rem","vw","vh","handleOnChange","unprocessedValue","inputValue","parseFloat","undefined","isNaN","computedValue","parsedQuantity","join","min","__next40pxDefaultSize","label","id","isResetValueOnUnitChange","CoverInspectorControls","attributes","setAttributes","clientId","setOverlayColor","coverRef","currentSettings","updateDimRatio","featuredImage","useFeaturedImage","dimRatio","focalPoint","hasParallax","isRepeated","minHeight","minHeightUnit","alt","tagName","isVideoBackground","isImageBackground","mediaElement","url","overlayColor","sizeSlug","gradientValue","setGradient","getSettings","imageSizes","image","select","getMedia","context","currentBackgroundImage","updateImage","newSizeSlug","newUrl","media_details","sizes","source_url","imageSizeOptions","filter","slug","map","name","toggleParallax","toggleIsRepeated","showFocalPointPicker","imperativeFocalPointPreview","styleOfRef","property","current","style","colorGradientSettings","dropdownMenuProps","children","resetAll","isShownByDefault","hasValue","onDeselect","__nextHasNoMarginBottom","checked","onDragStart","onDrag","newFocalPoint","newAlt","help","href","length","options","defaultValue","hasColorsOrGradients","group","__experimentalIsRenderedInSidebar","settings","colorValue","color","onColorChange","onGradientChange","resetAllFilter","customOverlayColor","gradient","customGradient","clearable","panelId","newDimRatio","max","step","required","className","dimensions","aspectRatio","newMinHeight","nextUnit"],"sources":["@wordpress/block-library/src/cover/edit/inspector-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport {\n\tExternalLink,\n\tFocalPointPicker,\n\tRangeControl,\n\tTextareaControl,\n\tToggleControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tInspectorControls,\n\tuseSettings,\n\tstore as blockEditorStore,\n\t__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,\n\t__experimentalUseGradient,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { COVER_MIN_HEIGHT, mediaPosition } from '../shared';\nimport { unlock } from '../../lock-unlock';\nimport { useToolsPanelDropdownMenuProps } from '../../utils/hooks';\nimport { DEFAULT_MEDIA_SIZE_SLUG } from '../constants';\n\nconst { cleanEmptyObject, ResolutionTool, HTMLElementControl } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction CoverHeightInput( {\n\tonChange,\n\tonUnitChange,\n\tunit = 'px',\n\tvalue = '',\n} ) {\n\tconst instanceId = useInstanceId( UnitControl );\n\tconst inputId = `block-cover-height-input-${ instanceId }`;\n\tconst isPx = unit === 'px';\n\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ 'px', 'em', 'rem', 'vw', 'vh' ],\n\t\tdefaultValues: { px: 430, '%': 20, em: 20, rem: 20, vw: 20, vh: 50 },\n\t} );\n\n\tconst handleOnChange = ( unprocessedValue ) => {\n\t\tconst inputValue =\n\t\t\tunprocessedValue !== ''\n\t\t\t\t? parseFloat( unprocessedValue )\n\t\t\t\t: undefined;\n\n\t\tif ( isNaN( inputValue ) && inputValue !== undefined ) {\n\t\t\treturn;\n\t\t}\n\t\tonChange( inputValue );\n\t};\n\n\tconst computedValue = useMemo( () => {\n\t\tconst [ parsedQuantity ] = parseQuantityAndUnitFromRawValue( value );\n\t\treturn [ parsedQuantity, unit ].join( '' );\n\t}, [ unit, value ] );\n\n\tconst min = isPx ? COVER_MIN_HEIGHT : 0;\n\n\treturn (\n\t\t<UnitControl\n\t\t\t__next40pxDefaultSize\n\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\tid={ inputId }\n\t\t\tisResetValueOnUnitChange\n\t\t\tmin={ min }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonUnitChange={ onUnitChange }\n\t\t\tunits={ units }\n\t\t\tvalue={ computedValue }\n\t\t/>\n\t);\n}\nexport default function CoverInspectorControls( {\n\tattributes,\n\tsetAttributes,\n\tclientId,\n\tsetOverlayColor,\n\tcoverRef,\n\tcurrentSettings,\n\tupdateDimRatio,\n\tfeaturedImage,\n} ) {\n\tconst {\n\t\tuseFeaturedImage,\n\t\tid,\n\t\tdimRatio,\n\t\tfocalPoint,\n\t\thasParallax,\n\t\tisRepeated,\n\t\tminHeight,\n\t\tminHeightUnit,\n\t\talt,\n\t\ttagName,\n\t} = attributes;\n\tconst {\n\t\tisVideoBackground,\n\t\tisImageBackground,\n\t\tmediaElement,\n\t\turl,\n\t\toverlayColor,\n\t} = currentSettings;\n\n\tconst sizeSlug = attributes.sizeSlug || DEFAULT_MEDIA_SIZE_SLUG;\n\n\tconst { gradientValue, setGradient } = __experimentalUseGradient();\n\tconst { getSettings } = useSelect( blockEditorStore );\n\n\tconst imageSizes = getSettings()?.imageSizes;\n\n\tconst image = useSelect(\n\t\t( select ) =>\n\t\t\tid && isImageBackground\n\t\t\t\t? select( coreStore ).getMedia( id, { context: 'view' } )\n\t\t\t\t: null,\n\t\t[ id, isImageBackground ]\n\t);\n\n\tconst currentBackgroundImage = useFeaturedImage ? featuredImage : image;\n\n\tfunction updateImage( newSizeSlug ) {\n\t\tconst newUrl =\n\t\t\tcurrentBackgroundImage?.media_details?.sizes?.[ newSizeSlug ]\n\t\t\t\t?.source_url;\n\t\tif ( ! newUrl ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tsetAttributes( {\n\t\t\turl: newUrl,\n\t\t\tsizeSlug: newSizeSlug,\n\t\t} );\n\t}\n\n\tconst imageSizeOptions = imageSizes\n\t\t?.filter(\n\t\t\t( { slug } ) =>\n\t\t\t\tcurrentBackgroundImage?.media_details?.sizes?.[ slug ]\n\t\t\t\t\t?.source_url\n\t\t)\n\t\t?.map( ( { name, slug } ) => ( { value: slug, label: name } ) );\n\n\tconst toggleParallax = () => {\n\t\tsetAttributes( {\n\t\t\thasParallax: ! hasParallax,\n\t\t\t...( ! hasParallax ? { focalPoint: undefined } : {} ),\n\t\t} );\n\t};\n\n\tconst toggleIsRepeated = () => {\n\t\tsetAttributes( {\n\t\t\tisRepeated: ! isRepeated,\n\t\t} );\n\t};\n\n\tconst showFocalPointPicker =\n\t\tisVideoBackground ||\n\t\t( isImageBackground && ( ! hasParallax || isRepeated ) );\n\n\tconst imperativeFocalPointPreview = ( value ) => {\n\t\tconst [ styleOfRef, property ] = mediaElement.current\n\t\t\t? [ mediaElement.current.style, 'objectPosition' ]\n\t\t\t: [ coverRef.current.style, 'backgroundPosition' ];\n\t\tstyleOfRef[ property ] = mediaPosition( value );\n\t};\n\n\tconst colorGradientSettings = useMultipleOriginColorsAndGradients();\n\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t{ !! url && (\n\t\t\t\t\t<ToolsPanel\n\t\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\thasParallax: false,\n\t\t\t\t\t\t\t\tfocalPoint: undefined,\n\t\t\t\t\t\t\t\tisRepeated: false,\n\t\t\t\t\t\t\t\talt: '',\n\t\t\t\t\t\t\t\tsizeSlug: undefined,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ isImageBackground && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Fixed background' ) }\n\t\t\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\t\t\thasValue={ () => hasParallax }\n\t\t\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\t\thasParallax: false,\n\t\t\t\t\t\t\t\t\t\t\tfocalPoint: undefined,\n\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Fixed background' ) }\n\t\t\t\t\t\t\t\t\t\tchecked={ hasParallax }\n\t\t\t\t\t\t\t\t\t\tonChange={ toggleParallax }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</ToolsPanelItem>\n\n\t\t\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Repeated background' ) }\n\t\t\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\t\t\thasValue={ () => isRepeated }\n\t\t\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\t\tisRepeated: false,\n\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Repeated background' ) }\n\t\t\t\t\t\t\t\t\t\tchecked={ isRepeated }\n\t\t\t\t\t\t\t\t\t\tonChange={ toggleIsRepeated }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showFocalPointPicker && (\n\t\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\t\tlabel={ __( 'Focal point' ) }\n\t\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\t\thasValue={ () => !! focalPoint }\n\t\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tfocalPoint: undefined,\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FocalPointPicker\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Focal point' ) }\n\t\t\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\t\t\tvalue={ focalPoint }\n\t\t\t\t\t\t\t\t\tonDragStart={ imperativeFocalPointPreview }\n\t\t\t\t\t\t\t\t\tonDrag={ imperativeFocalPointPreview }\n\t\t\t\t\t\t\t\t\tonChange={ ( newFocalPoint ) =>\n\t\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\t\tfocalPoint: newFocalPoint,\n\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! useFeaturedImage && url && ! isVideoBackground && (\n\t\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t\t\thasValue={ () => !! alt }\n\t\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\t\tsetAttributes( { alt: '' } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<TextareaControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\t\t\tvalue={ alt }\n\t\t\t\t\t\t\t\t\tonChange={ ( newAlt ) =>\n\t\t\t\t\t\t\t\t\t\tsetAttributes( { alt: newAlt } )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\t\t\t// translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.\n\t\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'https://www.w3.org/WAI/tutorials/images/decision-tree/'\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Describe the purpose of the image.'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Leave empty if decorative.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ !! imageSizeOptions?.length && (\n\t\t\t\t\t\t\t<ResolutionTool\n\t\t\t\t\t\t\t\tvalue={ sizeSlug }\n\t\t\t\t\t\t\t\tonChange={ updateImage }\n\t\t\t\t\t\t\t\toptions={ imageSizeOptions }\n\t\t\t\t\t\t\t\tdefaultValue={ DEFAULT_MEDIA_SIZE_SLUG }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</ToolsPanel>\n\t\t\t\t) }\n\t\t\t</InspectorControls>\n\t\t\t{ colorGradientSettings.hasColorsOrGradients && (\n\t\t\t\t<InspectorControls group=\"color\">\n\t\t\t\t\t<ColorGradientSettingsDropdown\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\tsettings={ [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcolorValue: overlayColor.color,\n\t\t\t\t\t\t\t\tgradientValue,\n\t\t\t\t\t\t\t\tlabel: __( 'Overlay' ),\n\t\t\t\t\t\t\t\tonColorChange: setOverlayColor,\n\t\t\t\t\t\t\t\tonGradientChange: setGradient,\n\t\t\t\t\t\t\t\tisShownByDefault: true,\n\t\t\t\t\t\t\t\tresetAllFilter: () => ( {\n\t\t\t\t\t\t\t\t\toverlayColor: undefined,\n\t\t\t\t\t\t\t\t\tcustomOverlayColor: undefined,\n\t\t\t\t\t\t\t\t\tgradient: undefined,\n\t\t\t\t\t\t\t\t\tcustomGradient: undefined,\n\t\t\t\t\t\t\t\t} ),\n\t\t\t\t\t\t\t\tclearable: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t\t{ ...colorGradientSettings }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => {\n\t\t\t\t\t\t\t// If there's a media background the dimRatio will be\n\t\t\t\t\t\t\t// defaulted to 50 whereas it will be 100 for colors.\n\t\t\t\t\t\t\treturn dimRatio === undefined\n\t\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t\t: dimRatio !== ( url ? 50 : 100 );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\tonDeselect={ () => updateDimRatio( url ? 50 : 100 ) }\n\t\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\t\tdimRatio: url ? 50 : 100,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t>\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\t\tvalue={ dimRatio }\n\t\t\t\t\t\t\tonChange={ ( newDimRatio ) =>\n\t\t\t\t\t\t\t\tupdateDimRatio( newDimRatio )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tmax={ 100 }\n\t\t\t\t\t\t\tstep={ 10 }\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<InspectorControls group=\"dimensions\">\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tclassName=\"single-column\"\n\t\t\t\t\thasValue={ () => !! minHeight }\n\t\t\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tminHeight: undefined,\n\t\t\t\t\t\t\tminHeightUnit: undefined,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\tminHeight: undefined,\n\t\t\t\t\t\tminHeightUnit: undefined,\n\t\t\t\t\t} ) }\n\t\t\t\t\tisShownByDefault\n\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<CoverHeightInput\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tattributes?.style?.dimensions?.aspectRatio\n\t\t\t\t\t\t\t\t? ''\n\t\t\t\t\t\t\t\t: minHeight\n\t\t\t\t\t\t}\n\t\t\t\t\t\tunit={ minHeightUnit }\n\t\t\t\t\t\tonChange={ ( newMinHeight ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tminHeight: newMinHeight,\n\t\t\t\t\t\t\t\tstyle: cleanEmptyObject( {\n\t\t\t\t\t\t\t\t\t...attributes?.style,\n\t\t\t\t\t\t\t\t\tdimensions: {\n\t\t\t\t\t\t\t\t\t\t...attributes?.style?.dimensions,\n\t\t\t\t\t\t\t\t\t\taspectRatio: undefined, // Reset aspect ratio when minHeight is set.\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t} ),\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonUnitChange={ ( nextUnit ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tminHeightUnit: nextUnit,\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</ToolsPanelItem>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<HTMLElementControl\n\t\t\t\t\ttagName={ tagName }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { tagName: value } )\n\t\t\t\t\t}\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{ label: __( 'Default (<div>)' ), value: 'div' },\n\t\t\t\t\t\t{ label: '<header>', value: 'header' },\n\t\t\t\t\t\t{ label: '<main>', value: 'main' },\n\t\t\t\t\t\t{ label: '<section>', value: 'section' },\n\t\t\t\t\t\t{ label: '<article>', value: 'article' },\n\t\t\t\t\t\t{ label: '<aside>', value: 'aside' },\n\t\t\t\t\t\t{ label: '<footer>', value: 'footer' },\n\t\t\t\t\t] }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;A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UAAEvB,KAAK,EAAE;QAAS,CAAC;MACpC,CACH;IAAC,CACgB,CAAC;EAAA,CACnB,CAAC;AAEL","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","cover","icon","initBlock","deprecated","edit","metadata","$schema","apiVersion","name","title","category","description","textdomain","attributes","url","type","useFeaturedImage","id","alt","hasParallax","isRepeated","dimRatio","overlayColor","customOverlayColor","isUserOverlayColor","backgroundType","focalPoint","minHeight","minHeightUnit","gradient","customGradient","contentPosition","isDark","allowedBlocks","templateLock","tagName","sizeSlug","usesContext","supports","anchor","align","html","shadow","spacing","padding","margin","blockGap","__experimentalDefaultControls","__experimentalBorder","color","radius","style","width","heading","text","background","__experimentalSkipSerialization","enableContrastChecker","dimensions","aspectRatio","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","layout","allowJustification","interactivity","clientNavigation","filter","duotone","selectors","editorStyle","save","transforms","variations","settings","example","innerBlocks","content","init"],"sources":["@wordpress/block-library/src/cover/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { cover 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';\nimport transforms from './transforms';\nimport variations from './variations';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tcustomOverlayColor: '#065174',\n\t\t\tdimRatio: 40,\n\t\t\turl: 'https://s.w.org/images/core/5.3/Windbuchencom.jpg',\n\t\t\tstyle: {\n\t\t\t\ttypography: {\n\t\t\t\t\tfontSize: 48,\n\t\t\t\t},\n\t\t\t\tcolor: {\n\t\t\t\t\ttext: 'white',\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcontent: __( '
|
|
1
|
+
{"version":3,"names":["__","cover","icon","initBlock","deprecated","edit","metadata","$schema","apiVersion","name","title","category","description","textdomain","attributes","url","type","useFeaturedImage","id","alt","hasParallax","isRepeated","dimRatio","overlayColor","customOverlayColor","isUserOverlayColor","backgroundType","focalPoint","minHeight","minHeightUnit","gradient","customGradient","contentPosition","isDark","allowedBlocks","templateLock","tagName","sizeSlug","usesContext","supports","anchor","align","html","shadow","spacing","padding","margin","blockGap","__experimentalDefaultControls","__experimentalBorder","color","radius","style","width","heading","text","background","__experimentalSkipSerialization","enableContrastChecker","dimensions","aspectRatio","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","layout","allowJustification","interactivity","clientNavigation","filter","duotone","selectors","editorStyle","save","transforms","variations","settings","example","innerBlocks","content","init"],"sources":["@wordpress/block-library/src/cover/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { cover 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';\nimport transforms from './transforms';\nimport variations from './variations';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tcustomOverlayColor: '#065174',\n\t\t\tdimRatio: 40,\n\t\t\turl: 'https://s.w.org/images/core/5.3/Windbuchencom.jpg',\n\t\t\tstyle: {\n\t\t\t\ttypography: {\n\t\t\t\t\tfontSize: 48,\n\t\t\t\t},\n\t\t\t\tcolor: {\n\t\t\t\t\ttext: 'white',\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcontent: `<strong>${ __( 'Snow Patrol' ) }</strong>`,\n\t\t\t\t\talign: 'center',\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\ttransforms,\n\tsave,\n\tedit,\n\tdeprecated,\n\tvariations,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,KAAK,IAAIC,IAAI,QAAQ,kBAAkB;;AAEhD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAC3C,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,IAAI,MAAM,QAAQ;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,GAAA;MAAAC,IAAA;IAAA;IAAAC,gBAAA;MAAAD,IAAA;MAAA;IAAA;IAAAE,EAAA;MAAAF,IAAA;IAAA;IAAAG,GAAA;MAAAH,IAAA;MAAA;IAAA;IAAAI,WAAA;MAAAJ,IAAA;MAAA;IAAA;IAAAK,UAAA;MAAAL,IAAA;MAAA;IAAA;IAAAM,QAAA;MAAAN,IAAA;MAAA;IAAA;IAAAO,YAAA;MAAAP,IAAA;IAAA;IAAAQ,kBAAA;MAAAR,IAAA;IAAA;IAAAS,kBAAA;MAAAT,IAAA;IAAA;IAAAU,cAAA;MAAAV,IAAA;MAAA;IAAA;IAAAW,UAAA;MAAAX,IAAA;IAAA;IAAAY,SAAA;MAAAZ,IAAA;IAAA;IAAAa,aAAA;MAAAb,IAAA;IAAA;IAAAc,QAAA;MAAAd,IAAA;IAAA;IAAAe,cAAA;MAAAf,IAAA;IAAA;IAAAgB,eAAA;MAAAhB,IAAA;IAAA;IAAAiB,MAAA;MAAAjB,IAAA;MAAA;IAAA;IAAAkB,aAAA;MA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AAE,SAAS;MAC7BF,QAAQ,EAAE,EAAE;MACZP,GAAG,EAAE,mDAAmD;MACxDqC,KAAK,EAAE;QACNS,UAAU,EAAE;UACXC,QAAQ,EAAE;QACX,CAAC;QACDZ,KAAK,EAAE;UACNK,IAAI,EAAE;QACP;MACD;IACD,CAAC;IACD4B,WAAW,EAAE,CACZ;MACC1E,IAAI,EAAE,gBAAgB;MACtBK,UAAU,EAAE;QACXsE,OAAO,EAAE,WAAYpF,EAAE,CAAE,aAAc,CAAC,WAAY;QACpDyC,KAAK,EAAE;MACR;IACD,CAAC;EAEH,CAAC;EACDsC,UAAU;EACVD,IAAI;EACJzE,IAAI;EACJD,UAAU;EACV4E;AACD,CAAC;AAED,OAAO,MAAMK,IAAI,GAAGA,CAAA,KAAMlF,SAAS,CAAE;EAAEM,IAAI;EAAEH,QAAQ;EAAE2E;AAAS,CAAE,CAAC","ignoreList":[]}
|
|
@@ -77,16 +77,12 @@ function DetailsEdit({
|
|
|
77
77
|
}), /*#__PURE__*/_jsxs("details", {
|
|
78
78
|
...innerBlocksProps,
|
|
79
79
|
open: isOpen,
|
|
80
|
+
onToggle: event => setIsOpen(event.target.open),
|
|
80
81
|
children: [/*#__PURE__*/_jsx("summary", {
|
|
81
|
-
onClick: event => {
|
|
82
|
-
event.preventDefault();
|
|
83
|
-
setIsOpen(!isOpen);
|
|
84
|
-
},
|
|
85
82
|
children: /*#__PURE__*/_jsx(RichText, {
|
|
86
83
|
identifier: "summary",
|
|
87
84
|
"aria-label": __('Write summary'),
|
|
88
85
|
placeholder: placeholder || __('Write summary…'),
|
|
89
|
-
allowedFormats: [],
|
|
90
86
|
withoutInteractiveFormatting: true,
|
|
91
87
|
value: summary,
|
|
92
88
|
onChange: newSummary => setAttributes({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RichText","useBlockProps","useInnerBlocksProps","InspectorControls","TextControl","ToggleControl","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","__","useState","useToolsPanelDropdownMenuProps","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","TEMPLATE","placeholder","DetailsEdit","attributes","setAttributes","name","showContent","summary","allowedBlocks","blockProps","innerBlocksProps","template","__experimentalCaptureToolbars","isOpen","setIsOpen","dropdownMenuProps","children","label","resetAll","isShownByDefault","hasValue","onDeselect","__nextHasNoMarginBottom","checked","onChange","group","__next40pxDefaultSize","value","newName","help","open","
|
|
1
|
+
{"version":3,"names":["RichText","useBlockProps","useInnerBlocksProps","InspectorControls","TextControl","ToggleControl","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","__","useState","useToolsPanelDropdownMenuProps","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","TEMPLATE","placeholder","DetailsEdit","attributes","setAttributes","name","showContent","summary","allowedBlocks","blockProps","innerBlocksProps","template","__experimentalCaptureToolbars","isOpen","setIsOpen","dropdownMenuProps","children","label","resetAll","isShownByDefault","hasValue","onDeselect","__nextHasNoMarginBottom","checked","onChange","group","__next40pxDefaultSize","value","newName","help","open","onToggle","event","target","identifier","withoutInteractiveFormatting","newSummary"],"sources":["@wordpress/block-library/src/details/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tRichText,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tInspectorControls,\n} from '@wordpress/block-editor';\nimport {\n\tTextControl,\n\tToggleControl,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\n\nconst TEMPLATE = [\n\t[\n\t\t'core/paragraph',\n\t\t{\n\t\t\tplaceholder: __( 'Type / to add a hidden block' ),\n\t\t},\n\t],\n];\n\nfunction DetailsEdit( { attributes, setAttributes } ) {\n\tconst { name, showContent, summary, allowedBlocks, placeholder } =\n\t\tattributes;\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t\t__experimentalCaptureToolbars: true,\n\t\tallowedBlocks,\n\t} );\n\tconst [ isOpen, setIsOpen ] = useState( showContent );\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tshowContent: false,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\tlabel={ __( 'Open by default' ) }\n\t\t\t\t\t\thasValue={ () => showContent }\n\t\t\t\t\t\tonDeselect={ () => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tshowContent: false,\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\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Open by default' ) }\n\t\t\t\t\t\t\tchecked={ showContent }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tshowContent: ! showContent,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</ToolsPanel>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Name attribute' ) }\n\t\t\t\t\tvalue={ name || '' }\n\t\t\t\t\tonChange={ ( newName ) =>\n\t\t\t\t\t\tsetAttributes( { name: newName } )\n\t\t\t\t\t}\n\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t'Enables multiple Details blocks with the same name attribute to be connected, with only one open at a time.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<details\n\t\t\t\t{ ...innerBlocksProps }\n\t\t\t\topen={ isOpen }\n\t\t\t\tonToggle={ ( event ) => setIsOpen( event.target.open ) }\n\t\t\t>\n\t\t\t\t<summary>\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"summary\"\n\t\t\t\t\t\taria-label={ __( 'Write summary' ) }\n\t\t\t\t\t\tplaceholder={ placeholder || __( 'Write summary…' ) }\n\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\tvalue={ summary }\n\t\t\t\t\t\tonChange={ ( newSummary ) =>\n\t\t\t\t\t\t\tsetAttributes( { summary: newSummary } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</summary>\n\t\t\t\t{ innerBlocksProps.children }\n\t\t\t</details>\n\t\t</>\n\t);\n}\n\nexport default DetailsEdit;\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,QAAQ,EACRC,aAAa,EACbC,mBAAmB,EACnBC,iBAAiB,QACX,yBAAyB;AAChC,SACCC,WAAW,EACXC,aAAa,EACbC,wBAAwB,IAAIC,UAAU,EACtCC,4BAA4B,IAAIC,cAAc,QACxC,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,QAAQ,oBAAoB;;AAE7C;AACA;AACA;AACA,SAASC,8BAA8B,QAAQ,gBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAEhE,MAAMC,QAAQ,GAAG,CAChB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;YACvBkB,QAAQ,EAAGA,CAAA,KACVpB,aAAa,CAAE;cACdE,WAAW,EAAE,CAAEA;YAChB,CAAE;UACF,CACD;QAAC,CACa;MAAC,CACN;IAAC,CACK,CAAC,eACpBX,IAAA,CAACX,iBAAiB;MAACyC,KAAK,EAAC,UAAU;MAAAT,QAAA,eAClCrB,IAAA,CAACV,WAAW;QACXyC,qBAAqB;QACrBJ,uBAAuB;QACvBL,KAAK,EAAG1B,EAAE,CAAE,gBAAiB,CAAG;QAChCoC,KAAK,EAAGtB,IAAI,IAAI,EAAI;QACpBmB,QAAQ,EAAKI,OAAO,IACnBxB,aAAa,CAAE;UAAEC,IAAI,EAAEuB;QAAQ,CAAE,CACjC;QACDC,IAAI,EAAGtC,EAAE,CACR,6GACD;MAAG,CACH;IAAC,CACgB,CAAC,eACpBM,KAAA;MAAA,GACMa,gBAAgB;MACrBoB,IAAI,EAAGjB,MAAQ;MACfkB,QAAQ,EAAKC,KAAK,IAAMlB,SAAS,CAAEkB,KAAK,CAACC,MAAM,CAACH,IAAK,CAAG;MAAAd,QAAA,gBAExDrB,IAAA;QAAAqB,QAAA,eACCrB,IAAA,CAACd,QAAQ;UACRqD,UAAU,EAAC,SAAS;UACpB,cAAa3C,EAAE,CAAE,eAAgB,CAAG;UACpCU,WAAW,EAAGA,WAAW,IAAIV,EAAE,CAAE,gBAAiB,CAAG;UACrD4C,4BAA4B;UAC5BR,KAAK,EAAGpB,OAAS;UACjBiB,QAAQ,EAAKY,UAAU,IACtBhC,aAAa,CAAE;YAAEG,OAAO,EAAE6B;UAAW,CAAE;QACvC,CACD;MAAC,CACM,CAAC,EACR1B,gBAAgB,CAACM,QAAQ;IAAA,CACnB,CAAC;EAAA,CACT,CAAC;AAEL;AAEA,eAAed,WAAW","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["details","icon","__","sprintf","initBlock","metadata","$schema","apiVersion","name","title","category","description","keywords","textdomain","attributes","showContent","type","summary","source","selector","attribute","allowedBlocks","placeholder","supports","__experimentalOnEnter","align","anchor","color","gradients","link","__experimentalDefaultControls","background","text","__experimentalBorder","width","style","html","spacing","margin","padding","blockGap","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","layout","allowEditing","interactivity","clientNavigation","editorStyle","edit","save","transforms","settings","example","innerBlocks","content","__experimentalLabel","context","customName","hasSummary","trim","length","init"],"sources":["@wordpress/block-library/src/details/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { details as icon } from '@wordpress/icons';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tsummary: 'La Mancha',\n\t\t\tshowContent: true,\n\t\t},\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcontent: __(\n\t\t\t\t\t\t'In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.'\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\t__experimentalLabel( attributes, { context } ) {\n\t\tconst { summary } = attributes;\n\n\t\tconst customName = attributes?.metadata?.name;\n\t\tconst hasSummary = summary?.trim().length > 0;\n\n\t\t// In the list view, use the block's summary as the label.\n\t\t// If the summary is empty, fall back to the default label.\n\t\tif ( context === 'list-view' && ( customName || hasSummary ) ) {\n\t\t\treturn customName || summary;\n\t\t}\n\n\t\tif ( context === 'accessibility' ) {\n\t\t\treturn ! hasSummary\n\t\t\t\t? __( 'Details. Empty.' )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t/* translators: accessibility text; summary title. */\n\t\t\t\t\t\t__( 'Details. %s' ),\n\t\t\t\t\t\tsummary\n\t\t\t\t );\n\t\t}\n\t},\n\tsave,\n\tedit,\n\ttransforms,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,IAAIC,IAAI,QAAQ,kBAAkB;AAClD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;;AAE7C;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,QAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,WAAA;MAAAC,IAAA;MAAA;IAAA;IAAAC,OAAA;MAAAD,IAAA;MAAAE,MAAA;MAAAC,QAAA;IAAA;IAAAX,IAAA;MAAAQ,IAAA;MAAAE,MAAA;MAAAE,SAAA;MAAAD,QAAA;IAAA;IAAAE,aAAA;MAAAL,IAAA;IAAA;IAAAM,WAAA;MAAAN,IAAA;IAAA;EAAA;EAAAO,QAAA;IAAAC,qBAAA;IAAAC,KAAA;IAAAC,MAAA;IAAAC,KAAA;MAAAC,SAAA;MAAAC,IAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;MAAA;IAAA;IAAAC,oBAAA;MAAAN,KAAA;MAAAO,KAAA;MAAAC,KAAA;IAAA;IAAAC,IAAA;IAAAC,OAAA;MAAAC,MAAA;MAAAC,OAAA;MAAAC,QAAA;MAAAV,6BAAA;QAAAQ,MAAA;QAAAC,OAAA;MAAA;IAAA;IAAAE,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAnB,6BAAA;QAAAY,QAAA;MAAA;IAAA;IAAAQ,MAAA;MAAAC,YAAA;IAAA;IAAAC,aAAA;MAAAC,gBAAA;IAAA;EAAA;EAAAC,WAAA;EAAAnB,KAAA;AAAA;AAE5C,OAAOoB,IAAI,MAAM,QAAQ;AACzB,OAAOC,IAAI,MAAM,QAAQ;AACzB,OAAOC,UAAU,MAAM,cAAc;AAErC,MAAM;EAAEjD;AAAK,CAAC,GAAGH,QAAQ;AACzB,SAASA,QAAQ,EAAEG,IAAI;AAEvB,OAAO,MAAMkD,QAAQ,GAAG;EACvBzD,IAAI;EACJ0D,OAAO,EAAE;IACR7C,UAAU,EAAE;MACXG,OAAO,EAAE,
|
|
1
|
+
{"version":3,"names":["details","icon","__","sprintf","initBlock","metadata","$schema","apiVersion","name","title","category","description","keywords","textdomain","attributes","showContent","type","summary","source","selector","attribute","allowedBlocks","placeholder","supports","__experimentalOnEnter","align","anchor","color","gradients","link","__experimentalDefaultControls","background","text","__experimentalBorder","width","style","html","spacing","margin","padding","blockGap","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","layout","allowEditing","interactivity","clientNavigation","editorStyle","edit","save","transforms","settings","example","innerBlocks","content","__experimentalLabel","context","customName","hasSummary","trim","length","init"],"sources":["@wordpress/block-library/src/details/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { details as icon } from '@wordpress/icons';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tsummary: __( 'La Mancha' ),\n\t\t\tshowContent: true,\n\t\t},\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcontent: __(\n\t\t\t\t\t\t'In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.'\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\t__experimentalLabel( attributes, { context } ) {\n\t\tconst { summary } = attributes;\n\n\t\tconst customName = attributes?.metadata?.name;\n\t\tconst hasSummary = summary?.trim().length > 0;\n\n\t\t// In the list view, use the block's summary as the label.\n\t\t// If the summary is empty, fall back to the default label.\n\t\tif ( context === 'list-view' && ( customName || hasSummary ) ) {\n\t\t\treturn customName || summary;\n\t\t}\n\n\t\tif ( context === 'accessibility' ) {\n\t\t\treturn ! hasSummary\n\t\t\t\t? __( 'Details. Empty.' )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t/* translators: accessibility text; summary title. */\n\t\t\t\t\t\t__( 'Details. %s' ),\n\t\t\t\t\t\tsummary\n\t\t\t\t );\n\t\t}\n\t},\n\tsave,\n\tedit,\n\ttransforms,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,IAAIC,IAAI,QAAQ,kBAAkB;AAClD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;;AAE7C;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,QAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,WAAA;MAAAC,IAAA;MAAA;IAAA;IAAAC,OAAA;MAAAD,IAAA;MAAAE,MAAA;MAAAC,QAAA;IAAA;IAAAX,IAAA;MAAAQ,IAAA;MAAAE,MAAA;MAAAE,SAAA;MAAAD,QAAA;IAAA;IAAAE,aAAA;MAAAL,IAAA;IAAA;IAAAM,WAAA;MAAAN,IAAA;IAAA;EAAA;EAAAO,QAAA;I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AAEG,IAAI;IAC7C,MAAMyD,UAAU,GAAGhD,OAAO,EAAEiD,IAAI,CAAC,CAAC,CAACC,MAAM,GAAG,CAAC;;IAE7C;IACA;IACA,IAAKJ,OAAO,KAAK,WAAW,KAAMC,UAAU,IAAIC,UAAU,CAAE,EAAG;MAC9D,OAAOD,UAAU,IAAI/C,OAAO;IAC7B;IAEA,IAAK8C,OAAO,KAAK,eAAe,EAAG;MAClC,OAAO,CAAEE,UAAU,GAChB/D,EAAE,CAAE,iBAAkB,CAAC,GACvBC,OAAO,CACP;MACAD,EAAE,CAAE,aAAc,CAAC,EACnBe,OACA,CAAC;IACL;EACD,CAAC;EACDuC,IAAI;EACJD,IAAI;EACJE;AACD,CAAC;AAED,OAAO,MAAMW,IAAI,GAAGA,CAAA,KAAMhE,SAAS,CAAE;EAAEI,IAAI;EAAEH,QAAQ;EAAEqD;AAAS,CAAE,CAAC","ignoreList":[]}
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
5
|
-
import { InnerBlocks, useBlockProps, InspectorControls, useInnerBlocksProps, store as blockEditorStore } from '@wordpress/block-editor';
|
|
6
|
-
import { SelectControl } from '@wordpress/components';
|
|
5
|
+
import { InnerBlocks, useBlockProps, InspectorControls, useInnerBlocksProps, store as blockEditorStore, privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
7
6
|
import { useRef } from '@wordpress/element';
|
|
8
7
|
import { __ } from '@wordpress/i18n';
|
|
9
8
|
import { View } from '@wordpress/primitives';
|
|
@@ -12,7 +11,11 @@ import { View } from '@wordpress/primitives';
|
|
|
12
11
|
* Internal dependencies
|
|
13
12
|
*/
|
|
14
13
|
import GroupPlaceHolder, { useShouldShowPlaceHolder } from './placeholder';
|
|
15
|
-
import {
|
|
14
|
+
import { unlock } from '../lock-unlock';
|
|
15
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
16
|
+
const {
|
|
17
|
+
HTMLElementControl
|
|
18
|
+
} = unlock(blockEditorPrivateApis);
|
|
16
19
|
|
|
17
20
|
/**
|
|
18
21
|
* Render inspector controls for the Group block.
|
|
@@ -20,20 +23,21 @@ import { htmlElementMessages } from '../utils/messages';
|
|
|
20
23
|
* @param {Object} props Component props.
|
|
21
24
|
* @param {string} props.tagName The HTML tag name.
|
|
22
25
|
* @param {Function} props.onSelectTagName onChange function for the SelectControl.
|
|
26
|
+
* @param {string} props.clientId The client ID of the current block.
|
|
23
27
|
*
|
|
24
28
|
* @return {JSX.Element} The control group.
|
|
25
29
|
*/
|
|
26
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
27
30
|
function GroupEditControls({
|
|
28
31
|
tagName,
|
|
29
|
-
onSelectTagName
|
|
32
|
+
onSelectTagName,
|
|
33
|
+
clientId
|
|
30
34
|
}) {
|
|
31
35
|
return /*#__PURE__*/_jsx(InspectorControls, {
|
|
32
36
|
group: "advanced",
|
|
33
|
-
children: /*#__PURE__*/_jsx(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
children: /*#__PURE__*/_jsx(HTMLElementControl, {
|
|
38
|
+
tagName: tagName,
|
|
39
|
+
onChange: onSelectTagName,
|
|
40
|
+
clientId: clientId,
|
|
37
41
|
options: [{
|
|
38
42
|
label: __('Default (<div>)'),
|
|
39
43
|
value: 'div'
|
|
@@ -55,10 +59,7 @@ function GroupEditControls({
|
|
|
55
59
|
}, {
|
|
56
60
|
label: '<footer>',
|
|
57
61
|
value: 'footer'
|
|
58
|
-
}]
|
|
59
|
-
value: tagName,
|
|
60
|
-
onChange: onSelectTagName,
|
|
61
|
-
help: htmlElementMessages[tagName]
|
|
62
|
+
}]
|
|
62
63
|
})
|
|
63
64
|
});
|
|
64
65
|
}
|
|
@@ -140,7 +141,8 @@ function GroupEdit({
|
|
|
140
141
|
tagName: TagName,
|
|
141
142
|
onSelectTagName: value => setAttributes({
|
|
142
143
|
tagName: value
|
|
143
|
-
})
|
|
144
|
+
}),
|
|
145
|
+
clientId: clientId
|
|
144
146
|
}), showPlaceholder && /*#__PURE__*/_jsxs(View, {
|
|
145
147
|
children: [innerBlocksProps.children, /*#__PURE__*/_jsx(GroupPlaceHolder, {
|
|
146
148
|
name: name,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useDispatch","useSelect","InnerBlocks","useBlockProps","InspectorControls","useInnerBlocksProps","store","blockEditorStore","
|
|
1
|
+
{"version":3,"names":["useDispatch","useSelect","InnerBlocks","useBlockProps","InspectorControls","useInnerBlocksProps","store","blockEditorStore","privateApis","blockEditorPrivateApis","useRef","__","View","GroupPlaceHolder","useShouldShowPlaceHolder","unlock","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","HTMLElementControl","GroupEditControls","tagName","onSelectTagName","clientId","group","children","onChange","options","label","value","GroupEdit","attributes","name","setAttributes","hasInnerBlocks","themeSupportsLayout","select","getBlock","getSettings","block","innerBlocks","length","supportsLayout","TagName","templateLock","allowedBlocks","layout","type","layoutSupportEnabled","ref","blockProps","showPlaceholder","setShowPlaceholder","usedLayoutType","renderAppender","ButtonBlockAppender","innerBlocksProps","className","dropZoneElement","current","selectBlock","selectVariation","nextVariation","onSelect"],"sources":["@wordpress/block-library/src/group/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tInnerBlocks,\n\tuseBlockProps,\n\tInspectorControls,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useRef } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { View } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport GroupPlaceHolder, { useShouldShowPlaceHolder } from './placeholder';\nimport { unlock } from '../lock-unlock';\n\nconst { HTMLElementControl } = unlock( blockEditorPrivateApis );\n\n/**\n * Render inspector controls for the Group block.\n *\n * @param {Object} props Component props.\n * @param {string} props.tagName The HTML tag name.\n * @param {Function} props.onSelectTagName onChange function for the SelectControl.\n * @param {string} props.clientId The client ID of the current block.\n *\n * @return {JSX.Element} The control group.\n */\nfunction GroupEditControls( { tagName, onSelectTagName, clientId } ) {\n\treturn (\n\t\t<InspectorControls group=\"advanced\">\n\t\t\t<HTMLElementControl\n\t\t\t\ttagName={ tagName }\n\t\t\t\tonChange={ onSelectTagName }\n\t\t\t\tclientId={ clientId }\n\t\t\t\toptions={ [\n\t\t\t\t\t{ label: __( 'Default (<div>)' ), value: 'div' },\n\t\t\t\t\t{ label: '<header>', value: 'header' },\n\t\t\t\t\t{ label: '<main>', value: 'main' },\n\t\t\t\t\t{ label: '<section>', value: 'section' },\n\t\t\t\t\t{ label: '<article>', value: 'article' },\n\t\t\t\t\t{ label: '<aside>', value: 'aside' },\n\t\t\t\t\t{ label: '<footer>', value: 'footer' },\n\t\t\t\t] }\n\t\t\t/>\n\t\t</InspectorControls>\n\t);\n}\n\nfunction GroupEdit( { attributes, name, setAttributes, clientId } ) {\n\tconst { hasInnerBlocks, themeSupportsLayout } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlock, getSettings } = select( blockEditorStore );\n\t\t\tconst block = getBlock( clientId );\n\t\t\treturn {\n\t\t\t\thasInnerBlocks: !! ( block && block.innerBlocks.length ),\n\t\t\t\tthemeSupportsLayout: getSettings()?.supportsLayout,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst {\n\t\ttagName: TagName = 'div',\n\t\ttemplateLock,\n\t\tallowedBlocks,\n\t\tlayout = {},\n\t} = attributes;\n\n\t// Layout settings.\n\tconst { type = 'default' } = layout;\n\tconst layoutSupportEnabled =\n\t\tthemeSupportsLayout || type === 'flex' || type === 'grid';\n\n\t// Hooks.\n\tconst ref = useRef();\n\tconst blockProps = useBlockProps( { ref } );\n\n\tconst [ showPlaceholder, setShowPlaceholder ] = useShouldShowPlaceHolder( {\n\t\tattributes,\n\t\tusedLayoutType: type,\n\t\thasInnerBlocks,\n\t} );\n\n\t// Default to the regular appender being rendered.\n\tlet renderAppender;\n\tif ( showPlaceholder ) {\n\t\t// In the placeholder state, ensure the appender is not rendered.\n\t\t// This is needed because `...innerBlocksProps` is used in the placeholder\n\t\t// state so that blocks can dragged onto the placeholder area\n\t\t// from both the list view and in the editor canvas.\n\t\trenderAppender = false;\n\t} else if ( ! hasInnerBlocks ) {\n\t\t// When there is no placeholder, but the block is also empty,\n\t\t// use the larger button appender.\n\t\trenderAppender = InnerBlocks.ButtonBlockAppender;\n\t}\n\n\tconst innerBlocksProps = useInnerBlocksProps(\n\t\tlayoutSupportEnabled\n\t\t\t? blockProps\n\t\t\t: { className: 'wp-block-group__inner-container' },\n\t\t{\n\t\t\tdropZoneElement: ref.current,\n\t\t\ttemplateLock,\n\t\t\tallowedBlocks,\n\t\t\trenderAppender,\n\t\t}\n\t);\n\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\n\tconst selectVariation = ( nextVariation ) => {\n\t\tsetAttributes( nextVariation.attributes );\n\t\tselectBlock( clientId, -1 );\n\t\tsetShowPlaceholder( false );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<GroupEditControls\n\t\t\t\ttagName={ TagName }\n\t\t\t\tonSelectTagName={ ( value ) =>\n\t\t\t\t\tsetAttributes( { tagName: value } )\n\t\t\t\t}\n\t\t\t\tclientId={ clientId }\n\t\t\t/>\n\t\t\t{ showPlaceholder && (\n\t\t\t\t<View>\n\t\t\t\t\t{ innerBlocksProps.children }\n\t\t\t\t\t<GroupPlaceHolder\n\t\t\t\t\t\tname={ name }\n\t\t\t\t\t\tonSelect={ selectVariation }\n\t\t\t\t\t/>\n\t\t\t\t</View>\n\t\t\t) }\n\t\t\t{ layoutSupportEnabled && ! showPlaceholder && (\n\t\t\t\t<TagName { ...innerBlocksProps } />\n\t\t\t) }\n\t\t\t{ /* Ideally this is not needed but it's there for backward compatibility reason\n\t\t\t\tto keep this div for themes that might rely on its presence */ }\n\t\t\t{ ! layoutSupportEnabled && ! showPlaceholder && (\n\t\t\t\t<TagName { ...blockProps }>\n\t\t\t\t\t<div { ...innerBlocksProps } />\n\t\t\t\t</TagName>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default GroupEdit;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SACCC,WAAW,EACXC,aAAa,EACbC,iBAAiB,EACjBC,mBAAmB,EACnBC,KAAK,IAAIC,gBAAgB,EACzBC,WAAW,IAAIC,sBAAsB,QAC/B,yBAAyB;AAChC,SAASC,MAAM,QAAQ,oBAAoB;AAC3C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,IAAI,QAAQ,uBAAuB;;AAE5C;AACA;AACA;AACA,OAAOC,gBAAgB,IAAIC,wBAAwB,QAAQ,eAAe;AAC1E,SAASC,MAAM,QAAQ,gBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAExC,MAAM;EAAEC;AAAmB,CAAC,GAAGP,MAAM,CAAEN,sBAAuB,CAAC;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASc,iBAAiBA,CAAE;EAAEC,OAAO;EAAEC,eAAe;EAAEC;AAAS,CAAC,EAAG;EACpE,oBACCT,IAAA,CAACb,iBAAiB;IAACuB,KAAK,EAAC,UAAU;IAAAC,QAAA,eAClCX,IAAA,CAACK,kBAAkB;MAClBE,OAAO,EAAGA,OAAS;MACnBK,QAAQ,EAAGJ,eAAiB;MAC5BC,QAAQ,EAAGA,QAAU;MACrBI,OAAO,EAAG,CACT;QAAEC,KAAK,EAAEpB,EAAE,CAAE,iBAAkB,CAAC;QAAEqB,KAAK,EAAE;MAAM,CAAC,EAChD;QAAED,KA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Q,EAAGF;MAAiB,CAC5B,CAAC;IAAA,CACG,CACN,EACCb,oBAAoB,IAAI,CAAEG,eAAe,iBAC1CrC,IAAA,CAAC6B,OAAO;MAAA,GAAMa;IAAgB,CAAI,CAClC,EAGC,CAAER,oBAAoB,IAAI,CAAEG,eAAe,iBAC5CrC,IAAA,CAAC6B,OAAO;MAAA,GAAMO,UAAU;MAAAzB,QAAA,eACvBX,IAAA;QAAA,GAAU0C;MAAgB,CAAI;IAAC,CACvB,CACT;EAAA,CACA,CAAC;AAEL;AAEA,eAAe1B,SAAS","ignoreList":[]}
|
|
@@ -214,12 +214,6 @@ export function ImageEdit({
|
|
|
214
214
|
additionalAttributes = {
|
|
215
215
|
sizeSlug: newSize
|
|
216
216
|
};
|
|
217
|
-
} else {
|
|
218
|
-
// Keep the same url when selecting the same file, so "Resolution"
|
|
219
|
-
// option is not changed.
|
|
220
|
-
additionalAttributes = {
|
|
221
|
-
url
|
|
222
|
-
};
|
|
223
217
|
}
|
|
224
218
|
|
|
225
219
|
// Check if default link setting should be used.
|