cursedbelt 5.81.1 → 5.82.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 (81) hide show
  1. package/dist/react/canvas-hud/AlignmentGuides.d.ts +26 -0
  2. package/dist/react/canvas-hud/AlignmentGuides.d.ts.map +1 -0
  3. package/dist/react/canvas-hud/AlignmentGuides.js +51 -0
  4. package/dist/react/canvas-hud/AlignmentGuides.js.map +1 -0
  5. package/dist/react/canvas-hud/alignment.d.ts +56 -0
  6. package/dist/react/canvas-hud/alignment.d.ts.map +1 -0
  7. package/dist/react/canvas-hud/alignment.js +100 -0
  8. package/dist/react/canvas-hud/alignment.js.map +1 -0
  9. package/dist/react/canvas-hud/index.d.ts +4 -0
  10. package/dist/react/canvas-hud/index.d.ts.map +1 -1
  11. package/dist/react/canvas-hud/index.js +2 -0
  12. package/dist/react/canvas-hud/index.js.map +1 -1
  13. package/dist/react/components/ActionsHelp.d.ts +29 -0
  14. package/dist/react/components/ActionsHelp.d.ts.map +1 -0
  15. package/dist/react/components/ActionsHelp.js +16 -0
  16. package/dist/react/components/ActionsHelp.js.map +1 -0
  17. package/dist/react/components/DataTable/DataTable.d.ts +3 -1
  18. package/dist/react/components/DataTable/DataTable.d.ts.map +1 -1
  19. package/dist/react/components/DataTable/DataTable.js +19 -6
  20. package/dist/react/components/DataTable/DataTable.js.map +1 -1
  21. package/dist/react/components/DataTable/TableFilterBuilder.d.ts.map +1 -1
  22. package/dist/react/components/DataTable/TableFilterBuilder.js +2 -1
  23. package/dist/react/components/DataTable/TableFilterBuilder.js.map +1 -1
  24. package/dist/react/components/DataTable/ViewOptionsMenu.d.ts.map +1 -1
  25. package/dist/react/components/DataTable/ViewOptionsMenu.js +2 -2
  26. package/dist/react/components/DataTable/ViewOptionsMenu.js.map +1 -1
  27. package/dist/react/components/DropdownMenu.js +4 -3
  28. package/dist/react/components/DropdownMenu.js.map +1 -1
  29. package/dist/react/file-tree/FileTree.d.ts +10 -1
  30. package/dist/react/file-tree/FileTree.d.ts.map +1 -1
  31. package/dist/react/file-tree/FileTree.js +20 -4
  32. package/dist/react/file-tree/FileTree.js.map +1 -1
  33. package/dist/react/file-tree/fileTree.css +45 -1
  34. package/dist/react/index.d.ts +1 -0
  35. package/dist/react/index.d.ts.map +1 -1
  36. package/dist/react/index.js +1 -0
  37. package/dist/react/index.js.map +1 -1
  38. package/dist/react/lib/floatingStyles.d.ts +5 -0
  39. package/dist/react/lib/floatingStyles.d.ts.map +1 -1
  40. package/dist/react/lib/floatingStyles.js +7 -1
  41. package/dist/react/lib/floatingStyles.js.map +1 -1
  42. package/dist/react/media/PlayerStrip.d.ts.map +1 -1
  43. package/dist/react/media/PlayerStrip.js +26 -12
  44. package/dist/react/media/PlayerStrip.js.map +1 -1
  45. package/dist/react/media/playerStrip.css +17 -0
  46. package/dist/styles-areas/analytics.css +22 -21
  47. package/dist/styles-areas/canvas-hud.css +3 -2
  48. package/dist/styles-areas/core.css +16 -15
  49. package/dist/styles-areas/data-table.css +10 -10
  50. package/dist/styles-areas/media.css +6 -6
  51. package/dist/styles-areas/stats.css +11 -11
  52. package/dist/styles-utilities.css +18 -0
  53. package/package.json +2 -2
  54. package/scripts/guardrails-baseline.json +2 -2
  55. package/src/react/canvas-hud/AlignmentGuides.tsx +94 -0
  56. package/src/react/canvas-hud/alignment.spec.tsx +149 -0
  57. package/src/react/canvas-hud/alignment.ts +143 -0
  58. package/src/react/canvas-hud/index.ts +6 -1
  59. package/src/react/components/ActionsHelp.tsx +50 -0
  60. package/src/react/components/DataTable/DataTable.spec.tsx +28 -0
  61. package/src/react/components/DataTable/DataTable.tsx +18 -6
  62. package/src/react/components/DataTable/TableFilterBuilder.tsx +12 -5
  63. package/src/react/components/DataTable/ViewOptionsMenu.tsx +11 -6
  64. package/src/react/components/DataTable/tableSystem.spec.tsx +1 -1
  65. package/src/react/components/DropdownMenu.tsx +8 -3
  66. package/src/react/file-tree/FileTree.spec.tsx +67 -0
  67. package/src/react/file-tree/FileTree.tsx +48 -13
  68. package/src/react/file-tree/fileTree.css +45 -1
  69. package/src/react/index.ts +1 -0
  70. package/src/react/lib/floatingStyles.spec.ts +9 -0
  71. package/src/react/lib/floatingStyles.ts +7 -1
  72. package/src/react/media/PlayerStrip.tsx +45 -19
  73. package/src/react/media/playerStrip.css +17 -0
  74. package/src/react/media/playerStrip.spec.tsx +37 -1
  75. package/src/styles-areas/analytics.css +22 -21
  76. package/src/styles-areas/canvas-hud.css +3 -2
  77. package/src/styles-areas/core.css +16 -15
  78. package/src/styles-areas/data-table.css +10 -10
  79. package/src/styles-areas/media.css +6 -6
  80. package/src/styles-areas/stats.css +11 -11
  81. package/src/styles-utilities.css +18 -0
