@oomol-lab/open-flow 0.1.0-beta.1 → 0.1.0-beta.2

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-DwyxAOBH.js";
4
+ import { n as i } from "./flowWorkspace-DAMLVMcF.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 = {};
@@ -60,7 +60,7 @@ export declare function createProviderTrigger(target: Extract<GraphTarget, {
60
60
  readonly nodeId: string;
61
61
  }, definition: TriggerKeySnapshot, options: {
62
62
  readonly config: Readonly<Record<string, JsonValue>>;
63
- readonly connectionId: string;
63
+ readonly connectionId?: string;
64
64
  readonly name?: string;
65
65
  readonly schedule?: readonly TriggerSchedule[];
66
66
  }): readonly ChangeOperation[];
@@ -427,14 +427,14 @@ function g(e, t, n, r) {
427
427
  kind: "integration",
428
428
  name: i
429
429
  };
430
- return [{
430
+ return [...r.connectionId == null ? [] : [{
431
431
  binding: {
432
432
  kind: "connection",
433
433
  target: r.connectionId
434
434
  },
435
435
  bindingId: t.bindingId,
436
436
  kind: "binding.create"
437
- }, {
437
+ }], {
438
438
  kind: "graph.node.create",
439
439
  node: a,
440
440
  nodeId: t.nodeId,
@@ -460,7 +460,7 @@ function _(e, t, n) {
460
460
  let t = r[e];
461
461
  return t?.kind == "poll" || t?.kind == "integration" ? [t.bindingId] : [];
462
462
  }));
463
- for (let t of o) Object.entries(e.document.graph.nodes).some(([e, n]) => !i.has(e) && (n.kind == "poll" || n.kind == "integration") && n.bindingId == t) || a.push({
463
+ for (let t of o) !Object.entries(e.document.graph.nodes).some(([e, n]) => !i.has(e) && (n.kind == "poll" || n.kind == "integration") && n.bindingId == t) && e.document.bindings[t] != null && a.push({
464
464
  bindingId: t,
465
465
  kind: "binding.delete"
466
466
  });
@@ -603,7 +603,17 @@ function w(e, t, n, r) {
603
603
  }
604
604
  function T(e, t, n, r) {
605
605
  let i = e.document.graph.nodes[n];
606
- if (!(i == null || i.kind != "poll" && i.kind != "integration") && e.document.bindings[i.bindingId]?.kind == "connection") return [{
606
+ if (i == null || i.kind != "poll" && i.kind != "integration") return;
607
+ let a = e.document.bindings[i.bindingId];
608
+ if (a == null) return [{
609
+ binding: {
610
+ kind: "connection",
611
+ target: r
612
+ },
613
+ bindingId: i.bindingId,
614
+ kind: "binding.create"
615
+ }];
616
+ if (a.kind == "connection") return a.target == r ? [] : [{
607
617
  binding: {
608
618
  kind: "connection",
609
619
  target: r