@wordpress/grid 0.7.1-next.v.202609031004.0 → 0.8.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 (40) hide show
  1. package/CHANGELOG.md +9 -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 +13 -14
  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 +6 -5
  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/stories/index.story.tsx +2 -1
  30. package/src/dashboard-lanes/test/item-interactions.browser.test.tsx +50 -0
  31. package/src/dashboard-lanes/test/item-limits.jsdom.test.tsx +25 -22
  32. package/src/dashboard-lanes/test/{keyboard-activation.jsdom.test.tsx → keyboard-activation.browser.test.tsx} +12 -31
  33. package/src/dashboard-lanes/test/use-lane-placement.browser.test.tsx +74 -0
  34. package/src/dashboard-lanes/test/use-lane-placement.jsdom.test.tsx +11 -10
  35. package/src/dashboard-lanes/types.ts +4 -5
  36. package/src/dashboard-lanes/use-lane-placement.ts +1 -1
  37. package/src/shared/grid-overlay.tsx +1 -1
  38. package/src/shared/test/use-span-bounds.jsdom.test.ts +1 -0
  39. package/src/dashboard-grid/test/item-interactions.jsdom.test.tsx +0 -63
  40. package/src/dashboard-lanes/test/item-interactions.jsdom.test.tsx +0 -63
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/dashboard-lanes/index.tsx", "../../../style-runtime/src/index.ts", "../../src/shared/layout-shift-animation.module.css", "../../src/dashboard-lanes/lanes.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 { LanesItem } from './lanes-item';\nimport { useLanePlacement } from './use-lane-placement';\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\tgetPlacementFingerprint,\n\tuseLayoutShiftAnimation,\n} from '../shared/use-layout-shift-animation';\nimport { useItemExitAnimation } from '../shared/use-item-exit-animation';\nimport type { DashboardLanesLayoutItem, DashboardLanesProps } 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 './lanes.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 lane 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\nconst NO_SORT_STRATEGY = () => null;\n\n/**\n * Masonry-style surface aligned with `display: grid-lanes`. Items\n * declare a column span; heights are driven by content; placement\n * follows the source-ordered, shortest-lane algorithm with\n * `flow-tolerance` tiebreaking.\n *\n * On browsers that support `display: grid-lanes` natively, the\n * component emits the spec's CSS and lets the engine handle layout.\n * Otherwise, `useLanePlacement` measures item heights and assigns\n * explicit `grid-column-start` / `grid-row-start` values that\n * approximate the same result inside CSS Grid.\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 surface without\n * explicit placement and fall through the lanes auto-flow.\n *\n * @example\n * ```jsx\n * <DashboardLanes\n * layout={ [\n * { key: 'a' },\n * { key: 'b', width: 2 },\n * { key: 'c' },\n * ] }\n * columns={ 3 }\n * editMode\n * onChangeLayout={ setLayout }\n * >\n * <Tile key=\"a\">A</Tile>\n * <Tile key=\"b\">B</Tile>\n * <Tile key=\"c\">C</Tile>\n * </DashboardLanes>\n * ```\n *\n * @param props Component props.\n * @param ref Forwarded to the surface's root `<div>`.\n */\nexport const DashboardLanes = forwardRef< HTMLDivElement, DashboardLanesProps >(\n\tfunction DashboardLanes( 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\tflowTolerance = 16,\n\t\t\trowUnit = 4,\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\n\t\tconst [ temporaryLayout, setTemporaryLayout ] = useState<\n\t\t\tDashboardLanesLayoutItem[] | undefined\n\t\t>();\n\t\tconst [ activeId, setActiveId ] = useState< string | null >( null );\n\t\tconst [ isResizing, setIsResizing ] = useState( false );\n\t\tconst [ resizeSnapPreview, setResizeSnapPreview ] = useState< {\n\t\t\tid: string;\n\t\t\tsnap: ResizeSnapSize;\n\t\t} | null >( null );\n\t\tconst latestLayoutRef = useRef<\n\t\t\tDashboardLanesLayoutItem[] | undefined\n\t\t>();\n\t\tconst lastReorderCursorRef = useRef< {\n\t\t\tx: number;\n\t\t\ty: number;\n\t\t} | null >( null );\n\t\tconst resizeBaselineRef = useRef< number | 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\t\tconst activeLayout = temporaryLayout ?? layout;\n\n\t\tconst [ container, setContainer ] = useState< HTMLDivElement | null >(\n\t\t\tnull\n\t\t);\n\t\tconst [ containerWidth, setContainerWidth ] = 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}\n\t\t);\n\t\tconst mergedRootRef = useMergeRefs( [\n\t\t\tsetContainer,\n\t\t\tresizeObserverRef,\n\t\t\tref,\n\t\t] );\n\n\t\t// Measure synchronously before paint and snapshot the computed\n\t\t// `column-gap` so the placement math tracks the design-system\n\t\t// token under any density.\n\t\tuseLayoutEffect( () => {\n\t\t\tif ( ! container ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { width } = container.getBoundingClientRect();\n\t\t\tif ( width > 0 ) {\n\t\t\t\tsetContainerWidth( width );\n\t\t\t}\n\t\t\tconst parsed = Number.parseFloat(\n\t\t\t\twindow.getComputedStyle( container ).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}, [ container ] );\n\t\tconst effectiveColumns = useMemo( () => {\n\t\t\tif ( ! minColumnWidth ) {\n\t\t\t\treturn columns ?? DEFAULT_COLUMNS;\n\t\t\t}\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\n\t\t// Height limits do not apply: lane heights are content-driven.\n\t\tconst widthBoundsByKey = useSpanBounds(\n\t\t\titemLimits,\n\t\t\tcolumnWidth,\n\t\t\tgapPx,\n\t\t\tnull,\n\t\t\teffectiveColumns\n\t\t);\n\t\tconst resizeLimitsByKey = useResizePixelLimits(\n\t\t\twidthBoundsByKey,\n\t\t\tcolumnWidth,\n\t\t\tgapPx,\n\t\t\tnull\n\t\t);\n\n\t\tconst layoutMap = useMemo( () => {\n\t\t\tconst map = new Map< string, DashboardLanesLayoutItem >();\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 for the children walk (see grid.tsx).\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\n\t\t// is unchanged (avoids invalidating SortableContext).\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// Span each item renders at: the stored width clamped to the lane\n\t\t// count and to the item's width bounds. Placement, the resize\n\t\t// baseline, and the commit check all read it, so a gesture starts\n\t\t// from the span on screen and commits nothing until it leaves it.\n\t\tconst renderedSpanByKey = useMemo( () => {\n\t\t\tconst map = new Map< string, number >();\n\t\t\tfor ( const [ key, item ] of layoutMap ) {\n\t\t\t\tconst span =\n\t\t\t\t\ttypeof item.width === 'number'\n\t\t\t\t\t\t? Math.max(\n\t\t\t\t\t\t\t\t1,\n\t\t\t\t\t\t\t\tMath.min( item.width, effectiveColumns )\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: 1;\n\t\t\t\tconst bounds = widthBoundsByKey.get( key );\n\t\t\t\tmap.set(\n\t\t\t\t\tkey,\n\t\t\t\t\tbounds\n\t\t\t\t\t\t? clampSpan( span, bounds.minWidth, bounds.maxWidth )\n\t\t\t\t\t\t: span\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn map;\n\t\t}, [ layoutMap, effectiveColumns, widthBoundsByKey ] );\n\n\t\t// Placement input for the hook: each item with its rendered span\n\t\t// in source (sorted) order. `lane` forwards the optional explicit\n\t\t// pin from the layout item; the algorithm clamps out-of-range\n\t\t// values, so no surface-level guard is needed.\n\t\tconst placementItems = useMemo( () => {\n\t\t\treturn items.map( ( key ) => ( {\n\t\t\t\tkey,\n\t\t\t\tspan: renderedSpanByKey.get( key ) ?? 1,\n\t\t\t\tlane: layoutMap.get( key )?.lane,\n\t\t\t} ) );\n\t\t}, [ items, layoutMap, renderedSpanByKey ] );\n\n\t\tconst { itemStyles } = useLanePlacement( container, {\n\t\t\titems: placementItems,\n\t\t\tlanes: effectiveColumns,\n\t\t\tgap: gapPx,\n\t\t\tflowTolerance,\n\t\t\trowUnit,\n\t\t} );\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\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 as {\n\t\t\t\t\t\tactionableArea?: React.ReactNode;\n\t\t\t\t\t};\n\t\t\t\t\tconst stripped =\n\t\t\t\t\t\tactionableArea !== undefined\n\t\t\t\t\t\t\t? cloneElement(\n\t\t\t\t\t\t\t\t\tchild as React.ReactElement< {\n\t\t\t\t\t\t\t\t\t\tactionableArea?: React.ReactNode;\n\t\t\t\t\t\t\t\t\t} >,\n\t\t\t\t\t\t\t\t\t{ actionableArea: undefined }\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: ( child as React.ReactElement );\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\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\t\t\tconst activeRect = active.rect.current.translated;\n\t\t\tif ( ! activeRect ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst activeCenterX = activeRect.left + activeRect.width / 2;\n\t\t\tconst activeCenterY = activeRect.top + activeRect.height / 2;\n\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// Build a key→index lookup so the .map below is O(n)\n\t\t\t// instead of O(n²) from per-item `indexOf` calls.\n\t\t\tconst orderByKey = new Map< string, number >();\n\t\t\tupdatedItems.forEach( ( key, index ) => {\n\t\t\t\torderByKey.set( key, index );\n\t\t\t} );\n\t\t\tconst updatedLayout = activeLayout.map( ( item ) => ( {\n\t\t\t\t...item,\n\t\t\t\torder: orderByKey.get( item.key ) ?? 0,\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\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\t\t\tif ( ! isResizing ) {\n\t\t\t\tsetIsResizing( true );\n\t\t\t}\n\n\t\t\tconst relativeDelta = Math.round(\n\t\t\t\tdelta.width / ( columnWidth + gapPx )\n\t\t\t);\n\n\t\t\tif ( resizeBaselineRef.current === null ) {\n\t\t\t\tresizeBaselineRef.current = renderedSpanByKey.get( id ) ?? 1;\n\t\t\t}\n\t\t\tconst baseline = resizeBaselineRef.current;\n\t\t\tconst bounds = widthBoundsByKey.get( id );\n\t\t\tconst newWidth = clampSpan(\n\t\t\t\tbaseline + relativeDelta,\n\t\t\t\tbounds?.minWidth ?? 1,\n\t\t\t\tbounds?.maxWidth ?? effectiveColumns\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\t1,\n\t\t\t\t\tcolumnWidth,\n\t\t\t\t\tgapPx,\n\t\t\t\t\tnull\n\t\t\t\t),\n\t\t\t} );\n\n\t\t\t// Bail when the snap target matches the span staged for commit,\n\t\t\t// or the rendered span while nothing is staged.\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 currentWidth =\n\t\t\t\tpendingItem?.width ?? renderedSpanByKey.get( id );\n\t\t\tif ( currentWidth === newWidth ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst updatedLayout = activeLayout.map( ( item ) =>\n\t\t\t\titem.key === id ? { ...item, width: newWidth } : 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\tconst interacting = activeId !== null || isResizing;\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. Lanes are content-driven vertically, so\n\t\t// the overlay mirrors columns only. Rendered unconditionally so\n\t\t// it can cross-fade on edit-mode toggles (`isActive` drives the\n\t\t// transition); memoized so drag/resize re-renders skip it.\n\t\tconst Overlay = renderGridOverlay ?? GridOverlay;\n\t\tconst gridOverlay = useMemo(\n\t\t\t() => (\n\t\t\t\t<Overlay columns={ effectiveColumns } isActive={ editMode } />\n\t\t\t),\n\t\t\t[ Overlay, editMode, effectiveColumns ]\n\t\t);\n\n\t\tconst layoutFingerprint = useMemo( () => {\n\t\t\tconst layoutSig = getLayoutFingerprint( activeLayout );\n\t\t\tconst placementSig = getPlacementFingerprint( itemStyles );\n\t\t\treturn `${ layoutSig }\\0${ placementSig }`;\n\t\t}, [ activeLayout, itemStyles ] );\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,\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,\n\t\t\tenabled: editMode,\n\t\t\tlayoutKeys,\n\t\t\tgetPositionsBeforeLastChange,\n\t\t\tchildrenCacheRef,\n\t\t} );\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<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={ mergedRootRef }\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\tstyles.lanes,\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{\n\t\t\t\t\t\t\t\t...style,\n\t\t\t\t\t\t\t\tgridTemplateColumns: `repeat(${ effectiveColumns }, minmax(0, 1fr))`,\n\t\t\t\t\t\t\t\t// `column-gap` and `row-gap` are set in\n\t\t\t\t\t\t\t\t// `lanes.module.css` from the\n\t\t\t\t\t\t\t\t// design-system gap token, with an\n\t\t\t\t\t\t\t\t// `@supports` block that zeroes `row-gap`\n\t\t\t\t\t\t\t\t// in polyfill mode (the skyline already\n\t\t\t\t\t\t\t\t// encodes vertical spacing in each tile's\n\t\t\t\t\t\t\t\t// `top`). Driving the toggle from CSS\n\t\t\t\t\t\t\t\t// keeps SSR and client output identical\n\t\t\t\t\t\t\t\t// regardless of native support.\n\t\t\t\t\t\t\t\t'--wp-grid-lane-row-unit': `${ Math.max(\n\t\t\t\t\t\t\t\t\t1,\n\t\t\t\t\t\t\t\t\trowUnit\n\t\t\t\t\t\t\t\t) }px`,\n\t\t\t\t\t\t\t} as React.CSSProperties\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 child = childrenMap.get( id );\n\t\t\t\t\t\t\tif ( ! child ) {\n\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t}\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<LanesItem\n\t\t\t\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\t\t\t\titemKey={ id }\n\t\t\t\t\t\t\t\t\tplacementStyle={\n\t\t\t\t\t\t\t\t\t\titemStyles.get( id ) ?? {}\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\tinteracting={ interacting }\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\tmaxResizeWidthPx={ limitsPx?.maxWidthPx }\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{ child }\n\t\t\t\t\t\t\t\t</LanesItem>\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(\"7b851be8c0\", \"._8cc368bc6c2d79c6__lanes{column-gap:var(--wp-grid-gap,var(--wpds-dimension-gap-xl,24px));display:grid-lanes;position:relative;row-gap:var(--wp-grid-gap,var(--wpds-dimension-gap-xl,24px))}@supports not (display:grid-lanes){._8cc368bc6c2d79c6__lanes{display:grid;grid-auto-flow:dense;grid-auto-rows:var(--wp-grid-lane-row-unit,4px);row-gap:0}}._1bfa908a532e32a4__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}.bd684ee9f92388ed__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){._1bfa908a532e32a4__drag-preview-frame{animation:_5f4a1718cb7927ee__wp-grid-drag-preview-shadow-enter var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) both}.bd684ee9f92388ed__drag-preview-frame__lift{animation:_29f7f02d4f227b1e__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 _5f4a1718cb7927ee__wp-grid-drag-preview-shadow-enter{0%{box-shadow:var(--_wp-grid-elevation-xs)}to{box-shadow:var(--_wp-grid-elevation-md)}}@keyframes _29f7f02d4f227b1e__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){._1bfa908a532e32a4__drag-preview-frame._4e3613427755609c__is-exiting{animation:_6883de14c5fb8559__wp-grid-drag-preview-shadow-exit var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) forwards}._1bfa908a532e32a4__drag-preview-frame._4e3613427755609c__is-exiting .bd684ee9f92388ed__drag-preview-frame__lift{animation:_0de4da1cd817e536__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 _6883de14c5fb8559__wp-grid-drag-preview-shadow-exit{0%{box-shadow:var(--_wp-grid-elevation-md)}to{box-shadow:var(--_wp-grid-elevation-xs)}}@keyframes _0de4da1cd817e536__wp-grid-drag-preview-scale-exit{0%{transform:scale(var(--wp-grid-drag-preview-scale,1.05))}to{transform:scale(1)}}}._1bfa908a532e32a4__drag-preview-frame._4e3613427755609c__is-exiting{box-shadow:var(--_wp-grid-elevation-xs)}._1bfa908a532e32a4__drag-preview-frame._4e3613427755609c__is-exiting .bd684ee9f92388ed__drag-preview-frame__lift{transform:scale(1)}@media (prefers-reduced-motion:reduce){._1bfa908a532e32a4__drag-preview-frame{box-shadow:var(--_wp-grid-elevation-md)}.bd684ee9f92388ed__drag-preview-frame__lift{transform:none}._1bfa908a532e32a4__drag-preview-frame._4e3613427755609c__is-exiting{box-shadow:var(--_wp-grid-elevation-xs);transition:none}._1bfa908a532e32a4__drag-preview-frame._4e3613427755609c__is-exiting .bd684ee9f92388ed__drag-preview-frame__lift{transition:none}}\");\n}\nexport default {\"lanes\":\"_8cc368bc6c2d79c6__lanes\",\"drag-preview-frame\":\"_1bfa908a532e32a4__drag-preview-frame\",\"drag-preview-frame__lift\":\"bd684ee9f92388ed__drag-preview-frame__lift\",\"wp-grid-drag-preview-shadow-enter\":\"_5f4a1718cb7927ee__wp-grid-drag-preview-shadow-enter\",\"wp-grid-drag-preview-scale-enter\":\"_29f7f02d4f227b1e__wp-grid-drag-preview-scale-enter\",\"is-exiting\":\"_4e3613427755609c__is-exiting\",\"wp-grid-drag-preview-shadow-exit\":\"_6883de14c5fb8559__wp-grid-drag-preview-shadow-exit\",\"wp-grid-drag-preview-scale-exit\":\"_0de4da1cd817e536__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,wBAA0B;AAC1B,gCAAiC;AACjC,oCAAoC;AACpC,0BAA4B;AAC5B,yBAA+C;AAC/C,6BAAoD;;;ACpBpD,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;AAA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AA,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;",
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 { LanesItem } from './lanes-item';\nimport { useLanePlacement } from './use-lane-placement';\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\tgetPlacementFingerprint,\n\tuseLayoutShiftAnimation,\n} from '../shared/use-layout-shift-animation';\nimport { useItemExitAnimation } from '../shared/use-item-exit-animation';\nimport type { DashboardLanesLayoutItem, DashboardLanesProps } 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 './lanes.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 lane 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\nconst NO_SORT_STRATEGY = () => null;\n\n/**\n * Masonry-style surface aligned with `display: grid-lanes`. Items\n * declare a column span; heights are driven by content; placement\n * follows the source-ordered, shortest-lane algorithm with\n * `flow-tolerance` tiebreaking.\n *\n * On browsers that support `display: grid-lanes` natively, the\n * component emits the spec's CSS and lets the engine handle layout.\n * Otherwise, `useLanePlacement` measures item heights and assigns\n * explicit `grid-column-start` / `grid-row-start` values that\n * approximate the same result inside CSS Grid.\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 surface without\n * explicit placement and fall through the lanes auto-flow.\n *\n * @example\n * ```jsx\n * <DashboardLanes\n * layout={ [\n * { key: 'a' },\n * { key: 'b', width: 2 },\n * { key: 'c' },\n * ] }\n * columns={ 3 }\n * editMode\n * onChangeLayout={ setLayout }\n * >\n * <Tile key=\"a\">A</Tile>\n * <Tile key=\"b\">B</Tile>\n * <Tile key=\"c\">C</Tile>\n * </DashboardLanes>\n * ```\n *\n * @param props Component props.\n * @param ref Forwarded to the surface's root `<div>`.\n */\nexport const DashboardLanes = forwardRef< HTMLDivElement, DashboardLanesProps >(\n\tfunction DashboardLanes( 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\tflowTolerance = 16,\n\t\t\trowUnit = 4,\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\n\t\tconst [ temporaryLayout, setTemporaryLayout ] = useState<\n\t\t\tDashboardLanesLayoutItem[] | undefined\n\t\t>();\n\t\tconst [ activeId, setActiveId ] = useState< string | null >( null );\n\t\tconst [ isResizing, setIsResizing ] = useState( false );\n\t\tconst [ resizeSnapPreview, setResizeSnapPreview ] = useState< {\n\t\t\tid: string;\n\t\t\tsnap: ResizeSnapSize;\n\t\t} | null >( null );\n\t\tconst latestLayoutRef = useRef<\n\t\t\tDashboardLanesLayoutItem[] | undefined\n\t\t>();\n\t\tconst lastReorderCursorRef = useRef< {\n\t\t\tx: number;\n\t\t\ty: number;\n\t\t} | null >( null );\n\t\tconst resizeBaselineRef = useRef< number | 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\t\tconst activeLayout = temporaryLayout ?? layout;\n\n\t\tconst [ container, setContainer ] = useState< HTMLDivElement | null >(\n\t\t\tnull\n\t\t);\n\t\tconst [ containerWidth, setContainerWidth ] = 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}\n\t\t);\n\t\tconst mergedRootRef = useMergeRefs( [\n\t\t\tsetContainer,\n\t\t\tresizeObserverRef,\n\t\t\tref,\n\t\t] );\n\n\t\t// Measure synchronously before paint and snapshot the computed\n\t\t// `column-gap` so the placement math tracks the design-system\n\t\t// token under any density.\n\t\tuseLayoutEffect( () => {\n\t\t\tif ( ! container ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { width } = container.getBoundingClientRect();\n\t\t\tif ( width > 0 ) {\n\t\t\t\tsetContainerWidth( width );\n\t\t\t}\n\t\t\tconst parsed = Number.parseFloat(\n\t\t\t\twindow.getComputedStyle( container ).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}, [ container ] );\n\t\tconst effectiveColumns = useMemo( () => {\n\t\t\tif ( ! minColumnWidth ) {\n\t\t\t\treturn columns ?? DEFAULT_COLUMNS;\n\t\t\t}\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\n\t\t// Height limits do not apply: lane heights are content-driven.\n\t\tconst widthBoundsByKey = useSpanBounds(\n\t\t\titemLimits,\n\t\t\tcolumnWidth,\n\t\t\tgapPx,\n\t\t\tnull,\n\t\t\teffectiveColumns\n\t\t);\n\t\tconst resizeLimitsByKey = useResizePixelLimits(\n\t\t\twidthBoundsByKey,\n\t\t\tcolumnWidth,\n\t\t\tgapPx,\n\t\t\tnull\n\t\t);\n\n\t\tconst layoutMap = useMemo( () => {\n\t\t\tconst map = new Map< string, DashboardLanesLayoutItem >();\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 for the children walk (see grid.tsx).\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\n\t\t// is unchanged (avoids invalidating SortableContext).\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// Span each item renders at: the stored width clamped to the lane\n\t\t// count and to the item's width bounds. Placement, the resize\n\t\t// baseline, and the commit check all read it, so a gesture starts\n\t\t// from the span on screen and commits nothing until it leaves it.\n\t\tconst renderedSpanByKey = useMemo( () => {\n\t\t\tconst map = new Map< string, number >();\n\t\t\tfor ( const [ key, item ] of layoutMap ) {\n\t\t\t\tconst span =\n\t\t\t\t\ttypeof item.width === 'number'\n\t\t\t\t\t\t? Math.max(\n\t\t\t\t\t\t\t\t1,\n\t\t\t\t\t\t\t\tMath.min( item.width, effectiveColumns )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t: 1;\n\t\t\t\tconst bounds = widthBoundsByKey.get( key );\n\t\t\t\tmap.set(\n\t\t\t\t\tkey,\n\t\t\t\t\tbounds\n\t\t\t\t\t\t? clampSpan( span, bounds.minWidth, bounds.maxWidth )\n\t\t\t\t\t\t: span\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn map;\n\t\t}, [ layoutMap, effectiveColumns, widthBoundsByKey ] );\n\n\t\t// Placement input for the hook: each item with its rendered span\n\t\t// in source (sorted) order. `lane` forwards the optional explicit\n\t\t// pin from the layout item; the algorithm clamps out-of-range\n\t\t// values, so no surface-level guard is needed.\n\t\tconst placementItems = useMemo( () => {\n\t\t\treturn items.map( ( key ) => ( {\n\t\t\t\tkey,\n\t\t\t\tspan: renderedSpanByKey.get( key ) ?? 1,\n\t\t\t\tlane: layoutMap.get( key )?.lane,\n\t\t\t} ) );\n\t\t}, [ items, layoutMap, renderedSpanByKey ] );\n\n\t\tconst { itemStyles } = useLanePlacement( container, {\n\t\t\titems: placementItems,\n\t\t\tlanes: effectiveColumns,\n\t\t\tgap: gapPx,\n\t\t\tflowTolerance,\n\t\t\trowUnit,\n\t\t} );\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\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 as {\n\t\t\t\t\t\tactionableArea?: React.ReactNode;\n\t\t\t\t\t};\n\t\t\t\t\tconst stripped =\n\t\t\t\t\t\tactionableArea !== undefined\n\t\t\t\t\t\t\t? cloneElement(\n\t\t\t\t\t\t\t\t\tchild as React.ReactElement< {\n\t\t\t\t\t\t\t\t\t\tactionableArea?: React.ReactNode;\n\t\t\t\t\t\t\t\t\t} >,\n\t\t\t\t\t\t\t\t\t{ actionableArea: undefined }\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t: ( child as React.ReactElement );\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\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\t\t\tconst activeRect = active.rect.current.translated;\n\t\t\tif ( ! activeRect ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst activeCenterX = activeRect.left + activeRect.width / 2;\n\t\t\tconst activeCenterY = activeRect.top + activeRect.height / 2;\n\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// Build a key→index lookup so the .map below is O(n)\n\t\t\t// instead of O(n²) from per-item `indexOf` calls.\n\t\t\tconst orderByKey = new Map< string, number >();\n\t\t\tupdatedItems.forEach( ( key, index ) => {\n\t\t\t\torderByKey.set( key, index );\n\t\t\t} );\n\t\t\tconst updatedLayout = activeLayout.map( ( item ) => ( {\n\t\t\t\t...item,\n\t\t\t\torder: orderByKey.get( item.key ) ?? 0,\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\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\t\t\tif ( ! isResizing ) {\n\t\t\t\tsetIsResizing( true );\n\t\t\t}\n\n\t\t\tconst relativeDelta = Math.round(\n\t\t\t\tdelta.width / ( columnWidth + gapPx )\n\t\t\t);\n\n\t\t\tif ( resizeBaselineRef.current === null ) {\n\t\t\t\tresizeBaselineRef.current = renderedSpanByKey.get( id ) ?? 1;\n\t\t\t}\n\t\t\tconst baseline = resizeBaselineRef.current;\n\t\t\tconst bounds = widthBoundsByKey.get( id );\n\t\t\tconst newWidth = clampSpan(\n\t\t\t\tbaseline + relativeDelta,\n\t\t\t\tbounds?.minWidth ?? 1,\n\t\t\t\tbounds?.maxWidth ?? effectiveColumns\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\t1,\n\t\t\t\t\tcolumnWidth,\n\t\t\t\t\tgapPx,\n\t\t\t\t\tnull\n\t\t\t\t),\n\t\t\t} );\n\n\t\t\t// Bail when the snap target matches the span staged for commit,\n\t\t\t// or the rendered span while nothing is staged.\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 currentWidth =\n\t\t\t\tpendingItem?.width ?? renderedSpanByKey.get( id );\n\t\t\tif ( currentWidth === newWidth ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst updatedLayout = activeLayout.map( ( item ) =>\n\t\t\t\titem.key === id ? { ...item, width: newWidth } : 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\tconst interacting = activeId !== null || isResizing;\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. Lanes are content-driven vertically, so\n\t\t// the overlay mirrors columns only. Rendered unconditionally so\n\t\t// it can cross-fade on edit-mode toggles (`isActive` drives the\n\t\t// transition); memoized so drag/resize re-renders skip it.\n\t\tconst Overlay = renderGridOverlay ?? GridOverlay;\n\t\tconst gridOverlay = useMemo(\n\t\t\t() => (\n\t\t\t\t<Overlay columns={ effectiveColumns } isActive={ editMode } />\n\t\t\t),\n\t\t\t[ Overlay, editMode, effectiveColumns ]\n\t\t);\n\n\t\tconst layoutFingerprint = useMemo( () => {\n\t\t\tconst layoutSig = getLayoutFingerprint( activeLayout );\n\t\t\tconst placementSig = getPlacementFingerprint( itemStyles );\n\t\t\treturn `${ layoutSig }\\0${ placementSig }`;\n\t\t}, [ activeLayout, itemStyles ] );\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,\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,\n\t\t\tenabled: editMode,\n\t\t\tlayoutKeys,\n\t\t\tgetPositionsBeforeLastChange,\n\t\t\tchildrenCacheRef,\n\t\t} );\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<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={ mergedRootRef }\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\tstyles.lanes,\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{\n\t\t\t\t\t\t\t\t...style,\n\t\t\t\t\t\t\t\tgridTemplateColumns: `repeat(${ effectiveColumns }, minmax(0, 1fr))`,\n\t\t\t\t\t\t\t\t// `column-gap` and `row-gap` are set in\n\t\t\t\t\t\t\t\t// `lanes.module.css` from the\n\t\t\t\t\t\t\t\t// design-system gap token, with an\n\t\t\t\t\t\t\t\t// `@supports` block that zeroes `row-gap`\n\t\t\t\t\t\t\t\t// in polyfill mode (the skyline already\n\t\t\t\t\t\t\t\t// encodes vertical spacing in each tile's\n\t\t\t\t\t\t\t\t// `top`). Driving the toggle from CSS\n\t\t\t\t\t\t\t\t// keeps SSR and client output identical\n\t\t\t\t\t\t\t\t// regardless of native support.\n\t\t\t\t\t\t\t\t'--wp-grid-lane-row-unit': `${ Math.max(\n\t\t\t\t\t\t\t\t\t1,\n\t\t\t\t\t\t\t\t\trowUnit\n\t\t\t\t\t\t\t\t) }px`,\n\t\t\t\t\t\t\t} as React.CSSProperties\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 child = childrenMap.get( id );\n\t\t\t\t\t\t\tif ( ! child ) {\n\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t}\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<LanesItem\n\t\t\t\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\t\t\t\titemKey={ id }\n\t\t\t\t\t\t\t\t\tplacementStyle={\n\t\t\t\t\t\t\t\t\t\titemStyles.get( id ) ?? {}\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\tinteracting={ interacting }\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\tmaxResizeWidthPx={ limitsPx?.maxWidthPx }\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{ child }\n\t\t\t\t\t\t\t\t</LanesItem>\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(\"7b851be8c0\", \"._8cc368bc6c2d79c6__lanes{column-gap:var(--wp-grid-gap,var(--wpds-dimension-gap-xl,24px));display:grid-lanes;position:relative;row-gap:var(--wp-grid-gap,var(--wpds-dimension-gap-xl,24px))}@supports not (display:grid-lanes){._8cc368bc6c2d79c6__lanes{display:grid;grid-auto-flow:dense;grid-auto-rows:var(--wp-grid-lane-row-unit,4px);row-gap:0}}._1bfa908a532e32a4__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}.bd684ee9f92388ed__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){._1bfa908a532e32a4__drag-preview-frame{animation:_5f4a1718cb7927ee__wp-grid-drag-preview-shadow-enter var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) both}.bd684ee9f92388ed__drag-preview-frame__lift{animation:_29f7f02d4f227b1e__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 _5f4a1718cb7927ee__wp-grid-drag-preview-shadow-enter{0%{box-shadow:var(--_wp-grid-elevation-xs)}to{box-shadow:var(--_wp-grid-elevation-md)}}@keyframes _29f7f02d4f227b1e__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){._1bfa908a532e32a4__drag-preview-frame._4e3613427755609c__is-exiting{animation:_6883de14c5fb8559__wp-grid-drag-preview-shadow-exit var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-balanced,cubic-bezier(.4,0,.2,1)) forwards}._1bfa908a532e32a4__drag-preview-frame._4e3613427755609c__is-exiting .bd684ee9f92388ed__drag-preview-frame__lift{animation:_0de4da1cd817e536__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 _6883de14c5fb8559__wp-grid-drag-preview-shadow-exit{0%{box-shadow:var(--_wp-grid-elevation-md)}to{box-shadow:var(--_wp-grid-elevation-xs)}}@keyframes _0de4da1cd817e536__wp-grid-drag-preview-scale-exit{0%{transform:scale(var(--wp-grid-drag-preview-scale,1.05))}to{transform:scale(1)}}}._1bfa908a532e32a4__drag-preview-frame._4e3613427755609c__is-exiting{box-shadow:var(--_wp-grid-elevation-xs)}._1bfa908a532e32a4__drag-preview-frame._4e3613427755609c__is-exiting .bd684ee9f92388ed__drag-preview-frame__lift{transform:scale(1)}@media (prefers-reduced-motion:reduce){._1bfa908a532e32a4__drag-preview-frame{box-shadow:var(--_wp-grid-elevation-md)}.bd684ee9f92388ed__drag-preview-frame__lift{transform:none}._1bfa908a532e32a4__drag-preview-frame._4e3613427755609c__is-exiting{box-shadow:var(--_wp-grid-elevation-xs);transition:none}._1bfa908a532e32a4__drag-preview-frame._4e3613427755609c__is-exiting .bd684ee9f92388ed__drag-preview-frame__lift{transition:none}}\");\n}\nexport default {\"lanes\":\"_8cc368bc6c2d79c6__lanes\",\"drag-preview-frame\":\"_1bfa908a532e32a4__drag-preview-frame\",\"drag-preview-frame__lift\":\"bd684ee9f92388ed__drag-preview-frame__lift\",\"wp-grid-drag-preview-shadow-enter\":\"_5f4a1718cb7927ee__wp-grid-drag-preview-shadow-enter\",\"wp-grid-drag-preview-scale-enter\":\"_29f7f02d4f227b1e__wp-grid-drag-preview-scale-enter\",\"is-exiting\":\"_4e3613427755609c__is-exiting\",\"wp-grid-drag-preview-shadow-exit\":\"_6883de14c5fb8559__wp-grid-drag-preview-shadow-exit\",\"wp-grid-drag-preview-scale-exit\":\"_0de4da1cd817e536__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,wBAA0B;AAC1B,gCAAiC;AACjC,oCAAoC;AACpC,0BAA4B;AAC5B,yBAA+C;AAC/C,6BAAoD;;;ACpBpD,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,I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;AAAA,cAGC;AAAA;AAAA,gBACA,MAAM,IAAK,CAAE,OAAQ;AACtB,wBAAM,QAAQ,YAAY,IAAK,EAAG;AAClC,sBAAK,CAAE,OAAQ;AACd,2BAAO;AAAA,kBACR;AACA,wBAAM,WAAW,kBAAkB,IAAK,EAAG;AAC3C,yBACC;AAAA,oBAAC;AAAA;AAAA,sBAEA,SAAU;AAAA,sBACV,gBACC,WAAW,IAAK,EAAG,KAAK,CAAC;AAAA,sBAE1B,UAAW,CAAE;AAAA,sBACb,WACC,UAAU,IAAK,EAAG,GAAG,cAAc;AAAA,sBAEpC,WACC,UAAU,IAAK,EAAG,GAAG,cAAc;AAAA,sBAEpC;AAAA,sBACA,UAAW,aAAa;AAAA,sBACxB,UAAW;AAAA,sBACX,aAAc;AAAA,sBACd,mBACC,mBAAmB,OAAO,KACvB,kBAAkB,OAClB;AAAA,sBAEJ,kBACC,UAAU,cAAc;AAAA,sBAEzB,kBAAmB,UAAU;AAAA,sBAC7B,gBAAiB,kBAAkB;AAAA,wBAClC;AAAA,sBACD;AAAA,sBACA;AAAA,sBAEE;AAAA;AAAA,oBA9BI;AAAA,kBA+BP;AAAA,gBAEF,CAAE;AAAA,gBACA;AAAA,gBACA,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": ["DashboardLanes", "clsx"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/dashboard-lanes/lanes-item.tsx", "../../../style-runtime/src/index.ts", "../../src/shared/actionable-area-slot.module.css", "../../src/dashboard-lanes/lanes-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 ResizeHandle from '../shared/resize-handle';\nimport { clampResizeDelta, type ResizeSnapSize } from '../shared/resize-snap';\nimport { GRID_ITEM_DATA_KEY } from '../shared/grid-item-key';\nimport type { ResizeDelta, ResizeHandleRenderProps } from '../shared/types';\nimport styles from './lanes-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\tif ( interacting ) {\n\t\treturn undefined;\n\t}\n\treturn 'grab';\n}\n\n/**\n * Props for the internal `<LanesItem />` wrapper.\n */\nexport type LanesItemProps = {\n\t/**\n\t * Item key. Forwarded to dnd-kit and emitted as the\n\t * `data-wp-grid-item-key` attribute the hook reads to map measured DOM\n\t * nodes back to logical items.\n\t */\n\titemKey: string;\n\n\t/**\n\t * Inline placement style produced by `useLanePlacement`. On native\n\t * (`display: grid-lanes`), only `gridColumn: span N`. While\n\t * polyfilling, also `gridColumnStart` / `gridRowStart` /\n\t * `gridRowEnd: span N`.\n\t */\n\tplacementStyle: React.CSSProperties;\n\n\t/**\n\t * Whether drag and resize interactions are disabled.\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 any tile in the surface is currently being dragged or\n\t * resized. Drives the drag activator cursor.\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\tchildren: React.ReactNode;\n\n\tactionableArea?: React.ReactNode;\n\n\tonResize: ( id: string, delta: ResizeDelta ) => void;\n\n\t/**\n\t * Snapped column span in pixels for the resize-preview outline.\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 * Maximum tile width while resizing, in pixels. Omitted when the\n\t * item declares no width limit.\n\t */\n\tmaxResizeWidthPx?: number;\n\n\tonResizeEnd: () => void;\n\n\trenderResizeHandle?: React.ComponentType< ResizeHandleRenderProps >;\n};\n\nexport function LanesItem( {\n\titemKey,\n\tplacementStyle,\n\tdisabled = false,\n\tdraggable = true,\n\tresizable = true,\n\tinteracting = false,\n\tchildren,\n\tactionableArea = null,\n\tonResize,\n\tonResizeEnd,\n\tresizeSnapPreview = null,\n\tminResizeWidthPx,\n\tmaxResizeWidthPx,\n\trenderResizeHandle,\n\tdragging = false,\n}: LanesItemProps ) {\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\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: itemKey,\n\t\tdisabled: dragDisabled,\n\t} );\n\tconst mergedRef = useMergeRefs( [ itemRef, setNodeRef ] );\n\tconst contentMergedRef = useMergeRefs( [ contentRef ] );\n\n\tconst style: React.CSSProperties = {\n\t\t...placementStyle,\n\t\talignSelf: 'start',\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 = { width: delta.width, height: 0 };\n\t\tif ( baselineSize ) {\n\t\t\tclamped = clampResizeDelta(\n\t\t\t\tclamped,\n\t\t\t\tbaselineSize,\n\t\t\t\t{ width: minResizeWidthPx },\n\t\t\t\t{ width: maxResizeWidthPx }\n\t\t\t);\n\t\t}\n\t\tsetResizeDelta( clamped );\n\t\tonResize( itemKey, 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 }\n\t\t\t: undefined;\n\n\tconst previewOverlay = resizeSnapPreview ? (\n\t\t<div\n\t\t\tclassName={ styles[ 'preview-overlay' ] }\n\t\t\tstyle={ {\n\t\t\t\twidth: resizeSnapPreview.widthPx,\n\t\t\t\theight: resizeSnapPreview.heightPx ?? '100%',\n\t\t\t} }\n\t\t/>\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 ]: itemKey } }\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={ itemKey }\n\t\t\t\t\t\t\tverticalResizable={ false }\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", "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(\"97a2a51c0b\", \"._0a62d9f1dff8c7d8__item{position:relative}._20c43fcd930d828a__item-content{height:100%;position:relative}._11928ee35f1a9519__is-resizing{overflow:visible;z-index:1}._11928ee35f1a9519__is-resizing ._20c43fcd930d828a__item-content{overflow:visible;position:relative;z-index:2}.b7fc83c8b16e9ee5__is-dragging{pointer-events:none}[data-wp-grid-dragging] .b7fc83c8b16e9ee5__is-dragging{border-radius:var(--wp-grid-placeholder-radius,0)}@media not (prefers-reduced-motion:reduce){[data-wp-grid-dragging] .b7fc83c8b16e9ee5__is-dragging{animation:b026dda570d0eea0__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 b026dda570d0eea0__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] .b7fc83c8b16e9ee5__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] .b7fc83c8b16e9ee5__is-dragging{--wp-grid-placeholder-outline-color:Highlight}}.cd44faab32c27168__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)));box-sizing:border-box;inset-inline-start:0;pointer-events:none;position:absolute;top:0;z-index:0}@media (forced-colors:active){.cd44faab32c27168__preview-overlay{border-color:Highlight}}\");\n}\nexport default {\"item\":\"_0a62d9f1dff8c7d8__item\",\"item-content\":\"_20c43fcd930d828a__item-content\",\"is-resizing\":\"_11928ee35f1a9519__is-resizing\",\"is-dragging\":\"b7fc83c8b16e9ee5__is-dragging\",\"wp-grid-item-placeholder-in\":\"b026dda570d0eea0__wp-grid-item-placeholder-in\",\"preview-overlay\":\"cd44faab32c27168__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,a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A;AAAA,MACA,KAAM;AAAA,MACN,WAAY;AAAA,MACZ;AAAA,MACE,GAAG,EAAE,CAAE,uCAAmB,GAAG,QAAQ;AAAA,MACvC,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,mBAAQ,cAAe;AAAA,kBACnC,OAAQ;AAAA,kBAEN;AAAA;AAAA,oBACA,CAAE,kBACH;AAAA,sBAAC,qBAAAC;AAAA,sBAAA;AAAA,wBACA,QAAS;AAAA,wBACT,mBAAoB;AAAA,wBACpB,UAAW;AAAA,wBACX,aAAc;AAAA,wBACd;AAAA;AAAA,oBACD;AAAA;AAAA;AAAA,cAEF;AAAA,cACE;AAAA;AAAA;AAAA,QACH;AAAA;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 ResizeHandle from '../shared/resize-handle';\nimport { clampResizeDelta, type ResizeSnapSize } from '../shared/resize-snap';\nimport { GRID_ITEM_DATA_KEY } from '../shared/grid-item-key';\nimport type { ResizeDelta, ResizeHandleRenderProps } from '../shared/types';\nimport styles from './lanes-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\tif ( interacting ) {\n\t\treturn undefined;\n\t}\n\treturn 'grab';\n}\n\n/**\n * Props for the internal `<LanesItem />` wrapper.\n */\nexport type LanesItemProps = {\n\t/**\n\t * Item key. Forwarded to dnd-kit and emitted as the\n\t * `data-wp-grid-item-key` attribute the hook reads to map measured DOM\n\t * nodes back to logical items.\n\t */\n\titemKey: string;\n\n\t/**\n\t * Inline placement style produced by `useLanePlacement`. On native\n\t * (`display: grid-lanes`), only `gridColumn: span N`. While\n\t * polyfilling, also `gridColumnStart` / `gridRowStart` /\n\t * `gridRowEnd: span N`.\n\t */\n\tplacementStyle: React.CSSProperties;\n\n\t/**\n\t * Whether drag and resize interactions are disabled.\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 any tile in the surface is currently being dragged or\n\t * resized. Drives the drag activator cursor.\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\tchildren: React.ReactNode;\n\n\tactionableArea?: React.ReactNode;\n\n\tonResize: ( id: string, delta: ResizeDelta ) => void;\n\n\t/**\n\t * Snapped column span in pixels for the resize-preview outline.\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 * Maximum tile width while resizing, in pixels. Omitted when the\n\t * item declares no width limit.\n\t */\n\tmaxResizeWidthPx?: number;\n\n\tonResizeEnd: () => void;\n\n\trenderResizeHandle?: React.ComponentType< ResizeHandleRenderProps >;\n};\n\nexport function LanesItem( {\n\titemKey,\n\tplacementStyle,\n\tdisabled = false,\n\tdraggable = true,\n\tresizable = true,\n\tinteracting = false,\n\tchildren,\n\tactionableArea = null,\n\tonResize,\n\tonResizeEnd,\n\tresizeSnapPreview = null,\n\tminResizeWidthPx,\n\tmaxResizeWidthPx,\n\trenderResizeHandle,\n\tdragging = false,\n}: LanesItemProps ) {\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\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: itemKey,\n\t\tdisabled: dragDisabled,\n\t} );\n\tconst mergedRef = useMergeRefs( [ itemRef, setNodeRef ] );\n\tconst contentMergedRef = useMergeRefs( [ contentRef ] );\n\n\tconst style: React.CSSProperties = {\n\t\t...placementStyle,\n\t\talignSelf: 'start',\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 = { width: delta.width, height: 0 };\n\t\tif ( baselineSize ) {\n\t\t\tclamped = clampResizeDelta(\n\t\t\t\tclamped,\n\t\t\t\tbaselineSize,\n\t\t\t\t{ width: minResizeWidthPx },\n\t\t\t\t{ width: maxResizeWidthPx }\n\t\t\t);\n\t\t}\n\t\tsetResizeDelta( clamped );\n\t\tonResize( itemKey, 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}\n\t\t\t: undefined;\n\n\tconst previewOverlay = resizeSnapPreview ? (\n\t\t<div\n\t\t\tclassName={ styles[ 'preview-overlay' ] }\n\t\t\tstyle={ {\n\t\t\t\twidth: resizeSnapPreview.widthPx,\n\t\t\t\theight: resizeSnapPreview.heightPx ?? '100%',\n\t\t\t} }\n\t\t/>\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 ]: itemKey } }\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={ itemKey }\n\t\t\t\t\t\t\tverticalResizable={ false }\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", "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(\"97a2a51c0b\", \"._0a62d9f1dff8c7d8__item{position:relative}._20c43fcd930d828a__item-content{height:100%;position:relative}._11928ee35f1a9519__is-resizing{overflow:visible;z-index:1}._11928ee35f1a9519__is-resizing ._20c43fcd930d828a__item-content{overflow:visible;position:relative;z-index:2}.b7fc83c8b16e9ee5__is-dragging{pointer-events:none}[data-wp-grid-dragging] .b7fc83c8b16e9ee5__is-dragging{border-radius:var(--wp-grid-placeholder-radius,0)}@media not (prefers-reduced-motion:reduce){[data-wp-grid-dragging] .b7fc83c8b16e9ee5__is-dragging{animation:b026dda570d0eea0__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 b026dda570d0eea0__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] .b7fc83c8b16e9ee5__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] .b7fc83c8b16e9ee5__is-dragging{--wp-grid-placeholder-outline-color:Highlight}}.cd44faab32c27168__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)));box-sizing:border-box;inset-inline-start:0;pointer-events:none;position:absolute;top:0;z-index:0}@media (forced-colors:active){.cd44faab32c27168__preview-overlay{border-color:Highlight}}\");\n}\nexport default {\"item\":\"_0a62d9f1dff8c7d8__item\",\"item-content\":\"_20c43fcd930d828a__item-content\",\"is-resizing\":\"_11928ee35f1a9519__is-resizing\",\"is-dragging\":\"b7fc83c8b16e9ee5__is-dragging\",\"wp-grid-item-placeholder-in\":\"b026dda570d0eea0__wp-grid-item-placeholder-in\",\"preview-overlay\":\"cd44faab32c27168__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,cAAe;AAAA,EAC5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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,mBAAQ,cAAe;AAAA,kBACnC,OAAQ;AAAA,kBAEN;AAAA;AAAA,oBACA,CAAE,kBACH;AAAA,sBAAC,qBAAAC;AAAA,sBAAA;AAAA,wBACA,QAAS;AAAA,wBACT,mBAAoB;AAAA,wBACpB,UAAW;AAAA,wBACX,aAAc;AAAA,wBACd;AAAA;AAAA,oBACD;AAAA;AAAA;AAAA,cAEF;AAAA,cACE;AAAA;AAAA;AAAA,QACH;AAAA;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-lanes/types.ts"],
4
- "sourcesContent": ["import type {\n\tDragPreviewRenderProps,\n\tGridItemWidthLimits,\n\tGridOverlayRenderProps,\n\tResizeHandleRenderProps,\n} from '../shared/types';\n\n/**\n * Lanes layout item definition.\n *\n * Mirrors the public surface of `display: grid-lanes`: column span,\n * an optional pinned lane, and an optional source order. Heights are\n * content-driven; there is no `height` field. There is no `'fill'`\n * (lanes pack their items by skyline; nothing is \"left over\").\n * `'full'` is expressed by setting `width` to the lane count.\n */\nexport type DashboardLanesLayoutItem = {\n\t/**\n\t * Unique key that matches a child component key.\n\t */\n\tkey: string;\n\n\t/**\n\t * Number of lanes this item spans (`grid-column: span N`). Clamped\n\t * to the surface's lane count.\n\t *\n\t * @default 1\n\t */\n\twidth?: number;\n\n\t/**\n\t * Pin the item to a specific 0-indexed lane. Pinned items are\n\t * placed before auto items, so the auto flow runs around them.\n\t * Out-of-range values (negative, or beyond `columns - width`) are\n\t * clamped to the available range.\n\t */\n\tlane?: 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\t/**\n\t * Display order. Lower values render first. When omitted, the\n\t * item falls back to its index in the `layout` array.\n\t */\n\torder?: number;\n};\n\n/**\n * Props for `DashboardLanes`.\n *\n * `columns` and `minColumnWidth` compose as a layered model:\n * - `columns` alone: fixed N lanes; tiles scale with the container.\n * - `minColumnWidth` alone: lane count derives from container width,\n * floored by the per-tile minimum, down to 1.\n * - Both together: `columns` caps the count, `minColumnWidth` enforces\n * a per-tile width floor that can reduce the count below the cap.\n */\nexport interface DashboardLanesProps\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: DashboardLanesLayoutItem[];\n\n\t/**\n\t * Surface children. Each child must carry a `key` matching an\n\t * entry in `layout`; children without a match render at the end\n\t * of the surface without explicit placement and fall through the\n\t * lanes auto-flow.\n\t */\n\tchildren: React.ReactNode;\n\n\t/**\n\t * Additional CSS class on the surface root.\n\t */\n\tclassName?: string;\n\n\t/**\n\t * Inline styles on the surface root. Merged underneath the\n\t * surface's own layout styles, so `display` and\n\t * `gridTemplateColumns` always win. The gap between tiles is\n\t * owned by the design-system gap token and is not configurable\n\t * per instance; override it via a theme or density change.\n\t */\n\tstyle?: React.CSSProperties;\n\n\t/**\n\t * `flow-tolerance` value in pixels. When two candidate lanes\n\t * differ in baseline by no more than this, the earlier lane wins\n\t * to preserve source order. Larger values keep tiles closer to\n\t * reading order at the cost of bigger empty regions.\n\t *\n\t * @default 16\n\t */\n\tflowTolerance?: number;\n\n\t/**\n\t * Snap unit for the polyfill's `grid-row-start` / `grid-row-end:\n\t * span N` math. Smaller values produce sharper placement at the\n\t * cost of a larger implicit row count. Ignored on browsers with\n\t * native `display: grid-lanes` support.\n\t *\n\t * @default 4\n\t */\n\trowUnit?: number;\n\n\t/**\n\t * Whether the surface is in edit mode (drag-to-reorder, resize).\n\t *\n\t * @default false\n\t */\n\teditMode?: boolean;\n\n\t/**\n\t * Fired when the user commits a drag or resize.\n\t */\n\tonChangeLayout?: ( newLayout: DashboardLanesLayoutItem[] ) => void;\n\n\t/**\n\t * Fired continuously during a gesture with the in-progress\n\t * layout. The committed result still emits via `onChangeLayout`.\n\t */\n\tonPreviewLayout?: ( previewLayout: DashboardLanesLayoutItem[] ) => void;\n\n\t/**\n\t * Override the default corner resize handle. See `DashboardGrid`\n\t * for the full contract; on lanes the handle is horizontal-only\n\t * because heights are content-driven.\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 (empty column tracks) with\n\t * a custom component. Lanes are content-driven vertically, so no\n\t * `rowHeight` or `rows` is supplied and the default visual paints\n\t * columns only.\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 lane 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 * lane 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 width limits in pixels, keyed by layout item key. Lane\n\t * heights are content-driven, so there is no height axis.\n\t */\n\titemLimits?: Record< string, GridItemWidthLimits >;\n}\n"],
4
+ "sourcesContent": ["import type {\n\tDragPreviewRenderProps,\n\tGridItemWidthLimits,\n\tGridOverlayRenderProps,\n\tResizeHandleRenderProps,\n} from '../shared/types';\n\n/**\n * Lanes layout item definition.\n *\n * Mirrors the public surface of `display: grid-lanes`: column span,\n * an optional pinned lane, and an optional source order. Heights are\n * content-driven; there is no `height` field. There is no `'fill'`\n * (lanes pack their items by skyline; nothing is \"left over\").\n * `'full'` is expressed by setting `width` to the lane count.\n */\nexport type DashboardLanesLayoutItem = {\n\t/**\n\t * Unique key that matches a child component key.\n\t */\n\tkey: string;\n\n\t/**\n\t * Number of lanes this item spans (`grid-column: span N`). Clamped\n\t * to the surface's lane count.\n\t *\n\t * @default 1\n\t */\n\twidth?: number;\n\n\t/**\n\t * Pin the item to a specific 0-indexed lane. Pinned items are\n\t * placed before auto items, so the auto flow runs around them.\n\t * Out-of-range values (negative, or beyond `columns - width`) are\n\t * clamped to the available range.\n\t */\n\tlane?: 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\t/**\n\t * Display order. Lower values render first. When omitted, the\n\t * item falls back to its index in the `layout` array.\n\t */\n\torder?: number;\n};\n\n/**\n * Props for `DashboardLanes`.\n *\n * `columns` and `minColumnWidth` compose as a layered model:\n * - `columns` alone: fixed N lanes; tiles scale with the container.\n * - `minColumnWidth` alone: lane count derives from container width,\n * floored by the per-tile minimum, down to 1.\n * - Both together: `columns` caps the count, `minColumnWidth` enforces\n * a per-tile width floor that can reduce the count below the cap.\n */\nexport interface DashboardLanesProps extends Omit<\n\tReact.ComponentPropsWithoutRef< 'div' >,\n\t'children' | 'className' | 'style'\n> {\n\t/**\n\t * Array of layout items.\n\t */\n\tlayout: DashboardLanesLayoutItem[];\n\n\t/**\n\t * Surface children. Each child must carry a `key` matching an\n\t * entry in `layout`; children without a match render at the end\n\t * of the surface without explicit placement and fall through the\n\t * lanes auto-flow.\n\t */\n\tchildren: React.ReactNode;\n\n\t/**\n\t * Additional CSS class on the surface root.\n\t */\n\tclassName?: string;\n\n\t/**\n\t * Inline styles on the surface root. Merged underneath the\n\t * surface's own layout styles, so `display` and\n\t * `gridTemplateColumns` always win. The gap between tiles is\n\t * owned by the design-system gap token and is not configurable\n\t * per instance; override it via a theme or density change.\n\t */\n\tstyle?: React.CSSProperties;\n\n\t/**\n\t * `flow-tolerance` value in pixels. When two candidate lanes\n\t * differ in baseline by no more than this, the earlier lane wins\n\t * to preserve source order. Larger values keep tiles closer to\n\t * reading order at the cost of bigger empty regions.\n\t *\n\t * @default 16\n\t */\n\tflowTolerance?: number;\n\n\t/**\n\t * Snap unit for the polyfill's `grid-row-start` / `grid-row-end:\n\t * span N` math. Smaller values produce sharper placement at the\n\t * cost of a larger implicit row count. Ignored on browsers with\n\t * native `display: grid-lanes` support.\n\t *\n\t * @default 4\n\t */\n\trowUnit?: number;\n\n\t/**\n\t * Whether the surface is in edit mode (drag-to-reorder, resize).\n\t *\n\t * @default false\n\t */\n\teditMode?: boolean;\n\n\t/**\n\t * Fired when the user commits a drag or resize.\n\t */\n\tonChangeLayout?: ( newLayout: DashboardLanesLayoutItem[] ) => void;\n\n\t/**\n\t * Fired continuously during a gesture with the in-progress\n\t * layout. The committed result still emits via `onChangeLayout`.\n\t */\n\tonPreviewLayout?: ( previewLayout: DashboardLanesLayoutItem[] ) => void;\n\n\t/**\n\t * Override the default corner resize handle. See `DashboardGrid`\n\t * for the full contract; on lanes the handle is horizontal-only\n\t * because heights are content-driven.\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 (empty column tracks) with\n\t * a custom component. Lanes are content-driven vertically, so no\n\t * `rowHeight` or `rows` is supplied and the default visual paints\n\t * columns only.\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 lane 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 * lane 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 width limits in pixels, keyed by layout item key. Lane\n\t * heights are content-driven, so there is no height axis.\n\t */\n\titemLimits?: Record< string, GridItemWidthLimits >;\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/dashboard-lanes/use-lane-placement.ts"],
4
- "sourcesContent": ["import { useState, useLayoutEffect, useMemo } from '@wordpress/element';\nimport { computeLanePlacements } from './lane-placement';\nimport { GRID_ITEM_DATA_KEY } from '../shared/grid-item-key';\n\nconst DEFAULT_ROW_UNIT = 4;\n\nfunction supportsGridLanes(): boolean {\n\tif ( typeof CSS === 'undefined' || ! CSS.supports ) {\n\t\treturn false;\n\t}\n\treturn CSS.supports( 'display', 'grid-lanes' );\n}\n\nfunction clampSpan( span: number | undefined ): number {\n\tif ( typeof span !== 'number' || ! Number.isFinite( span ) ) {\n\t\treturn 1;\n\t}\n\treturn Math.max( 1, Math.floor( span ) );\n}\n\n/**\n * Logical item passed to the hook. The renderer is responsible for\n * mounting a DOM node with `data-wp-grid-item-key={ item.key }` for each\n * entry; the hook will measure that node and produce inline styles.\n */\nexport type LaneItemInput = {\n\tkey: string;\n\tspan?: number;\n\tlane?: number;\n};\n\nexport type UseLanePlacementInput = {\n\titems: ReadonlyArray< LaneItemInput >;\n\tlanes: number;\n\tgap: number;\n\tflowTolerance: number;\n\t/**\n\t * Snap unit for `grid-row-start` / `grid-row-end: span N` math.\n\t * Smaller values produce sharper placement at the cost of more\n\t * implicit rows. Defaults to 4 (px).\n\t */\n\trowUnit?: number;\n};\n\nexport type UseLanePlacementResult = {\n\t/**\n\t * Inline styles to apply to each item, keyed by item key. On\n\t * native (`display: grid-lanes`), entries carry only\n\t * `gridColumn: span N`; the browser handles row placement. While\n\t * polyfilling, entries also carry explicit `grid-column-start` /\n\t * `grid-row-*` values.\n\t */\n\titemStyles: Map< string, React.CSSProperties >;\n\n\t/**\n\t * `false` when the host browser supports `display: grid-lanes`\n\t * natively. The hook avoids mounting any observers in that case.\n\t */\n\tisPolyfilled: boolean;\n};\n\n/**\n * Hook that measures item heights and resolves their placement when\n * `display: grid-lanes` is unavailable, falling through to a no-op\n * pass when the host browser supports the feature natively.\n *\n * Usage from the renderer:\n *\n * ```tsx\n * const [ container, setContainer ] = useState< HTMLDivElement | null >( null );\n * const { itemStyles } = useLanePlacement( container, {\n * items: layout,\n * lanes: columns,\n * gap: gapPx,\n * flowTolerance: 16,\n * } );\n *\n * return (\n * <div ref={ setContainer } style={ { display: 'grid-lanes', ... } }>\n * { items.map( ( item ) => (\n * <div\n * key={ item.key }\n * data-wp-grid-item-key={ item.key }\n * style={ itemStyles.get( item.key ) }\n * >\n * { ... }\n * </div>\n * ) ) }\n * </div>\n * );\n * ```\n *\n * @param container HTMLElement (or null pre-mount) hosting the items.\n * @param input Logical items, lane count, gap, and tuning.\n * @return Per-item styles plus the `isPolyfilled` flag.\n */\nexport function useLanePlacement(\n\tcontainer: HTMLElement | null,\n\tinput: UseLanePlacementInput\n): UseLanePlacementResult {\n\t// Detect once at mount. SSR returns `true` (CSS undefined); the\n\t// client-first render returns the real value. Either path produces\n\t// the same DOM until the polyfill effect runs (both emit\n\t// span-only styles), so there is no hydration mismatch.\n\tconst [ isPolyfilled ] = useState( () => ! supportsGridLanes() );\n\n\tconst [ itemStyles, setItemStyles ] = useState<\n\t\tMap< string, React.CSSProperties >\n\t>( () => new Map() );\n\n\t// Native pass-through: items only need their column span; the\n\t// browser handles row placement. Memoized so a stable items\n\t// array yields a stable Map identity.\n\tconst nativeStyles = useMemo( () => {\n\t\tconst map = new Map< string, React.CSSProperties >();\n\t\tfor ( const item of input.items ) {\n\t\t\tmap.set( item.key, {\n\t\t\t\tgridColumn: `span ${ clampSpan( item.span ) }`,\n\t\t\t} );\n\t\t}\n\t\treturn map;\n\t}, [ input.items ] );\n\n\t// Stable signature of items for deps. Keys, spans, and explicit\n\t// lanes are the only fields that influence observer wiring or\n\t// placement, so we hash exactly those.\n\tconst itemsSignature = useMemo( () => {\n\t\treturn input.items\n\t\t\t.map(\n\t\t\t\t( item ) =>\n\t\t\t\t\t`${ item.key }/${ item.span ?? 1 }/${ item.lane ?? '' }`\n\t\t\t)\n\t\t\t.join( '\\0' );\n\t}, [ input.items ] );\n\n\t// Stable array identity while placement-relevant fields match\n\t// `itemsSignature`, so the layout effect is not torn down on every\n\t// parent re-render that passes a fresh `items` reference.\n\t// eslint-disable-next-line react-hooks/exhaustive-deps -- `itemsSignature` encodes keys/spans/lanes; `input.items` reference often changes without placement changes.\n\tconst itemsForPlacement = useMemo( () => input.items, [ itemsSignature ] );\n\n\tconst { lanes, gap, flowTolerance, rowUnit } = input;\n\n\tuseLayoutEffect( () => {\n\t\tif ( ! isPolyfilled || ! container ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( typeof ResizeObserver === 'undefined' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst heights = new Map< string, number >();\n\t\tconst observed = new Set< Element >();\n\t\tlet cancelled = false;\n\t\tlet rafId: number | null = null;\n\n\t\tconst recompute = () => {\n\t\t\tif ( rafId !== null || cancelled ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// One layout per frame even when ResizeObserver and\n\t\t\t// MutationObserver fire in the same tick.\n\t\t\trafId = requestAnimationFrame( () => {\n\t\t\t\trafId = null;\n\t\t\t\tif ( cancelled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst itemsWithHeight = itemsForPlacement.map( ( item ) => ( {\n\t\t\t\t\tkey: item.key,\n\t\t\t\t\tspan: clampSpan( item.span ),\n\t\t\t\t\tlane: item.lane,\n\t\t\t\t\theight: heights.get( item.key ) ?? 0,\n\t\t\t\t} ) );\n\t\t\t\tconst result = computeLanePlacements( {\n\t\t\t\t\titems: itemsWithHeight,\n\t\t\t\t\tlanes,\n\t\t\t\t\tgap,\n\t\t\t\t\tflowTolerance,\n\t\t\t\t} );\n\t\t\t\tconst effectiveRowUnit = Math.max(\n\t\t\t\t\t1,\n\t\t\t\t\trowUnit ?? DEFAULT_ROW_UNIT\n\t\t\t\t);\n\t\t\t\tconst next = new Map< string, React.CSSProperties >();\n\t\t\t\tfor ( const item of itemsForPlacement ) {\n\t\t\t\t\tconst placement = result.placements.get( item.key );\n\t\t\t\t\tif ( ! placement ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst height = heights.get( item.key ) ?? 0;\n\t\t\t\t\tconst rowStart =\n\t\t\t\t\t\tMath.floor( placement.top / effectiveRowUnit ) + 1;\n\t\t\t\t\tconst rowSpan = Math.max(\n\t\t\t\t\t\t1,\n\t\t\t\t\t\tMath.ceil( height / effectiveRowUnit )\n\t\t\t\t\t);\n\t\t\t\t\tnext.set( item.key, {\n\t\t\t\t\t\tgridColumnStart: placement.lane + 1,\n\t\t\t\t\t\tgridColumnEnd: `span ${ placement.span }`,\n\t\t\t\t\t\tgridRowStart: rowStart,\n\t\t\t\t\t\tgridRowEnd: `span ${ rowSpan }`,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\tsetItemStyles( next );\n\t\t\t} );\n\t\t};\n\n\t\tconst resizeObserver = new ResizeObserver( ( entries ) => {\n\t\t\tlet changed = false;\n\t\t\tfor ( const entry of entries ) {\n\t\t\t\tconst key = ( entry.target as HTMLElement ).getAttribute(\n\t\t\t\t\tGRID_ITEM_DATA_KEY\n\t\t\t\t);\n\t\t\t\tif ( ! key ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst newHeight = entry.contentRect.height;\n\t\t\t\tif ( heights.get( key ) !== newHeight ) {\n\t\t\t\t\theights.set( key, newHeight );\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( changed ) {\n\t\t\t\trecompute();\n\t\t\t}\n\t\t} );\n\n\t\tconst refreshObserved = () => {\n\t\t\tconst current = container.querySelectorAll(\n\t\t\t\t`[${ GRID_ITEM_DATA_KEY }]`\n\t\t\t);\n\t\t\tfor ( const element of current ) {\n\t\t\t\tif ( ! observed.has( element ) ) {\n\t\t\t\t\tobserved.add( element );\n\t\t\t\t\tresizeObserver.observe( element );\n\t\t\t\t\tconst key = element.getAttribute( GRID_ITEM_DATA_KEY );\n\t\t\t\t\tif ( key ) {\n\t\t\t\t\t\tconst rect = (\n\t\t\t\t\t\t\telement as HTMLElement\n\t\t\t\t\t\t ).getBoundingClientRect();\n\t\t\t\t\t\theights.set( key, rect.height );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor ( const element of observed ) {\n\t\t\t\tif ( ! container.contains( element ) ) {\n\t\t\t\t\tresizeObserver.unobserve( element );\n\t\t\t\t\tobserved.delete( element );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Children may mount, unmount, or change `data-wp-grid-item-key`\n\t\t// after the container exists (drag reorders, additions). The\n\t\t// mutation observer keeps the observed set in sync.\n\t\tconst mutationObserver =\n\t\t\ttypeof MutationObserver !== 'undefined'\n\t\t\t\t? new MutationObserver( () => {\n\t\t\t\t\t\trefreshObserved();\n\t\t\t\t\t\trecompute();\n\t\t\t\t } )\n\t\t\t\t: null;\n\t\tif ( mutationObserver ) {\n\t\t\tmutationObserver.observe( container, {\n\t\t\t\tchildList: true,\n\t\t\t\tsubtree: true,\n\t\t\t\tattributes: true,\n\t\t\t\tattributeFilter: [ GRID_ITEM_DATA_KEY ],\n\t\t\t} );\n\t\t}\n\n\t\trefreshObserved();\n\t\trecompute();\n\n\t\treturn () => {\n\t\t\tcancelled = true;\n\t\t\tif ( rafId !== null ) {\n\t\t\t\tcancelAnimationFrame( rafId );\n\t\t\t}\n\t\t\tresizeObserver.disconnect();\n\t\t\tmutationObserver?.disconnect();\n\t\t};\n\t}, [\n\t\tcontainer,\n\t\tisPolyfilled,\n\t\tlanes,\n\t\tgap,\n\t\tflowTolerance,\n\t\trowUnit,\n\t\titemsForPlacement,\n\t] );\n\n\tif ( ! isPolyfilled ) {\n\t\treturn { itemStyles: nativeStyles, isPolyfilled: false };\n\t}\n\tif ( itemStyles.size === 0 ) {\n\t\t// Pre-measurement frame: emit native-shape styles so items\n\t\t// appear in their default span rather than collapsing to 1\n\t\t// column at the top-left.\n\t\treturn {\n\t\t\titemStyles: n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S;AAAA,QACT,YAAY;AAAA,QACZ,iBAAiB,CAAE,uCAAmB;AAAA,MACvC,CAAE;AAAA,IACH;AAEA,oBAAgB;AAChB,cAAU;AAEV,WAAO,MAAM;AACZ,kBAAY;AACZ,UAAK,UAAU,MAAO;AACrB,6BAAsB,KAAM;AAAA,MAC7B;AACA,qBAAe,WAAW;AAC1B,wBAAkB,WAAW;AAAA,IAC9B;AAAA,EACD,GAAG;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,CAAE;AAEF,MAAK,CAAE,cAAe;AACrB,WAAO,EAAE,YAAY,cAAc,cAAc,MAAM;AAAA,EACxD;AACA,MAAK,WAAW,SAAS,GAAI;AAI5B,WAAO;AAAA,MACN,YAAY;AAAA,MACZ,cAAc;AAAA,IACf;AAAA,EACD;AACA,SAAO,EAAE,YAAY,cAAc,KAAK;AACzC;",
4
+ "sourcesContent": ["import { useState, useLayoutEffect, useMemo } from '@wordpress/element';\nimport { computeLanePlacements } from './lane-placement';\nimport { GRID_ITEM_DATA_KEY } from '../shared/grid-item-key';\n\nconst DEFAULT_ROW_UNIT = 4;\n\nfunction supportsGridLanes(): boolean {\n\tif ( typeof CSS === 'undefined' || ! CSS.supports ) {\n\t\treturn false;\n\t}\n\treturn CSS.supports( 'display', 'grid-lanes' );\n}\n\nfunction clampSpan( span: number | undefined ): number {\n\tif ( typeof span !== 'number' || ! Number.isFinite( span ) ) {\n\t\treturn 1;\n\t}\n\treturn Math.max( 1, Math.floor( span ) );\n}\n\n/**\n * Logical item passed to the hook. The renderer is responsible for\n * mounting a DOM node with `data-wp-grid-item-key={ item.key }` for each\n * entry; the hook will measure that node and produce inline styles.\n */\nexport type LaneItemInput = {\n\tkey: string;\n\tspan?: number;\n\tlane?: number;\n};\n\nexport type UseLanePlacementInput = {\n\titems: ReadonlyArray< LaneItemInput >;\n\tlanes: number;\n\tgap: number;\n\tflowTolerance: number;\n\t/**\n\t * Snap unit for `grid-row-start` / `grid-row-end: span N` math.\n\t * Smaller values produce sharper placement at the cost of more\n\t * implicit rows. Defaults to 4 (px).\n\t */\n\trowUnit?: number;\n};\n\nexport type UseLanePlacementResult = {\n\t/**\n\t * Inline styles to apply to each item, keyed by item key. On\n\t * native (`display: grid-lanes`), entries carry only\n\t * `gridColumn: span N`; the browser handles row placement. While\n\t * polyfilling, entries also carry explicit `grid-column-start` /\n\t * `grid-row-*` values.\n\t */\n\titemStyles: Map< string, React.CSSProperties >;\n\n\t/**\n\t * `false` when the host browser supports `display: grid-lanes`\n\t * natively. The hook avoids mounting any observers in that case.\n\t */\n\tisPolyfilled: boolean;\n};\n\n/**\n * Hook that measures item heights and resolves their placement when\n * `display: grid-lanes` is unavailable, falling through to a no-op\n * pass when the host browser supports the feature natively.\n *\n * Usage from the renderer:\n *\n * ```tsx\n * const [ container, setContainer ] = useState< HTMLDivElement | null >( null );\n * const { itemStyles } = useLanePlacement( container, {\n * items: layout,\n * lanes: columns,\n * gap: gapPx,\n * flowTolerance: 16,\n * } );\n *\n * return (\n * <div ref={ setContainer } style={ { display: 'grid-lanes', ... } }>\n * { items.map( ( item ) => (\n * <div\n * key={ item.key }\n * data-wp-grid-item-key={ item.key }\n * style={ itemStyles.get( item.key ) }\n * >\n * { ... }\n * </div>\n * ) ) }\n * </div>\n * );\n * ```\n *\n * @param container HTMLElement (or null pre-mount) hosting the items.\n * @param input Logical items, lane count, gap, and tuning.\n * @return Per-item styles plus the `isPolyfilled` flag.\n */\nexport function useLanePlacement(\n\tcontainer: HTMLElement | null,\n\tinput: UseLanePlacementInput\n): UseLanePlacementResult {\n\t// Detect once at mount. SSR returns `true` (CSS undefined); the\n\t// client-first render returns the real value. Either path produces\n\t// the same DOM until the polyfill effect runs (both emit\n\t// span-only styles), so there is no hydration mismatch.\n\tconst [ isPolyfilled ] = useState( () => ! supportsGridLanes() );\n\n\tconst [ itemStyles, setItemStyles ] = useState<\n\t\tMap< string, React.CSSProperties >\n\t>( () => new Map() );\n\n\t// Native pass-through: items only need their column span; the\n\t// browser handles row placement. Memoized so a stable items\n\t// array yields a stable Map identity.\n\tconst nativeStyles = useMemo( () => {\n\t\tconst map = new Map< string, React.CSSProperties >();\n\t\tfor ( const item of input.items ) {\n\t\t\tmap.set( item.key, {\n\t\t\t\tgridColumn: `span ${ clampSpan( item.span ) }`,\n\t\t\t} );\n\t\t}\n\t\treturn map;\n\t}, [ input.items ] );\n\n\t// Stable signature of items for deps. Keys, spans, and explicit\n\t// lanes are the only fields that influence observer wiring or\n\t// placement, so we hash exactly those.\n\tconst itemsSignature = useMemo( () => {\n\t\treturn input.items\n\t\t\t.map(\n\t\t\t\t( item ) =>\n\t\t\t\t\t`${ item.key }/${ item.span ?? 1 }/${ item.lane ?? '' }`\n\t\t\t)\n\t\t\t.join( '\\0' );\n\t}, [ input.items ] );\n\n\t// Stable array identity while placement-relevant fields match\n\t// `itemsSignature`, so the layout effect is not torn down on every\n\t// parent re-render that passes a fresh `items` reference.\n\t// eslint-disable-next-line react-hooks/exhaustive-deps -- `itemsSignature` encodes keys/spans/lanes; `input.items` reference often changes without placement changes.\n\tconst itemsForPlacement = useMemo( () => input.items, [ itemsSignature ] );\n\n\tconst { lanes, gap, flowTolerance, rowUnit } = input;\n\n\tuseLayoutEffect( () => {\n\t\tif ( ! isPolyfilled || ! container ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( typeof ResizeObserver === 'undefined' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst heights = new Map< string, number >();\n\t\tconst observed = new Set< Element >();\n\t\tlet cancelled = false;\n\t\tlet rafId: number | null = null;\n\n\t\tconst recompute = () => {\n\t\t\tif ( rafId !== null || cancelled ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// One layout per frame even when ResizeObserver and\n\t\t\t// MutationObserver fire in the same tick.\n\t\t\trafId = requestAnimationFrame( () => {\n\t\t\t\trafId = null;\n\t\t\t\tif ( cancelled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst itemsWithHeight = itemsForPlacement.map( ( item ) => ( {\n\t\t\t\t\tkey: item.key,\n\t\t\t\t\tspan: clampSpan( item.span ),\n\t\t\t\t\tlane: item.lane,\n\t\t\t\t\theight: heights.get( item.key ) ?? 0,\n\t\t\t\t} ) );\n\t\t\t\tconst result = computeLanePlacements( {\n\t\t\t\t\titems: itemsWithHeight,\n\t\t\t\t\tlanes,\n\t\t\t\t\tgap,\n\t\t\t\t\tflowTolerance,\n\t\t\t\t} );\n\t\t\t\tconst effectiveRowUnit = Math.max(\n\t\t\t\t\t1,\n\t\t\t\t\trowUnit ?? DEFAULT_ROW_UNIT\n\t\t\t\t);\n\t\t\t\tconst next = new Map< string, React.CSSProperties >();\n\t\t\t\tfor ( const item of itemsForPlacement ) {\n\t\t\t\t\tconst placement = result.placements.get( item.key );\n\t\t\t\t\tif ( ! placement ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst height = heights.get( item.key ) ?? 0;\n\t\t\t\t\tconst rowStart =\n\t\t\t\t\t\tMath.floor( placement.top / effectiveRowUnit ) + 1;\n\t\t\t\t\tconst rowSpan = Math.max(\n\t\t\t\t\t\t1,\n\t\t\t\t\t\tMath.ceil( height / effectiveRowUnit )\n\t\t\t\t\t);\n\t\t\t\t\tnext.set( item.key, {\n\t\t\t\t\t\tgridColumnStart: placement.lane + 1,\n\t\t\t\t\t\tgridColumnEnd: `span ${ placement.span }`,\n\t\t\t\t\t\tgridRowStart: rowStart,\n\t\t\t\t\t\tgridRowEnd: `span ${ rowSpan }`,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\tsetItemStyles( next );\n\t\t\t} );\n\t\t};\n\n\t\tconst resizeObserver = new ResizeObserver( ( entries ) => {\n\t\t\tlet changed = false;\n\t\t\tfor ( const entry of entries ) {\n\t\t\t\tconst key = ( entry.target as HTMLElement ).getAttribute(\n\t\t\t\t\tGRID_ITEM_DATA_KEY\n\t\t\t\t);\n\t\t\t\tif ( ! key ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst newHeight = entry.contentRect.height;\n\t\t\t\tif ( heights.get( key ) !== newHeight ) {\n\t\t\t\t\theights.set( key, newHeight );\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( changed ) {\n\t\t\t\trecompute();\n\t\t\t}\n\t\t} );\n\n\t\tconst refreshObserved = () => {\n\t\t\tconst current = container.querySelectorAll(\n\t\t\t\t`[${ GRID_ITEM_DATA_KEY }]`\n\t\t\t);\n\t\t\tfor ( const element of current ) {\n\t\t\t\tif ( ! observed.has( element ) ) {\n\t\t\t\t\tobserved.add( element );\n\t\t\t\t\tresizeObserver.observe( element );\n\t\t\t\t\tconst key = element.getAttribute( GRID_ITEM_DATA_KEY );\n\t\t\t\t\tif ( key ) {\n\t\t\t\t\t\tconst rect = (\n\t\t\t\t\t\t\telement as HTMLElement\n\t\t\t\t\t\t ).getBoundingClientRect();\n\t\t\t\t\t\theights.set( key, rect.height );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor ( const element of observed ) {\n\t\t\t\tif ( ! container.contains( element ) ) {\n\t\t\t\t\tresizeObserver.unobserve( element );\n\t\t\t\t\tobserved.delete( element );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Children may mount, unmount, or change `data-wp-grid-item-key`\n\t\t// after the container exists (drag reorders, additions). The\n\t\t// mutation observer keeps the observed set in sync.\n\t\tconst mutationObserver =\n\t\t\ttypeof MutationObserver !== 'undefined'\n\t\t\t\t? new MutationObserver( () => {\n\t\t\t\t\t\trefreshObserved();\n\t\t\t\t\t\trecompute();\n\t\t\t\t\t} )\n\t\t\t\t: null;\n\t\tif ( mutationObserver ) {\n\t\t\tmutationObserver.observe( container, {\n\t\t\t\tchildList: true,\n\t\t\t\tsubtree: true,\n\t\t\t\tattributes: true,\n\t\t\t\tattributeFilter: [ GRID_ITEM_DATA_KEY ],\n\t\t\t} );\n\t\t}\n\n\t\trefreshObserved();\n\t\trecompute();\n\n\t\treturn () => {\n\t\t\tcancelled = true;\n\t\t\tif ( rafId !== null ) {\n\t\t\t\tcancelAnimationFrame( rafId );\n\t\t\t}\n\t\t\tresizeObserver.disconnect();\n\t\t\tmutationObserver?.disconnect();\n\t\t};\n\t}, [\n\t\tcontainer,\n\t\tisPolyfilled,\n\t\tlanes,\n\t\tgap,\n\t\tflowTolerance,\n\t\trowUnit,\n\t\titemsForPlacement,\n\t] );\n\n\tif ( ! isPolyfilled ) {\n\t\treturn { itemStyles: nativeStyles, isPolyfilled: false };\n\t}\n\tif ( itemStyles.size === 0 ) {\n\t\t// Pre-measurement frame: emit native-shape styles so items\n\t\t// appear in their default span rather than collapsing to 1\n\t\t// column at the top-left.\n\t\treturn {\n\t\t\titemStyles: nativeStyles as Map< string, React.CSSProperties >,\n\t\t\tisPolyfilled: true,\n\t\t};\n\t}\n\treturn { itemStyles, isPolyfilled: true };\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAmD;AACnD,4BAAsC;AACtC,2BAAmC;AAEnC,IAAM,mBAAmB;AAEzB,SAAS,oBAA6B;AACrC,MAAK,OAAO,QAAQ,eAAe,CAAE,IAAI,UAAW;AACnD,WAAO;AAAA,EACR;AACA,SAAO,IAAI,SAAU,WAAW,YAAa;AAC9C;AAEA,SAAS,UAAW,MAAmC;AACtD,MAAK,OAAO,SAAS,YAAY,CAAE,OAAO,SAAU,IAAK,GAAI;AAC5D,WAAO;AAAA,EACR;AACA,SAAO,KAAK,IAAK,GAAG,KAAK,MAAO,IAAK,CAAE;AACxC;AA8EO,SAAS,iBACf,WACA,OACyB;AAKzB,QAAM,CAAE,YAAa,QAAI,yBAAU,MAAM,CAAE,kBAAkB,CAAE;AAE/D,QAAM,CAAE,YAAY,aAAc,QAAI,yBAEnC,MAAM,oBAAI,IAAI,CAAE;AA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B,yBAAe,QAAS,OAAQ;AAChC,gBAAM,MAAM,QAAQ,aAAc,uCAAmB;AACrD,cAAK,KAAM;AACV,kBAAM,OACL,QACE,sBAAsB;AACzB,oBAAQ,IAAK,KAAK,KAAK,MAAO;AAAA,UAC/B;AAAA,QACD;AAAA,MACD;AACA,iBAAY,WAAW,UAAW;AACjC,YAAK,CAAE,UAAU,SAAU,OAAQ,GAAI;AACtC,yBAAe,UAAW,OAAQ;AAClC,mBAAS,OAAQ,OAAQ;AAAA,QAC1B;AAAA,MACD;AAAA,IACD;AAKA,UAAM,mBACL,OAAO,qBAAqB,cACzB,IAAI,iBAAkB,MAAM;AAC5B,sBAAgB;AAChB,gBAAU;AAAA,IACX,CAAE,IACD;AACJ,QAAK,kBAAmB;AACvB,uBAAiB,QAAS,WAAW;AAAA,QACpC,WAAW;AAAA,QACX,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,iBAAiB,CAAE,uCAAmB;AAAA,MACvC,CAAE;AAAA,IACH;AAEA,oBAAgB;AAChB,cAAU;AAEV,WAAO,MAAM;AACZ,kBAAY;AACZ,UAAK,UAAU,MAAO;AACrB,6BAAsB,KAAM;AAAA,MAC7B;AACA,qBAAe,WAAW;AAC1B,wBAAkB,WAAW;AAAA,IAC9B;AAAA,EACD,GAAG;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,CAAE;AAEF,MAAK,CAAE,cAAe;AACrB,WAAO,EAAE,YAAY,cAAc,cAAc,MAAM;AAAA,EACxD;AACA,MAAK,WAAW,SAAS,GAAI;AAI5B,WAAO;AAAA,MACN,YAAY;AAAA,MACZ,cAAc;AAAA,IACf;AAAA,EACD;AACA,SAAO,EAAE,YAAY,cAAc,KAAK;AACzC;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/shared/grid-overlay.tsx", "../../../style-runtime/src/index.ts", "../../src/shared/grid-overlay.module.css"],
4
- "sourcesContent": ["import clsx from 'clsx';\nimport { useEffect, useState } from '@wordpress/element';\nimport type { GridOverlayRenderProps } from './types';\nimport styles from './grid-overlay.module.css';\n\n/**\n * Default edit-mode overlay: one column per track, each holding `rows`\n * row-marker tiles when `rowHeight` is uniform. Used by both surfaces\n * and replaceable via `renderGridOverlay`. Reveals with a diagonal\n * wave on activate and releases paint cost while inactive.\n *\n * @param props Render props supplied by the surface.\n * @param props.columns Column tracks to mirror.\n * @param props.rowHeight Uniform row height in pixels; omitted for\n * content-sized rows, which skip row markers.\n * @param props.rows Row tracks per column; omitted when unknown.\n * @param props.isActive When `false`, the overlay fades out.\n */\nexport function GridOverlay( {\n\tcolumns,\n\trowHeight,\n\trows,\n\tisActive,\n}: GridOverlayRenderProps ) {\n\tconst showRows =\n\t\ttypeof rowHeight === 'number' && typeof rows === 'number' && rows > 0;\n\t// Bump the key when edit mode activates so CSS animations restart on\n\t// each enter (the overlay stays mounted across toggles).\n\tconst [ waveKey, setWaveKey ] = useState( 0 );\n\tuseEffect( () => {\n\t\tif ( isActive ) {\n\t\t\tsetWaveKey( ( key ) => key + 1 );\n\t\t}\n\t}, [ isActive ] );\n\tconst style: React.CSSProperties = {\n\t\tgridTemplateColumns: `repeat(${ columns }, minmax(0, 1fr))`,\n\t\t...( showRows\n\t\t\t? ( {\n\t\t\t\t\t'--wp-grid-overlay-row-height': `${ rowHeight }px`,\n\t\t\t } as React.CSSProperties )\n\t\t\t: {} ),\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tkey={ waveKey }\n\t\t\taria-hidden\n\t\t\tclassName={ clsx(\n\t\t\t\tstyles.overlay,\n\t\t\t\tisActive && styles[ 'is-active' ],\n\t\t\t\tshowRows && styles[ 'has-rows' ]\n\t\t\t) }\n\t\t\tstyle={ style }\n\t\t>\n\t\t\t{ Array.from( { length: columns }, ( _column, columnIndex ) => (\n\t\t\t\t<div\n\t\t\t\t\tkey={ columnIndex }\n\t\t\t\t\tclassName={ styles.column }\n\t\t\t\t\tstyle={\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'--wp-grid-overlay-column-index': columnIndex,\n\t\t\t\t\t\t\t'--wp-grid-overlay-row-index': 0,\n\t\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{ showRows &&\n\t\t\t\t\t\tArray.from( { length: rows }, ( _row, rowIndex ) => (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tkey={ rowIndex }\n\t\t\t\t\t\t\t\tclassName={ styles.row }\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'--wp-grid-overlay-row-index': rowIndex,\n\t\t\t\t\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) ) }\n\t\t\t\t</div>\n\t\t\t) ) }\n\t\t</div>\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(\"63c265b9f4\", \"._9d372b1b567c1c15__overlay{display:grid;gap:var(--wp-grid-gap,var(--wpds-dimension-gap-xl,24px));inset:0;opacity:0;pointer-events:none;position:absolute;visibility:hidden}._9d372b1b567c1c15__overlay.acb42ab28bd5e371__is-active{opacity:1;visibility:visible}@media not (prefers-reduced-motion){._9d372b1b567c1c15__overlay.acb42ab28bd5e371__is-active .d8e6ee9623aadacf__row,._9d372b1b567c1c15__overlay.acb42ab28bd5e371__is-active:not(._1cee1202cb622c6b__has-rows) ._04ff499ab60b4891__column{animation:_2d68e980e4534716__grid-overlay-tile-in var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-subtle,cubic-bezier(.15,0,.15,1)) both;animation-delay:calc(var(--wp-grid-overlay-wave-delay-step, 28ms)*(var(--wp-grid-overlay-column-index, 0) + var(--wp-grid-overlay-row-index, 0)));opacity:0;transform:scale(.64)}@keyframes _2d68e980e4534716__grid-overlay-tile-in{to{opacity:1;transform:scale(1)}}._9d372b1b567c1c15__overlay:not(.acb42ab28bd5e371__is-active){transition:opacity var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-subtle,cubic-bezier(.15,0,.15,1)),visibility 0s linear var(--wpds-motion-duration-sm,.1s)}._9d372b1b567c1c15__overlay:not(.acb42ab28bd5e371__is-active) ._04ff499ab60b4891__column,._9d372b1b567c1c15__overlay:not(.acb42ab28bd5e371__is-active) .d8e6ee9623aadacf__row{animation:none;transform:none}}@media (prefers-reduced-motion:reduce){._9d372b1b567c1c15__overlay{transition:opacity var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-subtle,cubic-bezier(.15,0,.15,1)),visibility 0s linear var(--wpds-motion-duration-sm,.1s)}._9d372b1b567c1c15__overlay.acb42ab28bd5e371__is-active{transition:opacity var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-subtle,cubic-bezier(.15,0,.15,1)),visibility 0s linear 0s}}._04ff499ab60b4891__column{display:flex;flex-direction:column;gap:var(--wp-grid-gap,var(--wpds-dimension-gap-xl,24px));min-width:0}.d8e6ee9623aadacf__row{background-color:var(--wp-grid-overlay-tile-bg,var(--wpds-color-background-surface-neutral-weak,#f4f4f4));border-radius:var(--wpds-border-radius-lg,8px);box-sizing:border-box;flex:0 0 var(--wp-grid-overlay-row-height);height:var(--wp-grid-overlay-row-height)}\");\n}\nexport default {\"overlay\":\"_9d372b1b567c1c15__overlay\",\"is-active\":\"acb42ab28bd5e371__is-active\",\"row\":\"d8e6ee9623aadacf__row\",\"has-rows\":\"_1cee1202cb622c6b__has-rows\",\"column\":\"_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ChB,QAAK,UAAW;AACf,iBAAY,CAAE,QAAS,MAAM,CAAE;AAAA,IAChC;AAAA,EACD,GAAG,CAAE,QAAS,CAAE;AAChB,QAAM,QAA6B;AAAA,IAClC,qBAAqB,UAAW,OAAQ;AAAA,IACxC,GAAK,WACA;AAAA,MACF,gCAAgC,GAAI,SAAU;AAAA,IAC9C,IACA,CAAC;AAAA,EACL;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MAEA,eAAW;AAAA,MACX,eAAY,YAAAA;AAAA,QACX,qBAAO;AAAA,QACP,YAAY,qBAAQ,WAAY;AAAA,QAChC,YAAY,qBAAQ,UAAW;AAAA,MAChC;AAAA,MACA;AAAA,MAEE,gBAAM,KAAM,EAAE,QAAQ,QAAQ,GAAG,CAAE,SAAS,gBAC7C;AAAA,QAAC;AAAA;AAAA,UAEA,WAAY,qBAAO;AAAA,UACnB,OACC;AAAA,YACC,kCAAkC;AAAA,YAClC,+BAA+B;AAAA,UAChC;AAAA,UAGC,sBACD,MAAM,KAAM,EAAE,QAAQ,KAAK,GAAG,CAAE,MAAM,aACrC;AAAA,YAAC;AAAA;AAAA,cAEA,WAAY,qBAAO;AAAA,cACnB,OACC;AAAA,gBACC,+BAA+B;AAAA,cAChC;AAAA;AAAA,YALK;AAAA,UAOP,CACC;AAAA;AAAA,QApBG;AAAA,MAqBP,CACC;AAAA;AAAA,IAjCI;AAAA,EAkCP;AAEF;",
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport { useEffect, useState } from '@wordpress/element';\nimport type { GridOverlayRenderProps } from './types';\nimport styles from './grid-overlay.module.css';\n\n/**\n * Default edit-mode overlay: one column per track, each holding `rows`\n * row-marker tiles when `rowHeight` is uniform. Used by both surfaces\n * and replaceable via `renderGridOverlay`. Reveals with a diagonal\n * wave on activate and releases paint cost while inactive.\n *\n * @param props Render props supplied by the surface.\n * @param props.columns Column tracks to mirror.\n * @param props.rowHeight Uniform row height in pixels; omitted for\n * content-sized rows, which skip row markers.\n * @param props.rows Row tracks per column; omitted when unknown.\n * @param props.isActive When `false`, the overlay fades out.\n */\nexport function GridOverlay( {\n\tcolumns,\n\trowHeight,\n\trows,\n\tisActive,\n}: GridOverlayRenderProps ) {\n\tconst showRows =\n\t\ttypeof rowHeight === 'number' && typeof rows === 'number' && rows > 0;\n\t// Bump the key when edit mode activates so CSS animations restart on\n\t// each enter (the overlay stays mounted across toggles).\n\tconst [ waveKey, setWaveKey ] = useState( 0 );\n\tuseEffect( () => {\n\t\tif ( isActive ) {\n\t\t\tsetWaveKey( ( key ) => key + 1 );\n\t\t}\n\t}, [ isActive ] );\n\tconst style: React.CSSProperties = {\n\t\tgridTemplateColumns: `repeat(${ columns }, minmax(0, 1fr))`,\n\t\t...( showRows\n\t\t\t? ( {\n\t\t\t\t\t'--wp-grid-overlay-row-height': `${ rowHeight }px`,\n\t\t\t\t} as React.CSSProperties )\n\t\t\t: {} ),\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tkey={ waveKey }\n\t\t\taria-hidden\n\t\t\tclassName={ clsx(\n\t\t\t\tstyles.overlay,\n\t\t\t\tisActive && styles[ 'is-active' ],\n\t\t\t\tshowRows && styles[ 'has-rows' ]\n\t\t\t) }\n\t\t\tstyle={ style }\n\t\t>\n\t\t\t{ Array.from( { length: columns }, ( _column, columnIndex ) => (\n\t\t\t\t<div\n\t\t\t\t\tkey={ columnIndex }\n\t\t\t\t\tclassName={ styles.column }\n\t\t\t\t\tstyle={\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'--wp-grid-overlay-column-index': columnIndex,\n\t\t\t\t\t\t\t'--wp-grid-overlay-row-index': 0,\n\t\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{ showRows &&\n\t\t\t\t\t\tArray.from( { length: rows }, ( _row, rowIndex ) => (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tkey={ rowIndex }\n\t\t\t\t\t\t\t\tclassName={ styles.row }\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'--wp-grid-overlay-row-index': rowIndex,\n\t\t\t\t\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) ) }\n\t\t\t\t</div>\n\t\t\t) ) }\n\t\t</div>\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(\"63c265b9f4\", \"._9d372b1b567c1c15__overlay{display:grid;gap:var(--wp-grid-gap,var(--wpds-dimension-gap-xl,24px));inset:0;opacity:0;pointer-events:none;position:absolute;visibility:hidden}._9d372b1b567c1c15__overlay.acb42ab28bd5e371__is-active{opacity:1;visibility:visible}@media not (prefers-reduced-motion){._9d372b1b567c1c15__overlay.acb42ab28bd5e371__is-active .d8e6ee9623aadacf__row,._9d372b1b567c1c15__overlay.acb42ab28bd5e371__is-active:not(._1cee1202cb622c6b__has-rows) ._04ff499ab60b4891__column{animation:_2d68e980e4534716__grid-overlay-tile-in var(--wpds-motion-duration-md,.2s) var(--wpds-motion-easing-subtle,cubic-bezier(.15,0,.15,1)) both;animation-delay:calc(var(--wp-grid-overlay-wave-delay-step, 28ms)*(var(--wp-grid-overlay-column-index, 0) + var(--wp-grid-overlay-row-index, 0)));opacity:0;transform:scale(.64)}@keyframes _2d68e980e4534716__grid-overlay-tile-in{to{opacity:1;transform:scale(1)}}._9d372b1b567c1c15__overlay:not(.acb42ab28bd5e371__is-active){transition:opacity var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-subtle,cubic-bezier(.15,0,.15,1)),visibility 0s linear var(--wpds-motion-duration-sm,.1s)}._9d372b1b567c1c15__overlay:not(.acb42ab28bd5e371__is-active) ._04ff499ab60b4891__column,._9d372b1b567c1c15__overlay:not(.acb42ab28bd5e371__is-active) .d8e6ee9623aadacf__row{animation:none;transform:none}}@media (prefers-reduced-motion:reduce){._9d372b1b567c1c15__overlay{transition:opacity var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-subtle,cubic-bezier(.15,0,.15,1)),visibility 0s linear var(--wpds-motion-duration-sm,.1s)}._9d372b1b567c1c15__overlay.acb42ab28bd5e371__is-active{transition:opacity var(--wpds-motion-duration-sm,.1s) var(--wpds-motion-easing-subtle,cubic-bezier(.15,0,.15,1)),visibility 0s linear 0s}}._04ff499ab60b4891__column{display:flex;flex-direction:column;gap:var(--wp-grid-gap,var(--wpds-dimension-gap-xl,24px));min-width:0}.d8e6ee9623aadacf__row{background-color:var(--wp-grid-overlay-tile-bg,var(--wpds-color-background-surface-neutral-weak,#f4f4f4));border-radius:var(--wpds-border-radius-lg,8px);box-sizing:border-box;flex:0 0 var(--wp-grid-overlay-row-height);height:var(--wp-grid-overlay-row-height)}\");\n}\nexport default {\"overlay\":\"_9d372b1b567c1c15__overlay\",\"is-active\":\"acb42ab28bd5e371__is-active\",\"row\":\"d8e6ee9623aadacf__row\",\"has-rows\":\"_1cee1202cb622c6b__has-rows\",\"column\":\"_04ff499ab60b4891__column\",\"grid-overlay-tile-in\":\"_2d68e980e4534716__grid-overlay-tile-in\"};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,qBAAoC;;;ACSpC,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,oB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