@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.
- package/CHANGELOG.md +54 -0
- package/dist/commands/executor.js +58 -8
- package/dist/commands/parser.js +3 -3
- package/dist/commands/types.d.ts +2 -0
- package/dist/components/App.svelte +11 -1
- package/dist/components/App.svelte.d.ts +9 -1
- package/dist/components/Button.svelte +7 -7
- package/dist/components/Button.svelte.d.ts +10 -0
- package/dist/components/CanvasBanner.svelte +19 -6
- package/dist/components/CanvasBanner.svelte.d.ts +15 -3
- package/dist/components/CanvasContextMenu.svelte +9 -9
- package/dist/components/CanvasContextMenu.svelte.d.ts +10 -0
- package/dist/components/CanvasToolbar.svelte +8 -7
- package/dist/components/CanvasToolbar.svelte.d.ts +10 -0
- package/dist/components/CanvasZoomControls.svelte +10 -9
- package/dist/components/CanvasZoomControls.svelte.d.ts +13 -0
- package/dist/components/ConfigForm.svelte +9 -17
- package/dist/components/ConfigForm.svelte.d.ts +10 -0
- package/dist/components/ConfigPanel.svelte +9 -5
- package/dist/components/ConfigPanel.svelte.d.ts +10 -0
- package/dist/components/EditorStatusBar.svelte +6 -5
- package/dist/components/EditorStatusBar.svelte.d.ts +7 -0
- package/dist/components/FlowDropEdge.svelte +15 -12
- package/dist/components/FlowDropEdge.svelte.d.ts +16 -0
- package/dist/components/InterfaceTag.svelte +13 -15
- package/dist/components/InterfaceTag.svelte.d.ts +19 -0
- package/dist/components/LoadingSpinner.svelte +8 -2
- package/dist/components/LoadingSpinner.svelte.d.ts +9 -0
- package/dist/components/Logo.svelte +11 -0
- package/dist/components/Logo.svelte.d.ts +9 -0
- package/dist/components/LogoWordmark.svelte +8 -3
- package/dist/components/LogoWordmark.svelte.d.ts +9 -0
- package/dist/components/LoopbackLanes.svelte +12 -6
- package/dist/components/LoopbackLanes.svelte.d.ts +13 -0
- package/dist/components/MarkdownDisplay.svelte +10 -3
- package/dist/components/MarkdownDisplay.svelte.d.ts +11 -0
- package/dist/components/Navbar.svelte +13 -5
- package/dist/components/Navbar.svelte.d.ts +14 -0
- package/dist/components/NodeInspector.svelte +7 -8
- package/dist/components/NodeInspector.svelte.d.ts +10 -0
- package/dist/components/NodeSidebar.svelte +9 -3
- package/dist/components/NodeSidebar.svelte.d.ts +10 -0
- package/dist/components/NodeStatusOverlay.svelte +30 -19
- package/dist/components/NodeStatusOverlay.svelte.d.ts +19 -0
- package/dist/components/NodeSwapPicker.svelte +1 -1
- package/dist/components/RunBar.svelte +10 -13
- package/dist/components/RunBar.svelte.d.ts +15 -0
- package/dist/components/RunsMenu.svelte +14 -13
- package/dist/components/RunsMenu.svelte.d.ts +15 -0
- package/dist/components/SchemaForm.svelte +10 -13
- package/dist/components/SchemaForm.svelte.d.ts +51 -0
- package/dist/components/SettingsPanel.svelte +5 -5
- package/dist/components/StatusIcon.svelte +14 -3
- package/dist/components/StatusIcon.svelte.d.ts +15 -0
- package/dist/components/StatusLabel.svelte +10 -2
- package/dist/components/StatusLabel.svelte.d.ts +11 -0
- package/dist/components/ThemeToggle.svelte +8 -5
- package/dist/components/ThemeToggle.svelte.d.ts +10 -0
- package/dist/components/UniversalNode.svelte +13 -5
- package/dist/components/UniversalNode.svelte.d.ts +15 -0
- package/dist/components/WorkflowInterfaceEntryCard.svelte +1 -1
- package/dist/components/WorkflowInterfaceEntryComposer.svelte +1 -2
- package/dist/components/ZoomTier.svelte +13 -10
- package/dist/components/ZoomTier.svelte.d.ts +14 -0
- package/dist/components/console/CommandConsole.svelte +9 -3
- package/dist/components/console/CommandConsole.svelte.d.ts +10 -0
- package/dist/components/console/ConsoleAutocomplete.svelte +4 -4
- package/dist/components/console/ConsoleAutocomplete.svelte.d.ts +5 -0
- package/dist/components/console/ConsoleInput.svelte +6 -4
- package/dist/components/console/ConsoleInput.svelte.d.ts +7 -0
- package/dist/components/console/ConsoleOutput.svelte +5 -3
- package/dist/components/console/ConsoleOutput.svelte.d.ts +6 -0
- package/dist/components/console/ConsoleStrip.svelte +9 -5
- package/dist/components/console/ConsoleStrip.svelte.d.ts +10 -0
- package/dist/components/form/FieldFactory.svelte +6 -2
- package/dist/components/form/FieldFactory.svelte.d.ts +46 -0
- package/dist/components/form/FormArray.svelte +9 -16
- package/dist/components/form/FormArray.svelte.d.ts +10 -0
- package/dist/components/form/FormArrayRows.svelte +8 -8
- package/dist/components/form/FormArrayRows.svelte.d.ts +11 -0
- package/dist/components/form/FormAutocomplete.svelte +6 -3
- package/dist/components/form/FormAutocomplete.svelte.d.ts +23 -0
- package/dist/components/form/FormCheckboxGroup.svelte +5 -5
- package/dist/components/form/FormCheckboxGroup.svelte.d.ts +6 -0
- package/dist/components/form/FormCodeEditor.svelte +8 -13
- package/dist/components/form/FormCodeEditor.svelte.d.ts +9 -0
- package/dist/components/form/FormField.svelte +7 -8
- package/dist/components/form/FormField.svelte.d.ts +10 -0
- package/dist/components/form/FormFieldLight.svelte +6 -5
- package/dist/components/form/FormFieldLight.svelte.d.ts +8 -0
- package/dist/components/form/FormFieldWrapper.svelte +8 -8
- package/dist/components/form/FormFieldWrapper.svelte.d.ts +9 -0
- package/dist/components/form/FormFieldset.svelte +6 -12
- package/dist/components/form/FormFieldset.svelte.d.ts +7 -0
- package/dist/components/form/FormMarkdownEditor.svelte +8 -15
- package/dist/components/form/FormMarkdownEditor.svelte.d.ts +9 -0
- package/dist/components/form/FormNumberField.svelte +5 -7
- package/dist/components/form/FormNumberField.svelte.d.ts +6 -0
- package/dist/components/form/FormPorts.svelte +133 -27
- package/dist/components/form/FormPorts.svelte.d.ts +19 -0
- package/dist/components/form/FormRangeField.svelte +5 -9
- package/dist/components/form/FormRangeField.svelte.d.ts +6 -0
- package/dist/components/form/FormSelect.svelte +5 -7
- package/dist/components/form/FormSelect.svelte.d.ts +6 -0
- package/dist/components/form/FormTemplateEditor.svelte +8 -16
- package/dist/components/form/FormTemplateEditor.svelte.d.ts +9 -0
- package/dist/components/form/FormTextField.svelte +5 -7
- package/dist/components/form/FormTextField.svelte.d.ts +6 -0
- package/dist/components/form/FormTextarea.svelte +5 -7
- package/dist/components/form/FormTextarea.svelte.d.ts +6 -0
- package/dist/components/form/FormToggle.svelte +6 -8
- package/dist/components/form/FormToggle.svelte.d.ts +7 -0
- package/dist/components/form/FormUISchemaRenderer.svelte +5 -9
- package/dist/components/form/FormUISchemaRenderer.svelte.d.ts +7 -0
- package/dist/components/interrupt/ChoicePrompt.svelte +6 -6
- package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +7 -0
- package/dist/components/interrupt/ConfirmationPrompt.svelte +6 -5
- package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +7 -0
- package/dist/components/interrupt/FormPrompt.svelte +6 -6
- package/dist/components/interrupt/FormPrompt.svelte.d.ts +7 -0
- package/dist/components/interrupt/InterruptBubble.svelte +10 -9
- package/dist/components/interrupt/InterruptBubble.svelte.d.ts +11 -0
- package/dist/components/interrupt/ReviewPrompt.svelte +5 -6
- package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +7 -0
- package/dist/components/interrupt/TextInputPrompt.svelte +6 -6
- package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +7 -0
- package/dist/components/nodes/AtomNode.svelte +31 -6
- package/dist/components/nodes/AtomNode.svelte.d.ts +15 -0
- package/dist/components/nodes/CaptionNode.svelte +50 -7
- package/dist/components/nodes/CaptionNode.svelte.d.ts +13 -0
- package/dist/components/nodes/GatewayNode.svelte +18 -11
- package/dist/components/nodes/GatewayNode.svelte.d.ts +21 -0
- package/dist/components/nodes/IdeaNode.svelte +47 -6
- package/dist/components/nodes/IdeaNode.svelte.d.ts +17 -0
- package/dist/components/nodes/NodeCard.svelte +26 -18
- package/dist/components/nodes/NodeCard.svelte.d.ts +20 -0
- package/dist/components/nodes/NodeConfigButton.svelte +15 -2
- package/dist/components/nodes/NodeConfigButton.svelte.d.ts +11 -0
- package/dist/components/nodes/NodeProblemMark.svelte +15 -10
- package/dist/components/nodes/NodeProblemMark.svelte.d.ts +16 -0
- package/dist/components/nodes/NodeTip.svelte +10 -7
- package/dist/components/nodes/NodeTip.svelte.d.ts +13 -0
- package/dist/components/nodes/NotesNode.svelte +30 -0
- package/dist/components/nodes/NotesNode.svelte.d.ts +14 -0
- package/dist/components/nodes/SimpleNode.svelte +35 -8
- package/dist/components/nodes/SimpleNode.svelte.d.ts +17 -0
- package/dist/components/nodes/SquareNode.svelte +38 -8
- package/dist/components/nodes/SquareNode.svelte.d.ts +17 -0
- package/dist/components/nodes/TerminalNode.svelte +24 -10
- package/dist/components/nodes/TerminalNode.svelte.d.ts +17 -0
- package/dist/components/nodes/ToolNode.svelte +14 -5
- package/dist/components/nodes/ToolNode.svelte.d.ts +15 -0
- package/dist/components/nodes/WorkflowNode.svelte +18 -15
- package/dist/components/nodes/WorkflowNode.svelte.d.ts +21 -0
- package/dist/components/playground/ChatBubble.svelte +4 -3
- package/dist/components/playground/ChatBubble.svelte.d.ts +5 -0
- package/dist/components/playground/ChatInput.svelte +11 -6
- package/dist/components/playground/ChatInput.svelte.d.ts +14 -0
- package/dist/components/playground/ChatPanel.svelte +15 -7
- package/dist/components/playground/ChatPanel.svelte.d.ts +17 -0
- package/dist/components/playground/ControlPanel.svelte +26 -9
- package/dist/components/playground/ControlPanel.svelte.d.ts +29 -0
- package/dist/components/playground/DockedPlayground.svelte +15 -11
- package/dist/components/playground/DockedPlayground.svelte.d.ts +16 -0
- package/dist/components/playground/ExecutionConsole.svelte +10 -5
- package/dist/components/playground/ExecutionConsole.svelte.d.ts +12 -0
- package/dist/components/playground/ExecutionList.svelte +13 -0
- package/dist/components/playground/ExecutionList.svelte.d.ts +11 -0
- package/dist/components/playground/ExecutionLogs.svelte +6 -9
- package/dist/components/playground/ExecutionLogs.svelte.d.ts +7 -0
- package/dist/components/playground/HeaderMenu.svelte +6 -8
- package/dist/components/playground/HeaderMenu.svelte.d.ts +9 -0
- package/dist/components/playground/HierarchyTrail.svelte +6 -6
- package/dist/components/playground/HierarchyTrail.svelte.d.ts +8 -0
- package/dist/components/playground/InputCollector.svelte +6 -5
- package/dist/components/playground/InputCollector.svelte.d.ts +7 -0
- package/dist/components/playground/InputFields.svelte +8 -12
- package/dist/components/playground/InputFields.svelte.d.ts +9 -0
- package/dist/components/playground/InterfaceInputForm.svelte +6 -13
- package/dist/components/playground/InterfaceInputForm.svelte.d.ts +9 -0
- package/dist/components/playground/InterfaceJsonInput.svelte +6 -5
- package/dist/components/playground/InterfaceJsonInput.svelte.d.ts +8 -0
- package/dist/components/playground/LogRow.svelte +4 -5
- package/dist/components/playground/LogRow.svelte.d.ts +6 -0
- package/dist/components/playground/MessageBubble.svelte +13 -7
- package/dist/components/playground/MessageBubble.svelte.d.ts +15 -0
- package/dist/components/playground/MessageCard.svelte +5 -2
- package/dist/components/playground/MessageCard.svelte.d.ts +6 -0
- package/dist/components/playground/MessageMarkdown.svelte +8 -9
- package/dist/components/playground/MessageMarkdown.svelte.d.ts +11 -0
- package/dist/components/playground/MessageNotice.svelte +7 -0
- package/dist/components/playground/MessageNotice.svelte.d.ts +5 -0
- package/dist/components/playground/MessageStream.svelte +8 -6
- package/dist/components/playground/MessageStream.svelte.d.ts +11 -0
- package/dist/components/playground/MessageTagChip.svelte +7 -7
- package/dist/components/playground/MessageTagChip.svelte.d.ts +10 -0
- package/dist/components/playground/MessageTagStrip.svelte +6 -3
- package/dist/components/playground/MessageTagStrip.svelte.d.ts +8 -0
- package/dist/components/playground/OriginBadge.svelte +7 -4
- package/dist/components/playground/OriginBadge.svelte.d.ts +8 -0
- package/dist/components/playground/PipelineKanbanView.svelte +14 -0
- package/dist/components/playground/PipelineKanbanView.svelte.d.ts +12 -0
- package/dist/components/playground/PipelinePanel.svelte +14 -0
- package/dist/components/playground/PipelinePanel.svelte.d.ts +12 -0
- package/dist/components/playground/PipelineTableView.svelte +14 -0
- package/dist/components/playground/PipelineTableView.svelte.d.ts +12 -0
- package/dist/components/playground/Playground.svelte +17 -11
- package/dist/components/playground/Playground.svelte.d.ts +20 -0
- package/dist/components/playground/PlaygroundApp.svelte +24 -10
- package/dist/components/playground/PlaygroundApp.svelte.d.ts +26 -0
- package/dist/components/playground/PlaygroundHeader.svelte +8 -12
- package/dist/components/playground/PlaygroundHeader.svelte.d.ts +11 -0
- package/dist/components/playground/PlaygroundModal.svelte +6 -8
- package/dist/components/playground/PlaygroundModal.svelte.d.ts +7 -0
- package/dist/components/playground/PlaygroundStudio.svelte +9 -0
- package/dist/components/playground/PlaygroundStudio.svelte.d.ts +7 -0
- package/dist/components/playground/PlaygroundSurface.svelte +19 -14
- package/dist/components/playground/PlaygroundSurface.svelte.d.ts +20 -0
- package/dist/components/playground/SessionManager.svelte +6 -5
- package/dist/components/playground/SessionManager.svelte.d.ts +7 -0
- package/dist/components/playground/StepsSummary.svelte +8 -9
- package/dist/components/playground/StepsSummary.svelte.d.ts +10 -0
- package/dist/components/primitives/Button.svelte +15 -7
- package/dist/components/primitives/Button.svelte.d.ts +18 -1
- package/dist/components/primitives/Card.svelte +8 -6
- package/dist/components/primitives/Card.svelte.d.ts +11 -0
- package/dist/components/primitives/Checkbox.svelte +8 -5
- package/dist/components/primitives/Checkbox.svelte.d.ts +11 -0
- package/dist/components/primitives/Chip.svelte +8 -4
- package/dist/components/primitives/Chip.svelte.d.ts +11 -0
- package/dist/components/primitives/Combobox.svelte +27 -18
- package/dist/components/primitives/Combobox.svelte.d.ts +33 -0
- package/dist/components/primitives/Composer.svelte +15 -16
- package/dist/components/primitives/Composer.svelte.d.ts +20 -0
- package/dist/components/primitives/EmptyState.svelte +9 -3
- package/dist/components/primitives/EmptyState.svelte.d.ts +11 -0
- package/dist/components/primitives/Field.svelte +12 -9
- package/dist/components/primitives/Field.svelte.d.ts +16 -0
- package/dist/components/primitives/IconButton.svelte +10 -5
- package/dist/components/primitives/IconButton.svelte.d.ts +13 -0
- package/dist/components/primitives/Menu.svelte +15 -14
- package/dist/components/primitives/Menu.svelte.d.ts +20 -0
- package/dist/components/primitives/Notice.svelte +11 -8
- package/dist/components/primitives/Notice.svelte.d.ts +14 -0
- package/dist/components/primitives/PanelHeader.svelte +10 -7
- package/dist/components/primitives/PanelHeader.svelte.d.ts +13 -0
- package/dist/components/primitives/Segmented.svelte +11 -4
- package/dist/components/primitives/Segmented.svelte.d.ts +14 -0
- package/dist/components/primitives/Select.svelte +13 -16
- package/dist/components/primitives/Select.svelte.d.ts +18 -0
- package/dist/components/primitives/StatusPill.svelte +11 -8
- package/dist/components/primitives/StatusPill.svelte.d.ts +15 -0
- package/dist/components/primitives/Switch.svelte +9 -6
- package/dist/components/primitives/Switch.svelte.d.ts +12 -0
- package/dist/components/primitives/Tabs.svelte +16 -15
- package/dist/components/primitives/Tabs.svelte.d.ts +22 -0
- package/dist/components/primitives/Toolbar.svelte +14 -13
- package/dist/components/primitives/Toolbar.svelte.d.ts +18 -0
- package/dist/components/primitives/ToolbarSeparator.svelte +5 -4
- package/dist/components/primitives/ToolbarSeparator.svelte.d.ts +7 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/editor/index.d.ts +1 -0
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +1 -1
- package/dist/layout/toWorkflow.d.ts +8 -7
- package/dist/layout/toWorkflow.js +20 -40
- package/dist/messages/defaults.d.ts +24 -0
- package/dist/messages/defaults.js +15 -0
- package/dist/playground/index.d.ts +1 -1
- package/dist/skins/graphite.d.ts +1 -1
- package/dist/skins/graphite.js +1 -1
- package/dist/stores/settingsStore.svelte.js +3 -0
- package/dist/stores/workflowStore.svelte.js +24 -7
- package/dist/styles/base.css +2 -126
- package/dist/styles/tokenAliases.js +1 -0
- package/dist/styles/tokens.css +9 -5
- package/dist/svelte-app.d.ts +10 -1
- package/dist/svelte-app.js +2 -1
- package/dist/themes/classic.d.ts +9 -0
- package/dist/themes/classic.js +16 -0
- package/dist/themes/index.d.ts +7 -2
- package/dist/themes/index.js +20 -10
- package/dist/types/index.d.ts +7 -0
- package/dist/types/playground.d.ts +9 -0
- package/dist/types/settings.d.ts +6 -2
- package/dist/types/theme.d.ts +6 -2
- package/dist/utils/playgroundChat.d.ts +10 -0
- package/dist/utils/playgroundChat.js +25 -0
- package/dist/utils/portExposure.d.ts +24 -1
- package/dist/utils/portExposure.js +46 -13
- package/dist/utils/portUtils.d.ts +5 -1
- package/dist/utils/portUtils.js +15 -4
- package/package.json +2 -1
- package/dist/components/IconButton.svelte +0 -80
- package/dist/components/IconButton.svelte.d.ts +0 -30
- package/dist/themes/default.d.ts +0 -2
- package/dist/themes/default.js +0 -9
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
2
|
+
@component
|
|
3
|
+
Field: one form control with its label, type tag, help text and error.
|
|
3
4
|
|
|
4
|
-
The control is
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
|
11
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2
|
+
@component
|
|
3
|
+
IconButton: a square, icon-only button.
|
|
3
4
|
|
|
4
|
-
`ariaLabel` is required because there is no visible text. `active`
|
|
5
|
-
toggle
|
|
6
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2
|
+
@component
|
|
3
|
+
Menu: a dropdown with a trigger button and a popup of items.
|
|
3
4
|
|
|
4
|
-
Items come from `items` (
|
|
5
|
-
|
|
6
|
-
`
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
|
17
|
-
|
|
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
|
-
|
|
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
|
-
|
|
3
|
-
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
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
|
-
|
|
3
|
-
chat, Console, inspector
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2
|
+
@component
|
|
3
|
+
Segmented: a switch that picks one option, for example Edit | Test.
|
|
3
4
|
|
|
4
|
-
role="radiogroup" with role="radio" items
|
|
5
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
19
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
5
|
-
|
|
6
|
-
|
|
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
|
|
10
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
6
|
-
|
|
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
|
-
|
|
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
|
-
|
|
3
|
-
|
|
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
|
-
|
|
7
|
-
(
|
|
8
|
-
|
|
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
|
-
|
|
11
|
-
|
|
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
|
-
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
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
|
-
|
|
3
|
-
|
|
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"
|
|
7
|
-
horizontal, Up/Down
|
|
8
|
-
children.
|
|
9
|
-
the Tab order
|
|
10
|
-
|
|
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
|
-
|
|
15
|
-
|
|
11
|
+
**Toolbar, Segmented or Tabs?** Toolbar groups several different controls. `Segmented` picks
|
|
12
|
+
a mode. `Tabs` picks a view.
|
|
16
13
|
|
|
17
|
-
|
|
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;
|