@flowdrop/flowdrop 2.13.0 → 2.15.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 (308) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/dist/commands/executor.js +58 -8
  3. package/dist/commands/parser.js +3 -3
  4. package/dist/commands/types.d.ts +8 -2
  5. package/dist/commands/uiActionTarget.d.ts +24 -0
  6. package/dist/commands/uiActionTarget.js +31 -0
  7. package/dist/commands/validate.d.ts +15 -0
  8. package/dist/commands/validate.js +115 -0
  9. package/dist/components/App.svelte +44 -2
  10. package/dist/components/App.svelte.d.ts +3 -1
  11. package/dist/components/Button.svelte +7 -7
  12. package/dist/components/Button.svelte.d.ts +10 -0
  13. package/dist/components/CanvasBanner.svelte +19 -6
  14. package/dist/components/CanvasBanner.svelte.d.ts +15 -3
  15. package/dist/components/CanvasContextMenu.svelte +9 -9
  16. package/dist/components/CanvasContextMenu.svelte.d.ts +10 -0
  17. package/dist/components/CanvasToolbar.svelte +8 -7
  18. package/dist/components/CanvasToolbar.svelte.d.ts +10 -0
  19. package/dist/components/CanvasZoomControls.svelte +10 -9
  20. package/dist/components/CanvasZoomControls.svelte.d.ts +13 -0
  21. package/dist/components/ConfigForm.svelte +51 -18
  22. package/dist/components/ConfigForm.svelte.d.ts +20 -1
  23. package/dist/components/ConfigPanel.svelte +9 -5
  24. package/dist/components/ConfigPanel.svelte.d.ts +10 -0
  25. package/dist/components/EditorStatusBar.svelte +6 -5
  26. package/dist/components/EditorStatusBar.svelte.d.ts +7 -0
  27. package/dist/components/ExternalLinkRow.svelte +16 -1
  28. package/dist/components/ExternalLinkRow.svelte.d.ts +5 -0
  29. package/dist/components/FlowDropEdge.svelte +15 -12
  30. package/dist/components/FlowDropEdge.svelte.d.ts +16 -0
  31. package/dist/components/InterfaceTag.svelte +13 -15
  32. package/dist/components/InterfaceTag.svelte.d.ts +19 -0
  33. package/dist/components/LoadingSpinner.svelte +8 -2
  34. package/dist/components/LoadingSpinner.svelte.d.ts +9 -0
  35. package/dist/components/Logo.svelte +11 -0
  36. package/dist/components/Logo.svelte.d.ts +9 -0
  37. package/dist/components/LogoWordmark.svelte +8 -3
  38. package/dist/components/LogoWordmark.svelte.d.ts +9 -0
  39. package/dist/components/LoopbackLanes.svelte +12 -6
  40. package/dist/components/LoopbackLanes.svelte.d.ts +13 -0
  41. package/dist/components/MarkdownDisplay.svelte +10 -3
  42. package/dist/components/MarkdownDisplay.svelte.d.ts +11 -0
  43. package/dist/components/Navbar.svelte +13 -5
  44. package/dist/components/Navbar.svelte.d.ts +14 -0
  45. package/dist/components/NodeInspector.svelte +7 -8
  46. package/dist/components/NodeInspector.svelte.d.ts +10 -0
  47. package/dist/components/NodeSidebar.svelte +9 -3
  48. package/dist/components/NodeSidebar.svelte.d.ts +10 -0
  49. package/dist/components/NodeStatusOverlay.svelte +30 -19
  50. package/dist/components/NodeStatusOverlay.svelte.d.ts +19 -0
  51. package/dist/components/NodeSwapPicker.svelte +1 -1
  52. package/dist/components/RunBar.svelte +10 -13
  53. package/dist/components/RunBar.svelte.d.ts +15 -0
  54. package/dist/components/RunsMenu.svelte +14 -13
  55. package/dist/components/RunsMenu.svelte.d.ts +15 -0
  56. package/dist/components/SchemaForm.svelte +10 -13
  57. package/dist/components/SchemaForm.svelte.d.ts +51 -0
  58. package/dist/components/SettingsPanel.svelte +5 -5
  59. package/dist/components/StatusIcon.svelte +14 -3
  60. package/dist/components/StatusIcon.svelte.d.ts +15 -0
  61. package/dist/components/StatusLabel.svelte +10 -2
  62. package/dist/components/StatusLabel.svelte.d.ts +11 -0
  63. package/dist/components/ThemeToggle.svelte +8 -5
  64. package/dist/components/ThemeToggle.svelte.d.ts +10 -0
  65. package/dist/components/UniversalNode.svelte +13 -5
  66. package/dist/components/UniversalNode.svelte.d.ts +15 -0
  67. package/dist/components/WorkflowInterfaceEntryCard.svelte +1 -1
  68. package/dist/components/WorkflowInterfaceEntryComposer.svelte +1 -2
  69. package/dist/components/ZoomTier.svelte +13 -10
  70. package/dist/components/ZoomTier.svelte.d.ts +14 -0
  71. package/dist/components/console/CommandConsole.svelte +9 -3
  72. package/dist/components/console/CommandConsole.svelte.d.ts +10 -0
  73. package/dist/components/console/ConsoleAutocomplete.svelte +4 -4
  74. package/dist/components/console/ConsoleAutocomplete.svelte.d.ts +5 -0
  75. package/dist/components/console/ConsoleInput.svelte +6 -4
  76. package/dist/components/console/ConsoleInput.svelte.d.ts +7 -0
  77. package/dist/components/console/ConsoleOutput.svelte +5 -3
  78. package/dist/components/console/ConsoleOutput.svelte.d.ts +6 -0
  79. package/dist/components/console/ConsoleStrip.svelte +9 -5
  80. package/dist/components/console/ConsoleStrip.svelte.d.ts +10 -0
  81. package/dist/components/form/FieldFactory.svelte +6 -2
  82. package/dist/components/form/FieldFactory.svelte.d.ts +46 -0
  83. package/dist/components/form/FormArray.svelte +9 -16
  84. package/dist/components/form/FormArray.svelte.d.ts +10 -0
  85. package/dist/components/form/FormArrayRows.svelte +8 -8
  86. package/dist/components/form/FormArrayRows.svelte.d.ts +11 -0
  87. package/dist/components/form/FormAutocomplete.svelte +6 -3
  88. package/dist/components/form/FormAutocomplete.svelte.d.ts +23 -0
  89. package/dist/components/form/FormCheckboxGroup.svelte +5 -5
  90. package/dist/components/form/FormCheckboxGroup.svelte.d.ts +6 -0
  91. package/dist/components/form/FormCodeEditor.svelte +8 -13
  92. package/dist/components/form/FormCodeEditor.svelte.d.ts +9 -0
  93. package/dist/components/form/FormField.svelte +7 -8
  94. package/dist/components/form/FormField.svelte.d.ts +10 -0
  95. package/dist/components/form/FormFieldLight.svelte +6 -5
  96. package/dist/components/form/FormFieldLight.svelte.d.ts +8 -0
  97. package/dist/components/form/FormFieldWrapper.svelte +8 -8
  98. package/dist/components/form/FormFieldWrapper.svelte.d.ts +9 -0
  99. package/dist/components/form/FormFieldset.svelte +6 -12
  100. package/dist/components/form/FormFieldset.svelte.d.ts +7 -0
  101. package/dist/components/form/FormMarkdownEditor.svelte +8 -15
  102. package/dist/components/form/FormMarkdownEditor.svelte.d.ts +9 -0
  103. package/dist/components/form/FormNumberField.svelte +5 -7
  104. package/dist/components/form/FormNumberField.svelte.d.ts +6 -0
  105. package/dist/components/form/FormPorts.svelte +133 -27
  106. package/dist/components/form/FormPorts.svelte.d.ts +19 -0
  107. package/dist/components/form/FormRangeField.svelte +5 -9
  108. package/dist/components/form/FormRangeField.svelte.d.ts +6 -0
  109. package/dist/components/form/FormSelect.svelte +5 -7
  110. package/dist/components/form/FormSelect.svelte.d.ts +6 -0
  111. package/dist/components/form/FormTemplateEditor.svelte +8 -16
  112. package/dist/components/form/FormTemplateEditor.svelte.d.ts +9 -0
  113. package/dist/components/form/FormTextField.svelte +5 -7
  114. package/dist/components/form/FormTextField.svelte.d.ts +6 -0
  115. package/dist/components/form/FormTextarea.svelte +5 -7
  116. package/dist/components/form/FormTextarea.svelte.d.ts +6 -0
  117. package/dist/components/form/FormToggle.svelte +6 -8
  118. package/dist/components/form/FormToggle.svelte.d.ts +7 -0
  119. package/dist/components/form/FormUISchemaRenderer.svelte +5 -9
  120. package/dist/components/form/FormUISchemaRenderer.svelte.d.ts +7 -0
  121. package/dist/components/interrupt/ChoicePrompt.svelte +6 -6
  122. package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +7 -0
  123. package/dist/components/interrupt/ConfirmationPrompt.svelte +6 -5
  124. package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +7 -0
  125. package/dist/components/interrupt/FormPrompt.svelte +6 -6
  126. package/dist/components/interrupt/FormPrompt.svelte.d.ts +7 -0
  127. package/dist/components/interrupt/InterruptBubble.svelte +10 -9
  128. package/dist/components/interrupt/InterruptBubble.svelte.d.ts +11 -0
  129. package/dist/components/interrupt/ReviewPrompt.svelte +5 -6
  130. package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +7 -0
  131. package/dist/components/interrupt/TextInputPrompt.svelte +6 -6
  132. package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +7 -0
  133. package/dist/components/nodes/AtomNode.svelte +31 -6
  134. package/dist/components/nodes/AtomNode.svelte.d.ts +15 -0
  135. package/dist/components/nodes/CaptionNode.svelte +50 -7
  136. package/dist/components/nodes/CaptionNode.svelte.d.ts +13 -0
  137. package/dist/components/nodes/GatewayNode.svelte +18 -11
  138. package/dist/components/nodes/GatewayNode.svelte.d.ts +21 -0
  139. package/dist/components/nodes/IdeaNode.svelte +47 -6
  140. package/dist/components/nodes/IdeaNode.svelte.d.ts +17 -0
  141. package/dist/components/nodes/NodeCard.svelte +26 -18
  142. package/dist/components/nodes/NodeCard.svelte.d.ts +20 -0
  143. package/dist/components/nodes/NodeConfigButton.svelte +15 -2
  144. package/dist/components/nodes/NodeConfigButton.svelte.d.ts +11 -0
  145. package/dist/components/nodes/NodeProblemMark.svelte +15 -10
  146. package/dist/components/nodes/NodeProblemMark.svelte.d.ts +16 -0
  147. package/dist/components/nodes/NodeTip.svelte +10 -7
  148. package/dist/components/nodes/NodeTip.svelte.d.ts +13 -0
  149. package/dist/components/nodes/NotesNode.svelte +30 -0
  150. package/dist/components/nodes/NotesNode.svelte.d.ts +14 -0
  151. package/dist/components/nodes/SimpleNode.svelte +35 -8
  152. package/dist/components/nodes/SimpleNode.svelte.d.ts +17 -0
  153. package/dist/components/nodes/SquareNode.svelte +38 -8
  154. package/dist/components/nodes/SquareNode.svelte.d.ts +17 -0
  155. package/dist/components/nodes/TerminalNode.svelte +24 -10
  156. package/dist/components/nodes/TerminalNode.svelte.d.ts +17 -0
  157. package/dist/components/nodes/ToolNode.svelte +14 -5
  158. package/dist/components/nodes/ToolNode.svelte.d.ts +15 -0
  159. package/dist/components/nodes/WorkflowNode.svelte +18 -15
  160. package/dist/components/nodes/WorkflowNode.svelte.d.ts +21 -0
  161. package/dist/components/playground/ChatBubble.svelte +4 -3
  162. package/dist/components/playground/ChatBubble.svelte.d.ts +5 -0
  163. package/dist/components/playground/ChatInput.svelte +11 -6
  164. package/dist/components/playground/ChatInput.svelte.d.ts +14 -0
  165. package/dist/components/playground/ChatPanel.svelte +15 -7
  166. package/dist/components/playground/ChatPanel.svelte.d.ts +17 -0
  167. package/dist/components/playground/ControlPanel.svelte +26 -9
  168. package/dist/components/playground/ControlPanel.svelte.d.ts +29 -0
  169. package/dist/components/playground/DockedPlayground.svelte +7 -10
  170. package/dist/components/playground/DockedPlayground.svelte.d.ts +10 -0
  171. package/dist/components/playground/ExecutionConsole.svelte +10 -5
  172. package/dist/components/playground/ExecutionConsole.svelte.d.ts +12 -0
  173. package/dist/components/playground/ExecutionList.svelte +13 -0
  174. package/dist/components/playground/ExecutionList.svelte.d.ts +11 -0
  175. package/dist/components/playground/ExecutionLogs.svelte +6 -9
  176. package/dist/components/playground/ExecutionLogs.svelte.d.ts +7 -0
  177. package/dist/components/playground/HeaderMenu.svelte +6 -8
  178. package/dist/components/playground/HeaderMenu.svelte.d.ts +9 -0
  179. package/dist/components/playground/HierarchyTrail.svelte +6 -6
  180. package/dist/components/playground/HierarchyTrail.svelte.d.ts +8 -0
  181. package/dist/components/playground/InputCollector.svelte +6 -5
  182. package/dist/components/playground/InputCollector.svelte.d.ts +7 -0
  183. package/dist/components/playground/InputFields.svelte +8 -12
  184. package/dist/components/playground/InputFields.svelte.d.ts +9 -0
  185. package/dist/components/playground/InterfaceInputForm.svelte +6 -13
  186. package/dist/components/playground/InterfaceInputForm.svelte.d.ts +9 -0
  187. package/dist/components/playground/InterfaceJsonInput.svelte +6 -5
  188. package/dist/components/playground/InterfaceJsonInput.svelte.d.ts +8 -0
  189. package/dist/components/playground/LogRow.svelte +4 -5
  190. package/dist/components/playground/LogRow.svelte.d.ts +6 -0
  191. package/dist/components/playground/MessageBubble.svelte +13 -7
  192. package/dist/components/playground/MessageBubble.svelte.d.ts +15 -0
  193. package/dist/components/playground/MessageCard.svelte +5 -2
  194. package/dist/components/playground/MessageCard.svelte.d.ts +6 -0
  195. package/dist/components/playground/MessageMarkdown.svelte +8 -9
  196. package/dist/components/playground/MessageMarkdown.svelte.d.ts +11 -0
  197. package/dist/components/playground/MessageNotice.svelte +7 -0
  198. package/dist/components/playground/MessageNotice.svelte.d.ts +5 -0
  199. package/dist/components/playground/MessageStream.svelte +8 -6
  200. package/dist/components/playground/MessageStream.svelte.d.ts +11 -0
  201. package/dist/components/playground/MessageTagChip.svelte +7 -7
  202. package/dist/components/playground/MessageTagChip.svelte.d.ts +10 -0
  203. package/dist/components/playground/MessageTagStrip.svelte +6 -3
  204. package/dist/components/playground/MessageTagStrip.svelte.d.ts +8 -0
  205. package/dist/components/playground/OriginBadge.svelte +7 -4
  206. package/dist/components/playground/OriginBadge.svelte.d.ts +8 -0
  207. package/dist/components/playground/PipelineKanbanView.svelte +14 -0
  208. package/dist/components/playground/PipelineKanbanView.svelte.d.ts +12 -0
  209. package/dist/components/playground/PipelinePanel.svelte +14 -0
  210. package/dist/components/playground/PipelinePanel.svelte.d.ts +12 -0
  211. package/dist/components/playground/PipelineTableView.svelte +14 -0
  212. package/dist/components/playground/PipelineTableView.svelte.d.ts +12 -0
  213. package/dist/components/playground/Playground.svelte +17 -11
  214. package/dist/components/playground/Playground.svelte.d.ts +20 -0
  215. package/dist/components/playground/PlaygroundApp.svelte +24 -10
  216. package/dist/components/playground/PlaygroundApp.svelte.d.ts +26 -0
  217. package/dist/components/playground/PlaygroundHeader.svelte +8 -12
  218. package/dist/components/playground/PlaygroundHeader.svelte.d.ts +11 -0
  219. package/dist/components/playground/PlaygroundModal.svelte +6 -8
  220. package/dist/components/playground/PlaygroundModal.svelte.d.ts +7 -0
  221. package/dist/components/playground/PlaygroundStudio.svelte +9 -0
  222. package/dist/components/playground/PlaygroundStudio.svelte.d.ts +7 -0
  223. package/dist/components/playground/PlaygroundSurface.svelte +19 -14
  224. package/dist/components/playground/PlaygroundSurface.svelte.d.ts +20 -0
  225. package/dist/components/playground/SessionManager.svelte +6 -5
  226. package/dist/components/playground/SessionManager.svelte.d.ts +7 -0
  227. package/dist/components/playground/StepsSummary.svelte +8 -9
  228. package/dist/components/playground/StepsSummary.svelte.d.ts +10 -0
  229. package/dist/components/primitives/Button.svelte +15 -7
  230. package/dist/components/primitives/Button.svelte.d.ts +18 -1
  231. package/dist/components/primitives/Card.svelte +8 -6
  232. package/dist/components/primitives/Card.svelte.d.ts +11 -0
  233. package/dist/components/primitives/Checkbox.svelte +8 -5
  234. package/dist/components/primitives/Checkbox.svelte.d.ts +11 -0
  235. package/dist/components/primitives/Chip.svelte +8 -4
  236. package/dist/components/primitives/Chip.svelte.d.ts +11 -0
  237. package/dist/components/primitives/Combobox.svelte +27 -18
  238. package/dist/components/primitives/Combobox.svelte.d.ts +33 -0
  239. package/dist/components/primitives/Composer.svelte +15 -16
  240. package/dist/components/primitives/Composer.svelte.d.ts +20 -0
  241. package/dist/components/primitives/EmptyState.svelte +9 -3
  242. package/dist/components/primitives/EmptyState.svelte.d.ts +11 -0
  243. package/dist/components/primitives/Field.svelte +12 -9
  244. package/dist/components/primitives/Field.svelte.d.ts +16 -0
  245. package/dist/components/primitives/IconButton.svelte +10 -5
  246. package/dist/components/primitives/IconButton.svelte.d.ts +13 -0
  247. package/dist/components/primitives/Menu.svelte +15 -14
  248. package/dist/components/primitives/Menu.svelte.d.ts +20 -0
  249. package/dist/components/primitives/Notice.svelte +11 -8
  250. package/dist/components/primitives/Notice.svelte.d.ts +14 -0
  251. package/dist/components/primitives/PanelHeader.svelte +10 -7
  252. package/dist/components/primitives/PanelHeader.svelte.d.ts +13 -0
  253. package/dist/components/primitives/Segmented.svelte +11 -4
  254. package/dist/components/primitives/Segmented.svelte.d.ts +14 -0
  255. package/dist/components/primitives/Select.svelte +13 -16
  256. package/dist/components/primitives/Select.svelte.d.ts +18 -0
  257. package/dist/components/primitives/StatusPill.svelte +11 -8
  258. package/dist/components/primitives/StatusPill.svelte.d.ts +15 -0
  259. package/dist/components/primitives/Switch.svelte +9 -6
  260. package/dist/components/primitives/Switch.svelte.d.ts +12 -0
  261. package/dist/components/primitives/Tabs.svelte +16 -15
  262. package/dist/components/primitives/Tabs.svelte.d.ts +22 -0
  263. package/dist/components/primitives/Toolbar.svelte +14 -13
  264. package/dist/components/primitives/Toolbar.svelte.d.ts +18 -0
  265. package/dist/components/primitives/ToolbarSeparator.svelte +5 -4
  266. package/dist/components/primitives/ToolbarSeparator.svelte.d.ts +7 -0
  267. package/dist/core/index.d.ts +2 -2
  268. package/dist/core/index.js +1 -1
  269. package/dist/editor/index.d.ts +3 -3
  270. package/dist/index.d.ts +3 -2
  271. package/dist/layout/index.d.ts +1 -1
  272. package/dist/layout/index.js +1 -1
  273. package/dist/layout/toWorkflow.d.ts +8 -7
  274. package/dist/layout/toWorkflow.js +20 -40
  275. package/dist/messages/defaults.d.ts +24 -0
  276. package/dist/messages/defaults.js +15 -0
  277. package/dist/skins/graphite.d.ts +1 -1
  278. package/dist/skins/graphite.js +1 -1
  279. package/dist/stores/settingsStore.svelte.js +3 -0
  280. package/dist/stores/workflowStore.svelte.d.ts +10 -0
  281. package/dist/stores/workflowStore.svelte.js +65 -20
  282. package/dist/styles/base.css +2 -126
  283. package/dist/styles/tokenAliases.js +1 -0
  284. package/dist/styles/tokens.css +9 -5
  285. package/dist/svelte-app.d.ts +63 -2
  286. package/dist/svelte-app.js +144 -1
  287. package/dist/themes/classic.d.ts +9 -0
  288. package/dist/themes/classic.js +16 -0
  289. package/dist/themes/index.d.ts +7 -2
  290. package/dist/themes/index.js +20 -10
  291. package/dist/types/events.d.ts +18 -1
  292. package/dist/types/index.d.ts +10 -0
  293. package/dist/types/settings.d.ts +6 -2
  294. package/dist/types/theme.d.ts +6 -2
  295. package/dist/utils/externalEdit.svelte.d.ts +48 -0
  296. package/dist/utils/externalEdit.svelte.js +62 -0
  297. package/dist/utils/inspectorContext.d.ts +5 -0
  298. package/dist/utils/playgroundChat.d.ts +10 -0
  299. package/dist/utils/playgroundChat.js +25 -0
  300. package/dist/utils/portExposure.d.ts +24 -1
  301. package/dist/utils/portExposure.js +46 -13
  302. package/dist/utils/portUtils.d.ts +5 -1
  303. package/dist/utils/portUtils.js +15 -4
  304. package/package.json +2 -1
  305. package/dist/components/IconButton.svelte +0 -80
  306. package/dist/components/IconButton.svelte.d.ts +0 -30
  307. package/dist/themes/default.d.ts +0 -2
  308. package/dist/themes/default.js +0 -9
