@wordpress/grid 0.7.1-next.v.202609031004.0 → 0.7.2-next.v.202609171837.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 (39) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/README.md +38 -38
  3. package/build/dashboard-grid/grid-item.cjs.map +2 -2
  4. package/build/dashboard-grid/index.cjs.map +2 -2
  5. package/build/dashboard-grid/types.cjs.map +1 -1
  6. package/build/dashboard-lanes/index.cjs.map +2 -2
  7. package/build/dashboard-lanes/lanes-item.cjs.map +2 -2
  8. package/build/dashboard-lanes/types.cjs.map +1 -1
  9. package/build/dashboard-lanes/use-lane-placement.cjs.map +2 -2
  10. package/build/shared/grid-overlay.cjs.map +2 -2
  11. package/build-module/dashboard-grid/grid-item.mjs.map +2 -2
  12. package/build-module/dashboard-grid/index.mjs.map +2 -2
  13. package/build-module/dashboard-lanes/index.mjs.map +2 -2
  14. package/build-module/dashboard-lanes/lanes-item.mjs.map +2 -2
  15. package/build-module/dashboard-lanes/use-lane-placement.mjs.map +2 -2
  16. package/build-module/shared/grid-overlay.mjs.map +2 -2
  17. package/build-types/dashboard-grid/types.d.ts.map +1 -1
  18. package/build-types/dashboard-lanes/types.d.ts.map +1 -1
  19. package/package.json +11 -11
  20. package/src/dashboard-grid/grid-item.tsx +2 -2
  21. package/src/dashboard-grid/index.tsx +4 -4
  22. package/src/dashboard-grid/stories/index.story.tsx +4 -4
  23. package/src/dashboard-grid/test/item-interactions.browser.test.tsx +50 -0
  24. package/src/dashboard-grid/test/item-limits.jsdom.test.tsx +25 -22
  25. package/src/dashboard-grid/test/{keyboard-activation.jsdom.test.tsx → keyboard-activation.browser.test.tsx} +12 -31
  26. package/src/dashboard-grid/types.ts +4 -5
  27. package/src/dashboard-lanes/index.tsx +2 -2
  28. package/src/dashboard-lanes/lanes-item.tsx +1 -1
  29. package/src/dashboard-lanes/test/item-interactions.browser.test.tsx +50 -0
  30. package/src/dashboard-lanes/test/item-limits.jsdom.test.tsx +25 -22
  31. package/src/dashboard-lanes/test/{keyboard-activation.jsdom.test.tsx → keyboard-activation.browser.test.tsx} +12 -31
  32. package/src/dashboard-lanes/test/use-lane-placement.browser.test.tsx +74 -0
  33. package/src/dashboard-lanes/test/use-lane-placement.jsdom.test.tsx +11 -10
  34. package/src/dashboard-lanes/types.ts +4 -5
  35. package/src/dashboard-lanes/use-lane-placement.ts +1 -1
  36. package/src/shared/grid-overlay.tsx +1 -1
  37. package/src/shared/test/use-span-bounds.jsdom.test.ts +1 -0
  38. package/src/dashboard-grid/test/item-interactions.jsdom.test.tsx +0 -63
  39. package/src/dashboard-lanes/test/item-interactions.jsdom.test.tsx +0 -63
