@crewlethq/ui 0.28.0 → 0.29.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 (61) hide show
  1. package/README.md +21 -1
  2. package/dist/AccessDeniedCard/index.js +3 -3
  3. package/dist/Accordion/index.js +3 -3
  4. package/dist/AppShell/index.js +1 -1
  5. package/dist/{AppShell-APHZKJYH.css → AppShell-GCM4TDVY.css} +4 -1
  6. package/dist/ArtifactBar/ArtifactBar.d.ts +143 -0
  7. package/dist/ArtifactBar/index.d.ts +3 -0
  8. package/dist/ArtifactBar/index.js +25 -0
  9. package/dist/ArtifactBar-IBWB5POL.css +358 -0
  10. package/dist/ArtifactCard/index.js +3 -3
  11. package/dist/ArtifactCover/index.js +4 -4
  12. package/dist/ArtifactIcon/index.js +4 -4
  13. package/dist/ArtifactPanel/ArtifactPanel.d.ts +81 -0
  14. package/dist/ArtifactPanel/index.d.ts +3 -0
  15. package/dist/ArtifactPanel/index.js +5 -0
  16. package/dist/ArtifactPanel-YFXT5O77.css +132 -0
  17. package/dist/AuthLayout/index.js +3 -3
  18. package/dist/AvatarPicker/index.js +4 -4
  19. package/dist/Card/index.js +2 -2
  20. package/dist/ChangeMark/index.js +1 -1
  21. package/dist/CommandPalette/index.js +3 -3
  22. package/dist/CommentThread/index.js +4 -4
  23. package/dist/Composer/index.js +2 -2
  24. package/dist/DataView/index.js +4 -4
  25. package/dist/Disclosure/index.js +3 -3
  26. package/dist/HuePicker/index.js +2 -2
  27. package/dist/ListInput/index.js +2 -2
  28. package/dist/MarkdownEditor/index.js +1 -1
  29. package/dist/PeopleRail/PeopleRail.d.ts +8 -1
  30. package/dist/PeopleRail/index.js +1 -1
  31. package/dist/{PeopleRail-R64WVOSH.css → PeopleRail-SZGHZXVT.css} +8 -0
  32. package/dist/SheetGrid/index.js +1 -1
  33. package/dist/ThemeSwitcher/index.js +1 -1
  34. package/dist/VersionCompare/index.js +2 -2
  35. package/dist/{chunk-V2Z24W2Z.js → chunk-4JUKWWUD.js} +1 -1
  36. package/dist/{chunk-WENCSQ47.js → chunk-EBNI36UQ.js} +1 -1
  37. package/dist/{chunk-M2VJGNCD.js → chunk-FKULOLKG.js} +2 -2
  38. package/dist/{chunk-6J35F334.js → chunk-GOSQXEZU.js} +1 -1
  39. package/dist/chunk-I3BSQUKN.js +121 -0
  40. package/dist/{chunk-S4RCG44T.js → chunk-MICH6QSJ.js} +1 -1
  41. package/dist/chunk-QMBP23BL.js +347 -0
  42. package/dist/{chunk-G2AVKPSL.js → chunk-RIAZM6L3.js} +1 -1
  43. package/dist/{chunk-PRNX5AFE.js → chunk-TGYDROIB.js} +1 -1
  44. package/dist/{chunk-G3EEUNZQ.js → chunk-UB7TJEKZ.js} +1 -1
  45. package/dist/chunk-UQHKFF2N.js +106 -0
  46. package/dist/{chunk-WHZFDS62.js → chunk-VDPJGP4Q.js} +1 -1
  47. package/dist/{chunk-MQEEQVG6.js → chunk-XALUCIG5.js} +1 -1
  48. package/dist/generated/index.d.ts +2 -0
  49. package/dist/generated/index.js +65 -63
  50. package/dist/index.js +65 -63
  51. package/dist/styles.css +510 -3
  52. package/package.json +3 -3
  53. package/dist/chunk-FVLCTCMV.js +0 -96
  54. package/dist/{chunk-RIEDQSA4.js → chunk-7DZDSSJS.js} +1 -1
  55. package/dist/{chunk-YZCJ63JF.js → chunk-ACA27MZH.js} +1 -1
  56. package/dist/{chunk-ENJUPIND.js → chunk-FZVJDJFN.js} +1 -1
  57. package/dist/{chunk-NWW4IQJU.js → chunk-IFNQKWUO.js} +0 -0
  58. package/dist/{chunk-SGIQCI6Y.js → chunk-LIXSV5YI.js} +1 -1
  59. package/dist/{chunk-VOMYRJV5.js → chunk-RODMM35O.js} +2 -2
  60. package/dist/{chunk-HCKJGBQH.js → chunk-VVRL27HM.js} +1 -1
  61. package/dist/{chunk-D5JZN3ML.js → chunk-Z6VW6CXX.js} +1 -1