@@ -1,27 +1,24 @@
1
1
  <!--
2
- Combobox — the searchable rendering of `Select`.
2
+ @component
3
+ Combobox: the searchable rendering of `Select`.
3
4
 
4
- An ARIA 1.2 editable combobox with a listbox popup: the input holds focus the
5
- whole time and the highlighted option is named by `aria-activedescendant`, so
6
- the options carry no key handlers. Typing filters (label, description and
7
- group, every word has to match) and bolds what matched; a status line says
8
- "n of m"; options with a `group` are listed under their title.
5
+ An ARIA 1.2 editable combobox with a listbox popup. The input keeps focus the whole time and
6
+ the highlighted option is named by `aria-activedescendant`. Typing filters by label,
7
+ description and group (every word has to match) and bolds what matched. A status line
8
+ says "n of m". Options with a `group` are listed under their title.
9
9
 
10
- Keyboard: ArrowDown / ArrowUp open the list and move the highlight (disabled
11
- options are skipped), Home / End jump to the ends, Enter chooses the
12
- highlighted option, Escape closes and drops the query (the event stops there,
13
- the editor clears the selection on Escape), Tab closes without choosing.
14
- A click outside closes it.
10
+ Keys: ArrowDown/ArrowUp open the list and move the highlight (disabled options are
11
+ skipped), Home/End jump to the ends, Enter chooses, Escape closes and drops the query, Tab
12
+ closes without choosing. A click outside closes it.
15
13
 
