@crewlethq/ui 0.34.1 → 0.35.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 (113) hide show
  1. package/README.md +51 -0
  2. package/dist/AppShell/index.js +2 -2
  3. package/dist/ArtifactBar/ArtifactBar.d.ts +7 -1
  4. package/dist/ArtifactBar/index.d.ts +1 -0
  5. package/dist/ArtifactBar/index.js +4 -14
  6. package/dist/{ArtifactBar-C462VD4C.css → ArtifactBar-HV5AT4RG.css} +39 -2
  7. package/dist/ArtifactCard/ArtifactCard.d.ts +1 -10
  8. package/dist/ArtifactCard/index.d.ts +5 -2
  9. package/dist/ArtifactCard/index.js +3 -2
  10. package/dist/{ArtifactCard-XHRLAL7C.css → ArtifactCard-OGTMO2KI.css} +15 -16
  11. package/dist/ArtifactCover/index.js +2 -14
  12. package/dist/ArtifactIcon/ArtifactIcon.d.ts +1 -1
  13. package/dist/ArtifactIcon/index.js +2 -15
  14. package/dist/ArtifactKindGlyph/ArtifactKindGlyph.d.ts +10 -0
  15. package/dist/ArtifactKindGlyph/index.d.ts +2 -0
  16. package/dist/ArtifactKindGlyph/index.js +1 -0
  17. package/dist/ArtifactKindIllustration/ArtifactKindIllustration.d.ts +15 -2
  18. package/dist/ArtifactKindIllustration/index.d.ts +1 -0
  19. package/dist/ArtifactKindIllustration/index.js +1 -1
  20. package/dist/{ArtifactKindIllustration-4NG6IE3C.css → ArtifactKindIllustration-5FPRJQ3P.css} +32 -26
  21. package/dist/ArtifactKinds-CVD3FCYO.css +15 -0
  22. package/dist/AvatarPicker/index.js +3 -3
  23. package/dist/CanvasBoard/CanvasBoard.d.ts +30 -12
  24. package/dist/CanvasBoard/index.js +1 -1
  25. package/dist/ChangeMark/index.js +2 -2
  26. package/dist/ChoiceList/ChoiceList.d.ts +7 -1
  27. package/dist/ChoiceList/index.js +1 -1
  28. package/dist/{ChoiceList-2PQJS4DX.css → ChoiceList-RBL7FNQL.css} +39 -0
  29. package/dist/CommentThread/index.js +2 -2
  30. package/dist/DataTable/index.js +2 -2
  31. package/dist/DataView/index.js +5 -5
  32. package/dist/DateTimePicker/index.js +2 -2
  33. package/dist/DocTabsEditor/index.js +2 -2
  34. package/dist/{Editor-UUZ7XKCU.js → Editor-BVQHBF7L.js} +4 -4
  35. package/dist/FileDrop/FileDrop.d.ts +64 -0
  36. package/dist/FileDrop/index.d.ts +3 -0
  37. package/dist/FileDrop/index.js +4 -0
  38. package/dist/FileDrop-WE7BNZGV.css +80 -0
  39. package/dist/FindingList/FindingList.d.ts +35 -0
  40. package/dist/FindingList/index.d.ts +3 -0
  41. package/dist/FindingList/index.js +3 -0
  42. package/dist/FindingList-PMYA2R6Q.css +71 -0
  43. package/dist/HuePicker/HuePicker.d.ts +9 -0
  44. package/dist/HuePicker/index.d.ts +1 -1
  45. package/dist/HuePicker/index.js +1 -1
  46. package/dist/Markdown/index.js +1 -1
  47. package/dist/Menu/Menu.d.ts +6 -1
  48. package/dist/Menu/index.js +1 -1
  49. package/dist/OrgTable/index.js +1 -1
  50. package/dist/RichEditor/index.js +3 -3
  51. package/dist/RichEditorMarkdown/index.js +3 -3
  52. package/dist/SheetColumnEditor/SheetColumnEditor.d.ts +94 -0
  53. package/dist/SheetColumnEditor/index.d.ts +3 -0
  54. package/dist/SheetColumnEditor/index.js +23 -0
  55. package/dist/SheetColumnEditor-BO2HKFRB.css +73 -0
  56. package/dist/SheetGrid/SheetGrid.d.ts +19 -1
  57. package/dist/SheetGrid/index.js +5 -4
  58. package/dist/{SheetGrid-GDPCCZ4V.css → SheetGrid-YRDXTIIZ.css} +48 -0
  59. package/dist/SheetModel/index.js +1 -1
  60. package/dist/SheetModel/labels.d.ts +6 -0
  61. package/dist/SlideFilmstrip/SlideFilmstrip.d.ts +30 -1
  62. package/dist/SlideFilmstrip/index.js +5 -1
  63. package/dist/{SlideFilmstrip-5U6Z55GS.css → SlideFilmstrip-4ITZLMO4.css} +49 -0
  64. package/dist/SourceEditor/SourceEditor.d.ts +62 -0
  65. package/dist/SourceEditor/index.d.ts +3 -0
  66. package/dist/SourceEditor/index.js +3 -0
  67. package/dist/SourceEditor-G2C3STPX.css +160 -0
  68. package/dist/ThemeGallery/ThemeGallery.d.ts +10 -3
  69. package/dist/ThemeGallery/index.js +1 -1
  70. package/dist/{ThemeGallery-NITASULQ.css → ThemeGallery-HSUKBDWY.css} +9 -0
  71. package/dist/TimeWindowPicker/index.js +2 -2
  72. package/dist/{chunk-UXXJDIYE.js → chunk-22CQQDFW.js} +1 -1
  73. package/dist/{chunk-E4NNGC6X.js → chunk-3VD3G3IL.js} +2 -2
  74. package/dist/{chunk-EWAFN2IU.js → chunk-5VCG26CV.js} +281 -234
  75. package/dist/{chunk-XTOVADJU.js → chunk-7UYONN6K.js} +7 -18
  76. package/dist/{chunk-CFAJP777.js → chunk-AXBRWRGV.js} +1 -1
  77. package/dist/{chunk-KK5OYNAF.js → chunk-BAKPMH3S.js} +8 -4
  78. package/dist/{chunk-3EB2AV3H.js → chunk-BUVCV3WI.js} +1 -1
  79. package/dist/chunk-CE2THTQR.js +19 -0
  80. package/dist/{chunk-4B6LSFDS.js → chunk-CSQTDGTS.js} +1 -1
  81. package/dist/{chunk-WPX6A5BV.js → chunk-E35CMI5D.js} +22 -6
  82. package/dist/{chunk-EBCHVFCS.js → chunk-FJJHD73S.js} +2 -2
  83. package/dist/{chunk-SGHIAGPR.js → chunk-HAKTRTRP.js} +1 -1
  84. package/dist/{chunk-PLDUNXAO.js → chunk-ILDNJHRU.js} +1 -1
  85. package/dist/chunk-MAD6WPER.js +342 -0
  86. package/dist/{chunk-IUD5VA2Z.js → chunk-NKZCJRKO.js} +10 -5
  87. package/dist/chunk-NTB5LRRD.js +52 -0
  88. package/dist/{chunk-VI5FWDZW.js → chunk-OOMXLJ3S.js} +4 -1
  89. package/dist/{chunk-UOR7TOAU.js → chunk-OSFA5ROT.js} +86 -1
  90. package/dist/{chunk-T46NR3WP.js → chunk-PGZ2R3ON.js} +1 -1
  91. package/dist/chunk-PI7HKLIT.js +245 -0
  92. package/dist/{chunk-YZFLH463.js → chunk-QEFHYUCY.js} +1 -1
  93. package/dist/{chunk-7Q7WDXHG.js → chunk-QFNWMWWY.js} +3 -3
  94. package/dist/{chunk-C7DKX453.js → chunk-QH6VYJ3X.js} +1 -1
  95. package/dist/{chunk-XV32RKQZ.js → chunk-QIXMNOBD.js} +67 -6
  96. package/dist/{chunk-GPHWCK7M.js → chunk-SUXP4OBT.js} +6 -3
  97. package/dist/{chunk-TRQCHF2F.js → chunk-SWD4QBL6.js} +1 -1
  98. package/dist/chunk-THDGBD6Y.js +154 -0
  99. package/dist/{chunk-C2FRTWKO.js → chunk-W3UVOZKL.js} +3 -2
  100. package/dist/{chunk-UDQW6UK7.js → chunk-W7QBBKUE.js} +34 -7
  101. package/dist/{chunk-QBXZLGK2.js → chunk-ZU3DUXD2.js} +3 -2
  102. package/dist/generated/index.d.ts +5 -0
  103. package/dist/generated/index.js +73 -68
  104. package/dist/index.js +73 -68
  105. package/dist/styles.css +652 -51
  106. package/dist/utils/csv.d.ts +35 -0
  107. package/dist/utils/index.d.ts +2 -1
  108. package/dist/utils/index.js +1 -1
  109. package/package.json +3 -3
  110. package/dist/{chunk-YCARLYI6.js → chunk-3WCNHYXE.js} +0 -0
  111. package/dist/{chunk-IYO2N5ZH.js → chunk-6JVRY5DQ.js} +1 -1
  112. package/dist/{chunk-BY4N65PM.js → chunk-73A7D5CE.js} +1 -1
  113. package/dist/{chunk-AORVEG5V.js → chunk-F2KY4RLI.js} +1 -1
@@ -15,10 +15,12 @@
15
15
  * click on a board or a note selects it, a click on the field clears it, and
16
16
  * the pointer is the arrow. Hand (`H`, or Space held) pans whatever is under
17
17
  * the pointer, boards included, with the open hand. An editable canvas that
18
- * can create notes adds Text (`T`) and Sticky (`S`): a click on the field
19
- * places one there, opens it for typing, and hands back the Move tool. The
20
- * pointer is always the tool's (the Canvas cursors), and a pan in progress is
21
- * always the closed hand.
18
+ * can create boards adds Frame (`F`): a click on the field places a board
19
+ * there, selected, and hands back the Move tool. One that can create notes
20
+ * adds Text (`T`) and Sticky (`S`): a click on the field places one there,
21
+ * opens it for typing, and hands back the Move tool. The pointer is always
22
+ * the tool's (the Canvas cursors), and a pan in progress is always the closed
23
+ * hand.
22
24
  *
23
25
  * A PAGE INSIDE A BOARD NEVER TAKES THE CANVAS'S POINTER BY SURPRISE. A live
24
26
  * board is covered by a shield that pans the canvas like the field around it;
@@ -32,7 +34,8 @@
32
34
  * own paper or its handle, retyped on a double-click, and deleted with Delete
33
35
  * while selected. Each finished gesture is reported once, with whole canvas
34
36
  * pixels, and the caller decides what a change is (for a design, a new
35
- * version of its canvas).
37
+ * version of its canvas). Delete removes a selected note, and a selected
38
+ * board where the caller removes boards (`onBoardRemove`).
36
39
  *
37
40
  * HOVER AND SELECTION ARE OUTLINES IN THE ACCENT, at one screen pixel and two,
38
41
  * over a board's own hairline edge; hovering a board's name outlines its board,
@@ -125,18 +128,21 @@ export interface CanvasBoardLabels {
125
128
  /** Each tool's name. */
126
129
  moveTool: string;
127
130
  handTool: string;
131
+ frameTool: string;
128
132
  textTool: string;
129
133
  stickyTool: string;
130
134
  }
131
135
  /**
132
- * The tools a board canvas offers. Move and Hand always; Text and Sticky only
133
- * where a person may edit and the caller places notes (`onNoteCreate`).
136
+ * The tools a board canvas offers. Move and Hand always; Frame only where a
137
+ * person may edit and the caller places boards (`onBoardCreate`), and Text and
138
+ * Sticky only where the caller places notes (`onNoteCreate`).
134
139
  *
135
- * NO FRAME TOOL. A board is a page an agent or an upload made, with a file
136
- * behind it, and an empty frame drawn here would be a board with nothing to
137
- * render. NO COMMENT TOOL until a canvas has comments to anchor.
140
+ * FRAME IS FOR SHAPING A CANVAS BEFORE IT IS DRAWN: a design's create page,
141
+ * where a person lays out the boards an agent then fills. A published design's
142
+ * board is a page with a file behind it, so its viewer offers no Frame. NO
143
+ * COMMENT TOOL until a canvas has comments to anchor.
138
144
  */
139
- export type CanvasBoardTool = 'move' | 'hand' | 'text' | 'sticky';
145
+ export type CanvasBoardTool = 'move' | 'hand' | 'frame' | 'text' | 'sticky';
140
146
  /**
141
147
  * The smallest zoom a board canvas fits at. A design laid out across many
142
148
  * full-size pages is many screens wide, and every board has to be on screen
@@ -166,6 +172,18 @@ export interface CanvasBoardProps {
166
172
  onNoteChange?: ((note: CanvasBoardNote) => void) | undefined;
167
173
  /** A note was deleted. */
168
174
  onNoteRemove?: ((id: string) => void) | undefined;
175
+ /**
176
+ * The Frame tool placed a board at a canvas point (its top left, in canvas
177
+ * pixels). The caller adds the board, with whatever size and name it gives
178
+ * new boards, and returns its id, which the canvas then selects. Absent, or
179
+ * on a canvas that is not editable, the tool is not offered.
180
+ */
181
+ onBoardCreate?: ((at: CanvasPoint) => string | undefined) | undefined;
182
+ /**
183
+ * Delete pressed on a selected board. Absent, a board is not deleted from
184
+ * the canvas.
185
+ */
186
+ onBoardRemove?: ((id: string) => void) | undefined;
169
187
  /**
170
188
  * The Text or Sticky tool placed a note at a canvas point (its top left, in
171
189
  * canvas pixels). The caller adds the note, with whatever size and starting
@@ -212,4 +230,4 @@ export declare function boardRoom(width: number, height: number): {
212
230
  };
213
231
  /** The narrowest a board is drawn, in screen pixels, with its name above it. */
214
232
  export declare const BOARD_TITLE_MIN_WIDTH = 40;
215
- export declare function CanvasBoard({ label, boards, notes, renderBoard, maxLive, minLiveWidth, editable, minSide, maxSide, onBoardChange, onNoteChange, onNoteRemove, onNoteCreate, onOpen, onActivate, selected: heldSelection, onSelectedChange, controlsExtra, toolbar, labels, canvasLabels, canvasRef, className, }: CanvasBoardProps): import("react").JSX.Element;
233
+ export declare function CanvasBoard({ label, boards, notes, renderBoard, maxLive, minLiveWidth, editable, minSide, maxSide, onBoardChange, onNoteChange, onNoteRemove, onNoteCreate, onBoardCreate, onBoardRemove, onOpen, onActivate, selected: heldSelection, onSelectedChange, controlsExtra, toolbar, labels, canvasLabels, canvasRef, className, }: CanvasBoardProps): import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- export { BOARD_TITLE_MIN_WIDTH, CANVAS_BOARD_MAX_LIVE, CANVAS_BOARD_MIN_LIVE_WIDTH, CANVAS_BOARD_MIN_ZOOM, CANVAS_NOTE_COLORS, CanvasBoard, TITLE_GLYPH_EM, boardRoom, liveBoards, titleSize } from '../chunk-WPX6A5BV.js';
1
+ export { BOARD_TITLE_MIN_WIDTH, CANVAS_BOARD_MAX_LIVE, CANVAS_BOARD_MIN_LIVE_WIDTH, CANVAS_BOARD_MIN_ZOOM, CANVAS_NOTE_COLORS, CanvasBoard, TITLE_GLYPH_EM, boardRoom, liveBoards, titleSize } from '../chunk-E35CMI5D.js';
2
2
  import '../chunk-5SZGKSGL.js';
3
3
  import '../chunk-3Y56GQPM.js';
4
4
  import '../chunk-PGRPNDWM.js';
@@ -1,5 +1,5 @@
1
- export { ChangeMark } from '../chunk-SGHIAGPR.js';
2
- import '../chunk-VI5FWDZW.js';
1
+ export { ChangeMark } from '../chunk-HAKTRTRP.js';
2
+ import '../chunk-OOMXLJ3S.js';
3
3
  import '../chunk-Z7JYG5TF.js';
4
4
  import '../chunk-AYKXMIOR.js';
5
5
  import '../chunk-6ZJ3N7QI.js';
@@ -5,6 +5,11 @@ export interface ChoiceListOption {
5
5
  value: string;
6
6
  /** What the choice is, in a few words. */
7
7
  label: ReactNode;
8
+ /**
9
+ * A picture of the choice, drawn between the radio and the words: an
10
+ * agent's character, a kind's glyph. Decorative; the label names it.
11
+ */
12
+ media?: ReactNode;
8
13
  /** One line under the label saying what choosing it means. */
9
14
  detail?: ReactNode;
10
15
  /** A short word at the row's end, such as "Recommended". */
@@ -34,7 +39,8 @@ export interface ChoiceListProps {
34
39
  }
35
40
  /**
36
41
  * One answer from a short list, each choice a row with its label, a line of
37
- * detail and an optional tag, in one bordered box.
42
+ * detail, an optional picture (`media`) and an optional tag, in one bordered
43
+ * box.
38
44
  *
39
45
  * NATIVE RADIOS, so the arrow keys move the choice and Tab leaves the group as
40
46
  * the platform does, and every row is its radio's label, so the whole row
@@ -1,2 +1,2 @@
1
- export { ChoiceList } from '../chunk-QBXZLGK2.js';
1
+ export { ChoiceList } from '../chunk-ZU3DUXD2.js';
2
2
  import '../chunk-ODEQTPFM.js';
@@ -4,6 +4,8 @@
4
4
  * accent's soft fill, so the answer reads at a glance without the radio.
5
5
  */
6
6
  .crewlet-choice-list {
7
+ /* The platform's radio, sized here so a panel can line up with the text beside it. */
8
+ --crewlet-choice-list-radio-size: 13px;
7
9
  display: grid;
8
10
  gap: var(--spacing-1);
9
11
  padding: var(--spacing-1);
@@ -43,6 +45,22 @@
43
45
  transition: background-color var(--motion-duration-fast) var(--motion-easing-default);
44
46
  }
45
47
 
48
+ /* A choice with a picture: the radio, the picture, the words, the tag. The
49
+ picture centres on the label and its detail together. */
50
+ .crewlet-choice-list__row.has-media {
51
+ grid-template-columns: auto auto minmax(0, 1fr) auto;
52
+ align-items: center;
53
+ }
54
+
55
+ .crewlet-choice-list__row.has-media .crewlet-choice-list__radio {
56
+ margin-top: 0;
57
+ }
58
+
59
+ .crewlet-choice-list__media {
60
+ display: inline-flex;
61
+ flex: none;
62
+ }
63
+
46
64
  .crewlet-choice-list__row:hover {
47
65
  background: var(--color-surface-hover);
48
66
  }
@@ -56,6 +74,8 @@
56
74
  }
57
75
 
58
76
  .crewlet-choice-list__radio {
77
+ width: var(--crewlet-choice-list-radio-size);
78
+ height: var(--crewlet-choice-list-radio-size);
59
79
  margin: 3px 0 0;
60
80
  accent-color: var(--color-brand-accent);
61
81
  cursor: inherit;
@@ -95,6 +115,25 @@
95
115
  white-space: nowrap;
96
116
  }
97
117
 
118
+ /* A SELECTED CHOICE'S PANEL is part of the choice: it continues the row's
119
+ fill under it, and its content starts where the label does, not under the
120
+ radio. */
121
+ .crewlet-choice-list__item:has(> .crewlet-choice-list__panel) {
122
+ gap: 0;
123
+ }
124
+
125
+ .crewlet-choice-list__item:has(> .crewlet-choice-list__panel) > .crewlet-choice-list__row {
126
+ border-end-start-radius: 0;
127
+ border-end-end-radius: 0;
128
+ }
129
+
130
+ .crewlet-choice-list__panel {
131
+ padding: var(--spacing-1) var(--spacing-2) var(--spacing-3) calc(var(--spacing-2) + var(--crewlet-choice-list-radio-size) + var(--spacing-3));
132
+ border-end-start-radius: var(--radius-sm);
133
+ border-end-end-radius: var(--radius-sm);
134
+ background: var(--color-brand-accent-soft);
135
+ }
136
+
98
137
  .crewlet-choice-list__footer {
99
138
  display: flex;
100
139
  justify-content: flex-end;
@@ -1,13 +1,13 @@
1
- export { COMMENT_THREAD_LABELS, CommentThread } from '../chunk-IYO2N5ZH.js';
1
+ export { COMMENT_THREAD_LABELS, CommentThread } from '../chunk-6JVRY5DQ.js';
2
2
  import '../chunk-7DZDSSJS.js';
3
3
  import '../chunk-6QFAK2WV.js';
4
4
  import '../chunk-SMBKXWML.js';
5
- import '../chunk-TYKQ33CL.js';
6
5
  import '../chunk-CI3VPIJN.js';
7
6
  import '../chunk-3CZ7XAVY.js';
8
7
  import '../chunk-EUCC37WY.js';
9
8
  import '../chunk-5AQBPHZD.js';
10
9
  import '../chunk-PZKHBB7D.js';
10
+ import '../chunk-TYKQ33CL.js';
11
11
  import '../chunk-BHHIIK3M.js';
12
12
  import '../chunk-PQADV6P6.js';
13
13
  import '../chunk-OG6CL3EB.js';
@@ -1,4 +1,4 @@
1
- export { ALL_ITEMS, CopyableCell, DATA_TABLE_LABELS, DataTable, RowActionsMenu } from '../chunk-UXXJDIYE.js';
1
+ export { ALL_ITEMS, CopyableCell, DATA_TABLE_LABELS, DataTable, RowActionsMenu } from '../chunk-22CQQDFW.js';
2
2
  import '../chunk-STJ7QBC3.js';
3
3
  import '../chunk-DTIW4CHZ.js';
4
4
  import '../chunk-XEGZHHRH.js';
@@ -7,7 +7,7 @@ import '../chunk-6QFAK2WV.js';
7
7
  import '../chunk-EUCC37WY.js';
8
8
  import '../chunk-AV2DXAEL.js';
9
9
  import '../chunk-PQADV6P6.js';
10
- import '../chunk-3EB2AV3H.js';
10
+ import '../chunk-BUVCV3WI.js';
11
11
  import '../chunk-OMV5W53A.js';
12
12
  import '../chunk-R25RGPUB.js';
13
13
  import '../chunk-OG6CL3EB.js';
@@ -1,14 +1,14 @@
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-7Q7WDXHG.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-QFNWMWWY.js';
2
2
  import '../chunk-HOXGBLEY.js';
3
- import '../chunk-BY4N65PM.js';
4
- import '../chunk-UXXJDIYE.js';
3
+ import '../chunk-22CQQDFW.js';
4
+ import '../chunk-73A7D5CE.js';
5
5
  import '../chunk-STJ7QBC3.js';
6
6
  import '../chunk-DTIW4CHZ.js';
7
7
  import '../chunk-XEGZHHRH.js';
8
8
  import '../chunk-F73MC7EZ.js';
9
+ import '../chunk-GXQ3B46I.js';
9
10
  import '../chunk-PGRPNDWM.js';
10
11
  import '../chunk-K3IJQNB7.js';
11
- import '../chunk-GXQ3B46I.js';
12
12
  import '../chunk-CPEPST4S.js';
13
13
  import '../chunk-6QFAK2WV.js';
14
14
  import '../chunk-SMBKXWML.js';
@@ -17,7 +17,7 @@ import '../chunk-EUCC37WY.js';
17
17
  import '../chunk-AV2DXAEL.js';
18
18
  import '../chunk-BHHIIK3M.js';
19
19
  import '../chunk-PQADV6P6.js';
20
- import '../chunk-3EB2AV3H.js';
20
+ import '../chunk-BUVCV3WI.js';
21
21
  import '../chunk-OMV5W53A.js';
22
22
  import '../chunk-R25RGPUB.js';
23
23
  import '../chunk-OG6CL3EB.js';
@@ -1,6 +1,6 @@
1
- export { DEFAULT_DATE_TIME_PICKER_LABELS, DateTimePicker } from '../chunk-BY4N65PM.js';
2
- import '../chunk-K3IJQNB7.js';
1
+ export { DEFAULT_DATE_TIME_PICKER_LABELS, DateTimePicker } from '../chunk-73A7D5CE.js';
3
2
  import '../chunk-GXQ3B46I.js';
3
+ import '../chunk-K3IJQNB7.js';
4
4
  import '../chunk-OMV5W53A.js';
5
5
  import '../chunk-R25RGPUB.js';
6
6
  import '../chunk-OG6CL3EB.js';
@@ -1,8 +1,8 @@
1
- export { DOC_TABS_EDITOR_LABELS, DocTabsEditor } from '../chunk-YZFLH463.js';
1
+ export { DOC_TABS_EDITOR_LABELS, DocTabsEditor } from '../chunk-QEFHYUCY.js';
2
2
  import '../chunk-XJ2QEBMM.js';
3
3
  import '../chunk-6QFAK2WV.js';
4
4
  import '../chunk-PQADV6P6.js';
5
- import '../chunk-3EB2AV3H.js';
5
+ import '../chunk-BUVCV3WI.js';
6
6
  import '../chunk-OMV5W53A.js';
7
7
  import '../chunk-R25RGPUB.js';
8
8
  import '../chunk-OG6CL3EB.js';
@@ -1,10 +1,10 @@
1
- import { richEditorLabels } from './chunk-4B6LSFDS.js';
2
- import { schema, readMarkdown, writeMarkdown } from './chunk-C7DKX453.js';
3
- import { safeHref, MARKDOWN_CALLOUT_TONES } from './chunk-KK5OYNAF.js';
1
+ import { richEditorLabels } from './chunk-CSQTDGTS.js';
2
+ import { schema, readMarkdown, writeMarkdown } from './chunk-QH6VYJ3X.js';
3
+ import { safeHref, MARKDOWN_CALLOUT_TONES } from './chunk-BAKPMH3S.js';
4
4
  import { Toolbar } from './chunk-PGRPNDWM.js';
5
5
  import { FormField, Input } from './chunk-6QFAK2WV.js';
6
6
  import './chunk-PQADV6P6.js';
7
- import { Menu } from './chunk-3EB2AV3H.js';
7
+ import { Menu } from './chunk-BUVCV3WI.js';
8
8
  import { placePopup, viewportBounds } from './chunk-OMV5W53A.js';
9
9
  import { usePopupLayer } from './chunk-R25RGPUB.js';
10
10
  import { Button } from './chunk-OG6CL3EB.js';
@@ -0,0 +1,64 @@
1
+ import { type HTMLAttributes, type ReactNode } from "react";
2
+ import { type ButtonProps } from "../Button/index.js";
3
+ /** A file the person brought, and where it sits in what they brought. */
4
+ export interface PickedFile {
5
+ /**
6
+ * Its path inside what was brought, with forward slashes: the file's name
7
+ * alone for loose files, `site/css/main.css` for a file inside a folder.
8
+ */
9
+ path: string;
10
+ file: File;
11
+ }
12
+ /**
13
+ * The files a drop carries, folders walked. Read from the entries API where the
14
+ * browser offers it (the only way a dropped folder's contents are reachable),
15
+ * else from the drop's flat file list.
16
+ */
17
+ export declare function droppedFiles(data: DataTransfer): Promise<PickedFile[]>;
18
+ /** The files an input picked, under their folder path when a folder was picked. */
19
+ export declare function pickedFiles(list: FileList | null): PickedFile[];
20
+ export interface FilePickButtonProps extends Omit<ButtonProps, "onClick" | "children"> {
21
+ onFiles: (files: PickedFile[]) => void;
22
+ /** File types the picker offers, as the input's `accept` takes them. */
23
+ accept?: string | undefined;
24
+ /** Pick a whole folder rather than files. */
25
+ directory?: boolean;
26
+ /** Allow more than one file. Ignored for a folder, which is always many. */
27
+ multiple?: boolean;
28
+ children: ReactNode;
29
+ }
30
+ /**
31
+ * A button that opens the system's file picker: the keyboard's and the
32
+ * screen reader's way to bring files, always offered beside a drop target.
33
+ */
34
+ export declare const FilePickButton: import("react").ForwardRefExoticComponent<FilePickButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
35
+ export interface FileDropProps extends Omit<HTMLAttributes<HTMLDivElement>, "onDrop" | "title"> {
36
+ onFiles: (files: PickedFile[]) => void;
37
+ /**
38
+ * The region the files may be dropped on. Without it, the primitive draws
39
+ * its own target: a framed area holding `title`, `hint` and `actions`.
40
+ */
41
+ children?: ReactNode;
42
+ /** The target's heading, and what the overlay says while files are over it. */
43
+ title: ReactNode;
44
+ /** One line under the title: what may be brought. */
45
+ hint?: ReactNode;
46
+ /** The pickers, usually one or two `FilePickButton`s. Drawn in the target. */
47
+ actions?: ReactNode;
48
+ disabled?: boolean;
49
+ }
50
+ /**
51
+ * Where files are dropped: a target of its own, or any region (an editor, a
52
+ * pane) that takes files dropped on it, with an overlay saying so while files
53
+ * are held over it. Folders are walked.
54
+ *
55
+ * DROPPING IS NEVER THE ONLY WAY. A drop is a pointer gesture, so the target
56
+ * always carries a picker (`actions`, with `FilePickButton`), and a region
57
+ * that wraps content is expected to offer one nearby. The overlay is hidden
58
+ * from assistive technology; the consumer announces what arrived.
59
+ *
60
+ * A DRAG THAT IS NOT FILES (text being moved inside an editor) passes through
61
+ * untouched, and the overlay is counted in and out per element so a drag
62
+ * crossing children does not flicker it.
63
+ */
64
+ export declare const FileDrop: import("react").ForwardRefExoticComponent<FileDropProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,3 @@
1
+ import "./FileDrop.css";
2
+ export { FileDrop, FilePickButton, droppedFiles, pickedFiles, } from "./FileDrop.js";
3
+ export type { FileDropProps, FilePickButtonProps, PickedFile, } from "./FileDrop.js";
@@ -0,0 +1,4 @@
1
+ export { FileDrop, FilePickButton, droppedFiles, pickedFiles } from '../chunk-THDGBD6Y.js';
2
+ import '../chunk-OG6CL3EB.js';
3
+ import '../chunk-BZFWDIV6.js';
4
+ import '../chunk-ODEQTPFM.js';
@@ -0,0 +1,80 @@
1
+ /*
2
+ * Where files are dropped. A target of its own is a dashed, quiet area with a
3
+ * heading, a hint and the pickers; a region wrapping content draws nothing
4
+ * until files are held over it, then an accent overlay saying what dropping
5
+ * does. The overlay takes no pointer, so the drop lands on the region.
6
+ */
7
+ .crewlet-file-drop {
8
+ position: relative;
9
+ min-width: 0;
10
+ }
11
+
12
+ .crewlet-file-drop.is-target {
13
+ display: grid;
14
+ justify-items: center;
15
+ gap: var(--spacing-1);
16
+ padding: var(--spacing-6) var(--spacing-4);
17
+ border: 1px dashed var(--color-border-strong);
18
+ border-radius: var(--radius-md);
19
+ background: var(--color-surface-subtle);
20
+ text-align: center;
21
+ transition:
22
+ border-color var(--motion-duration-fast) var(--motion-easing-default),
23
+ background-color var(--motion-duration-fast) var(--motion-easing-default);
24
+ }
25
+
26
+ .crewlet-file-drop.is-target.is-over {
27
+ border-color: var(--color-brand-accent);
28
+ background: var(--color-brand-accent-soft);
29
+ }
30
+
31
+ .crewlet-file-drop.is-disabled {
32
+ opacity: 0.6;
33
+ }
34
+
35
+ .crewlet-file-drop__title {
36
+ font-size: var(--font-size-sm);
37
+ font-weight: var(--font-weight-medium);
38
+ color: var(--color-text-primary);
39
+ }
40
+
41
+ .crewlet-file-drop__hint {
42
+ font-size: var(--font-size-xs);
43
+ color: var(--color-text-tertiary);
44
+ }
45
+
46
+ .crewlet-file-drop__actions {
47
+ display: flex;
48
+ flex-wrap: wrap;
49
+ justify-content: center;
50
+ gap: var(--spacing-2);
51
+ margin-top: var(--spacing-2);
52
+ }
53
+
54
+ .crewlet-file-drop__overlay {
55
+ position: absolute;
56
+ inset: 0;
57
+ z-index: 1;
58
+ display: grid;
59
+ place-content: center;
60
+ justify-items: center;
61
+ gap: var(--spacing-1);
62
+ border: 1px dashed var(--color-brand-accent);
63
+ border-radius: var(--radius-md);
64
+ /* Floats over the region's content, so it takes the frosted ground. */
65
+ background: var(--color-surface-glass);
66
+ backdrop-filter: blur(var(--blur-sm));
67
+ pointer-events: none;
68
+ text-align: center;
69
+ }
70
+
71
+ /* The input the picker opens is never drawn or reached: the button is. */
72
+ .crewlet-file-drop__input {
73
+ display: none;
74
+ }
75
+
76
+ @media (prefers-reduced-motion: reduce) {
77
+ .crewlet-file-drop.is-target {
78
+ transition: none;
79
+ }
80
+ }
@@ -0,0 +1,35 @@
1
+ import type { ReactNode } from "react";
2
+ /** How a finding reads: something that refuses, or advice. */
3
+ export type FindingTone = "danger" | "warning";
4
+ /** One thing a checker found. */
5
+ export interface Finding {
6
+ /** Stable identity within the list. */
7
+ key: string;
8
+ tone: FindingTone;
9
+ /** Where it is, as a reader names it: `index.html, line 6`. */
10
+ location?: ReactNode;
11
+ /** What is wrong, as a sentence. */
12
+ message: ReactNode;
13
+ /**
14
+ * Take the reader to it (an editor's line). With it the row is a button;
15
+ * without it, text.
16
+ */
17
+ onSelect?: (() => void) | undefined;
18
+ }
19
+ export interface FindingListProps {
20
+ findings: readonly Finding[];
21
+ /** Names the list for a screen reader: "Problems in the page". */
22
+ label: string;
23
+ /** What each tone is called to a screen reader, before the message. */
24
+ toneLabels?: Partial<Record<FindingTone, string>> | undefined;
25
+ className?: string | undefined;
26
+ }
27
+ /**
28
+ * What a checker found, one row each: its tone's glyph in its ink, where it is
29
+ * and what is wrong. Refusals first, then advice, each in the order given.
30
+ *
31
+ * A ROW THAT GOES SOMEWHERE IS A BUTTON, so a keyboard walks the findings with
32
+ * Tab and Enter takes it to the line, as a pointer does. The tone is said in
33
+ * words before the message, since a glyph's colour is not a word.
34
+ */
35
+ export declare function FindingList({ findings, label, toneLabels, className, }: FindingListProps): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import "./FindingList.css";
2
+ export { FindingList } from "./FindingList.js";
3
+ export type { Finding, FindingListProps, FindingTone } from "./FindingList.js";
@@ -0,0 +1,3 @@
1
+ export { FindingList } from '../chunk-NTB5LRRD.js';
2
+ import '../chunk-BZFWDIV6.js';
3
+ import '../chunk-ODEQTPFM.js';
@@ -0,0 +1,71 @@
1
+ /*
2
+ * What a checker found: a quiet list, one row each, the tone's glyph in its
3
+ * ink, the location in mono over the sentence. A row that goes somewhere takes
4
+ * the hover ground and the focus ring as a whole.
5
+ */
6
+ .crewlet-finding-list {
7
+ display: grid;
8
+ margin: 0;
9
+ padding: 0;
10
+ list-style: none;
11
+ }
12
+
13
+ .crewlet-finding-list__row {
14
+ display: grid;
15
+ grid-template-columns: auto minmax(0, 1fr);
16
+ gap: var(--spacing-2);
17
+ align-items: start;
18
+ width: 100%;
19
+ padding: var(--spacing-2);
20
+ border: 0;
21
+ border-radius: var(--radius-sm);
22
+ background: transparent;
23
+ color: var(--color-text-primary);
24
+ font: inherit;
25
+ text-align: start;
26
+ }
27
+
28
+ button.crewlet-finding-list__row {
29
+ cursor: pointer;
30
+ }
31
+
32
+ button.crewlet-finding-list__row:hover {
33
+ background: var(--color-surface-hover);
34
+ }
35
+
36
+ button.crewlet-finding-list__row:focus-visible {
37
+ outline: 2px solid var(--color-focus);
38
+ outline-offset: -2px;
39
+ }
40
+
41
+ .crewlet-finding-list__glyph {
42
+ display: inline-flex;
43
+ padding-top: 2px;
44
+ }
45
+
46
+ .crewlet-finding-list__glyph.is-danger {
47
+ color: var(--color-feedback-danger-ink);
48
+ }
49
+
50
+ .crewlet-finding-list__glyph.is-warning {
51
+ color: var(--color-feedback-warning-ink);
52
+ }
53
+
54
+ .crewlet-finding-list__text {
55
+ display: grid;
56
+ gap: 2px;
57
+ min-width: 0;
58
+ }
59
+
60
+ .crewlet-finding-list__location {
61
+ font-family: var(--font-family-mono);
62
+ font-size: var(--font-size-2xs);
63
+ color: var(--color-text-tertiary);
64
+ overflow-wrap: anywhere;
65
+ }
66
+
67
+ .crewlet-finding-list__message {
68
+ font-size: var(--font-size-sm);
69
+ line-height: var(--font-line-height-normal);
70
+ overflow-wrap: anywhere;
71
+ }
@@ -21,6 +21,15 @@ export type HuePickerProps = HuePickerBase & ({
21
21
  value: NodeHue | 'none';
22
22
  onValueChange: (hue: NodeHue | 'none') => void;
23
23
  });
24
+ /**
25
+ * A hue's swatch, a dot in the hue, or the hairline ring of no hue: what a
26
+ * hue picker, a hue menu or a list of coloured choices draws beside a name.
27
+ * Decorative: the name beside it carries the hue.
28
+ */
29
+ export declare function HueSwatch({ hue, className }: {
30
+ hue: NodeHue | 'none';
31
+ className?: string | undefined;
32
+ }): import("react").JSX.Element;
24
33
  /**
25
34
  * The choice of an entity's hue: the six node hues as a row of chips, each a
26
35
  * swatch and the hue's name.
@@ -1,3 +1,3 @@
1
1
  import './HuePicker.css';
2
- export { HuePicker } from './HuePicker.js';
2
+ export { HuePicker, HueSwatch } from './HuePicker.js';
3
3
  export type { HuePickerProps } from './HuePicker.js';
@@ -1,5 +1,5 @@
1
1
  import '../chunk-FFMCMSJB.js';
2
- export { HuePicker } from '../chunk-GPHWCK7M.js';
2
+ export { HuePicker, HueSwatch } from '../chunk-SUXP4OBT.js';
3
3
  import '../chunk-AYKXMIOR.js';
4
4
  import '../chunk-CCAXYHQS.js';
5
5
  import '../chunk-VL6CUNSX.js';
@@ -1 +1 @@
1
- export { MARKDOWN_CALLOUT_NAMES, MARKDOWN_CALLOUT_TONES, markdownBreaks, markdownClosesFence, markdownCodeText, markdownFenceOf, markdownHeadingOf, markdownInline, markdownLines, parseMarkdown, parseMarkdownSpans, safeHref } from '../chunk-KK5OYNAF.js';
1
+ export { MARKDOWN_CALLOUT_NAMES, MARKDOWN_CALLOUT_TONES, markdownBreaks, markdownClosesFence, markdownCodeText, markdownFenceOf, markdownHeadingOf, markdownInline, markdownLines, parseMarkdown, parseMarkdownSpans, safeHref } from '../chunk-BAKPMH3S.js';
@@ -122,7 +122,12 @@ export interface MenuTriggerProps {
122
122
  onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
123
123
  }
124
124
  export interface MenuProps {
125
- /** The trigger's accessible name, such as "Actions for Software Engineer". */
125
+ /**
126
+ * The trigger's accessible name, such as "Actions for Software Engineer".
127
+ * It names a text trigger too, so "New" can be announced as "New artifact":
128
+ * keep the trigger's visible words in it, so a person who speaks what they
129
+ * see still reaches the button.
130
+ */
126
131
  label: string;
127
132
  items: readonly MenuEntry[];
128
133
  /** The trigger's glyph, when it has no visible text. */
@@ -1,4 +1,4 @@
1
- export { Menu } from '../chunk-3EB2AV3H.js';
1
+ export { Menu } from '../chunk-BUVCV3WI.js';
2
2
  import '../chunk-OMV5W53A.js';
3
3
  import '../chunk-R25RGPUB.js';
4
4
  import '../chunk-OG6CL3EB.js';
@@ -5,9 +5,9 @@ import '../chunk-ONQKKHON.js';
5
5
  import '../chunk-LM3ISVJA.js';
6
6
  import '../chunk-5AQBPHZD.js';
7
7
  import '../chunk-PZKHBB7D.js';
8
+ import '../chunk-TROLVEZY.js';
8
9
  import '../chunk-OMV5W53A.js';
9
10
  import '../chunk-R25RGPUB.js';
10
- import '../chunk-TROLVEZY.js';
11
11
  import '../chunk-4FQT6ZAY.js';
12
12
  import '../chunk-BZFWDIV6.js';
13
13
  import '../chunk-ODEQTPFM.js';
@@ -1,6 +1,6 @@
1
- export { RichEditor, preloadRichEditor } from '../chunk-E4NNGC6X.js';
2
- export { RICH_EDITOR_LABELS, richEditorLabels } from '../chunk-4B6LSFDS.js';
3
- import '../chunk-KK5OYNAF.js';
1
+ export { RichEditor, preloadRichEditor } from '../chunk-3VD3G3IL.js';
2
+ export { RICH_EDITOR_LABELS, richEditorLabels } from '../chunk-CSQTDGTS.js';
3
+ import '../chunk-BAKPMH3S.js';
4
4
  import '../chunk-SZZRIHGT.js';
5
5
  import '../chunk-TEUQWOWZ.js';
6
6
  import '../chunk-OG6CL3EB.js';
@@ -1,3 +1,3 @@
1
- export { canonicalMarkdown, roundTripMarkdown } from '../chunk-TRQCHF2F.js';
2
- import '../chunk-C7DKX453.js';
3
- import '../chunk-KK5OYNAF.js';
1
+ export { canonicalMarkdown, roundTripMarkdown } from '../chunk-SWD4QBL6.js';
2
+ import '../chunk-QH6VYJ3X.js';
3
+ import '../chunk-BAKPMH3S.js';