UNPKG

@wordpress/block-library

Version:
8 lines (7 loc) 18.3 kB
{ "version": 3, "sources": ["../../src/image/transforms.js"], "sourcesContent": ["import { createBlobURL, isBlobURL } from '@wordpress/blob';\nimport { createBlock, getBlockAttributes } from '@wordpress/blocks';\nimport { select } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Returns the subset of block attributes that should be carried over when\n * converting an animated-GIF Image block into its converted Video block.\n *\n * The conversion swaps one block for another via `createBlock`, which would\n * otherwise drop everything the author set on the original block. This carries\n * the attributes both blocks support: block alignment, the HTML anchor, custom\n * class names, and margin spacing.\n *\n * Image-only attributes such as links (`href`/`linkDestination`), sizing\n * (`sizeSlug`/`scale`), and `border`/`shadow` styles are intentionally not\n * carried: the Video block has no equivalent, so copying them would leave\n * attributes the target block cannot represent.\n *\n * @param {Object} attributes Source block attributes.\n * @return {Object} Attributes to spread into the converted block.\n */\nfunction getCarriedGifConversionAttributes( attributes ) {\n\tconst { align, anchor, className, style } = attributes;\n\tconst margin = style?.spacing?.margin;\n\n\treturn {\n\t\t...( align && { align } ),\n\t\t...( anchor && { anchor } ),\n\t\t...( className && { className } ),\n\t\t...( margin && { style: { spacing: { margin } } } ),\n\t};\n}\n\n/**\n * Returns the sideloaded video companion of an animated GIF image attachment,\n * or `null` when the media is not a converted animated GIF.\n *\n * An animated GIF uploaded through the editor gets a muted, looping video\n * transcode sideloaded next to it and recorded (as basenames) in the\n * attachment's `media_details.animated_video` / `animated_video_poster`.\n *\n * Block transforms match and run synchronously, so this reads the attachment\n * record straight from the core-data store: it only returns the companion once\n * the record is resolved. The Image block resolves the record while the block\n * is selected, which is also when the block switcher can offer the transform.\n *\n * @param {number} id Image attachment ID.\n * @param {string} url Image block URL, used to cheaply skip non-GIF media.\n * @return {Object|null} Companion details (absolute `src`/`poster` URLs and\n * the GIF's intrinsic `width`/`height`), or `null`.\n */\nfunction getAnimatedGifVideoCompanion( id, url ) {\n\tif ( ! id ) {\n\t\treturn null;\n\t}\n\t/*\n\t * Only animated GIFs have a video companion. Gate on the `.gif` extension\n\t * so an ordinary image never reaches into the attachment record just to\n\t * discover it has no companion. Strip any query string or fragment first\n\t * so a URL like `cat.gif?ver=2` still matches.\n\t */\n\tconst urlPath = url?.split( /[?#]/ )[ 0 ];\n\tif ( ! urlPath?.toLowerCase().endsWith( '.gif' ) ) {\n\t\treturn null;\n\t}\n\tconst record = select( coreStore ).getEntityRecord(\n\t\t'postType',\n\t\t'attachment',\n\t\tid,\n\t\t{ context: 'view' }\n\t);\n\tconst details = record?.media_details;\n\tif ( ! details?.animated_video || ! record?.source_url ) {\n\t\treturn null;\n\t}\n\t// Companion files are sideloaded next to the GIF, so they share its\n\t// directory; build their URLs from the GIF's own source URL.\n\tconst dir = record.source_url.slice(\n\t\t0,\n\t\trecord.source_url.lastIndexOf( '/' ) + 1\n\t);\n\treturn {\n\t\tsrc: dir + details.animated_video,\n\t\tposter: details.animated_video_poster\n\t\t\t? dir + details.animated_video_poster\n\t\t\t: undefined,\n\t\twidth: details.width,\n\t\theight: details.height,\n\t};\n}\n\nexport function stripFirstImage( attributes, { shortcode } ) {\n\tconst { body } = document.implementation.createHTMLDocument( '' );\n\n\tbody.innerHTML = shortcode.content;\n\n\tlet nodeToRemove = body.querySelector( 'img' );\n\n\t// If an image has parents, find the topmost node to remove.\n\twhile (\n\t\tnodeToRemove &&\n\t\tnodeToRemove.parentNode &&\n\t\tnodeToRemove.parentNode !== body\n\t) {\n\t\tnodeToRemove = nodeToRemove.parentNode;\n\t}\n\n\tif ( nodeToRemove ) {\n\t\tnodeToRemove.parentNode.removeChild( nodeToRemove );\n\t}\n\n\treturn body.innerHTML.trim();\n}\n\nfunction getFirstAnchorAttributeFormHTML( html, attributeName ) {\n\tconst { body } = document.implementation.createHTMLDocument( '' );\n\n\tbody.innerHTML = html;\n\n\tconst { firstElementChild } = body;\n\n\tif ( firstElementChild && firstElementChild.nodeName === 'A' ) {\n\t\treturn firstElementChild.getAttribute( attributeName ) || undefined;\n\t}\n}\n\nconst imageSchema = {\n\timg: {\n\t\tattributes: [ 'src', 'alt', 'title', 'width', 'height' ],\n\t\tclasses: [\n\t\t\t'alignleft',\n\t\t\t'aligncenter',\n\t\t\t'alignright',\n\t\t\t'alignnone',\n\t\t\t/^wp-image-\\d+$/,\n\t\t],\n\t},\n};\n\n// Normalise an `<img>` pixel dimension attribute to the `<value>px` form the\n// Image block stores in its `width`/`height` attributes. Non-integer values\n// (e.g. `50%`) are dropped because the attribute round-trips through inline\n// styles that expect pixel units.\nfunction parsePixelDimension( value ) {\n\treturn value && /^\\d+$/.test( value ) ? `${ value }px` : undefined;\n}\n\nconst schema = ( { phrasingContentSchema } ) => ( {\n\tfigure: {\n\t\trequire: [ 'img' ],\n\t\tchildren: {\n\t\t\t...imageSchema,\n\t\t\ta: {\n\t\t\t\tattributes: [ 'href', 'rel', 'target' ],\n\t\t\t\tclasses: [ '*' ],\n\t\t\t\tchildren: imageSchema,\n\t\t\t},\n\t\t\tfigcaption: {\n\t\t\t\tchildren: phrasingContentSchema,\n\t\t\t},\n\t\t},\n\t},\n} );\n\nconst transforms = {\n\tfrom: [\n\t\t{\n\t\t\ttype: 'raw',\n\t\t\tisMatch: ( node ) =>\n\t\t\t\tnode.nodeName === 'FIGURE' && !! node.querySelector( 'img' ),\n\t\t\tschema,\n\t\t\ttransform: ( node ) => {\n\t\t\t\tconst img = node.querySelector( 'img' );\n\t\t\t\t// Search both figure and image classes. Alignment could be\n\t\t\t\t// set on either. ID is set on the image.\n\t\t\t\tconst className = node.className + ' ' + img.className;\n\t\t\t\tconst alignMatches =\n\t\t\t\t\t/(?:^|\\s)align(left|center|right)(?:$|\\s)/.exec(\n\t\t\t\t\t\tclassName\n\t\t\t\t\t);\n\t\t\t\tconst anchor = node.id === '' ? undefined : node.id;\n\t\t\t\tconst align = alignMatches ? alignMatches[ 1 ] : undefined;\n\t\t\t\tconst idMatches = /(?:^|\\s)wp-image-(\\d+)(?:$|\\s)/.exec(\n\t\t\t\t\tclassName\n\t\t\t\t);\n\t\t\t\tconst id = idMatches ? Number( idMatches[ 1 ] ) : undefined;\n\t\t\t\tconst anchorElement = node.querySelector( 'a' );\n\t\t\t\tconst linkDestination =\n\t\t\t\t\tanchorElement && anchorElement.href ? 'custom' : undefined;\n\t\t\t\tconst href =\n\t\t\t\t\tanchorElement && anchorElement.href\n\t\t\t\t\t\t? anchorElement.href\n\t\t\t\t\t\t: undefined;\n\t\t\t\tconst rel =\n\t\t\t\t\tanchorElement && anchorElement.rel\n\t\t\t\t\t\t? anchorElement.rel\n\t\t\t\t\t\t: undefined;\n\t\t\t\tconst linkClass =\n\t\t\t\t\tanchorElement && anchorElement.className\n\t\t\t\t\t\t? anchorElement.className\n\t\t\t\t\t\t: undefined;\n\t\t\t\t// Pin only one dimension and let the other follow the aspect\n\t\t\t\t// ratio via `auto`. Pinning both as fixed pixels stretches the\n\t\t\t\t// image when a theme caps the width while the height stays\n\t\t\t\t// fixed. So width sources use `height: 'auto'`; height-only\n\t\t\t\t// sources use `width: 'auto'`.\n\t\t\t\tconst widthValue = parsePixelDimension(\n\t\t\t\t\timg.getAttribute( 'width' )\n\t\t\t\t);\n\t\t\t\tconst heightValue = parsePixelDimension(\n\t\t\t\t\timg.getAttribute( 'height' )\n\t\t\t\t);\n\t\t\t\t// When both dimensions are declared, preserve the source's\n\t\t\t\t// shape via `aspectRatio` (mirroring the resize handle). CSS\n\t\t\t\t// `aspect-ratio` needs no fixed dimensions, so the image keeps\n\t\t\t\t// its proportions even when the `src` can't resolve to natural\n\t\t\t\t// dimensions (e.g. an empty or blob `src`) — without it the\n\t\t\t\t// `height: 'auto'` would collapse to `0`.\n\t\t\t\t// `parseInt` is `NaN` for an absent dimension and `0` for a\n\t\t\t\t// zero one (both falsy), so a bogus ratio is never stored.\n\t\t\t\tconst widthNumber = parseInt( widthValue, 10 );\n\t\t\t\tconst heightNumber = parseInt( heightValue, 10 );\n\t\t\t\tconst aspectRatio =\n\t\t\t\t\twidthNumber && heightNumber\n\t\t\t\t\t\t? String( widthNumber / heightNumber )\n\t\t\t\t\t\t: undefined;\n\t\t\t\t// A height-only source declares a single dimension, so it can't\n\t\t\t\t// carry an aspect ratio: `width: 'auto'` is capped by\n\t\t\t\t// `max-width: 100%` while the fixed height can still stretch a\n\t\t\t\t// wide source. This is a known edge case (a panoramic image\n\t\t\t\t// pinned by height only) left unsolved here.\n\t\t\t\tconst width =\n\t\t\t\t\twidthValue || ( heightValue ? 'auto' : undefined );\n\t\t\t\tconst height = widthValue ? 'auto' : heightValue;\n\t\t\t\tconst attributes = getBlockAttributes(\n\t\t\t\t\t'core/image',\n\t\t\t\t\tnode.outerHTML,\n\t\t\t\t\t{\n\t\t\t\t\t\talign,\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tlinkDestination,\n\t\t\t\t\t\thref,\n\t\t\t\t\t\trel,\n\t\t\t\t\t\tlinkClass,\n\t\t\t\t\t\tanchor,\n\t\t\t\t\t\twidth,\n\t\t\t\t\t\theight,\n\t\t\t\t\t\taspectRatio,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tif ( isBlobURL( attributes.url ) ) {\n\t\t\t\t\tattributes.blob = attributes.url;\n\t\t\t\t\tdelete attributes.url;\n\t\t\t\t}\n\n\t\t\t\treturn createBlock( 'core/image', attributes );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t// Note: when dragging and dropping multiple files onto a gallery this overrides the\n\t\t\t// gallery transform in order to add new images to the gallery instead of\n\t\t\t// creating a new gallery.\n\t\t\ttype: 'files',\n\t\t\tisMatch( files ) {\n\t\t\t\treturn files.every(\n\t\t\t\t\t( file ) => file.type.indexOf( 'image/' ) === 0\n\t\t\t\t);\n\t\t\t},\n\t\t\ttransform( files ) {\n\t\t\t\tconst blocks = files.map( ( file ) => {\n\t\t\t\t\treturn createBlock( 'core/image', {\n\t\t\t\t\t\tblob: createBlobURL( file ),\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t\treturn blocks;\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: 'shortcode',\n\t\t\ttag: 'caption',\n\t\t\tattributes: {\n\t\t\t\turl: {\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tsource: 'attribute',\n\t\t\t\t\tattribute: 'src',\n\t\t\t\t\tselector: 'img',\n\t\t\t\t},\n\t\t\t\talt: {\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tsource: 'attribute',\n\t\t\t\t\tattribute: 'alt',\n\t\t\t\t\tselector: 'img',\n\t\t\t\t},\n\t\t\t\tcaption: {\n\t\t\t\t\tshortcode: stripFirstImage,\n\t\t\t\t},\n\t\t\t\thref: {\n\t\t\t\t\tshortcode: ( attributes, { shortcode } ) => {\n\t\t\t\t\t\treturn getFirstAnchorAttributeFormHTML(\n\t\t\t\t\t\t\tshortcode.content,\n\t\t\t\t\t\t\t'href'\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\trel: {\n\t\t\t\t\tshortcode: ( attributes, { shortcode } ) => {\n\t\t\t\t\t\treturn getFirstAnchorAttributeFormHTML(\n\t\t\t\t\t\t\tshortcode.content,\n\t\t\t\t\t\t\t'rel'\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tlinkClass: {\n\t\t\t\t\tshortcode: ( attributes, { shortcode } ) => {\n\t\t\t\t\t\treturn getFirstAnchorAttributeFormHTML(\n\t\t\t\t\t\t\tshortcode.content,\n\t\t\t\t\t\t\t'class'\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tid: {\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\tshortcode: ( { named: { id } } ) => {\n\t\t\t\t\t\tif ( ! id ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn parseInt( id.replace( 'attachment_', '' ), 10 );\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\talign: {\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tshortcode: ( { named: { align = 'alignnone' } } ) => {\n\t\t\t\t\t\treturn align.replace( 'align', '' );\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t],\n\tto: [\n\t\t{\n\t\t\t// Offer converting an animated GIF into the Video block's \"GIF\"\n\t\t\t// variation: a muted, looping, autoplaying video transcoded from\n\t\t\t// the GIF and sideloaded next to it when it was uploaded. Only\n\t\t\t// matches when that companion video exists, so ordinary images\n\t\t\t// never see this transform.\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/video' ],\n\t\t\tisMatch: ( { id, url } ) =>\n\t\t\t\t!! getAnimatedGifVideoCompanion( id, url ),\n\t\t\ttransform( attributes ) {\n\t\t\t\tconst { id, url, caption } = attributes;\n\t\t\t\tconst companion = getAnimatedGifVideoCompanion( id, url );\n\n\t\t\t\treturn createBlock( 'core/video', {\n\t\t\t\t\t...getCarriedGifConversionAttributes( attributes ),\n\t\t\t\t\tid,\n\t\t\t\t\tsrc: companion.src,\n\t\t\t\t\tposter: companion.poster,\n\t\t\t\t\tcaption,\n\t\t\t\t\tcontrols: false,\n\t\t\t\t\tloop: true,\n\t\t\t\t\tautoplay: true,\n\t\t\t\t\tmuted: true,\n\t\t\t\t\tplaysInline: true,\n\t\t\t\t\t/*\n\t\t\t\t\t * Carry the GIF's intrinsic dimensions so the <video>\n\t\t\t\t\t * keeps its aspect ratio from the first paint. Without\n\t\t\t\t\t * them the element collapses to the browser-default size\n\t\t\t\t\t * and then jumps once the poster/metadata load, which\n\t\t\t\t\t * shows up as a brief duplicated image during the swap.\n\t\t\t\t\t */\n\t\t\t\t\twidth: companion.width,\n\t\t\t\t\theight: companion.height,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t],\n};\n\nexport default transforms;\n"], "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAyC;AACzC,oBAAgD;AAChD,kBAAuB;AAC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