16
- Closed, the field shows the chosen option's label; open, it is the search box
17
- and the label moves to the placeholder. The popup is positioned under the
18
- field and as wide as it; it is not portalled, so a host that clips overflow
19
- clips it (the same as `Menu`).
14
+ Closed, the field shows the chosen label. Open, it is the search box and the label moves
15
+ to the placeholder. The popup sits under the field and is as wide as it. It is not
16
+ portalled, so a host that clips overflow clips it too (same as `Menu`).
20
17
 
21
- Use it through `Select` (which picks this rendering for long, grouped or
22
- described lists); mount it directly only to force it.
18
+ **Use it** through `Select`, which picks this rendering for long, grouped or described lists.
19
+ **Not for** a short flat list; use `Select`, which then renders the browser's own `<select>`.
23
20
 
24
- @internal Not exported from any package entry; the API may still change.
21
+ Not exported from the package; the API may still change.
25
22
  -->
26
23
 
27
24
  <script lang="ts">
@@ -37,21 +34,33 @@
37
34
  } from '../../utils/selectOptions.js';
38
35
 
39
36
  interface Props {
37
+ /** The options, optionally with a `description` and a `group`. */
40
38
  options: SelectOption[];
41
39
  /** The chosen option's value; '' (or any unknown value) is "nothing chosen". */
42
40
  value?: string;
41
+ /** Runs with the new value when the user chooses an option. */
43
42
  onValueChange?: (value: string) => void;
43
+ /** Id of the input, for a `<label for>`. */
44
44
  id?: string;
45
+ /** Form field name. */
45
46
  name?: string;
47
+ /** Disables the field. */
46
48
  disabled?: boolean;
49
+ /** Shows the error border. */
47
50
  invalid?: boolean;
51
+ /** Field height, matching Button: `sm` 24, `md` 28, `lg` 32. */
48
52
  size?: 'sm' | 'md' | 'lg';
49
53
  /** Shown when nothing is chosen. */
50
54
  placeholder?: string;
55
+ /** Extra classes on the input. */
51
56
  class?: string;
57
+ /** Accessible name when there is no visible label. */
52
58
  'aria-label'?: string;
59
+ /** Id of the element that names the field. */
53
60
  'aria-labelledby'?: string;
61
+ /** Id(s) of help or error text for the field. */
54
62
  'aria-describedby'?: string;
63
+ /** Marks the field as required for screen readers. */
55
64
  'aria-required'?: boolean | 'true' | 'false';
56
65
  }