@@ -0,0 +1,26 @@
1
+ import { type RefObject } from 'react';
2
+ import { type AlignmentGuide } from './alignment.js';
3
+ export interface AlignmentGuidesProps {
4
+ /** What `snapToAlignment` returned for the drag in progress; empty draws nothing. */
5
+ guides: readonly AlignmentGuide[];
6
+ /** The view's scale, so each line stays one screen pixel wide at every zoom. */
7
+ scale: number;
8
+ }
9
+ /**
10
+ * CNV-12's lines — Mural's thin accent hairlines, drawn while an item is dragged and gone the moment
11
+ * it is let go. Place it INSIDE the canvas's transformed stage (React Flow's `ViewportPortal`, or the
12
+ * element a canvas puts `translate(x, y) scale(k)` on): it draws in world units from the stage's
13
+ * origin, so it pans and zooms with the content and never needs the view's offset.
14
+ *
15
+ * `aria-hidden` and `pointer-events: none`: the lines are a hint about where the item will land,
16
+ * which the item itself already shows; they must never take a pointer from the item underneath.
17
+ */
18
+ export declare function AlignmentGuides({ guides, scale }: AlignmentGuidesProps): import("react").JSX.Element | null;
19
+ /**
20
+ * Whether ⌘ or Ctrl is held right now — CNV-12's way to drag an item off the lines. A ref, not
21
+ * state: React Flow reports a drag as a stream of changes with no pointer event on them, so the
22
+ * canvas reads this inside its change handler, between renders. Kept current from the pointer's
23
+ * own moves and from the keys, so pressing ⌘ mid-drag takes effect on the next move.
24
+ */
25
+ export declare function useSnapSuspended(): RefObject<boolean>;
26
+ //# sourceMappingURL=AlignmentGuides.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlignmentGuides.d.ts","sourceRoot":"","sources":["../../../src/react/canvas-hud/AlignmentGuides.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,KAAK,cAAc,EAAiB,MAAM,gBAAgB,CAAC;AAEpE,MAAM,WAAW,oBAAoB;IACnC,qFAAqF;IACrF,MAAM,EAAE,SAAS,cAAc,EAAE,CAAC;IAClC,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,oBAAoB,sCA2CtE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,SAAS,CAAC,OAAO,CAAC,CAuBrD"}
@@ -0,0 +1,51 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useEffect, useRef } from 'react';
3
+ import { snapSuspended } from './alignment.js';
4
+ /**
5
+ * CNV-12's lines — Mural's thin accent hairlines, drawn while an item is dragged and gone the moment
6
+ * it is let go. Place it INSIDE the canvas's transformed stage (React Flow's `ViewportPortal`, or the
7
+ * element a canvas puts `translate(x, y) scale(k)` on): it draws in world units from the stage's
8
+ * origin, so it pans and zooms with the content and never needs the view's offset.
9
+ *
10
+ * `aria-hidden` and `pointer-events: none`: the lines are a hint about where the item will land,
11
+ * which the item itself already shows; they must never take a pointer from the item underneath.
12
+ */
13
+ export function AlignmentGuides({ guides, scale }) {
14
+ if (guides.length === 0 || !(scale > 0))
15
+ return null;
16
+ const width = 1 / scale;
17
+ return (_jsx("svg", { "data-testid": 'canvas-alignment-guides', "aria-hidden": 'true', width: 1, height: 1,
18
+ // At the stage's origin, above the items it is drawn among (React Flow's nodes reach z ~2000).
19
+ className: 'pointer-events-none absolute top-0 left-0 z-[5000] overflow-visible', children: guides.map((guide) => guide.axis === 'x' ? (_jsx("line", { "data-guide": 'x', x1: guide.at, x2: guide.at, y1: guide.from, y2: guide.to, stroke: 'var(--accent)', strokeOpacity: 0.85, strokeWidth: width, shapeRendering: 'crispEdges' }, `x${guide.at}`)) : (_jsx("line", { "data-guide": 'y', x1: guide.from, x2: guide.to, y1: guide.at, y2: guide.at, stroke: 'var(--accent)', strokeOpacity: 0.85, strokeWidth: width, shapeRendering: 'crispEdges' }, `y${guide.at}`))) }));
20
+ }
21
+ /**
22
+ * Whether ⌘ or Ctrl is held right now — CNV-12's way to drag an item off the lines. A ref, not
23
+ * state: React Flow reports a drag as a stream of changes with no pointer event on them, so the
24
+ * canvas reads this inside its change handler, between renders. Kept current from the pointer's
25
+ * own moves and from the keys, so pressing ⌘ mid-drag takes effect on the next move.
26
+ */
27
+ export function useSnapSuspended() {
28
+ const held = useRef(false);
29
+ useEffect(() => {
30
+ const read = (event) => {
31
+ held.current = snapSuspended(event);
32
+ };
33
+ const clear = () => {
34
+ held.current = false;
35
+ };
36
+ window.addEventListener('keydown', read, true);
37
+ window.addEventListener('keyup', read, true);
38
+ window.addEventListener('pointermove', read, true);
39
+ window.addEventListener('pointerdown', read, true);
40
+ window.addEventListener('blur', clear);
41
+ return () => {
42
+ window.removeEventListener('keydown', read, true);
43
+ window.removeEventListener('keyup', read, true);
44
+ window.removeEventListener('pointermove', read, true);
45
+ window.removeEventListener('pointerdown', read, true);
46
+ window.removeEventListener('blur', clear);
47
+ };
48
+ }, []);
49
+ return held;
50
+ }
51
+ //# sourceMappingURL=AlignmentGuides.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlignmentGuides.js","sourceRoot":"","sources":["../../../src/react/canvas-hud/AlignmentGuides.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkB,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAuB,aAAa,EAAE,MAAM,gBAA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,CAAC,CAAC;IAC3B,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,IAAI,GAAG,CAAC,KAAmC,EAAE,EAAE;YACnD,IAAI,CAAC,OAAO,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC,CAAC;QACF,MAAM,KAAK,GAAG,GAAG,EAAE;YACjB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACvB,CAAC,CAAC;QACF,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC/C,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC7C,MAAM,CAAC,gBAAgB,CAAC,aAAa,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QACnD,MAAM,CAAC,gBAAgB,CAAC,aAAa,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QACnD,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACvC,OAAO,GAAG,EAAE;YACV,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YAClD,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YAChD,MAAM,CAAC,mBAAmB,CAAC,aAAa,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YACtD,MAAM,CAAC,mBAAmB,CAAC,aAAa,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YACtD,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC5C,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * CNV-12 — alignment guides while dragging (forge task 3437). The owner asked for Mural's lines: as
3
+ * an item is dragged, a hairline shows when one of its edges or its middle lines up with another
4
+ * item's, and the item settles onto that line. Figma, Miro and Mural all draw the same thing.
5
+ *
6
+ * Pure — no React, no DOM — so a canvas built on React Flow (desk, arch) and one built on its own
7
+ * stage use the same rule, pinned by `alignment.spec.tsx`. Everything is in WORLD units; the caller
8
+ * turns its screen tolerance into world units by dividing by the view's scale, so the pull feels the
9
+ * same at every zoom.
10
+ */
11
+ import type { CanvasBounds } from './viewport.js';
12
+ /** How close, in SCREEN pixels, an edge or a middle must come to another's before it snaps. */
13
+ export declare const ALIGNMENT_TOLERANCE = 6;
14
+ /**
15
+ * One line to draw. `axis: 'x'` is a VERTICAL line at `x = at`, running from `y = from` to
16
+ * `y = to`; `axis: 'y'` is a horizontal one at `y = at`, running along x.
17
+ */
18
+ export interface AlignmentGuide {
19
+ axis: 'x' | 'y';
20
+ at: number;
21
+ from: number;
22
+ to: number;
23
+ }
24
+ export interface AlignmentSnap {
25
+ /** What to add to the dragged item's position so it sits on the nearest line — 0 when none is near. */
26
+ dx: number;
27
+ dy: number;
28
+ /** Every line the item rests on AFTER the snap, merged per position, spanning every item it meets. */
29
+ guides: AlignmentGuide[];
30
+ }
31
+ /**
32
+ * Where `moving` should settle, and the guides to draw there. `others` is every item it may line up
33
+ * with — never the item itself, nor anything travelling with it (a multi-selection, a group's
34
+ * contents). `tolerance` is in world units: `ALIGNMENT_TOLERANCE / view.scale`.
35
+ *
36
+ * Each axis snaps on its own, to the closest line within tolerance, so an item can settle on a
37
+ * vertical and a horizontal guide at once. A guide is drawn for every line that matches after the
38
+ * snap — two neighbours sharing a left edge make one line through all three — and runs from the
39
+ * farthest item it touches to the farthest on the other side, the way Mural draws it.
40
+ *
41
+ * `axis` limits it to one direction for an item that only moves one way — family's lineages slide
42
+ * sideways and never change row, so `'x'` (vertical lines only): a row of cards would otherwise draw
43
+ * a horizontal line along every generation.
44
+ */
45
+ export declare function snapToAlignment(moving: CanvasBounds, others: readonly CanvasBounds[], tolerance: number, axis?: 'x' | 'y' | 'both'): AlignmentSnap;
46
+ /** The box around several — what a multi-selection drags as one. `null` for none. */
47
+ export declare function unionBounds(boxes: readonly CanvasBounds[]): CanvasBounds | null;
48
+ /**
49
+ * Snapping is suspended while ⌘ (or Ctrl) is held — Figma's convention, so an item can still be
50
+ * put a few pixels off a line on purpose. Read from the drag's own pointer event.
51
+ */
52
+ export declare function snapSuspended(event: {
53
+ metaKey?: boolean;
54
+ ctrlKey?: boolean;
55
+ } | null | undefined): boolean;
56
+ //# sourceMappingURL=alignment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alignment.d.ts","sourceRoot":"","sources":["../../../src/react/canvas-hud/alignment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,+FAA+F;AAC/F,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,GAAG,GAAG,GAAG,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,aAAa;IAC5B,uGAAuG;IACvG,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,sGAAsG;IACtG,MAAM,EAAE,cAAc,EAAE,CAAC;CAC1B;AAuBD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,SAAS,YAAY,EAAE,EAC/B,SAAS,EAAE,MAAM,EACjB,IAAI,GAAE,GAAG,GAAG,GAAG,GAAG,MAAe,GAChC,aAAa,CA4Cf;AAED,qFAAqF;AACrF,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,GAAG,YAAY,GAAG,IAAI,CAa/E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAEzG"}
@@ -0,0 +1,100 @@
1
+ /** How close, in SCREEN pixels, an edge or a middle must come to another's before it snaps. */
2
+ export const ALIGNMENT_TOLERANCE = 6;
3
+ const NONE = { dx: 0, dy: 0, guides: [] };
4
+ /** Start, middle, end — the three lines of a box along one axis. */
5
+ function lines(start, size) {
6
+ return [start, start + size / 2, start + size];
7
+ }
8
+ /** The smallest move along one axis that puts any of `moving`'s lines on any of `targets`' lines. */
9
+ function nearest(moving, targets, tolerance) {
10
+ let best = Number.POSITIVE_INFINITY;
11
+ for (const target of targets) {
12
+ for (const want of target) {
13
+ for (const have of moving) {
14
+ const delta = want - have;
15
+ if (Math.abs(delta) <= tolerance && Math.abs(delta) < Math.abs(best))
16
+ best = delta;
17
+ }
18
+ }
19
+ }
20
+ return Number.isFinite(best) ? best : 0;
21
+ }
22
+ /**
23
+ * Where `moving` should settle, and the guides to draw there. `others` is every item it may line up
24
+ * with — never the item itself, nor anything travelling with it (a multi-selection, a group's
25
+ * contents). `tolerance` is in world units: `ALIGNMENT_TOLERANCE / view.scale`.
26
+ *
27
+ * Each axis snaps on its own, to the closest line within tolerance, so an item can settle on a
28
+ * vertical and a horizontal guide at once. A guide is drawn for every line that matches after the
29
+ * snap — two neighbours sharing a left edge make one line through all three — and runs from the
30
+ * farthest item it touches to the farthest on the other side, the way Mural draws it.
31
+ *
32
+ * `axis` limits it to one direction for an item that only moves one way — family's lineages slide
33
+ * sideways and never change row, so `'x'` (vertical lines only): a row of cards would otherwise draw
34
+ * a horizontal line along every generation.
35
+ */
36
+ export function snapToAlignment(moving, others, tolerance, axis = 'both') {
37
+ if (others.length === 0 || !(tolerance > 0))
38
+ return NONE;
39
+ const near = others.filter((other) => other.width >= 0 && other.height >= 0 && Number.isFinite(other.x) && Number.isFinite(other.y));
40
+ const dx = axis === 'y' ? 0 : nearest(lines(moving.x, moving.width), near.map((other) => lines(other.x, other.width)), tolerance);
41
+ const dy = axis === 'x' ? 0 : nearest(lines(moving.y, moving.height), near.map((other) => lines(other.y, other.height)), tolerance);
42
+ const placed = { x: moving.x + dx, y: moving.y + dy, width: moving.width, height: moving.height };
43
+ // Lines that already coincide count; a hair of float error must not hide one.
44
+ const epsilon = Math.min(tolerance, 0.5);
45
+ const guides = [];
46
+ const add = (axis, at, from, to) => {
47
+ const same = guides.find((guide) => guide.axis === axis && Math.abs(guide.at - at) <= epsilon);
48
+ if (same) {
49
+ same.from = Math.min(same.from, from);
50
+ same.to = Math.max(same.to, to);
51
+ }
52
+ else
53
+ guides.push({ axis, at, from, to });
54
+ };
55
+ const ownX = lines(placed.x, placed.width);
56
+ const ownY = lines(placed.y, placed.height);
57
+ /** The lines of `theirs` that `own` sits on — without the middle when both edges match too,
58
+ * since a box the same size as its neighbour would otherwise draw three parallel lines. */
59
+ const matched = (own, theirs) => {
60
+ const hits = theirs.map((at) => own.some((have) => Math.abs(have - at) <= epsilon));
61
+ return theirs.filter((_, index) => hits[index] && !(index === 1 && hits[0] && hits[2]));
62
+ };
63
+ for (const other of near) {
64
+ if (axis !== 'y')
65
+ for (const at of matched(ownX, lines(other.x, other.width))) {
66
+ add('x', at, Math.min(placed.y, other.y), Math.max(placed.y + placed.height, other.y + other.height));
67
+ }
68
+ if (axis !== 'x')
69
+ for (const at of matched(ownY, lines(other.y, other.height))) {
70
+ add('y', at, Math.min(placed.x, other.x), Math.max(placed.x + placed.width, other.x + other.width));
71
+ }
72
+ }
73
+ if (guides.length === 0 && dx === 0 && dy === 0)
74
+ return NONE;
75
+ return { dx, dy, guides };
76
+ }
77
+ /** The box around several — what a multi-selection drags as one. `null` for none. */
78
+ export function unionBounds(boxes) {
79
+ if (boxes.length === 0)
80
+ return null;
81
+ let left = Number.POSITIVE_INFINITY;
82
+ let top = Number.POSITIVE_INFINITY;
83
+ let right = Number.NEGATIVE_INFINITY;
84
+ let bottom = Number.NEGATIVE_INFINITY;
85
+ for (const box of boxes) {
86
+ left = Math.min(left, box.x);
87
+ top = Math.min(top, box.y);
88
+ right = Math.max(right, box.x + box.width);
89
+ bottom = Math.max(bottom, box.y + box.height);
90
+ }
91
+ return { x: left, y: top, width: right - left, height: bottom - top };
92
+ }
93
+ /**
94
+ * Snapping is suspended while ⌘ (or Ctrl) is held — Figma's convention, so an item can still be
95
+ * put a few pixels off a line on purpose. Read from the drag's own pointer event.
96
+ */
97
+ export function snapSuspended(event) {
98
+ return !!(event?.metaKey || event?.ctrlKey);
99
+ }
100
+ //# sourceMappingURL=alignment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alignment.js","sourceRoot":"","sources":["../../../src/react/canvas-hud/alignment.ts"],"names":[],"mappings":"AAYA,+FAA+F;AAC/F,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAqBrC,MAAM,IAAI,GAAkB,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AAEzD,oEAAoE;AACpE,SAAS,KAAK,CAAC,KAAa,EAAE,IAAY;IACxC,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,CAAC;AACjD,CAAC;AAED,qGAAqG;AACrG,SAAS,OAAO,CAAC,MAAyB,EAAE,OAAuC,EAAE,SAAiB;IACpG,IAAI,IAAI,GAAG,MAAM,CAAC,iBAAiB,CAAC;IACpC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;YAC1B,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;gBAC1B,MAAM,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC;gBAC1B,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,SAAS,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK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AG,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,EAAE,CAAC;AACxE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,KAAkE;IAC9F,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,OAAO,IAAI,KAAK,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC"}
@@ -1,3 +1,7 @@
1
+ export type { AlignmentGuide, AlignmentSnap } from './alignment.js';
2
+ export { ALIGNMENT_TOLERANCE, snapSuspended, snapToAlignment, unionBounds } from './alignment.js';
3
+ export type { AlignmentGuidesProps } from './AlignmentGuides.js';
4
+ export { AlignmentGuides, useSnapSuspended } from './AlignmentGuides.js';
1
5
  export type { CanvasMinimapProps } from './CanvasMinimap.js';
2
6
  export { CanvasMinimap } from './CanvasMinimap.js';
3
7
  export type { CanvasNodeMenuItem, CanvasNodeMenuProps, CanvasNodeMenuSection } from './CanvasNodeMenu.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/canvas-hud/index.ts"],"names":[],"mappings":"AAGA,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxF,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,oBAAoB,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AoB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxF,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC9E,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAClF,YAAY,EACV,YAAY,EACZ,WAAW,EACX,UAAU,EACV,UAAU,EACV,UAAU,EACV,aAAa,EACb,uBAAuB,GACxB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,OAAO,EACP,eAAe,EACf,aAAa,EACb,aAAa,EACb,eAAe,EACf,MAAM,GACP,MAAM,eAAe,CAAC"}
@@ -1,3 +1,5 @@
1
+ export { ALIGNMENT_TOLERANCE, snapSuspended, snapToAlignment, unionBounds } from './alignment.js';
2
+ export { AlignmentGuides, useSnapSuspended } from './AlignmentGuides.js';
1
3
  export { CanvasMinimap } from './CanvasMinimap.js';
2
4
  export { CanvasNodeMenu } from './CanvasNodeMenu.js';
3
5
  export { CanvasSearchField } from './CanvasSearchField.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/canvas-hud/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExF,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE9E,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAUlF,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,OAAO,EACP,eAAe,EACf,aAAa,EACb,aAAa,EACb,eAAe,EACf,MAAM,GACP,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/canvas-hud/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElG,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEzE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExF,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE9E,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAUlF,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,OAAO,EACP,eAAe,EACf,aAAa,EACb,aAAa,EACb,eAAe,EACf,MAAM,GACP,MAAM,eAAe,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { ReactNode } from 'react';
2
+ /** One row of an {@link ActionsHelp} sheet: the glyph a strip or menu shows, its word, its sentence. */
3
+ export interface ActionsHelpRow {
4
+ key: string;
5
+ icon?: ReactNode;
6
+ label: ReactNode;
7
+ /** What the control does — the sentence a mouse reads on hover. */
8
+ hint: ReactNode;
9
+ }
10
+ export interface ActionsHelpProps {
11
+ open: boolean;
12
+ onClose: () => void;
13
+ rows: readonly ActionsHelpRow[];
14
+ /** The list's accessible name — what a test and a screen reader find the sheet by. */
15
+ listLabel: string;
16
+ title?: ReactNode;
17
+ }
18
+ /**
19
+ * What each control of an icon strip or a menu does — the one place a phone can find out.
20
+ *
21
+ * A mouse reads a control's sentence on hover. A touch screen has no hover, and a sentence
22
+ * printed beside every menu row runs the menu off a 390px screen (music's player ⋯, owner
23
+ * 2026-10-19: *"the small text explaining what each row in the menu does goes off the screen and
24
+ * is unviewable. Put this info in an info section with an 'i' icon"*). So the strip or menu
25
+ * carries ONE ⓘ, and this is what it opens: a row per control, its glyph beside the word and the
26
+ * sentence. Load it lazily — it is a `Modal`, and only a curious press ever opens it.
27
+ */
28
+ export declare function ActionsHelp({ open, onClose, rows, listLabel, title }: ActionsHelpProps): import("react").JSX.Element;
29
+ //# sourceMappingURL=ActionsHelp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActionsHelp.d.ts","sourceRoot":"","sources":["../../../src/react/components/ActionsHelp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,wGAAwG;AACxG,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,mEAAmE;IACnE,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,EAAE,SAAS,cAAc,EAAE,CAAC;IAChC,sFAAsF;IACtF,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAuB,EAAE,EAAE,gBAAgB,+BAkBxG"}
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Modal } from './Modal.js';
3
+ /**
4
+ * What each control of an icon strip or a menu does — the one place a phone can find out.
5
+ *
6
+ * A mouse reads a control's sentence on hover. A touch screen has no hover, and a sentence
7
+ * printed beside every menu row runs the menu off a 390px screen (music's player ⋯, owner
8
+ * 2026-10-19: *"the small text explaining what each row in the menu does goes off the screen and
9
+ * is unviewable. Put this info in an info section with an 'i' icon"*). So the strip or menu
10
+ * carries ONE ⓘ, and this is what it opens: a row per control, its glyph beside the word and the
11
+ * sentence. Load it lazily — it is a `Modal`, and only a curious press ever opens it.
12
+ */
13
+ export function ActionsHelp({ open, onClose, rows, listLabel, title = 'What these do' }) {
14
+ return (_jsx(Modal, { onClose: onClose, open: open, size: 'sm', title: title, children: _jsx("ul", { "aria-label": listLabel, className: 'flex flex-col gap-4', children: rows.map((row) => (_jsxs("li", { className: 'grid grid-cols-[1.25rem_minmax(0,1fr)] items-start gap-3', "data-action": row.key, children: [_jsx("span", { "aria-hidden": true, className: 'mt-0.5 inline-flex size-5 items-center justify-center text-muted-foreground', children: row.icon }), _jsxs("div", { className: 'min-w-0', children: [_jsx("strong", { className: 'font-medium', children: row.label }), _jsx("p", { className: 'text-sm text-muted-foreground [overflow-wrap:anywhere]', children: row.hint })] })] }, row.key))) }) }));
15
+ }
16
+ //# sourceMappingURL=ActionsHelp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActionsHelp.js","sourceRoot":"","sources":["../../../src/react/components/ActionsHelp.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAoBnC;;;;;;;;;GASG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,GAAG,eAAe,EAAoB;IACvG,OAAO,CACL,KAAC,KAAK,IAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,IAAI,EAAC,KAAK,EAAE,KAAK,YACzD,2BAAgB,SAAS,EAAE,SAAS,EAAC,qBAAqB,YACvD,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACjB,cAAI,SAAS,EAAC,0DAA0D,iBAAc,GAAG,CAAC,GAAG,aAC3F,oCAAkB,SAAS,EAAC,6EAA6E,YACtG,GAAG,CAAC,IAAI,GACJ,EACP,eAAK,SAAS,EAAC,SAAS,aACtB,iBAAQ,SAAS,EAAC,aAAa,YAAE,GAAG,CAAC,KAAK,GAAU,EACpD,YAAG,SAAS,EAAC,wDAAwD,YAAE,GAAG,CAAC,IAAI,GAAK,IAChF,KAP4F,GAAG,CAAC,GAAG,CAQtG,CACN,CAAC,GACC,GACC,CACT,CAAC;AACJ,CAAC"}
@@ -614,7 +614,9 @@ export { AUTO_TRACK_FLOOR_PX };
614
614
  export declare function declaredTrackFloor(columns: readonly {
615
615
  width?: number | string;
616
616
  minWidth?: number;
617
- }[], hasActions?: boolean): number;
617
+ }[],
618
+ /** `true` for the standard actions track, or that track's own width in px. */
619
+ hasActions?: boolean | number): number;
618
620
  /**
619
621
  * What one header click does to the sort STACK.
620
622
  *
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../../src/react/components/DataTable/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EAMvB,KAAK,eAAe,EAEpB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,aAAa,EACb,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAKV,UAAU,EACV,SAAS,EAEV,MAAM,OAAO,CAAC;AAEf,OAAO,EAAgC,KAAK,GAAG,EAA2F,MAAM,OAAO,CAAC;AAQxJ,OAAO,KAAK,E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uB,EACvB,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,UAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,SAAgB,EAChB,WAAW,EAAE,eAAe,EAC5B,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,gBAAgB,EAAE,oBAAoB,EACtC,wBAAwB,EACxB,iBAAiB,GAClB,EAAE,cAAc,CAAC,IAAI,CAAC,+BA0+CtB"}
1
+ {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../../src/react/components/DataTable/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EAMvB,KAAK,eAAe,EAEpB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,aAAa,EACb,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAKV,UAAU,EACV,SAAS,EAEV,MAAM,OAAO,CAAC;AAEf,OAAO,EAAgC,KAAK,GAAG,EAA2F,MAAM,OAAO,CAAC;AAQxJ,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAO3D,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,KAAK,cAAc,EAAgB,MAAM,cAAc,CAAC;AAEjE,OAAO,KAAK,EACV,MAAM,EACN,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACd,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,mBAAmB,EAAuC,MAAM,qBAAqB,CAAC;AAG/F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAuBtD;;;;;;GAMG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAE3D;AAyCD,OAAO,QA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SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7D,GAAG,EAAE,CAAC,EACN,KAAK,EAAE,iBAAiB,GAAG,SAAS,GACnC,CAAC,GAAG,iBAAiB,CAcvB;AAUD;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC9D,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,SAAS,EACT,WAAW,EACX,OAAO,EACP,YAAY,EACZ,SAAS,EACT,OAAO,EACP,UAAU,EACV,OAAO,EACP,QAAa,EACb,eAAe,EACf,cAAc,EACd,OAAO,EACP,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,GAAW,EACX,aAAa,EACb,UAAU,EACV,UAAU,EACV,YAAY,EACZ,SAAS,EACT,eAAe,EACf,WAAkB,EAClB,UAAU,EACV,SAAS,EACT,QAAQ,EACR,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,WAAW,EACX,OAAO,EAAE,WAAW,EACpB,oBAA2B,EAC3B,kBAAkB,EAClB,OAAuB,EACvB,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,UAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,SAAgB,EAChB,WAAW,EAAE,eAAe,EAC5B,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,gBAAgB,EAAE,oBAAoB,EACtC,wBAAwB,EACxB,iBAAiB,GAClB,EAAE,cAAc,CAAC,IAAI,CAAC,+BAg/CtB"}
@@ -111,6 +111,11 @@ function chainUpdaterResettingPage(set, setPagination, notify) {
111
111
  export { AUTO_TRACK_FLOOR_PX };
112
112
  /** The trailing row-actions column is a fixed `w-20`. */
113
113
  const ACTIONS_TRACK_PX = 80;
114
+ /**
115
+ * …or a fixed `w-11` (44px, a full tap target) when its only control is the row's ⋯: 80px for one
116
+ * kebab took 36px of a 390px phone row from the title (music, owner 2026-10-19).
117
+ */
118
+ const KEBAB_TRACK_PX = 44;
114
119
  /** The leading row-selection column is a fixed `w-11` (44px — a full tap target). */
115
120
  const SELECT_TRACK_PX = 44;
116
121
  /**
@@ -152,9 +157,11 @@ const SELECT_TRACK_PX = 44;
152
157
  * widths — verified 2026-08-14. happy-dom computes no layout, so no `bun test`
153
158
  * spec here can see it.
154
159
  */
155
- export function declaredTrackFloor(columns, hasActions = false) {
160
+ export function declaredTrackFloor(columns,
161
+ /** `true` for the standard actions track, or that track's own width in px. */
162
+ hasActions = false) {
156
163
  const columnsTotal = columns.reduce((sum, col) => sum + columnFloor(col), 0);
157
- return columnsTotal + (hasActions ? ACTIONS_TRACK_PX : 0);
164
+ return columnsTotal + (typeof hasActions === 'number' ? hasActions : hasActions ? ACTIONS_TRACK_PX : 0);
158
165
  }
159
166
  /**
160
167
  * What one header click does to the sort STACK.
@@ -814,6 +821,8 @@ export function DataTable({ columns, data, getRowId, onRowClick, onRowEdit, onRo
814
821
  /** The spacers belong to the tier on screen; the hidden ones hold no rows and no padding. */
815
822
  const tierPad = (t) => virtualEnabled && activeTier === t ? { paddingTop: padTop, paddingBottom: padBottom } : undefined;
816
823
  const hasActions = !!(onRowEdit || onRowDelete || rowMenu || rowAction);
824
+ const kebabOnly = !!rowMenu && !onRowEdit && !onRowDelete && !rowAction;
825
+ const actionsTrackPx = kebabOnly ? KEBAB_TRACK_PX : ACTIONS_TRACK_PX;
817
826
  // The totals row (ColDef.footer): drawn only when a visible column has one, over the same
818
827
  // leaf headers the <thead> draws, so it can never fall out of step with the column tracks.
819
828
  const leafHeaders = table.getHeaderGroups().at(-1)?.headers ?? [];
@@ -951,10 +960,10 @@ export function DataTable({ columns, data, getRowId, onRowClick, onRowEdit, onRo
951
960
  setTier(tierForWidth(outerRef.current));
952
961
  }, [narrowTiers]);
953
962
  const droppedByWidth = hasPriority
954
- ? columnsDroppedForWidth(cardColumns, measuredWidth, (hasActions ? ACTIONS_TRACK_PX : 0) + (selectionShown ? SELECT_TRACK_PX : 0))
963
+ ? columnsDroppedForWidth(cardColumns, measuredWidth, (hasActions ? actionsTrackPx : 0) + (selectionShown ? SELECT_TRACK_PX : 0))
955
964
  : NOTHING_DROPPED;
956
965
  const tableMinWidth = fixedLayout
957
- ? Math.max(minTableWidth ?? 0, declaredTrackFloor(cardColumns.filter((c) => !droppedByWidth.has(c.key)), hasActions) + (selectionShown ? SELECT_TRACK_PX : 0))
966
+ ? Math.max(minTableWidth ?? 0, declaredTrackFloor(cardColumns.filter((c) => !droppedByWidth.has(c.key)), hasActions && actionsTrackPx) + (selectionShown ? SELECT_TRACK_PX : 0))
958
967
  : minTableWidth;
959
968
  return (_jsxs("div", { ref: outerRef, className: cn('@container flex min-h-0 flex-col', className), children: [toolbarNode, summaryNode != null ? (_jsx("div", { "data-cb-table-selection-summary": '', "aria-live": 'polite', className: 'flex min-h-11 flex-wrap items-center gap-3 border-b border-border px-4 py-2 text-sm', children: summaryNode })) : null, loading ? (_jsx("div", { className: 'flex flex-col gap-2 p-4', children: Array.from({ length: 5 }).map((_, i) => (_jsx(Skeleton, { className: 'h-10 w-full' }, `dt-skeleton-${i}`))) })) : rows.length === 0 && windowTotal === 0 ? (_jsx("div", { className: 'p-2', children: emptyState ??
960
969
  // STA-3: rows exist and the reader's search or filters hid them all — say so, and
@@ -1069,7 +1078,11 @@ export function DataTable({ columns, data, getRowId, onRowClick, onRowEdit, onRo
1069
1078
  return (_jsxs(_Fragment, { children: [hg.headers.filter(isLeading).map((h) => renderHeader(h, -1)), selectionShown ? (_jsx("th", { scope: 'col', "data-cb-selection-cell": '', className: cn('w-11 border-b border-border px-0 text-center', stickyHeader && 'sticky top-0 z-10 bg-card/95 backdrop-blur-sm', stickyFirstColumn && 'sticky left-0 bg-card', stickyFirstColumn && (stickyHeader ? 'z-30' : 'z-20')), children: headerCheckbox() })) : null, hg.headers.filter((h) => !isLeading(h)).map(renderHeader)] }));
1070
1079
  })(), hasActions ? (_jsx("th", { className: cn(
1071
1080
  // A fixed trailing track (DAT-12): the ⋯ lines up down the list.
1072
- rowAction ? 'w-32 border-b border-border px-2' : 'w-20 border-b border-border px-2', stickyHeader && 'sticky top-0 z-10 bg-card/95 backdrop-blur-sm'), "aria-label": 'Row actions' })) : null] }, hg.id))) }), _jsxs("tbody", { ref: activeTier === 'grid' ? bodyRef : undefined, children: [padTop > 0 && activeTier === 'grid' ? (_jsx("tr", { "aria-hidden": true, style: { height: padTop }, children: _jsx("td", { colSpan: visibleColumnCount }) })) : null, (activeTier === 'grid' ? bodyRows : []).map((row, sliceIndex) => {
1081
+ rowAction
1082
+ ? 'w-32 border-b border-border px-2'
1083
+ : kebabOnly
1084
+ ? 'w-11 border-b border-border px-0'
1085
+ : 'w-20 border-b border-border px-2', stickyHeader && 'sticky top-0 z-10 bg-card/95 backdrop-blur-sm'), "aria-label": 'Row actions' })) : null] }, hg.id))) }), _jsxs("tbody", { ref: activeTier === 'grid' ? bodyRef : undefined, children: [padTop > 0 && activeTier === 'grid' ? (_jsx("tr", { "aria-hidden": true, style: { height: padTop }, children: _jsx("td", { colSpan: visibleColumnCount }) })) : null, (activeTier === 'grid' ? bodyRows : []).map((row, sliceIndex) => {
1073
1086
  if (row === null) {
1074
1087
  // A row the server window has not loaded yet: the estimated height, so
1075
1088
  // the spacer arithmetic holds, and a skeleton line rather than a gap.
@@ -1155,7 +1168,7 @@ export function DataTable({ columns, data, getRowId, onRowClick, onRowEdit, onRo
1155
1168
  : 'var(--color-card)',
1156
1169
  }
1157
1170
  : undefined, "data-cb-selection-cell": '', className: cn('w-11 cursor-pointer px-0 text-center align-middle', stickyFirstColumn && 'sticky left-0 z-10 bg-[var(--cb-frozen-bg)]'), children: rowCheckbox(row) })) : null, cells.filter((cell) => !isLeading(cell)).map(renderCell)] }));
