cursedbelt 5.52.2 → 5.54.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 (106) hide show
  1. package/dist/react/activity-bar/ActivityBar.d.ts +39 -3
  2. package/dist/react/activity-bar/ActivityBar.d.ts.map +1 -1
  3. package/dist/react/activity-bar/ActivityBar.js +214 -6
  4. package/dist/react/activity-bar/ActivityBar.js.map +1 -1
  5. package/dist/react/activity-bar/activityBar.css +95 -10
  6. package/dist/react/canvas-hud/HudControls.d.ts.map +1 -1
  7. package/dist/react/canvas-hud/HudControls.js +1 -1
  8. package/dist/react/canvas-hud/HudControls.js.map +1 -1
  9. package/dist/react/components/Button.d.ts +5 -4
  10. package/dist/react/components/Button.d.ts.map +1 -1
  11. package/dist/react/components/Button.js +3 -1
  12. package/dist/react/components/Button.js.map +1 -1
  13. package/dist/react/components/ListPanel.d.ts +40 -0
  14. package/dist/react/components/ListPanel.d.ts.map +1 -0
  15. package/dist/react/components/ListPanel.js +32 -0
  16. package/dist/react/components/ListPanel.js.map +1 -0
  17. package/dist/react/components/NativeSelect.d.ts.map +1 -1
  18. package/dist/react/components/NativeSelect.js +4 -2
  19. package/dist/react/components/NativeSelect.js.map +1 -1
  20. package/dist/react/components/SectionNav.d.ts +39 -0
  21. package/dist/react/components/SectionNav.d.ts.map +1 -0
  22. package/dist/react/components/SectionNav.js +76 -0
  23. package/dist/react/components/SectionNav.js.map +1 -0
  24. package/dist/react/components/Tooltip.d.ts +4 -2
  25. package/dist/react/components/Tooltip.d.ts.map +1 -1
  26. package/dist/react/components/Tooltip.js.map +1 -1
  27. package/dist/react/components/TooltipImpl.d.ts +0 -5
  28. package/dist/react/components/TooltipImpl.d.ts.map +1 -1
  29. package/dist/react/components/TooltipImpl.js +68 -0
  30. package/dist/react/components/TooltipImpl.js.map +1 -1
  31. package/dist/react/components/TreeView.js +14 -1
  32. package/dist/react/components/TreeView.js.map +1 -1
  33. package/dist/react/disk-usage/DiskUsageTree.d.ts +28 -3
  34. package/dist/react/disk-usage/DiskUsageTree.d.ts.map +1 -1
  35. package/dist/react/disk-usage/DiskUsageTree.js +93 -15
  36. package/dist/react/disk-usage/DiskUsageTree.js.map +1 -1
  37. package/dist/react/index.d.ts +2 -0
  38. package/dist/react/index.d.ts.map +1 -1
  39. package/dist/react/index.js +3 -0
  40. package/dist/react/index.js.map +1 -1
  41. package/dist/react/lib/cn.d.ts.map +1 -1
  42. package/dist/react/lib/cn.js +11 -1
  43. package/dist/react/lib/cn.js.map +1 -1
  44. package/dist/react/lib/infoHint.d.ts +6 -2
  45. package/dist/react/lib/infoHint.d.ts.map +1 -1
  46. package/dist/react/lib/infoHint.js +6 -2
  47. package/dist/react/lib/infoHint.js.map +1 -1
  48. package/dist/react/nav/PlaceBar.d.ts.map +1 -1
  49. package/dist/react/nav/PlaceBar.js +9 -4
  50. package/dist/react/nav/PlaceBar.js.map +1 -1
  51. package/dist/react/place-bar/index.d.ts +2 -0
  52. package/dist/react/place-bar/index.d.ts.map +1 -0
  53. package/dist/react/place-bar/index.js +9 -0
  54. package/dist/react/place-bar/index.js.map +1 -0
  55. package/dist/styles-areas/analytics.css +11 -11
  56. package/dist/styles-areas/calendar.css +14 -15
  57. package/dist/styles-areas/chart-table.css +2 -2
  58. package/dist/styles-areas/core.css +36 -34
  59. package/dist/styles-areas/dashboard-grid.css +3 -3
  60. package/dist/styles-areas/disk-usage.css +5 -4
  61. package/dist/styles-areas/fields.css +4 -3
  62. package/dist/styles-areas/layout-engine.css +10 -10
  63. package/dist/styles-areas/media.css +10 -10
  64. package/dist/styles-areas/nav.css +7 -7
  65. package/dist/styles-areas/place-bar.css +33 -0
  66. package/dist/styles-areas/workbench.css +3 -3
  67. package/dist/styles-utilities.css +40 -0
  68. package/package.json +21 -2
  69. package/scripts/styleAreas.ts +8 -0
  70. package/src/react/activity-bar/ActivityBar.spec.tsx +106 -1
  71. package/src/react/activity-bar/ActivityBar.tsx +221 -16
  72. package/src/react/activity-bar/activityBar.css +95 -10
  73. package/src/react/canvas-hud/HudControls.tsx +0 -1
  74. package/src/react/components/Button.tsx +9 -5
  75. package/src/react/components/InfoHint.spec.tsx +10 -0
  76. package/src/react/components/ListPanel.spec.tsx +73 -0
  77. package/src/react/components/ListPanel.tsx +97 -0
  78. package/src/react/components/NativeSelect.spec.tsx +10 -0
  79. package/src/react/components/NativeSelect.tsx +4 -2
  80. package/src/react/components/SectionNav.spec.tsx +98 -0
  81. package/src/react/components/SectionNav.tsx +143 -0
  82. package/src/react/components/Tooltip.tsx +4 -2
  83. package/src/react/components/TooltipImpl.tsx +74 -1
  84. package/src/react/components/TreeView.spec.tsx +28 -0
  85. package/src/react/components/TreeView.tsx +12 -1
  86. package/src/react/disk-usage/DiskUsage.spec.tsx +96 -0
  87. package/src/react/disk-usage/DiskUsageTree.tsx +193 -29
  88. package/src/react/index.ts +3 -0
  89. package/src/react/lib/cn.spec.ts +7 -0
  90. package/src/react/lib/cn.ts +11 -1
  91. package/src/react/lib/infoHint.ts +6 -2
  92. package/src/react/nav/PlaceBar.tsx +9 -5
  93. package/src/react/place-bar/index.ts +8 -0
  94. package/src/styles-areas/analytics.css +11 -11
  95. package/src/styles-areas/calendar.css +14 -15
  96. package/src/styles-areas/chart-table.css +2 -2
  97. package/src/styles-areas/core.css +36 -34
  98. package/src/styles-areas/dashboard-grid.css +3 -3
  99. package/src/styles-areas/disk-usage.css +5 -4
  100. package/src/styles-areas/fields.css +4 -3
  101. package/src/styles-areas/layout-engine.css +10 -10
  102. package/src/styles-areas/media.css +10 -10
  103. package/src/styles-areas/nav.css +7 -7
  104. package/src/styles-areas/place-bar.css +33 -0
  105. package/src/styles-areas/workbench.css +3 -3
  106. package/src/styles-utilities.css +40 -0