@@ -0,0 +1,81 @@
1
+ import { type ReactNode, type Ref } from 'react';
2
+ /** How wide a panel rests beside the artifact: facts, a list, or a table. */
3
+ export type ArtifactPanelSize = 'sm' | 'md' | 'lg';
4
+ export interface ArtifactPanelLabels {
5
+ close: (title: string) => string;
6
+ expand: string;
7
+ collapse: string;
8
+ }
9
+ export declare const ARTIFACT_PANEL_LABELS: ArtifactPanelLabels;
10
+ export interface ArtifactPanelProps {
11
+ title: string;
12
+ /** A glyph before the title: the one on the bar's control that opened it. */
13
+ icon?: ReactNode;
14
+ onClose: () => void;
15
+ size?: ArtifactPanelSize | undefined;
16
+ /**
17
+ * The panel takes the whole workspace, the artifact hidden behind it, for a
18
+ * table or a comparison the side's width cannot hold. With `onExpandedChange`
19
+ * the head carries the control that toggles it.
20
+ */
21
+ expanded?: boolean | undefined;
22
+ onExpandedChange?: ((expanded: boolean) => void) | undefined;
23
+ /** Controls in the head, before expand and close. */
24
+ actions?: ReactNode;
25
+ /**
26
+ * Whether focus moves to the panel's heading when it opens. True when the
27
+ * reader opened it; false for a panel a link opened on arrival, which must
28
+ * not take focus from wherever the page put it.
29
+ */
30
+ focusOnOpen?: boolean | undefined;
31
+ labels?: Partial<ArtifactPanelLabels> | undefined;
32
+ className?: string | undefined;
33
+ children: ReactNode;
34
+ }
35
+ /**
36
+ * A panel at the artifact's side: its details, its history, its data, who is
37
+ * here, its settings. One at a time, opened from the bar's controls.
38
+ *
39
+ * A COMPLEMENTARY REGION, NOT A DIALOG. The artifact beside it stays live and
40
+ * reachable, so the panel is an `aside` named by its heading and never traps
41
+ * focus; the reader moves between the two with Tab as between any two parts
42
+ * of a page.
43
+ *
44
+ * FOCUS IS STILL MANAGED, because a panel opened from a control that is then
45
+ * pressed again, or closed from inside, would otherwise leave focus on nothing.
46
+ * Opening moves focus to the heading, so a screen reader announces what
47
+ * opened; closing with focus inside hands it back to whatever held it before
48
+ * (the bar's control, as a rule), and leaves it alone otherwise.
49
+ *
50
+ * ESCAPE CLOSES IT from anywhere inside, a field included, unless something
51
+ * inside answered the press first: a menu or a dialog opened from the panel is
52
+ * portalled out of it, and the press that closes one of them never reaches
53
+ * this.
54
+ */
55
+ export declare function ArtifactPanel({ title, icon, onClose, size, expanded, onExpandedChange, actions, focusOnOpen, labels, className, children, }: ArtifactPanelProps): import("react").JSX.Element;
56
+ export interface ArtifactWorkspaceProps {
57
+ /** The open panel, if any: an [ArtifactPanel]. */
58
+ panel?: ReactNode;
59
+ /** Whether the open panel takes the whole workspace. */
60
+ expanded?: boolean | undefined;
61
+ /** The artifact's own body: the element a caller scrolls, measures or listens on. */
62
+ bodyRef?: Ref<HTMLDivElement> | undefined;
63
+ bodyClassName?: string | undefined;
64
+ /** Names the body region: the artifact's title. */
65
+ bodyLabel?: string | undefined;
66
+ className?: string | undefined;
67
+ children: ReactNode;
68
+ }
69
+ /**
70
+ * The artifact's body and its one open panel, side by side.
71
+ *
72
+ * THE PANEL IS A COLUMN WHERE THERE IS ROOM FOR TWO, AND A DRAWER WHERE THERE
73
+ * IS NOT. Measured on the workspace itself (a container query), since a
74
+ * sidebar beside it decides its room: wide, the artifact narrows to make room
75
+ * and the two are read together, which is the point of a panel of history or
76
+ * of who is here; narrower than two useful columns, the panel slides over the
77
+ * artifact's end edge; on a phone it covers the artifact whole. An expanded
78
+ * panel takes the workspace at every width, with the artifact kept mounted
79
+ * behind it so a page's state survives the look at its data.
80
+ */
81
+ export declare function ArtifactWorkspace({ panel, expanded, bodyRef, bodyClassName, bodyLabel, className, children, }: ArtifactWorkspaceProps): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import './ArtifactPanel.css';
2
+ export { ARTIFACT_PANEL_LABELS, ArtifactPanel, ArtifactWorkspace } from './ArtifactPanel.js';
3
+ export type { ArtifactPanelLabels, ArtifactPanelProps, ArtifactPanelSize, ArtifactWorkspaceProps, } from './ArtifactPanel.js';
@@ -0,0 +1,5 @@
1
+ export { ARTIFACT_PANEL_LABELS, ArtifactPanel, ArtifactWorkspace } from '../chunk-I3BSQUKN.js';
2
+ import '../chunk-PQADV6P6.js';
3
+ import '../chunk-4FQT6ZAY.js';
4
+ import '../chunk-BZFWDIV6.js';
5
+ import '../chunk-ODEQTPFM.js';
@@ -0,0 +1,132 @@
1
+ /*
2
+ * The workspace is a row: the artifact's body, then at most one panel. The
3
+ * body scrolls itself, so a panel beside it stays in view however far the
4
+ * artifact is read; the panel's own body scrolls under its head.
5
+ *
6
+ * ONE HAIRLINE between the two, the panel's start edge, and none at the
7
+ * workspace's own edges: whatever frames the workspace already draws those.
8
+ */
9
+
10
+ .crewlet-artifact-workspace {
11
+ container: crewlet-artifact-workspace / inline-size;
12
+ position: relative;
13
+ display: flex;
14
+ min-width: 0;
15
+ min-height: 0;
16
+ }
17
+
18
+ .crewlet-artifact-workspace__body {
19
+ flex: 1 1 auto;
20
+ min-width: 0;
21
+ min-height: 0;
22
+ overflow: auto;
23
+ }
24
+
25
+ /* EXPANDED, the panel is the workspace; the body stays mounted behind it. */
26
+ .crewlet-artifact-workspace[data-panel='expanded'] > .crewlet-artifact-workspace__body {
27
+ display: none;
28
+ }
29
+
30
+ .crewlet-artifact-panel {
31
+ --crewlet-artifact-panel-width: 25rem;
32
+ display: flex;
33
+ flex: none;
34
+ flex-direction: column;
35
+ width: var(--crewlet-artifact-panel-width);
36
+ min-height: 0;
37
+ border-left: 1px solid var(--color-border-default);
38
+ background: var(--color-surface-background);
39
+ }
40
+
41
+ .crewlet-artifact-panel--sm {
42
+ --crewlet-artifact-panel-width: 20rem;
43
+ }
44
+
45
+ .crewlet-artifact-panel--lg {
46
+ --crewlet-artifact-panel-width: 36rem;
47
+ }
48
+
49
+ .crewlet-artifact-panel[data-expanded] {
50
+ flex: 1 1 auto;
51
+ width: auto;
52
+ border-left: 0;
53
+ }
54
+
55
+ .crewlet-artifact-panel__head {
56
+ display: flex;
57
+ flex: none;
58
+ align-items: center;
59
+ gap: var(--spacing-2);
60
+ height: var(--size-row-lg);
61
+ padding: 0 var(--spacing-2) 0 var(--spacing-4);
62
+ border-bottom: 1px solid var(--color-border-default);
63
+ }
64
+
65
+ .crewlet-artifact-panel__icon {
66
+ display: inline-flex;
67
+ flex: none;
68
+ color: var(--color-text-tertiary);
69
+ }
70
+
71
+ .crewlet-artifact-panel__title {
72
+ flex: 1 1 auto;
73
+ min-width: 0;
74
+ margin: 0;
75
+ overflow: hidden;
76
+ color: var(--color-text-primary);
77
+ font-size: var(--font-size-sm);
78
+ font-weight: var(--font-weight-semibold);
79
+ line-height: var(--font-line-height-snug);
80
+ text-overflow: ellipsis;
81
+ white-space: nowrap;
82
+ }
83
+
84
+ .crewlet-artifact-panel__title:focus-visible {
85
+ outline: 2px solid var(--color-focus);
86
+ outline-offset: var(--size-focus-ring-inset-offset);
87
+ border-radius: var(--radius-sm);
88
+ }
89
+
90
+ .crewlet-artifact-panel__actions {
91
+ display: inline-flex;
92
+ flex: none;
93
+ align-items: center;
94
+ gap: var(--spacing-1);
95
+ }
96
+
97
+ .crewlet-artifact-panel__body {
98
+ flex: 1 1 auto;
99
+ min-height: 0;
100
+ padding: var(--spacing-4);
101
+ overflow: auto;
102
+ overscroll-behavior: contain;
103
+ }
104
+
105
+ /* NOT ROOM FOR TWO COLUMNS: the panel slides over the artifact's end edge,
106
+ raised off it, rather than squeezing the artifact under a useful width. */
107
+ @container crewlet-artifact-workspace (width < 960px) {
108
+ .crewlet-artifact-panel {
109
+ position: absolute;
110
+ inset-block: 0;
111
+ inset-inline-end: 0;
112
+ z-index: var(--z-index-overlay);
113
+ width: min(var(--crewlet-artifact-panel-width), 100%);
114
+ box-shadow: var(--shadow-lg);
115
+ }
116
+
117
+ .crewlet-artifact-panel[data-expanded] {
118
+ inset-inline-start: 0;
119
+ width: auto;
120
+ box-shadow: none;
121
+ }
122
+ }
123
+
124
+ /* A PHONE: the panel is the screen until it is closed. */
125
+ @container crewlet-artifact-workspace (width < 640px) {
126
+ .crewlet-artifact-panel {
127
+ inset-inline-start: 0;
128
+ width: auto;
129
+ border-left: 0;
130
+ box-shadow: none;
131
+ }
132
+ }
@@ -1,8 +1,8 @@
1
- export { AuthLayout } from '../chunk-WHZFDS62.js';
1
+ export { AuthLayout } from '../chunk-VDPJGP4Q.js';
2
2
  import '../chunk-7KBNFFM3.js';
