entasis 0.11.0 → 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 +256 -30
- package/dist/components/Form/Field/Field.svelte.d.ts +9 -0
- 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 +64 -8
- 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 +109 -3
- package/dist/components/Form/Field/field.state.svelte.js +508 -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 +47 -14
- 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 +40 -2
- package/dist/components/Form/Form/FormInputRenderer.svelte +7 -0
- package/dist/components/Form/Form/form.d.ts +35 -6
- package/dist/components/Form/Form/form.mcp.d.ts +1 -1
- package/dist/components/Form/Form/form.mcp.js +113 -13
- package/dist/components/Form/Form/form.props.d.ts +32 -1
- package/dist/components/Form/Form/form.registry.d.ts +2 -2
- package/dist/components/Form/Form/form.registry.js +1 -4
- package/dist/components/Form/Form/form.state.svelte.d.ts +1138 -413
- package/dist/components/Form/Form/form.state.svelte.js +319 -26
- package/dist/components/Form/Form/index.d.ts +3 -1
- package/dist/components/Form/Form/visibility.d.ts +3096 -1831
- 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 +1022 -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 +225 -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
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { tick } from 'svelte';
|
|
2
3
|
import CheckboxesInput from '../Form/CheckboxesInput/CheckboxesInput.svelte';
|
|
3
4
|
import RadioInput from '../Form/RadioInput/RadioInput.svelte';
|
|
4
5
|
import TextArea from '../Form/TextArea/TextArea.svelte';
|
|
6
|
+
import TextInput from '../Form/TextInput/TextInput.svelte';
|
|
5
7
|
import Slot from '../Slot/Slot.svelte';
|
|
6
8
|
import type { Slot as SlotType } from '../Slot/slot.js';
|
|
9
|
+
import { composedContains, getDeepActiveElement } from '../../utils/focus.js';
|
|
10
|
+
import { useI18n } from '../../i18n/context.svelte.js';
|
|
7
11
|
import AIAskUserQuestionFileStep from './AIAskUserQuestionFileStep.svelte';
|
|
8
12
|
import {
|
|
13
|
+
AI_ASK_OTHER_VALUE,
|
|
14
|
+
getAIAskCustomAnswer,
|
|
9
15
|
getAIAskFileAnswer,
|
|
16
|
+
getAIAskOptionAnswers,
|
|
10
17
|
getAIAskStringAnswer,
|
|
11
18
|
getAIAskStringArrayAnswer,
|
|
12
19
|
isAIAskQuestionRequired
|
|
@@ -14,7 +21,9 @@
|
|
|
14
21
|
import type {
|
|
15
22
|
AIAskAnswer,
|
|
16
23
|
AIAskQuestion,
|
|
17
|
-
AIAskUserQuestionQuestionState
|
|
24
|
+
AIAskUserQuestionQuestionState,
|
|
25
|
+
AIMultipleQuestion,
|
|
26
|
+
AISingleQuestion
|
|
18
27
|
} from './aiAskUserQuestion.props.js';
|
|
19
28
|
import {
|
|
20
29
|
useAIAskUserQuestionTheme,
|
|
@@ -27,8 +36,11 @@
|
|
|
27
36
|
errorMessage,
|
|
28
37
|
disabled = false,
|
|
29
38
|
renderer,
|
|
39
|
+
other,
|
|
30
40
|
onValueChange,
|
|
41
|
+
onOtherChange,
|
|
31
42
|
onError,
|
|
43
|
+
onRegister,
|
|
32
44
|
theme
|
|
33
45
|
}: {
|
|
34
46
|
question: AIAskQuestion;
|
|
@@ -36,21 +48,150 @@
|
|
|
36
48
|
errorMessage?: string;
|
|
37
49
|
disabled?: boolean;
|
|
38
50
|
renderer?: SlotType<AIAskUserQuestionQuestionState>;
|
|
39
|
-
|
|
51
|
+
/** The "Other…" text while Other is chosen, kept by the parent so it survives a remount. */
|
|
52
|
+
other?: string;
|
|
53
|
+
/** `advance: false` marks an edit that must never auto-advance (the "Other…" field). */
|
|
54
|
+
onValueChange: (value: AIAskAnswer, options?: { advance?: boolean }) => void;
|
|
55
|
+
onOtherChange: (text: string | undefined) => void;
|
|
40
56
|
onError: (message: string) => void;
|
|
57
|
+
/** Registers the number-key picker; returns its cleanup. */
|
|
58
|
+
onRegister?: (pick: (position: number) => boolean) => () => void;
|
|
41
59
|
theme?: AIAskUserQuestionThemeProps;
|
|
42
60
|
} = $props();
|
|
43
61
|
|
|
62
|
+
const id = $props.id();
|
|
63
|
+
const t = $derived(useI18n());
|
|
44
64
|
const classes = $derived(useAIAskUserQuestionTheme(theme));
|
|
45
65
|
const required = $derived(isAIAskQuestionRequired(question));
|
|
66
|
+
const errorId = $derived(`${id}-error`);
|
|
67
|
+
let stepElement = $state<HTMLElement>();
|
|
68
|
+
// The parent remembers whether "Other…" is chosen and its text, so typed text that equals an
|
|
69
|
+
// option id still reads as Other. An answer that arrives with free text (a string that is no
|
|
70
|
+
// option id, from `defaultValue` say) also chooses Other.
|
|
71
|
+
const customAnswer = $derived(getAIAskCustomAnswer(question, value));
|
|
72
|
+
const otherText = $derived(other ?? customAnswer ?? '');
|
|
73
|
+
const otherActive = $derived(other !== undefined || customAnswer !== undefined);
|
|
74
|
+
const choiceAttrs = $derived({
|
|
75
|
+
'aria-invalid': errorMessage ? ('true' as const) : undefined,
|
|
76
|
+
'aria-describedby': errorMessage ? errorId : undefined
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
function choiceItems(choice: AISingleQuestion | AIMultipleQuestion) {
|
|
80
|
+
const items = choice.options.map((option) => ({ ...option, value: option.id }));
|
|
81
|
+
if (!choice.showOther) return items;
|
|
82
|
+
return [...items, { value: AI_ASK_OTHER_VALUE, label: choice.otherLabel ?? t.aiAskOther }];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
async function focusOther(): Promise<void> {
|
|
86
|
+
await tick();
|
|
87
|
+
stepElement
|
|
88
|
+
?.querySelector<HTMLInputElement>('[data-slot="ai-ask-user-question-other"] input')
|
|
89
|
+
?.focus();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// The option ids of a multiple answer. Its "Other…" text is the last entry, and is left out
|
|
93
|
+
// even when it equals an option id.
|
|
94
|
+
function optionAnswers(): string[] {
|
|
95
|
+
if (question.type !== 'multiple') return [];
|
|
96
|
+
const entries = getAIAskStringArrayAnswer(value);
|
|
97
|
+
const withoutOther =
|
|
98
|
+
otherActive && otherText.trim() && entries.at(-1) === otherText
|
|
99
|
+
? entries.slice(0, -1)
|
|
100
|
+
: entries;
|
|
101
|
+
return getAIAskOptionAnswers(question, withoutOther);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function selectSingle(answer: string | null): void {
|
|
105
|
+
if (answer === null) return;
|
|
106
|
+
if (answer !== AI_ASK_OTHER_VALUE) {
|
|
107
|
+
onOtherChange(undefined);
|
|
108
|
+
onValueChange(answer);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const text = otherText;
|
|
112
|
+
onOtherChange(text);
|
|
113
|
+
onValueChange(text.trim() ? text : '', { advance: false });
|
|
114
|
+
void focusOther();
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function selectMultiple(next: string[]): void {
|
|
118
|
+
const withOther = next.includes(AI_ASK_OTHER_VALUE);
|
|
119
|
+
const options = next.filter((entry) => entry !== AI_ASK_OTHER_VALUE);
|
|
120
|
+
const text = otherText;
|
|
121
|
+
if (withOther && !otherActive) void focusOther();
|
|
122
|
+
onOtherChange(withOther ? text : undefined);
|
|
123
|
+
onValueChange(withOther && text.trim() ? [...options, text] : options, { advance: false });
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function typeOther(text: string): void {
|
|
127
|
+
const options = optionAnswers();
|
|
128
|
+
onOtherChange(text);
|
|
129
|
+
if (question.type === 'multiple') {
|
|
130
|
+
onValueChange(text.trim() ? [...options, text] : options, { advance: false });
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
onValueChange(text, { advance: false });
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
$effect(() => onRegister?.(pickOption));
|
|
137
|
+
|
|
138
|
+
/** Picks or toggles the option behind a number key: 1 is the first option, Other comes last. */
|
|
139
|
+
function pickOption(position: number): boolean {
|
|
140
|
+
if (renderer || disabled) return false;
|
|
141
|
+
if (question.type !== 'single' && question.type !== 'multiple') return false;
|
|
142
|
+
const items = choiceItems(question);
|
|
143
|
+
const item = items[position];
|
|
144
|
+
if (!item || ('disabled' in item && item.disabled)) return false;
|
|
145
|
+
const followFocus =
|
|
146
|
+
item.value !== AI_ASK_OTHER_VALUE &&
|
|
147
|
+
stepElement !== undefined &&
|
|
148
|
+
composedContains(stepElement, getDeepActiveElement(stepElement.ownerDocument));
|
|
149
|
+
if (question.type === 'single') {
|
|
150
|
+
selectSingle(item.value);
|
|
151
|
+
} else {
|
|
152
|
+
const current = [...optionAnswers(), ...(otherActive ? [AI_ASK_OTHER_VALUE] : [])];
|
|
153
|
+
selectMultiple(
|
|
154
|
+
current.includes(item.value)
|
|
155
|
+
? current.filter((entry) => entry !== item.value)
|
|
156
|
+
: [...current, item.value]
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
// Like an arrow key in a radio group, the picked option takes focus and the Tab stop, so
|
|
160
|
+
// Space and Tab act on it next. Other… focuses its own text field instead.
|
|
161
|
+
if (followFocus) void focusChoice(position);
|
|
162
|
+
return true;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
async function focusChoice(position: number): Promise<void> {
|
|
166
|
+
await tick();
|
|
167
|
+
stepElement
|
|
168
|
+
?.querySelectorAll<HTMLElement>('[role="radio"],[role="checkbox"]')
|
|
169
|
+
[position]?.focus();
|
|
170
|
+
}
|
|
46
171
|
</script>
|
|
47
172
|
|
|
48
|
-
|
|
173
|
+
<!-- tabindex -1: the step itself takes focus when a step change finds no control inside it. -->
|
|
174
|
+
<div
|
|
175
|
+
bind:this={stepElement}
|
|
176
|
+
data-slot="ai-ask-user-question-step"
|
|
177
|
+
tabindex="-1"
|
|
178
|
+
class={classes.stepContent()}
|
|
179
|
+
>
|
|
49
180
|
{#if renderer}
|
|
50
|
-
<Slot
|
|
181
|
+
<Slot
|
|
182
|
+
render={renderer}
|
|
183
|
+
payload={{ question, value, setValue: (answer: AIAskAnswer) => onValueChange(answer) }}
|
|
184
|
+
/>
|
|
51
185
|
{:else}
|
|
52
186
|
<div class={classes.question()}>
|
|
53
|
-
<div class={classes.questionTitle()}>
|
|
187
|
+
<div id={`${id}-title`} class={classes.questionTitle()}>
|
|
188
|
+
{question.title}{#if required}<span
|
|
189
|
+
data-slot="ai-ask-user-question-required"
|
|
190
|
+
class={classes.requiredMarker()}
|
|
191
|
+
><span aria-hidden="true">*</span><span class="sr-only">{t.aiAskRequiredMarker}</span
|
|
192
|
+
></span
|
|
193
|
+
>{/if}
|
|
194
|
+
</div>
|
|
54
195
|
{#if question.description}
|
|
55
196
|
<div class={classes.questionDescription()}>{question.description}</div>
|
|
56
197
|
{/if}
|
|
@@ -60,10 +201,14 @@
|
|
|
60
201
|
<TextArea
|
|
61
202
|
value={getAIAskStringAnswer(value)}
|
|
62
203
|
name={question.id}
|
|
63
|
-
placeholder={question.placeholder ??
|
|
204
|
+
placeholder={question.placeholder ?? t.aiAskPlaceholder}
|
|
64
205
|
rows={question.rows ?? 4}
|
|
65
|
-
errors={errorMessage ? [errorMessage] : []}
|
|
66
206
|
class={classes.textArea()}
|
|
207
|
+
textareaAttrs={{
|
|
208
|
+
'aria-labelledby': `${id}-title`,
|
|
209
|
+
'aria-invalid': errorMessage ? 'true' : undefined,
|
|
210
|
+
'aria-describedby': errorMessage ? errorId : undefined
|
|
211
|
+
}}
|
|
67
212
|
{required}
|
|
68
213
|
{disabled}
|
|
69
214
|
onValueChange={(answer) => onValueChange(answer ?? '')}
|
|
@@ -71,34 +216,33 @@
|
|
|
71
216
|
{:else if question.type === 'single'}
|
|
72
217
|
<RadioInput
|
|
73
218
|
mode="card"
|
|
74
|
-
value={getAIAskStringAnswer(value) || null}
|
|
219
|
+
value={otherActive ? AI_ASK_OTHER_VALUE : getAIAskStringAnswer(value) || null}
|
|
75
220
|
name={question.id}
|
|
76
|
-
items={question
|
|
221
|
+
items={choiceItems(question)}
|
|
77
222
|
class={classes.options()}
|
|
78
|
-
fieldAttrs={{ 'aria-label': question.title }}
|
|
79
|
-
errors={errorMessage ? [errorMessage] : []}
|
|
223
|
+
fieldAttrs={{ 'aria-label': question.title, ...choiceAttrs }}
|
|
80
224
|
{required}
|
|
81
225
|
{disabled}
|
|
82
|
-
onValueChange={
|
|
83
|
-
if (answer !== null) onValueChange(answer);
|
|
84
|
-
}}
|
|
226
|
+
onValueChange={selectSingle}
|
|
85
227
|
/>
|
|
86
228
|
{:else if question.type === 'multiple'}
|
|
87
229
|
<CheckboxesInput
|
|
88
230
|
mode="card"
|
|
89
|
-
value={
|
|
231
|
+
value={[...optionAnswers(), ...(otherActive ? [AI_ASK_OTHER_VALUE] : [])]}
|
|
90
232
|
name={question.id}
|
|
91
|
-
items={question
|
|
233
|
+
items={choiceItems(question)}
|
|
92
234
|
class={classes.options()}
|
|
93
|
-
fieldAttrs={{ role: 'group', 'aria-label': question.title }}
|
|
94
|
-
errors={errorMessage ? [errorMessage] : []}
|
|
235
|
+
fieldAttrs={{ role: 'group', 'aria-label': question.title, ...choiceAttrs }}
|
|
95
236
|
{required}
|
|
96
237
|
{disabled}
|
|
97
|
-
onValueChange={(answer: string[]) =>
|
|
238
|
+
onValueChange={(answer: string[]) => selectMultiple(answer)}
|
|
98
239
|
/>
|
|
99
240
|
{:else if question.type === 'file'}
|
|
100
241
|
<AIAskUserQuestionFileStep
|
|
101
242
|
{question}
|
|
243
|
+
labelledby={`${id}-title`}
|
|
244
|
+
invalid={Boolean(errorMessage)}
|
|
245
|
+
describedby={errorMessage ? errorId : undefined}
|
|
102
246
|
files={getAIAskFileAnswer(value)}
|
|
103
247
|
{required}
|
|
104
248
|
{disabled}
|
|
@@ -107,9 +251,24 @@
|
|
|
107
251
|
onValueChange={(files) => onValueChange(files)}
|
|
108
252
|
/>
|
|
109
253
|
{/if}
|
|
254
|
+
|
|
255
|
+
{#if (question.type === 'single' || question.type === 'multiple') && question.showOther && otherActive}
|
|
256
|
+
<div data-slot="ai-ask-user-question-other" class={classes.other()}>
|
|
257
|
+
<TextInput
|
|
258
|
+
value={otherText}
|
|
259
|
+
name={`${question.id}-other`}
|
|
260
|
+
placeholder={question.otherPlaceholder ?? t.aiAskOtherPlaceholder}
|
|
261
|
+
inputAttrs={{ 'aria-label': question.otherLabel ?? t.aiAskOther }}
|
|
262
|
+
{disabled}
|
|
263
|
+
onValueChange={(text) => typeOther(text ?? '')}
|
|
264
|
+
/>
|
|
265
|
+
</div>
|
|
266
|
+
{/if}
|
|
110
267
|
{/if}
|
|
111
268
|
|
|
112
|
-
{#if errorMessage
|
|
113
|
-
<
|
|
269
|
+
{#if errorMessage}
|
|
270
|
+
<p id={errorId} role="alert" data-slot="ai-ask-user-question-error" class={classes.error()}>
|
|
271
|
+
{errorMessage}
|
|
272
|
+
</p>
|
|
114
273
|
{/if}
|
|
115
274
|
</div>
|
|
@@ -7,8 +7,16 @@ type $$ComponentProps = {
|
|
|
7
7
|
errorMessage?: string;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
renderer?: SlotType<AIAskUserQuestionQuestionState>;
|
|
10
|
-
|
|
10
|
+
/** The "Other…" text while Other is chosen, kept by the parent so it survives a remount. */
|
|
11
|
+
other?: string;
|
|
12
|
+
/** `advance: false` marks an edit that must never auto-advance (the "Other…" field). */
|
|
13
|
+
onValueChange: (value: AIAskAnswer, options?: {
|
|
14
|
+
advance?: boolean;
|
|
15
|
+
}) => void;
|
|
16
|
+
onOtherChange: (text: string | undefined) => void;
|
|
11
17
|
onError: (message: string) => void;
|
|
18
|
+
/** Registers the number-key picker; returns its cleanup. */
|
|
19
|
+
onRegister?: (pick: (position: number) => boolean) => () => void;
|
|
12
20
|
theme?: AIAskUserQuestionThemeProps;
|
|
13
21
|
};
|
|
14
22
|
declare const AIAskUserQuestionStep: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { useI18n } from '../../i18n/context.svelte.js';
|
|
3
|
+
import { summarizeAIAskAnswers } from './aiAskUserQuestionAnswers.js';
|
|
4
|
+
import type { AIAskUserQuestionSummaryProps } from './aiAskUserQuestion.props.js';
|
|
5
|
+
import { useAIAskUserQuestionTheme } from './aiAskUserQuestion.theme.js';
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
size = 'normal',
|
|
10
|
+
questions,
|
|
11
|
+
value,
|
|
12
|
+
title,
|
|
13
|
+
showSkipped = true,
|
|
14
|
+
class: className,
|
|
15
|
+
theme,
|
|
16
|
+
...attachments
|
|
17
|
+
}: AIAskUserQuestionSummaryProps = $props();
|
|
18
|
+
|
|
19
|
+
const id = $props.id();
|
|
20
|
+
const t = $derived(useI18n());
|
|
21
|
+
const classes = $derived(useAIAskUserQuestionTheme(theme));
|
|
22
|
+
const items = $derived(
|
|
23
|
+
summarizeAIAskAnswers(questions, value).filter((item) => showSkipped || item.answered)
|
|
24
|
+
);
|
|
25
|
+
const heading = $derived(title === false ? undefined : (title ?? t.aiAskSummaryTitle));
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<div
|
|
29
|
+
bind:this={ref}
|
|
30
|
+
data-slot="ai-ask-user-question-summary"
|
|
31
|
+
role="group"
|
|
32
|
+
data-size={size}
|
|
33
|
+
aria-labelledby={heading ? `${id}-title` : undefined}
|
|
34
|
+
class={classes.summary({ className })}
|
|
35
|
+
{...attachments}
|
|
36
|
+
>
|
|
37
|
+
{#if heading}
|
|
38
|
+
<div
|
|
39
|
+
id={`${id}-title`}
|
|
40
|
+
data-slot="ai-ask-user-question-summary-title"
|
|
41
|
+
class={classes.summaryTitle()}
|
|
42
|
+
>
|
|
43
|
+
{heading}
|
|
44
|
+
</div>
|
|
45
|
+
{/if}
|
|
46
|
+
<dl class={classes.summaryList()}>
|
|
47
|
+
{#each items as item (item.questionId)}
|
|
48
|
+
<div data-slot="ai-ask-user-question-summary-item" class={classes.summaryItem()}>
|
|
49
|
+
<dt class={classes.summaryQuestion()}>{item.question.title}</dt>
|
|
50
|
+
<dd class={classes.summaryAnswer({ answered: item.answered })}>
|
|
51
|
+
{item.answered ? item.labels.join(', ') : t.aiAskSkipped}
|
|
52
|
+
</dd>
|
|
53
|
+
</div>
|
|
54
|
+
{/each}
|
|
55
|
+
</dl>
|
|
56
|
+
</div>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AIAskUserQuestionSummaryProps } from './aiAskUserQuestion.props.js';
|
|
2
|
+
declare const AIAskUserQuestionSummary: import("svelte").Component<AIAskUserQuestionSummaryProps, {}, "ref">;
|
|
3
|
+
type AIAskUserQuestionSummary = ReturnType<typeof AIAskUserQuestionSummary>;
|
|
4
|
+
export default AIAskUserQuestionSummary;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const aiAskUserQuestionDescription = "\n# AIAskUserQuestion\n\nAIAskUserQuestion renders a validated stepped answer flow for AI tools that need structured human input. It reuses `Stepper`, `TextArea`, card radio/checkbox inputs, `FileInput`, `Button`, `Alert`, and `Empty`.\n\n## Import and schemas\n\n```svelte\n<script lang=\"ts\">\n import {\n AIAskUserQuestion,\n aiAskUserQuestionToolInputSchema,\n type AIAskUserQuestionQuestion,\n type AIAskUserQuestionSubmitPayload,\n type AIAskUserQuestionValues\n } from './index.ts';\n</script>\n```\n\nThe package exports Valibot schemas for tool state, options, every question kind, question arrays, answer maps, and the complete tool payload. The loose tool payload accepts `state`, `prompt`, `questions`, `value`/`values`, headings, context, and action labels.\n\n## Question kinds\n\n- Text: `{ id, title, type?: 'text', description?, required?, placeholder?, rows? }`\n- Single choice: `{ id, title, type: 'single', options, ... }`\n- Multiple choice: `{ id, title, type: 'multiple', options, ... }`\n- File: `{ id, title, type: 'file', accept?, multiple?, maxFiles?, maxSize?, ... }`\n\nQuestions are
|
|
1
|
+
export declare const aiAskUserQuestionDescription = "\n# AIAskUserQuestion\n\nAIAskUserQuestion renders a validated stepped answer flow for AI tools that need structured human input. It reuses `Stepper`, `TextArea`, card radio/checkbox inputs, `FileInput`, `Button`, `Alert`, and `Empty`.\n\n## Import and schemas\n\n```svelte\n<script lang=\"ts\">\n import {\n AIAskUserQuestion,\n aiAskUserQuestionToolInputSchema,\n type AIAskUserQuestionQuestion,\n type AIAskUserQuestionSubmitPayload,\n type AIAskUserQuestionValues\n } from './index.ts';\n</script>\n```\n\nThe package exports Valibot schemas for tool state, options, every question kind, question arrays, answer maps, and the complete tool payload. The loose tool payload accepts `state`, `prompt`, `questions`, `value`/`values`, headings, context, and action labels.\n\n## Question kinds\n\n- Text: `{ id, title, type?: 'text', description?, required?, placeholder?, rows? }`\n- Single choice: `{ id, title, type: 'single', options, showOther?, otherLabel?, otherPlaceholder?, ... }`\n- Multiple choice: `{ id, title, type: 'multiple', options, showOther?, otherLabel?, otherPlaceholder?, ... }`\n- File: `{ id, title, type: 'file', accept?, multiple?, maxFiles?, maxSize?, ... }`\n\nQuestions are optional by default; `required: true` blocks continuing until answered and shows a required marker after the title. On an optional, unanswered step before the last one the primary action reads \"Skip\" (`skipLabel`). Every single- and multiple-choice question offers a free-text \"Other\u2026\" choice after its options, so the user can always answer in their own words. The component's `showOther` prop (default `true`) sets this for every choice question and a question's own `showOther` wins over it, either way; file questions never get one (their answer is files). In AIThread and AIChat, an `showOther` key on the ask_user_question tool input (or the docked request) passes through. The Other\u2026 choice: its typed text is the answer (the single answer string, or the last entry of the multiple answer array) and it never auto-advances, even when the text equals an option id. The answer stays a plain string, so in `summarizeAIAskAnswers` and in a value restored later, text equal to an option id reads as that option. Disabled choice options remain visible but cannot be selected. File questions use the shared chooser/drop acceptance behavior and show type, size, count, and duplicate failures.\n\n## State and behavior\n\n- `value` is the bindable answer map. `defaultValue` initializes omitted state once; later default changes do not reset answers.\n- `onValueChange(value)` runs once after a user changes an answer. Parent value changes and selecting the current answer do not emit it.\n- `activeIndex` is bindable and is clamped whenever the question list changes.\n- `autoAdvance` wins over `autoAdvanceSingle`; `autoAdvanceDelay` wins over `autoAdvanceSingleDelay`.\n- Single-choice answers auto-advance by default after 280 ms, including values set through a custom question slot. Empty values, anything typed or chosen through \"Other\u2026\", the last step, disabled state, and active async work never auto-advance.\n- Keyboard: number keys 1\u20139 pick (single) or toggle (multiple) the active question's options, with \"Other\u2026\" last; digits typed into a text field stay text. When focus is on the question's options, the picked option takes focus and the Tab stop, as an arrow key does in a radio group (picking \"Other\u2026\" focuses its text field). Enter on a choice or a one-line field continues or submits; in a textarea, Ctrl/Cmd+Enter does. When the step changes with focus inside it, focus moves to the new step's first control (or to the step itself when it has none, such as a file step, where Enter also continues or submits), so the keys keep working step after step. A consumer `onkeydown` runs first and `preventDefault()` cancels these keys.\n- `disabled` blocks all controls. `submitting` combines with internal async submit/discard state.\n\n## Validation and actions\n\nThe default required message is `Answer required.`. `requiredMessage` accepts either a string or a per-question formatter. It renders once, in the danger colour, under the question; the options themselves stay neutral and the choice group gets `aria-invalid` and `aria-describedby`. Primary navigation validates the active question; final submission finds the first missing required answer and moves to it. The step dots (8px dots inside 24px pointer targets, labelled \"Go to question N\") and the primary action navigate; a single question shows no pager. `previousLabel` is deprecated: the default footer no longer renders previous/next arrow buttons.\n\n`onSubmit` receives typed `answers`, the raw `values` map, and the source `questions`. `onDiscard` adds the optional dismiss action. Async submit/discard exceptions and file rejection messages render visibly instead of being swallowed.\n\n```svelte\n<AIAskUserQuestion\n questions={[\n {\n id: 'tone',\n type: 'single',\n title: 'Choose a tone',\n options: [\n { id: 'brief', label: 'Brief' },\n { id: 'detailed', label: 'Detailed' }\n ]\n },\n {\n id: 'notes',\n type: 'text',\n title: 'Add constraints'\n }\n ]}\n bind:value={answers}\n onSubmit={({ answers, values }) => resolveTool({ answers, values })}\n/>\n```\n\n## Header\n\nThe header shows the `requester` (\"Asked by \u2026\") above a semibold `title` (default \"Answer request\") and the optional `context`.\n\n## Answered summary\n\nOnce a request is complete, keep a compact record in the transcript instead of a raw tool row. `AIAskUserQuestionSummary` renders question \u2192 chosen labels (option ids become labels, \"Other\u2026\" and text answers show as typed, files by name, skipped questions read \"Skipped\"); `summarizeAIAskAnswers(questions, values)` returns the same pairs as data.\n\n```svelte\n<script lang=\"ts\">\n import { AIAskUserQuestionSummary } from './index.ts';\n</script>\n\n<AIAskUserQuestionSummary {questions} value={submittedValues} />\n```\n\nProps: `questions`, `value`, `title` (string, or `false` to hide the \"Your answers\" heading), `showSkipped` (default true), `ref`, `class`, `theme` (summary, summaryTitle, summaryList, summaryItem, summaryQuestion, summaryAnswer).\n\n## Composition\n\n`header`, `footer`, `children`, and `empty` receive `AIAskUserQuestionState`: questions, value, active question/index, visible error, working flags, first/last flags, and `goTo`, `previous`, `next`, `submit`, and `discard` actions.\n\nThe `question` slot receives `{ question, value, setValue }`. Its setter preserves central validation, change callbacks, and single-choice auto-advance; no public compound subcomponents are required.\n\nThe root forwards native div attributes and exposes bindable `ref`, `class`, and `theme`. Theme parts cover root, header text/requester/progress group/steps, the body region, step content, question title, required marker and description, textarea, option/other/file regions, the per-question error, the submit-failure alert, empty state, footer, and the summary parts.\n";
|
|
@@ -22,11 +22,11 @@ The package exports Valibot schemas for tool state, options, every question kind
|
|
|
22
22
|
## Question kinds
|
|
23
23
|
|
|
24
24
|
- Text: \`{ id, title, type?: 'text', description?, required?, placeholder?, rows? }\`
|
|
25
|
-
- Single choice: \`{ id, title, type: 'single', options, ... }\`
|
|
26
|
-
- Multiple choice: \`{ id, title, type: 'multiple', options, ... }\`
|
|
25
|
+
- Single choice: \`{ id, title, type: 'single', options, showOther?, otherLabel?, otherPlaceholder?, ... }\`
|
|
26
|
+
- Multiple choice: \`{ id, title, type: 'multiple', options, showOther?, otherLabel?, otherPlaceholder?, ... }\`
|
|
27
27
|
- File: \`{ id, title, type: 'file', accept?, multiple?, maxFiles?, maxSize?, ... }\`
|
|
28
28
|
|
|
29
|
-
Questions are
|
|
29
|
+
Questions are optional by default; \`required: true\` blocks continuing until answered and shows a required marker after the title. On an optional, unanswered step before the last one the primary action reads "Skip" (\`skipLabel\`). Every single- and multiple-choice question offers a free-text "Other…" choice after its options, so the user can always answer in their own words. The component's \`showOther\` prop (default \`true\`) sets this for every choice question and a question's own \`showOther\` wins over it, either way; file questions never get one (their answer is files). In AIThread and AIChat, an \`showOther\` key on the ask_user_question tool input (or the docked request) passes through. The Other… choice: its typed text is the answer (the single answer string, or the last entry of the multiple answer array) and it never auto-advances, even when the text equals an option id. The answer stays a plain string, so in \`summarizeAIAskAnswers\` and in a value restored later, text equal to an option id reads as that option. Disabled choice options remain visible but cannot be selected. File questions use the shared chooser/drop acceptance behavior and show type, size, count, and duplicate failures.
|
|
30
30
|
|
|
31
31
|
## State and behavior
|
|
32
32
|
|
|
@@ -34,12 +34,13 @@ Questions are required by default. Disabled choice options remain visible but ca
|
|
|
34
34
|
- \`onValueChange(value)\` runs once after a user changes an answer. Parent value changes and selecting the current answer do not emit it.
|
|
35
35
|
- \`activeIndex\` is bindable and is clamped whenever the question list changes.
|
|
36
36
|
- \`autoAdvance\` wins over \`autoAdvanceSingle\`; \`autoAdvanceDelay\` wins over \`autoAdvanceSingleDelay\`.
|
|
37
|
-
- Single-choice answers auto-advance by default after 280 ms, including values set through a custom question slot. Empty values, the last step, disabled state, and active async work never auto-advance.
|
|
37
|
+
- Single-choice answers auto-advance by default after 280 ms, including values set through a custom question slot. Empty values, anything typed or chosen through "Other…", the last step, disabled state, and active async work never auto-advance.
|
|
38
|
+
- Keyboard: number keys 1–9 pick (single) or toggle (multiple) the active question's options, with "Other…" last; digits typed into a text field stay text. When focus is on the question's options, the picked option takes focus and the Tab stop, as an arrow key does in a radio group (picking "Other…" focuses its text field). Enter on a choice or a one-line field continues or submits; in a textarea, Ctrl/Cmd+Enter does. When the step changes with focus inside it, focus moves to the new step's first control (or to the step itself when it has none, such as a file step, where Enter also continues or submits), so the keys keep working step after step. A consumer \`onkeydown\` runs first and \`preventDefault()\` cancels these keys.
|
|
38
39
|
- \`disabled\` blocks all controls. \`submitting\` combines with internal async submit/discard state.
|
|
39
40
|
|
|
40
41
|
## Validation and actions
|
|
41
42
|
|
|
42
|
-
The default required message is \`Answer required.\`. \`requiredMessage\` accepts either a string or a per-question formatter. Primary navigation validates the active question; final submission finds the first missing required answer and moves to it.
|
|
43
|
+
The default required message is \`Answer required.\`. \`requiredMessage\` accepts either a string or a per-question formatter. It renders once, in the danger colour, under the question; the options themselves stay neutral and the choice group gets \`aria-invalid\` and \`aria-describedby\`. Primary navigation validates the active question; final submission finds the first missing required answer and moves to it. The step dots (8px dots inside 24px pointer targets, labelled "Go to question N") and the primary action navigate; a single question shows no pager. \`previousLabel\` is deprecated: the default footer no longer renders previous/next arrow buttons.
|
|
43
44
|
|
|
44
45
|
\`onSubmit\` receives typed \`answers\`, the raw \`values\` map, and the source \`questions\`. \`onDiscard\` adds the optional dismiss action. Async submit/discard exceptions and file rejection messages render visibly instead of being swallowed.
|
|
45
46
|
|
|
@@ -58,8 +59,7 @@ The default required message is \`Answer required.\`. \`requiredMessage\` accept
|
|
|
58
59
|
{
|
|
59
60
|
id: 'notes',
|
|
60
61
|
type: 'text',
|
|
61
|
-
title: 'Add constraints'
|
|
62
|
-
required: false
|
|
62
|
+
title: 'Add constraints'
|
|
63
63
|
}
|
|
64
64
|
]}
|
|
65
65
|
bind:value={answers}
|
|
@@ -67,11 +67,29 @@ The default required message is \`Answer required.\`. \`requiredMessage\` accept
|
|
|
67
67
|
/>
|
|
68
68
|
\`\`\`
|
|
69
69
|
|
|
70
|
+
## Header
|
|
71
|
+
|
|
72
|
+
The header shows the \`requester\` ("Asked by …") above a semibold \`title\` (default "Answer request") and the optional \`context\`.
|
|
73
|
+
|
|
74
|
+
## Answered summary
|
|
75
|
+
|
|
76
|
+
Once a request is complete, keep a compact record in the transcript instead of a raw tool row. \`AIAskUserQuestionSummary\` renders question → chosen labels (option ids become labels, "Other…" and text answers show as typed, files by name, skipped questions read "Skipped"); \`summarizeAIAskAnswers(questions, values)\` returns the same pairs as data.
|
|
77
|
+
|
|
78
|
+
\`\`\`svelte
|
|
79
|
+
<script lang="ts">
|
|
80
|
+
import { AIAskUserQuestionSummary } from './index.ts';
|
|
81
|
+
</script>
|
|
82
|
+
|
|
83
|
+
<AIAskUserQuestionSummary {questions} value={submittedValues} />
|
|
84
|
+
\`\`\`
|
|
85
|
+
|
|
86
|
+
Props: \`questions\`, \`value\`, \`title\` (string, or \`false\` to hide the "Your answers" heading), \`showSkipped\` (default true), \`ref\`, \`class\`, \`theme\` (summary, summaryTitle, summaryList, summaryItem, summaryQuestion, summaryAnswer).
|
|
87
|
+
|
|
70
88
|
## Composition
|
|
71
89
|
|
|
72
90
|
\`header\`, \`footer\`, \`children\`, and \`empty\` receive \`AIAskUserQuestionState\`: questions, value, active question/index, visible error, working flags, first/last flags, and \`goTo\`, \`previous\`, \`next\`, \`submit\`, and \`discard\` actions.
|
|
73
91
|
|
|
74
92
|
The \`question\` slot receives \`{ question, value, setValue }\`. Its setter preserves central validation, change callbacks, and single-choice auto-advance; no public compound subcomponents are required.
|
|
75
93
|
|
|
76
|
-
The root forwards native div attributes and exposes bindable \`ref\`, \`class\`, and \`theme\`. Theme parts cover root, header text/progress group/steps, the body region, step content, question title and description, textarea, option/file regions,
|
|
94
|
+
The root forwards native div attributes and exposes bindable \`ref\`, \`class\`, and \`theme\`. Theme parts cover root, header text/requester/progress group/steps, the body region, step content, question title, required marker and description, textarea, option/other/file regions, the per-question error, the submit-failure alert, empty state, footer, and the summary parts.
|
|
77
95
|
`;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Sizes } from '../../types/theme.js';
|
|
1
2
|
import type { Slot } from '../Slot/slot.js';
|
|
2
3
|
import type { WithAttachments } from '../../types/props.js';
|
|
3
4
|
import type { AIAskUserQuestionThemeProps } from './aiAskUserQuestion.theme.js';
|
|
@@ -12,18 +13,32 @@ type AIQuestionBase = {
|
|
|
12
13
|
id: string;
|
|
13
14
|
title: string;
|
|
14
15
|
description?: string;
|
|
16
|
+
/** Blocks continuing until answered and shows a required marker. Questions are optional by default. */
|
|
15
17
|
required?: boolean;
|
|
16
18
|
};
|
|
19
|
+
type AIChoiceQuestionOther = {
|
|
20
|
+
/**
|
|
21
|
+
* Adds a free-text "Other…" choice after the options. Its text is stored in the answer as
|
|
22
|
+
* typed: the single answer string, or the last entry of the multiple answer array. Editing it
|
|
23
|
+
* never auto-advances. The answer stays a plain string, so text equal to an option id reads
|
|
24
|
+
* as that option once the flow is gone (in `summarizeAIAskAnswers` or a restored `value`).
|
|
25
|
+
*/
|
|
26
|
+
showOther?: boolean;
|
|
27
|
+
/** Label of the "Other…" choice. */
|
|
28
|
+
otherLabel?: string;
|
|
29
|
+
/** Placeholder of the "Other…" text field. */
|
|
30
|
+
otherPlaceholder?: string;
|
|
31
|
+
};
|
|
17
32
|
export type AITextQuestion = AIQuestionBase & {
|
|
18
33
|
type?: 'text';
|
|
19
34
|
placeholder?: string;
|
|
20
35
|
rows?: number;
|
|
21
36
|
};
|
|
22
|
-
export type AISingleQuestion = AIQuestionBase & {
|
|
37
|
+
export type AISingleQuestion = AIQuestionBase & AIChoiceQuestionOther & {
|
|
23
38
|
type: 'single';
|
|
24
39
|
options: readonly AIQuestionOption[];
|
|
25
40
|
};
|
|
26
|
-
export type AIMultipleQuestion = AIQuestionBase & {
|
|
41
|
+
export type AIMultipleQuestion = AIQuestionBase & AIChoiceQuestionOther & {
|
|
27
42
|
type: 'multiple';
|
|
28
43
|
options: readonly AIQuestionOption[];
|
|
29
44
|
};
|
|
@@ -63,6 +78,35 @@ export type AIAskUserQuestionSubmitPayload = {
|
|
|
63
78
|
values: AIAskAnswers;
|
|
64
79
|
questions: readonly AIAskQuestion[];
|
|
65
80
|
};
|
|
81
|
+
/** One answered (or skipped) question of a completed request, ready to display. */
|
|
82
|
+
export type AIAskUserQuestionSummaryItem = {
|
|
83
|
+
question: AIAskQuestion;
|
|
84
|
+
questionId: string;
|
|
85
|
+
/** Chosen option labels, typed text, or file names; empty when the question was skipped. */
|
|
86
|
+
labels: string[];
|
|
87
|
+
answered: boolean;
|
|
88
|
+
};
|
|
89
|
+
export type AIAskUserQuestionSummaryProps = WithAttachments<Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'class' | 'title'> & {
|
|
90
|
+
/** Bindable reference to the summary root. */
|
|
91
|
+
ref?: HTMLDivElement | null;
|
|
92
|
+
/** Type and icon scale: `small`, `normal` (default) or `large`, matching AIMessage sizes. AIThread passes its `messageSize`. */
|
|
93
|
+
size?: Sizes;
|
|
94
|
+
/** The questions of the completed request. */
|
|
95
|
+
questions: readonly AIAskQuestion[];
|
|
96
|
+
/**
|
|
97
|
+
* The submitted answers keyed by question id.
|
|
98
|
+
* @readonly-value The summary displays a completed request's answers and never edits them.
|
|
99
|
+
*/
|
|
100
|
+
value: AIAskAnswers;
|
|
101
|
+
/** Heading above the answers; `false` hides it. Defaults to the localized "Your answers". */
|
|
102
|
+
title?: string | false;
|
|
103
|
+
/** Shows skipped questions with a "Skipped" note. @default true */
|
|
104
|
+
showSkipped?: boolean;
|
|
105
|
+
/** Class applied to the summary root. */
|
|
106
|
+
class?: string;
|
|
107
|
+
/** Theme overrides for the shared question theme, including the summary parts. */
|
|
108
|
+
theme?: AIAskUserQuestionThemeProps;
|
|
109
|
+
}>;
|
|
66
110
|
export type AIAskUserQuestionQuestionState = {
|
|
67
111
|
question: AIAskQuestion;
|
|
68
112
|
value: AIAskAnswer | undefined;
|
|
@@ -104,13 +148,20 @@ export type AIAskUserQuestionProps = WithAttachments<Omit<HTMLAttributes<HTMLDiv
|
|
|
104
148
|
autoAdvanceDelay?: number;
|
|
105
149
|
/** Svelte Pro-compatible alias for `autoAdvanceDelay`. */
|
|
106
150
|
autoAdvanceSingleDelay?: number;
|
|
151
|
+
/**
|
|
152
|
+
* Adds a free-text "Other…" choice to every single- and multiple-choice question, so the
|
|
153
|
+
* user can always answer in their own words. A question's own `showOther` wins. File
|
|
154
|
+
* questions are left as they are: their answer is files, not text.
|
|
155
|
+
* @default true
|
|
156
|
+
*/
|
|
157
|
+
showOther?: boolean;
|
|
107
158
|
/** Disables answer controls and actions. */
|
|
108
159
|
disabled?: boolean;
|
|
109
160
|
/** Marks submission as externally in progress and disables the complete flow. */
|
|
110
161
|
submitting?: boolean;
|
|
111
162
|
/** Heading for the complete answer request. */
|
|
112
163
|
title?: string;
|
|
113
|
-
/** Optional name of the model, tool, or agent requesting the answers. */
|
|
164
|
+
/** Optional name of the model, tool, or agent requesting the answers, shown above the title. */
|
|
114
165
|
requester?: string;
|
|
115
166
|
/** Optional context displayed above the active question. */
|
|
116
167
|
context?: string;
|
|
@@ -120,10 +171,16 @@ export type AIAskUserQuestionProps = WithAttachments<Omit<HTMLAttributes<HTMLDiv
|
|
|
120
171
|
submittingLabel?: string;
|
|
121
172
|
/** Optional discard action label. */
|
|
122
173
|
discardLabel?: string;
|
|
123
|
-
/**
|
|
174
|
+
/**
|
|
175
|
+
* Previous-step action label.
|
|
176
|
+
* @deprecated The default footer no longer renders previous/next arrow buttons: the step dots
|
|
177
|
+
* and the primary action navigate. Custom footers can still call `previous()`.
|
|
178
|
+
*/
|
|
124
179
|
previousLabel?: string;
|
|
125
|
-
/**
|
|
180
|
+
/** Primary action label before the last question. */
|
|
126
181
|
nextLabel?: string;
|
|
182
|
+
/** Primary action label on an optional, unanswered question before the last one. */
|
|
183
|
+
skipLabel?: string;
|
|
127
184
|
/** Title used by the default empty state. Takes precedence over `emptyTitle`. */
|
|
128
185
|
emptyLabel?: string;
|
|
129
186
|
/** Svelte Pro-compatible alias for `emptyLabel`. */
|
|
@@ -27,6 +27,20 @@ export declare const aiAskUserQuestionTheme: {
|
|
|
27
27
|
progress: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
28
28
|
title: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
29
29
|
description: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
30
|
+
requiredMarker: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
31
|
+
other: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
32
|
+
alert: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
33
|
+
summary: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
34
|
+
summaryTitle: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
35
|
+
summaryList: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
36
|
+
summaryItem: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
37
|
+
summaryQuestion: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
38
|
+
summaryAnswer: (props?: (import("../../utils/cva/types.js").CVAVariantSchema<{
|
|
39
|
+
answered: {
|
|
40
|
+
true: string;
|
|
41
|
+
false: string;
|
|
42
|
+
};
|
|
43
|
+
}> & import("../../utils/cva/types.js").CVAClassProp) | undefined) => string;
|
|
30
44
|
};
|
|
31
45
|
export type AIAskUserQuestionTheme = typeof aiAskUserQuestionTheme;
|
|
32
46
|
export type AIAskUserQuestionThemeProps = InferComponentTheme<AIAskUserQuestionTheme>;
|
|
@@ -58,6 +72,20 @@ export declare const setAIAskUserQuestionTheme: (theme: InferComponentTheme<{
|
|
|
58
72
|
progress: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
59
73
|
title: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
60
74
|
description: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
75
|
+
requiredMarker: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
76
|
+
other: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
77
|
+
alert: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
78
|
+
summary: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
79
|
+
summaryTitle: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
80
|
+
summaryList: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
81
|
+
summaryItem: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
82
|
+
summaryQuestion: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
83
|
+
summaryAnswer: (props?: (import("../../utils/cva/types.js").CVAVariantSchema<{
|
|
84
|
+
answered: {
|
|
85
|
+
true: string;
|
|
86
|
+
false: string;
|
|
87
|
+
};
|
|
88
|
+
}> & import("../../utils/cva/types.js").CVAClassProp) | undefined) => string;
|
|
61
89
|
}>) => void;
|
|
62
90
|
export declare const useAIAskUserQuestionTheme: import("../../utils/cva/theme.js").UseComponentTheme<{
|
|
63
91
|
root: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
@@ -87,4 +115,18 @@ export declare const useAIAskUserQuestionTheme: import("../../utils/cva/theme.js
|
|
|
87
115
|
progress: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
88
116
|
title: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
89
117
|
description: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
118
|
+
requiredMarker: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
119
|
+
other: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
120
|
+
alert: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
121
|
+
summary: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
122
|
+
summaryTitle: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
123
|
+
summaryList: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
124
|
+
summaryItem: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
125
|
+
summaryQuestion: (props?: import("../../utils/cva/types.js").CVAClassProp | undefined) => string;
|
|
126
|
+
summaryAnswer: (props?: (import("../../utils/cva/types.js").CVAVariantSchema<{
|
|
127
|
+
answered: {
|
|
128
|
+
true: string;
|
|
129
|
+
false: string;
|
|
130
|
+
};
|
|
131
|
+
}> & import("../../utils/cva/types.js").CVAClassProp) | undefined) => string;
|
|
90
132
|
}>;
|