57
66
 
@@ -1,22 +1,55 @@
1
1
  import { type SelectOption } from '../../utils/selectOptions.js';
2
2
  interface Props {
3
+ /** The options, optionally with a `description` and a `group`. */
3
4
  options: SelectOption[];
4
5
  /** The chosen option's value; '' (or any unknown value) is "nothing chosen". */
5
6
  value?: string;
7
+ /** Runs with the new value when the user chooses an option. */
6
8
  onValueChange?: (value: string) => void;
9
+ /** Id of the input, for a `<label for>`. */
7
10
  id?: string;
11
+ /** Form field name. */
8
12
  name?: string;
13
+ /** Disables the field. */
9
14
  disabled?: boolean;
15
+ /** Shows the error border. */
10
16
  invalid?: boolean;
17
+ /** Field height, matching Button: `sm` 24, `md` 28, `lg` 32. */
11
18
  size?: 'sm' | 'md' | 'lg';
12
19
  /** Shown when nothing is chosen. */
13
20
  placeholder?: string;
21
+ /** Extra classes on the input. */
14
22
  class?: string;
23
+ /** Accessible name when there is no visible label. */
15
24
  'aria-label'?: string;
25
+ /** Id of the element that names the field. */
16
26
  'aria-labelledby'?: string;
27
+ /** Id(s) of help or error text for the field. */
17
28
  'aria-describedby'?: string;
29
+ /** Marks the field as required for screen readers. */
18
30
  'aria-required'?: boolean | 'true' | 'false';
19
31
  }
