@oomol-lab/open-flow 0.1.0-alpha.15 → 0.1.0-alpha.16

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.
@@ -1,7 +1,7 @@
1
1
  import { s as e } from "./dist-BpopSHwP.js";
2
2
  import { r as t } from "./dist-BKuSVKCC.js";
3
3
  import { M as n, t as r } from "./dist-CUSrALSX.js";
4
- import { n as i } from "./flowWorkspace-nnM1b6Wz.js";
4
+ import { n as i } from "./flowWorkspace-CxlXcTKb.js";
5
5
  //#region ../../node_modules/.bun/@uiw+codemirror-themes@4.25.11/node_modules/@uiw/codemirror-themes/esm/index.js
6
6
  var a = (e) => {
7
7
  var i = e.theme, a = e.settings, o = a === void 0 ? {} : a, s = e.styles, c = s === void 0 ? [] : s, l = { ".cm-gutters": {} }, u = {};
@@ -3301,7 +3301,7 @@ function Yd({ ariaLabel: e, disabled: t, errorLabel: n, loadingLabel: r, locatio
3301
3301
  let t = u.current, n, r, i, a = !1;
3302
3302
  y(!1), x(!0);
3303
3303
  let s = import("./typeScriptSession-mPCiA9sV.js").then(({ loadTypeScriptExtension: e }) => e(c, _.current)).catch(() => void 0);
3304
- return Promise.all([import("./esm-DNDXFYy8.js"), Jd(c)]).then(([{ githubDark: n, githubLight: r }, l]) => {
3304
+ return Promise.all([import("./esm-CbMLTUgU.js"), Jd(c)]).then(([{ githubDark: n, githubLight: r }, l]) => {
3305
3305
  if (i = l, a) {
3306
3306
  i(), i = void 0;
3307
3307
  return;
@@ -41928,28 +41928,39 @@ var s0 = class {
41928
41928
  }
41929
41929
  #_(e) {
41930
41930
  let t = e.runStatus == "running" ? AA.Running : AA.Idle;
41931
- this.#c.value != t && this.#c.set(t), this.#u.set(o0(e.nodes)), this.#d.set(e.variableNames ?? []), this.#f.set(e.variableNamesLoaded ?? !1), this.#p.set(e.variableNamesLoading ?? !1), (this.#o == null || this.#o.x != e.viewport.x || this.#o.y != e.viewport.y || this.#o.zoom != e.viewport.zoom) && (this.store.$$.viewport.set(e.viewport), this.#o = { ...e.viewport });
41932
- let n = c0(e.nodes), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
41931
+ this.#c.value != t && this.#c.set(t);
41932
+ let n = o0(e.nodes), r = this.#u.value;
41933
+ (n.size != r.size || [...n].some(([e, t]) => {
41934
+ let n = r.get(e);
41935
+ return n == null || n.compatible != t.compatible || n.enabled != t.enabled || n.name != t.name;
41936
+ })) && this.#u.set(n);
41937
+ let i = e.variableNames ?? [], a = this.#d.value;
41938
+ (i.length != a.length || i.some((e, t) => e != a[t])) && this.#d.set(i);
41939
+ let o = e.variableNamesLoaded ?? !1;
41940
+ this.#f.value != o && this.#f.set(o);
41941
+ let s = e.variableNamesLoading ?? !1;
41942
+ this.#p.value != s && this.#p.set(s), (this.#o == null || this.#o.x != e.viewport.x || this.#o.y != e.viewport.y || this.#o.zoom != e.viewport.zoom) && (this.store.$$.viewport.set(e.viewport), this.#o = { ...e.viewport });
41943
+ let c = c0(e.nodes), l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
41933
41944
  for (let t of e.nodes) {
41934
- let e = [...n.get(t.id) ?? []].toSorted(), { position: s, ...c } = t, l = JSON.stringify([c, e]), u = this.#r.get(t.id), d = !1;
41935
- if (u?.kind != t.kind && (u = void 0), u?.kind != "comment" && u?.editable != this.store.$.editable.value && (u = void 0), t.kind == "comment") {
41936
- if (u?.kind != "comment") u = v0(t, l, this.store.designerUIStore, this.store, this.#t), d = !0;
41945
+ let e = [...c.get(t.id) ?? []].toSorted(), { position: n, ...r } = t, i = JSON.stringify([r, e]), a = this.#r.get(t.id), o = !1;
41946
+ if (a?.kind != t.kind && (a = void 0), a?.kind != "comment" && a?.editable != this.store.$.editable.value && (a = void 0), t.kind == "comment") {
41947
+ if (a?.kind != "comment") a = v0(t, i, this.store.designerUIStore, this.store, this.#t), o = !0;
41937
41948
  else {
41938
- u.contentKey != l && (u = y0(u, t, l));
41949
+ a.contentKey != i && (a = y0(a, t, i));
41939
41950
  let e = this.#a.get(t.id);
41940
- (e == null || e.x != s.x || e.y != s.y) && u.store.$$.position.set(s);
41951
+ (e == null || e.x != n.x || e.y != n.y) && a.store.$$.position.set(n);
41941
41952
  }
41942
- i.set(t.id, u.store);
41943
- } else if (u == null) this.store.designerUIStore.setNodeUIData(t.id, { rfNode: { position: s } }), u = b0(t, e, l, this.store.designerUIStore, this.store, this.#t), d = !0;
41953
+ u.set(t.id, a.store);
41954
+ } else if (a == null) this.store.designerUIStore.setNodeUIData(t.id, { rfNode: { position: n } }), a = b0(t, e, i, this.store.designerUIStore, this.store, this.#t), o = !0;
41944
41955
  else {
41945
- if (u.kind == "comment") throw Error("Unexpected Comment node entry.");
41946
- u.contentKey != l && (u = x0(u, t, e, l));
41947
- let n = this.#a.get(t.id);
41948
- (n == null || n.x != s.x || n.y != s.y) && u.store.$$.position.set(s);
41956
+ if (a.kind == "comment") throw Error("Unexpected Comment node entry.");
41957
+ a.contentKey != i && (a = x0(a, t, e, i));
41958
+ let r = this.#a.get(t.id);
41959
+ (r == null || r.x != n.x || r.y != n.y) && a.store.$$.position.set(n);
41949
41960
  }
41950
- d && this.#l.has(t.id) && u.store.$$.selected.set(!0), r.set(t.id, u), u.kind != "comment" && a.set(t.id, u.store), o.set(t.id, s);
41961
+ o && this.#l.has(t.id) && a.store.$$.selected.set(!0), l.set(t.id, a), a.kind != "comment" && d.set(t.id, a.store), f.set(t.id, n);
41951
41962
  }
41952
- (a.size != this.store.$.nodes.size || [...a].some(([e, t]) => this.store.$.nodes.get(e) !== t)) && this.store.$$.nodes.replace(a), (i.size != this.store.$.commentNodes.size || [...i].some(([e, t]) => this.store.$.commentNodes.get(e) !== t)) && this.store.$$.commentNodes.replace(i), this.#r = r, this.#a = o;
41963
+ (d.size != this.store.$.nodes.size || [...d].some(([e, t]) => this.store.$.nodes.get(e) !== t)) && this.store.$$.nodes.replace(d), (u.size != this.store.$.commentNodes.size || [...u].some(([e, t]) => this.store.$.commentNodes.get(e) !== t)) && this.store.$$.commentNodes.replace(u), this.#r = l, this.#a = f;
41953
41964
  }
41954
41965
  };
41955
41966
  function c0(e) {
@@ -4201,7 +4201,7 @@ var Fi = { openExternalPage: async () => !1 }, Ii = class {
4201
4201
  return;
4202
4202
  }
4203
4203
  }
4204
- }, Li = Gt(() => import("./flowWorkspace-nnM1b6Wz.js").then((e) => e.t));
4204
+ }, Li = Gt(() => import("./flowWorkspace-CxlXcTKb.js").then((e) => e.t));
4205
4205
  function Ri({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i, pending: a = !1, title: o, token: s, tokenLabel: c }) {
4206
4206
  let l = s != null && c != null && i != null, u = s ?? "", d = /* @__PURE__ */ Q(Yt, { children: [
4207
4207
  /* @__PURE__ */ Z("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oomol-lab/open-flow",
3
- "version": "0.1.0-alpha.15",
3
+ "version": "0.1.0-alpha.16",
4
4
  "description": "TypeScript contracts and Browser runtime for Open Flow.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {