@oomol-lab/open-flow 0.1.0-alpha.6 → 0.1.0-alpha.7
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/dist/browser/{addNodeOptions-C4wix0_u.js → addNodeOptions-DRndy4EK.js} +2080 -2022
- package/dist/browser/{createLucideIcon-ggJB9CTC.js → createLucideIcon-CqjqCezK.js} +829 -832
- package/dist/browser/{createResourceDialog-CESUCxOM.js → createResourceDialog-A64dDFCG.js} +140 -140
- package/dist/browser/{esm-CoE5_2w7.js → esm-YIGXG-Js.js} +1 -11
- package/dist/browser/{field-CIrv7Rez.js → field-CKGQHCIi.js} +88 -88
- package/dist/browser/flow-authoring.js +29 -19
- package/dist/browser/flow-change.d.ts +16 -10
- package/dist/browser/flow-change.js +62 -59
- package/dist/browser/{flowWorkspace-Bo0bz1Uz.js → flowWorkspace-D7-rBA1-.js} +16961 -12403
- package/dist/browser/licenses.md +514 -0
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.js +439 -388
- package/dist/common/control-api-conformance.js +106 -15
- package/dist/common/control-api.d.ts +1 -1
- package/dist/common/control-api.js +1 -1
- package/dist/common/flow-encoding.d.ts +3 -3
- package/dist/common/flow-encoding.js +11 -7
- package/dist/common/flow-semantics.js +514 -505
- package/dist/common/scheduler.js +156 -151
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dt as e, F as t, Gn as n, Kn as r, O as i, Ot as a, Vn as o, Xn as s, ar as c, br as l, cr as u, k as d, lr as f, nt as p, xn as m } from "./createLucideIcon-CqjqCezK.js";
|
|
2
2
|
import * as h from "react";
|
|
3
3
|
import { useMemo as g } from "react";
|
|
4
4
|
import { jsx as _ } from "react/jsx-runtime";
|
|
@@ -16,7 +16,7 @@ function v(e, t) {
|
|
|
16
16
|
}, [t, e]);
|
|
17
17
|
}
|
|
18
18
|
function y(e, t, n, r) {
|
|
19
|
-
let i = n.useState("isMountedByTrigger", e), a = v(e, n),
|
|
19
|
+
let i = n.useState("isMountedByTrigger", e), a = v(e, n), o = u((t) => {
|
|
20
20
|
if (a(t), !t || !n.select("open")) return;
|
|
21
21
|
let i = n.select("activeTriggerId");
|
|
22
22
|
if (i === e) {
|
|
@@ -32,7 +32,7 @@ function y(e, t, n, r) {
|
|
|
32
32
|
...r
|
|
33
33
|
});
|
|
34
34
|
});
|
|
35
|
-
return
|
|
35
|
+
return c(() => {
|
|
36
36
|
i && n.update({
|
|
37
37
|
activeTriggerElement: t.current,
|
|
38
38
|
...r
|
|
@@ -43,13 +43,13 @@ function y(e, t, n, r) {
|
|
|
43
43
|
t,
|
|
44
44
|
...Object.values(r)
|
|
45
45
|
]), {
|
|
46
|
-
registerTrigger:
|
|
46
|
+
registerTrigger: o,
|
|
47
47
|
isMountedByThisTrigger: i
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
function b(e) {
|
|
51
51
|
let t = e.useState("open");
|
|
52
|
-
|
|
52
|
+
c(() => {
|
|
53
53
|
if (t && !e.select("activeTriggerId") && e.context.triggerElements.size === 1) {
|
|
54
54
|
let t = e.context.triggerElements.entries().next();
|
|
55
55
|
if (!t.done) {
|
|
@@ -62,35 +62,35 @@ function b(e) {
|
|
|
62
62
|
}
|
|
63
63
|
}, [t, e]);
|
|
64
64
|
}
|
|
65
|
-
function x(
|
|
66
|
-
let { mounted:
|
|
67
|
-
|
|
68
|
-
mounted:
|
|
69
|
-
transitionStatus:
|
|
65
|
+
function x(t, n, r) {
|
|
66
|
+
let { mounted: i, setMounted: o, transitionStatus: s } = e(t);
|
|
67
|
+
n.useSyncedValues({
|
|
68
|
+
mounted: i,
|
|
69
|
+
transitionStatus: s
|
|
70
70
|
});
|
|
71
|
-
let
|
|
72
|
-
|
|
71
|
+
let c = u(() => {
|
|
72
|
+
o(!1), n.update({
|
|
73
73
|
activeTriggerId: null,
|
|
74
74
|
activeTriggerElement: null,
|
|
75
75
|
mounted: !1
|
|
76
|
-
}),
|
|
77
|
-
}),
|
|
78
|
-
return
|
|
79
|
-
enabled: !
|
|
80
|
-
open:
|
|
81
|
-
ref:
|
|
76
|
+
}), r?.(), n.context.onOpenChangeComplete?.(!1);
|
|
77
|
+
}), l = n.useState("preventUnmountingOnClose");
|
|
78
|
+
return a({
|
|
79
|
+
enabled: !l,
|
|
80
|
+
open: t,
|
|
81
|
+
ref: n.context.popupRef,
|
|
82
82
|
onComplete() {
|
|
83
|
-
|
|
83
|
+
t || c();
|
|
84
84
|
}
|
|
85
85
|
}), {
|
|
86
|
-
forceUnmount:
|
|
87
|
-
transitionStatus:
|
|
86
|
+
forceUnmount: c,
|
|
87
|
+
transitionStatus: s
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
//#endregion
|
|
91
91
|
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/floating-ui-react/utils/getEmptyRootContext.js
|
|
92
92
|
function S() {
|
|
93
|
-
return new
|
|
93
|
+
return new d({
|
|
94
94
|
open: !1,
|
|
95
95
|
transitionStatus: void 0,
|
|
96
96
|
floatingElement: null,
|
|
@@ -123,50 +123,50 @@ function C() {
|
|
|
123
123
|
popupProps: s
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
var w =
|
|
127
|
-
open:
|
|
128
|
-
mounted:
|
|
129
|
-
transitionStatus:
|
|
130
|
-
floatingRootContext:
|
|
131
|
-
preventUnmountingOnClose:
|
|
132
|
-
payload:
|
|
126
|
+
var w = p((e) => e.triggerIdProp ?? e.activeTriggerId), T = {
|
|
127
|
+
open: p((e) => e.openProp ?? e.open),
|
|
128
|
+
mounted: p((e) => e.mounted),
|
|
129
|
+
transitionStatus: p((e) => e.transitionStatus),
|
|
130
|
+
floatingRootContext: p((e) => e.floatingRootContext),
|
|
131
|
+
preventUnmountingOnClose: p((e) => e.preventUnmountingOnClose),
|
|
132
|
+
payload: p((e) => e.payload),
|
|
133
133
|
activeTriggerId: w,
|
|
134
|
-
activeTriggerElement:
|
|
135
|
-
isTriggerActive:
|
|
136
|
-
isOpenedByTrigger:
|
|
137
|
-
isMountedByTrigger:
|
|
138
|
-
triggerProps:
|
|
139
|
-
popupProps:
|
|
140
|
-
popupElement:
|
|
141
|
-
positionerElement:
|
|
134
|
+
activeTriggerElement: p((e) => e.mounted ? e.activeTriggerElement : null),
|
|
135
|
+
isTriggerActive: p((e, t) => t !== void 0 && w(e) === t),
|
|
136
|
+
isOpenedByTrigger: p((e, t) => t !== void 0 && w(e) === t && e.open),
|
|
137
|
+
isMountedByTrigger: p((e, t) => t !== void 0 && w(e) === t && e.mounted),
|
|
138
|
+
triggerProps: p((e, t) => t ? e.activeTriggerProps : e.inactiveTriggerProps),
|
|
139
|
+
popupProps: p((e) => e.popupProps),
|
|
140
|
+
popupElement: p((e) => e.popupElement),
|
|
141
|
+
positionerElement: p((e) => e.positionerElement)
|
|
142
142
|
};
|
|
143
143
|
//#endregion
|
|
144
144
|
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useSyncedFloatingRootContext.js
|
|
145
145
|
function E(e) {
|
|
146
|
-
let { popupStore: n, treatPopupAsFloatingElement: r = !1, onOpenChange: i } = e,
|
|
147
|
-
open:
|
|
146
|
+
let { popupStore: n, treatPopupAsFloatingElement: r = !1, onOpenChange: i } = e, a = o(), s = t() != null, u = n.useState("open"), p = n.useState("activeTriggerElement"), m = n.useState(r ? "popupElement" : "positionerElement"), h = n.context.triggerElements, g = f(() => new d({
|
|
147
|
+
open: u,
|
|
148
148
|
transitionStatus: void 0,
|
|
149
|
-
referenceElement:
|
|
150
|
-
floatingElement:
|
|
149
|
+
referenceElement: p,
|
|
150
|
+
floatingElement: m,
|
|
151
151
|
triggerElements: h,
|
|
152
152
|
onOpenChange: i,
|
|
153
|
-
floatingId:
|
|
153
|
+
floatingId: a,
|
|
154
154
|
syncOnly: !0,
|
|
155
155
|
nested: s
|
|
156
156
|
})).current;
|
|
157
|
-
return
|
|
157
|
+
return c(() => {
|
|
158
158
|
let e = {
|
|
159
|
-
open:
|
|
160
|
-
floatingId:
|
|
161
|
-
referenceElement:
|
|
162
|
-
floatingElement:
|
|
159
|
+
open: u,
|
|
160
|
+
floatingId: a,
|
|
161
|
+
referenceElement: p,
|
|
162
|
+
floatingElement: m
|
|
163
163
|
};
|
|
164
|
-
|
|
164
|
+
l(p) && (e.domReferenceElement = p), g.state.positionReference === g.state.referenceElement && (e.positionReference = p), g.update(e);
|
|
165
165
|
}, [
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
f,
|
|
166
|
+
u,
|
|
167
|
+
a,
|
|
169
168
|
p,
|
|
169
|
+
m,
|
|
170
170
|
g
|
|
171
171
|
]), g.context.onOpenChange = i, g.context.nested = s, g;
|
|
172
172
|
}
|
|
@@ -177,50 +177,50 @@ var D = /* @__PURE__ */ new Map([
|
|
|
177
177
|
["combobox", "listbox"],
|
|
178
178
|
["label", !1]
|
|
179
179
|
]);
|
|
180
|
-
function O(
|
|
181
|
-
let
|
|
180
|
+
function O(e, n = {}) {
|
|
181
|
+
let r = "rootStore" in e ? e.rootStore : e, i = r.useState("open"), a = r.useState("floatingId"), c = r.useState("domReferenceElement"), l = r.useState("floatingElement"), { role: u = "dialog" } = n, d = o(), f = c?.id || d, p = h.useMemo(() => m(l)?.id || a, [l, a]), g = D.get(u) ?? u, _ = t() != null, v = h.useMemo(() => g === "tooltip" || u === "label" ? s : {
|
|
182
182
|
"aria-haspopup": g === "alertdialog" ? "dialog" : g,
|
|
183
183
|
"aria-expanded": "false",
|
|
184
184
|
...g === "listbox" && { role: "combobox" },
|
|
185
185
|
...g === "menu" && _ && { role: "menuitem" },
|
|
186
|
-
...
|
|
187
|
-
...
|
|
186
|
+
...u === "select" && { "aria-autocomplete": "none" },
|
|
187
|
+
...u === "combobox" && { "aria-autocomplete": "list" }
|
|
188
188
|
}, [
|
|
189
189
|
g,
|
|
190
190
|
_,
|
|
191
|
-
|
|
192
|
-
]), y = h.useMemo(() => g === "tooltip" ||
|
|
191
|
+
u
|
|
192
|
+
]), y = h.useMemo(() => g === "tooltip" || u === "label" ? { [`aria-${u === "label" ? "labelledby" : "describedby"}`]: i ? p : void 0 } : {
|
|
193
193
|
...v,
|
|
194
|
-
"aria-expanded":
|
|
195
|
-
"aria-controls":
|
|
196
|
-
...g === "menu" && { id:
|
|
194
|
+
"aria-expanded": i ? "true" : "false",
|
|
195
|
+
"aria-controls": i ? p : void 0,
|
|
196
|
+
...g === "menu" && { id: f }
|
|
197
197
|
}, [
|
|
198
198
|
g,
|
|
199
|
-
m,
|
|
200
|
-
o,
|
|
201
199
|
p,
|
|
202
|
-
|
|
200
|
+
i,
|
|
201
|
+
f,
|
|
202
|
+
u,
|
|
203
203
|
v
|
|
204
204
|
]), b = h.useMemo(() => {
|
|
205
205
|
let e = {
|
|
206
|
-
id:
|
|
206
|
+
id: p,
|
|
207
207
|
...g && { role: g }
|
|
208
208
|
};
|
|
209
|
-
return g === "tooltip" ||
|
|
209
|
+
return g === "tooltip" || u === "label" ? e : {
|
|
210
210
|
...e,
|
|
211
|
-
...g === "menu" && { "aria-labelledby":
|
|
211
|
+
...g === "menu" && { "aria-labelledby": f }
|
|
212
212
|
};
|
|
213
213
|
}, [
|
|
214
214
|
g,
|
|
215
|
-
m,
|
|
216
215
|
p,
|
|
217
|
-
|
|
216
|
+
f,
|
|
217
|
+
u
|
|
218
218
|
]), x = h.useCallback(({ active: e, selected: t }) => {
|
|
219
219
|
let n = {
|
|
220
220
|
role: "option",
|
|
221
|
-
...e && { id: `${
|
|
221
|
+
...e && { id: `${p}-fui-option` }
|
|
222
222
|
};
|
|
223
|
-
switch (
|
|
223
|
+
switch (u) {
|
|
224
224
|
case "select":
|
|
225
225
|
case "combobox": return {
|
|
226
226
|
...n,
|
|
@@ -228,7 +228,7 @@ function O(n, r = {}) {
|
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
230
|
return {};
|
|
231
|
-
}, [
|
|
231
|
+
}, [p, u]);
|
|
232
232
|
return h.useMemo(() => ({
|
|
233
233
|
reference: y,
|
|
234
234
|
floating: b,
|
|
@@ -246,7 +246,7 @@ function O(n, r = {}) {
|
|
|
246
246
|
function k({ className: e, ...t }) {
|
|
247
247
|
return /* @__PURE__ */ _("label", {
|
|
248
248
|
"data-slot": "label",
|
|
249
|
-
className:
|
|
249
|
+
className: n("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", e),
|
|
250
250
|
...t
|
|
251
251
|
});
|
|
252
252
|
}
|
|
@@ -255,11 +255,11 @@ function k({ className: e, ...t }) {
|
|
|
255
255
|
function A({ className: e, ...t }) {
|
|
256
256
|
return /* @__PURE__ */ _("div", {
|
|
257
257
|
"data-slot": "field-group",
|
|
258
|
-
className:
|
|
258
|
+
className: n("group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4", e),
|
|
259
259
|
...t
|
|
260
260
|
});
|
|
261
261
|
}
|
|
262
|
-
var j =
|
|
262
|
+
var j = r("group/field flex w-full gap-2 data-[invalid=true]:text-destructive", {
|
|
263
263
|
variants: { orientation: {
|
|
264
264
|
vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
|
|
265
265
|
horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
|
|
@@ -267,45 +267,45 @@ var j = p("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",
|
|
|
267
267
|
} },
|
|
268
268
|
defaultVariants: { orientation: "vertical" }
|
|
269
269
|
});
|
|
270
|
-
function M({ className: e, orientation: t = "vertical", ...
|
|
270
|
+
function M({ className: e, orientation: t = "vertical", ...r }) {
|
|
271
271
|
return /* @__PURE__ */ _("div", {
|
|
272
272
|
role: "group",
|
|
273
273
|
"data-slot": "field",
|
|
274
274
|
"data-orientation": t,
|
|
275
|
-
className:
|
|
276
|
-
...
|
|
275
|
+
className: n(j({ orientation: t }), e),
|
|
276
|
+
...r
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
279
|
function N({ className: e, ...t }) {
|
|
280
280
|
return /* @__PURE__ */ _(k, {
|
|
281
281
|
"data-slot": "field-label",
|
|
282
|
-
className:
|
|
282
|
+
className: n("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", e),
|
|
283
283
|
...t
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
286
|
function P({ className: e, ...t }) {
|
|
287
287
|
return /* @__PURE__ */ _("p", {
|
|
288
288
|
"data-slot": "field-description",
|
|
289
|
-
className:
|
|
289
|
+
className: n("text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5", "last:mt-0 nth-last-2:-mt-1", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", e),
|
|
290
290
|
...t
|
|
291
291
|
});
|
|
292
292
|
}
|
|
293
|
-
function F({ className: e, children: t, errors:
|
|
294
|
-
let
|
|
293
|
+
function F({ className: e, children: t, errors: r, ...i }) {
|
|
294
|
+
let a = g(() => {
|
|
295
295
|
if (t) return t;
|
|
296
|
-
if (!
|
|
297
|
-
let e = [...new Map(
|
|
296
|
+
if (!r?.length) return null;
|
|
297
|
+
let e = [...new Map(r.map((e) => [e?.message, e])).values()];
|
|
298
298
|
return e?.length == 1 ? e[0]?.message : /* @__PURE__ */ _("ul", {
|
|
299
299
|
className: "ml-4 flex list-disc flex-col gap-1",
|
|
300
300
|
children: e.map((e, t) => e?.message && /* @__PURE__ */ _("li", { children: e.message }, t))
|
|
301
301
|
});
|
|
302
|
-
}, [t,
|
|
303
|
-
return
|
|
302
|
+
}, [t, r]);
|
|
303
|
+
return a ? /* @__PURE__ */ _("div", {
|
|
304
304
|
role: "alert",
|
|
305
305
|
"data-slot": "field-error",
|
|
306
|
-
className:
|
|
307
|
-
...
|
|
308
|
-
children:
|
|
306
|
+
className: n("text-sm font-normal text-destructive", e),
|
|
307
|
+
...i,
|
|
308
|
+
children: a
|
|
309
309
|
}) : null;
|
|
310
310
|
}
|
|
311
311
|
//#endregion
|
|
@@ -67,15 +67,17 @@ function o(e, t, n, r = {
|
|
|
67
67
|
imports: [],
|
|
68
68
|
source: "export default function run(input) {\n return { result: input.value }\n}\n"
|
|
69
69
|
}, i = {
|
|
70
|
-
inputs: {
|
|
70
|
+
inputs: [{
|
|
71
|
+
handle: "value",
|
|
71
72
|
jsonSchema: {},
|
|
72
73
|
nullable: !0,
|
|
73
74
|
value: null
|
|
74
|
-
}
|
|
75
|
-
outputs: {
|
|
75
|
+
}],
|
|
76
|
+
outputs: [{
|
|
77
|
+
handle: "result",
|
|
76
78
|
jsonSchema: {},
|
|
77
79
|
nullable: !0
|
|
78
|
-
}
|
|
80
|
+
}]
|
|
79
81
|
}) {
|
|
80
82
|
return [{
|
|
81
83
|
kind: "module.create",
|
|
@@ -127,8 +129,9 @@ function c(e, t, n, r, i, a = {}) {
|
|
|
127
129
|
kind: "llm",
|
|
128
130
|
mode: r
|
|
129
131
|
},
|
|
130
|
-
inputs:
|
|
131
|
-
|
|
132
|
+
inputs: [
|
|
133
|
+
{
|
|
134
|
+
handle: "messages",
|
|
132
135
|
jsonSchema: {
|
|
133
136
|
items: { type: "object" },
|
|
134
137
|
type: "array"
|
|
@@ -136,12 +139,14 @@ function c(e, t, n, r, i, a = {}) {
|
|
|
136
139
|
nullable: !0,
|
|
137
140
|
value: x(o, "messages", null)
|
|
138
141
|
},
|
|
139
|
-
|
|
142
|
+
{
|
|
143
|
+
handle: "input",
|
|
140
144
|
jsonSchema: { type: "string" },
|
|
141
145
|
nullable: !1,
|
|
142
146
|
value: x(o, "input", "Alex")
|
|
143
147
|
},
|
|
144
|
-
|
|
148
|
+
{
|
|
149
|
+
handle: "template",
|
|
145
150
|
jsonSchema: {
|
|
146
151
|
items: { type: "object" },
|
|
147
152
|
minItems: 1,
|
|
@@ -153,18 +158,21 @@ function c(e, t, n, r, i, a = {}) {
|
|
|
153
158
|
role: "user"
|
|
154
159
|
}])
|
|
155
160
|
},
|
|
156
|
-
|
|
161
|
+
{
|
|
162
|
+
handle: "model",
|
|
157
163
|
jsonSchema: { type: "object" },
|
|
158
164
|
nullable: !1,
|
|
159
165
|
value: x(o, "model", { model: "deepseek-v4-flash" })
|
|
160
166
|
}
|
|
161
|
-
|
|
167
|
+
],
|
|
162
168
|
name: n,
|
|
163
|
-
outputs: {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
169
|
+
outputs: [{
|
|
170
|
+
...a.output,
|
|
171
|
+
description: a.output?.description ?? i,
|
|
172
|
+
handle: "output",
|
|
173
|
+
jsonSchema: a.output?.jsonSchema ?? (r == "chat" ? { type: "string" } : {}),
|
|
174
|
+
nullable: a.output?.nullable ?? !1
|
|
175
|
+
}]
|
|
168
176
|
});
|
|
169
177
|
}
|
|
170
178
|
function l(e, t, n) {
|
|
@@ -206,11 +214,12 @@ function u(e, t, n) {
|
|
|
206
214
|
inputs: {},
|
|
207
215
|
kind: "value",
|
|
208
216
|
name: n,
|
|
209
|
-
values: {
|
|
217
|
+
values: [{
|
|
218
|
+
handle: "value",
|
|
210
219
|
jsonSchema: {},
|
|
211
220
|
nullable: !0,
|
|
212
221
|
value: null
|
|
213
|
-
}
|
|
222
|
+
}]
|
|
214
223
|
},
|
|
215
224
|
nodeId: t,
|
|
216
225
|
target: e
|
|
@@ -323,6 +332,7 @@ function _(e, t, n, r) {
|
|
|
323
332
|
if (i == null) return;
|
|
324
333
|
let a = {
|
|
325
334
|
...r.description == null ? {} : { description: r.description },
|
|
335
|
+
icon: i.icon,
|
|
326
336
|
name: r.name
|
|
327
337
|
}, o;
|
|
328
338
|
switch (r.kind) {
|
|
@@ -381,9 +391,9 @@ function y(e, t) {
|
|
|
381
391
|
return t.kind == "flow" ? e.document.graph : e.document.subflows[t.id]?.graph;
|
|
382
392
|
}
|
|
383
393
|
function b(e) {
|
|
384
|
-
return Object.fromEntries(
|
|
394
|
+
return Object.fromEntries(e.flatMap((e) => Object.hasOwn(e, "value") ? [[e.handle, {
|
|
385
395
|
kind: "value",
|
|
386
|
-
value:
|
|
396
|
+
value: e.value
|
|
387
397
|
}]] : []));
|
|
388
398
|
}
|
|
389
399
|
function x(e, t, n) {
|
|
@@ -12,6 +12,13 @@ export interface PortDefinition {
|
|
|
12
12
|
export interface InputPortDefinition extends PortDefinition {
|
|
13
13
|
readonly value?: JsonValue;
|
|
14
14
|
}
|
|
15
|
+
export interface Port extends PortDefinition {
|
|
16
|
+
readonly handle: string;
|
|
17
|
+
}
|
|
18
|
+
export interface InputPort extends InputPortDefinition {
|
|
19
|
+
readonly handle: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function portsByHandle<Value extends Port>(ports: readonly Value[]): Readonly<Record<string, Value>>;
|
|
15
22
|
export interface NodeSource {
|
|
16
23
|
readonly kind: 'node';
|
|
17
24
|
readonly nodeId: string;
|
|
@@ -38,6 +45,7 @@ export interface OutputMapping {
|
|
|
38
45
|
interface GraphNodeBase {
|
|
39
46
|
readonly concurrency: number;
|
|
40
47
|
readonly description?: string;
|
|
48
|
+
readonly icon?: string;
|
|
41
49
|
readonly inputs: Readonly<Record<string, InputMapping>>;
|
|
42
50
|
readonly name?: string;
|
|
43
51
|
readonly timeoutMs?: number;
|
|
@@ -48,7 +56,7 @@ export interface SubflowNode extends GraphNodeBase {
|
|
|
48
56
|
}
|
|
49
57
|
export interface ValueNode extends GraphNodeBase {
|
|
50
58
|
readonly kind: 'value';
|
|
51
|
-
readonly values:
|
|
59
|
+
readonly values: readonly InputPort[];
|
|
52
60
|
}
|
|
53
61
|
export type ConditionOperator = '!=' | '<' | '<=' | '==' | '>' | '>=' | 'contains' | 'endsWith' | 'hasKey' | 'hasValue' | 'isEmpty' | 'isFalse' | 'isNotEmpty' | 'isNotNull' | 'isNull' | 'isTrue' | 'notContains' | 'notHasKey' | 'notHasValue' | 'startsWith';
|
|
54
62
|
export interface ConditionExpression {
|
|
@@ -64,9 +72,7 @@ export interface ConditionCase {
|
|
|
64
72
|
export interface ConditionNode extends GraphNodeBase {
|
|
65
73
|
readonly cases: readonly ConditionCase[];
|
|
66
74
|
readonly defaultOutput?: string;
|
|
67
|
-
readonly input:
|
|
68
|
-
readonly handle: string;
|
|
69
|
-
};
|
|
75
|
+
readonly input: InputPort;
|
|
70
76
|
readonly kind: 'condition';
|
|
71
77
|
}
|
|
72
78
|
export type ManagedTaskExecutor = {
|
|
@@ -83,9 +89,9 @@ export interface ConnectorCapability {
|
|
|
83
89
|
readonly kind: 'connector';
|
|
84
90
|
}
|
|
85
91
|
interface TaskDefinitionBase {
|
|
86
|
-
readonly inputs:
|
|
92
|
+
readonly inputs: readonly InputPort[];
|
|
87
93
|
readonly name: string;
|
|
88
|
-
readonly outputs:
|
|
94
|
+
readonly outputs: readonly Port[];
|
|
89
95
|
}
|
|
90
96
|
export interface InlineTaskDefinition extends TaskDefinitionBase {
|
|
91
97
|
readonly capabilities?: readonly ConnectorCapability[];
|
|
@@ -143,8 +149,7 @@ export type TriggerKeySnapshot = (TriggerKeySnapshotBase & {
|
|
|
143
149
|
readonly endpoint: IntegrationEndpointDeclaration;
|
|
144
150
|
readonly type: 'integration';
|
|
145
151
|
});
|
|
146
|
-
export interface WebhookInputDefinition extends
|
|
147
|
-
readonly handle: string;
|
|
152
|
+
export interface WebhookInputDefinition extends InputPort {
|
|
148
153
|
}
|
|
149
154
|
export interface WebhookOptions {
|
|
150
155
|
readonly allowedMethods?: readonly string[];
|
|
@@ -156,6 +161,7 @@ export interface WebhookOptions {
|
|
|
156
161
|
}
|
|
157
162
|
interface TriggerNodeBase {
|
|
158
163
|
readonly description?: string;
|
|
164
|
+
readonly icon?: string;
|
|
159
165
|
readonly name: string;
|
|
160
166
|
}
|
|
161
167
|
export type TriggerNode = (TriggerNodeBase & {
|
|
@@ -190,9 +196,9 @@ export interface FlowDocument {
|
|
|
190
196
|
readonly graph: Graph;
|
|
191
197
|
readonly subflows: Readonly<Record<string, {
|
|
192
198
|
readonly graph: Graph;
|
|
193
|
-
readonly inputs:
|
|
199
|
+
readonly inputs: readonly InputPort[];
|
|
194
200
|
readonly name: string;
|
|
195
|
-
readonly outputs:
|
|
201
|
+
readonly outputs: readonly (OutputMapping & Port)[];
|
|
196
202
|
}>>;
|
|
197
203
|
readonly tasks: Readonly<Record<string, ManagedTaskDefinition>>;
|
|
198
204
|
}
|