@wordpress/components
Version:
UI components for WordPress.
1 lines • 18.2 kB
Source Map (JSON)
{"version":3,"file":"hook.mjs","names":["styles"],"sources":["../../../style-runtime/src/index.ts","../../src/grid/style.module.scss","../../src/grid/hook.ts"],"sourcesContent":["type GlobalScopeWithStyleRuntime = typeof globalThis & {\n\t// This global is shared by separately bundled copies of this package.\n\t// Keep its shape backward compatible after release.\n\t__wpStyleRuntime?: {\n\t\tdocuments: Map< Document, number >;\n\t\tstyles: Map< string, string >;\n\t\tinjectedStyles: WeakMap< Document, Set< string > >;\n\t};\n};\n\nconst STYLE_HASH_ATTRIBUTE = 'data-wp-hash';\n\n/**\n * Returns the shared style runtime registry.\n *\n * The registry is stored on `globalThis` so separately bundled copies of this\n * package can coordinate through the same document and style maps.\n *\n * @return The shared runtime registry.\n */\nfunction getRuntime() {\n\tconst globalScope = globalThis as GlobalScopeWithStyleRuntime;\n\n\tif ( globalScope.__wpStyleRuntime ) {\n\t\treturn globalScope.__wpStyleRuntime;\n\t}\n\n\tglobalScope.__wpStyleRuntime = {\n\t\tdocuments: new Map(),\n\t\tstyles: new Map(),\n\t\tinjectedStyles: new WeakMap(),\n\t};\n\n\tif ( typeof document !== 'undefined' ) {\n\t\tregisterDocument( document );\n\t}\n\n\treturn globalScope.__wpStyleRuntime;\n}\n\n/**\n * Checks whether a document already contains a style tag for a hash.\n *\n * @param targetDocument Document to inspect.\n * @param hash Stable hash for the transformed CSS.\n *\n * @return Whether the style hash already exists in the document.\n */\nfunction documentContainsStyleHash(\n\ttargetDocument: Document,\n\thash: string\n): boolean {\n\tif ( ! targetDocument.head ) {\n\t\treturn false;\n\t}\n\n\tfor ( const style of targetDocument.head.querySelectorAll(\n\t\t`style[${ STYLE_HASH_ATTRIBUTE }]`\n\t) ) {\n\t\tif ( style.getAttribute( STYLE_HASH_ATTRIBUTE ) === hash ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\n/**\n * Injects a registered style into a document, unless that document already\n * contains a style tag for the same hash.\n *\n * @param targetDocument Document to inject the style into.\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nfunction injectStyle( targetDocument: Document, hash: string, css: string ) {\n\tif ( ! targetDocument.head ) {\n\t\treturn;\n\t}\n\n\tconst runtime = getRuntime();\n\tlet injectedStyles = runtime.injectedStyles.get( targetDocument );\n\n\tif ( ! injectedStyles ) {\n\t\tinjectedStyles = new Set();\n\t\truntime.injectedStyles.set( targetDocument, injectedStyles );\n\t}\n\n\tif ( injectedStyles.has( hash ) ) {\n\t\treturn;\n\t}\n\n\t// Older generated CSS module output can still inject matching style tags\n\t// after this document's cache is created, so keep the DOM as the fallback\n\t// source of truth on cache misses.\n\tif ( documentContainsStyleHash( targetDocument, hash ) ) {\n\t\tinjectedStyles.add( hash );\n\t\treturn;\n\t}\n\n\tconst style = targetDocument.createElement( 'style' );\n\tstyle.setAttribute( STYLE_HASH_ATTRIBUTE, hash );\n\tstyle.appendChild( targetDocument.createTextNode( css ) );\n\ttargetDocument.head.appendChild( style );\n\tinjectedStyles.add( hash );\n}\n\n/**\n * Registers a document as a style injection target.\n *\n * Existing registered styles are replayed into the document immediately.\n * Documents are reference-counted so multiple providers can safely register the\n * same document without one cleanup removing it while another registration is\n * still active.\n *\n * @param targetDocument Document to receive registered styles.\n * @return Cleanup function that unregisters this document registration.\n */\nexport function registerDocument( targetDocument: Document ) {\n\tconst runtime = getRuntime();\n\n\truntime.documents.set(\n\t\ttargetDocument,\n\t\t( runtime.documents.get( targetDocument ) ?? 0 ) + 1\n\t);\n\n\tfor ( const [ hash, css ] of runtime.styles ) {\n\t\tinjectStyle( targetDocument, hash, css );\n\t}\n\n\treturn () => {\n\t\tconst count = runtime.documents.get( targetDocument );\n\n\t\tif ( count === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( count <= 1 ) {\n\t\t\truntime.documents.delete( targetDocument );\n\t\t\treturn;\n\t\t}\n\n\t\truntime.documents.set( targetDocument, count - 1 );\n\t};\n}\n\n/**\n * Registers a style and injects it into all registered documents.\n *\n * The hash is used as the deduplication key, so calling this repeatedly with\n * the same hash will not add duplicate style tags to a document.\n * Registered styles are retained for the lifetime of the page so they can be\n * replayed into documents that are registered later.\n *\n * @param hash Stable hash for the transformed CSS.\n * @param css CSS text to inject.\n */\nexport function registerStyle( hash: string, css: string ) {\n\tconst runtime = getRuntime();\n\n\truntime.styles.set( hash, css );\n\n\tfor ( const targetDocument of runtime.documents.keys() ) {\n\t\tinjectStyle( targetDocument, hash, css );\n\t}\n}\n","import { registerStyle } from '@wordpress/style-runtime';\nif (typeof process === 'undefined' || process.env.NODE_ENV !== 'test') {\n\tregisterStyle(\"b1a8e206b7\", \".ad3e2e48d7abbecd__grid{--wp-components-grid-align:initial;--wp-components-grid-justify:initial;--wp-components-grid-gap:initial;--wp-components-grid-template-columns:initial;--wp-components-grid-template-rows:initial;--wp-components-grid-row-gap:initial;--wp-components-grid-column-gap:initial;display:grid}.ad3e2e48d7abbecd__grid:not(:where(._519ed3f6107b2f0e__row-gap-inherit,.cd62b95f8b7a55ca__row-gap-initial,._226744df7703790b__row-gap-unset,._372e9fe7fa60a162__row-gap-revert,.a788bb6771f557d4__row-gap-revert-layer)){row-gap:var(--wp-components-grid-row-gap,calc(4px*var(--wp-components-grid-gap)))}.ad3e2e48d7abbecd__grid:not(:where(.c811e15146756906__column-gap-inherit,._17d3c2ea7daf9367__column-gap-initial,._595e6195481b9016__column-gap-unset,.a3ecb3e47731c19e__column-gap-revert,._7c87cfbf3c22f476__column-gap-revert-layer)){column-gap:var(--wp-components-grid-column-gap,calc(4px*var(--wp-components-grid-gap)))}._25a972dc3223dff3__has-align:not(:where(._3cda38ca04ad4eb9__align-inherit,.f1d7342c52a8cb04__align-initial,._0d1a6c7ee990f351__align-unset,._57c7b85e7abf618b__align-revert,._82cb0c4950962787__align-revert-layer)){align-items:var(--wp-components-grid-align)}._801d1214723237b8__has-justify:not(:where(.b83c5dbf3264515b__justify-inherit,._5b7394b39d69670e__justify-initial,._3e7f0418752602e5__justify-unset,._5f937df46d7b2259__justify-revert,.bf2a4718a1ddba5c__justify-revert-layer)){justify-content:var(--wp-components-grid-justify)}._3c6ac9820776f1cb__has-template-columns:not(:where(._35faa4d32eedef32__template-columns-inherit,._8150cadb3f438833__template-columns-initial,.bcd5f2b096dec164__template-columns-unset,._48d047bc6fb687b8__template-columns-revert,._93f250669aa1a5a7__template-columns-revert-layer)){grid-template-columns:var(--wp-components-grid-template-columns)}.c2703b6b15e69b82__has-template-rows:not(:where(._3e9d5ffc53e4afc0__template-rows-inherit,._64bb5fbdf6d1038a__template-rows-initial,.f8f5df7043222325__template-rows-unset,._408aaf58100e60d5__template-rows-revert,.e0730d6abf0f3d2a__template-rows-revert-layer)){grid-template-rows:var(--wp-components-grid-template-rows)}._43af1cbfad3e73dd__is-inline{display:inline-grid;vertical-align:middle}._3cda38ca04ad4eb9__align-inherit{align-items:inherit}.f1d7342c52a8cb04__align-initial{align-items:normal}._0d1a6c7ee990f351__align-unset{align-items:unset}._57c7b85e7abf618b__align-revert{align-items:revert}._82cb0c4950962787__align-revert-layer{align-items:revert-layer}.b83c5dbf3264515b__justify-inherit{justify-content:inherit}._5b7394b39d69670e__justify-initial{justify-content:normal}._3e7f0418752602e5__justify-unset{justify-content:unset}._5f937df46d7b2259__justify-revert{justify-content:revert}.bf2a4718a1ddba5c__justify-revert-layer{justify-content:revert-layer}._35faa4d32eedef32__template-columns-inherit{grid-template-columns:inherit}._8150cadb3f438833__template-columns-initial{grid-template-columns:none}.bcd5f2b096dec164__template-columns-unset{grid-template-columns:unset}._48d047bc6fb687b8__template-columns-revert{grid-template-columns:revert}._93f250669aa1a5a7__template-columns-revert-layer{grid-template-columns:revert-layer}._3e9d5ffc53e4afc0__template-rows-inherit{grid-template-rows:inherit}._64bb5fbdf6d1038a__template-rows-initial{grid-template-rows:none}.f8f5df7043222325__template-rows-unset{grid-template-rows:unset}._408aaf58100e60d5__template-rows-revert{grid-template-rows:revert}.e0730d6abf0f3d2a__template-rows-revert-layer{grid-template-rows:revert-layer}._519ed3f6107b2f0e__row-gap-inherit{row-gap:inherit}.cd62b95f8b7a55ca__row-gap-initial{row-gap:normal}._226744df7703790b__row-gap-unset{row-gap:unset}._372e9fe7fa60a162__row-gap-revert{row-gap:revert}.a788bb6771f557d4__row-gap-revert-layer{row-gap:revert-layer}.c811e15146756906__column-gap-inherit{column-gap:inherit}._17d3c2ea7daf9367__column-gap-initial{column-gap:normal}._595e6195481b9016__column-gap-unset{column-gap:unset}.a3ecb3e47731c19e__column-gap-revert{column-gap:revert}._7c87cfbf3c22f476__column-gap-revert-layer{column-gap:revert-layer}\");\n}\nexport default {\"grid\":\"ad3e2e48d7abbecd__grid\",\"row-gap-inherit\":\"_519ed3f6107b2f0e__row-gap-inherit\",\"row-gap-initial\":\"cd62b95f8b7a55ca__row-gap-initial\",\"row-gap-unset\":\"_226744df7703790b__row-gap-unset\",\"row-gap-revert\":\"_372e9fe7fa60a162__row-gap-revert\",\"row-gap-revert-layer\":\"a788bb6771f557d4__row-gap-revert-layer\",\"column-gap-inherit\":\"c811e15146756906__column-gap-inherit\",\"column-gap-initial\":\"_17d3c2ea7daf9367__column-gap-initial\",\"column-gap-unset\":\"_595e6195481b9016__column-gap-unset\",\"column-gap-revert\":\"a3ecb3e47731c19e__column-gap-revert\",\"column-gap-revert-layer\":\"_7c87cfbf3c22f476__column-gap-revert-layer\",\"has-align\":\"_25a972dc3223dff3__has-align\",\"align-inherit\":\"_3cda38ca04ad4eb9__align-inherit\",\"align-initial\":\"f1d7342c52a8cb04__align-initial\",\"align-unset\":\"_0d1a6c7ee990f351__align-unset\",\"align-revert\":\"_57c7b85e7abf618b__align-revert\",\"align-revert-layer\":\"_82cb0c4950962787__align-revert-layer\",\"has-justify\":\"_801d1214723237b8__has-justify\",\"justify-inherit\":\"b83c5dbf3264515b__justify-inherit\",\"justify-initial\":\"_5b7394b39d69670e__justify-initial\",\"justify-unset\":\"_3e7f0418752602e5__justify-unset\",\"justify-revert\":\"_5f937df46d7b2259__justify-revert\",\"justify-revert-layer\":\"bf2a4718a1ddba5c__justify-revert-layer\",\"has-template-columns\":\"_3c6ac9820776f1cb__has-template-columns\",\"template-columns-inherit\":\"_35faa4d32eedef32__template-columns-inherit\",\"template-columns-initial\":\"_8150cadb3f438833__template-columns-initial\",\"template-columns-unset\":\"bcd5f2b096dec164__template-columns-unset\",\"template-columns-revert\":\"_48d047bc6fb687b8__template-columns-revert\",\"template-columns-revert-layer\":\"_93f250669aa1a5a7__template-columns-revert-layer\",\"has-template-rows\":\"c2703b6b15e69b82__has-template-rows\",\"template-rows-inherit\":\"_3e9d5ffc53e4afc0__template-rows-inherit\",\"template-rows-initial\":\"_64bb5fbdf6d1038a__template-rows-initial\",\"template-rows-unset\":\"f8f5df7043222325__template-rows-unset\",\"template-rows-revert\":\"_408aaf58100e60d5__template-rows-revert\",\"template-rows-revert-layer\":\"e0730d6abf0f3d2a__template-rows-revert-layer\",\"is-inline\":\"_43af1cbfad3e73dd__is-inline\"};\n","import clsx from 'clsx';\nimport type { WordPressComponentProps } from '../context';\nimport { useContextSystem } from '../context';\nimport { getAlignmentProps } from './utils';\nimport { useResponsiveValue } from '../utils/use-responsive-value';\nimport type { GridProps } from './types';\nimport styles from './style.module.scss';\n\nconst CSS_WIDE_KEYWORDS = new Set( [\n\t'inherit',\n\t'initial',\n\t'unset',\n\t'revert',\n\t'revert-layer',\n] );\n\nfunction toCSSValue( value: string | number | undefined ) {\n\treturn typeof value === 'number'\n\t\t? `${ value }px`\n\t\t: value?.trim() || undefined;\n}\n\nexport default function useGrid(\n\tprops: WordPressComponentProps< GridProps, 'div' >\n) {\n\tconst {\n\t\talign,\n\t\talignment,\n\t\tclassName,\n\t\tcolumnGap,\n\t\tcolumns = 2,\n\t\tgap = 3,\n\t\tisInline = false,\n\t\tjustify,\n\t\trowGap,\n\t\trows,\n\t\tstyle,\n\t\ttemplateColumns,\n\t\ttemplateRows,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Grid' );\n\n\tconst columnsAsArray = Array.isArray( columns ) ? columns : [ columns ];\n\tconst column = useResponsiveValue( columnsAsArray );\n\tconst rowsAsArray = Array.isArray( rows ) ? rows : [ rows ];\n\tconst row = useResponsiveValue( rowsAsArray );\n\n\tconst gridTemplateColumns =\n\t\ttemplateColumns || ( !! column && `repeat( ${ column }, 1fr )` );\n\tconst gridTemplateRows =\n\t\ttemplateRows || ( !! row && `repeat( ${ row }, 1fr )` );\n\tconst alignmentProps = getAlignmentProps( alignment );\n\tconst values = {\n\t\talign: alignmentProps.alignItems ?? align,\n\t\tjustify: alignmentProps.justifyContent ?? justify,\n\t\t'template-columns': gridTemplateColumns || undefined,\n\t\t'template-rows': gridTemplateRows || undefined,\n\t\t'row-gap': rowGap,\n\t\t'column-gap': columnGap,\n\t};\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: clsx(\n\t\t\tstyles.grid,\n\t\t\t{\n\t\t\t\t[ styles[ 'is-inline' ] ]: isInline,\n\t\t\t\t[ styles[ 'has-align' ] ]: !! values.align?.trim(),\n\t\t\t\t[ styles[ 'has-justify' ] ]: !! values.justify?.trim(),\n\t\t\t\t[ styles[ 'has-template-columns' ] ]: !! toCSSValue(\n\t\t\t\t\tvalues[ 'template-columns' ]\n\t\t\t\t),\n\t\t\t\t[ styles[ 'has-template-rows' ] ]: !! toCSSValue(\n\t\t\t\t\tvalues[ 'template-rows' ]\n\t\t\t\t),\n\t\t\t},\n\t\t\t// CSS-wide keywords apply to custom properties themselves. Use the\n\t\t\t// matching declaration instead so, for example, rowGap=\"inherit\"\n\t\t\t// inherits the parent's row gap rather than its internal variable.\n\t\t\tObject.entries( values ).map( ( [ property, value ] ) => {\n\t\t\t\tconst keyword =\n\t\t\t\t\ttypeof value === 'string' ? value.trim().toLowerCase() : '';\n\t\t\t\treturn (\n\t\t\t\t\tCSS_WIDE_KEYWORDS.has( keyword ) &&\n\t\t\t\t\tstyles[ `${ property }-${ keyword }` ]\n\t\t\t\t);\n\t\t\t} ),\n\t\t\tclassName\n\t\t),\n\t\tstyle: {\n\t\t\t'--wp-components-grid-align': values.align,\n\t\t\t'--wp-components-grid-justify': values.justify,\n\t\t\t'--wp-components-grid-gap': gap,\n\t\t\t'--wp-components-grid-template-columns': toCSSValue(\n\t\t\t\tvalues[ 'template-columns' ]\n\t\t\t),\n\t\t\t'--wp-components-grid-template-rows': toCSSValue(\n\t\t\t\tvalues[ 'template-rows' ]\n\t\t\t),\n\t\t\t'--wp-components-grid-row-gap': toCSSValue( rowGap ),\n\t\t\t'--wp-components-grid-column-gap': toCSSValue( columnGap ),\n\t\t\t...style,\n\t\t},\n\t};\n}\n"],"mappings":";;;;;AAUA,MAAM,uBAAuB;;;;;;;;;AAU7B,SAAS,aAAa;CACrB,MAAM,cAAc;CAEpB,IAAK,YAAY,kBAChB,OAAO,YAAY;CAGpB,YAAY,mBAAmB;EAC9B,2BAAW,IAAI,IAAI;EACnB,wBAAQ,IAAI,IAAI;EAChB,gCAAgB,IAAI,QAAQ;CAC7B;CAEA,IAAK,OAAO,aAAa,aACxB,iBAAkB,QAAS;CAG5B,OAAO,YAAY;AACpB;;;;;;;;;AAUA,SAAS,0BACR,gBACA,MACU;CACV,IAAK,CAAE,eAAe,MACrB,OAAO;CAGR,KAAM,MAAM,SAAS,eAAe,KAAK,iBACxC,SAAU,qBAAsB,EACjC,GACC,IAAK,MAAM,aAAc,oBAAqB,MAAM,MACnD,OAAO;CAIT,OAAO;AACR;;;;;;;;;AAUA,SAAS,YAAa,gBAA0B,MAAc,KAAc;CAC3E,IAAK,CAAE,eAAe,MACrB;CAGD,MAAM,UAAU,WAAW;CAC3B,IAAI,iBAAiB,QAAQ,eAAe,IAAK,cAAe;CAEhE,IAAK,CAAE,gBAAiB;EACvB,iCAAiB,IAAI,IAAI;EACzB,QAAQ,eAAe,IAAK,gBAAgB,cAAe;CAC5D;CAEA,IAAK,eAAe,IAAK,IAAK,GAC7B;CAMD,IAAK,0BAA2B,gBAAgB,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