entasis 0.10.2 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (841) 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 +258 -32
  326. package/dist/components/Form/Field/Field.svelte.d.ts +15 -6
  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 +75 -10
  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 +117 -40
  337. package/dist/components/Form/Field/field.state.svelte.js +525 -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 +49 -15
  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 +96 -12
  354. package/dist/components/Form/Form/FormFieldRenderer.svelte.d.ts +3 -2
  355. package/dist/components/Form/Form/FormInputRenderer.svelte +7 -0
  356. package/dist/components/Form/Form/form.d.ts +84 -11
  357. package/dist/components/Form/Form/form.mcp.d.ts +1 -1
  358. package/dist/components/Form/Form/form.mcp.js +178 -12
  359. package/dist/components/Form/Form/form.props.d.ts +32 -1
  360. package/dist/components/Form/Form/form.registry.d.ts +28 -0
  361. package/dist/components/Form/Form/form.registry.js +59 -0
  362. package/dist/components/Form/Form/form.state.svelte.d.ts +1186 -420
  363. package/dist/components/Form/Form/form.state.svelte.js +322 -28
  364. package/dist/components/Form/Form/index.d.ts +4 -1
  365. package/dist/components/Form/Form/index.js +1 -0
  366. package/dist/components/Form/Form/visibility.d.ts +3130 -1863
  367. package/dist/components/Form/KeyValueInput/KeyValueInput.svelte +22 -10
  368. package/dist/components/Form/KeyValueInput/keyValueInput.mcp.d.ts +1 -1
  369. package/dist/components/Form/KeyValueInput/keyValueInput.mcp.js +1 -0
  370. package/dist/components/Form/MultiStepForm/MultiStepForm.svelte +12 -5
  371. package/dist/components/Form/MultiStepForm/multiStepForm.mcp.d.ts +1 -1
  372. package/dist/components/Form/MultiStepForm/multiStepForm.mcp.js +5 -3
  373. package/dist/components/Form/MultiStepForm/multiStepForm.props.d.ts +5 -0
  374. package/dist/components/Form/MultiStepForm/multiStepForm.state.svelte.d.ts +1050 -408
  375. package/dist/components/Form/MultiStepForm/multiStepForm.state.svelte.js +48 -24
  376. package/dist/components/Form/NumberInput/NumberInput.svelte +365 -46
  377. package/dist/components/Form/NumberInput/index.d.ts +1 -1
  378. package/dist/components/Form/NumberInput/numberInput.mcp.d.ts +1 -1
  379. package/dist/components/Form/NumberInput/numberInput.mcp.js +55 -30
  380. package/dist/components/Form/NumberInput/numberInput.props.d.ts +64 -4
  381. package/dist/components/Form/PasswordInput/Password.svelte +28 -1
  382. package/dist/components/Form/PasswordInput/index.d.ts +1 -1
  383. package/dist/components/Form/PasswordInput/passwordInput.mcp.d.ts +1 -1
  384. package/dist/components/Form/PasswordInput/passwordInput.mcp.js +20 -2
  385. package/dist/components/Form/PasswordInput/passwordInput.props.d.ts +23 -0
  386. package/dist/components/Form/PhoneInput/PhoneInput.svelte +11 -4
  387. package/dist/components/Form/PhoneInput/PhoneInputCountryPicker.svelte +47 -21
  388. package/dist/components/Form/PhoneInput/phoneInput-cdn.js +2 -1
  389. package/dist/components/Form/PhoneInput/phoneInput.mcp.d.ts +1 -1
  390. package/dist/components/Form/PhoneInput/phoneInput.mcp.js +6 -2
  391. package/dist/components/Form/PhoneInput/phoneInputCountry.d.ts +9 -3
  392. package/dist/components/Form/PhoneInput/phoneInputCountry.js +34 -24
  393. package/dist/components/Form/PinInput/PinInput.svelte +44 -9
  394. package/dist/components/Form/PinInput/PinInputCells.svelte +22 -1
  395. package/dist/components/Form/PinInput/PinInputCells.svelte.d.ts +1 -0
  396. package/dist/components/Form/PinInput/index.d.ts +1 -1
  397. package/dist/components/Form/PinInput/pinInput.mcp.d.ts +1 -1
  398. package/dist/components/Form/PinInput/pinInput.mcp.js +29 -6
  399. package/dist/components/Form/PinInput/pinInput.props.d.ts +38 -4
  400. package/dist/components/Form/PinInput/pinInput.state.svelte.d.ts +41 -0
  401. package/dist/components/Form/PinInput/pinInput.state.svelte.js +227 -24
  402. package/dist/components/Form/PinInput/pinInput.theme.d.ts +39 -3
  403. package/dist/components/Form/PinInput/pinInput.theme.js +27 -1
  404. package/dist/components/Form/RadioInput/RadioInput.svelte +94 -32
  405. package/dist/components/Form/RadioInput/RadioInput.svelte.d.ts +12 -12
  406. package/dist/components/Form/RadioInput/radioInput.mcp.d.ts +1 -1
  407. package/dist/components/Form/RadioInput/radioInput.mcp.js +12 -9
  408. package/dist/components/Form/RadioInput/radioInput.props.d.ts +22 -6
  409. package/dist/components/Form/RadioInput/radioInput.theme.d.ts +12 -0
  410. package/dist/components/Form/RadioInput/radioInput.theme.js +10 -5
  411. package/dist/components/Form/RatingInput/RatingInput.svelte +13 -4
  412. package/dist/components/Form/RatingInput/ratingInput.mcp.d.ts +1 -1
  413. package/dist/components/Form/RatingInput/ratingInput.mcp.js +3 -3
  414. package/dist/components/Form/RatingInput/ratingInput.props.d.ts +1 -1
  415. package/dist/components/Form/Select/Select.svelte +186 -48
  416. package/dist/components/Form/Select/Select.svelte.d.ts +23 -2
  417. package/dist/components/Form/Select/SelectOptionRow.svelte +69 -0
  418. package/dist/components/Form/Select/SelectOptionRow.svelte.d.ts +18 -0
  419. package/dist/components/Form/Select/index.d.ts +2 -1
  420. package/dist/components/Form/Select/index.js +1 -0
  421. package/dist/components/Form/Select/select.align.d.ts +5 -0
  422. package/dist/components/Form/Select/select.align.js +19 -5
  423. package/dist/components/Form/Select/select.attributes.d.ts +36 -0
  424. package/dist/components/Form/Select/select.attributes.js +27 -0
  425. package/dist/components/Form/Select/select.mcp.d.ts +1 -1
  426. package/dist/components/Form/Select/select.mcp.js +103 -18
  427. package/dist/components/Form/Select/select.props.d.ts +87 -10
  428. package/dist/components/Form/Select/select.state.svelte.d.ts +108 -17
  429. package/dist/components/Form/Select/select.state.svelte.js +354 -59
  430. package/dist/components/Form/Select/select.theme.d.ts +21 -0
  431. package/dist/components/Form/Select/select.theme.js +22 -0
  432. package/dist/components/Form/Slider/Slider.svelte +54 -14
  433. package/dist/components/Form/Slider/SliderMarks.svelte +1 -1
  434. package/dist/components/Form/Slider/SliderThumb.svelte +49 -19
  435. package/dist/components/Form/Slider/SliderThumb.svelte.d.ts +8 -2
  436. package/dist/components/Form/Slider/SliderTrack.svelte +33 -12
  437. package/dist/components/Form/Slider/SliderTrack.svelte.d.ts +6 -2
  438. package/dist/components/Form/Slider/index.d.ts +1 -1
  439. package/dist/components/Form/Slider/slider.mcp.d.ts +1 -1
  440. package/dist/components/Form/Slider/slider.mcp.js +55 -11
  441. package/dist/components/Form/Slider/slider.props.d.ts +35 -2
  442. package/dist/components/Form/Slider/slider.state.svelte.d.ts +66 -5
  443. package/dist/components/Form/Slider/slider.state.svelte.js +273 -49
  444. package/dist/components/Form/Slider/slider.theme.d.ts +36 -0
  445. package/dist/components/Form/Slider/slider.theme.js +35 -17
  446. package/dist/components/Form/Switch/Switch.svelte +61 -38
  447. package/dist/components/Form/Switch/switch.mcp.d.ts +1 -1
  448. package/dist/components/Form/Switch/switch.mcp.js +25 -5
  449. package/dist/components/Form/Switch/switch.props.d.ts +14 -1
  450. package/dist/components/Form/Switch/switch.theme.d.ts +12 -0
  451. package/dist/components/Form/Switch/switch.theme.js +8 -3
  452. package/dist/components/Form/TagGroup/TagGroup.svelte +8 -0
  453. package/dist/components/Form/TagGroup/tagGroup.mcp.d.ts +1 -1
  454. package/dist/components/Form/TagGroup/tagGroup.mcp.js +1 -0
  455. package/dist/components/Form/TagsInput/TagsInput.svelte +277 -275
  456. package/dist/components/Form/TagsInput/TagsInput.svelte.d.ts +1 -1
  457. package/dist/components/Form/TagsInput/tagsInput.mcp.d.ts +1 -1
  458. package/dist/components/Form/TagsInput/tagsInput.mcp.js +31 -11
  459. package/dist/components/Form/TagsInput/tagsInput.props.d.ts +6 -26
  460. package/dist/components/Form/TagsInput/tagsInput.theme.d.ts +63 -0
  461. package/dist/components/Form/TagsInput/tagsInput.theme.js +37 -1
  462. package/dist/components/Form/TextArea/TextArea.svelte +8 -0
  463. package/dist/components/Form/TextArea/textArea.mcp.d.ts +1 -1
  464. package/dist/components/Form/TextArea/textArea.mcp.js +1 -0
  465. package/dist/components/Form/TextInput/TextInput.svelte +8 -1
  466. package/dist/components/Form/TextInput/textInput.mcp.d.ts +1 -1
  467. package/dist/components/Form/TextInput/textInput.mcp.js +5 -0
  468. package/dist/components/Form/TimeInput/TimeInput.svelte +9 -1
  469. package/dist/components/Form/TimeInput/timeInput.mcp.d.ts +1 -1
  470. package/dist/components/Form/TimeInput/timeInput.mcp.js +31 -0
  471. package/dist/components/Form/VoiceInput/VoiceInput.svelte +10 -2
  472. package/dist/components/Form/VoiceInput/voiceInput.mcp.d.ts +1 -1
  473. package/dist/components/Form/VoiceInput/voiceInput.mcp.js +1 -0
  474. package/dist/components/GanttChart/GanttDependencyControl.svelte +4 -4
  475. package/dist/components/HoverCard/HoverCard.svelte +100 -10
  476. package/dist/components/HoverCard/hoverCard.attributes.d.ts +33 -0
  477. package/dist/components/HoverCard/hoverCard.attributes.js +24 -0
  478. package/dist/components/HoverCard/hoverCard.mcp.d.ts +1 -1
  479. package/dist/components/HoverCard/hoverCard.mcp.js +61 -2
  480. package/dist/components/HoverCard/hoverCard.props.d.ts +19 -0
  481. package/dist/components/HoverCard/hoverCard.theme.d.ts +12 -0
  482. package/dist/components/HoverCard/hoverCard.theme.js +9 -2
  483. package/dist/components/HoverCard/index.d.ts +1 -0
  484. package/dist/components/HoverCard/index.js +1 -0
  485. package/dist/components/ImageGallery/imageGallery.state.svelte.d.ts +1 -1
  486. package/dist/components/ImageZoom/imageZoom.lightbox.js +40 -6
  487. package/dist/components/ImageZoom/imageZoom.mcp.d.ts +1 -1
  488. package/dist/components/ImageZoom/imageZoom.mcp.js +3 -3
  489. package/dist/components/ImageZoom/imageZoom.props.d.ts +10 -4
  490. package/dist/components/ImageZoom/imageZoom.state.svelte.d.ts +16 -4
  491. package/dist/components/ImageZoom/imageZoom.state.svelte.js +38 -9
  492. package/dist/components/Kanban/kanban.theme.js +7 -3
  493. package/dist/components/Layout/layoutSpacing.d.ts +2 -2
  494. package/dist/components/LinkPreview/LinkPreview.svelte +7 -1
  495. package/dist/components/LinkPreview/linkPreview.mcp.d.ts +1 -1
  496. package/dist/components/LinkPreview/linkPreview.mcp.js +4 -1
  497. package/dist/components/LinkPreview/linkPreview.props.d.ts +15 -0
  498. package/dist/components/LinkPreview/linkPreview.theme.d.ts +12 -0
  499. package/dist/components/LinkPreview/linkPreview.theme.js +9 -2
  500. package/dist/components/Map/maplibre-cdn.js +3 -2
  501. package/dist/components/Markdown/markdown.mcp.d.ts +1 -1
  502. package/dist/components/Markdown/markdown.mcp.js +2 -1
  503. package/dist/components/Markdown/markdown.theme.js +18 -9
  504. package/dist/components/MediaVolume/MediaVolumeControl.svelte +4 -3
  505. package/dist/components/Menu/Menu.svelte +3 -3
  506. package/dist/components/Menu/Menu.svelte.d.ts +1 -1
  507. package/dist/components/Menu/MenuCheckboxItem.svelte +87 -0
  508. package/dist/components/Menu/MenuCheckboxItem.svelte.d.ts +16 -0
  509. package/dist/components/Menu/MenuFloating.svelte +421 -74
  510. package/dist/components/Menu/MenuFloating.svelte.d.ts +1 -1
  511. package/dist/components/Menu/MenuMirroredIcon.svelte +9 -0
  512. package/dist/components/Menu/MenuMirroredIcon.svelte.d.ts +7 -0
  513. package/dist/components/Menu/MenuRadioGroup.svelte +102 -0
  514. package/dist/components/Menu/MenuRadioGroup.svelte.d.ts +18 -0
  515. package/dist/components/Menu/MenuSearchField.svelte +54 -0
  516. package/dist/components/Menu/MenuSearchField.svelte.d.ts +20 -0
  517. package/dist/components/Menu/MenuStacked.svelte +404 -158
  518. package/dist/components/Menu/MenuStacked.svelte.d.ts +1 -1
  519. package/dist/components/Menu/MenuStackedBackHeader.svelte +6 -1
  520. package/dist/components/Menu/index.d.ts +2 -1
  521. package/dist/components/Menu/index.js +1 -0
  522. package/dist/components/Menu/menu.attributes.d.ts +37 -0
  523. package/dist/components/Menu/menu.attributes.js +28 -0
  524. package/dist/components/Menu/menu.filter.svelte.d.ts +52 -0
  525. package/dist/components/Menu/menu.filter.svelte.js +143 -0
  526. package/dist/components/Menu/menu.mcp.d.ts +1 -1
  527. package/dist/components/Menu/menu.mcp.js +227 -17
  528. package/dist/components/Menu/menu.platform.d.ts +5 -0
  529. package/dist/components/Menu/menu.platform.js +11 -0
  530. package/dist/components/Menu/menu.props.d.ts +172 -9
  531. package/dist/components/Menu/menu.theme.d.ts +147 -0
  532. package/dist/components/Menu/menu.theme.js +101 -0
  533. package/dist/components/Menu/menuTree.d.ts +35 -1
  534. package/dist/components/Menu/menuTree.js +158 -1
  535. package/dist/components/MenuBar/menuBar.mcp.d.ts +1 -1
  536. package/dist/components/MenuBar/menuBar.mcp.js +4 -2
  537. package/dist/components/MenuBar/menuBar.state.svelte.js +28 -10
  538. package/dist/components/MenuOption/MenuOption.svelte +5 -1
  539. package/dist/components/MenuOption/menuOption.mcp.d.ts +1 -1
  540. package/dist/components/MenuOption/menuOption.mcp.js +8 -0
  541. package/dist/components/MenuOption/menuOption.props.d.ts +12 -0
  542. package/dist/components/MenuOption/menuOption.theme.d.ts +18 -0
  543. package/dist/components/MenuOption/menuOption.theme.js +24 -4
  544. package/dist/components/Mermaid/mermaid.mcp.d.ts +1 -1
  545. package/dist/components/Mermaid/mermaid.mcp.js +8 -8
  546. package/dist/components/Mermaid/mermaid.props.d.ts +3 -4
  547. package/dist/components/Mermaid/mermaid.state.svelte.d.ts +20 -19
  548. package/dist/components/Mermaid/mermaid.state.svelte.js +80 -243
  549. package/dist/components/Mermaid/mermaid.theme.js +26 -1
  550. package/dist/components/MetadataList/MetadataList.svelte.d.ts +1 -1
  551. package/dist/components/Meter/Meter.svelte +110 -24
  552. package/dist/components/Meter/Meter.svelte.d.ts +12 -12
  553. package/dist/components/Meter/meter.mcp.d.ts +1 -1
  554. package/dist/components/Meter/meter.mcp.js +23 -37
  555. package/dist/components/Meter/meter.props.d.ts +36 -44
  556. package/dist/components/NavigationMenu/NavigationMenu.svelte +181 -0
  557. package/dist/components/NavigationMenu/NavigationMenu.svelte.d.ts +25 -0
  558. package/dist/components/NavigationMenu/NavigationMenuContent.svelte +141 -0
  559. package/dist/components/NavigationMenu/NavigationMenuContent.svelte.d.ts +13 -0
  560. package/dist/components/NavigationMenu/NavigationMenuTrigger.svelte +75 -0
  561. package/dist/components/NavigationMenu/NavigationMenuTrigger.svelte.d.ts +13 -0
  562. package/dist/components/NavigationMenu/index.d.ts +4 -0
  563. package/dist/components/NavigationMenu/index.js +3 -0
  564. package/dist/components/NavigationMenu/navigationMenu.attributes.d.ts +24 -0
  565. package/dist/components/NavigationMenu/navigationMenu.attributes.js +21 -0
  566. package/dist/components/NavigationMenu/navigationMenu.mcp.d.ts +1 -0
  567. package/dist/components/NavigationMenu/navigationMenu.mcp.js +138 -0
  568. package/dist/components/NavigationMenu/navigationMenu.props.d.ts +129 -0
  569. package/dist/components/NavigationMenu/navigationMenu.props.js +1 -0
  570. package/dist/components/NavigationMenu/navigationMenu.state.svelte.d.ts +163 -0
  571. package/dist/components/NavigationMenu/navigationMenu.state.svelte.js +721 -0
  572. package/dist/components/NavigationMenu/navigationMenu.theme.d.ts +326 -0
  573. package/dist/components/NavigationMenu/navigationMenu.theme.js +239 -0
  574. package/dist/components/Overlay/Overlay.svelte +19 -30
  575. package/dist/components/Overlay/index.d.ts +1 -0
  576. package/dist/components/Overlay/index.js +1 -0
  577. package/dist/components/Overlay/overlay.attributes.d.ts +16 -0
  578. package/dist/components/Overlay/overlay.attributes.js +14 -0
  579. package/dist/components/Overlay/overlay.mcp.d.ts +1 -1
  580. package/dist/components/Overlay/overlay.mcp.js +21 -3
  581. package/dist/components/Overlay/overlay.props.d.ts +8 -4
  582. package/dist/components/Popover/Popover.svelte +163 -52
  583. package/dist/components/Popover/Popover.svelte.d.ts +23 -2
  584. package/dist/components/Popover/PopoverSession.svelte +12 -0
  585. package/dist/components/Popover/PopoverSession.svelte.d.ts +7 -0
  586. package/dist/components/Popover/index.d.ts +10 -2
  587. package/dist/components/Popover/index.js +4 -1
  588. package/dist/components/Popover/popover.api.d.ts +83 -0
  589. package/dist/components/Popover/popover.api.js +1 -0
  590. package/dist/components/Popover/popover.attributes.d.ts +32 -0
  591. package/dist/components/Popover/popover.attributes.js +28 -0
  592. package/dist/components/Popover/popover.claims.d.ts +19 -0
  593. package/dist/components/Popover/popover.claims.js +45 -0
  594. package/dist/components/Popover/popover.mcp.d.ts +1 -1
  595. package/dist/components/Popover/popover.mcp.js +163 -31
  596. package/dist/components/Popover/popover.position.d.ts +226 -0
  597. package/dist/components/Popover/popover.position.js +402 -0
  598. package/dist/components/Popover/popover.props.d.ts +179 -24
  599. package/dist/components/Popover/popover.state.svelte.d.ts +169 -37
  600. package/dist/components/Popover/popover.state.svelte.js +1034 -194
  601. package/dist/components/Popover/popover.theme.d.ts +15 -0
  602. package/dist/components/Popover/popover.theme.js +27 -2
  603. package/dist/components/PopupMenu/PopupMenu.svelte +193 -22
  604. package/dist/components/PopupMenu/PopupMenu.svelte.d.ts +2 -2
  605. package/dist/components/PopupMenu/popupMenu.context.d.ts +42 -0
  606. package/dist/components/PopupMenu/popupMenu.context.js +52 -0
  607. package/dist/components/PopupMenu/popupMenu.mcp.d.ts +1 -1
  608. package/dist/components/PopupMenu/popupMenu.mcp.js +46 -6
  609. package/dist/components/PopupMenu/popupMenu.props.d.ts +29 -2
  610. package/dist/components/Progress/Progress.svelte +160 -0
  611. package/dist/components/Progress/Progress.svelte.d.ts +4 -0
  612. package/dist/components/Progress/index.d.ts +3 -0
  613. package/dist/components/Progress/index.js +2 -0
  614. package/dist/components/Progress/progress.mcp.d.ts +1 -0
  615. package/dist/components/Progress/progress.mcp.js +101 -0
  616. package/dist/components/Progress/progress.props.d.ts +79 -0
  617. package/dist/components/Progress/progress.props.js +1 -0
  618. package/dist/components/Progress/progress.theme.d.ts +129 -0
  619. package/dist/components/Progress/progress.theme.js +83 -0
  620. package/dist/components/ProgressCircle/ProgressCircle.svelte +51 -6
  621. package/dist/components/ProgressCircle/progressCircle.mcp.d.ts +1 -1
  622. package/dist/components/ProgressCircle/progressCircle.mcp.js +18 -4
  623. package/dist/components/ProgressCircle/progressCircle.props.d.ts +32 -2
  624. package/dist/components/ProgressCircle/progressCircle.theme.d.ts +15 -3
  625. package/dist/components/ProgressCircle/progressCircle.theme.js +7 -2
  626. package/dist/components/RichTextInput/RichTextInput.svelte +19 -1
  627. package/dist/components/RichTextInput/RichTextInputChrome.svelte +5 -1
  628. package/dist/components/RichTextInput/RichTextInputChrome.svelte.d.ts +2 -0
  629. package/dist/components/RichTextInput/RichTextInputViewport.svelte +3 -1
  630. package/dist/components/RichTextInput/RichTextInputViewport.svelte.d.ts +1 -0
  631. package/dist/components/RichTextInput/richTextInput.mcp.d.ts +1 -1
  632. package/dist/components/RichTextInput/richTextInput.mcp.js +1 -0
  633. package/dist/components/RichTextInput/suggestions.js +2 -0
  634. package/dist/components/ScrollArea/ScrollArea.svelte +166 -27
  635. package/dist/components/ScrollArea/index.d.ts +2 -1
  636. package/dist/components/ScrollArea/index.js +1 -0
  637. package/dist/components/ScrollArea/scrollArea.attributes.d.ts +25 -0
  638. package/dist/components/ScrollArea/scrollArea.attributes.js +21 -0
  639. package/dist/components/ScrollArea/scrollArea.mcp.d.ts +1 -1
  640. package/dist/components/ScrollArea/scrollArea.mcp.js +47 -3
  641. package/dist/components/ScrollArea/scrollArea.props.d.ts +33 -6
  642. package/dist/components/ScrollArea/scrollArea.svelte.d.ts +56 -12
  643. package/dist/components/ScrollArea/scrollArea.svelte.js +281 -71
  644. package/dist/components/ScrollArea/scrollArea.theme.js +5 -2
  645. package/dist/components/SegmentedControl/SegmentedControl.svelte +4 -3
  646. package/dist/components/SegmentedControl/segmentedControl.mcp.d.ts +1 -1
  647. package/dist/components/SegmentedControl/segmentedControl.mcp.js +3 -2
  648. package/dist/components/SelectionMenu/SelectionMenu.svelte +4 -2
  649. package/dist/components/Sidebar/SidebarAction.svelte +13 -3
  650. package/dist/components/Sidebar/SidebarAction.svelte.d.ts +2 -1
  651. package/dist/components/Sidebar/SidebarActivityBar.svelte +14 -7
  652. package/dist/components/Sidebar/SidebarFlyout.svelte +97 -0
  653. package/dist/components/Sidebar/SidebarFlyout.svelte.d.ts +32 -0
  654. package/dist/components/Sidebar/SidebarGroup.svelte +39 -15
  655. package/dist/components/Sidebar/SidebarMenuButton.svelte +6 -3
  656. package/dist/components/Sidebar/SidebarMenuItem.svelte +134 -31
  657. package/dist/components/Sidebar/SidebarMenuSubItem.svelte +30 -14
  658. package/dist/components/Sidebar/SidebarTreeNode.svelte +41 -61
  659. package/dist/components/Sidebar/index.d.ts +1 -0
  660. package/dist/components/Sidebar/index.js +1 -0
  661. package/dist/components/Sidebar/sidebar-position.d.ts +37 -2
  662. package/dist/components/Sidebar/sidebar-position.js +31 -2
  663. package/dist/components/Sidebar/sidebar.attributes.d.ts +33 -0
  664. package/dist/components/Sidebar/sidebar.attributes.js +29 -0
  665. package/dist/components/Sidebar/sidebar.mcp.d.ts +1 -1
  666. package/dist/components/Sidebar/sidebar.mcp.js +45 -10
  667. package/dist/components/Sidebar/sidebar.props.d.ts +28 -7
  668. package/dist/components/Sidebar/sidebar.theme.d.ts +51 -21
  669. package/dist/components/Sidebar/sidebar.theme.js +113 -62
  670. package/dist/components/Sidebar/sidebar.views.svelte.js +11 -18
  671. package/dist/components/Stepper/Stepper.svelte +2 -0
  672. package/dist/components/Stepper/stepper.mcp.d.ts +1 -1
  673. package/dist/components/Stepper/stepper.mcp.js +1 -0
  674. package/dist/components/Stepper/stepper.props.d.ts +5 -0
  675. package/dist/components/Stepper/stepper.state.svelte.d.ts +2 -0
  676. package/dist/components/Stepper/stepper.state.svelte.js +31 -12
  677. package/dist/components/Tabbar/Tabbar.svelte +55 -16
  678. package/dist/components/Tabbar/index.d.ts +1 -1
  679. package/dist/components/Tabbar/tabbar.mcp.d.ts +1 -1
  680. package/dist/components/Tabbar/tabbar.mcp.js +26 -9
  681. package/dist/components/Tabbar/tabbar.props.d.ts +34 -5
  682. package/dist/components/Tabbar/tabbar.selection.svelte.d.ts +79 -0
  683. package/dist/components/Tabbar/tabbar.selection.svelte.js +99 -0
  684. package/dist/components/TableOfContents/tableOfContents.state.svelte.js +9 -7
  685. package/dist/components/Tabs/Tabs.svelte +73 -16
  686. package/dist/components/Tabs/index.d.ts +2 -1
  687. package/dist/components/Tabs/tabs.direction.svelte.d.ts +25 -0
  688. package/dist/components/Tabs/tabs.direction.svelte.js +40 -0
  689. package/dist/components/Tabs/tabs.mcp.d.ts +1 -1
  690. package/dist/components/Tabs/tabs.mcp.js +22 -4
  691. package/dist/components/Tabs/tabs.props.d.ts +39 -12
  692. package/dist/components/Tabs/tabs.theme.js +3 -1
  693. package/dist/components/Theme/Theme.svelte +44 -27
  694. package/dist/components/Theme/helper.d.ts +16 -2
  695. package/dist/components/Theme/helper.js +46 -4
  696. package/dist/components/Theme/theme.mcp.d.ts +1 -1
  697. package/dist/components/Theme/theme.mcp.js +103 -0
  698. package/dist/components/Theme/theme.props.d.ts +16 -0
  699. package/dist/components/Theme/theme.state.svelte.d.ts +14 -1
  700. package/dist/components/Theme/theme.state.svelte.js +18 -1
  701. package/dist/components/Toast/Toast.svelte +184 -39
  702. package/dist/components/Toast/Toaster.svelte +14 -10
  703. package/dist/components/Toast/index.d.ts +1 -0
  704. package/dist/components/Toast/toast.mcp.d.ts +1 -1
  705. package/dist/components/Toast/toast.mcp.js +47 -6
  706. package/dist/components/Toast/toast.state.svelte.d.ts +172 -6
  707. package/dist/components/Toast/toast.state.svelte.js +513 -68
  708. package/dist/components/Toast/toast.theme.js +1 -1
  709. package/dist/components/ToggleButton/ToggleButton.svelte +23 -1
  710. package/dist/components/ToggleButton/toggleButton.mcp.d.ts +1 -1
  711. package/dist/components/ToggleButton/toggleButton.mcp.js +3 -1
  712. package/dist/components/ToggleButton/toggleButton.props.d.ts +13 -1
  713. package/dist/components/ToggleButton/toggleButton.theme.d.ts +12 -0
  714. package/dist/components/ToggleButton/toggleButton.theme.js +15 -3
  715. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.svelte +29 -9
  716. package/dist/components/ToggleButtonGroup/index.d.ts +1 -1
  717. package/dist/components/ToggleButtonGroup/toggleButtonGroup.mcp.d.ts +1 -1
  718. package/dist/components/ToggleButtonGroup/toggleButtonGroup.mcp.js +5 -2
  719. package/dist/components/ToggleButtonGroup/toggleButtonGroup.props.d.ts +19 -1
  720. package/dist/components/ToggleButtonGroup/toggleButtonGroup.theme.d.ts +12 -0
  721. package/dist/components/ToggleButtonGroup/toggleButtonGroup.theme.js +21 -2
  722. package/dist/components/ToggleMenu/ToggleMenu.svelte +57 -43
  723. package/dist/components/ToggleMenu/ToggleMenuGroup.svelte +1 -0
  724. package/dist/components/ToggleMenu/ToggleMenuMenu.svelte +9 -3
  725. package/dist/components/ToggleMenu/ToggleMenuRadioGroup.svelte +7 -2
  726. package/dist/components/ToggleMenu/toggleMenu.mcp.d.ts +1 -1
  727. package/dist/components/ToggleMenu/toggleMenu.mcp.js +3 -2
  728. package/dist/components/ToggleMenu/toggleMenu.props.d.ts +4 -1
  729. package/dist/components/Tooltip/Tooltip.svelte +4 -12
  730. package/dist/components/Tooltip/TooltipHost.svelte +136 -15
  731. package/dist/components/Tooltip/index.d.ts +1 -0
  732. package/dist/components/Tooltip/index.js +1 -0
  733. package/dist/components/Tooltip/tooltip.attachment.svelte.d.ts +5 -0
  734. package/dist/components/Tooltip/tooltip.attachment.svelte.js +215 -33
  735. package/dist/components/Tooltip/tooltip.attributes.d.ts +32 -0
  736. package/dist/components/Tooltip/tooltip.attributes.js +28 -0
  737. package/dist/components/Tooltip/tooltip.mcp.d.ts +1 -1
  738. package/dist/components/Tooltip/tooltip.mcp.js +111 -10
  739. package/dist/components/Tooltip/tooltip.props.d.ts +33 -2
  740. package/dist/components/Tooltip/tooltip.surface.d.ts +24 -0
  741. package/dist/components/Tooltip/tooltip.surface.js +42 -0
  742. package/dist/components/Tree/TreeContextMenuSurface.svelte +16 -3
  743. package/dist/components/Utils/BeforeHydratation.svelte +14 -3
  744. package/dist/components/Utils/BeforeHydratation.svelte.d.ts +2 -0
  745. package/dist/components/VideoPlayer/VideoPlayer.svelte.d.ts +1 -1
  746. package/dist/components/VideoPlayer/VideoPlayerSettings.svelte +2 -0
  747. package/dist/generated/componentAliases.d.ts +3 -0
  748. package/dist/generated/componentAliases.js +3 -0
  749. package/dist/generated/componentContract.d.ts +79 -34
  750. package/dist/generated/componentContract.js +231 -6
  751. package/dist/generated/componentMcpRegistry.js +6 -0
  752. package/dist/i18n/ar.js +107 -3
  753. package/dist/i18n/context.svelte.d.ts +6 -0
  754. package/dist/i18n/context.svelte.js +12 -0
  755. package/dist/i18n/de.js +101 -3
  756. package/dist/i18n/en.d.ts +91 -2
  757. package/dist/i18n/en.js +101 -3
  758. package/dist/i18n/es.js +101 -3
  759. package/dist/i18n/fr.js +101 -3
  760. package/dist/i18n/ja.js +101 -3
  761. package/dist/i18n/pt.js +101 -3
  762. package/dist/i18n/zh.js +101 -3
  763. package/dist/tailwind/geometry.js +7 -0
  764. package/dist/tailwind/global.js +31 -0
  765. package/dist/types/index.d.ts +1 -0
  766. package/dist/types/types.mcp.d.ts +1 -1
  767. package/dist/types/types.mcp.js +23 -0
  768. package/dist/utils/cspNonce.d.ts +16 -0
  769. package/dist/utils/cspNonce.js +39 -0
  770. package/dist/utils/cva/merge.d.ts +5 -1
  771. package/dist/utils/cva/merge.js +6 -4
  772. package/dist/utils/focus.d.ts +34 -0
  773. package/dist/utils/focus.js +93 -0
  774. package/dist/utils/focusHistory.d.ts +21 -0
  775. package/dist/utils/focusHistory.js +99 -0
  776. package/dist/utils/handlers.d.ts +7 -0
  777. package/dist/utils/handlers.js +14 -0
  778. package/dist/utils/hoverIntent.d.ts +42 -0
  779. package/dist/utils/hoverIntent.js +57 -0
  780. package/dist/utils/id.d.ts +7 -0
  781. package/dist/utils/id.js +15 -0
  782. package/dist/utils/layers.svelte.d.ts +32 -4
  783. package/dist/utils/layers.svelte.js +214 -21
  784. package/dist/utils/listFilter.d.ts +44 -0
  785. package/dist/utils/listFilter.js +130 -0
  786. package/dist/utils/match.d.ts +35 -0
  787. package/dist/utils/match.js +36 -0
  788. package/dist/utils/number.d.ts +126 -0
  789. package/dist/utils/number.js +401 -0
  790. package/dist/utils/openChange.d.ts +88 -0
  791. package/dist/utils/openChange.js +71 -0
  792. package/dist/utils/openLifecycle.svelte.d.ts +41 -0
  793. package/dist/utils/openLifecycle.svelte.js +134 -0
  794. package/dist/utils/pointerDrag.d.ts +10 -0
  795. package/dist/utils/pointerDrag.js +37 -2
  796. package/dist/utils/pragmaticDragAndDrop.d.ts +2 -1
  797. package/dist/utils/pragmaticDragAndDrop.js +8 -3
  798. package/dist/utils/range.d.ts +62 -0
  799. package/dist/utils/range.js +70 -0
  800. package/dist/utils/requestNativeSubmit.d.ts +17 -0
  801. package/dist/utils/requestNativeSubmit.js +47 -0
  802. package/dist/utils/safeArea.svelte.d.ts +10 -1
  803. package/dist/utils/safeArea.svelte.js +19 -11
  804. package/dist/utils/stateAttributes.d.ts +108 -0
  805. package/dist/utils/stateAttributes.js +78 -0
  806. package/dist/utils/swipeVelocity.d.ts +32 -0
  807. package/dist/utils/swipeVelocity.js +59 -0
  808. package/dist/utils/timer.svelte.d.ts +65 -2
  809. package/dist/utils/timer.svelte.js +159 -25
  810. package/dist/utils/trigger.d.ts +41 -0
  811. package/dist/utils/trigger.js +103 -0
  812. package/dist/utils/typeahead.d.ts +9 -0
  813. package/dist/utils/typeahead.js +21 -9
  814. package/dist/utils/useDndList.svelte.d.ts +1 -1
  815. package/dist/utils/useDndList.svelte.js +6 -23
  816. package/dist/utils/useFocusScope.svelte.d.ts +29 -0
  817. package/dist/utils/useFocusScope.svelte.js +189 -27
  818. package/dist/utils/useHoverAction.svelte.d.ts +44 -4
  819. package/dist/utils/useHoverAction.svelte.js +161 -51
  820. package/dist/utils/useKeyDown.svelte.d.ts +19 -2
  821. package/dist/utils/useKeyDown.svelte.js +19 -12
  822. package/dist/utils/useListNavigation.svelte.d.ts +94 -13
  823. package/dist/utils/useListNavigation.svelte.js +261 -35
  824. package/dist/utils/useLiveAnnouncer.svelte.d.ts +77 -2
  825. package/dist/utils/useLiveAnnouncer.svelte.js +119 -2
  826. package/dist/utils/useNavigation.svelte.d.ts +36 -3
  827. package/dist/utils/useNavigation.svelte.js +699 -332
  828. package/dist/utils/usePressAndHold.svelte.d.ts +38 -0
  829. package/dist/utils/usePressAndHold.svelte.js +191 -0
  830. package/dist/utils/useScrollLock.svelte.d.ts +20 -1
  831. package/dist/utils/useScrollLock.svelte.js +54 -13
  832. package/dist/utils/useSlidingIndicator.svelte.d.ts +2 -0
  833. package/dist/utils/useSlidingIndicator.svelte.js +27 -5
  834. package/dist/utils/useTabBridge.svelte.d.ts +20 -0
  835. package/dist/utils/useTabBridge.svelte.js +109 -0
  836. package/dist/utils/values.d.ts +15 -0
  837. package/dist/utils/values.js +49 -0
  838. package/package.json +31 -2
  839. package/dist/generated/componentMcpRegistry.d.ts +0 -142
  840. package/dist/utils/useDrag.svelte.d.ts +0 -11
  841. package/dist/utils/useDrag.svelte.js +0 -55