3
- import '../chunk-YZCJ63JF.js';
3
+ import '../chunk-ACA27MZH.js';
4
4
  import '../chunk-AV2DXAEL.js';
5
- import '../chunk-PQADV6P6.js';
6
5
  import '../chunk-BHHIIK3M.js';
6
+ import '../chunk-PQADV6P6.js';
7
7
  import '../chunk-BZFWDIV6.js';
8
8
  import '../chunk-ODEQTPFM.js';
@@ -1,10 +1,10 @@
1
- export { AvatarPicker } from '../chunk-PRNX5AFE.js';
2
- import '../chunk-SGIQCI6Y.js';
3
- import '../chunk-RCQXUT5K.js';
4
- import '../chunk-HJEVSQN6.js';
1
+ export { AvatarPicker } from '../chunk-TGYDROIB.js';
2
+ import '../chunk-LIXSV5YI.js';
5
3
  import '../chunk-BWRGFKJP.js';
6
4
  import '../chunk-AYKXMIOR.js';
7
5
  import '../chunk-HVIX5ECM.js';
6
+ import '../chunk-RCQXUT5K.js';
7
+ import '../chunk-HJEVSQN6.js';
8
8
  import '../chunk-RKKO7QHH.js';
9
9
  import '../chunk-5OM447RW.js';
10
10
  import '../chunk-BHHIIK3M.js';
@@ -1,6 +1,6 @@
1
- export { Card } from '../chunk-YZCJ63JF.js';
1
+ export { Card } from '../chunk-ACA27MZH.js';
2
2
  export { useCardHeaderSlot } from '../chunk-AV2DXAEL.js';
3
- import '../chunk-PQADV6P6.js';
4
3
  import '../chunk-BHHIIK3M.js';
4
+ import '../chunk-PQADV6P6.js';
5
5
  import '../chunk-BZFWDIV6.js';
6
6
  import '../chunk-ODEQTPFM.js';
@@ -1,8 +1,8 @@
1
1
  export { ChangeMark } from '../chunk-YEKYVJQR.js';
2
2
  import '../chunk-NHBP2XS5.js';
3
3
  import '../chunk-Z7JYG5TF.js';
4
- import '../chunk-QWOPX2MN.js';
5
4
  import '../chunk-AYKXMIOR.js';
5
+ import '../chunk-QWOPX2MN.js';
6
6
  import '../chunk-HMPFGIWM.js';
7
7
  import '../chunk-R25RGPUB.js';
8
8
  import '../chunk-ODEQTPFM.js';
@@ -1,10 +1,10 @@
1
- export { CommandPalette } from '../chunk-HCKJGBQH.js';
1
+ export { CommandPalette } from '../chunk-VVRL27HM.js';
2
2
  import '../chunk-I3KKZ2O3.js';
3
3
  import '../chunk-F73MC7EZ.js';
4
- import '../chunk-SMBKXWML.js';
5
4
  import '../chunk-6QFAK2WV.js';
6
- import '../chunk-PQADV6P6.js';
5
+ import '../chunk-SMBKXWML.js';
7
6
  import '../chunk-BHHIIK3M.js';
7
+ import '../chunk-PQADV6P6.js';
8
8
  import '../chunk-HMPFGIWM.js';
9
9
  import '../chunk-R25RGPUB.js';
10
10
  import '../chunk-OG6CL3EB.js';
@@ -1,15 +1,15 @@
1
- export { COMMENT_THREAD_LABELS, CommentThread } from '../chunk-M2VJGNCD.js';
2
- import '../chunk-RIEDQSA4.js';
3
- import '../chunk-SMBKXWML.js';
1
+ export { COMMENT_THREAD_LABELS, CommentThread } from '../chunk-FKULOLKG.js';
2
+ import '../chunk-7DZDSSJS.js';
4
3
  import '../chunk-6QFAK2WV.js';
4
+ import '../chunk-SMBKXWML.js';
5
5
  import '../chunk-WI6K5M5X.js';
6
6
  import '../chunk-4KP4RC3O.js';
7
7
  import '../chunk-3CZ7XAVY.js';
8
8
  import '../chunk-EUCC37WY.js';
9
9
  import '../chunk-UAN5NE7M.js';
10
10
  import '../chunk-5OM447RW.js';