@@ -49,6 +49,20 @@
49
49
  * {@link ActivityBarItem.render} takes the consumer's own popover, and
50
50
  * {@link ActivityBarItem.hasMenu}/{@link ActivityBarItem.menuOpen} say so to a screen reader.
51
51
  *
52
+ * ── 🔴 It shows its WORDS on demand (NAV-2, forge task 2748) ───────────────────────────
53
+ * An icon-only rail is a row of riddles: `DESIGN.md`'s NAV-2 wants every navigation surface
54
+ * to be able to say what each glyph is without a hover on each one. So the column stays 48px
55
+ * and EXPANDS, as an overlay over whatever is beside it (nothing reflows), into icon + label
56
+ * rows — the hover-expand rail Gmail and the Azure portal draw, and the labelled activity
57
+ * bar VS Code's own users keep asking for. Three ways in, one for each kind of hand:
58
+ * · a mouse resting on the rail for {@link EXPAND_HOVER_MS} (the delay is what lets a pointer
59
+ * cross the rail on its way to the sidebar without the rail flaring at it);
60
+ * · keyboard focus arriving in it (`:focus-visible`), so tabbing reads the words too;
61
+ * · a touch-and-hold of {@link EXPAND_PRESS_MS} on any control — the hold is swallowed, so
62
+ * reading the labels never also presses the button under the thumb.
63
+ * It folds again when the mouse leaves, focus leaves, a touch lands outside it, Escape is
64
+ * pressed, or a control is chosen. {@link ActivityBarProps.expandable} `false` opts out.
65
+ *
52
66
  * ── Plain CSS, deliberately ─────────────────────────────────────────────────────────────
53
67
  * `activityBar.css` under the `cbab-` prefix, the same convention (and the same reason) as
54
68
  * `fileTree.css` and `denseGallery.css`: this mounts inside apps whose Tailwind build cannot
@@ -56,7 +70,7 @@
56
70
  * ships a NARROWED `@source` list and has already shipped one unstyled control from exactly
57
71
  * that gap.
58
72
  */
59
- import type { JSX, ReactNode } from 'react';
73
+ import { type JSX, type ReactNode } from 'react';
60
74
  import './activityBar.css';
61
75
  /**
62
76
  * One control in the strip.
@@ -85,7 +99,12 @@ export interface ActivityBarItem {
85
99
  icon?: ReactNode;
86
100
  /** Drawn as the view you are in — a hairline, not a box. See the file header. */
87
101
  active?: boolean;
88
- onSelect?: () => void;
102
+ /**
103
+ * The press. It is handed the button that was pressed, so a control that opens a popover can
104
+ * anchor it — and name it as the trigger, so a second press closes rather than re-opens —
105
+ * without needing a {@link render} slot of its own.
106
+ */
107
+ onSelect?: (trigger: HTMLButtonElement) => void;
89
108
  /**
90
109
  * Why this cannot act right now. Present ⇒ the control is DISABLED and says why on hover,
91
110
  * never hidden — `DESIGN.md`'s standing rule, and the reason an owner UI is one UI.
@@ -100,6 +119,13 @@ export interface ActivityBarItem {
100
119
  * says *look here*; what the number is belongs to whatever the button opens.
101
120
  */
102
121
  badge?: boolean;
122
+ /**
123
+ * How many — drawn at the END of the expanded row only (Gmail's expanded rail: "Inbox 3"),
124
+ * where there is room for a number at full size. Collapsed, the 20px glyph has none, which
125
+ * is why {@link badge} stays a dot; put the number in {@link title} as well so a hover
126
+ * reads it there. Zero or absent draws nothing.
127
+ */
128
+ count?: number;
103
129
  /**
104
130
  * Render this instead of a button. For a widget the consumer already owns — an account
105
131
  * menu, a fleet launcher — that has to keep its own behaviour and its own popover.
@@ -122,6 +148,16 @@ export interface ActivityBarProps {
122
148
  /** Names the whole column for a screen reader. */
123
149
  ariaLabel?: string;
124
150
  className?: string;
151
+ /**
152
+ * Expand into icon + label rows on a hover, keyboard focus or touch-and-hold — see the file
153
+ * header. Default `true`: NAV-2 is the design law, not a preference. `false` keeps the
154
+ * icon-only column (a rail whose every control is already named beside it).
155
+ */
156
+ expandable?: boolean;
125
157
  }
126
- export declare function ActivityBar({ top, bottom, ariaLabel, className, }: ActivityBarProps): JSX.Element;
158
+ /** How long a mouse rests on the rail before it opens its words. */
159
+ export declare const EXPAND_HOVER_MS = 350;
160
+ /** How long a touch holds before the rail opens its words — Android's long-press. */
161
+ export declare const EXPAND_PRESS_MS = 450;
162
+ export declare function ActivityBar({ top, bottom, ariaLabel, className, expandable, }: ActivityBarProps): JSX.Element;
127
163
  //# sourceMappingURL=ActivityBar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActivityBar.d.ts","sourceRoot":"","sources":["../../../src/react/activity-bar/ActivityBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,E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EACT,UAAiB,GAClB,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CA6BhC"}
@@ -1,22 +1,230 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * The far-left icon strip — a full-height rail of icon-only controls, VSCode-shaped.
4
+ *
5
+ * ── Where it came from ──────────────────────────────────────────────────────────────────
6
+ * Owner, of `cursed-embeddable-spreadsheet`: *"put the light/dark mode icon, settings icon,
7
+ * magnifier glass search icon and other icons that would be a good fit in a far left narrow
8
+ * strip column like vscode does for many icons. We can use this to eliminate clutter and
9
+ * extra rows that hold these types of items."* — and then, of collections, 2026-09-08:
10
+ * *"I also want the far left thin column with the sidebar collapse and expand icon, the
11
+ * search icon, the menu for unique settings, the full screen icon, the dark/light icon, and
12
+ * the main settings cog icon. The top two rows will go away."*
13
+ *
14
+ * 🔴 **It REPLACES a header rather than joining one.** That is the whole stated reason it
15
+ * exists: a strip *beside* a header keeps every row it was built to remove. A consumer that
16
+ * mounts this and keeps its `<header>` has bought 48 pixels of width and saved nothing.
17
+ *
18
+ * ── Why the shape is this shape ─────────────────────────────────────────────────────────
19
+ * 48px wide — two 14px margins either side of a 20px glyph, which is what every editor of
20
+ * this kind settled on. Two groups: {@link ActivityBarProps.top}, the things that change
21
+ * what is on screen, and {@link ActivityBarProps.bottom}, the things that are true of the
22
+ * *application*, pinned to the floor because that is the convention and needs no explaining.
23
+ *
24
+ * It is the full height of the window and sits OUTSIDE whatever it is left of, so the column
25
+ * reads as one edge rather than as something that starts halfway down — and so a sidebar
26
+ * resizer that measures its own container's left edge does not have to subtract 48.
27
+ *
28
+ * ── 🔴 The active state is a hairline, not a box ────────────────────────────────────────
29
+ * Owner, 2026-09-08, looking at the strip this was ported from: *"the sidebar collapse and
30
+ * expand icon (although without the big border and highlight it somehow is showing in the
31
+ * image)"*. A focus ring drawn around a pressed icon reads as a selected form control. What
32
+ * says "this view is the one you are in" here is a 2px accent bar on the inside edge and a
33
+ * brighter glyph — the same language the file tree's selected row uses, so a person learns
34
+ * it once.
35
+ *
36
+ * ── 🔴 The graduation verdict, 2026-09-13: THIS one, unchanged ──────────────────────────
37
+ * `cursedesk` has an `ActivityBar.tsx` of its own and the pair was compared to decide which
38
+ * should be the shared one. Nothing moved here, and the reason is that they are not two
39
+ * versions of one component: this is a RAIL that takes {@link ActivityBarProps.top} and
40
+ * {@link ActivityBarProps.bottom} and draws whatever is in them; the app's is one particular
41
+ * seven-button composition — Explorer, Search, ⌘P, the command menu, full screen, theme,
42
+ * settings — hard-wired to that app's `primitives.tsx` and `shortcuts.ts`, with every prop
43
+ * (`searchOpen`, `onSwitcher`, `shortcutPrefs`, `commandUnavailable`) naming one of them.
44
+ *
45
+ * A design system cannot hold that: `onSwitcher` is a door onto a file finder and
46
+ * `shortcutPrefs` is a preferences table, neither of which a rail has any business knowing.
47
+ * So the app's copy is deleted rather than moved, and its seven buttons become seven
48
+ * `ActivityBarItem`s built where the app's state already lives. The one thing it has that
49
+ * this does not — a command menu rendered by the rail itself — is already expressible:
50
+ * {@link ActivityBarItem.render} takes the consumer's own popover, and
51
+ * {@link ActivityBarItem.hasMenu}/{@link ActivityBarItem.menuOpen} say so to a screen reader.
52
+ *
53
+ * ── 🔴 It shows its WORDS on demand (NAV-2, forge task 2748) ───────────────────────────
54
+ * An icon-only rail is a row of riddles: `DESIGN.md`'s NAV-2 wants every navigation surface
55
+ * to be able to say what each glyph is without a hover on each one. So the column stays 48px
56
+ * and EXPANDS, as an overlay over whatever is beside it (nothing reflows), into icon + label
57
+ * rows — the hover-expand rail Gmail and the Azure portal draw, and the labelled activity
58
+ * bar VS Code's own users keep asking for. Three ways in, one for each kind of hand:
59
+ * · a mouse resting on the rail for {@link EXPAND_HOVER_MS} (the delay is what lets a pointer
60
+ * cross the rail on its way to the sidebar without the rail flaring at it);
61
+ * · keyboard focus arriving in it (`:focus-visible`), so tabbing reads the words too;
62
+ * · a touch-and-hold of {@link EXPAND_PRESS_MS} on any control — the hold is swallowed, so
63
+ * reading the labels never also presses the button under the thumb.
64
+ * It folds again when the mouse leaves, focus leaves, a touch lands outside it, Escape is
65
+ * pressed, or a control is chosen. {@link ActivityBarProps.expandable} `false` opts out.
66
+ *
67
+ * ── Plain CSS, deliberately ─────────────────────────────────────────────────────────────
68
+ * `activityBar.css` under the `cbab-` prefix, the same convention (and the same reason) as
69
+ * `fileTree.css` and `denseGallery.css`: this mounts inside apps whose Tailwind build cannot
70
+ * see this package's classes, so the look has to travel with the component. collections
71
+ * ships a NARROWED `@source` list and has already shipped one unstyled control from exactly
72
+ * that gap.
73
+ */
74
+ import { useCallback, useEffect, useRef, useState, } from 'react';
2
75
  import { Tooltip } from '../components/Tooltip.js';
3
76
  import './activityBar.css';
4
- function ActivityButton({ item }) {
77
+ /** How long a mouse rests on the rail before it opens its words. */
78
+ export const EXPAND_HOVER_MS = 350;
79
+ /** How long a touch holds before the rail opens its words — Android's long-press. */
80
+ export const EXPAND_PRESS_MS = 450;
81
+ /** A hold that drifts further than this is a scroll or a drag, not a press. */
82
+ const PRESS_SLOP_PX = 10;
83
+ function ActivityButton({ item, onChosen }) {
5
84
  const disabled = item.unavailableReason !== undefined;
6
85
  const button = (_jsxs("button", {
7
86
  // guardrails-ignore no-raw-action-button: THE rail's own icon control, styled by this
8
87
  // module's self-contained plain CSS. cursedbelt's `Button` runs on the Tailwind token
9
88
  // layer, which fights `.cbab-btn`'s fixed 48px column geometry on cascade order rather
10
89
  // than composing with it — the same split `GalleryActionButton` records.
11
- type: 'button', className: 'cbab-btn', "data-active": item.active || undefined, onClick: disabled ? undefined : item.onSelect, "aria-disabled": disabled || undefined, ...(item.active === undefined ? {} : { 'aria-pressed': item.active }), ...(item.hasMenu ? { 'aria-haspopup': 'menu', 'aria-expanded': item.menuOpen === true } : {}), "aria-label": item.label, children: [_jsx("span", { className: 'cbab-glyph', "aria-hidden": 'true', children: item.icon }), item.badge ? _jsx("span", { className: 'cbab-badge', "aria-hidden": 'true' }) : null] }));
90
+ type: 'button', className: 'cbab-btn', "data-active": item.active || undefined, onClick: disabled
91
+ ? undefined
92
+ : (event) => {
93
+ item.onSelect?.(event.currentTarget);
94
+ onChosen();
95
+ }, "aria-disabled": disabled || undefined, ...(item.active === undefined ? {} : { 'aria-pressed': item.active }), ...(item.hasMenu ? { 'aria-haspopup': 'menu', 'aria-expanded': item.menuOpen === true } : {}), "aria-label": item.label, children: [_jsxs("span", { className: 'cbab-glyph', "aria-hidden": 'true', children: [item.icon, item.badge ? _jsx("span", { className: 'cbab-badge' }) : null] }), _jsx("span", { className: 'cbab-label', "aria-hidden": 'true', children: item.label }), item.count ? (_jsx("span", { className: 'cbab-count', "aria-hidden": 'true', children: item.count.toLocaleString() })) : null] }));
12
96
  return (_jsx(Tooltip, { content: item.unavailableReason ?? item.title ?? item.label, side: 'right', children: button }));
13
97
  }
14
- function Group({ items }) {
98
+ function Group({ items, onChosen }) {
15
99
  if (items.length === 0)
16
100
  return null;
17
- return (_jsx("div", { className: 'cbab-group', children: items.map((item) => item.render === undefined ? (_jsx(ActivityButton, { item: item }, item.id)) : (_jsx("div", { className: 'cbab-slot', children: item.render }, item.id))) }));
101
+ return (_jsx("div", { className: 'cbab-group', children: items.map((item) => item.render === undefined ? (_jsx(ActivityButton, { item: item, onChosen: onChosen }, item.id)) : (_jsxs("div", { className: 'cbab-slotrow', children: [_jsx("div", { className: 'cbab-slot', children: item.render }), _jsx("span", { className: 'cbab-label', "aria-hidden": 'true', children: item.label })] }, item.id))) }));
18
102
  }
19
- export function ActivityBar({ top, bottom = [], ariaLabel = 'Views and settings', className, }) {
20
- return (_jsxs("fieldset", { className: className ? `cbab ${className}` : 'cbab', "aria-label": ariaLabel, children: [_jsx(Group, { items: top }), _jsx("div", { className: 'cbab-spacer' }), _jsx(Group, { items: bottom })] }));
103
+ /** `:focus-visible` — a keyboard arrival, not a click. Old engines without it count as one. */
104
+ function focusVisible(node) {
105
+ try {
106
+ return node.matches(':focus-visible');
107
+ }
108
+ catch {
109
+ return true;
110
+ }
111
+ }
112
+ /**
113
+ * The expand machinery, apart from the markup so the rules read in one place. Each way in
114
+ * remembers WHICH way it came, because each way out only undoes its own: a mouse leaving must
115
+ * not fold a rail the keyboard opened, and a focus leaving must not fold one the hand holds.
116
+ */
117
+ function useExpand(enabled) {
118
+ const [by, setBy] = useState(null);
119
+ const root = useRef(null);
120
+ const hoverTimer = useRef(undefined);
121
+ const press = useRef({
122
+ x: 0,
123
+ y: 0,
124
+ held: false,
125
+ });
126
+ const clearHover = () => {
127
+ if (hoverTimer.current !== undefined)
128
+ clearTimeout(hoverTimer.current);
129
+ hoverTimer.current = undefined;
130
+ };
131
+ const clearPress = () => {
132
+ if (press.current.timer !== undefined)
133
+ clearTimeout(press.current.timer);
134
+ press.current.timer = undefined;
135
+ };
136
+ // Refs only, so it is stable across renders — it is handed to every control as `onChosen`.
137
+ const collapse = useCallback(() => {
138
+ clearTimeout(hoverTimer.current);
139
+ hoverTimer.current = undefined;
140
+ clearTimeout(press.current.timer);
141
+ press.current.timer = undefined;
142
+ setBy(null);
143
+ }, []);
144
+ // Timers die with the rail; a late one would set state on nothing.
145
+ useEffect(() => () => {
146
+ clearTimeout(hoverTimer.current);
147
+ clearTimeout(press.current.timer);
148
+ }, []);
149
+ // Opened by a hold, it folds on a touch anywhere else — there is no "pointer leaves" on glass.
150
+ useEffect(() => {
151
+ if (by !== 'press')
152
+ return;
153
+ const outside = (event) => {
154
+ if (!root.current?.contains(event.target))
155
+ setBy(null);
156
+ };
157
+ document.addEventListener('pointerdown', outside, true);
158
+ return () => document.removeEventListener('pointerdown', outside, true);
159
+ }, [by]);
160
+ if (!enabled)
161
+ return { root, by: null, handlers: {}, collapse };
162
+ const handlers = {
163
+ onPointerEnter(event) {
164
+ if (event.pointerType !== 'mouse' || by !== null)
165
+ return;
166
+ clearHover();
167
+ hoverTimer.current = setTimeout(() => setBy((current) => current ?? 'hover'), EXPAND_HOVER_MS);
168
+ },
169
+ onPointerLeave(event) {
170
+ if (event.pointerType !== 'mouse')
171
+ return;
172
+ clearHover();
173
+ setBy((current) => (current === 'hover' ? null : current));
174
+ },
175
+ onPointerDown(event) {
176
+ if (event.pointerType === 'mouse')
177
+ return;
178
+ clearPress();
179
+ press.current = { x: event.clientX, y: event.clientY, held: false };
180
+ press.current.timer = setTimeout(() => {
181
+ press.current.held = true;
182
+ press.current.timer = undefined;
183
+ setBy('press');
184
+ }, EXPAND_PRESS_MS);
185
+ },
186
+ onPointerMove(event) {
187
+ if (press.current.timer === undefined)
188
+ return;
189
+ if (Math.hypot(event.clientX - press.current.x, event.clientY - press.current.y) > PRESS_SLOP_PX)
190
+ clearPress();
191
+ },
192
+ onPointerUp: clearPress,
193
+ onPointerCancel: clearPress,
194
+ /* 🔴 The hold is SWALLOWED: the click a lifted thumb fires would otherwise press the very
195
+ control whose label it was reading. Capture phase, so the button never sees it. */
196
+ onClickCapture(event) {
197
+ if (!press.current.held)
198
+ return;
199
+ press.current.held = false;
200
+ event.preventDefault();
201
+ event.stopPropagation();
202
+ },
203
+ // iOS/Android raise their own long-press menu on the same gesture.
204
+ onContextMenu(event) {
205
+ if (press.current.held || press.current.timer !== undefined)
206
+ event.preventDefault();
207
+ },
208
+ onFocus(event) {
209
+ if (focusVisible(event.target))
210
+ setBy((current) => current ?? 'focus');
211
+ },
212
+ onBlur(event) {
213
+ if (root.current?.contains(event.relatedTarget))
214
+ return;
215
+ setBy((current) => (current === 'focus' ? null : current));
216
+ },
217
+ onKeyDown(event) {
218
+ if (event.key === 'Escape' && by !== null) {
219
+ event.stopPropagation();
220
+ collapse();
221
+ }
222
+ },
223
+ };
224
+ return { root, by, handlers, collapse };
225
+ }
226
+ export function ActivityBar({ top, bottom = [], ariaLabel = 'Views and settings', className, expandable = true, }) {
227
+ const { root, by, handlers, collapse } = useExpand(expandable);
228
+ return (_jsx("fieldset", { ref: root, className: className ? `cbab ${className}` : 'cbab', "aria-label": ariaLabel, "data-expandable": expandable || undefined, "data-expanded": by ?? undefined, ...handlers, children: _jsxs("div", { className: 'cbab-panel', children: [_jsx(Group, { items: top, onChosen: collapse }), _jsx("div", { className: 'cbab-spacer' }), _jsx(Group, { items: bottom, onChosen: collapse })] }) }));
21
229
  }
22
230
  //# sourceMappingURL=ActivityBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActivityBar.js","sourceRoot":"","sources":["../../../src/react/activity-bar/ActivityBar.tsx"],"names":[],"mappings":";AA2DA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,mBAAmB,CAAC;AAqE3B,SAAS,cAAc,CAAC,EAAE,IAAI,EAA6B;IACzD,MAAM,QAAQ,GAAG,IAAI,CAAC,iBAAiB,KAAK,SAAS,CAAC;IACtD,MAAM,MAAM,GAAG,CACb;QACE,sFAAsF;QACtF,sFAAsF;QACtF,uFAAuF;QACvF,yEAAyE;QACzE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,UAAU,iBACP,IAAI,CAAC,MAAM,IAAI,SAAS,EACrC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,mBAO9B,QAAQ,IAAI,SAAS,KAChC,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,KAClE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,MAAe,EAAE,eAAe,EAAE,IAAI,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,gBAC3F,IAAI,CAAC,KAAK,aAEtB,eAAM,SAAS,EAAC,YAAY,iBAAa,MAAM,YAC5C,IAAI,CAAC,IAAI,GACL,EACN,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,YAAY,iBAAa,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,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AS,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,SAAS,EAAE,CAAC,CAAC,CAAC,MAAM,gBACvC,SAAS,qBACJ,UAAU,IAAI,SAAS,mBACzB,EAAE,IAAI,SAAS,KAC1B,QAAQ,YAIZ,eAAK,SAAS,EAAC,YAAY,aACzB,KAAC,KAAK,IAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,GAAI,EAIzC,cAAK,SAAS,EAAC,aAAa,GAAG,EAC/B,KAAC,KAAK,IAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAI,IACxC,GACG,CACZ,CAAC;AACJ,CAAC"}
@@ -11,15 +11,31 @@
11
11
  padding by default, none of which a 48px column wants. */
12
12
  margin: 0;
13
13
  border: 0;
14
+ padding: 0;
14
15
  min-inline-size: 0;
15
- display: flex;
16
- flex-direction: column;
17
- align-items: center;
18
16
  /* 48px = two 14px margins either side of a 20px glyph. See the component header. */
19
17
  inline-size: 48px;
20
18
  flex: 0 0 48px;
21
19
  block-size: 100%;
22
20
  min-block-size: 0;
21
+ /* The panel inside is what draws, and what widens over the page when the rail expands;
22
+ this box only holds the 48px track so nothing beside it ever reflows. */
23
+ position: relative;
24
+ /* How wide the expanded rail is. A fixed measure rather than max-content, so it can
25
+ animate and so one long label cannot push the overlay across half a phone. */
26
+ --cbab-expanded: 15rem;
27
+ /* The hold that opens the words must not also select them or raise the OS callout. */
28
+ -webkit-touch-callout: none;
29
+ user-select: none;
30
+ }
31
+
32
+ .cbab-panel {
33
+ position: absolute;
34
+ inset-block: 0;
35
+ inset-inline-start: 0;
36
+ inline-size: 100%;
37
+ display: flex;
38
+ flex-direction: column;
23
39
  padding-block: 0.375rem;
24
40
  gap: 0.25rem;
25
41
  background: var(--surface-1, var(--background));
@@ -27,14 +43,32 @@
27
43
  /* The rail is chrome: nothing in it scrolls, and a stray overflow here would put a
28
44
  scrollbar down the 48px column rather than shrinking the glyphs. */
29
45
  overflow: hidden;
46
+ transition: inline-size 120ms ease-out, box-shadow 120ms ease-out;
47
+ }
48
+
49
+ .cbab[data-expanded] {
50
+ /* Over the sidebar and the document beside it, under a dialog. */
51
+ z-index: var(--z-sticky, 100);
52
+ }
53
+
54
+ .cbab[data-expanded] .cbab-panel {
55
+ inline-size: var(--cbab-expanded);
56
+ box-shadow: var(--shadow-overlay);
57
+ }
58
+
59
+ @media (prefers-reduced-motion: reduce) {
60
+ .cbab-panel {
61
+ transition: none;
62
+ }
30
63
  }
31
64
 
32
65
  .cbab-group {
33
66
  display: flex;
34
67
  flex-direction: column;
35
- align-items: center;
36
68
  gap: 0.125rem;
37
- inline-size: 100%;
69
+ /* 4px each side of a 40px control is the 48px column; expanded, the same inset keeps
70
+ every row's glyph exactly where it was, so the icons do not jump as the words arrive. */
71
+ padding-inline: 4px;
38
72
  }
39
73
 
40
74
  .cbab-spacer {
@@ -49,11 +83,16 @@
49
83
  position: relative;
50
84
  display: flex;
51
85
  align-items: center;
52
- justify-content: center;
86
+ justify-content: flex-start;
87
+ /* 10px puts a 20px glyph dead centre of a 40px square — and keeps it there expanded. */
88
+ gap: 12px;
89
+ padding-inline: 10px;
90
+ flex: 0 0 auto;
53
91
  inline-size: 40px;
54
92
  block-size: 40px;
55
- padding: 0;
93
+ padding-block: 0;
56
94
  border: 0;
95
+ white-space: nowrap;
57
96
  border-radius: var(--radius-sm, 0.375rem);
58
97
  background: transparent;
59
98
  color: var(--muted-foreground);
@@ -107,6 +146,8 @@
107
146
  }
108
147
 
109
148
  .cbab-glyph {
149
+ position: relative;
150
+ flex: 0 0 auto;
110
151
  display: flex;
111
152
  align-items: center;
112
153
  justify-content: center;
@@ -119,11 +160,12 @@
119
160
  block-size: 100%;
120
161
  }
121
162
 
122
- /* A dot, and only ever a dot — see `ActivityBarItem.badge` for why it carries no number. */
163
+ /* A dot, and only ever a dot — see `ActivityBarItem.badge` for why it carries no number.
164
+ On the glyph's corner rather than the button's, so it stays on the icon when the row widens. */
123
165
  .cbab-badge {
124
166
  position: absolute;
125
- inset-block-start: 7px;
126
- inset-inline-end: 7px;
167
+ inset-block-start: -3px;
168
+ inset-inline-end: -3px;
127
169
  inline-size: 7px;
128
170
  block-size: 7px;
129
171
  border-radius: 999px;
@@ -133,6 +175,46 @@
133
175
  box-shadow: 0 0 0 2px var(--surface-1, var(--background));
134
176
  }
135
177
 
178
+ /* ── The words ──────────────────────────────────────────────────────────────────────── */
179
+
180
+ .cbab-label {
181
+ display: none;
182
+ min-inline-size: 0;
183
+ overflow: hidden;
184
+ text-overflow: ellipsis;
185
+ white-space: nowrap;
186
+ font-size: 0.875rem;
187
+ line-height: 1.25rem;
188
+ font-weight: 500;
189
+ color: inherit;
190
+ }
191
+
192
+ .cbab-count {
193
+ display: none;
194
+ margin-inline-start: auto;
195
+ font-size: 0.75rem;
196
+ line-height: 1rem;
197
+ font-variant-numeric: tabular-nums;
198
+ color: var(--muted-foreground);
199
+ }
200
+
201
+ .cbab[data-expanded] .cbab-label,
202
+ .cbab[data-expanded] .cbab-count {
203
+ display: block;
204
+ }
205
+
206
+ .cbab[data-expanded] .cbab-btn {
207
+ inline-size: 100%;
208
+ }
209
+
210
+ /* A borrowed widget's row: its own 40px square, then its word beside it, not inside it. */
211
+ .cbab-slotrow {
212
+ display: flex;
213
+ align-items: center;
214
+ gap: 2px;
215
+ color: var(--muted-foreground);
216
+ }
217
+
136
218
  /*
137
219
  * A widget the consumer brought — an account menu, a theme toggle. It gets the column's
138
220
  * geometry and nothing else, so whatever is inside keeps its own behaviour and its own
@@ -140,6 +222,8 @@
140
222
  */
141
223
  .cbab-slot {
142
224
  cursor: default;
225
+ justify-content: center;
226
+ padding-inline: 0;
143
227
  }
144
228
 
145
229
  .cbab-slot > * {
@@ -160,5 +244,6 @@
160
244
  .cbab-slot {
161
245
  inline-size: 44px;
162
246
  block-size: 44px;
247
+ padding-inline: 12px;
163
248
  }
164
249
  }
@@ -1 +1 @@
1
- {"version":3,"file":"HudControls.d.ts","sourceRoot":"","sources":["../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QAAQ,EACR,SAAS,GACV,EAAE,oBAAoB,+BAuBtB;AAED,MAAM,WAAW,mBAAmB;IAClC,qFAAqF;IACrF,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,mBAAmB,+BAetE"}
@@ -5,7 +5,7 @@ import { IconCenter, IconFit, IconZoomIn, IconZoomOut } from '../icons.js';
5
5
  import { cn } from '../lib/cn.js';
6
6
  /** One HUD control — an icon-sized belt `IconButton`, with a pressed state for a toggle. */
7
7
  export function HudButton({ label, onClick, children, pressed, unavailableReason, className }) {
8
- return (_jsx(IconButton, { label: label, size: 'sm', "aria-pressed": pressed, unavailableReason: unavailableReason ?? undefined, tooltipMobile: 'off', onClick: onClick, className: cn('text-muted-foreground aria-pressed:bg-muted aria-pressed:text-foreground', className), children: children }));
8
+ return (_jsx(IconButton, { label: label, size: 'sm', "aria-pressed": pressed, unavailableReason: unavailableReason ?? undefined, onClick: onClick, className: cn('text-muted-foreground aria-pressed:bg-muted aria-pressed:text-foreground', className), children: children }));
9
9
  }
10
10
  /** CNV-3's essentials as one pill: −, the zoom %, +, Fit and Center. */
11
11
  export function HudZoomControls({ scale, onZoomIn, onZoomOut, onFit, onCenter, fitLabel = 'Fit to screen', centerLabel = 'Center on the selection', children, className, }) {
@@ -1 +1 @@
1
- {"version":3,"file":"HudControls.js","sourceRoot":"","sources":["../../../src/react/canvas-hud/HudControls.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AA4BlC,4FAA4F;AAC5F,M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X,+GAA+G,EAC/G,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,EAClC,SAAS,CACV,YAED,MAAC,OAAO,IAAC,SAAS,EAAC,qBAAqB,sBAAO,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,gBAAmB,GAChF,CACP,CAAC;AACJ,CAAC"}
@@ -44,10 +44,11 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, Va
44
44
  tooltip: Exclude<ReactNode, null | undefined>;
45
45
  /** Preferred tooltip side (auto-flips to stay on-screen). Default `'top'`. */
46
46
  tooltipSide?: TooltipPlacement;
47
- /** Touch affordance for the tooltip (Tooltip's `mobile`): `'icon'` (default) adds
48
- * the tappable ⓘ, `'tap'` toggles on tap, `'off'` renders no touch affordance —
49
- * use `'off'` when the tooltip merely restates the visible label/action, so
50
- * dense touch layouts don't sprout an ⓘ per control. */
47
+ /** Touch affordance for the tooltip (Tooltip's `mobile`): `'icon'` adds the tappable
48
+ * ⓘ, `'tap'` toggles on tap, `'press'` shows it on a touch-and-hold, `'off'` renders no
49
+ * touch affordance. Default: `'press'` for the square `icon*` sizes — an icon-only
50
+ * control's tooltip IS its label, and a phone reaches it by holding (CPY-4) — and
51
+ * `'off'` for a button whose words are already on it. */
51
52
  tooltipMobile?: TooltipMobile;
52
53
  /**
53
54
  * Async click handler — the single source of truth for "a button that does
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/react/components/Button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EACL,KAAK,oBAAoB,EAEzB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,GAAG,EAGT,MAAM,OAAO,CAAC;AAGf,OAAO,EAAW,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGlF;;;;;;;;;;;;;GAaG;A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C/B;;;;8DAI0D;IAC1D,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACtE;yFACqF;IACrF,cAAc,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAClC;gFAC4E;IAC5E,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAChC;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;;OAKG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;CAC9B;AAED,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,OAAO,EACP,IAAI,EACJ,OAAe,EACf,OAAe,EACf,QAAQ,EACR,OAAO,EACP,WAAW,EACX,aAAa,EACb,YAAY,EACZ,cAAsB,EACtB,YAAmB,EACnB,OAAc,EACd,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,WAAW,+BA+Gb"}
@@ -174,9 +174,11 @@ export function Button({ className, variant, size, asChild = false, loading = fa
174
174
  // implementation is necessarily a raw <button>.
175
175
  // Default to type="button" so a button inside a <form> never submits by accident.
176
176
  type: type ?? 'button', className: classes, "data-cb-variant": variantAttr, ...props, disabled: (disabled || (isLoading && !refused)) || undefined, "aria-disabled": refused ? true : props['aria-disabled'], "aria-busy": isLoading || undefined, onClick: refuseClick, onKeyDown: refuseKey, children: [isLoading ? _jsx(Loader2, { className: 'absolute size-4 animate-spin', "aria-hidden": true }) : null, !isLoading && justSucceeded ? _jsx(Check, { className: 'absolute size-4', "aria-hidden": true }) : null, _jsxs("span", { className: cn('contents', (isLoading || justSucceeded) && 'invisible'), children: [leftIcon, children] })] }));
177
+ // An icon-only button's tooltip is its only label, so a phone gets it on a hold (CPY-4).
178
+ const touchHint = tooltipMobile ?? (typeof size === 'string' && size.startsWith('icon') ? 'press' : undefined);
177
179
  // The single "button with a tooltip" seam: wrap once, here, so no call site re-implements it.
178
180
  // `multiline`: a hint that is a sentence ("Nothing to restore — the trash is empty") wraps
179
181
  // inside a capped bubble instead of running off a narrow pane; a short one is unchanged.
180
- return (_jsx(Tooltip, { content: refused ? reason : tooltip, side: tooltipSide, mobile: refused ? (tooltipMobile && tooltipMobile !== 'off' ? tooltipMobile : 'tap') : tooltipMobile, multiline: true, children: el }));
182
+ return (_jsx(Tooltip, { content: refused ? reason : tooltip, side: tooltipSide, mobile: refused ? (tooltipMobile === 'icon' || tooltipMobile === 'tap' ? tooltipMobile : 'tap') : touchHint, multiline: true, children: el }));
181
183
  }
182
184
  //# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/react/components/Button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAML,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,OAAO,EAA6C,MAAM,cAAc,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAC/B;IACE,+EAA+E;IAC/E,0EAA0E;IAC1E,iBAAiB,EAAE,wCA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