@orbitcommerce/constellation 1.3.0 → 1.6.1
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.
- package/CHANGELOG.md +56 -0
- package/dist/index.cjs +1815 -1594
- package/dist/index.d.cts +65 -9
- package/dist/index.d.ts +65 -9
- package/dist/modules/charts/BarChart.js +4 -3
- package/dist/modules/chunks/{chunk-S232CFQU.js → chunk-235JELUM.js} +1 -1
- package/dist/modules/chunks/{chunk-TSLWTTQC.js → chunk-2X7GDWRI.js} +1 -1
- package/dist/modules/chunks/{chunk-CG5SXXYK.js → chunk-2YL6WDRC.js} +1 -1
- package/dist/modules/chunks/{chunk-ZWLXFJSB.js → chunk-3MPC53GY.js} +3 -3
- package/dist/modules/chunks/{chunk-T7Y6VU4F.js → chunk-3NZN54VW.js} +10 -7
- package/dist/modules/chunks/{chunk-XEJORWIC.js → chunk-3ZN6AC3M.js} +32 -3
- package/dist/modules/chunks/{chunk-JCNIKI4N.js → chunk-46TBVWXT.js} +2 -2
- package/dist/modules/chunks/{chunk-O34IV7O7.js → chunk-4BBECMFT.js} +2 -2
- package/dist/modules/chunks/{chunk-X6AGAAEL.js → chunk-5LKQQZ4T.js} +2 -2
- package/dist/modules/chunks/{chunk-5SGUHHUD.js → chunk-63B67WFG.js} +1 -1
- package/dist/modules/chunks/{chunk-G7OBJV5U.js → chunk-6HMCU2AL.js} +7 -6
- package/dist/modules/chunks/{chunk-T5XBIQ5C.js → chunk-6SJQ3ZRX.js} +2 -2
- package/dist/modules/chunks/{chunk-T4URSDXR.js → chunk-7RU3UNBI.js} +7 -6
- package/dist/modules/chunks/{chunk-5TVKJLSP.js → chunk-AYPDPYCT.js} +1 -1
- package/dist/modules/chunks/{chunk-PKANW3SX.js → chunk-D5HYV7XX.js} +10 -7
- package/dist/modules/chunks/{chunk-CG65BUMB.js → chunk-FFHCIIPT.js} +7 -7
- package/dist/modules/chunks/{chunk-OVBFLH52.js → chunk-FPGIRIYV.js} +7 -4
- package/dist/modules/chunks/{chunk-M5NVIQ6V.js → chunk-GCY7DIKT.js} +2 -2
- package/dist/modules/chunks/{chunk-KUWUH34C.js → chunk-GGC533YU.js} +1 -1
- package/dist/modules/chunks/chunk-GWHK2UME.js +46 -0
- package/dist/modules/chunks/{chunk-LY2FMTW5.js → chunk-HEOHMVYX.js} +3 -3
- package/dist/modules/chunks/{chunk-DD2HCDXR.js → chunk-HPOHK3AH.js} +2 -2
- package/dist/modules/chunks/{chunk-V7LFKDIO.js → chunk-I5ISEEYS.js} +2 -2
- package/dist/modules/chunks/{chunk-HZHVJ6BL.js → chunk-IBI7TXPK.js} +2 -2
- package/dist/modules/chunks/{chunk-AP35LMXV.js → chunk-IEY5MUSU.js} +2 -2
- package/dist/modules/chunks/{chunk-3TJJMIED.js → chunk-JG5JXT2T.js} +1 -1
- package/dist/modules/chunks/{chunk-GVZRHUKZ.js → chunk-JNVHWDKU.js} +1 -1
- package/dist/modules/chunks/{chunk-YCS3IVCC.js → chunk-JVBEOEPM.js} +1 -1
- package/dist/modules/chunks/{chunk-LWZNQ5D2.js → chunk-KFXMK7EN.js} +42 -13
- package/dist/modules/chunks/{chunk-GDN4BIBD.js → chunk-KUIT3YF5.js} +1 -1
- package/dist/modules/chunks/{chunk-L66XCV4Q.js → chunk-L2RDEOSH.js} +2 -2
- package/dist/modules/chunks/{chunk-F45EHC7Z.js → chunk-L5XFXYEI.js} +7 -5
- package/dist/modules/chunks/{chunk-RYXMMARS.js → chunk-L6CJ6Q6O.js} +2 -2
- package/dist/modules/chunks/{chunk-RFEZFKI2.js → chunk-LTM4RGJD.js} +1 -1
- package/dist/modules/chunks/{chunk-MJ6RMGBN.js → chunk-MM6K7U26.js} +2 -2
- package/dist/modules/chunks/{chunk-TV6TK45W.js → chunk-MUDYZWUI.js} +2 -2
- package/dist/modules/chunks/{chunk-YQLMCZAU.js → chunk-MVCOR756.js} +3 -3
- package/dist/modules/chunks/chunk-MX6Q7VVR.js +35 -0
- package/dist/modules/chunks/{chunk-A7DZQNQP.js → chunk-NGBEWQS5.js} +1 -1
- package/dist/modules/chunks/{chunk-E43TEFHQ.js → chunk-NMRHKOJI.js} +2 -2
- package/dist/modules/chunks/{chunk-G7I2MU2G.js → chunk-NN6GABIZ.js} +1 -1
- package/dist/modules/chunks/{chunk-Z2QNWQME.js → chunk-NOUIUH7N.js} +1 -1
- package/dist/modules/chunks/{chunk-QJDMT2X6.js → chunk-O3U2DOBQ.js} +1 -1
- package/dist/modules/chunks/{chunk-L4BFJQUU.js → chunk-OCAD2MFA.js} +2 -2
- package/dist/modules/chunks/{chunk-QYZ5S64O.js → chunk-PHYKB4VS.js} +1 -1
- package/dist/modules/chunks/{chunk-5AJJKEPJ.js → chunk-PYZWY6PQ.js} +1 -1
- package/dist/modules/chunks/{chunk-WM5KOSDK.js → chunk-Q6PEBYPV.js} +8 -4
- package/dist/modules/chunks/{chunk-GFC44YRX.js → chunk-R23WKKHG.js} +1 -1
- package/dist/modules/chunks/{chunk-3PFBTYPP.js → chunk-R5P6PTKK.js} +1 -1
- package/dist/modules/chunks/{chunk-XGKIOBY6.js → chunk-RGTMBLKB.js} +2 -2
- package/dist/modules/chunks/{chunk-U3EOGBZ7.js → chunk-RK36Z2I5.js} +3 -1
- package/dist/modules/chunks/{chunk-4ZTGSHGE.js → chunk-RQ6WILQS.js} +7 -7
- package/dist/modules/chunks/{chunk-JOJWFWIF.js → chunk-SR6PPYIX.js} +1 -1
- package/dist/modules/chunks/{chunk-CVXG3GYS.js → chunk-UTMJTNSR.js} +2 -2
- package/dist/modules/chunks/{chunk-WAVDSHPC.js → chunk-UUY3OZYL.js} +1 -1
- package/dist/modules/chunks/{chunk-LM74WTYW.js → chunk-VNGZPEUN.js} +2 -2
- package/dist/modules/chunks/{chunk-7DNZLQW6.js → chunk-W6ZI3QJZ.js} +4 -4
- package/dist/modules/chunks/{chunk-UPE3TIY3.js → chunk-WLVJ5KTF.js} +4 -4
- package/dist/modules/chunks/{chunk-NYXMCKSQ.js → chunk-WMIGI5HM.js} +40 -5
- package/dist/modules/chunks/{chunk-KT3NYSJR.js → chunk-XU4EF276.js} +6 -6
- package/dist/modules/chunks/{chunk-IJ34OAQ4.js → chunk-XUQURQTL.js} +5 -5
- package/dist/modules/chunks/{chunk-NR6LFMY7.js → chunk-YUHONUXY.js} +2 -2
- package/dist/modules/chunks/{chunk-3CFDUXGR.js → chunk-ZLCWEGWD.js} +1 -1
- package/dist/modules/chunks/{chunk-HW6KLO3K.js → chunk-ZQZWDN4C.js} +2 -2
- package/dist/modules/components/AddFilter.js +4 -4
- package/dist/modules/components/AddressAutocomplete.js +6 -6
- package/dist/modules/components/AddressFields.js +13 -11
- package/dist/modules/components/Alert.js +7 -7
- package/dist/modules/components/Avatar.js +3 -2
- package/dist/modules/components/AvatarUpload.js +7 -7
- package/dist/modules/components/BoardCard.js +3 -2
- package/dist/modules/components/Button.js +3 -2
- package/dist/modules/components/Calendar.js +4 -3
- package/dist/modules/components/CaretSuggestions.js +3 -3
- package/dist/modules/components/ChatComposer.js +71 -24
- package/dist/modules/components/Checkbox.js +7 -7
- package/dist/modules/components/ChecklistCard.js +3 -2
- package/dist/modules/components/ChipList.js +3 -3
- package/dist/modules/components/Coachmark.js +4 -4
- package/dist/modules/components/CodeBlock.js +4 -3
- package/dist/modules/components/ColorField.js +9 -9
- package/dist/modules/components/ColorPicker.js +7 -7
- package/dist/modules/components/ColumnMapper.js +8 -8
- package/dist/modules/components/Combobox.js +10 -8
- package/dist/modules/components/CommentBox.js +7 -7
- package/dist/modules/components/Composer.js +12 -12
- package/dist/modules/components/ConditionBuilder.js +26 -24
- package/dist/modules/components/ContextMenu.js +2 -2
- package/dist/modules/components/CopyButton.js +4 -3
- package/dist/modules/components/CopyField.js +12 -8
- package/dist/modules/components/DangerZone.js +3 -2
- package/dist/modules/components/DateInput.js +13 -11
- package/dist/modules/components/DatePicker.js +12 -10
- package/dist/modules/components/DescriptionList.js +4 -3
- package/dist/modules/components/DeviceSwitcher.js +8 -8
- package/dist/modules/components/Dialog.js +8 -8
- package/dist/modules/components/DrillMenu.js +7 -7
- package/dist/modules/components/Dropzone.js +5 -5
- package/dist/modules/components/EmojiPicker.js +6 -6
- package/dist/modules/components/EmptyState.js +4 -3
- package/dist/modules/components/FacetFilters.js +51 -16
- package/dist/modules/components/FieldHelp.js +3 -3
- package/dist/modules/components/FigurePanel.js +4 -3
- package/dist/modules/components/FigureStrip.js +5 -4
- package/dist/modules/components/FigureTabs.js +5 -4
- package/dist/modules/components/FileChip.js +7 -7
- package/dist/modules/components/FilterEditors.js +14 -12
- package/dist/modules/components/FilterPill.js +5 -5
- package/dist/modules/components/FontPicker.js +12 -12
- package/dist/modules/components/Gallery.js +4 -4
- package/dist/modules/components/GifPicker.js +6 -6
- package/dist/modules/components/GradientEditor.js +13 -11
- package/dist/modules/components/GroupedChecklist.js +8 -8
- package/dist/modules/components/IconPicker.js +7 -7
- package/dist/modules/components/ImageCropper.js +11 -9
- package/dist/modules/components/ImageField.js +13 -11
- package/dist/modules/components/ImportResult.js +7 -7
- package/dist/modules/components/InlineConfirm.js +6 -6
- package/dist/modules/components/InlineEdit.js +9 -9
- package/dist/modules/components/Input.js +4 -4
- package/dist/modules/components/JobIndicator.js +6 -6
- package/dist/modules/components/Kanban.js +8 -8
- package/dist/modules/components/LinkPicker.js +9 -9
- package/dist/modules/components/LogViewer.js +3 -2
- package/dist/modules/components/MarkdownField.js +6 -6
- package/dist/modules/components/Menu.js +2 -2
- package/dist/modules/components/MessageBubble.js +7 -7
- package/dist/modules/components/MessageThread.js +6 -6
- package/dist/modules/components/MonthCalendar.js +7 -7
- package/dist/modules/components/NumberInput.js +7 -5
- package/dist/modules/components/OtpInput.js +15 -7
- package/dist/modules/components/PackageDimensions.js +5 -5
- package/dist/modules/components/Pagination.js +4 -3
- package/dist/modules/components/PasswordField.js +7 -7
- package/dist/modules/components/PersonCell.js +3 -2
- package/dist/modules/components/PhoneInput.js +4 -4
- package/dist/modules/components/PlanCard.js +3 -2
- package/dist/modules/components/PlanComparison.js +4 -3
- package/dist/modules/components/PlanGrid.js +9 -9
- package/dist/modules/components/Popover.js +2 -2
- package/dist/modules/components/PreviewFrame.js +8 -8
- package/dist/modules/components/PrintPage.js +8 -8
- package/dist/modules/components/RadioGroup.js +4 -4
- package/dist/modules/components/RadiusControl.js +11 -9
- package/dist/modules/components/RecordPager.js +6 -6
- package/dist/modules/components/Repeater.js +7 -7
- package/dist/modules/components/ReplyFeedback.js +3 -2
- package/dist/modules/components/RichTextEditor.js +15 -15
- package/dist/modules/components/RowList.js +4 -4
- package/dist/modules/components/RuleList.js +10 -10
- package/dist/modules/components/Schedule.js +14 -12
- package/dist/modules/components/SearchField.js +5 -5
- package/dist/modules/components/SearchMenu.js +3 -3
- package/dist/modules/components/SecretField.js +7 -7
- package/dist/modules/components/SegmentedControl.js +6 -6
- package/dist/modules/components/Select.js +5 -5
- package/dist/modules/components/SettingRow.js +14 -12
- package/dist/modules/components/Sheet.js +5 -5
- package/dist/modules/components/SidePanel.js +3 -2
- package/dist/modules/components/SkeletonRow.js +4 -3
- package/dist/modules/components/Slider.js +7 -5
- package/dist/modules/components/SortableGroup.js +3 -3
- package/dist/modules/components/SortableList.js +3 -3
- package/dist/modules/components/SortableTree.js +6 -6
- package/dist/modules/components/SpacingBox.js +14 -10
- package/dist/modules/components/SplitButton.js +4 -4
- package/dist/modules/components/SplitPane.js +3 -2
- package/dist/modules/components/Stepper.js +3 -2
- package/dist/modules/components/Table.js +4 -3
- package/dist/modules/components/TableReorder.js +7 -7
- package/dist/modules/components/Tabs.js +5 -5
- package/dist/modules/components/TagInput.js +9 -9
- package/dist/modules/components/TaskCard.js +6 -6
- package/dist/modules/components/Textarea.js +5 -5
- package/dist/modules/components/Thumbnail.js +7 -7
- package/dist/modules/components/TimeInput.js +8 -6
- package/dist/modules/components/TimeRangeInput.js +9 -7
- package/dist/modules/components/TimeZoneSelect.js +11 -9
- package/dist/modules/components/Toast.js +4 -3
- package/dist/modules/components/Toolbar.js +8 -8
- package/dist/modules/components/Tooltip.js +2 -1
- package/dist/modules/components/TranslationField.js +7 -7
- package/dist/modules/components/TreeChecklist.js +9 -9
- package/dist/modules/components/TreeSelect.js +13 -11
- package/dist/modules/components/TreeView.js +5 -4
- package/dist/modules/components/UnitInput.js +9 -7
- package/dist/modules/components/UrlUploadInput.js +4 -4
- package/dist/modules/components/ValueChange.js +4 -3
- package/dist/modules/components/WeeklyHours.js +14 -12
- package/dist/modules/components/WorkingStatus.js +7 -7
- package/dist/modules/components/builder/CanvasChrome.js +11 -11
- package/dist/modules/components/builder/DropIndicator.js +2 -2
- package/dist/modules/components/builder/ElementToolbar.js +17 -17
- package/dist/modules/components/builder/PaletteTile.js +2 -1
- package/dist/modules/components/builder/SaveStatus.js +2 -1
- package/dist/modules/components/presence/CollabField.js +8 -8
- package/dist/modules/components/presence/CollisionWarning.js +7 -7
- package/dist/modules/components/presence/ConflictChooser.js +8 -8
- package/dist/modules/components/presence/PresenceAvatars.js +3 -2
- package/dist/modules/components/sortable/scope.js +2 -2
- package/dist/modules/shell/Sidebar.js +2 -1
- package/dist/modules/shell/TopBar.js +2 -1
- package/dist/modules/stripe/HostedEmbed.js +4 -3
- package/dist/modules/utils/anchoredOverlay.js +3 -1
- package/dist/modules/utils/portalContainer.js +3 -1
- package/dist/styles/components/combobox.css +4 -0
- package/dist/styles/components/command.css +8 -1
- package/dist/styles/components/composer.css +6 -0
- package/dist/styles/components/dialog.css +1 -1
- package/dist/styles/components/message-bubble.css +5 -0
- package/dist/styles/components/tooltip.css +16 -0
- package/dist/styles.css +40 -2
- package/package.json +1 -1
- package/dist/modules/chunks/chunk-YKTVZWSO.js +0 -19
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
moveItem
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-R5P6PTKK.js";
|
|
5
5
|
import {
|
|
6
6
|
SORTABLE_INSTRUCTIONS,
|
|
7
7
|
sortableAnnouncements,
|
|
8
8
|
useSortable
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3MPC53GY.js";
|
|
10
10
|
import {
|
|
11
11
|
defaultComboboxFilter,
|
|
12
12
|
useComboboxSearch
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
focusFromFrame,
|
|
22
22
|
useMergedRef
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-LTM4RGJD.js";
|
|
24
24
|
import {
|
|
25
25
|
MessageGlyph
|
|
26
26
|
} from "./chunk-WK2WAJLO.js";
|
|
@@ -28,13 +28,13 @@ import {
|
|
|
28
28
|
Popover,
|
|
29
29
|
PopoverAnchor,
|
|
30
30
|
PopoverContent
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-KUIT3YF5.js";
|
|
32
32
|
import {
|
|
33
33
|
useFieldControl
|
|
34
34
|
} from "./chunk-EZ3ZLKQV.js";
|
|
35
35
|
import {
|
|
36
36
|
Button
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-AYPDPYCT.js";
|
|
38
38
|
import {
|
|
39
39
|
withDefaultLabels
|
|
40
40
|
} from "./chunk-IZLKBJTU.js";
|
|
@@ -554,7 +554,8 @@ var TagInput = forwardRef(function TagInput2({
|
|
|
554
554
|
const handlePaste = (event) => {
|
|
555
555
|
onPaste?.(event);
|
|
556
556
|
if (event.defaultPrevented) return;
|
|
557
|
-
const pasted = event.clipboardData
|
|
557
|
+
const pasted = event.clipboardData?.getData("text") ?? "";
|
|
558
|
+
if (!pasted) return;
|
|
558
559
|
if (saving) {
|
|
559
560
|
sayWait();
|
|
560
561
|
return;
|
|
@@ -8,10 +8,14 @@ import {
|
|
|
8
8
|
roundTo,
|
|
9
9
|
stepNumber
|
|
10
10
|
} from "./chunk-VIFF3FNJ.js";
|
|
11
|
+
import {
|
|
12
|
+
holdsFocus,
|
|
13
|
+
selectFieldOnFocus
|
|
14
|
+
} from "./chunk-GWHK2UME.js";
|
|
11
15
|
import {
|
|
12
16
|
Input,
|
|
13
17
|
useMergedRef
|
|
14
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LTM4RGJD.js";
|
|
15
19
|
import {
|
|
16
20
|
useFieldControl
|
|
17
21
|
} from "./chunk-EZ3ZLKQV.js";
|
|
@@ -133,17 +137,14 @@ var NumberInput = forwardRef(function NumberInput2({
|
|
|
133
137
|
if (!selectPending.current || !editing) return;
|
|
134
138
|
selectPending.current = false;
|
|
135
139
|
const input = inputRef.current;
|
|
136
|
-
if (input &&
|
|
140
|
+
if (input && holdsFocus(input)) input.select();
|
|
137
141
|
}, [editing, draft]);
|
|
138
142
|
const handleFocus = (event) => {
|
|
139
143
|
focusedValue.current = committed;
|
|
140
144
|
setEditing(true);
|
|
141
145
|
setDraft(editableOf(committed));
|
|
142
146
|
onFocus?.(event);
|
|
143
|
-
if (selectOnFocus)
|
|
144
|
-
selectPending.current = true;
|
|
145
|
-
event.currentTarget.select();
|
|
146
|
-
}
|
|
147
|
+
if (selectOnFocus) selectPending.current = selectFieldOnFocus(event.currentTarget);
|
|
147
148
|
};
|
|
148
149
|
const handleBlur = (event) => {
|
|
149
150
|
commitDraft();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
TreeView
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-I5ISEEYS.js";
|
|
5
5
|
import {
|
|
6
6
|
defaultTreeFilter,
|
|
7
7
|
walkTree
|
|
@@ -11,22 +11,25 @@ import {
|
|
|
11
11
|
} from "./chunk-PAR74FJY.js";
|
|
12
12
|
import {
|
|
13
13
|
SearchField
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NGBEWQS5.js";
|
|
15
15
|
import {
|
|
16
16
|
useComboboxPlacement
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WMIGI5HM.js";
|
|
18
|
+
import {
|
|
19
|
+
selectFieldOnFocus
|
|
20
|
+
} from "./chunk-GWHK2UME.js";
|
|
18
21
|
import {
|
|
19
22
|
Skeleton
|
|
20
23
|
} from "./chunk-DEBQQLOX.js";
|
|
21
24
|
import {
|
|
22
25
|
Input,
|
|
23
26
|
useMergedRef
|
|
24
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-LTM4RGJD.js";
|
|
25
28
|
import {
|
|
26
29
|
Popover,
|
|
27
30
|
PopoverAnchor,
|
|
28
31
|
PopoverContent
|
|
29
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-KUIT3YF5.js";
|
|
30
33
|
import {
|
|
31
34
|
FieldContext,
|
|
32
35
|
fieldRequiredProps,
|
|
@@ -35,7 +38,7 @@ import {
|
|
|
35
38
|
import {
|
|
36
39
|
Button,
|
|
37
40
|
IconButton
|
|
38
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-AYPDPYCT.js";
|
|
39
42
|
import {
|
|
40
43
|
withDefaultLabels
|
|
41
44
|
} from "./chunk-IZLKBJTU.js";
|
|
@@ -495,7 +498,7 @@ var TreeSelect = forwardRef(function TreeSelect2({
|
|
|
495
498
|
const onFocus = (event) => {
|
|
496
499
|
if (disabled) return;
|
|
497
500
|
if (openOnFocus && !quiet.current) openPanel();
|
|
498
|
-
else if (chosenLabel && !openRef.current) event.currentTarget
|
|
501
|
+
else if (chosenLabel && !openRef.current) selectFieldOnFocus(event.currentTarget);
|
|
499
502
|
};
|
|
500
503
|
if (inline) {
|
|
501
504
|
return /* @__PURE__ */ jsx(
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Slider
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FPGIRIYV.js";
|
|
5
5
|
import {
|
|
6
6
|
FilterSheet,
|
|
7
7
|
useFilterPillClose
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YUHONUXY.js";
|
|
9
9
|
import {
|
|
10
10
|
Calendar
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-63B67WFG.js";
|
|
12
12
|
import {
|
|
13
13
|
RadioGroup,
|
|
14
14
|
RadioGroupItem
|
|
15
15
|
} from "./chunk-743INIQ3.js";
|
|
16
16
|
import {
|
|
17
17
|
SearchField
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-NGBEWQS5.js";
|
|
19
19
|
import {
|
|
20
20
|
Checkbox
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-5LKQQZ4T.js";
|
|
22
22
|
import {
|
|
23
23
|
isThenable
|
|
24
24
|
} from "./chunk-BACB7AM2.js";
|
|
25
25
|
import {
|
|
26
26
|
Input,
|
|
27
27
|
useMergedRef
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-LTM4RGJD.js";
|
|
29
29
|
import {
|
|
30
30
|
Button
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-AYPDPYCT.js";
|
|
32
32
|
import {
|
|
33
33
|
useAnnouncement
|
|
34
34
|
} from "./chunk-6AXW5D3E.js";
|
|
@@ -9,9 +9,13 @@ import {
|
|
|
9
9
|
snapToStep,
|
|
10
10
|
stepNumber
|
|
11
11
|
} from "./chunk-VIFF3FNJ.js";
|
|
12
|
+
import {
|
|
13
|
+
holdsFocus,
|
|
14
|
+
selectFieldOnFocus
|
|
15
|
+
} from "./chunk-GWHK2UME.js";
|
|
12
16
|
import {
|
|
13
17
|
Input
|
|
14
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LTM4RGJD.js";
|
|
15
19
|
import {
|
|
16
20
|
useFieldControl
|
|
17
21
|
} from "./chunk-EZ3ZLKQV.js";
|
|
@@ -312,14 +316,13 @@ var Slider = forwardRef(function Slider2({
|
|
|
312
316
|
const box2 = selectBox.current;
|
|
313
317
|
if (!box2 || editing === null) return;
|
|
314
318
|
selectBox.current = null;
|
|
315
|
-
if (
|
|
319
|
+
if (holdsFocus(box2)) box2.select();
|
|
316
320
|
}, [editing, draft]);
|
|
317
321
|
const onBoxFocus = (index) => (event) => {
|
|
318
322
|
editStart.current = [...latest.current];
|
|
319
323
|
setEditing(index);
|
|
320
324
|
setDraft(editableOf(latest.current[index]));
|
|
321
|
-
selectBox.current = event.currentTarget;
|
|
322
|
-
event.currentTarget.select();
|
|
325
|
+
selectBox.current = selectFieldOnFocus(event.currentTarget) ? event.currentTarget : null;
|
|
323
326
|
};
|
|
324
327
|
const applyDraft = (index, text) => {
|
|
325
328
|
const read = text.trim() === "" ? null : readText(text);
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-2EDZHFFD.js";
|
|
5
5
|
import {
|
|
6
6
|
useMergedRef
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LTM4RGJD.js";
|
|
8
8
|
import {
|
|
9
9
|
Button
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AYPDPYCT.js";
|
|
11
11
|
import {
|
|
12
12
|
withDefaultLabels
|
|
13
13
|
} from "./chunk-IZLKBJTU.js";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
clippingFrom
|
|
4
|
+
} from "./chunk-RK36Z2I5.js";
|
|
5
|
+
|
|
6
|
+
// src/utils/fieldFocus.ts
|
|
7
|
+
var GIVE = 1;
|
|
8
|
+
function isWhollyInView(field) {
|
|
9
|
+
const box = field.getBoundingClientRect();
|
|
10
|
+
const holds = (area) => box.top >= area.top - GIVE && box.left >= area.left - GIVE && box.bottom <= area.bottom + GIVE && box.right <= area.right + GIVE;
|
|
11
|
+
return holds({ top: 0, left: 0, bottom: window.innerHeight, right: window.innerWidth }) && clippingFrom(field).every((area) => holds(area.getBoundingClientRect()));
|
|
12
|
+
}
|
|
13
|
+
function holdsFocus(field) {
|
|
14
|
+
return field.getRootNode().activeElement === field;
|
|
15
|
+
}
|
|
16
|
+
function keepThroughPress(field) {
|
|
17
|
+
const press = new AbortController();
|
|
18
|
+
const { signal } = press;
|
|
19
|
+
const letGo = () => press.abort();
|
|
20
|
+
field.addEventListener("mouseup", (event) => event.preventDefault(), { once: true, signal });
|
|
21
|
+
window.addEventListener("mouseup", letGo, { signal });
|
|
22
|
+
window.addEventListener("mousedown", letGo, { signal, capture: true });
|
|
23
|
+
}
|
|
24
|
+
function selectFieldOnFocus(field) {
|
|
25
|
+
const pressed = field.matches(":active");
|
|
26
|
+
if (pressed || isWhollyInView(field)) {
|
|
27
|
+
field.select();
|
|
28
|
+
if (pressed) keepThroughPress(field);
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
let typed = false;
|
|
32
|
+
const noteTyped = () => typed = true;
|
|
33
|
+
field.addEventListener("beforeinput", noteTyped, { once: true });
|
|
34
|
+
requestAnimationFrame(
|
|
35
|
+
() => setTimeout(() => {
|
|
36
|
+
field.removeEventListener("beforeinput", noteTyped);
|
|
37
|
+
if (!typed && holdsFocus(field)) field.select();
|
|
38
|
+
})
|
|
39
|
+
);
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export {
|
|
44
|
+
holdsFocus,
|
|
45
|
+
selectFieldOnFocus
|
|
46
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Slider
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FPGIRIYV.js";
|
|
5
5
|
import {
|
|
6
6
|
SegmentedControl
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-46TBVWXT.js";
|
|
8
8
|
import {
|
|
9
9
|
IconButton
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AYPDPYCT.js";
|
|
11
11
|
import {
|
|
12
12
|
withDefaultLabels
|
|
13
13
|
} from "./chunk-IZLKBJTU.js";
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
} from "./chunk-M5SAU3Z6.js";
|
|
8
8
|
import {
|
|
9
9
|
SearchField
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NGBEWQS5.js";
|
|
11
11
|
import {
|
|
12
12
|
Popover,
|
|
13
13
|
PopoverContent,
|
|
14
14
|
PopoverTrigger
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KUIT3YF5.js";
|
|
16
16
|
import {
|
|
17
17
|
withDefaultLabels
|
|
18
18
|
} from "./chunk-IZLKBJTU.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-DEBQQLOX.js";
|
|
16
16
|
import {
|
|
17
17
|
EmptyState
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-2YL6WDRC.js";
|
|
19
19
|
import {
|
|
20
20
|
FOCUSABLE_SELECTOR
|
|
21
21
|
} from "./chunk-EOTCMAM5.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
import {
|
|
30
30
|
Button,
|
|
31
31
|
IconButton
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-AYPDPYCT.js";
|
|
33
33
|
import {
|
|
34
34
|
withDefaultLabels
|
|
35
35
|
} from "./chunk-IZLKBJTU.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
DialogFrame
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RQ6WILQS.js";
|
|
5
5
|
import {
|
|
6
6
|
Switch
|
|
7
7
|
} from "./chunk-4SMTZLPN.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
Button,
|
|
15
15
|
IconButton
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-AYPDPYCT.js";
|
|
17
17
|
import {
|
|
18
18
|
withDefaultLabels
|
|
19
19
|
} from "./chunk-IZLKBJTU.js";
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
} from "./chunk-77OOLZ62.js";
|
|
6
6
|
import {
|
|
7
7
|
Alert
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VNGZPEUN.js";
|
|
9
9
|
import {
|
|
10
10
|
Button
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-AYPDPYCT.js";
|
|
12
12
|
import {
|
|
13
13
|
withDefaultLabels
|
|
14
14
|
} from "./chunk-IZLKBJTU.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
CaretSuggestions
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-L5XFXYEI.js";
|
|
5
5
|
import {
|
|
6
6
|
FileChip,
|
|
7
7
|
FileChipRow
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZQZWDN4C.js";
|
|
9
9
|
import {
|
|
10
10
|
useFileDrop
|
|
11
11
|
} from "./chunk-6NR6IYU4.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
Toolbar,
|
|
17
17
|
ToolbarButton,
|
|
18
18
|
ToolbarSpacer
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-W6ZI3QJZ.js";
|
|
20
20
|
import {
|
|
21
21
|
isThenable
|
|
22
22
|
} from "./chunk-BACB7AM2.js";
|
|
@@ -28,17 +28,17 @@ import {
|
|
|
28
28
|
} from "./chunk-2EDZHFFD.js";
|
|
29
29
|
import {
|
|
30
30
|
useMergedRef
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-LTM4RGJD.js";
|
|
32
32
|
import {
|
|
33
33
|
Button,
|
|
34
34
|
IconButton
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-AYPDPYCT.js";
|
|
36
36
|
import {
|
|
37
37
|
withDefaultLabels
|
|
38
38
|
} from "./chunk-IZLKBJTU.js";
|
|
39
39
|
import {
|
|
40
40
|
Tooltip
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-3ZN6AC3M.js";
|
|
42
42
|
import {
|
|
43
43
|
cx,
|
|
44
44
|
dataFlag
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
// src/components/Composer.tsx
|
|
48
48
|
import {
|
|
49
49
|
forwardRef,
|
|
50
|
-
useCallback,
|
|
50
|
+
useCallback as useCallback2,
|
|
51
51
|
useEffect,
|
|
52
52
|
useLayoutEffect,
|
|
53
53
|
useMemo,
|
|
@@ -59,11 +59,34 @@ import { ArrowsInSimpleIcon } from "../icons/ArrowsInSimpleIcon.js";
|
|
|
59
59
|
import { ArrowsOutSimpleIcon } from "../icons/ArrowsOutSimpleIcon.js";
|
|
60
60
|
import { PaperclipIcon } from "../icons/PaperclipIcon.js";
|
|
61
61
|
import { StopIcon } from "../icons/StopIcon.js";
|
|
62
|
+
|
|
63
|
+
// src/utils/mediaQuery.ts
|
|
64
|
+
import { useCallback, useSyncExternalStore } from "react";
|
|
65
|
+
function useMediaQuery(query) {
|
|
66
|
+
const subscribe = useCallback(
|
|
67
|
+
(notify) => {
|
|
68
|
+
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return () => {
|
|
69
|
+
};
|
|
70
|
+
const list = window.matchMedia(query);
|
|
71
|
+
list.addEventListener?.("change", notify);
|
|
72
|
+
return () => list.removeEventListener?.("change", notify);
|
|
73
|
+
},
|
|
74
|
+
[query]
|
|
75
|
+
);
|
|
76
|
+
return useSyncExternalStore(
|
|
77
|
+
subscribe,
|
|
78
|
+
() => typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia(query).matches === true,
|
|
79
|
+
() => false
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// src/components/Composer.tsx
|
|
62
84
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
63
85
|
var composerLabels = {
|
|
64
86
|
...fileRuleLabels,
|
|
65
87
|
field: "Message",
|
|
66
88
|
send: "Send",
|
|
89
|
+
sending: "Sending\u2026",
|
|
67
90
|
stop: "Stop",
|
|
68
91
|
attach: "Attach files",
|
|
69
92
|
attachFull: (max) => `You can attach up to ${max} files.`,
|
|
@@ -142,6 +165,7 @@ function ComposerImpl({
|
|
|
142
165
|
onSend,
|
|
143
166
|
busy = false,
|
|
144
167
|
onStop,
|
|
168
|
+
enterSends: enterSendsProp,
|
|
145
169
|
disabled = false,
|
|
146
170
|
disabledReason,
|
|
147
171
|
placeholder,
|
|
@@ -187,7 +211,7 @@ function ComposerImpl({
|
|
|
187
211
|
const value = valueProp ?? ownValue;
|
|
188
212
|
const valueRef = useRef(value);
|
|
189
213
|
valueRef.current = value;
|
|
190
|
-
const setValue =
|
|
214
|
+
const setValue = useCallback2(
|
|
191
215
|
(next) => {
|
|
192
216
|
valueRef.current = next;
|
|
193
217
|
if (valueProp === void 0) setOwnValue(next);
|
|
@@ -199,7 +223,7 @@ function ComposerImpl({
|
|
|
199
223
|
const mentions = mentionsProp ?? ownMentions;
|
|
200
224
|
const mentionsRef = useRef(mentions);
|
|
201
225
|
mentionsRef.current = mentions;
|
|
202
|
-
const setMentions =
|
|
226
|
+
const setMentions = useCallback2(
|
|
203
227
|
(next) => {
|
|
204
228
|
mentionsRef.current = next;
|
|
205
229
|
if (mentionsProp === void 0) setOwnMentions(next);
|
|
@@ -216,6 +240,8 @@ function ComposerImpl({
|
|
|
216
240
|
const ready = attachments.filter((a) => (a.status ?? "ready") === "ready" || a.status === "done");
|
|
217
241
|
const pending = busy || sending;
|
|
218
242
|
const hasText = value.trim().length > 0;
|
|
243
|
+
const touch = useMediaQuery("(pointer: coarse)");
|
|
244
|
+
const enterSends = pill || (enterSendsProp ?? !touch);
|
|
219
245
|
const canSend = !disabled && !pending && !uploading && (hasText || ready.length > 0);
|
|
220
246
|
const full = attachments.length >= maxFiles;
|
|
221
247
|
const drop = useFileDrop({
|
|
@@ -236,7 +262,7 @@ function ComposerImpl({
|
|
|
236
262
|
useEffect(() => {
|
|
237
263
|
if (autoFocus) fieldRef.current?.focus();
|
|
238
264
|
}, []);
|
|
239
|
-
const fit =
|
|
265
|
+
const fit = useCallback2(() => {
|
|
240
266
|
const el = fieldRef.current;
|
|
241
267
|
if (!el || pill) return;
|
|
242
268
|
el.style.height = "auto";
|
|
@@ -264,7 +290,7 @@ function ComposerImpl({
|
|
|
264
290
|
return () => observer.disconnect();
|
|
265
291
|
}, [pill, fit]);
|
|
266
292
|
useTypingPlaceholder(fieldRef, hints, !hasText && !disabled && !pending, placeholder);
|
|
267
|
-
const send =
|
|
293
|
+
const send = useCallback2(
|
|
268
294
|
(override) => {
|
|
269
295
|
const text = (override ?? valueRef.current).trim();
|
|
270
296
|
if (disabled || pending || override === void 0 && (uploading || !text && ready.length === 0)) return;
|
|
@@ -309,6 +335,7 @@ function ComposerImpl({
|
|
|
309
335
|
const onKeyDown = (event) => {
|
|
310
336
|
if (event.defaultPrevented || event.key !== "Enter" || event.nativeEvent.isComposing) return;
|
|
311
337
|
if (event.shiftKey && !pill) return;
|
|
338
|
+
if (!enterSends && !event.ctrlKey && !event.metaKey) return;
|
|
312
339
|
event.preventDefault();
|
|
313
340
|
if (event.shiftKey) return;
|
|
314
341
|
send();
|
|
@@ -325,7 +352,7 @@ function ComposerImpl({
|
|
|
325
352
|
event.preventDefault();
|
|
326
353
|
fieldRef.current?.focus();
|
|
327
354
|
};
|
|
328
|
-
const addChip =
|
|
355
|
+
const addChip = useCallback2(
|
|
329
356
|
(item, source) => {
|
|
330
357
|
if (!source.chip) return;
|
|
331
358
|
const now = mentionsRef.current;
|
|
@@ -357,6 +384,7 @@ function ComposerImpl({
|
|
|
357
384
|
className: "o-composer__send",
|
|
358
385
|
"data-appearance": "text",
|
|
359
386
|
loading: pending,
|
|
387
|
+
"aria-label": pending ? labels.sending : void 0,
|
|
360
388
|
"aria-disabled": !canSend && !pending ? true : void 0,
|
|
361
389
|
disabledReason: sendReason,
|
|
362
390
|
onClick: () => send(),
|
|
@@ -471,8 +499,9 @@ function ComposerImpl({
|
|
|
471
499
|
"aria-label": labels.field,
|
|
472
500
|
"aria-disabled": disabled || void 0,
|
|
473
501
|
readOnly: disabled,
|
|
502
|
+
dir: "auto",
|
|
474
503
|
placeholder: hints && hints.length > 0 ? void 0 : placeholder,
|
|
475
|
-
enterKeyHint: "send",
|
|
504
|
+
enterKeyHint: enterSends ? "send" : "enter",
|
|
476
505
|
onChange: (event) => {
|
|
477
506
|
if (failed) setFailed(false);
|
|
478
507
|
setValue(event.target.value);
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
} from "./chunk-M5SAU3Z6.js";
|
|
5
5
|
import {
|
|
6
6
|
SearchField
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NGBEWQS5.js";
|
|
8
8
|
import {
|
|
9
9
|
Popover,
|
|
10
10
|
PopoverContent,
|
|
11
11
|
PopoverTrigger
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KUIT3YF5.js";
|
|
13
13
|
import {
|
|
14
14
|
withDefaultLabels
|
|
15
15
|
} from "./chunk-IZLKBJTU.js";
|
|
@@ -7,16 +7,16 @@ import {
|
|
|
7
7
|
} from "./chunk-TK7U3U32.js";
|
|
8
8
|
import {
|
|
9
9
|
useAnchoredOverlay
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RK36Z2I5.js";
|
|
11
11
|
import {
|
|
12
12
|
isThenable
|
|
13
13
|
} from "./chunk-BACB7AM2.js";
|
|
14
|
-
import {
|
|
15
|
-
usePortalContainer
|
|
16
|
-
} from "./chunk-YKTVZWSO.js";
|
|
17
14
|
import {
|
|
18
15
|
withDefaultLabels
|
|
19
16
|
} from "./chunk-IZLKBJTU.js";
|
|
17
|
+
import {
|
|
18
|
+
usePortalContainer
|
|
19
|
+
} from "./chunk-MX6Q7VVR.js";
|
|
20
20
|
import {
|
|
21
21
|
OrbitSpinner
|
|
22
22
|
} from "./chunk-YLBEJ4N7.js";
|
|
@@ -95,7 +95,9 @@ function CaretSuggestionsImpl({
|
|
|
95
95
|
const next = given && { ...given, serial: was ? was.serial : opens.current += 1 };
|
|
96
96
|
sessionRef.current = next;
|
|
97
97
|
setSessionState(next);
|
|
98
|
-
if (!was !== !next
|
|
98
|
+
if (!was !== !next || was && next && was.source !== next.source) {
|
|
99
|
+
openChange.current?.(Boolean(next), next ? sourcesRef.current[next.source]?.trigger : void 0);
|
|
100
|
+
}
|
|
99
101
|
}, []);
|
|
100
102
|
const dismissed = useRef(null);
|
|
101
103
|
const close = useCallback(() => {
|