@flowdrop/flowdrop 2.4.0 → 2.6.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 +49 -0
- package/dist/chat/commandClassifier.d.ts +17 -0
- package/dist/chat/commandClassifier.js +29 -0
- package/dist/chat/index.d.ts +1 -1
- package/dist/chat/index.js +1 -1
- package/dist/components/App.svelte +8 -0
- package/dist/components/BindablePortListbox.svelte +426 -0
- package/dist/components/BindablePortListbox.svelte.d.ts +23 -0
- package/dist/components/WorkflowInterfaceEditor.svelte +142 -36
- package/dist/components/WorkflowInterfaceEditor.svelte.d.ts +8 -0
- package/dist/components/WorkflowInterfaceEntryCard.svelte +537 -294
- package/dist/components/WorkflowInterfaceEntryCard.svelte.d.ts +6 -3
- package/dist/components/WorkflowInterfaceEntryComposer.svelte +331 -0
- package/dist/components/WorkflowInterfaceEntryComposer.svelte.d.ts +19 -0
- package/dist/config/defaultPortConfig.js +27 -9
- package/dist/messages/context.d.ts +6 -0
- package/dist/messages/context.js +8 -0
- package/dist/messages/defaults.d.ts +45 -2
- package/dist/messages/defaults.js +36 -3
- package/dist/messages/index.d.ts +1 -1
- package/dist/messages/index.js +1 -1
- package/dist/openapi/v1/openapi.yaml +14 -1
- package/dist/schemas/v1/workflow.schema.json +9 -2
- package/dist/stores/instanceContainer.svelte.d.ts +26 -0
- package/dist/stores/instanceContainer.svelte.js +24 -0
- package/dist/stories/WebMCPFakeAgent.svelte +229 -0
- package/dist/stories/WebMCPFakeAgent.svelte.d.ts +10 -0
- package/dist/styles/base.css +4 -2
- package/dist/styles/tokens.css +20 -0
- package/dist/svelte-app.d.ts +20 -0
- package/dist/svelte-app.js +49 -1
- package/dist/types/index.d.ts +26 -1
- package/dist/utils/focus.d.ts +18 -0
- package/dist/utils/focus.js +24 -0
- package/dist/utils/whenWorkflowLoaded.svelte.d.ts +17 -0
- package/dist/utils/whenWorkflowLoaded.svelte.js +42 -0
- package/dist/utils/workflowInterface.d.ts +47 -3
- package/dist/utils/workflowInterface.js +84 -9
- package/dist/webmcp/WebMCP.stories.svelte +101 -0
- package/dist/webmcp/WebMCP.stories.svelte.d.ts +18 -0
- package/dist/webmcp/WebMCPConfirm.svelte +170 -0
- package/dist/webmcp/WebMCPConfirm.svelte.d.ts +11 -0
- package/dist/webmcp/descriptors.d.ts +59 -0
- package/dist/webmcp/descriptors.js +464 -0
- package/dist/webmcp/fake.d.ts +23 -0
- package/dist/webmcp/fake.js +42 -0
- package/dist/webmcp/gate.d.ts +40 -0
- package/dist/webmcp/gate.js +92 -0
- package/dist/webmcp/index.d.ts +34 -0
- package/dist/webmcp/index.js +31 -0
- package/dist/webmcp/register.d.ts +33 -0
- package/dist/webmcp/register.js +267 -0
- package/dist/webmcp/types.d.ts +166 -0
- package/dist/webmcp/types.js +23 -0
- package/dist/webmcp/validate.d.ts +32 -0
- package/dist/webmcp/validate.js +118 -0
- package/package.json +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,55 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.6.0] - 2026-09-03
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **The editor's commands are now WebMCP editor tools.** A browser-resident agent — Chrome 149+ and Edge 150+ behind the WebMCP origin trial, Brave Leo, ChatGPT Desktop — can discover the open editor's tools on the page and drive it: `flowdrop_list_types`, `flowdrop_add_node`, `flowdrop_connect`, `flowdrop_set_config`, `flowdrop_info`, `flowdrop_undo`, a `flowdrop_batch` that runs several as one transaction, and the rest of the command layer; one tool per command, each with a JSON Schema derived from the `Command` union, so the agent gets structured errors and argument completion rather than a text grammar to guess at. New subpath **`@flowdrop/flowdrop/webmcp`**: `attachWebMCP(instance, { nodeTypes, … })` for Svelte hosts, and a **`webmcp: true | WebMCPMountOptions`** option on `mountFlowDropApp` for vanilla and Drupal hosts, which loads the adapter on demand so the core entry is unchanged. No-op in a browser without the API.
|
|
13
|
+
- **These are tools for editing a workflow in the browser.** They are unrelated to the tools a running workflow hands to an LLM node; the docs call them _editor tools_ and nothing else.
|
|
14
|
+
- **Reads run; changes ask.** Classification is the chat panel's `isMutatingCommand`, unchanged. A mutating call opens a confirm dialog inside the page listing exactly what will run, and nothing touches the workflow until the person at the keyboard clicks Apply. `approval: 'auto'` turns that off for hosts that already trust every agent on the page; `approval: (commands) => Promise<boolean>` plugs in your own gate. While one decision is pending a second mutating call is refused with `BUSY` — dialogs never stack. This matters because WebMCP's permission model is about which origins may _see_ tools, not whether a given call may change the user's document: any agent or extension on the page can call them.
|
|
15
|
+
- **Every call is one transaction and one undo step**, like an approved chat batch; a batch whose third command fails leaves the workflow exactly as it was and says so. The layout opt-out (`chatAllowLayoutChanges`) is honoured with the chat panel's wording — same setting, no new one.
|
|
16
|
+
- **`clear` is never exposed.** An agent can delete nodes one at a time and each deletion is gated. `help` is not exposed either; the schemas are the help. A test asserts every literal in the `Command` union is either mapped or on that exclusion list, so the next DSL verb cannot slip through unclassified.
|
|
17
|
+
- **Two editors on one page** need distinct `prefix`es; the second `attachWebMCP` with the same prefix throws rather than silently shadowing. Every tool description carries the workflow's name so an agent facing two editors can tell them apart.
|
|
18
|
+
- **`view` needs a host.** The `flowdrop_view` tool (select node, open config, zoom, pan) is registered only when `onUIAction` is supplied, because the mount path has no handler for it; the `webmcp` mount option therefore registers everything except `view`.
|
|
19
|
+
- The spec is an origin trial and has changed shape once already. The adapter probes `document.modelContext` and, structurally, the earlier `navigator.modelContext`; registers under an `AbortSignal` (the spec's only removal path) and also calls `unregisterTool` where a pre-spec runtime has one; and touches the runtime from one file. `createFakeModelContext()` is exported for hosts' own tests — CI has no browser agent, and neither does the storybook, which drives the tools from a fake-agent side panel instead.
|
|
20
|
+
- **A `view` call does not ask.** Selecting a node, opening its config panel, and moving the canvas viewport change what the editor shows and nothing in the workflow — there is nothing to undo — so they run without the dialog even under `approval: 'confirm'`. The classifier gained a third class for this, `isViewCommand()` and `VIEW_COMMAND_TYPES` in `@flowdrop/flowdrop/chat`; `isMutatingCommand()` is unchanged, so the AI Assistant panel still treats them as click-to-apply. `undo` and `redo` change the document and still ask. A batch that mixes view and change items asks once, for the whole batch, and lists every line.
|
|
21
|
+
- **`handle.tools` lists what the runtime accepted.** Registration is asynchronous in the spec, so the handle gained **`ready: Promise<void>`**, which resolves once every registration has settled; a tool the runtime refuses is warned about once through the library logger and never appears in `tools`. Hosts that only read `app.webmcp?.tools` after the fact need not care.
|
|
22
|
+
- **The `webmcp` mount option costs no request and no time.** `mountFlowDropApp` resolves as before; the adapter attaches in the background once the workflow is loaded and reads node types from the instance rather than fetching them a second time. `app.webmcp` is therefore `undefined` for a moment after mount even when the browser has the API. The **`nodeTypes` option of `attachWebMCP` is now optional** and defaults to the instance's list.
|
|
23
|
+
- **The confirm dialog is translatable.** Its four strings live under a new **`webmcp`** group in `defaultMessages` (`confirmTitle`, `confirmCount`, `reject`, `apply`); `attachWebMCP` and the `webmcp` mount option take a `messages` override in the same shape as the `messages` prop. The dialog also keeps focus inside itself — Tab moves between Reject and Apply, Escape rejects — instead of listening on the window.
|
|
24
|
+
- Every tool description names the workflow, so attachment waits until the workflow is loaded; the name is the one at attach time and a later rename is not re-registered.
|
|
25
|
+
- **`instance.onDestroy(fn)`** registers a callback for when a `FlowDropInstance` is destroyed and returns an unsubscribe. The WebMCP adapter uses it to detach itself; a host integration that binds to an instance can hook its own teardown there instead of wrapping `destroy`.
|
|
26
|
+
- **`instance.nodeTypes`** holds the node types the editor currently knows — what `App` fetched or was given, merged with the format-provided nodes — as a small store with `current` and `set()`. Anything outside the component tree that needs the list reads it here instead of fetching again.
|
|
27
|
+
|
|
28
|
+
- **"Add input" / "Add output" in the workflow interface editor opens an inline composer instead of dropping in a blank row.** A clearly separate two-step draft form asks first whether the new entry should bind to an existing port. _Yes_ opens a custom port picker: ports nothing is using yet are listed first under **Available**, then the ones that already have an edge or are already published, each row showing the port's type, `node › port`, description and a **Connected** / **Published as …** / **Required** badge — the metadata a native select cannot show — with a search box and full keyboard support (arrows, Home/End, Enter to add, Escape to close). Picking a port adds an entry pulled from it: bound, with name, type, description, required and default copied and the id seeded from the port's own id (suffixed if taken). _No_ adds an empty, unbound entry exactly as before. Two new pure helpers in `utils/workflowInterface`, `rankBindablePorts()` and `entryFromBindablePort()`, back the picker. Each row wears the same two chips a port row wears on the canvas — the shape symbol in the lane's colour and the outlined lane-name chip — so a candidate is recognisable as the port it points at, and the fixed-width symbol keeps the rows aligned. The editor takes an optional `checker` prop (`fd.portCompatibility`) for this, defaulting to a checker over the built-in port config.
|
|
29
|
+
- **An existing entry's "Bound port" is the same picker.** The native select and the separate "bound port, said back" line are one control now: a select-shaped button showing the bound port the way the canvas shows it — shape symbol, `node › port`, lane chip — that unfolds the same searchable, grouped listbox the composer uses, with the entry's own port marked **Current** and an **Unbind** action beside Cancel. A click binds and folds the picker away; a dangling binding shows its raw `node › port` ids in red. **Pull from port** moved into _More options_, the fields it fills. The listbox itself is a new component, `BindablePortListbox`, and `bindablePortKey()` in `utils/workflowInterface` is the key both callers compare bindings by.
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- **Each side of the interface ends in its insertion slot.** The **Add input** / **Add output** action left the section header for a dashed, full-width slot after the last entry — where the new entry will land — and the composer opens in that slot's place, so the draft sits exactly where the entry it becomes will sit. An empty side is now just its slot; the "No inputs declared yet." / "No outputs declared yet." placeholders are gone, and their message keys `workflowInterface.noInputs` / `noOutputs` with them. The `.wf-interface__add` class now names the slot, and `.wf-interface__empty` no longer exists.
|
|
34
|
+
- **The entry health dot is gone.** The small coloured circle beside each interface entry said what the card already says: a bad binding gets the card's error border and a sentence under the field or in the footer, and an entry that is fine says nothing — neutral is the good state. `.wf-interface__dot` no longer exists.
|
|
35
|
+
- **The workflow interface editor now looks like the rest of the settings panel.** Entries are cards on the panel's card surface, using the shared `Input`, `Select`, `Button` and `IconButton` controls and the settings form's label voice, so the Interface tab no longer reads as a foreign screen next to the Settings tab. A bound entry says its target back as a type chip and `node › port` line with the pull action beside it; the entry health dot has a soft halo; status messages are tinted callouts instead of bare coloured text; the empty state is a quiet dashed placeholder; section titles carry an inputs/outputs glyph and an entry count. Markup, message strings and the `wf-interface__*` class names are unchanged, so existing overrides and tests keep working.
|
|
36
|
+
- **A `tool` input can now be published in the workflow interface.** The binding picker in the interface editor offers a consumer node's `tool`-typed input (a ToolBox's or LLM node's `tools`) alongside data ports, so a parent workflow can hand its tools to a sub-workflow through the child's declared contract instead of the child carrying its own copy of every tool node. Tools are a typed argument of a workflow's execution (fddo DF9); the server decides what binding them means. `trigger` ports, the `loop_back` port and `tool` _outputs_ remain intra-graph control flow and stay out of the picker.
|
|
37
|
+
- **Small buttons are 28px.** `.flowdrop-btn--sm` was 32px tall while `IconButton`'s `sm` was 28px, so the two could not share a row without the caller overriding one of them; the interface editor had grown three such overrides. `.flowdrop-btn--sm` now sizes from the same token (`--fd-size-icon-btn`) with no block padding, and the overrides are gone. **Every `size="sm"` button in the library is 4px shorter** — the settings panel, the interface tab, the chat panel and the toolbar all use it.
|
|
38
|
+
|
|
39
|
+
- **Unit tests resolve Svelte's client build.** `vite.config.ts` sets `resolve.conditions: ['browser']` under Vitest, as the Svelte testing docs recommend; without it `mount()` resolved to the server build and threw `lifecycle_function_unavailable`. Existing suites are unaffected (1716 tests, all green); it is listed because it changes what a new component test can do.
|
|
40
|
+
|
|
41
|
+
## [2.5.0] - 2026-08-23
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
|
|
45
|
+
- **Six port lanes change colour, and two hues become reserved.** The lane palette had grown by accretion and had stopped carrying information: `file`/`file[]` wore red alongside `error`, so a failed run and a PDF read the same on the canvas; `video` and `messages` sat in the same family; `trigger` was purple, shared with `boolean`, and matched neither its own wire nor the colour the server sent. `tool` needed no move — it was already amber, and is now reserved there. The re-cut: **`file`/`file[]` red → teal**, **`video` teal → fuchsia**, **`messages` fuchsia → orange**, **`array` amber → violet**, **`trigger` purple → ink**. **This is a visible change on every canvas** — handles, chips and shape glyphs on those lanes are a different colour — and it is a change to `DEFAULT_PORT_CONFIG` only, so an app serving its own port config is untouched.
|
|
46
|
+
- **`--fd-node-red` is reserved for `error` and `--fd-node-amber` for `tool`.** Point a data lane at either and you undo the one distinction the palette exists to carry. `amber` and the new `ink` must also track their wires — `--fd-edge-tool` and `--fd-edge-trigger` — or an edge changes colour halfway along its length.
|
|
47
|
+
- The rule behind the rest: **a complex lane wears the hue of the shape it is made of.** `messages` joins `json`/`json[]` on orange because a message list is an array of objects; a _typed_ array inherits its element's hue (`string[]` emerald, `file[]` teal), which is why only the untyped `array` needs a token of its own; and an unclear shape falls back to the sink's slate. `docs/theming.md` now lists which lanes wear which token and states all of this, instead of printing a bare hex table.
|
|
48
|
+
- Two new tokens, both `@public`: **`--fd-node-violet`** (`#7c3aed` light, `#a78bfa` dark) for the untyped `array`, and **`--fd-node-ink`** for `trigger` — deliberately not a hue, resolving to `--_gray-9` / `--_gray-3` exactly as `--fd-edge-trigger` does. A fixed `#18181c` here disappears against the dark canvas.
|
|
49
|
+
- `flowdrop` (the Drupal module) moves its served payload identically, so an editor running against library defaults and one running against that payload agree on **all 24 lanes** — verified pairwise.
|
|
50
|
+
- Also documented in `docs/theming.md`, because it is the trap under all of this: if you redeclare `--fd-node-*` in a stylesheet that loads **after** this library's, redeclare the dark block too. A bare `:root` override loading later wins in both themes at equal specificity and silently flattens dark mode to the light values.
|
|
51
|
+
|
|
52
|
+
- **`WorkflowInterfaceEntry.schema` is a property fragment, not an object schema.** It was typed `InputSchema | OutputSchema` — a whole `{properties: {…}}` object — while nothing in the library populated it, which would have been wrong the moment something did. It is now `WorkflowInterfaceSchema` (`Partial<InputProperty>`): one port's JSON Schema fragment, every key optional, derived from the existing property type rather than restated. No runtime behaviour changes; nothing read or wrote this key.
|
|
53
|
+
|
|
54
|
+
- **The server's `dataType` on an interface entry is now the port's lane.** This library has always typed `WorkflowInterfaceEntry.dataType` as `NodeDataType` and rendered it through the lane-vocabulary picker, but fddo filled it with the fragment's JSON Schema `type` — so an `error` port arrived as `object` and a `messages` port as `array`, and the panel's lane chip contradicted the port the entry was bound to. fddo now sends the lane there and the JSON Schema fragment in `schema`. Nothing changes on this side of the wire; the values simply stop lying. **Needs a backend that serves it** — an older fddo still sends the JSON Schema word.
|
|
55
|
+
- Unchanged, and worth knowing: the server derives both keys from the bound inner port and **ignores them on write**. An author picking a lane in the interface panel is choosing a value the next read replaces. Persisting an author-chosen lane needs a server column that does not exist yet.
|
|
56
|
+
|
|
8
57
|
## [2.4.0] - 2026-08-23
|
|
9
58
|
|
|
10
59
|
### Added
|
|
@@ -28,3 +28,20 @@ export declare function isMutatingCommand(commandType: string): boolean;
|
|
|
28
28
|
* @returns true if the command repositions existing nodes
|
|
29
29
|
*/
|
|
30
30
|
export declare function isLayoutCommand(commandType: string): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Commands that drive the editor's *view* — selection, the config panel, the
|
|
33
|
+
* canvas viewport — and touch nothing in the workflow document.
|
|
34
|
+
*
|
|
35
|
+
* They are still mutating in {@link isMutatingCommand}'s sense (the chat panel
|
|
36
|
+
* keeps them click-to-apply), but a consumer that gates on "can this alter the
|
|
37
|
+
* user's document" can let them through: there is nothing to undo.
|
|
38
|
+
*/
|
|
39
|
+
export declare const VIEW_COMMAND_TYPES: readonly ["select_node", "config_open", "canvas_fit_view", "canvas_zoom_in", "canvas_zoom_out", "canvas_zoom_to", "canvas_pan_to", "canvas_reset_view"];
|
|
40
|
+
/**
|
|
41
|
+
* Determine whether a DSL command type only changes what the editor shows —
|
|
42
|
+
* selection, an open panel, the viewport — and leaves the workflow itself as it was.
|
|
43
|
+
*
|
|
44
|
+
* @param commandType - The command type string (e.g., "canvas_zoom_in")
|
|
45
|
+
* @returns true if the command changes the view and not the document
|
|
46
|
+
*/
|
|
47
|
+
export declare function isViewCommand(commandType: string): boolean;
|
|
@@ -48,3 +48,32 @@ const LAYOUT_COMMANDS = new Set(['auto_layout', 'beautify_layout']);
|
|
|
48
48
|
export function isLayoutCommand(commandType) {
|
|
49
49
|
return LAYOUT_COMMANDS.has(commandType);
|
|
50
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Commands that drive the editor's *view* — selection, the config panel, the
|
|
53
|
+
* canvas viewport — and touch nothing in the workflow document.
|
|
54
|
+
*
|
|
55
|
+
* They are still mutating in {@link isMutatingCommand}'s sense (the chat panel
|
|
56
|
+
* keeps them click-to-apply), but a consumer that gates on "can this alter the
|
|
57
|
+
* user's document" can let them through: there is nothing to undo.
|
|
58
|
+
*/
|
|
59
|
+
export const VIEW_COMMAND_TYPES = [
|
|
60
|
+
'select_node',
|
|
61
|
+
'config_open',
|
|
62
|
+
'canvas_fit_view',
|
|
63
|
+
'canvas_zoom_in',
|
|
64
|
+
'canvas_zoom_out',
|
|
65
|
+
'canvas_zoom_to',
|
|
66
|
+
'canvas_pan_to',
|
|
67
|
+
'canvas_reset_view'
|
|
68
|
+
];
|
|
69
|
+
const VIEW_COMMANDS = new Set(VIEW_COMMAND_TYPES);
|
|
70
|
+
/**
|
|
71
|
+
* Determine whether a DSL command type only changes what the editor shows —
|
|
72
|
+
* selection, an open panel, the viewport — and leaves the workflow itself as it was.
|
|
73
|
+
*
|
|
74
|
+
* @param commandType - The command type string (e.g., "canvas_zoom_in")
|
|
75
|
+
* @returns true if the command changes the view and not the document
|
|
76
|
+
*/
|
|
77
|
+
export function isViewCommand(commandType) {
|
|
78
|
+
return VIEW_COMMANDS.has(commandType);
|
|
79
|
+
}
|
package/dist/chat/index.d.ts
CHANGED
|
@@ -23,6 +23,6 @@
|
|
|
23
23
|
export { default as AIChatPanel } from '../components/chat/AIChatPanel.svelte';
|
|
24
24
|
export { default as CommandPreview } from '../components/chat/CommandPreview.svelte';
|
|
25
25
|
export { extractCommands } from './responseParser.js';
|
|
26
|
-
export { isMutatingCommand, isLayoutCommand } from './commandClassifier.js';
|
|
26
|
+
export { isMutatingCommand, isLayoutCommand, isViewCommand, VIEW_COMMAND_TYPES } from './commandClassifier.js';
|
|
27
27
|
export { buildApiHistory, type ChatLogEntry } from './historyBuilder.js';
|
|
28
28
|
export type { ChatMessageRole, ChatHistoryMessage, ChatRequest, ChatResponse, ExtractedCommands, CommandExecutionStatus, CommandPreviewItem } from '../types/chat.js';
|
package/dist/chat/index.js
CHANGED
|
@@ -29,5 +29,5 @@ export { default as CommandPreview } from '../components/chat/CommandPreview.sve
|
|
|
29
29
|
// Chat Utilities
|
|
30
30
|
// ============================================================================
|
|
31
31
|
export { extractCommands } from './responseParser.js';
|
|
32
|
-
export { isMutatingCommand, isLayoutCommand } from './commandClassifier.js';
|
|
32
|
+
export { isMutatingCommand, isLayoutCommand, isViewCommand, VIEW_COMMAND_TYPES } from './commandClassifier.js';
|
|
33
33
|
export { buildApiHistory } from './historyBuilder.js';
|
|
@@ -348,6 +348,13 @@
|
|
|
348
348
|
|
|
349
349
|
let nodes = $state<NodeMetadata[]>([]);
|
|
350
350
|
let nodeTypesLoading = $state<boolean>(true);
|
|
351
|
+
|
|
352
|
+
// The instance carries the list this editor knows, so code outside the
|
|
353
|
+
// component tree (the WebMCP adapter's list_types / add_node) reads what the
|
|
354
|
+
// editor fetched instead of fetching again.
|
|
355
|
+
$effect(() => {
|
|
356
|
+
fd.nodeTypes.set(nodes);
|
|
357
|
+
});
|
|
351
358
|
// Remove workflow prop - use global store directly
|
|
352
359
|
// let workflow = $derived($workflowStore || initialWorkflow);
|
|
353
360
|
let error = $state<string | null>(null);
|
|
@@ -1254,6 +1261,7 @@
|
|
|
1254
1261
|
<WorkflowInterfaceEditor
|
|
1255
1262
|
workflow={fd.workflow.current}
|
|
1256
1263
|
dataTypes={fd.portCompatibility.getEnabledDataTypes()}
|
|
1264
|
+
checker={fd.portCompatibility}
|
|
1257
1265
|
onChange={(next) => fd.workflow.batchUpdate({ interface: next })}
|
|
1258
1266
|
/>
|
|
1259
1267
|
{/if}
|
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
BindablePortListbox — the one place a workflow interface entry picks a port.
|
|
3
|
+
|
|
4
|
+
A searchable, grouped listbox over `rankBindablePorts()`: ports nothing is
|
|
5
|
+
using yet first, then the connected or already-published ones. Each row
|
|
6
|
+
wears the same two chips a port row wears on the canvas — the shape symbol
|
|
7
|
+
in the lane's colour and the outlined lane-name chip — so a candidate is
|
|
8
|
+
recognisable as the port it points at, and the fixed-width symbol keeps the
|
|
9
|
+
rows aligned whatever the type name's length.
|
|
10
|
+
|
|
11
|
+
Shared by the "Add input / Add output" composer (highlight, then a separate
|
|
12
|
+
Add button confirms) and by an existing entry's "Bound port" control (a
|
|
13
|
+
click confirms, like a select). The two differ only in `confirmOnClick`;
|
|
14
|
+
keyboard handling — arrows, Home/End, Enter to confirm, Escape to cancel —
|
|
15
|
+
lives on the listbox as a roving `aria-activedescendant`, so the options
|
|
16
|
+
themselves carry no key handlers.
|
|
17
|
+
|
|
18
|
+
Owns only the search query and the highlight. What a confirmed pick means
|
|
19
|
+
belongs to the caller.
|
|
20
|
+
-->
|
|
21
|
+
|
|
22
|
+
<script lang="ts">
|
|
23
|
+
import Icon from '@iconify/svelte';
|
|
24
|
+
import Input from './Input.svelte';
|
|
25
|
+
import PortShapeSymbol from './ports/PortShapeSymbol.svelte';
|
|
26
|
+
import PortLaneChip from './ports/PortLaneChip.svelte';
|
|
27
|
+
import { m } from '../messages/index.js';
|
|
28
|
+
import type { PortCompatibilityChecker } from '../utils/connections.js';
|
|
29
|
+
import { focusOnMount } from '../utils/focus.js';
|
|
30
|
+
import {
|
|
31
|
+
bindablePortKey,
|
|
32
|
+
isFreeBindablePort,
|
|
33
|
+
type RankedBindablePort
|
|
34
|
+
} from '../utils/workflowInterface.js';
|
|
35
|
+
|
|
36
|
+
interface Props {
|
|
37
|
+
direction: 'inputs' | 'outputs';
|
|
38
|
+
/** From `rankBindablePorts` — already ordered free-first. */
|
|
39
|
+
candidates: RankedBindablePort[];
|
|
40
|
+
/** The instance's checker — source of each row's shape symbol and lane colour. */
|
|
41
|
+
checker: PortCompatibilityChecker;
|
|
42
|
+
/** Unique per listbox on the page; option ids are derived from it. */
|
|
43
|
+
idPrefix: string;
|
|
44
|
+
/** The port the caller is already bound to, marked as such in the list. */
|
|
45
|
+
currentKey?: string;
|
|
46
|
+
/** A single click confirms (select-like) instead of only highlighting. */
|
|
47
|
+
confirmOnClick?: boolean;
|
|
48
|
+
/** Take keyboard focus when rendered — the list is a modal moment. */
|
|
49
|
+
autofocus?: boolean;
|
|
50
|
+
onHighlight?: (candidate: RankedBindablePort | undefined) => void;
|
|
51
|
+
onConfirm: (candidate: RankedBindablePort) => void;
|
|
52
|
+
onCancel?: () => void;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const {
|
|
56
|
+
direction,
|
|
57
|
+
candidates,
|
|
58
|
+
checker,
|
|
59
|
+
idPrefix,
|
|
60
|
+
currentKey,
|
|
61
|
+
confirmOnClick = false,
|
|
62
|
+
autofocus = false,
|
|
63
|
+
onHighlight,
|
|
64
|
+
onConfirm,
|
|
65
|
+
onCancel
|
|
66
|
+
}: Props = $props();
|
|
67
|
+
|
|
68
|
+
const isInput = $derived(direction === 'inputs');
|
|
69
|
+
|
|
70
|
+
let query = $state('');
|
|
71
|
+
let highlightedKey = $state<string | null>(null);
|
|
72
|
+
|
|
73
|
+
const filtered = $derived.by(() => {
|
|
74
|
+
const q = query.trim().toLowerCase();
|
|
75
|
+
if (!q) return candidates;
|
|
76
|
+
return candidates.filter((candidate) =>
|
|
77
|
+
[
|
|
78
|
+
candidate.nodeLabel,
|
|
79
|
+
candidate.port.name,
|
|
80
|
+
candidate.port.id,
|
|
81
|
+
candidate.port.dataType,
|
|
82
|
+
candidate.port.description ?? ''
|
|
83
|
+
].some((text) => text.toLowerCase().includes(q))
|
|
84
|
+
);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
const free = $derived(filtered.filter(isFreeBindablePort));
|
|
88
|
+
const taken = $derived(filtered.filter((candidate) => !isFreeBindablePort(candidate)));
|
|
89
|
+
|
|
90
|
+
const highlighted = $derived(
|
|
91
|
+
highlightedKey === null
|
|
92
|
+
? undefined
|
|
93
|
+
: candidates.find((candidate) => bindablePortKey(candidate) === highlightedKey)
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
function highlight(candidate: RankedBindablePort | undefined): void {
|
|
97
|
+
highlightedKey = candidate ? bindablePortKey(candidate) : null;
|
|
98
|
+
onHighlight?.(candidate);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* A DOM id for an option. Node and port ids can hold any character, so each
|
|
103
|
+
* one outside `[A-Za-z0-9-]` — the underscore included — is written as `_`
|
|
104
|
+
* plus its hex code point. Reversible, so `a.b` and `a_b` cannot collide.
|
|
105
|
+
*/
|
|
106
|
+
function optionId(candidate: RankedBindablePort): string {
|
|
107
|
+
const raw = `${candidate.nodeId}-${candidate.port.id}`;
|
|
108
|
+
const safe = raw.replace(/[^A-Za-z0-9-]/g, (c) => `_${c.codePointAt(0)!.toString(16)}`);
|
|
109
|
+
return `${idPrefix}-${safe}`;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function pick(candidate: RankedBindablePort): void {
|
|
113
|
+
highlight(candidate);
|
|
114
|
+
if (confirmOnClick) onConfirm(candidate);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function handleKeydown(event: KeyboardEvent): void {
|
|
118
|
+
if (event.key === 'Escape') {
|
|
119
|
+
event.preventDefault();
|
|
120
|
+
onCancel?.();
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if (filtered.length === 0) return;
|
|
124
|
+
const index = highlighted
|
|
125
|
+
? filtered.findIndex((c) => bindablePortKey(c) === bindablePortKey(highlighted))
|
|
126
|
+
: -1;
|
|
127
|
+
if (event.key === 'ArrowDown') {
|
|
128
|
+
event.preventDefault();
|
|
129
|
+
highlight(filtered[Math.min(index + 1, filtered.length - 1)]);
|
|
130
|
+
} else if (event.key === 'ArrowUp') {
|
|
131
|
+
event.preventDefault();
|
|
132
|
+
highlight(filtered[Math.max(index - 1, 0)]);
|
|
133
|
+
} else if (event.key === 'Home') {
|
|
134
|
+
event.preventDefault();
|
|
135
|
+
highlight(filtered[0]);
|
|
136
|
+
} else if (event.key === 'End') {
|
|
137
|
+
event.preventDefault();
|
|
138
|
+
highlight(filtered[filtered.length - 1]);
|
|
139
|
+
} else if (event.key === 'Enter') {
|
|
140
|
+
event.preventDefault();
|
|
141
|
+
if (highlighted) onConfirm(highlighted);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
</script>
|
|
145
|
+
|
|
146
|
+
<div class="wf-portlist">
|
|
147
|
+
{#if candidates.length > 0}
|
|
148
|
+
<Input
|
|
149
|
+
size="sm"
|
|
150
|
+
type="search"
|
|
151
|
+
value={query}
|
|
152
|
+
placeholder={m().workflowInterface.composerSearchPlaceholder}
|
|
153
|
+
aria-label={m().workflowInterface.composerSearchLabel}
|
|
154
|
+
oninput={(e) => (query = e.currentTarget.value)}
|
|
155
|
+
>
|
|
156
|
+
{#snippet leading()}
|
|
157
|
+
<Icon icon="heroicons:magnifying-glass" />
|
|
158
|
+
{/snippet}
|
|
159
|
+
</Input>
|
|
160
|
+
{/if}
|
|
161
|
+
|
|
162
|
+
<div
|
|
163
|
+
class="wf-portlist__list"
|
|
164
|
+
role="listbox"
|
|
165
|
+
tabindex="0"
|
|
166
|
+
{@attach focusOnMount(autofocus)}
|
|
167
|
+
aria-label={isInput
|
|
168
|
+
? m().workflowInterface.composerListLabelInput
|
|
169
|
+
: m().workflowInterface.composerListLabelOutput}
|
|
170
|
+
aria-activedescendant={highlighted ? optionId(highlighted) : undefined}
|
|
171
|
+
onkeydown={handleKeydown}
|
|
172
|
+
>
|
|
173
|
+
{#if candidates.length === 0}
|
|
174
|
+
<p class="wf-portlist__empty">{m().workflowInterface.composerNoPorts}</p>
|
|
175
|
+
{:else if filtered.length === 0}
|
|
176
|
+
<p class="wf-portlist__empty">{m().workflowInterface.composerNoMatches}</p>
|
|
177
|
+
{:else}
|
|
178
|
+
{#snippet option(candidate: RankedBindablePort)}
|
|
179
|
+
{@const key = bindablePortKey(candidate)}
|
|
180
|
+
{@const isHighlighted = highlighted !== undefined && bindablePortKey(highlighted) === key}
|
|
181
|
+
{@const isCurrent = currentKey !== undefined && currentKey === key}
|
|
182
|
+
<!-- Keyboard handling lives on the listbox (roving aria-activedescendant),
|
|
183
|
+
so the option itself needs no key handler. -->
|
|
184
|
+
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
185
|
+
<div
|
|
186
|
+
id={optionId(candidate)}
|
|
187
|
+
class="wf-portlist__option"
|
|
188
|
+
class:wf-portlist__option--highlighted={isHighlighted}
|
|
189
|
+
class:wf-portlist__option--current={isCurrent}
|
|
190
|
+
class:wf-portlist__option--taken={!isFreeBindablePort(candidate)}
|
|
191
|
+
role="option"
|
|
192
|
+
tabindex="-1"
|
|
193
|
+
aria-selected={isHighlighted}
|
|
194
|
+
onclick={() => pick(candidate)}
|
|
195
|
+
ondblclick={() => onConfirm(candidate)}
|
|
196
|
+
>
|
|
197
|
+
<PortShapeSymbol {checker} port={candidate.port} />
|
|
198
|
+
<span class="wf-portlist__option-body">
|
|
199
|
+
<span class="wf-portlist__option-path">
|
|
200
|
+
<span class="wf-portlist__option-node">{candidate.nodeLabel}</span>
|
|
201
|
+
<Icon icon="heroicons:chevron-right" />
|
|
202
|
+
<span class="wf-portlist__option-port">{candidate.port.name}</span>
|
|
203
|
+
<PortLaneChip {checker} port={candidate.port} />
|
|
204
|
+
</span>
|
|
205
|
+
{#if candidate.port.description}
|
|
206
|
+
<span class="wf-portlist__option-desc">{candidate.port.description}</span>
|
|
207
|
+
{/if}
|
|
208
|
+
{#if isCurrent || candidate.connected || candidate.publishedAs !== undefined || candidate.port.required}
|
|
209
|
+
<span class="wf-portlist__option-flags">
|
|
210
|
+
{#if isCurrent}
|
|
211
|
+
<span class="flowdrop-badge flowdrop-badge--sm flowdrop-badge--primary">
|
|
212
|
+
{m().workflowInterface.bindingCurrent}
|
|
213
|
+
</span>
|
|
214
|
+
{/if}
|
|
215
|
+
{#if candidate.connected}
|
|
216
|
+
<span class="flowdrop-badge flowdrop-badge--sm flowdrop-badge--warning">
|
|
217
|
+
{m().workflowInterface.composerConnected}
|
|
218
|
+
</span>
|
|
219
|
+
{/if}
|
|
220
|
+
{#if candidate.publishedAs !== undefined}
|
|
221
|
+
<span class="flowdrop-badge flowdrop-badge--sm flowdrop-badge--secondary">
|
|
222
|
+
{m().workflowInterface.composerPublishedAs({ id: candidate.publishedAs })}
|
|
223
|
+
</span>
|
|
224
|
+
{/if}
|
|
225
|
+
{#if candidate.port.required}
|
|
226
|
+
<span class="flowdrop-badge flowdrop-badge--sm flowdrop-badge--outline">
|
|
227
|
+
{m().workflowInterface.composerRequired}
|
|
228
|
+
</span>
|
|
229
|
+
{/if}
|
|
230
|
+
</span>
|
|
231
|
+
{/if}
|
|
232
|
+
</span>
|
|
233
|
+
<span class="wf-portlist__option-check" aria-hidden="true">
|
|
234
|
+
<Icon icon="heroicons:check" />
|
|
235
|
+
</span>
|
|
236
|
+
</div>
|
|
237
|
+
{/snippet}
|
|
238
|
+
|
|
239
|
+
{#if free.length > 0}
|
|
240
|
+
<div class="wf-portlist__group" role="presentation">
|
|
241
|
+
<span class="wf-portlist__group-title">{m().workflowInterface.composerGroupFree}</span>
|
|
242
|
+
{#each free as candidate (bindablePortKey(candidate))}
|
|
243
|
+
{@render option(candidate)}
|
|
244
|
+
{/each}
|
|
245
|
+
</div>
|
|
246
|
+
{/if}
|
|
247
|
+
{#if taken.length > 0}
|
|
248
|
+
<div class="wf-portlist__group" role="presentation">
|
|
249
|
+
<span class="wf-portlist__group-title">{m().workflowInterface.composerGroupTaken}</span>
|
|
250
|
+
{#each taken as candidate (bindablePortKey(candidate))}
|
|
251
|
+
{@render option(candidate)}
|
|
252
|
+
{/each}
|
|
253
|
+
</div>
|
|
254
|
+
{/if}
|
|
255
|
+
{/if}
|
|
256
|
+
</div>
|
|
257
|
+
</div>
|
|
258
|
+
|
|
259
|
+
<style>
|
|
260
|
+
.wf-portlist {
|
|
261
|
+
display: flex;
|
|
262
|
+
flex-direction: column;
|
|
263
|
+
gap: var(--fd-space-xs);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.wf-portlist__list {
|
|
267
|
+
display: flex;
|
|
268
|
+
flex-direction: column;
|
|
269
|
+
gap: var(--fd-space-xs);
|
|
270
|
+
max-height: 18rem;
|
|
271
|
+
overflow-y: auto;
|
|
272
|
+
padding: var(--fd-space-2xs);
|
|
273
|
+
border: 1px solid var(--fd-border);
|
|
274
|
+
border-radius: var(--fd-radius-md);
|
|
275
|
+
background-color: var(--fd-card);
|
|
276
|
+
scrollbar-width: thin;
|
|
277
|
+
scrollbar-color: var(--fd-scrollbar-thumb) var(--fd-scrollbar-track);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.wf-portlist__list:focus-visible {
|
|
281
|
+
outline: none;
|
|
282
|
+
border-color: var(--fd-primary);
|
|
283
|
+
box-shadow: 0 0 0 var(--fd-ring-width) var(--fd-primary-muted);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.wf-portlist__empty {
|
|
287
|
+
margin: 0;
|
|
288
|
+
padding: var(--fd-space-md) var(--fd-space-sm);
|
|
289
|
+
font-size: var(--fd-text-xs);
|
|
290
|
+
line-height: 1.5;
|
|
291
|
+
text-align: center;
|
|
292
|
+
color: var(--fd-muted-foreground);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.wf-portlist__group {
|
|
296
|
+
display: flex;
|
|
297
|
+
flex-direction: column;
|
|
298
|
+
gap: 0.125rem;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.wf-portlist__group-title {
|
|
302
|
+
padding: var(--fd-space-2xs) var(--fd-space-xs);
|
|
303
|
+
font-size: var(--fd-text-2xs);
|
|
304
|
+
font-weight: 600;
|
|
305
|
+
letter-spacing: 0.05em;
|
|
306
|
+
text-transform: uppercase;
|
|
307
|
+
color: var(--fd-muted-foreground);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.wf-portlist__option {
|
|
311
|
+
display: flex;
|
|
312
|
+
align-items: flex-start;
|
|
313
|
+
gap: var(--fd-space-xs);
|
|
314
|
+
padding: var(--fd-space-xs);
|
|
315
|
+
border: 1px solid transparent;
|
|
316
|
+
border-radius: var(--fd-radius-md);
|
|
317
|
+
cursor: pointer;
|
|
318
|
+
transition:
|
|
319
|
+
background-color var(--fd-transition-fast),
|
|
320
|
+
border-color var(--fd-transition-fast);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.wf-portlist__option:hover {
|
|
324
|
+
background-color: var(--fd-muted);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.wf-portlist__option--highlighted,
|
|
328
|
+
.wf-portlist__option--highlighted:hover {
|
|
329
|
+
border-color: var(--fd-primary);
|
|
330
|
+
background-color: var(--fd-primary-muted);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.wf-portlist__option--taken .wf-portlist__option-node,
|
|
334
|
+
.wf-portlist__option--taken .wf-portlist__option-port {
|
|
335
|
+
color: var(--fd-muted-foreground);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.wf-portlist__option--taken :global(.flowdrop-port-symbol),
|
|
339
|
+
.wf-portlist__option--taken :global(.flowdrop-badge--outline) {
|
|
340
|
+
opacity: 0.7;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/* The entry's own port is "taken" by itself; do not grey it out. */
|
|
344
|
+
.wf-portlist__option--current .wf-portlist__option-node,
|
|
345
|
+
.wf-portlist__option--current .wf-portlist__option-port {
|
|
346
|
+
color: var(--fd-foreground);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.wf-portlist__option--current :global(.flowdrop-port-symbol),
|
|
350
|
+
.wf-portlist__option--current :global(.flowdrop-badge--outline) {
|
|
351
|
+
opacity: 1;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/* The lane chip is quiet on purpose; keep it from stretching a wrapped path. */
|
|
355
|
+
.wf-portlist__option-path :global(.flowdrop-badge--outline) {
|
|
356
|
+
flex: none;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.wf-portlist__option-body {
|
|
360
|
+
display: flex;
|
|
361
|
+
flex-direction: column;
|
|
362
|
+
gap: 0.125rem;
|
|
363
|
+
flex: 1;
|
|
364
|
+
min-width: 0;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.wf-portlist__option-path {
|
|
368
|
+
display: inline-flex;
|
|
369
|
+
align-items: center;
|
|
370
|
+
flex-wrap: wrap;
|
|
371
|
+
gap: 0.125rem;
|
|
372
|
+
font-size: var(--fd-text-xs);
|
|
373
|
+
line-height: 1.4;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.wf-portlist__option-path :global(svg) {
|
|
377
|
+
flex-shrink: 0;
|
|
378
|
+
color: var(--fd-muted-foreground);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.wf-portlist__option-node {
|
|
382
|
+
color: var(--fd-muted-foreground);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.wf-portlist__option-port {
|
|
386
|
+
font-weight: 600;
|
|
387
|
+
color: var(--fd-foreground);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.wf-portlist__option-desc {
|
|
391
|
+
font-size: var(--fd-text-2xs);
|
|
392
|
+
line-height: 1.45;
|
|
393
|
+
color: var(--fd-muted-foreground);
|
|
394
|
+
display: -webkit-box;
|
|
395
|
+
-webkit-line-clamp: 2;
|
|
396
|
+
line-clamp: 2;
|
|
397
|
+
-webkit-box-orient: vertical;
|
|
398
|
+
overflow: hidden;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.wf-portlist__option-flags {
|
|
402
|
+
display: flex;
|
|
403
|
+
flex-wrap: wrap;
|
|
404
|
+
gap: var(--fd-space-2xs);
|
|
405
|
+
margin-top: 0.125rem;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.wf-portlist__option-flags :global(.flowdrop-badge) {
|
|
409
|
+
font-size: var(--fd-text-2xs);
|
|
410
|
+
line-height: 1.2;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.wf-portlist__option-check {
|
|
414
|
+
flex-shrink: 0;
|
|
415
|
+
display: inline-flex;
|
|
416
|
+
width: 1rem;
|
|
417
|
+
margin-top: 0.125rem;
|
|
418
|
+
color: var(--fd-primary);
|
|
419
|
+
opacity: 0;
|
|
420
|
+
transition: opacity var(--fd-transition-fast);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.wf-portlist__option--highlighted .wf-portlist__option-check {
|
|
424
|
+
opacity: 1;
|
|
425
|
+
}
|
|
426
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { PortCompatibilityChecker } from '../utils/connections.js';
|
|
2
|
+
import { type RankedBindablePort } from '../utils/workflowInterface.js';
|
|
3
|
+
interface Props {
|
|
4
|
+
direction: 'inputs' | 'outputs';
|
|
5
|
+
/** From `rankBindablePorts` — already ordered free-first. */
|
|
6
|
+
candidates: RankedBindablePort[];
|
|
7
|
+
/** The instance's checker — source of each row's shape symbol and lane colour. */
|
|
8
|
+
checker: PortCompatibilityChecker;
|
|
9
|
+
/** Unique per listbox on the page; option ids are derived from it. */
|
|
10
|
+
idPrefix: string;
|
|
11
|
+
/** The port the caller is already bound to, marked as such in the list. */
|
|
12
|
+
currentKey?: string;
|
|
13
|
+
/** A single click confirms (select-like) instead of only highlighting. */
|
|
14
|
+
confirmOnClick?: boolean;
|
|
15
|
+
/** Take keyboard focus when rendered — the list is a modal moment. */
|
|
16
|
+
autofocus?: boolean;
|
|
17
|
+
onHighlight?: (candidate: RankedBindablePort | undefined) => void;
|
|
18
|
+
onConfirm: (candidate: RankedBindablePort) => void;
|
|
19
|
+
onCancel?: () => void;
|
|
20
|
+
}
|
|
21
|
+
declare const BindablePortListbox: import("svelte").Component<Props, {}, "">;
|
|
22
|
+
type BindablePortListbox = ReturnType<typeof BindablePortListbox>;
|
|
23
|
+
export default BindablePortListbox;
|