32
+ /**
33
+ * Combobox: the searchable rendering of `Select`.
34
+ *
35
+ * An ARIA 1.2 editable combobox with a listbox popup. The input keeps focus the whole time and
36
+ * the highlighted option is named by `aria-activedescendant`. Typing filters by label,
37
+ * description and group (every word has to match) and bolds what matched. A status line
38
+ * says "n of m". Options with a `group` are listed under their title.
39
+ *
40
+ * Keys: ArrowDown/ArrowUp open the list and move the highlight (disabled options are
41
+ * skipped), Home/End jump to the ends, Enter chooses, Escape closes and drops the query, Tab
42
+ * closes without choosing. A click outside closes it.
43
+ *
44
+ * Closed, the field shows the chosen label. Open, it is the search box and the label moves
45
+ * to the placeholder. The popup sits under the field and is as wide as it. It is not
46
+ * portalled, so a host that clips overflow clips it too (same as `Menu`).
47
+ *
48
+ * **Use it** through `Select`, which picks this rendering for long, grouped or described lists.
49
+ * **Not for** a short flat list; use `Select`, which then renders the browser's own `<select>`.
50
+ *
51
+ * Not exported from the package; the API may still change.
52
+ */
20
53
  declare const Combobox: import("svelte").Component<Props, {}, "">;
21
54
  type Combobox = ReturnType<typeof Combobox>;
22
55
  export default Combobox;
@@ -1,24 +1,23 @@
1
1
  <!--
2
- Composer — auto-growing message input with a send (or stop) button.
2
+ @component
3
+ Composer: an auto-growing message box with a send (or stop) button.
3
4
 
4
- The textarea grows from one 40px row up to `maxRows`, then scrolls. Enter
5
- sends, Shift+Enter inserts a newline, and Enter while an IME composition is
6
- active (`isComposing` / keyCode 229) never sends. The component does not
7
- clear `value` after sending; the caller decides (clear it in `onsubmit`).
5
+ The textarea grows from one row up to `maxRows`, then scrolls. Enter sends, Shift+Enter adds
6
+ a newline, and Enter during IME composition never sends. The component does not clear
7
+ `value` after sending; clear it in `onsubmit`.
8
8
 
9
- `busy` turns the send button into a stop button (`onstop`) and blocks
10
- submitting. The long placeholder is truncated with an ellipsis on one line
11
- instead of being clipped mid-line.
9
+ `busy` turns send into stop (`onstop`) and blocks sending. The stop button stays enabled
10
+ even when `disabled` is set, so a run in flight can always be stopped. `sendDisabled` blocks
11
+ send on top of the built-in checks, and `sendLabel` renames the button.
12
12
 
13
- A host can intercept keys (`onkeydown` runs first; `preventDefault()` there
14
- keeps the composer's own Enter handling out), listen to `oninput` / `onblur`,
15
- and set extra attributes on the textarea (`inputProps`, e.g. combobox ARIA for
16
- a command palette). `sendDisabled` blocks the send button on top of the
17
- built-in blank/busy/disabled checks, and `sendLabel` renames it ("Save & send").
18
- The stop button is never greyed out by `disabled`: a run in flight must stay
19
- stoppable while the field is locked.
13
+ A host can listen to keys (`onkeydown` runs first; `preventDefault()` keeps the composer's
14
+ own Enter handling out), `oninput` and `onblur`, and set extra textarea attributes with
15
+ `inputProps` (for example combobox ARIA for a command palette).
20
16
 
21
- @internal Not exported from any package entry; the API may still change.
17
+ **Use it for** the Playground chat, the AI assistant and the Console prompt.
18
+ **Not for** a short single-line field; use a plain input inside `Field`.
19
+
20
+ Not exported from the package; the API may still change.
22
21
  -->
23
22
 
24
23
  <script lang="ts">
@@ -42,6 +42,26 @@ interface Props {
42
42
  /** Extra classes on the root. */
43
43
  class?: string;
44
44
  }
45
+ /**
46
+ * Composer: an auto-growing message box with a send (or stop) button.
47
+ *
48
+ * The textarea grows from one row up to `maxRows`, then scrolls. Enter sends, Shift+Enter adds
49
+ * a newline, and Enter during IME composition never sends. The component does not clear
50
+ * `value` after sending; clear it in `onsubmit`.
51
+ *
52
+ * `busy` turns send into stop (`onstop`) and blocks sending. The stop button stays enabled
53
+ * even when `disabled` is set, so a run in flight can always be stopped. `sendDisabled` blocks
54
+ * send on top of the built-in checks, and `sendLabel` renames the button.
55
+ *
56
+ * A host can listen to keys (`onkeydown` runs first; `preventDefault()` keeps the composer's
57
+ * own Enter handling out), `oninput` and `onblur`, and set extra textarea attributes with
58
+ * `inputProps` (for example combobox ARIA for a command palette).
59
+ *
60
+ * **Use it for** the Playground chat, the AI assistant and the Console prompt.
61
+ * **Not for** a short single-line field; use a plain input inside `Field`.
62
+ *
63
+ * Not exported from the package; the API may still change.
64
+ */
45
65
  declare const Composer: import("svelte").Component<Props, {}, "value" | "element">;
46
66
  type Composer = ReturnType<typeof Composer>;
47
67
  export default Composer;
@@ -1,8 +1,14 @@
1
1
  <!--
2
- EmptyState — a quiet, centred "nothing here yet" block: optional icon,
3
- title, description and an actions row.
2
+ @component
3
+ EmptyState: a quiet, centred "nothing here yet" block with an optional icon, title,
4
+ description and actions row.
4
5
 
5
- @internal Not exported from any package entry; the API may still change.
6
+ `size="sm"` is for lists and small panels (the runs list uses it); `md` is for a whole pane.
7
+
8
+ **Use it for** an empty list or panel, and say what the user can do next.
9
+ **Not for** an error or a warning; use `Notice`.
10
+
11
+ Not exported from the package; the API may still change.
6
12
  -->
7
13
 
8
14
  <script lang="ts">
@@ -13,6 +13,17 @@ interface Props {
13
13
  /** Extra classes on the root. */
14
14
  class?: string;
15
15
  }
16
+ /**
17
+ * EmptyState: a quiet, centred "nothing here yet" block with an optional icon, title,
18
+ * description and actions row.
19
+ *
20
+ * `size="sm"` is for lists and small panels (the runs list uses it); `md` is for a whole pane.
21
+ *
22
+ * **Use it for** an empty list or panel, and say what the user can do next.
23
+ * **Not for** an error or a warning; use `Notice`.
24
+ *
25
+ * Not exported from the package; the API may still change.
26
+ */
16
27
  declare const EmptyState: import("svelte").Component<Props, {}, "">;
17
28
  type EmptyState = ReturnType<typeof EmptyState>;
18
29
  export default EmptyState;
@@ -1,16 +1,19 @@
1
1
  <!--
2
- Field — wraps one form control with its label, type tag, help and error.
2
+ @component
3
+ Field: one form control with its label, type tag, help text and error.
3
4
 
4
- The control is the caller's: `children` receives `{ id, describedBy, invalid }`
5
- so the caller puts `id`, `aria-describedby` and `aria-invalid` on its own
6
- input. Help and error are both announced (both ids are in `describedBy`);
7
- the error is shown in the error colour. `required`
8
- shows a marker next to the label (the caller sets the control's `required`).
5
+ The control is yours. `children` receives `{ id, describedBy, invalid }`; put `id`,
6
+ `aria-describedby` and `aria-invalid` on your own input. Help and error are both announced
7
+ (both ids are in `describedBy`) and the error shows in the error colour. `required` shows
8
+ a marker next to the label (set `required` on the control yourself).
9
9
 
10
- `examples` renders a row of small mono buttons; clicking one calls
11
- `onexample(value)` (e.g. to fill a JSON field from the interface definition).
10
+ `examples` renders a row of small buttons; clicking one calls `onexample(value)`, for
11
+ example to fill a JSON field from the interface definition.
12
12
 
13
- @internal Not exported from any package entry; the API may still change.
13
+ **Use it for** every labelled input in a config form.
14
+ **Not for** a checkbox or switch that carries its own label.
15
+
16
+ Not exported from the package; the API may still change.
14
17
  -->
15
18
 
16
19
  <script lang="ts">
@@ -25,6 +25,22 @@ interface Props {
25
25
  invalid: boolean;
26
26
  }]>;
27
27
  }
