@crewlethq/ui 0.191.0 → 0.193.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 (128) hide show
  1. package/README.md +4 -2
  2. package/dist/AgentHandoffPanel/AgentHandoffPanel.d.ts +4 -1
  3. package/dist/AgentHandoffPanel/index.js +4 -4
  4. package/dist/AgentIdentity/index.js +6 -6
  5. package/dist/ArrangeList/index.js +4 -4
  6. package/dist/ArtifactBar/index.js +4 -4
  7. package/dist/ArtifactCard/index.js +4 -4
  8. package/dist/AvatarPicker/index.js +5 -5
  9. package/dist/CheckGrid/index.js +4 -4
  10. package/dist/Checkbox/index.js +3 -3
  11. package/dist/ColorField/index.js +3 -3
  12. package/dist/Combobox/index.js +3 -3
  13. package/dist/CommandPalette/index.js +9 -9
  14. package/dist/CommentThread/CommentThread.d.ts +4 -1
  15. package/dist/CommentThread/index.js +5 -5
  16. package/dist/Composer/Composer.d.ts +6 -0
  17. package/dist/Composer/index.js +3 -3
  18. package/dist/{Composer-YCD6UPMO.css → Composer-4E7TRJFG.css} +6 -0
  19. package/dist/ConfirmField/index.js +3 -3
  20. package/dist/ConsequenceList/index.js +4 -4
  21. package/dist/DataGrid/index.js +5 -5
  22. package/dist/DataTable/index.js +7 -7
  23. package/dist/DataView/index.js +11 -11
  24. package/dist/DatasetSource/index.js +2 -2
  25. package/dist/DocTabsEditor/index.js +3 -3
  26. package/dist/DurationField/index.js +8 -8
  27. package/dist/{Editor-ZQUOI3WV.js → Editor-JKKN2X7Z.js} +3 -3
  28. package/dist/EmojiPicker/index.js +3 -3
  29. package/dist/GraphCanvas/index.js +2 -2
  30. package/dist/HuePicker/index.js +4 -4
  31. package/dist/InboxList/index.js +1 -1
  32. package/dist/InlineEditor/index.js +1 -1
  33. package/dist/Input/index.js +2 -2
  34. package/dist/KeyValueRows/index.js +3 -3
  35. package/dist/LinkInterstitial/index.js +6 -6
  36. package/dist/ListInput/index.js +3 -3
  37. package/dist/MarkdownEditor/index.js +4 -4
  38. package/dist/MemberPicker/index.js +4 -4
  39. package/dist/MergeConflicts/index.js +4 -4
  40. package/dist/MessageActions/index.js +4 -4
  41. package/dist/Modal/index.js +5 -5
  42. package/dist/MoneyField/index.js +3 -3
  43. package/dist/NumberField/index.js +7 -7
  44. package/dist/OrgTable/index.js +7 -7
  45. package/dist/PresenterView/index.js +2 -2
  46. package/dist/PresetChips/index.js +4 -4
  47. package/dist/PrincipalPicker/index.js +5 -5
  48. package/dist/ProposalCard/index.js +7 -7
  49. package/dist/RailList/index.js +2 -2
  50. package/dist/ReactionBar/index.js +4 -4
  51. package/dist/RichEditor/index.js +1 -1
  52. package/dist/ScopeList/index.js +4 -4
  53. package/dist/SegmentedControl/index.js +3 -3
  54. package/dist/SettingForm/index.js +3 -3
  55. package/dist/SetupWizard/index.js +3 -3
  56. package/dist/ShareDialog/index.js +9 -9
  57. package/dist/SheetColumnEditor/index.js +8 -8
  58. package/dist/SheetGrid/index.js +2 -2
  59. package/dist/Switcher/index.js +8 -8
  60. package/dist/Tabs/index.js +2 -2
  61. package/dist/ThemeSwitcher/index.js +4 -4
  62. package/dist/TimeRangePicker/index.js +10 -10
  63. package/dist/TimeWindowPicker/index.js +3 -3
  64. package/dist/ToolCallLog/index.js +2 -2
  65. package/dist/TreeGrid/index.js +6 -6
  66. package/dist/ValueField/index.js +4 -4
  67. package/dist/VersionCompare/index.js +4 -4
  68. package/dist/VersionTimeline/index.js +1 -1
  69. package/dist/{chunk-SHU6ZR7Z.js → chunk-2KQGMYAQ.js} +1 -1
  70. package/dist/{chunk-AWBLC4KR.js → chunk-2XC4MYBB.js} +1 -1
  71. package/dist/{chunk-ZUTLS4HX.js → chunk-3XW3ZD7S.js} +2 -2
  72. package/dist/{chunk-NCXSYDWQ.js → chunk-5AOJFG2K.js} +1 -1
  73. package/dist/{chunk-A4XJHBMM.js → chunk-5F62NQON.js} +1 -1
  74. package/dist/{chunk-N72QMEEA.js → chunk-5QOATK65.js} +1 -1
  75. package/dist/{chunk-4ODGBPYT.js → chunk-5TRZSIUJ.js} +2 -2
  76. package/dist/{chunk-HQTBYW7G.js → chunk-5XBQS642.js} +3 -3
  77. package/dist/{chunk-MZAMX65M.js → chunk-5XW45VZX.js} +1 -1
  78. package/dist/{chunk-LJSW7NWJ.js → chunk-6GLTUEHI.js} +4 -1
  79. package/dist/{chunk-MKOWEHDH.js → chunk-6M3GVYTI.js} +1 -1
  80. package/dist/{chunk-YXRMGI4B.js → chunk-6SW4NH2E.js} +1 -1
  81. package/dist/{chunk-VNCKUYYT.js → chunk-6XBDBCCB.js} +1 -1
  82. package/dist/{chunk-RZEUVQJ7.js → chunk-7UYWPNFG.js} +1 -1
  83. package/dist/{chunk-NXTELLHC.js → chunk-ACFQLY2Y.js} +3 -3
  84. package/dist/{chunk-ORX3PYX3.js → chunk-BDVXG75B.js} +1 -1
  85. package/dist/{chunk-WXMSQOBV.js → chunk-DVTFVZEG.js} +1 -1
  86. package/dist/{chunk-A24SEWF7.js → chunk-EBMU5KWN.js} +1 -1
  87. package/dist/{chunk-ESP65SIP.js → chunk-EJC6MRHK.js} +2 -2
  88. package/dist/{chunk-T2DGBIFD.js → chunk-EQI3QDPR.js} +1 -1
  89. package/dist/{chunk-6AU73W3Y.js → chunk-FA3NHWSM.js} +1 -1
  90. package/dist/{chunk-BNI2532M.js → chunk-G2KDXOW6.js} +2 -2
  91. package/dist/{chunk-N6LUM6AG.js → chunk-G6QKTJRY.js} +2 -2
  92. package/dist/{chunk-E266WLN7.js → chunk-GI7TT5VZ.js} +4 -2
  93. package/dist/{chunk-EZO5MYII.js → chunk-HOR5M3EP.js} +1 -1
  94. package/dist/{chunk-JXVDEPBK.js → chunk-IWYNBJBG.js} +2 -2
  95. package/dist/{chunk-B4TAERAM.js → chunk-JWXF7ZWQ.js} +1 -1
  96. package/dist/{chunk-4P24HLY3.js → chunk-KOXHGF55.js} +2 -2
  97. package/dist/{chunk-RTLBWYVV.js → chunk-LZAXPGTP.js} +2 -2
  98. package/dist/{chunk-LN7IMSCU.js → chunk-M3NUWL5L.js} +1 -1
  99. package/dist/{chunk-YW3IH3EU.js → chunk-MYYIWUJG.js} +1 -1
  100. package/dist/{chunk-NPKNO4RL.js → chunk-N6TWNLF3.js} +3 -3
  101. package/dist/{chunk-YOGPQDXA.js → chunk-O5V4YD4A.js} +1 -1
  102. package/dist/{chunk-SW7BVEOI.js → chunk-PDQPSTK2.js} +1 -1
  103. package/dist/{chunk-EDHRJQZT.js → chunk-S5YAPC7Q.js} +1 -1
  104. package/dist/{chunk-QJEC2XZH.js → chunk-SAER5A5P.js} +2 -2
  105. package/dist/{chunk-2SSTJDRV.js → chunk-SQQSMYAK.js} +1 -1
  106. package/dist/{chunk-YER6BEBM.js → chunk-SVI2275S.js} +1 -1
  107. package/dist/{chunk-WM2CPCBH.js → chunk-TN5RHSI5.js} +1 -1
  108. package/dist/{chunk-XHQ6BRGS.js → chunk-TR6724R3.js} +1 -1
  109. package/dist/{chunk-UN5BTYDI.js → chunk-UHAGUNRC.js} +1 -1
  110. package/dist/{chunk-4RQTYNJB.js → chunk-VOVZS7TB.js} +1 -1
  111. package/dist/{chunk-DZSDUUH6.js → chunk-WLYNWP34.js} +1 -1
  112. package/dist/{chunk-6EJS374X.js → chunk-WMOER32I.js} +1 -1
  113. package/dist/{chunk-OOKLFQMR.js → chunk-YSYORPVE.js} +2 -2
  114. package/dist/{chunk-HWFUKEVT.js → chunk-Z4WUD5N3.js} +3 -3
  115. package/dist/{chunk-NB5HDW7O.js → chunk-ZGUUXVSY.js} +2 -2
  116. package/dist/{chunk-MI6QDL4N.js → chunk-ZS4KUY2F.js} +2 -2
  117. package/dist/{chunk-IFL6DM5K.js → chunk-ZVCKMHT7.js} +1 -1
  118. package/dist/{chunk-2DFB7NHX.js → chunk-ZYOS3VXQ.js} +27 -10
  119. package/dist/generated/index.js +101 -101
  120. package/dist/index.js +101 -101
  121. package/dist/styles.css +7 -1
  122. package/package.json +3 -3
  123. package/dist/{chunk-EHEM4QDV.js → chunk-DKE2QLXX.js} +1 -1
  124. package/dist/{chunk-N2I2WGZN.js → chunk-MENY4GKL.js} +1 -1
  125. package/dist/{chunk-5V52XBVL.js → chunk-TJFJMMCR.js} +1 -1
  126. package/dist/{chunk-7RFF2FUG.js → chunk-UIRMNARM.js} +1 -1
  127. package/dist/{chunk-NLYURJUF.js → chunk-Y3VQQUOL.js} +1 -1
  128. package/dist/{chunk-XSJNLTA6.js → chunk-Y4A7AYX4.js} +1 -1
@@ -3,13 +3,13 @@ import { List, ListItem } from './chunk-Q7ZP6UPU.js';
3
3
  import { FileDrop, FilePickButton } from './chunk-ICIWCUDN.js';
4
4
  import { StepList, Stepper } from './chunk-2MN3RNRM.js';
5
5
  import { Copyable } from './chunk-33KDTRUV.js';
6
- import { Modal } from './chunk-YOGPQDXA.js';
6
+ import { Modal } from './chunk-O5V4YD4A.js';
7
7
  import { Callout } from './chunk-XJLGQ7U7.js';
8
8
  import { Tag } from './chunk-ASBBB5AJ.js';
9
9
  import { Text } from './chunk-475DOAWF.js';
10
10
  import { Disclosure } from './chunk-RUROK3EU.js';
11
11
  import { Button, ButtonLink } from './chunk-YVMIT2OW.js';
12
- import { FormField, Input } from './chunk-NLYURJUF.js';
12
+ import { FormField, Input } from './chunk-Y3VQQUOL.js';
13
13
  import { headingTag, useHeadingLevel } from './chunk-PQADV6P6.js';
14
14
  import { cx } from './chunk-ODEQTPFM.js';
15
15
  import './AgentIdentity-KQWGKBNT.css';
@@ -1,6 +1,6 @@
1
1
  import { Toolbar } from './chunk-NPEI2QAN.js';
