@react-x11/components 0.3.0 → 0.4.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 (107) hide show
  1. package/README.md +6 -0
  2. package/dist/index.d.ts +4 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +5 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/qml/containers.d.ts +3 -0
  7. package/dist/qml/containers.d.ts.map +1 -0
  8. package/dist/qml/containers.js +331 -0
  9. package/dist/qml/containers.js.map +1 -0
  10. package/dist/qml/controls.d.ts +12 -0
  11. package/dist/qml/controls.d.ts.map +1 -0
  12. package/dist/qml/controls.js +21 -0
  13. package/dist/qml/controls.js.map +1 -0
  14. package/dist/qml/globals.d.ts +6 -0
  15. package/dist/qml/globals.d.ts.map +1 -0
  16. package/dist/qml/globals.js +25 -0
  17. package/dist/qml/globals.js.map +1 -0
  18. package/dist/qml/index.d.ts +15 -0
  19. package/dist/qml/index.d.ts.map +1 -0
  20. package/dist/qml/index.js +25 -0
  21. package/dist/qml/index.js.map +1 -0
  22. package/dist/qml/interaction.d.ts +12 -0
  23. package/dist/qml/interaction.d.ts.map +1 -0
  24. package/dist/qml/interaction.js +246 -0
  25. package/dist/qml/interaction.js.map +1 -0
  26. package/dist/qml/ir.d.ts +106 -0
  27. package/dist/qml/ir.d.ts.map +1 -0
  28. package/dist/qml/ir.js +7 -0
  29. package/dist/qml/ir.js.map +1 -0
  30. package/dist/qml/layouts.d.ts +3 -0
  31. package/dist/qml/layouts.d.ts.map +1 -0
  32. package/dist/qml/layouts.js +122 -0
  33. package/dist/qml/layouts.js.map +1 -0
  34. package/dist/qml/models.d.ts +14 -0
  35. package/dist/qml/models.d.ts.map +1 -0
  36. package/dist/qml/models.js +80 -0
  37. package/dist/qml/models.js.map +1 -0
  38. package/dist/qml/objects.d.ts +228 -0
  39. package/dist/qml/objects.d.ts.map +1 -0
  40. package/dist/qml/objects.js +1103 -0
  41. package/dist/qml/objects.js.map +1 -0
  42. package/dist/qml/parse.d.ts +10 -0
  43. package/dist/qml/parse.d.ts.map +1 -0
  44. package/dist/qml/parse.js +607 -0
  45. package/dist/qml/parse.js.map +1 -0
  46. package/dist/qml/qtquick.d.ts +7 -0
  47. package/dist/qml/qtquick.d.ts.map +1 -0
  48. package/dist/qml/qtquick.js +347 -0
  49. package/dist/qml/qtquick.js.map +1 -0
  50. package/dist/qml/react.d.ts +83 -0
  51. package/dist/qml/react.d.ts.map +1 -0
  52. package/dist/qml/react.js +323 -0
  53. package/dist/qml/react.js.map +1 -0
  54. package/dist/qml/resolver.d.ts +38 -0
  55. package/dist/qml/resolver.d.ts.map +1 -0
  56. package/dist/qml/resolver.js +64 -0
  57. package/dist/qml/resolver.js.map +1 -0
  58. package/dist/qml/slots.d.ts +65 -0
  59. package/dist/qml/slots.d.ts.map +1 -0
  60. package/dist/qml/slots.js +230 -0
  61. package/dist/qml/slots.js.map +1 -0
  62. package/dist/qml/states.d.ts +5 -0
  63. package/dist/qml/states.d.ts.map +1 -0
  64. package/dist/qml/states.js +276 -0
  65. package/dist/qml/states.js.map +1 -0
  66. package/dist/qml/view-utils.d.ts +42 -0
  67. package/dist/qml/view-utils.d.ts.map +1 -0
  68. package/dist/qml/view-utils.js +121 -0
  69. package/dist/qml/view-utils.js.map +1 -0
  70. package/dist/tabs/hx.d.ts +18 -0
  71. package/dist/tabs/hx.d.ts.map +1 -0
  72. package/dist/tabs/hx.js +10 -0
  73. package/dist/tabs/hx.js.map +1 -0
  74. package/dist/tabs/index.d.ts +143 -0
  75. package/dist/tabs/index.d.ts.map +1 -0
  76. package/dist/tabs/index.js +602 -0
  77. package/dist/tabs/index.js.map +1 -0
  78. package/dist/terminal/vt/index.d.ts +1 -1
  79. package/dist/terminal/vt/index.d.ts.map +1 -1
  80. package/dist/terminal/vt/index.js +3 -3
  81. package/dist/terminal/vt/index.js.map +1 -1
  82. package/dist/terminal/vt/pty.d.ts +16 -0
  83. package/dist/terminal/vt/pty.d.ts.map +1 -1
  84. package/dist/terminal/vt/pty.js +186 -0
  85. package/dist/terminal/vt/pty.js.map +1 -1
  86. package/package.json +11 -1
  87. package/src/index.ts +44 -0
  88. package/src/qml/containers.tsx +380 -0
  89. package/src/qml/controls.tsx +47 -0
  90. package/src/qml/globals.ts +33 -0
  91. package/src/qml/index.ts +67 -0
  92. package/src/qml/interaction.tsx +317 -0
  93. package/src/qml/ir.ts +80 -0
  94. package/src/qml/layouts.tsx +141 -0
  95. package/src/qml/models.ts +101 -0
  96. package/src/qml/objects.ts +1431 -0
  97. package/src/qml/parse.ts +624 -0
  98. package/src/qml/qtquick.tsx +413 -0
  99. package/src/qml/react.tsx +454 -0
  100. package/src/qml/resolver.ts +99 -0
  101. package/src/qml/slots.ts +249 -0
  102. package/src/qml/states.ts +318 -0
  103. package/src/qml/view-utils.ts +140 -0
  104. package/src/tabs/hx.ts +31 -0
  105. package/src/tabs/index.ts +850 -0
  106. package/src/terminal/vt/index.ts +4 -2
  107. package/src/terminal/vt/pty.ts +243 -0
@@ -0,0 +1,602 @@
1
+ // <Tabs> — one visible panel at a time, switched by a strip of triggers.
2
+ //
3
+ // The API is [Chakra UI's Tabs](https://chakra-ui.com/docs/components/tabs)
4
+ // with its parts spelled flat — `Tabs.Root` is `<Tabs>`, `Tabs.Trigger` is
5
+ // `<TabsTrigger>` — because that is how this package names a composition (see
6
+ // `/timeline` and `/charts`). The vocabulary is Chakra's too: `value` /
7
+ // `defaultValue` / `onValueChange({ value })`, the five variants (`line`,
8
+ // `subtle`, `enclosed`, `outline`, `plain`), `size`, `orientation`,
9
+ // `activationMode`, `fitted`, `justify`, `lazyMount` and `unmountOnExit` — so
10
+ // a snippet copied from Chakra's docs is the same tree with the dots removed.
11
+ // `asChild` is the one part of the surface deliberately absent: it exists to
12
+ // merge props into somebody else's DOM element, and there is no DOM here.
13
+ //
14
+ // The behaviour is core's `<Tabs>` — the widget this one supersedes: a single
15
+ // tab stop with roving focus, arrows that wrap and skip disabled triggers,
16
+ // Home/End, visual arrows in an RTL strip, and `activationMode="manual"` for
17
+ // a panel too expensive to build on every keystroke.
18
+ //
19
+ // It is pure composition of `<box>` and `<text>`, so there is no
20
+ // `registerElement` here and nothing for the reconciler to learn. The line
21
+ // under a `line` strip, the marker on the selected trigger, the chip behind
22
+ // an `enclosed` strip — each is a `<box>`, positioned absolutely where it has
23
+ // to sit on one edge, because borders alone cannot say "this side only" and a
24
+ // box can.
25
+ import React from 'react';
26
+ import { useDirection, useTheme } from 'react-x11';
27
+ import { interpolate } from 'react-x11/style';
28
+ import { XK_DOWN, XK_END, XK_HOME, XK_LEFT, XK_RIGHT, XK_UP, } from 'react-x11/keysyms';
29
+ import { hx } from './hx.js';
30
+ const h = React.createElement;
31
+ // --- geometry ---------------------------------------------------------------
32
+ /** The selected trigger's marker in the `line` variant. */
33
+ const INDICATOR = 2;
34
+ /** The strip's own line in the `line` and `outline` variants. */
35
+ const RULE = 1;
36
+ /** Inside a trigger, between a glyph and the label beside it. */
37
+ const TRIGGER_GAP = 6;
38
+ /** Between a strip and its panel. */
39
+ const PANEL_GAP = 8;
40
+ /** The `enclosed` strip's chip, and an `outline` tab's shoulders — one
41
+ * radius, so the two variants agree about how round this notebook is. */
42
+ const CORNER = 6;
43
+ // Chakra's proportions, and looser than a first guess would make them: the
44
+ // labels are cap-trimmed, so `py` is the *whole* visible gap over the caps
45
+ // and under the baseline — padding sized for an untrimmed line box reads as
46
+ // cramped once the box is the letters. The type steps off the theme's own
47
+ // `fontSize` rather than a fixed scale, so a theme that sets 16 gets tabs in
48
+ // 16 (the same call `/timeline` makes).
49
+ const SIZES = {
50
+ sm: { px: 12, py: 8, step: -1 },
51
+ md: { px: 16, py: 10, step: 0 },
52
+ lg: { px: 20, py: 12, step: 1 },
53
+ };
54
+ const LookContext = React.createContext(null);
55
+ /** What a `<TabsIndicator>` written into the strip asks the selected trigger
56
+ * to draw. `null` when the strip has none. */
57
+ const IndicatorContext = React.createContext(null);
58
+ function useLook(part) {
59
+ const look = React.useContext(LookContext);
60
+ if (!look) {
61
+ throw new Error(`@react-x11/components: <${part}> has to be inside a <Tabs>. ` +
62
+ 'It reads the selected value, the variant and the size from it.');
63
+ }
64
+ return look;
65
+ }
66
+ /**
67
+ * A colour prop, resolved against the palette — `$token` is normally the
68
+ * renderer's job, but `interpolate()` is arithmetic over real colours and
69
+ * runs here, before any of that. Same helper as `/timeline`'s.
70
+ */
71
+ function resolveColor(value, theme, fallback) {
72
+ if (!value)
73
+ return fallback;
74
+ if (!value.startsWith('$'))
75
+ return value;
76
+ const named = theme[value.slice(1)];
77
+ return typeof named === 'string' ? named : fallback;
78
+ }
79
+ /**
80
+ * `accent` laid over `ground`, opaquely — a weak wash at low `amount`.
81
+ * Opaque rather than translucent for the same reason `/timeline` mixes: a
82
+ * wash sits over the strip's own chrome, and light through it would show the
83
+ * rule running behind a selected trigger.
84
+ */
85
+ function over(ground, accent, amount) {
86
+ const mixed = interpolate(ground, accent, amount);
87
+ return typeof mixed === 'string' ? mixed : accent;
88
+ }
89
+ /**
90
+ * A single-line label's box trimmed to its letters — core's `capTrim`, the
91
+ * rule every core widget label follows (`labelContent` in
92
+ * `components/theme.js`). A line box is the font's ascent plus descent plus
93
+ * line gap, and the space over a capital differs from the space under the
94
+ * baseline by `(ascent - capHeight) - descent` — so a centred untrimmed
95
+ * label sits visibly low beside the icon centred on its own middle. Trimming
96
+ * makes the box *be* the letters, and centring centres what can be seen.
97
+ * Labels only: the icon is a `<canvas>` and panel prose is a paragraph,
98
+ * and neither wants it.
99
+ */
100
+ const CAP_TRIM = { textBoxTrim: 'cap-alphabetic' };
101
+ /**
102
+ * Strings and numbers are only legal inside `<text>`, and a trigger's label
103
+ * is prose — `<TabsTrigger value="a">Members</TabsTrigger>` is the shortest
104
+ * thing that works and has to keep working. A primitive child is wrapped; an
105
+ * element child is left exactly as written, and inherits the same ink.
106
+ */
107
+ function withText(children, style) {
108
+ let wrapped = false;
109
+ const mapped = React.Children.map(children, (child) => {
110
+ if (typeof child !== 'string' && typeof child !== 'number')
111
+ return child;
112
+ wrapped = true;
113
+ return hx('text', style ? { style } : null, child);
114
+ });
115
+ return wrapped ? mapped : children;
116
+ }
117
+ /**
118
+ * The part's own style, then the caller's — later entries win, which is how
119
+ * every `style` prop in this renderer resolves precedence.
120
+ */
121
+ function styled(base, extra) {
122
+ if (!extra)
123
+ return [base];
124
+ return Array.isArray(extra) ? [base, ...extra] : [base, extra];
125
+ }
126
+ /**
127
+ * Tabs.
128
+ *
129
+ * ```jsx
130
+ * <Tabs defaultValue="members">
131
+ * <TabsList>
132
+ * <TabsTrigger value="members">Members</TabsTrigger>
133
+ * <TabsTrigger value="projects">Projects</TabsTrigger>
134
+ * </TabsList>
135
+ * <TabsContent value="members">…</TabsContent>
136
+ * <TabsContent value="projects">…</TabsContent>
137
+ * </Tabs>
138
+ * ```
139
+ */
140
+ export function Tabs(props) {
141
+ // `Theme` is an interface, so it has no implicit index signature — the same
142
+ // widening `hx.ts` documents for the `theme` prop.
143
+ const theme = useTheme();
144
+ const [uncontrolled, setUncontrolled] = React.useState(props.defaultValue);
145
+ const [focused, setFocused] = React.useState(null);
146
+ const selected = props.value ?? uncontrolled;
147
+ const vertical = props.orientation === 'vertical';
148
+ const variant = props.variant ?? 'line';
149
+ const size = SIZES[props.size ?? 'md'] ?? SIZES.md;
150
+ const accent = resolveColor(props.accent, theme, String(theme.accent));
151
+ const ground = resolveColor(props.ground, theme, String(theme.background));
152
+ const body = typeof theme.fontSize === 'number' ? theme.fontSize : 14;
153
+ const { onValueChange } = props;
154
+ const controlled = props.value !== undefined;
155
+ // The registry the keyboard walks. A ref rather than state: a trigger
156
+ // mounting must not re-render the tree, and the walk only happens inside
157
+ // an event handler, where `current` is always current.
158
+ const triggers = React.useRef(new Map());
159
+ // Which values have ever been selected, for `lazyMount`. Written during
160
+ // render on purpose — adding the current selection is idempotent, and an
161
+ // effect would run a frame after the panel already needed the answer.
162
+ const seen = React.useRef(new Set());
163
+ if (selected !== undefined)
164
+ seen.current.add(selected);
165
+ const select = React.useCallback((value) => {
166
+ if (value === selected)
167
+ return;
168
+ if (!controlled)
169
+ setUncontrolled(value);
170
+ onValueChange?.({ value });
171
+ }, [selected, controlled, onValueChange]);
172
+ const look = React.useMemo(() => ({
173
+ variant,
174
+ vertical,
175
+ manual: props.activationMode === 'manual',
176
+ fitted: props.fitted ?? false,
177
+ justify: props.justify,
178
+ accent,
179
+ ground,
180
+ text: String(theme.text),
181
+ font: body + size.step,
182
+ px: size.px,
183
+ py: size.py,
184
+ selected,
185
+ focused,
186
+ select,
187
+ setFocused,
188
+ triggers: triggers.current,
189
+ everSelected: (value) => seen.current.has(value),
190
+ lazyMount: props.lazyMount ?? false,
191
+ unmountOnExit: props.unmountOnExit ?? false,
192
+ }), [
193
+ variant,
194
+ vertical,
195
+ props.activationMode,
196
+ props.fitted,
197
+ props.justify,
198
+ props.lazyMount,
199
+ props.unmountOnExit,
200
+ accent,
201
+ ground,
202
+ theme.text,
203
+ body,
204
+ size,
205
+ selected,
206
+ focused,
207
+ select,
208
+ ]);
209
+ return h(LookContext.Provider, { value: look }, hx('box', {
210
+ // The same fill-the-space default core's `<Tabs>` had: a notebook is
211
+ // usually the main region of whatever pane it is in. `style` wins for
212
+ // the one that is not.
213
+ style: styled({
214
+ flexGrow: 1,
215
+ minHeight: 0,
216
+ minWidth: 0,
217
+ flexDirection: vertical ? 'row' : 'column',
218
+ }, props.style),
219
+ 'data-testname': props['data-testname'],
220
+ }, props.children));
221
+ }
222
+ /**
223
+ * The strip of triggers — a single tab stop, walked with the arrows.
224
+ *
225
+ * The arrows are visual, the list is logical: in a mirrored horizontal strip
226
+ * the *next* trigger is the one to the left, and in either direction the walk
227
+ * follows where layout actually put each trigger (sorted by position, not by
228
+ * mount order), wraps at the ends, and skips disabled triggers. Home/End jump
229
+ * to the ends. In `manual` mode focus moves without selecting, and Enter or
230
+ * Space commits — those keys are not handled here, because core makes them
231
+ * the click the trigger's own `onClick` already is.
232
+ */
233
+ export function TabsList(props) {
234
+ const look = useLook('TabsList');
235
+ const rtl = useDirection() === 'rtl';
236
+ const { vertical } = look;
237
+ // A `<TabsIndicator>` written into the strip, Chakra-style, is read here
238
+ // and handed to the triggers — the selected one draws it. It has to be a
239
+ // direct child for this to see it; anything else in the strip renders
240
+ // where it was written.
241
+ let indicator = null;
242
+ for (const child of React.Children.toArray(props.children)) {
243
+ if (React.isValidElement(child) && child.type === TabsIndicator) {
244
+ indicator = child.props;
245
+ }
246
+ }
247
+ const onKeyDown = (ev) => {
248
+ // Where layout put each trigger is the one ordering that cannot drift
249
+ // from what the user sees — mount order can, after a remove and re-add.
250
+ const entries = [...look.triggers.entries()]
251
+ .map(([value, entry]) => ({ value, ...entry }))
252
+ .sort((a, b) => vertical ? a.node.abs.y - b.node.abs.y : a.node.abs.x - b.node.abs.x);
253
+ // Visual order back to logical: an RTL strip reads right to left. A
254
+ // vertical strip never mirrors — Up is Up.
255
+ const swap = !vertical && rtl;
256
+ if (swap)
257
+ entries.reverse();
258
+ /** The next enabled trigger `delta` steps away, wrapping. */
259
+ const step = (from, delta) => {
260
+ const n = entries.length;
261
+ if (n === 0)
262
+ return null;
263
+ for (let i = 1; i <= n; i++) {
264
+ const entry = entries[(((from + delta * i) % n) + n) % n];
265
+ if (entry && !entry.disabled)
266
+ return entry;
267
+ }
268
+ return null;
269
+ };
270
+ const goTo = (entry) => {
271
+ if (!entry)
272
+ return;
273
+ entry.node.focus();
274
+ if (!look.manual)
275
+ look.select(entry.value);
276
+ };
277
+ const back = vertical ? XK_UP : swap ? XK_RIGHT : XK_LEFT;
278
+ const forward = vertical ? XK_DOWN : swap ? XK_LEFT : XK_RIGHT;
279
+ const current = entries.findIndex((entry) => entry.value === (look.focused ?? look.selected));
280
+ switch (ev.keysym) {
281
+ case back:
282
+ goTo(step(current === -1 ? 0 : current, -1));
283
+ return;
284
+ case forward:
285
+ goTo(step(current === -1 ? 0 : current, 1));
286
+ return;
287
+ case XK_HOME:
288
+ goTo(entries.find((entry) => !entry.disabled) ?? null);
289
+ return;
290
+ case XK_END:
291
+ goTo([...entries].reverse().find((entry) => !entry.disabled) ?? null);
292
+ return;
293
+ default:
294
+ }
295
+ };
296
+ // What the strip itself draws, per variant. The `line` and `outline` rules
297
+ // are an absolutely positioned 1px box on the panel edge rather than a
298
+ // border: borders are all-edges here, and this has to sit on one side.
299
+ // `zIndex: -1` paints it under the triggers, so a selected `outline`
300
+ // trigger's opaque fill is what cuts it.
301
+ const rule = look.variant === 'line' || look.variant === 'outline'
302
+ ? hx('box', {
303
+ style: [
304
+ { position: 'absolute', backgroundColor: '$border', zIndex: -1 },
305
+ vertical
306
+ ? { top: 0, bottom: 0, end: 0, width: RULE }
307
+ : { left: 0, right: 0, bottom: 0, height: RULE },
308
+ ],
309
+ })
310
+ : null;
311
+ const chrome = look.variant === 'enclosed'
312
+ ? {
313
+ // Chakra's `bg.muted` chip, mixed from the palette this theme
314
+ // actually has — opaque, for the reason `over` gives.
315
+ backgroundColor: over(look.ground, look.text, 0.07),
316
+ borderRadius: CORNER,
317
+ padding: 3,
318
+ gap: 2,
319
+ }
320
+ : { gap: look.variant === 'outline' ? 0 : 2 };
321
+ return h(IndicatorContext.Provider, { value: indicator }, hx('box', {
322
+ role: 'tablist',
323
+ 'aria-orientation': look.vertical ? 'vertical' : 'horizontal',
324
+ onKeyDown,
325
+ style: styled({
326
+ flexShrink: 0,
327
+ flexDirection: vertical ? 'column' : 'row',
328
+ alignItems: 'stretch',
329
+ ...(look.justify && {
330
+ justifyContent: look.justify === 'start'
331
+ ? 'flex-start'
332
+ : look.justify === 'end'
333
+ ? 'flex-end'
334
+ : 'center',
335
+ }),
336
+ ...chrome,
337
+ }, props.style),
338
+ 'data-testname': props['data-testname'],
339
+ }, rule, props.children));
340
+ }
341
+ /**
342
+ * One tab. Prose and glyphs alike are legal children — a string is wrapped
343
+ * in `<text>`, and an `<Icon>` inherits the trigger's ink (its `size` does
344
+ * not inherit and has to be named).
345
+ */
346
+ export function TabsTrigger(props) {
347
+ const look = useLook('TabsTrigger');
348
+ const indicator = React.useContext(IndicatorContext);
349
+ const { value, disabled = false } = props;
350
+ const selected = look.selected === value;
351
+ const vertical = look.vertical;
352
+ // Registration is the ref callback: a new closure each render, so React
353
+ // re-runs it and a `disabled` that changed is re-registered. Order in the
354
+ // map churns with that, which is why the keyboard sorts by position
355
+ // instead of trusting it.
356
+ const register = (node) => {
357
+ if (node)
358
+ look.triggers.set(value, { node, disabled });
359
+ else
360
+ look.triggers.delete(value);
361
+ };
362
+ // What the trigger looks like, per variant. Each selected state is opaque
363
+ // where it has to cover the strip's rule, and every ink change is a
364
+ // `$token` so a `theme` prop above still wins.
365
+ const variantStyle = [];
366
+ const hover = {};
367
+ switch (look.variant) {
368
+ case 'line':
369
+ case 'plain':
370
+ Object.assign(hover, { ':hover': { color: '$text' } });
371
+ break;
372
+ case 'subtle':
373
+ variantStyle.push({ borderRadius: 4 });
374
+ if (selected)
375
+ variantStyle.push({
376
+ backgroundColor: over(look.ground, look.accent, 0.15),
377
+ });
378
+ else
379
+ Object.assign(hover, {
380
+ ':hover': { backgroundColor: '$surfaceHover' },
381
+ ':active': { backgroundColor: '$surfaceActive' },
382
+ });
383
+ break;
384
+ case 'enclosed':
385
+ // Every trigger carries the border so selecting one cannot change its
386
+ // size — only the selected one inks it.
387
+ variantStyle.push({
388
+ borderRadius: 4,
389
+ borderWidth: 1,
390
+ borderColor: 'transparent',
391
+ });
392
+ if (selected)
393
+ variantStyle.push({
394
+ backgroundColor: look.ground,
395
+ borderColor: '$border',
396
+ });
397
+ else
398
+ Object.assign(hover, { ':hover': { color: '$text' } });
399
+ break;
400
+ case 'outline':
401
+ if (selected)
402
+ variantStyle.push({
403
+ // The fill is the ground, so the tab and its panel read as one
404
+ // surface — and it is what covers the strip's rule underneath.
405
+ // Rounded so the fill stays inside the frame's shoulders, but
406
+ // deliberately **borderless**: this renderer paints a node's
407
+ // border *after* its children (`Node.paint` — children, then
408
+ // `_paintBorder`), so a border here could never be opened by a
409
+ // child laid over it. The frame below carries the stroke instead.
410
+ backgroundColor: look.ground,
411
+ borderRadius: CORNER,
412
+ });
413
+ else
414
+ Object.assign(hover, {
415
+ ':hover': { backgroundColor: '$surfaceHover' },
416
+ });
417
+ break;
418
+ }
419
+ // The `outline` tab's shape, from two stacked children — a shape the style
420
+ // vocabulary cannot say in one box. `borderRadius` is one number and
421
+ // requires a uniform border, so "rounded shoulders, open bottom" is drawn
422
+ // as: a *frame* (inset-0 box carrying the full rounded border) and, after
423
+ // it, a *skirt* (a strip of ground over the frame's panel edge, covering
424
+ // the border and the two corners that would curl toward the panel, and
425
+ // redrawing the straight side walls over itself). The skirt can cover the
426
+ // frame only because they are siblings — a node's own border paints over
427
+ // its children, which is why the frame is not the trigger's border.
428
+ // Both are written before the label, so a descender that dips below the
429
+ // baseline paints over them rather than being cut.
430
+ const outlineShape = look.variant === 'outline' && selected
431
+ ? [
432
+ hx('box', {
433
+ key: 'frame',
434
+ style: {
435
+ position: 'absolute',
436
+ top: 0,
437
+ bottom: 0,
438
+ start: 0,
439
+ end: 0,
440
+ borderWidth: 1,
441
+ borderColor: '$border',
442
+ borderRadius: CORNER,
443
+ },
444
+ }),
445
+ hx('box', {
446
+ key: 'skirt',
447
+ style: [
448
+ {
449
+ position: 'absolute',
450
+ backgroundColor: look.ground,
451
+ borderColor: '$border',
452
+ },
453
+ vertical
454
+ ? {
455
+ top: 0,
456
+ bottom: 0,
457
+ end: 0,
458
+ width: CORNER + 1,
459
+ borderTopWidth: 1,
460
+ borderBottomWidth: 1,
461
+ }
462
+ : {
463
+ start: 0,
464
+ end: 0,
465
+ bottom: 0,
466
+ height: CORNER + 1,
467
+ borderStartWidth: 1,
468
+ borderEndWidth: 1,
469
+ },
470
+ ],
471
+ }),
472
+ ]
473
+ : null;
474
+ // The selected marker in the `line` variant: a 2px box riding the panel
475
+ // edge of the trigger, over the strip's 1px rule.
476
+ const marker = look.variant === 'line'
477
+ ? hx('box', {
478
+ style: [
479
+ {
480
+ position: 'absolute',
481
+ backgroundColor: selected ? look.accent : 'transparent',
482
+ transition: { backgroundColor: 100 },
483
+ },
484
+ vertical
485
+ ? { top: 0, bottom: 0, end: 0, width: INDICATOR }
486
+ : { left: 0, right: 0, bottom: 0, height: INDICATOR },
487
+ ],
488
+ })
489
+ : null;
490
+ // A `<TabsIndicator>` in the strip is drawn here, by the selected trigger,
491
+ // behind its label. Layout owns its geometry — see the part's own comment.
492
+ const chip = indicator && selected
493
+ ? hx('box', {
494
+ style: styled({
495
+ position: 'absolute',
496
+ top: 0,
497
+ bottom: 0,
498
+ left: 0,
499
+ right: 0,
500
+ zIndex: -1,
501
+ borderRadius: 4,
502
+ backgroundColor: over(look.ground, look.accent, 0.15),
503
+ }, indicator.style),
504
+ })
505
+ : null;
506
+ const ink = disabled
507
+ ? '$textMuted'
508
+ : selected
509
+ ? look.variant === 'line' || look.variant === 'subtle'
510
+ ? look.accent
511
+ : '$text'
512
+ : '$textMuted';
513
+ return hx('box', {
514
+ role: 'tab',
515
+ 'aria-selected': selected,
516
+ ref: register,
517
+ focusable: !disabled,
518
+ // Roving focus: the selected trigger is the strip's tab stop. With
519
+ // nothing selected yet every trigger is reachable, which is the lesser
520
+ // evil — a strip nobody can tab into is worse than two stops.
521
+ tabIndex: look.selected === undefined ? 0 : selected ? 0 : -1,
522
+ disabled,
523
+ onFocus: () => look.setFocused(value),
524
+ onBlur: () => look.setFocused(null),
525
+ onClick: () => !disabled && look.select(value),
526
+ style: styled({
527
+ flexDirection: 'row',
528
+ alignItems: 'center',
529
+ justifyContent: 'center',
530
+ flexShrink: 0,
531
+ ...(look.fitted && { flexGrow: 1 }),
532
+ gap: TRIGGER_GAP,
533
+ paddingTop: look.py,
534
+ paddingBottom: look.py,
535
+ paddingLeft: look.px,
536
+ paddingRight: look.px,
537
+ fontSize: look.font,
538
+ color: ink,
539
+ ...(disabled ? {} : { cursor: 'pointer' }),
540
+ transition: { backgroundColor: 100, color: 100 },
541
+ ...Object.assign({}, ...variantStyle),
542
+ ...(disabled ? {} : hover),
543
+ }, props.style),
544
+ 'data-testname': props['data-testname'],
545
+ }, chip, outlineShape, withText(props.children, CAP_TRIM), marker);
546
+ }
547
+ /**
548
+ * A marker that follows the selected trigger — Chakra's `Tabs.Indicator`,
549
+ * and like there it is what gives the `plain` variant a look.
550
+ *
551
+ * Write it as a direct child of `<TabsList>`. It renders nothing where it
552
+ * stands: the selected trigger draws it, as a box behind its own label — so
553
+ * layout owns the geometry and a resize, a font change or an RTL mirror can
554
+ * never leave the marker where a trigger used to be. What that costs is the
555
+ * slide: this renderer cannot animate between two mounts, so the marker
556
+ * moves in one step.
557
+ */
558
+ export function TabsIndicator(props) {
559
+ useLook('TabsIndicator');
560
+ void props;
561
+ return null;
562
+ }
563
+ /**
564
+ * One panel. Every panel mounts up front and the unselected ones are
565
+ * `display: 'none'` — out of layout, still alive, so a form half-filled on
566
+ * another tab keeps its state. `lazyMount` defers a panel until its first
567
+ * selection; `unmountOnExit` gives the state up when it hides. Both are on
568
+ * the root, because they are a policy about the set, not about one panel.
569
+ */
570
+ export function TabsContent(props) {
571
+ const look = useLook('TabsContent');
572
+ const selected = look.selected === props.value;
573
+ if (!selected) {
574
+ if (look.unmountOnExit)
575
+ return null;
576
+ if (look.lazyMount && !look.everSelected(props.value))
577
+ return null;
578
+ }
579
+ return hx('box', {
580
+ role: 'tabpanel',
581
+ // A hidden panel is still mounted (that is the point), but it must not
582
+ // be read: `display: 'none'` takes it out of layout, and this takes it
583
+ // out of the accessibility tree.
584
+ 'aria-hidden': selected ? undefined : true,
585
+ style: styled({
586
+ display: selected ? 'flex' : 'none',
587
+ flexDirection: 'column',
588
+ flexGrow: 1,
589
+ minHeight: 0,
590
+ minWidth: 0,
591
+ // Prose in a panel is body text. Named here because a bare
592
+ // `<text>`'s default ink is not the palette's — it has to inherit
593
+ // one, or a dark theme reads it in the light theme's black.
594
+ color: '$text',
595
+ ...(look.vertical
596
+ ? { paddingStart: PANEL_GAP }
597
+ : { paddingTop: PANEL_GAP }),
598
+ }, props.style),
599
+ 'data-testname': props['data-testname'],
600
+ }, withText(props.children));
601
+ }
602
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tabs/index.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,EAAE;AACF,4EAA4E;AAC5E,2EAA2E;AAC3E,8EAA8E;AAC9E,wEAAwE;AACxE,0EAA0E;AAC1E,oEAAoE;AACpE,8EAA8E;AAC9E,8EAA8E;AAC9E,6EAA6E;AAC7E,0EAA0E;AAC1E,EAAE;AACF,8EAA8E;AAC9E,2EAA2E;AAC3E,6EAA6E;AAC7E,qDAAqD;AACrD,EAAE;AACF,iEAAiE;AACjE,2EAA2E;AAC3E,4EAA4E;AAC5E,8EAA8E;AAC9E,8EAA8E;AAC9E,WAAW;AACX,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EACL,OAAO,EACP,MAAM,EACN,OAAO,EACP,OAAO,EACP,QAAQ,EACR,KAAK,GACN,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B,MAAM,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC;AAK9B,+EAA+E;AAE/E,2DAA2D;AAC3D,MAAM,SAAS,GAAG,CAAC,CAAC;AACpB,iEAAiE;AACjE,MAAM,IAAI,GAAG,CAAC,CAAC;AACf,iEAAiE;AACjE,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB,qCAAqC;AACrC,MAAM,SAAS,GAAG,CAAC,CAAC;AACpB;0EAC0E;AAC1E,MAAM,MAAM,GAAG,CAAC,CAAC;AAcjB,2EAA2E;AAC3E,2EAA2E;AAC3E,4EAA4E;A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,CAAC,KAAK,CAAC;IAE/C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,IAAI,IAAI,CAAC,aAAa;YAAE,OAAO,IAAI,CAAC;QACpC,IAAI,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;IACrE,CAAC;IAED,OAAO,EAAE,CACP,KAAK,EACL;QACE,IAAI,EAAE,UAAU;QAChB,uEAAuE;QACvE,uEAAuE;QACvE,iCAAiC;QACjC,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI;QAC1C,KAAK,EAAE,MAAM,CACX;YACE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;YACnC,aAAa,EAAE,QAAQ;YACvB,QAAQ,EAAE,CAAC;YACX,SAAS,EAAE,CAAC;YACZ,QAAQ,EAAE,CAAC;YACX,2DAA2D;YAC3D,kEAAkE;YAClE,4DAA4D;YAC5D,KAAK,EAAE,OAAO;YACd,GAAG,CAAC,IAAI,CAAC,QAAQ;gBACf,CAAC,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE;gBAC7B,CAAC,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;SAC/B,EACD,KAAK,CAAC,KAAK,CACZ;QACD,eAAe,EAAE,KAAK,CAAC,eAAe,CAAC;KACxC,EACD,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CACzB,CAAC;AACJ,CAAC"}
@@ -8,7 +8,7 @@ import type { VtTermProps } from './node.js';
8
8
  import type { PtyHost } from './pty.js';
