@crewlethq/ui 0.33.0 → 0.34.1

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 (70) hide show
  1. package/README.md +18 -0
  2. package/dist/ArtifactBar/index.js +6 -4
  3. package/dist/ArtifactCard/ArtifactCard.d.ts +51 -11
  4. package/dist/ArtifactCard/index.d.ts +2 -2
  5. package/dist/ArtifactCard/index.js +3 -1
  6. package/dist/ArtifactCard-XHRLAL7C.css +289 -0
  7. package/dist/ArtifactCover/index.js +4 -2
  8. package/dist/ArtifactIcon/index.js +4 -2
  9. package/dist/ArtifactKindIllustration/ArtifactKindIllustration.d.ts +53 -0
  10. package/dist/ArtifactKindIllustration/index.d.ts +3 -0
  11. package/dist/ArtifactKindIllustration/index.js +3 -0
  12. package/dist/ArtifactKindIllustration-4NG6IE3C.css +211 -0
  13. package/dist/Canvas/index.js +2 -2
  14. package/dist/CanvasBoard/index.js +4 -4
  15. package/dist/CanvasToolbar/index.js +3 -3
  16. package/dist/ChangeMark/index.js +3 -3
  17. package/dist/FactList/index.js +2 -2
  18. package/dist/LivePreview/LivePreview.d.ts +83 -0
  19. package/dist/LivePreview/budget.d.ts +50 -0
  20. package/dist/LivePreview/index.d.ts +5 -0
  21. package/dist/LivePreview/index.js +2 -0
  22. package/dist/LivePreview-SRO7KHO4.css +65 -0
  23. package/dist/OrgTable/index.js +1 -1
  24. package/dist/RichEditor/index.js +2 -2
  25. package/dist/SandboxedFrame/index.js +2 -2
  26. package/dist/Select/Select.d.ts +10 -0
  27. package/dist/Select/index.d.ts +1 -1
  28. package/dist/Select/index.js +1 -1
  29. package/dist/{Select-2P7AWUE4.css → Select-A54YS5EP.css} +29 -0
  30. package/dist/ShareDialog/index.js +2 -2
  31. package/dist/SheetGrid/SheetGrid.d.ts +4 -2
  32. package/dist/SheetGrid/index.js +4 -4
  33. package/dist/{SheetGrid-AKPUCK67.css → SheetGrid-GDPCCZ4V.css} +52 -11
  34. package/dist/SheetModel/index.js +1 -1
  35. package/dist/SheetModel/labels.d.ts +1 -1
  36. package/dist/Switcher/index.js +2 -2
  37. package/dist/TimeWindowPicker/index.js +2 -2
  38. package/dist/Tooltip/Tooltip.d.ts +12 -1
  39. package/dist/Tooltip/index.d.ts +1 -1
  40. package/dist/Tooltip/index.js +1 -1
  41. package/dist/TreeCanvas/index.js +3 -3
  42. package/dist/{chunk-22UEIXZE.js → chunk-3P4Y5RX6.js} +1 -1
  43. package/dist/{chunk-GLSOD5Z4.js → chunk-3Y56GQPM.js} +1 -1
  44. package/dist/{chunk-5FYPE5GL.js → chunk-6ZJ3N7QI.js} +5 -2
  45. package/dist/{chunk-2DHMVB5J.js → chunk-AORVEG5V.js} +1 -1
  46. package/dist/{chunk-UQGFHNDI.js → chunk-BQ7AKL2N.js} +3 -2
  47. package/dist/{chunk-ORT5IKHP.js → chunk-CCLNGVCM.js} +1 -1
  48. package/dist/{chunk-UNXLTJU7.js → chunk-CFAJP777.js} +1 -1
  49. package/dist/{chunk-G4ZW7A2W.js → chunk-EWAFN2IU.js} +33 -34
  50. package/dist/{chunk-7WHDPLVJ.js → chunk-HOIZ6MIS.js} +1 -1
  51. package/dist/{chunk-Z6GFMI2Z.js → chunk-IUD5VA2Z.js} +2 -2
  52. package/dist/chunk-KF6YGL4B.js +160 -0
  53. package/dist/{chunk-HH2GKAAE.js → chunk-PLDUNXAO.js} +1 -1
  54. package/dist/{chunk-ZNBLFCQS.js → chunk-SGHIAGPR.js} +2 -2
  55. package/dist/chunk-UDQW6UK7.js +129 -0
  56. package/dist/{chunk-4IJS5CPF.js → chunk-UHJQDFKQ.js} +1 -1
  57. package/dist/{chunk-J6ZSH3F5.js → chunk-VI5FWDZW.js} +2 -2
  58. package/dist/{chunk-MDNVHIB2.js → chunk-WPX6A5BV.js} +2 -2
  59. package/dist/chunk-XTOVADJU.js +170 -0
  60. package/dist/generated/index.d.ts +2 -0
  61. package/dist/generated/index.js +47 -45
  62. package/dist/index.js +47 -45
  63. package/dist/styles.css +544 -27
  64. package/package.json +3 -3
  65. package/dist/ArtifactCard-AS5Z4CVI.css +0 -124
  66. package/dist/chunk-DFZMYB5X.js +0 -108
  67. package/dist/{chunk-3U7S6ZUN.js → chunk-356JNSER.js} +1 -1
  68. package/dist/{chunk-MTMKIUWF.js → chunk-E4NNGC6X.js} +1 -1
  69. package/dist/{chunk-O37AQNLK.js → chunk-GMU6SQ6B.js} +1 -1
  70. /package/dist/{chunk-2JJIN6JN.js → chunk-YCARLYI6.js} +0 -0
