@crewlethq/ui 0.23.0 → 0.25.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 (175) hide show
  1. package/README.md +75 -3
  2. package/dist/ArrangeList/index.js +2 -2
  3. package/dist/ArtifactCard/ArtifactCard.d.ts +3 -2
  4. package/dist/ArtifactCard/index.js +1 -1
  5. package/dist/ArtifactCover/ArtifactCover.d.ts +37 -0
  6. package/dist/ArtifactCover/DashboardCover.d.ts +46 -0
  7. package/dist/ArtifactCover/index.d.ts +6 -0
  8. package/dist/ArtifactCover/index.js +14 -0
  9. package/dist/ArtifactCover-D4MBEJ5H.css +67 -0
  10. package/dist/ArtifactIcon/ArtifactIcon.d.ts +29 -0
  11. package/dist/ArtifactIcon/index.d.ts +2 -0
  12. package/dist/ArtifactIcon/index.js +13 -0
  13. package/dist/AvatarPicker/index.js +6 -6
  14. package/dist/Canvas/Canvas.d.ts +13 -2
  15. package/dist/Canvas/index.js +1 -1
  16. package/dist/CanvasBoard/CanvasBoard.d.ts +117 -0
  17. package/dist/CanvasBoard/budget.d.ts +38 -0
  18. package/dist/CanvasBoard/index.d.ts +5 -0
  19. package/dist/CanvasBoard/index.js +10 -0
  20. package/dist/CanvasBoard-ZLPDINSM.css +236 -0
  21. package/dist/CanvasSchematic/CanvasSchematic.d.ts +31 -0
  22. package/dist/CanvasSchematic/index.d.ts +3 -0
  23. package/dist/CanvasSchematic/index.js +2 -0
  24. package/dist/CanvasSchematic-PLB3N46J.css +36 -0
  25. package/dist/ChangeMark/index.js +3 -3
  26. package/dist/CharacterPicker/index.js +2 -2
  27. package/dist/Checkbox/Checkbox.d.ts +6 -0
  28. package/dist/Checkbox/index.js +1 -1
  29. package/dist/{Checkbox-KT7RS6QQ.css → Checkbox-5UORUG3F.css} +16 -0
  30. package/dist/CommentThread/index.js +2 -2
  31. package/dist/DashboardCover-RMINBODB.css +143 -0
  32. package/dist/DataTable/index.js +3 -3
  33. package/dist/DataView/index.js +5 -5
  34. package/dist/DatasetSource/DatasetSource.d.ts +83 -0
  35. package/dist/DatasetSource/index.d.ts +3 -0
  36. package/dist/DatasetSource/index.js +7 -0
  37. package/dist/DatasetSource-47LBDMPR.css +129 -0
  38. package/dist/DocTabsEditor/DocTabsEditor.d.ts +60 -0
  39. package/dist/DocTabsEditor/index.d.ts +3 -0
  40. package/dist/DocTabsEditor/index.js +9 -0
  41. package/dist/DocTabsEditor-RCOWHX5J.css +78 -0
  42. package/dist/DownloadButton/index.js +2 -2
  43. package/dist/HuePicker/index.js +4 -4
  44. package/dist/LinkInterstitial/index.js +2 -2
  45. package/dist/MarkdownEditor/index.js +5 -5
  46. package/dist/MergeConflicts/MergeConflicts.d.ts +51 -0
  47. package/dist/MergeConflicts/index.d.ts +3 -0
  48. package/dist/MergeConflicts/index.js +9 -0
  49. package/dist/MergeConflicts-O44ESH4T.css +77 -0
  50. package/dist/Meter/index.js +1 -1
  51. package/dist/{Meter-5VCSFMZW.css → Meter-ZZRFUEOH.css} +15 -0
  52. package/dist/ObjectHeader/ObjectHeader.d.ts +7 -1
  53. package/dist/ObjectHeader/index.js +1 -1
  54. package/dist/{ObjectHeader-UNVYM2KD.css → ObjectHeader-D7GU7QNI.css} +15 -0
  55. package/dist/PeopleRail/index.js +3 -3
  56. package/dist/PresenceModel/index.d.ts +1 -1
  57. package/dist/PresenceModel/index.js +1 -1
  58. package/dist/PresenceModel/presence.d.ts +10 -2
  59. package/dist/PresenceStack/index.js +3 -3
  60. package/dist/PresenterView/PresenterView.d.ts +52 -0
  61. package/dist/PresenterView/index.d.ts +3 -0
  62. package/dist/PresenterView/index.js +8 -0
  63. package/dist/PresenterView-T2C6ZZ3N.css +103 -0
  64. package/dist/Section/index.js +1 -1
  65. package/dist/{Section-QRUPRIQ2.css → Section-QR3ILQVK.css} +4 -1
  66. package/dist/SegmentedControl/SegmentedControl.d.ts +17 -0
  67. package/dist/SegmentedControl/index.js +4 -4
  68. package/dist/{SegmentedControl-PKBLJVSA.css → SegmentedControl-FLI45IOW.css} +13 -0
  69. package/dist/ShareDialog/index.js +3 -3
  70. package/dist/SheetGrid/SheetGrid.d.ts +24 -2
  71. package/dist/SheetGrid/index.js +11 -7
  72. package/dist/{SheetGrid-4HOXDVIB.css → SheetGrid-J3TKKXZL.css} +87 -17
  73. package/dist/SheetModel/edits.d.ts +7 -1
  74. package/dist/SheetModel/index.js +2 -2
  75. package/dist/SheetModel/labels.d.ts +9 -0
  76. package/dist/SheetModel/types.d.ts +6 -0
  77. package/dist/SlideCompare/SlideCompare.d.ts +52 -0
  78. package/dist/SlideCompare/index.d.ts +3 -0
  79. package/dist/SlideCompare/index.js +7 -0
  80. package/dist/SlideCompare-MGM3U2ME.css +80 -0
  81. package/dist/SlideFilmstrip/SlideFilmstrip.d.ts +50 -0
  82. package/dist/SlideFilmstrip/index.d.ts +3 -0
  83. package/dist/SlideFilmstrip/index.js +8 -0
  84. package/dist/SlideFilmstrip-BCLNAHFX.css +108 -0
  85. package/dist/SlideGrid/SlideGrid.d.ts +32 -0
  86. package/dist/SlideGrid/index.d.ts +3 -0
  87. package/dist/SlideGrid/index.js +5 -0
  88. package/dist/SlideGrid-RT6QEQEE.css +82 -0
  89. package/dist/SlideStage/SlideStage.d.ts +47 -0
  90. package/dist/SlideStage/index.d.ts +5 -0
  91. package/dist/SlideStage/index.js +4 -0
  92. package/dist/SlideStage/useSlideKeys.d.ts +21 -0
  93. package/dist/SlideStage-XIOTMMRU.css +32 -0
  94. package/dist/Switcher/index.js +2 -2
  95. package/dist/TableCells/index.js +2 -2
  96. package/dist/Tabs/index.js +2 -2
  97. package/dist/Tabs/roving.d.ts +1 -0
  98. package/dist/TagGroup/TagGroup.d.ts +16 -1
  99. package/dist/TagGroup/index.js +1 -1
  100. package/dist/{TagGroup-BCQZD7ZD.css → TagGroup-NAXTJHDS.css} +22 -0
  101. package/dist/ThemeGallery/index.js +2 -2
  102. package/dist/ThemeSwitcher/index.js +5 -5
  103. package/dist/TreeCanvas/index.js +2 -2
  104. package/dist/VersionCompare/VersionCompare.d.ts +8 -1
  105. package/dist/VersionCompare/index.js +5 -5
  106. package/dist/VersionTimeline/index.js +1 -1
  107. package/dist/{VersionTimeline-EBJ6MIPJ.css → VersionTimeline-6KRXEEOO.css} +7 -7
  108. package/dist/WidgetFrame/WidgetFrame.d.ts +73 -0
  109. package/dist/WidgetFrame/index.d.ts +3 -0
  110. package/dist/WidgetFrame/index.js +6 -0
  111. package/dist/WidgetFrame-4EFJOJMW.css +127 -0
  112. package/dist/chunk-3D7PSL2L.js +438 -0
  113. package/dist/{chunk-SJCKMSQK.js → chunk-5LUI3WQP.js} +1 -1
  114. package/dist/{chunk-TODND5AD.js → chunk-6J35F334.js} +7 -4
  115. package/dist/{chunk-IASV5UCP.js → chunk-7T42VQQT.js} +3 -1
  116. package/dist/{chunk-BJCFNRGH.js → chunk-BEHFTRMZ.js} +1 -1
  117. package/dist/chunk-BQYQWJPK.js +80 -0
  118. package/dist/{chunk-KLIEPFEZ.js → chunk-C2FRTWKO.js} +1 -1
  119. package/dist/{chunk-APS747CR.js → chunk-EHQTPVV4.js} +5 -3
  120. package/dist/{chunk-A2UXBCLO.js → chunk-FAQGGX2Z.js} +1 -1
  121. package/dist/chunk-FQCLKD7U.js +2 -0
  122. package/dist/{chunk-J4OKGJQ6.js → chunk-FVLCTCMV.js} +1 -1
  123. package/dist/{chunk-XJFOOXCF.js → chunk-HJEVSQN6.js} +1 -1
  124. package/dist/chunk-HONZQ4UR.js +107 -0
  125. package/dist/{chunk-5PSXBL73.js → chunk-HVIX5ECM.js} +1 -1
  126. package/dist/{chunk-36CWC2NH.js → chunk-INTEH4F3.js} +271 -143
  127. package/dist/{chunk-F6NZOVWL.js → chunk-IW55G7XG.js} +6 -2
  128. package/dist/chunk-KNLJL3VP.js +101 -0
  129. package/dist/chunk-KSSSFLE2.js +105 -0
  130. package/dist/{chunk-TXAFKH2A.js → chunk-KZOGQXSP.js} +6 -0
  131. package/dist/{chunk-CS65QSIJ.js → chunk-LZHLSQYK.js} +2 -2
  132. package/dist/chunk-MQEEQVG6.js +62 -0
  133. package/dist/chunk-NBWNLYWZ.js +62 -0
  134. package/dist/{chunk-YYZRLLLY.js → chunk-NHBP2XS5.js} +19 -3
  135. package/dist/chunk-O2EGEONV.js +90 -0
  136. package/dist/{chunk-YM3GJHGW.js → chunk-ODT5H4MN.js} +1 -1
  137. package/dist/{chunk-JCSXFAXG.js → chunk-OJRDEVHV.js} +1 -1
  138. package/dist/{chunk-U63Y5OCW.js → chunk-PRNX5AFE.js} +2 -2
  139. package/dist/chunk-Q4A5CGUB.js +43 -0
  140. package/dist/{chunk-7QL2OFP6.js → chunk-RCQXUT5K.js} +25 -9
  141. package/dist/{chunk-CBOICT64.js → chunk-RKKO7QHH.js} +2 -0
  142. package/dist/{chunk-TBIZSQHB.js → chunk-RSC7UJCR.js} +1 -1
  143. package/dist/chunk-RWA4H2TV.js +73 -0
  144. package/dist/{chunk-OQT7GSKJ.js → chunk-SGIQCI6Y.js} +1 -1
  145. package/dist/{chunk-35UKQ33X.js → chunk-SVW3VG72.js} +2 -2
  146. package/dist/{chunk-4PZ6FJKW.js → chunk-UGNUUVRI.js} +2 -2
  147. package/dist/chunk-UOR7TOAU.js +191 -0
  148. package/dist/{chunk-XMGB3ZAT.js → chunk-URUGEAFB.js} +3 -2
  149. package/dist/chunk-UZ7ZUSLH.js +179 -0
  150. package/dist/chunk-V2Z24W2Z.js +75 -0
  151. package/dist/{chunk-I7WXZOWA.js → chunk-VGE3G3T4.js} +3 -1
  152. package/dist/{chunk-UNZ7TVV5.js → chunk-W4XYY73O.js} +7 -9
  153. package/dist/{chunk-IPM2E6UI.js → chunk-WJDQ7XQA.js} +1 -1
  154. package/dist/{chunk-PPAQFGS2.js → chunk-YEKYVJQR.js} +1 -1
  155. package/dist/chunk-Z54BPRL6.js +74 -0
  156. package/dist/{chunk-S35G6PNC.js → chunk-Z7JYG5TF.js} +5 -4
  157. package/dist/chunk-ZZDY4XL7.js +112 -0
  158. package/dist/generated/index.d.ts +13 -0
  159. package/dist/generated/index.js +92 -79
  160. package/dist/index.js +92 -79
  161. package/dist/styles.css +1644 -153
  162. package/dist/utils/csv.d.ts +18 -0
  163. package/dist/utils/elementToPng.d.ts +49 -0
  164. package/dist/utils/index.d.ts +4 -1
  165. package/dist/utils/index.js +2 -2
  166. package/dist/utils/useDownload.d.ts +14 -4
  167. package/package.json +3 -3
  168. package/dist/chunk-E6UWRXNM.js +0 -52
  169. package/dist/chunk-M54K52ZU.js +0 -2
  170. package/dist/chunk-U5LQ2AS5.js +0 -1
  171. package/dist/{chunk-KG6XRG5Z.js → chunk-5OY4LJFH.js} +1 -1
  172. package/dist/{chunk-ZM7HLFOA.js → chunk-L2OQRPXJ.js} +1 -1
  173. package/dist/{chunk-MUGM7SEG.js → chunk-LFNUH4GY.js} +1 -1
  174. package/dist/{chunk-PBNP7H2C.js → chunk-M2VJGNCD.js} +1 -1
  175. /package/dist/{chunk-MSSZHDZI.js → chunk-SLRKS5PF.js} +0 -0
@@ -0,0 +1,52 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface PresenterViewLabels {
3
+ current: (position: number, total: number, title: string) => string;
4
+ next: (title: string) => string;
5
+ end: string;
6
+ notes: string;
7
+ noNotes: string;
8
+ timer: string;
9
+ pause: string;
10
+ resume: string;
11
+ reset: string;
12
+ previous: string;
13
+ forward: string;
14
+ position: (position: number, total: number) => string;
15
+ }
16
+ export interface PresenterViewProps {
17
+ /** The slide on the audience's screen, drawn at its own size. */
18
+ current: ReactNode;
19
+ currentTitle: string;
20
+ /** The slide after it; null at the end of the deck. */
21
+ next: ReactNode | null;
22
+ nextTitle?: string | undefined;
23
+ notes: string;
24
+ /** One-based. */
25
+ position: number;
26
+ total: number;
27
+ onNext: () => void;
28
+ onPrevious: () => void;
29
+ /** The clock the timer reads, for a test; the browser's otherwise. */
30
+ now?: (() => number) | undefined;
31
+ className?: string | undefined;
32
+ labels?: Partial<PresenterViewLabels> | undefined;
33
+ }
34
+ /**
35
+ * `ms` as a stopwatch reads, m:ss or h:mm:ss past an hour: glanceable at the
36
+ * lectern, where RelativeTime's "4m 20s" would change width every second.
37
+ */
38
+ export declare function formatStopwatch(ms: number): string;
39
+ /**
40
+ * The presenter's own screen: the slide the room sees, the one after it, the
41
+ * speaker notes large enough to read at a glance, how long the talk has run,
42
+ * and the controls that move the show.
43
+ *
44
+ * A SEPARATE SCREEN FROM THE AUDIENCE'S. The host draws this in its own
45
+ * window and the slide itself full screen elsewhere; both follow one position,
46
+ * so pressing next here moves the room.
47
+ *
48
+ * THE TIMER COUNTS FROM WHEN THE VIEW OPENED and can be paused and reset. It
49
+ * is the presenter's, kept by no one else, and it is not announced every
50
+ * second: it is marked as a timer, which screen readers leave quiet.
51
+ */
52
+ export declare function PresenterView({ current, currentTitle, next, nextTitle, notes, position, total, onNext, onPrevious, now, className, labels, }: PresenterViewProps): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import './PresenterView.css';
2
+ export { PresenterView, formatStopwatch } from './PresenterView.js';
3
+ export type { PresenterViewLabels, PresenterViewProps } from './PresenterView.js';
@@ -0,0 +1,8 @@
1
+ export { PresenterView, formatStopwatch } from '../chunk-HONZQ4UR.js';
2
+ import '../chunk-KNLJL3VP.js';
3
+ import '../chunk-OG6CL3EB.js';
4
+ import '../chunk-HMPFGIWM.js';
5
+ import '../chunk-R25RGPUB.js';
6
+ import '../chunk-4FQT6ZAY.js';
7
+ import '../chunk-BZFWDIV6.js';
8
+ import '../chunk-ODEQTPFM.js';
@@ -0,0 +1,103 @@
1
+ /*
2
+ * PresenterView: the presenter's own screen beside the room's.
3
+ *
4
+ * The notes take the space a glance needs: a large, readable size and their
5
+ * own scroll, so a long note never pushes the next slide or the timer away.
6
+ */
7
+
8
+ .crewlet-presenter {
9
+ display: grid;
10
+ grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
11
+ gap: var(--spacing-4);
12
+ height: 100%;
13
+ min-height: 0;
14
+ padding: var(--spacing-4);
15
+ background: var(--color-surface-background);
16
+ color: var(--color-text-primary);
17
+ }
18
+
19
+ .crewlet-presenter__main {
20
+ display: flex;
21
+ flex-direction: column;
22
+ gap: var(--spacing-3);
23
+ min-height: 0;
24
+ }
25
+
26
+ .crewlet-presenter__main .crewlet-slide-stage {
27
+ flex: 1;
28
+ min-height: 0;
29
+ border-radius: var(--radius-md);
30
+ }
31
+
32
+ .crewlet-presenter__controls {
33
+ display: flex;
34
+ align-items: center;
35
+ justify-content: center;
36
+ gap: var(--spacing-3);
37
+ }
38
+
39
+ .crewlet-presenter__position {
40
+ color: var(--color-text-secondary);
41
+ font-variant-numeric: tabular-nums;
42
+ }
43
+
44
+ .crewlet-presenter__side {
45
+ display: flex;
46
+ flex-direction: column;
47
+ gap: var(--spacing-4);
48
+ min-height: 0;
49
+ }
50
+
51
+ .crewlet-presenter__next .crewlet-slide-stage {
52
+ border-radius: var(--radius-sm);
53
+ outline: 1px solid var(--color-border-default);
54
+ }
55
+
56
+ .crewlet-presenter__end {
57
+ margin: 0;
58
+ padding: var(--spacing-6) var(--spacing-3);
59
+ border: 1px dashed var(--color-border-default);
60
+ border-radius: var(--radius-sm);
61
+ color: var(--color-text-tertiary);
62
+ text-align: center;
63
+ }
64
+
65
+ .crewlet-presenter__timer {
66
+ display: flex;
67
+ align-items: center;
68
+ gap: var(--spacing-2);
69
+ }
70
+
71
+ .crewlet-presenter__elapsed {
72
+ margin-right: auto;
73
+ font-family: var(--font-family-mono);
74
+ font-size: var(--font-size-2xl);
75
+ font-variant-numeric: tabular-nums;
76
+ }
77
+
78
+ .crewlet-presenter__notes {
79
+ flex: 1;
80
+ min-height: 0;
81
+ overflow: auto;
82
+ padding: var(--spacing-3);
83
+ border-radius: var(--radius-md);
84
+ background: var(--color-surface-subtle);
85
+ font-size: var(--font-size-lg);
86
+ line-height: 1.5;
87
+ white-space: pre-wrap;
88
+ }
89
+
90
+ .crewlet-presenter__notes p {
91
+ margin: 0;
92
+ }
93
+
94
+ .crewlet-presenter__empty {
95
+ color: var(--color-text-tertiary);
96
+ }
97
+
98
+ @media (max-width: 48rem) {
99
+ .crewlet-presenter {
100
+ grid-template-columns: minmax(0, 1fr);
101
+ height: auto;
102
+ }
103
+ }
@@ -1,3 +1,3 @@
1
- export { Section } from '../chunk-A2UXBCLO.js';
1
+ export { Section } from '../chunk-FAQGGX2Z.js';
2
2
  import '../chunk-PQADV6P6.js';
3
3
  import '../chunk-ODEQTPFM.js';
@@ -61,7 +61,10 @@
61
61
  line-height: var(--font-line-height-normal);
62
62
  letter-spacing: var(--font-letter-spacing-tight);
63
63
  color: var(--color-text-primary);
64
- min-width: 0;
64
+ /* THE TITLE NEVER WRAPS to make room for its hint: the hint is the one that
65
+ gives way (truncated beside it, or under it on a narrow screen). */
66
+ flex: none;
67
+ white-space: nowrap;
65
68
  }
66
69
 
67
70
  /*
@@ -15,7 +15,24 @@ export interface SegmentedOption<T extends string = string> {
15
15
  icon?: ReactNode;
16
16
  title?: string;
17
17
  count?: number | null;
18
+ /**
19
+ * The count is a FLOOR: the page it was counted on stopped with more behind
20
+ * it, so it is drawn "50+" and never as an exact figure.
21
+ */
22
+ capped?: boolean | undefined;
23
+ /**
24
+ * The option cannot be chosen. A press, and an arrow under automatic
25
+ * activation, never choose it.
26
+ */
18
27
  disabled?: boolean;
28
+ /**
29
+ * The id of the element that says WHY a disabled option cannot be chosen.
30
+ * With one, the option stays FOCUSABLE and in the arrows' path
31
+ * (`aria-disabled` rather than `disabled`), so a reader can land on it and
32
+ * hear the reason; a natively disabled button is skipped silently. Without
33
+ * one, a disabled option is stepped over as before.
34
+ */
35
+ describedBy?: string | undefined;
19
36
  /**
20
37
  * A second line under the label. With one, the options are drawn as card
21
38
  * rows rather than chips, for a choice a reader has to read before making.
@@ -1,7 +1,7 @@
1
- import '../chunk-M54K52ZU.js';
2
- export { SegmentedControl } from '../chunk-7QL2OFP6.js';
3
- import '../chunk-XJFOOXCF.js';
4
- import '../chunk-CBOICT64.js';
1
+ import '../chunk-FQCLKD7U.js';
2
+ export { SegmentedControl } from '../chunk-RCQXUT5K.js';
3
+ import '../chunk-HJEVSQN6.js';
4
+ import '../chunk-RKKO7QHH.js';
5
5
  import '../chunk-BHHIIK3M.js';
6
6
  import '../chunk-BZFWDIV6.js';
7
7
  import '../chunk-ODEQTPFM.js';
@@ -176,3 +176,16 @@
176
176
  justify-content: center;
177
177
  min-width: 0;
178
178
  }
179
+
180
+ /*
181
+ * A PILL ROW WRAPS RATHER THAN OVERFLOWING ITS CONTAINER. Its options never
182
+ * shrink (a label cut mid-word is not a choice anybody can read), so on one
183
+ * unbroken row a group wider than its container ran past its edge: on a phone
184
+ * a chart's "Split by" row ended at "Worke", clipped by its card. Wrapped,
185
+ * every option stays visible and inside the focus ring's room.
186
+ */
187
+ .crewlet-tabs--pill.crewlet-segmented {
188
+ flex-wrap: wrap;
189
+ min-width: 0;
190
+ max-width: 100%;
191
+ }
@@ -1,10 +1,10 @@
1
- export { ARTIFACT_ROLES, SHAREABLE_ROLES, ShareDialog, roleAtLeast } from '../chunk-XMGB3ZAT.js';
1
+ export { ARTIFACT_ROLES, SHAREABLE_ROLES, ShareDialog, roleAtLeast } from '../chunk-URUGEAFB.js';
2
2
  import '../chunk-FC4YTTFJ.js';
3
+ import '../chunk-F4DPAJCN.js';
4
+ import '../chunk-F73MC7EZ.js';
3
5
  import '../chunk-W46LPU4R.js';
4
6
  import '../chunk-STJ7QBC3.js';
5
7
  import '../chunk-DTIW4CHZ.js';
6
- import '../chunk-F4DPAJCN.js';
7
- import '../chunk-F73MC7EZ.js';
8
8
  import '../chunk-SVSCLHHI.js';
9
9
  import '../chunk-4KP4RC3O.js';
10
10
  import '../chunk-UAN5NE7M.js';
@@ -67,12 +67,34 @@ export interface SheetGridProps {
67
67
  /** Where the host's writes stand, for the sync strip. No strip without it. */
68
68
  sync?: SheetSyncState | undefined;
69
69
  onRetry?: (() => void) | undefined;
70
- /** The scroller's height in px. Without it the grid takes the height its container gives it. */
70
+ /**
71
+ * The scroller's height in px. Without it the grid takes the height its
72
+ * container gives it. With `fit="content"` it is the MOST the grid takes.
73
+ */
71
74
  height?: number | undefined;
75
+ /**
76
+ * `container` (the default) fills the height its container gives it.
77
+ * `content` is as tall as its rows, up to `height` (or the
78
+ * `--crewlet-sheet-max-height` the page sets, 70% of the viewport by
79
+ * default), so twelve rows draw no empty bordered slab under the last one
80
+ * and Add row sits right under them.
81
+ */
82
+ fit?: 'container' | 'content' | undefined;
83
+ /**
84
+ * Shows the row actions menu on a row's number (the active row, a hovered
85
+ * one, and Shift+F10 from any of its cells) with Delete row. The grid only
86
+ * asks: the host confirms with its own dialog before it deletes anything.
87
+ */
88
+ onDeleteRow?: ((rowId: string) => void) | undefined;
89
+ /**
90
+ * Shows Dismiss in the sync strip while refused changes are held there
91
+ * (`sync.refused`), so the reader clears them once they have read why.
92
+ */
93
+ onDismissRefused?: (() => void) | undefined;
72
94
  /** A BCP 47 tag for numbers and dates; the reader's own locale when absent. */
73
95
  locale?: string | undefined;
74
96
  className?: string | undefined;
75
97
  labels?: Partial<SheetLabels> | undefined;
76
98
  presenceLabels?: Partial<PresenceLabels> | undefined;
77
99
  }
78
- export declare function SheetGrid({ label, columns: declared, rows: given, people, mode, onEdit, onAddRow, onShowHistory, onActiveCellChange, onEditingChange, onUndo, onRedo, onOpenLink, presence, sort, onSortChange, sync, onRetry, height, locale, className, labels: labelOverrides, presenceLabels: presenceOverrides, }: SheetGridProps): import("react").JSX.Element;
100
+ export declare function SheetGrid({ label, columns: declared, rows: given, people, mode, onEdit, onAddRow, onShowHistory, onActiveCellChange, onEditingChange, onUndo, onRedo, onOpenLink, presence, sort, onSortChange, sync, onRetry, height, fit, onDeleteRow, onDismissRefused, locale, className, labels: labelOverrides, presenceLabels: presenceOverrides, }: SheetGridProps): import("react").JSX.Element;
@@ -1,18 +1,22 @@
1
- export { CellDisplay, CellEditor, CheckboxCell, DateCell, LongTextCell, MultiSelectCell, NumberCell, PersonCell, RatingCell, SelectCell, SheetCell, SheetGrid, StatusCell, TextCell, UrlCell } from '../chunk-36CWC2NH.js';
1
+ export { CellDisplay, CellEditor, CheckboxCell, DateCell, LongTextCell, MultiSelectCell, NumberCell, PersonCell, RatingCell, SelectCell, SheetCell, SheetGrid, StatusCell, TextCell, UrlCell } from '../chunk-INTEH4F3.js';
2
+ import '../chunk-O2EGEONV.js';
2
3
  import '../chunk-CENOOTAV.js';
3
- import '../chunk-GFV4LJHH.js';
4
- import '../chunk-WIATRXEJ.js';
5
4
  import '../chunk-3BYIWOTV.js';
6
5
  import '../chunk-I6POAB4V.js';
7
- import '../chunk-PPAQFGS2.js';
8
- import '../chunk-YYZRLLLY.js';
9
- import '../chunk-S35G6PNC.js';
6
+ import '../chunk-GFV4LJHH.js';
7
+ import '../chunk-WIATRXEJ.js';
8
+ import '../chunk-YEKYVJQR.js';
9
+ import '../chunk-NHBP2XS5.js';
10
+ import '../chunk-Z7JYG5TF.js';
10
11
  import '../chunk-QWOPX2MN.js';
11
- import '../chunk-AYKXMIOR.js';
12
12
  import '../chunk-UAN5NE7M.js';
13
+ import '../chunk-AYKXMIOR.js';
13
14
  import '../chunk-5OM447RW.js';
15
+ import '../chunk-UFKUWVMV.js';
14
16
  import '../chunk-OG6CL3EB.js';
15
17
  import '../chunk-HMPFGIWM.js';
16
18
  import '../chunk-R25RGPUB.js';
19
+ import '../chunk-RSAQOKH3.js';
20
+ import '../chunk-4FQT6ZAY.js';
17
21
  import '../chunk-BZFWDIV6.js';
18
22
  import '../chunk-ODEQTPFM.js';
@@ -48,6 +48,13 @@
48
48
  min-width: 100%;
49
49
  }
50
50
 
51
+ /* AS TALL AS ITS ROWS (fit="content"): the component writes the height, the
52
+ page may cap it, and the grid never grows past the height it was given. */
53
+ .crewlet-sheet-grid--fit-content > .crewlet-sheet-grid__scroller {
54
+ flex: none;
55
+ max-height: var(--crewlet-sheet-max-height, 70vh);
56
+ }
57
+
51
58
  .crewlet-sheet-grid__row {
52
59
  display: grid;
53
60
  grid-template-columns: var(--crewlet-sheet-columns);
@@ -140,6 +147,16 @@
140
147
  font-variant-numeric: tabular-nums;
141
148
  }
142
149
 
150
+ /* The row actions sit at the number's trailing edge, over the cell's own
151
+ background, so the number stays readable beside them. */
152
+ .crewlet-sheet-grid__row-actions {
153
+ position: absolute;
154
+ top: 50%;
155
+ inset-inline-end: 0;
156
+ display: inline-flex;
157
+ transform: translateY(-50%);
158
+ }
159
+
143
160
  /* The bar at a row's leading edge while somebody has it selected. */
144
161
  .crewlet-sheet-grid__rownum--present::before {
145
162
  position: absolute;
@@ -305,10 +322,9 @@
305
322
  }
306
323
 
307
324
  .crewlet-sheet-cell__chips {
308
- display: inline-flex;
309
- gap: var(--spacing-1);
325
+ flex: 1 1 auto;
326
+ flex-wrap: wrap;
310
327
  min-width: 0;
311
- overflow: hidden;
312
328
  }
313
329
 
314
330
  .crewlet-sheet-cell__person {
@@ -358,12 +374,14 @@
358
374
  align-items: center;
359
375
  }
360
376
 
377
+ /* A RATING IS A QUANTITY, not a state, so its marks take the ink and the
378
+ control edge rather than the warning hue: amber here read as an alert. */
361
379
  .crewlet-sheet-cell__star {
362
- color: var(--color-text-tertiary);
380
+ color: var(--color-border-strong);
363
381
  }
364
382
 
365
383
  .crewlet-sheet-cell__star--on {
366
- color: var(--color-feedback-warning);
384
+ color: var(--color-text-primary);
367
385
  }
368
386
 
369
387
  .crewlet-sheet-cell {
@@ -468,18 +486,53 @@
468
486
  bottom: 100%;
469
487
  }
470
488
 
