@cueplusplus/ui 0.11.0 → 0.12.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.
- package/CHANGELOG.md +251 -0
- package/dist/elements/scroll-anchor.js +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -1
- package/dist/layout/_ground.d.ts +22 -0
- package/dist/layout/_ground.js +9 -0
- package/dist/layout/bento.js +1 -1
- package/dist/layout/frames.d.ts +70 -0
- package/dist/layout/frames.js +298 -0
- package/dist/layout/index.d.ts +4 -2
- package/dist/layout/index.js +2 -1
- package/dist/layout/preview.d.ts +50 -3
- package/dist/layout/preview.js +179 -31
- package/dist/overlays/drawer.js +1 -1
- package/manifest/components/activity-graph.json +2 -1
- package/manifest/components/agent-card.json +2 -1
- package/manifest/components/agent-pile.json +2 -1
- package/manifest/components/background-inbox.json +2 -1
- package/manifest/components/bento.json +1 -1
- package/manifest/components/breadcrumb.json +2 -1
- package/manifest/components/chart-tooltip-content.json +2 -1
- package/manifest/components/checkpoint-history.json +2 -1
- package/manifest/components/code-diff.json +2 -1
- package/manifest/components/combobox.json +2 -1
- package/manifest/components/comparison-card.json +2 -1
- package/manifest/components/composer-attachment-chip.json +2 -1
- package/manifest/components/composer-context.json +2 -1
- package/manifest/components/composer-model-item.json +2 -1
- package/manifest/components/composer-person-item.json +2 -1
- package/manifest/components/computer-use.json +2 -1
- package/manifest/components/confidence-marker.json +2 -1
- package/manifest/components/context-breakdown.json +2 -1
- package/manifest/components/context-usage.json +2 -1
- package/manifest/components/conversation-search.json +2 -1
- package/manifest/components/cost-meter.json +2 -1
- package/manifest/components/day-separator.json +2 -1
- package/manifest/components/document-reference.json +2 -1
- package/manifest/components/elements-command-palette.json +2 -1
- package/manifest/components/elements-timeline.json +2 -1
- package/manifest/components/elicitation-form.json +2 -1
- package/manifest/components/file-tree.json +2 -1
- package/manifest/components/flow-graph.json +4 -2
- package/manifest/components/frac.json +1 -1
- package/manifest/components/frames.json +210 -0
- package/manifest/components/group-bar.json +2 -1
- package/manifest/components/inline-citation.json +2 -1
- package/manifest/components/job-progress.json +2 -1
- package/manifest/components/log-viewer.json +2 -1
- package/manifest/components/map-answer.json +2 -1
- package/manifest/components/math-block.json +1 -1
- package/manifest/components/mcp-server-panel.json +2 -1
- package/manifest/components/memory-chips.json +2 -1
- package/manifest/components/message-actions.json +2 -1
- package/manifest/components/message-attachments.json +2 -1
- package/manifest/components/message-queue.json +2 -1
- package/manifest/components/message-timing.json +2 -1
- package/manifest/components/meter.json +1 -1
- package/manifest/components/model-picker.json +2 -1
- package/manifest/components/multi-select.json +2 -1
- package/manifest/components/onboarding.json +2 -1
- package/manifest/components/preview.json +85 -8
- package/manifest/components/prompt-library.json +2 -1
- package/manifest/components/queue-dock.json +2 -1
- package/manifest/components/quote-reply.json +2 -1
- package/manifest/components/reasoning-effort.json +2 -1
- package/manifest/components/reasoning-panel.json +2 -1
- package/manifest/components/regenerate-menu.json +2 -1
- package/manifest/components/research-report.json +2 -1
- package/manifest/components/retrieval-chunks.json +2 -1
- package/manifest/components/reviewable-diff.json +2 -1
- package/manifest/components/schedule-card.json +2 -1
- package/manifest/components/score-breakdown.json +2 -1
- package/manifest/components/scroll-anchor.json +2 -1
- package/manifest/components/segmented-control.json +2 -1
- package/manifest/components/settings-panel.json +2 -1
- package/manifest/components/shared-conversation.json +2 -1
- package/manifest/components/sources.json +2 -1
- package/manifest/components/speaker-identity.json +2 -1
- package/manifest/components/spec-sheet.json +2 -1
- package/manifest/components/spectrum-visualizer.json +2 -1
- package/manifest/components/stepper.json +2 -1
- package/manifest/components/streaming-text.json +2 -1
- package/manifest/components/sub.json +1 -1
- package/manifest/components/subagent-list.json +4 -2
- package/manifest/components/sup.json +1 -1
- package/manifest/components/swap-label.json +2 -1
- package/manifest/components/thread-list.json +2 -1
- package/manifest/components/thread-search.json +2 -1
- package/manifest/components/todo-list.json +2 -1
- package/manifest/components/tool-group.json +2 -1
- package/manifest/components/trace-waterfall.json +2 -1
- package/manifest/components/tree.json +2 -1
- package/manifest/components/universe-grid.json +2 -1
- package/manifest/components/usage-chart.json +2 -1
- package/manifest/components/voice-conversation.json +2 -1
- package/manifest/components/web-search.json +2 -1
- package/manifest/fixtures.json +665 -0
- package/manifest/manifest.json +97 -84
- package/manifest/tokens.json +1 -1
- package/package.json +5 -5
package/dist/layout/preview.js
CHANGED
|
@@ -4,6 +4,7 @@ import { useIsomorphicLayoutEffect } from "../system/use-isomorphic-layout-effec
|
|
|
4
4
|
import { AmbientThemeContext, DensityContext } from "../system/density.js";
|
|
5
5
|
import { OverridesContext } from "../system/overrides.js";
|
|
6
6
|
import { ThemeContext } from "../system/theme-provider.js";
|
|
7
|
+
import { GROUND_CLASSES } from "./_ground.js";
|
|
7
8
|
import * as React from "react";
|
|
8
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
//#region src/layout/preview.tsx
|
|
@@ -20,16 +21,29 @@ const BIG_STEP = 64;
|
|
|
20
21
|
const ROOT_CLASS = "relative flex min-w-0 flex-col rounded-(--radius-surface) border border-border bg-surface-1 text-fg";
|
|
21
22
|
const BENCH_CLASS = "relative flex min-w-0 flex-1 overflow-auto rounded-t-(--radius-surface)";
|
|
22
23
|
/**
|
|
23
|
-
* The stage: centred,
|
|
24
|
-
*
|
|
25
|
-
*
|
|
24
|
+
* The stage: centred, grounded, and at least three top rungs of the space
|
|
25
|
+
* ladder tall so a preview reserves its room before its specimen arrives.
|
|
26
|
+
* Static literals, because Tailwind scans text.
|
|
26
27
|
*
|
|
27
28
|
* Centred **safely** (`place-items: safe center`): a specimen wider than the
|
|
28
29
|
* stage starts at the stage's edge and overflows at its end, where the bench
|
|
29
30
|
* scrolls to it. Plain `center` split the overflow across both sides, and the
|
|
30
31
|
* left half sat before the scroll origin, where nothing reaches it.
|
|
32
|
+
*
|
|
33
|
+
* **Three pieces rather than one literal, and the seam is where the ground
|
|
34
|
+
* goes.** `cn` preserves the order it is given, so a ground appended after the
|
|
35
|
+
* padding would emit the dot grid in a different place from the one every
|
|
36
|
+
* caller's markup has today — and `/`'s seventeen bare Previews and the group
|
|
37
|
+
* pages' 325 tooled ones are both measured to the byte. Head, ground, tail, in
|
|
38
|
+
* that order, is today's string.
|
|
31
39
|
*/
|
|
32
|
-
const
|
|
40
|
+
const STAGE_HEAD = "grid h-full w-full min-h-[calc(var(--cue-space-8)*3)] place-items-center-safe";
|
|
41
|
+
const STAGE_TAIL = "p-(--cue-space-6) text-fg";
|
|
42
|
+
/** Which ground a presentation paints when the caller names none (spec §4.1). */
|
|
43
|
+
const DEFAULT_GROUND = {
|
|
44
|
+
panel: "dots",
|
|
45
|
+
frame: "none"
|
|
46
|
+
};
|
|
33
47
|
const TOOLS_CLASS = "absolute top-(--cue-space-2) right-(--cue-space-2) z-10 flex items-center gap-px rounded-(--radius-control) border border-border bg-surface-2 p-px";
|
|
34
48
|
/**
|
|
35
49
|
* The room the tools take, kept clear on the stage — only when there are tools.
|
|
@@ -52,6 +66,79 @@ const TOOLS_CLASS = "absolute top-(--cue-space-2) right-(--cue-space-2) z-10 fle
|
|
|
52
66
|
const TOOLS_RESERVE_BENCH = "[--preview-tools-clear:calc(var(--cue-space-2)*2+var(--cue-control-sm)+4px)]";
|
|
53
67
|
const TOOLS_RESERVE_STAGE = "pt-(--preview-tools-clear)";
|
|
54
68
|
const FOOTER_CLASS = "flex min-w-0 items-center gap-(--cue-space-2) border-t border-border px-(--cue-space-4) py-(--cue-space-2)";
|
|
69
|
+
/**
|
|
70
|
+
* A frame's root: no card, no border, no fill. The frame is a thing on a
|
|
71
|
+
* canvas, and the canvas is what paints. `shrink-0` because a canvas is a flex
|
|
72
|
+
* row that scrolls, and a frame that shrank to fit would defeat the scrolling.
|
|
73
|
+
*/
|
|
74
|
+
const FRAME_ROOT_CLASS = "relative flex min-w-0 shrink-0 flex-col gap-(--cue-space-2) text-fg";
|
|
75
|
+
/**
|
|
76
|
+
* A frame's footer: the same row as a panel's, without the rule across the top
|
|
77
|
+
* or the card's horizontal padding — there is no card for either to belong to.
|
|
78
|
+
*/
|
|
79
|
+
const FRAME_FOOTER_CLASS = "flex min-w-0 items-center gap-(--cue-space-2) text-(length:--cue-text-micro) text-fg-subtle";
|
|
80
|
+
/** The row above a frame's stage: the name (or its control), the count, and the tools. */
|
|
81
|
+
const FRAME_LABEL_CLASS = "flex min-w-0 items-center gap-(--cue-space-2) text-(length:--cue-text-label) text-fg-muted";
|
|
82
|
+
/** The name when the caller passed no control for it — the frame's `label`, as text. */
|
|
83
|
+
const FRAME_NAME_CLASS = "min-w-0 truncate font-mono text-(length:--cue-text-label) text-fg";
|
|
84
|
+
/** The count beside it: quieter, and never allowed to shrink the name's truncation away. */
|
|
85
|
+
const FRAME_COUNT_CLASS = "shrink-0 font-mono text-(length:--cue-text-micro) text-fg-subtle";
|
|
86
|
+
/**
|
|
87
|
+
* A frame's tools: pushed to the row's end, and carrying none of the panel's
|
|
88
|
+
* overlay chrome. A frame's stage is transparent, so a toolbar drawn over it
|
|
89
|
+
* would float on the canvas ground with nothing behind it (spec §4.1 Decision 2).
|
|
90
|
+
*/
|
|
91
|
+
const FRAME_TOOLS_CLASS = "ml-auto flex shrink-0 items-center gap-px";
|
|
92
|
+
/**
|
|
93
|
+
* The box that holds the bench and the four marks.
|
|
94
|
+
*
|
|
95
|
+
* One more element than the spec's Decision 3 priced, and it is not avoidable.
|
|
96
|
+
* The bench is `overflow-auto`: a mark positioned inside it is clipped at the
|
|
97
|
+
* padding box and scrolls with the content. The frame's root is no good either
|
|
98
|
+
* — its first child is the label row, so the root's top-left corner is the
|
|
99
|
+
* label's and not the stage's. So the frame gets one `relative` box whose
|
|
100
|
+
* borders are exactly the stage's, and the marks hang off that.
|
|
101
|
+
*/
|
|
102
|
+
const FRAME_BOX_CLASS = "relative flex min-w-0 flex-col";
|
|
103
|
+
/**
|
|
104
|
+
* Captions off, as properties the item reads rather than a prop each item takes.
|
|
105
|
+
*
|
|
106
|
+
* A reader turns captions off for a whole frame from its settings popover,
|
|
107
|
+
* never for one item — so the switch is on the frame and the item obeys it
|
|
108
|
+
* through inheritance.
|
|
109
|
+
*
|
|
110
|
+
* **`opacity: 0`, and deliberately not `visibility: hidden`.** §4.1 Decision 4
|
|
111
|
+
* refuses "removing a hidden caption from the accessibility tree", and
|
|
112
|
+
* `visibility: hidden` does exactly that — a browser drops such a node as
|
|
113
|
+
* surely as it drops a `display: none` one. Zero opacity keeps the box, so
|
|
114
|
+
* nothing re-flows, *and* keeps the caption announced, which is what the
|
|
115
|
+
* refusal is for: the caption is what names the specimen for a reader who
|
|
116
|
+
* cannot see the difference between two of them.
|
|
117
|
+
*
|
|
118
|
+
* **Two properties, declared together here so the pair is never half-applied.**
|
|
119
|
+
* Custom properties are untyped text: `opacity` wants a number and
|
|
120
|
+
* `pointer-events` wants a keyword, so one property cannot carry both. The
|
|
121
|
+
* second is what stops an unpainted caption being clicked, or a drag across the
|
|
122
|
+
* stage selecting words nobody can see.
|
|
123
|
+
*/
|
|
124
|
+
const CAPTIONS_OFF = "[--preview-captions:0] [--preview-captions-pe:none]";
|
|
125
|
+
/**
|
|
126
|
+
* One corner mark: an 11×11 box with a one-pixel cross drawn as two linear
|
|
127
|
+
* gradients — a vertical hairline and a horizontal one — so the mark is a
|
|
128
|
+
* background and not four more elements.
|
|
129
|
+
*
|
|
130
|
+
* Not a border and not an SVG. A border would have to be on the stage, and the
|
|
131
|
+
* stage is the theme island: a frame's chrome that moved with a stage theme is
|
|
132
|
+
* the one thing ruling 7 forbids.
|
|
133
|
+
*/
|
|
134
|
+
const CROSS_CLASS = "pointer-events-none absolute z-10 size-[11px] bg-[linear-gradient(var(--cue-fg-subtle),var(--cue-fg-subtle)),linear-gradient(var(--cue-fg-subtle),var(--cue-fg-subtle))] bg-[length:1px_11px,11px_1px] bg-[position:center,center] bg-no-repeat";
|
|
135
|
+
/** The four corners, each half outside the box so the cross straddles the corner. */
|
|
136
|
+
const CROSS_CORNERS = [
|
|
137
|
+
"-top-[5px] -left-[5px]",
|
|
138
|
+
"-top-[5px] -right-[5px]",
|
|
139
|
+
"-bottom-[5px] -left-[5px]",
|
|
140
|
+
"-bottom-[5px] -right-[5px]"
|
|
141
|
+
];
|
|
55
142
|
const GRIP_FOCUS = "touch-none outline-none hover:bg-(--cue-border-strong) focus-visible:bg-accent";
|
|
56
143
|
const GRIP_X_CLASS = `absolute top-0 right-0 z-10 h-full w-(--cue-space-2) cursor-col-resize ${GRIP_FOCUS}`;
|
|
57
144
|
const GRIP_Y_CLASS = `absolute bottom-0 left-0 z-10 h-(--cue-space-2) w-full cursor-row-resize ${GRIP_FOCUS}`;
|
|
@@ -357,9 +444,18 @@ function Grips({ label, options, size }) {
|
|
|
357
444
|
] });
|
|
358
445
|
}
|
|
359
446
|
/**
|
|
360
|
-
* A
|
|
447
|
+
* A card for one component: a stage that is its own theme island, a slot for
|
|
361
448
|
* tools at the top right, and a footer.
|
|
362
449
|
*
|
|
450
|
+
* **Two presentations, one stage.** `"panel"`, the default and what every
|
|
451
|
+
* existing caller gets, is that card: a border, a fill, a dot grid under the
|
|
452
|
+
* specimen, and the tools floating over the stage's top right. `"frame"` is a
|
|
453
|
+
* design-canvas frame — no card, no border, no fill; the name, the count and
|
|
454
|
+
* the tools sit in a row *above* the stage rather than over it, four crosshairs
|
|
455
|
+
* mark the stage's outer corners, and the stage paints nothing by default, so
|
|
456
|
+
* whatever canvas the frame sits on shows through. Everything below holds in
|
|
457
|
+
* both.
|
|
458
|
+
*
|
|
363
459
|
* **The stage is the island; the chrome is not.** `theme`, `mode`, `density`
|
|
364
460
|
* and `font` land on the stage element only, and the stage republishes the
|
|
365
461
|
* theme and density contexts so an overlay opened on it follows it. The tools,
|
|
@@ -375,7 +471,7 @@ function Grips({ label, options, size }) {
|
|
|
375
471
|
* that is under `maxWidth`. Not `Resizable`, which is split panes on an
|
|
376
472
|
* optional peer.
|
|
377
473
|
*
|
|
378
|
-
* Props, not a compound: one stage and
|
|
474
|
+
* Props, not a compound: one stage and its slots, each saying what it is.
|
|
379
475
|
*
|
|
380
476
|
* @example
|
|
381
477
|
* <Preview label="Button preview" tools={<IconButton aria-label="Configure Button" icon={Wrench} />}>
|
|
@@ -385,8 +481,12 @@ function Grips({ label, options, size }) {
|
|
|
385
481
|
* <Preview label="Chip preview" theme="terminal" density="compact" resizable>
|
|
386
482
|
* <Chip tone="accent">Standby</Chip>
|
|
387
483
|
* </Preview>
|
|
484
|
+
* @example
|
|
485
|
+
* <Preview label="Button" presentation="frame" count={3}>
|
|
486
|
+
* <Button variant="primary">Take cue</Button>
|
|
487
|
+
* </Preview>
|
|
388
488
|
*/
|
|
389
|
-
const Preview = React.forwardRef(function Preview({ children, label, theme, mode, density, font, resizable, tools, footer, className, ...elementProps }, ref) {
|
|
489
|
+
const Preview = React.forwardRef(function Preview({ children, label, theme, mode, density, font, resizable, tools, footer, presentation = "panel", name, count, ground, captions = true, className, ...elementProps }, ref) {
|
|
390
490
|
const outer = React.useContext(ThemeContext);
|
|
391
491
|
const bench = React.useRef(null);
|
|
392
492
|
const given = resolveResize(resizable);
|
|
@@ -399,10 +499,11 @@ const Preview = React.forwardRef(function Preview({ children, label, theme, mode
|
|
|
399
499
|
density,
|
|
400
500
|
font
|
|
401
501
|
}, outer);
|
|
502
|
+
const framed = presentation === "frame";
|
|
402
503
|
const stage = /* @__PURE__ */ jsx("div", {
|
|
403
504
|
"data-slot": "preview-stage",
|
|
404
505
|
...attributes,
|
|
405
|
-
className: cn(
|
|
506
|
+
className: cn(STAGE_HEAD, GROUND_CLASSES[ground ?? DEFAULT_GROUND[presentation]], STAGE_TAIL, options !== null && "flex-1", !framed && tools !== void 0 && TOOLS_RESERVE_STAGE, !captions && CAPTIONS_OFF),
|
|
406
507
|
style: size.height === null ? void 0 : { minHeight: 0 },
|
|
407
508
|
children: /* @__PURE__ */ jsx(StageScope, {
|
|
408
509
|
theme,
|
|
@@ -411,6 +512,75 @@ const Preview = React.forwardRef(function Preview({ children, label, theme, mode
|
|
|
411
512
|
children
|
|
412
513
|
})
|
|
413
514
|
});
|
|
515
|
+
const benched = /* @__PURE__ */ jsx("div", {
|
|
516
|
+
ref: bench,
|
|
517
|
+
"data-slot": "preview-bench",
|
|
518
|
+
className: cn(BENCH_CLASS, footer === void 0 && "rounded-b-(--radius-surface)", !framed && tools !== void 0 && TOOLS_RESERVE_BENCH),
|
|
519
|
+
children: options === null ? stage : /* @__PURE__ */ jsxs("div", {
|
|
520
|
+
ref: size.sizer,
|
|
521
|
+
"data-slot": "preview-sizer",
|
|
522
|
+
className: cn("relative flex flex-col", size.width === null && "w-full"),
|
|
523
|
+
style: {
|
|
524
|
+
width: size.width === null ? void 0 : `${size.shownWidth}px`,
|
|
525
|
+
height: size.height === null ? void 0 : `${size.shownHeight}px`,
|
|
526
|
+
minWidth: `${options.minWidth}px`,
|
|
527
|
+
maxWidth: `${options.maxWidth}px`,
|
|
528
|
+
minHeight: `${options.minHeight}px`,
|
|
529
|
+
maxHeight: `${options.maxHeight}px`
|
|
530
|
+
},
|
|
531
|
+
children: [stage, /* @__PURE__ */ jsx(Grips, {
|
|
532
|
+
label,
|
|
533
|
+
options,
|
|
534
|
+
size
|
|
535
|
+
})]
|
|
536
|
+
})
|
|
537
|
+
});
|
|
538
|
+
if (framed) return /* @__PURE__ */ jsxs("div", {
|
|
539
|
+
...elementProps,
|
|
540
|
+
ref,
|
|
541
|
+
role: "group",
|
|
542
|
+
"aria-label": label,
|
|
543
|
+
"data-slot": "preview",
|
|
544
|
+
"data-presentation": "frame",
|
|
545
|
+
className: cn(FRAME_ROOT_CLASS, options !== null && "w-full", className),
|
|
546
|
+
children: [
|
|
547
|
+
/* @__PURE__ */ jsxs("div", {
|
|
548
|
+
"data-slot": "preview-frame-label",
|
|
549
|
+
className: FRAME_LABEL_CLASS,
|
|
550
|
+
children: [
|
|
551
|
+
name === void 0 ? /* @__PURE__ */ jsx("span", {
|
|
552
|
+
"data-slot": "preview-name",
|
|
553
|
+
className: FRAME_NAME_CLASS,
|
|
554
|
+
children: label
|
|
555
|
+
}) : name,
|
|
556
|
+
count === void 0 ? null : /* @__PURE__ */ jsx("span", {
|
|
557
|
+
"data-slot": "preview-count",
|
|
558
|
+
className: FRAME_COUNT_CLASS,
|
|
559
|
+
children: count
|
|
560
|
+
}),
|
|
561
|
+
tools === void 0 ? null : /* @__PURE__ */ jsx("div", {
|
|
562
|
+
"data-slot": "preview-tools",
|
|
563
|
+
className: FRAME_TOOLS_CLASS,
|
|
564
|
+
children: tools
|
|
565
|
+
})
|
|
566
|
+
]
|
|
567
|
+
}),
|
|
568
|
+
/* @__PURE__ */ jsxs("div", {
|
|
569
|
+
"data-slot": "preview-frame",
|
|
570
|
+
className: FRAME_BOX_CLASS,
|
|
571
|
+
children: [benched, CROSS_CORNERS.map((corner) => /* @__PURE__ */ jsx("span", {
|
|
572
|
+
"aria-hidden": "true",
|
|
573
|
+
"data-slot": "preview-crosshair",
|
|
574
|
+
className: cn(CROSS_CLASS, corner)
|
|
575
|
+
}, corner))]
|
|
576
|
+
}),
|
|
577
|
+
footer === void 0 ? null : /* @__PURE__ */ jsx("div", {
|
|
578
|
+
"data-slot": "preview-footer",
|
|
579
|
+
className: FRAME_FOOTER_CLASS,
|
|
580
|
+
children: footer
|
|
581
|
+
})
|
|
582
|
+
]
|
|
583
|
+
});
|
|
414
584
|
return /* @__PURE__ */ jsxs("div", {
|
|
415
585
|
...elementProps,
|
|
416
586
|
ref,
|
|
@@ -419,29 +589,7 @@ const Preview = React.forwardRef(function Preview({ children, label, theme, mode
|
|
|
419
589
|
"data-slot": "preview",
|
|
420
590
|
className: cn(ROOT_CLASS, options !== null && "w-full", className),
|
|
421
591
|
children: [
|
|
422
|
-
|
|
423
|
-
ref: bench,
|
|
424
|
-
"data-slot": "preview-bench",
|
|
425
|
-
className: cn(BENCH_CLASS, footer === void 0 && "rounded-b-(--radius-surface)", tools !== void 0 && TOOLS_RESERVE_BENCH),
|
|
426
|
-
children: options === null ? stage : /* @__PURE__ */ jsxs("div", {
|
|
427
|
-
ref: size.sizer,
|
|
428
|
-
"data-slot": "preview-sizer",
|
|
429
|
-
className: cn("relative flex flex-col", size.width === null && "w-full"),
|
|
430
|
-
style: {
|
|
431
|
-
width: size.width === null ? void 0 : `${size.shownWidth}px`,
|
|
432
|
-
height: size.height === null ? void 0 : `${size.shownHeight}px`,
|
|
433
|
-
minWidth: `${options.minWidth}px`,
|
|
434
|
-
maxWidth: `${options.maxWidth}px`,
|
|
435
|
-
minHeight: `${options.minHeight}px`,
|
|
436
|
-
maxHeight: `${options.maxHeight}px`
|
|
437
|
-
},
|
|
438
|
-
children: [stage, /* @__PURE__ */ jsx(Grips, {
|
|
439
|
-
label,
|
|
440
|
-
options,
|
|
441
|
-
size
|
|
442
|
-
})]
|
|
443
|
-
})
|
|
444
|
-
}),
|
|
592
|
+
benched,
|
|
445
593
|
tools === void 0 ? null : /* @__PURE__ */ jsx("div", {
|
|
446
594
|
"data-slot": "preview-tools",
|
|
447
595
|
className: TOOLS_CLASS,
|
package/dist/overlays/drawer.js
CHANGED
|
@@ -104,7 +104,7 @@ const Drawer$1 = {
|
|
|
104
104
|
children: [grabHandle ? /* @__PURE__ */ jsx("div", {
|
|
105
105
|
"data-slot": "drawer-grab-handle",
|
|
106
106
|
"aria-hidden": "true",
|
|
107
|
-
className: cn("shrink-0 rounded-
|
|
107
|
+
className: cn("shrink-0 rounded-full bg-border-strong", vertical ? "mx-auto my-(--cue-space-2) h-1 w-9" : "my-auto mx-(--cue-space-2) h-9 w-1")
|
|
108
108
|
}) : null, /* @__PURE__ */ jsx(Drawer.Content, {
|
|
109
109
|
"data-slot": "drawer-content",
|
|
110
110
|
className: "flex min-h-0 flex-1 flex-col gap-(--cue-space-4) p-(--cue-space-6)",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"defaultValue": null,
|
|
17
17
|
"description": "Date and count pairs from the heat-graph package. Levels are classified for you;\ngaps are filled as empty cells.",
|
|
18
18
|
"control": {
|
|
19
|
-
"kind": "array"
|
|
19
|
+
"kind": "array",
|
|
20
|
+
"fixture": "agents.run-days"
|
|
20
21
|
}
|
|
21
22
|
},
|
|
22
23
|
{
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"defaultValue": null,
|
|
17
17
|
"description": "Detached runs. The header counts what is ready rather than what is in flight,\nbecause ready is the thing that needs you.",
|
|
18
18
|
"control": {
|
|
19
|
-
"kind": "array"
|
|
19
|
+
"kind": "array",
|
|
20
|
+
"fixture": "agents.inbox"
|
|
20
21
|
}
|
|
21
22
|
},
|
|
22
23
|
{
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
"--cue-surface-1",
|
|
255
255
|
"--cue-surface-2",
|
|
256
256
|
"--cue-text-emphasis",
|
|
257
|
-
"--cue-text-
|
|
257
|
+
"--cue-text-micro"
|
|
258
258
|
],
|
|
259
259
|
"summary": "The unequal grid: tiles of different sizes on one set of tracks, from a closed set of spans.",
|
|
260
260
|
"examples": [
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"defaultValue": null,
|
|
15
15
|
"description": "What is occupying the window, in the order it stacks in the bar. Headroom\nis derived from the limit, never passed.",
|
|
16
16
|
"control": {
|
|
17
|
-
"kind": "array"
|
|
17
|
+
"kind": "array",
|
|
18
|
+
"fixture": "agents.window"
|
|
18
19
|
}
|
|
19
20
|
},
|
|
20
21
|
{
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"defaultValue": null,
|
|
27
27
|
"description": "Matches in document order. Each carries its own surrounding text so no lookup is\nneeded to render the preview.",
|
|
28
28
|
"control": {
|
|
29
|
-
"kind": "array"
|
|
29
|
+
"kind": "array",
|
|
30
|
+
"fixture": "composer.hits"
|
|
30
31
|
}
|
|
31
32
|
},
|
|
32
33
|
{
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"defaultValue": null,
|
|
15
15
|
"description": "Turns in order. A separator is inserted wherever day changes from the previous\nmessage, so grouping needs no pre-processing.",
|
|
16
16
|
"control": {
|
|
17
|
-
"kind": "array"
|
|
17
|
+
"kind": "array",
|
|
18
|
+
"fixture": "thread.days"
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
],
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"defaultValue": null,
|
|
15
15
|
"description": "Every node with its grid position. Layout is explicit; the element runs no solver.",
|
|
16
16
|
"control": {
|
|
17
|
-
"kind": "array"
|
|
17
|
+
"kind": "array",
|
|
18
|
+
"fixture": "agents.flow-nodes"
|
|
18
19
|
}
|
|
19
20
|
},
|
|
20
21
|
{
|
|
@@ -24,7 +25,8 @@
|
|
|
24
25
|
"defaultValue": null,
|
|
25
26
|
"description": "Connections by node id. An edge dims until both of its ends are visible.",
|
|
26
27
|
"control": {
|
|
27
|
-
"kind": "array"
|
|
28
|
+
"kind": "array",
|
|
29
|
+
"fixture": "agents.flow-edges"
|
|
28
30
|
}
|
|
29
31
|
},
|
|
30
32
|
{
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"Sub",
|
|
59
59
|
"Sup"
|
|
60
60
|
],
|
|
61
|
-
"code": "<Specimens>\n <Specimen label=\"worked through\" wide>\n <MathBlock label=\"illuminance at the deck\" steps={MATH} visibleSteps={
|
|
61
|
+
"code": "<Specimens>\n <Specimen label=\"worked through\" wide>\n <MathBlock label=\"illuminance at the deck\" steps={MATH} visibleSteps={3} />\n </Specimen>\n <Specimen label=\"first step only\" wide>\n <MathBlock steps={MATH} visibleSteps={1} />\n </Specimen>\n</Specimens>",
|
|
62
62
|
"note": "Maths with the working shown, a step at a time. The expressions are nodes rather than a string, so there is no parser and no KaTeX in the bundle — `Frac` stacks a numerator over a rule, `Sup` and `Sub` set an index upright inside the serif italic, and anything else is text.",
|
|
63
63
|
"interaction": "none. Each step's note says what justified it, which is what turns three lines of algebra into an explanation."
|
|
64
64
|
}
|