@wordpress/block-library 8.22.0 → 8.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 +2 -0
- package/build/block/edit.js +3 -2
- package/build/block/edit.js.map +1 -1
- package/build/button/edit.js +57 -2
- package/build/button/edit.js.map +1 -1
- package/build/code/transforms.js +20 -7
- package/build/code/transforms.js.map +1 -1
- package/build/comments/edit/comments-inspector-controls.js +1 -0
- package/build/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +1 -0
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/details/edit.js +1 -2
- package/build/details/edit.js.map +1 -1
- package/build/form/index.js +1 -1
- package/build/form/index.js.map +1 -1
- package/build/form-submit-button/edit.js +2 -1
- package/build/form-submit-button/edit.js.map +1 -1
- package/build/gallery/gap-styles.js +12 -7
- package/build/gallery/gap-styles.js.map +1 -1
- package/build/group/edit.js +1 -0
- package/build/group/edit.js.map +1 -1
- package/build/html/transforms.js +7 -2
- package/build/html/transforms.js.map +1 -1
- package/build/image/deprecated.js +8 -0
- package/build/image/deprecated.js.map +1 -1
- package/build/image/view.js +10 -7
- package/build/image/view.js.map +1 -1
- package/build/missing/index.js +1 -1
- package/build/navigation/edit/overlay-menu-preview.js +1 -1
- package/build/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build/navigation/use-template-part-area-label.js +2 -1
- package/build/navigation/use-template-part-area-label.js.map +1 -1
- package/build/navigation-link/edit.js +1 -1
- package/build/navigation-link/edit.js.map +1 -1
- package/build/pattern/edit.js +1 -1
- package/build/pattern/edit.js.map +1 -1
- package/build/post-author/edit.js +0 -1
- package/build/post-author/edit.js.map +1 -1
- package/build/post-featured-image/edit.js +21 -6
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-template/edit.js +2 -8
- package/build/post-template/edit.js.map +1 -1
- package/build/post-template/index.js +1 -1
- package/build/post-terms/edit.js +0 -2
- package/build/post-terms/edit.js.map +1 -1
- package/build/preformatted/transforms.js +1 -4
- package/build/preformatted/transforms.js.map +1 -1
- package/build/query/edit/query-content.js +1 -0
- package/build/query/edit/query-content.js.map +1 -1
- package/build/quote/index.js +6 -0
- package/build/quote/index.js.map +1 -1
- package/build/template-part/edit/advanced-controls.js +1 -0
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/template-part/edit/index.js +3 -7
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/index.js +6 -2
- package/build/template-part/index.js.map +1 -1
- package/build/template-part/variations.js +5 -1
- package/build/template-part/variations.js.map +1 -1
- package/build-module/block/edit.js +3 -2
- package/build-module/block/edit.js.map +1 -1
- package/build-module/button/edit.js +61 -6
- package/build-module/button/edit.js.map +1 -1
- package/build-module/code/transforms.js +20 -7
- package/build-module/code/transforms.js.map +1 -1
- package/build-module/comments/edit/comments-inspector-controls.js +1 -0
- package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +1 -0
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/details/edit.js +1 -2
- package/build-module/details/edit.js.map +1 -1
- package/build-module/form/index.js +1 -1
- package/build-module/form/index.js.map +1 -1
- package/build-module/form-submit-button/edit.js +2 -1
- package/build-module/form-submit-button/edit.js.map +1 -1
- package/build-module/gallery/gap-styles.js +13 -8
- package/build-module/gallery/gap-styles.js.map +1 -1
- package/build-module/group/edit.js +1 -0
- package/build-module/group/edit.js.map +1 -1
- package/build-module/html/transforms.js +7 -2
- package/build-module/html/transforms.js.map +1 -1
- package/build-module/image/deprecated.js +8 -0
- package/build-module/image/deprecated.js.map +1 -1
- package/build-module/image/view.js +10 -7
- package/build-module/image/view.js.map +1 -1
- package/build-module/missing/index.js +1 -1
- package/build-module/navigation/edit/overlay-menu-preview.js +1 -1
- package/build-module/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build-module/navigation/use-template-part-area-label.js +2 -1
- package/build-module/navigation/use-template-part-area-label.js.map +1 -1
- package/build-module/navigation-link/edit.js +2 -2
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/pattern/edit.js +1 -1
- package/build-module/pattern/edit.js.map +1 -1
- package/build-module/post-author/edit.js +0 -1
- package/build-module/post-author/edit.js.map +1 -1
- package/build-module/post-featured-image/edit.js +21 -6
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-template/edit.js +2 -8
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-template/index.js +1 -1
- package/build-module/post-terms/edit.js +0 -2
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/preformatted/transforms.js +1 -4
- package/build-module/preformatted/transforms.js.map +1 -1
- package/build-module/query/edit/query-content.js +1 -0
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/quote/index.js +6 -0
- package/build-module/quote/index.js.map +1 -1
- package/build-module/template-part/edit/advanced-controls.js +1 -0
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/template-part/edit/index.js +5 -9
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/index.js +6 -2
- package/build-module/template-part/index.js.map +1 -1
- package/build-module/template-part/variations.js +5 -1
- package/build-module/template-part/variations.js.map +1 -1
- package/build-style/editor-rtl.css +12 -0
- package/build-style/editor.css +12 -0
- package/build-style/image/editor-rtl.css +3 -0
- package/build-style/image/editor.css +3 -0
- package/build-style/image/style-rtl.css +19 -13
- package/build-style/image/style.css +19 -13
- package/build-style/post-featured-image/editor-rtl.css +9 -0
- package/build-style/post-featured-image/editor.css +9 -0
- package/build-style/quote/style-rtl.css +3 -0
- package/build-style/quote/style.css +3 -0
- package/build-style/read-more/style-rtl.css +2 -2
- package/build-style/read-more/style.css +2 -2
- package/build-style/style-rtl.css +24 -15
- package/build-style/style.css +24 -15
- package/package.json +32 -32
- package/src/block/edit.js +2 -1
- package/src/button/edit.js +70 -4
- package/src/code/transforms.js +14 -8
- package/src/comments/edit/comments-inspector-controls.js +1 -0
- package/src/cover/edit/inspector-controls.js +1 -0
- package/src/details/edit.js +0 -1
- package/src/form/index.js +1 -1
- package/src/form-submit-button/edit.js +1 -0
- package/src/gallery/gap-styles.js +10 -9
- package/src/group/edit.js +1 -0
- package/src/html/transforms.js +5 -2
- package/src/image/deprecated.js +8 -0
- package/src/image/editor.scss +7 -0
- package/src/image/index.php +3 -4
- package/src/image/style.scss +18 -13
- package/src/image/view.js +24 -11
- package/src/missing/block.json +1 -1
- package/src/navigation/edit/overlay-menu-preview.js +1 -1
- package/src/navigation/index.php +37 -402
- package/src/navigation/use-template-part-area-label.js +4 -2
- package/src/navigation-link/edit.js +2 -2
- package/src/navigation-link/index.php +57 -0
- package/src/paragraph/test/__snapshots__/transforms.native.js.snap +6 -0
- package/src/paragraph/test/transforms.native.js +1 -0
- package/src/pattern/edit.js +2 -1
- package/src/pattern/index.php +6 -1
- package/src/post-author/edit.js +0 -1
- package/src/post-featured-image/edit.js +38 -5
- package/src/post-featured-image/editor.scss +19 -0
- package/src/post-template/block.json +0 -1
- package/src/post-template/edit.js +1 -5
- package/src/post-terms/edit.js +0 -2
- package/src/preformatted/transforms.js +1 -4
- package/src/query/edit/query-content.js +1 -0
- package/src/query/index.php +6 -2
- package/src/quote/block.json +6 -0
- package/src/quote/style.scss +4 -0
- package/src/read-more/style.scss +1 -1
- package/src/template-part/edit/advanced-controls.js +1 -0
- package/src/template-part/edit/index.js +7 -14
- package/src/template-part/index.js +4 -3
- package/src/template-part/index.php +4 -4
- package/src/template-part/variations.js +4 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","RichText","useBlockProps","__experimentalGetElementClassName","__experimentalGetBorderClassesAndStyles","getBorderClassesAndStyles","v1","attributes","url","type","source","selector","attribute","alt","default","caption","href","id","align","width","height","save","extraImageProps","image","createElement","src","figureStyle","maxWidth","className","style","isEmpty","Content","tagName","value","v2","v3","linkDestination","classes","v4","title","rel","linkClass","sizeSlug","linkTarget","supports","anchor","newRel","undefined","figure","Fragment","target","v5","color","__experimentalDuotone","text","background","__experimentalBorder","radius","__experimentalDefaultControls","__experimentalStyle","spacing","margin","v6","__experimentalRole","aspectRatio","scale","filter","duotone","__experimentalSkipSerialization","borderProps","Object","keys","length","imageClasses","objectFit","v7","migrate","v8","behaviors","lightbox","enabled","newAttributes","isEligible"],"sources":["@wordpress/block-library/src/image/deprecated.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tRichText,\n\tuseBlockProps,\n\t__experimentalGetElementClassName,\n\t__experimentalGetBorderClassesAndStyles as getBorderClassesAndStyles,\n} from '@wordpress/block-editor';\n\n/**\n * Deprecation for adding the `wp-image-${id}` class to the image block for\n * responsive images.\n *\n * @see https://github.com/WordPress/gutenberg/pull/4898\n */\nconst v1 = {\n\tattributes: {\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'src',\n\t\t},\n\t\talt: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'alt',\n\t\t\tdefault: '',\n\t\t},\n\t\tcaption: {\n\t\t\ttype: 'array',\n\t\t\tsource: 'children',\n\t\t\tselector: 'figcaption',\n\t\t},\n\t\thref: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'a',\n\t\t\tattribute: 'href',\n\t\t},\n\t\tid: {\n\t\t\ttype: 'number',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst { url, alt, caption, align, href, width, height } = attributes;\n\t\tconst extraImageProps = width || height ? { width, height } : {};\n\t\tconst image = <img src={ url } alt={ alt } { ...extraImageProps } />;\n\n\t\tlet figureStyle = {};\n\n\t\tif ( width ) {\n\t\t\tfigureStyle = { width };\n\t\t} else if ( align === 'left' || align === 'right' ) {\n\t\t\tfigureStyle = { maxWidth: '50%' };\n\t\t}\n\n\t\treturn (\n\t\t\t<figure\n\t\t\t\tclassName={ align ? `align${ align }` : null }\n\t\t\t\tstyle={ figureStyle }\n\t\t\t>\n\t\t\t\t{ href ? <a href={ href }>{ image }</a> : image }\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content tagName=\"figcaption\" value={ caption } />\n\t\t\t\t) }\n\t\t\t</figure>\n\t\t);\n\t},\n};\n\n/**\n * Deprecation for adding the `is-resized` class to the image block to fix\n * captions on resized images.\n *\n * @see https://github.com/WordPress/gutenberg/pull/6496\n */\nconst v2 = {\n\tattributes: {\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'src',\n\t\t},\n\t\talt: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'alt',\n\t\t\tdefault: '',\n\t\t},\n\t\tcaption: {\n\t\t\ttype: 'array',\n\t\t\tsource: 'children',\n\t\t\tselector: 'figcaption',\n\t\t},\n\t\thref: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'a',\n\t\t\tattribute: 'href',\n\t\t},\n\t\tid: {\n\t\t\ttype: 'number',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst { url, alt, caption, align, href, width, height, id } =\n\t\t\tattributes;\n\n\t\tconst image = (\n\t\t\t<img\n\t\t\t\tsrc={ url }\n\t\t\t\talt={ alt }\n\t\t\t\tclassName={ id ? `wp-image-${ id }` : null }\n\t\t\t\twidth={ width }\n\t\t\t\theight={ height }\n\t\t\t/>\n\t\t);\n\n\t\treturn (\n\t\t\t<figure className={ align ? `align${ align }` : null }>\n\t\t\t\t{ href ? <a href={ href }>{ image }</a> : image }\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content tagName=\"figcaption\" value={ caption } />\n\t\t\t\t) }\n\t\t\t</figure>\n\t\t);\n\t},\n};\n\n/**\n * Deprecation for image floats including a wrapping div.\n *\n * @see https://github.com/WordPress/gutenberg/pull/7721\n */\nconst v3 = {\n\tattributes: {\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'src',\n\t\t},\n\t\talt: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'alt',\n\t\t\tdefault: '',\n\t\t},\n\t\tcaption: {\n\t\t\ttype: 'array',\n\t\t\tsource: 'children',\n\t\t\tselector: 'figcaption',\n\t\t},\n\t\thref: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'href',\n\t\t},\n\t\tid: {\n\t\t\ttype: 'number',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t},\n\t\tlinkDestination: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'none',\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst { url, alt, caption, align, href, width, height, id } =\n\t\t\tattributes;\n\n\t\tconst classes = classnames( {\n\t\t\t[ `align${ align }` ]: align,\n\t\t\t'is-resized': width || height,\n\t\t} );\n\n\t\tconst image = (\n\t\t\t<img\n\t\t\t\tsrc={ url }\n\t\t\t\talt={ alt }\n\t\t\t\tclassName={ id ? `wp-image-${ id }` : null }\n\t\t\t\twidth={ width }\n\t\t\t\theight={ height }\n\t\t\t/>\n\t\t);\n\n\t\treturn (\n\t\t\t<figure className={ classes }>\n\t\t\t\t{ href ? <a href={ href }>{ image }</a> : image }\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content tagName=\"figcaption\" value={ caption } />\n\t\t\t\t) }\n\t\t\t</figure>\n\t\t);\n\t},\n};\n\n/**\n * Deprecation for removing the outer div wrapper around aligned images.\n *\n * @see https://github.com/WordPress/gutenberg/pull/38657\n */\nconst v4 = {\n\tattributes: {\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'src',\n\t\t},\n\t\talt: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'alt',\n\t\t\tdefault: '',\n\t\t},\n\t\tcaption: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'figcaption',\n\t\t},\n\t\ttitle: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'title',\n\t\t},\n\t\thref: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'href',\n\t\t},\n\t\trel: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'rel',\n\t\t},\n\t\tlinkClass: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'class',\n\t\t},\n\t\tid: {\n\t\t\ttype: 'number',\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t},\n\t\tsizeSlug: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlinkDestination: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlinkTarget: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'target',\n\t\t},\n\t},\n\tsupports: {\n\t\tanchor: true,\n\t},\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\turl,\n\t\t\talt,\n\t\t\tcaption,\n\t\t\talign,\n\t\t\thref,\n\t\t\trel,\n\t\t\tlinkClass,\n\t\t\twidth,\n\t\t\theight,\n\t\t\tid,\n\t\t\tlinkTarget,\n\t\t\tsizeSlug,\n\t\t\ttitle,\n\t\t} = attributes;\n\n\t\tconst newRel = ! rel ? undefined : rel;\n\n\t\tconst classes = classnames( {\n\t\t\t[ `align${ align }` ]: align,\n\t\t\t[ `size-${ sizeSlug }` ]: sizeSlug,\n\t\t\t'is-resized': width || height,\n\t\t} );\n\n\t\tconst image = (\n\t\t\t<img\n\t\t\t\tsrc={ url }\n\t\t\t\talt={ alt }\n\t\t\t\tclassName={ id ? `wp-image-${ id }` : null }\n\t\t\t\twidth={ width }\n\t\t\t\theight={ height }\n\t\t\t\ttitle={ title }\n\t\t\t/>\n\t\t);\n\n\t\tconst figure = (\n\t\t\t<>\n\t\t\t\t{ href ? (\n\t\t\t\t\t<a\n\t\t\t\t\t\tclassName={ linkClass }\n\t\t\t\t\t\thref={ href }\n\t\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\t\trel={ newRel }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ image }\n\t\t\t\t\t</a>\n\t\t\t\t) : (\n\t\t\t\t\timage\n\t\t\t\t) }\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content tagName=\"figcaption\" value={ caption } />\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\n\t\tif ( 'left' === align || 'right' === align || 'center' === align ) {\n\t\t\treturn (\n\t\t\t\t<div { ...useBlockProps.save() }>\n\t\t\t\t\t<figure className={ classes }>{ figure }</figure>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<figure { ...useBlockProps.save( { className: classes } ) }>\n\t\t\t\t{ figure }\n\t\t\t</figure>\n\t\t);\n\t},\n};\n\n/**\n * Deprecation for moving existing border radius styles onto the inner img\n * element where new border block support styles must be applied.\n * It will also add a new `.has-custom-border` class for existing blocks\n * with border radii set. This class is required to improve caption position\n * and styling when an image within a gallery has a custom border or\n * rounded corners.\n *\n * @see https://github.com/WordPress/gutenberg/pull/31366\n */\nconst v5 = {\n\tattributes: {\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'src',\n\t\t},\n\t\talt: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'alt',\n\t\t\tdefault: '',\n\t\t},\n\t\tcaption: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'figcaption',\n\t\t},\n\t\ttitle: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'title',\n\t\t},\n\t\thref: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'href',\n\t\t},\n\t\trel: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'rel',\n\t\t},\n\t\tlinkClass: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'class',\n\t\t},\n\t\tid: {\n\t\t\ttype: 'number',\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t},\n\t\tsizeSlug: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlinkDestination: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlinkTarget: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'target',\n\t\t},\n\t},\n\tsupports: {\n\t\tanchor: true,\n\t\tcolor: {\n\t\t\t__experimentalDuotone: 'img',\n\t\t\ttext: false,\n\t\t\tbackground: false,\n\t\t},\n\t\t__experimentalBorder: {\n\t\t\tradius: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tradius: true,\n\t\t\t},\n\t\t},\n\t\t__experimentalStyle: {\n\t\t\tspacing: {\n\t\t\t\tmargin: '0 0 1em 0',\n\t\t\t},\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\turl,\n\t\t\talt,\n\t\t\tcaption,\n\t\t\talign,\n\t\t\thref,\n\t\t\trel,\n\t\t\tlinkClass,\n\t\t\twidth,\n\t\t\theight,\n\t\t\tid,\n\t\t\tlinkTarget,\n\t\t\tsizeSlug,\n\t\t\ttitle,\n\t\t} = attributes;\n\n\t\tconst newRel = ! rel ? undefined : rel;\n\n\t\tconst classes = classnames( {\n\t\t\t[ `align${ align }` ]: align,\n\t\t\t[ `size-${ sizeSlug }` ]: sizeSlug,\n\t\t\t'is-resized': width || height,\n\t\t} );\n\n\t\tconst image = (\n\t\t\t<img\n\t\t\t\tsrc={ url }\n\t\t\t\talt={ alt }\n\t\t\t\tclassName={ id ? `wp-image-${ id }` : null }\n\t\t\t\twidth={ width }\n\t\t\t\theight={ height }\n\t\t\t\ttitle={ title }\n\t\t\t/>\n\t\t);\n\n\t\tconst figure = (\n\t\t\t<>\n\t\t\t\t{ href ? (\n\t\t\t\t\t<a\n\t\t\t\t\t\tclassName={ linkClass }\n\t\t\t\t\t\thref={ href }\n\t\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\t\trel={ newRel }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ image }\n\t\t\t\t\t</a>\n\t\t\t\t) : (\n\t\t\t\t\timage\n\t\t\t\t) }\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content tagName=\"figcaption\" value={ caption } />\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\n\t\treturn (\n\t\t\t<figure { ...useBlockProps.save( { className: classes } ) }>\n\t\t\t\t{ figure }\n\t\t\t</figure>\n\t\t);\n\t},\n};\n\n/**\n * Deprecation for adding width and height as style rules on the inner img.\n *\n * @see https://github.com/WordPress/gutenberg/pull/31366\n */\nconst v6 = {\n\tattributes: {\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'src',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\talt: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'alt',\n\t\t\tdefault: '',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\tcaption: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'figcaption',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\ttitle: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'title',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\thref: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'href',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\trel: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'rel',\n\t\t},\n\t\tlinkClass: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'class',\n\t\t},\n\t\tid: {\n\t\t\ttype: 'number',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t},\n\t\taspectRatio: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tscale: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tsizeSlug: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlinkDestination: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlinkTarget: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'target',\n\t\t},\n\t},\n\tsupports: {\n\t\tanchor: true,\n\t\tcolor: {\n\t\t\ttext: false,\n\t\t\tbackground: false,\n\t\t},\n\t\tfilter: {\n\t\t\tduotone: true,\n\t\t},\n\t\t__experimentalBorder: {\n\t\t\tcolor: true,\n\t\t\tradius: true,\n\t\t\twidth: true,\n\t\t\t__experimentalSkipSerialization: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tcolor: true,\n\t\t\t\tradius: true,\n\t\t\t\twidth: true,\n\t\t\t},\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\turl,\n\t\t\talt,\n\t\t\tcaption,\n\t\t\talign,\n\t\t\thref,\n\t\t\trel,\n\t\t\tlinkClass,\n\t\t\twidth,\n\t\t\theight,\n\t\t\taspectRatio,\n\t\t\tscale,\n\t\t\tid,\n\t\t\tlinkTarget,\n\t\t\tsizeSlug,\n\t\t\ttitle,\n\t\t} = attributes;\n\n\t\tconst newRel = ! rel ? undefined : rel;\n\t\tconst borderProps = getBorderClassesAndStyles( attributes );\n\n\t\tconst classes = classnames( {\n\t\t\t[ `align${ align }` ]: align,\n\t\t\t[ `size-${ sizeSlug }` ]: sizeSlug,\n\t\t\t'is-resized': width || height,\n\t\t\t'has-custom-border':\n\t\t\t\t!! borderProps.className ||\n\t\t\t\t( borderProps.style &&\n\t\t\t\t\tObject.keys( borderProps.style ).length > 0 ),\n\t\t} );\n\n\t\tconst imageClasses = classnames( borderProps.className, {\n\t\t\t[ `wp-image-${ id }` ]: !! id,\n\t\t} );\n\n\t\tconst image = (\n\t\t\t<img\n\t\t\t\tsrc={ url }\n\t\t\t\talt={ alt }\n\t\t\t\tclassName={ imageClasses || undefined }\n\t\t\t\tstyle={ {\n\t\t\t\t\t...borderProps.style,\n\t\t\t\t\taspectRatio,\n\t\t\t\t\tobjectFit: scale,\n\t\t\t\t} }\n\t\t\t\twidth={ width }\n\t\t\t\theight={ height }\n\t\t\t\ttitle={ title }\n\t\t\t/>\n\t\t);\n\n\t\tconst figure = (\n\t\t\t<>\n\t\t\t\t{ href ? (\n\t\t\t\t\t<a\n\t\t\t\t\t\tclassName={ linkClass }\n\t\t\t\t\t\thref={ href }\n\t\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\t\trel={ newRel }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ image }\n\t\t\t\t\t</a>\n\t\t\t\t) : (\n\t\t\t\t\timage\n\t\t\t\t) }\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\tclassName={ __experimentalGetElementClassName(\n\t\t\t\t\t\t\t'caption'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\ttagName=\"figcaption\"\n\t\t\t\t\t\tvalue={ caption }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\n\t\treturn (\n\t\t\t<figure { ...useBlockProps.save( { className: classes } ) }>\n\t\t\t\t{ figure }\n\t\t\t</figure>\n\t\t);\n\t},\n};\n\n/**\n * Deprecation for converting to string width and height block attributes and\n * removing the width and height img element attributes which are not needed\n * as they get added by the TODO hook.\n *\n * @see https://github.com/WordPress/gutenberg/pull/53274\n */\nconst v7 = {\n\tattributes: {\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'src',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\talt: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'alt',\n\t\t\tdefault: '',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\tcaption: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'figcaption',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\ttitle: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'title',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\thref: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'href',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\trel: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'rel',\n\t\t},\n\t\tlinkClass: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'class',\n\t\t},\n\t\tid: {\n\t\t\ttype: 'number',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t},\n\t\taspectRatio: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tscale: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tsizeSlug: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlinkDestination: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlinkTarget: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'target',\n\t\t},\n\t},\n\tsupports: {\n\t\tanchor: true,\n\t\tcolor: {\n\t\t\ttext: false,\n\t\t\tbackground: false,\n\t\t},\n\t\tfilter: {\n\t\t\tduotone: true,\n\t\t},\n\t\t__experimentalBorder: {\n\t\t\tcolor: true,\n\t\t\tradius: true,\n\t\t\twidth: true,\n\t\t\t__experimentalSkipSerialization: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tcolor: true,\n\t\t\t\tradius: true,\n\t\t\t\twidth: true,\n\t\t\t},\n\t\t},\n\t},\n\tmigrate( { width, height, ...attributes } ) {\n\t\treturn {\n\t\t\t...attributes,\n\t\t\twidth: `${ width }px`,\n\t\t\theight: `${ height }px`,\n\t\t};\n\t},\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\turl,\n\t\t\talt,\n\t\t\tcaption,\n\t\t\talign,\n\t\t\thref,\n\t\t\trel,\n\t\t\tlinkClass,\n\t\t\twidth,\n\t\t\theight,\n\t\t\taspectRatio,\n\t\t\tscale,\n\t\t\tid,\n\t\t\tlinkTarget,\n\t\t\tsizeSlug,\n\t\t\ttitle,\n\t\t} = attributes;\n\n\t\tconst newRel = ! rel ? undefined : rel;\n\t\tconst borderProps = getBorderClassesAndStyles( attributes );\n\n\t\tconst classes = classnames( {\n\t\t\t[ `align${ align }` ]: align,\n\t\t\t[ `size-${ sizeSlug }` ]: sizeSlug,\n\t\t\t'is-resized': width || height,\n\t\t\t'has-custom-border':\n\t\t\t\t!! borderProps.className ||\n\t\t\t\t( borderProps.style &&\n\t\t\t\t\tObject.keys( borderProps.style ).length > 0 ),\n\t\t} );\n\n\t\tconst imageClasses = classnames( borderProps.className, {\n\t\t\t[ `wp-image-${ id }` ]: !! id,\n\t\t} );\n\n\t\tconst image = (\n\t\t\t<img\n\t\t\t\tsrc={ url }\n\t\t\t\talt={ alt }\n\t\t\t\tclassName={ imageClasses || undefined }\n\t\t\t\tstyle={ {\n\t\t\t\t\t...borderProps.style,\n\t\t\t\t\taspectRatio,\n\t\t\t\t\tobjectFit: scale,\n\t\t\t\t\twidth,\n\t\t\t\t\theight,\n\t\t\t\t} }\n\t\t\t\twidth={ width }\n\t\t\t\theight={ height }\n\t\t\t\ttitle={ title }\n\t\t\t/>\n\t\t);\n\n\t\tconst figure = (\n\t\t\t<>\n\t\t\t\t{ href ? (\n\t\t\t\t\t<a\n\t\t\t\t\t\tclassName={ linkClass }\n\t\t\t\t\t\thref={ href }\n\t\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\t\trel={ newRel }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ image }\n\t\t\t\t\t</a>\n\t\t\t\t) : (\n\t\t\t\t\timage\n\t\t\t\t) }\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\tclassName={ __experimentalGetElementClassName(\n\t\t\t\t\t\t\t'caption'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\ttagName=\"figcaption\"\n\t\t\t\t\t\tvalue={ caption }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\n\t\treturn (\n\t\t\t<figure { ...useBlockProps.save( { className: classes } ) }>\n\t\t\t\t{ figure }\n\t\t\t</figure>\n\t\t);\n\t},\n};\n\nconst v8 = {\n\tattributes: {\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tbehaviors: {\n\t\t\ttype: 'object',\n\t\t},\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'src',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\talt: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'alt',\n\t\t\tdefault: '',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\tcaption: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'figcaption',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\ttitle: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'title',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\thref: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'href',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\trel: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'rel',\n\t\t},\n\t\tlinkClass: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'class',\n\t\t},\n\t\tid: {\n\t\t\ttype: 'number',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'string',\n\t\t},\n\t\theight: {\n\t\t\ttype: 'string',\n\t\t},\n\t\taspectRatio: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tscale: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tsizeSlug: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlinkDestination: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlinkTarget: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'target',\n\t\t},\n\t},\n\tsupports: {\n\t\tanchor: true,\n\t\tcolor: {\n\t\t\ttext: false,\n\t\t\tbackground: false,\n\t\t},\n\t\tfilter: {\n\t\t\tduotone: true,\n\t\t},\n\t\t__experimentalBorder: {\n\t\t\tcolor: true,\n\t\t\tradius: true,\n\t\t\twidth: true,\n\t\t\t__experimentalSkipSerialization: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tcolor: true,\n\t\t\t\tradius: true,\n\t\t\t\twidth: true,\n\t\t\t},\n\t\t},\n\t},\n\tmigrate( { width, height, ...attributes } ) {\n\t\tconst {\n\t\t\tbehaviors: {\n\t\t\t\tlightbox: { enabled },\n\t\t\t},\n\t\t} = attributes;\n\t\tconst newAttributes = {\n\t\t\t...attributes,\n\t\t\tlightbox: {\n\t\t\t\tenabled,\n\t\t\t},\n\t\t};\n\t\tdelete newAttributes.behaviors;\n\t\treturn newAttributes;\n\t},\n\tisEligible( attributes ) {\n\t\treturn !! attributes.behaviors;\n\t},\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\turl,\n\t\t\talt,\n\t\t\tcaption,\n\t\t\talign,\n\t\t\thref,\n\t\t\trel,\n\t\t\tlinkClass,\n\t\t\twidth,\n\t\t\theight,\n\t\t\taspectRatio,\n\t\t\tscale,\n\t\t\tid,\n\t\t\tlinkTarget,\n\t\t\tsizeSlug,\n\t\t\ttitle,\n\t\t} = attributes;\n\n\t\tconst newRel = ! rel ? undefined : rel;\n\t\tconst borderProps = getBorderClassesAndStyles( attributes );\n\n\t\tconst classes = classnames( {\n\t\t\t[ `align${ align }` ]: align,\n\t\t\t[ `size-${ sizeSlug }` ]: sizeSlug,\n\t\t\t'is-resized': width || height,\n\t\t\t'has-custom-border':\n\t\t\t\t!! borderProps.className ||\n\t\t\t\t( borderProps.style &&\n\t\t\t\t\tObject.keys( borderProps.style ).length > 0 ),\n\t\t} );\n\n\t\tconst imageClasses = classnames( borderProps.className, {\n\t\t\t[ `wp-image-${ id }` ]: !! id,\n\t\t} );\n\n\t\tconst image = (\n\t\t\t<img\n\t\t\t\tsrc={ url }\n\t\t\t\talt={ alt }\n\t\t\t\tclassName={ imageClasses || undefined }\n\t\t\t\tstyle={ {\n\t\t\t\t\t...borderProps.style,\n\t\t\t\t\taspectRatio,\n\t\t\t\t\tobjectFit: scale,\n\t\t\t\t\twidth,\n\t\t\t\t\theight,\n\t\t\t\t} }\n\t\t\t\ttitle={ title }\n\t\t\t/>\n\t\t);\n\n\t\tconst figure = (\n\t\t\t<>\n\t\t\t\t{ href ? (\n\t\t\t\t\t<a\n\t\t\t\t\t\tclassName={ linkClass }\n\t\t\t\t\t\thref={ href }\n\t\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\t\trel={ newRel }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ image }\n\t\t\t\t\t</a>\n\t\t\t\t) : (\n\t\t\t\t\timage\n\t\t\t\t) }\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\tclassName={ __experimentalGetElementClassName(\n\t\t\t\t\t\t\t'caption'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\ttagName=\"figcaption\"\n\t\t\t\t\t\tvalue={ caption }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\n\t\treturn (\n\t\t\t<figure { ...useBlockProps.save( { className: classes } ) }>\n\t\t\t\t{ figure }\n\t\t\t</figure>\n\t\t);\n\t},\n};\n\nexport default [ v8, v7, v6, v5, v4, v3, v2, v1 ];\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,QAAQ,EACRC,aAAa,EACbC,iCAAiC,EACjCC,uCAAuC,IAAIC,yBAAyB,QAC9D,yBAAyB;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,EAAE,GAAG;EACVC,UAAU,EAAE;IACXC,GAAG,EAAE;MACJC,IAAI,EAAE,QAAQ;MACdC,MAAM,EAAE,WAAW;MACnBC,QAAQ,EAAE,KAAK;MACfC,SAAS,EAAE;IACZ,CAAC;IACDC,GAAG,EAAE;MACJJ,IAAI,EAAE,QAAQ;MACdC,MAAM,EAAE,WAAW;MACnBC,QAAQ,EAAE,KAAK;MACfC,SAAS,EAAE,KAAK;MAChBE,OAAO,EAAE;IACV,CAAC;IACDC,OAAO,EAAE;MACRN,IAAI,EAAE,OAAO;MACbC,MAAM,EAAE,UAAU;MAClBC,QAAQ,EAAE;IACX,CAAC;IACDK,IAAI,EAAE;MACLP,IAAI,EAAE,QAAQ;MACdC,MAAM,EAAE,WAAW;MACnBC,QAAQ,EAAE,GAAG;MACbC,SAAS,EAAE;IACZ,CAAC;IACDK,EAAE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,SAAS,EAAES;MAAQ,CAAE;IAAC,GACtDW,MACK,CAAC;EAEX;AACD,CAAC;AAED,eAAe,CAAE6B,EAAE,EAAEF,EAAE,EAAEb,EAAE,EAAEX,EAAE,EAAEb,EAAE,EAAEH,EAAE,EAAED,EAAE,EAAE5B,EAAE,CAAE"}
|
|
1
|
+
{"version":3,"names":["classnames","RichText","useBlockProps","__experimentalGetElementClassName","__experimentalGetBorderClassesAndStyles","getBorderClassesAndStyles","v1","attributes","url","type","source","selector","attribute","alt","default","caption","href","id","align","width","height","save","extraImageProps","image","createElement","src","figureStyle","maxWidth","className","style","isEmpty","Content","tagName","value","v2","v3","linkDestination","classes","v4","title","rel","linkClass","sizeSlug","linkTarget","supports","anchor","newRel","undefined","figure","Fragment","target","v5","color","__experimentalDuotone","text","background","__experimentalBorder","radius","__experimentalDefaultControls","__experimentalStyle","spacing","margin","v6","__experimentalRole","aspectRatio","scale","filter","duotone","__experimentalSkipSerialization","borderProps","Object","keys","length","imageClasses","objectFit","v7","migrate","v8","behaviors","lightbox","enabled","newAttributes","isEligible"],"sources":["@wordpress/block-library/src/image/deprecated.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tRichText,\n\tuseBlockProps,\n\t__experimentalGetElementClassName,\n\t__experimentalGetBorderClassesAndStyles as getBorderClassesAndStyles,\n} from '@wordpress/block-editor';\n\n/**\n * Deprecation for adding the `wp-image-${id}` class to the image block for\n * responsive images.\n *\n * @see https://github.com/WordPress/gutenberg/pull/4898\n */\nconst v1 = {\n\tattributes: {\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'src',\n\t\t},\n\t\talt: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'alt',\n\t\t\tdefault: '',\n\t\t},\n\t\tcaption: {\n\t\t\ttype: 'array',\n\t\t\tsource: 'children',\n\t\t\tselector: 'figcaption',\n\t\t},\n\t\thref: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'a',\n\t\t\tattribute: 'href',\n\t\t},\n\t\tid: {\n\t\t\ttype: 'number',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst { url, alt, caption, align, href, width, height } = attributes;\n\t\tconst extraImageProps = width || height ? { width, height } : {};\n\t\tconst image = <img src={ url } alt={ alt } { ...extraImageProps } />;\n\n\t\tlet figureStyle = {};\n\n\t\tif ( width ) {\n\t\t\tfigureStyle = { width };\n\t\t} else if ( align === 'left' || align === 'right' ) {\n\t\t\tfigureStyle = { maxWidth: '50%' };\n\t\t}\n\n\t\treturn (\n\t\t\t<figure\n\t\t\t\tclassName={ align ? `align${ align }` : null }\n\t\t\t\tstyle={ figureStyle }\n\t\t\t>\n\t\t\t\t{ href ? <a href={ href }>{ image }</a> : image }\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content tagName=\"figcaption\" value={ caption } />\n\t\t\t\t) }\n\t\t\t</figure>\n\t\t);\n\t},\n};\n\n/**\n * Deprecation for adding the `is-resized` class to the image block to fix\n * captions on resized images.\n *\n * @see https://github.com/WordPress/gutenberg/pull/6496\n */\nconst v2 = {\n\tattributes: {\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'src',\n\t\t},\n\t\talt: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'alt',\n\t\t\tdefault: '',\n\t\t},\n\t\tcaption: {\n\t\t\ttype: 'array',\n\t\t\tsource: 'children',\n\t\t\tselector: 'figcaption',\n\t\t},\n\t\thref: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'a',\n\t\t\tattribute: 'href',\n\t\t},\n\t\tid: {\n\t\t\ttype: 'number',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst { url, alt, caption, align, href, width, height, id } =\n\t\t\tattributes;\n\n\t\tconst image = (\n\t\t\t<img\n\t\t\t\tsrc={ url }\n\t\t\t\talt={ alt }\n\t\t\t\tclassName={ id ? `wp-image-${ id }` : null }\n\t\t\t\twidth={ width }\n\t\t\t\theight={ height }\n\t\t\t/>\n\t\t);\n\n\t\treturn (\n\t\t\t<figure className={ align ? `align${ align }` : null }>\n\t\t\t\t{ href ? <a href={ href }>{ image }</a> : image }\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content tagName=\"figcaption\" value={ caption } />\n\t\t\t\t) }\n\t\t\t</figure>\n\t\t);\n\t},\n};\n\n/**\n * Deprecation for image floats including a wrapping div.\n *\n * @see https://github.com/WordPress/gutenberg/pull/7721\n */\nconst v3 = {\n\tattributes: {\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'src',\n\t\t},\n\t\talt: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'alt',\n\t\t\tdefault: '',\n\t\t},\n\t\tcaption: {\n\t\t\ttype: 'array',\n\t\t\tsource: 'children',\n\t\t\tselector: 'figcaption',\n\t\t},\n\t\thref: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'href',\n\t\t},\n\t\tid: {\n\t\t\ttype: 'number',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t},\n\t\tlinkDestination: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'none',\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst { url, alt, caption, align, href, width, height, id } =\n\t\t\tattributes;\n\n\t\tconst classes = classnames( {\n\t\t\t[ `align${ align }` ]: align,\n\t\t\t'is-resized': width || height,\n\t\t} );\n\n\t\tconst image = (\n\t\t\t<img\n\t\t\t\tsrc={ url }\n\t\t\t\talt={ alt }\n\t\t\t\tclassName={ id ? `wp-image-${ id }` : null }\n\t\t\t\twidth={ width }\n\t\t\t\theight={ height }\n\t\t\t/>\n\t\t);\n\n\t\treturn (\n\t\t\t<figure className={ classes }>\n\t\t\t\t{ href ? <a href={ href }>{ image }</a> : image }\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content tagName=\"figcaption\" value={ caption } />\n\t\t\t\t) }\n\t\t\t</figure>\n\t\t);\n\t},\n};\n\n/**\n * Deprecation for removing the outer div wrapper around aligned images.\n *\n * @see https://github.com/WordPress/gutenberg/pull/38657\n */\nconst v4 = {\n\tattributes: {\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'src',\n\t\t},\n\t\talt: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'alt',\n\t\t\tdefault: '',\n\t\t},\n\t\tcaption: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'figcaption',\n\t\t},\n\t\ttitle: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'title',\n\t\t},\n\t\thref: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'href',\n\t\t},\n\t\trel: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'rel',\n\t\t},\n\t\tlinkClass: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'class',\n\t\t},\n\t\tid: {\n\t\t\ttype: 'number',\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t},\n\t\tsizeSlug: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlinkDestination: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlinkTarget: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'target',\n\t\t},\n\t},\n\tsupports: {\n\t\tanchor: true,\n\t},\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\turl,\n\t\t\talt,\n\t\t\tcaption,\n\t\t\talign,\n\t\t\thref,\n\t\t\trel,\n\t\t\tlinkClass,\n\t\t\twidth,\n\t\t\theight,\n\t\t\tid,\n\t\t\tlinkTarget,\n\t\t\tsizeSlug,\n\t\t\ttitle,\n\t\t} = attributes;\n\n\t\tconst newRel = ! rel ? undefined : rel;\n\n\t\tconst classes = classnames( {\n\t\t\t[ `align${ align }` ]: align,\n\t\t\t[ `size-${ sizeSlug }` ]: sizeSlug,\n\t\t\t'is-resized': width || height,\n\t\t} );\n\n\t\tconst image = (\n\t\t\t<img\n\t\t\t\tsrc={ url }\n\t\t\t\talt={ alt }\n\t\t\t\tclassName={ id ? `wp-image-${ id }` : null }\n\t\t\t\twidth={ width }\n\t\t\t\theight={ height }\n\t\t\t\ttitle={ title }\n\t\t\t/>\n\t\t);\n\n\t\tconst figure = (\n\t\t\t<>\n\t\t\t\t{ href ? (\n\t\t\t\t\t<a\n\t\t\t\t\t\tclassName={ linkClass }\n\t\t\t\t\t\thref={ href }\n\t\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\t\trel={ newRel }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ image }\n\t\t\t\t\t</a>\n\t\t\t\t) : (\n\t\t\t\t\timage\n\t\t\t\t) }\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content tagName=\"figcaption\" value={ caption } />\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\n\t\tif ( 'left' === align || 'right' === align || 'center' === align ) {\n\t\t\treturn (\n\t\t\t\t<div { ...useBlockProps.save() }>\n\t\t\t\t\t<figure className={ classes }>{ figure }</figure>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<figure { ...useBlockProps.save( { className: classes } ) }>\n\t\t\t\t{ figure }\n\t\t\t</figure>\n\t\t);\n\t},\n};\n\n/**\n * Deprecation for moving existing border radius styles onto the inner img\n * element where new border block support styles must be applied.\n * It will also add a new `.has-custom-border` class for existing blocks\n * with border radii set. This class is required to improve caption position\n * and styling when an image within a gallery has a custom border or\n * rounded corners.\n *\n * @see https://github.com/WordPress/gutenberg/pull/31366\n */\nconst v5 = {\n\tattributes: {\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'src',\n\t\t},\n\t\talt: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'alt',\n\t\t\tdefault: '',\n\t\t},\n\t\tcaption: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'figcaption',\n\t\t},\n\t\ttitle: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'title',\n\t\t},\n\t\thref: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'href',\n\t\t},\n\t\trel: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'rel',\n\t\t},\n\t\tlinkClass: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'class',\n\t\t},\n\t\tid: {\n\t\t\ttype: 'number',\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t},\n\t\tsizeSlug: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlinkDestination: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlinkTarget: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'target',\n\t\t},\n\t},\n\tsupports: {\n\t\tanchor: true,\n\t\tcolor: {\n\t\t\t__experimentalDuotone: 'img',\n\t\t\ttext: false,\n\t\t\tbackground: false,\n\t\t},\n\t\t__experimentalBorder: {\n\t\t\tradius: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tradius: true,\n\t\t\t},\n\t\t},\n\t\t__experimentalStyle: {\n\t\t\tspacing: {\n\t\t\t\tmargin: '0 0 1em 0',\n\t\t\t},\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\turl,\n\t\t\talt,\n\t\t\tcaption,\n\t\t\talign,\n\t\t\thref,\n\t\t\trel,\n\t\t\tlinkClass,\n\t\t\twidth,\n\t\t\theight,\n\t\t\tid,\n\t\t\tlinkTarget,\n\t\t\tsizeSlug,\n\t\t\ttitle,\n\t\t} = attributes;\n\n\t\tconst newRel = ! rel ? undefined : rel;\n\n\t\tconst classes = classnames( {\n\t\t\t[ `align${ align }` ]: align,\n\t\t\t[ `size-${ sizeSlug }` ]: sizeSlug,\n\t\t\t'is-resized': width || height,\n\t\t} );\n\n\t\tconst image = (\n\t\t\t<img\n\t\t\t\tsrc={ url }\n\t\t\t\talt={ alt }\n\t\t\t\tclassName={ id ? `wp-image-${ id }` : null }\n\t\t\t\twidth={ width }\n\t\t\t\theight={ height }\n\t\t\t\ttitle={ title }\n\t\t\t/>\n\t\t);\n\n\t\tconst figure = (\n\t\t\t<>\n\t\t\t\t{ href ? (\n\t\t\t\t\t<a\n\t\t\t\t\t\tclassName={ linkClass }\n\t\t\t\t\t\thref={ href }\n\t\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\t\trel={ newRel }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ image }\n\t\t\t\t\t</a>\n\t\t\t\t) : (\n\t\t\t\t\timage\n\t\t\t\t) }\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content tagName=\"figcaption\" value={ caption } />\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\n\t\treturn (\n\t\t\t<figure { ...useBlockProps.save( { className: classes } ) }>\n\t\t\t\t{ figure }\n\t\t\t</figure>\n\t\t);\n\t},\n};\n\n/**\n * Deprecation for adding width and height as style rules on the inner img.\n *\n * @see https://github.com/WordPress/gutenberg/pull/31366\n */\nconst v6 = {\n\tattributes: {\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'src',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\talt: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'alt',\n\t\t\tdefault: '',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\tcaption: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'figcaption',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\ttitle: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'title',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\thref: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'href',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\trel: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'rel',\n\t\t},\n\t\tlinkClass: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'class',\n\t\t},\n\t\tid: {\n\t\t\ttype: 'number',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t},\n\t\taspectRatio: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tscale: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tsizeSlug: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlinkDestination: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlinkTarget: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'target',\n\t\t},\n\t},\n\tsupports: {\n\t\tanchor: true,\n\t\tcolor: {\n\t\t\ttext: false,\n\t\t\tbackground: false,\n\t\t},\n\t\tfilter: {\n\t\t\tduotone: true,\n\t\t},\n\t\t__experimentalBorder: {\n\t\t\tcolor: true,\n\t\t\tradius: true,\n\t\t\twidth: true,\n\t\t\t__experimentalSkipSerialization: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tcolor: true,\n\t\t\t\tradius: true,\n\t\t\t\twidth: true,\n\t\t\t},\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\turl,\n\t\t\talt,\n\t\t\tcaption,\n\t\t\talign,\n\t\t\thref,\n\t\t\trel,\n\t\t\tlinkClass,\n\t\t\twidth,\n\t\t\theight,\n\t\t\taspectRatio,\n\t\t\tscale,\n\t\t\tid,\n\t\t\tlinkTarget,\n\t\t\tsizeSlug,\n\t\t\ttitle,\n\t\t} = attributes;\n\n\t\tconst newRel = ! rel ? undefined : rel;\n\t\tconst borderProps = getBorderClassesAndStyles( attributes );\n\n\t\tconst classes = classnames( {\n\t\t\t[ `align${ align }` ]: align,\n\t\t\t[ `size-${ sizeSlug }` ]: sizeSlug,\n\t\t\t'is-resized': width || height,\n\t\t\t'has-custom-border':\n\t\t\t\t!! borderProps.className ||\n\t\t\t\t( borderProps.style &&\n\t\t\t\t\tObject.keys( borderProps.style ).length > 0 ),\n\t\t} );\n\n\t\tconst imageClasses = classnames( borderProps.className, {\n\t\t\t[ `wp-image-${ id }` ]: !! id,\n\t\t} );\n\n\t\tconst image = (\n\t\t\t<img\n\t\t\t\tsrc={ url }\n\t\t\t\talt={ alt }\n\t\t\t\tclassName={ imageClasses || undefined }\n\t\t\t\tstyle={ {\n\t\t\t\t\t...borderProps.style,\n\t\t\t\t\taspectRatio,\n\t\t\t\t\tobjectFit: scale,\n\t\t\t\t} }\n\t\t\t\twidth={ width }\n\t\t\t\theight={ height }\n\t\t\t\ttitle={ title }\n\t\t\t/>\n\t\t);\n\n\t\tconst figure = (\n\t\t\t<>\n\t\t\t\t{ href ? (\n\t\t\t\t\t<a\n\t\t\t\t\t\tclassName={ linkClass }\n\t\t\t\t\t\thref={ href }\n\t\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\t\trel={ newRel }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ image }\n\t\t\t\t\t</a>\n\t\t\t\t) : (\n\t\t\t\t\timage\n\t\t\t\t) }\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\tclassName={ __experimentalGetElementClassName(\n\t\t\t\t\t\t\t'caption'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\ttagName=\"figcaption\"\n\t\t\t\t\t\tvalue={ caption }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\n\t\treturn (\n\t\t\t<figure { ...useBlockProps.save( { className: classes } ) }>\n\t\t\t\t{ figure }\n\t\t\t</figure>\n\t\t);\n\t},\n};\n\n/**\n * Deprecation for converting to string width and height block attributes and\n * removing the width and height img element attributes which are not needed\n * as they get added by the TODO hook.\n *\n * @see https://github.com/WordPress/gutenberg/pull/53274\n */\nconst v7 = {\n\tattributes: {\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'src',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\talt: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'alt',\n\t\t\tdefault: '',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\tcaption: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'figcaption',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\ttitle: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'title',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\thref: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'href',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\trel: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'rel',\n\t\t},\n\t\tlinkClass: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'class',\n\t\t},\n\t\tid: {\n\t\t\ttype: 'number',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'number',\n\t\t},\n\t\theight: {\n\t\t\ttype: 'number',\n\t\t},\n\t\taspectRatio: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tscale: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tsizeSlug: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlinkDestination: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlinkTarget: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'target',\n\t\t},\n\t},\n\tsupports: {\n\t\tanchor: true,\n\t\tcolor: {\n\t\t\ttext: false,\n\t\t\tbackground: false,\n\t\t},\n\t\tfilter: {\n\t\t\tduotone: true,\n\t\t},\n\t\t__experimentalBorder: {\n\t\t\tcolor: true,\n\t\t\tradius: true,\n\t\t\twidth: true,\n\t\t\t__experimentalSkipSerialization: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tcolor: true,\n\t\t\t\tradius: true,\n\t\t\t\twidth: true,\n\t\t\t},\n\t\t},\n\t},\n\tmigrate( { width, height, ...attributes } ) {\n\t\treturn {\n\t\t\t...attributes,\n\t\t\twidth: `${ width }px`,\n\t\t\theight: `${ height }px`,\n\t\t};\n\t},\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\turl,\n\t\t\talt,\n\t\t\tcaption,\n\t\t\talign,\n\t\t\thref,\n\t\t\trel,\n\t\t\tlinkClass,\n\t\t\twidth,\n\t\t\theight,\n\t\t\taspectRatio,\n\t\t\tscale,\n\t\t\tid,\n\t\t\tlinkTarget,\n\t\t\tsizeSlug,\n\t\t\ttitle,\n\t\t} = attributes;\n\n\t\tconst newRel = ! rel ? undefined : rel;\n\t\tconst borderProps = getBorderClassesAndStyles( attributes );\n\n\t\tconst classes = classnames( {\n\t\t\t[ `align${ align }` ]: align,\n\t\t\t[ `size-${ sizeSlug }` ]: sizeSlug,\n\t\t\t'is-resized': width || height,\n\t\t\t'has-custom-border':\n\t\t\t\t!! borderProps.className ||\n\t\t\t\t( borderProps.style &&\n\t\t\t\t\tObject.keys( borderProps.style ).length > 0 ),\n\t\t} );\n\n\t\tconst imageClasses = classnames( borderProps.className, {\n\t\t\t[ `wp-image-${ id }` ]: !! id,\n\t\t} );\n\n\t\tconst image = (\n\t\t\t<img\n\t\t\t\tsrc={ url }\n\t\t\t\talt={ alt }\n\t\t\t\tclassName={ imageClasses || undefined }\n\t\t\t\tstyle={ {\n\t\t\t\t\t...borderProps.style,\n\t\t\t\t\taspectRatio,\n\t\t\t\t\tobjectFit: scale,\n\t\t\t\t\twidth,\n\t\t\t\t\theight,\n\t\t\t\t} }\n\t\t\t\twidth={ width }\n\t\t\t\theight={ height }\n\t\t\t\ttitle={ title }\n\t\t\t/>\n\t\t);\n\n\t\tconst figure = (\n\t\t\t<>\n\t\t\t\t{ href ? (\n\t\t\t\t\t<a\n\t\t\t\t\t\tclassName={ linkClass }\n\t\t\t\t\t\thref={ href }\n\t\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\t\trel={ newRel }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ image }\n\t\t\t\t\t</a>\n\t\t\t\t) : (\n\t\t\t\t\timage\n\t\t\t\t) }\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\tclassName={ __experimentalGetElementClassName(\n\t\t\t\t\t\t\t'caption'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\ttagName=\"figcaption\"\n\t\t\t\t\t\tvalue={ caption }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\n\t\treturn (\n\t\t\t<figure { ...useBlockProps.save( { className: classes } ) }>\n\t\t\t\t{ figure }\n\t\t\t</figure>\n\t\t);\n\t},\n};\n\nconst v8 = {\n\tattributes: {\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tbehaviors: {\n\t\t\ttype: 'object',\n\t\t},\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'src',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\talt: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'alt',\n\t\t\tdefault: '',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\tcaption: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'figcaption',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\ttitle: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'img',\n\t\t\tattribute: 'title',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\thref: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'href',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\trel: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'rel',\n\t\t},\n\t\tlinkClass: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'class',\n\t\t},\n\t\tid: {\n\t\t\ttype: 'number',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\twidth: {\n\t\t\ttype: 'string',\n\t\t},\n\t\theight: {\n\t\t\ttype: 'string',\n\t\t},\n\t\taspectRatio: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tscale: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tsizeSlug: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlinkDestination: {\n\t\t\ttype: 'string',\n\t\t},\n\t\tlinkTarget: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure > a',\n\t\t\tattribute: 'target',\n\t\t},\n\t},\n\tsupports: {\n\t\tanchor: true,\n\t\tcolor: {\n\t\t\ttext: false,\n\t\t\tbackground: false,\n\t\t},\n\t\tfilter: {\n\t\t\tduotone: true,\n\t\t},\n\t\t__experimentalBorder: {\n\t\t\tcolor: true,\n\t\t\tradius: true,\n\t\t\twidth: true,\n\t\t\t__experimentalSkipSerialization: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tcolor: true,\n\t\t\t\tradius: true,\n\t\t\t\twidth: true,\n\t\t\t},\n\t\t},\n\t},\n\tmigrate( { width, height, ...attributes } ) {\n\t\t// We need to perform a check here because in cases\n\t\t// where attributes are added dynamically to blocks,\n\t\t// block invalidation overrides the isEligible() method\n\t\t// and forces the migration to run, so it's not guaranteed\n\t\t// that `behaviors` or `behaviors.lightbox` will be defined.\n\t\tif ( ! attributes.behaviors?.lightbox ) {\n\t\t\treturn attributes;\n\t\t}\n\t\tconst {\n\t\t\tbehaviors: {\n\t\t\t\tlightbox: { enabled },\n\t\t\t},\n\t\t} = attributes;\n\t\tconst newAttributes = {\n\t\t\t...attributes,\n\t\t\tlightbox: {\n\t\t\t\tenabled,\n\t\t\t},\n\t\t};\n\t\tdelete newAttributes.behaviors;\n\t\treturn newAttributes;\n\t},\n\tisEligible( attributes ) {\n\t\treturn !! attributes.behaviors;\n\t},\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\turl,\n\t\t\talt,\n\t\t\tcaption,\n\t\t\talign,\n\t\t\thref,\n\t\t\trel,\n\t\t\tlinkClass,\n\t\t\twidth,\n\t\t\theight,\n\t\t\taspectRatio,\n\t\t\tscale,\n\t\t\tid,\n\t\t\tlinkTarget,\n\t\t\tsizeSlug,\n\t\t\ttitle,\n\t\t} = attributes;\n\n\t\tconst newRel = ! rel ? undefined : rel;\n\t\tconst borderProps = getBorderClassesAndStyles( attributes );\n\n\t\tconst classes = classnames( {\n\t\t\t[ `align${ align }` ]: align,\n\t\t\t[ `size-${ sizeSlug }` ]: sizeSlug,\n\t\t\t'is-resized': width || height,\n\t\t\t'has-custom-border':\n\t\t\t\t!! borderProps.className ||\n\t\t\t\t( borderProps.style &&\n\t\t\t\t\tObject.keys( borderProps.style ).length > 0 ),\n\t\t} );\n\n\t\tconst imageClasses = classnames( borderProps.className, {\n\t\t\t[ `wp-image-${ id }` ]: !! id,\n\t\t} );\n\n\t\tconst image = (\n\t\t\t<img\n\t\t\t\tsrc={ url }\n\t\t\t\talt={ alt }\n\t\t\t\tclassName={ imageClasses || undefined }\n\t\t\t\tstyle={ {\n\t\t\t\t\t...borderProps.style,\n\t\t\t\t\taspectRatio,\n\t\t\t\t\tobjectFit: scale,\n\t\t\t\t\twidth,\n\t\t\t\t\theight,\n\t\t\t\t} }\n\t\t\t\ttitle={ title }\n\t\t\t/>\n\t\t);\n\n\t\tconst figure = (\n\t\t\t<>\n\t\t\t\t{ href ? (\n\t\t\t\t\t<a\n\t\t\t\t\t\tclassName={ linkClass }\n\t\t\t\t\t\thref={ href }\n\t\t\t\t\t\ttarget={ linkTarget }\n\t\t\t\t\t\trel={ newRel }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ image }\n\t\t\t\t\t</a>\n\t\t\t\t) : (\n\t\t\t\t\timage\n\t\t\t\t) }\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\tclassName={ __experimentalGetElementClassName(\n\t\t\t\t\t\t\t'caption'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\ttagName=\"figcaption\"\n\t\t\t\t\t\tvalue={ caption }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\n\t\treturn (\n\t\t\t<figure { ...useBlockProps.save( { className: classes } ) }>\n\t\t\t\t{ figure }\n\t\t\t</figure>\n\t\t);\n\t},\n};\n\nexport default [ v8, v7, v6, v5, v4, v3, v2, v1 ];\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,Q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AEH,MAAMM,KAAK,GACVC,aAAA;MACCC,GAAG,EAAGjB,GAAK;MACXK,GAAG,EAAGA,GAAK;MACXe,SAAS,EAAG6C,YAAY,IAAI1B,SAAW;MACvClB,KAAK,EAAG;QACP,GAAGwC,WAAW,CAACxC,KAAK;QACpBmC,WAAW;QACXU,SAAS,EAAET,KAAK;QAChB9C,KAAK;QACLC;MACD,CAAG;MACHmB,KAAK,EAAGA;IAAO,CACf,CACD;IAED,MAAMS,MAAM,GACXxB,aAAA,CAAAyB,QAAA,QACGjC,IAAI,GACLQ,aAAA;MACCI,SAAS,EAAGa,SAAW;MACvBzB,IAAI,EAAGA,IAAM;MACbkC,MAAM,EAAGP,UAAY;MACrBH,GAAG,EAAGM;IAAQ,GAEZvB,KACA,CAAC,GAEJA,KACA,EACC,CAAEtB,QAAQ,CAAC6B,OAAO,CAAEf,OAAQ,CAAC,IAC9BS,aAAA,CAACvB,QAAQ,CAAC8B,OAAO;MAChBH,SAAS,EAAGzB,iCAAiC,CAC5C,SACD,CAAG;MACH6B,OAAO,EAAC,YAAY;MACpBC,KAAK,EAAGlB;IAAS,CACjB,CAED,CACF;IAED,OACCS,aAAA;MAAA,GAAatB,aAAa,CAACmB,IAAI,CAAE;QAAEO,SAAS,EAAES;MAAQ,CAAE;IAAC,GACtDW,MACK,CAAC;EAEX;AACD,CAAC;AAED,eAAe,CAAE6B,EAAE,EAAEF,EAAE,EAAEb,EAAE,EAAEX,EAAE,EAAEb,EAAE,EAAEH,EAAE,EAAED,EAAE,EAAE5B,EAAE,CAAE"}
|
|
@@ -285,7 +285,9 @@ store({
|
|
|
285
285
|
const caption = figure.querySelector('figcaption');
|
|
286
286
|
if (caption) {
|
|
287
287
|
const captionComputedStyle = window.getComputedStyle(caption);
|
|
288
|
-
|
|
288
|
+
if (!['absolute', 'fixed'].includes(captionComputedStyle.position)) {
|
|
289
|
+
figureHeight = figureHeight - caption.offsetHeight - parseFloat(captionComputedStyle.marginTop) - parseFloat(captionComputedStyle.marginBottom);
|
|
290
|
+
}
|
|
289
291
|
}
|
|
290
292
|
const buttonOffsetTop = figureHeight - offsetHeight;
|
|
291
293
|
const buttonOffsetRight = figureWidth - offsetWidth;
|
|
@@ -302,18 +304,18 @@ store({
|
|
|
302
304
|
// If it reaches the width first, keep
|
|
303
305
|
// the width and compute the height.
|
|
304
306
|
const referenceHeight = offsetWidth / naturalRatio;
|
|
305
|
-
context.core.image.imageButtonTop = (offsetHeight - referenceHeight) / 2 + buttonOffsetTop +
|
|
306
|
-
context.core.image.imageButtonRight = buttonOffsetRight +
|
|
307
|
+
context.core.image.imageButtonTop = (offsetHeight - referenceHeight) / 2 + buttonOffsetTop + 16;
|
|
308
|
+
context.core.image.imageButtonRight = buttonOffsetRight + 16;
|
|
307
309
|
} else {
|
|
308
310
|
// If it reaches the height first, keep
|
|
309
311
|
// the height and compute the width.
|
|
310
312
|
const referenceWidth = offsetHeight * naturalRatio;
|
|
311
|
-
context.core.image.imageButtonTop = buttonOffsetTop +
|
|
312
|
-
context.core.image.imageButtonRight = (offsetWidth - referenceWidth) / 2 + buttonOffsetRight +
|
|
313
|
+
context.core.image.imageButtonTop = buttonOffsetTop + 16;
|
|
314
|
+
context.core.image.imageButtonRight = (offsetWidth - referenceWidth) / 2 + buttonOffsetRight + 16;
|
|
313
315
|
}
|
|
314
316
|
} else {
|
|
315
|
-
context.core.image.imageButtonTop = buttonOffsetTop +
|
|
316
|
-
context.core.image.imageButtonRight = buttonOffsetRight +
|
|
317
|
+
context.core.image.imageButtonTop = buttonOffsetTop + 16;
|
|
318
|
+
context.core.image.imageButtonRight = buttonOffsetRight + 16;
|
|
317
319
|
}
|
|
318
320
|
},
|
|
319
321
|
setStylesOnResize: ({
|
|
@@ -493,6 +495,7 @@ function setStyles(context, ref) {
|
|
|
493
495
|
--wp--lightbox-image-width: ${lightboxImgWidth}px;
|
|
494
496
|
--wp--lightbox-image-height: ${lightboxImgHeight}px;
|
|
495
497
|
--wp--lightbox-scale: ${containerScale};
|
|
498
|
+
--wp--lightbox-scrollbar-width: ${window.innerWidth - document.documentElement.clientWidth}px;
|
|
496
499
|
}
|
|
497
500
|
`;
|
|
498
501
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["store","focusableSelectors","scrollCallback","isTouching","lastTouchTime","handleScroll","context","Date","now","window","scrollTo","core","image","scrollLeftReset","scrollTopReset","state","windowWidth","innerWidth","windowHeight","innerHeight","actions","showLightbox","event","imageLoaded","initialized","lastFocusedElement","document","activeElement","scrollDelta","pointerType","lightboxEnabled","setStyles","imageRef","pageYOffset","documentElement","scrollTop","pageXOffset","scrollLeft","bind","addEventListener","hideLightbox","hideAnimationEnabled","setTimeout","removeEventListener","lightboxTriggerRef","focus","preventScroll","handleKeydown","key","keyCode","shiftKey","firstFocusableElement","preventDefault","lastFocusableElement","handleLoad","effects","ref","imageCurrentSrc","currentSrc","setButtonStyles","handleTouchStart","handleTouchMove","handleTouchEnd","selectors","roleAttribute","ariaModal","dialogLabel","lightboxObjectFit","enlargedImgSrc","imageUploadedSrc","initOriginImage","parentElement","querySelector","complete","initLightbox","focusableElements","querySelectorAll","length","naturalWidth","naturalHeight","offsetWidth","offsetHeight","figure","figureWidth","clientWidth","figureHeight","clientHeight","caption","captionComputedStyle","getComputedStyle","parseFloat","marginTop","marginBottom","buttonOffsetTop","buttonOffsetRight","scaleAttr","naturalRatio","offsetRatio","referenceHeight","imageButtonTop","imageButtonRight","referenceWidth","setStylesOnResize","afterLoad","debounce","originalWidth","originalHeight","x","screenPosX","y","screenPosY","getBoundingClientRect","originalRatio","heightWithoutSpace","widthWithoutSpace","imgMaxWidth","targetWidth","imgMaxHeight","targetHeight","imgRatio","containerMaxWidth","containerMaxHeight","containerWidth","containerHeight","toFixed","reducedHeight","reducedWidth","horizontalPadding","verticalPadding","targetMaxWidth","Math","min","targetMaxHeight","targetContainerRatio","containerScale","lightboxImgWidth","lightboxImgHeight","styleTag","getElementById","createElement","id","head","appendChild","innerHTML","func","wait","timeout","later","clearTimeout"],"sources":["@wordpress/block-library/src/image/view.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store } from '@wordpress/interactivity';\n\nconst focusableSelectors = [\n\t'a[href]',\n\t'area[href]',\n\t'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])',\n\t'select:not([disabled]):not([aria-hidden])',\n\t'textarea:not([disabled]):not([aria-hidden])',\n\t'button:not([disabled]):not([aria-hidden])',\n\t'iframe',\n\t'object',\n\t'embed',\n\t'[contenteditable]',\n\t'[tabindex]:not([tabindex^=\"-\"])',\n];\n\n/*\n * Stores a context-bound scroll handler.\n *\n * This callback could be defined inline inside of the store\n * object but it's created externally to avoid confusion about\n * how its logic is called. This logic is not referenced directly\n * by the directives in the markup because the scroll event we\n * need to listen to is triggered on the window; so by defining it\n * outside of the store, we signal that the behavior here is different.\n * If we find a compelling reason to move it to the store, feel free.\n *\n * @type {Function}\n */\nlet scrollCallback;\n\n/*\n * Tracks whether user is touching screen; used to\n * differentiate behavior for touch and mouse input.\n *\n * @type {boolean}\n */\nlet isTouching = false;\n\n/*\n * Tracks the last time the screen was touched; used to\n * differentiate behavior for touch and mouse input.\n *\n * @type {number}\n */\nlet lastTouchTime = 0;\n\n/*\n * Lightbox page-scroll handler: prevents scrolling.\n *\n * This handler is added to prevent scrolling behaviors that\n * trigger content shift while the lightbox is open.\n *\n * It would be better to accomplish this through CSS alone, but\n * using overflow: hidden is currently the only way to do so, and\n * that causes the layout to shift and prevents the zoom animation\n * from working in some cases because we're unable to account for\n * the layout shift when doing the animation calculations. Instead,\n * here we use JavaScript to prevent and reset the scrolling\n * behavior. In the future, we may be able to use CSS or overflow: hidden\n * instead to not rely on JavaScript, but this seems to be the best approach\n * for now that provides the best visual experience.\n *\n * @param {Object} context Interactivity page context?\n */\nfunction handleScroll( context ) {\n\t// We can't override the scroll behavior on mobile devices\n\t// because doing so breaks the pinch to zoom functionality, and we\n\t// want to allow users to zoom in further on the high-res image.\n\tif ( ! isTouching && Date.now() - lastTouchTime > 450 ) {\n\t\t// We are unable to use event.preventDefault() to prevent scrolling\n\t\t// because the scroll event can't be canceled, so we reset the position instead.\n\t\twindow.scrollTo(\n\t\t\tcontext.core.image.scrollLeftReset,\n\t\t\tcontext.core.image.scrollTopReset\n\t\t);\n\t}\n}\n\nstore(\n\t{\n\t\tstate: {\n\t\t\tcore: {\n\t\t\t\timage: {\n\t\t\t\t\twindowWidth: window.innerWidth,\n\t\t\t\t\twindowHeight: window.innerHeight,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tactions: {\n\t\t\tcore: {\n\t\t\t\timage: {\n\t\t\t\t\tshowLightbox: ( { context, event } ) => {\n\t\t\t\t\t\t// We can't initialize the lightbox until the reference\n\t\t\t\t\t\t// image is loaded, otherwise the UX is broken.\n\t\t\t\t\t\tif ( ! context.core.image.imageLoaded ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontext.core.image.initialized = true;\n\t\t\t\t\t\tcontext.core.image.lastFocusedElement =\n\t\t\t\t\t\t\twindow.document.activeElement;\n\t\t\t\t\t\tcontext.core.image.scrollDelta = 0;\n\t\t\t\t\t\tcontext.core.image.pointerType = event.pointerType;\n\n\t\t\t\t\t\tcontext.core.image.lightboxEnabled = true;\n\t\t\t\t\t\tsetStyles( context, context.core.image.imageRef );\n\n\t\t\t\t\t\tcontext.core.image.scrollTopReset =\n\t\t\t\t\t\t\twindow.pageYOffset ||\n\t\t\t\t\t\t\tdocument.documentElement.scrollTop;\n\n\t\t\t\t\t\t// In most cases, this value will be 0, but this is included\n\t\t\t\t\t\t// in case a user has created a page with horizontal scrolling.\n\t\t\t\t\t\tcontext.core.image.scrollLeftReset =\n\t\t\t\t\t\t\twindow.pageXOffset ||\n\t\t\t\t\t\t\tdocument.documentElement.scrollLeft;\n\n\t\t\t\t\t\t// We define and bind the scroll callback here so\n\t\t\t\t\t\t// that we can pass the context and as an argument.\n\t\t\t\t\t\t// We may be able to change this in the future if we\n\t\t\t\t\t\t// define the scroll callback in the store instead, but\n\t\t\t\t\t\t// this approach seems to tbe clearest for now.\n\t\t\t\t\t\tscrollCallback = handleScroll.bind( null, context );\n\n\t\t\t\t\t\t// We need to add a scroll event listener to the window\n\t\t\t\t\t\t// here because we are unable to otherwise access it via\n\t\t\t\t\t\t// the Interactivity API directives. If we add a native way\n\t\t\t\t\t\t// to access the window, we can remove this.\n\t\t\t\t\t\twindow.addEventListener(\n\t\t\t\t\t\t\t'scroll',\n\t\t\t\t\t\t\tscrollCallback,\n\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t\thideLightbox: async ( { context } ) => {\n\t\t\t\t\t\tcontext.core.image.hideAnimationEnabled = true;\n\t\t\t\t\t\tif ( context.core.image.lightboxEnabled ) {\n\t\t\t\t\t\t\t// We want to wait until the close animation is completed\n\t\t\t\t\t\t\t// before allowing a user to scroll again. The duration of this\n\t\t\t\t\t\t\t// animation is defined in the styles.scss and depends on if the\n\t\t\t\t\t\t\t// animation is 'zoom' or 'fade', but in any case we should wait\n\t\t\t\t\t\t\t// a few milliseconds longer than the duration, otherwise a user\n\t\t\t\t\t\t\t// may scroll too soon and cause the animation to look sloppy.\n\t\t\t\t\t\t\tsetTimeout( function () {\n\t\t\t\t\t\t\t\twindow.removeEventListener(\n\t\t\t\t\t\t\t\t\t'scroll',\n\t\t\t\t\t\t\t\t\tscrollCallback\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t// If we don't delay before changing the focus,\n\t\t\t\t\t\t\t\t// the focus ring will appear on Firefox before\n\t\t\t\t\t\t\t\t// the image has finished animating, which looks broken.\n\t\t\t\t\t\t\t\tcontext.core.image.lightboxTriggerRef.focus( {\n\t\t\t\t\t\t\t\t\tpreventScroll: true,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}, 450 );\n\n\t\t\t\t\t\t\tcontext.core.image.lightboxEnabled = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\thandleKeydown: ( { context, actions, event } ) => {\n\t\t\t\t\t\tif ( context.core.image.lightboxEnabled ) {\n\t\t\t\t\t\t\tif ( event.key === 'Tab' || event.keyCode === 9 ) {\n\t\t\t\t\t\t\t\t// If shift + tab it change the direction\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tevent.shiftKey &&\n\t\t\t\t\t\t\t\t\twindow.document.activeElement ===\n\t\t\t\t\t\t\t\t\t\tcontext.core.image.firstFocusableElement\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\tcontext.core.image.lastFocusableElement.focus();\n\t\t\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\t\t\t! event.shiftKey &&\n\t\t\t\t\t\t\t\t\twindow.document.activeElement ===\n\t\t\t\t\t\t\t\t\t\tcontext.core.image.lastFocusableElement\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\tcontext.core.image.firstFocusableElement.focus();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tevent.key === 'Escape' ||\n\t\t\t\t\t\t\t\tevent.keyCode === 27\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tactions.core.image.hideLightbox( {\n\t\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t// This is fired just by lazily loaded\n\t\t\t\t\t// images on the page, not all images.\n\t\t\t\t\thandleLoad: ( { context, effects, ref } ) => {\n\t\t\t\t\t\tcontext.core.image.imageLoaded = true;\n\t\t\t\t\t\tcontext.core.image.imageCurrentSrc = ref.currentSrc;\n\t\t\t\t\t\teffects.core.image.setButtonStyles( {\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tref,\n\t\t\t\t\t\t} );\n\t\t\t\t\t},\n\t\t\t\t\thandleTouchStart: () => {\n\t\t\t\t\t\tisTouching = true;\n\t\t\t\t\t},\n\t\t\t\t\thandleTouchMove: ( { context, event } ) => {\n\t\t\t\t\t\t// On mobile devices, we want to prevent triggering the\n\t\t\t\t\t\t// scroll event because otherwise the page jumps around as\n\t\t\t\t\t\t// we reset the scroll position. This also means that closing\n\t\t\t\t\t\t// the lightbox requires that a user perform a simple tap. This\n\t\t\t\t\t\t// may be changed in the future if we find a better alternative\n\t\t\t\t\t\t// to override or reset the scroll position during swipe actions.\n\t\t\t\t\t\tif ( context.core.image.lightboxEnabled ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\thandleTouchEnd: () => {\n\t\t\t\t\t\t// We need to wait a few milliseconds before resetting\n\t\t\t\t\t\t// to ensure that pinch to zoom works consistently\n\t\t\t\t\t\t// on mobile devices when the lightbox is open.\n\t\t\t\t\t\tlastTouchTime = Date.now();\n\t\t\t\t\t\tisTouching = false;\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tselectors: {\n\t\t\tcore: {\n\t\t\t\timage: {\n\t\t\t\t\troleAttribute: ( { context } ) => {\n\t\t\t\t\t\treturn context.core.image.lightboxEnabled\n\t\t\t\t\t\t\t? 'dialog'\n\t\t\t\t\t\t\t: null;\n\t\t\t\t\t},\n\t\t\t\t\tariaModal: ( { context } ) => {\n\t\t\t\t\t\treturn context.core.image.lightboxEnabled\n\t\t\t\t\t\t\t? 'true'\n\t\t\t\t\t\t\t: null;\n\t\t\t\t\t},\n\t\t\t\t\tdialogLabel: ( { context } ) => {\n\t\t\t\t\t\treturn context.core.image.lightboxEnabled\n\t\t\t\t\t\t\t? context.core.image.dialogLabel\n\t\t\t\t\t\t\t: null;\n\t\t\t\t\t},\n\t\t\t\t\tlightboxObjectFit: ( { context } ) => {\n\t\t\t\t\t\tif ( context.core.image.initialized ) {\n\t\t\t\t\t\t\treturn 'cover';\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tenlargedImgSrc: ( { context } ) => {\n\t\t\t\t\t\treturn context.core.image.initialized\n\t\t\t\t\t\t\t? context.core.image.imageUploadedSrc\n\t\t\t\t\t\t\t: 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\teffects: {\n\t\t\tcore: {\n\t\t\t\timage: {\n\t\t\t\t\tinitOriginImage: ( { context, ref } ) => {\n\t\t\t\t\t\tcontext.core.image.imageRef = ref;\n\t\t\t\t\t\tcontext.core.image.lightboxTriggerRef =\n\t\t\t\t\t\t\tref.parentElement.querySelector(\n\t\t\t\t\t\t\t\t'.lightbox-trigger'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( ref.complete ) {\n\t\t\t\t\t\t\tcontext.core.image.imageLoaded = true;\n\t\t\t\t\t\t\tcontext.core.image.imageCurrentSrc = ref.currentSrc;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tinitLightbox: async ( { context, ref } ) => {\n\t\t\t\t\t\tif ( context.core.image.lightboxEnabled ) {\n\t\t\t\t\t\t\tconst focusableElements =\n\t\t\t\t\t\t\t\tref.querySelectorAll( focusableSelectors );\n\t\t\t\t\t\t\tcontext.core.image.firstFocusableElement =\n\t\t\t\t\t\t\t\tfocusableElements[ 0 ];\n\t\t\t\t\t\t\tcontext.core.image.lastFocusableElement =\n\t\t\t\t\t\t\t\tfocusableElements[\n\t\t\t\t\t\t\t\t\tfocusableElements.length - 1\n\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\t// Move focus to the dialog when opening it.\n\t\t\t\t\t\t\tref.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tsetButtonStyles: ( { context, ref } ) => {\n\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\tnaturalWidth,\n\t\t\t\t\t\t\tnaturalHeight,\n\t\t\t\t\t\t\toffsetWidth,\n\t\t\t\t\t\t\toffsetHeight,\n\t\t\t\t\t\t} = ref;\n\n\t\t\t\t\t\t// If the image isn't loaded yet, we can't\n\t\t\t\t\t\t// calculate where the button should be.\n\t\t\t\t\t\tif ( naturalWidth === 0 || naturalHeight === 0 ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst figure = ref.parentElement;\n\t\t\t\t\t\tconst figureWidth = ref.parentElement.clientWidth;\n\n\t\t\t\t\t\t// We need special handling for the height because\n\t\t\t\t\t\t// a caption will cause the figure to be taller than\n\t\t\t\t\t\t// the image, which means we need to account for that\n\t\t\t\t\t\t// when calculating the placement of the button in the\n\t\t\t\t\t\t// top right corner of the image.\n\t\t\t\t\t\tlet figureHeight = ref.parentElement.clientHeight;\n\t\t\t\t\t\tconst caption = figure.querySelector( 'figcaption' );\n\t\t\t\t\t\tif ( caption ) {\n\t\t\t\t\t\t\tconst captionComputedStyle =\n\t\t\t\t\t\t\t\twindow.getComputedStyle( caption );\n\t\t\t\t\t\t\tfigureHeight =\n\t\t\t\t\t\t\t\tfigureHeight -\n\t\t\t\t\t\t\t\tcaption.offsetHeight -\n\t\t\t\t\t\t\t\tparseFloat( captionComputedStyle.marginTop ) -\n\t\t\t\t\t\t\t\tparseFloat( captionComputedStyle.marginBottom );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst buttonOffsetTop = figureHeight - offsetHeight;\n\t\t\t\t\t\tconst buttonOffsetRight = figureWidth - offsetWidth;\n\n\t\t\t\t\t\t// In the case of an image with object-fit: contain, the\n\t\t\t\t\t\t// size of the <img> element can be larger than the image itself,\n\t\t\t\t\t\t// so we need to calculate where to place the button.\n\t\t\t\t\t\tif ( context.core.image.scaleAttr === 'contain' ) {\n\t\t\t\t\t\t\t// Natural ratio of the image.\n\t\t\t\t\t\t\tconst naturalRatio = naturalWidth / naturalHeight;\n\t\t\t\t\t\t\t// Offset ratio of the image.\n\t\t\t\t\t\t\tconst offsetRatio = offsetWidth / offsetHeight;\n\n\t\t\t\t\t\t\tif ( naturalRatio >= offsetRatio ) {\n\t\t\t\t\t\t\t\t// If it reaches the width first, keep\n\t\t\t\t\t\t\t\t// the width and compute the height.\n\t\t\t\t\t\t\t\tconst referenceHeight =\n\t\t\t\t\t\t\t\t\toffsetWidth / naturalRatio;\n\t\t\t\t\t\t\t\tcontext.core.image.imageButtonTop =\n\t\t\t\t\t\t\t\t\t( offsetHeight - referenceHeight ) / 2 +\n\t\t\t\t\t\t\t\t\tbuttonOffsetTop +\n\t\t\t\t\t\t\t\t\t10;\n\t\t\t\t\t\t\t\tcontext.core.image.imageButtonRight =\n\t\t\t\t\t\t\t\t\tbuttonOffsetRight + 10;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// If it reaches the height first, keep\n\t\t\t\t\t\t\t\t// the height and compute the width.\n\t\t\t\t\t\t\t\tconst referenceWidth =\n\t\t\t\t\t\t\t\t\toffsetHeight * naturalRatio;\n\t\t\t\t\t\t\t\tcontext.core.image.imageButtonTop =\n\t\t\t\t\t\t\t\t\tbuttonOffsetTop + 10;\n\t\t\t\t\t\t\t\tcontext.core.image.imageButtonRight =\n\t\t\t\t\t\t\t\t\t( offsetWidth - referenceWidth ) / 2 +\n\t\t\t\t\t\t\t\t\tbuttonOffsetRight +\n\t\t\t\t\t\t\t\t\t10;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.core.image.imageButtonTop =\n\t\t\t\t\t\t\t\tbuttonOffsetTop + 10;\n\t\t\t\t\t\t\tcontext.core.image.imageButtonRight =\n\t\t\t\t\t\t\t\tbuttonOffsetRight + 10;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tsetStylesOnResize: ( { state, context, ref } ) => {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tcontext.core.image.lightboxEnabled &&\n\t\t\t\t\t\t\t( state.core.image.windowWidth ||\n\t\t\t\t\t\t\t\tstate.core.image.windowHeight )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tsetStyles( context, ref );\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tafterLoad: ( { state } ) => {\n\t\t\twindow.addEventListener(\n\t\t\t\t'resize',\n\t\t\t\tdebounce( () => {\n\t\t\t\t\tstate.core.image.windowWidth = window.innerWidth;\n\t\t\t\t\tstate.core.image.windowHeight = window.innerHeight;\n\t\t\t\t} )\n\t\t\t);\n\t\t},\n\t}\n);\n\n/*\n * Computes styles for the lightbox and adds them to the document.\n *\n * @function\n * @param {Object} context - An Interactivity API context\n * @param {Object} event - A triggering event\n */\nfunction setStyles( context, ref ) {\n\t// The reference img element lies adjacent\n\t// to the event target button in the DOM.\n\tlet {\n\t\tnaturalWidth,\n\t\tnaturalHeight,\n\t\toffsetWidth: originalWidth,\n\t\toffsetHeight: originalHeight,\n\t} = ref;\n\tlet { x: screenPosX, y: screenPosY } = ref.getBoundingClientRect();\n\n\t// Natural ratio of the image clicked to open the lightbox.\n\tconst naturalRatio = naturalWidth / naturalHeight;\n\t// Original ratio of the image clicked to open the lightbox.\n\tlet originalRatio = originalWidth / originalHeight;\n\n\t// If it has object-fit: contain, recalculate the original sizes\n\t// and the screen position without the blank spaces.\n\tif ( context.core.image.scaleAttr === 'contain' ) {\n\t\tif ( naturalRatio > originalRatio ) {\n\t\t\tconst heightWithoutSpace = originalWidth / naturalRatio;\n\t\t\t// Recalculate screen position without the top space.\n\t\t\tscreenPosY += ( originalHeight - heightWithoutSpace ) / 2;\n\t\t\toriginalHeight = heightWithoutSpace;\n\t\t} else {\n\t\t\tconst widthWithoutSpace = originalHeight * naturalRatio;\n\t\t\t// Recalculate screen position without the left space.\n\t\t\tscreenPosX += ( originalWidth - widthWithoutSpace ) / 2;\n\t\t\toriginalWidth = widthWithoutSpace;\n\t\t}\n\t}\n\toriginalRatio = originalWidth / originalHeight;\n\n\t// Typically, we use the image's full-sized dimensions. If those\n\t// dimensions have not been set (i.e. an external image with only one size),\n\t// the image's dimensions in the lightbox are the same\n\t// as those of the image in the content.\n\tlet imgMaxWidth = parseFloat(\n\t\tcontext.core.image.targetWidth !== 'none'\n\t\t\t? context.core.image.targetWidth\n\t\t\t: naturalWidth\n\t);\n\tlet imgMaxHeight = parseFloat(\n\t\tcontext.core.image.targetHeight !== 'none'\n\t\t\t? context.core.image.targetHeight\n\t\t\t: naturalHeight\n\t);\n\n\t// Ratio of the biggest image stored in the database.\n\tlet imgRatio = imgMaxWidth / imgMaxHeight;\n\tlet containerMaxWidth = imgMaxWidth;\n\tlet containerMaxHeight = imgMaxHeight;\n\tlet containerWidth = imgMaxWidth;\n\tlet containerHeight = imgMaxHeight;\n\t// Check if the target image has a different ratio than the original one (thumbnail).\n\t// Recalculate the width and height.\n\tif ( naturalRatio.toFixed( 2 ) !== imgRatio.toFixed( 2 ) ) {\n\t\tif ( naturalRatio > imgRatio ) {\n\t\t\t// If the width is reached before the height, we keep the maxWidth\n\t\t\t// and recalculate the height.\n\t\t\t// Unless the difference between the maxHeight and the reducedHeight\n\t\t\t// is higher than the maxWidth, where we keep the reducedHeight and\n\t\t\t// recalculate the width.\n\t\t\tconst reducedHeight = imgMaxWidth / naturalRatio;\n\t\t\tif ( imgMaxHeight - reducedHeight > imgMaxWidth ) {\n\t\t\t\timgMaxHeight = reducedHeight;\n\t\t\t\timgMaxWidth = reducedHeight * naturalRatio;\n\t\t\t} else {\n\t\t\t\timgMaxHeight = imgMaxWidth / naturalRatio;\n\t\t\t}\n\t\t} else {\n\t\t\t// If the height is reached before the width, we keep the maxHeight\n\t\t\t// and recalculate the width.\n\t\t\t// Unless the difference between the maxWidth and the reducedWidth\n\t\t\t// is higher than the maxHeight, where we keep the reducedWidth and\n\t\t\t// recalculate the height.\n\t\t\tconst reducedWidth = imgMaxHeight * naturalRatio;\n\t\t\tif ( imgMaxWidth - reducedWidth > imgMaxHeight ) {\n\t\t\t\timgMaxWidth = reducedWidth;\n\t\t\t\timgMaxHeight = reducedWidth / naturalRatio;\n\t\t\t} else {\n\t\t\t\timgMaxWidth = imgMaxHeight * naturalRatio;\n\t\t\t}\n\t\t}\n\t\tcontainerWidth = imgMaxWidth;\n\t\tcontainerHeight = imgMaxHeight;\n\t\timgRatio = imgMaxWidth / imgMaxHeight;\n\n\t\t// Calculate the max size of the container.\n\t\tif ( originalRatio > imgRatio ) {\n\t\t\tcontainerMaxWidth = imgMaxWidth;\n\t\t\tcontainerMaxHeight = containerMaxWidth / originalRatio;\n\t\t} else {\n\t\t\tcontainerMaxHeight = imgMaxHeight;\n\t\t\tcontainerMaxWidth = containerMaxHeight * originalRatio;\n\t\t}\n\t}\n\n\t// If the image has been pixelated on purpose, keep that size.\n\tif ( originalWidth > containerWidth || originalHeight > containerHeight ) {\n\t\tcontainerWidth = originalWidth;\n\t\tcontainerHeight = originalHeight;\n\t}\n\n\t// Calculate the final lightbox image size and the\n\t// scale factor. MaxWidth is either the window container\n\t// (accounting for padding) or the image resolution.\n\tlet horizontalPadding = 0;\n\tif ( window.innerWidth > 480 ) {\n\t\thorizontalPadding = 80;\n\t} else if ( window.innerWidth > 1920 ) {\n\t\thorizontalPadding = 160;\n\t}\n\tconst verticalPadding = 80;\n\n\tconst targetMaxWidth = Math.min(\n\t\twindow.innerWidth - horizontalPadding,\n\t\tcontainerWidth\n\t);\n\tconst targetMaxHeight = Math.min(\n\t\twindow.innerHeight - verticalPadding,\n\t\tcontainerHeight\n\t);\n\tconst targetContainerRatio = targetMaxWidth / targetMaxHeight;\n\n\tif ( originalRatio > targetContainerRatio ) {\n\t\t// If targetMaxWidth is reached before targetMaxHeight\n\t\tcontainerWidth = targetMaxWidth;\n\t\tcontainerHeight = containerWidth / originalRatio;\n\t} else {\n\t\t// If targetMaxHeight is reached before targetMaxWidth\n\t\tcontainerHeight = targetMaxHeight;\n\t\tcontainerWidth = containerHeight * originalRatio;\n\t}\n\n\tconst containerScale = originalWidth / containerWidth;\n\tconst lightboxImgWidth =\n\t\timgMaxWidth * ( containerWidth / containerMaxWidth );\n\tconst lightboxImgHeight =\n\t\timgMaxHeight * ( containerHeight / containerMaxHeight );\n\n\t// Add the CSS variables needed.\n\tlet styleTag = document.getElementById( 'wp-lightbox-styles' );\n\tif ( ! styleTag ) {\n\t\tstyleTag = document.createElement( 'style' );\n\t\tstyleTag.id = 'wp-lightbox-styles';\n\t\tdocument.head.appendChild( styleTag );\n\t}\n\n\t// As of this writing, using the calculations above will render the lightbox\n\t// with a small, erroneous whitespace on the left side of the image in iOS Safari,\n\t// perhaps due to an inconsistency in how browsers handle absolute positioning and CSS\n\t// transformation. In any case, adding 1 pixel to the container width and height solves\n\t// the problem, though this can be removed if the issue is fixed in the future.\n\tstyleTag.innerHTML = `\n\t\t:root {\n\t\t\t--wp--lightbox-initial-top-position: ${ screenPosY }px;\n\t\t\t--wp--lightbox-initial-left-position: ${ screenPosX }px;\n\t\t\t--wp--lightbox-container-width: ${ containerWidth + 1 }px;\n\t\t\t--wp--lightbox-container-height: ${ containerHeight + 1 }px;\n\t\t\t--wp--lightbox-image-width: ${ lightboxImgWidth }px;\n\t\t\t--wp--lightbox-image-height: ${ lightboxImgHeight }px;\n\t\t\t--wp--lightbox-scale: ${ containerScale };\n\t\t}\n\t`;\n}\n\n/*\n * Debounces a function call.\n *\n * @function\n * @param {Function} func - A function to be called\n * @param {number} wait - The time to wait before calling the function\n */\nfunction debounce( func, wait = 50 ) {\n\tlet timeout;\n\treturn () => {\n\t\tconst later = () => {\n\t\t\ttimeout = null;\n\t\t\tfunc();\n\t\t};\n\t\tclearTimeout( timeout );\n\t\ttimeout = setTimeout( later, wait );\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,QAAQ,0BAA0B;AAEhD,M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D,IAAK,CAAED,QAAQ,EAAG;IACjBA,QAAQ,GAAG/G,QAAQ,CAACiH,aAAa,CAAE,OAAQ,CAAC;IAC5CF,QAAQ,CAACG,EAAE,GAAG,oBAAoB;IAClClH,QAAQ,CAACmH,IAAI,CAACC,WAAW,CAAEL,QAAS,CAAC;EACtC;;EAEA;EACA;EACA;EACA;EACA;EACAA,QAAQ,CAACM,SAAS,GAAI;AACvB;AACA,0CAA2CjC,UAAY;AACvD,2CAA4CF,UAAY;AACxD,qCAAsCc,cAAc,GAAG,CAAG;AAC1D,sCAAuCC,eAAe,GAAG,CAAG;AAC5D,iCAAkCY,gBAAkB;AACpD,kCAAmCC,iBAAmB;AACtD,2BAA4BF,cAAgB;AAC5C;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS9B,QAAQA,CAAEwC,IAAI,EAAEC,IAAI,GAAG,EAAE,EAAG;EACpC,IAAIC,OAAO;EACX,OAAO,MAAM;IACZ,MAAMC,KAAK,GAAGA,CAAA,KAAM;MACnBD,OAAO,GAAG,IAAI;MACdF,IAAI,CAAC,CAAC;IACP,CAAC;IACDI,YAAY,CAAEF,OAAQ,CAAC;IACvBA,OAAO,GAAGxG,UAAU,CAAEyG,KAAK,EAAEF,IAAK,CAAC;EACpC,CAAC;AACF"}
|
|
1
|
+
{"version":3,"names":["store","focusableSelectors","scrollCallback","isTouching","lastTouchTime","handleScroll","context","Date","now","window","scrollTo","core","image","scrollLeftReset","scrollTopReset","state","windowWidth","innerWidth","windowHeight","innerHeight","actions","showLightbox","event","imageLoaded","initialized","lastFocusedElement","document","activeElement","scrollDelta","pointerType","lightboxEnabled","setStyles","imageRef","pageYOffset","documentElement","scrollTop","pageXOffset","scrollLeft","bind","addEventListener","hideLightbox","hideAnimationEnabled","setTimeout","removeEventListener","lightboxTriggerRef","focus","preventScroll","handleKeydown","key","keyCode","shiftKey","firstFocusableElement","preventDefault","lastFocusableElement","handleLoad","effects","ref","imageCurrentSrc","currentSrc","setButtonStyles","handleTouchStart","handleTouchMove","handleTouchEnd","selectors","roleAttribute","ariaModal","dialogLabel","lightboxObjectFit","enlargedImgSrc","imageUploadedSrc","initOriginImage","parentElement","querySelector","complete","initLightbox","focusableElements","querySelectorAll","length","naturalWidth","naturalHeight","offsetWidth","offsetHeight","figure","figureWidth","clientWidth","figureHeight","clientHeight","caption","captionComputedStyle","getComputedStyle","includes","position","parseFloat","marginTop","marginBottom","buttonOffsetTop","buttonOffsetRight","scaleAttr","naturalRatio","offsetRatio","referenceHeight","imageButtonTop","imageButtonRight","referenceWidth","setStylesOnResize","afterLoad","debounce","originalWidth","originalHeight","x","screenPosX","y","screenPosY","getBoundingClientRect","originalRatio","heightWithoutSpace","widthWithoutSpace","imgMaxWidth","targetWidth","imgMaxHeight","targetHeight","imgRatio","containerMaxWidth","containerMaxHeight","containerWidth","containerHeight","toFixed","reducedHeight","reducedWidth","horizontalPadding","verticalPadding","targetMaxWidth","Math","min","targetMaxHeight","targetContainerRatio","containerScale","lightboxImgWidth","lightboxImgHeight","styleTag","getElementById","createElement","id","head","appendChild","innerHTML","func","wait","timeout","later","clearTimeout"],"sources":["@wordpress/block-library/src/image/view.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store } from '@wordpress/interactivity';\n\nconst focusableSelectors = [\n\t'a[href]',\n\t'area[href]',\n\t'input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])',\n\t'select:not([disabled]):not([aria-hidden])',\n\t'textarea:not([disabled]):not([aria-hidden])',\n\t'button:not([disabled]):not([aria-hidden])',\n\t'iframe',\n\t'object',\n\t'embed',\n\t'[contenteditable]',\n\t'[tabindex]:not([tabindex^=\"-\"])',\n];\n\n/*\n * Stores a context-bound scroll handler.\n *\n * This callback could be defined inline inside of the store\n * object but it's created externally to avoid confusion about\n * how its logic is called. This logic is not referenced directly\n * by the directives in the markup because the scroll event we\n * need to listen to is triggered on the window; so by defining it\n * outside of the store, we signal that the behavior here is different.\n * If we find a compelling reason to move it to the store, feel free.\n *\n * @type {Function}\n */\nlet scrollCallback;\n\n/*\n * Tracks whether user is touching screen; used to\n * differentiate behavior for touch and mouse input.\n *\n * @type {boolean}\n */\nlet isTouching = false;\n\n/*\n * Tracks the last time the screen was touched; used to\n * differentiate behavior for touch and mouse input.\n *\n * @type {number}\n */\nlet lastTouchTime = 0;\n\n/*\n * Lightbox page-scroll handler: prevents scrolling.\n *\n * This handler is added to prevent scrolling behaviors that\n * trigger content shift while the lightbox is open.\n *\n * It would be better to accomplish this through CSS alone, but\n * using overflow: hidden is currently the only way to do so, and\n * that causes the layout to shift and prevents the zoom animation\n * from working in some cases because we're unable to account for\n * the layout shift when doing the animation calculations. Instead,\n * here we use JavaScript to prevent and reset the scrolling\n * behavior. In the future, we may be able to use CSS or overflow: hidden\n * instead to not rely on JavaScript, but this seems to be the best approach\n * for now that provides the best visual experience.\n *\n * @param {Object} context Interactivity page context?\n */\nfunction handleScroll( context ) {\n\t// We can't override the scroll behavior on mobile devices\n\t// because doing so breaks the pinch to zoom functionality, and we\n\t// want to allow users to zoom in further on the high-res image.\n\tif ( ! isTouching && Date.now() - lastTouchTime > 450 ) {\n\t\t// We are unable to use event.preventDefault() to prevent scrolling\n\t\t// because the scroll event can't be canceled, so we reset the position instead.\n\t\twindow.scrollTo(\n\t\t\tcontext.core.image.scrollLeftReset,\n\t\t\tcontext.core.image.scrollTopReset\n\t\t);\n\t}\n}\n\nstore(\n\t{\n\t\tstate: {\n\t\t\tcore: {\n\t\t\t\timage: {\n\t\t\t\t\twindowWidth: window.innerWidth,\n\t\t\t\t\twindowHeight: window.innerHeight,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tactions: {\n\t\t\tcore: {\n\t\t\t\timage: {\n\t\t\t\t\tshowLightbox: ( { context, event } ) => {\n\t\t\t\t\t\t// We can't initialize the lightbox until the reference\n\t\t\t\t\t\t// image is loaded, otherwise the UX is broken.\n\t\t\t\t\t\tif ( ! context.core.image.imageLoaded ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontext.core.image.initialized = true;\n\t\t\t\t\t\tcontext.core.image.lastFocusedElement =\n\t\t\t\t\t\t\twindow.document.activeElement;\n\t\t\t\t\t\tcontext.core.image.scrollDelta = 0;\n\t\t\t\t\t\tcontext.core.image.pointerType = event.pointerType;\n\n\t\t\t\t\t\tcontext.core.image.lightboxEnabled = true;\n\t\t\t\t\t\tsetStyles( context, context.core.image.imageRef );\n\n\t\t\t\t\t\tcontext.core.image.scrollTopReset =\n\t\t\t\t\t\t\twindow.pageYOffset ||\n\t\t\t\t\t\t\tdocument.documentElement.scrollTop;\n\n\t\t\t\t\t\t// In most cases, this value will be 0, but this is included\n\t\t\t\t\t\t// in case a user has created a page with horizontal scrolling.\n\t\t\t\t\t\tcontext.core.image.scrollLeftReset =\n\t\t\t\t\t\t\twindow.pageXOffset ||\n\t\t\t\t\t\t\tdocument.documentElement.scrollLeft;\n\n\t\t\t\t\t\t// We define and bind the scroll callback here so\n\t\t\t\t\t\t// that we can pass the context and as an argument.\n\t\t\t\t\t\t// We may be able to change this in the future if we\n\t\t\t\t\t\t// define the scroll callback in the store instead, but\n\t\t\t\t\t\t// this approach seems to tbe clearest for now.\n\t\t\t\t\t\tscrollCallback = handleScroll.bind( null, context );\n\n\t\t\t\t\t\t// We need to add a scroll event listener to the window\n\t\t\t\t\t\t// here because we are unable to otherwise access it via\n\t\t\t\t\t\t// the Interactivity API directives. If we add a native way\n\t\t\t\t\t\t// to access the window, we can remove this.\n\t\t\t\t\t\twindow.addEventListener(\n\t\t\t\t\t\t\t'scroll',\n\t\t\t\t\t\t\tscrollCallback,\n\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t\thideLightbox: async ( { context } ) => {\n\t\t\t\t\t\tcontext.core.image.hideAnimationEnabled = true;\n\t\t\t\t\t\tif ( context.core.image.lightboxEnabled ) {\n\t\t\t\t\t\t\t// We want to wait until the close animation is completed\n\t\t\t\t\t\t\t// before allowing a user to scroll again. The duration of this\n\t\t\t\t\t\t\t// animation is defined in the styles.scss and depends on if the\n\t\t\t\t\t\t\t// animation is 'zoom' or 'fade', but in any case we should wait\n\t\t\t\t\t\t\t// a few milliseconds longer than the duration, otherwise a user\n\t\t\t\t\t\t\t// may scroll too soon and cause the animation to look sloppy.\n\t\t\t\t\t\t\tsetTimeout( function () {\n\t\t\t\t\t\t\t\twindow.removeEventListener(\n\t\t\t\t\t\t\t\t\t'scroll',\n\t\t\t\t\t\t\t\t\tscrollCallback\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t// If we don't delay before changing the focus,\n\t\t\t\t\t\t\t\t// the focus ring will appear on Firefox before\n\t\t\t\t\t\t\t\t// the image has finished animating, which looks broken.\n\t\t\t\t\t\t\t\tcontext.core.image.lightboxTriggerRef.focus( {\n\t\t\t\t\t\t\t\t\tpreventScroll: true,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}, 450 );\n\n\t\t\t\t\t\t\tcontext.core.image.lightboxEnabled = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\thandleKeydown: ( { context, actions, event } ) => {\n\t\t\t\t\t\tif ( context.core.image.lightboxEnabled ) {\n\t\t\t\t\t\t\tif ( event.key === 'Tab' || event.keyCode === 9 ) {\n\t\t\t\t\t\t\t\t// If shift + tab it change the direction\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tevent.shiftKey &&\n\t\t\t\t\t\t\t\t\twindow.document.activeElement ===\n\t\t\t\t\t\t\t\t\t\tcontext.core.image.firstFocusableElement\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\tcontext.core.image.lastFocusableElement.focus();\n\t\t\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\t\t\t! event.shiftKey &&\n\t\t\t\t\t\t\t\t\twindow.document.activeElement ===\n\t\t\t\t\t\t\t\t\t\tcontext.core.image.lastFocusableElement\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\tcontext.core.image.firstFocusableElement.focus();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tevent.key === 'Escape' ||\n\t\t\t\t\t\t\t\tevent.keyCode === 27\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tactions.core.image.hideLightbox( {\n\t\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t// This is fired just by lazily loaded\n\t\t\t\t\t// images on the page, not all images.\n\t\t\t\t\thandleLoad: ( { context, effects, ref } ) => {\n\t\t\t\t\t\tcontext.core.image.imageLoaded = true;\n\t\t\t\t\t\tcontext.core.image.imageCurrentSrc = ref.currentSrc;\n\t\t\t\t\t\teffects.core.image.setButtonStyles( {\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tref,\n\t\t\t\t\t\t} );\n\t\t\t\t\t},\n\t\t\t\t\thandleTouchStart: () => {\n\t\t\t\t\t\tisTouching = true;\n\t\t\t\t\t},\n\t\t\t\t\thandleTouchMove: ( { context, event } ) => {\n\t\t\t\t\t\t// On mobile devices, we want to prevent triggering the\n\t\t\t\t\t\t// scroll event because otherwise the page jumps around as\n\t\t\t\t\t\t// we reset the scroll position. This also means that closing\n\t\t\t\t\t\t// the lightbox requires that a user perform a simple tap. This\n\t\t\t\t\t\t// may be changed in the future if we find a better alternative\n\t\t\t\t\t\t// to override or reset the scroll position during swipe actions.\n\t\t\t\t\t\tif ( context.core.image.lightboxEnabled ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\thandleTouchEnd: () => {\n\t\t\t\t\t\t// We need to wait a few milliseconds before resetting\n\t\t\t\t\t\t// to ensure that pinch to zoom works consistently\n\t\t\t\t\t\t// on mobile devices when the lightbox is open.\n\t\t\t\t\t\tlastTouchTime = Date.now();\n\t\t\t\t\t\tisTouching = false;\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tselectors: {\n\t\t\tcore: {\n\t\t\t\timage: {\n\t\t\t\t\troleAttribute: ( { context } ) => {\n\t\t\t\t\t\treturn context.core.image.lightboxEnabled\n\t\t\t\t\t\t\t? 'dialog'\n\t\t\t\t\t\t\t: null;\n\t\t\t\t\t},\n\t\t\t\t\tariaModal: ( { context } ) => {\n\t\t\t\t\t\treturn context.core.image.lightboxEnabled\n\t\t\t\t\t\t\t? 'true'\n\t\t\t\t\t\t\t: null;\n\t\t\t\t\t},\n\t\t\t\t\tdialogLabel: ( { context } ) => {\n\t\t\t\t\t\treturn context.core.image.lightboxEnabled\n\t\t\t\t\t\t\t? context.core.image.dialogLabel\n\t\t\t\t\t\t\t: null;\n\t\t\t\t\t},\n\t\t\t\t\tlightboxObjectFit: ( { context } ) => {\n\t\t\t\t\t\tif ( context.core.image.initialized ) {\n\t\t\t\t\t\t\treturn 'cover';\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tenlargedImgSrc: ( { context } ) => {\n\t\t\t\t\t\treturn context.core.image.initialized\n\t\t\t\t\t\t\t? context.core.image.imageUploadedSrc\n\t\t\t\t\t\t\t: 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\teffects: {\n\t\t\tcore: {\n\t\t\t\timage: {\n\t\t\t\t\tinitOriginImage: ( { context, ref } ) => {\n\t\t\t\t\t\tcontext.core.image.imageRef = ref;\n\t\t\t\t\t\tcontext.core.image.lightboxTriggerRef =\n\t\t\t\t\t\t\tref.parentElement.querySelector(\n\t\t\t\t\t\t\t\t'.lightbox-trigger'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( ref.complete ) {\n\t\t\t\t\t\t\tcontext.core.image.imageLoaded = true;\n\t\t\t\t\t\t\tcontext.core.image.imageCurrentSrc = ref.currentSrc;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tinitLightbox: async ( { context, ref } ) => {\n\t\t\t\t\t\tif ( context.core.image.lightboxEnabled ) {\n\t\t\t\t\t\t\tconst focusableElements =\n\t\t\t\t\t\t\t\tref.querySelectorAll( focusableSelectors );\n\t\t\t\t\t\t\tcontext.core.image.firstFocusableElement =\n\t\t\t\t\t\t\t\tfocusableElements[ 0 ];\n\t\t\t\t\t\t\tcontext.core.image.lastFocusableElement =\n\t\t\t\t\t\t\t\tfocusableElements[\n\t\t\t\t\t\t\t\t\tfocusableElements.length - 1\n\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\t// Move focus to the dialog when opening it.\n\t\t\t\t\t\t\tref.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tsetButtonStyles: ( { context, ref } ) => {\n\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\tnaturalWidth,\n\t\t\t\t\t\t\tnaturalHeight,\n\t\t\t\t\t\t\toffsetWidth,\n\t\t\t\t\t\t\toffsetHeight,\n\t\t\t\t\t\t} = ref;\n\n\t\t\t\t\t\t// If the image isn't loaded yet, we can't\n\t\t\t\t\t\t// calculate where the button should be.\n\t\t\t\t\t\tif ( naturalWidth === 0 || naturalHeight === 0 ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst figure = ref.parentElement;\n\t\t\t\t\t\tconst figureWidth = ref.parentElement.clientWidth;\n\n\t\t\t\t\t\t// We need special handling for the height because\n\t\t\t\t\t\t// a caption will cause the figure to be taller than\n\t\t\t\t\t\t// the image, which means we need to account for that\n\t\t\t\t\t\t// when calculating the placement of the button in the\n\t\t\t\t\t\t// top right corner of the image.\n\t\t\t\t\t\tlet figureHeight = ref.parentElement.clientHeight;\n\t\t\t\t\t\tconst caption = figure.querySelector( 'figcaption' );\n\t\t\t\t\t\tif ( caption ) {\n\t\t\t\t\t\t\tconst captionComputedStyle =\n\t\t\t\t\t\t\t\twindow.getComputedStyle( caption );\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t! [ 'absolute', 'fixed' ].includes(\n\t\t\t\t\t\t\t\t\tcaptionComputedStyle.position\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\tfigureHeight =\n\t\t\t\t\t\t\t\t\tfigureHeight -\n\t\t\t\t\t\t\t\t\tcaption.offsetHeight -\n\t\t\t\t\t\t\t\t\tparseFloat(\n\t\t\t\t\t\t\t\t\t\tcaptionComputedStyle.marginTop\n\t\t\t\t\t\t\t\t\t) -\n\t\t\t\t\t\t\t\t\tparseFloat(\n\t\t\t\t\t\t\t\t\t\tcaptionComputedStyle.marginBottom\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst buttonOffsetTop = figureHeight - offsetHeight;\n\t\t\t\t\t\tconst buttonOffsetRight = figureWidth - offsetWidth;\n\n\t\t\t\t\t\t// In the case of an image with object-fit: contain, the\n\t\t\t\t\t\t// size of the <img> element can be larger than the image itself,\n\t\t\t\t\t\t// so we need to calculate where to place the button.\n\t\t\t\t\t\tif ( context.core.image.scaleAttr === 'contain' ) {\n\t\t\t\t\t\t\t// Natural ratio of the image.\n\t\t\t\t\t\t\tconst naturalRatio = naturalWidth / naturalHeight;\n\t\t\t\t\t\t\t// Offset ratio of the image.\n\t\t\t\t\t\t\tconst offsetRatio = offsetWidth / offsetHeight;\n\n\t\t\t\t\t\t\tif ( naturalRatio >= offsetRatio ) {\n\t\t\t\t\t\t\t\t// If it reaches the width first, keep\n\t\t\t\t\t\t\t\t// the width and compute the height.\n\t\t\t\t\t\t\t\tconst referenceHeight =\n\t\t\t\t\t\t\t\t\toffsetWidth / naturalRatio;\n\t\t\t\t\t\t\t\tcontext.core.image.imageButtonTop =\n\t\t\t\t\t\t\t\t\t( offsetHeight - referenceHeight ) / 2 +\n\t\t\t\t\t\t\t\t\tbuttonOffsetTop +\n\t\t\t\t\t\t\t\t\t16;\n\t\t\t\t\t\t\t\tcontext.core.image.imageButtonRight =\n\t\t\t\t\t\t\t\t\tbuttonOffsetRight + 16;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// If it reaches the height first, keep\n\t\t\t\t\t\t\t\t// the height and compute the width.\n\t\t\t\t\t\t\t\tconst referenceWidth =\n\t\t\t\t\t\t\t\t\toffsetHeight * naturalRatio;\n\t\t\t\t\t\t\t\tcontext.core.image.imageButtonTop =\n\t\t\t\t\t\t\t\t\tbuttonOffsetTop + 16;\n\t\t\t\t\t\t\t\tcontext.core.image.imageButtonRight =\n\t\t\t\t\t\t\t\t\t( offsetWidth - referenceWidth ) / 2 +\n\t\t\t\t\t\t\t\t\tbuttonOffsetRight +\n\t\t\t\t\t\t\t\t\t16;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.core.image.imageButtonTop =\n\t\t\t\t\t\t\t\tbuttonOffsetTop + 16;\n\t\t\t\t\t\t\tcontext.core.image.imageButtonRight =\n\t\t\t\t\t\t\t\tbuttonOffsetRight + 16;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tsetStylesOnResize: ( { state, context, ref } ) => {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tcontext.core.image.lightboxEnabled &&\n\t\t\t\t\t\t\t( state.core.image.windowWidth ||\n\t\t\t\t\t\t\t\tstate.core.image.windowHeight )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tsetStyles( context, ref );\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tafterLoad: ( { state } ) => {\n\t\t\twindow.addEventListener(\n\t\t\t\t'resize',\n\t\t\t\tdebounce( () => {\n\t\t\t\t\tstate.core.image.windowWidth = window.innerWidth;\n\t\t\t\t\tstate.core.image.windowHeight = window.innerHeight;\n\t\t\t\t} )\n\t\t\t);\n\t\t},\n\t}\n);\n\n/*\n * Computes styles for the lightbox and adds them to the document.\n *\n * @function\n * @param {Object} context - An Interactivity API context\n * @param {Object} event - A triggering event\n */\nfunction setStyles( context, ref ) {\n\t// The reference img element lies adjacent\n\t// to the event target button in the DOM.\n\tlet {\n\t\tnaturalWidth,\n\t\tnaturalHeight,\n\t\toffsetWidth: originalWidth,\n\t\toffsetHeight: originalHeight,\n\t} = ref;\n\tlet { x: screenPosX, y: screenPosY } = ref.getBoundingClientRect();\n\n\t// Natural ratio of the image clicked to open the lightbox.\n\tconst naturalRatio = naturalWidth / naturalHeight;\n\t// Original ratio of the image clicked to open the lightbox.\n\tlet originalRatio = originalWidth / originalHeight;\n\n\t// If it has object-fit: contain, recalculate the original sizes\n\t// and the screen position without the blank spaces.\n\tif ( context.core.image.scaleAttr === 'contain' ) {\n\t\tif ( naturalRatio > originalRatio ) {\n\t\t\tconst heightWithoutSpace = originalWidth / naturalRatio;\n\t\t\t// Recalculate screen position without the top space.\n\t\t\tscreenPosY += ( originalHeight - heightWithoutSpace ) / 2;\n\t\t\toriginalHeight = heightWithoutSpace;\n\t\t} else {\n\t\t\tconst widthWithoutSpace = originalHeight * naturalRatio;\n\t\t\t// Recalculate screen position without the left space.\n\t\t\tscreenPosX += ( originalWidth - widthWithoutSpace ) / 2;\n\t\t\toriginalWidth = widthWithoutSpace;\n\t\t}\n\t}\n\toriginalRatio = originalWidth / originalHeight;\n\n\t// Typically, we use the image's full-sized dimensions. If those\n\t// dimensions have not been set (i.e. an external image with only one size),\n\t// the image's dimensions in the lightbox are the same\n\t// as those of the image in the content.\n\tlet imgMaxWidth = parseFloat(\n\t\tcontext.core.image.targetWidth !== 'none'\n\t\t\t? context.core.image.targetWidth\n\t\t\t: naturalWidth\n\t);\n\tlet imgMaxHeight = parseFloat(\n\t\tcontext.core.image.targetHeight !== 'none'\n\t\t\t? context.core.image.targetHeight\n\t\t\t: naturalHeight\n\t);\n\n\t// Ratio of the biggest image stored in the database.\n\tlet imgRatio = imgMaxWidth / imgMaxHeight;\n\tlet containerMaxWidth = imgMaxWidth;\n\tlet containerMaxHeight = imgMaxHeight;\n\tlet containerWidth = imgMaxWidth;\n\tlet containerHeight = imgMaxHeight;\n\t// Check if the target image has a different ratio than the original one (thumbnail).\n\t// Recalculate the width and height.\n\tif ( naturalRatio.toFixed( 2 ) !== imgRatio.toFixed( 2 ) ) {\n\t\tif ( naturalRatio > imgRatio ) {\n\t\t\t// If the width is reached before the height, we keep the maxWidth\n\t\t\t// and recalculate the height.\n\t\t\t// Unless the difference between the maxHeight and the reducedHeight\n\t\t\t// is higher than the maxWidth, where we keep the reducedHeight and\n\t\t\t// recalculate the width.\n\t\t\tconst reducedHeight = imgMaxWidth / naturalRatio;\n\t\t\tif ( imgMaxHeight - reducedHeight > imgMaxWidth ) {\n\t\t\t\timgMaxHeight = reducedHeight;\n\t\t\t\timgMaxWidth = reducedHeight * naturalRatio;\n\t\t\t} else {\n\t\t\t\timgMaxHeight = imgMaxWidth / naturalRatio;\n\t\t\t}\n\t\t} else {\n\t\t\t// If the height is reached before the width, we keep the maxHeight\n\t\t\t// and recalculate the width.\n\t\t\t// Unless the difference between the maxWidth and the reducedWidth\n\t\t\t// is higher than the maxHeight, where we keep the reducedWidth and\n\t\t\t// recalculate the height.\n\t\t\tconst reducedWidth = imgMaxHeight * naturalRatio;\n\t\t\tif ( imgMaxWidth - reducedWidth > imgMaxHeight ) {\n\t\t\t\timgMaxWidth = reducedWidth;\n\t\t\t\timgMaxHeight = reducedWidth / naturalRatio;\n\t\t\t} else {\n\t\t\t\timgMaxWidth = imgMaxHeight * naturalRatio;\n\t\t\t}\n\t\t}\n\t\tcontainerWidth = imgMaxWidth;\n\t\tcontainerHeight = imgMaxHeight;\n\t\timgRatio = imgMaxWidth / imgMaxHeight;\n\n\t\t// Calculate the max size of the container.\n\t\tif ( originalRatio > imgRatio ) {\n\t\t\tcontainerMaxWidth = imgMaxWidth;\n\t\t\tcontainerMaxHeight = containerMaxWidth / originalRatio;\n\t\t} else {\n\t\t\tcontainerMaxHeight = imgMaxHeight;\n\t\t\tcontainerMaxWidth = containerMaxHeight * originalRatio;\n\t\t}\n\t}\n\n\t// If the image has been pixelated on purpose, keep that size.\n\tif ( originalWidth > containerWidth || originalHeight > containerHeight ) {\n\t\tcontainerWidth = originalWidth;\n\t\tcontainerHeight = originalHeight;\n\t}\n\n\t// Calculate the final lightbox image size and the\n\t// scale factor. MaxWidth is either the window container\n\t// (accounting for padding) or the image resolution.\n\tlet horizontalPadding = 0;\n\tif ( window.innerWidth > 480 ) {\n\t\thorizontalPadding = 80;\n\t} else if ( window.innerWidth > 1920 ) {\n\t\thorizontalPadding = 160;\n\t}\n\tconst verticalPadding = 80;\n\n\tconst targetMaxWidth = Math.min(\n\t\twindow.innerWidth - horizontalPadding,\n\t\tcontainerWidth\n\t);\n\tconst targetMaxHeight = Math.min(\n\t\twindow.innerHeight - verticalPadding,\n\t\tcontainerHeight\n\t);\n\tconst targetContainerRatio = targetMaxWidth / targetMaxHeight;\n\n\tif ( originalRatio > targetContainerRatio ) {\n\t\t// If targetMaxWidth is reached before targetMaxHeight\n\t\tcontainerWidth = targetMaxWidth;\n\t\tcontainerHeight = containerWidth / originalRatio;\n\t} else {\n\t\t// If targetMaxHeight is reached before targetMaxWidth\n\t\tcontainerHeight = targetMaxHeight;\n\t\tcontainerWidth = containerHeight * originalRatio;\n\t}\n\n\tconst containerScale = originalWidth / containerWidth;\n\tconst lightboxImgWidth =\n\t\timgMaxWidth * ( containerWidth / containerMaxWidth );\n\tconst lightboxImgHeight =\n\t\timgMaxHeight * ( containerHeight / containerMaxHeight );\n\n\t// Add the CSS variables needed.\n\tlet styleTag = document.getElementById( 'wp-lightbox-styles' );\n\tif ( ! styleTag ) {\n\t\tstyleTag = document.createElement( 'style' );\n\t\tstyleTag.id = 'wp-lightbox-styles';\n\t\tdocument.head.appendChild( styleTag );\n\t}\n\n\t// As of this writing, using the calculations above will render the lightbox\n\t// with a small, erroneous whitespace on the left side of the image in iOS Safari,\n\t// perhaps due to an inconsistency in how browsers handle absolute positioning and CSS\n\t// transformation. In any case, adding 1 pixel to the container width and height solves\n\t// the problem, though this can be removed if the issue is fixed in the future.\n\tstyleTag.innerHTML = `\n\t\t:root {\n\t\t\t--wp--lightbox-initial-top-position: ${ screenPosY }px;\n\t\t\t--wp--lightbox-initial-left-position: ${ screenPosX }px;\n\t\t\t--wp--lightbox-container-width: ${ containerWidth + 1 }px;\n\t\t\t--wp--lightbox-container-height: ${ containerHeight + 1 }px;\n\t\t\t--wp--lightbox-image-width: ${ lightboxImgWidth }px;\n\t\t\t--wp--lightbox-image-height: ${ lightboxImgHeight }px;\n\t\t\t--wp--lightbox-scale: ${ containerScale };\n\t\t\t--wp--lightbox-scrollbar-width: ${\n\t\t\t\twindow.innerWidth - document.documentElement.clientWidth\n\t\t\t}px;\n\t\t}\n\t`;\n}\n\n/*\n * Debounces a function call.\n *\n * @function\n * @param {Function} func - A function to be called\n * @param {number} wait - The time to wait before calling the function\n */\nfunction debounce( func, wait = 50 ) {\n\tlet timeout;\n\treturn () => {\n\t\tconst later = () => {\n\t\t\ttimeout = null;\n\t\t\tfunc();\n\t\t};\n\t\tclearTimeout( timeout );\n\t\ttimeout = setTimeout( later, wait );\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,QAAQ,0BAA0B;AAEhD,MAAMC,kBAAkB,GAAG,CAC1B,SAAS,EACT,YAAY,EACZ,+DAA+D,EAC/D,2CAA2C,EAC3C,6CAA6C,EAC7C,2CAA2C,EAC3C,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,mBAAmB,EACnB,iCAAiC,CACjC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,cAAc;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,UAAU,GAAG,KAAK;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,aAAa,GAAG,CAAC;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,YAAYA,CAAEC,OAAO,EAAG;EAChC;EACA;EACA;EACA,IAAK,CAAEH,UAAU,IAAII,IAAI,CAACC,GAAG,CAAC,CAAC,GAAGJ,aAAa,GAAG,GAAG,EAAG;IACvD;IACA;IACAK,MAAM,CAACC,QAAQ,CACdJ,OAAO,CAACK,IAAI,CAACC,KAAK,CAACC,eAAe,EAClCP,OAAO,CAACK,IAAI,CAACC,KAAK,CAACE,cACpB,CAAC;EACF;AACD;AAEAd,KAAK,CACJ;EACCe,KAAK,EAAE;IACNJ,IAAI,EAAE;MACLC,KAAK,EAAE;QACNI,WAAW,EAAEP,MAAM,CAACQ,UAAU;QAC9BC,YAAY,EAAET,MAAM,CAACU;MACtB;IACD;EACD,CAAC;EACDC,OAAO,EAAE;IACRT,IAAI,EAAE;MACLC,KAAK,EAAE;QACNS,YAAY,EAAEA,CAAE;UAAEf,OAAO;UAAEgB;QAAM,CAAC,KAAM;UACvC;UACA;UACA,IAAK,CAAEhB,OAAO,CAACK,IAAI,CAACC,KAAK,CAACW,WAAW,EAAG;YACvC;UACD;UACAjB,OAAO,CAACK,IAAI,CAACC,KAAK,CAACY,WAAW,GAAG,IAAI;UACrClB,OAAO,CAACK,IAAI,CAACC,KAAK,CAACa,kBAAkB,GACpChB,MAAM,CAACiB,QAAQ,CAACC,aAAa;UAC9BrB,OAAO,CAACK,IAAI,CAACC,KAAK,CAACgB,WAAW,GAAG,CAAC;UAClCtB,OAAO,CAACK,IAAI,CAACC,KAA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CAACmH,aAAa,CAAE,OAAQ,CAAC;IAC5CF,QAAQ,CAACG,EAAE,GAAG,oBAAoB;IAClCpH,QAAQ,CAACqH,IAAI,CAACC,WAAW,CAAEL,QAAS,CAAC;EACtC;;EAEA;EACA;EACA;EACA;EACA;EACAA,QAAQ,CAACM,SAAS,GAAI;AACvB;AACA,0CAA2CjC,UAAY;AACvD,2CAA4CF,UAAY;AACxD,qCAAsCc,cAAc,GAAG,CAAG;AAC1D,sCAAuCC,eAAe,GAAG,CAAG;AAC5D,iCAAkCY,gBAAkB;AACpD,kCAAmCC,iBAAmB;AACtD,2BAA4BF,cAAgB;AAC5C,qCACI/H,MAAM,CAACQ,UAAU,GAAGS,QAAQ,CAACQ,eAAe,CAACkD,WAC7C;AACJ;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASsB,QAAQA,CAAEwC,IAAI,EAAEC,IAAI,GAAG,EAAE,EAAG;EACpC,IAAIC,OAAO;EACX,OAAO,MAAM;IACZ,MAAMC,KAAK,GAAGA,CAAA,KAAM;MACnBD,OAAO,GAAG,IAAI;MACdF,IAAI,CAAC,CAAC;IACP,CAAC;IACDI,YAAY,CAAEF,OAAQ,CAAC;IACvBA,OAAO,GAAG1G,UAAU,CAAE2G,KAAK,EAAEF,IAAK,CAAC;EACpC,CAAC;AACF"}
|
|
@@ -17,7 +17,7 @@ export default function OverlayMenuPreview({
|
|
|
17
17
|
return createElement(Fragment, null, createElement(ToggleControl, {
|
|
18
18
|
__nextHasNoMarginBottom: true,
|
|
19
19
|
label: __('Show icon button'),
|
|
20
|
-
help: __('Configure the visual appearance of the button
|
|
20
|
+
help: __('Configure the visual appearance of the button that toggles the overlay menu.'),
|
|
21
21
|
onChange: value => setAttributes({
|
|
22
22
|
hasIcon: value
|
|
23
23
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ToggleControl","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","__","OverlayMenuIcon","OverlayMenuPreview","setAttributes","hasIcon","icon","createElement","Fragment","__nextHasNoMarginBottom","label","help","onChange","value","checked","isBlock"],"sources":["@wordpress/block-library/src/navigation/edit/overlay-menu-preview.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tToggleControl,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport OverlayMenuIcon from './overlay-menu-icon';\n\nexport default function OverlayMenuPreview( { setAttributes, hasIcon, icon } ) {\n\treturn (\n\t\t<>\n\t\t\t<ToggleControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Show icon button' ) }\n\t\t\t\thelp={ __(\n\t\t\t\t\t'Configure the visual appearance of the button
|
|
1
|
+
{"version":3,"names":["ToggleControl","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","__","OverlayMenuIcon","OverlayMenuPreview","setAttributes","hasIcon","icon","createElement","Fragment","__nextHasNoMarginBottom","label","help","onChange","value","checked","isBlock"],"sources":["@wordpress/block-library/src/navigation/edit/overlay-menu-preview.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tToggleControl,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport OverlayMenuIcon from './overlay-menu-icon';\n\nexport default function OverlayMenuPreview( { setAttributes, hasIcon, icon } ) {\n\treturn (\n\t\t<>\n\t\t\t<ToggleControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Show icon button' ) }\n\t\t\t\thelp={ __(\n\t\t\t\t\t'Configure the visual appearance of the button that toggles the overlay menu.'\n\t\t\t\t) }\n\t\t\t\tonChange={ ( value ) => setAttributes( { hasIcon: value } ) }\n\t\t\t\tchecked={ hasIcon }\n\t\t\t/>\n\n\t\t\t<ToggleGroupControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Icon' ) }\n\t\t\t\tvalue={ icon }\n\t\t\t\tonChange={ ( value ) => setAttributes( { icon: value } ) }\n\t\t\t\tisBlock\n\t\t\t>\n\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\tvalue=\"handle\"\n\t\t\t\t\taria-label={ __( 'handle' ) }\n\t\t\t\t\tlabel={ <OverlayMenuIcon icon=\"handle\" /> }\n\t\t\t\t/>\n\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\tvalue=\"menu\"\n\t\t\t\t\taria-label={ __( 'menu' ) }\n\t\t\t\t\tlabel={ <OverlayMenuIcon icon=\"menu\" /> }\n\t\t\t\t/>\n\t\t\t</ToggleGroupControl>\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,aAAa,EACbC,gCAAgC,IAAIC,kBAAkB,EACtDC,sCAAsC,IAAIC,wBAAwB,QAC5D,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,eAAe,MAAM,qBAAqB;AAEjD,eAAe,SAASC,kBAAkBA,CAAE;EAAEC,aAAa;EAAEC,OAAO;EAAEC;AAAK,CAAC,EAAG;EAC9E,OACCC,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACX,aAAa;IACba,uBAAuB;IACvBC,KAAK,EAAGT,EAAE,CAAE,kBAAmB,CAAG;IAClCU,IAAI,EAAGV,EAAE,CACR,8EACD,CAAG;IACHW,QAAQ,EAAKC,KAAK,IAAMT,aAAa,CAAE;MAAEC,OAAO,EAAEQ;IAAM,CAAE,CAAG;IAC7DC,OAAO,EAAGT;EAAS,CACnB,CAAC,EAEFE,aAAA,CAACT,kBAAkB;IAClBW,uBAAuB;IACvBC,KAAK,EAAGT,EAAE,CAAE,MAAO,CAAG;IACtBY,KAAK,EAAGP,IAAM;IACdM,QAAQ,EAAKC,KAAK,IAAMT,aAAa,CAAE;MAAEE,IAAI,EAAEO;IAAM,CAAE,CAAG;IAC1DE,OAAO;EAAA,GAEPR,aAAA,CAACP,wBAAwB;IACxBa,KAAK,EAAC,QAAQ;IACd,cAAaZ,EAAE,CAAE,QAAS,CAAG;IAC7BS,KAAK,EAAGH,aAAA,CAACL,eAAe;MAACI,IAAI,EAAC;IAAQ,CAAE;EAAG,CAC3C,CAAC,EACFC,aAAA,CAACP,wBAAwB;IACxBa,KAAK,EAAC,MAAM;IACZ,cAAaZ,EAAE,CAAE,MAAO,CAAG;IAC3BS,KAAK,EAAGH,aAAA,CAACL,eAAe;MAACI,IAAI,EAAC;IAAM,CAAE;EAAG,CACzC,CACkB,CACnB,CAAC;AAEL"}
|
|
@@ -36,6 +36,7 @@ export default function useTemplatePartAreaLabel(clientId) {
|
|
|
36
36
|
const definedAreas = select('core/editor').__experimentalGetDefaultTemplatePartAreas();
|
|
37
37
|
/* eslint-enable @wordpress/data-no-store-string-literals */
|
|
38
38
|
const {
|
|
39
|
+
getCurrentTheme,
|
|
39
40
|
getEditedEntityRecord
|
|
40
41
|
} = select(coreStore);
|
|
41
42
|
for (const templatePartClientId of parentTemplatePartClientIds) {
|
|
@@ -44,7 +45,7 @@ export default function useTemplatePartAreaLabel(clientId) {
|
|
|
44
45
|
// The 'area' usually isn't stored on the block, but instead
|
|
45
46
|
// on the entity.
|
|
46
47
|
const {
|
|
47
|
-
theme,
|
|
48
|
+
theme = getCurrentTheme()?.stylesheet,
|
|
48
49
|
slug
|
|
49
50
|
} = templatePartBlock.attributes;
|
|
50
51
|
const templatePartEntityId = createTemplatePartId(theme, slug);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["store","blockEditorStore","coreStore","useSelect","createTemplatePartId","useTemplatePartAreaLabel","clientId","select","getBlock","getBlockParentsByBlockName","withAscendingResults","parentTemplatePartClientIds","length","definedAreas","__experimentalGetDefaultTemplatePartAreas","getEditedEntityRecord","templatePartClientId","templatePartBlock","theme","slug","attributes","templatePartEntityId","templatePartEntity","area","find","definedArea","label"],"sources":["@wordpress/block-library/src/navigation/use-template-part-area-label.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\n\n// TODO: this util should perhaps be refactored somewhere like core-data.\nimport { createTemplatePartId } from '../template-part/edit/utils/create-template-part-id';\n\nexport default function useTemplatePartAreaLabel( clientId ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\t// Use the lack of a clientId as an opportunity to bypass the rest\n\t\t\t// of this hook.\n\t\t\tif ( ! clientId ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { getBlock, getBlockParentsByBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst withAscendingResults = true;\n\t\t\tconst parentTemplatePartClientIds = getBlockParentsByBlockName(\n\t\t\t\tclientId,\n\t\t\t\t'core/template-part',\n\t\t\t\twithAscendingResults\n\t\t\t);\n\n\t\t\tif ( ! parentTemplatePartClientIds?.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// FIXME: @wordpress/block-library should not depend on @wordpress/editor.\n\t\t\t// Blocks can be loaded into a *non-post* block editor.\n\t\t\t// This code is lifted from this file:\n\t\t\t// packages/block-library/src/template-part/edit/advanced-controls.js\n\t\t\t/* eslint-disable @wordpress/data-no-store-string-literals */\n\t\t\tconst definedAreas =\n\t\t\t\tselect(\n\t\t\t\t\t'core/editor'\n\t\t\t\t).__experimentalGetDefaultTemplatePartAreas();\n\t\t\t/* eslint-enable @wordpress/data-no-store-string-literals */\n\t\t\tconst { getEditedEntityRecord }
|
|
1
|
+
{"version":3,"names":["store","blockEditorStore","coreStore","useSelect","createTemplatePartId","useTemplatePartAreaLabel","clientId","select","getBlock","getBlockParentsByBlockName","withAscendingResults","parentTemplatePartClientIds","length","definedAreas","__experimentalGetDefaultTemplatePartAreas","getCurrentTheme","getEditedEntityRecord","templatePartClientId","templatePartBlock","theme","stylesheet","slug","attributes","templatePartEntityId","templatePartEntity","area","find","definedArea","label"],"sources":["@wordpress/block-library/src/navigation/use-template-part-area-label.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\n\n// TODO: this util should perhaps be refactored somewhere like core-data.\nimport { createTemplatePartId } from '../template-part/edit/utils/create-template-part-id';\n\nexport default function useTemplatePartAreaLabel( clientId ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\t// Use the lack of a clientId as an opportunity to bypass the rest\n\t\t\t// of this hook.\n\t\t\tif ( ! clientId ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { getBlock, getBlockParentsByBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst withAscendingResults = true;\n\t\t\tconst parentTemplatePartClientIds = getBlockParentsByBlockName(\n\t\t\t\tclientId,\n\t\t\t\t'core/template-part',\n\t\t\t\twithAscendingResults\n\t\t\t);\n\n\t\t\tif ( ! parentTemplatePartClientIds?.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// FIXME: @wordpress/block-library should not depend on @wordpress/editor.\n\t\t\t// Blocks can be loaded into a *non-post* block editor.\n\t\t\t// This code is lifted from this file:\n\t\t\t// packages/block-library/src/template-part/edit/advanced-controls.js\n\t\t\t/* eslint-disable @wordpress/data-no-store-string-literals */\n\t\t\tconst definedAreas =\n\t\t\t\tselect(\n\t\t\t\t\t'core/editor'\n\t\t\t\t).__experimentalGetDefaultTemplatePartAreas();\n\t\t\t/* eslint-enable @wordpress/data-no-store-string-literals */\n\t\t\tconst { getCurrentTheme, getEditedEntityRecord } =\n\t\t\t\tselect( coreStore );\n\n\t\t\tfor ( const templatePartClientId of parentTemplatePartClientIds ) {\n\t\t\t\tconst templatePartBlock = getBlock( templatePartClientId );\n\n\t\t\t\t// The 'area' usually isn't stored on the block, but instead\n\t\t\t\t// on the entity.\n\t\t\t\tconst { theme = getCurrentTheme()?.stylesheet, slug } =\n\t\t\t\t\ttemplatePartBlock.attributes;\n\t\t\t\tconst templatePartEntityId = createTemplatePartId(\n\t\t\t\t\ttheme,\n\t\t\t\t\tslug\n\t\t\t\t);\n\t\t\t\tconst templatePartEntity = getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_template_part',\n\t\t\t\t\ttemplatePartEntityId\n\t\t\t\t);\n\n\t\t\t\t// Look up the `label` for the area in the defined areas so\n\t\t\t\t// that an internationalized label can be used.\n\t\t\t\tif ( templatePartEntity?.area ) {\n\t\t\t\t\treturn definedAreas.find(\n\t\t\t\t\t\t( definedArea ) =>\n\t\t\t\t\t\t\tdefinedArea.area !== 'uncategorized' &&\n\t\t\t\t\t\t\tdefinedArea.area === templatePartEntity.area\n\t\t\t\t\t)?.label;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[ clientId ]\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;AACnE,SAASD,KAAK,IAAIE,SAAS,QAAQ,sBAAsB;AACzD,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;;AAEA;AACA,SAASC,oBAAoB,QAAQ,qDAAqD;AAE1F,eAAe,SAASC,wBAAwBA,CAAEC,QAAQ,EAAG;EAC5D,OAAOH,SAAS,CACbI,MAAM,IAAM;IACb;IACA;IACA,IAAK,CAAED,QAAQ,EAAG;MACjB;IACD;IAEA,MAAM;MAAEE,QAAQ;MAAEC;IAA2B,CAAC,GAC7CF,MAAM,CAAEN,gBAAiB,CAAC;IAE3B,MAAMS,oBAAoB,GAAG,IAAI;IACjC,MAAMC,2BAA2B,GAAGF,0BAA0B,CAC7DH,QAAQ,EACR,oBAAoB,EACpBI,oBACD,CAAC;IAED,IAAK,CAAEC,2BAA2B,EAAEC,MAAM,EAAG;MAC5C;IACD;;IAEA;IACA;IACA;IACA;IACA;IACA,MAAMC,YAAY,GACjBN,MAAM,CACL,aACD,CAAC,CAACO,yCAAyC,CAAC,CAAC;IAC9C;IACA,MAAM;MAAEC,eAAe;MAAEC;IAAsB,CAAC,GAC/CT,MAAM,CAAEL,SAAU,CAAC;IAEpB,KAAM,MAAMe,oBAAoB,IAAIN,2BAA2B,EAAG;MACjE,MAAMO,iBAAiB,GAAGV,QAAQ,CAAES,oBAAqB,CAAC;;MAE1D;MACA;MACA,MAAM;QAAEE,KAAK,GAAGJ,eAAe,CAAC,CAAC,EAAEK,UAAU;QAAEC;MAAK,CAAC,GACpDH,iBAAiB,CAACI,UAAU;MAC7B,MAAMC,oBAAoB,GAAGnB,oBAAoB,CAChDe,KAAK,EACLE,IACD,CAAC;MACD,MAAMG,kBAAkB,GAAGR,qBAAqB,CAC/C,UAAU,EACV,kBAAkB,EAClBO,oBACD,CAAC;;MAED;MACA;MACA,IAAKC,kBAAkB,EAAEC,IAAI,EAAG;QAC/B,OAAOZ,YAAY,CAACa,IAAI,CACrBC,WAAW,IACZA,WAAW,CAACF,IAAI,KAAK,eAAe,IACpCE,WAAW,CAACF,IAAI,KAAKD,kBAAkB,CAACC,IAC1C,CAAC,EAAEG,KAAK;MACT;IACD;EACD,CAAC,EACD,CAAEtB,QAAQ,CACX,CAAC;AACF"}
|
|
@@ -13,7 +13,7 @@ import { PanelBody, TextControl, TextareaControl, ToolbarButton, Tooltip, Toolba
|
|
|
13
13
|
import { displayShortcut, isKeyboardEvent, ENTER } from '@wordpress/keycodes';
|
|
14
14
|
import { __ } from '@wordpress/i18n';
|
|
15
15
|
import { BlockControls, InspectorControls, RichText, useBlockProps, store as blockEditorStore, getColorClassName, useInnerBlocksProps } from '@wordpress/block-editor';
|
|
16
|
-
import { isURL, prependHTTP } from '@wordpress/url';
|
|
16
|
+
import { isURL, prependHTTP, safeDecodeURI } from '@wordpress/url';
|
|
17
17
|
import { useState, useEffect, useRef } from '@wordpress/element';
|
|
18
18
|
import { placeCaretAtHorizontalEdge, __unstableStripHTML as stripHTML } from '@wordpress/dom';
|
|
19
19
|
import { decodeEntities } from '@wordpress/html-entities';
|
|
@@ -358,7 +358,7 @@ export default function NavigationLinkEdit({
|
|
|
358
358
|
onBlur: () => setIsLabelFieldFocused(false)
|
|
359
359
|
}), createElement(TextControl, {
|
|
360
360
|
__nextHasNoMarginBottom: true,
|
|
361
|
-
value: url
|
|
361
|
+
value: url ? safeDecodeURI(url) : '',
|
|
362
362
|
onChange: urlValue => {
|
|
363
363
|
updateAttributes({
|
|
364
364
|
url: urlValue
|