@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
package/README.md CHANGED
@@ -204,6 +204,24 @@ places:
204
204
  - A surface that pans or zooms dispatches `LAYER_REPOSITION_EVENT` on its host
205
205
  when the content beneath it moves, and every panel anchored inside follows.
206
206
 
207
+ ## Changes in 0.34.0
208
+
209
+ **`ArtifactCard` is redesigned as a gallery card.** The `card` size draws a large preview on top with a generous corner, the kind's glyph on a badge standing over the preview's foot in the kind's ink, the title at the large step on one line, and one quiet line under it: who can open it (`access`: `private` a lock, `shared` people, `company` a building, each said in words to assistive technology through `labels.access`), the owner when the reader is not the owner, and when it was last edited. The default change word is "Edited" ("Edited 20h ago by Maya"), in both sizes. `actions` (a More menu) is drawn beside the link rather than inside it, over the preview's top corner, shown on hover, while focus is inside the card and while its menu is open, and always on a screen with no hover; a keyboard reaches it after the link. `trashed` fades the preview. Hover lifts the card's edge and shadow (not under `prefers-reduced-motion`), and focus rings the whole card. The `compact` row is unchanged but for "Edited". **`ArtifactCardSkeleton`** is the card's own shape while a gallery loads. **`ArtifactPreviewGlyph`** now draws the kind's illustration on its tinted ground (`ArtifactKindGround`) rather than a lone glyph.
210
+
211
+ **`ArtifactKindIllustration`, `ArtifactKindGround` and `ArtifactKindTile` picture each kind of artifact.** The illustration is a simple geometric drawing per kind (a page of prose with a checklist, a slide with a picture, a phone screen, a board of bars, a window of code, a grid of cells), hidden from assistive technology and drawn entirely in the kind's tokens at four fixed weights, so it holds no colour of its own. The ground sets it on the kind's fill falling into the card, as a preview's stand-in. The tile is a "Make something new" entry: the ground framed in a hairline holder, the kind's name under it, one link named by the name (and an optional `badge`, read after it); with `disabledReason` it stays a focusable stop that says why it cannot start one.
212
+
213
+ **`LivePreview`, `LivePreviewBudgetProvider` and `PreviewScale` draw real content small.** `LivePreview` lays its content out at `width` CSS pixels and scales it to its box with a transform (`PreviewScale`, which also fits a board of its own size whole with `fit="contain"`), mounts it only while the box is within `rootMargin` of the viewport, has stayed there for `dwellMs` (120ms by default, so a fling mounts nothing) and holds a slot of the shared budget (`LIVE_PREVIEW_MAX`, twelve, granted one per animation frame so a row arriving at once never costs one long task), and draws `fallback` otherwise: off screen, waiting for a slot, until the content calls `useLivePreview().ready()`, after it calls `fail()` (which gives its slot back for good) and in a browser with no IntersectionObserver. The live layer is `inert`, takes no pointer and is hidden from assistive technology; the swap is a short fade, and none under `prefers-reduced-motion`. `createLivePreviewBudget` is the bookkeeping, exported for a host that measures.
214
+
215
+ **`Select` takes `appearance="quiet"`**: no boundary or fill until the pointer is over it, for a toolbar whose pickers arrange content that is the page's point. A quiet filter that is on takes the accent's soft fill under its accent ink, and a quiet picker sizes to its answer with no floor.
216
+
217
+ **Tokens: `--color-artifact-kind-<kind>` with its `-ink`, `-fill` and `-line` steps** for `doc`, `slides`, `design`, `dashboard`, `html` and `sheet`. Each is an alias of a node hue (doc blue, slides amber, design purple, dashboard cyan, HTML rose, sheet green), so every theme, light and dark, repaints them with no value of its own.
218
+
219
+ **`SheetGrid`'s row gutter puts the number and the row's actions in one place.** The number sits centred in the fixed-width gutter, in the tertiary ink and tabular figures, so row 9 and row 1000 stand in one column. Where the host takes row actions (`onDeleteRow`), the number gives way, in the same place and with no shift, to the actions button at the small `IconButton` step, centred, with a `Tooltip` and the name "Actions for row N" (`labels.rowActions`, which read "Row actions for row N"). It shows under the pointer, on the row holding focus and while its menu is open; the button is drawn in every row with actions, clear until then, so a tap on the number opens the menu on a touch screen, where there is no hover. It sat pinned to the gutter's trailing border, half over the number ("2 ⋯"), was drawn only on the active or hovered row, and carried only the native tooltip. The tip opens above the button from its leading edge, so it never hangs past the grid's own edge or is pushed off the button at a page's edge. The row header is named by its row alone (`aria-labelledby`), not by the button inside it, and keys pressed on the button stay the menu button's rather than also moving the active cell. A selection marks its rows' numbers as it marks its cells; in forced colours the number takes the selection's ink on the page's ground.
220
+
221
+ **`Tooltip` takes `align="start"`**, which lines the panel up with the trigger's leading edge (its right edge in a right-to-left page) rather than centring it, for a control at the leading edge of what it belongs to. `center` stays the default.
222
+
223
+ **A selected frozen cell stays opaque when the sheet scrolls sideways.** The selection's translucent tint replaced the cell's ground, so the values passing under a frozen column showed through a selected cell in it. The tint is now laid over the cell's own ground, as it is in the gutter.
224
+
207
225
  ## Changes in 0.33.0
