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.
Files changed (839) hide show
  1. package/README.md +1 -1
  2. package/dist/attachments/disclosurePanel.svelte.d.ts +84 -0
  3. package/dist/attachments/disclosurePanel.svelte.js +277 -0
  4. package/dist/attachments/portal.d.ts +17 -1
  5. package/dist/attachments/portal.js +39 -2
  6. package/dist/attachments/spinnerOverlay.svelte.js +12 -0
  7. package/dist/attachments/transitionSize.d.ts +6 -0
  8. package/dist/attachments/transitionSize.js +30 -0
  9. package/dist/components/AIAskUserQuestion/AIAskUserQuestion.svelte +131 -17
  10. package/dist/components/AIAskUserQuestion/AIAskUserQuestionFileStep.svelte +26 -6
  11. package/dist/components/AIAskUserQuestion/AIAskUserQuestionFileStep.svelte.d.ts +6 -0
  12. package/dist/components/AIAskUserQuestion/AIAskUserQuestionFooter.svelte +27 -53
  13. package/dist/components/AIAskUserQuestion/AIAskUserQuestionFooter.svelte.d.ts +3 -4
  14. package/dist/components/AIAskUserQuestion/AIAskUserQuestionHeader.svelte +19 -16
  15. package/dist/components/AIAskUserQuestion/AIAskUserQuestionStep.svelte +180 -21
  16. package/dist/components/AIAskUserQuestion/AIAskUserQuestionStep.svelte.d.ts +9 -1
  17. package/dist/components/AIAskUserQuestion/AIAskUserQuestionSummary.svelte +56 -0
  18. package/dist/components/AIAskUserQuestion/AIAskUserQuestionSummary.svelte.d.ts +4 -0
  19. package/dist/components/AIAskUserQuestion/aiAskUserQuestion.mcp.d.ts +1 -1
  20. package/dist/components/AIAskUserQuestion/aiAskUserQuestion.mcp.js +26 -8
  21. package/dist/components/AIAskUserQuestion/aiAskUserQuestion.props.d.ts +62 -5
  22. package/dist/components/AIAskUserQuestion/aiAskUserQuestion.theme.d.ts +42 -0
  23. package/dist/components/AIAskUserQuestion/aiAskUserQuestion.theme.js +53 -12
  24. package/dist/components/AIAskUserQuestion/aiAskUserQuestionAnswers.d.ts +17 -1
  25. package/dist/components/AIAskUserQuestion/aiAskUserQuestionAnswers.js +56 -8
  26. package/dist/components/AIAskUserQuestion/index.d.ts +3 -1
  27. package/dist/components/AIAskUserQuestion/index.js +2 -0
  28. package/dist/components/AIAskUserQuestion/schemas.d.ts +44 -0
  29. package/dist/components/AIAskUserQuestion/schemas.js +10 -3
  30. package/dist/components/AIChat/AIChat.svelte +10 -0
  31. package/dist/components/AIChat/AIChat.svelte.d.ts +2 -2
  32. package/dist/components/AIChat/AIChatComposerSurface.svelte +23 -5
  33. package/dist/components/AIChat/AIChatComposerSurface.svelte.d.ts +5 -0
  34. package/dist/components/AIChat/AIChatSkeleton.svelte +29 -37
  35. package/dist/components/AIChat/AIChatSurface.svelte +30 -2
  36. package/dist/components/AIChat/AIChatSurface.svelte.d.ts +1 -1
  37. package/dist/components/AIChat/AIChatThreadSurface.svelte +11 -1
  38. package/dist/components/AIChat/AIChatThreadSurface.svelte.d.ts +3 -1
  39. package/dist/components/AIChat/aiChat.mcp.d.ts +1 -1
  40. package/dist/components/AIChat/aiChat.mcp.js +31 -15
  41. package/dist/components/AIChat/aiChat.props.d.ts +36 -10
  42. package/dist/components/AIChat/aiChat.theme.d.ts +9 -0
  43. package/dist/components/AIChat/aiChat.theme.js +21 -4
  44. package/dist/components/AIChat/aiChatSkeleton.props.d.ts +5 -0
  45. package/dist/components/AIChat/index.d.ts +1 -1
  46. package/dist/components/AIComposer/AIComposer.svelte +102 -5
  47. package/dist/components/AIComposer/AIComposer.svelte.d.ts +1 -0
  48. package/dist/components/AIComposer/AIComposerFooter.svelte +54 -12
  49. package/dist/components/AIComposer/AIComposerFooter.svelte.d.ts +2 -0
  50. package/dist/components/AIComposer/AIComposerQueue.svelte +8 -3
  51. package/dist/components/AIComposer/aiComposer.editor.theme.js +13 -2
  52. package/dist/components/AIComposer/aiComposer.mcp.d.ts +1 -1
  53. package/dist/components/AIComposer/aiComposer.mcp.js +15 -7
  54. package/dist/components/AIComposer/aiComposer.props.d.ts +27 -7
  55. package/dist/components/AIComposer/aiComposer.theme.d.ts +42 -3
  56. package/dist/components/AIComposer/aiComposer.theme.js +37 -5
  57. package/dist/components/AIComposer/aiComposerFileController.svelte.d.ts +20 -0
  58. package/dist/components/AIComposer/aiComposerFileController.svelte.js +75 -9
  59. package/dist/components/AIComposer/aiComposerSourceAdapter.js +22 -4
  60. package/dist/components/AIComposer/aiComposerSubmitController.svelte.d.ts +12 -0
  61. package/dist/components/AIComposer/aiComposerSubmitController.svelte.js +16 -6
  62. package/dist/components/AIContext/AIContext.svelte +7 -3
  63. package/dist/components/AIContext/aiContext.mcp.d.ts +1 -1
  64. package/dist/components/AIContext/aiContext.mcp.js +1 -1
  65. package/dist/components/AIContext/aiContext.props.d.ts +4 -1
  66. package/dist/components/AIContext/aiContext.theme.d.ts +3 -0
  67. package/dist/components/AIContext/aiContext.theme.js +7 -2
  68. package/dist/components/AIConversation/AIConversation.svelte.d.ts +2 -2
  69. package/dist/components/AIFilePreview/aiFilePreview.theme.js +1 -1
  70. package/dist/components/AIMarker/AIMarker.svelte +2 -0
  71. package/dist/components/AIMarker/aiMarker.mcp.d.ts +1 -1
  72. package/dist/components/AIMarker/aiMarker.mcp.js +2 -0
  73. package/dist/components/AIMarker/aiMarker.props.d.ts +3 -0
  74. package/dist/components/AIMarker/aiMarker.theme.js +2 -2
  75. package/dist/components/AIMessage/AIMessage.svelte +38 -16
  76. package/dist/components/AIMessage/aiMessage.mcp.d.ts +1 -1
  77. package/dist/components/AIMessage/aiMessage.mcp.js +20 -6
  78. package/dist/components/AIMessage/aiMessage.props.d.ts +18 -2
  79. package/dist/components/AIMessage/aiMessage.theme.d.ts +51 -6
  80. package/dist/components/AIMessage/aiMessage.theme.js +91 -32
  81. package/dist/components/AIMessageActions/AIMessageActions.svelte +19 -9
  82. package/dist/components/AIMessageActions/aiMessageActions.mcp.d.ts +1 -1
  83. package/dist/components/AIMessageActions/aiMessageActions.mcp.js +11 -3
  84. package/dist/components/AIMessageActions/aiMessageActions.theme.js +36 -9
  85. package/dist/components/AIModelSelector/AIModelSelector.svelte +25 -10
  86. package/dist/components/AIModelSelector/aiModelSelector.mcp.d.ts +1 -1
  87. package/dist/components/AIModelSelector/aiModelSelector.mcp.js +1 -1
  88. package/dist/components/AIModelSelector/aiModelSelector.theme.d.ts +3 -0
  89. package/dist/components/AIModelSelector/aiModelSelector.theme.js +7 -3
  90. package/dist/components/AIReasoning/AIReasoning.svelte +135 -38
  91. package/dist/components/AIReasoning/aiReasoning.mcp.d.ts +1 -1
  92. package/dist/components/AIReasoning/aiReasoning.mcp.js +11 -5
  93. package/dist/components/AIReasoning/aiReasoning.props.d.ts +15 -4
  94. package/dist/components/AIReasoning/aiReasoning.theme.d.ts +45 -0
  95. package/dist/components/AIReasoning/aiReasoning.theme.js +47 -7
  96. package/dist/components/AISuggestion/AISuggestion.svelte +2 -1
  97. package/dist/components/AISuggestion/AISuggestions.svelte +2 -1
  98. package/dist/components/AISuggestion/aiSuggestion.mcp.d.ts +1 -1
  99. package/dist/components/AISuggestion/aiSuggestion.mcp.js +8 -1
  100. package/dist/components/AISuggestion/aiSuggestion.props.d.ts +4 -1
  101. package/dist/components/AISuggestion/aiSuggestion.theme.js +1 -1
  102. package/dist/components/AISuggestion/aiSuggestions.props.d.ts +7 -0
  103. package/dist/components/AIThread/AIThread.svelte +378 -95
  104. package/dist/components/AIThread/AIThreadAskUserQuestion.svelte +1 -0
  105. package/dist/components/AIThread/AIThreadItems.svelte +266 -64
  106. package/dist/components/AIThread/AIThreadItems.svelte.d.ts +7 -3
  107. package/dist/components/AIThread/AIThreadMarker.svelte +8 -1
  108. package/dist/components/AIThread/AIThreadMarker.svelte.d.ts +1 -0
  109. package/dist/components/AIThread/aiThread.mcp.d.ts +1 -1
  110. package/dist/components/AIThread/aiThread.mcp.js +34 -20
  111. package/dist/components/AIThread/aiThread.props.d.ts +73 -8
  112. package/dist/components/AIThread/aiThread.theme.d.ts +78 -0
  113. package/dist/components/AIThread/aiThread.theme.js +108 -9
  114. package/dist/components/AIThread/index.d.ts +1 -1
  115. package/dist/components/AIThread/threadAskUserQuestion.d.ts +4 -1
  116. package/dist/components/AIThread/threadAskUserQuestion.js +8 -4
  117. package/dist/components/AIThread/threadRenderItems.d.ts +74 -3
  118. package/dist/components/AIThread/threadRenderItems.js +265 -77
  119. package/dist/components/AIThread/threadScrollController.d.ts +0 -8
  120. package/dist/components/AIThread/threadScrollController.js +2 -39
  121. package/dist/components/AIThread/threadTools.d.ts +11 -0
  122. package/dist/components/AIThread/threadTools.js +79 -0
  123. package/dist/components/AIThreadToc/AIThreadToc.svelte +188 -18
  124. package/dist/components/AIThreadToc/AIThreadTocPreview.svelte +25 -2
  125. package/dist/components/AIThreadToc/AIThreadTocPreview.svelte.d.ts +3 -0
  126. package/dist/components/AIThreadToc/aiThreadToc.d.ts +4 -2
  127. package/dist/components/AIThreadToc/aiThreadToc.js +17 -5
  128. package/dist/components/AIThreadToc/aiThreadToc.mcp.d.ts +1 -1
  129. package/dist/components/AIThreadToc/aiThreadToc.mcp.js +13 -3
  130. package/dist/components/AIThreadToc/aiThreadToc.props.d.ts +11 -0
  131. package/dist/components/AIThreadToc/aiThreadToc.theme.d.ts +3 -0
  132. package/dist/components/AIThreadToc/aiThreadToc.theme.js +15 -6
  133. package/dist/components/AITool/AITool.svelte +56 -21
  134. package/dist/components/AITool/AIToolCallList.svelte +79 -29
  135. package/dist/components/AITool/AIToolCallList.svelte.d.ts +6 -2
  136. package/dist/components/AITool/AIToolStatusMark.svelte +52 -0
  137. package/dist/components/AITool/AIToolStatusMark.svelte.d.ts +14 -0
  138. package/dist/components/AITool/AIToolValueSection.svelte +126 -28
  139. package/dist/components/AITool/AIToolValueSection.svelte.d.ts +6 -2
  140. package/dist/components/AITool/AIToolValueTree.svelte +11 -16
  141. package/dist/components/AITool/AIToolValueTree.svelte.d.ts +2 -3
  142. package/dist/components/AITool/aiTool.mcp.d.ts +1 -1
  143. package/dist/components/AITool/aiTool.mcp.js +36 -8
  144. package/dist/components/AITool/aiTool.props.d.ts +52 -6
  145. package/dist/components/AITool/aiTool.theme.d.ts +117 -39
  146. package/dist/components/AITool/aiTool.theme.js +144 -140
  147. package/dist/components/AITool/aiToolClock.svelte.d.ts +18 -0
  148. package/dist/components/AITool/aiToolClock.svelte.js +62 -0
  149. package/dist/components/AITool/aiToolPrimitiveThemes.d.ts +0 -2
  150. package/dist/components/AITool/aiToolPrimitiveThemes.js +0 -10
  151. package/dist/components/AITool/index.d.ts +2 -1
  152. package/dist/components/AITool/index.js +1 -0
  153. package/dist/components/AITool/toolRendering.d.ts +33 -1
  154. package/dist/components/AITool/toolRendering.js +179 -15
  155. package/dist/components/AITool/toolValueTree.d.ts +14 -1
  156. package/dist/components/AITool/toolValueTree.js +126 -27
  157. package/dist/components/Accordion/Accordion.svelte +109 -109
  158. package/dist/components/Accordion/Accordion.svelte.d.ts +0 -1
  159. package/dist/components/Accordion/AccordionPanel.svelte +64 -0
  160. package/dist/components/Accordion/AccordionPanel.svelte.d.ts +20 -0
  161. package/dist/components/Accordion/accordion.attributes.d.ts +24 -0
  162. package/dist/components/Accordion/accordion.attributes.js +20 -0
  163. package/dist/components/Accordion/accordion.mcp.d.ts +1 -1
  164. package/dist/components/Accordion/accordion.mcp.js +78 -22
  165. package/dist/components/Accordion/accordion.props.d.ts +54 -10
  166. package/dist/components/Accordion/accordion.theme.d.ts +3 -0
  167. package/dist/components/Accordion/accordion.theme.js +4 -0
  168. package/dist/components/Accordion/index.d.ts +1 -0
  169. package/dist/components/Accordion/index.js +1 -0
  170. package/dist/components/AudioPlayer/audioPlayerVolumeControl.slider.theme.d.ts +31 -1
  171. package/dist/components/Avatar/Avatar.svelte +60 -10
  172. package/dist/components/Avatar/AvatarGroup.svelte +9 -0
  173. package/dist/components/Avatar/avatar.mcp.d.ts +1 -1
  174. package/dist/components/Avatar/avatar.mcp.js +13 -5
  175. package/dist/components/Avatar/avatar.props.d.ts +28 -1
  176. package/dist/components/Avatar/avatar.theme.js +3 -3
  177. package/dist/components/Avatar/index.d.ts +1 -1
  178. package/dist/components/Breadcrumbs/breadcrumbs.mcp.d.ts +1 -1
  179. package/dist/components/Breadcrumbs/breadcrumbs.mcp.js +1 -1
  180. package/dist/components/Button/Button.svelte +35 -15
  181. package/dist/components/Button/button.mcp.d.ts +1 -1
  182. package/dist/components/Button/button.mcp.js +8 -4
  183. package/dist/components/Button/button.props.d.ts +23 -8
  184. package/dist/components/Button/button.theme.d.ts +12 -0
  185. package/dist/components/Button/button.theme.js +17 -4
  186. package/dist/components/ButtonGroup/buttonGroup.mcp.d.ts +1 -1
  187. package/dist/components/ButtonGroup/buttonGroup.mcp.js +1 -1
  188. package/dist/components/ButtonGroup/buttonGroup.props.d.ts +4 -1
  189. package/dist/components/Collapsible/Collapsible.svelte +125 -19
  190. package/dist/components/Collapsible/collapsible.attributes.d.ts +21 -0
  191. package/dist/components/Collapsible/collapsible.attributes.js +17 -0
  192. package/dist/components/Collapsible/collapsible.mcp.d.ts +1 -1
  193. package/dist/components/Collapsible/collapsible.mcp.js +62 -12
  194. package/dist/components/Collapsible/collapsible.props.d.ts +39 -8
  195. package/dist/components/Collapsible/collapsible.theme.js +3 -1
  196. package/dist/components/Collapsible/index.d.ts +1 -0
  197. package/dist/components/Collapsible/index.js +1 -0
  198. package/dist/components/Command/Command.svelte +56 -14
  199. package/dist/components/Command/command.mcp.d.ts +1 -1
  200. package/dist/components/Command/command.mcp.js +12 -6
  201. package/dist/components/Command/command.props.d.ts +39 -6
  202. package/dist/components/Command/command.state.svelte.d.ts +40 -11
  203. package/dist/components/Command/command.state.svelte.js +75 -28
  204. package/dist/components/Command/command.theme.js +4 -3
  205. package/dist/components/Confirmation/Confirmation.svelte +72 -31
  206. package/dist/components/Confirmation/confirmation.mcp.d.ts +1 -1
  207. package/dist/components/Confirmation/confirmation.mcp.js +5 -4
  208. package/dist/components/ContextMenu/ContextMenu.svelte +126 -16
  209. package/dist/components/ContextMenu/contextMenu.mcp.d.ts +1 -1
  210. package/dist/components/ContextMenu/contextMenu.mcp.js +10 -7
  211. package/dist/components/ContextMenu/contextMenu.props.d.ts +13 -4
  212. package/dist/components/ContextMenu/contextMenu.theme.d.ts +3 -3
  213. package/dist/components/ContextMenu/contextMenu.theme.js +3 -2
  214. package/dist/components/DataTable/DataTable.svelte +4 -9
  215. package/dist/components/DataTable/DataTableEditor.svelte +5 -0
  216. package/dist/components/DataTable/DataTableFilter.svelte +1 -0
  217. package/dist/components/DataTable/DataTableToolbar.svelte +1 -0
  218. package/dist/components/DataTable/dataTable.mcp.d.ts +1 -1
  219. package/dist/components/DataTable/dataTable.mcp.js +4 -2
  220. package/dist/components/DataTable/dataTable.theme.d.ts +0 -3
  221. package/dist/components/DataTable/dataTable.theme.js +9 -6
  222. package/dist/components/Dialog/Dialog.svelte +120 -35
  223. package/dist/components/Dialog/Dialog.svelte.d.ts +1 -1
  224. package/dist/components/Dialog/DialogBackdrop.svelte +21 -1
  225. package/dist/components/Dialog/dialog.api.d.ts +65 -0
  226. package/dist/components/Dialog/dialog.api.js +1 -0
  227. package/dist/components/Dialog/dialog.attributes.d.ts +23 -0
  228. package/dist/components/Dialog/dialog.attributes.js +19 -0
  229. package/dist/components/Dialog/dialog.indent.d.ts +6 -0
  230. package/dist/components/Dialog/dialog.indent.js +16 -0
  231. package/dist/components/Dialog/dialog.mcp.d.ts +1 -1
  232. package/dist/components/Dialog/dialog.mcp.js +195 -22
  233. package/dist/components/Dialog/dialog.props.d.ts +102 -19
  234. package/dist/components/Dialog/dialog.snap.d.ts +40 -0
  235. package/dist/components/Dialog/dialog.snap.js +78 -0
  236. package/dist/components/Dialog/dialog.state.svelte.d.ts +122 -10
  237. package/dist/components/Dialog/dialog.state.svelte.js +525 -66
  238. package/dist/components/Dialog/dialog.theme.d.ts +48 -0
  239. package/dist/components/Dialog/dialog.theme.js +32 -9
  240. package/dist/components/Dialog/index.d.ts +4 -1
  241. package/dist/components/Dialog/index.js +1 -0
  242. package/dist/components/DocumentViewer/DocumentSearchControl.svelte +5 -3
  243. package/dist/components/DocumentViewer/documentOutput.js +2 -1
  244. package/dist/components/FloatingWindow/FloatingWindow.svelte +20 -32
  245. package/dist/components/FloatingWindow/FloatingWindow.svelte.d.ts +1 -1
  246. package/dist/components/FloatingWindow/floatingWindow.mcp.d.ts +1 -1
  247. package/dist/components/FloatingWindow/floatingWindow.mcp.js +3 -3
  248. package/dist/components/FloatingWindow/floatingWindow.props.d.ts +9 -4
  249. package/dist/components/FloatingWindow/floatingWindow.state.svelte.d.ts +8 -2
  250. package/dist/components/FloatingWindow/floatingWindow.state.svelte.js +18 -7
  251. package/dist/components/Form/Ask/Ask.svelte +9 -13
  252. package/dist/components/Form/Ask/ask.mcp.d.ts +1 -1
  253. package/dist/components/Form/Ask/ask.mcp.js +1 -1
  254. package/dist/components/Form/Ask/ask.props.d.ts +1 -1
  255. package/dist/components/Form/Autocomplete/Autocomplete.svelte +418 -0
  256. package/dist/components/Form/Autocomplete/Autocomplete.svelte.d.ts +4 -0
  257. package/dist/components/Form/Autocomplete/autocomplete.items.d.ts +30 -0
  258. package/dist/components/Form/Autocomplete/autocomplete.items.js +64 -0
  259. package/dist/components/Form/Autocomplete/autocomplete.mcp.d.ts +1 -0
  260. package/dist/components/Form/Autocomplete/autocomplete.mcp.js +134 -0
  261. package/dist/components/Form/Autocomplete/autocomplete.props.d.ts +146 -0
  262. package/dist/components/Form/Autocomplete/autocomplete.props.js +1 -0
  263. package/dist/components/Form/Autocomplete/autocomplete.theme.d.ts +213 -0
  264. package/dist/components/Form/Autocomplete/autocomplete.theme.js +119 -0
  265. package/dist/components/Form/Autocomplete/index.d.ts +3 -0
  266. package/dist/components/Form/Autocomplete/index.js +2 -0
  267. package/dist/components/Form/Calendar/CalendarInput.svelte +9 -0
  268. package/dist/components/Form/Calendar/CalendarMonthYearPicker.svelte +3 -0
  269. package/dist/components/Form/Calendar/CalendarPrimitive.svelte +5 -0
  270. package/dist/components/Form/Calendar/calendar.mcp.d.ts +1 -1
  271. package/dist/components/Form/Calendar/calendar.mcp.js +2 -1
  272. package/dist/components/Form/Calendar/calendarInput.props.d.ts +2 -0
  273. package/dist/components/Form/Calendar/useCalendar.svelte.d.ts +3 -0
  274. package/dist/components/Form/Calendar/useCalendar.svelte.js +3 -0
  275. package/dist/components/Form/Checkbox/Checkbox.svelte +17 -2
  276. package/dist/components/Form/Checkbox/checkbox.mcp.d.ts +1 -1
  277. package/dist/components/Form/Checkbox/checkbox.mcp.js +11 -1
  278. package/dist/components/Form/Checkbox/checkbox.props.d.ts +12 -1
  279. package/dist/components/Form/CheckboxesInput/CheckboxLine.svelte +69 -32
  280. package/dist/components/Form/CheckboxesInput/CheckboxLine.svelte.d.ts +10 -2
  281. package/dist/components/Form/CheckboxesInput/CheckboxesInput.svelte +123 -74
  282. package/dist/components/Form/CheckboxesInput/CheckboxesInput.svelte.d.ts +12 -12
  283. package/dist/components/Form/CheckboxesInput/checkboxesInput.mcp.d.ts +1 -1
  284. package/dist/components/Form/CheckboxesInput/checkboxesInput.mcp.js +11 -7
  285. package/dist/components/Form/CheckboxesInput/checkboxesInput.props.d.ts +25 -9
  286. package/dist/components/Form/CheckboxesInput/checkboxesInput.theme.d.ts +12 -0
  287. package/dist/components/Form/CheckboxesInput/checkboxesInput.theme.js +9 -4
  288. package/dist/components/Form/CheckboxesInput/choiceEnter.d.ts +11 -0
  289. package/dist/components/Form/CheckboxesInput/choiceEnter.js +27 -0
  290. package/dist/components/Form/ColorInput/ColorInput.svelte +12 -3
  291. package/dist/components/Form/ColorInput/colorInput.mcp.d.ts +1 -1
  292. package/dist/components/Form/ColorInput/colorInput.mcp.js +1 -0
  293. package/dist/components/Form/ColorPicker/ColorPicker.svelte +11 -2
  294. package/dist/components/Form/ColorPicker/ColorPickerInput.svelte +9 -0
  295. package/dist/components/Form/ColorPicker/colorPicker.mcp.d.ts +1 -1
  296. package/dist/components/Form/ColorPicker/colorPicker.mcp.js +1 -0
  297. package/dist/components/Form/ColorPicker/colorPicker.props.d.ts +2 -0
  298. package/dist/components/Form/ColorPicker/colorPicker.state.svelte.d.ts +4 -0
  299. package/dist/components/Form/ColorPicker/colorPicker.state.svelte.js +12 -8
  300. package/dist/components/Form/Combobox/Combobox.svelte +145 -185
  301. package/dist/components/Form/Combobox/Combobox.svelte.d.ts +1 -1
  302. package/dist/components/Form/Combobox/ComboboxPopup.svelte +128 -0
  303. package/dist/components/Form/Combobox/ComboboxPopup.svelte.d.ts +28 -0
  304. package/dist/components/Form/Combobox/combobox.attributes.d.ts +34 -0
  305. package/dist/components/Form/Combobox/combobox.attributes.js +25 -0
  306. package/dist/components/Form/Combobox/combobox.items.d.ts +28 -0
  307. package/dist/components/Form/Combobox/combobox.items.js +68 -0
  308. package/dist/components/Form/Combobox/combobox.mcp.d.ts +1 -1
  309. package/dist/components/Form/Combobox/combobox.mcp.js +104 -13
  310. package/dist/components/Form/Combobox/combobox.props.d.ts +113 -19
  311. package/dist/components/Form/Combobox/combobox.state.svelte.d.ts +137 -0
  312. package/dist/components/Form/Combobox/combobox.state.svelte.js +375 -0
  313. package/dist/components/Form/Combobox/combobox.theme.d.ts +63 -0
  314. package/dist/components/Form/Combobox/combobox.theme.js +37 -1
  315. package/dist/components/Form/Combobox/index.d.ts +2 -1
  316. package/dist/components/Form/Combobox/index.js +1 -0
  317. package/dist/components/Form/DateInput/DateInput.svelte +11 -3
  318. package/dist/components/Form/DateInput/dateInput.mcp.d.ts +1 -1
  319. package/dist/components/Form/DateInput/dateInput.mcp.js +5 -0
  320. package/dist/components/Form/DateSelector/DateSelector.svelte +5 -2
  321. package/dist/components/Form/DateSelector/DateSelectorInput.svelte +9 -0
  322. package/dist/components/Form/DateSelector/dateSelector.mcp.d.ts +1 -1
  323. package/dist/components/Form/DateSelector/dateSelector.mcp.js +2 -2
  324. package/dist/components/Form/DateSelector/dateSelector.props.d.ts +2 -0
  325. package/dist/components/Form/Field/Field.svelte +256 -30
  326. package/dist/components/Form/Field/Field.svelte.d.ts +9 -0
  327. package/dist/components/Form/Field/FieldGroup.svelte +29 -0
  328. package/dist/components/Form/Field/FieldGroup.svelte.d.ts +11 -0
  329. package/dist/components/Form/Field/FieldHiddenInputs.svelte +187 -0
  330. package/dist/components/Form/Field/FieldHiddenInputs.svelte.d.ts +26 -0
  331. package/dist/components/Form/Field/field.d.ts +64 -8
  332. package/dist/components/Form/Field/field.mcp.d.ts +1 -1
  333. package/dist/components/Form/Field/field.mcp.js +158 -18
  334. package/dist/components/Form/Field/field.messages.d.ts +47 -0
  335. package/dist/components/Form/Field/field.messages.js +64 -0
  336. package/dist/components/Form/Field/field.state.svelte.d.ts +109 -3
  337. package/dist/components/Form/Field/field.state.svelte.js +508 -16
  338. package/dist/components/Form/Field/field.theme.d.ts +46 -0
  339. package/dist/components/Form/Field/field.theme.js +33 -0
  340. package/dist/components/Form/Field/fieldHiddenInputs.props.d.ts +61 -0
  341. package/dist/components/Form/Field/fieldHiddenInputs.props.js +1 -0
  342. package/dist/components/Form/Field/fieldNativeForm.svelte.d.ts +14 -0
  343. package/dist/components/Form/Field/fieldNativeForm.svelte.js +113 -0
  344. package/dist/components/Form/Field/index.d.ts +5 -2
  345. package/dist/components/Form/Field/index.js +1 -0
  346. package/dist/components/Form/Field/schemas.js +7 -2
  347. package/dist/components/Form/File/FileInput.svelte +24 -3
  348. package/dist/components/Form/File/fileInput.mcp.d.ts +1 -1
  349. package/dist/components/Form/File/fileInput.mcp.js +1 -0
  350. package/dist/components/Form/Form/Form.svelte +47 -14
  351. package/dist/components/Form/Form/FormActions.svelte +3 -1
  352. package/dist/components/Form/Form/FormActions.svelte.d.ts +42 -2
  353. package/dist/components/Form/Form/FormFieldRenderer.svelte +40 -2
  354. package/dist/components/Form/Form/FormInputRenderer.svelte +7 -0
  355. package/dist/components/Form/Form/form.d.ts +35 -6
  356. package/dist/components/Form/Form/form.mcp.d.ts +1 -1
  357. package/dist/components/Form/Form/form.mcp.js +113 -13
  358. package/dist/components/Form/Form/form.props.d.ts +32 -1
  359. package/dist/components/Form/Form/form.registry.d.ts +2 -2
  360. package/dist/components/Form/Form/form.registry.js +1 -4
  361. package/dist/components/Form/Form/form.state.svelte.d.ts +1138 -413
  362. package/dist/components/Form/Form/form.state.svelte.js +319 -26
  363. package/dist/components/Form/Form/index.d.ts +3 -1
  364. package/dist/components/Form/Form/visibility.d.ts +3096 -1831
  365. package/dist/components/Form/KeyValueInput/KeyValueInput.svelte +22 -10
  366. package/dist/components/Form/KeyValueInput/keyValueInput.mcp.d.ts +1 -1
  367. package/dist/components/Form/KeyValueInput/keyValueInput.mcp.js +1 -0
  368. package/dist/components/Form/MultiStepForm/MultiStepForm.svelte +12 -5
  369. package/dist/components/Form/MultiStepForm/multiStepForm.mcp.d.ts +1 -1
  370. package/dist/components/Form/MultiStepForm/multiStepForm.mcp.js +5 -3
  371. package/dist/components/Form/MultiStepForm/multiStepForm.props.d.ts +5 -0
  372. package/dist/components/Form/MultiStepForm/multiStepForm.state.svelte.d.ts +1022 -408
  373. package/dist/components/Form/MultiStepForm/multiStepForm.state.svelte.js +48 -24
  374. package/dist/components/Form/NumberInput/NumberInput.svelte +365 -46
  375. package/dist/components/Form/NumberInput/index.d.ts +1 -1
  376. package/dist/components/Form/NumberInput/numberInput.mcp.d.ts +1 -1
  377. package/dist/components/Form/NumberInput/numberInput.mcp.js +55 -30
  378. package/dist/components/Form/NumberInput/numberInput.props.d.ts +64 -4
  379. package/dist/components/Form/PasswordInput/Password.svelte +28 -1
  380. package/dist/components/Form/PasswordInput/index.d.ts +1 -1
  381. package/dist/components/Form/PasswordInput/passwordInput.mcp.d.ts +1 -1
  382. package/dist/components/Form/PasswordInput/passwordInput.mcp.js +20 -2
  383. package/dist/components/Form/PasswordInput/passwordInput.props.d.ts +23 -0
  384. package/dist/components/Form/PhoneInput/PhoneInput.svelte +11 -4
  385. package/dist/components/Form/PhoneInput/PhoneInputCountryPicker.svelte +47 -21
  386. package/dist/components/Form/PhoneInput/phoneInput-cdn.js +2 -1
  387. package/dist/components/Form/PhoneInput/phoneInput.mcp.d.ts +1 -1
  388. package/dist/components/Form/PhoneInput/phoneInput.mcp.js +6 -2
  389. package/dist/components/Form/PhoneInput/phoneInputCountry.d.ts +9 -3
  390. package/dist/components/Form/PhoneInput/phoneInputCountry.js +34 -24
  391. package/dist/components/Form/PinInput/PinInput.svelte +44 -9
  392. package/dist/components/Form/PinInput/PinInputCells.svelte +22 -1
  393. package/dist/components/Form/PinInput/PinInputCells.svelte.d.ts +1 -0
  394. package/dist/components/Form/PinInput/index.d.ts +1 -1
  395. package/dist/components/Form/PinInput/pinInput.mcp.d.ts +1 -1
  396. package/dist/components/Form/PinInput/pinInput.mcp.js +29 -6
  397. package/dist/components/Form/PinInput/pinInput.props.d.ts +38 -4
  398. package/dist/components/Form/PinInput/pinInput.state.svelte.d.ts +41 -0
  399. package/dist/components/Form/PinInput/pinInput.state.svelte.js +227 -24
  400. package/dist/components/Form/PinInput/pinInput.theme.d.ts +39 -3
  401. package/dist/components/Form/PinInput/pinInput.theme.js +27 -1
  402. package/dist/components/Form/RadioInput/RadioInput.svelte +94 -32
  403. package/dist/components/Form/RadioInput/RadioInput.svelte.d.ts +12 -12
  404. package/dist/components/Form/RadioInput/radioInput.mcp.d.ts +1 -1
  405. package/dist/components/Form/RadioInput/radioInput.mcp.js +12 -9
  406. package/dist/components/Form/RadioInput/radioInput.props.d.ts +22 -6
  407. package/dist/components/Form/RadioInput/radioInput.theme.d.ts +12 -0
  408. package/dist/components/Form/RadioInput/radioInput.theme.js +10 -5
  409. package/dist/components/Form/RatingInput/RatingInput.svelte +13 -4
  410. package/dist/components/Form/RatingInput/ratingInput.mcp.d.ts +1 -1
  411. package/dist/components/Form/RatingInput/ratingInput.mcp.js +3 -3
  412. package/dist/components/Form/RatingInput/ratingInput.props.d.ts +1 -1
  413. package/dist/components/Form/Select/Select.svelte +186 -48
  414. package/dist/components/Form/Select/Select.svelte.d.ts +23 -2
  415. package/dist/components/Form/Select/SelectOptionRow.svelte +69 -0
  416. package/dist/components/Form/Select/SelectOptionRow.svelte.d.ts +18 -0
  417. package/dist/components/Form/Select/index.d.ts +2 -1
  418. package/dist/components/Form/Select/index.js +1 -0
  419. package/dist/components/Form/Select/select.align.d.ts +5 -0
  420. package/dist/components/Form/Select/select.align.js +19 -5
  421. package/dist/components/Form/Select/select.attributes.d.ts +36 -0
  422. package/dist/components/Form/Select/select.attributes.js +27 -0
  423. package/dist/components/Form/Select/select.mcp.d.ts +1 -1
  424. package/dist/components/Form/Select/select.mcp.js +103 -18
  425. package/dist/components/Form/Select/select.props.d.ts +87 -10
  426. package/dist/components/Form/Select/select.state.svelte.d.ts +108 -17
  427. package/dist/components/Form/Select/select.state.svelte.js +354 -59
  428. package/dist/components/Form/Select/select.theme.d.ts +21 -0
  429. package/dist/components/Form/Select/select.theme.js +22 -0
  430. package/dist/components/Form/Slider/Slider.svelte +54 -14
  431. package/dist/components/Form/Slider/SliderMarks.svelte +1 -1
  432. package/dist/components/Form/Slider/SliderThumb.svelte +49 -19
  433. package/dist/components/Form/Slider/SliderThumb.svelte.d.ts +8 -2
  434. package/dist/components/Form/Slider/SliderTrack.svelte +33 -12
  435. package/dist/components/Form/Slider/SliderTrack.svelte.d.ts +6 -2
  436. package/dist/components/Form/Slider/index.d.ts +1 -1
  437. package/dist/components/Form/Slider/slider.mcp.d.ts +1 -1
  438. package/dist/components/Form/Slider/slider.mcp.js +55 -11
  439. package/dist/components/Form/Slider/slider.props.d.ts +35 -2
  440. package/dist/components/Form/Slider/slider.state.svelte.d.ts +66 -5
  441. package/dist/components/Form/Slider/slider.state.svelte.js +273 -49
  442. package/dist/components/Form/Slider/slider.theme.d.ts +36 -0
  443. package/dist/components/Form/Slider/slider.theme.js +35 -17
  444. package/dist/components/Form/Switch/Switch.svelte +61 -38
  445. package/dist/components/Form/Switch/switch.mcp.d.ts +1 -1
  446. package/dist/components/Form/Switch/switch.mcp.js +25 -5
  447. package/dist/components/Form/Switch/switch.props.d.ts +14 -1
  448. package/dist/components/Form/Switch/switch.theme.d.ts +12 -0
  449. package/dist/components/Form/Switch/switch.theme.js +8 -3
  450. package/dist/components/Form/TagGroup/TagGroup.svelte +8 -0
  451. package/dist/components/Form/TagGroup/tagGroup.mcp.d.ts +1 -1
  452. package/dist/components/Form/TagGroup/tagGroup.mcp.js +1 -0
  453. package/dist/components/Form/TagsInput/TagsInput.svelte +277 -275
  454. package/dist/components/Form/TagsInput/TagsInput.svelte.d.ts +1 -1
  455. package/dist/components/Form/TagsInput/tagsInput.mcp.d.ts +1 -1
  456. package/dist/components/Form/TagsInput/tagsInput.mcp.js +31 -11
  457. package/dist/components/Form/TagsInput/tagsInput.props.d.ts +6 -26
  458. package/dist/components/Form/TagsInput/tagsInput.theme.d.ts +63 -0
  459. package/dist/components/Form/TagsInput/tagsInput.theme.js +37 -1
  460. package/dist/components/Form/TextArea/TextArea.svelte +8 -0
  461. package/dist/components/Form/TextArea/textArea.mcp.d.ts +1 -1
  462. package/dist/components/Form/TextArea/textArea.mcp.js +1 -0
  463. package/dist/components/Form/TextInput/TextInput.svelte +8 -1
  464. package/dist/components/Form/TextInput/textInput.mcp.d.ts +1 -1
  465. package/dist/components/Form/TextInput/textInput.mcp.js +5 -0
  466. package/dist/components/Form/TimeInput/TimeInput.svelte +9 -1
  467. package/dist/components/Form/TimeInput/timeInput.mcp.d.ts +1 -1
  468. package/dist/components/Form/TimeInput/timeInput.mcp.js +31 -0
  469. package/dist/components/Form/VoiceInput/VoiceInput.svelte +10 -2
  470. package/dist/components/Form/VoiceInput/voiceInput.mcp.d.ts +1 -1
  471. package/dist/components/Form/VoiceInput/voiceInput.mcp.js +1 -0
  472. package/dist/components/GanttChart/GanttDependencyControl.svelte +4 -4
  473. package/dist/components/HoverCard/HoverCard.svelte +100 -10
  474. package/dist/components/HoverCard/hoverCard.attributes.d.ts +33 -0
  475. package/dist/components/HoverCard/hoverCard.attributes.js +24 -0
  476. package/dist/components/HoverCard/hoverCard.mcp.d.ts +1 -1
  477. package/dist/components/HoverCard/hoverCard.mcp.js +61 -2
  478. package/dist/components/HoverCard/hoverCard.props.d.ts +19 -0
  479. package/dist/components/HoverCard/hoverCard.theme.d.ts +12 -0
  480. package/dist/components/HoverCard/hoverCard.theme.js +9 -2
  481. package/dist/components/HoverCard/index.d.ts +1 -0
  482. package/dist/components/HoverCard/index.js +1 -0
  483. package/dist/components/ImageGallery/imageGallery.state.svelte.d.ts +1 -1
  484. package/dist/components/ImageZoom/imageZoom.lightbox.js +40 -6
  485. package/dist/components/ImageZoom/imageZoom.mcp.d.ts +1 -1
  486. package/dist/components/ImageZoom/imageZoom.mcp.js +3 -3
  487. package/dist/components/ImageZoom/imageZoom.props.d.ts +10 -4
  488. package/dist/components/ImageZoom/imageZoom.state.svelte.d.ts +16 -4
  489. package/dist/components/ImageZoom/imageZoom.state.svelte.js +38 -9
  490. package/dist/components/Kanban/kanban.theme.js +7 -3
  491. package/dist/components/Layout/layoutSpacing.d.ts +2 -2
  492. package/dist/components/LinkPreview/LinkPreview.svelte +7 -1
  493. package/dist/components/LinkPreview/linkPreview.mcp.d.ts +1 -1
  494. package/dist/components/LinkPreview/linkPreview.mcp.js +4 -1
  495. package/dist/components/LinkPreview/linkPreview.props.d.ts +15 -0
  496. package/dist/components/LinkPreview/linkPreview.theme.d.ts +12 -0
  497. package/dist/components/LinkPreview/linkPreview.theme.js +9 -2
  498. package/dist/components/Map/maplibre-cdn.js +3 -2
  499. package/dist/components/Markdown/markdown.mcp.d.ts +1 -1
  500. package/dist/components/Markdown/markdown.mcp.js +2 -1
  501. package/dist/components/Markdown/markdown.theme.js +18 -9
  502. package/dist/components/MediaVolume/MediaVolumeControl.svelte +4 -3
  503. package/dist/components/Menu/Menu.svelte +3 -3
  504. package/dist/components/Menu/Menu.svelte.d.ts +1 -1
  505. package/dist/components/Menu/MenuCheckboxItem.svelte +87 -0
  506. package/dist/components/Menu/MenuCheckboxItem.svelte.d.ts +16 -0
  507. package/dist/components/Menu/MenuFloating.svelte +421 -74
  508. package/dist/components/Menu/MenuFloating.svelte.d.ts +1 -1
  509. package/dist/components/Menu/MenuMirroredIcon.svelte +9 -0
  510. package/dist/components/Menu/MenuMirroredIcon.svelte.d.ts +7 -0
  511. package/dist/components/Menu/MenuRadioGroup.svelte +102 -0
  512. package/dist/components/Menu/MenuRadioGroup.svelte.d.ts +18 -0
  513. package/dist/components/Menu/MenuSearchField.svelte +54 -0
  514. package/dist/components/Menu/MenuSearchField.svelte.d.ts +20 -0
  515. package/dist/components/Menu/MenuStacked.svelte +404 -158
  516. package/dist/components/Menu/MenuStacked.svelte.d.ts +1 -1
  517. package/dist/components/Menu/MenuStackedBackHeader.svelte +6 -1
  518. package/dist/components/Menu/index.d.ts +2 -1
  519. package/dist/components/Menu/index.js +1 -0
  520. package/dist/components/Menu/menu.attributes.d.ts +37 -0
  521. package/dist/components/Menu/menu.attributes.js +28 -0
  522. package/dist/components/Menu/menu.filter.svelte.d.ts +52 -0
  523. package/dist/components/Menu/menu.filter.svelte.js +143 -0
  524. package/dist/components/Menu/menu.mcp.d.ts +1 -1
  525. package/dist/components/Menu/menu.mcp.js +227 -17
  526. package/dist/components/Menu/menu.platform.d.ts +5 -0
  527. package/dist/components/Menu/menu.platform.js +11 -0
  528. package/dist/components/Menu/menu.props.d.ts +172 -9
  529. package/dist/components/Menu/menu.theme.d.ts +147 -0
  530. package/dist/components/Menu/menu.theme.js +101 -0
  531. package/dist/components/Menu/menuTree.d.ts +35 -1
  532. package/dist/components/Menu/menuTree.js +158 -1
  533. package/dist/components/MenuBar/menuBar.mcp.d.ts +1 -1
  534. package/dist/components/MenuBar/menuBar.mcp.js +4 -2
  535. package/dist/components/MenuBar/menuBar.state.svelte.js +28 -10
  536. package/dist/components/MenuOption/MenuOption.svelte +5 -1
  537. package/dist/components/MenuOption/menuOption.mcp.d.ts +1 -1
  538. package/dist/components/MenuOption/menuOption.mcp.js +8 -0
  539. package/dist/components/MenuOption/menuOption.props.d.ts +12 -0
  540. package/dist/components/MenuOption/menuOption.theme.d.ts +18 -0
  541. package/dist/components/MenuOption/menuOption.theme.js +24 -4
  542. package/dist/components/Mermaid/mermaid.mcp.d.ts +1 -1
  543. package/dist/components/Mermaid/mermaid.mcp.js +8 -8
  544. package/dist/components/Mermaid/mermaid.props.d.ts +3 -4
  545. package/dist/components/Mermaid/mermaid.state.svelte.d.ts +20 -19
  546. package/dist/components/Mermaid/mermaid.state.svelte.js +80 -243
  547. package/dist/components/Mermaid/mermaid.theme.js +26 -1
  548. package/dist/components/MetadataList/MetadataList.svelte.d.ts +1 -1
  549. package/dist/components/Meter/Meter.svelte +110 -24
  550. package/dist/components/Meter/Meter.svelte.d.ts +12 -12
  551. package/dist/components/Meter/meter.mcp.d.ts +1 -1
  552. package/dist/components/Meter/meter.mcp.js +23 -37
  553. package/dist/components/Meter/meter.props.d.ts +36 -44
  554. package/dist/components/NavigationMenu/NavigationMenu.svelte +181 -0
  555. package/dist/components/NavigationMenu/NavigationMenu.svelte.d.ts +25 -0
  556. package/dist/components/NavigationMenu/NavigationMenuContent.svelte +141 -0
  557. package/dist/components/NavigationMenu/NavigationMenuContent.svelte.d.ts +13 -0
  558. package/dist/components/NavigationMenu/NavigationMenuTrigger.svelte +75 -0
  559. package/dist/components/NavigationMenu/NavigationMenuTrigger.svelte.d.ts +13 -0
  560. package/dist/components/NavigationMenu/index.d.ts +4 -0
  561. package/dist/components/NavigationMenu/index.js +3 -0
  562. package/dist/components/NavigationMenu/navigationMenu.attributes.d.ts +24 -0
  563. package/dist/components/NavigationMenu/navigationMenu.attributes.js +21 -0
  564. package/dist/components/NavigationMenu/navigationMenu.mcp.d.ts +1 -0
  565. package/dist/components/NavigationMenu/navigationMenu.mcp.js +138 -0
  566. package/dist/components/NavigationMenu/navigationMenu.props.d.ts +129 -0
  567. package/dist/components/NavigationMenu/navigationMenu.props.js +1 -0
  568. package/dist/components/NavigationMenu/navigationMenu.state.svelte.d.ts +163 -0
  569. package/dist/components/NavigationMenu/navigationMenu.state.svelte.js +721 -0
  570. package/dist/components/NavigationMenu/navigationMenu.theme.d.ts +326 -0
  571. package/dist/components/NavigationMenu/navigationMenu.theme.js +239 -0
  572. package/dist/components/Overlay/Overlay.svelte +19 -30
  573. package/dist/components/Overlay/index.d.ts +1 -0
  574. package/dist/components/Overlay/index.js +1 -0
  575. package/dist/components/Overlay/overlay.attributes.d.ts +16 -0
  576. package/dist/components/Overlay/overlay.attributes.js +14 -0
  577. package/dist/components/Overlay/overlay.mcp.d.ts +1 -1
  578. package/dist/components/Overlay/overlay.mcp.js +21 -3
  579. package/dist/components/Overlay/overlay.props.d.ts +8 -4
  580. package/dist/components/Popover/Popover.svelte +163 -52
  581. package/dist/components/Popover/Popover.svelte.d.ts +23 -2
  582. package/dist/components/Popover/PopoverSession.svelte +12 -0
  583. package/dist/components/Popover/PopoverSession.svelte.d.ts +7 -0
  584. package/dist/components/Popover/index.d.ts +10 -2
  585. package/dist/components/Popover/index.js +4 -1
  586. package/dist/components/Popover/popover.api.d.ts +83 -0
  587. package/dist/components/Popover/popover.api.js +1 -0
  588. package/dist/components/Popover/popover.attributes.d.ts +32 -0
  589. package/dist/components/Popover/popover.attributes.js +28 -0
  590. package/dist/components/Popover/popover.claims.d.ts +19 -0
  591. package/dist/components/Popover/popover.claims.js +45 -0
  592. package/dist/components/Popover/popover.mcp.d.ts +1 -1
  593. package/dist/components/Popover/popover.mcp.js +163 -31
  594. package/dist/components/Popover/popover.position.d.ts +226 -0
  595. package/dist/components/Popover/popover.position.js +402 -0
  596. package/dist/components/Popover/popover.props.d.ts +179 -24
  597. package/dist/components/Popover/popover.state.svelte.d.ts +169 -37
  598. package/dist/components/Popover/popover.state.svelte.js +1034 -194
  599. package/dist/components/Popover/popover.theme.d.ts +15 -0
  600. package/dist/components/Popover/popover.theme.js +27 -2
  601. package/dist/components/PopupMenu/PopupMenu.svelte +193 -22
  602. package/dist/components/PopupMenu/PopupMenu.svelte.d.ts +2 -2
  603. package/dist/components/PopupMenu/popupMenu.context.d.ts +42 -0
  604. package/dist/components/PopupMenu/popupMenu.context.js +52 -0
  605. package/dist/components/PopupMenu/popupMenu.mcp.d.ts +1 -1
  606. package/dist/components/PopupMenu/popupMenu.mcp.js +46 -6
  607. package/dist/components/PopupMenu/popupMenu.props.d.ts +29 -2
  608. package/dist/components/Progress/Progress.svelte +160 -0
  609. package/dist/components/Progress/Progress.svelte.d.ts +4 -0
  610. package/dist/components/Progress/index.d.ts +3 -0
  611. package/dist/components/Progress/index.js +2 -0
  612. package/dist/components/Progress/progress.mcp.d.ts +1 -0
  613. package/dist/components/Progress/progress.mcp.js +101 -0
  614. package/dist/components/Progress/progress.props.d.ts +79 -0
  615. package/dist/components/Progress/progress.props.js +1 -0
  616. package/dist/components/Progress/progress.theme.d.ts +129 -0
  617. package/dist/components/Progress/progress.theme.js +83 -0
  618. package/dist/components/ProgressCircle/ProgressCircle.svelte +51 -6
  619. package/dist/components/ProgressCircle/progressCircle.mcp.d.ts +1 -1
  620. package/dist/components/ProgressCircle/progressCircle.mcp.js +18 -4
  621. package/dist/components/ProgressCircle/progressCircle.props.d.ts +32 -2
  622. package/dist/components/ProgressCircle/progressCircle.theme.d.ts +15 -3
  623. package/dist/components/ProgressCircle/progressCircle.theme.js +7 -2
  624. package/dist/components/RichTextInput/RichTextInput.svelte +19 -1
  625. package/dist/components/RichTextInput/RichTextInputChrome.svelte +5 -1
  626. package/dist/components/RichTextInput/RichTextInputChrome.svelte.d.ts +2 -0
  627. package/dist/components/RichTextInput/RichTextInputViewport.svelte +3 -1
  628. package/dist/components/RichTextInput/RichTextInputViewport.svelte.d.ts +1 -0
  629. package/dist/components/RichTextInput/richTextInput.mcp.d.ts +1 -1
  630. package/dist/components/RichTextInput/richTextInput.mcp.js +1 -0
  631. package/dist/components/RichTextInput/suggestions.js +2 -0
  632. package/dist/components/ScrollArea/ScrollArea.svelte +166 -27
  633. package/dist/components/ScrollArea/index.d.ts +2 -1
  634. package/dist/components/ScrollArea/index.js +1 -0
  635. package/dist/components/ScrollArea/scrollArea.attributes.d.ts +25 -0
  636. package/dist/components/ScrollArea/scrollArea.attributes.js +21 -0
  637. package/dist/components/ScrollArea/scrollArea.mcp.d.ts +1 -1
  638. package/dist/components/ScrollArea/scrollArea.mcp.js +47 -3
  639. package/dist/components/ScrollArea/scrollArea.props.d.ts +33 -6
  640. package/dist/components/ScrollArea/scrollArea.svelte.d.ts +56 -12
  641. package/dist/components/ScrollArea/scrollArea.svelte.js +281 -71
  642. package/dist/components/ScrollArea/scrollArea.theme.js +5 -2
  643. package/dist/components/SegmentedControl/SegmentedControl.svelte +4 -3
  644. package/dist/components/SegmentedControl/segmentedControl.mcp.d.ts +1 -1
  645. package/dist/components/SegmentedControl/segmentedControl.mcp.js +3 -2
  646. package/dist/components/SelectionMenu/SelectionMenu.svelte +4 -2
  647. package/dist/components/Sidebar/SidebarAction.svelte +13 -3
  648. package/dist/components/Sidebar/SidebarAction.svelte.d.ts +2 -1
  649. package/dist/components/Sidebar/SidebarActivityBar.svelte +14 -7
  650. package/dist/components/Sidebar/SidebarFlyout.svelte +97 -0
  651. package/dist/components/Sidebar/SidebarFlyout.svelte.d.ts +32 -0
  652. package/dist/components/Sidebar/SidebarGroup.svelte +39 -15
  653. package/dist/components/Sidebar/SidebarMenuButton.svelte +6 -3
  654. package/dist/components/Sidebar/SidebarMenuItem.svelte +134 -31
  655. package/dist/components/Sidebar/SidebarMenuSubItem.svelte +30 -14
  656. package/dist/components/Sidebar/SidebarTreeNode.svelte +41 -61
  657. package/dist/components/Sidebar/index.d.ts +1 -0
  658. package/dist/components/Sidebar/index.js +1 -0
  659. package/dist/components/Sidebar/sidebar-position.d.ts +37 -2
  660. package/dist/components/Sidebar/sidebar-position.js +31 -2
  661. package/dist/components/Sidebar/sidebar.attributes.d.ts +33 -0
  662. package/dist/components/Sidebar/sidebar.attributes.js +29 -0
  663. package/dist/components/Sidebar/sidebar.mcp.d.ts +1 -1
  664. package/dist/components/Sidebar/sidebar.mcp.js +45 -10
  665. package/dist/components/Sidebar/sidebar.props.d.ts +28 -7
  666. package/dist/components/Sidebar/sidebar.theme.d.ts +51 -21
  667. package/dist/components/Sidebar/sidebar.theme.js +113 -62
  668. package/dist/components/Sidebar/sidebar.views.svelte.js +11 -18
  669. package/dist/components/Stepper/Stepper.svelte +2 -0
  670. package/dist/components/Stepper/stepper.mcp.d.ts +1 -1
  671. package/dist/components/Stepper/stepper.mcp.js +1 -0
  672. package/dist/components/Stepper/stepper.props.d.ts +5 -0
  673. package/dist/components/Stepper/stepper.state.svelte.d.ts +2 -0
  674. package/dist/components/Stepper/stepper.state.svelte.js +31 -12
  675. package/dist/components/Tabbar/Tabbar.svelte +55 -16
  676. package/dist/components/Tabbar/index.d.ts +1 -1
  677. package/dist/components/Tabbar/tabbar.mcp.d.ts +1 -1
  678. package/dist/components/Tabbar/tabbar.mcp.js +26 -9
  679. package/dist/components/Tabbar/tabbar.props.d.ts +34 -5
  680. package/dist/components/Tabbar/tabbar.selection.svelte.d.ts +79 -0
  681. package/dist/components/Tabbar/tabbar.selection.svelte.js +99 -0
  682. package/dist/components/TableOfContents/tableOfContents.state.svelte.js +9 -7
  683. package/dist/components/Tabs/Tabs.svelte +73 -16
  684. package/dist/components/Tabs/index.d.ts +2 -1
  685. package/dist/components/Tabs/tabs.direction.svelte.d.ts +25 -0
  686. package/dist/components/Tabs/tabs.direction.svelte.js +40 -0
  687. package/dist/components/Tabs/tabs.mcp.d.ts +1 -1
  688. package/dist/components/Tabs/tabs.mcp.js +22 -4
  689. package/dist/components/Tabs/tabs.props.d.ts +39 -12
  690. package/dist/components/Tabs/tabs.theme.js +3 -1
  691. package/dist/components/Theme/Theme.svelte +44 -27
  692. package/dist/components/Theme/helper.d.ts +16 -2
  693. package/dist/components/Theme/helper.js +46 -4
  694. package/dist/components/Theme/theme.mcp.d.ts +1 -1
  695. package/dist/components/Theme/theme.mcp.js +103 -0
  696. package/dist/components/Theme/theme.props.d.ts +16 -0
  697. package/dist/components/Theme/theme.state.svelte.d.ts +14 -1
  698. package/dist/components/Theme/theme.state.svelte.js +18 -1
  699. package/dist/components/Toast/Toast.svelte +184 -39
  700. package/dist/components/Toast/Toaster.svelte +14 -10
  701. package/dist/components/Toast/index.d.ts +1 -0
  702. package/dist/components/Toast/toast.mcp.d.ts +1 -1
  703. package/dist/components/Toast/toast.mcp.js +47 -6
  704. package/dist/components/Toast/toast.state.svelte.d.ts +172 -6
  705. package/dist/components/Toast/toast.state.svelte.js +513 -68
  706. package/dist/components/Toast/toast.theme.js +1 -1
  707. package/dist/components/ToggleButton/ToggleButton.svelte +23 -1
  708. package/dist/components/ToggleButton/toggleButton.mcp.d.ts +1 -1
  709. package/dist/components/ToggleButton/toggleButton.mcp.js +3 -1
  710. package/dist/components/ToggleButton/toggleButton.props.d.ts +13 -1
  711. package/dist/components/ToggleButton/toggleButton.theme.d.ts +12 -0
  712. package/dist/components/ToggleButton/toggleButton.theme.js +15 -3
  713. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.svelte +29 -9
  714. package/dist/components/ToggleButtonGroup/index.d.ts +1 -1
  715. package/dist/components/ToggleButtonGroup/toggleButtonGroup.mcp.d.ts +1 -1
  716. package/dist/components/ToggleButtonGroup/toggleButtonGroup.mcp.js +5 -2
  717. package/dist/components/ToggleButtonGroup/toggleButtonGroup.props.d.ts +19 -1
  718. package/dist/components/ToggleButtonGroup/toggleButtonGroup.theme.d.ts +12 -0
  719. package/dist/components/ToggleButtonGroup/toggleButtonGroup.theme.js +21 -2
  720. package/dist/components/ToggleMenu/ToggleMenu.svelte +57 -43
  721. package/dist/components/ToggleMenu/ToggleMenuGroup.svelte +1 -0
  722. package/dist/components/ToggleMenu/ToggleMenuMenu.svelte +9 -3
  723. package/dist/components/ToggleMenu/ToggleMenuRadioGroup.svelte +7 -2
  724. package/dist/components/ToggleMenu/toggleMenu.mcp.d.ts +1 -1
  725. package/dist/components/ToggleMenu/toggleMenu.mcp.js +3 -2
  726. package/dist/components/ToggleMenu/toggleMenu.props.d.ts +4 -1
  727. package/dist/components/Tooltip/Tooltip.svelte +4 -12
  728. package/dist/components/Tooltip/TooltipHost.svelte +136 -15
  729. package/dist/components/Tooltip/index.d.ts +1 -0
  730. package/dist/components/Tooltip/index.js +1 -0
  731. package/dist/components/Tooltip/tooltip.attachment.svelte.d.ts +5 -0
  732. package/dist/components/Tooltip/tooltip.attachment.svelte.js +215 -33
  733. package/dist/components/Tooltip/tooltip.attributes.d.ts +32 -0
  734. package/dist/components/Tooltip/tooltip.attributes.js +28 -0
  735. package/dist/components/Tooltip/tooltip.mcp.d.ts +1 -1
  736. package/dist/components/Tooltip/tooltip.mcp.js +111 -10
  737. package/dist/components/Tooltip/tooltip.props.d.ts +33 -2
  738. package/dist/components/Tooltip/tooltip.surface.d.ts +24 -0
  739. package/dist/components/Tooltip/tooltip.surface.js +42 -0
  740. package/dist/components/Tree/TreeContextMenuSurface.svelte +16 -3
  741. package/dist/components/Utils/BeforeHydratation.svelte +14 -3
  742. package/dist/components/Utils/BeforeHydratation.svelte.d.ts +2 -0
  743. package/dist/components/VideoPlayer/VideoPlayer.svelte.d.ts +1 -1
  744. package/dist/components/VideoPlayer/VideoPlayerSettings.svelte +2 -0
  745. package/dist/generated/componentAliases.d.ts +3 -0
  746. package/dist/generated/componentAliases.js +3 -0
  747. package/dist/generated/componentContract.d.ts +79 -34
  748. package/dist/generated/componentContract.js +225 -6
  749. package/dist/generated/componentMcpRegistry.js +6 -0
  750. package/dist/i18n/ar.js +107 -3
  751. package/dist/i18n/context.svelte.d.ts +6 -0
  752. package/dist/i18n/context.svelte.js +12 -0
  753. package/dist/i18n/de.js +101 -3
  754. package/dist/i18n/en.d.ts +91 -2
  755. package/dist/i18n/en.js +101 -3
  756. package/dist/i18n/es.js +101 -3
  757. package/dist/i18n/fr.js +101 -3
  758. package/dist/i18n/ja.js +101 -3
  759. package/dist/i18n/pt.js +101 -3
  760. package/dist/i18n/zh.js +101 -3
  761. package/dist/tailwind/geometry.js +7 -0
  762. package/dist/tailwind/global.js +31 -0
  763. package/dist/types/index.d.ts +1 -0
  764. package/dist/types/types.mcp.d.ts +1 -1
  765. package/dist/types/types.mcp.js +23 -0
  766. package/dist/utils/cspNonce.d.ts +16 -0
  767. package/dist/utils/cspNonce.js +39 -0
  768. package/dist/utils/cva/merge.d.ts +5 -1
  769. package/dist/utils/cva/merge.js +6 -4
  770. package/dist/utils/focus.d.ts +34 -0
  771. package/dist/utils/focus.js +93 -0
  772. package/dist/utils/focusHistory.d.ts +21 -0
  773. package/dist/utils/focusHistory.js +99 -0
  774. package/dist/utils/handlers.d.ts +7 -0
  775. package/dist/utils/handlers.js +14 -0
  776. package/dist/utils/hoverIntent.d.ts +42 -0
  777. package/dist/utils/hoverIntent.js +57 -0
  778. package/dist/utils/id.d.ts +7 -0
  779. package/dist/utils/id.js +15 -0
  780. package/dist/utils/layers.svelte.d.ts +32 -4
  781. package/dist/utils/layers.svelte.js +214 -21
  782. package/dist/utils/listFilter.d.ts +44 -0
  783. package/dist/utils/listFilter.js +130 -0
  784. package/dist/utils/match.d.ts +35 -0
  785. package/dist/utils/match.js +36 -0
  786. package/dist/utils/number.d.ts +126 -0
  787. package/dist/utils/number.js +401 -0
  788. package/dist/utils/openChange.d.ts +88 -0
  789. package/dist/utils/openChange.js +71 -0
  790. package/dist/utils/openLifecycle.svelte.d.ts +41 -0
  791. package/dist/utils/openLifecycle.svelte.js +134 -0
  792. package/dist/utils/pointerDrag.d.ts +10 -0
  793. package/dist/utils/pointerDrag.js +37 -2
  794. package/dist/utils/pragmaticDragAndDrop.d.ts +2 -1
  795. package/dist/utils/pragmaticDragAndDrop.js +8 -3
  796. package/dist/utils/range.d.ts +62 -0
  797. package/dist/utils/range.js +70 -0
  798. package/dist/utils/requestNativeSubmit.d.ts +17 -0
  799. package/dist/utils/requestNativeSubmit.js +47 -0
  800. package/dist/utils/safeArea.svelte.d.ts +10 -1
  801. package/dist/utils/safeArea.svelte.js +19 -11
  802. package/dist/utils/stateAttributes.d.ts +108 -0
  803. package/dist/utils/stateAttributes.js +78 -0
  804. package/dist/utils/swipeVelocity.d.ts +32 -0
  805. package/dist/utils/swipeVelocity.js +59 -0
  806. package/dist/utils/timer.svelte.d.ts +65 -2
  807. package/dist/utils/timer.svelte.js +159 -25
  808. package/dist/utils/trigger.d.ts +41 -0
  809. package/dist/utils/trigger.js +103 -0
  810. package/dist/utils/typeahead.d.ts +9 -0
  811. package/dist/utils/typeahead.js +21 -9
  812. package/dist/utils/useDndList.svelte.d.ts +1 -1
  813. package/dist/utils/useDndList.svelte.js +6 -23
  814. package/dist/utils/useFocusScope.svelte.d.ts +29 -0
  815. package/dist/utils/useFocusScope.svelte.js +189 -27
  816. package/dist/utils/useHoverAction.svelte.d.ts +44 -4
  817. package/dist/utils/useHoverAction.svelte.js +161 -51
  818. package/dist/utils/useKeyDown.svelte.d.ts +19 -2
  819. package/dist/utils/useKeyDown.svelte.js +19 -12
  820. package/dist/utils/useListNavigation.svelte.d.ts +94 -13
  821. package/dist/utils/useListNavigation.svelte.js +261 -35
  822. package/dist/utils/useLiveAnnouncer.svelte.d.ts +77 -2
  823. package/dist/utils/useLiveAnnouncer.svelte.js +119 -2
  824. package/dist/utils/useNavigation.svelte.d.ts +36 -3
  825. package/dist/utils/useNavigation.svelte.js +699 -332
  826. package/dist/utils/usePressAndHold.svelte.d.ts +38 -0
  827. package/dist/utils/usePressAndHold.svelte.js +191 -0
  828. package/dist/utils/useScrollLock.svelte.d.ts +20 -1
  829. package/dist/utils/useScrollLock.svelte.js +54 -13
  830. package/dist/utils/useSlidingIndicator.svelte.d.ts +2 -0
  831. package/dist/utils/useSlidingIndicator.svelte.js +27 -5
  832. package/dist/utils/useTabBridge.svelte.d.ts +20 -0
  833. package/dist/utils/useTabBridge.svelte.js +109 -0
  834. package/dist/utils/values.d.ts +15 -0
  835. package/dist/utils/values.js +49 -0
  836. package/package.json +31 -2
  837. package/dist/generated/componentMcpRegistry.d.ts +0 -142
  838. package/dist/utils/useDrag.svelte.d.ts +0 -11
  839. 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
- onValueChange: (value: AIAskAnswer) => void;
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
- <div data-slot="ai-ask-user-question-step" class={classes.stepContent()}>
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 render={renderer} payload={{ question, value, setValue: onValueChange }} />
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()}>{question.title}</div>
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 ?? 'Type your answer...'}
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.options.map((option) => ({ ...option, value: option.id }))}
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={(answer) => {
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={getAIAskStringArrayAnswer(value)}
231
+ value={[...optionAnswers(), ...(otherActive ? [AI_ASK_OTHER_VALUE] : [])]}
90
232
  name={question.id}
91
- items={question.options.map((option) => ({ ...option, value: option.id }))}
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[]) => onValueChange(answer)}
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 && (renderer || question.type === 'file')}
113
- <div role="alert" class={classes.error()}>{errorMessage}</div>
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
- onValueChange: (value: AIAskAnswer) => void;
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 required by default. 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, the last step, disabled state, and active async work never auto-advance.\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. Primary navigation validates the active question; final submission finds the first missing required answer and moves to it. Previous/next icon controls remain available for explicit navigation.\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 required: false\n }\n ]}\n bind:value={answers}\n onSubmit={({ answers, values }) => resolveTool({ answers, values })}\n/>\n```\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/progress group/steps, the body region, step content, question title and description, textarea, option/file regions, empty/error states, and footer.\n";
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 required by default. 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.
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. Previous/next icon controls remain available for explicit navigation.
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, empty/error states, and footer.
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
- /** Previous-step action label. */
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
- /** Next-step action label. */
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
  }>;