28
+ /**
29
+ * Field: one form control with its label, type tag, help text and error.
30
+ *
31
+ * The control is yours. `children` receives `{ id, describedBy, invalid }`; put `id`,
32
+ * `aria-describedby` and `aria-invalid` on your own input. Help and error are both announced
33
+ * (both ids are in `describedBy`) and the error shows in the error colour. `required` shows
34
+ * a marker next to the label (set `required` on the control yourself).
35
+ *
36
+ * `examples` renders a row of small buttons; clicking one calls `onexample(value)`, for
37
+ * example to fill a JSON field from the interface definition.
38
+ *
39
+ * **Use it for** every labelled input in a config form.
40
+ * **Not for** a checkbox or switch that carries its own label.
41
+ *
42
+ * Not exported from the package; the API may still change.
43
+ */
28
44
  declare const Field: import("svelte").Component<Props, {}, "">;
29
45
  type Field = ReturnType<typeof Field>;
30
46
  export default Field;
@@ -1,11 +1,16 @@
1
1
  <!--
2
- IconButton primitive — square, icon-only button (variant x size x state).
2
+ @component
3
+ IconButton: a square, icon-only button.
3
4
 
4
- `ariaLabel` is required because there is no visible text. `active` renders a
5
- toggle (aria-pressed). Heights/widths come from --fd-control-sm / -md. The
6
- legacy `components/IconButton.svelte` is untouched.
5
+ `ariaLabel` is required because there is no visible text. Pass `active` (true or false)
6
+ to make it a toggle; it then exposes `aria-pressed`. Sizes are 24px (`sm`) and 28px
7
+ (`md`); the editor uses `sm` in rows and panel headers.
8
+ It is the library's only icon button.
7
9
 
8
- @internal Not exported from any package entry; not public API yet.
10
+ **Use it for** close, delete, move up/down, show/hide and other single-glyph actions.
11
+ **Not for** an action that needs a text label; use `Button`.
12
+
13
+ Not exported from the package; internal to the editor.
9
14
  -->
10
15
 
11
16
  <script lang="ts">
@@ -22,6 +22,19 @@ interface Props extends Omit<HTMLButtonAttributes, 'children' | 'class' | 'type'
22
22
  /** The glyph (icon, inline SVG or character) */
23
23
  children: Snippet;
24
24
  }
25
+ /**
26
+ * IconButton: a square, icon-only button.
27
+ *
28
+ * `ariaLabel` is required because there is no visible text. Pass `active` (true or false)
29
+ * to make it a toggle; it then exposes `aria-pressed`. Sizes are 24px (`sm`) and 28px
30
+ * (`md`); the editor uses `sm` in rows and panel headers.
31
+ * It is the library's only icon button.
32
+ *
33
+ * **Use it for** close, delete, move up/down, show/hide and other single-glyph actions.
34
+ * **Not for** an action that needs a text label; use `Button`.
35
+ *
36
+ * Not exported from the package; internal to the editor.
37
+ */
25
38
  declare const IconButton: import("svelte").Component<Props, {}, "">;
26
39
  type IconButton = ReturnType<typeof IconButton>;
27
40
  export default IconButton;
@@ -1,22 +1,23 @@
1
1
  <!--
2
- Menu — a dropdown menu: a trigger button and a popup of items.
2
+ @component
3
+ Menu: a dropdown with a trigger button and a popup of items.
3
4
 
4
- Items come from `items` (declarative: actions, checkable and radio items,
5
- separators, group labels) and/or free-form `children` (which receives
6
- `close`; any element with `role="menuitem"`, `menuitemcheckbox` or
7
- `menuitemradio` takes part in keyboard navigation).
5
+ Items come from `items` (actions, checkable and radio items, separators, group labels)
6
+ and/or from free-form `children`, which receive `close`. Any element with
7
+ `role="menuitem"`, `menuitemcheckbox` or `menuitemradio` joins keyboard navigation.
8
8
 
