entasis 0.10.2 → 0.12.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.
- package/README.md +1 -1
- package/dist/attachments/disclosurePanel.svelte.d.ts +84 -0
- package/dist/attachments/disclosurePanel.svelte.js +277 -0
- package/dist/attachments/portal.d.ts +17 -1
- package/dist/attachments/portal.js +39 -2
- package/dist/attachments/spinnerOverlay.svelte.js +12 -0
- package/dist/attachments/transitionSize.d.ts +6 -0
- package/dist/attachments/transitionSize.js +30 -0
- package/dist/components/AIAskUserQuestion/AIAskUserQuestion.svelte +131 -17
- package/dist/components/AIAskUserQuestion/AIAskUserQuestionFileStep.svelte +26 -6
- package/dist/components/AIAskUserQuestion/AIAskUserQuestionFileStep.svelte.d.ts +6 -0
- package/dist/components/AIAskUserQuestion/AIAskUserQuestionFooter.svelte +27 -53
- package/dist/components/AIAskUserQuestion/AIAskUserQuestionFooter.svelte.d.ts +3 -4
- package/dist/components/AIAskUserQuestion/AIAskUserQuestionHeader.svelte +19 -16
- package/dist/components/AIAskUserQuestion/AIAskUserQuestionStep.svelte +180 -21
- package/dist/components/AIAskUserQuestion/AIAskUserQuestionStep.svelte.d.ts +9 -1
- package/dist/components/AIAskUserQuestion/AIAskUserQuestionSummary.svelte +56 -0
- package/dist/components/AIAskUserQuestion/AIAskUserQuestionSummary.svelte.d.ts +4 -0
- package/dist/components/AIAskUserQuestion/aiAskUserQuestion.mcp.d.ts +1 -1
- package/dist/components/AIAskUserQuestion/aiAskUserQuestion.mcp.js +26 -8
- package/dist/components/AIAskUserQuestion/aiAskUserQuestion.props.d.ts +62 -5
- package/dist/components/AIAskUserQuestion/aiAskUserQuestion.theme.d.ts +42 -0
- package/dist/components/AIAskUserQuestion/aiAskUserQuestion.theme.js +53 -12
- package/dist/components/AIAskUserQuestion/aiAskUserQuestionAnswers.d.ts +17 -1
- package/dist/components/AIAskUserQuestion/aiAskUserQuestionAnswers.js +56 -8
- package/dist/components/AIAskUserQuestion/index.d.ts +3 -1
- package/dist/components/AIAskUserQuestion/index.js +2 -0
- package/dist/components/AIAskUserQuestion/schemas.d.ts +44 -0
- package/dist/components/AIAskUserQuestion/schemas.js +10 -3
- package/dist/components/AIChat/AIChat.svelte +10 -0
- package/dist/components/AIChat/AIChat.svelte.d.ts +2 -2
- package/dist/components/AIChat/AIChatComposerSurface.svelte +23 -5
- package/dist/components/AIChat/AIChatComposerSurface.svelte.d.ts +5 -0
- package/dist/components/AIChat/AIChatSkeleton.svelte +29 -37
- package/dist/components/AIChat/AIChatSurface.svelte +30 -2
- package/dist/components/AIChat/AIChatSurface.svelte.d.ts +1 -1
- package/dist/components/AIChat/AIChatThreadSurface.svelte +11 -1
- package/dist/components/AIChat/AIChatThreadSurface.svelte.d.ts +3 -1
- package/dist/components/AIChat/aiChat.mcp.d.ts +1 -1
- package/dist/components/AIChat/aiChat.mcp.js +31 -15
- package/dist/components/AIChat/aiChat.props.d.ts +36 -10
- package/dist/components/AIChat/aiChat.theme.d.ts +9 -0
- package/dist/components/AIChat/aiChat.theme.js +21 -4
- package/dist/components/AIChat/aiChatSkeleton.props.d.ts +5 -0
- package/dist/components/AIChat/index.d.ts +1 -1
- package/dist/components/AIComposer/AIComposer.svelte +102 -5
- package/dist/components/AIComposer/AIComposer.svelte.d.ts +1 -0
- package/dist/components/AIComposer/AIComposerFooter.svelte +54 -12
- package/dist/components/AIComposer/AIComposerFooter.svelte.d.ts +2 -0
- package/dist/components/AIComposer/AIComposerQueue.svelte +8 -3
- package/dist/components/AIComposer/aiComposer.editor.theme.js +13 -2
- package/dist/components/AIComposer/aiComposer.mcp.d.ts +1 -1
- package/dist/components/AIComposer/aiComposer.mcp.js +15 -7
- package/dist/components/AIComposer/aiComposer.props.d.ts +27 -7
- package/dist/components/AIComposer/aiComposer.theme.d.ts +42 -3
- package/dist/components/AIComposer/aiComposer.theme.js +37 -5
- package/dist/components/AIComposer/aiComposerFileController.svelte.d.ts +20 -0
- package/dist/components/AIComposer/aiComposerFileController.svelte.js +75 -9
- package/dist/components/AIComposer/aiComposerSourceAdapter.js +22 -4
- package/dist/components/AIComposer/aiComposerSubmitController.svelte.d.ts +12 -0
- package/dist/components/AIComposer/aiComposerSubmitController.svelte.js +16 -6
- package/dist/components/AIContext/AIContext.svelte +7 -3
- package/dist/components/AIContext/aiContext.mcp.d.ts +1 -1
- package/dist/components/AIContext/aiContext.mcp.js +1 -1
- package/dist/components/AIContext/aiContext.props.d.ts +4 -1
- package/dist/components/AIContext/aiContext.theme.d.ts +3 -0
- package/dist/components/AIContext/aiContext.theme.js +7 -2
- package/dist/components/AIConversation/AIConversation.svelte.d.ts +2 -2
- package/dist/components/AIFilePreview/aiFilePreview.theme.js +1 -1
- package/dist/components/AIMarker/AIMarker.svelte +2 -0
- package/dist/components/AIMarker/aiMarker.mcp.d.ts +1 -1
- package/dist/components/AIMarker/aiMarker.mcp.js +2 -0
- package/dist/components/AIMarker/aiMarker.props.d.ts +3 -0
- package/dist/components/AIMarker/aiMarker.theme.js +2 -2
- package/dist/components/AIMessage/AIMessage.svelte +38 -16
- package/dist/components/AIMessage/aiMessage.mcp.d.ts +1 -1
- package/dist/components/AIMessage/aiMessage.mcp.js +20 -6
- package/dist/components/AIMessage/aiMessage.props.d.ts +18 -2
- package/dist/components/AIMessage/aiMessage.theme.d.ts +51 -6
- package/dist/components/AIMessage/aiMessage.theme.js +91 -32
- package/dist/components/AIMessageActions/AIMessageActions.svelte +19 -9
- package/dist/components/AIMessageActions/aiMessageActions.mcp.d.ts +1 -1
- package/dist/components/AIMessageActions/aiMessageActions.mcp.js +11 -3
- package/dist/components/AIMessageActions/aiMessageActions.theme.js +36 -9
- package/dist/components/AIModelSelector/AIModelSelector.svelte +25 -10
- package/dist/components/AIModelSelector/aiModelSelector.mcp.d.ts +1 -1
- package/dist/components/AIModelSelector/aiModelSelector.mcp.js +1 -1
- package/dist/components/AIModelSelector/aiModelSelector.theme.d.ts +3 -0
- package/dist/components/AIModelSelector/aiModelSelector.theme.js +7 -3
- package/dist/components/AIReasoning/AIReasoning.svelte +135 -38
- package/dist/components/AIReasoning/aiReasoning.mcp.d.ts +1 -1
- package/dist/components/AIReasoning/aiReasoning.mcp.js +11 -5
- package/dist/components/AIReasoning/aiReasoning.props.d.ts +15 -4
- package/dist/components/AIReasoning/aiReasoning.theme.d.ts +45 -0
- package/dist/components/AIReasoning/aiReasoning.theme.js +47 -7
- package/dist/components/AISuggestion/AISuggestion.svelte +2 -1
- package/dist/components/AISuggestion/AISuggestions.svelte +2 -1
- package/dist/components/AISuggestion/aiSuggestion.mcp.d.ts +1 -1
- package/dist/components/AISuggestion/aiSuggestion.mcp.js +8 -1
- package/dist/components/AISuggestion/aiSuggestion.props.d.ts +4 -1
- package/dist/components/AISuggestion/aiSuggestion.theme.js +1 -1
- package/dist/components/AISuggestion/aiSuggestions.props.d.ts +7 -0
- package/dist/components/AIThread/AIThread.svelte +378 -95
- package/dist/components/AIThread/AIThreadAskUserQuestion.svelte +1 -0
- package/dist/components/AIThread/AIThreadItems.svelte +266 -64
- package/dist/components/AIThread/AIThreadItems.svelte.d.ts +7 -3
- package/dist/components/AIThread/AIThreadMarker.svelte +8 -1
- package/dist/components/AIThread/AIThreadMarker.svelte.d.ts +1 -0
- package/dist/components/AIThread/aiThread.mcp.d.ts +1 -1
- package/dist/components/AIThread/aiThread.mcp.js +34 -20
- package/dist/components/AIThread/aiThread.props.d.ts +73 -8
- package/dist/components/AIThread/aiThread.theme.d.ts +78 -0
- package/dist/components/AIThread/aiThread.theme.js +108 -9
- package/dist/components/AIThread/index.d.ts +1 -1
- package/dist/components/AIThread/threadAskUserQuestion.d.ts +4 -1
- package/dist/components/AIThread/threadAskUserQuestion.js +8 -4
- package/dist/components/AIThread/threadRenderItems.d.ts +74 -3
- package/dist/components/AIThread/threadRenderItems.js +265 -77
- package/dist/components/AIThread/threadScrollController.d.ts +0 -8
- package/dist/components/AIThread/threadScrollController.js +2 -39
- package/dist/components/AIThread/threadTools.d.ts +11 -0
- package/dist/components/AIThread/threadTools.js +79 -0
- package/dist/components/AIThreadToc/AIThreadToc.svelte +188 -18
- package/dist/components/AIThreadToc/AIThreadTocPreview.svelte +25 -2
- package/dist/components/AIThreadToc/AIThreadTocPreview.svelte.d.ts +3 -0
- package/dist/components/AIThreadToc/aiThreadToc.d.ts +4 -2
- package/dist/components/AIThreadToc/aiThreadToc.js +17 -5
- package/dist/components/AIThreadToc/aiThreadToc.mcp.d.ts +1 -1
- package/dist/components/AIThreadToc/aiThreadToc.mcp.js +13 -3
- package/dist/components/AIThreadToc/aiThreadToc.props.d.ts +11 -0
- package/dist/components/AIThreadToc/aiThreadToc.theme.d.ts +3 -0
- package/dist/components/AIThreadToc/aiThreadToc.theme.js +15 -6
- package/dist/components/AITool/AITool.svelte +56 -21
- package/dist/components/AITool/AIToolCallList.svelte +79 -29
- package/dist/components/AITool/AIToolCallList.svelte.d.ts +6 -2
- package/dist/components/AITool/AIToolStatusMark.svelte +52 -0
- package/dist/components/AITool/AIToolStatusMark.svelte.d.ts +14 -0
- package/dist/components/AITool/AIToolValueSection.svelte +126 -28
- package/dist/components/AITool/AIToolValueSection.svelte.d.ts +6 -2
- package/dist/components/AITool/AIToolValueTree.svelte +11 -16
- package/dist/components/AITool/AIToolValueTree.svelte.d.ts +2 -3
- package/dist/components/AITool/aiTool.mcp.d.ts +1 -1
- package/dist/components/AITool/aiTool.mcp.js +36 -8
- package/dist/components/AITool/aiTool.props.d.ts +52 -6
- package/dist/components/AITool/aiTool.theme.d.ts +117 -39
- package/dist/components/AITool/aiTool.theme.js +144 -140
- package/dist/components/AITool/aiToolClock.svelte.d.ts +18 -0
- package/dist/components/AITool/aiToolClock.svelte.js +62 -0
- package/dist/components/AITool/aiToolPrimitiveThemes.d.ts +0 -2
- package/dist/components/AITool/aiToolPrimitiveThemes.js +0 -10
- package/dist/components/AITool/index.d.ts +2 -1
- package/dist/components/AITool/index.js +1 -0
- package/dist/components/AITool/toolRendering.d.ts +33 -1
- package/dist/components/AITool/toolRendering.js +179 -15
- package/dist/components/AITool/toolValueTree.d.ts +14 -1
- package/dist/components/AITool/toolValueTree.js +126 -27
- package/dist/components/Accordion/Accordion.svelte +109 -109
- package/dist/components/Accordion/Accordion.svelte.d.ts +0 -1
- package/dist/components/Accordion/AccordionPanel.svelte +64 -0
- package/dist/components/Accordion/AccordionPanel.svelte.d.ts +20 -0
- package/dist/components/Accordion/accordion.attributes.d.ts +24 -0
- package/dist/components/Accordion/accordion.attributes.js +20 -0
- package/dist/components/Accordion/accordion.mcp.d.ts +1 -1
- package/dist/components/Accordion/accordion.mcp.js +78 -22
- package/dist/components/Accordion/accordion.props.d.ts +54 -10
- package/dist/components/Accordion/accordion.theme.d.ts +3 -0
- package/dist/components/Accordion/accordion.theme.js +4 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Accordion/index.js +1 -0
- package/dist/components/AudioPlayer/audioPlayerVolumeControl.slider.theme.d.ts +31 -1
- package/dist/components/Avatar/Avatar.svelte +60 -10
- package/dist/components/Avatar/AvatarGroup.svelte +9 -0
- package/dist/components/Avatar/avatar.mcp.d.ts +1 -1
- package/dist/components/Avatar/avatar.mcp.js +13 -5
- package/dist/components/Avatar/avatar.props.d.ts +28 -1
- package/dist/components/Avatar/avatar.theme.js +3 -3
- package/dist/components/Avatar/index.d.ts +1 -1
- package/dist/components/Breadcrumbs/breadcrumbs.mcp.d.ts +1 -1
- package/dist/components/Breadcrumbs/breadcrumbs.mcp.js +1 -1
- package/dist/components/Button/Button.svelte +35 -15
- package/dist/components/Button/button.mcp.d.ts +1 -1
- package/dist/components/Button/button.mcp.js +8 -4
- package/dist/components/Button/button.props.d.ts +23 -8
- package/dist/components/Button/button.theme.d.ts +12 -0
- package/dist/components/Button/button.theme.js +17 -4
- package/dist/components/ButtonGroup/buttonGroup.mcp.d.ts +1 -1
- package/dist/components/ButtonGroup/buttonGroup.mcp.js +1 -1
- package/dist/components/ButtonGroup/buttonGroup.props.d.ts +4 -1
- package/dist/components/Collapsible/Collapsible.svelte +125 -19
- package/dist/components/Collapsible/collapsible.attributes.d.ts +21 -0
- package/dist/components/Collapsible/collapsible.attributes.js +17 -0
- package/dist/components/Collapsible/collapsible.mcp.d.ts +1 -1
- package/dist/components/Collapsible/collapsible.mcp.js +62 -12
- package/dist/components/Collapsible/collapsible.props.d.ts +39 -8
- package/dist/components/Collapsible/collapsible.theme.js +3 -1
- package/dist/components/Collapsible/index.d.ts +1 -0
- package/dist/components/Collapsible/index.js +1 -0
- package/dist/components/Command/Command.svelte +56 -14
- package/dist/components/Command/command.mcp.d.ts +1 -1
- package/dist/components/Command/command.mcp.js +12 -6
- package/dist/components/Command/command.props.d.ts +39 -6
- package/dist/components/Command/command.state.svelte.d.ts +40 -11
- package/dist/components/Command/command.state.svelte.js +75 -28
- package/dist/components/Command/command.theme.js +4 -3
- package/dist/components/Confirmation/Confirmation.svelte +72 -31
- package/dist/components/Confirmation/confirmation.mcp.d.ts +1 -1
- package/dist/components/Confirmation/confirmation.mcp.js +5 -4
- package/dist/components/ContextMenu/ContextMenu.svelte +126 -16
- package/dist/components/ContextMenu/contextMenu.mcp.d.ts +1 -1
- package/dist/components/ContextMenu/contextMenu.mcp.js +10 -7
- package/dist/components/ContextMenu/contextMenu.props.d.ts +13 -4
- package/dist/components/ContextMenu/contextMenu.theme.d.ts +3 -3
- package/dist/components/ContextMenu/contextMenu.theme.js +3 -2
- package/dist/components/DataTable/DataTable.svelte +4 -9
- package/dist/components/DataTable/DataTableEditor.svelte +5 -0
- package/dist/components/DataTable/DataTableFilter.svelte +1 -0
- package/dist/components/DataTable/DataTableToolbar.svelte +1 -0
- package/dist/components/DataTable/dataTable.mcp.d.ts +1 -1
- package/dist/components/DataTable/dataTable.mcp.js +4 -2
- package/dist/components/DataTable/dataTable.theme.d.ts +0 -3
- package/dist/components/DataTable/dataTable.theme.js +9 -6
- package/dist/components/Dialog/Dialog.svelte +120 -35
- package/dist/components/Dialog/Dialog.svelte.d.ts +1 -1
- package/dist/components/Dialog/DialogBackdrop.svelte +21 -1
- package/dist/components/Dialog/dialog.api.d.ts +65 -0
- package/dist/components/Dialog/dialog.api.js +1 -0
- package/dist/components/Dialog/dialog.attributes.d.ts +23 -0
- package/dist/components/Dialog/dialog.attributes.js +19 -0
- package/dist/components/Dialog/dialog.indent.d.ts +6 -0
- package/dist/components/Dialog/dialog.indent.js +16 -0
- package/dist/components/Dialog/dialog.mcp.d.ts +1 -1
- package/dist/components/Dialog/dialog.mcp.js +195 -22
- package/dist/components/Dialog/dialog.props.d.ts +102 -19
- package/dist/components/Dialog/dialog.snap.d.ts +40 -0
- package/dist/components/Dialog/dialog.snap.js +78 -0
- package/dist/components/Dialog/dialog.state.svelte.d.ts +122 -10
- package/dist/components/Dialog/dialog.state.svelte.js +525 -66
- package/dist/components/Dialog/dialog.theme.d.ts +48 -0
- package/dist/components/Dialog/dialog.theme.js +32 -9
- package/dist/components/Dialog/index.d.ts +4 -1
- package/dist/components/Dialog/index.js +1 -0
- package/dist/components/DocumentViewer/DocumentSearchControl.svelte +5 -3
- package/dist/components/DocumentViewer/documentOutput.js +2 -1
- package/dist/components/FloatingWindow/FloatingWindow.svelte +20 -32
- package/dist/components/FloatingWindow/FloatingWindow.svelte.d.ts +1 -1
- package/dist/components/FloatingWindow/floatingWindow.mcp.d.ts +1 -1
- package/dist/components/FloatingWindow/floatingWindow.mcp.js +3 -3
- package/dist/components/FloatingWindow/floatingWindow.props.d.ts +9 -4
- package/dist/components/FloatingWindow/floatingWindow.state.svelte.d.ts +8 -2
- package/dist/components/FloatingWindow/floatingWindow.state.svelte.js +18 -7
- package/dist/components/Form/Ask/Ask.svelte +9 -13
- package/dist/components/Form/Ask/ask.mcp.d.ts +1 -1
- package/dist/components/Form/Ask/ask.mcp.js +1 -1
- package/dist/components/Form/Ask/ask.props.d.ts +1 -1
- package/dist/components/Form/Autocomplete/Autocomplete.svelte +418 -0
- package/dist/components/Form/Autocomplete/Autocomplete.svelte.d.ts +4 -0
- package/dist/components/Form/Autocomplete/autocomplete.items.d.ts +30 -0
- package/dist/components/Form/Autocomplete/autocomplete.items.js +64 -0
- package/dist/components/Form/Autocomplete/autocomplete.mcp.d.ts +1 -0
- package/dist/components/Form/Autocomplete/autocomplete.mcp.js +134 -0
- package/dist/components/Form/Autocomplete/autocomplete.props.d.ts +146 -0
- package/dist/components/Form/Autocomplete/autocomplete.props.js +1 -0
- package/dist/components/Form/Autocomplete/autocomplete.theme.d.ts +213 -0
- package/dist/components/Form/Autocomplete/autocomplete.theme.js +119 -0
- package/dist/components/Form/Autocomplete/index.d.ts +3 -0
- package/dist/components/Form/Autocomplete/index.js +2 -0
- package/dist/components/Form/Calendar/CalendarInput.svelte +9 -0
- package/dist/components/Form/Calendar/CalendarMonthYearPicker.svelte +3 -0
- package/dist/components/Form/Calendar/CalendarPrimitive.svelte +5 -0
- package/dist/components/Form/Calendar/calendar.mcp.d.ts +1 -1
- package/dist/components/Form/Calendar/calendar.mcp.js +2 -1
- package/dist/components/Form/Calendar/calendarInput.props.d.ts +2 -0
- package/dist/components/Form/Calendar/useCalendar.svelte.d.ts +3 -0
- package/dist/components/Form/Calendar/useCalendar.svelte.js +3 -0
- package/dist/components/Form/Checkbox/Checkbox.svelte +17 -2
- package/dist/components/Form/Checkbox/checkbox.mcp.d.ts +1 -1
- package/dist/components/Form/Checkbox/checkbox.mcp.js +11 -1
- package/dist/components/Form/Checkbox/checkbox.props.d.ts +12 -1
- package/dist/components/Form/CheckboxesInput/CheckboxLine.svelte +69 -32
- package/dist/components/Form/CheckboxesInput/CheckboxLine.svelte.d.ts +10 -2
- package/dist/components/Form/CheckboxesInput/CheckboxesInput.svelte +123 -74
- package/dist/components/Form/CheckboxesInput/CheckboxesInput.svelte.d.ts +12 -12
- package/dist/components/Form/CheckboxesInput/checkboxesInput.mcp.d.ts +1 -1
- package/dist/components/Form/CheckboxesInput/checkboxesInput.mcp.js +11 -7
- package/dist/components/Form/CheckboxesInput/checkboxesInput.props.d.ts +25 -9
- package/dist/components/Form/CheckboxesInput/checkboxesInput.theme.d.ts +12 -0
- package/dist/components/Form/CheckboxesInput/checkboxesInput.theme.js +9 -4
- package/dist/components/Form/CheckboxesInput/choiceEnter.d.ts +11 -0
- package/dist/components/Form/CheckboxesInput/choiceEnter.js +27 -0
- package/dist/components/Form/ColorInput/ColorInput.svelte +12 -3
- package/dist/components/Form/ColorInput/colorInput.mcp.d.ts +1 -1
- package/dist/components/Form/ColorInput/colorInput.mcp.js +1 -0
- package/dist/components/Form/ColorPicker/ColorPicker.svelte +11 -2
- package/dist/components/Form/ColorPicker/ColorPickerInput.svelte +9 -0
- package/dist/components/Form/ColorPicker/colorPicker.mcp.d.ts +1 -1
- package/dist/components/Form/ColorPicker/colorPicker.mcp.js +1 -0
- package/dist/components/Form/ColorPicker/colorPicker.props.d.ts +2 -0
- package/dist/components/Form/ColorPicker/colorPicker.state.svelte.d.ts +4 -0
- package/dist/components/Form/ColorPicker/colorPicker.state.svelte.js +12 -8
- package/dist/components/Form/Combobox/Combobox.svelte +145 -185
- package/dist/components/Form/Combobox/Combobox.svelte.d.ts +1 -1
- package/dist/components/Form/Combobox/ComboboxPopup.svelte +128 -0
- package/dist/components/Form/Combobox/ComboboxPopup.svelte.d.ts +28 -0
- package/dist/components/Form/Combobox/combobox.attributes.d.ts +34 -0
- package/dist/components/Form/Combobox/combobox.attributes.js +25 -0
- package/dist/components/Form/Combobox/combobox.items.d.ts +28 -0
- package/dist/components/Form/Combobox/combobox.items.js +68 -0
- package/dist/components/Form/Combobox/combobox.mcp.d.ts +1 -1
- package/dist/components/Form/Combobox/combobox.mcp.js +104 -13
- package/dist/components/Form/Combobox/combobox.props.d.ts +113 -19
- package/dist/components/Form/Combobox/combobox.state.svelte.d.ts +137 -0
- package/dist/components/Form/Combobox/combobox.state.svelte.js +375 -0
- package/dist/components/Form/Combobox/combobox.theme.d.ts +63 -0
- package/dist/components/Form/Combobox/combobox.theme.js +37 -1
- package/dist/components/Form/Combobox/index.d.ts +2 -1
- package/dist/components/Form/Combobox/index.js +1 -0
- package/dist/components/Form/DateInput/DateInput.svelte +11 -3
- package/dist/components/Form/DateInput/dateInput.mcp.d.ts +1 -1
- package/dist/components/Form/DateInput/dateInput.mcp.js +5 -0
- package/dist/components/Form/DateSelector/DateSelector.svelte +5 -2
- package/dist/components/Form/DateSelector/DateSelectorInput.svelte +9 -0
- package/dist/components/Form/DateSelector/dateSelector.mcp.d.ts +1 -1
- package/dist/components/Form/DateSelector/dateSelector.mcp.js +2 -2
- package/dist/components/Form/DateSelector/dateSelector.props.d.ts +2 -0
- package/dist/components/Form/Field/Field.svelte +258 -32
- package/dist/components/Form/Field/Field.svelte.d.ts +15 -6
- package/dist/components/Form/Field/FieldGroup.svelte +29 -0
- package/dist/components/Form/Field/FieldGroup.svelte.d.ts +11 -0
- package/dist/components/Form/Field/FieldHiddenInputs.svelte +187 -0
- package/dist/components/Form/Field/FieldHiddenInputs.svelte.d.ts +26 -0
- package/dist/components/Form/Field/field.d.ts +75 -10
- package/dist/components/Form/Field/field.mcp.d.ts +1 -1
- package/dist/components/Form/Field/field.mcp.js +158 -18
- package/dist/components/Form/Field/field.messages.d.ts +47 -0
- package/dist/components/Form/Field/field.messages.js +64 -0
- package/dist/components/Form/Field/field.state.svelte.d.ts +117 -40
- package/dist/components/Form/Field/field.state.svelte.js +525 -16
- package/dist/components/Form/Field/field.theme.d.ts +46 -0
- package/dist/components/Form/Field/field.theme.js +33 -0
- package/dist/components/Form/Field/fieldHiddenInputs.props.d.ts +61 -0
- package/dist/components/Form/Field/fieldHiddenInputs.props.js +1 -0
- package/dist/components/Form/Field/fieldNativeForm.svelte.d.ts +14 -0
- package/dist/components/Form/Field/fieldNativeForm.svelte.js +113 -0
- package/dist/components/Form/Field/index.d.ts +5 -2
- package/dist/components/Form/Field/index.js +1 -0
- package/dist/components/Form/Field/schemas.js +7 -2
- package/dist/components/Form/File/FileInput.svelte +24 -3
- package/dist/components/Form/File/fileInput.mcp.d.ts +1 -1
- package/dist/components/Form/File/fileInput.mcp.js +1 -0
- package/dist/components/Form/Form/Form.svelte +49 -15
- package/dist/components/Form/Form/FormActions.svelte +3 -1
- package/dist/components/Form/Form/FormActions.svelte.d.ts +42 -2
- package/dist/components/Form/Form/FormFieldRenderer.svelte +96 -12
- package/dist/components/Form/Form/FormFieldRenderer.svelte.d.ts +3 -2
- package/dist/components/Form/Form/FormInputRenderer.svelte +7 -0
- package/dist/components/Form/Form/form.d.ts +84 -11
- package/dist/components/Form/Form/form.mcp.d.ts +1 -1
- package/dist/components/Form/Form/form.mcp.js +178 -12
- package/dist/components/Form/Form/form.props.d.ts +32 -1
- package/dist/components/Form/Form/form.registry.d.ts +28 -0
- package/dist/components/Form/Form/form.registry.js +59 -0
- package/dist/components/Form/Form/form.state.svelte.d.ts +1186 -420
- package/dist/components/Form/Form/form.state.svelte.js +322 -28
- package/dist/components/Form/Form/index.d.ts +4 -1
- package/dist/components/Form/Form/index.js +1 -0
- package/dist/components/Form/Form/visibility.d.ts +3130 -1863
- package/dist/components/Form/KeyValueInput/KeyValueInput.svelte +22 -10
- package/dist/components/Form/KeyValueInput/keyValueInput.mcp.d.ts +1 -1
- package/dist/components/Form/KeyValueInput/keyValueInput.mcp.js +1 -0
- package/dist/components/Form/MultiStepForm/MultiStepForm.svelte +12 -5
- package/dist/components/Form/MultiStepForm/multiStepForm.mcp.d.ts +1 -1
- package/dist/components/Form/MultiStepForm/multiStepForm.mcp.js +5 -3
- package/dist/components/Form/MultiStepForm/multiStepForm.props.d.ts +5 -0
- package/dist/components/Form/MultiStepForm/multiStepForm.state.svelte.d.ts +1050 -408
- package/dist/components/Form/MultiStepForm/multiStepForm.state.svelte.js +48 -24
- package/dist/components/Form/NumberInput/NumberInput.svelte +365 -46
- package/dist/components/Form/NumberInput/index.d.ts +1 -1
- package/dist/components/Form/NumberInput/numberInput.mcp.d.ts +1 -1
- package/dist/components/Form/NumberInput/numberInput.mcp.js +55 -30
- package/dist/components/Form/NumberInput/numberInput.props.d.ts +64 -4
- package/dist/components/Form/PasswordInput/Password.svelte +28 -1
- package/dist/components/Form/PasswordInput/index.d.ts +1 -1
- package/dist/components/Form/PasswordInput/passwordInput.mcp.d.ts +1 -1
- package/dist/components/Form/PasswordInput/passwordInput.mcp.js +20 -2
- package/dist/components/Form/PasswordInput/passwordInput.props.d.ts +23 -0
- package/dist/components/Form/PhoneInput/PhoneInput.svelte +11 -4
- package/dist/components/Form/PhoneInput/PhoneInputCountryPicker.svelte +47 -21
- package/dist/components/Form/PhoneInput/phoneInput-cdn.js +2 -1
- package/dist/components/Form/PhoneInput/phoneInput.mcp.d.ts +1 -1
- package/dist/components/Form/PhoneInput/phoneInput.mcp.js +6 -2
- package/dist/components/Form/PhoneInput/phoneInputCountry.d.ts +9 -3
- package/dist/components/Form/PhoneInput/phoneInputCountry.js +34 -24
- package/dist/components/Form/PinInput/PinInput.svelte +44 -9
- package/dist/components/Form/PinInput/PinInputCells.svelte +22 -1
- package/dist/components/Form/PinInput/PinInputCells.svelte.d.ts +1 -0
- package/dist/components/Form/PinInput/index.d.ts +1 -1
- package/dist/components/Form/PinInput/pinInput.mcp.d.ts +1 -1
- package/dist/components/Form/PinInput/pinInput.mcp.js +29 -6
- package/dist/components/Form/PinInput/pinInput.props.d.ts +38 -4
- package/dist/components/Form/PinInput/pinInput.state.svelte.d.ts +41 -0
- package/dist/components/Form/PinInput/pinInput.state.svelte.js +227 -24
- package/dist/components/Form/PinInput/pinInput.theme.d.ts +39 -3
- package/dist/components/Form/PinInput/pinInput.theme.js +27 -1
- package/dist/components/Form/RadioInput/RadioInput.svelte +94 -32
- package/dist/components/Form/RadioInput/RadioInput.svelte.d.ts +12 -12
- package/dist/components/Form/RadioInput/radioInput.mcp.d.ts +1 -1
- package/dist/components/Form/RadioInput/radioInput.mcp.js +12 -9
- package/dist/components/Form/RadioInput/radioInput.props.d.ts +22 -6
- package/dist/components/Form/RadioInput/radioInput.theme.d.ts +12 -0
- package/dist/components/Form/RadioInput/radioInput.theme.js +10 -5
- package/dist/components/Form/RatingInput/RatingInput.svelte +13 -4
- package/dist/components/Form/RatingInput/ratingInput.mcp.d.ts +1 -1
- package/dist/components/Form/RatingInput/ratingInput.mcp.js +3 -3
- package/dist/components/Form/RatingInput/ratingInput.props.d.ts +1 -1
- package/dist/components/Form/Select/Select.svelte +186 -48
- package/dist/components/Form/Select/Select.svelte.d.ts +23 -2
- package/dist/components/Form/Select/SelectOptionRow.svelte +69 -0
- package/dist/components/Form/Select/SelectOptionRow.svelte.d.ts +18 -0
- package/dist/components/Form/Select/index.d.ts +2 -1
- package/dist/components/Form/Select/index.js +1 -0
- package/dist/components/Form/Select/select.align.d.ts +5 -0
- package/dist/components/Form/Select/select.align.js +19 -5
- package/dist/components/Form/Select/select.attributes.d.ts +36 -0
- package/dist/components/Form/Select/select.attributes.js +27 -0
- package/dist/components/Form/Select/select.mcp.d.ts +1 -1
- package/dist/components/Form/Select/select.mcp.js +103 -18
- package/dist/components/Form/Select/select.props.d.ts +87 -10
- package/dist/components/Form/Select/select.state.svelte.d.ts +108 -17
- package/dist/components/Form/Select/select.state.svelte.js +354 -59
- package/dist/components/Form/Select/select.theme.d.ts +21 -0
- package/dist/components/Form/Select/select.theme.js +22 -0
- package/dist/components/Form/Slider/Slider.svelte +54 -14
- package/dist/components/Form/Slider/SliderMarks.svelte +1 -1
- package/dist/components/Form/Slider/SliderThumb.svelte +49 -19
- package/dist/components/Form/Slider/SliderThumb.svelte.d.ts +8 -2
- package/dist/components/Form/Slider/SliderTrack.svelte +33 -12
- package/dist/components/Form/Slider/SliderTrack.svelte.d.ts +6 -2
- package/dist/components/Form/Slider/index.d.ts +1 -1
- package/dist/components/Form/Slider/slider.mcp.d.ts +1 -1
- package/dist/components/Form/Slider/slider.mcp.js +55 -11
- package/dist/components/Form/Slider/slider.props.d.ts +35 -2
- package/dist/components/Form/Slider/slider.state.svelte.d.ts +66 -5
- package/dist/components/Form/Slider/slider.state.svelte.js +273 -49
- package/dist/components/Form/Slider/slider.theme.d.ts +36 -0
- package/dist/components/Form/Slider/slider.theme.js +35 -17
- package/dist/components/Form/Switch/Switch.svelte +61 -38
- package/dist/components/Form/Switch/switch.mcp.d.ts +1 -1
- package/dist/components/Form/Switch/switch.mcp.js +25 -5
- package/dist/components/Form/Switch/switch.props.d.ts +14 -1
- package/dist/components/Form/Switch/switch.theme.d.ts +12 -0
- package/dist/components/Form/Switch/switch.theme.js +8 -3
- package/dist/components/Form/TagGroup/TagGroup.svelte +8 -0
- package/dist/components/Form/TagGroup/tagGroup.mcp.d.ts +1 -1
- package/dist/components/Form/TagGroup/tagGroup.mcp.js +1 -0
- package/dist/components/Form/TagsInput/TagsInput.svelte +277 -275
- package/dist/components/Form/TagsInput/TagsInput.svelte.d.ts +1 -1
- package/dist/components/Form/TagsInput/tagsInput.mcp.d.ts +1 -1
- package/dist/components/Form/TagsInput/tagsInput.mcp.js +31 -11
- package/dist/components/Form/TagsInput/tagsInput.props.d.ts +6 -26
- package/dist/components/Form/TagsInput/tagsInput.theme.d.ts +63 -0
- package/dist/components/Form/TagsInput/tagsInput.theme.js +37 -1
- package/dist/components/Form/TextArea/TextArea.svelte +8 -0
- package/dist/components/Form/TextArea/textArea.mcp.d.ts +1 -1
- package/dist/components/Form/TextArea/textArea.mcp.js +1 -0
- package/dist/components/Form/TextInput/TextInput.svelte +8 -1
- package/dist/components/Form/TextInput/textInput.mcp.d.ts +1 -1
- package/dist/components/Form/TextInput/textInput.mcp.js +5 -0
- package/dist/components/Form/TimeInput/TimeInput.svelte +9 -1
- package/dist/components/Form/TimeInput/timeInput.mcp.d.ts +1 -1
- package/dist/components/Form/TimeInput/timeInput.mcp.js +31 -0
- package/dist/components/Form/VoiceInput/VoiceInput.svelte +10 -2
- package/dist/components/Form/VoiceInput/voiceInput.mcp.d.ts +1 -1
- package/dist/components/Form/VoiceInput/voiceInput.mcp.js +1 -0
- package/dist/components/GanttChart/GanttDependencyControl.svelte +4 -4
- package/dist/components/HoverCard/HoverCard.svelte +100 -10
- package/dist/components/HoverCard/hoverCard.attributes.d.ts +33 -0
- package/dist/components/HoverCard/hoverCard.attributes.js +24 -0
- package/dist/components/HoverCard/hoverCard.mcp.d.ts +1 -1
- package/dist/components/HoverCard/hoverCard.mcp.js +61 -2
- package/dist/components/HoverCard/hoverCard.props.d.ts +19 -0
- package/dist/components/HoverCard/hoverCard.theme.d.ts +12 -0
- package/dist/components/HoverCard/hoverCard.theme.js +9 -2
- package/dist/components/HoverCard/index.d.ts +1 -0
- package/dist/components/HoverCard/index.js +1 -0
- package/dist/components/ImageGallery/imageGallery.state.svelte.d.ts +1 -1
- package/dist/components/ImageZoom/imageZoom.lightbox.js +40 -6
- package/dist/components/ImageZoom/imageZoom.mcp.d.ts +1 -1
- package/dist/components/ImageZoom/imageZoom.mcp.js +3 -3
- package/dist/components/ImageZoom/imageZoom.props.d.ts +10 -4
- package/dist/components/ImageZoom/imageZoom.state.svelte.d.ts +16 -4
- package/dist/components/ImageZoom/imageZoom.state.svelte.js +38 -9
- package/dist/components/Kanban/kanban.theme.js +7 -3
- package/dist/components/Layout/layoutSpacing.d.ts +2 -2
- package/dist/components/LinkPreview/LinkPreview.svelte +7 -1
- package/dist/components/LinkPreview/linkPreview.mcp.d.ts +1 -1
- package/dist/components/LinkPreview/linkPreview.mcp.js +4 -1
- package/dist/components/LinkPreview/linkPreview.props.d.ts +15 -0
- package/dist/components/LinkPreview/linkPreview.theme.d.ts +12 -0
- package/dist/components/LinkPreview/linkPreview.theme.js +9 -2
- package/dist/components/Map/maplibre-cdn.js +3 -2
- package/dist/components/Markdown/markdown.mcp.d.ts +1 -1
- package/dist/components/Markdown/markdown.mcp.js +2 -1
- package/dist/components/Markdown/markdown.theme.js +18 -9
- package/dist/components/MediaVolume/MediaVolumeControl.svelte +4 -3
- package/dist/components/Menu/Menu.svelte +3 -3
- package/dist/components/Menu/Menu.svelte.d.ts +1 -1
- package/dist/components/Menu/MenuCheckboxItem.svelte +87 -0
- package/dist/components/Menu/MenuCheckboxItem.svelte.d.ts +16 -0
- package/dist/components/Menu/MenuFloating.svelte +421 -74
- package/dist/components/Menu/MenuFloating.svelte.d.ts +1 -1
- package/dist/components/Menu/MenuMirroredIcon.svelte +9 -0
- package/dist/components/Menu/MenuMirroredIcon.svelte.d.ts +7 -0
- package/dist/components/Menu/MenuRadioGroup.svelte +102 -0
- package/dist/components/Menu/MenuRadioGroup.svelte.d.ts +18 -0
- package/dist/components/Menu/MenuSearchField.svelte +54 -0
- package/dist/components/Menu/MenuSearchField.svelte.d.ts +20 -0
- package/dist/components/Menu/MenuStacked.svelte +404 -158
- package/dist/components/Menu/MenuStacked.svelte.d.ts +1 -1
- package/dist/components/Menu/MenuStackedBackHeader.svelte +6 -1
- package/dist/components/Menu/index.d.ts +2 -1
- package/dist/components/Menu/index.js +1 -0
- package/dist/components/Menu/menu.attributes.d.ts +37 -0
- package/dist/components/Menu/menu.attributes.js +28 -0
- package/dist/components/Menu/menu.filter.svelte.d.ts +52 -0
- package/dist/components/Menu/menu.filter.svelte.js +143 -0
- package/dist/components/Menu/menu.mcp.d.ts +1 -1
- package/dist/components/Menu/menu.mcp.js +227 -17
- package/dist/components/Menu/menu.platform.d.ts +5 -0
- package/dist/components/Menu/menu.platform.js +11 -0
- package/dist/components/Menu/menu.props.d.ts +172 -9
- package/dist/components/Menu/menu.theme.d.ts +147 -0
- package/dist/components/Menu/menu.theme.js +101 -0
- package/dist/components/Menu/menuTree.d.ts +35 -1
- package/dist/components/Menu/menuTree.js +158 -1
- package/dist/components/MenuBar/menuBar.mcp.d.ts +1 -1
- package/dist/components/MenuBar/menuBar.mcp.js +4 -2
- package/dist/components/MenuBar/menuBar.state.svelte.js +28 -10
- package/dist/components/MenuOption/MenuOption.svelte +5 -1
- package/dist/components/MenuOption/menuOption.mcp.d.ts +1 -1
- package/dist/components/MenuOption/menuOption.mcp.js +8 -0
- package/dist/components/MenuOption/menuOption.props.d.ts +12 -0
- package/dist/components/MenuOption/menuOption.theme.d.ts +18 -0
- package/dist/components/MenuOption/menuOption.theme.js +24 -4
- package/dist/components/Mermaid/mermaid.mcp.d.ts +1 -1
- package/dist/components/Mermaid/mermaid.mcp.js +8 -8
- package/dist/components/Mermaid/mermaid.props.d.ts +3 -4
- package/dist/components/Mermaid/mermaid.state.svelte.d.ts +20 -19
- package/dist/components/Mermaid/mermaid.state.svelte.js +80 -243
- package/dist/components/Mermaid/mermaid.theme.js +26 -1
- package/dist/components/MetadataList/MetadataList.svelte.d.ts +1 -1
- package/dist/components/Meter/Meter.svelte +110 -24
- package/dist/components/Meter/Meter.svelte.d.ts +12 -12
- package/dist/components/Meter/meter.mcp.d.ts +1 -1
- package/dist/components/Meter/meter.mcp.js +23 -37
- package/dist/components/Meter/meter.props.d.ts +36 -44
- package/dist/components/NavigationMenu/NavigationMenu.svelte +181 -0
- package/dist/components/NavigationMenu/NavigationMenu.svelte.d.ts +25 -0
- package/dist/components/NavigationMenu/NavigationMenuContent.svelte +141 -0
- package/dist/components/NavigationMenu/NavigationMenuContent.svelte.d.ts +13 -0
- package/dist/components/NavigationMenu/NavigationMenuTrigger.svelte +75 -0
- package/dist/components/NavigationMenu/NavigationMenuTrigger.svelte.d.ts +13 -0
- package/dist/components/NavigationMenu/index.d.ts +4 -0
- package/dist/components/NavigationMenu/index.js +3 -0
- package/dist/components/NavigationMenu/navigationMenu.attributes.d.ts +24 -0
- package/dist/components/NavigationMenu/navigationMenu.attributes.js +21 -0
- package/dist/components/NavigationMenu/navigationMenu.mcp.d.ts +1 -0
- package/dist/components/NavigationMenu/navigationMenu.mcp.js +138 -0
- package/dist/components/NavigationMenu/navigationMenu.props.d.ts +129 -0
- package/dist/components/NavigationMenu/navigationMenu.props.js +1 -0
- package/dist/components/NavigationMenu/navigationMenu.state.svelte.d.ts +163 -0
- package/dist/components/NavigationMenu/navigationMenu.state.svelte.js +721 -0
- package/dist/components/NavigationMenu/navigationMenu.theme.d.ts +326 -0
- package/dist/components/NavigationMenu/navigationMenu.theme.js +239 -0
- package/dist/components/Overlay/Overlay.svelte +19 -30
- package/dist/components/Overlay/index.d.ts +1 -0
- package/dist/components/Overlay/index.js +1 -0
- package/dist/components/Overlay/overlay.attributes.d.ts +16 -0
- package/dist/components/Overlay/overlay.attributes.js +14 -0
- package/dist/components/Overlay/overlay.mcp.d.ts +1 -1
- package/dist/components/Overlay/overlay.mcp.js +21 -3
- package/dist/components/Overlay/overlay.props.d.ts +8 -4
- package/dist/components/Popover/Popover.svelte +163 -52
- package/dist/components/Popover/Popover.svelte.d.ts +23 -2
- package/dist/components/Popover/PopoverSession.svelte +12 -0
- package/dist/components/Popover/PopoverSession.svelte.d.ts +7 -0
- package/dist/components/Popover/index.d.ts +10 -2
- package/dist/components/Popover/index.js +4 -1
- package/dist/components/Popover/popover.api.d.ts +83 -0
- package/dist/components/Popover/popover.api.js +1 -0
- package/dist/components/Popover/popover.attributes.d.ts +32 -0
- package/dist/components/Popover/popover.attributes.js +28 -0
- package/dist/components/Popover/popover.claims.d.ts +19 -0
- package/dist/components/Popover/popover.claims.js +45 -0
- package/dist/components/Popover/popover.mcp.d.ts +1 -1
- package/dist/components/Popover/popover.mcp.js +163 -31
- package/dist/components/Popover/popover.position.d.ts +226 -0
- package/dist/components/Popover/popover.position.js +402 -0
- package/dist/components/Popover/popover.props.d.ts +179 -24
- package/dist/components/Popover/popover.state.svelte.d.ts +169 -37
- package/dist/components/Popover/popover.state.svelte.js +1034 -194
- package/dist/components/Popover/popover.theme.d.ts +15 -0
- package/dist/components/Popover/popover.theme.js +27 -2
- package/dist/components/PopupMenu/PopupMenu.svelte +193 -22
- package/dist/components/PopupMenu/PopupMenu.svelte.d.ts +2 -2
- package/dist/components/PopupMenu/popupMenu.context.d.ts +42 -0
- package/dist/components/PopupMenu/popupMenu.context.js +52 -0
- package/dist/components/PopupMenu/popupMenu.mcp.d.ts +1 -1
- package/dist/components/PopupMenu/popupMenu.mcp.js +46 -6
- package/dist/components/PopupMenu/popupMenu.props.d.ts +29 -2
- package/dist/components/Progress/Progress.svelte +160 -0
- package/dist/components/Progress/Progress.svelte.d.ts +4 -0
- package/dist/components/Progress/index.d.ts +3 -0
- package/dist/components/Progress/index.js +2 -0
- package/dist/components/Progress/progress.mcp.d.ts +1 -0
- package/dist/components/Progress/progress.mcp.js +101 -0
- package/dist/components/Progress/progress.props.d.ts +79 -0
- package/dist/components/Progress/progress.props.js +1 -0
- package/dist/components/Progress/progress.theme.d.ts +129 -0
- package/dist/components/Progress/progress.theme.js +83 -0
- package/dist/components/ProgressCircle/ProgressCircle.svelte +51 -6
- package/dist/components/ProgressCircle/progressCircle.mcp.d.ts +1 -1
- package/dist/components/ProgressCircle/progressCircle.mcp.js +18 -4
- package/dist/components/ProgressCircle/progressCircle.props.d.ts +32 -2
- package/dist/components/ProgressCircle/progressCircle.theme.d.ts +15 -3
- package/dist/components/ProgressCircle/progressCircle.theme.js +7 -2
- package/dist/components/RichTextInput/RichTextInput.svelte +19 -1
- package/dist/components/RichTextInput/RichTextInputChrome.svelte +5 -1
- package/dist/components/RichTextInput/RichTextInputChrome.svelte.d.ts +2 -0
- package/dist/components/RichTextInput/RichTextInputViewport.svelte +3 -1
- package/dist/components/RichTextInput/RichTextInputViewport.svelte.d.ts +1 -0
- package/dist/components/RichTextInput/richTextInput.mcp.d.ts +1 -1
- package/dist/components/RichTextInput/richTextInput.mcp.js +1 -0
- package/dist/components/RichTextInput/suggestions.js +2 -0
- package/dist/components/ScrollArea/ScrollArea.svelte +166 -27
- package/dist/components/ScrollArea/index.d.ts +2 -1
- package/dist/components/ScrollArea/index.js +1 -0
- package/dist/components/ScrollArea/scrollArea.attributes.d.ts +25 -0
- package/dist/components/ScrollArea/scrollArea.attributes.js +21 -0
- package/dist/components/ScrollArea/scrollArea.mcp.d.ts +1 -1
- package/dist/components/ScrollArea/scrollArea.mcp.js +47 -3
- package/dist/components/ScrollArea/scrollArea.props.d.ts +33 -6
- package/dist/components/ScrollArea/scrollArea.svelte.d.ts +56 -12
- package/dist/components/ScrollArea/scrollArea.svelte.js +281 -71
- package/dist/components/ScrollArea/scrollArea.theme.js +5 -2
- package/dist/components/SegmentedControl/SegmentedControl.svelte +4 -3
- package/dist/components/SegmentedControl/segmentedControl.mcp.d.ts +1 -1
- package/dist/components/SegmentedControl/segmentedControl.mcp.js +3 -2
- package/dist/components/SelectionMenu/SelectionMenu.svelte +4 -2
- package/dist/components/Sidebar/SidebarAction.svelte +13 -3
- package/dist/components/Sidebar/SidebarAction.svelte.d.ts +2 -1
- package/dist/components/Sidebar/SidebarActivityBar.svelte +14 -7
- package/dist/components/Sidebar/SidebarFlyout.svelte +97 -0
- package/dist/components/Sidebar/SidebarFlyout.svelte.d.ts +32 -0
- package/dist/components/Sidebar/SidebarGroup.svelte +39 -15
- package/dist/components/Sidebar/SidebarMenuButton.svelte +6 -3
- package/dist/components/Sidebar/SidebarMenuItem.svelte +134 -31
- package/dist/components/Sidebar/SidebarMenuSubItem.svelte +30 -14
- package/dist/components/Sidebar/SidebarTreeNode.svelte +41 -61
- package/dist/components/Sidebar/index.d.ts +1 -0
- package/dist/components/Sidebar/index.js +1 -0
- package/dist/components/Sidebar/sidebar-position.d.ts +37 -2
- package/dist/components/Sidebar/sidebar-position.js +31 -2
- package/dist/components/Sidebar/sidebar.attributes.d.ts +33 -0
- package/dist/components/Sidebar/sidebar.attributes.js +29 -0
- package/dist/components/Sidebar/sidebar.mcp.d.ts +1 -1
- package/dist/components/Sidebar/sidebar.mcp.js +45 -10
- package/dist/components/Sidebar/sidebar.props.d.ts +28 -7
- package/dist/components/Sidebar/sidebar.theme.d.ts +51 -21
- package/dist/components/Sidebar/sidebar.theme.js +113 -62
- package/dist/components/Sidebar/sidebar.views.svelte.js +11 -18
- package/dist/components/Stepper/Stepper.svelte +2 -0
- package/dist/components/Stepper/stepper.mcp.d.ts +1 -1
- package/dist/components/Stepper/stepper.mcp.js +1 -0
- package/dist/components/Stepper/stepper.props.d.ts +5 -0
- package/dist/components/Stepper/stepper.state.svelte.d.ts +2 -0
- package/dist/components/Stepper/stepper.state.svelte.js +31 -12
- package/dist/components/Tabbar/Tabbar.svelte +55 -16
- package/dist/components/Tabbar/index.d.ts +1 -1
- package/dist/components/Tabbar/tabbar.mcp.d.ts +1 -1
- package/dist/components/Tabbar/tabbar.mcp.js +26 -9
- package/dist/components/Tabbar/tabbar.props.d.ts +34 -5
- package/dist/components/Tabbar/tabbar.selection.svelte.d.ts +79 -0
- package/dist/components/Tabbar/tabbar.selection.svelte.js +99 -0
- package/dist/components/TableOfContents/tableOfContents.state.svelte.js +9 -7
- package/dist/components/Tabs/Tabs.svelte +73 -16
- package/dist/components/Tabs/index.d.ts +2 -1
- package/dist/components/Tabs/tabs.direction.svelte.d.ts +25 -0
- package/dist/components/Tabs/tabs.direction.svelte.js +40 -0
- package/dist/components/Tabs/tabs.mcp.d.ts +1 -1
- package/dist/components/Tabs/tabs.mcp.js +22 -4
- package/dist/components/Tabs/tabs.props.d.ts +39 -12
- package/dist/components/Tabs/tabs.theme.js +3 -1
- package/dist/components/Theme/Theme.svelte +44 -27
- package/dist/components/Theme/helper.d.ts +16 -2
- package/dist/components/Theme/helper.js +46 -4
- package/dist/components/Theme/theme.mcp.d.ts +1 -1
- package/dist/components/Theme/theme.mcp.js +103 -0
- package/dist/components/Theme/theme.props.d.ts +16 -0
- package/dist/components/Theme/theme.state.svelte.d.ts +14 -1
- package/dist/components/Theme/theme.state.svelte.js +18 -1
- package/dist/components/Toast/Toast.svelte +184 -39
- package/dist/components/Toast/Toaster.svelte +14 -10
- package/dist/components/Toast/index.d.ts +1 -0
- package/dist/components/Toast/toast.mcp.d.ts +1 -1
- package/dist/components/Toast/toast.mcp.js +47 -6
- package/dist/components/Toast/toast.state.svelte.d.ts +172 -6
- package/dist/components/Toast/toast.state.svelte.js +513 -68
- package/dist/components/Toast/toast.theme.js +1 -1
- package/dist/components/ToggleButton/ToggleButton.svelte +23 -1
- package/dist/components/ToggleButton/toggleButton.mcp.d.ts +1 -1
- package/dist/components/ToggleButton/toggleButton.mcp.js +3 -1
- package/dist/components/ToggleButton/toggleButton.props.d.ts +13 -1
- package/dist/components/ToggleButton/toggleButton.theme.d.ts +12 -0
- package/dist/components/ToggleButton/toggleButton.theme.js +15 -3
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.svelte +29 -9
- package/dist/components/ToggleButtonGroup/index.d.ts +1 -1
- package/dist/components/ToggleButtonGroup/toggleButtonGroup.mcp.d.ts +1 -1
- package/dist/components/ToggleButtonGroup/toggleButtonGroup.mcp.js +5 -2
- package/dist/components/ToggleButtonGroup/toggleButtonGroup.props.d.ts +19 -1
- package/dist/components/ToggleButtonGroup/toggleButtonGroup.theme.d.ts +12 -0
- package/dist/components/ToggleButtonGroup/toggleButtonGroup.theme.js +21 -2
- package/dist/components/ToggleMenu/ToggleMenu.svelte +57 -43
- package/dist/components/ToggleMenu/ToggleMenuGroup.svelte +1 -0
- package/dist/components/ToggleMenu/ToggleMenuMenu.svelte +9 -3
- package/dist/components/ToggleMenu/ToggleMenuRadioGroup.svelte +7 -2
- package/dist/components/ToggleMenu/toggleMenu.mcp.d.ts +1 -1
- package/dist/components/ToggleMenu/toggleMenu.mcp.js +3 -2
- package/dist/components/ToggleMenu/toggleMenu.props.d.ts +4 -1
- package/dist/components/Tooltip/Tooltip.svelte +4 -12
- package/dist/components/Tooltip/TooltipHost.svelte +136 -15
- package/dist/components/Tooltip/index.d.ts +1 -0
- package/dist/components/Tooltip/index.js +1 -0
- package/dist/components/Tooltip/tooltip.attachment.svelte.d.ts +5 -0
- package/dist/components/Tooltip/tooltip.attachment.svelte.js +215 -33
- package/dist/components/Tooltip/tooltip.attributes.d.ts +32 -0
- package/dist/components/Tooltip/tooltip.attributes.js +28 -0
- package/dist/components/Tooltip/tooltip.mcp.d.ts +1 -1
- package/dist/components/Tooltip/tooltip.mcp.js +111 -10
- package/dist/components/Tooltip/tooltip.props.d.ts +33 -2
- package/dist/components/Tooltip/tooltip.surface.d.ts +24 -0
- package/dist/components/Tooltip/tooltip.surface.js +42 -0
- package/dist/components/Tree/TreeContextMenuSurface.svelte +16 -3
- package/dist/components/Utils/BeforeHydratation.svelte +14 -3
- package/dist/components/Utils/BeforeHydratation.svelte.d.ts +2 -0
- package/dist/components/VideoPlayer/VideoPlayer.svelte.d.ts +1 -1
- package/dist/components/VideoPlayer/VideoPlayerSettings.svelte +2 -0
- package/dist/generated/componentAliases.d.ts +3 -0
- package/dist/generated/componentAliases.js +3 -0
- package/dist/generated/componentContract.d.ts +79 -34
- package/dist/generated/componentContract.js +231 -6
- package/dist/generated/componentMcpRegistry.js +6 -0
- package/dist/i18n/ar.js +107 -3
- package/dist/i18n/context.svelte.d.ts +6 -0
- package/dist/i18n/context.svelte.js +12 -0
- package/dist/i18n/de.js +101 -3
- package/dist/i18n/en.d.ts +91 -2
- package/dist/i18n/en.js +101 -3
- package/dist/i18n/es.js +101 -3
- package/dist/i18n/fr.js +101 -3
- package/dist/i18n/ja.js +101 -3
- package/dist/i18n/pt.js +101 -3
- package/dist/i18n/zh.js +101 -3
- package/dist/tailwind/geometry.js +7 -0
- package/dist/tailwind/global.js +31 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types.mcp.d.ts +1 -1
- package/dist/types/types.mcp.js +23 -0
- package/dist/utils/cspNonce.d.ts +16 -0
- package/dist/utils/cspNonce.js +39 -0
- package/dist/utils/cva/merge.d.ts +5 -1
- package/dist/utils/cva/merge.js +6 -4
- package/dist/utils/focus.d.ts +34 -0
- package/dist/utils/focus.js +93 -0
- package/dist/utils/focusHistory.d.ts +21 -0
- package/dist/utils/focusHistory.js +99 -0
- package/dist/utils/handlers.d.ts +7 -0
- package/dist/utils/handlers.js +14 -0
- package/dist/utils/hoverIntent.d.ts +42 -0
- package/dist/utils/hoverIntent.js +57 -0
- package/dist/utils/id.d.ts +7 -0
- package/dist/utils/id.js +15 -0
- package/dist/utils/layers.svelte.d.ts +32 -4
- package/dist/utils/layers.svelte.js +214 -21
- package/dist/utils/listFilter.d.ts +44 -0
- package/dist/utils/listFilter.js +130 -0
- package/dist/utils/match.d.ts +35 -0
- package/dist/utils/match.js +36 -0
- package/dist/utils/number.d.ts +126 -0
- package/dist/utils/number.js +401 -0
- package/dist/utils/openChange.d.ts +88 -0
- package/dist/utils/openChange.js +71 -0
- package/dist/utils/openLifecycle.svelte.d.ts +41 -0
- package/dist/utils/openLifecycle.svelte.js +134 -0
- package/dist/utils/pointerDrag.d.ts +10 -0
- package/dist/utils/pointerDrag.js +37 -2
- package/dist/utils/pragmaticDragAndDrop.d.ts +2 -1
- package/dist/utils/pragmaticDragAndDrop.js +8 -3
- package/dist/utils/range.d.ts +62 -0
- package/dist/utils/range.js +70 -0
- package/dist/utils/requestNativeSubmit.d.ts +17 -0
- package/dist/utils/requestNativeSubmit.js +47 -0
- package/dist/utils/safeArea.svelte.d.ts +10 -1
- package/dist/utils/safeArea.svelte.js +19 -11
- package/dist/utils/stateAttributes.d.ts +108 -0
- package/dist/utils/stateAttributes.js +78 -0
- package/dist/utils/swipeVelocity.d.ts +32 -0
- package/dist/utils/swipeVelocity.js +59 -0
- package/dist/utils/timer.svelte.d.ts +65 -2
- package/dist/utils/timer.svelte.js +159 -25
- package/dist/utils/trigger.d.ts +41 -0
- package/dist/utils/trigger.js +103 -0
- package/dist/utils/typeahead.d.ts +9 -0
- package/dist/utils/typeahead.js +21 -9
- package/dist/utils/useDndList.svelte.d.ts +1 -1
- package/dist/utils/useDndList.svelte.js +6 -23
- package/dist/utils/useFocusScope.svelte.d.ts +29 -0
- package/dist/utils/useFocusScope.svelte.js +189 -27
- package/dist/utils/useHoverAction.svelte.d.ts +44 -4
- package/dist/utils/useHoverAction.svelte.js +161 -51
- package/dist/utils/useKeyDown.svelte.d.ts +19 -2
- package/dist/utils/useKeyDown.svelte.js +19 -12
- package/dist/utils/useListNavigation.svelte.d.ts +94 -13
- package/dist/utils/useListNavigation.svelte.js +261 -35
- package/dist/utils/useLiveAnnouncer.svelte.d.ts +77 -2
- package/dist/utils/useLiveAnnouncer.svelte.js +119 -2
- package/dist/utils/useNavigation.svelte.d.ts +36 -3
- package/dist/utils/useNavigation.svelte.js +699 -332
- package/dist/utils/usePressAndHold.svelte.d.ts +38 -0
- package/dist/utils/usePressAndHold.svelte.js +191 -0
- package/dist/utils/useScrollLock.svelte.d.ts +20 -1
- package/dist/utils/useScrollLock.svelte.js +54 -13
- package/dist/utils/useSlidingIndicator.svelte.d.ts +2 -0
- package/dist/utils/useSlidingIndicator.svelte.js +27 -5
- package/dist/utils/useTabBridge.svelte.d.ts +20 -0
- package/dist/utils/useTabBridge.svelte.js +109 -0
- package/dist/utils/values.d.ts +15 -0
- package/dist/utils/values.js +49 -0
- package/package.json +31 -2
- package/dist/generated/componentMcpRegistry.d.ts +0 -142
- package/dist/utils/useDrag.svelte.d.ts +0 -11
- package/dist/utils/useDrag.svelte.js +0 -55
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
} from '../RichTextInput/richTextInput.props.js';
|
|
11
11
|
import { toRichTextInputToken } from '../RichTextInput/suggestions.js';
|
|
12
12
|
import Alert from '../Alert/Alert.svelte';
|
|
13
|
+
import Button from '../Button/Button.svelte';
|
|
14
|
+
import { xIcon } from '../Icons/x.js';
|
|
13
15
|
import { getAIConversation } from '../AIConversation/aiConversation.state.svelte.js';
|
|
14
16
|
import { uploadSimpleIcon } from '../Icons/uploadSimple.js';
|
|
15
17
|
import Slot from '../Slot/Slot.svelte';
|
|
@@ -59,8 +61,8 @@
|
|
|
59
61
|
mentions,
|
|
60
62
|
references,
|
|
61
63
|
skills,
|
|
62
|
-
submitShortcut = '
|
|
63
|
-
toolbar = '
|
|
64
|
+
submitShortcut = 'enter',
|
|
65
|
+
toolbar = 'none',
|
|
64
66
|
formats,
|
|
65
67
|
autoresize = true,
|
|
66
68
|
voiceInput = false,
|
|
@@ -115,6 +117,7 @@
|
|
|
115
117
|
class: className,
|
|
116
118
|
theme,
|
|
117
119
|
voiceInputTheme,
|
|
120
|
+
onkeydown,
|
|
118
121
|
...formAttachments
|
|
119
122
|
}: AIComposerProps = $props();
|
|
120
123
|
const valueState = createBindableValue<string | undefined>(
|
|
@@ -123,6 +126,7 @@
|
|
|
123
126
|
() => defaultValue
|
|
124
127
|
);
|
|
125
128
|
|
|
129
|
+
const NOTICE_DURATION = 6000;
|
|
126
130
|
const conversation = getAIConversation<AIThreadItem>();
|
|
127
131
|
const t = $derived(useI18n());
|
|
128
132
|
let editorHandle = $state<RichTextInputHandle>();
|
|
@@ -196,7 +200,10 @@
|
|
|
196
200
|
onFileReject,
|
|
197
201
|
onAttachmentAdd,
|
|
198
202
|
onAttachmentRetry,
|
|
199
|
-
onAttachmentRemove
|
|
203
|
+
onAttachmentRemove,
|
|
204
|
+
get messages() {
|
|
205
|
+
return t;
|
|
206
|
+
}
|
|
200
207
|
}));
|
|
201
208
|
const fileDropzoneController = fileController.dropzone;
|
|
202
209
|
const displayFiles: File[] = $derived(fileController.files);
|
|
@@ -238,6 +245,13 @@
|
|
|
238
245
|
conversation,
|
|
239
246
|
buildMeta: buildSubmitMeta,
|
|
240
247
|
clearDraft,
|
|
248
|
+
hasFocus: (event) =>
|
|
249
|
+
Boolean(
|
|
250
|
+
ref?.contains(document.activeElement) ||
|
|
251
|
+
(event && 'submitter' in event && ref?.contains(event.submitter))
|
|
252
|
+
),
|
|
253
|
+
restoreFocus: restoreEditorFocus,
|
|
254
|
+
messages: { submitFailed: t.aiComposerSubmitFailed, stopFailed: t.aiComposerStopFailed },
|
|
241
255
|
onSubmit,
|
|
242
256
|
onStop
|
|
243
257
|
}));
|
|
@@ -261,14 +275,46 @@
|
|
|
261
275
|
queueController.syncConversation(resolvedQueue);
|
|
262
276
|
});
|
|
263
277
|
|
|
278
|
+
// A rejected-file note is information, not a blocking error: it dismisses itself. Each new
|
|
279
|
+
// rejection (even one with the same text) bumps `noticeId` and restarts the timer.
|
|
280
|
+
$effect(() => {
|
|
281
|
+
void fileController.noticeId;
|
|
282
|
+
if (!fileController.notice) return;
|
|
283
|
+
const timeout = setTimeout(() => fileController.dismissNotice(), NOTICE_DURATION);
|
|
284
|
+
return () => clearTimeout(timeout);
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Focuses the editor with the caret at the end. A parent that has just changed the value (a
|
|
289
|
+
* suggestion filling the shared input) has not reached the editor yet: Lexical would load that
|
|
290
|
+
* text after this call and skip writing the selection, so focus again once it has loaded.
|
|
291
|
+
*/
|
|
264
292
|
export function focus(): void {
|
|
265
293
|
editorHandle?.focus();
|
|
294
|
+
void tick().then(() => editorHandle?.focus());
|
|
266
295
|
}
|
|
267
296
|
|
|
268
297
|
export function clear(): void {
|
|
269
298
|
clearEditor();
|
|
270
299
|
}
|
|
271
300
|
|
|
301
|
+
/**
|
|
302
|
+
* Sends the current draft, or `text` in place of it, through the same path as Enter or the send
|
|
303
|
+
* button (queueing while busy), then returns focus to the editor.
|
|
304
|
+
*/
|
|
305
|
+
export async function submit(text?: string): Promise<void> {
|
|
306
|
+
if (text !== undefined) {
|
|
307
|
+
tokens = [];
|
|
308
|
+
submitMetadata.clear();
|
|
309
|
+
editorValue = text;
|
|
310
|
+
setValue(text);
|
|
311
|
+
await tick();
|
|
312
|
+
}
|
|
313
|
+
await submitController.submit();
|
|
314
|
+
await tick();
|
|
315
|
+
editorHandle?.focus();
|
|
316
|
+
}
|
|
317
|
+
|
|
272
318
|
export function insertText(text: string): void {
|
|
273
319
|
editorHandle?.insertText(text);
|
|
274
320
|
}
|
|
@@ -368,6 +414,29 @@
|
|
|
368
414
|
void tick().then(() => editorHandle?.focus());
|
|
369
415
|
}
|
|
370
416
|
|
|
417
|
+
// Sending, queueing and leaving a queued edit clear the editor or unmount the control that was
|
|
418
|
+
// used; keep focus in the composer unless it already moved somewhere else on the page.
|
|
419
|
+
function restoreEditorFocus(): void {
|
|
420
|
+
void tick().then(() => {
|
|
421
|
+
const active = document.activeElement;
|
|
422
|
+
if (active && active !== document.body && !ref?.contains(active)) return;
|
|
423
|
+
editorHandle?.focus();
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
function handleKeydown(event: KeyboardEvent & { currentTarget: HTMLFormElement }): void {
|
|
428
|
+
onkeydown?.(event);
|
|
429
|
+
// The editor and its suggestion popup handle Escape first and mark it handled.
|
|
430
|
+
if (event.defaultPrevented || event.key !== 'Escape' || !queueController.isEditing) return;
|
|
431
|
+
event.preventDefault();
|
|
432
|
+
cancelQueuedEdit();
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
function cancelQueuedEdit(): void {
|
|
436
|
+
queueController.cancelEdit();
|
|
437
|
+
restoreEditorFocus();
|
|
438
|
+
}
|
|
439
|
+
|
|
371
440
|
function clearDraft(): void {
|
|
372
441
|
clearEditor();
|
|
373
442
|
fileController.clear();
|
|
@@ -389,6 +458,7 @@
|
|
|
389
458
|
data-file-drag-state={fileDropzoneController.isActive ? fileDropzoneController.state : undefined}
|
|
390
459
|
class={classes.root({ className, dragState: fileDropzoneController.state })}
|
|
391
460
|
onsubmit={submitController.submit}
|
|
461
|
+
onkeydown={handleKeydown}
|
|
392
462
|
onpaste={(event) => fileController.handlePaste(event)}
|
|
393
463
|
{@attach fileDropzoneController.zone}
|
|
394
464
|
{...formAttachments}
|
|
@@ -437,7 +507,7 @@
|
|
|
437
507
|
onSteer={(messageId) => queueController.steer(messageId)}
|
|
438
508
|
onEdit={(messageId) => queueController.startEdit(messageId)}
|
|
439
509
|
onCancel={(messageId) => queueController.cancel(messageId)}
|
|
440
|
-
onCancelEdit={
|
|
510
|
+
onCancelEdit={cancelQueuedEdit}
|
|
441
511
|
{theme}
|
|
442
512
|
/>
|
|
443
513
|
|
|
@@ -461,7 +531,7 @@
|
|
|
461
531
|
{autoresize}
|
|
462
532
|
triggers={resolvedSources.triggers}
|
|
463
533
|
placeholder={resolvedPlaceholder}
|
|
464
|
-
disabled={disabled ||
|
|
534
|
+
disabled={disabled || submitController.isSubmitting}
|
|
465
535
|
{submitShortcut}
|
|
466
536
|
{prefix}
|
|
467
537
|
{suffix}
|
|
@@ -478,6 +548,31 @@
|
|
|
478
548
|
<Alert color="danger" variant="soft" description={visibleError} class={classes.error()} />
|
|
479
549
|
{/if}
|
|
480
550
|
|
|
551
|
+
<!-- The status region stays mounted (visually hidden while empty) and only its text changes, so
|
|
552
|
+
screen readers announce each note; re-keying the text re-announces a repeated rejection. -->
|
|
553
|
+
<div
|
|
554
|
+
data-slot="ai-composer-notice"
|
|
555
|
+
data-empty={fileController.notice ? undefined : 'true'}
|
|
556
|
+
class={classes.notice({ empty: !fileController.notice })}
|
|
557
|
+
>
|
|
558
|
+
<span role="status" class="min-w-0">
|
|
559
|
+
{#key fileController.noticeId}{fileController.notice ?? ''}{/key}
|
|
560
|
+
</span>
|
|
561
|
+
{#if fileController.notice}
|
|
562
|
+
<Button
|
|
563
|
+
type="button"
|
|
564
|
+
squared
|
|
565
|
+
size="small"
|
|
566
|
+
variant="ghost"
|
|
567
|
+
color="neutral"
|
|
568
|
+
label={t.close}
|
|
569
|
+
onclick={() => fileController.dismissNotice()}
|
|
570
|
+
>
|
|
571
|
+
{@render xIcon({ size: 14 })}
|
|
572
|
+
</Button>
|
|
573
|
+
{/if}
|
|
574
|
+
</div>
|
|
575
|
+
|
|
481
576
|
<AIComposerFooter
|
|
482
577
|
state={submitState}
|
|
483
578
|
{footer}
|
|
@@ -492,6 +587,7 @@
|
|
|
492
587
|
voiceInputAriaLabel={voiceInputAriaLabel ?? t.voiceInputStart}
|
|
493
588
|
voiceInputStopLabel={voiceInputStopLabel ?? t.voiceInputStop}
|
|
494
589
|
voiceInputProcessingLabel={voiceInputProcessingLabel ?? t.voiceInputProcessing}
|
|
590
|
+
voiceInputFailedLabel={t.aiComposerVoiceFailed}
|
|
495
591
|
{onVoiceInput}
|
|
496
592
|
{fileDropzone}
|
|
497
593
|
attachDisabled={disabled || isWorking || displayFiles.length >= resolvedMaxFiles}
|
|
@@ -503,6 +599,7 @@
|
|
|
503
599
|
{queueWhileBusy}
|
|
504
600
|
submitLabel={resolvedSubmitLabel}
|
|
505
601
|
stopLabel={resolvedStopLabel}
|
|
602
|
+
queueLabel={t.aiComposerQueue}
|
|
506
603
|
attachLabel={resolvedAttachLabel}
|
|
507
604
|
onAttach={() => fileDropzoneController.open()}
|
|
508
605
|
onStop={submitController.stop}
|
|
@@ -3,6 +3,7 @@ import type { AIComposerCommand, AIComposerMentionItem, AIComposerProps, AICompo
|
|
|
3
3
|
declare const AIComposer: import("svelte").Component<AIComposerProps, {
|
|
4
4
|
focus: () => void;
|
|
5
5
|
clear: () => void;
|
|
6
|
+
submit: (text?: string) => Promise<void>;
|
|
6
7
|
insertText: (text: string) => void;
|
|
7
8
|
insertItem: (trigger: string, item: RichTextInputItem) => void;
|
|
8
9
|
insertToken: (token: RichTextInputToken) => void;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { MediaQuery } from 'svelte/reactivity';
|
|
2
3
|
import Button from '../Button/Button.svelte';
|
|
3
4
|
import VoiceInput from '../Form/VoiceInput/VoiceInput.svelte';
|
|
4
5
|
import type { VoiceInputResult } from '../Form/VoiceInput/voiceInput.props.js';
|
|
5
6
|
import type { VoiceInputThemeProps } from '../Form/VoiceInput/voiceInput.theme.js';
|
|
7
|
+
import { listPlusIcon } from '../Icons/listPlus.js';
|
|
6
8
|
import { paperPlaneRightIcon } from '../Icons/paperPlaneRight.js';
|
|
7
9
|
import { paperclipIcon } from '../Icons/paperclip.js';
|
|
8
|
-
import {
|
|
10
|
+
import { stopIconFill } from '../Icons/stop.js';
|
|
9
11
|
import Slot from '../Slot/Slot.svelte';
|
|
10
12
|
import type { Slot as SlotType } from '../Slot/slot.js';
|
|
11
13
|
import type { Colors } from '../../types/theme.js';
|
|
@@ -26,6 +28,7 @@
|
|
|
26
28
|
voiceInputAriaLabel,
|
|
27
29
|
voiceInputStopLabel,
|
|
28
30
|
voiceInputProcessingLabel,
|
|
31
|
+
voiceInputFailedLabel,
|
|
29
32
|
onVoiceInput,
|
|
30
33
|
fileDropzone,
|
|
31
34
|
attachDisabled,
|
|
@@ -37,6 +40,7 @@
|
|
|
37
40
|
queueWhileBusy,
|
|
38
41
|
submitLabel,
|
|
39
42
|
stopLabel,
|
|
43
|
+
queueLabel,
|
|
40
44
|
attachLabel,
|
|
41
45
|
onAttach,
|
|
42
46
|
onStop,
|
|
@@ -56,6 +60,7 @@
|
|
|
56
60
|
voiceInputAriaLabel: string;
|
|
57
61
|
voiceInputStopLabel: string;
|
|
58
62
|
voiceInputProcessingLabel: string;
|
|
63
|
+
voiceInputFailedLabel: string;
|
|
59
64
|
onVoiceInput?: (audioBuffer: ArrayBuffer) => Promise<void>;
|
|
60
65
|
fileDropzone: boolean;
|
|
61
66
|
attachDisabled: boolean;
|
|
@@ -67,6 +72,7 @@
|
|
|
67
72
|
queueWhileBusy: boolean;
|
|
68
73
|
submitLabel: string;
|
|
69
74
|
stopLabel: string;
|
|
75
|
+
queueLabel: string;
|
|
70
76
|
attachLabel: string;
|
|
71
77
|
onAttach: () => void;
|
|
72
78
|
onStop: () => void;
|
|
@@ -80,6 +86,22 @@
|
|
|
80
86
|
let voiceInputErrors = $state<string[]>([]);
|
|
81
87
|
let isVoiceInputProcessing = $state(false);
|
|
82
88
|
|
|
89
|
+
// The footer's other controls grow to 36px through the theme's `@max-md` container query and
|
|
90
|
+
// `pointer-coarse`; VoiceInput sizes its mic, playback and clear buttons from its `size` prop, so
|
|
91
|
+
// the same two conditions pick its 36px `normal` size here. 28rem is Tailwind's `@md` container.
|
|
92
|
+
const coarsePointer = new MediaQuery('(pointer: coarse)', false);
|
|
93
|
+
let narrowFooter = $state(false);
|
|
94
|
+
const touchControls = $derived(narrowFooter || coarsePointer.current);
|
|
95
|
+
|
|
96
|
+
function observeFooterWidth(node: HTMLElement) {
|
|
97
|
+
const observer = new ResizeObserver(([entry]) => {
|
|
98
|
+
const rem = parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
|
|
99
|
+
narrowFooter = entry.contentRect.width < 28 * rem;
|
|
100
|
+
});
|
|
101
|
+
observer.observe(node);
|
|
102
|
+
return () => observer.disconnect();
|
|
103
|
+
}
|
|
104
|
+
|
|
83
105
|
async function processVoiceInput(result: VoiceInputResult): Promise<void> {
|
|
84
106
|
voiceInputValue = null;
|
|
85
107
|
voiceInputDuration = 0;
|
|
@@ -90,9 +112,7 @@
|
|
|
90
112
|
try {
|
|
91
113
|
await onVoiceInput(await result.blob.arrayBuffer());
|
|
92
114
|
} catch (cause) {
|
|
93
|
-
voiceInputErrors = [
|
|
94
|
-
cause instanceof Error ? cause.message : 'Voice input processing failed.'
|
|
95
|
-
];
|
|
115
|
+
voiceInputErrors = [cause instanceof Error ? cause.message : voiceInputFailedLabel];
|
|
96
116
|
} finally {
|
|
97
117
|
isVoiceInputProcessing = false;
|
|
98
118
|
}
|
|
@@ -102,9 +122,14 @@
|
|
|
102
122
|
{#if footer}
|
|
103
123
|
<Slot render={footer} payload={submitState} class={classes.footer()} />
|
|
104
124
|
{:else}
|
|
105
|
-
|
|
125
|
+
<!-- Attach sits at the far start; the model picker, voice and the send position share the end,
|
|
126
|
+
so the send/stop control is always last and never pushed out of the composer. -->
|
|
127
|
+
<div
|
|
128
|
+
data-slot="ai-composer-footer"
|
|
129
|
+
class={classes.footer()}
|
|
130
|
+
{@attach voiceInput ? observeFooterWidth : undefined}
|
|
131
|
+
>
|
|
106
132
|
<div class={classes.actions({ side: 'start' })}>
|
|
107
|
-
<Slot render={footerStart} payload={submitState} />
|
|
108
133
|
{#if fileDropzone}
|
|
109
134
|
<Button
|
|
110
135
|
type="button"
|
|
@@ -119,10 +144,11 @@
|
|
|
119
144
|
{@render paperclipIcon({ size: 16 })}
|
|
120
145
|
</Button>
|
|
121
146
|
{/if}
|
|
122
|
-
<Slot render={
|
|
147
|
+
<Slot render={footerStart} payload={submitState} />
|
|
123
148
|
</div>
|
|
124
149
|
<div class={classes.actions({ side: 'end' })}>
|
|
125
150
|
<Slot render={actions} payload={submitState} />
|
|
151
|
+
<Slot render={modelSelector} />
|
|
126
152
|
{#if voiceInput}
|
|
127
153
|
<div
|
|
128
154
|
data-slot="ai-composer-voice-input"
|
|
@@ -132,7 +158,7 @@
|
|
|
132
158
|
<Button
|
|
133
159
|
type="button"
|
|
134
160
|
squared
|
|
135
|
-
size=
|
|
161
|
+
size={touchControls ? 'large' : 'small'}
|
|
136
162
|
variant="ghost"
|
|
137
163
|
color="neutral"
|
|
138
164
|
label={voiceInputProcessingLabel}
|
|
@@ -140,16 +166,17 @@
|
|
|
140
166
|
disabled
|
|
141
167
|
/>
|
|
142
168
|
{:else}
|
|
169
|
+
<!-- startLabel names the mic button; no Field label, so nothing renders above it. -->
|
|
143
170
|
<VoiceInput
|
|
144
171
|
bind:value={voiceInputValue}
|
|
145
172
|
bind:duration={voiceInputDuration}
|
|
146
173
|
bind:errors={voiceInputErrors}
|
|
147
|
-
size=
|
|
174
|
+
size={touchControls ? 'normal' : 'small'}
|
|
148
175
|
variant={voiceInputVariant}
|
|
149
176
|
minDuration={voiceInputMinDuration}
|
|
150
177
|
maxDuration={voiceInputMaxDuration}
|
|
151
178
|
color={voiceInputColor}
|
|
152
|
-
|
|
179
|
+
startLabel={voiceInputAriaLabel}
|
|
153
180
|
stopLabel={voiceInputStopLabel}
|
|
154
181
|
disabled={disabled || isWorking}
|
|
155
182
|
onStop={processVoiceInput}
|
|
@@ -159,23 +186,38 @@
|
|
|
159
186
|
</div>
|
|
160
187
|
{/if}
|
|
161
188
|
{#if submitState.isBusy && !isEditing}
|
|
189
|
+
{#if queueWhileBusy && !submitState.isEmpty}
|
|
190
|
+
<Button
|
|
191
|
+
type="submit"
|
|
192
|
+
squared
|
|
193
|
+
size="small"
|
|
194
|
+
variant="ghost"
|
|
195
|
+
color="neutral"
|
|
196
|
+
data-slot="ai-composer-queue-action"
|
|
197
|
+
label={queueLabel}
|
|
198
|
+
disabled={disabled || isWorking}
|
|
199
|
+
>
|
|
200
|
+
{@render listPlusIcon({ size: 16 })}
|
|
201
|
+
</Button>
|
|
202
|
+
{/if}
|
|
162
203
|
<Button
|
|
163
204
|
type="button"
|
|
164
205
|
squared
|
|
165
206
|
size="small"
|
|
166
|
-
|
|
207
|
+
data-slot="ai-composer-stop"
|
|
167
208
|
label={stopLabel}
|
|
168
209
|
loading={isStopping}
|
|
169
210
|
disabled={disabled || isWorking}
|
|
170
211
|
onclick={onStop}
|
|
171
212
|
>
|
|
172
|
-
{@render
|
|
213
|
+
{@render stopIconFill({ size: 14 })}
|
|
173
214
|
</Button>
|
|
174
215
|
{:else}
|
|
175
216
|
<Button
|
|
176
217
|
type="submit"
|
|
177
218
|
squared
|
|
178
219
|
size="small"
|
|
220
|
+
data-slot="ai-composer-submit"
|
|
179
221
|
label={submitLabel}
|
|
180
222
|
loading={isSubmitting}
|
|
181
223
|
disabled={disabled ||
|
|
@@ -17,6 +17,7 @@ type $$ComponentProps = {
|
|
|
17
17
|
voiceInputAriaLabel: string;
|
|
18
18
|
voiceInputStopLabel: string;
|
|
19
19
|
voiceInputProcessingLabel: string;
|
|
20
|
+
voiceInputFailedLabel: string;
|
|
20
21
|
onVoiceInput?: (audioBuffer: ArrayBuffer) => Promise<void>;
|
|
21
22
|
fileDropzone: boolean;
|
|
22
23
|
attachDisabled: boolean;
|
|
@@ -28,6 +29,7 @@ type $$ComponentProps = {
|
|
|
28
29
|
queueWhileBusy: boolean;
|
|
29
30
|
submitLabel: string;
|
|
30
31
|
stopLabel: string;
|
|
32
|
+
queueLabel: string;
|
|
31
33
|
attachLabel: string;
|
|
32
34
|
onAttach: () => void;
|
|
33
35
|
onStop: () => void;
|
|
@@ -76,13 +76,18 @@
|
|
|
76
76
|
{#snippet item({ item }: SortableListItemPayload<AIComposerQueuedMessage>)}
|
|
77
77
|
<div
|
|
78
78
|
data-slot="ai-composer-queue-item"
|
|
79
|
-
class={classes.queueItem()}
|
|
79
|
+
class={classes.queueItem({ steered: Boolean(item.steered) })}
|
|
80
80
|
data-steered={item.steered || undefined}
|
|
81
81
|
>
|
|
82
|
+
{#if item.steered}
|
|
83
|
+
<span data-slot="ai-composer-queue-badge" class={classes.queueBadge()}>
|
|
84
|
+
{t.aiComposerSteering}
|
|
85
|
+
</span>
|
|
86
|
+
{/if}
|
|
82
87
|
<div class={classes.queueText()}>{getMessagePreview(item)}</div>
|
|
83
88
|
{#if item.attachments.length > 0}
|
|
84
|
-
<span
|
|
85
|
-
{
|
|
89
|
+
<span data-slot="ai-composer-queue-files" class={classes.queueFiles()}>
|
|
90
|
+
{t.aiComposerQueuedFiles(item.attachments.length)}
|
|
86
91
|
</span>
|
|
87
92
|
{/if}
|
|
88
93
|
<Button
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
+
// Composer chrome around the editor. Inline tokens carry `data-ai-token="<kind>"`, so each kind
|
|
2
|
+
// gets its own tint here without reaching into the editor's token node: commands read as
|
|
3
|
+
// actions (primary), mentions as people (info), skills as tools (success); files and references
|
|
4
|
+
// keep the neutral pill. On a narrow composer or a touch screen the text steps up to 16px, which
|
|
5
|
+
// also stops iOS Safari from zooming the page when the editor takes focus.
|
|
6
|
+
const touchText = '@max-md:text-base pointer-coarse:text-base';
|
|
7
|
+
const tokenTints = [
|
|
8
|
+
'[&_[data-ai-token=command]]:border-primary-muted [&_[data-ai-token=command]]:bg-primary-muted [&_[data-ai-token=command]]:text-primary-muted-readable',
|
|
9
|
+
'[&_[data-ai-token=mention]]:border-info-muted [&_[data-ai-token=mention]]:bg-info-muted [&_[data-ai-token=mention]]:text-info-muted-readable',
|
|
10
|
+
'[&_[data-ai-token=skill]]:border-success-muted [&_[data-ai-token=skill]]:bg-success-muted [&_[data-ai-token=skill]]:text-success-muted-readable'
|
|
11
|
+
].join(' ');
|
|
1
12
|
export const aiComposerEditorTheme = {
|
|
2
13
|
scrollArea: { base: '!min-h-0' },
|
|
3
14
|
editorShell: { base: 'px-sm py-0' },
|
|
4
|
-
editor: { base:
|
|
5
|
-
placeholder: { base:
|
|
15
|
+
editor: { base: `!min-h-row-md ${touchText} ${tokenTints}` },
|
|
16
|
+
placeholder: { base: `left-2 top-0 ${touchText}` }
|
|
6
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const aiComposerDescription = "\n# AIComposer\n\nAIComposer is a Markdown prompt composer built on the existing `RichTextInput`, `VoiceInput`, file-acceptance helpers, `SortableList`, `ScrollArea`, and `AIFilePreview`. It adds AI command, mention, reference, and skill tokens; optional voice capture; raw or managed files; queue editing; steering; submit/stop state; and optional `AIConversation` integration without owning transport.\n\n## Requires\n\nAIComposer embeds RichTextInput, which is built on Lexical. Those packages are optional peer dependencies of entasis, so install them alongside it:\n\n`pnpm add lexical @lexical/history @lexical/link @lexical/list @lexical/markdown @lexical/rich-text @lexical/selection @lexical/utils`\n\n## Import\n\n```svelte\n<script lang=\"ts\">\n import {\n AIComposer,\n type AIComposerAttachment,\n type AIComposerCommand,\n type AIComposerHandle,\n type AIComposerMentionItem,\n type AIComposerQueuedMessage,\n type AIComposerSkillItem,\n type AIComposerSubmitPayload\n } from './index.ts';\n</script>\n```\n\n## State and defaults\n\n- `value`, `files`, `attachments`, and `queue` are bindable.\n- Omitted `value`, `files`, `attachments`, `busy`, and labels inherit from the nearest `AIConversation`. A supplied direct prop always wins.\n- `defaultValue` initializes an uncontrolled draft once; `onValueChange` reports each library edit once and stays silent for parent updates.\n- Provider queue synchronization is signature-based and idempotent. It never compares proxy queue objects to their raw counterparts.\n\n## Submission\n\n`onSubmit` receives `AIComposerSubmitPayload`: display `markdown`, model-ready `modelInput`, raw files, attachment records, normalized tokens, and command/file/mention/reference/skill id lists. Every submitted token has serialized MDX-style `markdown`.\n\n```svelte\n<AIComposer\n commands={[\n {\n id: 'summarize',\n label: 'Summarize',\n prompt: 'Summarize the request and preserve decisions and risks.'\n }\n ]}\n onSubmit={({ markdown, modelInput, tokens, files }) =>\n sendPrompt({ markdown, modelInput, tokens, files })}\n/>\n```\n\nWhen no direct submit callback is supplied, the nearest conversation receives a user message and the draft clears after successful submission. Direct callbacks retain the draft so application code controls when it clears. Callback failures render a danger alert. `onStop` overrides `conversation.requestStop()`; stop failures are also visible.\n\n## Trigger sources\n\n- `commands` drives `/`; it accepts a Svelte Pro-compatible command array or a trigger-source object.\n- `mentionItems` is the compatibility list for files, references, and skills.\n- `mentions` and `references` compose into `@`; `skills` drives `$`.\n- Trigger-source objects support items, title, empty copy, grouping, token-kind resolution, custom token conversion, sync/async search, and selection.\n- Compatibility callbacks are `onCommandSearch`, `onMentionSearch`, and `onSkillSearch`. Mention search receives `{ query, type }`; skill search falls back to `onMentionSearch({ query, type: 'skill' })`.\n- Synchronous searches stay synchronous. Promise searches expose loading/error/request state through the reused RichTextInput lifecycle and ignore stale responses.\n- A trigger source's `onSelect({ item, context })` is the pick event. The per-kind\n `onCommandInsert`, `onMentionInsert`, and `onSkillInsert` callbacks run after the token is\n inserted, so they are named for the insertion rather than the pick: `onSelect` is reserved for\n \"the user picked this item\" and one component cannot own three of them.\n- Those callbacks and `onSuggestionOpen`, `onSuggestionClose`, `onSuggestionQueryChange`, and `onSuggestionHighlightChange` receive normalized source/lifecycle data.\n\n## Files and attachments\n\nSet `fileDropzone` to enable the chooser, paste, and drag-and-drop intake. The composer delegates to the shared `FileDropzone`, exposes `data-file-drag-state=\"potential | valid | invalid\"`, and renders a default overlay while a file drag is active. Override its copy with `dropLabel` and `dropInvalidLabel`, or replace the overlay content through the `dropzone` slot, which receives `{ state, files, accept, multiple, maxFiles, maxFileSize }`. `fileMultiple`, accepted types, maximum count, and maximum bytes use the shared file acceptance rules and report detailed rejections through `onFileReject`.\n\nWith only `files`, the composer uses raw `File[]`. Supplying `attachments`, an attachment callback, or conversation attachment state activates managed attachments. Managed records use `pending | uploading | uploaded | failed`, keep stable ids across queue edits, show `previewUrl` or `remoteUrl`, and expose add/retry/remove callbacks. Rejected files and retry failures remain visible.\n\n## Voice input\n\nSet `voiceInput` to render the existing VoiceInput primitive before the submit control. `voiceInputVariant` is `compact | expandable` and defaults to `compact`. The expandable presentation grows into the remaining footer width while recording; compact remains a mic-sized control.\n\nConfigure capture with `voiceInputMinDuration`, `voiceInputMaxDuration`, `voiceInputColor`, the accessible labels, and `voiceInputTheme`.\n\n`onVoiceInput` is the only voice lifecycle callback. It receives the finalized recording as an `ArrayBuffer` and must return a promise. AIComposer clears the internal recording before playback can render and replaces the voice control with a spinner until the promise settles. Callback failures render on the voice field. AIComposer remains transport-free: the callback owns transcription, upload, or any other application workflow. Replacing the complete `footer` also replaces the integrated voice control.\n\n```svelte\n<AIComposer\n voiceInput\n voiceInputVariant=\"expandable\"\n onVoiceInput={(audioBuffer) => transcribe(audioBuffer)}\n/>\n```\n\n## Queue\n\nWhen `busy` and `queueWhileBusy` are true, submission creates a flat `AIComposerQueuedMessage` and clears the draft. Queue rows can be reordered, steered, edited, restored, cancelled, or have editing cancelled. The lifecycle callbacks are:\n\n- `onQueueChange`\n- `onQueuedMessageAdd`, `onQueuedMessageCancel`\n- `onQueuedMessageEditStart`, `onQueuedMessageEditCommit`, `onQueuedMessageEditCancel`\n- `onQueuedMessageReorder`, `onSteer`\n\nSingle-message queue callbacks receive `{ message, index }`; edit commits also include `previousMessage`.\n\nAIComposer does not automatically drain the queue when `busy` becomes false. Missing queue targets throw instead of reporting a false success.\n\n## Editor and composition\n\n`submitShortcut` is `none | enter | shift-enter | command-enter`. `toolbar` is `hover | fixed | both | none`; `formats` and `autoresize` are forwarded to RichTextInput.\n\n`header`, `prefix`, `suffix`, and `modelSelector` are content slots. `dropzone` customizes the active file-drop overlay. `footerStart`, `actions`, and replacement `footer` receive `{ value, files, attachments, isEmpty, isBusy }`. The default footer orders file/model controls at the start and custom actions, voice input, and submit/stop at the end.\n\nThe component handle exposes `focus`, `clear`, `insertText`, `insertItem`, `insertToken`, `insertCommand`, `insertMention`, `insertReference`, and `insertSkill`. `clear()` clears editor Markdown and token metadata, not attached files.\n\nThe root accepts native form attributes plus bindable `ref`, `class`, and `theme`. Theme parts cover root, dropzone/dropzone icon, header, files, file rows, body, editor, toolbar, errors, footer/actions, the voice-input region, and every queue region. `voiceInputTheme` is forwarded to the reused VoiceInput primitive.\n";
|
|
1
|
+
export declare const aiComposerDescription = "\n# AIComposer\n\nAIComposer is a Markdown prompt composer built on the existing `RichTextInput`, `VoiceInput`, file-acceptance helpers, `SortableList`, `ScrollArea`, and `AIFilePreview`. It adds AI command, mention, reference, and skill tokens; optional voice capture; raw or managed files; queue editing; steering; submit/stop state; and optional `AIConversation` integration without owning transport.\n\n## Requires\n\nAIComposer embeds RichTextInput, which is built on Lexical. Those packages are optional peer dependencies of entasis, so install them alongside it:\n\n`pnpm add lexical @lexical/history @lexical/link @lexical/list @lexical/markdown @lexical/rich-text @lexical/selection @lexical/utils`\n\n## Import\n\n```svelte\n<script lang=\"ts\">\n import {\n AIComposer,\n type AIComposerAttachment,\n type AIComposerCommand,\n type AIComposerHandle,\n type AIComposerMentionItem,\n type AIComposerQueuedMessage,\n type AIComposerSkillItem,\n type AIComposerSubmitPayload\n } from './index.ts';\n</script>\n```\n\n## State and defaults\n\n- `value`, `files`, `attachments`, and `queue` are bindable.\n- Omitted `value`, `files`, `attachments`, `busy`, and labels inherit from the nearest `AIConversation`. A supplied direct prop always wins.\n- `defaultValue` initializes an uncontrolled draft once; `onValueChange` reports each library edit once and stays silent for parent updates.\n- Provider queue synchronization is signature-based and idempotent. It never compares proxy queue objects to their raw counterparts.\n\n## Submission\n\n`onSubmit` receives `AIComposerSubmitPayload`: display `markdown`, model-ready `modelInput`, raw files, attachment records, normalized tokens, and command/file/mention/reference/skill id lists. Every submitted token has serialized MDX-style `markdown`.\n\n```svelte\n<AIComposer\n commands={[\n {\n id: 'summarize',\n label: 'Summarize',\n prompt: 'Summarize the request and preserve decisions and risks.'\n }\n ]}\n onSubmit={({ markdown, modelInput, tokens, files }) =>\n sendPrompt({ markdown, modelInput, tokens, files })}\n/>\n```\n\nEnter sends and Shift+Enter inserts a newline (`submitShortcut` defaults to `'enter'`; pass `'none'` to make Enter a newline). When no direct submit callback is supplied, the nearest conversation receives a user message. Either way the draft clears once the send succeeds: a direct `onSubmit` clears it when it returns or its promise resolves, and keeps it when it throws or rejects, showing the error as a danger alert. Focus returns to the editor after every send that started in the composer (Enter, the send button even in Safari, the Queue button, or committing a queued edit), so the next message can be typed straight away. `onStop` overrides `conversation.requestStop()`; stop failures are also visible.\n\nThe handle's `submit(text?)` sends the current draft, or `text` in its place, through the same path (queueing while busy) and focuses the editor; use it for submit-on-select prompt suggestions. For fill-on-select, set the input and call `focus()`: it lands in the editor with the caret after the new text, even when the value changed in the same tick.\n\n## Trigger sources\n\n- `commands` drives `/`; it accepts a Svelte Pro-compatible command array or a trigger-source object.\n- `mentionItems` is the compatibility list for files, references, and skills.\n- `mentions` and `references` compose into `@`; `skills` drives `$`.\n- Trigger-source objects support items, title, empty copy, grouping, token-kind resolution, custom token conversion, sync/async search, and selection.\n- Compatibility callbacks are `onCommandSearch`, `onMentionSearch`, and `onSkillSearch`. Mention search receives `{ query, type }`; skill search falls back to `onMentionSearch({ query, type: 'skill' })`.\n- Synchronous searches stay synchronous. Promise searches expose loading/error/request state through the reused RichTextInput lifecycle and ignore stale responses.\n- A trigger source's `onSelect({ item, context })` is the pick event. The per-kind\n `onCommandInsert`, `onMentionInsert`, and `onSkillInsert` callbacks run after the token is\n inserted, so they are named for the insertion rather than the pick: `onSelect` is reserved for\n \"the user picked this item\" and one component cannot own three of them.\n- Those callbacks and `onSuggestionOpen`, `onSuggestionClose`, `onSuggestionQueryChange`, and `onSuggestionHighlightChange` receive normalized source/lifecycle data.\n\n## Files and attachments\n\nSet `fileDropzone` to enable the chooser, paste, and drag-and-drop intake. The composer delegates to the shared `FileDropzone`, exposes `data-file-drag-state=\"potential | valid | invalid\"`, and renders a default overlay while a file drag is active. Override its copy with `dropLabel` and `dropInvalidLabel`, or replace the overlay content through the `dropzone` slot, which receives `{ state, files, accept, multiple, maxFiles, maxFileSize }`. `fileMultiple`, accepted types, maximum count, and maximum bytes use the shared file acceptance rules and report detailed rejections through `onFileReject`.\n\nWith only `files`, the composer uses raw `File[]`. Supplying `attachments`, an attachment callback, or conversation attachment state activates managed attachments. Managed records use `pending | uploading | uploaded | failed`, keep stable ids across queue edits, show `previewUrl` or `remoteUrl`, and expose add/retry/remove callbacks. Retry failures render as an alert. Rejected files show a short, localized note that names the file and what to attach instead (\"notes.txt isn't supported \u2014 use images or PDF\", built from `accept`), with a dismiss button; it clears itself after a few seconds (a repeated rejection restarts that timer) or on the next accepted file. The note lives in an always-mounted `role=\"status\"` region so screen readers announce each rejection. With `fileMultiple={false}` the limit note reads one file.\n\n## Voice input\n\nSet `voiceInput` to render the existing VoiceInput primitive before the submit control. `voiceInputVariant` is `compact | expandable` and defaults to `compact`. The expandable presentation grows into the remaining footer width while recording; compact remains a mic-sized control.\n\nConfigure capture with `voiceInputMinDuration`, `voiceInputMaxDuration`, `voiceInputColor`, the accessible labels, and `voiceInputTheme`.\n\n`onVoiceInput` is the only voice lifecycle callback. It receives the finalized recording as an `ArrayBuffer` and must return a promise. AIComposer clears the internal recording before playback can render and replaces the voice control with a spinner until the promise settles. Callback failures render on the voice field. AIComposer remains transport-free: the callback owns transcription, upload, or any other application workflow. Replacing the complete `footer` also replaces the integrated voice control.\n\n```svelte\n<AIComposer\n voiceInput\n voiceInputVariant=\"expandable\"\n onVoiceInput={(audioBuffer) => transcribe(audioBuffer)}\n/>\n```\n\n## Queue\n\nWhen `busy` and `queueWhileBusy` are true, submission creates a flat `AIComposerQueuedMessage` and clears the draft. While busy the footer shows a solid stop button in the send position and, once the draft is not empty, a \"Queue message\" button next to it. Queue rows can be reordered, steered (a steered row carries a \"Steering\" badge), edited, restored, cancelled, or have editing cancelled; Escape in the composer cancels an edit unless the suggestion popup handled it; cancelling an edit, by Escape or its button, keeps focus in the editor. Long queued messages truncate inside the composer. The lifecycle callbacks are:\n\n- `onQueueChange`\n- `onQueuedMessageAdd`, `onQueuedMessageCancel`\n- `onQueuedMessageEditStart`, `onQueuedMessageEditCommit`, `onQueuedMessageEditCancel`\n- `onQueuedMessageReorder`, `onSteer`\n\nSingle-message queue callbacks receive `{ message, index }`; edit commits also include `previousMessage`.\n\nAIComposer does not automatically drain the queue when `busy` becomes false. Missing queue targets throw instead of reporting a false success.\n\n## Editor and composition\n\n`submitShortcut` is `none | enter | shift-enter | command-enter` and defaults to `enter`. `toolbar` is `hover | fixed | both | none` and defaults to `none` (no formatting chrome in a chat composer; Markdown shortcuts still work); `formats` and `autoresize` are forwarded to RichTextInput.\n\nThe / @ $ menus show an item's `path` (files and references) or else its `description` as a second line and a leading icon per kind when the item has none. Inline tokens are tinted by kind: commands primary, mentions info, skills success, files and references neutral.\n\n`header`, `prefix`, `suffix`, and `modelSelector` are content slots. `dropzone` customizes the active file-drop overlay. `footerStart`, `actions`, and replacement `footer` receive `{ value, files, attachments, isEmpty, isBusy }`. The default footer puts the attach button at the far start, then `footerStart`; the end holds custom `actions`, the `modelSelector` slot, voice input and the send/stop control, which is always last and keeps priority when the footer is tight. The voice button carries an accessible name only (`voiceInputAriaLabel`), no visible label.\n\nThe component handle exposes `submit`, `focus`, `clear`, `insertText`, `insertItem`, `insertToken`, `insertCommand`, `insertMention`, `insertReference`, and `insertSkill`. `clear()` clears editor Markdown and token metadata, not attached files.\n\n## Look and layout\n\nThe composer is a raised card (raised surface, hairline border, soft lift) that reads on any chat surface. It caps its width at the CSS variable `--ai-chat-content-width` when an ancestor sets it (AIChat does) and centres itself; without the variable it spans its container. The focus ring shows only while the editor has focus, not when a footer button does. On a narrow composer (below 28rem) or a touch screen, editor text steps up to 16px (no iOS focus zoom) and footer buttons, including the voice-input mic, grow to the 36px control height.\n\nThe root accepts native form attributes plus bindable `ref`, `class`, and `theme`; a native `onkeydown` runs before the built-in Escape handling and `preventDefault()` cancels it. Theme parts cover root, dropzone/dropzone icon, header, files, file rows, body, editor, toolbar, errors, the rejected-file `notice`, footer/actions, the voice-input region, and every queue region including `queueBadge` and `queueFiles`. `voiceInputTheme` is forwarded to the reused VoiceInput primitive.\n";
|
|
@@ -51,7 +51,9 @@ AIComposer embeds RichTextInput, which is built on Lexical. Those packages are o
|
|
|
51
51
|
/>
|
|
52
52
|
\`\`\`
|
|
53
53
|
|
|
54
|
-
When no direct submit callback is supplied, the nearest conversation receives a user message
|
|
54
|
+
Enter sends and Shift+Enter inserts a newline (\`submitShortcut\` defaults to \`'enter'\`; pass \`'none'\` to make Enter a newline). When no direct submit callback is supplied, the nearest conversation receives a user message. Either way the draft clears once the send succeeds: a direct \`onSubmit\` clears it when it returns or its promise resolves, and keeps it when it throws or rejects, showing the error as a danger alert. Focus returns to the editor after every send that started in the composer (Enter, the send button even in Safari, the Queue button, or committing a queued edit), so the next message can be typed straight away. \`onStop\` overrides \`conversation.requestStop()\`; stop failures are also visible.
|
|
55
|
+
|
|
56
|
+
The handle's \`submit(text?)\` sends the current draft, or \`text\` in its place, through the same path (queueing while busy) and focuses the editor; use it for submit-on-select prompt suggestions. For fill-on-select, set the input and call \`focus()\`: it lands in the editor with the caret after the new text, even when the value changed in the same tick.
|
|
55
57
|
|
|
56
58
|
## Trigger sources
|
|
57
59
|
|
|
@@ -71,7 +73,7 @@ When no direct submit callback is supplied, the nearest conversation receives a
|
|
|
71
73
|
|
|
72
74
|
Set \`fileDropzone\` to enable the chooser, paste, and drag-and-drop intake. The composer delegates to the shared \`FileDropzone\`, exposes \`data-file-drag-state="potential | valid | invalid"\`, and renders a default overlay while a file drag is active. Override its copy with \`dropLabel\` and \`dropInvalidLabel\`, or replace the overlay content through the \`dropzone\` slot, which receives \`{ state, files, accept, multiple, maxFiles, maxFileSize }\`. \`fileMultiple\`, accepted types, maximum count, and maximum bytes use the shared file acceptance rules and report detailed rejections through \`onFileReject\`.
|
|
73
75
|
|
|
74
|
-
With only \`files\`, the composer uses raw \`File[]\`. Supplying \`attachments\`, an attachment callback, or conversation attachment state activates managed attachments. Managed records use \`pending | uploading | uploaded | failed\`, keep stable ids across queue edits, show \`previewUrl\` or \`remoteUrl\`, and expose add/retry/remove callbacks. Rejected files and
|
|
76
|
+
With only \`files\`, the composer uses raw \`File[]\`. Supplying \`attachments\`, an attachment callback, or conversation attachment state activates managed attachments. Managed records use \`pending | uploading | uploaded | failed\`, keep stable ids across queue edits, show \`previewUrl\` or \`remoteUrl\`, and expose add/retry/remove callbacks. Retry failures render as an alert. Rejected files show a short, localized note that names the file and what to attach instead ("notes.txt isn't supported — use images or PDF", built from \`accept\`), with a dismiss button; it clears itself after a few seconds (a repeated rejection restarts that timer) or on the next accepted file. The note lives in an always-mounted \`role="status"\` region so screen readers announce each rejection. With \`fileMultiple={false}\` the limit note reads one file.
|
|
75
77
|
|
|
76
78
|
## Voice input
|
|
77
79
|
|
|
@@ -91,7 +93,7 @@ Configure capture with \`voiceInputMinDuration\`, \`voiceInputMaxDuration\`, \`v
|
|
|
91
93
|
|
|
92
94
|
## Queue
|
|
93
95
|
|
|
94
|
-
When \`busy\` and \`queueWhileBusy\` are true, submission creates a flat \`AIComposerQueuedMessage\` and clears the draft. Queue rows can be reordered, steered, edited, restored, cancelled, or have editing cancelled. The lifecycle callbacks are:
|
|
96
|
+
When \`busy\` and \`queueWhileBusy\` are true, submission creates a flat \`AIComposerQueuedMessage\` and clears the draft. While busy the footer shows a solid stop button in the send position and, once the draft is not empty, a "Queue message" button next to it. Queue rows can be reordered, steered (a steered row carries a "Steering" badge), edited, restored, cancelled, or have editing cancelled; Escape in the composer cancels an edit unless the suggestion popup handled it; cancelling an edit, by Escape or its button, keeps focus in the editor. Long queued messages truncate inside the composer. The lifecycle callbacks are:
|
|
95
97
|
|
|
96
98
|
- \`onQueueChange\`
|
|
97
99
|
- \`onQueuedMessageAdd\`, \`onQueuedMessageCancel\`
|
|
@@ -104,11 +106,17 @@ AIComposer does not automatically drain the queue when \`busy\` becomes false. M
|
|
|
104
106
|
|
|
105
107
|
## Editor and composition
|
|
106
108
|
|
|
107
|
-
\`submitShortcut\` is \`none | enter | shift-enter | command-enter\`. \`toolbar\` is \`hover | fixed | both | none
|
|
109
|
+
\`submitShortcut\` is \`none | enter | shift-enter | command-enter\` and defaults to \`enter\`. \`toolbar\` is \`hover | fixed | both | none\` and defaults to \`none\` (no formatting chrome in a chat composer; Markdown shortcuts still work); \`formats\` and \`autoresize\` are forwarded to RichTextInput.
|
|
110
|
+
|
|
111
|
+
The / @ $ menus show an item's \`path\` (files and references) or else its \`description\` as a second line and a leading icon per kind when the item has none. Inline tokens are tinted by kind: commands primary, mentions info, skills success, files and references neutral.
|
|
112
|
+
|
|
113
|
+
\`header\`, \`prefix\`, \`suffix\`, and \`modelSelector\` are content slots. \`dropzone\` customizes the active file-drop overlay. \`footerStart\`, \`actions\`, and replacement \`footer\` receive \`{ value, files, attachments, isEmpty, isBusy }\`. The default footer puts the attach button at the far start, then \`footerStart\`; the end holds custom \`actions\`, the \`modelSelector\` slot, voice input and the send/stop control, which is always last and keeps priority when the footer is tight. The voice button carries an accessible name only (\`voiceInputAriaLabel\`), no visible label.
|
|
114
|
+
|
|
115
|
+
The component handle exposes \`submit\`, \`focus\`, \`clear\`, \`insertText\`, \`insertItem\`, \`insertToken\`, \`insertCommand\`, \`insertMention\`, \`insertReference\`, and \`insertSkill\`. \`clear()\` clears editor Markdown and token metadata, not attached files.
|
|
108
116
|
|
|
109
|
-
|
|
117
|
+
## Look and layout
|
|
110
118
|
|
|
111
|
-
The
|
|
119
|
+
The composer is a raised card (raised surface, hairline border, soft lift) that reads on any chat surface. It caps its width at the CSS variable \`--ai-chat-content-width\` when an ancestor sets it (AIChat does) and centres itself; without the variable it spans its container. The focus ring shows only while the editor has focus, not when a footer button does. On a narrow composer (below 28rem) or a touch screen, editor text steps up to 16px (no iOS focus zoom) and footer buttons, including the voice-input mic, grow to the 36px control height.
|
|
112
120
|
|
|
113
|
-
The root accepts native form attributes plus bindable \`ref\`, \`class\`, and \`theme
|
|
121
|
+
The root accepts native form attributes plus bindable \`ref\`, \`class\`, and \`theme\`; a native \`onkeydown\` runs before the built-in Escape handling and \`preventDefault()\` cancels it. Theme parts cover root, dropzone/dropzone icon, header, files, file rows, body, editor, toolbar, errors, the rejected-file \`notice\`, footer/actions, the voice-input region, and every queue region including \`queueBadge\` and \`queueFiles\`. \`voiceInputTheme\` is forwarded to the reused VoiceInput primitive.
|
|
114
122
|
`;
|
|
@@ -95,6 +95,11 @@ export type AIComposerQueuedMessageEditPayload = AIComposerQueuedMessagePayload
|
|
|
95
95
|
previousMessage: AIComposerQueuedMessage;
|
|
96
96
|
};
|
|
97
97
|
export type AIComposerHandle = RichTextInputHandle & {
|
|
98
|
+
/**
|
|
99
|
+
* Sends the current draft, or `text` in its place, exactly like Enter or the send button
|
|
100
|
+
* (queued while busy when `queueWhileBusy` is on), then focuses the editor.
|
|
101
|
+
*/
|
|
102
|
+
submit: (text?: string) => Promise<void>;
|
|
98
103
|
insertCommand: (item: AIComposerCommand) => void;
|
|
99
104
|
insertMention: (item: AIComposerMentionItem) => void;
|
|
100
105
|
insertReference: (item: AIComposerMentionItem) => void;
|
|
@@ -163,9 +168,17 @@ export type AIComposerProps = WithAttachments<Omit<HTMLFormAttributes, 'children
|
|
|
163
168
|
references?: AIComposerTriggerSource<AIComposerMentionItem>;
|
|
164
169
|
/** Skill trigger source. */
|
|
165
170
|
skills?: AIComposerTriggerSource<AIComposerSkillItem> | readonly AIComposerSkillItem[];
|
|
166
|
-
/**
|
|
171
|
+
/**
|
|
172
|
+
* Keyboard shortcut that submits when the suggestion popup has not handled the key. With the
|
|
173
|
+
* default `'enter'`, Shift+Enter inserts a newline; `'none'` makes Enter a newline again.
|
|
174
|
+
* @default 'enter'
|
|
175
|
+
*/
|
|
167
176
|
submitShortcut?: RichTextInputSubmitShortcut;
|
|
168
|
-
/**
|
|
177
|
+
/**
|
|
178
|
+
* Formatting toolbar mode forwarded to RichTextInput. Chat composers show no formatting chrome
|
|
179
|
+
* by default; Markdown shortcuts still work.
|
|
180
|
+
* @default 'none'
|
|
181
|
+
*/
|
|
169
182
|
toolbar?: RichTextInputToolbar;
|
|
170
183
|
/** Formatting controls and Markdown shortcuts enabled in RichTextInput. */
|
|
171
184
|
formats?: RichTextInputFormat[];
|
|
@@ -181,7 +194,7 @@ export type AIComposerProps = WithAttachments<Omit<HTMLFormAttributes, 'children
|
|
|
181
194
|
voiceInputMaxDuration?: number;
|
|
182
195
|
/** Semantic color used while recording. */
|
|
183
196
|
voiceInputColor?: Colors;
|
|
184
|
-
/** Accessible
|
|
197
|
+
/** Accessible name and tooltip of the mic button that starts voice capture (no visible label). */
|
|
185
198
|
voiceInputAriaLabel?: string;
|
|
186
199
|
/** Accessible label and tooltip for stopping voice capture. */
|
|
187
200
|
voiceInputStopLabel?: string;
|
|
@@ -205,7 +218,7 @@ export type AIComposerProps = WithAttachments<Omit<HTMLFormAttributes, 'children
|
|
|
205
218
|
dropzone?: Slot<AIComposerDropzoneState>;
|
|
206
219
|
/** Content rendered below the composer controls. */
|
|
207
220
|
footer?: Slot<AIComposerSubmitState>;
|
|
208
|
-
/** Content rendered at the start of the default footer. */
|
|
221
|
+
/** Content rendered at the start of the default footer, after the attach button. */
|
|
209
222
|
footerStart?: Slot<AIComposerSubmitState>;
|
|
210
223
|
/** Additional actions rendered before the default submit or stop control. */
|
|
211
224
|
actions?: Slot<AIComposerSubmitState>;
|
|
@@ -213,13 +226,20 @@ export type AIComposerProps = WithAttachments<Omit<HTMLFormAttributes, 'children
|
|
|
213
226
|
prefix?: Slot;
|
|
214
227
|
/** Content rendered after the default composer actions. */
|
|
215
228
|
suffix?: Slot;
|
|
216
|
-
/** Model selector rendered
|
|
229
|
+
/** Model selector rendered at the end of the default footer, next to the send control. */
|
|
217
230
|
modelSelector?: Slot;
|
|
218
|
-
/**
|
|
231
|
+
/**
|
|
232
|
+
* Handles a submission, queued submission, or steering message. The draft clears once it
|
|
233
|
+
* returns or its promise resolves; a throw or rejection keeps the draft and shows the error.
|
|
234
|
+
* Focus returns to the editor either way.
|
|
235
|
+
*/
|
|
219
236
|
onSubmit?: (payload: AIComposerSubmitPayload) => void | Promise<void>;
|
|
220
237
|
/** Requests that the active response stop. */
|
|
221
238
|
onStop?: () => void | Promise<void>;
|
|
222
|
-
/**
|
|
239
|
+
/**
|
|
240
|
+
* Called with files rejected by count, type, or size constraints. The composer also shows a
|
|
241
|
+
* short, localized note naming the file and what to attach instead, which dismisses itself.
|
|
242
|
+
*/
|
|
223
243
|
onFilesRejected?: (files: File[]) => void;
|
|
224
244
|
/** Called whenever the accepted file list changes. */
|
|
225
245
|
onFilesChange?: (files: File[]) => void;
|