208
226
 
209
227
  **`ArtifactPanel` rests every panel of text at one width, and its `sm` size is removed.** Details at `sm` and History at `md` moved the artifact's edge by 80px between two panels of text. There are two sizes now: `md`, at 22.5rem, for every panel of text (facts, a list, a form), so moving between them never moves the artifact's edge, and `lg`, at 36rem, for a table. Where there is no room for two columns, a panel that slides over the artifact takes the drawer's lift, the one the shell's rail drawer wears, so its start edge reads as a sheet over the artifact rather than a cut through it. The body publishes its padding as `--crewlet-artifact-panel-inset`, which a sticky foot offsets itself by to sit on the panel's edge, and it is a flex column, so a child that sets `min-height: 0` can fit the panel rather than scroll it. A `Section` inside it heads at the panel's register: its title reads `--crewlet-section-title-size`, which the panel's body sets to the small step, and its sentence stacks under the title (the actions kept on the title's line) when the column it sits in is narrow.
@@ -1,12 +1,13 @@
1
- export { ARTIFACT_BAR_LABELS, ArtifactBar, ArtifactVersionChip } from '../chunk-Z6GFMI2Z.js';
1
+ export { ARTIFACT_BAR_LABELS, ArtifactBar, ArtifactVersionChip } from '../chunk-IUD5VA2Z.js';
2
2
  import '../chunk-WKEPORNM.js';
3
3
  import '../chunk-SMBKXWML.js';
4
- import '../chunk-5FYPE5GL.js';
4
+ import '../chunk-6ZJ3N7QI.js';
5
5
  import '../chunk-CCAXYHQS.js';
6
6
  import '../chunk-VL6CUNSX.js';
7
7
  import '../chunk-RKKO7QHH.js';
8
- import '../chunk-HH2GKAAE.js';
9
- import '../chunk-DFZMYB5X.js';
8
+ import '../chunk-PLDUNXAO.js';
9
+ import '../chunk-XTOVADJU.js';
10
+ import '../chunk-TEUQWOWZ.js';
10
11
  import '../chunk-CI3VPIJN.js';
11
12
  import '../chunk-3CZ7XAVY.js';
12
13
  import '../chunk-EUCC37WY.js';
@@ -14,6 +15,7 @@ import '../chunk-ACA27MZH.js';
14
15
  import '../chunk-AV2DXAEL.js';
15
16
  import '../chunk-5AQBPHZD.js';
16
17
  import '../chunk-PZKHBB7D.js';
18
+ import '../chunk-UDQW6UK7.js';
17
19
  import '../chunk-BHHIIK3M.js';
18
20
  import '../chunk-PQADV6P6.js';
19
21
  import '../chunk-3EB2AV3H.js';
@@ -13,15 +13,22 @@ export declare function ArtifactKindGlyph({ kind, size }: {
13
13
  size?: GlyphSize | undefined;
14
14
  }): import("react").JSX.Element;
15
15
  /**
16
- * What a card's preview draws when there is no cover: the kind's glyph,
17
- * centred in the preview. Exported for a host whose cover has nothing to draw
18
- * YET (its outline still loading) or at all (a sheet with no columns): a cover
19
- * that rendered nothing left an empty box where every other card has a
20
- * picture, since the card cannot know that a cover it was given drew nothing.
16
+ * What a card's preview draws when there is no cover: the kind's drawing on
17
+ * its tinted ground (`ArtifactKindGround`). Exported for a host whose cover
18
+ * has nothing to draw YET (its content still loading) or at all (a sheet with
19
+ * no columns): a cover that rendered nothing left an empty box where every
20
+ * other card has a picture, since the card cannot know that a cover it was
21
+ * given drew nothing.
21
22
  */
22
23
  export declare function ArtifactPreviewGlyph({ kind }: {
23
24
  kind: ArtifactKind;
24
25
  }): import("react").JSX.Element;
26
+ /**
27
+ * Who can open an artifact, as its card says it: only its owner (and those
28
+ * they shared it with by name, which the owner alone sees), people it is
29
+ * shared with, or the whole company.
30
+ */
31
+ export type ArtifactAccess = 'private' | 'shared' | 'company';
25
32
  export type ArtifactCardSize = 'card' | 'compact';
26
33
  export interface ArtifactCardLabels {
27
34
  kinds: Record<ArtifactKind, string>;
@@ -29,8 +36,10 @@ export interface ArtifactCardLabels {
29
36
  version: (version: number) => string;
30
37
  changes: (count: number) => string;
31
38
  present: (count: number) => string;
32
- /** The change's time, opening the line: "Updated" before "4m ago". */
39
+ /** The change's time, opening the line: "Edited" before "4m ago". */
33
40
  updated: string;
41
+ /** Who can open it, said to assistive technology beside its glyph. */
42
+ access: Record<ArtifactAccess, string>;
34
43
  /** Who made it, after the time: "by Maya". */
35
44
  by: (name: string) => string;
36
45
  }
@@ -61,6 +70,17 @@ export interface ArtifactCardProps {
61
70
  version?: number | undefined;
62
71
  /** The project or task it belongs to, as its key ("OPS", "ENG-412"). */
63
72
  project?: string | undefined;
73
+ /** Who can open it, drawn as a glyph opening the card's line. Left out, nothing is said about it. */
74
+ access?: ArtifactAccess | undefined;
75
+ /**
76
+ * The card's own controls (a More menu), drawn OUTSIDE its link in the
77
+ * preview's top corner and shown on hover and while focus is inside the
78
+ * card, so they are reachable by keyboard and never nested in the link.
79
+ * The `card` size only.
80
+ */
81
+ actions?: ReactNode;
82
+ /** It is in the trash: the preview is drawn faded. */
83
+ trashed?: boolean | undefined;
64
84
  /** `compact` is a row for a narrow rail or a phone, with no preview. */
65
85
  size?: ArtifactCardSize | undefined;
66
86
  className?: string | undefined;
@@ -69,12 +89,32 @@ export interface ArtifactCardProps {
69
89
  labels?: Partial<ArtifactCardLabels> | undefined;
70
90
  }
71
91
  /**
72
- * One artifact, as a card in a gallery, a row in a task's rail or an embed.
92
+ * One artifact, as a card in a gallery or a row in a task's rail.
93
+ *
94
+ * THE CARD (`size="card"`) is a gallery's: a large preview of the artifact's
95
+ * own content on top, the kind's glyph on a badge over the preview's foot,
96
+ * then the title on one line and one quiet line under it, who can open it
97
+ * and when it was last edited ("Edited 20h ago"), with the owner named when
98
+ * the reader is not the owner.
73
99
  *
74
100
  * THE WHOLE CARD IS ONE LINK, named by the title alone and described by the
75
101
  * rest, so a reader moving through a gallery by link hears "Vendor scorecard"
76
- * and then, if they wait, what it is and who changed it. Nothing inside is a
77
- * second control: a pin or a menu inside a link is a control nobody can reach
78
- * without opening the artifact. Those live on the gallery row's own menu.
102
+ * and then, if they wait, what it is and who changed it. The card's own
103
+ * controls (`actions`, a More menu) are drawn beside the link rather than
104
+ * inside it, over the preview's corner, so they are real controls a keyboard
105
+ * reaches in turn after the link.
106
+ *
107
+ * THE COMPACT ROW (`size="compact"`) is a task rail's: the kind's glyph, the
108
+ * title and the facts, with no preview and no actions.
109
+ */
110
+ export declare function ArtifactCard({ title, kind, href, preview, owner, updatedAt, updatedBy, presence, changes, pinned, version, project, access, actions, trashed, size, className, now, labels, }: ArtifactCardProps): import("react").JSX.Element;
111
+ /**
112
+ * A gallery card while its listing loads: the card's own shape (the preview
113
+ * at its ratio, the badge over its foot, a title line and a meta line), so a
114
+ * gallery that arrives replaces each placeholder in place rather than
115
+ * reflowing the page. Decorative: the host says once what is loading
116
+ * (`Skeleton`'s `label`, or its own status line).
79
117
  */
80
- export declare function ArtifactCard({ title, kind, href, preview, owner, updatedAt, updatedBy, presence, changes, pinned, version, project, size, className, now, labels, }: ArtifactCardProps): import("react").JSX.Element;
118
+ export declare function ArtifactCardSkeleton({ className }: {
119
+ className?: string | undefined;
120
+ }): import("react").JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import './ArtifactCard.css';
2
- export { ARTIFACT_KINDS, ArtifactCard, ArtifactKindGlyph, ArtifactPreviewGlyph } from './ArtifactCard.js';
3
- export type { ArtifactCardLabels, ArtifactCardProps, ArtifactCardSize, ArtifactKind } from './ArtifactCard.js';
2
+ export { ARTIFACT_KINDS, ArtifactCard, ArtifactCardSkeleton, ArtifactKindGlyph, ArtifactPreviewGlyph } from './ArtifactCard.js';
3
+ export type { ArtifactAccess, ArtifactCardLabels, ArtifactCardProps, ArtifactCardSize, ArtifactKind } from './ArtifactCard.js';
@@ -1,4 +1,5 @@
1
- export { ARTIFACT_KINDS, ArtifactCard, ArtifactKindGlyph, ArtifactPreviewGlyph } from '../chunk-DFZMYB5X.js';
1
+ export { ARTIFACT_KINDS, ArtifactCard, ArtifactCardSkeleton, ArtifactKindGlyph, ArtifactPreviewGlyph } from '../chunk-XTOVADJU.js';
2
+ import '../chunk-TEUQWOWZ.js';
2
3
  import '../chunk-CI3VPIJN.js';
3
4
  import '../chunk-3CZ7XAVY.js';
4
5
  import '../chunk-EUCC37WY.js';
@@ -6,6 +7,7 @@ import '../chunk-ACA27MZH.js';
6
7
  import '../chunk-AV2DXAEL.js';
7
8
  import '../chunk-5AQBPHZD.js';
8
9
  import '../chunk-PZKHBB7D.js';
10
+ import '../chunk-UDQW6UK7.js';
9
11
  import '../chunk-BHHIIK3M.js';
10
12
  import '../chunk-PQADV6P6.js';
11
13
  import '../chunk-BZFWDIV6.js';
@@ -0,0 +1,289 @@
1
+ /*
2
+ * A card in a gallery: the preview on top at a fixed ratio, so a grid of them
3
+ * lines up whatever each preview is, the kind's badge over its foot, then the
4
+ * title and one quiet line. `compact` is a row with the kind's glyph in place
5
+ * of the preview, drawn on Card.
6
+ */
7
+
8
+ /*
9
+ * ON TOP OF CARD, so every rule that changes Card's own layout carries Card's
10
+ * class too. The two sheets meet at equal weight and the bundle orders them
11
+ * by file name, which puts this one first: `.crewlet-card` and
12
+ * `.crewlet-card--p-none` then won, and the compact row was drawn as a
13
+ * padless column with its glyph on a line of its own.
14
+ */
15
+ .crewlet-card.crewlet-artifact-card {
16
+ display: flex;
17
+ flex-direction: column;
18
+ min-width: 0;
19
+ overflow: hidden;
20
+ color: inherit;
21
+ text-decoration: none;
22
+ }
23
+
24
+ .crewlet-card.crewlet-artifact-card--compact {
25
+ flex-direction: row;
26
+ align-items: flex-start;
27
+ gap: var(--spacing-3);
28
+ padding: var(--spacing-3);
29
+ }
30
+
31
+ .crewlet-artifact-card__glyph {
32
+ display: inline-flex;
33
+ color: var(--color-text-tertiary);
34
+ }
35
+
36
+ .crewlet-artifact-card__glyph--compact {
37
+ flex: none;
38
+ align-items: center;
39
+ justify-content: center;
40
+ width: var(--size-control-md);
41
+ height: var(--size-control-md);
42
+ border-radius: var(--radius-md);
43
+ background: var(--color-surface-inset);
44
+ }
45
+
46
+ .crewlet-artifact-card__body {
47
+ display: flex;
48
+ flex-direction: column;
49
+ gap: var(--spacing-1);
50
+ min-width: 0;
51
+ padding: var(--spacing-3);
52
+ }
53
+
54
+ .crewlet-artifact-card--compact .crewlet-artifact-card__body {
55
+ padding: 0;
56
+ }
57
+
58
+ .crewlet-artifact-card__title-row {
59
+ display: flex;
60
+ align-items: center;
61
+ gap: var(--spacing-1);
62
+ min-width: 0;
63
+ }
64
+
65
+ .crewlet-artifact-card__title {
66
+ overflow: hidden;
67
+ color: var(--color-text-primary);
68
+ font-weight: var(--font-weight-semibold);
69
+ text-overflow: ellipsis;
70
+ white-space: nowrap;
71
+ }
72
+
73
+ .crewlet-artifact-card__pin {
74
+ display: inline-flex;
75
+ flex: none;
76
+ color: var(--color-text-tertiary);
77
+ }
78
+
79
+ .crewlet-artifact-card__facts {
80
+ display: flex;
81
+ flex-direction: column;
82
+ gap: var(--spacing-1);
83
+ color: var(--color-text-tertiary);
84
+ font-size: var(--font-size-xs);
85
+ }
86
+
87
+ .crewlet-artifact-card__line {
88
+ display: flex;
89
+ flex-wrap: wrap;
90
+ align-items: center;
91
+ gap: var(--spacing-1) var(--spacing-2);
92
+ min-width: 0;
93
+ }
94
+
95
+ /* THE FACTS OF ONE LINE ARE A RUN, "Sheet · OPS · v12", each after the first
96
+ opened by a quiet dot, so two short words never read as one phrase. */
97
+ .crewlet-artifact-card__line > * + *::before {
98
+ content: '·';
99
+ margin-inline-end: var(--spacing-2);
100
+ color: var(--color-text-tertiary);
101
+ }
102
+
103
+ .crewlet-artifact-card__owner,
104
+ .crewlet-artifact-card__presence {
105
+ display: inline-flex;
106
+ align-items: center;
107
+ gap: var(--spacing-1);
108
+ min-width: 0;
109
+ }
110
+
111
+ .crewlet-artifact-card__changes {
112
+ color: var(--color-text-secondary);
113
+ font-weight: var(--font-weight-medium);
114
+ }
115
+
116
+ /* ---- the gallery card ---- */
117
+
118
+ /*
119
+ * A SOFT PANE WITH A GENEROUS CORNER. The card is the card rung with its
120
+ * hairline, rounded a step past a plain card's because the preview inside it
121
+ * is a picture, and a picture in a tight corner reads as a screenshot pasted
122
+ * into a box. Hover lifts the edge and the shadow, never the colour.
123
+ */
124
+ .crewlet-artifact-card--card {
125
+ position: relative;
126
+ display: flex;
127
+ flex-direction: column;
128
+ min-width: 0;
129
+ border: 1px solid var(--color-border-default);
130
+ border-radius: var(--radius-xl);
131
+ background: var(--color-surface-subtle);
132
+ transition:
133
+ border-color var(--motion-duration-base) var(--motion-easing-out),
134
+ box-shadow var(--motion-duration-base) var(--motion-easing-out),
135
+ transform var(--motion-duration-base) var(--motion-easing-out);
136
+ }
137
+
138
+ .crewlet-artifact-card--card:hover {
139
+ border-color: var(--color-border-hover);
140
+ box-shadow: var(--shadow-card);
141
+ transform: translateY(-1px);
142
+ }
143
+
144
+ .crewlet-artifact-card--card:has(.crewlet-artifact-card__link:focus-visible) {
145
+ outline: 2px solid var(--color-focus);
146
+ outline-offset: var(--size-focus-ring-inset-offset);
147
+ }
148
+
149
+ .crewlet-artifact-card__link {
150
+ display: flex;
151
+ flex-direction: column;
152
+ min-width: 0;
153
+ border-radius: inherit;
154
+ color: inherit;
155
+ text-decoration: none;
156
+ outline: none;
157
+ }
158
+
159
+ .crewlet-artifact-card__preview {
160
+ position: relative;
161
+ display: flex;
162
+ aspect-ratio: 16 / 9;
163
+ overflow: hidden;
164
+ border-bottom: 1px solid var(--color-border-default);
165
+ border-radius: var(--radius-xl) var(--radius-xl) 0 0;
166
+ background: var(--color-surface-inset);
167
+ }
168
+
169
+ .crewlet-artifact-card__preview > * {
170
+ flex: 1 1 auto;
171
+ min-width: 0;
172
+ }
173
+
174
+ .crewlet-artifact-card--trashed .crewlet-artifact-card__preview > * {
175
+ opacity: 0.5;
176
+ filter: grayscale(1);
177
+ }
178
+
179
+ .crewlet-artifact-card--card .crewlet-artifact-card__body {
180
+ gap: var(--spacing-1);
181
+ padding: 0 var(--spacing-5) var(--spacing-5);
182
+ }
183
+
184
+ /*
185
+ * THE KIND'S BADGE STANDS ON THE PREVIEW'S FOOT, half over the picture and
186
+ * half over the card, the glyph in the kind's ink: what the artifact is, read
187
+ * before its title, in the one place every card has it.
188
+ */
189
+ .crewlet-artifact-card__badge {
190
+ position: relative;
191
+ display: inline-flex;
192
+ flex: none;
193
+ align-items: center;
194
+ justify-content: center;
195
+ align-self: flex-start;
196
+ width: 40px;
197
+ height: 40px;
198
+ margin-top: -22px;
199
+ margin-bottom: var(--spacing-2);
200
+ border: 1px solid var(--color-border-default);
201
+ border-radius: var(--radius-lg);
202
+ background: var(--color-surface-background);
203
+ box-shadow: var(--shadow-sm);
204
+ color: var(--crewlet-kind-ink, var(--color-text-secondary));
205
+ }
206
+
207
+ .crewlet-artifact-card--card .crewlet-artifact-card__title {
208
+ font-size: var(--font-size-lg);
209
+ font-weight: var(--font-weight-medium);
210
+ line-height: 1.35;
211
+ }
212
+
213
+ .crewlet-artifact-card--card .crewlet-artifact-card__facts {
214
+ font-size: var(--font-size-sm);
215
+ }
216
+
217
+ .crewlet-artifact-card__meta {
218
+ flex-wrap: nowrap;
219
+ white-space: nowrap;
220
+ }
221
+
222
+ .crewlet-artifact-card__access {
223
+ display: inline-flex;
224
+ flex: none;
225
+ align-items: center;
226
+ }
227
+
228
+ .crewlet-artifact-card__meta > .crewlet-artifact-card__owner {
229
+ flex: 0 1 auto;
230
+ overflow: hidden;
231
+ }
232
+
233
+ .crewlet-artifact-card__owner-name {
234
+ overflow: hidden;
235
+ text-overflow: ellipsis;
236
+ }
237
+
238
+ .crewlet-artifact-card__meta > :last-child {
239
+ flex: none;
240
+ }
241
+
242
+ /*
243
+ * THE CARD'S OWN CONTROLS, over the preview's top corner and outside the
244
+ * link: hidden until the card is hovered or holds focus, so a gallery rests
245
+ * as pictures, and always there on a screen with no hover.
246
+ */
247
+ .crewlet-artifact-card__actions {
248
+ position: absolute;
249
+ top: var(--spacing-3);
250
+ right: var(--spacing-3);
251
+ display: inline-flex;
252
+ gap: var(--spacing-1);
253
+ border-radius: var(--radius-md);
254
+ background: var(--color-surface-background);
255
+ box-shadow: var(--shadow-sm);
256
+ opacity: 0;
257
+ transition: opacity var(--motion-duration-fast) var(--motion-easing-out);
258
+ }
259
+
260
+ .crewlet-artifact-card--card:hover .crewlet-artifact-card__actions,
261
+ .crewlet-artifact-card--card:focus-within .crewlet-artifact-card__actions,
262
+ .crewlet-artifact-card__actions:has([aria-expanded='true']) {
263
+ opacity: 1;
264
+ }
265
+
266
+ @media (hover: none) {
267
+ .crewlet-artifact-card__actions {
268
+ opacity: 1;
269
+ }
270
+ }
271
+
272
+ @media (prefers-reduced-motion: reduce) {
273
+ .crewlet-artifact-card--card,
274
+ .crewlet-artifact-card__actions {
275
+ transition: none;
276
+ }
277
+
278
+ .crewlet-artifact-card--card:hover {
279
+ transform: none;
280
+ }
281
+ }
282
+
283
+ .crewlet-artifact-card--skeleton {
284
+ pointer-events: none;
285
+ }
286
+
287
+ .crewlet-artifact-card--skeleton .crewlet-artifact-card__badge {
288
+ box-shadow: none;
289
+ }
@@ -1,6 +1,7 @@
1
- export { DashboardCover, DocCover, SHEET_COVER_COLUMNS, SHEET_COVER_ROWS, SheetCover } from '../chunk-UNXLTJU7.js';
1
+ export { DashboardCover, DocCover, SHEET_COVER_COLUMNS, SHEET_COVER_ROWS, SheetCover } from '../chunk-CFAJP777.js';
2
2
  import '../chunk-TYKQ33CL.js';
3
- import '../chunk-DFZMYB5X.js';
3
+ import '../chunk-XTOVADJU.js';
4
+ import '../chunk-TEUQWOWZ.js';
4
5
  import '../chunk-CI3VPIJN.js';
5
6
  import '../chunk-3CZ7XAVY.js';
6
7
  import '../chunk-EUCC37WY.js';
@@ -8,6 +9,7 @@ import '../chunk-ACA27MZH.js';
8
9
  import '../chunk-AV2DXAEL.js';
9
10
  import '../chunk-5AQBPHZD.js';
10
11
  import '../chunk-PZKHBB7D.js';
12
+ import '../chunk-UDQW6UK7.js';
11
13
  import '../chunk-BHHIIK3M.js';
12
14
  import '../chunk-PQADV6P6.js';
13
15
  import '../chunk-BZFWDIV6.js';
@@ -1,5 +1,6 @@
1
- export { ARTIFACT_ICON_WORDS, ArtifactIcon, artifactIconGlyph } from '../chunk-HH2GKAAE.js';
2
- import '../chunk-DFZMYB5X.js';
1
+ export { ARTIFACT_ICON_WORDS, ArtifactIcon, artifactIconGlyph } from '../chunk-PLDUNXAO.js';
2
+ import '../chunk-XTOVADJU.js';
3
+ import '../chunk-TEUQWOWZ.js';
3
4
  import '../chunk-CI3VPIJN.js';
4
5
  import '../chunk-3CZ7XAVY.js';
5
6
  import '../chunk-EUCC37WY.js';
@@ -7,6 +8,7 @@ import '../chunk-ACA27MZH.js';
7
8
  import '../chunk-AV2DXAEL.js';
8
9
  import '../chunk-5AQBPHZD.js';
9
10
  import '../chunk-PZKHBB7D.js';
11
+ import '../chunk-UDQW6UK7.js';
10
12
  import '../chunk-BHHIIK3M.js';
11
13
  import '../chunk-PQADV6P6.js';
12
14
  import '../chunk-BZFWDIV6.js';
@@ -0,0 +1,53 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { ArtifactKind } from '../ArtifactCard/index.js';
3
+ /**
4
+ * A kind of artifact, pictured: a simple geometric drawing of what the kind
5
+ * is (a page of prose, a slide, a phone screen, a board of bars, a window of
6
+ * code, a grid of cells) in the kind's own hue.
7
+ *
8
+ * ONE HUE PER KIND, FROM THE TOKENS. Every mark is drawn in
9
+ * `--color-artifact-kind-<kind>` at one of four fixed weights (the body, its
10
+ * lines, a soft block and the one solid accent), so a theme repaints every
11
+ * drawing by repainting the node hue the kind aliases, and nothing here holds
12
+ * a colour of its own.
13
+ *
14
+ * DECORATION. The drawing is hidden from assistive technology: the kind's
15
+ * name beside it is what is read.
16
+ */
17
+ export declare function ArtifactKindIllustration({ kind, className }: {
18
+ kind: ArtifactKind;
19
+ className?: string | undefined;
20
+ }): import("react").JSX.Element;
21
+ /**
22
+ * A kind's drawing on its tinted ground: the stand-in a preview shows while
23
+ * nothing live is drawn (off screen, still loading, over the live budget,
24
+ * failed or empty), and the face of a Make something new tile.
25
+ */
26
+ export declare function ArtifactKindGround({ kind, className, children, }: {
27
+ kind: ArtifactKind;
28
+ className?: string | undefined;
29
+ /** Drawn over the ground in place of the kind's drawing. */
30
+ children?: ReactNode;
31
+ }): import("react").JSX.Element;
32
+ export interface ArtifactKindTileProps {
33
+ kind: ArtifactKind;
34
+ /** The kind's name, under the tile: "Docs". */
35
+ label: string;
36
+ /** Where starting one goes. Left out with `disabledReason`, the tile starts nothing. */
37
+ href?: string | undefined;
38
+ /** A short tag after the name ("New", "Beta"), for a kind that is genuinely new. */
39
+ badge?: string | undefined;
40
+ /** Why this reader cannot start one. The tile stays focusable and says so. */
41
+ disabledReason?: string | undefined;
42
+ className?: string | undefined;
43
+ }
44
+ /**
45
+ * One kind on a "Make something new" row: the kind's drawing on its tinted
46
+ * ground, framed, with its name under it. The whole tile is one link named by
47
+ * the kind's name.
48
+ *
49
+ * A TILE THAT CANNOT START is still a stop on the row, so a reader moving
50
+ * through it by keyboard hears why (`disabledReason`) rather than finding a
51
+ * kind missing.
52
+ */
53
+ export declare function ArtifactKindTile({ kind, label, href, badge, disabledReason, className }: ArtifactKindTileProps): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import './ArtifactKindIllustration.css';
2
+ export { ArtifactKindGround, ArtifactKindIllustration, ArtifactKindTile } from './ArtifactKindIllustration.js';
3
+ export type { ArtifactKindTileProps } from './ArtifactKindIllustration.js';
@@ -0,0 +1,3 @@
1
+ export { ArtifactKindGround, ArtifactKindIllustration, ArtifactKindTile } from '../chunk-UDQW6UK7.js';
2
+ import '../chunk-BZFWDIV6.js';
3
+ import '../chunk-ODEQTPFM.js';