@flowdrop/flowdrop 2.5.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 +33 -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/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/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/svelte-app.d.ts +20 -0
- package/dist/svelte-app.js +49 -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
|
@@ -20,12 +20,21 @@
|
|
|
20
20
|
|
|
21
21
|
<script lang="ts">
|
|
22
22
|
import Icon from '@iconify/svelte';
|
|
23
|
+
import Button from './Button.svelte';
|
|
24
|
+
import IconButton from './IconButton.svelte';
|
|
25
|
+
import Input from './Input.svelte';
|
|
26
|
+
import Select from './Select.svelte';
|
|
27
|
+
import BindablePortListbox from './BindablePortListbox.svelte';
|
|
28
|
+
import PortShapeSymbol from './ports/PortShapeSymbol.svelte';
|
|
29
|
+
import PortLaneChip from './ports/PortLaneChip.svelte';
|
|
23
30
|
import { m } from '../messages/index.js';
|
|
24
31
|
import type { PortDataTypeConfig, WorkflowInterfaceEntry } from '../types/index.js';
|
|
32
|
+
import type { PortCompatibilityChecker } from '../utils/connections.js';
|
|
25
33
|
import {
|
|
34
|
+
bindablePortKey,
|
|
26
35
|
describeInterfaceEntryStatus,
|
|
27
36
|
pullEntryFieldsFromPort,
|
|
28
|
-
type
|
|
37
|
+
type RankedBindablePort,
|
|
29
38
|
type InterfaceIssue,
|
|
30
39
|
type ResolvedInterfaceEntry
|
|
31
40
|
} from '../utils/workflowInterface.js';
|
|
@@ -34,10 +43,12 @@
|
|
|
34
43
|
entry: WorkflowInterfaceEntry;
|
|
35
44
|
direction: 'inputs' | 'outputs';
|
|
36
45
|
status: ResolvedInterfaceEntry | undefined;
|
|
37
|
-
/** Candidate ports for this direction, for the binding picker. */
|
|
38
|
-
candidates:
|
|
46
|
+
/** Candidate ports for this direction, ranked, for the binding picker. */
|
|
47
|
+
candidates: RankedBindablePort[];
|
|
39
48
|
/** The authoring vocabulary offered by the dataType picker. */
|
|
40
49
|
dataTypes: PortDataTypeConfig[];
|
|
50
|
+
/** The instance's checker — shape symbol and lane colour of the bound port. */
|
|
51
|
+
checker: PortCompatibilityChecker;
|
|
41
52
|
/** The issues this card explains in its footer. */
|
|
42
53
|
footerIssues: InterfaceIssue[];
|
|
43
54
|
/** Input side only: the bound port already receives another edge. */
|
|
@@ -57,6 +68,7 @@
|
|
|
57
68
|
status,
|
|
58
69
|
candidates,
|
|
59
70
|
dataTypes,
|
|
71
|
+
checker,
|
|
60
72
|
footerIssues,
|
|
61
73
|
alreadyConnected = false,
|
|
62
74
|
conflictingSource,
|
|
@@ -68,19 +80,11 @@
|
|
|
68
80
|
}: Props = $props();
|
|
69
81
|
|
|
70
82
|
/**
|
|
71
|
-
* Whether the secondary fields are disclosed
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* author from then on. It must NOT track `status`: that is live data, and a
|
|
75
|
-
* disclosure driven by data is the bug this component was split out to kill.
|
|
76
|
-
* Rendering `open` as a reactive attribute meant every edit in the card came
|
|
77
|
-
* back as a new `workflow`, re-ran the attribute and slammed the fields shut,
|
|
78
|
-
* pulling the focused input out from under the author mid-word — focus fell
|
|
79
|
-
* to `<body>` and the keystrokes after it were silently dropped. Deriving it
|
|
80
|
-
* from `status` instead of seeding from it reintroduces exactly that, most
|
|
81
|
-
* sharply when the author fixes a type mismatch with the select inside and it
|
|
82
|
-
* shuts on them mid-fix.
|
|
83
|
+
* Whether the secondary fields are disclosed: seeded once from whether the
|
|
84
|
+
* entry wants attention, then the author's. Deriving it from `status` would
|
|
85
|
+
* shut the fields on every edit and drop the focused input's keystrokes.
|
|
83
86
|
*/
|
|
87
|
+
// The seed is meant to be read once.
|
|
84
88
|
// svelte-ignore state_referenced_locally
|
|
85
89
|
let fieldsOpen = $state(status?.status === 'type-mismatch');
|
|
86
90
|
|
|
@@ -102,33 +106,44 @@
|
|
|
102
106
|
return options;
|
|
103
107
|
}
|
|
104
108
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
109
|
+
/** Whether the binding picker is unfolded under the "Bound port" control. */
|
|
110
|
+
let pickerOpen = $state(false);
|
|
108
111
|
|
|
109
|
-
/** The entry's current single binding, as a picker
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
/** The entry's current single binding, as a picker key (`undefined` = unbound). */
|
|
113
|
+
const currentKey = $derived(entry.bindings[0] ? bindablePortKey(entry.bindings[0]) : undefined);
|
|
114
|
+
|
|
115
|
+
/** The bound port, when the single binding resolves. */
|
|
116
|
+
const boundTarget = $derived(status?.targets[0]);
|
|
113
117
|
|
|
114
118
|
/** The bound port's own dataType, when the single binding resolves. */
|
|
115
|
-
const boundPortType = $derived(
|
|
119
|
+
const boundPortType = $derived(boundTarget?.port.dataType);
|
|
116
120
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
/**
|
|
122
|
+
* The picker's candidates, with this entry's own port counted as free: it
|
|
123
|
+
* is "published" — by the very entry choosing — and greying it out as taken
|
|
124
|
+
* would tell the author their current choice is unavailable.
|
|
125
|
+
*/
|
|
126
|
+
const ownCandidates = $derived(
|
|
127
|
+
candidates.map((candidate) =>
|
|
128
|
+
candidate.publishedAs === entry.id ? { ...candidate, publishedAs: undefined } : candidate
|
|
129
|
+
)
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
function bindTo(candidate: RankedBindablePort): void {
|
|
133
|
+
const patch: Partial<WorkflowInterfaceEntry> = {
|
|
134
|
+
bindings: [{ nodeId: candidate.nodeId, portId: candidate.port.id }]
|
|
135
|
+
};
|
|
124
136
|
// Convenience default: prefill an empty dataType from the picked port's own
|
|
125
137
|
// type. The field stays freely editable afterward — this only saves the
|
|
126
138
|
// common case of typing out what the port already declares.
|
|
127
|
-
if (!entry.dataType)
|
|
128
|
-
const match = candidates.find((b) => b.nodeId === nodeId && b.port.id === portId);
|
|
129
|
-
if (match) patch.dataType = match.port.dataType;
|
|
130
|
-
}
|
|
139
|
+
if (!entry.dataType) patch.dataType = candidate.port.dataType;
|
|
131
140
|
onPatch(patch);
|
|
141
|
+
pickerOpen = false;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function unbind(): void {
|
|
145
|
+
onPatch({ bindings: [] });
|
|
146
|
+
pickerOpen = false;
|
|
132
147
|
}
|
|
133
148
|
|
|
134
149
|
/**
|
|
@@ -172,70 +187,121 @@
|
|
|
172
187
|
status.status !== 'ok' &&
|
|
173
188
|
status.status !== 'unbound'}
|
|
174
189
|
>
|
|
175
|
-
|
|
176
|
-
<
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
aria-label={m().workflowInterface.moveDown({ id: entry.id })}
|
|
195
|
-
>
|
|
196
|
-
<Icon icon="heroicons:chevron-down" />
|
|
197
|
-
</button>
|
|
190
|
+
<div class="wf-interface__entry-side">
|
|
191
|
+
<div class="wf-interface__reorder">
|
|
192
|
+
<button
|
|
193
|
+
type="button"
|
|
194
|
+
disabled={isFirst}
|
|
195
|
+
onclick={() => onMove(-1)}
|
|
196
|
+
aria-label={m().workflowInterface.moveUp({ id: entry.id })}
|
|
197
|
+
>
|
|
198
|
+
<Icon icon="heroicons:chevron-up" />
|
|
199
|
+
</button>
|
|
200
|
+
<button
|
|
201
|
+
type="button"
|
|
202
|
+
disabled={isLast}
|
|
203
|
+
onclick={() => onMove(1)}
|
|
204
|
+
aria-label={m().workflowInterface.moveDown({ id: entry.id })}
|
|
205
|
+
>
|
|
206
|
+
<Icon icon="heroicons:chevron-down" />
|
|
207
|
+
</button>
|
|
208
|
+
</div>
|
|
198
209
|
</div>
|
|
199
210
|
|
|
200
211
|
<div class="wf-interface__fields">
|
|
201
|
-
<div class="wf-interface__row">
|
|
212
|
+
<div class="wf-interface__row wf-interface__row--identity">
|
|
202
213
|
<label class="wf-interface__field wf-interface__field--id">
|
|
203
214
|
<span class="wf-interface__label">{m().workflowInterface.idLabel}</span>
|
|
204
|
-
<
|
|
215
|
+
<Input
|
|
216
|
+
size="sm"
|
|
205
217
|
type="text"
|
|
206
218
|
value={entry.id}
|
|
207
219
|
onchange={(e) => onPatch({ id: e.currentTarget.value })}
|
|
208
220
|
/>
|
|
209
221
|
</label>
|
|
210
|
-
<
|
|
211
|
-
<span class="wf-interface__label"
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
222
|
+
<div class="wf-interface__field wf-interface__field--binding">
|
|
223
|
+
<span class="wf-interface__label" id="wf-binding-label-{direction}-{entry.id}">
|
|
224
|
+
{m().workflowInterface.bindingLabel}
|
|
225
|
+
</span>
|
|
226
|
+
<!-- The bound port, said back the way the canvas says it — shape symbol,
|
|
227
|
+
node › port, lane chip — and the way in to change it. Looks like a
|
|
228
|
+
select, opens the shared port listbox instead. -->
|
|
229
|
+
<button
|
|
230
|
+
type="button"
|
|
231
|
+
class="wf-interface__binding"
|
|
232
|
+
class:wf-interface__binding--open={pickerOpen}
|
|
233
|
+
class:wf-interface__binding--invalid={isInput && alreadyConnected}
|
|
234
|
+
class:wf-interface__binding--empty={!entry.bindings[0]}
|
|
235
|
+
aria-haspopup="listbox"
|
|
236
|
+
aria-expanded={pickerOpen}
|
|
237
|
+
aria-labelledby="wf-binding-label-{direction}-{entry.id}"
|
|
238
|
+
title={m().workflowInterface.bindingChange}
|
|
239
|
+
onclick={() => (pickerOpen = !pickerOpen)}
|
|
240
|
+
>
|
|
241
|
+
{#if boundTarget}
|
|
242
|
+
<PortShapeSymbol {checker} port={boundTarget.port} />
|
|
243
|
+
<span class="wf-interface__binding-path">
|
|
244
|
+
<span class="wf-interface__binding-node">
|
|
245
|
+
{boundTarget.node.data?.label ?? boundTarget.node.id}
|
|
246
|
+
</span>
|
|
247
|
+
<Icon icon="heroicons:chevron-right" />
|
|
248
|
+
<span class="wf-interface__binding-port">{boundTarget.port.name}</span>
|
|
249
|
+
<PortLaneChip {checker} port={boundTarget.port} />
|
|
250
|
+
</span>
|
|
251
|
+
{:else if entry.bindings[0]}
|
|
252
|
+
<span class="wf-interface__binding-path wf-interface__binding-path--dangling">
|
|
253
|
+
{m().workflowInterface.bindingDangling({
|
|
254
|
+
nodeId: entry.bindings[0].nodeId,
|
|
255
|
+
portId: entry.bindings[0].portId
|
|
256
|
+
})}
|
|
257
|
+
</span>
|
|
258
|
+
{:else}
|
|
259
|
+
<span class="wf-interface__binding-placeholder">
|
|
260
|
+
{m().workflowInterface.bindingUnbound}
|
|
261
|
+
</span>
|
|
262
|
+
{/if}
|
|
263
|
+
<Icon icon="heroicons:chevron-up-down" class="wf-interface__binding-caret" />
|
|
264
|
+
</button>
|
|
220
265
|
{#if isInput && alreadyConnected}
|
|
221
266
|
<span class="wf-interface__inline wf-interface__inline--error">
|
|
222
267
|
{m().workflowInterface.alreadyConnectedInline({ source: conflictingSource ?? '' })}
|
|
223
268
|
</span>
|
|
224
269
|
{/if}
|
|
225
|
-
</
|
|
226
|
-
{#if status?.targets[0]}
|
|
227
|
-
<button
|
|
228
|
-
type="button"
|
|
229
|
-
class="wf-interface__pull"
|
|
230
|
-
title={m().workflowInterface.pullFromPortTitle}
|
|
231
|
-
onclick={() => onPatch(pullEntryFieldsFromPort(status.targets[0].port))}
|
|
232
|
-
>
|
|
233
|
-
<Icon icon="heroicons:arrow-down-tray" />
|
|
234
|
-
{m().workflowInterface.pullFromPort}
|
|
235
|
-
</button>
|
|
236
|
-
{/if}
|
|
270
|
+
</div>
|
|
237
271
|
</div>
|
|
238
272
|
|
|
273
|
+
{#if pickerOpen}
|
|
274
|
+
<div
|
|
275
|
+
class="wf-interface__picker"
|
|
276
|
+
role="group"
|
|
277
|
+
aria-label={m().workflowInterface.bindingChoose}
|
|
278
|
+
>
|
|
279
|
+
<BindablePortListbox
|
|
280
|
+
{direction}
|
|
281
|
+
candidates={ownCandidates}
|
|
282
|
+
{checker}
|
|
283
|
+
idPrefix="wf-binding-option-{direction}-{entry.id}"
|
|
284
|
+
{currentKey}
|
|
285
|
+
confirmOnClick
|
|
286
|
+
autofocus
|
|
287
|
+
onConfirm={bindTo}
|
|
288
|
+
onCancel={() => (pickerOpen = false)}
|
|
289
|
+
/>
|
|
290
|
+
<div class="wf-interface__picker-actions">
|
|
291
|
+
{#if entry.bindings[0]}
|
|
292
|
+
<Button variant="ghost" size="sm" onclick={unbind}>
|
|
293
|
+
<Icon icon="heroicons:link-slash" />
|
|
294
|
+
{m().workflowInterface.bindingUnbind}
|
|
295
|
+
</Button>
|
|
296
|
+
{/if}
|
|
297
|
+
<span class="wf-interface__picker-spacer"></span>
|
|
298
|
+
<Button variant="ghost" size="sm" onclick={() => (pickerOpen = false)}>
|
|
299
|
+
{m().workflowInterface.composerCancel}
|
|
300
|
+
</Button>
|
|
301
|
+
</div>
|
|
302
|
+
</div>
|
|
303
|
+
{/if}
|
|
304
|
+
|
|
239
305
|
<!-- Two-way, and it settles: the setter writes what the DOM already
|
|
240
306
|
reports, and assigning `open` a value it already holds fires no
|
|
241
307
|
further `toggle`. Without that the pair would be an unbounded
|
|
@@ -243,110 +309,144 @@
|
|
|
243
309
|
update-depth guard could not catch, since each turn is a fresh
|
|
244
310
|
event task. -->
|
|
245
311
|
<details class="wf-interface__more" bind:open={fieldsOpen}>
|
|
246
|
-
<summary>
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
{
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
{m().workflowInterface.typeMismatchInline({ portType: boundPortType ?? '' })}
|
|
275
|
-
<button
|
|
276
|
-
type="button"
|
|
277
|
-
class="wf-interface__quickfix"
|
|
278
|
-
onclick={() => onPatch({ dataType: boundPortType ?? entry.dataType })}
|
|
279
|
-
>
|
|
280
|
-
{m().workflowInterface.useMatchPortType}
|
|
281
|
-
</button>
|
|
282
|
-
</span>
|
|
283
|
-
{/if}
|
|
284
|
-
</label>
|
|
285
|
-
{#if isInput}
|
|
286
|
-
<label class="wf-interface__field wf-interface__field--checkbox">
|
|
287
|
-
<input
|
|
288
|
-
type="checkbox"
|
|
289
|
-
checked={entry.required ?? false}
|
|
290
|
-
onchange={(e) => onPatch({ required: e.currentTarget.checked || undefined })}
|
|
312
|
+
<summary>
|
|
313
|
+
<Icon icon="heroicons:chevron-right" />
|
|
314
|
+
{m().workflowInterface.moreOptions}
|
|
315
|
+
</summary>
|
|
316
|
+
<div class="wf-interface__more-body">
|
|
317
|
+
{#if boundTarget}
|
|
318
|
+
<div class="wf-interface__pull-row">
|
|
319
|
+
<Button
|
|
320
|
+
variant="ghost"
|
|
321
|
+
size="sm"
|
|
322
|
+
class="wf-interface__pull"
|
|
323
|
+
title={m().workflowInterface.pullFromPortTitle}
|
|
324
|
+
onclick={() => onPatch(pullEntryFieldsFromPort(boundTarget.port))}
|
|
325
|
+
>
|
|
326
|
+
<Icon icon="heroicons:arrow-down-tray" />
|
|
327
|
+
{m().workflowInterface.pullFromPort}
|
|
328
|
+
</Button>
|
|
329
|
+
</div>
|
|
330
|
+
{/if}
|
|
331
|
+
<div class="wf-interface__row">
|
|
332
|
+
<label class="wf-interface__field">
|
|
333
|
+
<span class="wf-interface__label">{m().workflowInterface.nameLabel}</span>
|
|
334
|
+
<Input
|
|
335
|
+
size="sm"
|
|
336
|
+
type="text"
|
|
337
|
+
value={entry.name ?? ''}
|
|
338
|
+
placeholder={m().workflowInterface.namePlaceholder}
|
|
339
|
+
onchange={(e) => onPatch({ name: e.currentTarget.value || undefined })}
|
|
291
340
|
/>
|
|
292
|
-
<span class="wf-interface__label">{m().workflowInterface.requiredLabel}</span>
|
|
293
341
|
</label>
|
|
294
|
-
|
|
295
|
-
|
|
342
|
+
<label class="wf-interface__field">
|
|
343
|
+
<span class="wf-interface__label">{m().workflowInterface.dataTypeLabel}</span>
|
|
344
|
+
<Select
|
|
345
|
+
size="sm"
|
|
346
|
+
invalid={status?.status === 'type-mismatch'}
|
|
347
|
+
value={entry.dataType}
|
|
348
|
+
onchange={(e) => onPatch({ dataType: e.currentTarget.value })}
|
|
349
|
+
>
|
|
350
|
+
{#if !entry.dataType}
|
|
351
|
+
<option value="" disabled selected>
|
|
352
|
+
{m().workflowInterface.dataTypePlaceholder}
|
|
353
|
+
</option>
|
|
354
|
+
{/if}
|
|
355
|
+
{#each dataTypeOptions(entry.dataType) as option (option.id)}
|
|
356
|
+
<option value={option.id}>{option.name}</option>
|
|
357
|
+
{/each}
|
|
358
|
+
</Select>
|
|
359
|
+
{#if status?.status === 'type-mismatch' && boundPortType}
|
|
360
|
+
<span class="wf-interface__inline wf-interface__inline--warning">
|
|
361
|
+
{m().workflowInterface.typeMismatchInline({ portType: boundPortType ?? '' })}
|
|
362
|
+
<button
|
|
363
|
+
type="button"
|
|
364
|
+
class="wf-interface__quickfix"
|
|
365
|
+
onclick={() => onPatch({ dataType: boundPortType ?? entry.dataType })}
|
|
366
|
+
>
|
|
367
|
+
{m().workflowInterface.useMatchPortType}
|
|
368
|
+
</button>
|
|
369
|
+
</span>
|
|
370
|
+
{/if}
|
|
371
|
+
</label>
|
|
372
|
+
</div>
|
|
296
373
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
<input
|
|
309
|
-
type="text"
|
|
310
|
-
value={formatDefaultValue(entry.defaultValue)}
|
|
311
|
-
onchange={(e) => onPatch({ defaultValue: parseDefaultValue(e.currentTarget.value) })}
|
|
312
|
-
/>
|
|
313
|
-
</label>
|
|
314
|
-
</div>
|
|
374
|
+
<div class="wf-interface__row">
|
|
375
|
+
<label class="wf-interface__field wf-interface__field--wide">
|
|
376
|
+
<span class="wf-interface__label">{m().workflowInterface.descriptionLabel}</span>
|
|
377
|
+
<Input
|
|
378
|
+
size="sm"
|
|
379
|
+
type="text"
|
|
380
|
+
value={entry.description ?? ''}
|
|
381
|
+
onchange={(e) => onPatch({ description: e.currentTarget.value || undefined })}
|
|
382
|
+
/>
|
|
383
|
+
</label>
|
|
384
|
+
</div>
|
|
315
385
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
386
|
+
<div class="wf-interface__row">
|
|
387
|
+
<label class="wf-interface__field">
|
|
388
|
+
<span class="wf-interface__label">{m().workflowInterface.defaultValueLabel}</span>
|
|
389
|
+
<Input
|
|
390
|
+
size="sm"
|
|
391
|
+
type="text"
|
|
392
|
+
value={formatDefaultValue(entry.defaultValue)}
|
|
393
|
+
onchange={(e) => onPatch({ defaultValue: parseDefaultValue(e.currentTarget.value) })}
|
|
394
|
+
/>
|
|
395
|
+
</label>
|
|
396
|
+
{#if isInput}
|
|
397
|
+
<label class="wf-interface__field wf-interface__field--checkbox">
|
|
323
398
|
<input
|
|
324
|
-
type="
|
|
325
|
-
|
|
326
|
-
onchange={(e) =>
|
|
399
|
+
type="checkbox"
|
|
400
|
+
checked={entry.required ?? false}
|
|
401
|
+
onchange={(e) => onPatch({ required: e.currentTarget.checked || undefined })}
|
|
327
402
|
/>
|
|
328
|
-
<
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
onclick={() => removeExample(exampleIndex)}
|
|
332
|
-
aria-label={m().workflowInterface.removeExample}
|
|
333
|
-
>
|
|
334
|
-
<Icon icon="heroicons:x-mark" />
|
|
335
|
-
</button>
|
|
336
|
-
</div>
|
|
337
|
-
{/each}
|
|
338
|
-
<button type="button" class="wf-interface__example-add" onclick={addExample}>
|
|
339
|
-
<Icon icon="heroicons:plus" />
|
|
340
|
-
{m().workflowInterface.addExample}
|
|
341
|
-
</button>
|
|
403
|
+
<span class="wf-interface__label">{m().workflowInterface.requiredLabel}</span>
|
|
404
|
+
</label>
|
|
405
|
+
{/if}
|
|
342
406
|
</div>
|
|
343
|
-
|
|
407
|
+
|
|
408
|
+
{#if isInput}
|
|
409
|
+
<div class="wf-interface__examples">
|
|
410
|
+
<span class="wf-interface__label">
|
|
411
|
+
{m().workflowInterface.examplesLabel}
|
|
412
|
+
</span>
|
|
413
|
+
{#each entry.examples ?? [] as example, exampleIndex (exampleIndex)}
|
|
414
|
+
<div class="wf-interface__example-row">
|
|
415
|
+
<Input
|
|
416
|
+
size="sm"
|
|
417
|
+
type="text"
|
|
418
|
+
value={formatDefaultValue(example)}
|
|
419
|
+
onchange={(e) => patchExample(exampleIndex, e.currentTarget.value)}
|
|
420
|
+
/>
|
|
421
|
+
<IconButton
|
|
422
|
+
size="sm"
|
|
423
|
+
class="wf-interface__example-remove"
|
|
424
|
+
onclick={() => removeExample(exampleIndex)}
|
|
425
|
+
ariaLabel={m().workflowInterface.removeExample}
|
|
426
|
+
>
|
|
427
|
+
<Icon icon="heroicons:x-mark" />
|
|
428
|
+
</IconButton>
|
|
429
|
+
</div>
|
|
430
|
+
{/each}
|
|
431
|
+
<Button
|
|
432
|
+
variant="ghost"
|
|
433
|
+
size="sm"
|
|
434
|
+
class="wf-interface__example-add"
|
|
435
|
+
onclick={addExample}
|
|
436
|
+
>
|
|
437
|
+
<Icon icon="heroicons:plus" />
|
|
438
|
+
{m().workflowInterface.addExample}
|
|
439
|
+
</Button>
|
|
440
|
+
</div>
|
|
441
|
+
{/if}
|
|
442
|
+
</div>
|
|
344
443
|
</details>
|
|
345
444
|
|
|
346
|
-
<!-- Every resolveInterface status renders in words somewhere in this
|
|
347
|
-
the obligation that makes this surface canonical. `ok`
|
|
348
|
-
|
|
349
|
-
|
|
445
|
+
<!-- Every non-ok resolveInterface status renders in words somewhere in this
|
|
446
|
+
card — the obligation that makes this surface canonical. `ok` says
|
|
447
|
+
nothing: neutral is the good state, and the card's error border already
|
|
448
|
+
marks the bad ones. Type-mismatch and already-connected render inline
|
|
449
|
+
next to their own field; the rest are explained here. -->
|
|
350
450
|
{#if status && FOOTER_STATUSES.has(status.status)}
|
|
351
451
|
<p class="wf-interface__status wf-interface__status--{status.status}">
|
|
352
452
|
{describeInterfaceEntryStatus(status)}
|
|
@@ -366,45 +466,87 @@
|
|
|
366
466
|
{/if}
|
|
367
467
|
</div>
|
|
368
468
|
|
|
369
|
-
<
|
|
370
|
-
|
|
469
|
+
<IconButton
|
|
470
|
+
size="sm"
|
|
371
471
|
class="wf-interface__remove"
|
|
372
472
|
onclick={onRemove}
|
|
373
|
-
|
|
473
|
+
ariaLabel={m().workflowInterface.removeEntry({ id: entry.id })}
|
|
374
474
|
>
|
|
375
475
|
<Icon icon="heroicons:trash" />
|
|
376
|
-
</
|
|
476
|
+
</IconButton>
|
|
377
477
|
</li>
|
|
378
478
|
|
|
379
479
|
<style>
|
|
480
|
+
/*
|
|
481
|
+
One interface entry, styled as a card in the same family as the settings
|
|
482
|
+
form beside it: the shared `.flowdrop-input` controls (via Input/Select),
|
|
483
|
+
the shared `.flowdrop-btn` buttons (via Button/IconButton), the settings
|
|
484
|
+
form's label weight and size, and the panel's card surface. Nothing here
|
|
485
|
+
declares a colour that isn't a design token.
|
|
486
|
+
*/
|
|
380
487
|
.wf-interface__entry {
|
|
381
488
|
display: flex;
|
|
382
489
|
align-items: flex-start;
|
|
383
|
-
gap: var(--fd-space-
|
|
384
|
-
padding: var(--fd-space-xs);
|
|
385
|
-
|
|
386
|
-
border
|
|
490
|
+
gap: var(--fd-space-sm);
|
|
491
|
+
padding: var(--fd-space-sm) var(--fd-space-sm) var(--fd-space-sm) var(--fd-space-xs);
|
|
492
|
+
background-color: var(--fd-card);
|
|
493
|
+
border: 1px solid var(--fd-border);
|
|
494
|
+
border-radius: var(--fd-radius-lg);
|
|
495
|
+
box-shadow: var(--fd-shadow-sm);
|
|
496
|
+
transition:
|
|
497
|
+
border-color var(--fd-transition-fast),
|
|
498
|
+
box-shadow var(--fd-transition-fast);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.wf-interface__entry:hover {
|
|
502
|
+
border-color: var(--fd-border-strong);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.wf-interface__entry:focus-within {
|
|
506
|
+
border-color: var(--fd-primary);
|
|
507
|
+
box-shadow: 0 0 0 var(--fd-ring-width) var(--fd-primary-muted);
|
|
387
508
|
}
|
|
388
509
|
|
|
389
510
|
.wf-interface__entry--error {
|
|
390
|
-
border-color: color-mix(in srgb, var(--fd-error)
|
|
511
|
+
border-color: color-mix(in srgb, var(--fd-error) 45%, var(--fd-border));
|
|
391
512
|
}
|
|
392
513
|
|
|
393
|
-
.
|
|
514
|
+
/* The card's spine: health dot on top, reorder chevrons below. */
|
|
515
|
+
.wf-interface__entry-side {
|
|
394
516
|
display: flex;
|
|
395
517
|
flex-direction: column;
|
|
518
|
+
align-items: center;
|
|
519
|
+
gap: var(--fd-space-2xs);
|
|
396
520
|
flex-shrink: 0;
|
|
521
|
+
padding-top: 0.375rem;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.wf-interface__reorder {
|
|
525
|
+
display: flex;
|
|
526
|
+
flex-direction: column;
|
|
397
527
|
}
|
|
398
528
|
|
|
399
529
|
.wf-interface__reorder button {
|
|
400
530
|
display: flex;
|
|
401
531
|
align-items: center;
|
|
402
532
|
justify-content: center;
|
|
533
|
+
width: 1.25rem;
|
|
534
|
+
height: 1rem;
|
|
403
535
|
padding: 0;
|
|
404
536
|
border: none;
|
|
537
|
+
border-radius: var(--fd-radius-sm);
|
|
405
538
|
background: none;
|
|
406
539
|
color: var(--fd-muted-foreground);
|
|
540
|
+
font-size: 0.875rem;
|
|
407
541
|
cursor: pointer;
|
|
542
|
+
transition:
|
|
543
|
+
color var(--fd-transition-fast),
|
|
544
|
+
background-color var(--fd-transition-fast);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.wf-interface__reorder button:hover:not(:disabled) {
|
|
548
|
+
color: var(--fd-foreground);
|
|
549
|
+
background-color: var(--fd-subtle);
|
|
408
550
|
}
|
|
409
551
|
|
|
410
552
|
.wf-interface__reorder button:disabled {
|
|
@@ -417,25 +559,29 @@
|
|
|
417
559
|
min-width: 0;
|
|
418
560
|
display: flex;
|
|
419
561
|
flex-direction: column;
|
|
420
|
-
gap: var(--fd-space-
|
|
562
|
+
gap: var(--fd-space-sm);
|
|
421
563
|
}
|
|
422
564
|
|
|
423
565
|
.wf-interface__row {
|
|
424
566
|
display: flex;
|
|
425
567
|
flex-wrap: wrap;
|
|
426
|
-
gap: var(--fd-space-
|
|
568
|
+
gap: var(--fd-space-sm);
|
|
427
569
|
}
|
|
428
570
|
|
|
429
571
|
.wf-interface__field {
|
|
430
572
|
display: flex;
|
|
431
573
|
flex-direction: column;
|
|
432
|
-
gap:
|
|
433
|
-
flex: 1;
|
|
434
|
-
min-width:
|
|
574
|
+
gap: var(--fd-space-2xs);
|
|
575
|
+
flex: 1 1 8rem;
|
|
576
|
+
min-width: 0;
|
|
435
577
|
}
|
|
436
578
|
|
|
437
579
|
.wf-interface__field--id {
|
|
438
|
-
flex:
|
|
580
|
+
flex: 1 1 7rem;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
.wf-interface__field--binding {
|
|
584
|
+
flex: 2 1 12rem;
|
|
439
585
|
}
|
|
440
586
|
|
|
441
587
|
.wf-interface__field--wide {
|
|
@@ -445,62 +591,148 @@
|
|
|
445
591
|
.wf-interface__field--checkbox {
|
|
446
592
|
flex-direction: row;
|
|
447
593
|
align-items: center;
|
|
448
|
-
gap:
|
|
594
|
+
gap: var(--fd-space-xs);
|
|
449
595
|
flex: 0 0 auto;
|
|
596
|
+
align-self: flex-end;
|
|
597
|
+
min-height: 2rem;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
.wf-interface__field--checkbox input[type='checkbox'] {
|
|
601
|
+
width: 1rem;
|
|
602
|
+
height: 1rem;
|
|
603
|
+
margin: 0;
|
|
604
|
+
accent-color: var(--fd-primary);
|
|
605
|
+
cursor: pointer;
|
|
450
606
|
}
|
|
451
607
|
|
|
608
|
+
/* Same voice as FormFieldWrapper's `.form-field__label`. */
|
|
452
609
|
.wf-interface__label {
|
|
453
|
-
font-size:
|
|
454
|
-
|
|
610
|
+
font-size: 0.8125rem;
|
|
611
|
+
font-weight: 600;
|
|
612
|
+
line-height: 1.4;
|
|
613
|
+
letter-spacing: -0.01em;
|
|
614
|
+
color: var(--fd-foreground);
|
|
455
615
|
}
|
|
456
616
|
|
|
457
|
-
.wf-interface__field
|
|
458
|
-
|
|
459
|
-
|
|
617
|
+
.wf-interface__field--checkbox .wf-interface__label {
|
|
618
|
+
font-weight: 500;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/* The bound port, said back the way the canvas says it, in a select's clothes. */
|
|
622
|
+
.wf-interface__binding {
|
|
623
|
+
display: flex;
|
|
624
|
+
align-items: center;
|
|
625
|
+
gap: var(--fd-space-xs);
|
|
626
|
+
width: 100%;
|
|
627
|
+
min-height: 2rem;
|
|
628
|
+
padding: var(--fd-space-2xs) var(--fd-space-xs);
|
|
460
629
|
border: 1px solid var(--fd-border);
|
|
461
|
-
border-radius: var(--fd-radius
|
|
462
|
-
background-color: var(--fd-
|
|
630
|
+
border-radius: var(--fd-control-radius);
|
|
631
|
+
background-color: var(--fd-card);
|
|
463
632
|
color: var(--fd-foreground);
|
|
633
|
+
font: inherit;
|
|
464
634
|
font-size: var(--fd-text-xs);
|
|
635
|
+
text-align: left;
|
|
636
|
+
cursor: pointer;
|
|
637
|
+
transition:
|
|
638
|
+
border-color var(--fd-transition-fast),
|
|
639
|
+
box-shadow var(--fd-transition-fast);
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
.wf-interface__binding:hover {
|
|
643
|
+
border-color: var(--fd-border-strong);
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.wf-interface__binding:focus-visible,
|
|
647
|
+
.wf-interface__binding--open {
|
|
648
|
+
outline: none;
|
|
649
|
+
border-color: var(--fd-primary);
|
|
650
|
+
box-shadow: 0 0 0 var(--fd-ring-width) var(--fd-primary-muted);
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.wf-interface__binding--invalid {
|
|
654
|
+
border-color: var(--fd-error);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
.wf-interface__binding-path {
|
|
658
|
+
display: inline-flex;
|
|
659
|
+
align-items: center;
|
|
660
|
+
flex-wrap: wrap;
|
|
661
|
+
gap: 0.125rem;
|
|
662
|
+
flex: 1;
|
|
663
|
+
min-width: 0;
|
|
664
|
+
line-height: 1.4;
|
|
465
665
|
}
|
|
466
666
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
width: max-content;
|
|
471
|
-
max-width: 100%;
|
|
667
|
+
.wf-interface__binding-path :global(svg) {
|
|
668
|
+
flex-shrink: 0;
|
|
669
|
+
color: var(--fd-muted-foreground);
|
|
472
670
|
}
|
|
473
671
|
|
|
474
|
-
|
|
475
|
-
|
|
672
|
+
.wf-interface__binding-path :global(.flowdrop-badge--outline) {
|
|
673
|
+
flex: none;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
.wf-interface__binding-node {
|
|
677
|
+
color: var(--fd-muted-foreground);
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
.wf-interface__binding-port {
|
|
681
|
+
font-weight: 600;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
.wf-interface__binding-path--dangling {
|
|
685
|
+
color: var(--fd-error);
|
|
686
|
+
font-family: var(--fd-font-mono);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
.wf-interface__binding-placeholder {
|
|
690
|
+
flex: 1;
|
|
691
|
+
color: var(--fd-muted-foreground);
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
.wf-interface__binding :global(.wf-interface__binding-caret) {
|
|
476
695
|
flex-shrink: 0;
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
696
|
+
margin-left: auto;
|
|
697
|
+
color: var(--fd-muted-foreground);
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
/* The unfolded picker: the shared listbox plus its own unbind/cancel row. */
|
|
701
|
+
.wf-interface__picker {
|
|
702
|
+
display: flex;
|
|
703
|
+
flex-direction: column;
|
|
704
|
+
gap: var(--fd-space-xs);
|
|
705
|
+
padding: var(--fd-space-xs);
|
|
706
|
+
border: 1px solid color-mix(in srgb, var(--fd-primary) 45%, var(--fd-border));
|
|
707
|
+
border-radius: var(--fd-radius-md);
|
|
708
|
+
background-color: color-mix(in srgb, var(--fd-primary) 3%, var(--fd-card));
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
.wf-interface__picker-actions {
|
|
712
|
+
display: flex;
|
|
713
|
+
align-items: center;
|
|
714
|
+
gap: var(--fd-space-xs);
|
|
482
715
|
}
|
|
483
716
|
|
|
484
|
-
.wf-
|
|
485
|
-
|
|
717
|
+
.wf-interface__picker-spacer {
|
|
718
|
+
flex: 1;
|
|
486
719
|
}
|
|
487
720
|
|
|
488
|
-
.wf-
|
|
489
|
-
|
|
490
|
-
background-color: var(--fd-warning);
|
|
721
|
+
.wf-interface__pull-row {
|
|
722
|
+
display: flex;
|
|
491
723
|
}
|
|
492
724
|
|
|
493
|
-
.wf-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
background-color: var(--fd-error);
|
|
725
|
+
.wf-interface__pull-row :global(.wf-interface__pull) {
|
|
726
|
+
padding-inline: var(--fd-space-xs);
|
|
727
|
+
color: var(--fd-primary);
|
|
497
728
|
}
|
|
498
729
|
|
|
499
730
|
/* Field-anchored feedback: one short line under the field it belongs to. */
|
|
500
731
|
.wf-interface__inline {
|
|
501
732
|
display: inline-flex;
|
|
733
|
+
flex-wrap: wrap;
|
|
502
734
|
align-items: baseline;
|
|
503
|
-
gap:
|
|
735
|
+
gap: var(--fd-space-xs);
|
|
504
736
|
font-size: var(--fd-text-xs);
|
|
505
737
|
line-height: 1.4;
|
|
506
738
|
}
|
|
@@ -514,17 +746,20 @@
|
|
|
514
746
|
}
|
|
515
747
|
|
|
516
748
|
.wf-interface__quickfix {
|
|
517
|
-
padding: 0
|
|
518
|
-
border: 1px solid
|
|
519
|
-
border-radius: var(--fd-radius-
|
|
520
|
-
background-color:
|
|
521
|
-
color:
|
|
522
|
-
font-size: var(--fd-text-
|
|
749
|
+
padding: 0 var(--fd-space-xs);
|
|
750
|
+
border: 1px solid currentColor;
|
|
751
|
+
border-radius: var(--fd-radius-full);
|
|
752
|
+
background-color: transparent;
|
|
753
|
+
color: inherit;
|
|
754
|
+
font-size: var(--fd-text-2xs);
|
|
755
|
+
font-weight: 600;
|
|
756
|
+
line-height: 1.4;
|
|
523
757
|
cursor: pointer;
|
|
758
|
+
transition: background-color var(--fd-transition-fast);
|
|
524
759
|
}
|
|
525
760
|
|
|
526
761
|
.wf-interface__quickfix:hover {
|
|
527
|
-
background-color:
|
|
762
|
+
background-color: color-mix(in srgb, currentColor 12%, transparent);
|
|
528
763
|
}
|
|
529
764
|
|
|
530
765
|
/* The secondary fields live behind a disclosure so a card's resting state
|
|
@@ -534,109 +769,109 @@
|
|
|
534
769
|
}
|
|
535
770
|
|
|
536
771
|
.wf-interface__more > summary {
|
|
772
|
+
display: inline-flex;
|
|
773
|
+
align-items: center;
|
|
774
|
+
gap: 0.125rem;
|
|
775
|
+
list-style: none;
|
|
776
|
+
padding: 0.125rem var(--fd-space-xs) 0.125rem 0.125rem;
|
|
777
|
+
border-radius: var(--fd-radius-sm);
|
|
537
778
|
color: var(--fd-muted-foreground);
|
|
779
|
+
font-weight: 500;
|
|
538
780
|
cursor: pointer;
|
|
539
781
|
user-select: none;
|
|
782
|
+
transition:
|
|
783
|
+
color var(--fd-transition-fast),
|
|
784
|
+
background-color var(--fd-transition-fast);
|
|
540
785
|
}
|
|
541
786
|
|
|
542
|
-
.wf-interface__more
|
|
543
|
-
|
|
787
|
+
.wf-interface__more > summary::-webkit-details-marker {
|
|
788
|
+
display: none;
|
|
544
789
|
}
|
|
545
790
|
|
|
546
|
-
.wf-interface__more > :
|
|
547
|
-
|
|
548
|
-
|
|
791
|
+
.wf-interface__more > summary:hover {
|
|
792
|
+
color: var(--fd-foreground);
|
|
793
|
+
background-color: var(--fd-subtle);
|
|
549
794
|
}
|
|
550
795
|
|
|
551
|
-
.wf-
|
|
552
|
-
|
|
553
|
-
align-items: center;
|
|
554
|
-
gap: 0.25rem;
|
|
555
|
-
align-self: flex-end;
|
|
556
|
-
padding: 0.25rem 0.375rem;
|
|
557
|
-
border: 1px solid var(--fd-border);
|
|
558
|
-
border-radius: var(--fd-radius-sm);
|
|
559
|
-
background-color: var(--fd-background);
|
|
560
|
-
color: var(--fd-foreground);
|
|
561
|
-
font-size: var(--fd-text-xs);
|
|
562
|
-
white-space: nowrap;
|
|
563
|
-
cursor: pointer;
|
|
796
|
+
.wf-interface__more > summary :global(svg) {
|
|
797
|
+
transition: transform var(--fd-transition-fast);
|
|
564
798
|
}
|
|
565
799
|
|
|
566
|
-
.wf-
|
|
567
|
-
|
|
800
|
+
.wf-interface__more[open] > summary :global(svg) {
|
|
801
|
+
transform: rotate(90deg);
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
.wf-interface__more-body {
|
|
805
|
+
display: flex;
|
|
806
|
+
flex-direction: column;
|
|
807
|
+
gap: var(--fd-space-sm);
|
|
808
|
+
margin-top: var(--fd-space-sm);
|
|
809
|
+
padding-top: var(--fd-space-sm);
|
|
810
|
+
border-top: 1px dashed var(--fd-border-muted);
|
|
568
811
|
}
|
|
569
812
|
|
|
570
813
|
.wf-interface__examples {
|
|
571
814
|
display: flex;
|
|
572
815
|
flex-direction: column;
|
|
573
|
-
gap:
|
|
816
|
+
gap: var(--fd-space-xs);
|
|
574
817
|
}
|
|
575
818
|
|
|
576
819
|
.wf-interface__example-row {
|
|
577
820
|
display: flex;
|
|
578
821
|
align-items: center;
|
|
579
|
-
gap:
|
|
822
|
+
gap: var(--fd-space-xs);
|
|
580
823
|
}
|
|
581
824
|
|
|
582
|
-
.wf-interface__example-row input {
|
|
825
|
+
.wf-interface__example-row :global(.flowdrop-input) {
|
|
583
826
|
flex: 1;
|
|
584
|
-
padding: 0.25rem 0.375rem;
|
|
585
|
-
border: 1px solid var(--fd-border);
|
|
586
|
-
border-radius: var(--fd-radius-sm);
|
|
587
|
-
background-color: var(--fd-background);
|
|
588
|
-
color: var(--fd-foreground);
|
|
589
|
-
font-size: var(--fd-text-xs);
|
|
590
827
|
}
|
|
591
828
|
|
|
592
|
-
.wf-interface__example-remove {
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
background: none;
|
|
597
|
-
color: var(--fd-muted-foreground);
|
|
598
|
-
cursor: pointer;
|
|
829
|
+
.wf-interface__example-row :global(.wf-interface__example-remove) {
|
|
830
|
+
width: 1.75rem;
|
|
831
|
+
height: 1.75rem;
|
|
832
|
+
flex-shrink: 0;
|
|
599
833
|
}
|
|
600
834
|
|
|
601
|
-
.wf-interface__example-remove:hover {
|
|
835
|
+
.wf-interface__example-row :global(.wf-interface__example-remove:hover) {
|
|
602
836
|
color: var(--fd-error);
|
|
603
837
|
}
|
|
604
838
|
|
|
605
|
-
.wf-interface__example-add {
|
|
606
|
-
display: inline-flex;
|
|
607
|
-
align-items: center;
|
|
608
|
-
gap: 0.25rem;
|
|
839
|
+
.wf-interface__examples :global(.wf-interface__example-add) {
|
|
609
840
|
align-self: flex-start;
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
background: none;
|
|
841
|
+
min-height: 1.75rem;
|
|
842
|
+
padding-inline: var(--fd-space-xs);
|
|
613
843
|
color: var(--fd-muted-foreground);
|
|
614
|
-
font-size: var(--fd-text-xs);
|
|
615
|
-
cursor: pointer;
|
|
616
844
|
}
|
|
617
845
|
|
|
618
|
-
.wf-interface__example-add:hover {
|
|
846
|
+
.wf-interface__examples :global(.wf-interface__example-add:hover) {
|
|
619
847
|
color: var(--fd-foreground);
|
|
620
848
|
}
|
|
621
849
|
|
|
850
|
+
/* Status callouts: a tinted strip with a coloured edge, not bare coloured text. */
|
|
622
851
|
.wf-interface__status {
|
|
623
852
|
margin: 0;
|
|
853
|
+
padding: var(--fd-space-2xs) var(--fd-space-xs);
|
|
854
|
+
border-left: 3px solid var(--fd-muted-foreground);
|
|
855
|
+
border-radius: 0 var(--fd-radius-sm) var(--fd-radius-sm) 0;
|
|
856
|
+
background-color: var(--fd-muted);
|
|
624
857
|
font-size: var(--fd-text-xs);
|
|
625
858
|
line-height: 1.5;
|
|
626
|
-
color: var(--fd-
|
|
859
|
+
color: var(--fd-foreground);
|
|
627
860
|
}
|
|
628
861
|
|
|
629
862
|
.wf-interface__status--error,
|
|
630
863
|
.wf-interface__status--dangling,
|
|
631
864
|
.wf-interface__status--hidden,
|
|
632
865
|
.wf-interface__status--over-bound {
|
|
633
|
-
color: var(--fd-error);
|
|
866
|
+
border-left-color: var(--fd-error);
|
|
867
|
+
background-color: var(--fd-error-muted);
|
|
634
868
|
}
|
|
635
869
|
|
|
636
870
|
.wf-interface__status--warning,
|
|
637
871
|
.wf-interface__status--unbound,
|
|
638
872
|
.wf-interface__status--type-mismatch {
|
|
639
|
-
color: var(--fd-warning);
|
|
873
|
+
border-left-color: var(--fd-warning);
|
|
874
|
+
background-color: var(--fd-warning-muted);
|
|
640
875
|
}
|
|
641
876
|
|
|
642
877
|
.wf-interface__meta {
|
|
@@ -644,29 +879,37 @@
|
|
|
644
879
|
color: var(--fd-muted-foreground);
|
|
645
880
|
}
|
|
646
881
|
|
|
882
|
+
.wf-interface__meta > summary {
|
|
883
|
+
cursor: pointer;
|
|
884
|
+
user-select: none;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
.wf-interface__meta > summary:hover {
|
|
888
|
+
color: var(--fd-foreground);
|
|
889
|
+
}
|
|
890
|
+
|
|
647
891
|
.wf-interface__meta pre {
|
|
648
|
-
margin:
|
|
649
|
-
padding:
|
|
650
|
-
|
|
892
|
+
margin: var(--fd-space-xs) 0 0;
|
|
893
|
+
padding: var(--fd-space-xs);
|
|
894
|
+
border: 1px solid var(--fd-border-muted);
|
|
651
895
|
border-radius: var(--fd-radius-sm);
|
|
896
|
+
background-color: var(--fd-muted);
|
|
897
|
+
color: var(--fd-foreground);
|
|
898
|
+
font-family: var(--fd-font-mono);
|
|
899
|
+
font-size: var(--fd-text-2xs);
|
|
900
|
+
line-height: 1.5;
|
|
652
901
|
overflow-x: auto;
|
|
653
902
|
}
|
|
654
903
|
|
|
655
|
-
.wf-interface__remove {
|
|
904
|
+
.wf-interface__entry :global(.wf-interface__remove) {
|
|
656
905
|
flex-shrink: 0;
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
padding: 0.25rem;
|
|
661
|
-
border: none;
|
|
662
|
-
background: none;
|
|
663
|
-
color: var(--fd-muted-foreground);
|
|
664
|
-
cursor: pointer;
|
|
665
|
-
border-radius: var(--fd-radius-sm);
|
|
906
|
+
width: 1.75rem;
|
|
907
|
+
height: 1.75rem;
|
|
908
|
+
margin-top: 0.125rem;
|
|
666
909
|
}
|
|
667
910
|
|
|
668
|
-
.wf-interface__remove:hover {
|
|
911
|
+
.wf-interface__entry :global(.wf-interface__remove:hover) {
|
|
669
912
|
color: var(--fd-error);
|
|
670
|
-
background-color:
|
|
913
|
+
background-color: var(--fd-error-muted);
|
|
671
914
|
}
|
|
672
915
|
</style>
|