9
9
  export { ELEMENT as VT_TERMINAL_ELEMENT, VtTermNode };
10
10
  export type { VtTermProps };
11
- export { PTY_MODULES, PtyUnavailableError, defaultShell, nodePtyHost, ptyLoadError, } from './pty.js';
11
+ export { PTY_MODULES, PtyUnavailableError, bunPtyHost, defaultPtyHost, defaultShell, nodePtyHost, ptyLoadError, } from './pty.js';
12
12
  export type { PtyHost, PtyOptions, PtySession } from './pty.js';
13
13
  /** What the vt backend's own handle can do. `<Terminal>` widens it. */
14
14
  export interface VtHandle {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/terminal/vt/index.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAM7C,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,KAAK,EAAE,OAAO,EAAc,MAAM,UAAU,CAAC;AAMpD,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,UAAU,EAAE,CAAC;AACtD,YAAY,EAAE,WAAW,EAAE,CAAC;AAC5B,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,YAAY,GACb,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAoBhE,uEAAuE;AACvE,MAAM,WAAW,QAAQ;IACvB,8DAA8D;IAC9D,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B,OAAO,IAAI,IAAI,CAAC;IAChB,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACjC,WAAW,IAAI,IAAI,CAAC;IACpB,SAAS,IAAI,MAAM,GAAG,IAAI,CA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