2
2
  import { Popover } from './chunk-SWZV6R46.js';
3
- import { Input } from './chunk-NLYURJUF.js';
3
+ import { Input } from './chunk-Y3VQQUOL.js';
4
4
  import { Tooltip } from './chunk-ZF5ELYJ3.js';
5
5
  import { isComposing } from './chunk-EDPMHSLZ.js';
6
6
  import { cx } from './chunk-ODEQTPFM.js';
@@ -1,4 +1,4 @@
1
- import { FormField } from './chunk-NLYURJUF.js';
1
+ import { FormField } from './chunk-Y3VQQUOL.js';
2
2
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './Checkbox-GAMV2XD7.css';
@@ -1,4 +1,4 @@
1
- import { SegmentedControl } from './chunk-AWBLC4KR.js';
1
+ import { SegmentedControl } from './chunk-2XC4MYBB.js';
2
2
  import { Button } from './chunk-YVMIT2OW.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './MergeConflicts-HCXPRQVR.css';
@@ -1,4 +1,4 @@
1
- import { Checkbox } from './chunk-YER6BEBM.js';
1
+ import { Checkbox } from './chunk-SVI2275S.js';
2
2
  import { IconButton } from './chunk-66H4BC5Z.js';
3
3
  import { cx } from './chunk-ODEQTPFM.js';
4
4
  import './MemberPicker-ZD35VEK6.css';
@@ -1,7 +1,7 @@
1
1
  import { useReorder } from './chunk-ETWGKTMC.js';
2
2
  import { Kbd } from './chunk-25LIX6UI.js';
3
3
  import { Button } from './chunk-YVMIT2OW.js';
4
- import { FormField, Textarea } from './chunk-NLYURJUF.js';
4
+ import { FormField, Textarea } from './chunk-Y3VQQUOL.js';
5
5
  import { characterCountState, CharacterCount, countCharacters } from './chunk-BGVJBX7E.js';
6
6
  import { announce } from './chunk-AZQBGKPR.js';
7
7
  import { IconButton } from './chunk-66H4BC5Z.js';
@@ -1,5 +1,5 @@
1
1
  import { Button } from './chunk-YVMIT2OW.js';
2
- import { FormField } from './chunk-NLYURJUF.js';
2
+ import { FormField } from './chunk-Y3VQQUOL.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,4 +1,4 @@
1
- import { SegmentedControl } from './chunk-AWBLC4KR.js';
1
+ import { SegmentedControl } from './chunk-2XC4MYBB.js';
2
2
  import { cx } from './chunk-ODEQTPFM.js';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
@@ -1,6 +1,6 @@
1
1
  import { Switch } from './chunk-6YYRFGXO.js';
2
2
  import { useReorder } from './chunk-ETWGKTMC.js';
3
- import { Checkbox } from './chunk-YER6BEBM.js';
3
+ import { Checkbox } from './chunk-SVI2275S.js';
4
4
  import { IconButton } from './chunk-66H4BC5Z.js';
5
5
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
6
6
  import { cx } from './chunk-ODEQTPFM.js';
@@ -1,6 +1,6 @@
1
1
  import { Toolbar } from './chunk-NPEI2QAN.js';
2
- import { SegmentedControl } from './chunk-AWBLC4KR.js';
3
- import { tabId } from './chunk-XSJNLTA6.js';
2
+ import { SegmentedControl } from './chunk-2XC4MYBB.js';
3
+ import { tabId } from './chunk-Y4A7AYX4.js';
4
4
  import { IconButton } from './chunk-66H4BC5Z.js';
5
5
  import { cx } from './chunk-ODEQTPFM.js';
6
6
  import './MarkdownEditor-BLCJRGDC.css';
@@ -2,10 +2,10 @@ import { useListbox, useOptionKeys } from './chunk-KW7T23RT.js';
2
2
  import { KeyChip, highlightMatch } from './chunk-HBDA76EZ.js';
3
3
  import { Skeleton } from './chunk-WFAJYBLX.js';
4
4
  import { Popover } from './chunk-SWZV6R46.js';
5
- import { Modal } from './chunk-YOGPQDXA.js';
6
- import { Text } from './chunk-475DOAWF.js';
7
5
  import { useMediaMatch } from './chunk-COS6LJ4K.js';
