@crewlethq/ui 0.180.0 → 0.181.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 (127) hide show
  1. package/README.md +48 -2
  2. package/dist/AgentHandoffPanel/index.js +4 -4
  3. package/dist/AgentIdentity/index.js +11 -5
  4. package/dist/ArrangeFrame/index.js +2 -2
  5. package/dist/ArrangeList/index.js +4 -4
  6. package/dist/ArtifactCard/index.js +4 -4
  7. package/dist/AssignmentList/AssignmentList.d.ts +63 -0
  8. package/dist/AssignmentList/index.d.ts +3 -0
  9. package/dist/AssignmentList/index.js +8 -0
  10. package/dist/AssignmentList-JIUZFZGQ.css +257 -0
  11. package/dist/ChangeList/ChangeGroups.d.ts +28 -0
  12. package/dist/ChangeList/ChangeList.d.ts +18 -1
  13. package/dist/ChangeList/index.d.ts +2 -0
  14. package/dist/ChangeList/index.js +11 -1
  15. package/dist/{ChangeList-R4UZBGU5.css → ChangeList-2VAPZDT3.css} +99 -0
  16. package/dist/CheckGrid/index.js +4 -4
  17. package/dist/Checkbox/index.js +3 -3
  18. package/dist/ChipField/index.js +2 -2
  19. package/dist/ColorField/index.js +3 -3
  20. package/dist/Combobox/index.js +3 -3
  21. package/dist/CommandPalette/index.js +16 -4
  22. package/dist/CommentThread/index.js +4 -4
  23. package/dist/Composer/index.js +3 -3
  24. package/dist/ConfirmField/index.js +3 -3
  25. package/dist/ConfirmModal-V2OAWUGJ.css +14 -0
  26. package/dist/ConsequenceList/ConsequenceList.d.ts +63 -0
  27. package/dist/ConsequenceList/index.d.ts +3 -0
  28. package/dist/ConsequenceList/index.js +23 -0
  29. package/dist/ConsequenceList-5TXFZPMG.css +68 -0
  30. package/dist/ContrastHelp/index.js +1 -1
  31. package/dist/DataGrid/index.js +4 -4
  32. package/dist/DataTable/index.js +17 -5
  33. package/dist/DataView/index.js +19 -8
  34. package/dist/DateTimePicker/index.js +2 -2
  35. package/dist/DocTabsEditor/index.js +3 -3
  36. package/dist/DurationField/index.js +4 -4
  37. package/dist/{Editor-N3HLIXHX.js → Editor-ANVKGFJ6.js} +2 -2
  38. package/dist/EmojiPicker/index.js +3 -3
  39. package/dist/GraphCanvas/index.js +2 -2
  40. package/dist/InboxList/index.js +2 -2
  41. package/dist/Input/index.js +2 -2
  42. package/dist/KeyValueRows/index.js +3 -3
  43. package/dist/LinkInterstitial/index.js +20 -3
  44. package/dist/ListInput/index.js +3 -3
  45. package/dist/MemberPicker/index.js +4 -4
  46. package/dist/MessageActions/index.js +4 -4
  47. package/dist/Modal/ConfirmModal.d.ts +35 -2
  48. package/dist/Modal/index.d.ts +1 -0
  49. package/dist/Modal/index.js +20 -1
  50. package/dist/MoneyField/index.js +3 -3
  51. package/dist/NumberField/index.js +3 -3
  52. package/dist/OrgTable/index.js +6 -6
  53. package/dist/PrincipalPicker/index.js +4 -4
  54. package/dist/ProposalCard/index.js +8 -8
  55. package/dist/RailList/index.js +1 -1
  56. package/dist/ReactionBar/index.js +4 -4
  57. package/dist/RichEditor/index.js +1 -1
  58. package/dist/ScopeList/index.js +4 -4
  59. package/dist/SelectionBar/index.js +2 -2
  60. package/dist/SettingForm/index.js +3 -3
  61. package/dist/ShareDialog/index.js +20 -3
  62. package/dist/SheetColumnEditor/index.js +4 -4
  63. package/dist/SheetGrid/index.js +1 -1
  64. package/dist/SlideFilmstrip/index.js +1 -1
  65. package/dist/Switcher/index.js +17 -5
  66. package/dist/TagsInput/index.js +2 -2
  67. package/dist/TimeRangePicker/index.js +15 -4
  68. package/dist/TimeWindowPicker/index.js +4 -4
  69. package/dist/TreeGrid/index.js +5 -5
  70. package/dist/ValueField/index.js +4 -4
  71. package/dist/{chunk-PL4YO2KU.js → chunk-2V4QQ4NB.js} +2 -2
  72. package/dist/{chunk-U32DZ6Q4.js → chunk-2XKPQBAX.js} +1 -1
  73. package/dist/{chunk-NJCF4FUM.js → chunk-3WJCTKUH.js} +2 -2
  74. package/dist/{chunk-SKDMFJZD.js → chunk-3ZMDQUFO.js} +1 -1
  75. package/dist/{chunk-BIOS7CQN.js → chunk-5WPNDMMI.js} +1 -1
  76. package/dist/{chunk-PCS2ZEIM.js → chunk-AXKB6RKG.js} +4 -4
  77. package/dist/{chunk-FC225TSK.js → chunk-BEYMQKP3.js} +33 -2
  78. package/dist/{chunk-5KUJWSPT.js → chunk-CVKCSJ5F.js} +1 -1
  79. package/dist/{chunk-SN2FN2XW.js → chunk-D54HL3AN.js} +103 -14
  80. package/dist/{chunk-BFYADGPT.js → chunk-DJXY65LN.js} +2 -2
  81. package/dist/{chunk-NC4CT5D3.js → chunk-DKXMP3LN.js} +1 -1
  82. package/dist/{chunk-5MRK6I7V.js → chunk-FF2YPFIZ.js} +1 -1
  83. package/dist/{chunk-VDJJSZ6N.js → chunk-G5W5ZLIL.js} +1 -1
  84. package/dist/{chunk-7PLFR7AF.js → chunk-G7YITKUF.js} +2 -2
  85. package/dist/{chunk-TTN5QKIV.js → chunk-H36ZMY4G.js} +1 -1
  86. package/dist/{chunk-HHQFTPHY.js → chunk-H6NPUCDU.js} +2 -2
  87. package/dist/{chunk-W6NSF6E2.js → chunk-H7L4ZEVN.js} +1 -1
  88. package/dist/{chunk-KYW3GH2W.js → chunk-IUCQ5WOX.js} +1 -1
  89. package/dist/{chunk-PZ6CR4F2.js → chunk-J66BRPSY.js} +2 -2
  90. package/dist/{chunk-QXKPMRUG.js → chunk-JLUXCPKS.js} +2 -2
  91. package/dist/{chunk-ZMY5F3SF.js → chunk-JLZ37UFI.js} +2 -2
  92. package/dist/{chunk-MQJQVEFQ.js → chunk-JZN5VTHT.js} +1 -1
  93. package/dist/{chunk-MVSR3KE6.js → chunk-KHELXOOP.js} +1 -1
  94. package/dist/{chunk-65ACQRWE.js → chunk-L5DGZMVI.js} +3 -3
  95. package/dist/{chunk-3LS2XHI5.js → chunk-MF6ONZJ3.js} +1 -1
  96. package/dist/{chunk-CIFX64WT.js → chunk-NRE7D5JZ.js} +2 -2
  97. package/dist/{chunk-2SX6FP6K.js → chunk-NYIVZNML.js} +3 -3
  98. package/dist/{chunk-7YI6OCXI.js → chunk-P3UGTTUA.js} +1 -1
  99. package/dist/{chunk-YXOCR6QP.js → chunk-QFO375KV.js} +1 -1
  100. package/dist/{chunk-JMNVSA65.js → chunk-R4A2Y7HG.js} +2 -2
  101. package/dist/chunk-RJHSGJ7E.js +68 -0
  102. package/dist/{chunk-RTVKQOK3.js → chunk-RMBPTHLK.js} +1 -1
  103. package/dist/{chunk-L3QL5QLE.js → chunk-RP7OCGCP.js} +1 -1
  104. package/dist/{chunk-SYAK2KOB.js → chunk-RRMZ5ITI.js} +1 -1
  105. package/dist/{chunk-2OYZFXUY.js → chunk-S2KWNN2Y.js} +2 -2
  106. package/dist/{chunk-QOEOXKV2.js → chunk-SFKAZSZE.js} +1 -1
  107. package/dist/{chunk-KLNQEBYF.js → chunk-TEAHPDQM.js} +1 -1
  108. package/dist/{chunk-5TNJEP2C.js → chunk-TEHDRA7W.js} +2 -2
  109. package/dist/{chunk-WP2MLABG.js → chunk-TICGBUBC.js} +1 -1
  110. package/dist/{chunk-7YAEM37E.js → chunk-UJSD6N7V.js} +1 -1
  111. package/dist/{chunk-DPEMGLRK.js → chunk-WG7GNCUQ.js} +1 -1
  112. package/dist/chunk-WRIUIQHA.js +90 -0
  113. package/dist/{chunk-SYL6JDZH.js → chunk-X6FJSY3C.js} +1 -1
  114. package/dist/generated/index.d.ts +2 -0
  115. package/dist/generated/index.js +116 -114
  116. package/dist/index.js +116 -114
  117. package/dist/styles.css +448 -1
  118. package/package.json +3 -3
  119. package/dist/{chunk-FA6ROZOF.js → chunk-3OZCJUFS.js} +1 -1
  120. package/dist/{chunk-L3RGZSNE.js → chunk-GF7VSU5G.js} +1 -1
  121. package/dist/{chunk-5643FBGN.js → chunk-KF7ZOWJW.js} +1 -1
  122. package/dist/{chunk-LVCYS5JG.js → chunk-KH4HKMXF.js} +1 -1
  123. package/dist/{chunk-ITFAH735.js → chunk-L4BKQVXX.js} +1 -1
  124. package/dist/{chunk-OD7LFCYV.js → chunk-UTPLRVXN.js} +1 -1
  125. package/dist/{chunk-RFJI4VGF.js → chunk-XADL7CMK.js} +1 -1
  126. package/dist/{chunk-4BTFE223.js → chunk-XIZI47NY.js} +1 -1
  127. /package/dist/{chunk-IMD3SCK7.js → chunk-YDDWUJ4O.js} +0 -0
@@ -1,10 +1,12 @@
1
1
  import { DiffList } from './chunk-7XUP32RY.js';
2
2
  import { Tag } from './chunk-HOIZJFYS.js';
3
+ import { titleWhenCut } from './chunk-WSIJDWUG.js';
3
4
  import { Disclosure } from './chunk-RUROK3EU.js';
5
+ import { Button } from './chunk-JYJ24UUX.js';
4
6
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
5
7
  import { cx } from './chunk-ODEQTPFM.js';
6
- import './ChangeList-R4UZBGU5.css';
7
- import { useId } from 'react';
8
+ import './ChangeList-2VAPZDT3.css';
9
+ import { useId, useState } from 'react';
8
10
  import { ArrowRightGlyph } from '@crewlethq/icons/glyphs';
9
11
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
12
 
@@ -17,7 +19,9 @@ var CHANGE_LIST_LABELS = {
17
19
  addedWords: "added:",
18
20
  removedWords: "removed:",
19
21
  betweenChanges: ";",
20
- showWhole: "Show the whole change"
22
+ showWhole: "Show the whole change",
23
+ more: (hidden) => `Show ${hidden} more`,
24
+ less: "Show fewer"
21
25
  };
22
26
  var CHANGE_LIST_COLLAPSE_OVER = 80;
23
27
  var ELLIPSIS = "\u2026";
@@ -130,33 +134,35 @@ function ChipValue({ row, labels }) {
130
134
  function Value({
131
135
  row,
132
136
  labels,
133
- inline
137
+ inline,
138
+ truncate
134
139
  }) {
135
140
  if (row.block) return /* @__PURE__ */ jsx(BlockValue, { row, labels });
136
141
  if (inline) return /* @__PURE__ */ jsx(ChipValue, { row, labels });
142
+ const cut = truncate ? titleWhenCut : void 0;
137
143
  switch (row.kind) {
138
144
  case "fact":
139
- return /* @__PURE__ */ jsx("span", { className: "crewlet-change-list__fact", children: row.value });
145
+ return /* @__PURE__ */ jsx("span", { className: "crewlet-change-list__fact", onMouseEnter: cut, children: row.value });
140
146
  case "changed":
141
147
  return /* @__PURE__ */ jsxs("span", { className: "crewlet-change-list__pair", children: [
142
148
  /* @__PURE__ */ jsx(VisuallyHidden, { children: `${labels.changedFrom} ` }),
143
- /* @__PURE__ */ jsx("del", { className: "crewlet-change-list__from", children: row.from }),
149
+ /* @__PURE__ */ jsx("del", { className: "crewlet-change-list__from", onMouseEnter: cut, children: row.from }),
144
150
  /* @__PURE__ */ jsxs("span", { className: "crewlet-change-list__next", children: [
145
151
  /* @__PURE__ */ jsx(ArrowRightGlyph, { size: "sm", className: "crewlet-change-list__arrow" }),
146
152
  /* @__PURE__ */ jsx(VisuallyHidden, { children: ` ${labels.to} ` }),
147
- /* @__PURE__ */ jsx("ins", { className: "crewlet-change-list__to", children: row.to })
153
+ /* @__PURE__ */ jsx("ins", { className: "crewlet-change-list__to", onMouseEnter: cut, children: row.to })
148
154
  ] })
149
155
  ] });
150
156
  case "added":
151
157
  return /* @__PURE__ */ jsxs("span", { className: "crewlet-change-list__pair", children: [
152
- /* @__PURE__ */ jsxs("ins", { className: "crewlet-change-list__to", children: [
158
+ /* @__PURE__ */ jsxs("ins", { className: "crewlet-change-list__to", onMouseEnter: cut, children: [
153
159
  /* @__PURE__ */ jsx(VisuallyHidden, { children: `${labels.added} ` }),
154
160
  row.to
155
161
  ] }),
156
162
  row.isNew ? /* @__PURE__ */ jsx(Tag, { size: "xs", variant: "success", children: labels.isNew }) : null
157
163
  ] });
158
164
  case "removed":
159
- return /* @__PURE__ */ jsxs("del", { className: "crewlet-change-list__removed", children: [
165
+ return /* @__PURE__ */ jsxs("del", { className: "crewlet-change-list__removed", onMouseEnter: cut, children: [
160
166
  /* @__PURE__ */ jsx(VisuallyHidden, { children: `${labels.removed} ` }),
161
167
  row.from
162
168
  ] });
@@ -165,6 +171,9 @@ function Value({
165
171
  function ChangeList({
166
172
  rows,
167
173
  heading,
174
+ subject,
175
+ truncate = false,
176
+ collapseAfter,
168
177
  layout = "grid",
169
178
  settled = false,
170
179
  labels: overrides,
@@ -173,6 +182,14 @@ function ChangeList({
173
182
  }) {
174
183
  const labels = overrides ? { ...CHANGE_LIST_LABELS, ...overrides } : CHANGE_LIST_LABELS;
175
184
  const headingId = useId();
185
+ const subjectId = `${headingId}-subject`;
186
+ const rowsId = `${headingId}-rows`;
187
+ const [expanded, setExpanded] = useState(false);
188
+ const hasHeading = heading !== void 0 && heading !== null;
189
+ const hasSubject = subject !== void 0 && subject !== null;
190
+ const folds = collapseAfter !== void 0 && rows.length > collapseAfter + 1;
191
+ const shown = folds && !expanded ? rows.slice(0, collapseAfter) : rows;
192
+ const named = cx(hasHeading && headingId, hasSubject && subjectId) || void 0;
176
193
  return /* @__PURE__ */ jsxs(
177
194
  "div",
178
195
  {
@@ -180,11 +197,13 @@ function ChangeList({
180
197
  "crewlet-change-list",
181
198
  layout === "inline" && "crewlet-change-list--inline",
182
199
  settled && "crewlet-change-list--settled",
200
+ truncate && "crewlet-change-list--truncate",
183
201
  className
184
202
  ),
185
203
  children: [
186
- heading === void 0 || heading === null ? null : /* @__PURE__ */ jsx("div", { id: headingId, className: "crewlet-change-list__heading", children: heading }),
187
- /* @__PURE__ */ jsx("dl", { className: "crewlet-change-list__rows", "aria-labelledby": heading === void 0 || heading === null ? void 0 : headingId, children: rows.map((row, index) => /* @__PURE__ */ jsxs(
204
+ hasHeading ? /* @__PURE__ */ jsx("div", { id: headingId, className: "crewlet-change-list__heading", children: heading }) : null,
205
+ hasSubject ? /* @__PURE__ */ jsx("div", { id: subjectId, className: "crewlet-change-list__subject", onMouseEnter: truncate ? titleWhenCut : void 0, children: subject }) : null,
206
+ /* @__PURE__ */ jsx("dl", { id: rowsId, className: "crewlet-change-list__rows", "aria-labelledby": named, children: shown.map((row, index) => /* @__PURE__ */ jsxs(
188
207
  "div",
189
208
  {
190
209
  className: cx(
@@ -198,16 +217,86 @@ function ChangeList({
198
217
  row.kind === "text" ? /* @__PURE__ */ jsxs(Fragment, { children: [
199
218
  /* @__PURE__ */ jsx(WordDiff, { row, labels }),
200
219
  row.whole && row.whole.length > 0 ? /* @__PURE__ */ jsx(Disclosure, { title: labels.showWhole, headingLevel: "none", size: "compact", className: "crewlet-change-list__whole", children: /* @__PURE__ */ jsx(DiffList, { rows: [...row.whole], layout: "auto", labels: diffLabels }) }) : null
201
- ] }) : /* @__PURE__ */ jsx(Value, { row, labels, inline: layout === "inline" }),
220
+ ] }) : /* @__PURE__ */ jsx(Value, { row, labels, inline: layout === "inline", truncate }),
202
221
  row.note === void 0 || row.note === null ? null : /* @__PURE__ */ jsx("span", { className: "crewlet-change-list__note", children: row.note })
203
222
  ] })
204
223
  ]
205
224
  },
206
225
  `${index}:${row.label}`
207
- )) })
226
+ )) }),
227
+ folds ? /* @__PURE__ */ jsx(
228
+ Button,
229
+ {
230
+ variant: "ghost",
231
+ size: "small",
232
+ flush: true,
233
+ className: "crewlet-change-list__more",
234
+ "aria-expanded": expanded,
235
+ "aria-controls": rowsId,
236
+ onClick: () => setExpanded((open) => !open),
237
+ children: expanded ? labels.less : labels.more(rows.length - collapseAfter)
238
+ }
239
+ ) : null
240
+ ]
241
+ }
242
+ );
243
+ }
244
+ var CHANGE_GROUPS_COLLAPSE_AFTER = 3;
245
+ function plain(group) {
246
+ return group.subjectText ?? (typeof group.subject === "string" ? group.subject : "");
247
+ }
248
+ function ChangeGroups({
249
+ groups,
250
+ heading,
251
+ collapseAfter = CHANGE_GROUPS_COLLAPSE_AFTER,
252
+ rowsCollapseAfter,
253
+ labels: overrides,
254
+ className
255
+ }) {
256
+ const labels = overrides ? { ...CHANGE_LIST_LABELS, ...overrides } : CHANGE_LIST_LABELS;
257
+ const id = useId();
258
+ const [expanded, setExpanded] = useState(false);
259
+ const folds = groups.length > collapseAfter + 1;
260
+ const shown = folds && !expanded ? groups.slice(0, collapseAfter) : groups;
261
+ const hiddenNames = folds ? groups.slice(collapseAfter).map(plain).filter((name) => name !== "").join(", ") : "";
262
+ const hasHeading = heading !== void 0 && heading !== null;
263
+ return /* @__PURE__ */ jsxs(
264
+ "div",
265
+ {
266
+ role: "group",
267
+ "aria-labelledby": hasHeading ? `${id}-heading` : void 0,
268
+ className: cx("crewlet-change-groups", className),
269
+ children: [
270
+ hasHeading ? /* @__PURE__ */ jsx("div", { id: `${id}-heading`, className: "crewlet-change-list__heading", children: heading }) : null,
271
+ /* @__PURE__ */ jsx("div", { id: `${id}-groups`, className: "crewlet-change-groups__list", children: shown.map((group) => /* @__PURE__ */ jsx(
272
+ ChangeList,
273
+ {
274
+ subject: group.subject,
275
+ rows: group.rows,
276
+ truncate: true,
277
+ collapseAfter: rowsCollapseAfter,
278
+ labels
279
+ },
280
+ group.key
281
+ )) }),
282
+ folds ? /* @__PURE__ */ jsxs("div", { className: "crewlet-change-groups__more", children: [
283
+ /* @__PURE__ */ jsx(
284
+ Button,
285
+ {
286
+ variant: "ghost",
287
+ size: "small",
288
+ flush: true,
289
+ "aria-expanded": expanded,
290
+ "aria-controls": `${id}-groups`,
291
+ onClick: () => setExpanded((open) => !open),
292
+ children: expanded ? labels.less : labels.more(groups.length - collapseAfter)
293
+ }
294
+ ),
295
+ expanded || hiddenNames === "" ? null : /* @__PURE__ */ jsx("span", { className: "crewlet-change-groups__hidden", onMouseEnter: titleWhenCut, children: hiddenNames })
296
+ ] }) : null
208
297
  ]
209
298
  }
210
299
  );
211
300
  }
212
301
 
213
- export { CHANGE_LIST_COLLAPSE_OVER, CHANGE_LIST_LABELS, ChangeList, ChangeListItems, shortenUnchanged };
302
+ export { CHANGE_GROUPS_COLLAPSE_AFTER, CHANGE_LIST_COLLAPSE_OVER, CHANGE_LIST_LABELS, ChangeGroups, ChangeList, ChangeListItems, shortenUnchanged };
@@ -1,7 +1,7 @@
1
1
  import { Select } from './chunk-D5UVJL4I.js';
2
- import { Combobox } from './chunk-W6NSF6E2.js';
2
+ import { Combobox } from './chunk-H7L4ZEVN.js';
3
3
  import { Button } from './chunk-JYJ24UUX.js';
4
- import { FormField, Textarea, InputAffix } from './chunk-LVCYS5JG.js';
4
+ import { FormField, Textarea, InputAffix } from './chunk-KH4HKMXF.js';
5
5
  import { cx } from './chunk-ODEQTPFM.js';
6
6
  import './Input-YVCNNTYT.css';
7
7
  import './VisuallyHidden-OUYVMKEH.css';
@@ -1,4 +1,4 @@
1
- import { Checkbox } from './chunk-SYL6JDZH.js';
1
+ import { Checkbox } from './chunk-X6FJSY3C.js';
2
2
  import { IconButton } from './chunk-VM73Y6TO.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './MemberPicker-ZD35VEK6.css';
@@ -1,5 +1,5 @@
1
1
  import { useSendOnEnter, SendKeysHint } from './chunk-YUVQUJND.js';
2
- import { Textarea } from './chunk-LVCYS5JG.js';
2
+ import { Textarea } from './chunk-KH4HKMXF.js';
3
3
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
4
4
  import { cx } from './chunk-ODEQTPFM.js';
5
5
  import './ChatScale-LGESYXCO.css';
@@ -1,6 +1,6 @@
1
1
  import { Menu } from './chunk-QHPKLY4V.js';
2
2
  import { useReorder } from './chunk-JMBPMSNI.js';
3
- import { Input } from './chunk-LVCYS5JG.js';
3
+ import { Input } from './chunk-KH4HKMXF.js';
4
4
  import { IconButton } from './chunk-VM73Y6TO.js';
5
5
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
6
6
  import { cx } from './chunk-ODEQTPFM.js';
@@ -1,10 +1,10 @@
1
1
  import { useTreeState, treeExpandable, treeLevel, treePosInSet, treeSetSize, treeItemAction, treePrevious, treeNext, treeStep } from './chunk-MY374UUD.js';
2
- import { fitGridColumns } from './chunk-YXOCR6QP.js';
2
+ import { fitGridColumns } from './chunk-QFO375KV.js';
3
3
  import { GRID_FOOT_LABELS, parseGridSort, overrunning, squeezedCells, tableTrack, GRID_ICON_TRACK, GridHeadCell, alignOf, rowLinkTitle, headerWord, GridFoot, droppedNames, nextGridSort, sortByValue } from './chunk-QBLBUPHO.js';
4
4
  import { LayerNodeBridge } from './chunk-CUEPPDBC.js';
5
- import { Checkbox } from './chunk-SYL6JDZH.js';
6
5
  import { EmptyState } from './chunk-HG7J6I65.js';
7
6
  import { useMediaMatch } from './chunk-COS6LJ4K.js';
7
+ import { Checkbox } from './chunk-X6FJSY3C.js';
8
8
  import { IconButton } from './chunk-VM73Y6TO.js';
9
9
  import { LayerHost, LAYER_REPOSITION_EVENT } from './chunk-AVJKMQXK.js';
10
10
  import { focusables } from './chunk-EDPMHSLZ.js';
@@ -1,5 +1,5 @@
1
1
  import { Button } from './chunk-JYJ24UUX.js';
2
- import { FormField } from './chunk-LVCYS5JG.js';
2
+ import { FormField } from './chunk-KH4HKMXF.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './SettingForm-ODVZZ7JZ.css';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,8 +1,8 @@
1
1
  import { Select } from './chunk-D5UVJL4I.js';
2
- import { today, shiftMonth, CalendarGrid, compareDays } from './chunk-EE3DJMSQ.js';
3
2
  import { Popover } from './chunk-AJFA2XDQ.js';
3
+ import { today, shiftMonth, CalendarGrid, compareDays } from './chunk-EE3DJMSQ.js';
4
4
  import { Button } from './chunk-JYJ24UUX.js';
5
- import { Input } from './chunk-LVCYS5JG.js';
5
+ import { Input } from './chunk-KH4HKMXF.js';
6
6
  import { IconButton } from './chunk-VM73Y6TO.js';
7
7
  import { isComposing } from './chunk-EDPMHSLZ.js';
8
8
  import { useFocusModality } from './chunk-4ITETIGZ.js';
@@ -1,6 +1,6 @@
1
1
  import { useListbox, useOptionKeys } from './chunk-KW7T23RT.js';
2
2
  import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
3
- import { Input } from './chunk-LVCYS5JG.js';
3
+ import { Input } from './chunk-KH4HKMXF.js';
4
4
  import { cx } from './chunk-ODEQTPFM.js';
5
5
  import './HitArea-QUOS6ZDJ.css';
6
6
  import './Combobox-GHT43K32.css';
@@ -1,5 +1,5 @@
1
1
  import { normalizeHex, parseColourInput } from './chunk-7W3LYIOC.js';
2
- import { FormField, Input, InputAffix } from './chunk-LVCYS5JG.js';
2
+ import { FormField, Input, InputAffix } from './chunk-KH4HKMXF.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './ColorField-2OIOWT3Z.css';
5
5
  import { useId, useState } from 'react';
@@ -2,13 +2,13 @@ import { List, ListItem } from './chunk-GAQU5V5R.js';
2
2
  import { FileDrop, FilePickButton } from './chunk-J73XXTGG.js';
3
3
  import { StepList, Stepper } from './chunk-2MN3RNRM.js';
4
4
  import { Copyable } from './chunk-GKVQL352.js';
5
- import { Modal } from './chunk-FC225TSK.js';
5
+ import { Modal } from './chunk-BEYMQKP3.js';
6
6
  import { Callout } from './chunk-UJYSDWQ7.js';
7
7
  import { Tag } from './chunk-HOIZJFYS.js';
8
8
  import { Text } from './chunk-475DOAWF.js';
9
9
  import { Disclosure } from './chunk-RUROK3EU.js';
10
10
  import { Button, ButtonLink } from './chunk-JYJ24UUX.js';
11
- import { FormField, Input } from './chunk-LVCYS5JG.js';
11
+ import { FormField, Input } from './chunk-KH4HKMXF.js';
12
12
  import { cx } from './chunk-ODEQTPFM.js';
13
13
  import './AgentIdentity-KQWGKBNT.css';
14
14
  import './AgentIdentitySheet-D2T7ELGN.css';
@@ -1,9 +1,9 @@
1
1
  import { EmptyValue } from './chunk-WGLOH33S.js';
2
2
  import { useCardHeaderSlot } from './chunk-AV2DXAEL.js';
3
3
  import { Menu } from './chunk-QHPKLY4V.js';
4
- import { Checkbox } from './chunk-SYL6JDZH.js';
5
4
  import { useClipboard } from './chunk-STJ7QBC3.js';
6
- import { Modal } from './chunk-FC225TSK.js';
5
+ import { Modal } from './chunk-BEYMQKP3.js';
6
+ import { Checkbox } from './chunk-X6FJSY3C.js';
7
7
  import { Button } from './chunk-JYJ24UUX.js';
8
8
  import { IconButton } from './chunk-VM73Y6TO.js';
9
9
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
@@ -1,7 +1,7 @@
1
- import { Checkbox } from './chunk-SYL6JDZH.js';
2
1
  import { Text } from './chunk-475DOAWF.js';
2
+ import { Checkbox } from './chunk-X6FJSY3C.js';
3
3
  import { Button } from './chunk-JYJ24UUX.js';
4
- import { Input } from './chunk-LVCYS5JG.js';
4
+ import { Input } from './chunk-KH4HKMXF.js';
5
5
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
6
6
  import { cx } from './chunk-ODEQTPFM.js';
7
7
  import './ScopeList-564YHC7Z.css';
@@ -1,4 +1,4 @@
1
- import { emojiName } from './chunk-WP2MLABG.js';
1
+ import { emojiName } from './chunk-TICGBUBC.js';
2
2
  import { Toolbar } from './chunk-NPEI2QAN.js';
3
3
  import { IconButton } from './chunk-VM73Y6TO.js';
4
4
  import { heldHint } from './chunk-TDFLCUBE.js';
@@ -1,5 +1,5 @@
1
1
  import { Select } from './chunk-D5UVJL4I.js';
2
- import { typedNumber, NumberField } from './chunk-5KUJWSPT.js';
2
+ import { typedNumber, NumberField } from './chunk-CVKCSJ5F.js';
3
3
  import { PresetChips } from './chunk-UMQYZDYC.js';
4
4
  import { cx } from './chunk-ODEQTPFM.js';
5
5
  import './DurationField-TJFIAUMW.css';
@@ -1,7 +1,7 @@
1
1
  import { PageHeader } from './chunk-FPDIHEM4.js';
2
2
  import { FilterPill } from './chunk-Z4TGAPC7.js';
3
- import { DataTable } from './chunk-QXKPMRUG.js';
4
- import { DateTimePicker } from './chunk-RFJI4VGF.js';
3
+ import { DateTimePicker } from './chunk-XADL7CMK.js';
4
+ import { DataTable } from './chunk-JLUXCPKS.js';
5
5
  import { useListbox, useOptionKeys } from './chunk-KW7T23RT.js';
6
6
  import { Toolbar } from './chunk-NPEI2QAN.js';
7
7
  import { Popover } from './chunk-AJFA2XDQ.js';
@@ -9,7 +9,7 @@ import { RelativeTime } from './chunk-GBKBME7Q.js';
9
9
  import { Menu } from './chunk-QHPKLY4V.js';
10
10
  import { Kbd } from './chunk-VBBLHS2Y.js';
11
11
  import { Button } from './chunk-JYJ24UUX.js';
12
- import { Input } from './chunk-LVCYS5JG.js';
12
+ import { Input } from './chunk-KH4HKMXF.js';
13
13
  import { IconButton } from './chunk-VM73Y6TO.js';
14
14
  import { Count } from './chunk-6YKTRAWI.js';
15
15
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
@@ -9,7 +9,7 @@ import { jsx } from 'react/jsx-runtime';
9
9
  var engine = null;
10
10
  var loading = null;
11
11
  function loadEngine() {
12
- loading ??= import('./Editor-N3HLIXHX.js').then(
12
+ loading ??= import('./Editor-ANVKGFJ6.js').then(
13
13
  (module) => {
14
14
  engine = module.Editor;
15
15
  return engine;
@@ -1,11 +1,11 @@
1
1
  import { useReorder } from './chunk-JMBPMSNI.js';
2
2
  import { Kbd } from './chunk-VBBLHS2Y.js';
3
3
  import { Button } from './chunk-JYJ24UUX.js';
4
- import { FormField, Textarea } from './chunk-LVCYS5JG.js';
4
+ import { FormField, Textarea } from './chunk-KH4HKMXF.js';
5
5
  import { characterCountState, CharacterCount, countCharacters } from './chunk-TEXK4RK6.js';
6
+ import { announce } from './chunk-WGMKERCR.js';
6
7
  import { IconButton } from './chunk-VM73Y6TO.js';
7
8
  import { isComposing } from './chunk-EDPMHSLZ.js';
8
- import { announce } from './chunk-WGMKERCR.js';
9
9
  import { cx } from './chunk-ODEQTPFM.js';
10
10
  import './ListInput-L6XJUDTB.css';
11
11
  import { forwardRef, useState, useRef, useImperativeHandle, useLayoutEffect, useId } from 'react';
@@ -1,10 +1,10 @@
1
- import { ValueField } from './chunk-BFYADGPT.js';
1
+ import { ValueField } from './chunk-DJXY65LN.js';
2
2
  import { RefusalStrip, ReceiptStrip } from './chunk-UNYT6KEK.js';
3
- import { ChangeList } from './chunk-SN2FN2XW.js';
4
3
  import { StatusCard } from './chunk-SR5GHUP5.js';
5
4
  import { toInstant, currentNow, formatUntil, useNow, formatExact, toISO } from './chunk-GBKBME7Q.js';
6
- import { Checkbox } from './chunk-SYL6JDZH.js';
5
+ import { ChangeList } from './chunk-D54HL3AN.js';
7
6
  import { Callout } from './chunk-UJYSDWQ7.js';
7
+ import { Checkbox } from './chunk-X6FJSY3C.js';
8
8
  import { Disclosure } from './chunk-RUROK3EU.js';
9
9
  import { Button } from './chunk-JYJ24UUX.js';
10
10
  import { Spinner } from './chunk-XSPCITPN.js';
@@ -1,6 +1,6 @@
1
1
  import { Switch } from './chunk-6YYRFGXO.js';
2
2
  import { useReorder } from './chunk-JMBPMSNI.js';
3
- import { Checkbox } from './chunk-SYL6JDZH.js';
3
+ import { Checkbox } from './chunk-X6FJSY3C.js';
4
4
  import { IconButton } from './chunk-VM73Y6TO.js';
5
5
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
6
6
  import { cx } from './chunk-ODEQTPFM.js';
@@ -1,10 +1,10 @@
1
1
  import { GRID_FOOT_LABELS, GRID_ICON_TRACK, headerWord, sortByValue, parseGridSort, overrunning, tableTrack, GridHeadCell, GridFoot, droppedNames, nextGridSort, rowLinkTitle, squeezedCells, SHORT_COLUMN_PX, alignOf } from './chunk-QBLBUPHO.js';
2
2
  import { Skeleton } from './chunk-WFAJYBLX.js';
3
3
  import { useReorder } from './chunk-JMBPMSNI.js';
4
- import { Checkbox } from './chunk-SYL6JDZH.js';
5
4
  import { EmptyState } from './chunk-HG7J6I65.js';
6
5
  import { useMediaMatch } from './chunk-COS6LJ4K.js';
7
6
  import { titleWhenCut } from './chunk-WSIJDWUG.js';
7
+ import { Checkbox } from './chunk-X6FJSY3C.js';
8
8
  import { IconButton } from './chunk-VM73Y6TO.js';
9
9
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
10
10
  import { cx } from './chunk-ODEQTPFM.js';
@@ -3,10 +3,10 @@ import { SHEET_LABELS, SHEET_COLUMN_TYPES, optionHue, retypeColumn } from './chu
3
3
  import { HueSwatch } from './chunk-6JPM2FL7.js';
4
4
  import { NODE_HUES, NODE_HUE_NAMES } from './chunk-AYKXMIOR.js';
5
5
  import { Menu } from './chunk-QHPKLY4V.js';
6
- import { Checkbox } from './chunk-SYL6JDZH.js';
7
6
  import { Kbd } from './chunk-VBBLHS2Y.js';
7
+ import { Checkbox } from './chunk-X6FJSY3C.js';
8
8
  import { Button } from './chunk-JYJ24UUX.js';
9
- import { FormField, Input } from './chunk-LVCYS5JG.js';
9
+ import { FormField, Input } from './chunk-KH4HKMXF.js';
10
10
  import { IconButton } from './chunk-VM73Y6TO.js';
11
11
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
12
12
  import { cx } from './chunk-ODEQTPFM.js';
@@ -0,0 +1,68 @@
1
+ import { Eyebrow } from './chunk-RK4XPHVG.js';
2
+ import { InlineCode } from './chunk-W4UJWFCZ.js';
3
+ import { titleWhenCut } from './chunk-WSIJDWUG.js';
4
+ import { Checkbox } from './chunk-X6FJSY3C.js';
5
+ import { cx } from './chunk-ODEQTPFM.js';
6
+ import './ConsequenceList-5TXFZPMG.css';
7
+ import { useId } from 'react';
8
+ import { TriangleAlertGlyph, InfoGlyph, ArrowRightGlyph, LockGlyph } from '@crewlethq/icons/glyphs';
9
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
+
11
+ var FACT_GLYPHS = {
12
+ kept: LockGlyph,
13
+ follows: ArrowRightGlyph,
14
+ info: InfoGlyph,
15
+ warning: TriangleAlertGlyph,
16
+ danger: TriangleAlertGlyph
17
+ };
18
+ function ResourceName({ children, className }) {
19
+ return /* @__PURE__ */ jsx(InlineCode, { truncate: true, className: cx("crewlet-resource-name", className), onMouseEnter: titleWhenCut, children });
20
+ }
21
+ function ConsequenceList({ items, heading, className }) {
22
+ const headingId = useId();
23
+ const named = heading !== void 0 && heading !== null;
24
+ return /* @__PURE__ */ jsxs(
25
+ "div",
26
+ {
27
+ role: "group",
28
+ "aria-labelledby": named ? headingId : void 0,
29
+ className: cx("crewlet-consequence-list", className),
30
+ children: [
31
+ named ? /* @__PURE__ */ jsx(Eyebrow, { as: "div", id: headingId, className: "crewlet-consequence-list__heading", children: heading }) : null,
32
+ items.map(
33
+ (item) => item.kind === "choice" ? /* @__PURE__ */ jsx(
34
+ Checkbox,
35
+ {
36
+ className: "crewlet-consequence-list__choice",
37
+ checked: item.checked,
38
+ onCheckedChange: item.onCheckedChange,
39
+ disabled: item.disabled,
40
+ tone: item.tone === "danger" ? "danger" : "default",
41
+ label: item.name === void 0 ? item.label : /* @__PURE__ */ jsxs(Fragment, { children: [
42
+ item.label,
43
+ " ",
44
+ /* @__PURE__ */ jsx(ResourceName, { children: item.name })
45
+ ] }),
46
+ description: item.description
47
+ },
48
+ item.key
49
+ ) : /* @__PURE__ */ jsx(Fact, { fact: item }, item.key)
50
+ )
51
+ ]
52
+ }
53
+ );
54
+ }
55
+ function Fact({ fact }) {
56
+ const tone = fact.tone ?? "plain";
57
+ const Glyph = tone === "plain" ? null : FACT_GLYPHS[tone];
58
+ const glyph = fact.icon ?? (Glyph ? /* @__PURE__ */ jsx(Glyph, { size: "sm" }) : null);
59
+ return /* @__PURE__ */ jsxs("p", { className: cx("crewlet-consequence-list__fact", `crewlet-consequence-list__fact--${tone}`), children: [
60
+ /* @__PURE__ */ jsx("span", { className: "crewlet-consequence-list__mark", "aria-hidden": "true", children: glyph }),
61
+ /* @__PURE__ */ jsx("span", { className: "crewlet-consequence-list__text", children: fact.text })
62
+ ] });
63
+ }
64
+ function consequencesAnswered(items) {
65
+ return (items ?? []).every((item) => item.kind !== "choice" || !item.required || item.checked);
66
+ }
67
+
68
+ export { ConsequenceList, ResourceName, consequencesAnswered };
@@ -1,7 +1,7 @@
1
1
  import { PrincipalAvatar } from './chunk-265IX4YA.js';
2
2
  import { toInstant, RelativeTime, formatExact, toISO } from './chunk-GBKBME7Q.js';
3
3
  import { Document } from './chunk-I4PBFJGX.js';
4
- import { Composer } from './chunk-5MRK6I7V.js';
4
+ import { Composer } from './chunk-FF2YPFIZ.js';
5
5
  import { Button } from './chunk-JYJ24UUX.js';
6
6
  import { IconButton } from './chunk-VM73Y6TO.js';
7
7
  import { Count } from './chunk-6YKTRAWI.js';
@@ -2,7 +2,7 @@ import { Select } from './chunk-D5UVJL4I.js';
2
2
  import { PrincipalAvatar } from './chunk-265IX4YA.js';
3
3
  import { useMediaMatch } from './chunk-COS6LJ4K.js';
4
4
  import { CopyButton } from './chunk-G5HHQ3RD.js';
5
- import { Modal } from './chunk-FC225TSK.js';
5
+ import { Modal } from './chunk-BEYMQKP3.js';
6
6
  import { Callout } from './chunk-UJYSDWQ7.js';
7
7
  import { Button } from './chunk-JYJ24UUX.js';
8
8
  import { IconButton } from './chunk-VM73Y6TO.js';
@@ -1,5 +1,5 @@
1
1
  import { minorUnits, parseMoney } from './chunk-G6DKKJN6.js';
2
- import { Input } from './chunk-LVCYS5JG.js';
2
+ import { Input } from './chunk-KH4HKMXF.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './MoneyField-4PHZWHJL.css';
5
5
  import { forwardRef, useId } from 'react';
@@ -1,8 +1,8 @@
1
1
  import { SegmentedControl } from './chunk-4GPXNMIG.js';
2
- import { Modal } from './chunk-FC225TSK.js';
2
+ import { Modal } from './chunk-BEYMQKP3.js';
3
3
  import { Callout } from './chunk-UJYSDWQ7.js';
4
4
  import { Button } from './chunk-JYJ24UUX.js';
5
- import { FormField, Input } from './chunk-LVCYS5JG.js';
5
+ import { FormField, Input } from './chunk-KH4HKMXF.js';
6
6
  import { useState } from 'react';
7
7
  import { ClockGlyph } from '@crewlethq/icons/glyphs';
8
8
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import { emojiOfShortcode, emojiName, EmojiPicker } from './chunk-WP2MLABG.js';
1
+ import { emojiOfShortcode, emojiName, EmojiPicker } from './chunk-TICGBUBC.js';
2
2
  import { heldHint } from './chunk-TDFLCUBE.js';
3
3
  import { Tooltip } from './chunk-QB3VHZRB.js';
4
4
  import { cx } from './chunk-ODEQTPFM.js';
@@ -1,6 +1,6 @@
1
1
  import { Timeline } from './chunk-XDUXAQIS.js';
2
2
  import { Section } from './chunk-WFCWPXJN.js';
3
- import { Composer } from './chunk-5MRK6I7V.js';
3
+ import { Composer } from './chunk-FF2YPFIZ.js';
4
4
  import { ArtifactPanel } from './chunk-MYAC6NMF.js';
5
5
  import { Disclosure } from './chunk-RUROK3EU.js';
6
6
  import { Button } from './chunk-JYJ24UUX.js';
@@ -1,7 +1,7 @@
1
1
  import { Button } from './chunk-JYJ24UUX.js';
2
- import { FormField, Label, Input } from './chunk-LVCYS5JG.js';
3
- import { IconButton } from './chunk-VM73Y6TO.js';
2
+ import { FormField, Label, Input } from './chunk-KH4HKMXF.js';
4
3
  import { announce } from './chunk-WGMKERCR.js';
4
+ import { IconButton } from './chunk-VM73Y6TO.js';
5
5
  import { cx } from './chunk-ODEQTPFM.js';
6
6
  import './KeyValueRows-US5KW7JK.css';
7
7
  import { useId, useRef, useEffect } from 'react';
@@ -1,6 +1,6 @@
1
1
  import { Toolbar } from './chunk-NPEI2QAN.js';
2
2
  import { Popover } from './chunk-AJFA2XDQ.js';
3
- import { Input } from './chunk-LVCYS5JG.js';
3
+ import { Input } from './chunk-KH4HKMXF.js';
4
4
  import { Tooltip } from './chunk-QB3VHZRB.js';
5
5
  import { isComposing } from './chunk-EDPMHSLZ.js';
6
6
  import { cx } from './chunk-ODEQTPFM.js';
@@ -1,5 +1,5 @@
1
1
  import { InlineCode } from './chunk-W4UJWFCZ.js';
2
- import { FormField, Input } from './chunk-LVCYS5JG.js';
2
+ import { FormField, Input } from './chunk-KH4HKMXF.js';
3
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
4
 
5
5
  function confirmMatches(typed, phrase) {
@@ -1,4 +1,4 @@
1
- import { TreeGrid } from './chunk-7PLFR7AF.js';
1
+ import { TreeGrid } from './chunk-G7YITKUF.js';
2
2
  import { OrgLabel } from './chunk-NIM7LEEI.js';
3
3
  import { createTreeModel, treeParent } from './chunk-MY374UUD.js';
4
4
  import { AddPill } from './chunk-5CCM3DDA.js';