@activecollab/components 2.0.468 → 2.0.470

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 (34) hide show
  1. package/dist/cjs/components/StackedCard/StackedCard.js.map +1 -1
  2. package/dist/cjs/components/StackedCard/Styles.js.map +1 -1
  3. package/dist/cjs/components/StackedCard/resizePolicy.js +141 -60
  4. package/dist/cjs/components/StackedCard/resizePolicy.js.map +1 -1
  5. package/dist/cjs/components/StackedCard/resizePolicy.test.js +362 -15
  6. package/dist/cjs/components/StackedCard/resizePolicy.test.js.map +1 -1
  7. package/dist/cjs/components/StackedCard/useStackedCardResize.js +35 -14
  8. package/dist/cjs/components/StackedCard/useStackedCardResize.js.map +1 -1
  9. package/dist/cjs/presentation/shared/SourceCodeSection.js +88 -82
  10. package/dist/cjs/presentation/shared/SourceCodeSection.js.map +1 -1
  11. package/dist/esm/components/StackedCard/StackedCard.d.ts +5 -5
  12. package/dist/esm/components/StackedCard/StackedCard.d.ts.map +1 -1
  13. package/dist/esm/components/StackedCard/StackedCard.js.map +1 -1
  14. package/dist/esm/components/StackedCard/Styles.d.ts +2 -2
  15. package/dist/esm/components/StackedCard/Styles.d.ts.map +1 -1
  16. package/dist/esm/components/StackedCard/Styles.js.map +1 -1
  17. package/dist/esm/components/StackedCard/resizePolicy.d.ts +85 -40
  18. package/dist/esm/components/StackedCard/resizePolicy.d.ts.map +1 -1
  19. package/dist/esm/components/StackedCard/resizePolicy.js +139 -60
  20. package/dist/esm/components/StackedCard/resizePolicy.js.map +1 -1
  21. package/dist/esm/components/StackedCard/resizePolicy.test.js +359 -16
  22. package/dist/esm/components/StackedCard/resizePolicy.test.js.map +1 -1
  23. package/dist/esm/components/StackedCard/useStackedCardResize.d.ts +25 -13
  24. package/dist/esm/components/StackedCard/useStackedCardResize.d.ts.map +1 -1
  25. package/dist/esm/components/StackedCard/useStackedCardResize.js +35 -14
  26. package/dist/esm/components/StackedCard/useStackedCardResize.js.map +1 -1
  27. package/dist/esm/presentation/shared/SourceCodeSection.d.ts.map +1 -1
  28. package/dist/esm/presentation/shared/SourceCodeSection.js +88 -82
  29. package/dist/esm/presentation/shared/SourceCodeSection.js.map +1 -1
  30. package/dist/index.js +179 -74
  31. package/dist/index.js.map +1 -1
  32. package/dist/index.min.js +1 -1
  33. package/dist/index.min.js.map +1 -1
  34. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode } from "react";
2
- import { StackedCardResizeAxis, StackedCardResizeSource } from "./resizePolicy";
2
+ import { ResizeAxis, ResizeSource } from "./resizePolicy";
3
3
  /**
4
4
  * StackedCard — the hollow shell for cards on drag-and-drop surfaces.
5
5
  *
@@ -82,7 +82,7 @@ export interface IStackedCardProps extends Omit<React.HTMLAttributes<HTMLDivElem
82
82
  * handle for an auto-height card. Purely the affordance — what a delta means
83
83
  * is still the host's call. Defaults to `both`.
84
84
  */
85
- resizeAxis?: StackedCardResizeAxis;
85
+ resizeAxis?: ResizeAxis;
86
86
  /** Accessible name for the resize grip. Defaults to "Resize card". */
87
87
  resizeLabel?: string;
88
88
  /**
@@ -91,18 +91,18 @@ export interface IStackedCardProps extends Omit<React.HTMLAttributes<HTMLDivElem
91
91
  */
92
92
  priorityColor?: string;
93
93
  /** Fired once when a resize gesture begins, before the first delta. */
94
- onResizeStart?: (source: StackedCardResizeSource) => void;
94
+ onResizeStart?: (source: ResizeSource) => void;
95
95
  /**
96
96
  * Fired throughout a resize gesture with the delta measured FROM THE GESTURE
97
97
  * START — not from the previous event. The card reports; the host decides what
98
98
  * a delta means. Previews are live feedback, never an undoable change.
99
99
  */
100
- onResizeDelta?: (dx: number, dy: number, source: StackedCardResizeSource) => void;
100
+ onResizeDelta?: (dx: number, dy: number, source: ResizeSource) => void;
101
101
  /**
102
102
  * Fired once when the gesture ends (pointer up, lost pointer capture, key up),
103
103
  * and only if it moved the card. A bare click on the grip is not a change.
104
104
  */
105
- onResizeCommit?: (source: StackedCardResizeSource) => void;
105
+ onResizeCommit?: (source: ResizeSource) => void;
106
106
  /**
107
107
  * Props spread onto the grip, overriding the built-in behaviour entirely —
108
108
  * this is where `useStackedCardResize`'s return value goes when a host wants
@@ -1 +1 @@
1
- {"version":3,"file":"StackedCard.d.ts","sourceRoot":"","sources":["../../../../src/components/StackedCard/StackedCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAgB,SAAS,EAAuB,MAAM,OAAO,CAAC;AAM5E,OAAO,EAGL,qBAAqB,EACrB,uBAAuB,EAExB,MAAM,gBAAgB,CAAC;AAGxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC9D,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mFAAmF;IACnF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iEAAiE;IACjE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAC1D;;;;OAIG;IACH,aAAa,CAAC,EAAE,CACd,EAAE,EAAE,MAAM,EACV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EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAC/C;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IACvE;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAChD;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;IAC1D,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,WAAW,0FAwKvB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"StackedCard.js","names":["React","useCallback","useRef","classnames","STACKED_CARD_CONTROL_CLASS","StackedCardResizeHandleGlyph","DEFAULT_KEYBOARD_STEP","SHIFT_STEP_MULTIPLIER","isResizeKey","StyledStackedCard","StyledStackedCardResizeHandle","StackedCard","forwardRef","_ref","ref","selected","disabled","pending","isDragSource","isDragPreview","entered","forceHover","resizable","_ref$resizeAxis","resizeAxis","_ref$resizeLabel","resizeLabel","priorityColor","onResizeStart","onResizeDelta","onResizeCommit","resizeHandleProps","className","children","rest","_objectWithoutPropertiesLoose","_excluded","gesture","emitDelta","dx","dy","g","current","moved","source","endGesture","handlePointerDown","e","x","clientX","y","clientY","target","setPointerCapture","pointerId","preventDefault","handlePointerMove","handleKeyDown","step","shiftKey","key","handleKeyUp","createElement","_extends","$selected","$disabled","$pending","$isDragSource","$isDragPreview","$entered","$forceHover","$priorityColor","$axis","role","tabIndex","onPointerDown","onPointerMove","onPointerUp","onLostPointerCapture","onKeyDown","onKeyUp","displayName"],"sources":["../../../../src/components/StackedCard/StackedCard.tsx"],"sourcesContent":["import React, { ReactElement, ReactNode, useCallback, useRef } from \"react\";\n\nimport classnames from \"classnames\";\n\nimport { STACKED_CARD_CONTROL_CLASS } from \"./constants\";\nimport { StackedCardResizeHandleGlyph } from \"./Glyphs\";\nimport {\n DEFAULT_KEYBOARD_STEP,\n SHIFT_STEP_MULTIPLIER,\n StackedCardResizeAxis,\n StackedCardResizeSource,\n isResizeKey,\n} from \"./resizePolicy\";\nimport { StyledStackedCard, StyledStackedCardResizeHandle } from \"./Styles\";\n\n/**\n * StackedCard — the hollow shell for cards on drag-and-drop surfaces.\n *\n * This is NOT the base for cards in lists. It is the card for surfaces where\n * dragging is a primary interaction: column boards and canvases. Content is\n * laid out top to bottom in `StackedCardRow`s, which makes every card a\n * portrait presentation of its data.\n *\n * ── The rule the whole subsystem hangs on ──────────────────────────────────\n * THE SHELL STAYS HOLLOW. There is no `contentType` enum here, no per-type\n * prop soup, no `if task …`. The shell owns only VISUAL STATES (selected,\n * disabled, pending, priority, drag source/preview, entered) and one intent\n * callback (`onResizeDelta`). Content is passed as `children` and composes the\n * layout primitives. Typed cards — an ImageCard, a LinkCard, a TaskCard — are\n * facades built on top of it in the consuming app, and adding one requires\n * ZERO changes in this file.\n *\n * ── What the shell does NOT do ────────────────────────────────────────────\n * It implements no drag-and-drop, no selection bookkeeping, no resize policy\n * and no keyboard navigation. The card reports; the host decides. Drag\n * choreography (the drag layer, the landing indicator, the drop) belongs to\n * the host surface, which then feeds the result back as `isDragSource` /\n * `isDragPreview`. The shell forwards its ref and spreads DOM props, so a host\n * can attach `tabIndex`, ARIA, pointer and keyboard handlers to it.\n *\n * ── Resize ────────────────────────────────────────────────────────────────\n * The grip is opt-in (`resizable`) and reports intent as a gesture: one\n * `onResizeStart`, a stream of `onResizeDelta` previews measured FROM THE\n * GESTURE START, and one `onResizeCommit` at the end — and only if the gesture\n * moved anything. A host applies previews for live feedback and records an undo\n * entry on the commit alone (spec §7e).\n *\n * Because the deltas are gesture-relative rather than incremental, a host can\n * resolve every event against the size it snapshotted on start, and never has\n * to keep a running accumulator. That is what makes a slow, few-pixels-at-a-time\n * drag keep growing instead of stalling under a snap step.\n *\n * The grip itself is a focusable `role=\"separator\"` and handles arrow keys\n * (Shift for a coarse nudge). For the full policy — bounds, proportional mode,\n * step snapping, content minimums, Home/End and the live `aria-valuenow` — use\n * `useStackedCardResize` and spread its result through `resizeHandleProps`;\n * those handlers then own the grip and the three callbacks above stay quiet.\n *\n * ── Theming ───────────────────────────────────────────────────────────────\n * Colours resolve through `--sc-*` custom properties with built-in fallbacks:\n * `--sc-selection-ring` (selection / focus / entered) and the cover scrim\n * family `--sc-scrim`, `--sc-scrim-strong`, `--sc-scrim-fg`. Declare any of\n * them on an ancestor to retint a whole surface.\n */\n\nexport interface IStackedCardProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onResize\"> {\n /** Host-owned selection state — a ring around the card. */\n selected?: boolean;\n /** Policy state: the card cannot be acted on. Dimmed, inert. */\n disabled?: boolean;\n /**\n * Optimistic in-flight state — created or moved, not yet confirmed. Dimmed,\n * non-interactive and not draggable, but distinct from `disabled`: it is\n * transient, not a policy.\n */\n pending?: boolean;\n /**\n * The full-size outline placeholder left behind in the source position while\n * a drag is in flight. Content is hidden but keeps its box, so neighbouring\n * cards never move.\n */\n isDragSource?: boolean;\n /**\n * The 1:1 copy the host floats in its drag layer. Elevated shadow only — no\n * tilt, no scale, no translate.\n */\n isDragPreview?: boolean;\n /** Focus model: the card has been entered and focus is on an inner control. */\n entered?: boolean;\n /** Pin the hover treatment on, including revealed controls. For docs and specs. */\n forceHover?: boolean;\n /** Show the bottom-right resize grip. Opt-in, off by default. */\n resizable?: boolean;\n /**\n * Which axes the grip offers, as a cursor: `width` reads as a horizontal\n * handle for an auto-height card. Purely the affordance — what a delta means\n * is still the host's call. Defaults to `both`.\n */\n resizeAxis?: StackedCardResizeAxis;\n /** Accessible name for the resize grip. Defaults to \"Resize card\". */\n resizeLabel?: string;\n /**\n * Draws the emphasis border down the left edge. A data colour, passed in by\n * the caller (high priority, a label colour) — never baked into the shell.\n */\n priorityColor?: string;\n /** Fired once when a resize gesture begins, before the first delta. */\n onResizeStart?: (source: StackedCardResizeSource) => void;\n /**\n * Fired throughout a resize gesture with the delta measured FROM THE GESTURE\n * START — not from the previous event. The card reports; the host decides what\n * a delta means. Previews are live feedback, never an undoable change.\n */\n onResizeDelta?: (\n dx: number,\n dy: number,\n source: StackedCardResizeSource\n ) => void;\n /**\n * Fired once when the gesture ends (pointer up, lost pointer capture, key up),\n * and only if it moved the card. A bare click on the grip is not a change.\n */\n onResizeCommit?: (source: StackedCardResizeSource) => void;\n /**\n * Props spread onto the grip, overriding the built-in behaviour entirely —\n * this is where `useStackedCardResize`'s return value goes when a host wants\n * the full policy instead of raw deltas.\n */\n resizeHandleProps?: React.HTMLAttributes<HTMLSpanElement>;\n children: ReactNode;\n}\n\nexport const StackedCard = React.forwardRef<HTMLDivElement, IStackedCardProps>(\n (\n {\n selected,\n disabled,\n pending,\n isDragSource,\n isDragPreview,\n entered,\n forceHover,\n resizable,\n resizeAxis = \"both\",\n resizeLabel = \"Resize card\",\n priorityColor,\n onResizeStart,\n onResizeDelta,\n onResizeCommit,\n resizeHandleProps,\n className,\n children,\n ...rest\n },\n ref\n ): ReactElement => {\n /**\n * One live gesture. `x`/`y` anchor a pointer drag; `dx`/`dy` carry the\n * running total a keyboard gesture has nudged. `moved` gates the commit, so\n * a click that never travelled is not a change.\n */\n const gesture = useRef<{\n source: StackedCardResizeSource;\n x: number;\n y: number;\n dx: number;\n dy: number;\n moved: boolean;\n } | null>(null);\n\n const emitDelta = useCallback(\n (dx: number, dy: number) => {\n const g = gesture.current;\n if (!g) return;\n if (dx !== 0 || dy !== 0) g.moved = true;\n onResizeDelta?.(dx, dy, g.source);\n },\n [onResizeDelta]\n );\n\n const endGesture = useCallback(() => {\n const g = gesture.current;\n if (!g) return;\n gesture.current = null;\n if (g.moved) onResizeCommit?.(g.source);\n }, [onResizeCommit]);\n\n const handlePointerDown = useCallback(\n (e: React.PointerEvent) => {\n gesture.current = {\n source: \"pointer\",\n x: e.clientX,\n y: e.clientY,\n dx: 0,\n dy: 0,\n moved: false,\n };\n (e.target as HTMLElement).setPointerCapture?.(e.pointerId);\n e.preventDefault();\n onResizeStart?.(\"pointer\");\n },\n [onResizeStart]\n );\n\n const handlePointerMove = useCallback(\n (e: React.PointerEvent) => {\n const g = gesture.current;\n if (!g || g.source !== \"pointer\") return;\n // Measured from the gesture start, so the host resolves every event\n // against one snapshot instead of accumulating.\n emitDelta(e.clientX - g.x, e.clientY - g.y);\n },\n [emitDelta]\n );\n\n /**\n * Arrows nudge the running total; Shift makes it coarse. Home and End need\n * bounds to resolve, which the bare shell does not have — they fall through\n * to `useStackedCardResize`, or to the browser.\n */\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n const step =\n DEFAULT_KEYBOARD_STEP * (e.shiftKey ? SHIFT_STEP_MULTIPLIER : 1);\n let dx = 0;\n let dy = 0;\n\n if (e.key === \"ArrowRight\") dx = step;\n else if (e.key === \"ArrowLeft\") dx = -step;\n else if (e.key === \"ArrowDown\") dy = step;\n else if (e.key === \"ArrowUp\") dy = -step;\n else return;\n\n e.preventDefault();\n if (!gesture.current || gesture.current.source !== \"keyboard\") {\n gesture.current = {\n source: \"keyboard\",\n x: 0,\n y: 0,\n dx: 0,\n dy: 0,\n moved: false,\n };\n onResizeStart?.(\"keyboard\");\n }\n const g = gesture.current;\n g.dx += dx;\n g.dy += dy;\n emitDelta(g.dx, g.dy);\n },\n [emitDelta, onResizeStart]\n );\n\n const handleKeyUp = useCallback(\n (e: React.KeyboardEvent) => {\n // One commit per hold, mirroring pointer-up after a stream of moves.\n if (isResizeKey(e.key)) endGesture();\n },\n [endGesture]\n );\n\n return (\n <StyledStackedCard\n ref={ref}\n $selected={selected}\n $disabled={disabled}\n $pending={pending}\n $isDragSource={isDragSource}\n $isDragPreview={isDragPreview}\n $entered={entered}\n $forceHover={forceHover}\n $priorityColor={priorityColor}\n className={classnames(\"c-stacked-card\", className)}\n {...rest}\n >\n {children}\n {resizable ? (\n <StyledStackedCardResizeHandle\n $axis={resizeAxis}\n className={classnames(\n \"c-stacked-card__resize-handle\",\n STACKED_CARD_CONTROL_CLASS\n )}\n role=\"separator\"\n tabIndex={0}\n aria-label={resizeLabel}\n onPointerDown={handlePointerDown}\n onPointerMove={handlePointerMove}\n onPointerUp={endGesture}\n onLostPointerCapture={endGesture}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n {...resizeHandleProps}\n >\n <StackedCardResizeHandleGlyph />\n </StyledStackedCardResizeHandle>\n ) : null}\n </StyledStackedCard>\n );\n }\n);\n\nStackedCard.displayName = \"StackedCard\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAA6BC,WAAW,EAAEC,MAAM,QAAQ,OAAO;AAE3E,OAAOC,UAAU,MAAM,YAAY;AAEnC,SAASC,0BAA0B,QAAQ,aAAa;AACxD,SAASC,4BAA4B,QAAQ,UAAU;AACvD,SACEC,qBAAqB,EACrBC,qBAAqB,EAGrBC,WAAW,QACN,gBAAgB;AACvB,SAASC,iBAAiB,EAAEC,6BAA6B,QAAQ,UAAU;;AAE3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAsEA,OAAO,MAAMC,WAAW,gBAAGX,KAAK,CAACY,UAAU,CACzC,CAAAC,IAAA,EAqBEC,GAAG,KACc;EAAA,IApBfC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACRC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,OAAO,GAAAJ,IAAA,CAAPI,OAAO;IACPC,YAAY,GAAAL,IAAA,CAAZK,YAAY;IACZC,aAAa,GAAAN,IAAA,CAAbM,aAAa;IACbC,OAAO,GAAAP,IAAA,CAAPO,OAAO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EjD,QAAS;IACpBkD,QAAQ,EAAEjD,OAAQ;IAClBkD,aAAa,EAAEjD,YAAa;IAC5BkD,cAAc,EAAEjD,aAAc;IAC9BkD,QAAQ,EAAEjD,OAAQ;IAClBkD,WAAW,EAAEjD,UAAW;IACxBkD,cAAc,EAAE5C,aAAc;IAC9BK,SAAS,EAAE7B,UAAU,CAAC,gBAAgB,EAAE6B,SAAS;EAAE,GAC/CE,IAAI,GAEPD,QAAQ,EACRX,SAAS,gBACRtB,KAAA,CAAA8D,aAAA,CAACpD,6BAA6B,EAAAqD,QAAA;IAC5BS,KAAK,EAAEhD,UAAW;IAClBQ,SAAS,EAAE7B,UAAU,CACnB,+BAA+B,EAC/BC,0BACF,CAAE;IACFqE,IAAI,EAAC,WAAW;IAChBC,QAAQ,EAAE,CAAE;IACZ,cAAYhD,WAAY;IACxBiD,aAAa,EAAE7B,iBAAkB;IACjC8B,aAAa,EAAEpB,iBAAkB;IACjCqB,WAAW,EAAEhC,UAAW;IACxBiC,oBAAoB,EAAEjC,UAAW;IACjCkC,SAAS,EAAEtB,aAAc;IACzBuB,OAAO,EAAEnB;EAAY,GACjB9B,iBAAiB,gBAErB/B,KAAA,CAAA8D,aAAA,CAACzD,4BAA4B,MAAE,CACF,CAAC,GAC9B,IACa,CAAC;AAExB,CACF,CAAC;AAEDM,WAAW,CAACsE,WAAW,GAAG,aAAa","ignoreList":[]}
1
+ {"version":3,"file":"StackedCard.js","names":["React","useCallback","useRef","classnames","STACKED_CARD_CONTROL_CLASS","StackedCardResizeHandleGlyph","DEFAULT_KEYBOARD_STEP","SHIFT_STEP_MULTIPLIER","isResizeKey","StyledStackedCard","StyledStackedCardResizeHandle","StackedCard","forwardRef","_ref","ref","selected","disabled","pending","isDragSource","isDragPreview","entered","forceHover","resizable","_ref$resizeAxis","resizeAxis","_ref$resizeLabel","resizeLabel","priorityColor","onResizeStart","onResizeDelta","onResizeCommit","resizeHandleProps","className","children","rest","_objectWithoutPropertiesLoose","_excluded","gesture","emitDelta","dx","dy","g","current","moved","source","endGesture","handlePointerDown","e","x","clientX","y","clientY","target","setPointerCapture","pointerId","preventDefault","handlePointerMove","handleKeyDown","step","shiftKey","key","handleKeyUp","createElement","_extends","$selected","$disabled","$pending","$isDragSource","$isDragPreview","$entered","$forceHover","$priorityColor","$axis","role","tabIndex","onPointerDown","onPointerMove","onPointerUp","onLostPointerCapture","onKeyDown","onKeyUp","displayName"],"sources":["../../../../src/components/StackedCard/StackedCard.tsx"],"sourcesContent":["import React, { ReactElement, ReactNode, useCallback, useRef } from \"react\";\n\nimport classnames from \"classnames\";\n\nimport { STACKED_CARD_CONTROL_CLASS } from \"./constants\";\nimport { StackedCardResizeHandleGlyph } from \"./Glyphs\";\nimport {\n DEFAULT_KEYBOARD_STEP,\n SHIFT_STEP_MULTIPLIER,\n ResizeAxis,\n ResizeSource,\n isResizeKey,\n} from \"./resizePolicy\";\nimport { StyledStackedCard, StyledStackedCardResizeHandle } from \"./Styles\";\n\n/**\n * StackedCard — the hollow shell for cards on drag-and-drop surfaces.\n *\n * This is NOT the base for cards in lists. It is the card for surfaces where\n * dragging is a primary interaction: column boards and canvases. Content is\n * laid out top to bottom in `StackedCardRow`s, which makes every card a\n * portrait presentation of its data.\n *\n * ── The rule the whole subsystem hangs on ──────────────────────────────────\n * THE SHELL STAYS HOLLOW. There is no `contentType` enum here, no per-type\n * prop soup, no `if task …`. The shell owns only VISUAL STATES (selected,\n * disabled, pending, priority, drag source/preview, entered) and one intent\n * callback (`onResizeDelta`). Content is passed as `children` and composes the\n * layout primitives. Typed cards — an ImageCard, a LinkCard, a TaskCard — are\n * facades built on top of it in the consuming app, and adding one requires\n * ZERO changes in this file.\n *\n * ── What the shell does NOT do ────────────────────────────────────────────\n * It implements no drag-and-drop, no selection bookkeeping, no resize policy\n * and no keyboard navigation. The card reports; the host decides. Drag\n * choreography (the drag layer, the landing indicator, the drop) belongs to\n * the host surface, which then feeds the result back as `isDragSource` /\n * `isDragPreview`. The shell forwards its ref and spreads DOM props, so a host\n * can attach `tabIndex`, ARIA, pointer and keyboard handlers to it.\n *\n * ── Resize ────────────────────────────────────────────────────────────────\n * The grip is opt-in (`resizable`) and reports intent as a gesture: one\n * `onResizeStart`, a stream of `onResizeDelta` previews measured FROM THE\n * GESTURE START, and one `onResizeCommit` at the end — and only if the gesture\n * moved anything. A host applies previews for live feedback and records an undo\n * entry on the commit alone (spec §7e).\n *\n * Because the deltas are gesture-relative rather than incremental, a host can\n * resolve every event against the size it snapshotted on start, and never has\n * to keep a running accumulator. That is what makes a slow, few-pixels-at-a-time\n * drag keep growing instead of stalling under a snap step.\n *\n * The grip itself is a focusable `role=\"separator\"` and handles arrow keys\n * (Shift for a coarse nudge). For the full policy — bounds, proportional mode,\n * step snapping, content minimums, Home/End and the live `aria-valuenow` — use\n * `useStackedCardResize` and spread its result through `resizeHandleProps`;\n * those handlers then own the grip and the three callbacks above stay quiet.\n *\n * ── Theming ───────────────────────────────────────────────────────────────\n * Colours resolve through `--sc-*` custom properties with built-in fallbacks:\n * `--sc-selection-ring` (selection / focus / entered) and the cover scrim\n * family `--sc-scrim`, `--sc-scrim-strong`, `--sc-scrim-fg`. Declare any of\n * them on an ancestor to retint a whole surface.\n */\n\nexport interface IStackedCardProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onResize\"> {\n /** Host-owned selection state — a ring around the card. */\n selected?: boolean;\n /** Policy state: the card cannot be acted on. Dimmed, inert. */\n disabled?: boolean;\n /**\n * Optimistic in-flight state — created or moved, not yet confirmed. Dimmed,\n * non-interactive and not draggable, but distinct from `disabled`: it is\n * transient, not a policy.\n */\n pending?: boolean;\n /**\n * The full-size outline placeholder left behind in the source position while\n * a drag is in flight. Content is hidden but keeps its box, so neighbouring\n * cards never move.\n */\n isDragSource?: boolean;\n /**\n * The 1:1 copy the host floats in its drag layer. Elevated shadow only — no\n * tilt, no scale, no translate.\n */\n isDragPreview?: boolean;\n /** Focus model: the card has been entered and focus is on an inner control. */\n entered?: boolean;\n /** Pin the hover treatment on, including revealed controls. For docs and specs. */\n forceHover?: boolean;\n /** Show the bottom-right resize grip. Opt-in, off by default. */\n resizable?: boolean;\n /**\n * Which axes the grip offers, as a cursor: `width` reads as a horizontal\n * handle for an auto-height card. Purely the affordance — what a delta means\n * is still the host's call. Defaults to `both`.\n */\n resizeAxis?: ResizeAxis;\n /** Accessible name for the resize grip. Defaults to \"Resize card\". */\n resizeLabel?: string;\n /**\n * Draws the emphasis border down the left edge. A data colour, passed in by\n * the caller (high priority, a label colour) — never baked into the shell.\n */\n priorityColor?: string;\n /** Fired once when a resize gesture begins, before the first delta. */\n onResizeStart?: (source: ResizeSource) => void;\n /**\n * Fired throughout a resize gesture with the delta measured FROM THE GESTURE\n * START — not from the previous event. The card reports; the host decides what\n * a delta means. Previews are live feedback, never an undoable change.\n */\n onResizeDelta?: (dx: number, dy: number, source: ResizeSource) => void;\n /**\n * Fired once when the gesture ends (pointer up, lost pointer capture, key up),\n * and only if it moved the card. A bare click on the grip is not a change.\n */\n onResizeCommit?: (source: ResizeSource) => void;\n /**\n * Props spread onto the grip, overriding the built-in behaviour entirely —\n * this is where `useStackedCardResize`'s return value goes when a host wants\n * the full policy instead of raw deltas.\n */\n resizeHandleProps?: React.HTMLAttributes<HTMLSpanElement>;\n children: ReactNode;\n}\n\nexport const StackedCard = React.forwardRef<HTMLDivElement, IStackedCardProps>(\n (\n {\n selected,\n disabled,\n pending,\n isDragSource,\n isDragPreview,\n entered,\n forceHover,\n resizable,\n resizeAxis = \"both\",\n resizeLabel = \"Resize card\",\n priorityColor,\n onResizeStart,\n onResizeDelta,\n onResizeCommit,\n resizeHandleProps,\n className,\n children,\n ...rest\n },\n ref\n ): ReactElement => {\n /**\n * One live gesture. `x`/`y` anchor a pointer drag; `dx`/`dy` carry the\n * running total a keyboard gesture has nudged. `moved` gates the commit, so\n * a click that never travelled is not a change.\n */\n const gesture = useRef<{\n source: ResizeSource;\n x: number;\n y: number;\n dx: number;\n dy: number;\n moved: boolean;\n } | null>(null);\n\n const emitDelta = useCallback(\n (dx: number, dy: number) => {\n const g = gesture.current;\n if (!g) return;\n if (dx !== 0 || dy !== 0) g.moved = true;\n onResizeDelta?.(dx, dy, g.source);\n },\n [onResizeDelta]\n );\n\n const endGesture = useCallback(() => {\n const g = gesture.current;\n if (!g) return;\n gesture.current = null;\n if (g.moved) onResizeCommit?.(g.source);\n }, [onResizeCommit]);\n\n const handlePointerDown = useCallback(\n (e: React.PointerEvent) => {\n gesture.current = {\n source: \"pointer\",\n x: e.clientX,\n y: e.clientY,\n dx: 0,\n dy: 0,\n moved: false,\n };\n (e.target as HTMLElement).setPointerCapture?.(e.pointerId);\n e.preventDefault();\n onResizeStart?.(\"pointer\");\n },\n [onResizeStart]\n );\n\n const handlePointerMove = useCallback(\n (e: React.PointerEvent) => {\n const g = gesture.current;\n if (!g || g.source !== \"pointer\") return;\n // Measured from the gesture start, so the host resolves every event\n // against one snapshot instead of accumulating.\n emitDelta(e.clientX - g.x, e.clientY - g.y);\n },\n [emitDelta]\n );\n\n /**\n * Arrows nudge the running total; Shift makes it coarse. Home and End need\n * bounds to resolve, which the bare shell does not have — they fall through\n * to `useStackedCardResize`, or to the browser.\n */\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n const step =\n DEFAULT_KEYBOARD_STEP * (e.shiftKey ? SHIFT_STEP_MULTIPLIER : 1);\n let dx = 0;\n let dy = 0;\n\n if (e.key === \"ArrowRight\") dx = step;\n else if (e.key === \"ArrowLeft\") dx = -step;\n else if (e.key === \"ArrowDown\") dy = step;\n else if (e.key === \"ArrowUp\") dy = -step;\n else return;\n\n e.preventDefault();\n if (!gesture.current || gesture.current.source !== \"keyboard\") {\n gesture.current = {\n source: \"keyboard\",\n x: 0,\n y: 0,\n dx: 0,\n dy: 0,\n moved: false,\n };\n onResizeStart?.(\"keyboard\");\n }\n const g = gesture.current;\n g.dx += dx;\n g.dy += dy;\n emitDelta(g.dx, g.dy);\n },\n [emitDelta, onResizeStart]\n );\n\n const handleKeyUp = useCallback(\n (e: React.KeyboardEvent) => {\n // One commit per hold, mirroring pointer-up after a stream of moves.\n if (isResizeKey(e.key)) endGesture();\n },\n [endGesture]\n );\n\n return (\n <StyledStackedCard\n ref={ref}\n $selected={selected}\n $disabled={disabled}\n $pending={pending}\n $isDragSource={isDragSource}\n $isDragPreview={isDragPreview}\n $entered={entered}\n $forceHover={forceHover}\n $priorityColor={priorityColor}\n className={classnames(\"c-stacked-card\", className)}\n {...rest}\n >\n {children}\n {resizable ? (\n <StyledStackedCardResizeHandle\n $axis={resizeAxis}\n className={classnames(\n \"c-stacked-card__resize-handle\",\n STACKED_CARD_CONTROL_CLASS\n )}\n role=\"separator\"\n tabIndex={0}\n aria-label={resizeLabel}\n onPointerDown={handlePointerDown}\n onPointerMove={handlePointerMove}\n onPointerUp={endGesture}\n onLostPointerCapture={endGesture}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n {...resizeHandleProps}\n >\n <StackedCardResizeHandleGlyph />\n </StyledStackedCardResizeHandle>\n ) : null}\n </StyledStackedCard>\n );\n }\n);\n\nStackedCard.displayName = \"StackedCard\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAA6BC,WAAW,EAAEC,MAAM,QAAQ,OAAO;AAE3E,OAAOC,UAAU,MAAM,YAAY;AAEnC,SAASC,0BAA0B,QAAQ,aAAa;AACxD,SAASC,4BAA4B,QAAQ,UAAU;AACvD,SACEC,qBAAqB,EACrBC,qBAAqB,EAGrBC,WAAW,QACN,gBAAgB;AACvB,SAASC,iBAAiB,EAAEC,6BAA6B,QAAQ,UAAU;;AAE3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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edCardRowDirection, StackedCardRowRole } from "./constants";
2
- import { StackedCardResizeAxis } from "./resizePolicy";
2
+ import { ResizeAxis } from "./resizePolicy";
3
3
  export declare const StyledStackedCardStack: import("styled-components").StyledComponent<"div", any, {}, never>;
4
4
  interface IStyledRowProps {
5
5
  $role: StackedCardRowRole;
@@ -32,7 +32,7 @@ export declare const StyledStackedCardPlayBadge: import("styled-components").Sty
32
32
  /** Top-right cover-management button (collapse, remove …). */
33
33
  export declare const StyledStackedCardCoverButton: import("styled-components").StyledComponent<"button", any, {}, never>;
34
34
  export declare const StyledStackedCardResizeHandle: import("styled-components").StyledComponent<"span", any, {
35
- $axis: StackedCardResizeAxis;
35
+ $axis: ResizeAxis;
36
36
  }, never>;
37
37
  export interface IStyledStackedCardProps {
38
38
  $selected?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/StackedCard/Styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAML,uBAAuB,EACvB,kBAAkB,EACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAwCvD,eAAO,MAAM,sBAAsB,oEAMlC,CAAC;AAOF,UAAU,eAAe;IACvB,KAAK,EAAE,kBAAkB,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,uBAAuB,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,oBAAoB,iFAkChC,CAAC;AAOF;;;GAGG;AACH,eAAO,MAAM,2BAA2B;kBAA8B,MAAM;SAO3E,CAAC;AAKF,eAAO,MAAM,0BAA0B,oEAyBtC,CAAC;AAGF,eAAO,MAAM,4BAA4B,oEAMxC,CAAC;AAGF,eAAO,MAAM,8BAA8B,oEAM1C,CAAC;AAGF;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,uEA2B3C,CAAC;AAKF,eAAO,MAAM,4BAA4B,q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B3C,CAAC;AAKF,eAAO,MAAM,4BAA4B,qEAcxC,CAAC;AAOF,iFAAiF;AACjF,eAAO,MAAM,0BAA0B,qEAgBtC,CAAC;AAGF,8DAA8D;AAC9D,eAAO,MAAM,4BAA4B,uEAwBxC,CAAC;AASF,eAAO,MAAM,6BAA6B;WACjC,UAAU;SA4BlB,CAAC;AAOF,MAAM,WAAW,uBAAuB;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAOD,eAAO,MAAM,iBAAiB,yFA2H7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Styles.js","names":["styled","css","STACKED_CARD_CONTROL_CLASS","STACKED_CARD_FIXED_ATTR","STACKED_CARD_RADIUS","STACKED_CARD_ROLE_PADDING","STACKED_CARD_WIDTH","BoxSizingStyle","SELECTION_RING","SCRIM","SCRIM_STRONG","SCRIM_FG","CONTROL","revealControls","StyledStackedCardStack","div","withConfig","displayName","componentId","StyledStackedCardRow","_ref","$direction","_ref2","_ref3","_ref4","$role","$bleed","_ref5","$background","_ref6","StyledStackedCardCoverMedia","_ref7","$aspectRatio","StyledStackedCardCoverFill","StyledStackedCardCoverCenter","StyledStackedCardCoverTopRight","StyledStackedCardCollapsedStrip","button","StyledStackedCardStripExpand","span","StyledStackedCardPlayBadge","StyledStackedCardCoverButton","StyledStackedCardResizeHandle","_ref8","$axis","hoverStyle","StyledStackedCard","_ref9","$forceHover","_ref0","$priorityColor","_ref1","$selected","_ref10","$disabled","_ref11","$pending","_ref12","$isDragSource","_ref13","$isDragPreview","_ref14","$entered"],"sources":["../../../../src/components/StackedCard/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport {\n STACKED_CARD_CONTROL_CLASS,\n STACKED_CARD_FIXED_ATTR,\n STACKED_CARD_RADIUS,\n STACKED_CARD_ROLE_PADDING,\n STACKED_CARD_WIDTH,\n StackedCardRowDirection,\n StackedCardRowRole,\n} from \"./constants\";\nimport { StackedCardResizeAxis } from \"./resizePolicy\";\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\n\n/**\n * Theming hooks.\n *\n * Every colour a StackedCard part needs is read through a `--sc-*` custom\n * property with a built-in fallback, so the component looks right standing on\n * its own and a host surface can still retint it by declaring the variable on\n * any ancestor. No rgba/hex is baked into a rule; data colours (a swatch value,\n * a priority colour) are always passed in by the caller.\n */\nconst SELECTION_RING = \"var(--sc-selection-ring, var(--color-primary-500))\";\nconst SCRIM = \"var(--sc-scrim, rgba(0, 0, 0, 0.55))\";\nconst SCRIM_STRONG = \"var(--sc-scrim-strong, rgba(0, 0, 0, 0.72))\";\nconst SCRIM_FG = \"var(--sc-scrim-fg, #ffffff)\";\n\n/** Selector for anything carrying the control class. */\nconst CONTROL = `.${STACKED_CARD_CONTROL_CLASS}`;\n\n/**\n * The one reveal rule the whole subsystem shares: controls are hidden until the\n * card (or the cover) is hovered OR holds focus. The focus path is what keeps\n * them reachable by keyboard instead of mouse-only.\n */\nconst revealControls = css`\n ${CONTROL} {\n opacity: 0;\n transition: opacity 120ms ease;\n }\n\n &:hover ${CONTROL}, &:focus-within ${CONTROL} {\n opacity: 1;\n }\n`;\n\n/* ------------------------------------------------------------------ */\n/* Stack — the vertical column. A card is a Stack of rows. */\n/* ------------------------------------------------------------------ */\n\nexport const StyledStackedCardStack = styled.div`\n ${BoxSizingStyle}\n\n position: relative;\n display: flex;\n flex-direction: column;\n`;\nStyledStackedCardStack.displayName = \"StyledStackedCardStack\";\n\n/* ------------------------------------------------------------------ */\n/* Row — the only layout primitive, differentiated by `role`. */\n/* ------------------------------------------------------------------ */\n\ninterface IStyledRowProps {\n $role: StackedCardRowRole;\n $bleed?: boolean;\n $direction: StackedCardRowDirection;\n $background?: string;\n}\n\nexport const StyledStackedCardRow = styled.div<IStyledRowProps>`\n ${BoxSizingStyle}\n\n position: relative;\n display: flex;\n flex-direction: ${({ $direction }) => $direction};\n align-items: ${({ $direction }) =>\n $direction === \"column\" ? \"stretch\" : \"center\"};\n gap: ${({ $direction }) => ($direction === \"column\" ? \"4px\" : \"8px\")};\n\n /* bleed overrides any role and runs the row edge to edge. */\n padding: ${({ $role, $bleed }) =>\n $bleed ? \"0\" : STACKED_CARD_ROLE_PADDING[$role]};\n\n ${({ $background }) =>\n $background &&\n css`\n background: ${$background};\n `}\n\n /* Distribution (row direction only): fixed-width children keep their width,\n the rest share what remains evenly; drop an empty spacer to push items. */\n ${({ $direction }) =>\n $direction === \"row\" &&\n css`\n > * {\n flex: 1 1 0;\n min-width: 0;\n }\n\n > [${STACKED_CARD_FIXED_ATTR}] {\n flex: 0 0 auto;\n }\n `}\n`;\nStyledStackedCardRow.displayName = \"StyledStackedCardRow\";\n\n/* ------------------------------------------------------------------ */\n/* Cover — a bleed row that holds media. */\n/* ------------------------------------------------------------------ */\n\n/**\n * The media box reserves its height with `aspect-ratio` so the image (or the\n * skeleton standing in for it) never reflows the card when it arrives.\n */\nexport const StyledStackedCardCoverMedia = styled.div<{ $aspectRatio: string }>`\n position: relative;\n width: 100%;\n aspect-ratio: ${({ $aspectRatio }) => $aspectRatio};\n overflow: hidden;\n\n ${revealControls}\n`;\nStyledStackedCardCoverMedia.displayName = \"StyledStackedCardCoverMedia\";\n\n/* The fill (an <img>, an inline <svg> wrapper, or a solid-colour box) is laid\n over the reserved box and made to cover it. */\nexport const StyledStackedCardCoverFill = styled.div`\n position: absolute;\n inset: 0;\n\n > * {\n width: 100%;\n height: 100%;\n }\n\n > img {\n display: block;\n object-fit: cover;\n }\n\n /* Media must never be natively draggable. An <img> is a browser drag source\n by default, so grabbing the cover would start an image drag and swallow the\n mousemove/mouseup the HOST's drag depends on — the card would stay put and\n then jump on the next pointer move. The host owns dragging; the cover must\n not compete with it. */\n > img,\n > svg {\n -webkit-user-drag: none;\n user-select: none;\n pointer-events: none;\n }\n`;\nStyledStackedCardCoverFill.displayName = \"StyledStackedCardCoverFill\";\n\nexport const StyledStackedCardCoverCenter = styled.div`\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\nStyledStackedCardCoverCenter.displayName = \"StyledStackedCardCoverCenter\";\n\nexport const StyledStackedCardCoverTopRight = styled.div`\n position: absolute;\n top: 8px;\n right: 8px;\n display: flex;\n gap: 6px;\n`;\nStyledStackedCardCoverTopRight.displayName = \"StyledStackedCardCoverTopRight\";\n\n/**\n * Collapsed cover — the media box gives way to a thin strip. The strip IS the\n * expand affordance: the whole bar is a button and a chevron hint is revealed\n * on hover or focus. It reserves no height of its own; the caller's\n * `collapsedStrip` (an ~8px colour bar, a favicon + domain row) sets how tall\n * it reads.\n */\nexport const StyledStackedCardCollapsedStrip = styled.button`\n ${BoxSizingStyle}\n\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-height: 16px;\n padding: 0;\n border: 0;\n background: transparent;\n cursor: pointer;\n text-align: left;\n\n ${CONTROL} {\n opacity: 0;\n transition: opacity 120ms ease;\n }\n\n &:hover ${CONTROL}, &:focus-visible ${CONTROL} {\n opacity: 1;\n }\n\n &:focus-visible {\n outline: 2px solid ${SELECTION_RING};\n outline-offset: -2px;\n }\n`;\nStyledStackedCardCollapsedStrip.displayName = \"StyledStackedCardCollapsedStrip\";\n\n/* The expand chevron sits at the right, vertically centred, so it reads the\n same whether the strip is a hairline colour bar or a taller favicon row. */\nexport const StyledStackedCardStripExpand = styled.span`\n position: absolute;\n top: 50%;\n right: 8px;\n transform: translateY(-50%);\n display: inline-flex;\n width: 16px;\n height: 16px;\n color: var(--color-theme-600);\n\n svg {\n width: 14px;\n height: 14px;\n }\n`;\nStyledStackedCardStripExpand.displayName = \"StyledStackedCardStripExpand\";\n\n/* ------------------------------------------------------------------ */\n/* Cover chrome — scrim-backed controls that sit over media */\n/* ------------------------------------------------------------------ */\n\n/** Centered media control (a play button). The caller drops the glyph inside. */\nexport const StyledStackedCardPlayBadge = styled.span`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 44px;\n height: 44px;\n border-radius: 12px;\n background: ${SCRIM};\n color: ${SCRIM_FG};\n\n svg {\n fill: currentColor;\n width: 20px;\n height: 20px;\n margin-left: 2px;\n }\n`;\nStyledStackedCardPlayBadge.displayName = \"StyledStackedCardPlayBadge\";\n\n/** Top-right cover-management button (collapse, remove …). */\nexport const StyledStackedCardCoverButton = styled.button`\n ${BoxSizingStyle}\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n padding: 0;\n border: 0;\n border-radius: 8px;\n cursor: pointer;\n color: ${SCRIM_FG};\n background: ${SCRIM};\n\n svg {\n width: 16px;\n height: 16px;\n display: block;\n }\n\n &:hover {\n background: ${SCRIM_STRONG};\n }\n`;\nStyledStackedCardCoverButton.displayName = \"StyledStackedCardCoverButton\";\n\n/* ------------------------------------------------------------------ */\n/* Resize (opt-in): handle on hover, the card only reports deltas */\n/* ------------------------------------------------------------------ */\n\n/* The grip is a focusable separator, so it needs a focus ring of its own — a\n keyboard user has no pointer to tell them where they are. */\nexport const StyledStackedCardResizeHandle = styled.span<{\n $axis: StackedCardResizeAxis;\n}>`\n position: absolute;\n right: 2px;\n bottom: 2px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 14px;\n height: 14px;\n border-radius: 4px;\n cursor: ${({ $axis }) => ($axis === \"width\" ? \"ew-resize\" : \"nwse-resize\")};\n color: var(--color-theme-600);\n z-index: 2;\n\n &:hover {\n color: var(--color-theme-900);\n }\n\n &:focus-visible {\n outline: 2px solid ${SELECTION_RING};\n outline-offset: 1px;\n color: var(--color-theme-900);\n }\n\n svg {\n display: block;\n }\n`;\nStyledStackedCardResizeHandle.displayName = \"StyledStackedCardResizeHandle\";\n\n/* ------------------------------------------------------------------ */\n/* The shell */\n/* ------------------------------------------------------------------ */\n\nexport interface IStyledStackedCardProps {\n $selected?: boolean;\n $disabled?: boolean;\n $pending?: boolean;\n $isDragSource?: boolean;\n $isDragPreview?: boolean;\n $entered?: boolean;\n $forceHover?: boolean;\n $priorityColor?: string;\n}\n\nconst hoverStyle = css`\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);\n border-color: var(--color-theme-500);\n`;\n\nexport const StyledStackedCard = styled.div<IStyledStackedCardProps>`\n ${BoxSizingStyle}\n\n position: relative;\n display: flex;\n flex-direction: column;\n width: ${STACKED_CARD_WIDTH}px;\n border-radius: ${STACKED_CARD_RADIUS}px;\n background-color: var(--page-paper-main);\n border: 1px solid var(--border-primary);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n overflow: hidden;\n transition: box-shadow 150ms ease, border-color 150ms ease;\n\n ${revealControls}\n\n &:hover {\n ${hoverStyle}\n }\n\n &:focus-visible {\n outline: none;\n ${hoverStyle}\n box-shadow: 0 0 0 2px ${SELECTION_RING};\n }\n\n /* Forced hover — for docs, snapshots and \"this is what hover looks like\"\n demos. The doubled ampersand gives it the specificity to beat the cover's\n own reveal rule. */\n ${({ $forceHover }) =>\n $forceHover &&\n css`\n ${hoverStyle}\n && ${CONTROL} {\n opacity: 1;\n }\n `}\n\n ${({ $priorityColor }) =>\n $priorityColor &&\n css`\n &::before {\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n width: 4px;\n background: ${$priorityColor};\n z-index: 2;\n }\n `}\n\n /* Selection outranks hover: a selected card must keep its ring while the\n pointer is over it — which, right after the click that selected it, is\n always. The doubled ampersand buys the specificity to beat the hover rule\n above (same reason the entered state below does it). */\n ${({ $selected }) =>\n $selected &&\n css`\n && {\n border-color: ${SELECTION_RING};\n box-shadow: 0 0 0 2px ${SELECTION_RING};\n }\n `}\n\n ${({ $disabled }) =>\n $disabled &&\n css`\n opacity: 0.5;\n pointer-events: none;\n `}\n\n /* Pending / optimistic — created or moved, not yet confirmed by the server.\n Dimmed, non-interactive and NOT draggable, but distinct from disabled: a\n transient in-flight state, not a policy. */\n ${({ $pending }) =>\n $pending &&\n css`\n opacity: 0.6;\n pointer-events: none;\n cursor: progress;\n `}\n\n /* Drag SOURCE — full-size outline placeholder. Content is hidden but keeps\n its box (visibility, not display) so the card holds identical dimensions\n and the surrounding cards never move. */\n ${({ $isDragSource }) =>\n $isDragSource &&\n css`\n background: transparent;\n border: 1px dashed var(--color-theme-500);\n box-shadow: none;\n\n &:hover {\n box-shadow: none;\n border-color: var(--color-theme-500);\n }\n\n > * {\n visibility: hidden;\n }\n `}\n\n /* Drag PREVIEW — the 1:1 copy the host floats in its drag layer. Elevated\n shadow ONLY: no rotate, no scale, no translate. */\n ${({ $isDragPreview }) =>\n $isDragPreview &&\n css`\n box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);\n cursor: grabbing;\n `}\n\n /* Entered (focus model) — focus has moved inside, onto an inner control. */\n ${({ $entered }) =>\n $entered &&\n css`\n && {\n border-color: ${SELECTION_RING};\n box-shadow: inset 0 0 0 2px ${SELECTION_RING},\n 0 0 0 2px ${SELECTION_RING};\n }\n `}\n`;\nStyledStackedCard.displayName = \"StyledStackedCard\";\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAE/C,SACEC,0BAA0B,EAC1BC,uBAAuB,EACvBC,mBAAmB,EACnBC,yBAAyB,EACzBC,kBAAkB,QAGb,aAAa;AAEpB,SAASC,cAAc,QAAQ,mBAAmB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAG,oDAAoD;AAC3E,MAAMC,KAAK,GAAG,sCAAsC;AACpD,MAAMC,YAAY,GAAG,6CAA6C;AAClE,MAAMC,QAAQ,GAAG,6BAA6B;;AAE9C;AACA,MAAMC,OAAO,SAAOV,0BAA4B;;AAEhD;AACA;AAC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,KAAA,CAATC,SAAS;EAAA,OACZA,SAAS,IACTnD,GAAG,uDAEiBO,cAAc,EACNA,cAAc,CAEzC;AAAA,GAED6C,MAAA;EAAA,IAAGC,SAAS,GAAAD,MAAA,CAATC,SAAS;EAAA,OACZA,SAAS,IACTrD,GAAG,sCAGF;AAAA,GAKDsD,MAAA;EAAA,IAAGC,QAAQ,GAAAD,MAAA,CAARC,QAAQ;EAAA,OACXA,QAAQ,IACRvD,GAAG,sDAIF;AAAA,GAKDwD,MAAA;EAAA,IAAGC,aAAa,GAAAD,MAAA,CAAbC,aAAa;EAAA,OAChBA,aAAa,IACbzD,GAAG,0KAaF;AAAA,GAID0D,MAAA;EAAA,IAAGC,cAAc,GAAAD,MAAA,CAAdC,cAAc;EAAA,OACjBA,cAAc,IACd3D,GAAG,8DAGF;AAAA,GAGD4D,MAAA;EAAA,IAAGC,QAAQ,GAAAD,MAAA,CAARC,QAAQ;EAAA,OACXA,QAAQ,IACR7D,GAAG,4EAEiBO,cAAc,EACAA,cAAc,EAC9BA,cAAc,CAE/B;AAAA,EACJ;AACDsC,iBAAiB,CAAC7B,WAAW,GAAG,mBAAmB","ignoreList":[]}
1
+ {"version":3,"file":"Styles.js","names":["styled","css","STACKED_CARD_CONTROL_CLASS","STACKED_CARD_FIXED_ATTR","STACKED_CARD_RADIUS","STACKED_CARD_ROLE_PADDING","STACKED_CARD_WIDTH","BoxSizingStyle","SELECTION_RING","SCRIM","SCRIM_STRONG","SCRIM_FG","CONTROL","revealControls","StyledStackedCardStack","div","withConfig","displayName","componentId","StyledStackedCardRow","_ref","$direction","_ref2","_ref3","_ref4","$role","$bleed","_ref5","$background","_ref6","StyledStackedCardCoverMedia","_ref7","$aspectRatio","StyledStackedCardCoverFill","StyledStackedCardCoverCenter","StyledStackedCardCoverTopRight","StyledStackedCardCollapsedStrip","button","StyledStackedCardStripExpand","span","StyledStackedCardPlayBadge","StyledStackedCardCoverButton","StyledStackedCardResizeHandle","_ref8","$axis","hoverStyle","StyledStackedCard","_ref9","$forceHover","_ref0","$priorityColor","_ref1","$selected","_ref10","$disabled","_ref11","$pending","_ref12","$isDragSource","_ref13","$isDragPreview","_ref14","$entered"],"sources":["../../../../src/components/StackedCard/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport {\n STACKED_CARD_CONTROL_CLASS,\n STACKED_CARD_FIXED_ATTR,\n STACKED_CARD_RADIUS,\n STACKED_CARD_ROLE_PADDING,\n STACKED_CARD_WIDTH,\n StackedCardRowDirection,\n StackedCardRowRole,\n} from \"./constants\";\nimport { ResizeAxis } from \"./resizePolicy\";\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\n\n/**\n * Theming hooks.\n *\n * Every colour a StackedCard part needs is read through a `--sc-*` custom\n * property with a built-in fallback, so the component looks right standing on\n * its own and a host surface can still retint it by declaring the variable on\n * any ancestor. No rgba/hex is baked into a rule; data colours (a swatch value,\n * a priority colour) are always passed in by the caller.\n */\nconst SELECTION_RING = \"var(--sc-selection-ring, var(--color-primary-500))\";\nconst SCRIM = \"var(--sc-scrim, rgba(0, 0, 0, 0.55))\";\nconst SCRIM_STRONG = \"var(--sc-scrim-strong, rgba(0, 0, 0, 0.72))\";\nconst SCRIM_FG = \"var(--sc-scrim-fg, #ffffff)\";\n\n/** Selector for anything carrying the control class. */\nconst CONTROL = `.${STACKED_CARD_CONTROL_CLASS}`;\n\n/**\n * The one reveal rule the whole subsystem shares: controls are hidden until the\n * card (or the cover) is hovered OR holds focus. The focus path is what keeps\n * them reachable by keyboard instead of mouse-only.\n */\nconst revealControls = css`\n ${CONTROL} {\n opacity: 0;\n transition: opacity 120ms ease;\n }\n\n &:hover ${CONTROL}, &:focus-within ${CONTROL} {\n opacity: 1;\n }\n`;\n\n/* ------------------------------------------------------------------ */\n/* Stack — the vertical column. A card is a Stack of rows. */\n/* ------------------------------------------------------------------ */\n\nexport const StyledStackedCardStack = styled.div`\n ${BoxSizingStyle}\n\n position: relative;\n display: flex;\n flex-direction: column;\n`;\nStyledStackedCardStack.displayName = \"StyledStackedCardStack\";\n\n/* ------------------------------------------------------------------ */\n/* Row — the only layout primitive, differentiated by `role`. */\n/* ------------------------------------------------------------------ */\n\ninterface IStyledRowProps {\n $role: StackedCardRowRole;\n $bleed?: boolean;\n $direction: StackedCardRowDirection;\n $background?: string;\n}\n\nexport const StyledStackedCardRow = styled.div<IStyledRowProps>`\n ${BoxSizingStyle}\n\n position: relative;\n display: flex;\n flex-direction: ${({ $direction }) => $direction};\n align-items: ${({ $direction }) =>\n $direction === \"column\" ? \"stretch\" : \"center\"};\n gap: ${({ $direction }) => ($direction === \"column\" ? \"4px\" : \"8px\")};\n\n /* bleed overrides any role and runs the row edge to edge. */\n padding: ${({ $role, $bleed }) =>\n $bleed ? \"0\" : STACKED_CARD_ROLE_PADDING[$role]};\n\n ${({ $background }) =>\n $background &&\n css`\n background: ${$background};\n `}\n\n /* Distribution (row direction only): fixed-width children keep their width,\n the rest share what remains evenly; drop an empty spacer to push items. */\n ${({ $direction }) =>\n $direction === \"row\" &&\n css`\n > * {\n flex: 1 1 0;\n min-width: 0;\n }\n\n > [${STACKED_CARD_FIXED_ATTR}] {\n flex: 0 0 auto;\n }\n `}\n`;\nStyledStackedCardRow.displayName = \"StyledStackedCardRow\";\n\n/* ------------------------------------------------------------------ */\n/* Cover — a bleed row that holds media. */\n/* ------------------------------------------------------------------ */\n\n/**\n * The media box reserves its height with `aspect-ratio` so the image (or the\n * skeleton standing in for it) never reflows the card when it arrives.\n */\nexport const StyledStackedCardCoverMedia = styled.div<{ $aspectRatio: string }>`\n position: relative;\n width: 100%;\n aspect-ratio: ${({ $aspectRatio }) => $aspectRatio};\n overflow: hidden;\n\n ${revealControls}\n`;\nStyledStackedCardCoverMedia.displayName = \"StyledStackedCardCoverMedia\";\n\n/* The fill (an <img>, an inline <svg> wrapper, or a solid-colour box) is laid\n over the reserved box and made to cover it. */\nexport const StyledStackedCardCoverFill = styled.div`\n position: absolute;\n inset: 0;\n\n > * {\n width: 100%;\n height: 100%;\n }\n\n > img {\n display: block;\n object-fit: cover;\n }\n\n /* Media must never be natively draggable. An <img> is a browser drag source\n by default, so grabbing the cover would start an image drag and swallow the\n mousemove/mouseup the HOST's drag depends on — the card would stay put and\n then jump on the next pointer move. The host owns dragging; the cover must\n not compete with it. */\n > img,\n > svg {\n -webkit-user-drag: none;\n user-select: none;\n pointer-events: none;\n }\n`;\nStyledStackedCardCoverFill.displayName = \"StyledStackedCardCoverFill\";\n\nexport const StyledStackedCardCoverCenter = styled.div`\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\nStyledStackedCardCoverCenter.displayName = \"StyledStackedCardCoverCenter\";\n\nexport const StyledStackedCardCoverTopRight = styled.div`\n position: absolute;\n top: 8px;\n right: 8px;\n display: flex;\n gap: 6px;\n`;\nStyledStackedCardCoverTopRight.displayName = \"StyledStackedCardCoverTopRight\";\n\n/**\n * Collapsed cover — the media box gives way to a thin strip. The strip IS the\n * expand affordance: the whole bar is a button and a chevron hint is revealed\n * on hover or focus. It reserves no height of its own; the caller's\n * `collapsedStrip` (an ~8px colour bar, a favicon + domain row) sets how tall\n * it reads.\n */\nexport const StyledStackedCardCollapsedStrip = styled.button`\n ${BoxSizingStyle}\n\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-height: 16px;\n padding: 0;\n border: 0;\n background: transparent;\n cursor: pointer;\n text-align: left;\n\n ${CONTROL} {\n opacity: 0;\n transition: opacity 120ms ease;\n }\n\n &:hover ${CONTROL}, &:focus-visible ${CONTROL} {\n opacity: 1;\n }\n\n &:focus-visible {\n outline: 2px solid ${SELECTION_RING};\n outline-offset: -2px;\n }\n`;\nStyledStackedCardCollapsedStrip.displayName = \"StyledStackedCardCollapsedStrip\";\n\n/* The expand chevron sits at the right, vertically centred, so it reads the\n same whether the strip is a hairline colour bar or a taller favicon row. */\nexport const StyledStackedCardStripExpand = styled.span`\n position: absolute;\n top: 50%;\n right: 8px;\n transform: translateY(-50%);\n display: inline-flex;\n width: 16px;\n height: 16px;\n color: var(--color-theme-600);\n\n svg {\n width: 14px;\n height: 14px;\n }\n`;\nStyledStackedCardStripExpand.displayName = \"StyledStackedCardStripExpand\";\n\n/* ------------------------------------------------------------------ */\n/* Cover chrome — scrim-backed controls that sit over media */\n/* ------------------------------------------------------------------ */\n\n/** Centered media control (a play button). The caller drops the glyph inside. */\nexport const StyledStackedCardPlayBadge = styled.span`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 44px;\n height: 44px;\n border-radius: 12px;\n background: ${SCRIM};\n color: ${SCRIM_FG};\n\n svg {\n fill: currentColor;\n width: 20px;\n height: 20px;\n margin-left: 2px;\n }\n`;\nStyledStackedCardPlayBadge.displayName = \"StyledStackedCardPlayBadge\";\n\n/** Top-right cover-management button (collapse, remove …). */\nexport const StyledStackedCardCoverButton = styled.button`\n ${BoxSizingStyle}\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n padding: 0;\n border: 0;\n border-radius: 8px;\n cursor: pointer;\n color: ${SCRIM_FG};\n background: ${SCRIM};\n\n svg {\n width: 16px;\n height: 16px;\n display: block;\n }\n\n &:hover {\n background: ${SCRIM_STRONG};\n }\n`;\nStyledStackedCardCoverButton.displayName = \"StyledStackedCardCoverButton\";\n\n/* ------------------------------------------------------------------ */\n/* Resize (opt-in): handle on hover, the card only reports deltas */\n/* ------------------------------------------------------------------ */\n\n/* The grip is a focusable separator, so it needs a focus ring of its own — a\n keyboard user has no pointer to tell them where they are. */\nexport const StyledStackedCardResizeHandle = styled.span<{\n $axis: ResizeAxis;\n}>`\n position: absolute;\n right: 2px;\n bottom: 2px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 14px;\n height: 14px;\n border-radius: 4px;\n cursor: ${({ $axis }) => ($axis === \"width\" ? \"ew-resize\" : \"nwse-resize\")};\n color: var(--color-theme-600);\n z-index: 2;\n\n &:hover {\n color: var(--color-theme-900);\n }\n\n &:focus-visible {\n outline: 2px solid ${SELECTION_RING};\n outline-offset: 1px;\n color: var(--color-theme-900);\n }\n\n svg {\n display: block;\n }\n`;\nStyledStackedCardResizeHandle.displayName = \"StyledStackedCardResizeHandle\";\n\n/* ------------------------------------------------------------------ */\n/* The shell */\n/* ------------------------------------------------------------------ */\n\nexport interface IStyledStackedCardProps {\n $selected?: boolean;\n $disabled?: boolean;\n $pending?: boolean;\n $isDragSource?: boolean;\n $isDragPreview?: boolean;\n $entered?: boolean;\n $forceHover?: boolean;\n $priorityColor?: string;\n}\n\nconst hoverStyle = css`\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);\n border-color: var(--color-theme-500);\n`;\n\nexport const StyledStackedCard = styled.div<IStyledStackedCardProps>`\n ${BoxSizingStyle}\n\n position: relative;\n display: flex;\n flex-direction: column;\n width: ${STACKED_CARD_WIDTH}px;\n border-radius: ${STACKED_CARD_RADIUS}px;\n background-color: var(--page-paper-main);\n border: 1px solid var(--border-primary);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n overflow: hidden;\n transition: box-shadow 150ms ease, border-color 150ms ease;\n\n ${revealControls}\n\n &:hover {\n ${hoverStyle}\n }\n\n &:focus-visible {\n outline: none;\n ${hoverStyle}\n box-shadow: 0 0 0 2px ${SELECTION_RING};\n }\n\n /* Forced hover — for docs, snapshots and \"this is what hover looks like\"\n demos. The doubled ampersand gives it the specificity to beat the cover's\n own reveal rule. */\n ${({ $forceHover }) =>\n $forceHover &&\n css`\n ${hoverStyle}\n && ${CONTROL} {\n opacity: 1;\n }\n `}\n\n ${({ $priorityColor }) =>\n $priorityColor &&\n css`\n &::before {\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n width: 4px;\n background: ${$priorityColor};\n z-index: 2;\n }\n `}\n\n /* Selection outranks hover: a selected card must keep its ring while the\n pointer is over it — which, right after the click that selected it, is\n always. The doubled ampersand buys the specificity to beat the hover rule\n above (same reason the entered state below does it). */\n ${({ $selected }) =>\n $selected &&\n css`\n && {\n border-color: ${SELECTION_RING};\n box-shadow: 0 0 0 2px ${SELECTION_RING};\n }\n `}\n\n ${({ $disabled }) =>\n $disabled &&\n css`\n opacity: 0.5;\n pointer-events: none;\n `}\n\n /* Pending / optimistic — created or moved, not yet confirmed by the server.\n Dimmed, non-interactive and NOT draggable, but distinct from disabled: a\n transient in-flight state, not a policy. */\n ${({ $pending }) =>\n $pending &&\n css`\n opacity: 0.6;\n pointer-events: none;\n cursor: progress;\n `}\n\n /* Drag SOURCE — full-size outline placeholder. Content is hidden but keeps\n its box (visibility, not display) so the card holds identical dimensions\n and the surrounding cards never move. */\n ${({ $isDragSource }) =>\n $isDragSource &&\n css`\n background: transparent;\n border: 1px dashed var(--color-theme-500);\n box-shadow: none;\n\n &:hover {\n box-shadow: none;\n border-color: var(--color-theme-500);\n }\n\n > * {\n visibility: hidden;\n }\n `}\n\n /* Drag PREVIEW — the 1:1 copy the host floats in its drag layer. Elevated\n shadow ONLY: no rotate, no scale, no translate. */\n ${({ $isDragPreview }) =>\n $isDragPreview &&\n css`\n box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);\n cursor: grabbing;\n `}\n\n /* Entered (focus model) — focus has moved inside, onto an inner control. */\n ${({ $entered }) =>\n $entered &&\n css`\n && {\n border-color: ${SELECTION_RING};\n box-shadow: inset 0 0 0 2px ${SELECTION_RING},\n 0 0 0 2px ${SELECTION_RING};\n }\n `}\n`;\nStyledStackedCard.displayName = \"StyledStackedCard\";\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAE/C,SACEC,0BAA0B,EAC1BC,uBAAuB,EACvBC,mBAAmB,EACnBC,yBAAyB,EACzBC,kBAAkB,QAGb,aAAa;AAEpB,SAASC,cAAc,QAAQ,mBAAmB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAG,oDAAoD;AAC3E,MAAMC,KAAK,GAAG,sCAAsC;AACpD,MAAMC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,CAAdC,cAAc;EAAA,OACjBA,cAAc,IACdjD,GAAG,2GAQeiD,cAAc,CAG/B;AAAA,GAMDC,KAAA;EAAA,IAAGC,SAAS,GAAAD,KAAA,CAATC,SAAS;EAAA,OACZA,SAAS,IACTnD,GAAG,uDAEiBO,cAAc,EACNA,cAAc,CAEzC;AAAA,GAED6C,MAAA;EAAA,IAAGC,SAAS,GAAAD,MAAA,CAATC,SAAS;EAAA,OACZA,SAAS,IACTrD,GAAG,sCAGF;AAAA,GAKDsD,MAAA;EAAA,IAAGC,QAAQ,GAAAD,MAAA,CAARC,QAAQ;EAAA,OACXA,QAAQ,IACRvD,GAAG,sDAIF;AAAA,GAKDwD,MAAA;EAAA,IAAGC,aAAa,GAAAD,MAAA,CAAbC,aAAa;EAAA,OAChBA,aAAa,IACbzD,GAAG,0KAaF;AAAA,GAID0D,MAAA;EAAA,IAAGC,cAAc,GAAAD,MAAA,CAAdC,cAAc;EAAA,OACjBA,cAAc,IACd3D,GAAG,8DAGF;AAAA,GAGD4D,MAAA;EAAA,IAAGC,QAAQ,GAAAD,MAAA,CAARC,QAAQ;EAAA,OACXA,QAAQ,IACR7D,GAAG,4EAEiBO,cAAc,EACAA,cAAc,EAC9BA,cAAc,CAE/B;AAAA,EACJ;AACDsC,iBAAiB,CAAC7B,WAAW,GAAG,mBAAmB","ignoreList":[]}
@@ -1,13 +1,15 @@
1
1
  /**
2
- * StackedCard resize policy — pure math.
2
+ * Resize policy — pure math, shared by every resizable element.
3
3
  *
4
- * The card reports intent; the HOST applies a resize policy (spec §7). This
5
- * module is that policy, packaged as pure functions so the SAME code path
6
- * serves the pointer drag and the keyboard resize. Nothing here touches the
7
- * DOM, React or the card's content: it takes a start size, a delta and a
8
- * policy, and returns a clamped size. `useStackedCardResize` wires events to
9
- * it; the card's intrinsic content minimum is measured by the host and passed
10
- * in as `contentMin`, so this module knows nothing about heroes or footers.
4
+ * The element reports intent; the HOST applies a resize policy (StackedCard
5
+ * spec §7). This module is that policy, packaged as pure functions so the SAME
6
+ * code path serves the pointer drag and the keyboard resize, a card's single
7
+ * bottom-right grip and a shape's eight handles. Nothing here touches the DOM,
8
+ * React or the element's content: it takes a start box, a delta, a policy and
9
+ * the handle being dragged, and returns a clamped box — size AND position.
10
+ * `useStackedCardResize` wires events to it; an element's intrinsic content
11
+ * minimum is measured by the host and passed in as `contentMin`, so this module
12
+ * knows nothing about heroes or footers.
11
13
  *
12
14
  * The policy has four parts:
13
15
  * - bounds — optional min/max per axis; unset means unbounded.
@@ -16,18 +18,32 @@
16
18
  * distorts at a bound.
17
19
  * - step — optional grid snap; proportion wins over the grid.
18
20
  * - content min — the effective min is max(policyMin, contentMin) per axis,
19
- * so a card can never be crushed below what its content needs.
21
+ * so an element can never be crushed below what its content
22
+ * needs.
23
+ *
24
+ * The anchor is the handle being dragged. The edge or corner OPPOSITE to it
25
+ * never moves — not while the pointer travels, and not when a bound stops the
26
+ * resize — which is what makes a resize feel like a resize rather than a nudge.
27
+ * A `left` handle moves the position by exactly the amount the width grew; a
28
+ * `right` handle leaves it alone. An edge handle touches one axis only.
20
29
  */
21
- export interface StackedCardSize {
30
+ export interface ResizeSize {
22
31
  w: number;
23
32
  h: number;
24
33
  }
25
- /** The card's intrinsic minimum, measured from its real content. */
26
- export interface StackedCardContentMin {
34
+ export interface ResizePosition {
35
+ x: number;
36
+ y: number;
37
+ }
38
+ /** A resized element: its size and where its top-left corner now sits. */
39
+ export interface ResizeBox extends ResizeSize, ResizePosition {
40
+ }
41
+ /** The element's intrinsic minimum, measured from its real content. */
42
+ export interface ResizeContentMin {
27
43
  w: number;
28
44
  h: number;
29
45
  }
30
- export interface StackedCardResizePolicy {
46
+ export interface ResizePolicy {
31
47
  minW?: number;
32
48
  maxW?: number;
33
49
  minH?: number;
@@ -37,17 +53,26 @@ export interface StackedCardResizePolicy {
37
53
  /** Grid snap increment in px; omitted / 0 means continuous. */
38
54
  step?: number;
39
55
  }
40
- /** The size captured at the start of a gesture (pointer down or a key press). */
41
- export interface StackedCardResizeStart {
42
- w: number;
43
- h: number;
44
- contentMin: StackedCardContentMin;
56
+ /**
57
+ * The handle being dragged, named after the edge or corner it sits on. The
58
+ * opposite edge or corner is held in place.
59
+ */
60
+ export type ResizeAnchor = "top-left" | "top" | "top-right" | "right" | "bottom-right" | "bottom" | "bottom-left" | "left";
61
+ export declare const RESIZE_ANCHORS: ReadonlyArray<ResizeAnchor>;
62
+ /** A card's single grip: the top-left corner stays put. */
63
+ export declare const DEFAULT_RESIZE_ANCHOR: ResizeAnchor;
64
+ /**
65
+ * The box captured at the start of a gesture (pointer down or a key press).
66
+ * A host that only tracks a size leaves the position at the origin.
67
+ */
68
+ export interface ResizeStart extends ResizeBox {
69
+ contentMin: ResizeContentMin;
45
70
  }
46
- export interface StackedCardResizeDelta {
71
+ export interface ResizeDelta {
47
72
  dx: number;
48
73
  dy: number;
49
74
  }
50
- export interface StackedCardResizeBounds {
75
+ export interface ResizeBounds {
51
76
  wMin: number;
52
77
  wMax: number;
53
78
  hMin: number;
@@ -57,9 +82,16 @@ export interface StackedCardResizeBounds {
57
82
  * `width` locks the vertical axis: an auto-height card takes a width and lets
58
83
  * its rows set the height, so the gesture's vertical component is ignored.
59
84
  */
60
- export type StackedCardResizeAxis = "both" | "width";
85
+ export type ResizeAxis = "both" | "width";
61
86
  /** Which input drove a resize event. Hosts log undo entries per source. */
62
- export type StackedCardResizeSource = "pointer" | "keyboard";
87
+ export type ResizeSource = "pointer" | "keyboard";
88
+ export interface ResizeOptions {
89
+ /** Shift-to-constrain: one gesture behaves proportionally. */
90
+ constrain?: boolean;
91
+ axis?: ResizeAxis;
92
+ /** The handle being dragged. Defaults to a card's bottom-right grip. */
93
+ anchor?: ResizeAnchor;
94
+ }
63
95
  /** Keyboard resize nudges by the policy step, or this when no step is set. */
64
96
  export declare const DEFAULT_KEYBOARD_STEP = 8;
65
97
  /** Shift + arrow resizes by a larger increment (the familiar coarse nudge). */
@@ -69,43 +101,56 @@ export declare const RESIZE_KEYS: ReadonlyArray<string>;
69
101
  export declare const isResizeKey: (key: string) => boolean;
70
102
  export declare const clamp: (v: number, lo: number, hi?: number) => number;
71
103
  export declare const snap: (v: number, step?: number) => number;
72
- export declare const makeStart: (size: StackedCardSize, contentMin: StackedCardContentMin) => StackedCardResizeStart;
104
+ export declare const makeStart: (box: ResizeSize & Partial<ResizePosition>, contentMin: ResizeContentMin) => ResizeStart;
73
105
  /**
74
106
  * The effective bounds a size is clamped to: the policy min floored by the
75
107
  * content min, and the policy max (unbounded when unset). Independent of any
76
108
  * live gesture, so a host can also use it for the aria value and Home/End.
77
109
  */
78
- export declare const effectiveBounds: (policy: StackedCardResizePolicy, contentMin: StackedCardContentMin) => StackedCardResizeBounds;
110
+ export declare const effectiveBounds: (policy: ResizePolicy, contentMin: ResizeContentMin) => ResizeBounds;
111
+ type AxisSign = -1 | 0 | 1;
79
112
  /**
80
- * Apply a delta to the start size under the policy — the single path for both
81
- * inputs.
113
+ * Which way each axis grows for a handle: +1 when the handle is on the far
114
+ * edge (right/bottom), −1 when it is on the near edge (left/top), 0 when the
115
+ * handle does not touch that axis at all.
116
+ */
117
+ export declare const anchorSigns: (anchor: ResizeAnchor) => {
118
+ sx: AxisSign;
119
+ sy: AxisSign;
120
+ };
121
+ /**
122
+ * Apply a delta to the start box under the policy — the single path for both
123
+ * inputs and for every handle.
82
124
  *
83
125
  * `constrain` is the transient Shift-to-constrain lock: a free-form policy
84
126
  * behaves proportionally for that one gesture; a proportional policy is already
85
127
  * locked and ignores it. `axis: "width"` drops the gesture's vertical component;
86
128
  * the height then holds still in free-form mode, and still follows the ratio in
87
- * proportional mode (that is what proportional means).
129
+ * proportional mode (that is what proportional means). `anchor` is the handle
130
+ * being dragged: the opposite edge or corner is held, so the returned position
131
+ * moves only when a near-edge handle (left/top) grew or shrank the box.
88
132
  */
89
- export declare const applyResize: (start: StackedCardResizeStart, delta: StackedCardResizeDelta, policy: StackedCardResizePolicy, opts?: {
90
- constrain?: boolean;
91
- axis?: StackedCardResizeAxis;
92
- }) => StackedCardSize;
133
+ export declare const applyResize: (start: ResizeStart, delta: ResizeDelta, policy: ResizePolicy, opts?: ResizeOptions) => ResizeBox;
93
134
  /**
94
- * Translate a resize key into the next size, reusing `applyResize` so the
95
- * keyboard clamps exactly like the pointer. Arrows nudge by the step (Shift ×4);
96
- * Home/End jump to the min/max of the allowed range, leaving any axis without
97
- * that bound where it is. Returns null for a key the handle does not own, and
98
- * for a vertical key on a width-only card.
135
+ * Translate a resize key into the next box, reusing `applyResize` so the
136
+ * keyboard clamps exactly like the pointer. Arrows move the HANDLE by the step
137
+ * (Shift ×4) — so on a left handle ArrowLeft grows the element and ArrowRight
138
+ * shrinks it — and Home/End jump the handle to the min/max of the allowed
139
+ * range, leaving any axis without that bound where it is. Returns null for a
140
+ * key the handle does not own: a key on an axis the handle does not touch, or a
141
+ * vertical key on a width-only card.
99
142
  */
100
- export declare const keyboardResize: (key: string, size: StackedCardSize, policy: StackedCardResizePolicy, contentMin: StackedCardContentMin, opts?: {
143
+ export declare const keyboardResize: (key: string, box: ResizeSize & Partial<ResizePosition>, policy: ResizePolicy, contentMin: ResizeContentMin, opts?: {
101
144
  shiftKey?: boolean;
102
- axis?: StackedCardResizeAxis;
103
- }) => StackedCardSize | null;
145
+ axis?: ResizeAxis;
146
+ anchor?: ResizeAnchor;
147
+ }) => ResizeBox | null;
104
148
  /**
105
149
  * The handle's `aria-valuenow`: the current size as a percent (0–100) of its
106
150
  * allowed range. The corner resizes both axes, but the value must be a single
107
151
  * number, so it reports the WIDTH axis — the one axis the fixed-box and the
108
152
  * width-only cards share. Returns 0 when the range isn't finite (no max bound).
109
153
  */
110
- export declare const measurePercent: (size: StackedCardSize, policy: StackedCardResizePolicy, contentMin: StackedCardContentMin) => number;
154
+ export declare const measurePercent: (size: ResizeSize, policy: ResizePolicy, contentMin: ResizeContentMin) => number;
155
+ export {};
111
156
  //# sourceMappingURL=resizePolicy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file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