@wordpress/grid 0.11.0 → 0.13.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.
Files changed (31) hide show
  1. package/build/dashboard-grid/grid-item.cjs +10 -8
  2. package/build/dashboard-grid/grid-item.cjs.map +1 -1
  3. package/build/dashboard-grid/index.cjs +20 -18
  4. package/build/dashboard-grid/index.cjs.map +1 -1
  5. package/build/dashboard-lanes/index.cjs +19 -17
  6. package/build/dashboard-lanes/index.cjs.map +1 -1
  7. package/build/dashboard-lanes/lane-placement.cjs +1 -1
  8. package/build/dashboard-lanes/lanes-item.cjs +10 -8
  9. package/build/dashboard-lanes/lanes-item.cjs.map +1 -1
  10. package/build/dashboard-lanes/use-lane-placement.cjs.map +1 -1
  11. package/build/shared/grid-overlay.cjs +16 -14
  12. package/build/shared/grid-overlay.cjs.map +1 -1
  13. package/build/shared/resize-handle.cjs +9 -7
  14. package/build/shared/resize-handle.cjs.map +1 -1
  15. package/build/shared/resize-snap.cjs +1 -1
  16. package/build/shared/use-item-exit-animation.cjs.map +1 -1
  17. package/build/shared/use-layout-shift-animation.cjs.map +1 -1
  18. package/build-module/dashboard-grid/index.mjs +11 -11
  19. package/build-module/dashboard-grid/index.mjs.map +1 -1
  20. package/build-module/dashboard-lanes/index.mjs +10 -10
  21. package/build-module/dashboard-lanes/index.mjs.map +1 -1
  22. package/build-module/dashboard-lanes/lane-placement.mjs +1 -1
  23. package/build-module/shared/grid-overlay.mjs +7 -7
  24. package/build-module/shared/grid-overlay.mjs.map +1 -1
  25. package/build-module/shared/resize-snap.mjs +1 -1
  26. package/build-module/shared/use-layout-shift-animation.mjs.map +1 -1
  27. package/package.json +14 -12
  28. package/src/dashboard-grid/{grid.module.css → grid.module.scss} +10 -19
  29. package/src/dashboard-grid/index.tsx +1 -1
  30. package/src/dashboard-lanes/index.tsx +2 -2
  31. package/src/dashboard-lanes/{lanes.module.css → lanes.module.scss} +10 -19
@@ -11,12 +11,14 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
11
11
  var __getProtoOf = Object.getPrototypeOf;
12
12
  var __hasOwnProp = Object.prototype.hasOwnProperty;
13
13
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
15
- key = keys[i];
16
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
- get: ((k) => from[k]).bind(null, key),
18
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
- });
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) {
16
+ desc = __getOwnPropDesc(from, key);
17
+ __defProp(to, key, {
18
+ get: desc && desc.get && !desc.configurable ? desc.get : () => from[key],
19
+ enumerable: !desc || desc.enumerable
20
+ });
21
+ }
20
22
  }
21
23
  return to;
22
24
  };
@@ -26,15 +28,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
28
  }) : target, mod));
27
29
  let _dnd_kit_sortable = require("@dnd-kit/sortable");
28
30
  let clsx = require("clsx");
29
- clsx = __toESM(clsx);
30
31
  let _wordpress_element = require("@wordpress/element");
31
32
  let _wordpress_compose = require("@wordpress/compose");
32
33
  let _wordpress_react_inert_value = require("@wordpress/react-inert-value");
33
34
  let ___shared_grid_item_key_ts = require("../shared/grid-item-key.cjs");
34
35
  let ___shared_resize_handle_tsx = require("../shared/resize-handle.cjs");
35
- ___shared_resize_handle_tsx = __toESM(___shared_resize_handle_tsx);
36
36
  let ___shared_resize_snap_ts = require("../shared/resize-snap.cjs");
37
37
  let react_jsx_runtime = require("react/jsx-runtime");
38
+ clsx = __toESM(clsx);
39
+ ___shared_resize_handle_tsx = __toESM(___shared_resize_handle_tsx);
38
40
  // packages/style-runtime/src/index.ts
39
41
  const STYLE_HASH_ATTRIBUTE = "data-wp-hash";
40
42
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"grid-item.cjs","names":["useState","useRef","useSortable","useMergeRefs","styles","clampResizeDelta","GRID_ITEM_DATA_KEY","actionableAreaStyles","inertValue","ResizeHandle"],"sources":["../../../style-runtime/src/index.ts","../../src/shared/actionable-area-slot.module.css","../../src/dashboard-grid/grid-item.module.css","../../src/dashboard-grid/grid-item.tsx"],"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(\"36a7a084ce\", \"._0a2b470abcf47e5b__actionable-area-slot{opacity:1}@media (prefers-reduced-motion:no-preference){._0a2b470abcf47e5b__actionable-area-slot{transition:opacity var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-subtle,cubic-bezier(.15,0,.15,1))}}[data-wp-grid-resizing] ._0a2b470abcf47e5b__actionable-area-slot{opacity:0;pointer-events:none}\");\n}\nexport default {\"actionable-area-slot\":\"_0a2b470abcf47e5b__actionable-area-slot\"};\n","import { registerStyle } from '@wordpress/style-runtime';\nif (typeof process === 'undefined' || process.env.NODE_ENV !== 'test') {\n\tregisterStyle(\"33e05f5e81\", \".d8e79c99afd8bca5__item{position:relative}._88155a7e5db75630__item-content{height:100%;position:relative}._09df60d54139626b__is-resizing{overflow:visible;z-index:1}._09df60d54139626b__is-resizing ._88155a7e5db75630__item-content{overflow:visible;position:relative;z-index:2}._5e7dab4e781593a1__is-dragging{pointer-events:none}[data-wp-grid-dragging] ._5e7dab4e781593a1__is-dragging{border-radius:var(--wp-grid-placeholder-radius,0)}@media not (prefers-reduced-motion:reduce){[data-wp-grid-dragging] ._5e7dab4e781593a1__is-dragging{animation:_41089f4f79a6ecfb__wp-grid-item-placeholder-in 0ms linear var(--wpds-motion-duration-sm,.1s) forwards;opacity:1;outline-color:transparent;outline-style:var(--wp-grid-placeholder-outline-style,dashed);outline-width:0}@keyframes _41089f4f79a6ecfb__wp-grid-item-placeholder-in{to{opacity:var(--wp-grid-placeholder-opacity,.4);outline-color:var(--wp-grid-placeholder-outline-color,var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9)));outline-width:var(--wpds-border-width-sm,2px)}}}@media (prefers-reduced-motion:reduce){[data-wp-grid-dragging] ._5e7dab4e781593a1__is-dragging{opacity:var(--wp-grid-placeholder-opacity,.4);outline:var(--wpds-border-width-sm,2px) var(--wp-grid-placeholder-outline-style,dashed) var(--wp-grid-placeholder-outline-color,var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9)))}}@media (forced-colors:active){[data-wp-grid-dragging] ._5e7dab4e781593a1__is-dragging{--wp-grid-placeholder-outline-color:Highlight}}.c99f267fd053e634__preview-overlay{background:transparent;border:var(--wpds-border-width-sm,2px) var(--wp-grid-resize-preview-outline-style,solid) var(--wp-grid-placeholder-outline-color,var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9)));border-radius:var(--wp-grid-placeholder-radius,0);box-sizing:border-box;inset-inline-start:0;pointer-events:none;position:absolute;top:0;z-index:0}@media (forced-colors:active){.c99f267fd053e634__preview-overlay{border-color:Highlight}}\");\n}\nexport default {\"item\":\"d8e79c99afd8bca5__item\",\"item-content\":\"_88155a7e5db75630__item-content\",\"is-resizing\":\"_09df60d54139626b__is-resizing\",\"is-dragging\":\"_5e7dab4e781593a1__is-dragging\",\"wp-grid-item-placeholder-in\":\"_41089f4f79a6ecfb__wp-grid-item-placeholder-in\",\"preview-overlay\":\"c99f267fd053e634__preview-overlay\"};\n","import { useSortable } from '@dnd-kit/sortable';\nimport clsx from 'clsx';\nimport { useState, useRef } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\nimport { inertValue } from '@wordpress/react-inert-value';\nimport actionableAreaStyles from '../shared/actionable-area-slot.module.css';\nimport { GRID_ITEM_DATA_KEY } from '../shared/grid-item-key';\nimport ResizeHandle from '../shared/resize-handle';\nimport { clampResizeDelta, type ResizeSnapSize } from '../shared/resize-snap';\nimport type { ResizeDelta } from '../shared/types';\nimport type { GridItemProps } from './types';\nimport styles from './grid-item.module.css';\n\nfunction getItemCursor(\n\tdisabled: boolean,\n\tinteracting: boolean\n): React.CSSProperties[ 'cursor' ] {\n\tif ( disabled ) {\n\t\treturn 'default';\n\t}\n\n\tif ( interacting ) {\n\t\treturn undefined;\n\t}\n\n\treturn 'grab';\n}\n\nexport function GridItem( {\n\titem,\n\tmaxColumns,\n\tdisabled = false,\n\tdraggable = true,\n\tresizable = true,\n\tverticalResizable = true,\n\tinteracting = false,\n\tdragging = false,\n\tchildren,\n\tactionableArea = null,\n\tonResize,\n\tonResizeEnd,\n\tresizeSnapPreview = null,\n\tminResizeWidthPx,\n\tminResizeHeightPx,\n\tmaxResizeWidthPx,\n\tmaxResizeHeightPx,\n\trenderResizeHandle,\n}: GridItemProps ) {\n\tconst [ resizeDelta, setResizeDelta ] = useState< ResizeDelta | null >(\n\t\tnull\n\t);\n\tconst [ initialContentSize, setInitialContentSize ] = useState< {\n\t\twidth: number;\n\t\theight: number;\n\t} | null >( null );\n\tconst itemRef = useRef< HTMLDivElement >( null );\n\tconst contentRef = useRef< HTMLDivElement >( null );\n\tconst dragDisabled = disabled || ! draggable;\n\tconst resizeDisabled = disabled || ! resizable;\n\tconst {\n\t\tattributes,\n\t\tlisteners,\n\t\tsetNodeRef,\n\t\tsetActivatorNodeRef,\n\t\tisDragging,\n\t} = useSortable( {\n\t\tid: item.key,\n\t\tdisabled: dragDisabled,\n\t} );\n\tconst mergedRef = useMergeRefs( [ itemRef, setNodeRef ] );\n\tconst contentMergedRef = useMergeRefs( [ contentRef ] );\n\t/*\n\t * With `<DragOverlay>` handling the cursor-following clone, the\n\t * sortable item stays put in its grid cell and acts as a\n\t * placeholder. No `transform` is applied here — applying one\n\t * would double-move the placeholder alongside the overlay.\n\t */\n\tconst style = {\n\t\tgridColumnEnd: `span ${\n\t\t\titem.width === 'full'\n\t\t\t\t? maxColumns\n\t\t\t\t: Math.min(\n\t\t\t\t\t\ttypeof item.width === 'number' ? item.width : 1,\n\t\t\t\t\t\tmaxColumns\n\t\t\t\t\t)\n\t\t}`,\n\t\tgridRowEnd: `span ${ item.height || 1 }`,\n\t};\n\n\tconst isResizing = resizeDelta !== null;\n\tconst itemClassName = clsx(\n\t\tstyles.item,\n\t\tisDragging && styles[ 'is-dragging' ],\n\t\tisResizing && styles[ 'is-resizing' ]\n\t);\n\n\tconst handleResize = ( delta: ResizeDelta ) => {\n\t\tconst contentNode = contentRef.current;\n\t\tlet baselineSize = initialContentSize;\n\t\tif ( contentNode && ! baselineSize ) {\n\t\t\tconst { width, height } = contentNode.getBoundingClientRect();\n\t\t\tbaselineSize = { width, height };\n\t\t\tsetInitialContentSize( baselineSize );\n\t\t}\n\t\tlet clamped: ResizeDelta = {\n\t\t\twidth: delta.width,\n\t\t\theight: verticalResizable ? delta.height : 0,\n\t\t};\n\t\tif ( baselineSize ) {\n\t\t\tclamped = clampResizeDelta(\n\t\t\t\tclamped,\n\t\t\t\tbaselineSize,\n\t\t\t\t{\n\t\t\t\t\twidth: minResizeWidthPx,\n\t\t\t\t\theight: verticalResizable ? minResizeHeightPx : undefined,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\twidth: maxResizeWidthPx,\n\t\t\t\t\theight: verticalResizable ? maxResizeHeightPx : undefined,\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t\tsetResizeDelta( clamped );\n\t\tonResize( item.key, clamped );\n\t};\n\n\tconst handleResizeEnd = () => {\n\t\tsetResizeDelta( null );\n\t\tsetInitialContentSize( null );\n\t\tonResizeEnd();\n\t};\n\n\tconst continuousContentStyle: React.CSSProperties | undefined =\n\t\tresizeDelta && initialContentSize\n\t\t\t? {\n\t\t\t\t\twidth: initialContentSize.width + resizeDelta.width,\n\t\t\t\t\theight: verticalResizable\n\t\t\t\t\t\t? initialContentSize.height + resizeDelta.height\n\t\t\t\t\t\t: undefined,\n\t\t\t\t}\n\t\t\t: undefined;\n\n\tconst previewOverlay = resizeSnapPreview ? (\n\t\t<SnapPreviewOverlay snap={ resizeSnapPreview } />\n\t) : null;\n\n\treturn (\n\t\t<div\n\t\t\tref={ mergedRef }\n\t\t\tclassName={ itemClassName }\n\t\t\tstyle={ style }\n\t\t\t{ ...{ [ GRID_ITEM_DATA_KEY ]: item.key } }\n\t\t\tdata-wp-grid-item-resizing={ isResizing || undefined }\n\t\t>\n\t\t\t{ actionableArea ? (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ actionableAreaStyles[ 'actionable-area-slot' ] }\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={ { display: 'contents' } }\n\t\t\t\t\t\tinert={ inertValue( dragging ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ actionableArea }\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t) : null }\n\n\t\t\t<div\n\t\t\t\tref={ setActivatorNodeRef }\n\t\t\t\t{ ...( dragDisabled ? {} : attributes ) }\n\t\t\t\t{ ...listeners }\n\t\t\t\tstyle={ {\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tcursor: getItemCursor( dragDisabled, interacting ),\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tref={ contentMergedRef }\n\t\t\t\t\tclassName={ styles[ 'item-content' ] }\n\t\t\t\t\tstyle={ continuousContentStyle }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t\t{ ! resizeDisabled && (\n\t\t\t\t\t\t<ResizeHandle\n\t\t\t\t\t\t\titemId={ item.key }\n\t\t\t\t\t\t\tverticalResizable={ verticalResizable }\n\t\t\t\t\t\t\tonResize={ handleResize }\n\t\t\t\t\t\t\tonResizeEnd={ handleResizeEnd }\n\t\t\t\t\t\t\trenderResizeHandle={ renderResizeHandle }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t\t{ previewOverlay }\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nfunction SnapPreviewOverlay( { snap }: { snap: ResizeSnapSize } ) {\n\treturn (\n\t\t<div\n\t\t\tclassName={ styles[ 'preview-overlay' ] }\n\t\t\tstyle={ {\n\t\t\t\twidth: snap.widthPx,\n\t\t\t\theight: snap.heightPx ?? '100%',\n\t\t\t} }\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,IAAK,GAAI;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AD;IACC,KAAM;IACN,WAAYJ,yBAAQ;IACpB,OAAQ;IAHT,UAAA,CAKG,UACA,CAAE,kBACH,iBAAA,GAAA,kBAAA,IAAA,CAACK,4BAAAA,SAAD;KACC,QAAS,KAAK;KACM;KACpB,UAAW;KACX,aAAc;KACO;IACrB,CAAA,CAEE;GACH,CAAA,GAAA,cACE;EACD,CAAA,CAAA;;AAEP;AAEA,SAAS,mBAAoB,EAAE,QAAmC;CACjE,OACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACC,WAAYL,yBAAQ;EACpB,OAAQ;GACP,OAAO,KAAK;GACZ,QAAQ,KAAK,YAAY;EAC1B;CACA,CAAA;AAEH"}
1
+ {"version":3,"file":"grid-item.cjs","names":["useState","useRef","useSortable","useMergeRefs","clsx","styles","clampResizeDelta","GRID_ITEM_DATA_KEY","actionableAreaStyles","inertValue","ResizeHandle"],"sources":["../../../style-runtime/src/index.ts","../../src/shared/actionable-area-slot.module.css","../../src/dashboard-grid/grid-item.module.css","../../src/dashboard-grid/grid-item.tsx"],"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(\"36a7a084ce\", \"._0a2b470abcf47e5b__actionable-area-slot{opacity:1}@media (prefers-reduced-motion:no-preference){._0a2b470abcf47e5b__actionable-area-slot{transition:opacity var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-subtle,cubic-bezier(.15,0,.15,1))}}[data-wp-grid-resizing] ._0a2b470abcf47e5b__actionable-area-slot{opacity:0;pointer-events:none}\");\n}\nexport default {\"actionable-area-slot\":\"_0a2b470abcf47e5b__actionable-area-slot\"};\n","import { registerStyle } from '@wordpress/style-runtime';\nif (typeof process === 'undefined' || process.env.NODE_ENV !== 'test') {\n\tregisterStyle(\"33e05f5e81\", \".d8e79c99afd8bca5__item{position:relative}._88155a7e5db75630__item-content{height:100%;position:relative}._09df60d54139626b__is-resizing{overflow:visible;z-index:1}._09df60d54139626b__is-resizing ._88155a7e5db75630__item-content{overflow:visible;position:relative;z-index:2}._5e7dab4e781593a1__is-dragging{pointer-events:none}[data-wp-grid-dragging] ._5e7dab4e781593a1__is-dragging{border-radius:var(--wp-grid-placeholder-radius,0)}@media not (prefers-reduced-motion:reduce){[data-wp-grid-dragging] ._5e7dab4e781593a1__is-dragging{animation:_41089f4f79a6ecfb__wp-grid-item-placeholder-in 0ms linear var(--wpds-motion-duration-sm,.1s) forwards;opacity:1;outline-color:transparent;outline-style:var(--wp-grid-placeholder-outline-style,dashed);outline-width:0}@keyframes _41089f4f79a6ecfb__wp-grid-item-placeholder-in{to{opacity:var(--wp-grid-placeholder-opacity,.4);outline-color:var(--wp-grid-placeholder-outline-color,var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9)));outline-width:var(--wpds-border-width-sm,2px)}}}@media (prefers-reduced-motion:reduce){[data-wp-grid-dragging] ._5e7dab4e781593a1__is-dragging{opacity:var(--wp-grid-placeholder-opacity,.4);outline:var(--wpds-border-width-sm,2px) var(--wp-grid-placeholder-outline-style,dashed) var(--wp-grid-placeholder-outline-color,var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9)))}}@media (forced-colors:active){[data-wp-grid-dragging] ._5e7dab4e781593a1__is-dragging{--wp-grid-placeholder-outline-color:Highlight}}.c99f267fd053e634__preview-overlay{background:transparent;border:var(--wpds-border-width-sm,2px) var(--wp-grid-resize-preview-outline-style,solid) var(--wp-grid-placeholder-outline-color,var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9)));border-radius:var(--wp-grid-placeholder-radius,0);box-sizing:border-box;inset-inline-start:0;pointer-events:none;position:absolute;top:0;z-index:0}@media (forced-colors:active){.c99f267fd053e634__preview-overlay{border-color:Highlight}}\");\n}\nexport default {\"item\":\"d8e79c99afd8bca5__item\",\"item-content\":\"_88155a7e5db75630__item-content\",\"is-resizing\":\"_09df60d54139626b__is-resizing\",\"is-dragging\":\"_5e7dab4e781593a1__is-dragging\",\"wp-grid-item-placeholder-in\":\"_41089f4f79a6ecfb__wp-grid-item-placeholder-in\",\"preview-overlay\":\"c99f267fd053e634__preview-overlay\"};\n","import { useSortable } from '@dnd-kit/sortable';\nimport clsx from 'clsx';\nimport { useState, useRef } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\nimport { inertValue } from '@wordpress/react-inert-value';\nimport actionableAreaStyles from '../shared/actionable-area-slot.module.css';\nimport { GRID_ITEM_DATA_KEY } from '../shared/grid-item-key';\nimport ResizeHandle from '../shared/resize-handle';\nimport { clampResizeDelta, type ResizeSnapSize } from '../shared/resize-snap';\nimport type { ResizeDelta } from '../shared/types';\nimport type { GridItemProps } from './types';\nimport styles from './grid-item.module.css';\n\nfunction getItemCursor(\n\tdisabled: boolean,\n\tinteracting: boolean\n): React.CSSProperties[ 'cursor' ] {\n\tif ( disabled ) {\n\t\treturn 'default';\n\t}\n\n\tif ( interacting ) {\n\t\treturn undefined;\n\t}\n\n\treturn 'grab';\n}\n\nexport function GridItem( {\n\titem,\n\tmaxColumns,\n\tdisabled = false,\n\tdraggable = true,\n\tresizable = true,\n\tverticalResizable = true,\n\tinteracting = false,\n\tdragging = false,\n\tchildren,\n\tactionableArea = null,\n\tonResize,\n\tonResizeEnd,\n\tresizeSnapPreview = null,\n\tminResizeWidthPx,\n\tminResizeHeightPx,\n\tmaxResizeWidthPx,\n\tmaxResizeHeightPx,\n\trenderResizeHandle,\n}: GridItemProps ) {\n\tconst [ resizeDelta, setResizeDelta ] = useState< ResizeDelta | null >(\n\t\tnull\n\t);\n\tconst [ initialContentSize, setInitialContentSize ] = useState< {\n\t\twidth: number;\n\t\theight: number;\n\t} | null >( null );\n\tconst itemRef = useRef< HTMLDivElement >( null );\n\tconst contentRef = useRef< HTMLDivElement >( null );\n\tconst dragDisabled = disabled || ! draggable;\n\tconst resizeDisabled = disabled || ! resizable;\n\tconst {\n\t\tattributes,\n\t\tlisteners,\n\t\tsetNodeRef,\n\t\tsetActivatorNodeRef,\n\t\tisDragging,\n\t} = useSortable( {\n\t\tid: item.key,\n\t\tdisabled: dragDisabled,\n\t} );\n\tconst mergedRef = useMergeRefs( [ itemRef, setNodeRef ] );\n\tconst contentMergedRef = useMergeRefs( [ contentRef ] );\n\t/*\n\t * With `<DragOverlay>` handling the cursor-following clone, the\n\t * sortable item stays put in its grid cell and acts as a\n\t * placeholder. No `transform` is applied here — applying one\n\t * would double-move the placeholder alongside the overlay.\n\t */\n\tconst style = {\n\t\tgridColumnEnd: `span ${\n\t\t\titem.width === 'full'\n\t\t\t\t? maxColumns\n\t\t\t\t: Math.min(\n\t\t\t\t\t\ttypeof item.width === 'number' ? item.width : 1,\n\t\t\t\t\t\tmaxColumns\n\t\t\t\t\t)\n\t\t}`,\n\t\tgridRowEnd: `span ${ item.height || 1 }`,\n\t};\n\n\tconst isResizing = resizeDelta !== null;\n\tconst itemClassName = clsx(\n\t\tstyles.item,\n\t\tisDragging && styles[ 'is-dragging' ],\n\t\tisResizing && styles[ 'is-resizing' ]\n\t);\n\n\tconst handleResize = ( delta: ResizeDelta ) => {\n\t\tconst contentNode = contentRef.current;\n\t\tlet baselineSize = initialContentSize;\n\t\tif ( contentNode && ! baselineSize ) {\n\t\t\tconst { width, height } = contentNode.getBoundingClientRect();\n\t\t\tbaselineSize = { width, height };\n\t\t\tsetInitialContentSize( baselineSize );\n\t\t}\n\t\tlet clamped: ResizeDelta = {\n\t\t\twidth: delta.width,\n\t\t\theight: verticalResizable ? delta.height : 0,\n\t\t};\n\t\tif ( baselineSize ) {\n\t\t\tclamped = clampResizeDelta(\n\t\t\t\tclamped,\n\t\t\t\tbaselineSize,\n\t\t\t\t{\n\t\t\t\t\twidth: minResizeWidthPx,\n\t\t\t\t\theight: verticalResizable ? minResizeHeightPx : undefined,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\twidth: maxResizeWidthPx,\n\t\t\t\t\theight: verticalResizable ? maxResizeHeightPx : undefined,\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t\tsetResizeDelta( clamped );\n\t\tonResize( item.key, clamped );\n\t};\n\n\tconst handleResizeEnd = () => {\n\t\tsetResizeDelta( null );\n\t\tsetInitialContentSize( null );\n\t\tonResizeEnd();\n\t};\n\n\tconst continuousContentStyle: React.CSSProperties | undefined =\n\t\tresizeDelta && initialContentSize\n\t\t\t? {\n\t\t\t\t\twidth: initialContentSize.width + resizeDelta.width,\n\t\t\t\t\theight: verticalResizable\n\t\t\t\t\t\t? initialContentSize.height + resizeDelta.height\n\t\t\t\t\t\t: undefined,\n\t\t\t\t}\n\t\t\t: undefined;\n\n\tconst previewOverlay = resizeSnapPreview ? (\n\t\t<SnapPreviewOverlay snap={ resizeSnapPreview } />\n\t) : null;\n\n\treturn (\n\t\t<div\n\t\t\tref={ mergedRef }\n\t\t\tclassName={ itemClassName }\n\t\t\tstyle={ style }\n\t\t\t{ ...{ [ GRID_ITEM_DATA_KEY ]: item.key } }\n\t\t\tdata-wp-grid-item-resizing={ isResizing || undefined }\n\t\t>\n\t\t\t{ actionableArea ? (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ actionableAreaStyles[ 'actionable-area-slot' ] }\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={ { display: 'contents' } }\n\t\t\t\t\t\tinert={ inertValue( dragging ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ actionableArea }\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t) : null }\n\n\t\t\t<div\n\t\t\t\tref={ setActivatorNodeRef }\n\t\t\t\t{ ...( dragDisabled ? {} : attributes ) }\n\t\t\t\t{ ...listeners }\n\t\t\t\tstyle={ {\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tcursor: getItemCursor( dragDisabled, interacting ),\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tref={ contentMergedRef }\n\t\t\t\t\tclassName={ styles[ 'item-content' ] }\n\t\t\t\t\tstyle={ continuousContentStyle }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t\t{ ! resizeDisabled && (\n\t\t\t\t\t\t<ResizeHandle\n\t\t\t\t\t\t\titemId={ item.key }\n\t\t\t\t\t\t\tverticalResizable={ verticalResizable }\n\t\t\t\t\t\t\tonResize={ handleResize }\n\t\t\t\t\t\t\tonResizeEnd={ handleResizeEnd }\n\t\t\t\t\t\t\trenderResizeHandle={ renderResizeHandle }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t\t{ previewOverlay }\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nfunction SnapPreviewOverlay( { snap }: { snap: ResizeSnapSize } ) {\n\treturn (\n\t\t<div\n\t\t\tclassName={ styles[ 'preview-overlay' ] }\n\t\t\tstyle={ {\n\t\t\t\twidth: snap.widthPx,\n\t\t\t\theight: snap.heightPx ?? '100%',\n\t\t\t} }\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,K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,GAAA,kBAAA,IAAA,CAAC,OAAD;GACC,WAAYC,oCAAsB;GAElC,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;IACC,OAAQ,EAAE,SAAS,WAAW;IAC9B,QAAA,GAAQC,6BAAAA,WAAAA,CAAY,QAAS;IAE3B,UAAA;GACE,CAAA;EACD,CAAA,IACF,MAEJ,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;GACC,KAAM;GACN,GAAO,eAAe,CAAC,IAAI;GAC3B,GAAK;GACL,OAAQ;IACP,QAAQ;IACR,QAAQ,cAAe,cAAc,WAAY;GAClD;GAPD,UAAA,CASC,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;IACC,KAAM;IACN,WAAYJ,yBAAQ;IACpB,OAAQ;IAHT,UAAA,CAKG,UACA,CAAE,kBACH,iBAAA,GAAA,kBAAA,IAAA,CAACK,4BAAAA,SAAD;KACC,QAAS,KAAK;KACM;KACpB,UAAW;KACX,aAAc;KACO;IACrB,CAAA,CAEE;GACH,CAAA,GAAA,cACE;EACD,CAAA,CAAA;;AAEP;AAEA,SAAS,mBAAoB,EAAE,QAAmC;CACjE,OACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACC,WAAYL,yBAAQ;EACpB,OAAQ;GACP,OAAO,KAAK;GACZ,QAAQ,KAAK,YAAY;EAC1B;CACA,CAAA;AAEH"}
@@ -11,12 +11,14 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
11
11
  var __getProtoOf = Object.getPrototypeOf;