package/CHANGELOG.md CHANGED
@@ -2,7 +2,14 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
- ## 0.7.0-next.0 (2026-09-03)
5
+ ## 0.7.1-next.0 (2026-09-17)
6
+
7
+ ### Internal
8
+
9
+ - Remove obsolete Jest test dependencies and types ([#82975](https://github.com/WordPress/gutenberg/pull/82975)).
10
+ - Run rendered Grid tests in Vitest Browser Mode ([#80995](https://github.com/WordPress/gutenberg/pull/80995)).
11
+
12
+ ## 0.7.0 (2026-09-10)
6
13
 
7
14
  ### New Features
8
15
 
package/README.md CHANGED
@@ -10,14 +10,14 @@ dashboard-style surfaces.
10
10
  This package exposes two components, each implementing a different
11
11
  layout model:
12
12
 
13
- - **`DashboardGrid`** is a 2D packed grid: tiles declare explicit
14
- `(width, height)` spans in column/row units and can span multiple
15
- columns and rows.
16
- - **`DashboardLanes`** is a masonry-style surface aligned with the
17
- emerging WebKit spec [`display: grid-lanes`](https://webkit.org/blog/17660/introducing-css-grid-lanes/).
18
- Tiles declare a column span only; heights are driven by content;
19
- placement follows a source-ordered, shortest-lane skyline with a
20
- `flow-tolerance` tiebreaker.
13
+ - **`DashboardGrid`** is a 2D packed grid: tiles declare explicit
14
+ `(width, height)` spans in column/row units and can span multiple
15
+ columns and rows.
16
+ - **`DashboardLanes`** is a masonry-style surface aligned with the
17
+ emerging WebKit spec [`display: grid-lanes`](https://webkit.org/blog/17660/introducing-css-grid-lanes/).
18
+ Tiles declare a column span only; heights are driven by content;
19
+ placement follows a source-ordered, shortest-lane skyline with a
20
+ `flow-tolerance` tiebreaker.
21
21
 
22
22
  ## Installation
23
23
 
@@ -136,9 +136,9 @@ interface DashboardGridLayoutItem {
136
136
 
137
137
  `width` is a discriminated value:
138
138
 
139
- - `number`: span that many columns (clamped to the grid's column count).
140
- - `'fill'`: fill the remaining columns in the current row.
141
- - `'full'`: span every column and force a row break; an `itemLimits` maximum caps the span.
139
+ - `number`: span that many columns (clamped to the grid's column count).
140
+ - `'fill'`: fill the remaining columns in the current row.
141
+ - `'full'`: span every column and force a row break; an `itemLimits` maximum caps the span.
142
142
 
143
143
  `'fill'` is resolved per-row against the remaining free space.
144
144
 
@@ -208,20 +208,20 @@ display order independently of array position.
208
208
 
209
209
  When `editMode` is true:
210
210
 
211
- - Items become draggable (powered by `@dnd-kit`). The original tile
212
- stays in place as a dashed placeholder while a clone follows the
213
- cursor through `<DragOverlay>`.
214
- - A resize handle appears on the bottom-right of each item. A
215
- solid outline previews the target size as the cursor moves.
216
- - While any tile is dragging or resizing, `actionableArea` content
217
- on every tile is set `inert` so hovers on other tiles can't steal
218
- the gesture.
219
- - `onChangeLayout` fires after drop or resize with the new layout.
220
- - `onPreviewLayout` fires continuously during the interaction for
221
- live feedback; the committed layout is still emitted via
222
- `onChangeLayout`.
223
- - Sibling tiles animate into their new positions when the layout
224
- reflows.
211
+ - Items become draggable (powered by `@dnd-kit`). The original tile
212
+ stays in place as a dashed placeholder while a clone follows the
213
+ cursor through `<DragOverlay>`.
214
+ - A resize handle appears on the bottom-right of each item. A
215
+ solid outline previews the target size as the cursor moves.
216
+ - While any tile is dragging or resizing, `actionableArea` content
217
+ on every tile is set `inert` so hovers on other tiles can't steal
218
+ the gesture.
219
+ - `onChangeLayout` fires after drop or resize with the new layout.
220
+ - `onPreviewLayout` fires continuously during the interaction for
221
+ live feedback; the committed layout is still emitted via
222
+ `onChangeLayout`.
223
+ - Sibling tiles animate into their new positions when the layout
224
+ reflows.
225
225
 
226
226
  ---
227
227
 
@@ -330,15 +330,15 @@ items flow around them; out-of-range values (negative, or beyond
330
330
  `DashboardLanes` checks `CSS.supports( 'display', 'grid-lanes' )`
331
331
  once at mount.
332
332
 
333
- - When supported (Safari 26+, others as the spec ships), the
334
- component emits `display: grid-lanes` and the spec's CSS, and lets
335
- the engine handle layout. The placement layer mounts no per-tile
336
- observers; the only `ResizeObserver` left is the container-width
337
- one used for responsive mode and resize-step math.
338
- - When unsupported, an internal hook (`useLanePlacement`) measures
339
- each tile's height with a `ResizeObserver`, runs the source-ordered
340
- shortest-lane algorithm, and emits explicit `grid-column-start`
341
- and `grid-row-start` / `grid-row-end: span N` values on each tile.
333
+ - When supported (Safari 26+, others as the spec ships), the
334
+ component emits `display: grid-lanes` and the spec's CSS, and lets
335
+ the engine handle layout. The placement layer mounts no per-tile
336
+ observers; the only `ResizeObserver` left is the container-width
337
+ one used for responsive mode and resize-step math.
338
+ - When unsupported, an internal hook (`useLanePlacement`) measures
339
+ each tile's height with a `ResizeObserver`, runs the source-ordered
340
+ shortest-lane algorithm, and emits explicit `grid-column-start`
341
+ and `grid-row-start` / `grid-row-end: span N` values on each tile.
342
342
 
343
343
  The same DOM contract is preserved in both paths; the visual is the
344
344
  same.
@@ -423,10 +423,10 @@ heights are content-driven.
423
423
  Drag-to-reorder is operable from the keyboard via `@dnd-kit`'s
424
424
  keyboard sensor:
425
425
 
426
- - `Tab` to focus a tile.
427
- - `Space` to pick it up.
428
- - Arrow keys to move it between positions.
429
- - `Space` to drop, or `Escape` to cancel.
426
+ - `Tab` to focus a tile.
427
+ - `Space` to pick it up.
428
+ - Arrow keys to move it between positions.
429
+ - `Space` to drop, or `Escape` to cancel.
430
430
 
431
431
  Resize handles are currently pointer-only.
432
432
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/dashboard-grid/grid-item.tsx", "../../../style-runtime/src/index.ts", "../../src/shared/actionable-area-slot.module.css", "../../src/dashboard-grid/grid-item.module.css"],
4
- "sourcesContent": ["import { useSortable } from '@dnd-kit/sortable';\nimport clsx from 'clsx';\nimport { useState, useRef } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\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 )\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 }\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\t{ ...( dragging ? { inert: '' } : {} ) }\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{ ...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", "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(\"ac1094954c\", \"._1c54fe8165d3023e__actionable-area-slot{opacity:1}@media (prefers-reduced-motion:no-preference){._1c54fe8165d3023e__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] ._1c54fe8165d3023e__actionable-area-slot{opacity:0;pointer-events:none}\");\n}\nexport default {\"actionable-area-slot\":\"_1c54fe8165d3023e__actionable-area-slot\"};\n", "import { registerStyle } from '@wordpress/style-runtime';\nif (typeof process === 'undefined' || process.env.NODE_ENV !== 'test') {\n\tregisterStyle(\"62860ded21\", \"._5d1abcb332a18701__item{position:relative}._54de57c12d3ce67e__item-content{height:100%;position:relative}._3e086aa073b9bbd9__is-resizing{overflow:visible;z-index:1}._3e086aa073b9bbd9__is-resizing ._54de57c12d3ce67e__item-content{overflow:visible;position:relative;z-index:2}._81d4e1a6c979f1e4__is-dragging{pointer-events:none}[data-wp-grid-dragging] ._81d4e1a6c979f1e4__is-dragging{border-radius:var(--wp-grid-placeholder-radius,0)}@media not (prefers-reduced-motion:reduce){[data-wp-grid-dragging] ._81d4e1a6c979f1e4__is-dragging{animation:_0447be8a7068a873__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 _0447be8a7068a873__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] ._81d4e1a6c979f1e4__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] ._81d4e1a6c979f1e4__is-dragging{--wp-grid-placeholder-outline-color:Highlight}}._2028fc095dbc5cb2__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){._2028fc095dbc5cb2__preview-overlay{border-color:Highlight}}\");\n}\nexport default {\"item\":\"_5d1abcb332a18701__item\",\"item-content\":\"_54de57c12d3ce67e__item-content\",\"is-resizing\":\"_3e086aa073b9bbd9__is-resizing\",\"is-dragging\":\"_81d4e1a6c979f1e4__is-dragging\",\"wp-grid-item-placeholder-in\":\"_0447be8a7068a873__wp-grid-item-placeholder-in\",\"preview-overlay\":\"_2028fc095dbc5cb2__preview-overlay\"};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA4B;AAC5B,kBAAiB;AACjB,qBAAiC;AACjC,qBAA6B;;;ACO7B,IAAM,uBAAuB;AAU7B,SAAS,aAAa;AACrB,QAAM,cAAc;AAEpB,MAAK,YAAY,kBAAmB;AACnC,WAAO,YAAY;AAAA,EACpB;AAEA,cAAY,mBAAmB;AAAA,IAC9B,WAAW,oBAAI,IAAI;AAAA,IACnB,QAAQ,oBAAI,IAAI;AAAA,IAChB,gBAAgB,oBAAI,QAAQ;AAAA,EAC7B;AAEA,MAAK,OAAO,aAAa,aAAc;AACtC,qBAAkB,QAAS;AAAA,EAC5B;AAEA,SAAO,YAAY;AACpB;AAUA,SAAS,0BACR,gBACA,MACU;AACV,MAAK,CAAE,eAAe,MAAO;AAC5B,WAAO;AAAA,EACR;AAEA,aAAY,SAAS,eAAe,KAAK;AAAA,IACxC,SAAU,oBAAqB;AAAA,EAChC,GAAI;AACH,QAAK,MAAM,aAAc,oBAAqB,MAAM,MAAO;AAC1D,aAAO;AAAA,IACR;AAAA,EACD;AAEA,SAAO;AACR;AAUA,SAAS,YAAa,gBAA0B,MAAc,KAAc;AAC3E,MAAK,CAAE,eAAe,MAAO;AAC5B;AAAA,EACD;AAEA,QAAM,UAAU,WAAW;AAC3B,MAAI,iBAAiB,QAAQ,eAAe,IAAK,cAAe;AAEhE,MAAK,CAAE,gBAAiB;AACvB,qBAAiB,oBAAI,IAAI;AACzB,YAAQ,eAAe,IAAK,gBAAgB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AAK,IAAI;AAAA,MACxC,8BAA6B,cAAc;AAAA,MAEzC;AAAA,yBACD;AAAA,UAAC;AAAA;AAAA,YACA,WAAY,6BAAsB,sBAAuB;AAAA,YAEzD;AAAA,cAAC;AAAA;AAAA,gBACA,OAAQ,EAAE,SAAS,WAAW;AAAA,gBAC5B,GAAK,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;AAAA,gBAEjC;AAAA;AAAA,YACH;AAAA;AAAA,QACD,IACG;AAAA,QAEJ;AAAA,UAAC;AAAA;AAAA,YACA,KAAM;AAAA,YACJ,GAAG;AAAA,YACH,GAAG;AAAA,YACL,OAAQ;AAAA,cACP,QAAQ;AAAA,cACR,QAAQ,cAAe,cAAc,WAAY;AAAA,YAClD;AAAA,YAEA;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACA,KAAM;AAAA,kBACN,WAAY,kBAAQ,cAAe;AAAA,kBACnC,OAAQ;AAAA,kBAEN;AAAA;AAAA,oBACA,CAAE,kBACH;AAAA,sBAAC,qBAAAC;AAAA,sBAAA;AAAA,wBACA,QAAS,KAAK;AAAA,wBACd;AAAA,wBACA,UAAW;AAAA,wBACX,aAAc;AAAA,wBACd;AAAA;AAAA,oBACD;AAAA;AAAA;AAAA,cAEF;AAAA,cACE;AAAA;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EACD;AAEF;AAEA,SAAS,mBAAoB,EAAE,KAAK,GAA8B;AACjE,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAY,kBAAQ,iBAAkB;AAAA,MACtC,OAAQ;AAAA,QACP,OAAO,KAAK;AAAA,QACZ,QAAQ,KAAK,YAAY;AAAA,MAC1B;AAAA;AAAA,EACD;AAEF;",
4
+ "sourcesContent": ["import { useSortable } from '@dnd-kit/sortable';\nimport clsx from 'clsx';\nimport { useState, useRef } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\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\t{ ...( dragging ? { inert: '' } : {} ) }\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{ ...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", "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(\"ac1094954c\", \"._1c54fe8165d3023e__actionable-area-slot{opacity:1}@media (prefers-reduced-motion:no-preference){._1c54fe8165d3023e__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] ._1c54fe8165d3023e__actionable-area-slot{opacity:0;pointer-events:none}\");\n}\nexport default {\"actionable-area-slot\":\"_1c54fe8165d3023e__actionable-area-slot\"};\n", "import { registerStyle } from '@wordpress/style-runtime';\nif (typeof process === 'undefined' || process.env.NODE_ENV !== 'test') {\n\tregisterStyle(\"62860ded21\", \"._5d1abcb332a18701__item{position:relative}._54de57c12d3ce67e__item-content{height:100%;position:relative}._3e086aa073b9bbd9__is-resizing{overflow:visible;z-index:1}._3e086aa073b9bbd9__is-resizing ._54de57c12d3ce67e__item-content{overflow:visible;position:relative;z-index:2}._81d4e1a6c979f1e4__is-dragging{pointer-events:none}[data-wp-grid-dragging] ._81d4e1a6c979f1e4__is-dragging{border-radius:var(--wp-grid-placeholder-radius,0)}@media not (prefers-reduced-motion:reduce){[data-wp-grid-dragging] ._81d4e1a6c979f1e4__is-dragging{animation:_0447be8a7068a873__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 _0447be8a7068a873__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] ._81d4e1a6c979f1e4__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] ._81d4e1a6c979f1e4__is-dragging{--wp-grid-placeholder-outline-color:Highlight}}._2028fc095dbc5cb2__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){._2028fc095dbc5cb2__preview-overlay{border-color:Highlight}}\");\n}\nexport default {\"item\":\"_5d1abcb332a18701__item\",\"item-content\":\"_54de57c12d3ce67e__item-content\",\"is-resizing\":\"_3e086aa073b9bbd9__is-resizing\",\"is-dragging\":\"_81d4e1a6c979f1e4__is-dragging\",\"wp-grid-item-placeholder-in\":\"_0447be8a7068a873__wp-grid-item-placeholder-in\",\"preview-overlay\":\"_2028fc095dbc5cb2__preview-overlay\"};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A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AAAA,UAAC;AAAA;AAAA,YACA,KAAM;AAAA,YACJ,GAAG;AAAA,YACH,GAAG;AAAA,YACL,OAAQ;AAAA,cACP,QAAQ;AAAA,cACR,QAAQ,cAAe,cAAc,WAAY;AAAA,YAClD;AAAA,YAEA;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACA,KAAM;AAAA,kBACN,WAAY,kBAAQ,cAAe;AAAA,kBACnC,OAAQ;AAAA,kBAEN;AAAA;AAAA,oBACA,CAAE,kBACH;AAAA,sBAAC,qBAAAC;AAAA,sBAAA;AAAA,wBACA,QAAS,KAAK;AAAA,wBACd;AAAA,wBACA,UAAW;AAAA,wBACX,aAAc;AAAA,wBACd;AAAA;AAAA,oBACD;AAAA;AAAA;AAAA,cAEF;AAAA,cACE;AAAA;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EACD;AAEF;AAEA,SAAS,mBAAoB,EAAE,KAAK,GAA8B;AACjE,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAY,kBAAQ,iBAAkB;AAAA,MACtC,OAAQ;AAAA,QACP,OAAO,KAAK;AAAA,QACZ,QAAQ,KAAK,YAAY;AAAA,MAC1B;AAAA;AAAA,EACD;AAEF;",
6
6
  "names": ["clsx", "ResizeHandle"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/dashboard-grid/index.tsx", "../../../style-runtime/src/index.ts", "../../src/shared/layout-shift-animation.module.css", "../../src/dashboard-grid/grid.module.css"],
4
- "sourcesContent": ["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 { 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 DashboardGrid( 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<\n\t\t\tDashboardGridLayoutItem[] | undefined\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\tif ( ! minColumnWidth ) {\n\t\t\t\treturn columns ?? DEFAULT_COLUMNS;\n\t\t\t}\n\n\t\t\tconst totalWidthPerColumn = minColumnWidth + gapPx;\n\t\t\tconst maxFit = Math.max(\n\t\t\t\t1,\n\t\t\t\tMath.floor( ( containerWidth + gapPx ) / totalWidthPerColumn )\n\t\t\t);\n\t\t\treturn columns !== undefined ? Math.min( columns, maxFit ) : maxFit;\n\t\t}, [ minColumnWidth, gapPx, containerWidth, columns ] );\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 )\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 { actionableArea } = child.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( child, {\n\t\t\t\t\t\t\t\t\tactionableArea: undefined,\n\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", "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(\"9e5573e51f\", \"._2db63116caa90ae9__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){._2db63116caa90ae9__layout-animating [data-wp-grid-item-key]{transition:none}}\");\n}\nexport default {\"layout-animating\":\"_2db63116caa90ae9__layout-animating\"};\n", "import { registerStyle } from '@wordpress/style-runtime';\nif (typeof process === 'undefined' || process.env.NODE_ENV !== 'test') {\n\tregisterStyle(\"9b45a626c9\", \"._960c435c33759f46__grid{display:grid;gap:var(--wp-grid-gap,var(--wpds-dimension-gap-xl,24px));position:relative}._48e8cd4225dcb813__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}._4b471bf24f891d2d__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){._48e8cd4225dcb813__drag-preview-frame{animation:_08fdf90ef86c4706__wp-grid-drag-preview-shadow-enter var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) both}._4b471bf24f891d2d__drag-preview-frame__lift{animation:_8aaeb335436989f9__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 _08fdf90ef86c4706__wp-grid-drag-preview-shadow-enter{0%{box-shadow:var(--_wp-grid-elevation-xs)}to{box-shadow:var(--_wp-grid-elevation-md)}}@keyframes _8aaeb335436989f9__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){._48e8cd4225dcb813__drag-preview-frame.cf64ad2b878ad478__is-exiting{animation:a7ead84bfd25ff8a__wp-grid-drag-preview-shadow-exit var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) forwards}._48e8cd4225dcb813__drag-preview-frame.cf64ad2b878ad478__is-exiting ._4b471bf24f891d2d__drag-preview-frame__lift{animation:_234ccad5c20d49f8__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 a7ead84bfd25ff8a__wp-grid-drag-preview-shadow-exit{0%{box-shadow:var(--_wp-grid-elevation-md)}to{box-shadow:var(--_wp-grid-elevation-xs)}}@keyframes _234ccad5c20d49f8__wp-grid-drag-preview-scale-exit{0%{transform:scale(var(--wp-grid-drag-preview-scale,1.05))}to{transform:scale(1)}}}._48e8cd4225dcb813__drag-preview-frame.cf64ad2b878ad478__is-exiting{box-shadow:var(--_wp-grid-elevation-xs)}._48e8cd4225dcb813__drag-preview-frame.cf64ad2b878ad478__is-exiting ._4b471bf24f891d2d__drag-preview-frame__lift{transform:scale(1)}@media (prefers-reduced-motion:reduce){._48e8cd4225dcb813__drag-preview-frame{box-shadow:var(--_wp-grid-elevation-md)}._4b471bf24f891d2d__drag-preview-frame__lift{transform:none}._48e8cd4225dcb813__drag-preview-frame.cf64ad2b878ad478__is-exiting{box-shadow:var(--_wp-grid-elevation-xs);transition:none}._48e8cd4225dcb813__drag-preview-frame.cf64ad2b878ad478__is-exiting ._4b471bf24f891d2d__drag-preview-frame__lift{transition:none}}\");\n}\nexport default {\"grid\":\"_960c435c33759f46__grid\",\"drag-preview-frame\":\"_48e8cd4225dcb813__drag-preview-frame\",\"drag-preview-frame__lift\":\"_4b471bf24f891d2d__drag-preview-frame__lift\",\"wp-grid-drag-preview-shadow-enter\":\"_08fdf90ef86c4706__wp-grid-drag-preview-shadow-enter\",\"wp-grid-drag-preview-scale-enter\":\"_8aaeb335436989f9__wp-grid-drag-preview-scale-enter\",\"is-exiting\":\"cf64ad2b878ad478__is-exiting\",\"wp-grid-drag-preview-shadow-exit\":\"a7ead84bfd25ff8a__wp-grid-drag-preview-shadow-exit\",\"wp-grid-drag-preview-scale-exit\":\"_234ccad5c20d49f8__wp-grid-drag-preview-scale-exit\"};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAOO;AACP,sBAGO;AAEP,kBAAiB;AACjB,qBAA0D;AAC1D,qBASO;AACP,uBAAyB;AACzB,oCAAoC;AACpC,0BAA4B;AAC5B,yBAA+C;AAC/C,6BAAoD;;;ACnBpD,IAAM,uBAAuB;AAU7B,SAAS,aAAa;AACrB,QAAM,cAAc;AAEpB,MAAK,YAAY,kBAAmB;AACnC,WAAO,YAAY;AAAA,EACpB;AAEA,cAAY,mBAAmB;AAAA,IAC9B,WAAW,oBAAI,IAAI;AAAA,IACnB,QAAQ,oBAAI,IAAI;AAAA,IAChB,gBAAgB,oBAAI,QAAQ;AAAA,EAC7B;AAEA,MAAK,OAAO,aAAa,aAAc;AACtC,qBAAkB,QAAS;AAAA,EAC5B;AAEA,SAAO,YAAY;AACpB;AAUA,SAAS,0BACR,gBACA,MACU;AACV,MAAK,CAAE,eAAe,MAAO;AAC5B,WAAO;AAAA,EACR;AAEA,aAAY,SAAS,eAAe,KAAK;AAAA,IACxC,SAAU,oBAAqB;AAAA,EAChC,GAAI;AACH,QAAK,MAAM,aAAc,oBAAqB,MAAM,MAAO;AAC1D,aAAO;AAAA,IACR;AAAA,EACD;AAEA,SAAO;AACR;AAUA,SAAS,YAAa,gBAA0B,MAAc,KAAc;AAC3E,MAAK,CAAE,eAAe,MAAO;AAC5B;AAAA,EACD;AAEA,QAAM,UAAU,WAAW;AAC3B,MAAI,iBAAiB,QAAQ,eAAe,I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D;",
4
+ "sourcesContent": ["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 { 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 DashboardGrid( 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<\n\t\t\tDashboardGridLayoutItem[] | undefined\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\tif ( ! minColumnWidth ) {\n\t\t\t\treturn columns ?? DEFAULT_COLUMNS;\n\t\t\t}\n\n\t\t\tconst totalWidthPerColumn = minColumnWidth + gapPx;\n\t\t\tconst maxFit = Math.max(\n\t\t\t\t1,\n\t\t\t\tMath.floor( ( containerWidth + gapPx ) / totalWidthPerColumn )\n\t\t\t);\n\t\t\treturn columns !== undefined ? Math.min( columns, maxFit ) : maxFit;\n\t\t}, [ minColumnWidth, gapPx, containerWidth, columns ] );\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 { actionableArea } = child.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( child, {\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", "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(\"9e5573e51f\", \"._2db63116caa90ae9__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){._2db63116caa90ae9__layout-animating [data-wp-grid-item-key]{transition:none}}\");\n}\nexport default {\"layout-animating\":\"_2db63116caa90ae9__layout-animating\"};\n", "import { registerStyle } from '@wordpress/style-runtime';\nif (typeof process === 'undefined' || process.env.NODE_ENV !== 'test') {\n\tregisterStyle(\"9b45a626c9\", \"._960c435c33759f46__grid{display:grid;gap:var(--wp-grid-gap,var(--wpds-dimension-gap-xl,24px));position:relative}._48e8cd4225dcb813__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}._4b471bf24f891d2d__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){._48e8cd4225dcb813__drag-preview-frame{animation:_08fdf90ef86c4706__wp-grid-drag-preview-shadow-enter var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) both}._4b471bf24f891d2d__drag-preview-frame__lift{animation:_8aaeb335436989f9__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 _08fdf90ef86c4706__wp-grid-drag-preview-shadow-enter{0%{box-shadow:var(--_wp-grid-elevation-xs)}to{box-shadow:var(--_wp-grid-elevation-md)}}@keyframes _8aaeb335436989f9__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){._48e8cd4225dcb813__drag-preview-frame.cf64ad2b878ad478__is-exiting{animation:a7ead84bfd25ff8a__wp-grid-drag-preview-shadow-exit var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) forwards}._48e8cd4225dcb813__drag-preview-frame.cf64ad2b878ad478__is-exiting ._4b471bf24f891d2d__drag-preview-frame__lift{animation:_234ccad5c20d49f8__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 a7ead84bfd25ff8a__wp-grid-drag-preview-shadow-exit{0%{box-shadow:var(--_wp-grid-elevation-md)}to{box-shadow:var(--_wp-grid-elevation-xs)}}@keyframes _234ccad5c20d49f8__wp-grid-drag-preview-scale-exit{0%{transform:scale(var(--wp-grid-drag-preview-scale,1.05))}to{transform:scale(1)}}}._48e8cd4225dcb813__drag-preview-frame.cf64ad2b878ad478__is-exiting{box-shadow:var(--_wp-grid-elevation-xs)}._48e8cd4225dcb813__drag-preview-frame.cf64ad2b878ad478__is-exiting ._4b471bf24f891d2d__drag-preview-frame__lift{transform:scale(1)}@media (prefers-reduced-motion:reduce){._48e8cd4225dcb813__drag-preview-frame{box-shadow:var(--_wp-grid-elevation-md)}._4b471bf24f891d2d__drag-preview-frame__lift{transform:none}._48e8cd4225dcb813__drag-preview-frame.cf64ad2b878ad478__is-exiting{box-shadow:var(--_wp-grid-elevation-xs);transition:none}._48e8cd4225dcb813__drag-preview-frame.cf64ad2b878ad478__is-exiting ._4b471bf24f891d2d__drag-preview-frame__lift{transition:none}}\");\n}\nexport default {\"grid\":\"_960c435c33759f46__grid\",\"drag-preview-frame\":\"_48e8cd4225dcb813__drag-preview-frame\",\"drag-preview-frame__lift\":\"_4b471bf24f891d2d__drag-preview-frame__lift\",\"wp-grid-drag-preview-shadow-enter\":\"_08fdf90ef86c4706__wp-grid-drag-preview-shadow-enter\",\"wp-grid-drag-preview-scale-enter\":\"_8aaeb335436989f9__wp-grid-drag-preview-scale-enter\",\"is-exiting\":\"cf64ad2b878ad478__is-exiting\",\"wp-grid-drag-preview-shadow-exit\":\"a7ead84bfd25ff8a__wp-grid-drag-preview-shadow-exit\",\"wp-grid-drag-preview-scale-exit\":\"_234ccad5c20d49f8__wp-grid-drag-preview-scale-exit\"};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAOO;AACP,sBAGO;AAEP,kBAAiB;AACjB,qBAA0D;AAC1D,qBASO;AACP,uBAAyB;AACzB,oCAAoC;AACpC,0BAA4B;AAC5B,yBAA+C;AAC/C,6BAAoD;;;ACnBpD,IAAM,uBAAuB;AAU7B,SAAS,aAAa;AACrB,QAAM,cAAc;AAEpB,MAAK,YAAY,kBAAmB;AACnC,WAAO,YAAY;AAAA,EACpB;AAEA,cAAY,mBAAmB;AAAA,IAC9B,WAAW,oBAAI,IAAI;AAAA,IACnB,QAAQ,oBAAI,IAAI;AAAA,IAChB,gBAAgB,oBAAI,QAAQ;AAAA,EAC7B;AAEA,MAAK,OAAO,aAAa,aAAc;AACtC,qBAAkB,QAAS;AAAA,EAC5B;AAEA,SAAO,YAAY;AACpB;AAUA,SAAS,0BACR,gBACA,MACU;AACV,MAAK,CAAE,eAAe,MAAO;AAC5B,WAAO;AAAA,EACR;AA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aAAa,IAAK,CAAE,EAAE,KAAK,MAAM,MAAM,MACxC;AAAA,kBAAC;AAAA;AAAA,oBAEA,SAAU;AAAA,oBACV;AAAA,oBACA,gBAAiB,MAAM,iBAAkB,GAAI;AAAA,oBAE3C;AAAA;AAAA,kBALI,WAAY,GAAI;AAAA,gBAMvB,CACC;AAAA;AAAA;AAAA,UACH,GACD;AAAA,UACA,4CAAC,2BAAY,eAAgB,4BAC1B,8BACH;AAAA;AAAA;AAAA,IACD;AAAA,EAEF;AACD;",
6
6
  "names": ["DashboardGrid", "clsx"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/dashboard-grid/types.ts"],
4
- "sourcesContent": ["import type {\n\tDragPreviewRenderProps,\n\tGridItemLimits,\n\tGridOverlayRenderProps,\n\tResizeDelta,\n\tResizeHandleRenderProps,\n} from '../shared/types';\nimport type { ResizeSnapSize } from '../shared/resize-snap';\n\n/**\n * Dashboard grid layout item definition.\n *\n * `width` accepts either a numeric column span or a discriminated string:\n * - `number` spans that many columns (clamped to the grid's column count).\n * - `'fill'` spans the remaining columns in the current row.\n * - `'full'` spans all columns (`grid-column: 1 / -1`).\n */\nexport type DashboardGridLayoutItem = {\n\t/**\n\t * Unique key that matches a child component key.\n\t */\n\tkey: string;\n\n\t/**\n\t * Number of columns this item spans, or a string discriminator\n\t * (`'fill'` or `'full'`).\n\t */\n\twidth?: number | 'fill' | 'full';\n\n\t/**\n\t * Number of rows this item spans.\n\t *\n\t * @default 1\n\t */\n\theight?: number;\n\n\t/**\n\t * Display order for the item. Lower values render first. When\n\t * omitted, the item falls back to its index in the `layout` array.\n\t */\n\torder?: number;\n\n\t/**\n\t * Whether the item can be dragged while the surface is in edit mode.\n\t * When `false`, the item is pinned: it also holds its index while the\n\t * other items reorder around it.\n\t *\n\t * @default true\n\t */\n\tdraggable?: boolean;\n\n\t/**\n\t * Whether the item can be resized while the surface is in edit mode.\n\t *\n\t * @default true\n\t */\n\tresizable?: boolean;\n};\n\n/**\n * Props for the internal `<GridItem />` wrapper.\n */\nexport type GridItemProps = {\n\t/**\n\t * The layout item containing grid positioning information.\n\t */\n\titem: DashboardGridLayoutItem;\n\n\t/**\n\t * The maximum number of columns in the grid.\n\t */\n\tmaxColumns: number;\n\n\t/**\n\t * Whether drag and resize interactions are disabled.\n\t *\n\t * @default false\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Whether the item can be dragged. Combined with `disabled`.\n\t *\n\t * @default true\n\t */\n\tdraggable?: boolean;\n\n\t/**\n\t * Whether the item can be resized. Combined with `disabled`.\n\t *\n\t * @default true\n\t */\n\tresizable?: boolean;\n\n\t/**\n\t * Whether the item can be resized vertically. Disabled when the\n\t * grid uses `rowHeight: 'auto'`, where row height is driven by\n\t * content rather than by the user.\n\t *\n\t * @default true\n\t */\n\tverticalResizable?: boolean;\n\n\t/**\n\t * Whether any tile in the grid is currently being dragged or\n\t * resized. Drives the drag activator cursor.\n\t *\n\t * @default false\n\t */\n\tinteracting?: boolean;\n\n\t/**\n\t * Whether a tile drag is in progress. Mutes each tile's\n\t * `actionableArea` with `inert` so hovers on other tiles' controls\n\t * do not steal the gesture.\n\t *\n\t * @default false\n\t */\n\tdragging?: boolean;\n\n\t/**\n\t * The content to be displayed within the grid item.\n\t */\n\tchildren: React.ReactNode;\n\n\t/**\n\t * Content rendered above the draggable area that stays interactive\n\t * in edit mode, typically action buttons, menus, or links. While\n\t * a tile drag is in progress, this content is set `inert` so hovers\n\t * on other tiles can't steal the gesture. During resize, visibility\n\t * is controlled by grid-level CSS hooks.\n\t */\n\tactionableArea?: React.ReactNode;\n\n\t/**\n\t * Callback fired while the item is being resized. Receives the\n\t * item's `key` plus the cursor offset from the gesture start in\n\t * pixels. The grid derives snapped spans from the delta and passes\n\t * them back through `resizeSnapPreview`.\n\t */\n\tonResize: ( id: string, delta: ResizeDelta ) => void;\n\n\t/**\n\t * Snapped grid size in pixels for the resize-preview outline. The\n\t * tile content resizes continuously with the cursor; this outline\n\t * shows the span the layout will commit to on release.\n\t */\n\tresizeSnapPreview?: ResizeSnapSize | null;\n\n\t/**\n\t * Minimum tile width while resizing, in pixels (one column track).\n\t */\n\tminResizeWidthPx: number;\n\n\t/**\n\t * Minimum tile height while resizing, in pixels (one row track).\n\t * Omitted when vertical resize is disabled.\n\t */\n\tminResizeHeightPx?: number;\n\n\t/**\n\t * Maximum tile width while resizing, in pixels. Omitted when the\n\t * item declares no width limit.\n\t */\n\tmaxResizeWidthPx?: number;\n\n\t/**\n\t * Maximum tile height while resizing, in pixels. Omitted when\n\t * vertical resize is disabled or the item declares no height limit.\n\t */\n\tmaxResizeHeightPx?: number;\n\n\t/**\n\t * Callback fired when the resize gesture ends.\n\t */\n\tonResizeEnd: () => void;\n\n\t/**\n\t * Component forwarded to `<ResizeHandle />` to override the default\n\t * corner triangle. See `DashboardGridProps.renderResizeHandle`.\n\t */\n\trenderResizeHandle?: React.ComponentType< ResizeHandleRenderProps >;\n};\n\n/**\n * Props for `DashboardGrid`. Extends the standard div props so consumers\n * can pass `id`, `aria-*`, `data-*`, event handlers, etc., directly on\n * the grid root.\n *\n * `columns` and `minColumnWidth` compose as a layered model:\n * - `columns` alone: fixed N columns; each tile scales with the container.\n * - `minColumnWidth` alone: column count derives from container width,\n * floored by the per-tile minimum, down to 1 column.\n * - Both together: `columns` caps the count, `minColumnWidth` enforces a\n * per-tile width floor that can reduce the count below the cap on\n * narrow containers (\"up to N columns, but never narrower than W px\").\n */\nexport interface DashboardGridProps\n\textends Omit<\n\t\tReact.ComponentPropsWithoutRef< 'div' >,\n\t\t'children' | 'className' | 'style'\n\t> {\n\t/**\n\t * Array of layout items.\n\t */\n\tlayout: DashboardGridLayoutItem[];\n\n\t/**\n\t * Grid children. Each child must carry a `key` that matches an\n\t * entry in `layout`; children without a match render at the end\n\t * of the grid without explicit placement and fall through CSS\n\t * Grid's auto-flow.\n\t */\n\tchildren: React.ReactNode;\n\n\t/**\n\t * Additional CSS class on the grid root.\n\t */\n\tclassName?: string;\n\n\t/**\n\t * Inline styles applied to the grid root. Merged underneath the\n\t * grid's own layout styles, so the layout (`gridTemplateColumns`,\n\t * `gridAutoRows`) always wins. The gap between tiles is owned by\n\t * the design-system gap token and is not configurable per\n\t * instance; override it via a theme or density change.\n\t */\n\tstyle?: React.CSSProperties;\n\n\t/**\n\t * Height of each row in pixels, or `'auto'` to let the tallest\n\t * tile in the row size it.\n\t *\n\t * @default 'auto'\n\t */\n\trowHeight?: number | 'auto';\n\n\t/**\n\t * Whether the grid is in edit mode (allows dragging and\n\t * repositioning items).\n\t *\n\t * @default false\n\t */\n\teditMode?: boolean;\n\n\t/**\n\t * Callback fired when the user commits a drag or resize. Receives\n\t * the resulting layout.\n\t */\n\tonChangeLayout?: ( newLayout: DashboardGridLayoutItem[] ) => void;\n\n\t/**\n\t * Callback fired continuously during a drag or resize interaction\n\t * with the in-progress layout. Useful for live feedback in the\n\t * surface (e.g., displaying the current width/position). The final\n\t * committed layout is still emitted via `onChangeLayout`.\n\t */\n\tonPreviewLayout?: ( previewLayout: DashboardGridLayoutItem[] ) => void;\n\n\t/**\n\t * Override the default corner-triangle resize handle with a custom\n\t * component. The grid still owns the gesture (dnd-kit `<DndContext>`,\n\t * throttled delta loop) and passes the wiring to the consumer:\n\t * spread `listeners` and `attributes` and assign `ref` on the\n\t * element that should receive the gesture. Use `disabled` and\n\t * `verticalResizable` to adapt the visual to context.\n\t */\n\trenderResizeHandle?: React.ComponentType< ResizeHandleRenderProps >;\n\n\t/**\n\t * Custom wrapper for the dragged-clone visual mounted inside\n\t * `<DragOverlay>`. The surface always wraps the clone with a thin\n\t * functional frame (lift scale, grabbing cursor, pointer pass-\n\t * through) and mounts this component inside it; the consumer\n\t * owns the visual chrome (shadow, radius, padding).\n\t *\n\t * When omitted, the cloned children render directly inside the\n\t * functional frame so any chrome the consumer applied to the\n\t * persistent tile carries through unchanged.\n\t *\n\t * Token-only adjustments (lift scale, placeholder opacity,\n\t * outline color, placeholder radius) flow through CSS custom\n\t * properties documented in the README.\n\t */\n\trenderDragPreview?: React.ComponentType< DragPreviewRenderProps >;\n\n\t/**\n\t * Override the default edit-mode overlay (row-marker tiles per\n\t * column) with a custom component. The grid supplies the resolved\n\t * column count, row height, and row count; the consumer is\n\t * responsible for the visual.\n\t *\n\t * The overlay only renders when `editMode` is true. When omitted,\n\t * the package's default visual is used.\n\t */\n\trenderGridOverlay?: React.ComponentType< GridOverlayRenderProps >;\n\n\t/**\n\t * Target column count, used as a cap. Defaults to six when neither\n\t * `columns` nor `minColumnWidth` is set; with `minColumnWidth` set\n\t * it can resolve lower on narrow containers.\n\t */\n\tcolumns?: number;\n\n\t/**\n\t * Per-tile minimum width in pixels. Enables responsive mode: the\n\t * column count derives from container width, floored by this value,\n\t * down to 1.\n\t */\n\tminColumnWidth?: number;\n\n\t/**\n\t * Per-item size limits in pixels, keyed by layout item key. Width\n\t * bounds saturate at the column count; `'full'` and `'fill'` widths\n\t * respect a maximum.\n\t */\n\titemLimits?: Record< string, GridItemLimits >;\n}\n"],
4
+ "sourcesContent": ["import type {\n\tDragPreviewRenderProps,\n\tGridItemLimits,\n\tGridOverlayRenderProps,\n\tResizeDelta,\n\tResizeHandleRenderProps,\n} from '../shared/types';\nimport type { ResizeSnapSize } from '../shared/resize-snap';\n\n/**\n * Dashboard grid layout item definition.\n *\n * `width` accepts either a numeric column span or a discriminated string:\n * - `number` spans that many columns (clamped to the grid's column count).\n * - `'fill'` spans the remaining columns in the current row.\n * - `'full'` spans all columns (`grid-column: 1 / -1`).\n */\nexport type DashboardGridLayoutItem = {\n\t/**\n\t * Unique key that matches a child component key.\n\t */\n\tkey: string;\n\n\t/**\n\t * Number of columns this item spans, or a string discriminator\n\t * (`'fill'` or `'full'`).\n\t */\n\twidth?: number | 'fill' | 'full';\n\n\t/**\n\t * Number of rows this item spans.\n\t *\n\t * @default 1\n\t */\n\theight?: number;\n\n\t/**\n\t * Display order for the item. Lower values render first. When\n\t * omitted, the item falls back to its index in the `layout` array.\n\t */\n\torder?: number;\n\n\t/**\n\t * Whether the item can be dragged while the surface is in edit mode.\n\t * When `false`, the item is pinned: it also holds its index while the\n\t * other items reorder around it.\n\t *\n\t * @default true\n\t */\n\tdraggable?: boolean;\n\n\t/**\n\t * Whether the item can be resized while the surface is in edit mode.\n\t *\n\t * @default true\n\t */\n\tresizable?: boolean;\n};\n\n/**\n * Props for the internal `<GridItem />` wrapper.\n */\nexport type GridItemProps = {\n\t/**\n\t * The layout item containing grid positioning information.\n\t */\n\titem: DashboardGridLayoutItem;\n\n\t/**\n\t * The maximum number of columns in the grid.\n\t */\n\tmaxColumns: number;\n\n\t/**\n\t * Whether drag and resize interactions are disabled.\n\t *\n\t * @default false\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Whether the item can be dragged. Combined with `disabled`.\n\t *\n\t * @default true\n\t */\n\tdraggable?: boolean;\n\n\t/**\n\t * Whether the item can be resized. Combined with `disabled`.\n\t *\n\t * @default true\n\t */\n\tresizable?: boolean;\n\n\t/**\n\t * Whether the item can be resized vertically. Disabled when the\n\t * grid uses `rowHeight: 'auto'`, where row height is driven by\n\t * content rather than by the user.\n\t *\n\t * @default true\n\t */\n\tverticalResizable?: boolean;\n\n\t/**\n\t * Whether any tile in the grid is currently being dragged or\n\t * resized. Drives the drag activator cursor.\n\t *\n\t * @default false\n\t */\n\tinteracting?: boolean;\n\n\t/**\n\t * Whether a tile drag is in progress. Mutes each tile's\n\t * `actionableArea` with `inert` so hovers on other tiles' controls\n\t * do not steal the gesture.\n\t *\n\t * @default false\n\t */\n\tdragging?: boolean;\n\n\t/**\n\t * The content to be displayed within the grid item.\n\t */\n\tchildren: React.ReactNode;\n\n\t/**\n\t * Content rendered above the draggable area that stays interactive\n\t * in edit mode, typically action buttons, menus, or links. While\n\t * a tile drag is in progress, this content is set `inert` so hovers\n\t * on other tiles can't steal the gesture. During resize, visibility\n\t * is controlled by grid-level CSS hooks.\n\t */\n\tactionableArea?: React.ReactNode;\n\n\t/**\n\t * Callback fired while the item is being resized. Receives the\n\t * item's `key` plus the cursor offset from the gesture start in\n\t * pixels. The grid derives snapped spans from the delta and passes\n\t * them back through `resizeSnapPreview`.\n\t */\n\tonResize: ( id: string, delta: ResizeDelta ) => void;\n\n\t/**\n\t * Snapped grid size in pixels for the resize-preview outline. The\n\t * tile content resizes continuously with the cursor; this outline\n\t * shows the span the layout will commit to on release.\n\t */\n\tresizeSnapPreview?: ResizeSnapSize | null;\n\n\t/**\n\t * Minimum tile width while resizing, in pixels (one column track).\n\t */\n\tminResizeWidthPx: number;\n\n\t/**\n\t * Minimum tile height while resizing, in pixels (one row track).\n\t * Omitted when vertical resize is disabled.\n\t */\n\tminResizeHeightPx?: number;\n\n\t/**\n\t * Maximum tile width while resizing, in pixels. Omitted when the\n\t * item declares no width limit.\n\t */\n\tmaxResizeWidthPx?: number;\n\n\t/**\n\t * Maximum tile height while resizing, in pixels. Omitted when\n\t * vertical resize is disabled or the item declares no height limit.\n\t */\n\tmaxResizeHeightPx?: number;\n\n\t/**\n\t * Callback fired when the resize gesture ends.\n\t */\n\tonResizeEnd: () => void;\n\n\t/**\n\t * Component forwarded to `<ResizeHandle />` to override the default\n\t * corner triangle. See `DashboardGridProps.renderResizeHandle`.\n\t */\n\trenderResizeHandle?: React.ComponentType< ResizeHandleRenderProps >;\n};\n\n/**\n * Props for `DashboardGrid`. Extends the standard div props so consumers\n * can pass `id`, `aria-*`, `data-*`, event handlers, etc., directly on\n * the grid root.\n *\n * `columns` and `minColumnWidth` compose as a layered model:\n * - `columns` alone: fixed N columns; each tile scales with the container.\n * - `minColumnWidth` alone: column count derives from container width,\n * floored by the per-tile minimum, down to 1 column.\n * - Both together: `columns` caps the count, `minColumnWidth` enforces a\n * per-tile width floor that can reduce the count below the cap on\n * narrow containers (\"up to N columns, but never narrower than W px\").\n */\nexport interface DashboardGridProps extends Omit<\n\tReact.ComponentPropsWithoutRef< 'div' >,\n\t'children' | 'className' | 'style'\n> {\n\t/**\n\t * Array of layout items.\n\t */\n\tlayout: DashboardGridLayoutItem[];\n\n\t/**\n\t * Grid children. Each child must carry a `key` that matches an\n\t * entry in `layout`; children without a match render at the end\n\t * of the grid without explicit placement and fall through CSS\n\t * Grid's auto-flow.\n\t */\n\tchildren: React.ReactNode;\n\n\t/**\n\t * Additional CSS class on the grid root.\n\t */\n\tclassName?: string;\n\n\t/**\n\t * Inline styles applied to the grid root. Merged underneath the\n\t * grid's own layout styles, so the layout (`gridTemplateColumns`,\n\t * `gridAutoRows`) always wins. The gap between tiles is owned by\n\t * the design-system gap token and is not configurable per\n\t * instance; override it via a theme or density change.\n\t */\n\tstyle?: React.CSSProperties;\n\n\t/**\n\t * Height of each row in pixels, or `'auto'` to let the tallest\n\t * tile in the row size it.\n\t *\n\t * @default 'auto'\n\t */\n\trowHeight?: number | 'auto';\n\n\t/**\n\t * Whether the grid is in edit mode (allows dragging and\n\t * repositioning items).\n\t *\n\t * @default false\n\t */\n\teditMode?: boolean;\n\n\t/**\n\t * Callback fired when the user commits a drag or resize. Receives\n\t * the resulting layout.\n\t */\n\tonChangeLayout?: ( newLayout: DashboardGridLayoutItem[] ) => void;\n\n\t/**\n\t * Callback fired continuously during a drag or resize interaction\n\t * with the in-progress layout. Useful for live feedback in the\n\t * surface (e.g., displaying the current width/position). The final\n\t * committed layout is still emitted via `onChangeLayout`.\n\t */\n\tonPreviewLayout?: ( previewLayout: DashboardGridLayoutItem[] ) => void;\n\n\t/**\n\t * Override the default corner-triangle resize handle with a custom\n\t * component. The grid still owns the gesture (dnd-kit `<DndContext>`,\n\t * throttled delta loop) and passes the wiring to the consumer:\n\t * spread `listeners` and `attributes` and assign `ref` on the\n\t * element that should receive the gesture. Use `disabled` and\n\t * `verticalResizable` to adapt the visual to context.\n\t */\n\trenderResizeHandle?: React.ComponentType< ResizeHandleRenderProps >;\n\n\t/**\n\t * Custom wrapper for the dragged-clone visual mounted inside\n\t * `<DragOverlay>`. The surface always wraps the clone with a thin\n\t * functional frame (lift scale, grabbing cursor, pointer pass-\n\t * through) and mounts this component inside it; the consumer\n\t * owns the visual chrome (shadow, radius, padding).\n\t *\n\t * When omitted, the cloned children render directly inside the\n\t * functional frame so any chrome the consumer applied to the\n\t * persistent tile carries through unchanged.\n\t *\n\t * Token-only adjustments (lift scale, placeholder opacity,\n\t * outline color, placeholder radius) flow through CSS custom\n\t * properties documented in the README.\n\t */\n\trenderDragPreview?: React.ComponentType< DragPreviewRenderProps >;\n\n\t/**\n\t * Override the default edit-mode overlay (row-marker tiles per\n\t * column) with a custom component. The grid supplies the resolved\n\t * column count, row height, and row count; the consumer is\n\t * responsible for the visual.\n\t *\n\t * The overlay only renders when `editMode` is true. When omitted,\n\t * the package's default visual is used.\n\t */\n\trenderGridOverlay?: React.ComponentType< GridOverlayRenderProps >;\n\n\t/**\n\t * Target column count, used as a cap. Defaults to six when neither\n\t * `columns` nor `minColumnWidth` is set; with `minColumnWidth` set\n\t * it can resolve lower on narrow containers.\n\t */\n\tcolumns?: number;\n\n\t/**\n\t * Per-tile minimum width in pixels. Enables responsive mode: the\n\t * column count derives from container width, floored by this value,\n\t * down to 1.\n\t */\n\tminColumnWidth?: number;\n\n\t/**\n\t * Per-item size limits in pixels, keyed by layout item key. Width\n\t * bounds saturate at the column count; `'full'` and `'fill'` widths\n\t * respect a maximum.\n\t */\n\titemLimits?: Record< string, GridItemLimits >;\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }