@flowdrop/flowdrop 2.12.0 → 2.14.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 (298) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/dist/commands/executor.js +58 -8
  3. package/dist/commands/parser.js +3 -3
  4. package/dist/commands/types.d.ts +2 -0
  5. package/dist/components/App.svelte +11 -1
  6. package/dist/components/App.svelte.d.ts +9 -1
  7. package/dist/components/Button.svelte +7 -7
  8. package/dist/components/Button.svelte.d.ts +10 -0
  9. package/dist/components/CanvasBanner.svelte +19 -6
  10. package/dist/components/CanvasBanner.svelte.d.ts +15 -3
  11. package/dist/components/CanvasContextMenu.svelte +9 -9
  12. package/dist/components/CanvasContextMenu.svelte.d.ts +10 -0
  13. package/dist/components/CanvasToolbar.svelte +8 -7
  14. package/dist/components/CanvasToolbar.svelte.d.ts +10 -0
  15. package/dist/components/CanvasZoomControls.svelte +10 -9
  16. package/dist/components/CanvasZoomControls.svelte.d.ts +13 -0
  17. package/dist/components/ConfigForm.svelte +9 -17
  18. package/dist/components/ConfigForm.svelte.d.ts +10 -0
  19. package/dist/components/ConfigPanel.svelte +9 -5
  20. package/dist/components/ConfigPanel.svelte.d.ts +10 -0
  21. package/dist/components/EditorStatusBar.svelte +6 -5
  22. package/dist/components/EditorStatusBar.svelte.d.ts +7 -0
  23. package/dist/components/FlowDropEdge.svelte +15 -12
  24. package/dist/components/FlowDropEdge.svelte.d.ts +16 -0
  25. package/dist/components/InterfaceTag.svelte +13 -15
  26. package/dist/components/InterfaceTag.svelte.d.ts +19 -0
  27. package/dist/components/LoadingSpinner.svelte +8 -2
  28. package/dist/components/LoadingSpinner.svelte.d.ts +9 -0
  29. package/dist/components/Logo.svelte +11 -0
  30. package/dist/components/Logo.svelte.d.ts +9 -0
  31. package/dist/components/LogoWordmark.svelte +8 -3
  32. package/dist/components/LogoWordmark.svelte.d.ts +9 -0
  33. package/dist/components/LoopbackLanes.svelte +12 -6
  34. package/dist/components/LoopbackLanes.svelte.d.ts +13 -0
  35. package/dist/components/MarkdownDisplay.svelte +10 -3
  36. package/dist/components/MarkdownDisplay.svelte.d.ts +11 -0
  37. package/dist/components/Navbar.svelte +13 -5
  38. package/dist/components/Navbar.svelte.d.ts +14 -0
  39. package/dist/components/NodeInspector.svelte +7 -8
  40. package/dist/components/NodeInspector.svelte.d.ts +10 -0
  41. package/dist/components/NodeSidebar.svelte +9 -3
  42. package/dist/components/NodeSidebar.svelte.d.ts +10 -0
  43. package/dist/components/NodeStatusOverlay.svelte +30 -19
  44. package/dist/components/NodeStatusOverlay.svelte.d.ts +19 -0
  45. package/dist/components/NodeSwapPicker.svelte +1 -1
  46. package/dist/components/RunBar.svelte +10 -13
  47. package/dist/components/RunBar.svelte.d.ts +15 -0
  48. package/dist/components/RunsMenu.svelte +14 -13
  49. package/dist/components/RunsMenu.svelte.d.ts +15 -0
  50. package/dist/components/SchemaForm.svelte +10 -13
  51. package/dist/components/SchemaForm.svelte.d.ts +51 -0
  52. package/dist/components/SettingsPanel.svelte +5 -5
  53. package/dist/components/StatusIcon.svelte +14 -3
  54. package/dist/components/StatusIcon.svelte.d.ts +15 -0
  55. package/dist/components/StatusLabel.svelte +10 -2
  56. package/dist/components/StatusLabel.svelte.d.ts +11 -0
  57. package/dist/components/ThemeToggle.svelte +8 -5
  58. package/dist/components/ThemeToggle.svelte.d.ts +10 -0
  59. package/dist/components/UniversalNode.svelte +13 -5
  60. package/dist/components/UniversalNode.svelte.d.ts +15 -0
  61. package/dist/components/WorkflowInterfaceEntryCard.svelte +1 -1
  62. package/dist/components/WorkflowInterfaceEntryComposer.svelte +1 -2
  63. package/dist/components/ZoomTier.svelte +13 -10
  64. package/dist/components/ZoomTier.svelte.d.ts +14 -0
  65. package/dist/components/console/CommandConsole.svelte +9 -3
  66. package/dist/components/console/CommandConsole.svelte.d.ts +10 -0
  67. package/dist/components/console/ConsoleAutocomplete.svelte +4 -4
  68. package/dist/components/console/ConsoleAutocomplete.svelte.d.ts +5 -0
  69. package/dist/components/console/ConsoleInput.svelte +6 -4
  70. package/dist/components/console/ConsoleInput.svelte.d.ts +7 -0
  71. package/dist/components/console/ConsoleOutput.svelte +5 -3
  72. package/dist/components/console/ConsoleOutput.svelte.d.ts +6 -0
  73. package/dist/components/console/ConsoleStrip.svelte +9 -5
  74. package/dist/components/console/ConsoleStrip.svelte.d.ts +10 -0
  75. package/dist/components/form/FieldFactory.svelte +6 -2
  76. package/dist/components/form/FieldFactory.svelte.d.ts +46 -0
  77. package/dist/components/form/FormArray.svelte +9 -16
  78. package/dist/components/form/FormArray.svelte.d.ts +10 -0
  79. package/dist/components/form/FormArrayRows.svelte +8 -8
  80. package/dist/components/form/FormArrayRows.svelte.d.ts +11 -0
  81. package/dist/components/form/FormAutocomplete.svelte +6 -3
  82. package/dist/components/form/FormAutocomplete.svelte.d.ts +23 -0
  83. package/dist/components/form/FormCheckboxGroup.svelte +5 -5
  84. package/dist/components/form/FormCheckboxGroup.svelte.d.ts +6 -0
  85. package/dist/components/form/FormCodeEditor.svelte +8 -13
  86. package/dist/components/form/FormCodeEditor.svelte.d.ts +9 -0
  87. package/dist/components/form/FormField.svelte +7 -8
  88. package/dist/components/form/FormField.svelte.d.ts +10 -0
  89. package/dist/components/form/FormFieldLight.svelte +6 -5
  90. package/dist/components/form/FormFieldLight.svelte.d.ts +8 -0
  91. package/dist/components/form/FormFieldWrapper.svelte +8 -8
  92. package/dist/components/form/FormFieldWrapper.svelte.d.ts +9 -0
  93. package/dist/components/form/FormFieldset.svelte +6 -12
  94. package/dist/components/form/FormFieldset.svelte.d.ts +7 -0
  95. package/dist/components/form/FormMarkdownEditor.svelte +8 -15
  96. package/dist/components/form/FormMarkdownEditor.svelte.d.ts +9 -0
  97. package/dist/components/form/FormNumberField.svelte +5 -7
  98. package/dist/components/form/FormNumberField.svelte.d.ts +6 -0
  99. package/dist/components/form/FormPorts.svelte +133 -27
  100. package/dist/components/form/FormPorts.svelte.d.ts +19 -0
  101. package/dist/components/form/FormRangeField.svelte +5 -9
  102. package/dist/components/form/FormRangeField.svelte.d.ts +6 -0
  103. package/dist/components/form/FormSelect.svelte +5 -7
  104. package/dist/components/form/FormSelect.svelte.d.ts +6 -0
  105. package/dist/components/form/FormTemplateEditor.svelte +8 -16
  106. package/dist/components/form/FormTemplateEditor.svelte.d.ts +9 -0
  107. package/dist/components/form/FormTextField.svelte +5 -7
  108. package/dist/components/form/FormTextField.svelte.d.ts +6 -0
  109. package/dist/components/form/FormTextarea.svelte +5 -7
  110. package/dist/components/form/FormTextarea.svelte.d.ts +6 -0
  111. package/dist/components/form/FormToggle.svelte +6 -8
  112. package/dist/components/form/FormToggle.svelte.d.ts +7 -0
  113. package/dist/components/form/FormUISchemaRenderer.svelte +5 -9
  114. package/dist/components/form/FormUISchemaRenderer.svelte.d.ts +7 -0
  115. package/dist/components/interrupt/ChoicePrompt.svelte +6 -6
  116. package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +7 -0
  117. package/dist/components/interrupt/ConfirmationPrompt.svelte +6 -5
  118. package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +7 -0
  119. package/dist/components/interrupt/FormPrompt.svelte +6 -6
  120. package/dist/components/interrupt/FormPrompt.svelte.d.ts +7 -0
  121. package/dist/components/interrupt/InterruptBubble.svelte +10 -9
  122. package/dist/components/interrupt/InterruptBubble.svelte.d.ts +11 -0
  123. package/dist/components/interrupt/ReviewPrompt.svelte +5 -6
  124. package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +7 -0
  125. package/dist/components/interrupt/TextInputPrompt.svelte +6 -6
  126. package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +7 -0
  127. package/dist/components/nodes/AtomNode.svelte +31 -6
  128. package/dist/components/nodes/AtomNode.svelte.d.ts +15 -0
  129. package/dist/components/nodes/CaptionNode.svelte +50 -7
  130. package/dist/components/nodes/CaptionNode.svelte.d.ts +13 -0
  131. package/dist/components/nodes/GatewayNode.svelte +18 -11
  132. package/dist/components/nodes/GatewayNode.svelte.d.ts +21 -0
  133. package/dist/components/nodes/IdeaNode.svelte +47 -6
  134. package/dist/components/nodes/IdeaNode.svelte.d.ts +17 -0
  135. package/dist/components/nodes/NodeCard.svelte +26 -18
  136. package/dist/components/nodes/NodeCard.svelte.d.ts +20 -0
  137. package/dist/components/nodes/NodeConfigButton.svelte +15 -2
  138. package/dist/components/nodes/NodeConfigButton.svelte.d.ts +11 -0
  139. package/dist/components/nodes/NodeProblemMark.svelte +15 -10
  140. package/dist/components/nodes/NodeProblemMark.svelte.d.ts +16 -0
  141. package/dist/components/nodes/NodeTip.svelte +10 -7
  142. package/dist/components/nodes/NodeTip.svelte.d.ts +13 -0
  143. package/dist/components/nodes/NotesNode.svelte +30 -0
  144. package/dist/components/nodes/NotesNode.svelte.d.ts +14 -0
  145. package/dist/components/nodes/SimpleNode.svelte +35 -8
  146. package/dist/components/nodes/SimpleNode.svelte.d.ts +17 -0
  147. package/dist/components/nodes/SquareNode.svelte +38 -8
  148. package/dist/components/nodes/SquareNode.svelte.d.ts +17 -0
  149. package/dist/components/nodes/TerminalNode.svelte +24 -10
  150. package/dist/components/nodes/TerminalNode.svelte.d.ts +17 -0
  151. package/dist/components/nodes/ToolNode.svelte +14 -5
  152. package/dist/components/nodes/ToolNode.svelte.d.ts +15 -0
  153. package/dist/components/nodes/WorkflowNode.svelte +18 -15
  154. package/dist/components/nodes/WorkflowNode.svelte.d.ts +21 -0
  155. package/dist/components/playground/ChatBubble.svelte +4 -3
  156. package/dist/components/playground/ChatBubble.svelte.d.ts +5 -0
  157. package/dist/components/playground/ChatInput.svelte +11 -6
  158. package/dist/components/playground/ChatInput.svelte.d.ts +14 -0
  159. package/dist/components/playground/ChatPanel.svelte +15 -7
  160. package/dist/components/playground/ChatPanel.svelte.d.ts +17 -0
  161. package/dist/components/playground/ControlPanel.svelte +26 -9
  162. package/dist/components/playground/ControlPanel.svelte.d.ts +29 -0
  163. package/dist/components/playground/DockedPlayground.svelte +15 -11
  164. package/dist/components/playground/DockedPlayground.svelte.d.ts +16 -0
  165. package/dist/components/playground/ExecutionConsole.svelte +10 -5
  166. package/dist/components/playground/ExecutionConsole.svelte.d.ts +12 -0
  167. package/dist/components/playground/ExecutionList.svelte +13 -0
  168. package/dist/components/playground/ExecutionList.svelte.d.ts +11 -0
  169. package/dist/components/playground/ExecutionLogs.svelte +6 -9
  170. package/dist/components/playground/ExecutionLogs.svelte.d.ts +7 -0
  171. package/dist/components/playground/HeaderMenu.svelte +6 -8
  172. package/dist/components/playground/HeaderMenu.svelte.d.ts +9 -0
  173. package/dist/components/playground/HierarchyTrail.svelte +6 -6
  174. package/dist/components/playground/HierarchyTrail.svelte.d.ts +8 -0
  175. package/dist/components/playground/InputCollector.svelte +6 -5
  176. package/dist/components/playground/InputCollector.svelte.d.ts +7 -0
  177. package/dist/components/playground/InputFields.svelte +8 -12
  178. package/dist/components/playground/InputFields.svelte.d.ts +9 -0
  179. package/dist/components/playground/InterfaceInputForm.svelte +6 -13
  180. package/dist/components/playground/InterfaceInputForm.svelte.d.ts +9 -0
  181. package/dist/components/playground/InterfaceJsonInput.svelte +6 -5
  182. package/dist/components/playground/InterfaceJsonInput.svelte.d.ts +8 -0
  183. package/dist/components/playground/LogRow.svelte +4 -5
  184. package/dist/components/playground/LogRow.svelte.d.ts +6 -0
  185. package/dist/components/playground/MessageBubble.svelte +13 -7
  186. package/dist/components/playground/MessageBubble.svelte.d.ts +15 -0
  187. package/dist/components/playground/MessageCard.svelte +5 -2
  188. package/dist/components/playground/MessageCard.svelte.d.ts +6 -0
  189. package/dist/components/playground/MessageMarkdown.svelte +8 -9
  190. package/dist/components/playground/MessageMarkdown.svelte.d.ts +11 -0
  191. package/dist/components/playground/MessageNotice.svelte +7 -0
  192. package/dist/components/playground/MessageNotice.svelte.d.ts +5 -0
  193. package/dist/components/playground/MessageStream.svelte +8 -6
  194. package/dist/components/playground/MessageStream.svelte.d.ts +11 -0
  195. package/dist/components/playground/MessageTagChip.svelte +7 -7
  196. package/dist/components/playground/MessageTagChip.svelte.d.ts +10 -0
  197. package/dist/components/playground/MessageTagStrip.svelte +6 -3
  198. package/dist/components/playground/MessageTagStrip.svelte.d.ts +8 -0
  199. package/dist/components/playground/OriginBadge.svelte +7 -4
  200. package/dist/components/playground/OriginBadge.svelte.d.ts +8 -0
  201. package/dist/components/playground/PipelineKanbanView.svelte +14 -0
  202. package/dist/components/playground/PipelineKanbanView.svelte.d.ts +12 -0
  203. package/dist/components/playground/PipelinePanel.svelte +14 -0
  204. package/dist/components/playground/PipelinePanel.svelte.d.ts +12 -0
  205. package/dist/components/playground/PipelineTableView.svelte +14 -0
  206. package/dist/components/playground/PipelineTableView.svelte.d.ts +12 -0
  207. package/dist/components/playground/Playground.svelte +17 -11
  208. package/dist/components/playground/Playground.svelte.d.ts +20 -0
  209. package/dist/components/playground/PlaygroundApp.svelte +24 -10
  210. package/dist/components/playground/PlaygroundApp.svelte.d.ts +26 -0
  211. package/dist/components/playground/PlaygroundHeader.svelte +8 -12
  212. package/dist/components/playground/PlaygroundHeader.svelte.d.ts +11 -0
  213. package/dist/components/playground/PlaygroundModal.svelte +6 -8
  214. package/dist/components/playground/PlaygroundModal.svelte.d.ts +7 -0
  215. package/dist/components/playground/PlaygroundStudio.svelte +9 -0
  216. package/dist/components/playground/PlaygroundStudio.svelte.d.ts +7 -0
  217. package/dist/components/playground/PlaygroundSurface.svelte +19 -14
  218. package/dist/components/playground/PlaygroundSurface.svelte.d.ts +20 -0
  219. package/dist/components/playground/SessionManager.svelte +6 -5
  220. package/dist/components/playground/SessionManager.svelte.d.ts +7 -0
  221. package/dist/components/playground/StepsSummary.svelte +8 -9
  222. package/dist/components/playground/StepsSummary.svelte.d.ts +10 -0
  223. package/dist/components/primitives/Button.svelte +15 -7
  224. package/dist/components/primitives/Button.svelte.d.ts +18 -1
  225. package/dist/components/primitives/Card.svelte +8 -6
  226. package/dist/components/primitives/Card.svelte.d.ts +11 -0
  227. package/dist/components/primitives/Checkbox.svelte +8 -5
  228. package/dist/components/primitives/Checkbox.svelte.d.ts +11 -0
  229. package/dist/components/primitives/Chip.svelte +8 -4
  230. package/dist/components/primitives/Chip.svelte.d.ts +11 -0
  231. package/dist/components/primitives/Combobox.svelte +27 -18
  232. package/dist/components/primitives/Combobox.svelte.d.ts +33 -0
  233. package/dist/components/primitives/Composer.svelte +15 -16
  234. package/dist/components/primitives/Composer.svelte.d.ts +20 -0
  235. package/dist/components/primitives/EmptyState.svelte +9 -3
  236. package/dist/components/primitives/EmptyState.svelte.d.ts +11 -0
  237. package/dist/components/primitives/Field.svelte +12 -9
  238. package/dist/components/primitives/Field.svelte.d.ts +16 -0
  239. package/dist/components/primitives/IconButton.svelte +10 -5
  240. package/dist/components/primitives/IconButton.svelte.d.ts +13 -0
  241. package/dist/components/primitives/Menu.svelte +15 -14
  242. package/dist/components/primitives/Menu.svelte.d.ts +20 -0
  243. package/dist/components/primitives/Notice.svelte +11 -8
  244. package/dist/components/primitives/Notice.svelte.d.ts +14 -0
  245. package/dist/components/primitives/PanelHeader.svelte +10 -7
  246. package/dist/components/primitives/PanelHeader.svelte.d.ts +13 -0
  247. package/dist/components/primitives/Segmented.svelte +11 -4
  248. package/dist/components/primitives/Segmented.svelte.d.ts +14 -0
  249. package/dist/components/primitives/Select.svelte +13 -16
  250. package/dist/components/primitives/Select.svelte.d.ts +18 -0
  251. package/dist/components/primitives/StatusPill.svelte +11 -8
  252. package/dist/components/primitives/StatusPill.svelte.d.ts +15 -0
  253. package/dist/components/primitives/Switch.svelte +9 -6
  254. package/dist/components/primitives/Switch.svelte.d.ts +12 -0
  255. package/dist/components/primitives/Tabs.svelte +16 -15
  256. package/dist/components/primitives/Tabs.svelte.d.ts +22 -0
  257. package/dist/components/primitives/Toolbar.svelte +14 -13
  258. package/dist/components/primitives/Toolbar.svelte.d.ts +18 -0
  259. package/dist/components/primitives/ToolbarSeparator.svelte +5 -4
  260. package/dist/components/primitives/ToolbarSeparator.svelte.d.ts +7 -0
  261. package/dist/core/index.d.ts +1 -1
  262. package/dist/core/index.js +1 -1
  263. package/dist/editor/index.d.ts +1 -0
  264. package/dist/layout/index.d.ts +1 -1
  265. package/dist/layout/index.js +1 -1
  266. package/dist/layout/toWorkflow.d.ts +8 -7
  267. package/dist/layout/toWorkflow.js +20 -40
  268. package/dist/messages/defaults.d.ts +24 -0
  269. package/dist/messages/defaults.js +15 -0
  270. package/dist/playground/index.d.ts +1 -1
  271. package/dist/skins/graphite.d.ts +1 -1
  272. package/dist/skins/graphite.js +1 -1
  273. package/dist/stores/settingsStore.svelte.js +3 -0
  274. package/dist/stores/workflowStore.svelte.js +24 -7
  275. package/dist/styles/base.css +2 -126
  276. package/dist/styles/tokenAliases.js +1 -0
  277. package/dist/styles/tokens.css +9 -5
  278. package/dist/svelte-app.d.ts +10 -1
  279. package/dist/svelte-app.js +2 -1
  280. package/dist/themes/classic.d.ts +9 -0
  281. package/dist/themes/classic.js +16 -0
  282. package/dist/themes/index.d.ts +7 -2
  283. package/dist/themes/index.js +20 -10
  284. package/dist/types/index.d.ts +7 -0
  285. package/dist/types/playground.d.ts +9 -0
  286. package/dist/types/settings.d.ts +6 -2
  287. package/dist/types/theme.d.ts +6 -2
  288. package/dist/utils/playgroundChat.d.ts +10 -0
  289. package/dist/utils/playgroundChat.js +25 -0
  290. package/dist/utils/portExposure.d.ts +24 -1
  291. package/dist/utils/portExposure.js +46 -13
  292. package/dist/utils/portUtils.d.ts +5 -1
  293. package/dist/utils/portUtils.js +15 -4
  294. package/package.json +2 -1
  295. package/dist/components/IconButton.svelte +0 -80
  296. package/dist/components/IconButton.svelte.d.ts +0 -30
  297. package/dist/themes/default.d.ts +0 -2
  298. package/dist/themes/default.js +0 -9
@@ -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;
@@ -1,15 +1,18 @@
1
1
  <!--
2
- StatusPill — compact run-status chip: icon + label (+ optional count).
2
+ @component
3
+ StatusPill: a compact run-status chip with an icon, a label and an optional count.
3
4
 
4
- Colours come from the --fd-status-* tokens. Not a live region on purpose: a
5
- canvas can carry dozens of pills and each status change would be announced;
6
- the pill is plain text with an accessible name instead. Screen readers reach
7
- the status through the node it belongs to.
5
+ Colours come from the `--fd-status-*` tokens. It is not a live region on purpose: a canvas
6
+ can carry dozens of pills, and each change would be announced. Screen readers reach the
7
+ status through the node it belongs to.
8
8
 
9
- With `screenSize`, the pill counter-scales against the canvas zoom so it stays
10
- readable when zoomed out (it is meant to sit centred on a node's top edge).
9
+ With `screenSize`, the pill scales against the canvas zoom so it stays readable when the
10
+ canvas is zoomed out. It is meant to sit centred on a node's top edge.
11
11
 
12
- @internal Not exported from any package entry; the API may still change.
12
+ **Use it for** the run status of a node or a run on the canvas.
13
+ **Not for** a free-form tag; use `Chip`.
14
+
15
+ Not exported from the package; the API may still change.
13
16
  -->
14
17
 
15
18
  <script module lang="ts">
@@ -19,6 +19,21 @@ interface Props {
19
19
  /** Extra classes on the root. */
20
20
  class?: string;
21
21
  }
22
+ /**
23
+ * StatusPill: a compact run-status chip with an icon, a label and an optional count.
24
+ *
25
+ * Colours come from the `--fd-status-*` tokens. It is not a live region on purpose: a canvas
26
+ * can carry dozens of pills, and each change would be announced. Screen readers reach the
27
+ * status through the node it belongs to.
28
+ *
29
+ * With `screenSize`, the pill scales against the canvas zoom so it stays readable when the
30
+ * canvas is zoomed out. It is meant to sit centred on a node's top edge.
31
+ *
32
+ * **Use it for** the run status of a node or a run on the canvas.
33
+ * **Not for** a free-form tag; use `Chip`.
34
+ *
35
+ * Not exported from the package; the API may still change.
36
+ */
22
37
  declare const StatusPill: import("svelte").Component<Props, {}, "">;
23
38
  type StatusPill = ReturnType<typeof StatusPill>;
24
39
  export default StatusPill;
@@ -1,12 +1,15 @@
1
1
  <!--
2
- Switch — an on/off control (28×16 track, round thumb).
2
+ @component
3
+ Switch: an on/off control with a 28x16 track and a round thumb.
3
4
 
4
- A real checkbox with `role="switch"`, so keyboard, form and screen-reader
5
- behaviour come from the browser. No state word: the on state is the track
6
- colour and `aria-checked`. Name it with `label` (visually hidden) or by
7
- putting it inside / next to a <label for={id}>.
5
+ A real checkbox with `role="switch"`, so keyboard, form and screen-reader behaviour come
6
+ from the browser. There is no state word: the track colour and `aria-checked` show the
7
+ state. Name it with `label` (hidden visually) or put it next to a `<label for={id}>`.
8
8
 
9
- @internal Not exported from any package entry; the API may still change.
9
+ **Use it for** a setting that takes effect right away.
10
+ **Not for** an option that is saved later with a form; use `Checkbox`.
11
+
12
+ Not exported from the package; the API may still change.
10
13
  -->
11
14
 
12
15
  <script lang="ts">
@@ -9,6 +9,18 @@ interface Props extends Omit<HTMLInputAttributes, 'type' | 'checked' | 'onchange
9
9
  /** Extra classes on the root. */
10
10
  class?: string;
11
11
  }
12
+ /**
13
+ * Switch: an on/off control with a 28x16 track and a round thumb.
14
+ *
15
+ * A real checkbox with `role="switch"`, so keyboard, form and screen-reader behaviour come
16
+ * from the browser. There is no state word: the track colour and `aria-checked` show the
17
+ * state. Name it with `label` (hidden visually) or put it next to a `<label for={id}>`.
18
+ *
19
+ * **Use it for** a setting that takes effect right away.
20
+ * **Not for** an option that is saved later with a form; use `Checkbox`.
21
+ *
22
+ * Not exported from the package; the API may still change.
23
+ */
12
24
  declare const Switch: import("svelte").Component<Props, {}, "">;
13
25
  type Switch = ReturnType<typeof Switch>;
14
26
  export default Switch;
@@ -1,24 +1,24 @@
1
1
  <!--
2
- Tabs — underline tabs for switching a VIEW (role="tablist" / "tab") with a
3
- roving tabindex. A MODE switch (Edit | Test) is a Segmented control instead:
4
- these are the two selected-tab styles of the editor chrome.
2
+ @component
3
+ Tabs: underline tabs for switching a VIEW (`role="tablist"` / `"tab"`).
5
4
 
6
- Tab stop is the selected tab; Left/Right (Up/Down) move focus AND select
7
- (automatic activation), Home/End jump. The selected tab is
8
- drawn in ink with a 2px underline; the others are muted, with no fill.
5
+ **Tabs, Segmented or Toolbar?** Use Tabs for views of the same content (Form | JSON | Steps).
6
+ Use `Segmented` to switch a MODE (Edit | Test). Use `Toolbar` to group different controls
7
+ for arrow-key navigation.
9
8
 
10
- Panels are the caller's job. Wire them with the exported helpers, using the
11
- same `idBase` you pass here:
9
+ The tab stop is the selected tab. Left/Right (or Up/Down) move focus and select at once;
10
+ Home/End jump. The selected tab is drawn in ink with a 2px underline; the others are muted.
12
11
 
13
- <Tabs idBase="pg" tabs={tabs} bind:value ariaLabel="Views" />
14
- <div role="tabpanel" id={tabPanelId('pg', value)}
15
- aria-labelledby={tabId('pg', value)} tabindex="0">...</div>
12
+ Panels are yours. Wire them with the exported helpers, using the same `idBase` you pass here:
16
13
 
17
- Each tab carries `id={tabId(idBase, value)}` and
18
- `aria-controls={tabPanelId(idBase, value)}`. Without `idBase` an id is
19
- generated, which the caller cannot know: pass `idBase` whenever panels exist.
14
+ <Tabs idBase="pg" tabs={tabs} bind:value ariaLabel="Views" />
15
+ <div role="tabpanel" id={tabPanelId('pg', value)}
16
+ aria-labelledby={tabId('pg', value)} tabindex="0">...</div>
20
17
 
21
- @internal Not exported from any package entry; the API may still change.
18
+ Each tab has `id={tabId(idBase, value)}` and `aria-controls={tabPanelId(idBase, value)}`.
19
+ Without `idBase` an id is generated that you cannot know, so pass `idBase` whenever panels exist.
20
+
21
+ Not exported from the package; the API may still change.
22
22
  -->
23
23
 
24
24
  <script lang="ts" module>
@@ -47,6 +47,7 @@
47
47
  }
48
48
 
49
49
  interface Props {
50
+ /** The tabs, in order. */
50
51
  tabs: TabItem[];
51
52
  /** Selected tab value (bindable) */
52
53
  value?: string;
@@ -13,6 +13,7 @@ interface TabItem {
13
13
  count?: number;
14
14
  }
15
15
  interface Props {
16
+ /** The tabs, in order. */
16
17
  tabs: TabItem[];
17
18
  /** Selected tab value (bindable) */
18
19
  value?: string;
@@ -27,6 +28,27 @@ interface Props {
27
28
  /** Extra classes on the root */
28
29
  class?: string;
29
30
  }
31
+ /**
32
+ * Tabs: underline tabs for switching a VIEW (`role="tablist"` / `"tab"`).
33
+ *
34
+ * **Tabs, Segmented or Toolbar?** Use Tabs for views of the same content (Form | JSON | Steps).
35
+ * Use `Segmented` to switch a MODE (Edit | Test). Use `Toolbar` to group different controls
36
+ * for arrow-key navigation.
37
+ *
38
+ * The tab stop is the selected tab. Left/Right (or Up/Down) move focus and select at once;
39
+ * Home/End jump. The selected tab is drawn in ink with a 2px underline; the others are muted.
40
+ *
41
+ * Panels are yours. Wire them with the exported helpers, using the same `idBase` you pass here:
42
+ *
43
+ * <Tabs idBase="pg" tabs={tabs} bind:value ariaLabel="Views" />
44
+ * <div role="tabpanel" id={tabPanelId('pg', value)}
45
+ * aria-labelledby={tabId('pg', value)} tabindex="0">...</div>
46
+ *
47
+ * Each tab has `id={tabId(idBase, value)}` and `aria-controls={tabPanelId(idBase, value)}`.
48
+ * Without `idBase` an id is generated that you cannot know, so pass `idBase` whenever panels exist.
49
+ *
50
+ * Not exported from the package; the API may still change.
51
+ */
30
52
  declare const Tabs: import("svelte").Component<Props, {}, "value">;
31
53
  type Tabs = ReturnType<typeof Tabs>;
32
54
  export default Tabs;
@@ -1,20 +1,21 @@
1
1
  <!--
2
- Toolbar primitive — a bare row (or column) that groups canvas controls for
3
- keyboard navigation. It draws nothing itself: each control inside floats on its
4
- own (Segmented `float`, a FloatingControl, the run pill).
2
+ @component
3
+ Toolbar: a bare row (or column) that groups controls so arrow keys move between them.
5
4
 
6
- role="toolbar" with arrow-key navigation: arrow keys (Left/Right for
7
- horizontal, Up/Down for vertical), Home and End move between the focusable
8
- children. It is not a roving tabindex: every control keeps its own place in
9
- the Tab order (the children own their tabindex, and Segmented already roves
10
- its radios), so the arrows are a shortcut on top of Tab, not a replacement. Compose with Segmented, IconButton, Chip, and
11
- ToolbarSeparator. Native focusable elements only (buttons, links, inputs,
12
- elements with a non-negative tabindex).
5
+ It draws nothing itself; each control inside floats on its own. `role="toolbar"`: the arrow
6
+ keys (Left/Right when horizontal, Up/Down when vertical), Home and End move focus between
7
+ the focusable children. This is a shortcut on top of Tab, not a replacement: every control
8
+ keeps its place in the Tab order. A `Segmented` inside keeps its own arrow keys; the
9
+ toolbar skips events a child already handled.
13
10
 
14
- Note: a Segmented inside the toolbar keeps its own arrow-key handling; the
15
- toolbar skips events that a child already handled (defaultPrevented).
11
+ **Toolbar, Segmented or Tabs?** Toolbar groups several different controls. `Segmented` picks
12
+ a mode. `Tabs` picks a view.
16
13
 
17
- @internal Not exported from any package entry; not public API yet.
14
+ **Use it for** a group of buttons and switches. The real canvas toolbar is `CanvasToolbar`
15
+ (Editor/Canvas).
16
+ **Not for** drawing a bar; it has no surface of its own.
17
+
18
+ Not exported from the package; not public API yet.
18
19
  -->
19
20
 
20
21
  <script lang="ts">
@@ -9,6 +9,24 @@ interface Props {
9
9
  /** Toolbar content */
10
10
  children: Snippet;
11
11
  }
12
+ /**
13
+ * Toolbar: a bare row (or column) that groups controls so arrow keys move between them.
14
+ *
15
+ * It draws nothing itself; each control inside floats on its own. `role="toolbar"`: the arrow
16
+ * keys (Left/Right when horizontal, Up/Down when vertical), Home and End move focus between
17
+ * the focusable children. This is a shortcut on top of Tab, not a replacement: every control
18
+ * keeps its place in the Tab order. A `Segmented` inside keeps its own arrow keys; the
19
+ * toolbar skips events a child already handled.
20
+ *
21
+ * **Toolbar, Segmented or Tabs?** Toolbar groups several different controls. `Segmented` picks
22
+ * a mode. `Tabs` picks a view.
23
+ *
24
+ * **Use it for** a group of buttons and switches. The real canvas toolbar is `CanvasToolbar`
25
+ * (Editor/Canvas).
26
+ * **Not for** drawing a bar; it has no surface of its own.
27
+ *
28
+ * Not exported from the package; not public API yet.
29
+ */
12
30
  declare const Toolbar: import("svelte").Component<Props, {}, "">;
13
31
  type Toolbar = ReturnType<typeof Toolbar>;
14
32
  export default Toolbar;