@@ -0,0 +1,211 @@
1
+ /*
2
+ * A kind's drawing, its tinted ground and the Make something new tile.
3
+ *
4
+ * Every colour is the kind's token, `--color-artifact-kind-<kind>` and its
5
+ * Fill and Line steps, set once per kind on `--crewlet-kind-*` and read by
6
+ * every rule below, so the drawing, the ground and the tile repaint together
7
+ * with the theme.
8
+ */
9
+
10
+ .crewlet-kind--doc { --crewlet-kind-hue: var(--color-artifact-kind-doc); --crewlet-kind-fill: var(--color-artifact-kind-doc-fill); --crewlet-kind-line: var(--color-artifact-kind-doc-line); --crewlet-kind-ink: var(--color-artifact-kind-doc-ink); }
11
+ .crewlet-kind--slides { --crewlet-kind-hue: var(--color-artifact-kind-slides); --crewlet-kind-fill: var(--color-artifact-kind-slides-fill); --crewlet-kind-line: var(--color-artifact-kind-slides-line); --crewlet-kind-ink: var(--color-artifact-kind-slides-ink); }
12
+ .crewlet-kind--design { --crewlet-kind-hue: var(--color-artifact-kind-design); --crewlet-kind-fill: var(--color-artifact-kind-design-fill); --crewlet-kind-line: var(--color-artifact-kind-design-line); --crewlet-kind-ink: var(--color-artifact-kind-design-ink); }
13
+ .crewlet-kind--dashboard { --crewlet-kind-hue: var(--color-artifact-kind-dashboard); --crewlet-kind-fill: var(--color-artifact-kind-dashboard-fill); --crewlet-kind-line: var(--color-artifact-kind-dashboard-line); --crewlet-kind-ink: var(--color-artifact-kind-dashboard-ink); }
14
+ .crewlet-kind--html { --crewlet-kind-hue: var(--color-artifact-kind-html); --crewlet-kind-fill: var(--color-artifact-kind-html-fill); --crewlet-kind-line: var(--color-artifact-kind-html-line); --crewlet-kind-ink: var(--color-artifact-kind-html-ink); }
15
+ .crewlet-kind--sheet { --crewlet-kind-hue: var(--color-artifact-kind-sheet); --crewlet-kind-fill: var(--color-artifact-kind-sheet-fill); --crewlet-kind-line: var(--color-artifact-kind-sheet-line); --crewlet-kind-ink: var(--color-artifact-kind-sheet-ink); }
16
+
17
+ /* ---- the drawing ---- */
18
+
19
+ .crewlet-kind-illustration {
20
+ display: block;
21
+ width: 100%;
22
+ height: 100%;
23
+ overflow: visible;
24
+ }
25
+
26
+ /* THE FOUR WEIGHTS, each the kind's hue at a fixed opacity: the body is a
27
+ translucent pane with a hairline edge, lines are content, a soft block is
28
+ a picture or a bar, and the mark is the one solid thing the eye lands on. */
29
+ .crewlet-kind-illustration .b {
30
+ fill: var(--crewlet-kind-hue);
31
+ fill-opacity: 0.14;
32
+ stroke: var(--crewlet-kind-hue);
33
+ stroke-opacity: 0.5;
34
+ stroke-width: 1.5;
35
+ }
36
+
37
+ .crewlet-kind-illustration .l {
38
+ fill: var(--crewlet-kind-hue);
39
+ fill-opacity: 0.45;
40
+ }
41
+
42
+ .crewlet-kind-illustration .s {
43
+ fill: var(--crewlet-kind-hue);
44
+ fill-opacity: 0.62;
45
+ }
46
+
47
+ .crewlet-kind-illustration .m {
48
+ fill: var(--crewlet-kind-hue);
49
+ }
50
+
51
+ /* A rule across the body (a window's bar, a grid's lines). */
52
+ .crewlet-kind-illustration .r {
53
+ fill: none;
54
+ stroke: var(--crewlet-kind-hue);
55
+ stroke-opacity: 0.3;
56
+ stroke-width: 1.5;
57
+ }
58
+
59
+ /* A stroke drawn as a glyph: the angle brackets of a page of code. */
60
+ .crewlet-kind-illustration .k {
61
+ fill: none;
62
+ stroke: var(--crewlet-kind-hue);
63
+ stroke-linecap: round;
64
+ stroke-linejoin: round;
65
+ stroke-width: 5;
66
+ }
67
+
68
+ .crewlet-kind-illustration .k--soft {
69
+ stroke-opacity: 0.55;
70
+ }
71
+
72
+ /* Cut out of a solid mark in the ground's colour: a checkbox's tick. */
73
+ .crewlet-kind-illustration .c {
74
+ fill: none;
75
+ stroke: var(--color-surface-background);
76
+ stroke-linecap: round;
77
+ stroke-linejoin: round;
78
+ stroke-width: 1.4;
79
+ }
80
+
81
+ .crewlet-kind-illustration .c--fill {
82
+ fill: var(--crewlet-kind-hue);
83
+ fill-opacity: 0.4;
84
+ stroke: none;
85
+ }
86
+
87
+ /* ---- the ground ---- */
88
+
89
+ /*
90
+ * THE KIND'S FILL OVER THE CARD, brightest at the top and settling into the
91
+ * card at the foot, the way light falls on a tinted pane: a flat fill read as
92
+ * a coloured box, and a hue strong enough to read on its own fought the
93
+ * previews beside it.
94
+ */
95
+ .crewlet-kind-ground {
96
+ display: flex;
97
+ align-items: center;
98
+ justify-content: center;
99
+ box-sizing: border-box;
100
+ width: 100%;
101
+ height: 100%;
102
+ padding: 8% 10%;
103
+ background:
104
+ linear-gradient(180deg, var(--crewlet-kind-fill) 0%, transparent 115%),
105
+ var(--color-surface-subtle);
106
+ }
107
+
108
+ .crewlet-kind-ground > .crewlet-kind-illustration {
109
+ max-width: 12rem;
110
+ max-height: 100%;
111
+ }
112
+
113
+ /* ---- the tile ---- */
114
+
115
+ .crewlet-kind-tile {
116
+ display: flex;
117
+ flex-direction: column;
118
+ gap: var(--spacing-2);
119
+ min-width: 0;
120
+ color: var(--color-text-primary);
121
+ text-decoration: none;
122
+ outline: none;
123
+ }
124
+
125
+ /*
126
+ * A FRAME AROUND A PANE: the tile is a hairline ring with the tinted ground
127
+ * set inside it a few pixels in, one radius step tighter, so the pane reads
128
+ * as sitting in a holder rather than as a coloured rectangle.
129
+ */
130
+ .crewlet-kind-tile__frame {
131
+ display: block;
132
+ box-sizing: border-box;
133
+ aspect-ratio: 4 / 3;
134
+ padding: 5px;
135
+ border: 1px solid var(--color-border-default);
136
+ border-radius: var(--radius-2xl);
137
+ background: var(--color-surface-subtle);
138
+ transition:
139
+ border-color var(--motion-duration-base) var(--motion-easing-out),
140
+ box-shadow var(--motion-duration-base) var(--motion-easing-out);
141
+ }
142
+
143
+ .crewlet-kind-tile__ground {
144
+ border-radius: var(--radius-xl);
145
+ box-shadow: inset 0 0 0 1px var(--crewlet-kind-line);
146
+ overflow: hidden;
147
+ }
148
+
149
+ .crewlet-kind-tile__ground > .crewlet-kind-illustration {
150
+ transition: transform var(--motion-duration-base) var(--motion-easing-out);
151
+ }
152
+
153
+ .crewlet-kind-tile__label {
154
+ display: flex;
155
+ align-items: center;
156
+ gap: var(--spacing-2);
157
+ min-width: 0;
158
+ padding-inline: var(--spacing-1);
159
+ }
160
+
161
+ .crewlet-kind-tile__name {
162
+ overflow: hidden;
163
+ font-size: var(--font-size-md);
164
+ font-weight: var(--font-weight-medium);
165
+ line-height: 1.3;
166
+ text-overflow: ellipsis;
167
+ white-space: nowrap;
168
+ }
169
+
170
+ .crewlet-kind-tile__badge {
171
+ flex: none;
172
+ padding: 1px var(--spacing-2);
173
+ border-radius: var(--radius-sm);
174
+ background: var(--crewlet-kind-fill);
175
+ color: var(--color-text-secondary);
176
+ font-size: var(--font-size-xs);
177
+ font-weight: var(--font-weight-medium);
178
+ }
179
+
180
+ a.crewlet-kind-tile:hover .crewlet-kind-tile__frame {
181
+ border-color: var(--color-border-hover);
182
+ }
183
+
184
+ a.crewlet-kind-tile:hover .crewlet-kind-tile__ground > .crewlet-kind-illustration {
185
+ transform: translateY(-2px) scale(1.03);
186
+ }
187
+
188
+ .crewlet-kind-tile:focus-visible .crewlet-kind-tile__frame {
189
+ outline: 2px solid var(--color-focus);
190
+ outline-offset: var(--size-focus-ring-inset-offset);
191
+ }
192
+
193
+ .crewlet-kind-tile--disabled {
194
+ cursor: not-allowed;
195
+ }
196
+
197
+ .crewlet-kind-tile--disabled .crewlet-kind-tile__ground,
198
+ .crewlet-kind-tile--disabled .crewlet-kind-tile__name {
199
+ opacity: 0.55;
200
+ }
201
+
202
+ @media (prefers-reduced-motion: reduce) {
203
+ .crewlet-kind-tile__frame,
204
+ .crewlet-kind-tile__ground > .crewlet-kind-illustration {
205
+ transition: none;
206
+ }
207
+
208
+ a.crewlet-kind-tile:hover .crewlet-kind-tile__ground > .crewlet-kind-illustration {
209
+ transform: none;
210
+ }
211
+ }
@@ -1,7 +1,7 @@
1
- export { CANVAS_COMPOSE_CONTEXT, CANVAS_FIT_MAX_ZOOM, CANVAS_FIT_PADDING, CANVAS_FOCUS_CONTEXT, CANVAS_MAX_ZOOM, CANVAS_MIN_ZOOM, CANVAS_PAN_MARGIN, CANVAS_PAN_STEP, CANVAS_REVEAL_PADDING, CANVAS_TAP_SLOP, CANVAS_WHEEL_LINE_PX, CANVAS_WHEEL_ZOOM_PER_PIXEL, CANVAS_ZOOM_CEILING, CANVAS_ZOOM_LIMITS, CANVAS_ZOOM_STEP, Canvas, IDENTITY_VIEW, ShortcutTip, anchorView, beyondSlop, clampPan, clampZoom, fitView, gridOf, panBy, pinchView, regionView, revealView, screenRect, toScreen, toWorld, wheelPixels, wheelZoomFactor, zoomAt, zoomLimits } from '../chunk-22UEIXZE.js';
1
+ export { CANVAS_COMPOSE_CONTEXT, CANVAS_FIT_MAX_ZOOM, CANVAS_FIT_PADDING, CANVAS_FOCUS_CONTEXT, CANVAS_MAX_ZOOM, CANVAS_MIN_ZOOM, CANVAS_PAN_MARGIN, CANVAS_PAN_STEP, CANVAS_REVEAL_PADDING, CANVAS_TAP_SLOP, CANVAS_WHEEL_LINE_PX, CANVAS_WHEEL_ZOOM_PER_PIXEL, CANVAS_ZOOM_CEILING, CANVAS_ZOOM_LIMITS, CANVAS_ZOOM_STEP, Canvas, IDENTITY_VIEW, ShortcutTip, anchorView, beyondSlop, clampPan, clampZoom, fitView, gridOf, panBy, pinchView, regionView, revealView, screenRect, toScreen, toWorld, wheelPixels, wheelZoomFactor, zoomAt, zoomLimits } from '../chunk-3P4Y5RX6.js';
2
2
  import '../chunk-LM3ISVJA.js';
