@oomol-lab/open-flow 0.1.0-alpha.12 → 0.1.0-alpha.13
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-BYQXyUmQ.js → addNodeOptions-JRHMwVOl.js} +68 -42
- package/dist/browser/{change-7rp2OZLm.js → change-BATEvjif.js} +1 -1
- package/dist/browser/{esm-DmVDlOEJ.js → esm-C04lx1pd.js} +1 -1
- package/dist/browser/flow-authoring.js +4 -4
- package/dist/browser/flow-change.d.ts +7 -3
- package/dist/browser/flow-change.js +1 -1
- package/dist/browser/{flowRunInputEditorStore-BYxwvHZl.js → flowRunInputEditorStore-BUwR9Vbp.js} +45 -45
- package/dist/browser/{flowWorkspace-Bwqmoq-c.js → flowWorkspace-_qaqIyDi.js} +3039 -2932
- package/dist/browser/{markdownContent-0teWaxq8.js → markdownContent-CX77lBFM.js} +1 -1
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.js +17 -17
- package/dist/common/flow-encoding.d.ts +2 -2
- package/dist/common/flow-encoding.js +4 -1
- package/dist/common/flow-semantics.js +5 -2
- package/dist/common/scheduler.js +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as e, f as t, i as n } from "./dist-C46JByB-.js";
|
|
2
2
|
import { a as r, i, s as a, t as o } from "./main-DmjVyuWr.js";
|
|
3
3
|
import { $ as s, B as c, C as l, Cr as u, Et as d, F as f, Ft as p, Gn as m, H as h, In as g, It as _, Kn as v, Mt as y, Nr as ee, Nt as b, P as x, Pt as S, Qn as C, Rt as w, V as T, Vt as E, Wn as D, Xn as O, Y as k, Zn as A, _t as te, a as j, at as M, bn as N, br as ne, ct as P, dr as re, dt as F, er as ie, ft as ae, gt as oe, hr as I, ht as se, ir as L, it as ce, kn as le, lr as R, mr as z, mt as B, n as V, nr as ue, o as H, or as U, ot as de, p as fe, pt as pe, qn as me, r as he, rr as W, t as ge, tr as _e, ur as ve, vr as G, vt as ye, wr as be, wt as xe, yr as Se, zt as Ce } from "./useOpenInteractionType-CRgOHg5M.js";
|
|
4
|
-
import { $ as we, At as Te, B as Ee, Ct as De, Dt as Oe, Et as ke, G as Ae, H as je, J as Me, K as Ne, L as Pe, Ot as Fe, P as Ie, R as Le, St as Re, Tt as ze, Y as Be, _ as K, _t as Ve, a as q, bt as He, c as Ue, d as We, f as Ge, ft as Ke, g as J, gt as qe, ht as Je, i as Ye, kt as Xe, l as Ze, m as Qe, mt as $e, n as et, nt as tt, o as nt, ot as rt, pt as it, st as at, t as ot, tt as st, u as ct, v as Y, vt as lt, xt as ut, y as dt, yt as ft, z as pt } from "./addNodeOptions-
|
|
4
|
+
import { $ as we, At as Te, B as Ee, Ct as De, Dt as Oe, Et as ke, G as Ae, H as je, J as Me, K as Ne, L as Pe, Ot as Fe, P as Ie, R as Le, St as Re, Tt as ze, Y as Be, _ as K, _t as Ve, a as q, bt as He, c as Ue, d as We, f as Ge, ft as Ke, g as J, gt as qe, ht as Je, i as Ye, kt as Xe, l as Ze, m as Qe, mt as $e, n as et, nt as tt, o as nt, ot as rt, pt as it, st as at, t as ot, tt as st, u as ct, v as Y, vt as lt, xt as ut, y as dt, yt as ft, z as pt } from "./addNodeOptions-JRHMwVOl.js";
|
|
5
5
|
import { a as mt, i as ht, n as gt, r as _t } from "./languages-DgJehE1g.js";
|
|
6
|
-
import { n as vt, r as yt, t as bt } from "./change-
|
|
6
|
+
import { n as vt, r as yt, t as bt } from "./change-BATEvjif.js";
|
|
7
7
|
import * as X from "react";
|
|
8
8
|
import { Suspense as xt, lazy as St, useEffect as Ct, useRef as wt, useState as Tt } from "react";
|
|
9
9
|
import { Fragment as Et, jsx as Z, jsxs as Q } from "react/jsx-runtime";
|
|
@@ -1891,15 +1891,15 @@ function vr(e, t, n, r = void 0, i = {
|
|
|
1891
1891
|
module: {
|
|
1892
1892
|
...r ?? {
|
|
1893
1893
|
imports: [],
|
|
1894
|
-
source: sr(_r, cr("javascript", i.inputs.
|
|
1894
|
+
source: sr(_r, cr("javascript", i.inputs.flatMap((e) => "handle" in e ? [{
|
|
1895
1895
|
handle: e.handle,
|
|
1896
1896
|
json_schema: e.jsonSchema,
|
|
1897
1897
|
nullable: e.nullable
|
|
1898
|
-
})
|
|
1898
|
+
}] : []), i.outputs.flatMap((e) => "handle" in e ? [{
|
|
1899
1899
|
handle: e.handle,
|
|
1900
1900
|
json_schema: e.jsonSchema,
|
|
1901
1901
|
nullable: e.nullable
|
|
1902
|
-
})))
|
|
1902
|
+
}] : [])))
|
|
1903
1903
|
},
|
|
1904
1904
|
name: n
|
|
1905
1905
|
},
|
|
@@ -2287,7 +2287,7 @@ function Lr(e, t) {
|
|
|
2287
2287
|
return t.kind == "flow" ? e.document.graph : e.document.subflows[t.id]?.graph;
|
|
2288
2288
|
}
|
|
2289
2289
|
function Rr(e) {
|
|
2290
|
-
return Object.fromEntries(e.flatMap((e) => Object.hasOwn(e, "value") ? [[e.handle, {
|
|
2290
|
+
return Object.fromEntries(e.flatMap((e) => "handle" in e && Object.hasOwn(e, "value") ? [[e.handle, {
|
|
2291
2291
|
kind: "value",
|
|
2292
2292
|
value: e.value
|
|
2293
2293
|
}]] : []));
|
|
@@ -2697,7 +2697,7 @@ function ei(e) {
|
|
|
2697
2697
|
return e.node.name == null ? e.kind == "task" || e.kind == "subflow" ? e.definition?.name ?? e.id : e.id : e.node.name;
|
|
2698
2698
|
}
|
|
2699
2699
|
async function ti(e, t) {
|
|
2700
|
-
let { FlowRunInputEditorStore: n } = await import("./flowRunInputEditorStore-
|
|
2700
|
+
let { FlowRunInputEditorStore: n } = await import("./flowRunInputEditorStore-BUwR9Vbp.js").then((e) => e.n), r = J(e), i = r.graph({ kind: "flow" });
|
|
2701
2701
|
return i == null ? [] : Object.entries(i.nodes).toSorted(([e], [t]) => e.localeCompare(t)).flatMap(([e, i]) => {
|
|
2702
2702
|
let a = r.resolveNode(e, i);
|
|
2703
2703
|
if (a.kind == "trigger") return [];
|
|
@@ -3759,15 +3759,15 @@ function Pi(e, t, n, r) {
|
|
|
3759
3759
|
...r
|
|
3760
3760
|
});
|
|
3761
3761
|
if (a == null) return;
|
|
3762
|
-
let o = sr(i.module.source, cr("javascript", r.inputs.
|
|
3762
|
+
let o = sr(i.module.source, cr("javascript", r.inputs.flatMap((e) => "handle" in e ? [{
|
|
3763
3763
|
handle: e.handle,
|
|
3764
3764
|
json_schema: e.jsonSchema,
|
|
3765
3765
|
nullable: e.nullable
|
|
3766
|
-
})
|
|
3766
|
+
}] : []), r.outputs.flatMap((e) => "handle" in e ? [{
|
|
3767
3767
|
handle: e.handle,
|
|
3768
3768
|
json_schema: e.jsonSchema,
|
|
3769
3769
|
nullable: e.nullable
|
|
3770
|
-
})))
|
|
3770
|
+
}] : []))), s = Ar(e.revision.content, a);
|
|
3771
3771
|
return o == i.module.source ? s : [...s, ...Gr(i.node.task.moduleId, o, i.module.imports)];
|
|
3772
3772
|
}
|
|
3773
3773
|
function Fi(e, t, n, r) {
|
|
@@ -3804,19 +3804,19 @@ function Li(e, t, n, r) {
|
|
|
3804
3804
|
}];
|
|
3805
3805
|
}
|
|
3806
3806
|
function Ri(e) {
|
|
3807
|
-
return Object.fromEntries(e.flatMap((e) => Object.hasOwn(e, "value") ? [[e.handle, {
|
|
3807
|
+
return Object.fromEntries(e.flatMap((e) => "handle" in e && Object.hasOwn(e, "value") ? [[e.handle, {
|
|
3808
3808
|
kind: "value",
|
|
3809
3809
|
value: e.value
|
|
3810
3810
|
}]] : []));
|
|
3811
3811
|
}
|
|
3812
3812
|
function zi(e, t) {
|
|
3813
|
-
let n = new Set(e.
|
|
3813
|
+
let n = new Set(e.flatMap((e) => "handle" in e ? [e.handle] : [])), r = new Set(t.flatMap((e) => "handle" in e ? [e.handle] : [])), i = [...n].filter((e) => !r.has(e)), a = [...r].filter((e) => !n.has(e));
|
|
3814
3814
|
return i.length == 1 && a.length == 1 ? [i[0], a[0]] : void 0;
|
|
3815
3815
|
}
|
|
3816
3816
|
function Bi(e, t, n, r) {
|
|
3817
3817
|
let i = e.graph(t), a = i?.nodes[n];
|
|
3818
3818
|
if (i == null || a?.kind != "task" || a.task == null) return;
|
|
3819
|
-
let o = zi(a.task.inputs, r.inputs), s = zi(a.task.outputs, r.outputs), c = new Set(r.inputs.
|
|
3819
|
+
let o = zi(a.task.inputs, r.inputs), s = zi(a.task.outputs, r.outputs), c = new Set(r.inputs.flatMap((e) => "handle" in e ? [e.handle] : [])), l = new Set(r.outputs.flatMap((e) => "handle" in e ? [e.handle] : [])), u = [];
|
|
3820
3820
|
for (let [e, d] of Object.entries(i.nodes)) {
|
|
3821
3821
|
if (!("inputs" in d)) continue;
|
|
3822
3822
|
let i = e == n, f = { ...d.inputs };
|
|
@@ -4679,15 +4679,15 @@ var fa = class {
|
|
|
4679
4679
|
async saveCodeTaskPorts(e, t) {
|
|
4680
4680
|
let n = this.$.revision.value, r = this.#l.value.target;
|
|
4681
4681
|
if (n == null || r == null) return !1;
|
|
4682
|
-
let i = n.node(r, e), a = this.#l.value.moduleEditor, o = i?.kind == "task" && i.node.task != null && a?.moduleId == i.node.task.moduleId ? sr(a.source, cr("javascript", t.inputs.
|
|
4682
|
+
let i = n.node(r, e), a = this.#l.value.moduleEditor, o = i?.kind == "task" && i.node.task != null && a?.moduleId == i.node.task.moduleId ? sr(a.source, cr("javascript", t.inputs.flatMap((e) => "handle" in e ? [{
|
|
4683
4683
|
handle: e.handle,
|
|
4684
4684
|
json_schema: e.jsonSchema,
|
|
4685
4685
|
nullable: e.nullable
|
|
4686
|
-
})
|
|
4686
|
+
}] : []), t.outputs.flatMap((e) => "handle" in e ? [{
|
|
4687
4687
|
handle: e.handle,
|
|
4688
4688
|
json_schema: e.jsonSchema,
|
|
4689
4689
|
nullable: e.nullable
|
|
4690
|
-
})))
|
|
4690
|
+
}] : []))) : void 0, s = Pi(n, r, e, t);
|
|
4691
4691
|
if (s == null || await this.#C(s) == null) return !1;
|
|
4692
4692
|
let c = this.#l.value.moduleEditor;
|
|
4693
4693
|
return o != null && c != null && a != null && c.moduleId == a.moduleId && c.source == a.source && this.#B({ moduleEditor: {
|
|
@@ -5171,7 +5171,7 @@ var ga = { openExternalPage: async () => !1 }, _a = class {
|
|
|
5171
5171
|
return;
|
|
5172
5172
|
}
|
|
5173
5173
|
}
|
|
5174
|
-
}, va = St(() => import("./flowWorkspace-
|
|
5174
|
+
}, va = St(() => import("./flowWorkspace-_qaqIyDi.js").then((e) => e.t));
|
|
5175
5175
|
function ya({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i, pending: a = !1, title: o, token: s, tokenLabel: c }) {
|
|
5176
5176
|
let l = s != null && c != null && i != null, u = s ?? "", d = /* @__PURE__ */ Q(Et, { children: [
|
|
5177
5177
|
/* @__PURE__ */ Q("header", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { CodeModule, FlowDocument, Graph, InputPort, JsonValue, OutputMapping, Port, RevisionContent } from '@oomol-lab/open-flow/flow-change';
|
|
1
|
+
import type { CodeModule, FlowDocument, Graph, Group, InputPort, JsonValue, OutputMapping, Port, RevisionContent } from '@oomol-lab/open-flow/flow-change';
|
|
2
2
|
export declare const maxJsonDepth = 64;
|
|
3
3
|
export declare function canonicalJsonBytes(value: JsonValue): Uint8Array;
|
|
4
4
|
export declare function digestBytes(bytes: Uint8Array): Promise<string>;
|
|
5
|
-
export declare function canonicalPorts(value: readonly (InputPort | Port)[]): JsonValue;
|
|
5
|
+
export declare function canonicalPorts(value: readonly (InputPort | Port | Group)[]): JsonValue;
|
|
6
6
|
export declare function canonicalOutputs(value: readonly (OutputMapping & Port)[]): JsonValue;
|
|
7
7
|
export declare function canonicalGraph(value: Graph): JsonValue;
|
|
8
8
|
export declare function canonicalTask(task: FlowDocument['tasks'][string]): JsonValue;
|
|
@@ -17,12 +17,15 @@ function a(e) {
|
|
|
17
17
|
return Object.keys(e).toSorted().map((t) => [t, e[t]]);
|
|
18
18
|
}
|
|
19
19
|
function o(e) {
|
|
20
|
-
return {
|
|
20
|
+
return "handle" in e ? {
|
|
21
21
|
...e.description == null ? {} : { description: e.description },
|
|
22
22
|
handle: e.handle,
|
|
23
23
|
jsonSchema: e.jsonSchema,
|
|
24
24
|
nullable: e.nullable,
|
|
25
25
|
...Object.hasOwn(e, "value") ? { value: e.value } : {}
|
|
26
|
+
} : e.collapsed == null ? { group: e.group } : {
|
|
27
|
+
collapsed: e.collapsed,
|
|
28
|
+
group: e.group
|
|
26
29
|
};
|
|
27
30
|
}
|
|
28
31
|
function s(e) {
|
|
@@ -7867,7 +7867,7 @@ function Nn(e) {
|
|
|
7867
7867
|
return e.length <= 256 && /^[A-Za-z_][A-Za-z0-9_]*$/.test(e) && e.slice(0, 3).toUpperCase() != "OO_";
|
|
7868
7868
|
}
|
|
7869
7869
|
function U(e) {
|
|
7870
|
-
return Object.fromEntries(e.
|
|
7870
|
+
return Object.fromEntries(e.flatMap((e) => "handle" in e ? [[e.handle, e]] : []));
|
|
7871
7871
|
}
|
|
7872
7872
|
//#endregion
|
|
7873
7873
|
//#region src/flow/common/encoding.ts
|
|
@@ -7889,12 +7889,15 @@ function Rn(e) {
|
|
|
7889
7889
|
return Object.keys(e).toSorted().map((t) => [t, e[t]]);
|
|
7890
7890
|
}
|
|
7891
7891
|
function zn(e) {
|
|
7892
|
-
return {
|
|
7892
|
+
return "handle" in e ? {
|
|
7893
7893
|
...e.description == null ? {} : { description: e.description },
|
|
7894
7894
|
handle: e.handle,
|
|
7895
7895
|
jsonSchema: e.jsonSchema,
|
|
7896
7896
|
nullable: e.nullable,
|
|
7897
7897
|
...Object.hasOwn(e, "value") ? { value: e.value } : {}
|
|
7898
|
+
} : e.collapsed == null ? { group: e.group } : {
|
|
7899
|
+
collapsed: e.collapsed,
|
|
7900
|
+
group: e.group
|
|
7898
7901
|
};
|
|
7899
7902
|
}
|
|
7900
7903
|
function W(e) {
|
package/dist/common/scheduler.js
CHANGED
|
@@ -3,7 +3,7 @@ import * as t from "effect/Exit";
|
|
|
3
3
|
import * as n from "effect/FiberSet";
|
|
4
4
|
//#region src/flow/common/change.ts
|
|
5
5
|
function r(e) {
|
|
6
|
-
return Object.fromEntries(e.
|
|
6
|
+
return Object.fromEntries(e.flatMap((e) => "handle" in e ? [[e.handle, e]] : []));
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/execution/common/scheduler.ts
|