8
- import { Input } from './chunk-NLYURJUF.js';
6
+ import { Modal } from './chunk-O5V4YD4A.js';
7
+ import { Text } from './chunk-475DOAWF.js';
8
+ import { Input } from './chunk-Y3VQQUOL.js';
9
9
  import { announce } from './chunk-AZQBGKPR.js';
10
10
  import { focusables, isComposing } from './chunk-EDPMHSLZ.js';
11
11
  import { returnFocus } from './chunk-4ITETIGZ.js';
@@ -1,7 +1,7 @@
1
1
  import { Select } from './chunk-DPCXOBXN.js';
2
- import { Combobox } from './chunk-YXRMGI4B.js';
2
+ import { Combobox } from './chunk-6SW4NH2E.js';
3
3
  import { Button } from './chunk-YVMIT2OW.js';
4
- import { FormField, Textarea, InputAffix } from './chunk-NLYURJUF.js';
4
+ import { FormField, Textarea, InputAffix } from './chunk-Y3VQQUOL.js';
5
5
  import { cx } from './chunk-ODEQTPFM.js';
6
6
  import './Input-YVCNNTYT.css';
7
7
  import './VisuallyHidden-OUYVMKEH.css';
@@ -1,6 +1,6 @@
1
1
  import { Select } from './chunk-DPCXOBXN.js';
2
- import { typedNumber, NumberField } from './chunk-4ODGBPYT.js';
3
- import { PresetChips } from './chunk-DZSDUUH6.js';
2
+ import { typedNumber, NumberField } from './chunk-5TRZSIUJ.js';
3
+ import { PresetChips } from './chunk-WLYNWP34.js';
4
4
  import { cx } from './chunk-ODEQTPFM.js';
5
5
  import './DurationField-TJFIAUMW.css';
6
6
  import { useId } from 'react';
@@ -1,4 +1,4 @@
1
- import { ConfirmModal } from './chunk-YOGPQDXA.js';
1
+ import { ConfirmModal } from './chunk-O5V4YD4A.js';
2
2
  import { Callout } from './chunk-XJLGQ7U7.js';
3
3
  import { InlineCode } from './chunk-E3XKFND2.js';
4
4
  import './LinkInterstitial-ET4MSVSV.css';
@@ -1,16 +1,20 @@
1
1
  import { useSendOnEnter, SendKeysHint } from './chunk-K657TVMA.js';
2
2
  import { useDictationSlot } from './chunk-CI4HUVNI.js';
3
- import { Textarea } from './chunk-NLYURJUF.js';
3
+ import { Textarea } from './chunk-Y3VQQUOL.js';
4
4
  import { useComposedRef } from './chunk-L72URIHR.js';
5
+ import { isComposing } from './chunk-EDPMHSLZ.js';
5
6
  import { VisuallyHidden } from './chunk-RRRK2KB6.js';
6
7
  import { cx } from './chunk-ODEQTPFM.js';
7
8
  import './ChatScale-LGESYXCO.css';
8
- import './Composer-YCD6UPMO.css';
9
+ import './Composer-4E7TRJFG.css';
9
10
  import './Dictation-MGLRANB4.css';
10
11
  import { forwardRef, useId, useRef } from 'react';
11
12
  import { jsxs, jsx } from 'react/jsx-runtime';
12
13
 
13
14
  var COMPOSER_COUNTER_AT = 0.8;