3
3
  import '../chunk-SMBKXWML.js';
4
- import '../chunk-5FYPE5GL.js';
4
+ import '../chunk-6ZJ3N7QI.js';
5
5
  import '../chunk-OMV5W53A.js';
6
6
  import '../chunk-R25RGPUB.js';
7
7
  import '../chunk-OG6CL3EB.js';
@@ -1,11 +1,11 @@
1
- export { BOARD_TITLE_MIN_WIDTH, CANVAS_BOARD_MAX_LIVE, CANVAS_BOARD_MIN_LIVE_WIDTH, CANVAS_BOARD_MIN_ZOOM, CANVAS_NOTE_COLORS, CanvasBoard, TITLE_GLYPH_EM, boardRoom, liveBoards, titleSize } from '../chunk-MDNVHIB2.js';
1
+ export { BOARD_TITLE_MIN_WIDTH, CANVAS_BOARD_MAX_LIVE, CANVAS_BOARD_MIN_LIVE_WIDTH, CANVAS_BOARD_MIN_ZOOM, CANVAS_NOTE_COLORS, CanvasBoard, TITLE_GLYPH_EM, boardRoom, liveBoards, titleSize } from '../chunk-WPX6A5BV.js';
2
2
  import '../chunk-5SZGKSGL.js';