1158
- })(), hasActions ? (_jsx("td", { className: 'px-2 py-2', children: _jsx(RowActions, { row: row.original, onEdit: onRowEdit, onDelete: onRowDelete, menu: rowMenu?.(row.original), menuLabel: rowMenuLabel?.(row.original), action: rowAction?.(row.original) ?? undefined, menuOpen: contextMenuRowId === row.id, onMenuOpenChange: (open) => setContextMenuRowId(open ? row.id : null) }) })) : null] }), isExpanded ? (_jsx("tr", { className: 'border-b border-border bg-muted/20', ref: (el) => {
1171
+ })(), hasActions ? (_jsx("td", { className: kebabOnly ? 'px-0 py-2' : 'px-2 py-2', children: _jsx(RowActions, { row: row.original, onEdit: onRowEdit, onDelete: onRowDelete, menu: rowMenu?.(row.original), menuLabel: rowMenuLabel?.(row.original), action: rowAction?.(row.original) ?? undefined, menuOpen: contextMenuRowId === row.id, onMenuOpenChange: (open) => setContextMenuRowId(open ? row.id : null) }) })) : null] }), isExpanded ? (_jsx("tr", { className: 'border-b border-border bg-muted/20', ref: (el) => {
1159
1172
  if (el && scrolledExpansionRef.current !== row.id) {
1160
1173
  scrolledExpansionRef.current = row.id;
1161
1174
  // A row expanded near the fold must reveal its panel.