@@ -0,0 +1,187 @@
1
+ <script lang="ts" generics="T extends FieldType">
2
+ import { DEV } from 'esm-env';
3
+ import { tick } from 'svelte';
4
+ import type { Attachment } from 'svelte/attachments';
5
+ import { useI18n } from '../../../i18n/context.svelte.js';
6
+ import { getFirstTabbable } from '../../../utils/focus.js';
7
+ import { createListFilter } from '../../../utils/listFilter.js';
8
+ import type { FieldType, FieldValue } from './field.js';
9
+ import { getFieldFormAttribute } from './fieldNativeForm.svelte.js';
10
+ import type { FieldHiddenInputsProps } from './fieldHiddenInputs.props.js';
11
+
12
+ let {
13
+ field,
14
+ value,
15
+ checked,
16
+ name,
17
+ required,
18
+ disabled,
19
+ form,
20
+ id,
21
+ autocomplete,
22
+ options,
23
+ onAutofill,
24
+ readOnly
25
+ }: FieldHiddenInputsProps<T> = $props();
26
+
27
+ const t = $derived(useI18n());
28
+
29
+ // FieldState names an unnamed field `${type}-input-${id}` so Form wiring stays unique. Only a
30
+ // name the app gave, directly or through Form, is submitted, as for a native control.
31
+ const submittedName = $derived(
32
+ name ?? (field.name === `${field.type}-input-${field.id}` ? undefined : field.name)
33
+ );
34
+ const isRequired = $derived(Boolean(required ?? field.required));
35
+ const isDisabled = $derived(Boolean(disabled ?? field.disabled));
36
+ const isReadOnly = $derived(Boolean(readOnly ?? field.readOnly));
37
+ const formId = $derived(form ?? getFieldFormAttribute(field));
38
+ const reportId = $derived(id ?? `${field.id}-input`);
39
+ const values = $derived(
40
+ (Array.isArray(value) ? value : value == null ? [] : [value]).map((entry) => String(entry))
41
+ );
42
+ const mode = $derived(
43
+ checked !== undefined ? 'checked' : autocomplete ? 'autofill' : ('values' as const)
44
+ );
45
+ const isEmpty = $derived(mode === 'checked' ? !checked : values.every((entry) => entry === ''));
46
+ // What the browser treats as a missing value, and so a blocked submit.
47
+ const isMissing = $derived(isRequired && !isDisabled && isEmpty);
48
+
49
+ const focusControl = () => {
50
+ const control = field.node?.isConnected ? field.node : null;
51
+ (control ?? (field.rootNode && getFirstTabbable(field.rootNode)))?.focus();
52
+ };
53
+
54
+ // A blocked native submit (or reportValidity) focuses the first invalid control. When that is
55
+ // one of these inputs, the report belongs to the field: it shows its own error and its control
56
+ // takes focus. Firefox hides its bubble when the reported input loses focus, which only works
57
+ // once its focus has settled, so the hand-off waits a task. A silent checkValidity() focuses
58
+ // nothing, so it changes nothing here.
59
+ const handOffReport = (event: FocusEvent & { currentTarget: HTMLInputElement }) => {
60
+ const input = event.currentTarget;
61
+ field.validate();
62
+ setTimeout(() => {
63
+ if (input.ownerDocument.activeElement === input) focusControl();
64
+ });
65
+ };
66
+
67
+ // While a value is missing, the reportable input also carries a blank custom error. Chromium
68
+ // and WebKit trim the message before showing their bubble, so a blank one shows nothing over
69
+ // the field's own error, and the constraint never lapses: every submit stays blocked.
70
+ const blankNativeReport: Attachment<HTMLInputElement> = (input) => {
71
+ input.setCustomValidity(isMissing ? ' ' : '');
72
+ };
73
+
74
+ // The inputs sit beside the control: a button may not contain interactive content, and a
75
+ // click on an input inside it reaches the button as a second activation.
76
+ const besideControl: Attachment<HTMLInputElement> = (input) => {
77
+ if (DEV && input.parentElement?.closest('button')) {
78
+ console.warn(
79
+ 'FieldHiddenInputs is rendered inside a <button>. Render it beside the control instead.'
80
+ );
81
+ }
82
+ };
83
+
84
+ // The checkbox only mirrors the field: a change that reaches it directly is undone.
85
+ const keepChecked = (event: Event & { currentTarget: HTMLInputElement }) => {
86
+ event.currentTarget.checked = Boolean(checked);
87
+ };
88
+
89
+ const matchOption = (text: string): string | undefined => {
90
+ if (!options) return text;
91
+ const byValue = options.find((option) => option.value === text);
92
+ if (byValue) return byValue.value;
93
+ const byLabel = options.find((option) => option.label === text);
94
+ if (byLabel) return byLabel.value;
95
+ const filter = createListFilter({ locale: t.locale });
96
+ return options.find((option) => option.label !== undefined && filter.equals(option.label, text))
97
+ ?.value;
98
+ };
99
+
100
+ // The browser fills the text it knows (often a label such as "Canada"); it becomes the field's
101
+ // value only when it names an option. Afterwards the input shows the field's value again,
102
+ // whatever was typed into it.
103
+ const applyAutofill = async (event: Event & { currentTarget: HTMLInputElement }) => {
104
+ const input = event.currentTarget;
105
+ const text = input.value.trim();
106
+ if (text && text !== values[0] && !isDisabled && !isReadOnly) {
107
+ const match = matchOption(text);
108
+ if (match !== undefined) {
109
+ if (onAutofill) onAutofill(match);
110
+ // Autofill is offered to single-value text fields, whose value is the option value.
111
+ else field.setValue(match as FieldValue<T>);
112
+ }
113
+ }
114
+ await tick();
115
+ input.value = values[0] ?? '';
116
+ };
117
+ </script>
118
+
119
+ {#if mode === 'checked'}
120
+ <input
121
+ type="checkbox"
122
+ id={reportId}
123
+ name={submittedName}
124
+ value={values[0] ?? 'on'}
125
+ {checked}
126
+ required={isRequired}
127
+ disabled={isDisabled}
128
+ form={formId}
129
+ tabindex={-1}
130
+ aria-hidden="true"
131
+ class="sr-only"
132
+ data-field-hidden-input=""
133
+ onchange={keepChecked}
134
+ onfocus={handOffReport}
135
+ {@attach blankNativeReport}
136
+ {@attach besideControl}
137
+ />
138
+ {:else if mode === 'autofill'}
139
+ <input
140
+ type="text"
141
+ id={reportId}
142
+ name={submittedName}
143
+ value={values[0] ?? ''}
144
+ {autocomplete}
145
+ required={isRequired}
146
+ disabled={isDisabled}
147
+ form={formId}
148
+ tabindex={-1}
149
+ aria-hidden="true"
150
+ class="sr-only"
151
+ data-field-hidden-input=""
152
+ oninput={applyAutofill}
153
+ onchange={applyAutofill}
154
+ onfocus={handOffReport}
155
+ {@attach blankNativeReport}
156
+ {@attach besideControl}
157
+ />
158
+ {:else}
159
+ {#each values as entry, index (index)}
160
+ <input
161
+ type="hidden"
162
+ name={submittedName}
163
+ value={entry}
164
+ disabled={isDisabled}
165
+ form={formId}
166
+ data-field-hidden-input=""
167
+ />
168
+ {/each}
169
+ {#if isMissing}
170
+ <!-- Submits nothing (no name): it only stands for the missing value, so the browser blocks
171
+ the submit and reports it. -->
172
+ <input
173
+ id={reportId}
174
+ value=""
175
+ autocomplete="off"
176
+ required
177
+ form={formId}
178
+ tabindex={-1}
179
+ aria-hidden="true"
180
+ class="sr-only"
181
+ data-field-hidden-input=""
182
+ onfocus={handOffReport}
183
+ {@attach blankNativeReport}
184
+ {@attach besideControl}
185
+ />
186
+ {/if}
187
+ {/if}
@@ -0,0 +1,26 @@
1
+ import type { FieldType } from './field.js';
2
+ import type { FieldHiddenInputsProps } from './fieldHiddenInputs.props.js';
3
+ declare function $$render<T extends FieldType>(): {
4
+ props: FieldHiddenInputsProps<T>;
5
+ exports: {};
6
+ bindings: "";
7
+ slots: {};
8
+ events: {};
9
+ };
10
+ declare class __sveltets_Render<T extends FieldType> {
11
+ props(): ReturnType<typeof $$render<T>>['props'];
12
+ events(): ReturnType<typeof $$render<T>>['events'];
13
+ slots(): ReturnType<typeof $$render<T>>['slots'];
14
+ bindings(): "";
15
+ exports(): {};
16
+ }
17
+ interface $$IsomorphicComponent {
18
+ new <T extends FieldType>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
19
+ $$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
20
+ } & ReturnType<__sveltets_Render<T>['exports']>;
21
+ <T extends FieldType>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
22
+ z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
23
+ }
24
+ declare const FieldHiddenInputs: $$IsomorphicComponent;
25
+ type FieldHiddenInputs<T extends FieldType> = InstanceType<typeof FieldHiddenInputs<T>>;
26
+ export default FieldHiddenInputs;
@@ -1,9 +1,12 @@
1
1
  import type { WithSlot } from '../../Slot/slot.js';
2
2
  import type { Snippet } from 'svelte';
3
- import type { HTMLAttributes } from 'svelte/elements';
4
- import type { FieldState } from './field.state.svelte.js';
3
+ import type { Attachment } from 'svelte/attachments';
4
+ import type { HTMLAttributes, HTMLButtonAttributes } from 'svelte/elements';
5
+ import type { FieldState, FieldValidatorResult, ValidationMode } from './field.state.svelte.js';
6
+ import type { FieldMessageOverrides } from './field.messages.js';
5
7
  import type { FieldThemeProps } from './field.theme.js';
6
8
  import type { Density, Sizes } from '../../../types/theme.js';
9
+ import type { FormInputRegistry } from '../Form/form.js';
7
10
  export type KeyValuePair = {
8
11
  key: string;
9
12
  value: string;
@@ -22,21 +25,50 @@ export type DateInputType = 'datetime' | 'date';
22
25
  export type TimeInputType = 'time';
23
26
  export type BooleanInputType = 'switch' | 'checkbox';
24
27
  export type SingleOptionInputType = 'select' | 'radio' | 'combobox';
25
- export type MultipleChoiceInputType = 'checkboxes';
28
+ export type MultipleChoiceInputType = 'checkboxes' | 'select-multiple';
26
29
  export type FileInputType = 'file' | 'files';
27
30
  export type CalendarInputType = 'calendar' | 'calendar-range';
28
31
  export type ColorInputType = 'color';
29
32
  export type FieldLabelPosition = 'top' | 'left';
30
33
  export type FieldAttributes = Omit<HTMLAttributes<HTMLElement>, 'class' | 'id'>;
34
+ /**
35
+ * Native attributes a button-rooted control (Checkbox, Switch) accepts through `inputAttrs`, such
36
+ * as `aria-label`, `aria-describedby`, `title`, `data-*` and event handlers. The control keeps its
37
+ * identity, role, state and form attributes. An `aria-label` here names the control instead of the
38
+ * field label.
39
+ */
40
+ export type FieldButtonAttributes = Omit<HTMLButtonAttributes, 'class' | 'disabled' | 'form' | 'id' | 'name' | 'role' | 'type' | 'value' | 'aria-checked' | 'aria-disabled' | 'aria-readonly' | 'aria-required'>;
31
41
  export type InputType = FileInputType | SliderRangeInputType | DateInputType | ColorInputType | NumberInputType | RatingInputType | VoiceInputType | TimeInputType | TextInputType | RichTextInputType | BooleanInputType | MultipleChoiceInputType | TagInputType | TagGroupInputType | KeyValueInputType | PinInputType | SingleOptionInputType | CalendarInputType;
32
- export type FieldValue<T extends InputType> = T extends 'file' ? File : T extends 'files' ? File[] : T extends DateInputType ? Date : T extends SliderRangeInputType ? number[] : T extends NumberInputType ? number : T extends RatingInputType ? number : T extends VoiceInputType ? Blob : T extends TimeInputType ? number : T extends TextInputType ? string : T extends RichTextInputType ? string : T extends PinInputType ? string : T extends BooleanInputType ? boolean : T extends MultipleChoiceInputType ? string[] : T extends TagInputType ? string[] : T extends TagGroupInputType ? string | string[] | null : T extends KeyValueInputType ? KeyValuePair[] : T extends SingleOptionInputType ? string : T extends 'calendar' ? Date : T extends 'calendar-range' ? [Date | null, Date | null] : T extends ColorInputType ? string : never;
33
- export type InputProps<T extends InputType> = WithSlot<{
42
+ /** Input types an app registered: the keys of its `FormInputRegistry` augmentation. */
43
+ export type RegisteredInputType = Extract<keyof FormInputRegistry, string>;
44
+ /** Every type a field can carry: the built-in inputs and the ones an app registered. */
45
+ export type FieldType = InputType | RegisteredInputType;
46
+ type RegisteredInputValue<T extends RegisteredInputType> = FormInputRegistry[T] extends {
47
+ value: infer Value;
48
+ } ? Value : unknown;
49
+ export type FieldValue<T extends FieldType> = T extends RegisteredInputType ? RegisteredInputValue<T> : T extends 'file' ? File : T extends 'files' ? File[] : T extends DateInputType ? Date : T extends SliderRangeInputType ? number[] : T extends NumberInputType ? number : T extends RatingInputType ? number : T extends VoiceInputType ? Blob : T extends TimeInputType ? number : T extends TextInputType ? string : T extends RichTextInputType ? string : T extends PinInputType ? string : T extends BooleanInputType ? boolean : T extends MultipleChoiceInputType ? string[] : T extends TagInputType ? string[] : T extends TagGroupInputType ? string | string[] | null : T extends KeyValueInputType ? KeyValuePair[] : T extends SingleOptionInputType ? string : T extends 'calendar' ? Date : T extends 'calendar-range' ? [Date | null, Date | null] : T extends ColorInputType ? string : never;
50
+ export type InputProps<T extends FieldType> = WithSlot<{
34
51
  /** Form field name, used as the key when the input is part of a Form. */
35
52
  name?: string;
36
53
  /** Marks the field as required for validation and shows the required indicator. */
37
54
  required?: boolean;
38
- /** Disables the input, preventing interaction and focus. */
55
+ /**
56
+ * Disables the input, preventing interaction and focus. A disabled Form, FormGroup or
57
+ * fieldset Field around the input disables it too; disabled fields skip validation.
58
+ */
39
59
  disabled?: boolean;
60
+ /**
61
+ * Shows the value without letting the user change it: the control stays focusable and is
62
+ * announced as read-only, and the value still validates and submits. A read-only Form or
63
+ * FormGroup around the input makes it read-only too.
64
+ */
65
+ readOnly?: boolean;
66
+ /**
67
+ * Id of the native `<form>` the field submits with when it is rendered outside that form,
68
+ * like the HTML `form` attribute. The field's native controls and hidden inputs join that
69
+ * form, and its reset returns the field to its initial value.
70
+ */
71
+ form?: string;
40
72
  /** Geometry and typography of the field control and label. */
41
73
  size?: Sizes;
42
74
  /** Internal spacing between field regions, labels, and adornments. */
@@ -45,8 +77,31 @@ export type InputProps<T extends InputType> = WithSlot<{
45
77
  labelPosition?: FieldLabelPosition;
46
78
  /** Whether the field is rendered; when false the field is hidden from the form. */
47
79
  visible?: boolean;
48
- /** Validates the value; messages or true mark it invalid, false/null/undefined accept it. */
49
- onValidate?: (value: FieldValue<T>) => string | string[] | boolean | null | undefined;
80
+ /**
81
+ * Validates the value; messages or true mark it invalid, false/null/undefined accept it.
82
+ * It may return a promise: the field reads as neither valid nor invalid while the promise
83
+ * is pending, submit waits for it, and a result for an older value is dropped. A rejected
84
+ * promise marks the field invalid with the generic message.
85
+ */
86
+ onValidate?: (value: FieldValue<T>) => FieldValidatorResult;
87
+ /**
88
+ * When the field validates by itself, overriding the Form's `validationMode`: `'submit'`
89
+ * (the default) waits for the first submit attempt and then re-validates every edit,
90
+ * `'blur'` validates when focus leaves the field, `'change'` validates on every change.
91
+ * A field that shows an error always re-validates as it is edited.
92
+ */
93
+ validationMode?: ValidationMode;
94
+ /**
95
+ * Milliseconds an edit waits before the validation it triggers runs, so an async
96
+ * `onValidate` is not called on every keystroke. Submit and blur validate at once.
97
+ */
98
+ validationDebounce?: number;
99
+ /**
100
+ * Replaces catalog validation messages for this field: a string, or a function for the
101
+ * messages that receive a limit, as in `{ required: 'Enter your name' }` or
102
+ * `{ tooShort: (min) => 'Use ' + min + ' characters or more' }`.
103
+ */
104
+ messages?: FieldMessageOverrides;
50
105
  /** Called whenever the field value changes. */
51
106
  onValueChange?: (value: FieldValue<T> | null) => void;
52
107
  /** Native attributes applied to the Field wrapper. */
@@ -61,12 +116,21 @@ export type InputProps<T extends InputType> = WithSlot<{
61
116
  defaultValue?: FieldValue<T> | null;
62
117
  /** Validation errors to display; `true` marks the field as errored without a message. */
63
118
  errors?: string[] | boolean;
64
- /** Whether the field currently holds focus, bindable with `bind:focused`. */
119
+ /**
120
+ * Whether focus is inside the field, including popups it opened, bindable with
121
+ * `bind:focused`.
122
+ */
65
123
  focused?: boolean;
66
124
  }, 'header' | 'label' | 'suffix' | 'prefix' | 'actions' | 'description' | 'helper' | 'footer' | 'error' | 'errorsContainer'>;
67
- export type FieldProps<T extends InputType> = Omit<InputProps<T>, 'type' | 'name' | 'required' | 'disabled' | 'visible' | 'onValidate' | 'onValueChange' | 'defaultValue' | 'value' | 'errors' | 'focused'> & {
125
+ export type FieldProps<T extends FieldType> = Omit<InputProps<T>, 'type' | 'name' | 'required' | 'disabled' | 'readOnly' | 'messages' | 'visible' | 'onValidate' | 'onValueChange' | 'defaultValue' | 'value' | 'errors' | 'focused'> & {
68
126
  /** Native wrapper element; use fieldset for a group of controls. */
69
127
  as?: string;
128
+ /**
129
+ * Attachment applied to the input container, the visible box, rather than the field root
130
+ * (which also holds the label and description). Pass a popover's `reference` here so its panel
131
+ * opens against the box, not below the description.
132
+ */
133
+ anchor?: Attachment<HTMLElement>;
70
134
  /** Control ID associated with the label, or false for an aria-labelledby label. */
71
135
  labelFor?: string | false;
72
136
  /** Custom control content composed with the shared field controller. */
@@ -76,3 +140,4 @@ export type FieldProps<T extends InputType> = Omit<InputProps<T>, 'type' | 'name
76
140
  };
77
141
  export declare const fieldStructure = "\n<Field>\n\t<Header>\n\t\t<Label />\n\t\t<Actions />\n\t</Header>\n\t<InputContainer>\n\t\t<Prefix />\n\t\t<Input />\n\t\t<Suffix />\n\t</InputContainer>\n\t<Footer>\n\t\t<Description />\n\t\t<Helper />\n\t</Footer>\n <ErrorsContainer>\n <Error />\n </ErrorsContainer>\n</Field>\n";
78
142
  export declare const llmDescription = "\nThe field component is a versatile wrapper component for form inputs.\nThe field component is used to wrap form inputs and provide a consistent look and feel.\nIt's also used to provide a consistent way to handle errors and validation.\nUse it directly with createFieldState for standalone custom controls, or use a Form\ntype: 'field' entry to receive a registered controller in a snippet.\n\nThe field component is composed of the following parts:\n- Header\n- InputContainer\n- Footer\n- ErrorsContainer\n- Error\n- Description\n- Helper\n\nTo customize the field component, you can use the following snippets:\n\n- header: it is the wrapper for the label and actions.\n- label: it is the label for the field.\n- actions: it is the actions for the field.\n- footer: it is the wrapper for the description and helper.\n- errorsContainer: it is the wrapper for the error.\n- error: it is the error for the field.\n- description: it is the description for the field.\n- helper: it is the helper for the field.\n\nCompose snippets with the field controller captured in the parent component.\n\n";
143
+ export {};
@@ -1 +1 @@
1
- export declare const fieldDescription = "\n# Field\n\nImport Field, createFieldState, and the FieldState type from entasis/field. Field is the shared\nvalidation and accessibility owner used by Entasis form controls. It renders field structure\naround a custom control and does not create another form or validation system.\n\n## Controller\n\ncreateFieldState receives id, type, value, errors, and focused. Use getter/setter properties\nfor values bound to component props; plain initial values also work for standalone controls.\nOptional name, required, disabled, visible, size, density, onValidate, and onValueChange\nconfigure the same owner used by built-in controls.\n\nThe controller exposes value, setValue(value), validate(), checkSchema(value), isValid,\nerrors, errorMessages, hasError, focused, disabled, required, size, and density.\nUse bind:value on field.value or call field.setValue for user edits. Accepted changes publish\none onValueChange callback each. Unchanged values and parent state synchronization do not\npublish callbacks. Disabled controllers reject user edits.\n\nSpread field.controlAttrs on the native control and attach field.control to register its node.\nThe attributes provide id, name, disabled, required, aria-invalid, and aria-describedby.\nThe controller exposes id, labelId, and errorId for more specialized controls. Field connects\nits label and error messages to this control, preserving unrelated accessible descriptions.\n\nfieldSchemas exports the built-in optional and required schemas. onValidate supplements that\nschema: a message, message array, or true means invalid; false, null, or undefined means valid.\nOptional empty values skip custom validation. validate returns a tuple containing the error\nflag and schema-normalized value.\n\n## Wrapper props\n\n- field: the shared FieldState controller.\n- children: custom control content.\n- as: native wrapper element; defaults to div. Use fieldset for grouped controls.\n- labelFor: associated control ID, or false for aria-labelledby; defaults to field.id.\n- size: small, normal, or large control geometry and label typography.\n- density: compact, normal, or comfortable internal spacing, independent of size.\n- labelPosition: top or left; left switches to side labels once the field itself is at least 32rem wide (a container query on the field, not the viewport).\n- fieldAttrs: native attributes for the wrapper. Put native control attributes on the control.\n- class and theme: wrapper classes and Field part overrides.\n\nSlots include header, label, actions, prefix, suffix, footer, description, helper,\nerrorsContainer, and error. Field renders required indicators and validation errors.\n\n## Form participation\n\nA Form input with type: 'field' supplies fieldType and a snippet accepting FieldState<fieldType>.\nThe entry inherits InputProps, including defaultValue, required, disabled, size, density,\nonValidate, and onValueChange. The controller receives the resolved Form size and density.\nIts value participates in inferred values, validation, submission, and Form bind:value.\nThe existing type: 'custom' entry remains display-only and contributes no value key.\n";
1
+ export declare const fieldDescription = "\n# Field\n\nImport Field, FieldHiddenInputs, createFieldState, and the FieldState type from entasis/field. Field is the shared\nvalidation and accessibility owner used by Entasis form controls. It renders field structure\naround a custom control and does not create another form or validation system.\n\n## Controller\n\ncreateFieldState receives id, type, value, errors, and focused. Use getter/setter properties\nfor values bound to component props; plain initial values also work for standalone controls.\nOptional name, required, disabled, readOnly, visible, size, density, messages, minLength,\nmaxLength, onValidate, validationMode, validationDebounce, and onValueChange configure the same\nowner used by built-in controls.\n\nThe controller exposes value, setValue(value), validate(), checkSchema(value), isValid,\nerrors, errorMessages, hasError, hasValidationError, focused, touched, dirty, filled,\ninitialValue, reset(value?), focusControl(), validating, validateAsync(), settle(),\nexternalErrors, setExternalErrors(messages), clearExternalErrors(), disabled, readOnly,\nrequired, messages, size, and density.\nUse bind:value on field.value or call field.setValue for user edits. Accepted changes publish\none onValueChange callback each. Unchanged values and parent state synchronization do not\npublish callbacks. Disabled and read-only controllers reject user edits.\n\nSpread field.controlAttrs on the native control and attach field.control to register its node.\nThe attributes provide id, name, disabled, required, readonly, aria-invalid, and\naria-describedby. The controller exposes id, labelId, descriptionId, helperId, errorId, and\ndescribedBy for more specialized controls. Field connects its label, description, helper text\nand error messages to this control, preserving the app's own accessible descriptions: the\ncontrol's aria-describedby lists the app's ids, then the description, the helper, and the\nerrors last. Errors render in one role=\"alert\" container.\n\n## Disabled and read-only\n\ndisabled and readOnly are effective states: a field is disabled when it is, or when a disabled\nForm, a disabled FormGroup, or a Field rendered as=\"fieldset\" around it is; read-only works the\nsame way. A disabled field rejects edits and skips validation (errors an app set on it stay\nvisible). A read-only field stays focusable, rejects user edits, and still validates and\nsubmits. Field marks a read-only native text input or textarea with the readonly attribute, and\na role-based control (checkbox, switch, slider, combobox, radiogroup, listbox, spinbutton,\ntextbox) with aria-readonly. RatingInput's readonly prop is a deprecated alias of readOnly.\n\n## Validation messages\n\nEvery validation message a user sees comes from the i18n catalog in the active locale, never\nfrom the validation library. An empty required field shows one required message; a required\ncheckbox or switch says it must be on. Email and URL failures, text shorter than minLength or\nlonger than maxLength, values below or above a range, and incomplete codes each have their own\nmessage. true from onValidate shows the catalog's invalid message; strings from onValidate are\nshown verbatim.\n\nmessages overrides any of them per field: required, invalid, email, url, tooShort(min),\ntooLong(max), rangeUnderflow(min), rangeOverflow(max), and incomplete(length). Each is a\nstring, or a function receiving the limit for the parameterized ones. field.messages holds the\nresolved messages, for custom rules that report a range or length:\n\n```svelte\n<script lang=\"ts\">\n\timport { createFieldState } from 'entasis/field';\n\n\tconst field = createFieldState({\n\t\tid: 'nickname',\n\t\ttype: 'text',\n\t\trequired: true,\n\t\tminLength: 3,\n\t\tmessages: { required: 'Pick a nickname', tooShort: (min) => 'Use ' + min + ' letters or more' },\n\t\tvalue: '',\n\t\terrors: [],\n\t\tfocused: false\n\t});\n</script>\n```\n\n## Validation timing, async validators and external errors\n\nvalidationMode picks when the field validates by itself: submit (the default, from the Form)\nvalidates on a submit attempt and then re-validates each edit, blur when focus leaves the field,\nchange on every accepted change. A field showing an error always re-validates as it is edited,\nand mounting never validates. validationDebounce (milliseconds) delays the validation an edit\ntriggers. Both can be set on the Form, on an entry, or as Field props that controls forward.\n\nonValidate may return a promise. While it is pending the field is neither valid nor invalid\n(no aria-invalid, no data-invalid, data-validating on the root) and validating is true; a\nresult for an older value is dropped, a rejection marks the field invalid with the generic\nmessage, and unmounting cancels it. validate() stays synchronous; validateAsync() and settle()\nwait for pending validators.\n\nsetExternalErrors(messages) shows errors an app got from outside, such as a server response.\nerrorMessages lists the validation errors first, then these. validate() leaves them alone and\nthey do not count as hasValidationError, so they never block a submit; they clear on the\nfield's next accepted value change, reset(), or clearExternalErrors().\n\n## Interaction state\n\nFocus is tracked on the Field root, so every control reports it, including those with several\nfocusable parts: focused is true while focus is anywhere in the field or in a popup the field\nopened (a listbox, a date picker), and becomes false when focus leaves both. Leaving sets\ntouched. focused also clears when the focused control becomes disabled or leaves the document,\nwhere Chromium sends no blur.\n\ndirty is true while the value differs from initialValue, the first settled value; null, an\nempty string and an empty array count as equal, Dates compare by time, arrays and plain objects\nby content. filled is true while the field holds a value (a checked checkbox or switch; a\nregistered type's isEmpty decides for app-defined types). reset(value?) restores the initial\nvalue, or a new one, as the untouched baseline without a value callback, and clears errors and\nany pending validation.\n\nThe Field root carries data-invalid, data-disabled, data-readonly, data-focused, data-filled,\ndata-dirty, data-touched, and data-validating as presence attributes for styling, next to\ndata-label-position. A new error fades and grows in under the Theme's motion tokens; reduced\nmotion plays nothing.\n\n## Wrapper props\n\n- field: the shared FieldState controller.\n- children: custom control content.\n- as: native wrapper element; defaults to div. Use fieldset for grouped controls; a fieldset\n Field renders disabled when the field is and shares its disabled and read-only state with\n fields inside it.\n- labelFor: associated control ID, or false for aria-labelledby; defaults to field.id. A\n labelFor={false} label focuses the control when clicked, without toggling or opening it. An\n aria-label on the control names it instead, so the label is not linked.\n- size: small, normal, or large control geometry and label typography.\n- density: compact, normal, or comfortable internal spacing, independent of size.\n- labelPosition: top or left; left switches to side labels once the field itself is at least 32rem wide (a container query on the field, not the viewport).\n- fieldAttrs: native attributes for the wrapper. Put native control attributes on the control.\n- anchor: an attachment applied to the input box rather than the wrapper. Pass a popover's\n `reference` here so its panel opens against the box, not below the description.\n- class and theme: wrapper classes and Field part overrides.\n\nSlots include header, label, actions, prefix, suffix, footer, description, helper,\nerrorsContainer, and error. Field renders required indicators and validation errors. A press on\nthe input container around a text control (its padding, an icon, a chip) focuses the control;\nbuttons and other controls inside keep their own behaviour.\n\nRequired role-based controls (checkbox, switch, radiogroup, slider, combobox) receive\naria-required from Field; native inputs keep their required attribute. Button-rooted controls\n(Checkbox, Switch) accept inputAttrs typed as FieldButtonAttributes.\n\n## Native forms\n\nEvery Field control also works inside a plain <form>, such as a SvelteKit form action.\n\n- form: the id of the native form a field submits with when it is rendered outside that form,\n like the HTML form attribute. Every input prop type accepts it; Field gives it to the field's\n native controls and hidden inputs.\n- Reset: a native reset of the field's form (a type=\"reset\" button or form.reset()) returns the\n field to the value it mounted with, clears its errors, and publishes one onValueChange. A reset\n that another listener cancels changes nothing. Disabled and read-only fields keep their value.\n\nFieldHiddenInputs renders the inputs a custom control submits through, beside the control and\nnever inside a button. Pass the field, plus value (a string or number for one input, an array for\none input per entry, null for none) or checked (one checkbox submitting value, default \"on\", only\nwhile checked). name, required, disabled and form default to the field's; a generated field name\nis never submitted. A required, empty field blocks the native submit: the browser's report moves\nto the field's control, which shows the field's own error instead of the browser bubble.\nautocomplete renders the single value as a text input the browser can autofill; the filled text\nis matched against options (by value, then label, then label ignoring case and accents) and\ncommitted with field.setValue, or handed to onAutofill. Read-only and disabled fields ignore\nautofill.\n\n```svelte\n<script lang=\"ts\">\n\timport { Field, FieldHiddenInputs, createFieldState } from 'entasis/field';\n\n\tconst plans = ['free', 'pro'];\n\tconst field = createFieldState({\n\t\tid: 'plan',\n\t\ttype: 'select',\n\t\tname: 'plan',\n\t\tvalue: 'free',\n\t\terrors: [],\n\t\tfocused: false\n\t});\n\tconst nextPlan = () => plans[(plans.indexOf(field.value ?? '') + 1) % plans.length];\n</script>\n\n<Field {field} label=\"Plan\" labelFor={false}>\n\t<button type=\"button\" {@attach field.control} onclick={() => field.setValue(nextPlan())}>\n\t\t{field.value}\n\t</button>\n\t<FieldHiddenInputs {field} value={field.value} />\n</Field>\n```\n\n## Form participation\n\nA Form input with type: 'field' supplies fieldType and a snippet accepting FieldState<fieldType>.\nThe entry inherits InputProps, including defaultValue, required, disabled, readOnly, messages,\nsize, density, onValidate, and onValueChange. The controller receives the resolved Form size and\ndensity. Its value participates in inferred values, validation, submission, and Form bind:value.\nThe existing type: 'custom' entry remains display-only and contributes no value key.\n";
@@ -1,7 +1,7 @@
1
1
  export const fieldDescription = `
2
2
  # Field
3
3
 
4
- Import Field, createFieldState, and the FieldState type from entasis/field. Field is the shared
4
+ Import Field, FieldHiddenInputs, createFieldState, and the FieldState type from entasis/field. Field is the shared
5
5
  validation and accessibility owner used by Entasis form controls. It renders field structure
6
6
  around a custom control and does not create another form or validation system.
7
7
 
@@ -9,45 +9,185 @@ around a custom control and does not create another form or validation system.
9
9
 
10
10
  createFieldState receives id, type, value, errors, and focused. Use getter/setter properties
11
11
  for values bound to component props; plain initial values also work for standalone controls.
12
- Optional name, required, disabled, visible, size, density, onValidate, and onValueChange
13
- configure the same owner used by built-in controls.
12
+ Optional name, required, disabled, readOnly, visible, size, density, messages, minLength,
13
+ maxLength, onValidate, validationMode, validationDebounce, and onValueChange configure the same
14
+ owner used by built-in controls.
14
15
 
15
16
  The controller exposes value, setValue(value), validate(), checkSchema(value), isValid,
16
- errors, errorMessages, hasError, focused, disabled, required, size, and density.
17
+ errors, errorMessages, hasError, hasValidationError, focused, touched, dirty, filled,
18
+ initialValue, reset(value?), focusControl(), validating, validateAsync(), settle(),
19
+ externalErrors, setExternalErrors(messages), clearExternalErrors(), disabled, readOnly,
20
+ required, messages, size, and density.
17
21
  Use bind:value on field.value or call field.setValue for user edits. Accepted changes publish
18
22
  one onValueChange callback each. Unchanged values and parent state synchronization do not
19
- publish callbacks. Disabled controllers reject user edits.
23
+ publish callbacks. Disabled and read-only controllers reject user edits.
20
24
 
21
25
  Spread field.controlAttrs on the native control and attach field.control to register its node.
22
- The attributes provide id, name, disabled, required, aria-invalid, and aria-describedby.
23
- The controller exposes id, labelId, and errorId for more specialized controls. Field connects
24
- its label and error messages to this control, preserving unrelated accessible descriptions.
26
+ The attributes provide id, name, disabled, required, readonly, aria-invalid, and
27
+ aria-describedby. The controller exposes id, labelId, descriptionId, helperId, errorId, and
28
+ describedBy for more specialized controls. Field connects its label, description, helper text
29
+ and error messages to this control, preserving the app's own accessible descriptions: the
30
+ control's aria-describedby lists the app's ids, then the description, the helper, and the
31
+ errors last. Errors render in one role="alert" container.
25
32
 
26
- fieldSchemas exports the built-in optional and required schemas. onValidate supplements that
27
- schema: a message, message array, or true means invalid; false, null, or undefined means valid.
28
- Optional empty values skip custom validation. validate returns a tuple containing the error
29
- flag and schema-normalized value.
33
+ ## Disabled and read-only
34
+
35
+ disabled and readOnly are effective states: a field is disabled when it is, or when a disabled
36
+ Form, a disabled FormGroup, or a Field rendered as="fieldset" around it is; read-only works the
37
+ same way. A disabled field rejects edits and skips validation (errors an app set on it stay
38
+ visible). A read-only field stays focusable, rejects user edits, and still validates and
39
+ submits. Field marks a read-only native text input or textarea with the readonly attribute, and
40
+ a role-based control (checkbox, switch, slider, combobox, radiogroup, listbox, spinbutton,
41
+ textbox) with aria-readonly. RatingInput's readonly prop is a deprecated alias of readOnly.
42
+
43
+ ## Validation messages
44
+
45
+ Every validation message a user sees comes from the i18n catalog in the active locale, never
46
+ from the validation library. An empty required field shows one required message; a required
47
+ checkbox or switch says it must be on. Email and URL failures, text shorter than minLength or
48
+ longer than maxLength, values below or above a range, and incomplete codes each have their own
49
+ message. true from onValidate shows the catalog's invalid message; strings from onValidate are
50
+ shown verbatim.
51
+
52
+ messages overrides any of them per field: required, invalid, email, url, tooShort(min),
53
+ tooLong(max), rangeUnderflow(min), rangeOverflow(max), and incomplete(length). Each is a
54
+ string, or a function receiving the limit for the parameterized ones. field.messages holds the
55
+ resolved messages, for custom rules that report a range or length:
56
+
57
+ \`\`\`svelte
58
+ <script lang="ts">
59
+ import { createFieldState } from './index.ts';
60
+
61
+ const field = createFieldState({
62
+ id: 'nickname',
63
+ type: 'text',
64
+ required: true,
65
+ minLength: 3,
66
+ messages: { required: 'Pick a nickname', tooShort: (min) => 'Use ' + min + ' letters or more' },
67
+ value: '',
68
+ errors: [],
69
+ focused: false
70
+ });
71
+ </script>
72
+ \`\`\`
73
+
74
+ ## Validation timing, async validators and external errors
75
+
76
+ validationMode picks when the field validates by itself: submit (the default, from the Form)
77
+ validates on a submit attempt and then re-validates each edit, blur when focus leaves the field,
78
+ change on every accepted change. A field showing an error always re-validates as it is edited,
79
+ and mounting never validates. validationDebounce (milliseconds) delays the validation an edit
80
+ triggers. Both can be set on the Form, on an entry, or as Field props that controls forward.
81
+
82
+ onValidate may return a promise. While it is pending the field is neither valid nor invalid
83
+ (no aria-invalid, no data-invalid, data-validating on the root) and validating is true; a
84
+ result for an older value is dropped, a rejection marks the field invalid with the generic
85
+ message, and unmounting cancels it. validate() stays synchronous; validateAsync() and settle()
86
+ wait for pending validators.
87
+
88
+ setExternalErrors(messages) shows errors an app got from outside, such as a server response.
89
+ errorMessages lists the validation errors first, then these. validate() leaves them alone and
90
+ they do not count as hasValidationError, so they never block a submit; they clear on the
91
+ field's next accepted value change, reset(), or clearExternalErrors().
92
+
93
+ ## Interaction state
94
+
95
+ Focus is tracked on the Field root, so every control reports it, including those with several
96
+ focusable parts: focused is true while focus is anywhere in the field or in a popup the field
97
+ opened (a listbox, a date picker), and becomes false when focus leaves both. Leaving sets
98
+ touched. focused also clears when the focused control becomes disabled or leaves the document,
99
+ where Chromium sends no blur.
100
+
101
+ dirty is true while the value differs from initialValue, the first settled value; null, an
102
+ empty string and an empty array count as equal, Dates compare by time, arrays and plain objects
103
+ by content. filled is true while the field holds a value (a checked checkbox or switch; a
104
+ registered type's isEmpty decides for app-defined types). reset(value?) restores the initial
105
+ value, or a new one, as the untouched baseline without a value callback, and clears errors and
106
+ any pending validation.
107
+
108
+ The Field root carries data-invalid, data-disabled, data-readonly, data-focused, data-filled,
109
+ data-dirty, data-touched, and data-validating as presence attributes for styling, next to
110
+ data-label-position. A new error fades and grows in under the Theme's motion tokens; reduced
111
+ motion plays nothing.
30
112
 
31
113
  ## Wrapper props
32
114
 
33
115
  - field: the shared FieldState controller.
34
116
  - children: custom control content.
35
- - as: native wrapper element; defaults to div. Use fieldset for grouped controls.
36
- - labelFor: associated control ID, or false for aria-labelledby; defaults to field.id.
117
+ - as: native wrapper element; defaults to div. Use fieldset for grouped controls; a fieldset
118
+ Field renders disabled when the field is and shares its disabled and read-only state with
119
+ fields inside it.
120
+ - labelFor: associated control ID, or false for aria-labelledby; defaults to field.id. A
121
+ labelFor={false} label focuses the control when clicked, without toggling or opening it. An
122
+ aria-label on the control names it instead, so the label is not linked.
37
123
  - size: small, normal, or large control geometry and label typography.
38
124
  - density: compact, normal, or comfortable internal spacing, independent of size.
39
125
  - labelPosition: top or left; left switches to side labels once the field itself is at least 32rem wide (a container query on the field, not the viewport).
40
126
  - fieldAttrs: native attributes for the wrapper. Put native control attributes on the control.
127
+ - anchor: an attachment applied to the input box rather than the wrapper. Pass a popover's
128
+ \`reference\` here so its panel opens against the box, not below the description.
41
129
  - class and theme: wrapper classes and Field part overrides.
42
130
 
43
131
  Slots include header, label, actions, prefix, suffix, footer, description, helper,
44
- errorsContainer, and error. Field renders required indicators and validation errors.
132
+ errorsContainer, and error. Field renders required indicators and validation errors. A press on
133
+ the input container around a text control (its padding, an icon, a chip) focuses the control;
134
+ buttons and other controls inside keep their own behaviour.
135
+
136
+ Required role-based controls (checkbox, switch, radiogroup, slider, combobox) receive
137
+ aria-required from Field; native inputs keep their required attribute. Button-rooted controls
138
+ (Checkbox, Switch) accept inputAttrs typed as FieldButtonAttributes.
139
+
140
+ ## Native forms
141
+
142
+ Every Field control also works inside a plain <form>, such as a SvelteKit form action.
143
+
144
+ - form: the id of the native form a field submits with when it is rendered outside that form,
145
+ like the HTML form attribute. Every input prop type accepts it; Field gives it to the field's
146
+ native controls and hidden inputs.
147
+ - Reset: a native reset of the field's form (a type="reset" button or form.reset()) returns the
148
+ field to the value it mounted with, clears its errors, and publishes one onValueChange. A reset
149
+ that another listener cancels changes nothing. Disabled and read-only fields keep their value.
150
+
151
+ FieldHiddenInputs renders the inputs a custom control submits through, beside the control and
152
+ never inside a button. Pass the field, plus value (a string or number for one input, an array for
153
+ one input per entry, null for none) or checked (one checkbox submitting value, default "on", only
154
+ while checked). name, required, disabled and form default to the field's; a generated field name
155
+ is never submitted. A required, empty field blocks the native submit: the browser's report moves
156
+ to the field's control, which shows the field's own error instead of the browser bubble.
157
+ autocomplete renders the single value as a text input the browser can autofill; the filled text
158
+ is matched against options (by value, then label, then label ignoring case and accents) and
159
+ committed with field.setValue, or handed to onAutofill. Read-only and disabled fields ignore
160
+ autofill.
161
+
162
+ \`\`\`svelte
163
+ <script lang="ts">
164
+ import { Field, FieldHiddenInputs, createFieldState } from './index.ts';
165
+
166
+ const plans = ['free', 'pro'];
167
+ const field = createFieldState({
168
+ id: 'plan',
169
+ type: 'select',
170
+ name: 'plan',
171
+ value: 'free',
172
+ errors: [],
173
+ focused: false
174
+ });
175
+ const nextPlan = () => plans[(plans.indexOf(field.value ?? '') + 1) % plans.length];
176
+ </script>
177
+
178
+ <Field {field} label="Plan" labelFor={false}>
179
+ <button type="button" {@attach field.control} onclick={() => field.setValue(nextPlan())}>
180
+ {field.value}
181
+ </button>
182
+ <FieldHiddenInputs {field} value={field.value} />
183
+ </Field>
184
+ \`\`\`
45
185
 
46
186
  ## Form participation
47
187
 
48
188
  A Form input with type: 'field' supplies fieldType and a snippet accepting FieldState<fieldType>.
49
- The entry inherits InputProps, including defaultValue, required, disabled, size, density,
50
- onValidate, and onValueChange. The controller receives the resolved Form size and density.
51
- Its value participates in inferred values, validation, submission, and Form bind:value.
189
+ The entry inherits InputProps, including defaultValue, required, disabled, readOnly, messages,
190
+ size, density, onValidate, and onValueChange. The controller receives the resolved Form size and
191
+ density. Its value participates in inferred values, validation, submission, and Form bind:value.
52
192
  The existing type: 'custom' entry remains display-only and contributes no value key.
53
193
  `;
@@ -0,0 +1,47 @@
1
+ import type { BaseIssue } from 'valibot';
2
+ import type { Messages } from '../../../i18n/en.js';
3
+ import type { FieldType } from './field.js';
4
+ /** The validation messages a field shows, resolved for the active locale. */
5
+ export type FieldMessages = {
6
+ /** A required field left empty; for a checkbox or switch, left off. */
7
+ required: string;
8
+ /** A value rejected without a more specific message, including `true` from `onValidate`. */
9
+ invalid: string;
10
+ /** A value that is not an email address. */
11
+ email: string;
12
+ /** A value that is not a URL. */
13
+ url: string;
14
+ /** Text shorter than the field's minimum length. */
15
+ tooShort: (min: number) => string;
16
+ /** Text longer than the field's maximum length. */
17
+ tooLong: (max: number) => string;
18
+ /** A value below the field's minimum. */
19
+ rangeUnderflow: (min: number | string) => string;
20
+ /** A value above the field's maximum. */
21
+ rangeOverflow: (max: number | string) => string;
22
+ /** A code with fewer characters than its length, such as a partly entered PinInput. */
23
+ incomplete: (length: number) => string;
24
+ };
25
+ type MessageOverride<Message> = Message extends (...args: infer Args) => string ? string | ((...args: Args) => string) : string;
26
+ /**
27
+ * Per-entry message overrides, the entasis form of a per-constraint error message: a string, or
28
+ * for the parameterized messages a function receiving the same constraint value.
29
+ */
30
+ export type FieldMessageOverrides = {
31
+ [Key in keyof FieldMessages]?: MessageOverride<FieldMessages[Key]>;
32
+ };
33
+ /**
34
+ * The catalog messages for one field type, with the entry's overrides applied. A checkbox or
35
+ * switch is "required" when it must be on, a PinInput that is too short is incomplete, and a
36
+ * password uses the password wording.
37
+ */
38
+ export declare const resolveFieldMessages: (t: Messages, type: FieldType, overrides?: FieldMessageOverrides) => FieldMessages;
39
+ /** The part of a validation issue the message mapping reads. */
40
+ export type FieldIssue = Pick<BaseIssue<unknown>, 'kind' | 'type' | 'input' | 'requirement'>;
41
+ /**
42
+ * Turns one validation issue into the catalog message for what failed. A missing value (a type
43
+ * mismatch on `null`, an empty string or array) reads as required; anything unrecognised reads as
44
+ * invalid, so library wording never reaches the user.
45
+ */
46
+ export declare const describeFieldIssue: (issue: FieldIssue, messages: FieldMessages, locale?: string) => string;
47
+ export {};