3
- import '../chunk-GLSOD5Z4.js';
3
+ import '../chunk-3Y56GQPM.js';
4
4
  import '../chunk-PGRPNDWM.js';
5
- import '../chunk-22UEIXZE.js';
5
+ import '../chunk-3P4Y5RX6.js';
6
6
  import '../chunk-LM3ISVJA.js';
7
7
  import '../chunk-SMBKXWML.js';
8
- import '../chunk-5FYPE5GL.js';
8
+ import '../chunk-6ZJ3N7QI.js';
9
9
  import '../chunk-OMV5W53A.js';
10
10
  import '../chunk-R25RGPUB.js';
11
11
  import '../chunk-OG6CL3EB.js';
@@ -1,9 +1,9 @@
1
- export { CanvasToolbar, toolForKey } from '../chunk-GLSOD5Z4.js';
1
+ export { CanvasToolbar, toolForKey } from '../chunk-3Y56GQPM.js';
2
2
  import '../chunk-PGRPNDWM.js';
3
- import '../chunk-22UEIXZE.js';
3
+ import '../chunk-3P4Y5RX6.js';
4
4
  import '../chunk-LM3ISVJA.js';
5
5
  import '../chunk-SMBKXWML.js';
6
- import '../chunk-5FYPE5GL.js';
6
+ import '../chunk-6ZJ3N7QI.js';
7
7
  import '../chunk-OMV5W53A.js';
8
8
  import '../chunk-R25RGPUB.js';
9
9
  import '../chunk-OG6CL3EB.js';
@@ -1,8 +1,8 @@
1
- export { ChangeMark } from '../chunk-ZNBLFCQS.js';
2
- import '../chunk-J6ZSH3F5.js';
1
+ export { ChangeMark } from '../chunk-SGHIAGPR.js';
2
+ import '../chunk-VI5FWDZW.js';
3
3
  import '../chunk-Z7JYG5TF.js';
4
4
  import '../chunk-AYKXMIOR.js';
5
- import '../chunk-5FYPE5GL.js';
5
+ import '../chunk-6ZJ3N7QI.js';
6
6
  import '../chunk-OMV5W53A.js';
7
7
  import '../chunk-R25RGPUB.js';
8
8
  import '../chunk-ODEQTPFM.js';
@@ -1,5 +1,5 @@
1
- export { FactList } from '../chunk-7WHDPLVJ.js';
2
- import '../chunk-5FYPE5GL.js';
1
+ export { FactList } from '../chunk-HOIZ6MIS.js';
2
+ import '../chunk-6ZJ3N7QI.js';
3
3
  import '../chunk-OMV5W53A.js';
4
4
  import '../chunk-R25RGPUB.js';
5
5
  import '../chunk-BZFWDIV6.js';
@@ -0,0 +1,83 @@
1
+ import { type ReactNode } from 'react';
2
+ /**
3
+ * Real content drawn small: a live, scaled-down snapshot of a page, a grid or
4
+ * a frame inside a fixed box, the way a gallery card previews what it opens.
5
+ *
6
+ * LAID OUT AT FULL SIZE, THEN SCALED. The content is given `width` CSS pixels
7
+ * to lay itself out in, exactly as it would on its own page, and the whole is
8
+ * scaled down to the box with a CSS transform, so the preview is the page
9
+ * itself at a smaller size and never a second layout of it. Left out, the
10
+ * content fills the box unscaled (a slide stage that scales itself).
11
+ *
12
+ * DRAWN ONLY WHEN IT CAN BE SEEN, AND ONLY SO MANY AT ONCE. The content is
13
+ * mounted while the box is within `rootMargin` of the viewport and the
14
+ * shared budget (`LivePreviewBudgetProvider`, twelve by default) grants it a
15
+ * slot, and unmounted when it scrolls away, giving the slot back. Until the
16
+ * content says it has drawn (`useLivePreview().ready()`), while it waits for a
17
+ * slot, when it failed (`fail()`) and in a browser with no
18
+ * IntersectionObserver, the box shows `fallback`.
19
+ *
20
+ * NEVER INTERACTIVE, NEVER ANNOUNCED. The live layer is `inert`, takes no
21
+ * pointer and is hidden from assistive technology: nothing in it can be
22
+ * focused or clicked, and whatever surrounds the preview (a card's link)
23
+ * names what it shows. The swap from the stand-in to the content is a short
24
+ * fade, and none under `prefers-reduced-motion`.
25
+ */
26
+ /**
27
+ * How long a box stays near the viewport before its content is asked for: a
28
+ * card a reader scrolls to rests longer than this, and one a fling carries
29
+ * past does not.
30
+ */
31
+ export declare const LIVE_PREVIEW_DWELL_MS = 120;
32
+ /** Gives the previews under it a budget of their own, `max` live at once. */
33
+ export declare function LivePreviewBudgetProvider({ max, children }: {
34
+ max?: number | undefined;
35
+ children: ReactNode;
36
+ }): import("react").JSX.Element;
37
+ export interface LivePreviewSignals {
38
+ /** The content has drawn: the stand-in gives way to it. */
39
+ ready: () => void;
40
+ /** The content has nothing to draw or could not draw: the stand-in stays, and the slot is given back. */
41
+ fail: () => void;
42
+ }
43
+ /** What live content tells the preview around it. Outside one, both do nothing. */
44
+ export declare function useLivePreview(): LivePreviewSignals;
45
+ /** Where a preview is in its life. */
46
+ export type LivePreviewState = 'idle' | 'waiting' | 'live' | 'ready' | 'failed';
47
+ export interface LivePreviewProps {
48
+ /** What is drawn small. Mounted only while the preview is live. */
49
+ children: ReactNode;
50
+ /** The stand-in, drawn whenever the content is not. */
51
+ fallback: ReactNode;
52
+ /** The width, in CSS pixels, the content lays itself out at before it is scaled to the box. */
53
+ width?: number | undefined;
54
+ /** How near the viewport the box comes before its content is mounted. */
55
+ rootMargin?: string | undefined;
56
+ /** Nothing live is drawn: the stand-in only (no content to show, or a host that has turned previews off). */
57
+ disabled?: boolean | undefined;
58
+ /** How long the box stays near the viewport before its content is asked for, in ms. */
59
+ dwellMs?: number | undefined;
60
+ /** Told each time the state moves, for a host that measures. */
61
+ onStateChange?: ((state: LivePreviewState) => void) | undefined;
62
+ className?: string | undefined;
63
+ }
64
+ export declare function LivePreview({ children, fallback, width, rootMargin, disabled, dwellMs, onStateChange, className }: LivePreviewProps): import("react").JSX.Element;
65
+ export interface PreviewScaleProps {
66
+ children: ReactNode;
67
+ /** The width, in CSS pixels, the content is laid out at. */
68
+ width: number;
69
+ /** The height it is laid out at. Left out, as tall as the box allows at the scale its width sets. */
70
+ height?: number | undefined;
71
+ /**
72
+ * `width` scales the content to the box's width from its top (the top of a
73
+ * page); `contain` scales it to fit inside the box whole, centred (a board
74
+ * of its own size).
75
+ */
76
+ fit?: 'width' | 'contain' | undefined;
77
+ }
78
+ /**
79
+ * Content laid out at a size of its own and scaled to the box it is drawn in,
80
+ * with a CSS transform: the layout `LivePreview` gives a page, for content
81
+ * that knows its own size only once it has loaded (a design's board).
82
+ */
83
+ export declare function PreviewScale({ children, width, height, fit }: PreviewScaleProps): import("react").JSX.Element;
@@ -0,0 +1,50 @@
1
+ /**
2
+ * How many live previews draw at once: the budget a gallery's cards share.
3
+ *
4
+ * WHY A BUDGET. A live preview is real content drawn small: a page of prose,
5
+ * a grid of cells, a slide, or a sandboxed frame running a page of its own. A
6
+ * gallery of two hundred artifacts that drew every one would run two hundred
7
+ * of them, most never seen. A preview asks for a slot when it comes near the
8
+ * viewport and gives it back when it leaves; past the cap it waits, drawing
9
+ * its stand-in, and is granted a slot the moment one is free, the oldest ask
10
+ * first.
11
+ *
12
+ * Plain bookkeeping with no layout, so it is tested without a browser.
13
+ */
14
+ /**
15
+ * The most previews live at once by default. A gallery at 1440 shows two or
16
+ * three rows of three cards with a row of margin either side, so twelve keeps
17
+ * everything a reader can scroll to in a moment live, and is the number of
18
+ * pages a design's canvas already runs at once (`CANVAS_BOARD_MAX_LIVE`).
19
+ */
20
+ export declare const LIVE_PREVIEW_MAX = 12;
21
+ export interface LivePreviewBudget {
22
+ /** The most slots granted at once. */
23
+ readonly max: number;
24
+ /**
25
+ * Asks for a slot. `grant` is called once, now or when a slot frees. The
26
+ * answer gives the slot back, or withdraws the ask if it was never granted;
27
+ * calling it again does nothing.
28
+ */
29
+ request(grant: () => void): () => void;
30
+ /** Slots held now, for a test or a measurement. */
31
+ live(): number;
32
+ /** Asks waiting now. */
33
+ waiting(): number;
34
+ }
35
+ /**
36
+ * Runs a grant later, and answers how to call it off. The budget hands out
37
+ * at most one slot per call, so a burst of asks (a fast scroll bringing a
38
+ * whole row near at once) mounts one preview per tick rather than all of them
39
+ * in one long task.
40
+ */
41
+ export type LivePreviewSchedule = (run: () => void) => () => void;
42
+ /** Grants now: for a test, and for a host that paces nothing. */
43
+ export declare const immediately: LivePreviewSchedule;
44
+ /**
45
+ * One grant per animation frame, after the frame's own work: the default in a
46
+ * browser, so mounting a row of previews never costs one frame more than one
47
+ * preview does.
48
+ */
49
+ export declare const perFrame: LivePreviewSchedule;
50
+ export declare function createLivePreviewBudget(max?: number, schedule?: LivePreviewSchedule): LivePreviewBudget;
@@ -0,0 +1,5 @@
1
+ import './LivePreview.css';
2
+ export { LIVE_PREVIEW_DWELL_MS, LivePreview, LivePreviewBudgetProvider, PreviewScale, useLivePreview } from './LivePreview.js';
3
+ export type { LivePreviewProps, LivePreviewSignals, LivePreviewState, PreviewScaleProps } from './LivePreview.js';
4
+ export { createLivePreviewBudget, immediately, LIVE_PREVIEW_MAX, perFrame } from './budget.js';
5
+ export type { LivePreviewBudget, LivePreviewSchedule } from './budget.js';
@@ -0,0 +1,2 @@
1
+ export { LIVE_PREVIEW_DWELL_MS, LIVE_PREVIEW_MAX, LivePreview, LivePreviewBudgetProvider, PreviewScale, createLivePreviewBudget, immediately, perFrame, useLivePreview } from '../chunk-KF6YGL4B.js';
2
+ import '../chunk-ODEQTPFM.js';
@@ -0,0 +1,65 @@
1
+ /*
2
+ * A live preview: the stand-in and the live layer stacked in one box. The box
3
+ * takes its size from its parent (a card's preview area), so it fills it and
4
+ * clips whatever the content lays out past its edge.
5
+ */
6
+
7
+ .crewlet-live-preview {
8
+ position: relative;
9
+ display: block;
10
+ width: 100%;
11
+ height: 100%;
12
+ overflow: hidden;
13
+ contain: layout paint;
14
+ }
15
+
16
+ .crewlet-live-preview__fallback {
17
+ position: absolute;
18
+ inset: 0;
19
+ display: flex;
20
+ transition: opacity var(--motion-duration-base) var(--motion-easing-out);
21
+ }
22
+
23
+ .crewlet-live-preview__live {
24
+ position: absolute;
25
+ inset: 0;
26
+ display: block;
27
+ overflow: hidden;
28
+ opacity: 0;
29
+ pointer-events: none;
30
+ user-select: none;
31
+ transition: opacity var(--motion-duration-base) var(--motion-easing-out);
32
+ }
33
+
34
+ /* LAID OUT AT ITS OWN SIZE from the top left corner, and scaled from there:
35
+ to the box's width, its top left the box's, or whole and centred. */
36
+ .crewlet-preview-scale {
37
+ position: absolute;
38
+ inset: 0;
39
+ display: block;
40
+ overflow: hidden;
41
+ }
42
+
43
+ .crewlet-preview-scale__layer {
44
+ position: absolute;
45
+ top: 0;
46
+ left: 0;
47
+ display: block;
48
+ overflow: hidden;
49
+ transform-origin: 0 0;
50
+ }
51
+
52
+ .crewlet-live-preview[data-state='ready'] > .crewlet-live-preview__live {
53
+ opacity: 1;
54
+ }
55
+
56
+ .crewlet-live-preview[data-state='ready'] > .crewlet-live-preview__fallback {
57
+ opacity: 0;
58
+ }
59
+
60
+ @media (prefers-reduced-motion: reduce) {
61
+ .crewlet-live-preview__fallback,
62
+ .crewlet-live-preview__live {
63
+ transition: none;
64
+ }
65
+ }
@@ -5,9 +5,9 @@ import '../chunk-ONQKKHON.js';
5
5
  import '../chunk-LM3ISVJA.js';