15
+ function oneLine(text) {
16
+ return text.replace(/[ \t]*\r?\n[ \t]*/g, " ");
17
+ }
14
18
  var Composer = forwardRef(function Composer2({
15
19
  value,
16
20
  onChange,
@@ -28,6 +32,7 @@ var Composer = forwardRef(function Composer2({
28
32
  attachmentsLabel = "Attached to this message",
29
33
  disabledReason,
30
34
  dictation,
35
+ singleLine = false,
31
36
  disabled: disabledProp,
32
37
  placeholder,
33
38
  maxLength,
@@ -41,7 +46,8 @@ var Composer = forwardRef(function Composer2({
41
46
  const reasonId = useId();
42
47
  const dictatingId = useId();
43
48
  const disabled = Boolean(disabledProp) || disabledReason !== void 0;
44
- const inline = present(trailing);
49
+ const inline = present(trailing) || singleLine;
50
+ const change = singleLine ? (next) => onChange(oneLine(next)) : onChange;
45
51
  const near = maxLength !== void 0 && value.length >= maxLength * COMPOSER_COUNTER_AT;
46
52
  const field = useRef(null);
47
53
  const fieldRef = useComposedRef(ref, field);
@@ -49,14 +55,15 @@ var Composer = forwardRef(function Composer2({
49
55
  label,
50
56
  field,
51
57
  value,
52
- onChange,
58
+ onChange: change,
53
59
  heldReason: disabled ? disabledReason ?? "" : void 0
54
60
  });
55
61
  const live = dictate?.live ?? false;
56
62
  const active = dictate?.active ?? false;
57
63
  const hasActions = present(actions) || present(tools) || dictate !== null && !inline;
58
64
  const send = useSendOnEnter({
59
- onSend: disabled ? void 0 : onSubmit,
65
+ // One line has no line to write: its Enter is answered below, and no keys are described.
66
+ onSend: disabled || singleLine ? void 0 : onSubmit,
60
67
  canSend: canSubmit ?? value.trim() !== "",
61
68
  labels: sendLabels
62
69
  });
@@ -64,7 +71,15 @@ var Composer = forwardRef(function Composer2({
64
71
  const keyDown = (event) => {
65
72
  if (dictate?.keyDown(event)) return;
66
73
  onKeyDown?.(event);
67
- send.onKeyDown(event);
74
+ if (singleLine) enterOnOneLine(event);
75
+ else send.onKeyDown(event);
76
+ };
77
+ const enterOnOneLine = (event) => {
78
+ if (event.key !== "Enter" || event.defaultPrevented || isComposing(event)) return;
79
+ event.preventDefault();
80
+ if (event.shiftKey || event.altKey || disabled) return;
81
+ if (!onSubmit) event.currentTarget.form?.requestSubmit();
82
+ else if (canSubmit ?? value.trim() !== "") onSubmit();
68
83
  };
69
84
  return /* @__PURE__ */ jsxs(
70
85
  "div",
@@ -73,6 +88,7 @@ var Composer = forwardRef(function Composer2({
73
88
  "crewlet-composer",
74
89
  appearance === "chat" && "crewlet-composer--chat",
75
90
  inline && "crewlet-composer--inline",
91
+ singleLine && "crewlet-composer--single-line",
76
92
  value === "" && "is-empty",
77
93
  disabled && "is-disabled",
78
94
  live && "is-dictating",
@@ -89,13 +105,14 @@ var Composer = forwardRef(function Composer2({
89
105
  className: "crewlet-composer__field",
90
106
  "aria-label": label,
91
107
  role,
92
- "aria-multiline": role === void 0 || role === "textbox" ? true : void 0,
108
+ "aria-multiline": singleLine ? false : role === void 0 || role === "textbox" ? true : void 0,
93
109
  "aria-describedby": cx(describedBy, !active && send.describedBy, disabledReason === void 0 ? void 0 : reasonId, live && dictatingId) || void 0,
94
110
  value,
95
- onChange: (event) => onChange(event.target.value),
111
+ onChange: (event) => change(event.target.value),
96
112
  onKeyDown: keyDown,
97
113
  maxLength,
98
- rows: rows ?? (inline ? 1 : 3),
114
+ rows: singleLine ? 1 : rows ?? (inline ? 1 : 3),
115
+ wrap: singleLine ? "off" : void 0,
99
116
  disabled,
100
117
  placeholder: live ? "" : disabledReason ?? placeholder,
101
118
  autoResize: true,
@@ -104,7 +121,7 @@ var Composer = forwardRef(function Composer2({
104
121
  }
105
122
  ),
106
123
  dictate?.layer,
107
- inline ? /* @__PURE__ */ jsxs("div", { className: "crewlet-composer__trailing", children: [
124
+ inline && (dictate !== null || present(trailing)) ? /* @__PURE__ */ jsxs("div", { className: "crewlet-composer__trailing", children: [
108
125
  dictate?.controls,
109
126
  live ? null : trailing
110
127
  ] }) : null