12
12
  var __hasOwnProp = Object.prototype.hasOwnProperty;
13
13
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
15
- key = keys[i];
16
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
- get: ((k) => from[k]).bind(null, key),
18
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
- });
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) {
16
+ desc = __getOwnPropDesc(from, key);
17
+ __defProp(to, key, {
18
+ get: desc && desc.get && !desc.configurable ? desc.get : () => from[key],
19
+ enumerable: !desc || desc.enumerable
20
+ });
21
+ }
20
22
  }
21
23
  return to;
22
24
  };
@@ -27,7 +29,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
29
  let _dnd_kit_core = require("@dnd-kit/core");
28
30
  let _dnd_kit_sortable = require("@dnd-kit/sortable");
29
31
  let clsx = require("clsx");
30
- clsx = __toESM(clsx);
31
32
  let _wordpress_compose = require("@wordpress/compose");
32
33
  let _wordpress_element = require("@wordpress/element");
33
34
  let __grid_item_tsx = require("./grid-item.cjs");
@@ -42,6 +43,7 @@ let ___shared_use_item_exit_animation_ts = require("../shared/use-item-exit-anim
42
43
  let __resolve_fill_widths_ts = require("./resolve-fill-widths.cjs");
43
44
  let ___shared_drag_overlay_drop_animation_ts = require("../shared/drag-overlay-drop-animation.cjs");
44
45
  let react_jsx_runtime = require("react/jsx-runtime");
46
+ clsx = __toESM(clsx);
45
47
  // packages/style-runtime/src/index.ts
46
48
  const STYLE_HASH_ATTRIBUTE = "data-wp-hash";
47
49
  /**
@@ -147,17 +149,17 @@ function registerStyle(hash, css) {
147
149
  // packages/grid/src/shared/layout-shift-animation.module.css
148
150
  if (typeof process === "undefined" || process.env.NODE_ENV !== "test") registerStyle("5d10111ab0", ".c68bb75eb6bf717a__layout-animating [data-wp-grid-item-key]{transition:transform var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1))}@media (prefers-reduced-motion:reduce){.c68bb75eb6bf717a__layout-animating [data-wp-grid-item-key]{transition:none}}");
149
151
  var layout_shift_animation_module_default = { "layout-animating": "c68bb75eb6bf717a__layout-animating" };
150
- // packages/grid/src/dashboard-grid/grid.module.css
151
- if (typeof process === "undefined" || process.env.NODE_ENV !== "test") registerStyle("38b90762ee", "._21f1954f75f72766__grid{display:grid;gap:var(--wp-grid-gap,var(--wpds-dimension-gap-xl,24px));position:relative}.e464fb19a38466c5__drag-preview-frame{--_wp-grid-elevation-xs:0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01);--_wp-grid-elevation-md:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02);border-radius:var(--wp-grid-drag-preview-radius,0);box-shadow:var(--_wp-grid-elevation-md);cursor:grabbing;height:100%;pointer-events:none}.da244be067f8f335__drag-preview-frame__lift{height:100%;transform:scale(var(--wp-grid-drag-preview-scale,1.05));transform-origin:center}@media not (prefers-reduced-motion:reduce){.e464fb19a38466c5__drag-preview-frame{animation:_1c00dcb154fe518d__wp-grid-drag-preview-shadow-enter var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) both}.da244be067f8f335__drag-preview-frame__lift{animation:ef2aa0b981f2c744__wp-grid-drag-preview-scale-enter var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) both}}@media not (prefers-reduced-motion:reduce){@keyframes _1c00dcb154fe518d__wp-grid-drag-preview-shadow-enter{0%{box-shadow:var(--_wp-grid-elevation-xs)}to{box-shadow:var(--_wp-grid-elevation-md)}}@keyframes ef2aa0b981f2c744__wp-grid-drag-preview-scale-enter{0%{transform:scale(1)}to{transform:scale(var(--wp-grid-drag-preview-scale,1.05))}}}@media not (prefers-reduced-motion:reduce){.e464fb19a38466c5__drag-preview-frame._4a025da98b54c1dc__is-exiting{animation:f1ccc9200b4579c4__wp-grid-drag-preview-shadow-exit var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) forwards}.e464fb19a38466c5__drag-preview-frame._4a025da98b54c1dc__is-exiting .da244be067f8f335__drag-preview-frame__lift{animation:c84abadc2143eb8a__wp-grid-drag-preview-scale-exit var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) forwards}@keyframes f1ccc9200b4579c4__wp-grid-drag-preview-shadow-exit{0%{box-shadow:var(--_wp-grid-elevation-md)}to{box-shadow:var(--_wp-grid-elevation-xs)}}@keyframes c84abadc2143eb8a__wp-grid-drag-preview-scale-exit{0%{transform:scale(var(--wp-grid-drag-preview-scale,1.05))}to{transform:scale(1)}}}.e464fb19a38466c5__drag-preview-frame._4a025da98b54c1dc__is-exiting{box-shadow:var(--_wp-grid-elevation-xs)}.e464fb19a38466c5__drag-preview-frame._4a025da98b54c1dc__is-exiting .da244be067f8f335__drag-preview-frame__lift{transform:scale(1)}@media (prefers-reduced-motion:reduce){.e464fb19a38466c5__drag-preview-frame{box-shadow:var(--_wp-grid-elevation-md)}.da244be067f8f335__drag-preview-frame__lift{transform:none}.e464fb19a38466c5__drag-preview-frame._4a025da98b54c1dc__is-exiting{box-shadow:var(--_wp-grid-elevation-xs);transition:none}.e464fb19a38466c5__drag-preview-frame._4a025da98b54c1dc__is-exiting .da244be067f8f335__drag-preview-frame__lift{transition:none}}");
152
+ // packages/grid/src/dashboard-grid/grid.module.scss
153
+ if (typeof process === "undefined" || process.env.NODE_ENV !== "test") registerStyle("1271e09bea", ".accd954e27a87edd__grid{display:grid;gap:var(--wp-grid-gap,var(--wpds-dimension-gap-xl,24px));position:relative}._7eb716cb5b0b9243__drag-preview-frame{border-radius:var(--wp-grid-drag-preview-radius,0);box-shadow:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02);cursor:grabbing;height:100%;pointer-events:none}._81f4b86c021354df__drag-preview-frame__lift{height:100%;transform:scale(var(--wp-grid-drag-preview-scale,1.05));transform-origin:center}@media not (prefers-reduced-motion:reduce){._7eb716cb5b0b9243__drag-preview-frame{animation:ed7af28ad1378ef2__wp-grid-drag-preview-shadow-enter var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) both}._81f4b86c021354df__drag-preview-frame__lift{animation:_839f03e3bf8089bd__wp-grid-drag-preview-scale-enter var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) both}}@media not (prefers-reduced-motion:reduce){@keyframes ed7af28ad1378ef2__wp-grid-drag-preview-shadow-enter{0%{box-shadow:0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01)}to{box-shadow:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02)}}@keyframes _839f03e3bf8089bd__wp-grid-drag-preview-scale-enter{0%{transform:scale(1)}to{transform:scale(var(--wp-grid-drag-preview-scale,1.05))}}}@media not (prefers-reduced-motion:reduce){._7eb716cb5b0b9243__drag-preview-frame._19afc579bbe6da9a__is-exiting{animation:ca01d09b92c08943__wp-grid-drag-preview-shadow-exit var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) forwards}._7eb716cb5b0b9243__drag-preview-frame._19afc579bbe6da9a__is-exiting ._81f4b86c021354df__drag-preview-frame__lift{animation:a3ecfa00ffa965a5__wp-grid-drag-preview-scale-exit var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) forwards}@keyframes ca01d09b92c08943__wp-grid-drag-preview-shadow-exit{0%{box-shadow:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02)}to{box-shadow:0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01)}}@keyframes a3ecfa00ffa965a5__wp-grid-drag-preview-scale-exit{0%{transform:scale(var(--wp-grid-drag-preview-scale,1.05))}to{transform:scale(1)}}}._7eb716cb5b0b9243__drag-preview-frame._19afc579bbe6da9a__is-exiting{box-shadow:0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01)}._7eb716cb5b0b9243__drag-preview-frame._19afc579bbe6da9a__is-exiting ._81f4b86c021354df__drag-preview-frame__lift{transform:scale(1)}@media (prefers-reduced-motion:reduce){._7eb716cb5b0b9243__drag-preview-frame{box-shadow:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02)}._81f4b86c021354df__drag-preview-frame__lift{transform:none}._7eb716cb5b0b9243__drag-preview-frame._19afc579bbe6da9a__is-exiting{box-shadow:0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01);transition:none}._7eb716cb5b0b9243__drag-preview-frame._19afc579bbe6da9a__is-exiting ._81f4b86c021354df__drag-preview-frame__lift{transition:none}}");
152
154
  var grid_module_default = {
153
- "grid": "_21f1954f75f72766__grid",
154
- "drag-preview-frame": "e464fb19a38466c5__drag-preview-frame",
155
- "drag-preview-frame__lift": "da244be067f8f335__drag-preview-frame__lift",
156
- "wp-grid-drag-preview-shadow-enter": "_1c00dcb154fe518d__wp-grid-drag-preview-shadow-enter",
157
- "wp-grid-drag-preview-scale-enter": "ef2aa0b981f2c744__wp-grid-drag-preview-scale-enter",
158
- "is-exiting": "_4a025da98b54c1dc__is-exiting",
159
- "wp-grid-drag-preview-shadow-exit": "f1ccc9200b4579c4__wp-grid-drag-preview-shadow-exit",
160
- "wp-grid-drag-preview-scale-exit": "c84abadc2143eb8a__wp-grid-drag-preview-scale-exit"
155
+ "grid": "accd954e27a87edd__grid",
156
+ "drag-preview-frame": "_7eb716cb5b0b9243__drag-preview-frame",
157
+ "drag-preview-frame__lift": "_81f4b86c021354df__drag-preview-frame__lift",
158
+ "wp-grid-drag-preview-shadow-enter": "ed7af28ad1378ef2__wp-grid-drag-preview-shadow-enter",
159
+ "wp-grid-drag-preview-scale-enter": "_839f03e3bf8089bd__wp-grid-drag-preview-scale-enter",
160
+ "is-exiting": "_19afc579bbe6da9a__is-exiting",
161
+ "wp-grid-drag-preview-shadow-exit": "ca01d09b92c08943__wp-grid-drag-preview-shadow-exit",
162
+ "wp-grid-drag-preview-scale-exit": "a3ecfa00ffa965a5__wp-grid-drag-preview-scale-exit"
161
163
  };
162
164
  // packages/grid/src/dashboard-grid/index.tsx
163
165
  const dashboardDragDropAnimation = (0, ___shared_drag_overlay_drop_animation_ts.createDashboardDragDropAnimation)(grid_module_default["drag-preview-frame"], grid_module_default["is-exiting"]);
@@ -409,7 +411,7 @@ const DashboardGrid = (0, _wordpress_element.forwardRef)(function UnforwardedDas
409
411
  }
410
412
  const baseline = resizeBaselineRef.current;
411
413
  const newWidth = (0, ___shared_resize_snap_ts.clampSpan)(baseline.width + relativeDelta.width, bounds?.minWidth ?? 1, bounds?.maxWidth ?? effectiveColumns);
412
- const newHeight = (0, ___shared_resize_snap_ts.clampSpan)(baseline.height + relativeDelta.height, bounds?.minHeight ?? 1, bounds?.maxHeight ?? Infinity);
414
+ const newHeight = (0, ___shared_resize_snap_ts.clampSpan)(baseline.height + relativeDelta.height, bounds?.minHeight ?? 1, bounds?.maxHeight ?? 1e400);
413
415
  setResizeSnapPreview({
414
416
  id,
415
417
  snap: (0, ___shared_resize_snap_ts.gridSpanToPixelSize)(newWidth, newHeight, columnWidth, gapPx, rowHeightPx)
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["createDashboardDragDropAnimation","styles","forwardRef","useState","useRef","useResizeObserver","useMergeRefs","useMemo","resolveColumnCount","gridSpanToPixelSize","useSpanBounds","useResizePixelLimits","clampSpan","resolveFillWidths","isValidElement","cloneElement","useSensors","useSensor","PointerSensor","KeyboardSensor","sortableKeyboardCoordinates","useEvent","arrayMoveWithPinned","GridOverlay","getLayoutFingerprint","useLayoutShiftAnimation","useItemExitAnimation","DndContext","SortableContext","layoutAnimationStyles","GridItem","ItemExitOverlay","DragOverlay"],"sources":["../../../style-runtime/src/index.ts","../../src/shared/layout-shift-animation.module.css","../../src/dashboard-grid/grid.module.css","../../src/dashboard-grid/index.tsx"],"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(\"5d10111ab0\", \".c68bb75eb6bf717a__layout-animating [data-wp-grid-item-key]{transition:transform var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1))}@media (prefers-reduced-motion:reduce){.c68bb75eb6bf717a__layout-animating [data-wp-grid-item-key]{transition:none}}\");\n}\nexport default {\"layout-animating\":\"c68bb75eb6bf717a__layout-animating\"};\n","import { registerStyle } from '@wordpress/style-runtime';\nif (typeof process === 'undefined' || process.env.NODE_ENV !== 'test') {\n\tregisterStyle(\"38b90762ee\", \"._21f1954f75f72766__grid{display:grid;gap:var(--wp-grid-gap,var(--wpds-dimension-gap-xl,24px));position:relative}.e464fb19a38466c5__drag-preview-frame{--_wp-grid-elevation-xs:0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01);--_wp-grid-elevation-md:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02);border-radius:var(--wp-grid-drag-preview-radius,0);box-shadow:var(--_wp-grid-elevation-md);cursor:grabbing;height:100%;pointer-events:none}.da244be067f8f335__drag-preview-frame__lift{height:100%;transform:scale(var(--wp-grid-drag-preview-scale,1.05));transform-origin:center}@media not (prefers-reduced-motion:reduce){.e464fb19a38466c5__drag-preview-frame{animation:_1c00dcb154fe518d__wp-grid-drag-preview-shadow-enter var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) both}.da244be067f8f335__drag-preview-frame__lift{animation:ef2aa0b981f2c744__wp-grid-drag-preview-scale-enter var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) both}}@media not (prefers-reduced-motion:reduce){@keyframes _1c00dcb154fe518d__wp-grid-drag-preview-shadow-enter{0%{box-shadow:var(--_wp-grid-elevation-xs)}to{box-shadow:var(--_wp-grid-elevation-md)}}@keyframes ef2aa0b981f2c744__wp-grid-drag-preview-scale-enter{0%{transform:scale(1)}to{transform:scale(var(--wp-grid-drag-preview-scale,1.05))}}}@media not (prefers-reduced-motion:reduce){.e464fb19a38466c5__drag-preview-frame._4a025da98b54c1dc__is-exiting{animation:f1ccc9200b4579c4__wp-grid-drag-preview-shadow-exit var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) forwards}.e464fb19a38466c5__drag-preview-frame._4a025da98b54c1dc__is-exiting .da244be067f8f335__drag-preview-frame__lift{animation:c84abadc2143eb8a__wp-grid-drag-preview-scale-exit var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) forwards}@keyframes f1ccc9200b4579c4__wp-grid-drag-preview-shadow-exit{0%{box-shadow:var(--_wp-grid-elevation-md)}to{box-shadow:var(--_wp-grid-elevation-xs)}}@keyframes c84abadc2143eb8a__wp-grid-drag-preview-scale-exit{0%{transform:scale(var(--wp-grid-drag-preview-scale,1.05))}to{transform:scale(1)}}}.e464fb19a38466c5__drag-preview-frame._4a025da98b54c1dc__is-exiting{box-shadow:var(--_wp-grid-elevation-xs)}.e464fb19a38466c5__drag-preview-frame._4a025da98b54c1dc__is-exiting .da244be067f8f335__drag-preview-frame__lift{transform:scale(1)}@media (prefers-reduced-motion:reduce){.e464fb19a38466c5__drag-preview-frame{box-shadow:var(--_wp-grid-elevation-md)}.da244be067f8f335__drag-preview-frame__lift{transform:none}.e464fb19a38466c5__drag-preview-frame._4a025da98b54c1dc__is-exiting{box-shadow:var(--_wp-grid-elevation-xs);transition:none}.e464fb19a38466c5__drag-preview-frame._4a025da98b54c1dc__is-exiting .da244be067f8f335__drag-preview-frame__lift{transition:none}}\");\n}\nexport default {\"grid\":\"_21f1954f75f72766__grid\",\"drag-preview-frame\":\"e464fb19a38466c5__drag-preview-frame\",\"drag-preview-frame__lift\":\"da244be067f8f335__drag-preview-frame__lift\",\"wp-grid-drag-preview-shadow-enter\":\"_1c00dcb154fe518d__wp-grid-drag-preview-shadow-enter\",\"wp-grid-drag-preview-scale-enter\":\"ef2aa0b981f2c744__wp-grid-drag-preview-scale-enter\",\"is-exiting\":\"_4a025da98b54c1dc__is-exiting\",\"wp-grid-drag-preview-shadow-exit\":\"f1ccc9200b4579c4__wp-grid-drag-preview-shadow-exit\",\"wp-grid-drag-preview-scale-exit\":\"c84abadc2143eb8a__wp-grid-drag-preview-scale-exit\"};\n","import {\n\tDndContext,\n\tDragOverlay,\n\tKeyboardSensor,\n\tPointerSensor,\n\tuseSensor,\n\tuseSensors,\n} from '@dnd-kit/core';\nimport {\n\tSortableContext,\n\tsortableKeyboardCoordinates,\n} from '@dnd-kit/sortable';\nimport type { DragMoveEvent, DragStartEvent } from '@dnd-kit/core';\nimport clsx from 'clsx';\nimport { useResizeObserver, useEvent, useMergeRefs } from '@wordpress/compose';\nimport {\n\tforwardRef,\n\tuseMemo,\n\tChildren,\n\tcloneElement,\n\tisValidElement,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseState,\n} from '@wordpress/element';\nimport { GridItem } from './grid-item';\nimport { arrayMoveWithPinned } from '../shared/array-move-with-pinned';\nimport { resolveColumnCount } from '../shared/column-policy';\nimport { GridOverlay } from '../shared/grid-overlay';\nimport { clampSpan, gridSpanToPixelSize } from '../shared/resize-snap';\nimport { useResizePixelLimits, useSpanBounds } from '../shared/use-span-bounds';\nimport layoutAnimationStyles from '../shared/layout-shift-animation.module.css';\nimport { ItemExitOverlay } from '../shared/item-exit-overlay';\nimport {\n\tgetLayoutFingerprint,\n\tuseLayoutShiftAnimation,\n} from '../shared/use-layout-shift-animation';\nimport { useItemExitAnimation } from '../shared/use-item-exit-animation';\nimport { resolveFillWidths } from './resolve-fill-widths';\nimport type { DashboardGridLayoutItem, DashboardGridProps } from './types';\nimport type { ResizeSnapSize } from '../shared/resize-snap';\nimport type { ResizeDelta } from '../shared/types';\nimport { createDashboardDragDropAnimation } from '../shared/drag-overlay-drop-animation';\nimport styles from './grid.module.css';\n\nconst dashboardDragDropAnimation = createDashboardDragDropAnimation(\n\tstyles[ 'drag-preview-frame' ],\n\tstyles[ 'is-exiting' ]\n);\n\n// Fallback gap in pixels for math that runs before the computed gap\n// can be read from the DOM. Matches the `'xl'` step the surface\n// resolves to in CSS (`--wpds-dimension-gap-xl`); the next layout\n// effect overwrites this with the actual computed value.\nconst FALLBACK_GAP_PX = 24;\n\n// Default column cap when no explicit `columns` or `minColumnWidth` is\n// supplied. Layered semantics: `columns` acts as a cap and\n// `minColumnWidth` as a per-tile floor; if neither is set we still\n// need a finite count to render against.\nconst DEFAULT_COLUMNS = 6;\n\n// Reorder is driven by `temporaryLayout` + CSS Grid, not by dnd-kit\n// transforms. Hoist the no-op strategy outside the component so its\n// reference is stable across renders — passing a fresh `() => null`\n// to `<SortableContext>` updates its context value and triggers all\n// `useSortable` subscribers to re-render every frame.\nconst NO_SORT_STRATEGY = () => null;\n\n/**\n * 2D packed dashboard grid with drag-to-reorder and resize handles.\n * Supports fixed-column and responsive modes, `number | 'fill' | 'full'`\n * widths, and multi-row tiles.\n *\n * Each child's `key` must match an entry in the `layout` array;\n * children without a match render at the end of the grid without\n * explicit placement and fall through CSS Grid's auto-flow.\n *\n * @example\n * ```jsx\n * const layout = [\n * { key: 'a', width: 2 },\n * { key: 'b', width: 'fill' },\n * { key: 'c', width: 'full' },\n * ];\n *\n * <DashboardGrid\n * layout={ layout }\n * columns={ 6 }\n * editMode\n * onChangeLayout={ setLayout }\n * >\n * <div key=\"a\">A</div>\n * <div key=\"b\">B</div>\n * <div key=\"c\">C</div>\n * </DashboardGrid>\n * ```\n *\n * @param props Component props.\n * @param ref Forwarded to the grid's root `<div>`.\n */\nexport const DashboardGrid = forwardRef< HTMLDivElement, DashboardGridProps >(\n\tfunction UnforwardedDashboardGrid( props, ref ) {\n\t\tconst {\n\t\t\tlayout,\n\t\t\tcolumns,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\trowHeight = 'auto',\n\t\t\tminColumnWidth,\n\t\t\titemLimits,\n\t\t\teditMode = false,\n\t\t\tonChangeLayout,\n\t\t\tonPreviewLayout,\n\t\t\trenderResizeHandle,\n\t\t\trenderDragPreview,\n\t\t\trenderGridOverlay,\n\t\t\t...divProps\n\t\t} = props;\n\t\t// Preview layout applied during drag/resize before committing.\n\t\tconst [ temporaryLayout, setTemporaryLayout ] = useState<\n\t\t\tDashboardGridLayoutItem[] | undefined\n\t\t>();\n\t\t// Drives `<DragOverlay>` content while a drag is in progress.\n\t\tconst [ activeId, setActiveId ] = useState< string | null >( null );\n\t\t// True while any tile is being resized. Combined with `activeId`,\n\t\t// it drives the grid-wide `inert` flag on actionable areas so\n\t\t// hovering over another tile's buttons can't steal the gesture.\n\t\tconst [ isResizing, setIsResizing ] = useState( false );\n\t\t// Snapped span in pixels for the resize-preview outline on the\n\t\t// active tile. The tile content follows the cursor continuously;\n\t\t// this preview shows the grid size that will commit on release.\n\t\tconst [ resizeSnapPreview, setResizeSnapPreview ] = useState< {\n\t\t\tid: string;\n\t\t\tsnap: ResizeSnapSize;\n\t\t} | null >( null );\n\t\t// Mirror of `temporaryLayout` read synchronously on drag end —\n\t\t// the state update from `handleDragMove` may still be batched.\n\t\tconst latestLayoutRef = useRef< DashboardGridLayoutItem[] | undefined >(\n\t\t\tundefined\n\t\t);\n\t\t// Cursor center at the last applied reorder. Used to skip the\n\t\t// cascade of re-measured `onDragMove` events after a layout\n\t\t// change, when the cursor has not actually moved.\n\t\tconst lastReorderCursorRef = useRef< {\n\t\t\tx: number;\n\t\t\ty: number;\n\t\t} | null >( null );\n\t\t// Width/height snapshot at the start of a resize session. The\n\t\t// resize handle reports `delta` absolute from the gesture start,\n\t\t// so the baseline must stay frozen — reading from the already\n\t\t// mutated `activeLayout` would compound the delta each frame.\n\t\tconst resizeBaselineRef = useRef< {\n\t\t\twidth: number;\n\t\t\theight: number;\n\t\t} | null >( null );\n\t\tconst captureLayoutSnapshotRef = useRef< () => void >( () => {} );\n\t\tconst childrenCacheRef = useRef< Map< string, React.ReactElement > >(\n\t\t\tnew Map()\n\t\t);\n\n\t\tconst [ gridRoot, setGridRoot ] = useState< HTMLDivElement | null >(\n\t\t\tnull\n\t\t);\n\t\tconst [ containerWidth, setContainerWidth ] = useState( 0 );\n\t\tconst [ containerHeight, setContainerHeight ] = useState( 0 );\n\t\tconst [ gapPx, setGapPx ] = useState( FALLBACK_GAP_PX );\n\t\tconst resizeObserverRef = useResizeObserver(\n\t\t\t( [ { contentRect } ] ) => {\n\t\t\t\tsetContainerWidth( contentRect.width );\n\t\t\t\tsetContainerHeight( contentRect.height );\n\t\t\t}\n\t\t);\n\t\tconst mergedGridRef = useMergeRefs( [\n\t\t\tsetGridRoot,\n\t\t\tresizeObserverRef,\n\t\t\tref,\n\t\t] );\n\n\t\t// Measure before paint to avoid a single-column flash in\n\t\t// responsive mode; `useResizeObserver` delivers async. The\n\t\t// computed `column-gap` is read from the resolved CSS so the\n\t\t// math tracks the design-system token under any density.\n\t\tuseLayoutEffect( () => {\n\t\t\tif ( ! gridRoot ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { width, height } = gridRoot.getBoundingClientRect();\n\t\t\tif ( width > 0 ) {\n\t\t\t\tsetContainerWidth( width );\n\t\t\t}\n\t\t\tif ( height > 0 ) {\n\t\t\t\tsetContainerHeight( height );\n\t\t\t}\n\t\t\tconst parsed = Number.parseFloat(\n\t\t\t\twindow.getComputedStyle( gridRoot ).columnGap\n\t\t\t);\n\t\t\tif ( Number.isFinite( parsed ) && parsed > 0 ) {\n\t\t\t\tsetGapPx( parsed );\n\t\t\t}\n\t\t}, [ gridRoot ] );\n\t\tconst effectiveColumns = useMemo(\n\t\t\t() =>\n\t\t\t\tresolveColumnCount(\n\t\t\t\t\t{ columns, minColumnWidth },\n\t\t\t\t\tcontainerWidth,\n\t\t\t\t\tgapPx,\n\t\t\t\t\tDEFAULT_COLUMNS\n\t\t\t\t),\n\t\t\t[ minColumnWidth, gapPx, containerWidth, columns ]\n\t\t);\n\t\tconst columnWidth =\n\t\t\t( containerWidth - ( effectiveColumns - 1 ) * gapPx ) /\n\t\t\teffectiveColumns;\n\t\tconst minResizeWidthPx = gridSpanToPixelSize(\n\t\t\t1,\n\t\t\t1,\n\t\t\tcolumnWidth,\n\t\t\tgapPx,\n\t\t\tnull\n\t\t).widthPx;\n\t\tconst rowHeightPx = typeof rowHeight === 'number' ? rowHeight : null;\n\t\tconst minResizeHeightPx =\n\t\t\trowHeightPx === null\n\t\t\t\t? undefined\n\t\t\t\t: ( gridSpanToPixelSize( 1, 1, columnWidth, gapPx, rowHeightPx )\n\t\t\t\t\t\t.heightPx ?? undefined );\n\n\t\tconst spanBoundsByKey = useSpanBounds(\n\t\t\titemLimits,\n\t\t\tcolumnWidth,\n\t\t\tgapPx,\n\t\t\trowHeightPx,\n\t\t\teffectiveColumns\n\t\t);\n\t\tconst resizeLimitsByKey = useResizePixelLimits(\n\t\t\tspanBoundsByKey,\n\t\t\tcolumnWidth,\n\t\t\tgapPx,\n\t\t\trowHeightPx\n\t\t);\n\n\t\t// Stored and in-gesture layouts may sit outside an item's limits;\n\t\t// render them bounded while the data stays untouched. Gestures\n\t\t// commit from the stored `layout`, never from this bounded view,\n\t\t// so a bounded span cannot reach `onChangeLayout`. Keeps the\n\t\t// source identity when no item needs bounding.\n\t\tconst sourceLayout = temporaryLayout ?? layout;\n\t\tconst activeLayout = useMemo( () => {\n\t\t\tif ( spanBoundsByKey.size === 0 ) {\n\t\t\t\treturn sourceLayout;\n\t\t\t}\n\t\t\tlet changed = false;\n\t\t\tconst bounded = sourceLayout.map( ( item ) => {\n\t\t\t\tconst bounds = spanBoundsByKey.get( item.key );\n\t\t\t\tif ( ! bounds ) {\n\t\t\t\t\treturn item;\n\t\t\t\t}\n\t\t\t\tconst width =\n\t\t\t\t\ttypeof item.width === 'number'\n\t\t\t\t\t\t? clampSpan(\n\t\t\t\t\t\t\t\titem.width,\n\t\t\t\t\t\t\t\tbounds.minWidth,\n\t\t\t\t\t\t\t\tbounds.maxWidth\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t: item.width;\n\t\t\t\tconst height = clampSpan(\n\t\t\t\t\titem.height ?? 1,\n\t\t\t\t\tbounds.minHeight,\n\t\t\t\t\tbounds.maxHeight\n\t\t\t\t);\n\t\t\t\tif ( width === item.width && height === ( item.height ?? 1 ) ) {\n\t\t\t\t\treturn item;\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t\treturn { ...item, width, height };\n\t\t\t} );\n\t\t\treturn changed ? bounded : sourceLayout;\n\t\t}, [ sourceLayout, spanBoundsByKey ] );\n\n\t\tconst layoutMap = useMemo( () => {\n\t\t\tconst map = new Map< string, DashboardGridLayoutItem >();\n\t\t\tactiveLayout.forEach( ( item ) => map.set( item.key, item ) );\n\t\t\treturn map;\n\t\t}, [ activeLayout ] );\n\n\t\t// Stable-identity key set, preserved across renders whenever the\n\t\t// *contents* of the key set are unchanged — even if the consumer\n\t\t// passes a fresh `layout` array reference (common when `layout`\n\t\t// is derived inline from state). Without this, downstream memos\n\t\t// would invalidate on every parent re-render and the children\n\t\t// walk skip during gestures wouldn't hold.\n\t\tconst layoutKeys = useMemo(\n\t\t\t() => new Set( layout.map( ( item ) => item.key ) ),\n\t\t\t[ layout ]\n\t\t);\n\n\t\t// Sorted item keys, identity-stable when the resulting sequence is\n\t\t// unchanged. Avoids producing a fresh `items` array on every parent\n\t\t// re-render so `<SortableContext>` doesn't update its context value\n\t\t// and notify every `useSortable` subscriber unnecessarily.\n\t\tconst sortedItems = useMemo(\n\t\t\t() =>\n\t\t\t\tactiveLayout\n\t\t\t\t\t.map( ( item, index ) => ( { item, index } ) )\n\t\t\t\t\t.sort(\n\t\t\t\t\t\t( a, b ) =>\n\t\t\t\t\t\t\t( a.item.order ?? a.index ) -\n\t\t\t\t\t\t\t( b.item.order ?? b.index )\n\t\t\t\t\t)\n\t\t\t\t\t.map( ( { item } ) => item.key ),\n\t\t\t[ activeLayout ]\n\t\t);\n\t\tconst items = sortedItems;\n\n\t\t// Resolve `width: 'fill'` items to concrete column spans; the\n\t\t// resolver plans the row around each fill's span bounds.\n\t\tconst resolvedItemMap = useMemo( () => {\n\t\t\tconst fillWidths = resolveFillWidths(\n\t\t\t\titems,\n\t\t\t\tlayoutMap,\n\t\t\t\teffectiveColumns,\n\t\t\t\tspanBoundsByKey\n\t\t\t);\n\t\t\tif ( fillWidths.size === 0 ) {\n\t\t\t\treturn layoutMap;\n\t\t\t}\n\t\t\tconst map = new Map< string, DashboardGridLayoutItem >();\n\t\t\tfor ( const [ key, item ] of layoutMap ) {\n\t\t\t\tconst fillW = fillWidths.get( key );\n\t\t\t\tmap.set(\n\t\t\t\t\tkey,\n\t\t\t\t\tfillW !== undefined ? { ...item, width: fillW } : item\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn map;\n\t\t}, [ items, layoutMap, effectiveColumns, spanBoundsByKey ] );\n\n\t\tconst [ childrenMap, actionableAreaMap, remaining, renderedByKey ] =\n\t\t\tuseMemo( () => {\n\t\t\t\tconst childMap = new Map< string, React.ReactElement >();\n\t\t\t\tconst actionableMap = new Map< string, React.ReactNode >();\n\t\t\t\tconst rest: React.ReactNode[] = [];\n\t\t\t\tconst byKey = new Map< string, React.ReactElement >();\n\n\t\t\t\tChildren.forEach( children, ( child ) => {\n\t\t\t\t\tif ( ! isValidElement( child ) ) {\n\t\t\t\t\t\trest.push( child );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst key = child.key?.toString();\n\t\t\t\t\tif ( ! key ) {\n\t\t\t\t\t\trest.push( child );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Strip `actionableArea` so it does not leak to the DOM;\n\t\t\t\t\t// the grid lifts it to a slot separately.\n\t\t\t\t\tconst typedChild = child as React.ReactElement< {\n\t\t\t\t\t\tactionableArea?: React.ReactNode;\n\t\t\t\t\t} >;\n\t\t\t\t\tconst { actionableArea } = typedChild.props;\n\t\t\t\t\tconst stripped =\n\t\t\t\t\t\tactionableArea !== undefined\n\t\t\t\t\t\t\t? cloneElement( typedChild, {\n\t\t\t\t\t\t\t\t\tactionableArea: undefined,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t: child;\n\n\t\t\t\t\tbyKey.set( key, stripped );\n\n\t\t\t\t\tif ( layoutKeys.has( key ) ) {\n\t\t\t\t\t\tif ( actionableArea !== undefined ) {\n\t\t\t\t\t\t\tactionableMap.set( key, actionableArea );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchildMap.set( key, stripped );\n\t\t\t\t\t} else {\n\t\t\t\t\t\trest.push( child );\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\treturn [ childMap, actionableMap, rest, byKey ];\n\t\t\t}, [ children, layoutKeys ] );\n\n\t\t// Persist the latest rendered children so a removed tile's content\n\t\t// is still available for its exit overlay. Filled from an effect so a\n\t\t// discarded render never writes to the cache.\n\t\tuseLayoutEffect( () => {\n\t\t\tfor ( const [ key, child ] of renderedByKey ) {\n\t\t\t\tchildrenCacheRef.current.set( key, child );\n\t\t\t}\n\t\t}, [ renderedByKey ] );\n\n\t\tconst sensors = useSensors(\n\t\t\tuseSensor( PointerSensor ),\n\t\t\tuseSensor( KeyboardSensor, {\n\t\t\t\tcoordinateGetter: sortableKeyboardCoordinates,\n\t\t\t} )\n\t\t);\n\n\t\tconst handleDragStart = useEvent( ( event: DragStartEvent ) => {\n\t\t\tsetActiveId( String( event.active.id ) );\n\t\t\tlastReorderCursorRef.current = null;\n\t\t} );\n\n\t\tconst handleDragCancel = useEvent( () => {\n\t\t\tsetActiveId( null );\n\t\t\tlatestLayoutRef.current = undefined;\n\t\t\tlastReorderCursorRef.current = null;\n\t\t\tresizeBaselineRef.current = null;\n\t\t\tsetIsResizing( false );\n\t\t\tsetResizeSnapPreview( null );\n\t\t\tsetTemporaryLayout( undefined );\n\t\t} );\n\n\t\t// Re-evaluate the insertion slot on every pointer move, not\n\t\t// just when `over.id` changes — otherwise a \"swap back\" with\n\t\t// the cursor still on the same tile would never fire.\n\t\tconst handleDragMove = useEvent( ( event: DragMoveEvent ) => {\n\t\t\tconst { active, over } = event;\n\t\t\tif ( ! over || active.id === over.id ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst activeRect = active.rect.current.translated;\n\t\t\tif ( ! activeRect ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst activeCenterX = activeRect.left + activeRect.width / 2;\n\t\t\tconst activeCenterY = activeRect.top + activeRect.height / 2;\n\n\t\t\t// Skip re-measured events after a layout change: require\n\t\t\t// meaningful cursor movement between reorders.\n\t\t\tconst lastCursor = lastReorderCursorRef.current;\n\t\t\tif ( lastCursor ) {\n\t\t\t\tconst dx = activeCenterX - lastCursor.x;\n\t\t\t\tconst dy = activeCenterY - lastCursor.y;\n\t\t\t\tif ( dx * dx + dy * dy < 100 ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst overCenterX = over.rect.left + over.rect.width / 2;\n\t\t\tconst insertAfter = activeCenterX > overCenterX;\n\n\t\t\tconst currentIndex = items.indexOf( String( active.id ) );\n\t\t\tconst overIndex = items.indexOf( String( over.id ) );\n\t\t\tlet newIndex: number;\n\t\t\tif ( insertAfter ) {\n\t\t\t\tnewIndex = currentIndex > overIndex ? overIndex + 1 : overIndex;\n\t\t\t} else {\n\t\t\t\tnewIndex = currentIndex > overIndex ? overIndex : overIndex - 1;\n\t\t\t}\n\t\t\tnewIndex = Math.max( 0, Math.min( newIndex, items.length - 1 ) );\n\n\t\t\tif ( newIndex === currentIndex ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Non-draggable items are pinned: they hold their index while\n\t\t\t// the others reorder around them.\n\t\t\tconst updatedItems = arrayMoveWithPinned(\n\t\t\t\titems,\n\t\t\t\tcurrentIndex,\n\t\t\t\tnewIndex,\n\t\t\t\t( key ) => layoutMap.get( key )?.draggable === false\n\t\t\t);\n\t\t\tif (\n\t\t\t\tupdatedItems.every( ( key, index ) => key === items[ index ] )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Commit from the stored layout (or the pending commit), not\n\t\t\t// the bounded view, so untouched tiles keep their stored spans.\n\t\t\tconst updatedLayout = ( latestLayoutRef.current ?? layout ).map(\n\t\t\t\t( item ) => ( {\n\t\t\t\t\t...item,\n\t\t\t\t\torder: updatedItems.indexOf( item.key ),\n\t\t\t\t} )\n\t\t\t);\n\n\t\t\tlastReorderCursorRef.current = {\n\t\t\t\tx: activeCenterX,\n\t\t\t\ty: activeCenterY,\n\t\t\t};\n\t\t\tlatestLayoutRef.current = updatedLayout;\n\t\t\tcaptureLayoutSnapshotRef.current();\n\t\t\tsetTemporaryLayout( updatedLayout );\n\t\t\tonPreviewLayout?.( updatedLayout );\n\t\t} );\n\n\t\t// Commit the latest temporary layout and clear local state.\n\t\t// Reads from the ref to bypass React's state batching.\n\t\tconst persistTemporaryLayout = useEvent( () => {\n\t\t\tconst latest = latestLayoutRef.current;\n\t\t\tlatestLayoutRef.current = undefined;\n\t\t\tresizeBaselineRef.current = null;\n\t\t\tsetIsResizing( false );\n\t\t\tsetResizeSnapPreview( null );\n\t\t\tif ( ! onChangeLayout || ! latest ) {\n\t\t\t\tsetTemporaryLayout( undefined );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tonChangeLayout( latest );\n\t\t\tsetTemporaryLayout( undefined );\n\t\t} );\n\n\t\tconst handleResize = useEvent( ( id: string, delta: ResizeDelta ) => {\n\t\t\tif ( ! editMode ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! isResizing ) {\n\t\t\t\tsetIsResizing( true );\n\t\t\t}\n\n\t\t\tconst relativeDelta = {\n\t\t\t\twidth: Math.round( delta.width / ( columnWidth + gapPx ) ),\n\t\t\t\theight:\n\t\t\t\t\trowHeight === 'auto'\n\t\t\t\t\t\t? 0\n\t\t\t\t\t\t: Math.round( delta.height / ( rowHeight + gapPx ) ),\n\t\t\t};\n\n\t\t\t// Snapshot the baseline once at gesture start. The handle's\n\t\t\t// `delta` is absolute from the gesture start, so summing it\n\t\t\t// with the live (already mutated) `activeLayout` width would\n\t\t\t// compound and oscillate — and stepping back through the\n\t\t\t// zero-delta zone would never restore the original size.\n\t\t\tconst bounds = spanBoundsByKey.get( id );\n\t\t\tif ( ! resizeBaselineRef.current ) {\n\t\t\t\tconst baseItem = layoutMap.get( id );\n\t\t\t\tconst resolvedItem = resolvedItemMap.get( id );\n\t\t\t\t// `'fill'`/`'full'` resize from the rendered span\n\t\t\t\t// and convert to a numeric width.\n\t\t\t\tlet baseWidth: number;\n\t\t\t\tif ( baseItem?.width === 'full' ) {\n\t\t\t\t\tbaseWidth = bounds?.maxWidth ?? effectiveColumns;\n\t\t\t\t} else if ( baseItem?.width === 'fill' ) {\n\t\t\t\t\tbaseWidth =\n\t\t\t\t\t\ttypeof resolvedItem?.width === 'number'\n\t\t\t\t\t\t\t? resolvedItem.width\n\t\t\t\t\t\t\t: 1;\n\t\t\t\t} else {\n\t\t\t\t\tbaseWidth = baseItem?.width ?? 1;\n\t\t\t\t}\n\t\t\t\tresizeBaselineRef.current = {\n\t\t\t\t\twidth: baseWidth,\n\t\t\t\t\theight: baseItem?.height ?? 1,\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst baseline = resizeBaselineRef.current;\n\t\t\tconst newWidth = clampSpan(\n\t\t\t\tbaseline.width + relativeDelta.width,\n\t\t\t\tbounds?.minWidth ?? 1,\n\t\t\t\tbounds?.maxWidth ?? effectiveColumns\n\t\t\t);\n\t\t\tconst newHeight = clampSpan(\n\t\t\t\tbaseline.height + relativeDelta.height,\n\t\t\t\tbounds?.minHeight ?? 1,\n\t\t\t\tbounds?.maxHeight ?? Infinity\n\t\t\t);\n\n\t\t\tsetResizeSnapPreview( {\n\t\t\t\tid,\n\t\t\t\tsnap: gridSpanToPixelSize(\n\t\t\t\t\tnewWidth,\n\t\t\t\t\tnewHeight,\n\t\t\t\t\tcolumnWidth,\n\t\t\t\t\tgapPx,\n\t\t\t\t\trowHeightPx\n\t\t\t\t),\n\t\t\t} );\n\n\t\t\t// Bail when the snapped size matches the layout already\n\t\t\t// staged for commit. The tile still tracks the cursor\n\t\t\t// continuously; only the preview outline and pending commit\n\t\t\t// need updating when the snap target changes.\n\t\t\tconst pendingItem = latestLayoutRef.current?.find(\n\t\t\t\t( item ) => item.key === id\n\t\t\t);\n\t\t\tconst currentItem = pendingItem ?? layoutMap.get( id );\n\t\t\tif (\n\t\t\t\tcurrentItem &&\n\t\t\t\tcurrentItem.width === newWidth &&\n\t\t\t\t( currentItem.height ?? 1 ) === newHeight\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Commit from the stored layout (or the pending commit), not\n\t\t\t// the bounded view: the resized tile takes its new span and\n\t\t\t// every other tile keeps its stored one.\n\t\t\tconst updatedLayout = ( latestLayoutRef.current ?? layout ).map(\n\t\t\t\t( item ) =>\n\t\t\t\t\titem.key === id\n\t\t\t\t\t\t? { ...item, width: newWidth, height: newHeight }\n\t\t\t\t\t\t: item\n\t\t\t);\n\n\t\t\tlatestLayoutRef.current = updatedLayout;\n\t\t\tcaptureLayoutSnapshotRef.current();\n\t\t\tsetTemporaryLayout( updatedLayout );\n\t\t\tonPreviewLayout?.( updatedLayout );\n\t\t} );\n\n\t\t// Drag-overlay clone composition: the surface always wraps with a\n\t\t// thin functional frame (lift, cursor, pointer pass-through). When\n\t\t// `renderDragPreview` is supplied, the consumer's wrapper sits\n\t\t// inside the frame around the cloned children; otherwise the\n\t\t// cloned children render directly so any persistent chrome on\n\t\t// them carries through unchanged.\n\t\tconst activeClone = activeId ? childrenMap.get( activeId ) : null;\n\t\tconst DragPreview = renderDragPreview;\n\t\tconst dragOverlayContent =\n\t\t\tactiveId && activeClone ? (\n\t\t\t\t<div className={ styles[ 'drag-preview-frame' ] }>\n\t\t\t\t\t<div className={ styles[ 'drag-preview-frame__lift' ] }>\n\t\t\t\t\t\t{ DragPreview ? (\n\t\t\t\t\t\t\t<DragPreview itemId={ activeId }>\n\t\t\t\t\t\t\t\t{ activeClone }\n\t\t\t\t\t\t\t</DragPreview>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\tactiveClone\n\t\t\t\t\t\t) }\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t) : null;\n\n\t\t// Edit-mode background. Rendered unconditionally so it can\n\t\t// cross-fade on edit-mode toggles (`isActive` drives the\n\t\t// transition); memoized so drag/resize re-renders skip it while\n\t\t// inputs are stable. A numeric `rowHeight` adds row markers;\n\t\t// `'auto'` collapses to `undefined` and omits them.\n\t\tconst Overlay = renderGridOverlay ?? GridOverlay;\n\t\tconst overlayRowHeight =\n\t\t\ttypeof rowHeight === 'number' ? rowHeight : undefined;\n\t\tconst overlayRows = useMemo( () => {\n\t\t\tif ( overlayRowHeight === undefined || containerHeight <= 0 ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tconst rowTile = overlayRowHeight + gapPx;\n\t\t\treturn Math.max(\n\t\t\t\t1,\n\t\t\t\tMath.floor( ( containerHeight + gapPx ) / rowTile )\n\t\t\t);\n\t\t}, [ overlayRowHeight, containerHeight, gapPx ] );\n\t\tconst gridOverlay = useMemo(\n\t\t\t() => (\n\t\t\t\t<Overlay\n\t\t\t\t\tcolumns={ effectiveColumns }\n\t\t\t\t\trowHeight={ overlayRowHeight }\n\t\t\t\t\trows={ overlayRows }\n\t\t\t\t\tisActive={ editMode }\n\t\t\t\t/>\n\t\t\t),\n\t\t\t[\n\t\t\t\tOverlay,\n\t\t\t\teditMode,\n\t\t\t\teffectiveColumns,\n\t\t\t\toverlayRowHeight,\n\t\t\t\toverlayRows,\n\t\t\t]\n\t\t);\n\n\t\tconst layoutFingerprint = useMemo(\n\t\t\t() => getLayoutFingerprint( [ ...resolvedItemMap.values() ] ),\n\t\t\t[ resolvedItemMap ]\n\t\t);\n\t\tconst excludeLayoutAnimationKey =\n\t\t\tactiveId ?? ( isResizing ? resizeSnapPreview?.id : null );\n\t\tconst { captureLayoutSnapshot, getPositionsBeforeLastChange } =\n\t\t\tuseLayoutShiftAnimation( {\n\t\t\t\tcontainer: gridRoot,\n\t\t\t\tenabled: editMode,\n\t\t\t\tlayoutFingerprint,\n\t\t\t\texcludeItemKey: excludeLayoutAnimationKey,\n\t\t\t} );\n\t\tconst { exitingItems, clearExitingItem } = useItemExitAnimation( {\n\t\t\tcontainer: gridRoot,\n\t\t\tenabled: editMode,\n\t\t\tlayoutKeys,\n\t\t\tgetPositionsBeforeLastChange,\n\t\t\tchildrenCacheRef,\n\t\t} );\n\t\t// Transform transitions on tiles for FLIP (drag, resize, removal).\n\t\tconst layoutAnimating = editMode;\n\t\tuseLayoutEffect( () => {\n\t\t\tcaptureLayoutSnapshotRef.current = captureLayoutSnapshot;\n\t\t}, [ captureLayoutSnapshot ] );\n\n\t\treturn (\n\t\t\t<DndContext\n\t\t\t\tsensors={ sensors }\n\t\t\t\tonDragStart={ handleDragStart }\n\t\t\t\tonDragCancel={ handleDragCancel }\n\t\t\t\tonDragMove={ handleDragMove }\n\t\t\t\tonDragEnd={ () => {\n\t\t\t\t\tpersistTemporaryLayout();\n\t\t\t\t\tlastReorderCursorRef.current = null;\n\t\t\t\t\tsetActiveId( null );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ /* No-op strategy: reorder comes from `temporaryLayout`\n\t\t\t\t + CSS Grid, not dnd-kit transforms. */ }\n\t\t\t\t<SortableContext items={ items } strategy={ NO_SORT_STRATEGY }>\n\t\t\t\t\t<div\n\t\t\t\t\t\t{ ...divProps }\n\t\t\t\t\t\tref={ mergedGridRef }\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\tstyles.grid,\n\t\t\t\t\t\t\tlayoutAnimating &&\n\t\t\t\t\t\t\t\tlayoutAnimationStyles[ 'layout-animating' ],\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tdata-wp-grid-dragging={ activeId || undefined }\n\t\t\t\t\t\tdata-wp-grid-resizing={ isResizing || undefined }\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t...style,\n\t\t\t\t\t\t\tgridTemplateColumns: `repeat(${ effectiveColumns }, minmax(0, 1fr))`,\n\t\t\t\t\t\t\tgridAutoRows: rowHeight,\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ gridOverlay }\n\t\t\t\t\t\t{ items.map( ( id ) => {\n\t\t\t\t\t\t\tconst limitsPx = resizeLimitsByKey.get( id );\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<GridItem\n\t\t\t\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\t\t\t\titem={\n\t\t\t\t\t\t\t\t\t\tresolvedItemMap.get(\n\t\t\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\t\t) as DashboardGridLayoutItem\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tmaxColumns={\n\t\t\t\t\t\t\t\t\t\tspanBoundsByKey.get( id )?.maxWidth ??\n\t\t\t\t\t\t\t\t\t\teffectiveColumns\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdisabled={ ! editMode }\n\t\t\t\t\t\t\t\t\tdraggable={\n\t\t\t\t\t\t\t\t\t\tlayoutMap.get( id )?.draggable !== false\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tresizable={\n\t\t\t\t\t\t\t\t\t\tlayoutMap.get( id )?.resizable !== false\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tverticalResizable={ rowHeight !== 'auto' }\n\t\t\t\t\t\t\t\t\tinteracting={\n\t\t\t\t\t\t\t\t\t\tactiveId !== null || isResizing\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdragging={ activeId !== null }\n\t\t\t\t\t\t\t\t\tonResize={ handleResize }\n\t\t\t\t\t\t\t\t\tonResizeEnd={ persistTemporaryLayout }\n\t\t\t\t\t\t\t\t\tresizeSnapPreview={\n\t\t\t\t\t\t\t\t\t\tresizeSnapPreview?.id === id\n\t\t\t\t\t\t\t\t\t\t\t? resizeSnapPreview.snap\n\t\t\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tminResizeWidthPx={\n\t\t\t\t\t\t\t\t\t\tlimitsPx?.minWidthPx ?? minResizeWidthPx\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tminResizeHeightPx={\n\t\t\t\t\t\t\t\t\t\tlimitsPx?.minHeightPx ??\n\t\t\t\t\t\t\t\t\t\tminResizeHeightPx\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tmaxResizeWidthPx={ limitsPx?.maxWidthPx }\n\t\t\t\t\t\t\t\t\tmaxResizeHeightPx={\n\t\t\t\t\t\t\t\t\t\tlimitsPx?.maxHeightPx ?? undefined\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tactionableArea={ actionableAreaMap.get(\n\t\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\trenderResizeHandle={ renderResizeHandle }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ childrenMap.get( id ) }\n\t\t\t\t\t\t\t\t</GridItem>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t{ remaining }\n\t\t\t\t\t\t{ exitingItems.map( ( { key, rect, child } ) => (\n\t\t\t\t\t\t\t<ItemExitOverlay\n\t\t\t\t\t\t\t\tkey={ `exiting-${ key }` }\n\t\t\t\t\t\t\t\titemKey={ key }\n\t\t\t\t\t\t\t\trect={ rect }\n\t\t\t\t\t\t\t\tonAnimationEnd={ () => clearExitingItem( key ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ child }\n\t\t\t\t\t\t\t</ItemExitOverlay>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</div>\n\t\t\t\t</SortableContext>\n\t\t\t\t<DragOverlay dropAnimation={ dashboardDragDropAnimation }>\n\t\t\t\t\t{ dragOverlayContent }\n\t\t\t\t</DragOverlay>\n\t\t\t</DndContext>\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;CAC7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;OAED,YACC,gBAAgB,IAAK,EAAG,CAAC,EAAE,YAC3B;OAED,UAAW,CAAE;OACb,WACC,UAAU,IAAK,EAAG,CAAC,EAAE,cAAc;OAEpC,WACC,UAAU,IAAK,EAAG,CAAC,EAAE,cAAc;OAEpC,mBAAoB,cAAc;OAClC,aACC,aAAa,QAAQ;OAEtB,UAAW,aAAa;OACxB,UAAW;OACX,aAAc;OACd,mBACC,mBAAmB,OAAO,KACvB,kBAAkB,OAClB;OAEJ,kBACC,UAAU,cAAc;OAEzB,mBACC,UAAU,eACV;OAED,kBAAmB,UAAU;OAC7B,mBACC,UAAU,eAAe,KAAA;OAE1B,gBAAiB,kBAAkB,IAClC,EACD;OACqB;OAEnB,UAAA,YAAY,IAAK,EAAG;MACb,GA9CH,EA8CG;KAEZ,CAAE;KACA;KACA,aAAa,KAAO,EAAE,KAAK,MAAM,YAClC,iBAAA,GAAA,kBAAA,IAAA,CAACC,gCAAAA,iBAAD;MAEC,SAAU;MACH;MACP,sBAAuB,iBAAkB,GAAI;MAE3C,UAAA;KACc,GANV,WAAY,KAMF,CAChB;IACE;;EACW,CAAA,GACjB,iBAAA,GAAA,kBAAA,IAAA,CAACC,cAAAA,aAAD;GAAa,eAAgB;GAC1B,UAAA;EACU,CAAA,CACF;;AAEd,CACD"}
1
+ {"version":3,"file":"index.cjs","names":["createDashboardDragDropAnimation","styles","forwardRef","useState","useRef","useResizeObserver","useMergeRefs","useLayoutEffect","useMemo","resolveColumnCount","gridSpanToPixelSize","useSpanBounds","useResizePixelLimits","clampSpan","resolveFillWidths","Children","isValidElement","cloneElement","useSensors","useSensor","PointerSensor","KeyboardSensor","sortableKeyboardCoordinates","useEvent","arrayMoveWithPinned","GridOverlay","getLayoutFingerprint","useLayoutShiftAnimation","useItemExitAnimation","DndContext","SortableContext","clsx","layoutAnimationStyles","GridItem","ItemExitOverlay","DragOverlay"],"sources":["../../../style-runtime/src/index.ts","../../src/shared/layout-shift-animation.module.css","../../src/dashboard-grid/grid.module.scss","../../src/dashboard-grid/index.tsx"],"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(\"5d10111ab0\", \".c68bb75eb6bf717a__layout-animating [data-wp-grid-item-key]{transition:transform var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1))}@media (prefers-reduced-motion:reduce){.c68bb75eb6bf717a__layout-animating [data-wp-grid-item-key]{transition:none}}\");\n}\nexport default {\"layout-animating\":\"c68bb75eb6bf717a__layout-animating\"};\n","import { registerStyle } from '@wordpress/style-runtime';\nif (typeof process === 'undefined' || process.env.NODE_ENV !== 'test') {\n\tregisterStyle(\"1271e09bea\", \".accd954e27a87edd__grid{display:grid;gap:var(--wp-grid-gap,var(--wpds-dimension-gap-xl,24px));position:relative}._7eb716cb5b0b9243__drag-preview-frame{border-radius:var(--wp-grid-drag-preview-radius,0);box-shadow:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02);cursor:grabbing;height:100%;pointer-events:none}._81f4b86c021354df__drag-preview-frame__lift{height:100%;transform:scale(var(--wp-grid-drag-preview-scale,1.05));transform-origin:center}@media not (prefers-reduced-motion:reduce){._7eb716cb5b0b9243__drag-preview-frame{animation:ed7af28ad1378ef2__wp-grid-drag-preview-shadow-enter var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) both}._81f4b86c021354df__drag-preview-frame__lift{animation:_839f03e3bf8089bd__wp-grid-drag-preview-scale-enter var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) both}}@media not (prefers-reduced-motion:reduce){@keyframes ed7af28ad1378ef2__wp-grid-drag-preview-shadow-enter{0%{box-shadow:0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01)}to{box-shadow:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02)}}@keyframes _839f03e3bf8089bd__wp-grid-drag-preview-scale-enter{0%{transform:scale(1)}to{transform:scale(var(--wp-grid-drag-preview-scale,1.05))}}}@media not (prefers-reduced-motion:reduce){._7eb716cb5b0b9243__drag-preview-frame._19afc579bbe6da9a__is-exiting{animation:ca01d09b92c08943__wp-grid-drag-preview-shadow-exit var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) forwards}._7eb716cb5b0b9243__drag-preview-frame._19afc579bbe6da9a__is-exiting ._81f4b86c021354df__drag-preview-frame__lift{animation:a3ecfa00ffa965a5__wp-grid-drag-preview-scale-exit var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) forwards}@keyframes ca01d09b92c08943__wp-grid-drag-preview-shadow-exit{0%{box-shadow:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02)}to{box-shadow:0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01)}}@keyframes a3ecfa00ffa965a5__wp-grid-drag-preview-scale-exit{0%{transform:scale(var(--wp-grid-drag-preview-scale,1.05))}to{transform:scale(1)}}}._7eb716cb5b0b9243__drag-preview-frame._19afc579bbe6da9a__is-exiting{box-shadow:0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01)}._7eb716cb5b0b9243__drag-preview-frame._19afc579bbe6da9a__is-exiting ._81f4b86c021354df__drag-preview-frame__lift{transform:scale(1)}@media (prefers-reduced-motion:reduce){._7eb716cb5b0b9243__drag-preview-frame{box-shadow:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02)}._81f4b86c021354df__drag-preview-frame__lift{transform:none}._7eb716cb5b0b9243__drag-preview-frame._19afc579bbe6da9a__is-exiting{box-shadow:0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01);transition:none}._7eb716cb5b0b9243__drag-preview-frame._19afc579bbe6da9a__is-exiting ._81f4b86c021354df__drag-preview-frame__lift{transition:none}}\");\n}\nexport default {\"grid\":\"accd954e27a87edd__grid\",\"drag-preview-frame\":\"_7eb716cb5b0b9243__drag-preview-frame\",\"drag-preview-frame__lift\":\"_81f4b86c021354df__drag-preview-frame__lift\",\"wp-grid-drag-preview-shadow-enter\":\"ed7af28ad1378ef2__wp-grid-drag-preview-shadow-enter\",\"wp-grid-drag-preview-scale-enter\":\"_839f03e3bf8089bd__wp-grid-drag-preview-scale-enter\",\"is-exiting\":\"_19afc579bbe6da9a__is-exiting\",\"wp-grid-drag-preview-shadow-exit\":\"ca01d09b92c08943__wp-grid-drag-preview-shadow-exit\",\"wp-grid-drag-preview-scale-exit\":\"a3ecfa00ffa965a5__wp-grid-drag-preview-scale-exit\"};\n","import {\n\tDndContext,\n\tDragOverlay,\n\tKeyboardSensor,\n\tPointerSensor,\n\tuseSensor,\n\tuseSensors,\n} from '@dnd-kit/core';\nimport {\n\tSortableContext,\n\tsortableKeyboardCoordinates,\n} from '@dnd-kit/sortable';\nimport type { DragMoveEvent, DragStartEvent } from '@dnd-kit/core';\nimport clsx from 'clsx';\nimport { useResizeObserver, useEvent, useMergeRefs } from '@wordpress/compose';\nimport {\n\tforwardRef,\n\tuseMemo,\n\tChildren,\n\tcloneElement,\n\tisValidElement,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseState,\n} from '@wordpress/element';\nimport { GridItem } from './grid-item';\nimport { arrayMoveWithPinned } from '../shared/array-move-with-pinned';\nimport { resolveColumnCount } from '../shared/column-policy';\nimport { GridOverlay } from '../shared/grid-overlay';\nimport { clampSpan, gridSpanToPixelSize } from '../shared/resize-snap';\nimport { useResizePixelLimits, useSpanBounds } from '../shared/use-span-bounds';\nimport layoutAnimationStyles from '../shared/layout-shift-animation.module.css';\nimport { ItemExitOverlay } from '../shared/item-exit-overlay';\nimport {\n\tgetLayoutFingerprint,\n\tuseLayoutShiftAnimation,\n} from '../shared/use-layout-shift-animation';\nimport { useItemExitAnimation } from '../shared/use-item-exit-animation';\nimport { resolveFillWidths } from './resolve-fill-widths';\nimport type { DashboardGridLayoutItem, DashboardGridProps } from './types';\nimport type { ResizeSnapSize } from '../shared/resize-snap';\nimport type { ResizeDelta } from '../shared/types';\nimport { createDashboardDragDropAnimation } from '../shared/drag-overlay-drop-animation';\nimport styles from './grid.module.scss';\n\nconst dashboardDragDropAnimation = createDashboardDragDropAnimation(\n\tstyles[ 'drag-preview-frame' ],\n\tstyles[ 'is-exiting' ]\n);\n\n// Fallback gap in pixels for math that runs before the computed gap\n// can be read from the DOM. Matches the `'xl'` step the surface\n// resolves to in CSS (`--wpds-dimension-gap-xl`); the next layout\n// effect overwrites this with the actual computed value.\nconst FALLBACK_GAP_PX = 24;\n\n// Default column cap when no explicit `columns` or `minColumnWidth` is\n// supplied. Layered semantics: `columns` acts as a cap and\n// `minColumnWidth` as a per-tile floor; if neither is set we still\n// need a finite count to render against.\nconst DEFAULT_COLUMNS = 6;\n\n// Reorder is driven by `temporaryLayout` + CSS Grid, not by dnd-kit\n// transforms. Hoist the no-op strategy outside the component so its\n// reference is stable across renders — passing a fresh `() => null`\n// to `<SortableContext>` updates its context value and triggers all\n// `useSortable` subscribers to re-render every frame.\nconst NO_SORT_STRATEGY = () => null;\n\n/**\n * 2D packed dashboard grid with drag-to-reorder and resize handles.\n * Supports fixed-column and responsive modes, `number | 'fill' | 'full'`\n * widths, and multi-row tiles.\n *\n * Each child's `key` must match an entry in the `layout` array;\n * children without a match render at the end of the grid without\n * explicit placement and fall through CSS Grid's auto-flow.\n *\n * @example\n * ```jsx\n * const layout = [\n * { key: 'a', width: 2 },\n * { key: 'b', width: 'fill' },\n * { key: 'c', width: 'full' },\n * ];\n *\n * <DashboardGrid\n * layout={ layout }\n * columns={ 6 }\n * editMode\n * onChangeLayout={ setLayout }\n * >\n * <div key=\"a\">A</div>\n * <div key=\"b\">B</div>\n * <div key=\"c\">C</div>\n * </DashboardGrid>\n * ```\n *\n * @param props Component props.\n * @param ref Forwarded to the grid's root `<div>`.\n */\nexport const DashboardGrid = forwardRef< HTMLDivElement, DashboardGridProps >(\n\tfunction UnforwardedDashboardGrid( props, ref ) {\n\t\tconst {\n\t\t\tlayout,\n\t\t\tcolumns,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tstyle,\n\t\t\trowHeight = 'auto',\n\t\t\tminColumnWidth,\n\t\t\titemLimits,\n\t\t\teditMode = false,\n\t\t\tonChangeLayout,\n\t\t\tonPreviewLayout,\n\t\t\trenderResizeHandle,\n\t\t\trenderDragPreview,\n\t\t\trenderGridOverlay,\n\t\t\t...divProps\n\t\t} = props;\n\t\t// Preview layout applied during drag/resize before committing.\n\t\tconst [ temporaryLayout, setTemporaryLayout ] = useState<\n\t\t\tDashboardGridLayoutItem[] | undefined\n\t\t>();\n\t\t// Drives `<DragOverlay>` content while a drag is in progress.\n\t\tconst [ activeId, setActiveId ] = useState< string | null >( null );\n\t\t// True while any tile is being resized. Combined with `activeId`,\n\t\t// it drives the grid-wide `inert` flag on actionable areas so\n\t\t// hovering over another tile's buttons can't steal the gesture.\n\t\tconst [ isResizing, setIsResizing ] = useState( false );\n\t\t// Snapped span in pixels for the resize-preview outline on the\n\t\t// active tile. The tile content follows the cursor continuously;\n\t\t// this preview shows the grid size that will commit on release.\n\t\tconst [ resizeSnapPreview, setResizeSnapPreview ] = useState< {\n\t\t\tid: string;\n\t\t\tsnap: ResizeSnapSize;\n\t\t} | null >( null );\n\t\t// Mirror of `temporaryLayout` read synchronously on drag end —\n\t\t// the state update from `handleDragMove` may still be batched.\n\t\tconst latestLayoutRef = useRef< DashboardGridLayoutItem[] | undefined >(\n\t\t\tundefined\n\t\t);\n\t\t// Cursor center at the last applied reorder. Used to skip the\n\t\t// cascade of re-measured `onDragMove` events after a layout\n\t\t// change, when the cursor has not actually moved.\n\t\tconst lastReorderCursorRef = useRef< {\n\t\t\tx: number;\n\t\t\ty: number;\n\t\t} | null >( null );\n\t\t// Width/height snapshot at the start of a resize session. The\n\t\t// resize handle reports `delta` absolute from the gesture start,\n\t\t// so the baseline must stay frozen — reading from the already\n\t\t// mutated `activeLayout` would compound the delta each frame.\n\t\tconst resizeBaselineRef = useRef< {\n\t\t\twidth: number;\n\t\t\theight: number;\n\t\t} | null >( null );\n\t\tconst captureLayoutSnapshotRef = useRef< () => void >( () => {} );\n\t\tconst childrenCacheRef = useRef< Map< string, React.ReactElement > >(\n\t\t\tnew Map()\n\t\t);\n\n\t\tconst [ gridRoot, setGridRoot ] = useState< HTMLDivElement | null >(\n\t\t\tnull\n\t\t);\n\t\tconst [ containerWidth, setContainerWidth ] = useState( 0 );\n\t\tconst [ containerHeight, setContainerHeight ] = useState( 0 );\n\t\tconst [ gapPx, setGapPx ] = useState( FALLBACK_GAP_PX );\n\t\tconst resizeObserverRef = useResizeObserver(\n\t\t\t( [ { contentRect } ] ) => {\n\t\t\t\tsetContainerWidth( contentRect.width );\n\t\t\t\tsetContainerHeight( contentRect.height );\n\t\t\t}\n\t\t);\n\t\tconst mergedGridRef = useMergeRefs( [\n\t\t\tsetGridRoot,\n\t\t\tresizeObserverRef,\n\t\t\tref,\n\t\t] );\n\n\t\t// Measure before paint to avoid a single-column flash in\n\t\t// responsive mode; `useResizeObserver` delivers async. The\n\t\t// computed `column-gap` is read from the resolved CSS so the\n\t\t// math tracks the design-system token under any density.\n\t\tuseLayoutEffect( () => {\n\t\t\tif ( ! gridRoot ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { width, height } = gridRoot.getBoundingClientRect();\n\t\t\tif ( width > 0 ) {\n\t\t\t\tsetContainerWidth( width );\n\t\t\t}\n\t\t\tif ( height > 0 ) {\n\t\t\t\tsetContainerHeight( height );\n\t\t\t}\n\t\t\tconst parsed = Number.parseFloat(\n\t\t\t\twindow.getComputedStyle( gridRoot ).columnGap\n\t\t\t);\n\t\t\tif ( Number.isFinite( parsed ) && parsed > 0 ) {\n\t\t\t\tsetGapPx( parsed );\n\t\t\t}\n\t\t}, [ gridRoot ] );\n\t\tconst effectiveColumns = useMemo(\n\t\t\t() =>\n\t\t\t\tresolveColumnCount(\n\t\t\t\t\t{ columns, minColumnWidth },\n\t\t\t\t\tcontainerWidth,\n\t\t\t\t\tgapPx,\n\t\t\t\t\tDEFAULT_COLUMNS\n\t\t\t\t),\n\t\t\t[ minColumnWidth, gapPx, containerWidth, columns ]\n\t\t);\n\t\tconst columnWidth =\n\t\t\t( containerWidth - ( effectiveColumns - 1 ) * gapPx ) /\n\t\t\teffectiveColumns;\n\t\tconst minResizeWidthPx = gridSpanToPixelSize(\n\t\t\t1,\n\t\t\t1,\n\t\t\tcolumnWidth,\n\t\t\tgapPx,\n\t\t\tnull\n\t\t).widthPx;\n\t\tconst rowHeightPx = typeof rowHeight === 'number' ? rowHeight : null;\n\t\tconst minResizeHeightPx =\n\t\t\trowHeightPx === null\n\t\t\t\t? undefined\n\t\t\t\t: ( gridSpanToPixelSize( 1, 1, columnWidth, gapPx, rowHeightPx )\n\t\t\t\t\t\t.heightPx ?? undefined );\n\n\t\tconst spanBoundsByKey = useSpanBounds(\n\t\t\titemLimits,\n\t\t\tcolumnWidth,\n\t\t\tgapPx,\n\t\t\trowHeightPx,\n\t\t\teffectiveColumns\n\t\t);\n\t\tconst resizeLimitsByKey = useResizePixelLimits(\n\t\t\tspanBoundsByKey,\n\t\t\tcolumnWidth,\n\t\t\tgapPx,\n\t\t\trowHeightPx\n\t\t);\n\n\t\t// Stored and in-gesture layouts may sit outside an item's limits;\n\t\t// render them bounded while the data stays untouched. Gestures\n\t\t// commit from the stored `layout`, never from this bounded view,\n\t\t// so a bounded span cannot reach `onChangeLayout`. Keeps the\n\t\t// source identity when no item needs bounding.\n\t\tconst sourceLayout = temporaryLayout ?? layout;\n\t\tconst activeLayout = useMemo( () => {\n\t\t\tif ( spanBoundsByKey.size === 0 ) {\n\t\t\t\treturn sourceLayout;\n\t\t\t}\n\t\t\tlet changed = false;\n\t\t\tconst bounded = sourceLayout.map( ( item ) => {\n\t\t\t\tconst bounds = spanBoundsByKey.get( item.key );\n\t\t\t\tif ( ! bounds ) {\n\t\t\t\t\treturn item;\n\t\t\t\t}\n\t\t\t\tconst width =\n\t\t\t\t\ttypeof item.width === 'number'\n\t\t\t\t\t\t? clampSpan(\n\t\t\t\t\t\t\t\titem.width,\n\t\t\t\t\t\t\t\tbounds.minWidth,\n\t\t\t\t\t\t\t\tbounds.maxWidth\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t: item.width;\n\t\t\t\tconst height = clampSpan(\n\t\t\t\t\titem.height ?? 1,\n\t\t\t\t\tbounds.minHeight,\n\t\t\t\t\tbounds.maxHeight\n\t\t\t\t);\n\t\t\t\tif ( width === item.width && height === ( item.height ?? 1 ) ) {\n\t\t\t\t\treturn item;\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t\treturn { ...item, width, height };\n\t\t\t} );\n\t\t\treturn changed ? bounded : sourceLayout;\n\t\t}, [ sourceLayout, spanBoundsByKey ] );\n\n\t\tconst layoutMap = useMemo( () => {\n\t\t\tconst map = new Map< string, DashboardGridLayoutItem >();\n\t\t\tactiveLayout.forEach( ( item ) => map.set( item.key, item ) );\n\t\t\treturn map;\n\t\t}, [ activeLayout ] );\n\n\t\t// Stable-identity key set, preserved across renders whenever the\n\t\t// *contents* of the key set are unchanged — even if the consumer\n\t\t// passes a fresh `layout` array reference (common when `layout`\n\t\t// is derived inline from state). Without this, downstream memos\n\t\t// would invalidate on every parent re-render and the children\n\t\t// walk skip during gestures wouldn't hold.\n\t\tconst layoutKeys = useMemo(\n\t\t\t() => new Set( layout.map( ( item ) => item.key ) ),\n\t\t\t[ layout ]\n\t\t);\n\n\t\t// Sorted item keys, identity-stable when the resulting sequence is\n\t\t// unchanged. Avoids producing a fresh `items` array on every parent\n\t\t// re-render so `<SortableContext>` doesn't update its context value\n\t\t// and notify every `useSortable` subscriber unnecessarily.\n\t\tconst sortedItems = useMemo(\n\t\t\t() =>\n\t\t\t\tactiveLayout\n\t\t\t\t\t.map( ( item, index ) => ( { item, index } ) )\n\t\t\t\t\t.sort(\n\t\t\t\t\t\t( a, b ) =>\n\t\t\t\t\t\t\t( a.item.order ?? a.index ) -\n\t\t\t\t\t\t\t( b.item.order ?? b.index )\n\t\t\t\t\t)\n\t\t\t\t\t.map( ( { item } ) => item.key ),\n\t\t\t[ activeLayout ]\n\t\t);\n\t\tconst items = sortedItems;\n\n\t\t// Resolve `width: 'fill'` items to concrete column spans; the\n\t\t// resolver plans the row around each fill's span bounds.\n\t\tconst resolvedItemMap = useMemo( () => {\n\t\t\tconst fillWidths = resolveFillWidths(\n\t\t\t\titems,\n\t\t\t\tlayoutMap,\n\t\t\t\teffectiveColumns,\n\t\t\t\tspanBoundsByKey\n\t\t\t);\n\t\t\tif ( fillWidths.size === 0 ) {\n\t\t\t\treturn layoutMap;\n\t\t\t}\n\t\t\tconst map = new Map< string, DashboardGridLayoutItem >();\n\t\t\tfor ( const [ key, item ] of layoutMap ) {\n\t\t\t\tconst fillW = fillWidths.get( key );\n\t\t\t\tmap.set(\n\t\t\t\t\tkey,\n\t\t\t\t\tfillW !== undefined ? { ...item, width: fillW } : item\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn map;\n\t\t}, [ items, layoutMap, effectiveColumns, spanBoundsByKey ] );\n\n\t\tconst [ childrenMap, actionableAreaMap, remaining, renderedByKey ] =\n\t\t\tuseMemo( () => {\n\t\t\t\tconst childMap = new Map< string, React.ReactElement >();\n\t\t\t\tconst actionableMap = new Map< string, React.ReactNode >();\n\t\t\t\tconst rest: React.ReactNode[] = [];\n\t\t\t\tconst byKey = new Map< string, React.ReactElement >();\n\n\t\t\t\tChildren.forEach( children, ( child ) => {\n\t\t\t\t\tif ( ! isValidElement( child ) ) {\n\t\t\t\t\t\trest.push( child );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst key = child.key?.toString();\n\t\t\t\t\tif ( ! key ) {\n\t\t\t\t\t\trest.push( child );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Strip `actionableArea` so it does not leak to the DOM;\n\t\t\t\t\t// the grid lifts it to a slot separately.\n\t\t\t\t\tconst typedChild = child as React.ReactElement< {\n\t\t\t\t\t\tactionableArea?: React.ReactNode;\n\t\t\t\t\t} >;\n\t\t\t\t\tconst { actionableArea } = typedChild.props;\n\t\t\t\t\tconst stripped =\n\t\t\t\t\t\tactionableArea !== undefined\n\t\t\t\t\t\t\t? cloneElement( typedChild, {\n\t\t\t\t\t\t\t\t\tactionableArea: undefined,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t: child;\n\n\t\t\t\t\tbyKey.set( key, stripped );\n\n\t\t\t\t\tif ( layoutKeys.has( key ) ) {\n\t\t\t\t\t\tif ( actionableArea !== undefined ) {\n\t\t\t\t\t\t\tactionableMap.set( key, actionableArea );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchildMap.set( key, stripped );\n\t\t\t\t\t} else {\n\t\t\t\t\t\trest.push( child );\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\treturn [ childMap, actionableMap, rest, byKey ];\n\t\t\t}, [ children, layoutKeys ] );\n\n\t\t// Persist the latest rendered children so a removed tile's content\n\t\t// is still available for its exit overlay. Filled from an effect so a\n\t\t// discarded render never writes to the cache.\n\t\tuseLayoutEffect( () => {\n\t\t\tfor ( const [ key, child ] of renderedByKey ) {\n\t\t\t\tchildrenCacheRef.current.set( key, child );\n\t\t\t}\n\t\t}, [ renderedByKey ] );\n\n\t\tconst sensors = useSensors(\n\t\t\tuseSensor( PointerSensor ),\n\t\t\tuseSensor( KeyboardSensor, {\n\t\t\t\tcoordinateGetter: sortableKeyboardCoordinates,\n\t\t\t} )\n\t\t);\n\n\t\tconst handleDragStart = useEvent( ( event: DragStartEvent ) => {\n\t\t\tsetActiveId( String( event.active.id ) );\n\t\t\tlastReorderCursorRef.current = null;\n\t\t} );\n\n\t\tconst handleDragCancel = useEvent( () => {\n\t\t\tsetActiveId( null );\n\t\t\tlatestLayoutRef.current = undefined;\n\t\t\tlastReorderCursorRef.current = null;\n\t\t\tresizeBaselineRef.current = null;\n\t\t\tsetIsResizing( false );\n\t\t\tsetResizeSnapPreview( null );\n\t\t\tsetTemporaryLayout( undefined );\n\t\t} );\n\n\t\t// Re-evaluate the insertion slot on every pointer move, not\n\t\t// just when `over.id` changes — otherwise a \"swap back\" with\n\t\t// the cursor still on the same tile would never fire.\n\t\tconst handleDragMove = useEvent( ( event: DragMoveEvent ) => {\n\t\t\tconst { active, over } = event;\n\t\t\tif ( ! over || active.id === over.id ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst activeRect = active.rect.current.translated;\n\t\t\tif ( ! activeRect ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst activeCenterX = activeRect.left + activeRect.width / 2;\n\t\t\tconst activeCenterY = activeRect.top + activeRect.height / 2;\n\n\t\t\t// Skip re-measured events after a layout change: require\n\t\t\t// meaningful cursor movement between reorders.\n\t\t\tconst lastCursor = lastReorderCursorRef.current;\n\t\t\tif ( lastCursor ) {\n\t\t\t\tconst dx = activeCenterX - lastCursor.x;\n\t\t\t\tconst dy = activeCenterY - lastCursor.y;\n\t\t\t\tif ( dx * dx + dy * dy < 100 ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst overCenterX = over.rect.left + over.rect.width / 2;\n\t\t\tconst insertAfter = activeCenterX > overCenterX;\n\n\t\t\tconst currentIndex = items.indexOf( String( active.id ) );\n\t\t\tconst overIndex = items.indexOf( String( over.id ) );\n\t\t\tlet newIndex: number;\n\t\t\tif ( insertAfter ) {\n\t\t\t\tnewIndex = currentIndex > overIndex ? overIndex + 1 : overIndex;\n\t\t\t} else {\n\t\t\t\tnewIndex = currentIndex > overIndex ? overIndex : overIndex - 1;\n\t\t\t}\n\t\t\tnewIndex = Math.max( 0, Math.min( newIndex, items.length - 1 ) );\n\n\t\t\tif ( newIndex === currentIndex ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Non-draggable items are pinned: they hold their index while\n\t\t\t// the others reorder around them.\n\t\t\tconst updatedItems = arrayMoveWithPinned(\n\t\t\t\titems,\n\t\t\t\tcurrentIndex,\n\t\t\t\tnewIndex,\n\t\t\t\t( key ) => layoutMap.get( key )?.draggable === false\n\t\t\t);\n\t\t\tif (\n\t\t\t\tupdatedItems.every( ( key, index ) => key === items[ index ] )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Commit from the stored layout (or the pending commit), not\n\t\t\t// the bounded view, so untouched tiles keep their stored spans.\n\t\t\tconst updatedLayout = ( latestLayoutRef.current ?? layout ).map(\n\t\t\t\t( item ) => ( {\n\t\t\t\t\t...item,\n\t\t\t\t\torder: updatedItems.indexOf( item.key ),\n\t\t\t\t} )\n\t\t\t);\n\n\t\t\tlastReorderCursorRef.current = {\n\t\t\t\tx: activeCenterX,\n\t\t\t\ty: activeCenterY,\n\t\t\t};\n\t\t\tlatestLayoutRef.current = updatedLayout;\n\t\t\tcaptureLayoutSnapshotRef.current();\n\t\t\tsetTemporaryLayout( updatedLayout );\n\t\t\tonPreviewLayout?.( updatedLayout );\n\t\t} );\n\n\t\t// Commit the latest temporary layout and clear local state.\n\t\t// Reads from the ref to bypass React's state batching.\n\t\tconst persistTemporaryLayout = useEvent( () => {\n\t\t\tconst latest = latestLayoutRef.current;\n\t\t\tlatestLayoutRef.current = undefined;\n\t\t\tresizeBaselineRef.current = null;\n\t\t\tsetIsResizing( false );\n\t\t\tsetResizeSnapPreview( null );\n\t\t\tif ( ! onChangeLayout || ! latest ) {\n\t\t\t\tsetTemporaryLayout( undefined );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tonChangeLayout( latest );\n\t\t\tsetTemporaryLayout( undefined );\n\t\t} );\n\n\t\tconst handleResize = useEvent( ( id: string, delta: ResizeDelta ) => {\n\t\t\tif ( ! editMode ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! isResizing ) {\n\t\t\t\tsetIsResizing( true );\n\t\t\t}\n\n\t\t\tconst relativeDelta = {\n\t\t\t\twidth: Math.round( delta.width / ( columnWidth + gapPx ) ),\n\t\t\t\theight:\n\t\t\t\t\trowHeight === 'auto'\n\t\t\t\t\t\t? 0\n\t\t\t\t\t\t: Math.round( delta.height / ( rowHeight + gapPx ) ),\n\t\t\t};\n\n\t\t\t// Snapshot the baseline once at gesture start. The handle's\n\t\t\t// `delta` is absolute from the gesture start, so summing it\n\t\t\t// with the live (already mutated) `activeLayout` width would\n\t\t\t// compound and oscillate — and stepping back through the\n\t\t\t// zero-delta zone would never restore the original size.\n\t\t\tconst bounds = spanBoundsByKey.get( id );\n\t\t\tif ( ! resizeBaselineRef.current ) {\n\t\t\t\tconst baseItem = layoutMap.get( id );\n\t\t\t\tconst resolvedItem = resolvedItemMap.get( id );\n\t\t\t\t// `'fill'`/`'full'` resize from the rendered span\n\t\t\t\t// and convert to a numeric width.\n\t\t\t\tlet baseWidth: number;\n\t\t\t\tif ( baseItem?.width === 'full' ) {\n\t\t\t\t\tbaseWidth = bounds?.maxWidth ?? effectiveColumns;\n\t\t\t\t} else if ( baseItem?.width === 'fill' ) {\n\t\t\t\t\tbaseWidth =\n\t\t\t\t\t\ttypeof resolvedItem?.width === 'number'\n\t\t\t\t\t\t\t? resolvedItem.width\n\t\t\t\t\t\t\t: 1;\n\t\t\t\t} else {\n\t\t\t\t\tbaseWidth = baseItem?.width ?? 1;\n\t\t\t\t}\n\t\t\t\tresizeBaselineRef.current = {\n\t\t\t\t\twidth: baseWidth,\n\t\t\t\t\theight: baseItem?.height ?? 1,\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst baseline = resizeBaselineRef.current;\n\t\t\tconst newWidth = clampSpan(\n\t\t\t\tbaseline.width + relativeDelta.width,\n\t\t\t\tbounds?.minWidth ?? 1,\n\t\t\t\tbounds?.maxWidth ?? effectiveColumns\n\t\t\t);\n\t\t\tconst newHeight = clampSpan(\n\t\t\t\tbaseline.height + relativeDelta.height,\n\t\t\t\tbounds?.minHeight ?? 1,\n\t\t\t\tbounds?.maxHeight ?? Infinity\n\t\t\t);\n\n\t\t\tsetResizeSnapPreview( {\n\t\t\t\tid,\n\t\t\t\tsnap: gridSpanToPixelSize(\n\t\t\t\t\tnewWidth,\n\t\t\t\t\tnewHeight,\n\t\t\t\t\tcolumnWidth,\n\t\t\t\t\tgapPx,\n\t\t\t\t\trowHeightPx\n\t\t\t\t),\n\t\t\t} );\n\n\t\t\t// Bail when the snapped size matches the layout already\n\t\t\t// staged for commit. The tile still tracks the cursor\n\t\t\t// continuously; only the preview outline and pending commit\n\t\t\t// need updating when the snap target changes.\n\t\t\tconst pendingItem = latestLayoutRef.current?.find(\n\t\t\t\t( item ) => item.key === id\n\t\t\t);\n\t\t\tconst currentItem = pendingItem ?? layoutMap.get( id );\n\t\t\tif (\n\t\t\t\tcurrentItem &&\n\t\t\t\tcurrentItem.width === newWidth &&\n\t\t\t\t( currentItem.height ?? 1 ) === newHeight\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Commit from the stored layout (or the pending commit), not\n\t\t\t// the bounded view: the resized tile takes its new span and\n\t\t\t// every other tile keeps its stored one.\n\t\t\tconst updatedLayout = ( latestLayoutRef.current ?? layout ).map(\n\t\t\t\t( item ) =>\n\t\t\t\t\titem.key === id\n\t\t\t\t\t\t? { ...item, width: newWidth, height: newHeight }\n\t\t\t\t\t\t: item\n\t\t\t);\n\n\t\t\tlatestLayoutRef.current = updatedLayout;\n\t\t\tcaptureLayoutSnapshotRef.current();\n\t\t\tsetTemporaryLayout( updatedLayout );\n\t\t\tonPreviewLayout?.( updatedLayout );\n\t\t} );\n\n\t\t// Drag-overlay clone composition: the surface always wraps with a\n\t\t// thin functional frame (lift, cursor, pointer pass-through). When\n\t\t// `renderDragPreview` is supplied, the consumer's wrapper sits\n\t\t// inside the frame around the cloned children; otherwise the\n\t\t// cloned children render directly so any persistent chrome on\n\t\t// them carries through unchanged.\n\t\tconst activeClone = activeId ? childrenMap.get( activeId ) : null;\n\t\tconst DragPreview = renderDragPreview;\n\t\tconst dragOverlayContent =\n\t\t\tactiveId && activeClone ? (\n\t\t\t\t<div className={ styles[ 'drag-preview-frame' ] }>\n\t\t\t\t\t<div className={ styles[ 'drag-preview-frame__lift' ] }>\n\t\t\t\t\t\t{ DragPreview ? (\n\t\t\t\t\t\t\t<DragPreview itemId={ activeId }>\n\t\t\t\t\t\t\t\t{ activeClone }\n\t\t\t\t\t\t\t</DragPreview>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\tactiveClone\n\t\t\t\t\t\t) }\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t) : null;\n\n\t\t// Edit-mode background. Rendered unconditionally so it can\n\t\t// cross-fade on edit-mode toggles (`isActive` drives the\n\t\t// transition); memoized so drag/resize re-renders skip it while\n\t\t// inputs are stable. A numeric `rowHeight` adds row markers;\n\t\t// `'auto'` collapses to `undefined` and omits them.\n\t\tconst Overlay = renderGridOverlay ?? GridOverlay;\n\t\tconst overlayRowHeight =\n\t\t\ttypeof rowHeight === 'number' ? rowHeight : undefined;\n\t\tconst overlayRows = useMemo( () => {\n\t\t\tif ( overlayRowHeight === undefined || containerHeight <= 0 ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tconst rowTile = overlayRowHeight + gapPx;\n\t\t\treturn Math.max(\n\t\t\t\t1,\n\t\t\t\tMath.floor( ( containerHeight + gapPx ) / rowTile )\n\t\t\t);\n\t\t}, [ overlayRowHeight, containerHeight, gapPx ] );\n\t\tconst gridOverlay = useMemo(\n\t\t\t() => (\n\t\t\t\t<Overlay\n\t\t\t\t\tcolumns={ effectiveColumns }\n\t\t\t\t\trowHeight={ overlayRowHeight }\n\t\t\t\t\trows={ overlayRows }\n\t\t\t\t\tisActive={ editMode }\n\t\t\t\t/>\n\t\t\t),\n\t\t\t[\n\t\t\t\tOverlay,\n\t\t\t\teditMode,\n\t\t\t\teffectiveColumns,\n\t\t\t\toverlayRowHeight,\n\t\t\t\toverlayRows,\n\t\t\t]\n\t\t);\n\n\t\tconst layoutFingerprint = useMemo(\n\t\t\t() => getLayoutFingerprint( [ ...resolvedItemMap.values() ] ),\n\t\t\t[ resolvedItemMap ]\n\t\t);\n\t\tconst excludeLayoutAnimationKey =\n\t\t\tactiveId ?? ( isResizing ? resizeSnapPreview?.id : null );\n\t\tconst { captureLayoutSnapshot, getPositionsBeforeLastChange } =\n\t\t\tuseLayoutShiftAnimation( {\n\t\t\t\tcontainer: gridRoot,\n\t\t\t\tenabled: editMode,\n\t\t\t\tlayoutFingerprint,\n\t\t\t\texcludeItemKey: excludeLayoutAnimationKey,\n\t\t\t} );\n\t\tconst { exitingItems, clearExitingItem } = useItemExitAnimation( {\n\t\t\tcontainer: gridRoot,\n\t\t\tenabled: editMode,\n\t\t\tlayoutKeys,\n\t\t\tgetPositionsBeforeLastChange,\n\t\t\tchildrenCacheRef,\n\t\t} );\n\t\t// Transform transitions on tiles for FLIP (drag, resize, removal).\n\t\tconst layoutAnimating = editMode;\n\t\tuseLayoutEffect( () => {\n\t\t\tcaptureLayoutSnapshotRef.current = captureLayoutSnapshot;\n\t\t}, [ captureLayoutSnapshot ] );\n\n\t\treturn (\n\t\t\t<DndContext\n\t\t\t\tsensors={ sensors }\n\t\t\t\tonDragStart={ handleDragStart }\n\t\t\t\tonDragCancel={ handleDragCancel }\n\t\t\t\tonDragMove={ handleDragMove }\n\t\t\t\tonDragEnd={ () => {\n\t\t\t\t\tpersistTemporaryLayout();\n\t\t\t\t\tlastReorderCursorRef.current = null;\n\t\t\t\t\tsetActiveId( null );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ /* No-op strategy: reorder comes from `temporaryLayout`\n\t\t\t\t + CSS Grid, not dnd-kit transforms. */ }\n\t\t\t\t<SortableContext items={ items } strategy={ NO_SORT_STRATEGY }>\n\t\t\t\t\t<div\n\t\t\t\t\t\t{ ...divProps }\n\t\t\t\t\t\tref={ mergedGridRef }\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\tstyles.grid,\n\t\t\t\t\t\t\tlayoutAnimating &&\n\t\t\t\t\t\t\t\tlayoutAnimationStyles[ 'layout-animating' ],\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tdata-wp-grid-dragging={ activeId || undefined }\n\t\t\t\t\t\tdata-wp-grid-resizing={ isResizing || undefined }\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t...style,\n\t\t\t\t\t\t\tgridTemplateColumns: `repeat(${ effectiveColumns }, minmax(0, 1fr))`,\n\t\t\t\t\t\t\tgridAutoRows: rowHeight,\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ gridOverlay }\n\t\t\t\t\t\t{ items.map( ( id ) => {\n\t\t\t\t\t\t\tconst limitsPx = resizeLimitsByKey.get( id );\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<GridItem\n\t\t\t\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\t\t\t\titem={\n\t\t\t\t\t\t\t\t\t\tresolvedItemMap.get(\n\t\t\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\t\t) as DashboardGridLayoutItem\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tmaxColumns={\n\t\t\t\t\t\t\t\t\t\tspanBoundsByKey.get( id )?.maxWidth ??\n\t\t\t\t\t\t\t\t\t\teffectiveColumns\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdisabled={ ! editMode }\n\t\t\t\t\t\t\t\t\tdraggable={\n\t\t\t\t\t\t\t\t\t\tlayoutMap.get( id )?.draggable !== false\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tresizable={\n\t\t\t\t\t\t\t\t\t\tlayoutMap.get( id )?.resizable !== false\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tverticalResizable={ rowHeight !== 'auto' }\n\t\t\t\t\t\t\t\t\tinteracting={\n\t\t\t\t\t\t\t\t\t\tactiveId !== null || isResizing\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdragging={ activeId !== null }\n\t\t\t\t\t\t\t\t\tonResize={ handleResize }\n\t\t\t\t\t\t\t\t\tonResizeEnd={ persistTemporaryLayout }\n\t\t\t\t\t\t\t\t\tresizeSnapPreview={\n\t\t\t\t\t\t\t\t\t\tresizeSnapPreview?.id === id\n\t\t\t\t\t\t\t\t\t\t\t? resizeSnapPreview.snap\n\t\t\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tminResizeWidthPx={\n\t\t\t\t\t\t\t\t\t\tlimitsPx?.minWidthPx ?? minResizeWidthPx\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tminResizeHeightPx={\n\t\t\t\t\t\t\t\t\t\tlimitsPx?.minHeightPx ??\n\t\t\t\t\t\t\t\t\t\tminResizeHeightPx\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tmaxResizeWidthPx={ limitsPx?.maxWidthPx }\n\t\t\t\t\t\t\t\t\tmaxResizeHeightPx={\n\t\t\t\t\t\t\t\t\t\tlimitsPx?.maxHeightPx ?? undefined\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tactionableArea={ actionableAreaMap.get(\n\t\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\trenderResizeHandle={ renderResizeHandle }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ childrenMap.get( id ) }\n\t\t\t\t\t\t\t\t</GridItem>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t{ remaining }\n\t\t\t\t\t\t{ exitingItems.map( ( { key, rect, child } ) => (\n\t\t\t\t\t\t\t<ItemExitOverlay\n\t\t\t\t\t\t\t\tkey={ `exiting-${ key }` }\n\t\t\t\t\t\t\t\titemKey={ key }\n\t\t\t\t\t\t\t\trect={ rect }\n\t\t\t\t\t\t\t\tonAnimationEnd={ () => clearExitingItem( key ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ child }\n\t\t\t\t\t\t\t</ItemExitOverlay>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</div>\n\t\t\t\t</SortableContext>\n\t\t\t\t<DragOverlay dropAnimation={ dashboardDragDropAnimation }>\n\t\t\t\t\t{ dragOverlayContent }\n\t\t\t\t</DragOverlay>\n\t\t\t</DndContext>\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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AC3C,OACC,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,UAAD;OAEC,MACC,gBAAgB,IACf,EACD;OAED,YACC,gBAAgB,IAAK,EAAG,CAAC,EAAE,YAC3B;OAED,UAAW,CAAE;OACb,WACC,UAAU,IAAK,EAAG,CAAC,EAAE,cAAc;OAEpC,WACC,UAAU,IAAK,EAAG,CAAC,EAAE,cAAc;OAEpC,mBAAoB,cAAc;OAClC,aACC,aAAa,QAAQ;OAEtB,UAAW,aAAa;OACxB,UAAW;OACX,aAAc;OACd,mBACC,mBAAmB,OAAO,KACvB,kBAAkB,OAClB;OAEJ,kBACC,UAAU,cAAc;OAEzB,mBACC,UAAU,eACV;OAED,kBAAmB,UAAU;OAC7B,mBACC,UAAU,eAAe,KAAA;OAE1B,gBAAiB,kBAAkB,IAClC,EACD;OACqB;OAEnB,UAAA,YAAY,IAAK,EAAG;MACb,GA9CH,EA8CG;KAEZ,CAAE;KACA;KACA,aAAa,KAAO,EAAE,KAAK,MAAM,YAClC,iBAAA,GAAA,kBAAA,IAAA,CAACC,gCAAAA,iBAAD;MAEC,SAAU;MACH;MACP,sBAAuB,iBAAkB,GAAI;MAE3C,UAAA;KACc,GANV,WAAY,KAMF,CAChB;IACE;;EACW,CAAA,GACjB,iBAAA,GAAA,kBAAA,IAAA,CAACC,cAAAA,aAAD;GAAa,eAAgB;GAC1B,UAAA;EACU,CAAA,CACF;;AAEd,CACD"}
@@ -11,12 +11,14 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
11
11
  var __getProtoOf = Object.getPrototypeOf;
12
12
  var __hasOwnProp = Object.prototype.hasOwnProperty;
13
13
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
15
- key = keys[i];
16
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
- get: ((k) => from[k]).bind(null, key),
18
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
- });
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) {
16
+ desc = __getOwnPropDesc(from, key);
17
+ __defProp(to, key, {
18
+ get: desc && desc.get && !desc.configurable ? desc.get : () => from[key],
19
+ enumerable: !desc || desc.enumerable
20
+ });
21
+ }
20
22
  }