6
6
  import '../chunk-5AQBPHZD.js';
7
7
  import '../chunk-PZKHBB7D.js';
8
- import '../chunk-TROLVEZY.js';
9
8
  import '../chunk-OMV5W53A.js';
10
9
  import '../chunk-R25RGPUB.js';
10
+ import '../chunk-TROLVEZY.js';
11
11
  import '../chunk-4FQT6ZAY.js';
12
12
  import '../chunk-BZFWDIV6.js';
13
13
  import '../chunk-ODEQTPFM.js';
@@ -1,8 +1,8 @@
1
- export { RichEditor, preloadRichEditor } from '../chunk-MTMKIUWF.js';
1
+ export { RichEditor, preloadRichEditor } from '../chunk-E4NNGC6X.js';
2
2
  export { RICH_EDITOR_LABELS, richEditorLabels } from '../chunk-4B6LSFDS.js';
3
- import '../chunk-TEUQWOWZ.js';
4
3
  import '../chunk-KK5OYNAF.js';
5
4
  import '../chunk-SZZRIHGT.js';
5
+ import '../chunk-TEUQWOWZ.js';
6
6
  import '../chunk-OG6CL3EB.js';
7
7
  import '../chunk-BZFWDIV6.js';
8
8
  import '../chunk-ODEQTPFM.js';
@@ -1,8 +1,8 @@
1
- export { FRAME_HELLO_TIMEOUT_MS, FRAME_LOAD_GRACE_MS, SandboxedFrame, SandboxedFrameNotice, SandboxedFramePlaceholder } from '../chunk-3U7S6ZUN.js';
2
- import '../chunk-TEUQWOWZ.js';
1
+ export { FRAME_HELLO_TIMEOUT_MS, FRAME_LOAD_GRACE_MS, SandboxedFrame, SandboxedFrameNotice, SandboxedFramePlaceholder } from '../chunk-356JNSER.js';
3
2
  import '../chunk-F6V2PTN6.js';
4
3
  import '../chunk-ZXXDZJQN.js';
5
4
  import '../chunk-SZZRIHGT.js';
5
+ import '../chunk-TEUQWOWZ.js';
6
6
  import '../chunk-OG6CL3EB.js';
7
7
  import '../chunk-BZFWDIV6.js';
8
8
  import '../chunk-ODEQTPFM.js';
@@ -12,6 +12,8 @@ export type SelectAlign = 'left' | 'right';
12
12
  * one question per line, which is not what a filter bar is.
13
13
  */
14
14
  export type SelectWidth = 'full' | 'auto';
15
+ /** How much chrome a picker draws. See [SelectProps.appearance]. */
16
+ export type SelectAppearance = 'field' | 'quiet';
15
17
  /**
16
18
  * Which control this is.
17
19
  *
@@ -124,6 +126,14 @@ export interface SelectProps extends NativePassthrough {
124
126
  active?: boolean;
125
127
  /** Marks the value as refused. Sets `aria-invalid`. */
126
128
  error?: boolean;
129
+ /**
130
+ * `field` (the default) is a bordered picker, a form's. `quiet` draws no
131
+ * boundary until the pointer is over it, for a toolbar whose pickers
132
+ * arrange content that is the page's point (a gallery's type and order): a
133
+ * row of bordered boxes above a grid of cards read as a form to fill in.
134
+ * A quiet filter that is on takes the accent's soft fill and ink.
135
+ */
136
+ appearance?: SelectAppearance;
127
137
  ariaLabel?: string;
128
138
  searchable?: boolean;
129
139
  searchPlaceholder?: string;
@@ -1,3 +1,3 @@
1
1
  import './Select.css';
2
2
  export { Select } from './Select.js';