9
- Keyboard: Enter / Space / ArrowDown open it and focus the first item (ArrowUp
10
- the last); ArrowUp / ArrowDown / Home / End move between items (disabled ones
11
- are skipped); typing a character jumps to the next item starting with it;
12
- Escape closes it and returns focus to the trigger (the event stops there, the
13
- editor clears the selection on Escape); Tab closes it. A click outside closes
14
- it without taking focus back.
9
+ Keys: Enter, Space or ArrowDown open it and focus the first item (ArrowUp the last).
10
+ Arrow keys, Home and End move between items (disabled ones are skipped). Typing jumps to
11
+ the next item that starts with that letter. Escape closes it and returns focus to the
12
+ trigger. Tab closes it. A click outside closes it without taking focus back.
15
13
 
16
- The trigger is an `IconButton` showing `⋯` unless `trigger` (the content of
17
- the trigger button) is given; `triggerClass` styles that custom button.
14
+ The trigger is an `IconButton` showing the three dots, unless you pass a `trigger` snippet.
15
+ The editor uses `size="sm"` and `align="end"` for row menus.
18
16
 
19
- @internal Not exported from any package entry; the API may still change.
17
+ **Use it for** a list of actions behind one control.
18
+ **Not for** choosing a value for a field; use `Select`.
19
+
20
+ Not exported from the package; the API may still change.
20
21
  -->
21
22
 
22
23
  <script lang="ts" module>
@@ -56,6 +56,26 @@ interface Props {
56
56
  /** Extra classes on the root. */
57
57
  class?: string;
58
58
  }
59
+ /**
60
+ * Menu: a dropdown with a trigger button and a popup of items.
61
+ *
62
+ * Items come from `items` (actions, checkable and radio items, separators, group labels)
63
+ * and/or from free-form `children`, which receive `close`. Any element with
64
+ * `role="menuitem"`, `menuitemcheckbox` or `menuitemradio` joins keyboard navigation.
65
+ *
66
+ * Keys: Enter, Space or ArrowDown open it and focus the first item (ArrowUp the last).
67
+ * Arrow keys, Home and End move between items (disabled ones are skipped). Typing jumps to
68
+ * the next item that starts with that letter. Escape closes it and returns focus to the
69
+ * trigger. Tab closes it. A click outside closes it without taking focus back.
70
+ *
71
+ * The trigger is an `IconButton` showing the three dots, unless you pass a `trigger` snippet.
72
+ * The editor uses `size="sm"` and `align="end"` for row menus.
73
+ *
74
+ * **Use it for** a list of actions behind one control.
75
+ * **Not for** choosing a value for a field; use `Select`.
76
+ *
77
+ * Not exported from the package; the API may still change.
78
+ */
59
79
  declare const Menu: import("svelte").Component<Props, {}, "open">;
60
80
  type Menu = ReturnType<typeof Menu>;
61
81
  export default Menu;
@@ -1,14 +1,17 @@
1
1
  <!--
2
- Notice — inline message (info / success / warning / error) with optional
3
- title, body, actions and a dismiss button.
2
+ @component
3
+ Notice: an inline message (info, success, warning or error) with an optional title, body,
4
+ actions and a dismiss button.
4
5
 
5
- ARIA: error and warning use role="alert" (assertive: the user has to act or
6
- has just lost something); info and success use role="status" (polite: nothing
7
- to interrupt for). Override with `role` when a notice that is rendered on
8
- load (a persistent warning, say) should not be announced: pass "status" or
9
- "note".
6
+ Error and warning use `role="alert"` (read out at once: the user has to act or just lost
7
+ something). Info and success use `role="status"` (polite). Pass `role` to change that: a
8
+ warning that is on screen from the start should be `"status"` or `"note"` so it is not
9
+ announced on load.
10
10
 
11
- @internal Not exported from any package entry; the API may still change.
11
+ **Use it for** a message that belongs to a part of the page: a failed save, a missing setting.
12
+ **Not for** an empty list; use `EmptyState`. Not for run status; use `StatusPill`.
13
+
14
+ Not exported from the package; the API may still change.
12
15
  -->
13
16
 
14
17
  <script lang="ts">
@@ -17,6 +17,20 @@ interface Props {
17
17
  /** Extra classes on the root. */
18
18
  class?: string;
19
19
  }
20
+ /**
21
+ * Notice: an inline message (info, success, warning or error) with an optional title, body,
22
+ * actions and a dismiss button.
23
+ *
24
+ * Error and warning use `role="alert"` (read out at once: the user has to act or just lost
25
+ * something). Info and success use `role="status"` (polite). Pass `role` to change that: a
26
+ * warning that is on screen from the start should be `"status"` or `"note"` so it is not
27
+ * announced on load.
28
+ *
29
+ * **Use it for** a message that belongs to a part of the page: a failed save, a missing setting.
30
+ * **Not for** an empty list; use `EmptyState`. Not for run status; use `StatusPill`.
31
+ *
32
+ * Not exported from the package; the API may still change.
33
+ */
20
34
  declare const Notice: import("svelte").Component<Props, {}, "">;
21
35
  type Notice = ReturnType<typeof Notice>;
22
36
  export default Notice;
@@ -1,13 +1,16 @@
1
1
  <!--
2
- PanelHeader — the 40px strip at the top of a panel (docked Playground, AI
3
- chat, Console, inspector/settings sheet).
2
+ @component
3
+ PanelHeader: the 40px strip at the top of a panel (Playground, AI chat, Console, inspector).
4
4
 
5
- Left: a `title` string or a free-form `leading` snippet (a workflow chip, a
6
- back button...). Right: an `actions` snippet. An optional `subtitle` sits
7
- under the title in smaller muted type. The title is a real heading
8
- (`as`, default h2) styled small, so panels stay navigable by heading.
5
+ Left side: a `title` string, or a free-form `leading` snippet (a workflow chip, a back
6
+ button). Right side: an `actions` snippet. An optional `subtitle` sits under the title.
7
+ The title is a real heading (`as`, default h2) drawn small, so panels stay easy to
8
+ navigate with a screen reader.
9
9
 
10
- @internal Not exported from any package entry; the API may still change.
10
+ **Use it for** the top of a docked panel or a sheet.
11
+ **Not for** a section title inside a form; use a heading or `Field`.
12
+
13
+ Not exported from the package; the API may still change.
11
14
  -->
12
15
 
13
16
  <script lang="ts">
@@ -18,6 +18,19 @@ interface Props extends Omit<HTMLAttributes<HTMLElement>, 'class' | 'title' | 'c
18
18
  /** Extra classes on the root. */
19
19
  class?: string;
20
20
  }
21
+ /**
22
+ * PanelHeader: the 40px strip at the top of a panel (Playground, AI chat, Console, inspector).
23
+ *
24
+ * Left side: a `title` string, or a free-form `leading` snippet (a workflow chip, a back
25
+ * button). Right side: an `actions` snippet. An optional `subtitle` sits under the title.
26
+ * The title is a real heading (`as`, default h2) drawn small, so panels stay easy to
27
+ * navigate with a screen reader.
28
+ *
29
+ * **Use it for** the top of a docked panel or a sheet.
30
+ * **Not for** a section title inside a form; use a heading or `Field`.
31
+ *
32
+ * Not exported from the package; the API may still change.
33
+ */
21
34
  declare const PanelHeader: import("svelte").Component<Props, {}, "">;
22
35
  type PanelHeader = ReturnType<typeof PanelHeader>;
23
36
  export default PanelHeader;
@@ -1,10 +1,17 @@
1
1
  <!--
2
- Segmented primitive — a single-choice switch (e.g. Edit | Test).
2
+ @component
3
+ Segmented: a switch that picks one option, for example Edit | Test.
3
4
 
4
- role="radiogroup" with role="radio" items and a roving tabindex: Tab enters on
5
- the selected option, Left/Right (Up/Down) move and select, Home/End jump.
5
+ `role="radiogroup"` with `role="radio"` items. Tab enters on the selected option; Left/Right
6
+ (or Up/Down) move and select; Home/End jump to the ends.
6
7
 
7
- @internal Not exported from any package entry; not public API yet.
8
+ **Segmented, Tabs or Toolbar?** Use Segmented to switch a MODE (Edit | Test). Use `Tabs` to
9
+ switch a VIEW of the same content (Form | JSON | Steps). Use `Toolbar` to group several
10
+ different controls so arrow keys move between them.
11
+
12
+ `float` draws the switch as its own floating control, as in the canvas toolbar.
13
+
14
+ Not exported from the package; not public API yet.
8
15
  -->
9
16
 
10
17
  <script lang="ts">
@@ -27,6 +27,20 @@ interface Props {
27
27
  /** Extra classes appended to the root */
28
28
  class?: string;
29
29
  }
30
+ /**
31
+ * Segmented: a switch that picks one option, for example Edit | Test.
32
+ *
33
+ * `role="radiogroup"` with `role="radio"` items. Tab enters on the selected option; Left/Right
34
+ * (or Up/Down) move and select; Home/End jump to the ends.
35
+ *
36
+ * **Segmented, Tabs or Toolbar?** Use Segmented to switch a MODE (Edit | Test). Use `Tabs` to
37
+ * switch a VIEW of the same content (Form | JSON | Steps). Use `Toolbar` to group several
38
+ * different controls so arrow keys move between them.
39
+ *
40
+ * `float` draws the switch as its own floating control, as in the canvas toolbar.
41
+ *
42
+ * Not exported from the package; not public API yet.
43
+ */
30
44
  declare const Segmented: import("svelte").Component<Props, {}, "value">;
31
45
  type Segmented = ReturnType<typeof Segmented>;
32
46
  export default Segmented;
@@ -1,24 +1,21 @@
1
1
  <!--
2
- Select — typed wrapper over the shared `.flowdrop-input` system (base.css).
2
+ @component
3
+ Select: a dropdown that picks one value from a list.
3
4
 
4
- One API, two renderings. Give it `options` and it picks: a short, flat list of
5
- plain options (10 or fewer, no groups, no descriptions) is the browser's own
6
- `<select>`; anything longer, grouped or described is a searchable `Combobox`
7
- (filter as you type, highlighted matches, "n of m", grouped). `searchable`
8
- forces one rendering or the other. See `utils/selectOptions.ts`.
5
+ One API, two renderings. Give it `options` and it chooses. A short, flat list of plain
6
+ options (10 or fewer, no groups, no descriptions) is the browser's own `<select>`.
7
+ A longer, grouped or described list becomes a searchable `Combobox` (type to filter, matches
8
+ highlighted, "n of m"). `searchable` forces one or the other. Without `options`, pass
9
+ `<option>` and `<optgroup>` children; that is always the native rendering.
9
10
 
10
- Native rendering: the field shell (`.flowdrop-input .flowdrop-input--select`)
11
- plus a built-in chevron overlay (`.flowdrop-select-wrap`), so selects match the
12
- exact look of Input/Textarea. Where the browser supports
13
- `appearance: base-select` its list is styled to match (base.css); elsewhere
14
- it keeps the platform's list, which follows the editor's `color-scheme`.
15
- Native attributes (value, disabled, id, aria-*, onchange…) forward to the
16
- underlying <select>.
11
+ The native rendering uses the same field look as Input and Textarea (base.css), with a
12
+ built-in chevron. Native attributes (`value`, `disabled`, `id`, `aria-*`, `onchange`) go to
13
+ the underlying `<select>`. `onValueChange` runs with the new value in either rendering.
17
14
 
18
- Without `options`, pass <option>/<optgroup> as children: that is always the
19
- native rendering (there is nothing to search).
15
+ **Use it for** choosing one value in a config form.
16
+ **Not for** a list of actions; use `Menu`. Not for a two or three way mode; use `Segmented`.
20
17
 
21
- Internal for now; see Button.svelte / Input.svelte for the pattern.
18
+ Not exported from the package; internal for now.
22
19
  -->
23
20
 
24
21
  <script lang="ts">
@@ -21,6 +21,24 @@ interface Props extends Omit<HTMLSelectAttributes, 'size' | 'children' | 'value'
21
21
  /** Shown in the closed field when nothing is selected. */
22
22
  placeholder?: string;
23
23
  }
24
+ /**
25
+ * Select: a dropdown that picks one value from a list.
26
+ *
27
+ * One API, two renderings. Give it `options` and it chooses. A short, flat list of plain
28
+ * options (10 or fewer, no groups, no descriptions) is the browser's own `<select>`.
29
+ * A longer, grouped or described list becomes a searchable `Combobox` (type to filter, matches
30
+ * highlighted, "n of m"). `searchable` forces one or the other. Without `options`, pass
31
+ * `<option>` and `<optgroup>` children; that is always the native rendering.
32
+ *
33
+ * The native rendering uses the same field look as Input and Textarea (base.css), with a
34
+ * built-in chevron. Native attributes (`value`, `disabled`, `id`, `aria-*`, `onchange`) go to
35
+ * the underlying `<select>`. `onValueChange` runs with the new value in either rendering.
36
+ *
37
+ * **Use it for** choosing one value in a config form.
38
+ * **Not for** a list of actions; use `Menu`. Not for a two or three way mode; use `Segmented`.
39
+ *
40
+ * Not exported from the package; internal for now.
41
+ */
24
42
  declare const Select: import("svelte").Component<Props, {}, "">;
25
43
  type Select = ReturnType<typeof Select>;
26
44
  export default Select;