21
23
  return to;
22
24
  };
@@ -27,7 +29,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
29
  let _dnd_kit_core = require("@dnd-kit/core");
28
30
  let _dnd_kit_sortable = require("@dnd-kit/sortable");
29
31
  let clsx = require("clsx");
30
- clsx = __toESM(clsx);
31
32
  let _wordpress_compose = require("@wordpress/compose");
32
33
  let _wordpress_element = require("@wordpress/element");
33
34
  let __lanes_item_tsx = require("./lanes-item.cjs");
@@ -42,6 +43,7 @@ let ___shared_use_layout_shift_animation_ts = require("../shared/use-layout-shif
42
43
  let ___shared_use_item_exit_animation_ts = require("../shared/use-item-exit-animation.cjs");
43
44
  let ___shared_drag_overlay_drop_animation_ts = require("../shared/drag-overlay-drop-animation.cjs");
44
45
  let react_jsx_runtime = require("react/jsx-runtime");
46
+ clsx = __toESM(clsx);
45
47
  // packages/style-runtime/src/index.ts
46
48
  const STYLE_HASH_ATTRIBUTE = "data-wp-hash";
47
49
  /**
@@ -147,17 +149,17 @@ function registerStyle(hash, css) {
147
149
  // packages/grid/src/shared/layout-shift-animation.module.css
148
150
  if (typeof process === "undefined" || process.env.NODE_ENV !== "test") registerStyle("5d10111ab0", ".c68bb75eb6bf717a__layout-animating [data-wp-grid-item-key]{transition:transform var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1))}@media (prefers-reduced-motion:reduce){.c68bb75eb6bf717a__layout-animating [data-wp-grid-item-key]{transition:none}}");
149
151
  var layout_shift_animation_module_default = { "layout-animating": "c68bb75eb6bf717a__layout-animating" };
150
- // packages/grid/src/dashboard-lanes/lanes.module.css
151
- if (typeof process === "undefined" || process.env.NODE_ENV !== "test") registerStyle("6b5b6b8d59", "._279d14c775dbbe7a__lanes{column-gap:var(--wp-grid-gap,var(--wpds-dimension-gap-xl,24px));display:grid-lanes;position:relative;row-gap:var(--wp-grid-gap,var(--wpds-dimension-gap-xl,24px))}@supports not (display:grid-lanes){._279d14c775dbbe7a__lanes{display:grid;grid-auto-flow:dense;grid-auto-rows:var(--wp-grid-lane-row-unit,4px);row-gap:0}}.cf1a25111e009cff__drag-preview-frame{--_wp-grid-elevation-xs:0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01);--_wp-grid-elevation-md:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02);border-radius:var(--wp-grid-drag-preview-radius,0);box-shadow:var(--_wp-grid-elevation-md);cursor:grabbing;height:100%;pointer-events:none}._1670330318f73437__drag-preview-frame__lift{height:100%;transform:scale(var(--wp-grid-drag-preview-scale,1.05));transform-origin:center}@media not (prefers-reduced-motion:reduce){.cf1a25111e009cff__drag-preview-frame{animation:c44ad0dc1d6b976a__wp-grid-drag-preview-shadow-enter var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) both}._1670330318f73437__drag-preview-frame__lift{animation:dba9b43a556bb015__wp-grid-drag-preview-scale-enter var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) both}}@media not (prefers-reduced-motion:reduce){@keyframes c44ad0dc1d6b976a__wp-grid-drag-preview-shadow-enter{0%{box-shadow:var(--_wp-grid-elevation-xs)}to{box-shadow:var(--_wp-grid-elevation-md)}}@keyframes dba9b43a556bb015__wp-grid-drag-preview-scale-enter{0%{transform:scale(1)}to{transform:scale(var(--wp-grid-drag-preview-scale,1.05))}}}@media not (prefers-reduced-motion:reduce){.cf1a25111e009cff__drag-preview-frame._44fd9c611b434255__is-exiting{animation:_5f907efa9ff8caac__wp-grid-drag-preview-shadow-exit var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) forwards}.cf1a25111e009cff__drag-preview-frame._44fd9c611b434255__is-exiting ._1670330318f73437__drag-preview-frame__lift{animation:a91293ba67737ef7__wp-grid-drag-preview-scale-exit var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) forwards}@keyframes _5f907efa9ff8caac__wp-grid-drag-preview-shadow-exit{0%{box-shadow:var(--_wp-grid-elevation-md)}to{box-shadow:var(--_wp-grid-elevation-xs)}}@keyframes a91293ba67737ef7__wp-grid-drag-preview-scale-exit{0%{transform:scale(var(--wp-grid-drag-preview-scale,1.05))}to{transform:scale(1)}}}.cf1a25111e009cff__drag-preview-frame._44fd9c611b434255__is-exiting{box-shadow:var(--_wp-grid-elevation-xs)}.cf1a25111e009cff__drag-preview-frame._44fd9c611b434255__is-exiting ._1670330318f73437__drag-preview-frame__lift{transform:scale(1)}@media (prefers-reduced-motion:reduce){.cf1a25111e009cff__drag-preview-frame{box-shadow:var(--_wp-grid-elevation-md)}._1670330318f73437__drag-preview-frame__lift{transform:none}.cf1a25111e009cff__drag-preview-frame._44fd9c611b434255__is-exiting{box-shadow:var(--_wp-grid-elevation-xs);transition:none}.cf1a25111e009cff__drag-preview-frame._44fd9c611b434255__is-exiting ._1670330318f73437__drag-preview-frame__lift{transition:none}}");
152
+ // packages/grid/src/dashboard-lanes/lanes.module.scss
153
+ if (typeof process === "undefined" || process.env.NODE_ENV !== "test") registerStyle("25b095c2e7", "._23779dfdf51c5e50__lanes{column-gap:var(--wp-grid-gap,var(--wpds-dimension-gap-xl,24px));display:grid-lanes;position:relative;row-gap:var(--wp-grid-gap,var(--wpds-dimension-gap-xl,24px))}@supports not (display:grid-lanes){._23779dfdf51c5e50__lanes{display:grid;grid-auto-flow:dense;grid-auto-rows:var(--wp-grid-lane-row-unit,4px);row-gap:0}}.d7e03cc9b910fc7e__drag-preview-frame{border-radius:var(--wp-grid-drag-preview-radius,0);box-shadow:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02);cursor:grabbing;height:100%;pointer-events:none}._4425b9a6fa30579d__drag-preview-frame__lift{height:100%;transform:scale(var(--wp-grid-drag-preview-scale,1.05));transform-origin:center}@media not (prefers-reduced-motion:reduce){.d7e03cc9b910fc7e__drag-preview-frame{animation:ff9e5dccc1f34f49__wp-grid-drag-preview-shadow-enter var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) both}._4425b9a6fa30579d__drag-preview-frame__lift{animation:_2592bed08e4f30e4__wp-grid-drag-preview-scale-enter var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) both}}@media not (prefers-reduced-motion:reduce){@keyframes ff9e5dccc1f34f49__wp-grid-drag-preview-shadow-enter{0%{box-shadow:0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01)}to{box-shadow:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02)}}@keyframes _2592bed08e4f30e4__wp-grid-drag-preview-scale-enter{0%{transform:scale(1)}to{transform:scale(var(--wp-grid-drag-preview-scale,1.05))}}}@media not (prefers-reduced-motion:reduce){.d7e03cc9b910fc7e__drag-preview-frame._6348e3778fd237bf__is-exiting{animation:_4eb7799009ff2eea__wp-grid-drag-preview-shadow-exit var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) forwards}.d7e03cc9b910fc7e__drag-preview-frame._6348e3778fd237bf__is-exiting ._4425b9a6fa30579d__drag-preview-frame__lift{animation:_58b3144e745d3a6e__wp-grid-drag-preview-scale-exit var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) forwards}@keyframes _4eb7799009ff2eea__wp-grid-drag-preview-shadow-exit{0%{box-shadow:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02)}to{box-shadow:0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01)}}@keyframes _58b3144e745d3a6e__wp-grid-drag-preview-scale-exit{0%{transform:scale(var(--wp-grid-drag-preview-scale,1.05))}to{transform:scale(1)}}}.d7e03cc9b910fc7e__drag-preview-frame._6348e3778fd237bf__is-exiting{box-shadow:0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01)}.d7e03cc9b910fc7e__drag-preview-frame._6348e3778fd237bf__is-exiting ._4425b9a6fa30579d__drag-preview-frame__lift{transform:scale(1)}@media (prefers-reduced-motion:reduce){.d7e03cc9b910fc7e__drag-preview-frame{box-shadow:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02)}._4425b9a6fa30579d__drag-preview-frame__lift{transform:none}.d7e03cc9b910fc7e__drag-preview-frame._6348e3778fd237bf__is-exiting{box-shadow:0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01);transition:none}.d7e03cc9b910fc7e__drag-preview-frame._6348e3778fd237bf__is-exiting ._4425b9a6fa30579d__drag-preview-frame__lift{transition:none}}");
152
154
  var lanes_module_default = {
153
- "lanes": "_279d14c775dbbe7a__lanes",
154
- "drag-preview-frame": "cf1a25111e009cff__drag-preview-frame",
155
- "drag-preview-frame__lift": "_1670330318f73437__drag-preview-frame__lift",
156
- "wp-grid-drag-preview-shadow-enter": "c44ad0dc1d6b976a__wp-grid-drag-preview-shadow-enter",
157
- "wp-grid-drag-preview-scale-enter": "dba9b43a556bb015__wp-grid-drag-preview-scale-enter",
158
- "is-exiting": "_44fd9c611b434255__is-exiting",
159
- "wp-grid-drag-preview-shadow-exit": "_5f907efa9ff8caac__wp-grid-drag-preview-shadow-exit",
160
- "wp-grid-drag-preview-scale-exit": "a91293ba67737ef7__wp-grid-drag-preview-scale-exit"
155
+ "lanes": "_23779dfdf51c5e50__lanes",
156
+ "drag-preview-frame": "d7e03cc9b910fc7e__drag-preview-frame",
157
+ "drag-preview-frame__lift": "_4425b9a6fa30579d__drag-preview-frame__lift",
158
+ "wp-grid-drag-preview-shadow-enter": "ff9e5dccc1f34f49__wp-grid-drag-preview-shadow-enter",
159
+ "wp-grid-drag-preview-scale-enter": "_2592bed08e4f30e4__wp-grid-drag-preview-scale-enter",
160
+ "is-exiting": "_6348e3778fd237bf__is-exiting",
161
+ "wp-grid-drag-preview-shadow-exit": "_4eb7799009ff2eea__wp-grid-drag-preview-shadow-exit",
162
+ "wp-grid-drag-preview-scale-exit": "_58b3144e745d3a6e__wp-grid-drag-preview-scale-exit"
161
163
  };
162
164
  // packages/grid/src/dashboard-lanes/index.tsx
163
165
  const dashboardDragDropAnimation = (0, ___shared_drag_overlay_drop_animation_ts.createDashboardDragDropAnimation)(lanes_module_default["drag-preview-frame"], lanes_module_default["is-exiting"]);