3
- export type { SelectAlign, SelectMode, SelectOption, SelectProps, SelectSize, SelectValue, } from './Select.js';
3
+ export type { SelectAlign, SelectAppearance, SelectMode, SelectOption, SelectProps, SelectSize, SelectValue, } from './Select.js';
@@ -1,4 +1,4 @@
1
- export { Select } from '../chunk-UQGFHNDI.js';
1
+ export { Select } from '../chunk-BQ7AKL2N.js';
2
2
  import '../chunk-F73MC7EZ.js';
3
3
  import '../chunk-OMV5W53A.js';
4
4
  import '../chunk-R25RGPUB.js';
@@ -97,6 +97,35 @@
97
97
  border-color: var(--color-feedback-danger);
98
98
  }
99
99
 
100
+ /*
101
+ * QUIET: no boundary and no fill at rest, the hover overlay under the
102
+ * pointer, and the ring on focus as every field draws it. It sizes to its
103
+ * answer with no floor, since a quiet picker in a toolbar reads as its words.
104
+ * A quiet filter that is on takes the accent's soft fill under its accent ink,
105
+ * so "this narrows the list" still shows without a box around it.
106
+ */
107
+ .crewlet-select--quiet {
108
+ --crewlet-select-auto-min-width: 0px;
109
+
110
+ border-color: transparent;
111
+ background-color: transparent;
112
+ }
113
+
114
+ .crewlet-select--quiet:hover {
115
+ border-color: transparent;
116
+ background-color: var(--color-surface-hover);
117
+ }
118
+
119
+ .crewlet-select--quiet.is-open {
120
+ background-color: var(--color-surface-hover);
121
+ }
122
+
123
+ .crewlet-select--quiet.is-active,
124
+ .crewlet-select--quiet.is-active:hover {
125
+ border-color: transparent;
126
+ background-color: var(--color-brand-accent-soft);
127
+ }
128
+
100
129
  /* A refused picker keeps its colour while the reader is in it: the ring
101
130
  covers the boundary, so a focus-coloured one would paint out the refusal.
102
131
  See Input.css. */
@@ -1,5 +1,5 @@
1
- export { ARTIFACT_ROLES, SHAREABLE_ROLES, ShareDialog, roleAtLeast } from '../chunk-ORT5IKHP.js';
2
- import '../chunk-UQGFHNDI.js';
1
+ export { ARTIFACT_ROLES, SHAREABLE_ROLES, ShareDialog, roleAtLeast } from '../chunk-CCLNGVCM.js';
2
+ import '../chunk-BQ7AKL2N.js';
3
3
  import '../chunk-W46LPU4R.js';
4
4
  import '../chunk-STJ7QBC3.js';
5
5
  import '../chunk-DTIW4CHZ.js';
@@ -83,8 +83,10 @@ export interface SheetGridProps {
83
83
  */
84
84
  fit?: 'container' | 'content' | undefined;
85
85
  /**
86
- * Shows the row actions menu on a row's number (the active row, a hovered
87
- * one, and Shift+F10 from any of its cells) with Delete row. The grid only
86
+ * Shows the row actions menu in a row's number gutter (the number gives way
87
+ * to the button under the pointer, on the row holding focus, and while the
88
+ * menu is open; a tap on the number opens it on a touch screen; Shift+F10
89
+ * opens it from any of the row's cells) with Delete row. The grid only
88
90
  * asks: the host confirms with its own dialog before it deletes anything.
89
91
  */
90
92
  onDeleteRow?: ((rowId: string) => void) | undefined;
@@ -1,15 +1,15 @@
1
- export { CellDisplay, CellEditor, CheckboxCell, DateCell, LongTextCell, MultiSelectCell, NumberCell, PersonCell, RatingCell, SelectCell, SheetCell, SheetGrid, StatusCell, TextCell, UrlCell } from '../chunk-G4ZW7A2W.js';
1
+ export { CellDisplay, CellEditor, CheckboxCell, DateCell, LongTextCell, MultiSelectCell, NumberCell, PersonCell, RatingCell, SelectCell, SheetCell, SheetGrid, StatusCell, TextCell, UrlCell } from '../chunk-EWAFN2IU.js';
2
2
  import '../chunk-O2EGEONV.js';
3
3
  import '../chunk-CENOOTAV.js';
4
4
  import '../chunk-GFV4LJHH.js';
5
5
  import '../chunk-WIATRXEJ.js';
6
6
  import '../chunk-3BYIWOTV.js';
7
7
  import '../chunk-I6POAB4V.js';
8
- import '../chunk-ZNBLFCQS.js';
9
- import '../chunk-J6ZSH3F5.js';
8
+ import '../chunk-SGHIAGPR.js';
9
+ import '../chunk-VI5FWDZW.js';
10
10
  import '../chunk-Z7JYG5TF.js';
11
11
  import '../chunk-AYKXMIOR.js';
12
- import '../chunk-5FYPE5GL.js';
12
+ import '../chunk-6ZJ3N7QI.js';
13
13
  import '../chunk-5AQBPHZD.js';
14
14
  import '../chunk-PZKHBB7D.js';
15
15
  import '../chunk-3EB2AV3H.js';