11
- import '../chunk-PQADV6P6.js';
12
11
  import '../chunk-BHHIIK3M.js';
12
+ import '../chunk-PQADV6P6.js';
13
13
  import '../chunk-OG6CL3EB.js';
14
14
  import '../chunk-4FQT6ZAY.js';
15
15
  import '../chunk-BZFWDIV6.js';
@@ -1,6 +1,6 @@
1
- export { COMPOSER_COUNTER_AT, Composer } from '../chunk-RIEDQSA4.js';
2
- import '../chunk-SMBKXWML.js';
1
+ export { COMPOSER_COUNTER_AT, Composer } from '../chunk-7DZDSSJS.js';
3
2
  import '../chunk-6QFAK2WV.js';
3
+ import '../chunk-SMBKXWML.js';
4
4
  import '../chunk-PQADV6P6.js';
5
5
  import '../chunk-4FQT6ZAY.js';
6
6
  import '../chunk-BZFWDIV6.js';
@@ -1,22 +1,22 @@
1
- export { DATA_VIEW_TOOLBAR_LABELS, DataView, DataViewToolbar, FILTER_AXIS_LABELS, FilterAxisBar, FilterAxisChip, applyColumnFilters, applyFilters, blankFilterValue, defaultOperator, filterDefsFromColumns, filterHasValue, filterPredicate, formatFilterValue, operatorOf, tableColumns } from '../chunk-VOMYRJV5.js';
1
+ export { DATA_VIEW_TOOLBAR_LABELS, DataView, DataViewToolbar, FILTER_AXIS_LABELS, FilterAxisBar, FilterAxisChip, applyColumnFilters, applyFilters, blankFilterValue, defaultOperator, filterDefsFromColumns, filterHasValue, filterPredicate, formatFilterValue, operatorOf, tableColumns } from '../chunk-RODMM35O.js';
2
2
  import '../chunk-HOXGBLEY.js';
3
3
  import '../chunk-PGRPNDWM.js';
4
- import '../chunk-EBJREOKS.js';
5
4
  import '../chunk-Y5NQ2LMS.js';
5
+ import '../chunk-EBJREOKS.js';
6
6
  import '../chunk-STJ7QBC3.js';
7
7
  import '../chunk-DTIW4CHZ.js';
8
8
  import '../chunk-I3KKZ2O3.js';
9
9
  import '../chunk-F73MC7EZ.js';
10
- import '../chunk-SMBKXWML.js';
11
10
  import '../chunk-BWRGFKJP.js';
12
11
  import '../chunk-GXQ3B46I.js';
13
12
  import '../chunk-7T42VQQT.js';
14
13
  import '../chunk-6QFAK2WV.js';
14
+ import '../chunk-SMBKXWML.js';
15
15
  import '../chunk-3CZ7XAVY.js';
16
16
  import '../chunk-EUCC37WY.js';
17
17
  import '../chunk-AV2DXAEL.js';
18
- import '../chunk-PQADV6P6.js';
19
18
  import '../chunk-BHHIIK3M.js';
19
+ import '../chunk-PQADV6P6.js';
20
20
  import '../chunk-2HIOJ4YZ.js';
21
21
  import '../chunk-HMPFGIWM.js';
22
22
  import '../chunk-R25RGPUB.js';
@@ -1,6 +1,6 @@
1
- export { Disclosure } from '../chunk-S4RCG44T.js';
2
- export { DisclosureAnatomy } from '../chunk-ENJUPIND.js';
3
- import '../chunk-PQADV6P6.js';
1
+ export { Disclosure } from '../chunk-MICH6QSJ.js';
2
+ export { DisclosureAnatomy } from '../chunk-FZVJDJFN.js';
4
3
  import '../chunk-BHHIIK3M.js';
4
+ import '../chunk-PQADV6P6.js';
5
5
  import '../chunk-BZFWDIV6.js';
6
6
  import '../chunk-ODEQTPFM.js';
@@ -1,8 +1,8 @@
1
1
  import '../chunk-FFMCMSJB.js';
2
- export { HuePicker } from '../chunk-SGIQCI6Y.js';
2
+ export { HuePicker } from '../chunk-LIXSV5YI.js';
3
+ import '../chunk-AYKXMIOR.js';
3
4
  import '../chunk-RCQXUT5K.js';
4
5
  import '../chunk-HJEVSQN6.js';
5
- import '../chunk-AYKXMIOR.js';
6
6
  import '../chunk-RKKO7QHH.js';
7
7
  import '../chunk-BHHIIK3M.js';
8
8
  import '../chunk-BZFWDIV6.js';
@@ -1,6 +1,6 @@
1
- export { ListInput } from '../chunk-D5JZN3ML.js';
2
- import '../chunk-SMBKXWML.js';
1
+ export { ListInput } from '../chunk-Z6VW6CXX.js';
3
2
  import '../chunk-6QFAK2WV.js';
3
+ import '../chunk-SMBKXWML.js';
4
4
  import '../chunk-PQADV6P6.js';
5
5
  import '../chunk-HMPFGIWM.js';
6
6
  import '../chunk-R25RGPUB.js';
@@ -1,6 +1,6 @@
1
1
  export { MARKDOWN_FORMATS, MarkdownEditor, formatMarkdown, insertMarkdown, markdownWords } from '../chunk-LZHLSQYK.js';
2
- import '../chunk-FQCLKD7U.js';
3
2
  import '../chunk-PGRPNDWM.js';
3
+ import '../chunk-FQCLKD7U.js';
4
4
  import '../chunk-RCQXUT5K.js';
5
5
  import '../chunk-HJEVSQN6.js';
6
6
  import '../chunk-RKKO7QHH.js';
@@ -30,6 +30,13 @@ export interface PeopleRailProps {
30
30
  /** Further controls for one member, before Follow: "Open turn" for an agent at work. */
31
31
  actions?: ((member: PresenceMember) => ReactNode) | undefined;
32
32
  labels?: Partial<PeopleRailLabels> | undefined;
33
+ /**
34
+ * `card` is the rail on its own: a bordered card with its heading and its
35
+ * close. `plain` is its list alone, for a host that already frames and
36
+ * names it (an artifact's side panel), so the two are never a box drawn in
37
+ * a box with the same title twice.
38
+ */
39
+ variant?: 'card' | 'plain' | undefined;
33
40
  className?: string | undefined;
34
41
  }
35
42
  /** What identifies a member for following: the seat, so a second tab of the same person stays followed. */
@@ -49,4 +56,4 @@ export declare function peopleRailKey(member: Pick<PresenceMember, 'id' | 'seat'
49
56
  * is a column of identical controls to a screen reader. The strip that says
50
57
  * the reader is following is `FollowBanner`, which the host draws.
51
58
  */
52
- export declare function PeopleRail({ members, self, following, onFollow, onClose, actions, labels: overrides, className, }: PeopleRailProps): import("react").JSX.Element;
59
+ export declare function PeopleRail({ members, self, following, onFollow, onClose, actions, labels: overrides, variant, className, }: PeopleRailProps): import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- export { PEOPLE_RAIL_LABELS, PeopleRail, peopleRailKey } from '../chunk-FVLCTCMV.js';
1
+ export { PEOPLE_RAIL_LABELS, PeopleRail, peopleRailKey } from '../chunk-UQHKFF2N.js';
2
2
  import '../chunk-CENOOTAV.js';
3
3
  import '../chunk-Z7JYG5TF.js';
4
4
  import '../chunk-AYKXMIOR.js';
@@ -11,6 +11,14 @@
11
11
  background: var(--color-surface-elevated);
12
12
  }
13
13
 