471
- .crewlet-sheet-editor--list .crewlet-sheet-editor__panel,
472
- .crewlet-sheet-editor--long .crewlet-sheet-editor__panel {
489
+ .crewlet-sheet-editor--list .crewlet-sheet-editor__panel {
473
490
  top: 0;
474
491
  min-width: max(100%, 14rem);
475
492
  }
476
493
 
477
- .crewlet-sheet-editor--list.crewlet-sheet-editor--above .crewlet-sheet-editor__panel,
478
- .crewlet-sheet-editor--long.crewlet-sheet-editor--above .crewlet-sheet-editor__panel {
494
+ .crewlet-sheet-editor--list.crewlet-sheet-editor--above .crewlet-sheet-editor__panel {
495
+ top: auto;
496
+ bottom: 0;
497
+ }
498
+
499
+ /* THE TEXT EDITOR LIES OVER THE CELL: at least the column's width, the
500
+ popover's ground and shadow, and a field that wraps and grows to six lines,
501
+ so the start of a value is never scrolled out of view while it is edited. */
502
+ .crewlet-sheet-editor__overlay {
503
+ position: absolute;
504
+ top: 0;
505
+ inset-inline-start: 0;
506
+ z-index: var(--z-index-presence);
507
+ display: flex;
508
+ flex-direction: column;
509
+ gap: var(--spacing-2);
510
+ box-sizing: border-box;
511
+ min-width: 100%;
512
+ width: max(100%, 20rem);
513
+ max-width: min(32rem, 90vw);
514
+ border: 1px solid var(--color-border-default);
515
+ border-radius: var(--radius-md);
516
+ background: var(--color-surface-elevated);
517
+ box-shadow: var(--shadow-xl);
518
+ }
519
+
520
+ .crewlet-sheet-editor--above .crewlet-sheet-editor__overlay {
479
521
  top: auto;
480
522
  bottom: 0;
481
523
  }
482
524
 
525
+ .crewlet-sheet-editor__overlay > .crewlet-sheet-editor__error,
526
+ .crewlet-sheet-editor__overlay > .crewlet-sheet-editor__conflict {
527
+ margin: 0 var(--spacing-2) var(--spacing-2);
528
+ }
529
+
530
+ .crewlet-sheet-cell .crewlet-sheet-editor__overlay {
531
+ position: relative;
532
+ width: 100%;
533
+ max-width: none;
534
+ }
535
+
483
536
  .crewlet-sheet-editor__filter,
484
537
  .crewlet-sheet-editor__textarea {
485
538
  box-sizing: border-box;
@@ -492,10 +545,19 @@
492
545
  font: inherit;
493
546
  }
494
547
 
495
- .crewlet-sheet-editor__textarea {
496
- min-width: 20rem;
497
- max-width: 100%;
498
- resize: vertical;
548
+ .crewlet-sheet-editor__overlay .crewlet-sheet-editor__textarea {
549
+ display: block;
550
+ min-height: var(--crewlet-sheet-row-height, var(--size-sheet-row));
551
+ max-height: calc(var(--crewlet-sheet-editor-lines, 6) * var(--font-line-height-normal) * 1em + 2 * var(--spacing-2));
552
+ padding: var(--spacing-2);
553
+ overflow-y: auto;
554
+ border: 0;
555
+ border-radius: var(--radius-md);
556
+ background: transparent;
557
+ line-height: var(--font-line-height-normal);
558
+ white-space: pre-wrap;
559
+ overflow-wrap: anywhere;
560
+ resize: none;
499
561
  }
500
562
 
501
563
  .crewlet-sheet-editor__list {
@@ -518,6 +580,17 @@
518
580
  cursor: pointer;
519
581
  }
520
582
 
583
+ .crewlet-sheet-editor__option--clear {
584
+ margin-top: var(--spacing-1);
585
+ border-top: 1px solid var(--color-border-default);
586
+ border-radius: 0 0 var(--radius-sm) var(--radius-sm);
587
+ }
588
+
589
+ .crewlet-sheet-editor__list:focus-visible {
590
+ outline: 2px solid var(--color-focus);
591
+ outline-offset: var(--size-focus-ring-inset-offset);
592
+ }
593
+
521
594
  .crewlet-sheet-editor__option--highlight {
522
595
  background: var(--color-surface-hover);
523
596
  }
@@ -567,7 +640,7 @@
567
640
  the screen rather than from a cell a thumb has to keep in view. */
568
641
  @media (width < 640px) {
569
642
  .crewlet-sheet-grid .crewlet-sheet-editor--list .crewlet-sheet-editor__panel,
570
- .crewlet-sheet-grid .crewlet-sheet-editor--long .crewlet-sheet-editor__panel {
643
+ .crewlet-sheet-grid .crewlet-sheet-editor--long .crewlet-sheet-editor__overlay {
571
644
  position: fixed;
572
645
  top: auto;
573
646
  right: 0;
@@ -578,9 +651,6 @@
578
651
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
579
652
  }
580
653
 
581
- .crewlet-sheet-editor__textarea {
582
- min-width: 0;
583
- }
584
654
  }
585
655
 
586
656
  @media (forced-colors: active) {
@@ -48,7 +48,13 @@ export declare class SheetPendingEdits {
48
48
  dismiss(rowId: string, field: string): void;
49
49
  /** Edits sent and not yet settled, for the sync strip. */
50
50
  get saving(): number;
51
- /** The sync strip's state. Refusals are said on their cells, so they do not count as failures to retry. */
51
+ /** Clears every refusal at once: the strip's Dismiss. */
52
+ dismissAll(): void;
53
+ /**
54
+ * The sync strip's state. A refusal is not a failure to retry (the engine
55
+ * decided it), but it is counted, so the strip holds "not saved" until the
56
+ * reader dismisses it rather than going back to "Saved".
57
+ */
52
58
  sync(offline?: boolean): SheetSyncState;
53
59
  /** Every refusal since the last `resetFailures`, for a host that reports them. */
54
60
  get failures(): number;
@@ -1,3 +1,3 @@
1
- export { LONGTEXT_MAX_DEFAULT, RATING_MAX_CEILING, RATING_MAX_DEFAULT, SHEET_COLUMN_TYPES, SHEET_COLUMN_WIDTHS, SHEET_LABELS, SHEET_ROW_HEIGHT, SHEET_ROW_NUMBER_WIDTH, SheetPendingEdits, TEXT_MAX_DEFAULT, URL_MAX, cellDescription, cellKey, cellSpeech, changeText, changeTime, checkValue, columnOffsets, columnWidth, compareValues, displayText, drawnColumns, editText, editorSide, findOption, findPerson, flagText, hasPrevious, inRange, isEmptyValue, isMod, isMultiCell, isSheetColumnType, isTypingKey, liveOptions, moveFrom, nextSort, normalizeValue, optionHue, parseOptionList, parseTSV, parseText, planClear, planPaste, presenceByCell, presenceByColumn, presenceByRow, rangeOf, ratingMax, refusalText, rowName, sameValue, scrollToRow, sheetLabels, sortRows, spokenText, statusTone, textMax, toTSV, visibleRows } from '../chunk-YYZRLLLY.js';
2
- import '../chunk-S35G6PNC.js';
1
+ export { LONGTEXT_MAX_DEFAULT, RATING_MAX_CEILING, RATING_MAX_DEFAULT, SHEET_COLUMN_TYPES, SHEET_COLUMN_WIDTHS, SHEET_LABELS, SHEET_ROW_HEIGHT, SHEET_ROW_NUMBER_WIDTH, SheetPendingEdits, TEXT_MAX_DEFAULT, URL_MAX, cellDescription, cellKey, cellSpeech, changeText, changeTime, checkValue, columnOffsets, columnWidth, compareValues, displayText, drawnColumns, editText, editorSide, findOption, findPerson, flagText, hasPrevious, inRange, isEmptyValue, isMod, isMultiCell, isSheetColumnType, isTypingKey, liveOptions, moveFrom, nextSort, normalizeValue, optionHue, parseOptionList, parseTSV, parseText, planClear, planPaste, presenceByCell, presenceByColumn, presenceByRow, rangeOf, ratingMax, refusalText, rowName, sameValue, scrollToRow, sheetLabels, sortRows, spokenText, statusTone, textMax, toTSV, visibleRows } from '../chunk-NHBP2XS5.js';
2
+ import '../chunk-Z7JYG5TF.js';
3
3
  import '../chunk-AYKXMIOR.js';
@@ -55,6 +55,15 @@ export interface SheetLabels {
55
55
  /** The sync strip. */
56
56
  sync: (state: SheetSyncState) => string;
57
57
  retry: string;
58
+ /** Clears the strip's refused changes once the reader has read them. */
59
+ dismiss: string;
60
+ /** A refusal, as the grid announces it: "Not saved: <reason>". */
61
+ notSaved: (reason: string) => string;
62
+ /** The row actions control on a row's number, and its delete item. */
63
+ rowActions: (row: number) => string;
64
+ deleteRow: string;
65
+ /** Appended to the keyboard help when a row has actions. */
66
+ rowActionsHelp: string;
58
67
  /** The editor's filter box in an option list. */
59
68
  filter: string;
60
69
  /** An option list with nothing left to show. */
@@ -123,4 +123,10 @@ export interface SheetSyncState {
123
123
  offline?: boolean | undefined;
124
124
  /** Edits that could not be saved and can be retried. */
125
125
  failed?: number | undefined;
126
+ /**
127
+ * Edits the engine refused, each reverted and said on its cell. The strip
128
+ * holds them until the reader dismisses them, so a refusal is never
129
+ * followed by "Saved".
130
+ */
131
+ refused?: number | undefined;
126
132
  }
@@ -0,0 +1,52 @@
1
+ import { type ReactNode } from 'react';
2
+ /** What happened to one slide between two versions. */
3
+ export type SlideChange = 'unchanged' | 'changed' | 'added' | 'removed';
4
+ /** One slide of two versions, paired by its id. */
5
+ export interface SlideCompareRow {
6
+ key: string;
7
+ /** What a reader calls it: its heading in the newer version, else the older. */
8
+ title: string;
9
+ change: SlideChange;
10
+ /** Its one-based place in the older version; absent for a slide it lacks. */
11
+ fromPosition?: number | undefined;
12
+ /** Its one-based place in the newer version; absent for a slide it lacks. */
13
+ toPosition?: number | undefined;
14
+ /** Whether it moved among the slides both versions hold. */
15
+ moved?: boolean | undefined;
16
+ /** The slide as the older version draws it, at its own size. */
17
+ from?: ReactNode;
18
+ /** The slide as the newer version draws it, at its own size. */
19
+ to?: ReactNode;
20
+ }
21
+ export interface SlideCompareLabels {
22
+ changed: string;
23
+ added: string;
24
+ removed: string;
25
+ unchanged: string;
26
+ moved: (from: number, to: number) => string;
27
+ missing: (version: string) => string;
28
+ summary: (counts: Record<Exclude<SlideChange, 'unchanged'> | 'moved', number>) => string;
29
+ showUnchanged: (count: number) => string;
30
+ hideUnchanged: string;
31
+ identical: string;
32
+ }
33
+ export declare const SLIDE_COMPARE_LABELS: SlideCompareLabels;
34
+ export interface SlideCompareProps {
35
+ rows: readonly SlideCompareRow[];
36
+ fromLabel: string;
37
+ toLabel: string;
38
+ className?: string | undefined;
39
+ labels?: Partial<SlideCompareLabels> | undefined;
40
+ }
41
+ /**
42
+ * Two versions of a deck compared slide by slide: each slide's older and newer
43
+ * drawings side by side, paired by its id, with a slide one version lacks in
44
+ * its place and an empty side saying so.
45
+ *
46
+ * SAID IN WORDS, NEVER COLOUR ALONE. Every row names what happened to it
47
+ * (Changed, Added, Removed, Moved from 6 to 7) beside a glyph, and the list
48
+ * opens with the count of each, so a reader hears the comparison before they
49
+ * look at it. Unchanged slides are folded away behind one control, since the
50
+ * question was what changed.
51
+ */
52
+ export declare function SlideCompare({ rows, fromLabel, toLabel, className, labels }: SlideCompareProps): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import './SlideCompare.css';
2
+ export { SlideCompare, SLIDE_COMPARE_LABELS } from './SlideCompare.js';
3
+ export type { SlideChange, SlideCompareLabels, SlideCompareProps, SlideCompareRow } from './SlideCompare.js';
@@ -0,0 +1,7 @@
1
+ export { SLIDE_COMPARE_LABELS, SlideCompare } from '../chunk-Z54BPRL6.js';
2
+ import '../chunk-KNLJL3VP.js';
3
+ import '../chunk-OG6CL3EB.js';
4
+ import '../chunk-HMPFGIWM.js';
5
+ import '../chunk-R25RGPUB.js';
6
+ import '../chunk-BZFWDIV6.js';
7
+ import '../chunk-ODEQTPFM.js';