14
+ /* PLAIN: the list alone, in a host that frames and names it. */
15
+ .crewlet-people-rail--plain {
16
+ padding: 0;
17
+ border: 0;
18
+ border-radius: 0;
19
+ background: transparent;
20
+ }
21
+
14
22
  .crewlet-people-rail__head {
15
23
  display: flex;
16
24
  align-items: center;
@@ -8,8 +8,8 @@ import '../chunk-WIATRXEJ.js';
8
8
  import '../chunk-YEKYVJQR.js';
9
9
  import '../chunk-NHBP2XS5.js';
10
10
  import '../chunk-Z7JYG5TF.js';
11
- import '../chunk-QWOPX2MN.js';
12
11
  import '../chunk-AYKXMIOR.js';
12
+ import '../chunk-QWOPX2MN.js';
13
13
  import '../chunk-UAN5NE7M.js';
14
14
  import '../chunk-5OM447RW.js';
15
15
  import '../chunk-2HIOJ4YZ.js';
@@ -1,7 +1,7 @@
1
1
  export { DensitySwitcher, ThemeSwitcher } from '../chunk-WJDQ7XQA.js';
2
2
  export { applyStoredPreferences, resolveTheme, useDensityPreference, useSystemTheme, useThemePreference } from '../chunk-Z24ZUSTX.js';
3
- import '../chunk-FQCLKD7U.js';
4
3
  export { DENSITY_PREFERENCES, PALETTE_ID, THEME_PREFERENCES, applyDensity, applyPalette, applyTheme, isDensityPreference, isPaletteId, isThemePreference } from '../chunk-ZXXDZJQN.js';
4
+ import '../chunk-FQCLKD7U.js';
5
5
  import '../chunk-RCQXUT5K.js';
6
6
  import '../chunk-HJEVSQN6.js';
7
7
  import '../chunk-RKKO7QHH.js';
@@ -1,11 +1,11 @@
1
1
  export { VERSION_COMPARE_LABELS, VERSION_COMPARE_LENSES, VersionCompare } from '../chunk-EHQTPVV4.js';
2
- import '../chunk-FQCLKD7U.js';
3
2
  import '../chunk-BVWSLXTY.js';
3
+ import '../chunk-FQCLKD7U.js';
4
4
  import '../chunk-RCQXUT5K.js';
5
5
  import '../chunk-HJEVSQN6.js';
6
6
  import '../chunk-RKKO7QHH.js';
7
7
  import '../chunk-RA2ULG6H.js';
8
- import '../chunk-PQADV6P6.js';
9
8
  import '../chunk-BHHIIK3M.js';
9
+ import '../chunk-PQADV6P6.js';
10
10
  import '../chunk-BZFWDIV6.js';
11
11
  import '../chunk-ODEQTPFM.js';
@@ -1,4 +1,4 @@
1
- import { ArtifactKindGlyph } from './chunk-6J35F334.js';
1
+ import { ArtifactKindGlyph } from './chunk-GOSQXEZU.js';
2
2
  import { ShieldGlyph, ActivityGlyph, GaugeGlyph, PackageGlyph, FolderGlyph, ClockGlyph, DatabaseGlyph, Settings2Glyph, BookOpenGlyph, FlagGlyph, StarGlyph, WandSparklesGlyph, BugGlyph, TargetGlyph, ImageGlyph, CodeGlyph, CoinsGlyph, UserGlyph, UsersGlyph, ChartNoAxesGanttGlyph, SquareKanbanGlyph, ListChecksGlyph, ListGlyph, GlobeGlyph, CompassGlyph, FileTextGlyph, TableGlyph, CalendarGlyph, LayoutDashboardGlyph, ChartPieGlyph, ChartColumnGlyph } from '@crewlethq/icons/glyphs';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
@@ -4,7 +4,7 @@ import { useModalLayer, focusables } from './chunk-R25RGPUB.js';
4
4
  import { IconButton } from './chunk-4FQT6ZAY.js';
5
5
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
6
6
  import { cx } from './chunk-ODEQTPFM.js';
7
- import './AppShell-APHZKJYH.css';
7
+ import './AppShell-GCM4TDVY.css';
8
8
  import { createContext, forwardRef, useContext, useId, useState, useRef, useCallback, useEffect, useLayoutEffect } from 'react';
9
9
  import { breakpoint } from '@crewlethq/tokens';
10
10
  import { ChevronUpGlyph, ChevronsUpDownGlyph, ChevronRightGlyph, MenuGlyph } from '@crewlethq/icons/glyphs';
@@ -1,9 +1,9 @@
1
- import { Composer } from './chunk-RIEDQSA4.js';
1
+ import { Composer } from './chunk-7DZDSSJS.js';
2
2
  import { Document } from './chunk-WI6K5M5X.js';
3
3
  import { PrincipalAvatar } from './chunk-4KP4RC3O.js';
4
4
  import { toInstant, RelativeTime, formatExact, toISO } from './chunk-3CZ7XAVY.js';
5
- import { useHeadingLevel, headingTag } from './chunk-PQADV6P6.js';
6
5
  import { Count } from './chunk-BHHIIK3M.js';
6
+ import { useHeadingLevel, headingTag } from './chunk-PQADV6P6.js';
7
7
  import { Button } from './chunk-OG6CL3EB.js';
8
8
  import { IconButton } from './chunk-4FQT6ZAY.js';
9
9
  import { cx } from './chunk-ODEQTPFM.js';
@@ -1,7 +1,7 @@
1
1
  import { PrincipalAvatar } from './chunk-4KP4RC3O.js';
2
2
  import { RelativeTime } from './chunk-3CZ7XAVY.js';
3
3
  import { AvatarStack } from './chunk-UAN5NE7M.js';
4
- import { Card } from './chunk-YZCJ63JF.js';
4
+ import { Card } from './chunk-ACA27MZH.js';
5
5
  import { VisuallyHidden } from './chunk-BZFWDIV6.js';
6
6
  import { cx } from './chunk-ODEQTPFM.js';
7
7
  import './ArtifactCard-EXVAEBV6.css';
@@ -0,0 +1,121 @@
1
+ import { HeadingLevelProvider } from './chunk-PQADV6P6.js';
2
+ import { IconButton } from './chunk-4FQT6ZAY.js';
3
+ import { cx } from './chunk-ODEQTPFM.js';
4
+ import './ArtifactPanel-YFXT5O77.css';
5
+ import { useId, useRef, useLayoutEffect, useEffect } from 'react';
6
+ import { MinimizeGlyph, MaximizeGlyph, XGlyph } from '@crewlethq/icons/glyphs';
7
+ import { jsxs, jsx } from 'react/jsx-runtime';
8
+
9
+ var ARTIFACT_PANEL_LABELS = {
10
+ close: (title) => `Close ${title.toLowerCase()}`,
11
+ expand: "Expand to the full view",
12
+ collapse: "Back to the side"
13
+ };
14
+ function ArtifactPanel({
15
+ title,
16
+ icon,
17
+ onClose,
18
+ size = "md",
19
+ expanded = false,
20
+ onExpandedChange,
21
+ actions,
22
+ focusOnOpen = true,
23
+ labels,
24
+ className,
25
+ children
26
+ }) {
27
+ const words = { ...ARTIFACT_PANEL_LABELS, ...labels };
28
+ const titleId = useId();
29
+ const root = useRef(null);
30
+ const heading = useRef(null);
31
+ const before = useRef(null);
32
+ const focusing = useRef(focusOnOpen);
33
+ useLayoutEffect(() => {
34
+ const panel = root.current;
35
+ before.current = document.activeElement;
36
+ if (focusing.current) heading.current?.focus({ preventScroll: true });
37
+ return () => {
38
+ const back = before.current;
39
+ if (panel?.contains(document.activeElement) && back instanceof HTMLElement && back.isConnected) {
40
+ back.focus({ preventScroll: true });
41
+ }
42
+ };
43
+ }, []);
44
+ const close = useRef(onClose);
45
+ close.current = onClose;
46
+ useEffect(() => {
47
+ const panel = root.current;
48
+ if (!panel) return void 0;
49
+ const doc = panel.ownerDocument;
50
+ const onKeyDown = (event) => {
51
+ if (event.key !== "Escape" || event.defaultPrevented || event.isComposing) return;
52
+ if (!(event.target instanceof Node) || !panel.contains(event.target)) return;
53
+ event.preventDefault();
54
+ close.current();
55
+ };
56
+ doc.addEventListener("keydown", onKeyDown);
57
+ return () => doc.removeEventListener("keydown", onKeyDown);
58
+ }, []);
59
+ return /* @__PURE__ */ jsxs(
60
+ "aside",
61
+ {
62
+ ref: root,
63
+ className: cx("crewlet-artifact-panel", `crewlet-artifact-panel--${size}`, className),
64
+ "aria-labelledby": titleId,
65
+ "data-expanded": expanded || void 0,
66
+ children: [
67
+ /* @__PURE__ */ jsxs("div", { className: "crewlet-artifact-panel__head", children: [
68
+ icon ? /* @__PURE__ */ jsx("span", { className: "crewlet-artifact-panel__icon", "aria-hidden": true, children: icon }) : null,
69
+ /* @__PURE__ */ jsx("h2", { ref: heading, id: titleId, className: "crewlet-artifact-panel__title", tabIndex: -1, children: title }),
70
+ /* @__PURE__ */ jsxs("span", { className: "crewlet-artifact-panel__actions", children: [
71
+ actions,
72
+ onExpandedChange ? /* @__PURE__ */ jsx(
73
+ IconButton,
74
+ {
75
+ label: expanded ? words.collapse : words.expand,
76
+ icon: expanded ? /* @__PURE__ */ jsx(MinimizeGlyph, { size: "sm" }) : /* @__PURE__ */ jsx(MaximizeGlyph, { size: "sm" }),
77
+ size: "sm",
78
+ variant: "ghost",
79
+ onClick: () => onExpandedChange(!expanded)
80
+ }
81
+ ) : null,
82
+ /* @__PURE__ */ jsx(IconButton, { label: words.close(title), icon: /* @__PURE__ */ jsx(XGlyph, { size: "sm" }), size: "sm", variant: "ghost", onClick: onClose })
83
+ ] })
84
+ ] }),
85
+ /* @__PURE__ */ jsx("div", { className: "crewlet-artifact-panel__body", children: /* @__PURE__ */ jsx(HeadingLevelProvider, { level: 3, children }) })
86
+ ]
87
+ }
88
+ );
89
+ }
90
+ function ArtifactWorkspace({
91
+ panel,
92
+ expanded = false,
93
+ bodyRef,
94
+ bodyClassName,
95
+ bodyLabel,
96
+ className,
97
+ children
98
+ }) {
99
+ return /* @__PURE__ */ jsxs(
100
+ "div",
101
+ {
102
+ className: cx("crewlet-artifact-workspace", className),
103
+ "data-panel": panel ? expanded ? "expanded" : "open" : void 0,
104
+ children: [
105
+ /* @__PURE__ */ jsx(
106
+ "div",
107
+ {
108
+ ref: bodyRef,
109
+ className: cx("crewlet-artifact-workspace__body", bodyClassName),
110
+ role: bodyLabel ? "region" : void 0,
111
+ "aria-label": bodyLabel,
112
+ children
113
+ }
114
+ ),
115
+ panel
116
+ ]
117
+ }
118
+ );
119
+ }
120
+
121
+ export { ARTIFACT_PANEL_LABELS, ArtifactPanel, ArtifactWorkspace };
@@ -1,4 +1,4 @@
1
- import { DisclosureAnatomy } from './chunk-ENJUPIND.js';
1
+ import { DisclosureAnatomy } from './chunk-FZVJDJFN.js';
2
2
  import { useHeadingLevel } from './chunk-PQADV6P6.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './Disclosure-VKBJJIZ7.css';