@ghchinoy/litflow 0.2.8 → 0.3.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.
Files changed (158) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/breadboard/data/common.d.ts +35 -0
  3. package/dist/breadboard/engine/loader/capability.d.ts +21 -0
  4. package/dist/breadboard/engine/loader/loader.d.ts +29 -0
  5. package/dist/breadboard/engine/loader/resolve-graph-urls.d.ts +16 -0
  6. package/dist/breadboard/engine/runtime/bubble.d.ts +23 -0
  7. package/dist/breadboard/engine/runtime/graph-based-node-handler.d.ts +16 -0
  8. package/dist/breadboard/engine/runtime/handler.d.ts +27 -0
  9. package/dist/breadboard/engine/runtime/harness/events.d.ts +145 -0
  10. package/dist/breadboard/engine/runtime/harness/local.d.ts +10 -0
  11. package/dist/breadboard/engine/runtime/harness/plan-runner.d.ts +25 -0
  12. package/dist/breadboard/engine/runtime/run/invoke-graph.d.ts +12 -0
  13. package/dist/breadboard/engine/runtime/run/node-invoker.d.ts +12 -0
  14. package/dist/breadboard/engine/runtime/run/run-graph.d.ts +12 -0
  15. package/dist/breadboard/engine/runtime/run.d.ts +29 -0
  16. package/dist/breadboard/engine/runtime/sandbox/capabilities-manager.d.ts +15 -0
  17. package/dist/breadboard/engine/runtime/sandbox/file-system-handler-factory.d.ts +15 -0
  18. package/dist/breadboard/engine/runtime/sandbox/invoke-describer.d.ts +10 -0
  19. package/dist/breadboard/engine/runtime/static/create-plan.d.ts +14 -0
  20. package/dist/breadboard/engine/runtime/static/orchestrator.d.ts +72 -0
  21. package/dist/breadboard/engine/runtime/traversal/index.d.ts +20 -0
  22. package/dist/breadboard/engine/runtime/traversal/iterator.d.ts +12 -0
  23. package/dist/breadboard/engine/runtime/traversal/machine.d.ts +14 -0
  24. package/dist/breadboard/engine/runtime/traversal/representation.d.ts +27 -0
  25. package/dist/breadboard/engine/runtime/traversal/result.d.ts +24 -0
  26. package/dist/breadboard/engine/runtime/traversal/state.d.ts +34 -0
  27. package/dist/breadboard/lit-flow-runner.d.ts +13 -0
  28. package/dist/breadboard/lit-flow-runner.test.d.ts +1 -0
  29. package/dist/breadboard/runner.d.ts +13 -0
  30. package/dist/index.d.ts +2 -0
  31. package/dist/lit-chiclet.d.ts +9 -0
  32. package/dist/lit-schema-node.d.ts +13 -0
  33. package/dist/lit-schema-node.test.d.ts +1 -0
  34. package/dist/litflow.js +708 -442
  35. package/dist/litflow.js.map +1 -1
  36. package/package.json +15 -3
  37. package/src/breadboard/data/common.ts +450 -0
  38. package/src/breadboard/data/file-system.ts +54 -0
  39. package/src/breadboard/data/inline-all-content.ts +126 -0
  40. package/src/breadboard/data/recent-boards.ts +118 -0
  41. package/src/breadboard/data/save-outputs-as-file.ts +104 -0
  42. package/src/breadboard/engine/add-run-module.ts +168 -0
  43. package/src/breadboard/engine/editor/blank.ts +65 -0
  44. package/src/breadboard/engine/editor/edge.ts +27 -0
  45. package/src/breadboard/engine/editor/events.ts +64 -0
  46. package/src/breadboard/engine/editor/graph.ts +383 -0
  47. package/src/breadboard/engine/editor/history.ts +98 -0
  48. package/src/breadboard/engine/editor/index.ts +8 -0
  49. package/src/breadboard/engine/editor/operations/add-asset.ts +45 -0
  50. package/src/breadboard/engine/editor/operations/add-edge.ts +142 -0
  51. package/src/breadboard/engine/editor/operations/add-graph.ts +47 -0
  52. package/src/breadboard/engine/editor/operations/add-module.ts +64 -0
  53. package/src/breadboard/engine/editor/operations/add-node.ts +86 -0
  54. package/src/breadboard/engine/editor/operations/change-asset-metadata.ts +70 -0
  55. package/src/breadboard/engine/editor/operations/change-configuration.ts +82 -0
  56. package/src/breadboard/engine/editor/operations/change-edge-metadata.ts +58 -0
  57. package/src/breadboard/engine/editor/operations/change-edge.ts +111 -0
  58. package/src/breadboard/engine/editor/operations/change-graph-metadata.ts +52 -0
  59. package/src/breadboard/engine/editor/operations/change-metadata.ts +92 -0
  60. package/src/breadboard/engine/editor/operations/change-module.ts +64 -0
  61. package/src/breadboard/engine/editor/operations/error.ts +21 -0
  62. package/src/breadboard/engine/editor/operations/remove-asset.ts +48 -0
  63. package/src/breadboard/engine/editor/operations/remove-edge.ts +89 -0
  64. package/src/breadboard/engine/editor/operations/remove-graph.ts +49 -0
  65. package/src/breadboard/engine/editor/operations/remove-integration.ts +54 -0
  66. package/src/breadboard/engine/editor/operations/remove-module.ts +69 -0
  67. package/src/breadboard/engine/editor/operations/remove-node.ts +86 -0
  68. package/src/breadboard/engine/editor/operations/replace-graph.ts +52 -0
  69. package/src/breadboard/engine/editor/operations/toggle-export.ts +72 -0
  70. package/src/breadboard/engine/editor/operations/upsert-integration.ts +43 -0
  71. package/src/breadboard/engine/editor/selection.ts +58 -0
  72. package/src/breadboard/engine/editor/transforms/configure-sidewire.ts +73 -0
  73. package/src/breadboard/engine/editor/transforms/isolate-selection.ts +54 -0
  74. package/src/breadboard/engine/editor/transforms/merge-graph.ts +58 -0
  75. package/src/breadboard/engine/editor/transforms/move-to-graph.ts +102 -0
  76. package/src/breadboard/engine/editor/transforms/move-to-new-graph.ts +72 -0
  77. package/src/breadboard/engine/editor/transforms/sidewire-to-new-graph.ts +82 -0
  78. package/src/breadboard/engine/file-system/blob-transform.ts +44 -0
  79. package/src/breadboard/engine/file-system/composed-peristent-backend.ts +140 -0
  80. package/src/breadboard/engine/file-system/ephemeral-blob-store.ts +46 -0
  81. package/src/breadboard/engine/file-system/in-memory-blob-store.ts +87 -0
  82. package/src/breadboard/engine/file-system/index.ts +723 -0
  83. package/src/breadboard/engine/file-system/partial-persistent-backend.ts +109 -0
  84. package/src/breadboard/engine/file-system/path.ts +125 -0
  85. package/src/breadboard/engine/file-system/persistent-file.ts +66 -0
  86. package/src/breadboard/engine/file-system/readable-stream-file.ts +61 -0
  87. package/src/breadboard/engine/file-system/stub-file-system.ts +47 -0
  88. package/src/breadboard/engine/file-system/utils.ts +40 -0
  89. package/src/breadboard/engine/inspector/graph/bubbled-node.ts +162 -0
  90. package/src/breadboard/engine/inspector/graph/describe-cache.ts +78 -0
  91. package/src/breadboard/engine/inspector/graph/describe-type-cache.ts +48 -0
  92. package/src/breadboard/engine/inspector/graph/edge-cache.ts +118 -0
  93. package/src/breadboard/engine/inspector/graph/edge.ts +133 -0
  94. package/src/breadboard/engine/inspector/graph/event.ts +35 -0
  95. package/src/breadboard/engine/inspector/graph/exports-describer.ts +45 -0
  96. package/src/breadboard/engine/inspector/graph/graph-cache.ts +54 -0
  97. package/src/breadboard/engine/inspector/graph/graph-describer-manager.ts +338 -0
  98. package/src/breadboard/engine/inspector/graph/graph-descriptor-handle.ts +73 -0
  99. package/src/breadboard/engine/inspector/graph/graph-node-type.ts +111 -0
  100. package/src/breadboard/engine/inspector/graph/graph-queries.ts +256 -0
  101. package/src/breadboard/engine/inspector/graph/graph.ts +163 -0
  102. package/src/breadboard/engine/inspector/graph/inspectable-asset.ts +36 -0
  103. package/src/breadboard/engine/inspector/graph/kits.ts +208 -0
  104. package/src/breadboard/engine/inspector/graph/module.ts +69 -0
  105. package/src/breadboard/engine/inspector/graph/mutable-graph.ts +150 -0
  106. package/src/breadboard/engine/inspector/graph/node-cache.ts +123 -0
  107. package/src/breadboard/engine/inspector/graph/node-describer-manager.ts +279 -0
  108. package/src/breadboard/engine/inspector/graph/node-type-describer-manager.ts +122 -0
  109. package/src/breadboard/engine/inspector/graph/node.ts +149 -0
  110. package/src/breadboard/engine/inspector/graph/port-cache.ts +80 -0
  111. package/src/breadboard/engine/inspector/graph/ports.ts +292 -0
  112. package/src/breadboard/engine/inspector/graph/schemas.ts +131 -0
  113. package/src/breadboard/engine/inspector/graph/virtual-node.ts +184 -0
  114. package/src/breadboard/engine/inspector/graph-store.ts +629 -0
  115. package/src/breadboard/engine/inspector/index.ts +13 -0
  116. package/src/breadboard/engine/inspector/utils.ts +20 -0
  117. package/src/breadboard/engine/loader/capability.ts +184 -0
  118. package/src/breadboard/engine/loader/index.ts +14 -0
  119. package/src/breadboard/engine/loader/loader.ts +244 -0
  120. package/src/breadboard/engine/loader/resolve-graph-urls.ts +111 -0
  121. package/src/breadboard/engine/runtime/bubble.ts +269 -0
  122. package/src/breadboard/engine/runtime/graph-based-node-handler.ts +174 -0
  123. package/src/breadboard/engine/runtime/handler.ts +166 -0
  124. package/src/breadboard/engine/runtime/harness/diagnostics.ts +22 -0
  125. package/src/breadboard/engine/runtime/harness/events.ts +217 -0
  126. package/src/breadboard/engine/runtime/harness/index.ts +14 -0
  127. package/src/breadboard/engine/runtime/harness/local.ts +48 -0
  128. package/src/breadboard/engine/runtime/harness/plan-runner.ts +759 -0
  129. package/src/breadboard/engine/runtime/index.ts +8 -0
  130. package/src/breadboard/engine/runtime/legacy.ts +28 -0
  131. package/src/breadboard/engine/runtime/run/invoke-graph.ts +79 -0
  132. package/src/breadboard/engine/runtime/run/node-invoker.ts +137 -0
  133. package/src/breadboard/engine/runtime/run/run-graph.ts +186 -0
  134. package/src/breadboard/engine/runtime/run.ts +111 -0
  135. package/src/breadboard/engine/runtime/sandbox/capabilities-manager.ts +253 -0
  136. package/src/breadboard/engine/runtime/sandbox/file-system-handler-factory.ts +53 -0
  137. package/src/breadboard/engine/runtime/sandbox/invoke-describer.ts +125 -0
  138. package/src/breadboard/engine/runtime/static/condense.ts +155 -0
  139. package/src/breadboard/engine/runtime/static/create-plan.ts +134 -0
  140. package/src/breadboard/engine/runtime/static/nodes-to-subgraph.ts +168 -0
  141. package/src/breadboard/engine/runtime/static/orchestrator.ts +664 -0
  142. package/src/breadboard/engine/runtime/static/types.ts +77 -0
  143. package/src/breadboard/engine/runtime/traversal/index.ts +58 -0
  144. package/src/breadboard/engine/runtime/traversal/iterator.ts +124 -0
  145. package/src/breadboard/engine/runtime/traversal/machine.ts +58 -0
  146. package/src/breadboard/engine/runtime/traversal/representation.ts +115 -0
  147. package/src/breadboard/engine/runtime/traversal/result.ts +72 -0
  148. package/src/breadboard/engine/runtime/traversal/state.ts +115 -0
  149. package/src/breadboard/engine/telemetry.ts +121 -0
  150. package/src/breadboard/engine/types.ts +32 -0
  151. package/src/breadboard/lit-flow-runner.test.ts +44 -0
  152. package/src/breadboard/lit-flow-runner.ts +98 -0
  153. package/src/breadboard/runner.ts +80 -0
  154. package/src/index.ts +2 -0
  155. package/src/lit-chiclet.ts +69 -0
  156. package/src/lit-flow.ts +17 -7
  157. package/src/lit-schema-node.test.ts +65 -0
  158. package/src/lit-schema-node.ts +194 -0
package/dist/litflow.js CHANGED
@@ -1,36 +1,37 @@
1
- import { LitElement as P, html as v, svg as R, css as A } from "lit";
2
- import { unsafeStatic as ot, html as B } from "lit/static-html.js";
3
- import { property as d, customElement as O, query as q, state as N } from "lit/decorators.js";
4
- import { signal as X, SignalWatcher as j } from "@lit-labs/signals";
5
- import { infiniteExtent as st, Position as D, getBezierPath as W, adoptUserNodes as rt, updateAbsolutePositions as U, PanOnScrollMode as it, XYPanZoom as nt, XYDrag as at, getHandlePosition as K, getSmoothStepPath as F, getStraightPath as dt, XYHandle as lt, ConnectionMode as ht, XYMinimap as pt, getBoundsOfRects as ct, getInternalNodesBounds as ut } from "@xyflow/system";
6
- import { m3Tokens as J } from "./theme.js";
7
- function ft() {
1
+ import { LitElement as x, html as m, svg as Z, css as B } from "lit";
2
+ import { unsafeStatic as at, html as A } from "lit/static-html.js";
3
+ import { property as d, customElement as w, query as st, state as M } from "lit/decorators.js";
4
+ import { signal as G, SignalWatcher as H } from "@lit-labs/signals";
5
+ import { infiniteExtent as dt, Position as D, getBezierPath as J, adoptUserNodes as lt, updateAbsolutePositions as q, PanOnScrollMode as pt, XYPanZoom as ct, XYDrag as ht, getHandlePosition as tt, getSmoothStepPath as et, getStraightPath as ut, XYHandle as mt, ConnectionMode as yt, XYMinimap as ft, getBoundsOfRects as gt, getInternalNodesBounds as vt } from "@xyflow/system";
6
+ import { m3Tokens as Q } from "./theme.js";
7
+ import { map as ot } from "lit/directives/map.js";
8
+ function bt() {
8
9
  return {
9
- nodes: X([]),
10
- edges: X([]),
10
+ nodes: G([]),
11
+ edges: G([]),
11
12
  nodeLookup: /* @__PURE__ */ new Map(),
12
13
  parentLookup: /* @__PURE__ */ new Map(),
13
- nodeExtent: st,
14
+ nodeExtent: dt,
14
15
  snapGrid: [15, 15],
15
16
  snapToGrid: !1,
16
17
  nodeOrigin: [0, 0],
17
18
  multiSelectionActive: !1,
18
- transform: X([0, 0, 1]),
19
+ transform: G([0, 0, 1]),
19
20
  autoPanOnNodeDrag: !0,
20
21
  nodesDraggable: !0,
21
22
  selectNodesOnDrag: !0,
22
23
  nodeDragThreshold: 0,
23
24
  panZoom: null,
24
25
  domNode: null,
25
- connectionInProgress: X(null)
26
+ connectionInProgress: G(null)
26
27
  };
27
28
  }
28
- var mt = Object.defineProperty, yt = Object.getOwnPropertyDescriptor, z = (t, o, e, s) => {
29
- for (var r = s > 1 ? void 0 : s ? yt(o, e) : o, i = t.length - 1, n; i >= 0; i--)
30
- (n = t[i]) && (r = (s ? n(o, e, r) : n(r)) || r);
31
- return s && r && mt(o, e, r), r;
29
+ var _t = Object.defineProperty, xt = Object.getOwnPropertyDescriptor, k = (t, s, e, r) => {
30
+ for (var o = r > 1 ? void 0 : r ? xt(s, e) : s, i = t.length - 1, n; i >= 0; i--)
31
+ (n = t[i]) && (o = (r ? n(s, e, o) : n(o)) || o);
32
+ return r && o && _t(s, e, o), o;
32
33
  };
33
- let $ = class extends j(P) {
34
+ let P = class extends H(x) {
34
35
  constructor() {
35
36
  super(...arguments), this.label = "", this.type = "default", this.data = {}, this.selected = !1, this.nodeId = "", this.positionX = 0, this.positionY = 0;
36
37
  }
@@ -38,49 +39,49 @@ let $ = class extends j(P) {
38
39
  return this;
39
40
  }
40
41
  render() {
41
- return v`
42
+ return m`
42
43
  <div class="label" style="font-size: var(--md-sys-typescale-body-medium-size); color: var(--md-sys-color-on-surface); pointer-events: none; font-family: var(--md-sys-typescale-body-medium-font);">${this.label}</div>
43
44
  <slot></slot>
44
- ${this.type === "input" || this.type === "default" ? v`<lit-handle type="source" data-handlepos="bottom" data-nodeid="${this.nodeId}"></lit-handle>` : ""}
45
- ${this.type === "output" || this.type === "default" ? v`<lit-handle type="target" data-handlepos="top" data-nodeid="${this.nodeId}"></lit-handle>` : ""}
45
+ ${this.type === "input" || this.type === "default" ? m`<lit-handle type="source" data-handlepos="bottom" data-nodeid="${this.nodeId}"></lit-handle>` : ""}
46
+ ${this.type === "output" || this.type === "default" ? m`<lit-handle type="target" data-handlepos="top" data-nodeid="${this.nodeId}"></lit-handle>` : ""}
46
47
  `;
47
48
  }
48
49
  };
49
- z([
50
+ k([
50
51
  d({ type: String })
51
- ], $.prototype, "label", 2);
52
- z([
52
+ ], P.prototype, "label", 2);
53
+ k([
53
54
  d({ type: String, reflect: !0 })
54
- ], $.prototype, "type", 2);
55
- z([
55
+ ], P.prototype, "type", 2);
56
+ k([
56
57
  d({ type: Object })
57
- ], $.prototype, "data", 2);
58
- z([
58
+ ], P.prototype, "data", 2);
59
+ k([
59
60
  d({ type: Boolean, reflect: !0 })
60
- ], $.prototype, "selected", 2);
61
- z([
61
+ ], P.prototype, "selected", 2);
62
+ k([
62
63
  d({ type: String, attribute: "data-id", reflect: !0 })
63
- ], $.prototype, "nodeId", 2);
64
- z([
64
+ ], P.prototype, "nodeId", 2);
65
+ k([
65
66
  d({ type: Number, attribute: "position-x" })
66
- ], $.prototype, "positionX", 2);
67
- z([
67
+ ], P.prototype, "positionX", 2);
68
+ k([
68
69
  d({ type: Number, attribute: "position-y" })
69
- ], $.prototype, "positionY", 2);
70
- $ = z([
71
- O("lit-node")
72
- ], $);
73
- var gt = Object.defineProperty, _t = Object.getOwnPropertyDescriptor, I = (t, o, e, s) => {
74
- for (var r = s > 1 ? void 0 : s ? _t(o, e) : o, i = t.length - 1, n; i >= 0; i--)
75
- (n = t[i]) && (r = (s ? n(o, e, r) : n(r)) || r);
76
- return s && r && gt(o, e, r), r;
70
+ ], P.prototype, "positionY", 2);
71
+ P = k([
72
+ w("lit-node")
73
+ ], P);
74
+ var wt = Object.defineProperty, $t = Object.getOwnPropertyDescriptor, z = (t, s, e, r) => {
75
+ for (var o = r > 1 ? void 0 : r ? $t(s, e) : s, i = t.length - 1, n; i >= 0; i--)
76
+ (n = t[i]) && (o = (r ? n(s, e, o) : n(o)) || o);
77
+ return r && o && wt(s, e, o), o;
77
78
  };
78
- let w = class extends j(P) {
79
+ let $ = class extends H(x) {
79
80
  constructor() {
80
81
  super(...arguments), this.sourceX = 0, this.sourceY = 0, this.targetX = 0, this.targetY = 0, this.sourcePosition = D.Right, this.targetPosition = D.Left, this.selected = !1;
81
82
  }
82
83
  render() {
83
- const [t] = W({
84
+ const [t] = J({
84
85
  sourceX: this.sourceX,
85
86
  sourceY: this.sourceY,
86
87
  sourcePosition: this.sourcePosition,
@@ -88,12 +89,12 @@ let w = class extends j(P) {
88
89
  targetY: this.targetY,
89
90
  targetPosition: this.targetPosition
90
91
  });
91
- return R`
92
+ return Z`
92
93
  <path d="${t}" />
93
94
  `;
94
95
  }
95
96
  };
96
- w.styles = A`
97
+ $.styles = B`
97
98
  :host {
98
99
  display: contents;
99
100
  }
@@ -108,52 +109,52 @@ w.styles = A`
108
109
  stroke: #555;
109
110
  }
110
111
  `;
111
- I([
112
+ z([
112
113
  d({ type: Number })
113
- ], w.prototype, "sourceX", 2);
114
- I([
114
+ ], $.prototype, "sourceX", 2);
115
+ z([
115
116
  d({ type: Number })
116
- ], w.prototype, "sourceY", 2);
117
- I([
117
+ ], $.prototype, "sourceY", 2);
118
+ z([
118
119
  d({ type: Number })
119
- ], w.prototype, "targetX", 2);
120
- I([
120
+ ], $.prototype, "targetX", 2);
121
+ z([
121
122
  d({ type: Number })
122
- ], w.prototype, "targetY", 2);
123
- I([
123
+ ], $.prototype, "targetY", 2);
124
+ z([
124
125
  d({ type: String })
125
- ], w.prototype, "sourcePosition", 2);
126
- I([
126
+ ], $.prototype, "sourcePosition", 2);
127
+ z([
127
128
  d({ type: String })
128
- ], w.prototype, "targetPosition", 2);
129
- I([
129
+ ], $.prototype, "targetPosition", 2);
130
+ z([
130
131
  d({ type: Boolean, reflect: !0 })
131
- ], w.prototype, "selected", 2);
132
- w = I([
133
- O("lit-edge")
134
- ], w);
135
- var vt = Object.defineProperty, bt = Object.getOwnPropertyDescriptor, m = (t, o, e, s) => {
136
- for (var r = s > 1 ? void 0 : s ? bt(o, e) : o, i = t.length - 1, n; i >= 0; i--)
137
- (n = t[i]) && (r = (s ? n(o, e, r) : n(r)) || r);
138
- return s && r && vt(o, e, r), r;
132
+ ], $.prototype, "selected", 2);
133
+ $ = z([
134
+ w("lit-edge")
135
+ ], $);
136
+ var Ot = Object.defineProperty, Pt = Object.getOwnPropertyDescriptor, f = (t, s, e, r) => {
137
+ for (var o = r > 1 ? void 0 : r ? Pt(s, e) : s, i = t.length - 1, n; i >= 0; i--)
138
+ (n = t[i]) && (o = (r ? n(s, e, o) : n(o)) || o);
139
+ return r && o && Ot(s, e, o), o;
139
140
  };
140
- const k = {
141
+ const S = {
141
142
  fromAttribute: (t) => t !== "false" && t !== null,
142
143
  toAttribute: (t) => t ? "" : null
143
144
  };
144
- let f = class extends j(P) {
145
+ let y = class extends H(x) {
145
146
  constructor() {
146
- super(...arguments), this._drags = /* @__PURE__ */ new Map(), this._state = ft(), this.nodeTypes = {
147
+ super(...arguments), this._drags = /* @__PURE__ */ new Map(), this._state = bt(), this.nodeTypes = {
147
148
  default: "lit-node",
148
149
  input: "lit-node",
149
150
  output: "lit-node"
150
151
  }, this.showControls = !1, this.showMinimap = !1, this.showGrid = !0, this.nodesDraggable = !0, this.nodesConnectable = !0, this.panOnDrag = !0, this.zoomOnScroll = !0, this.zoomOnPinch = !0, this.zoomOnDoubleClick = !0, this.promptOnDrop = !1, this.selectionMode = "pan", this._selectionRect = null, this._selectionStart = null, this._width = 0, this._height = 0, this.viewport = { x: 0, y: 0, zoom: 1 };
151
152
  }
152
153
  set nodes(t) {
153
- this._state.nodes.set(t), rt(t, this._state.nodeLookup, this._state.parentLookup, {
154
+ this._state.nodes.set(t), lt(t, this._state.nodeLookup, this._state.parentLookup, {
154
155
  nodeOrigin: this._state.nodeOrigin,
155
156
  nodeExtent: this._state.nodeExtent
156
- }), U(this._state.nodeLookup, this._state.parentLookup, {
157
+ }), q(this._state.nodeLookup, this._state.parentLookup, {
157
158
  nodeOrigin: this._state.nodeOrigin,
158
159
  nodeExtent: this._state.nodeExtent
159
160
  }), this._notifyChange();
@@ -175,7 +176,7 @@ let f = class extends j(P) {
175
176
  if (this.nodes.length > 0) return;
176
177
  const t = Array.from(this.querySelectorAll("lit-node"));
177
178
  if (t.length > 0) {
178
- const o = t.map((e) => ({
179
+ const s = t.map((e) => ({
179
180
  id: e.id || e.getAttribute("id") || `node-${Math.random().toString(36).substr(2, 9)}`,
180
181
  type: e.type || e.getAttribute("type") || "default",
181
182
  position: {
@@ -187,8 +188,8 @@ let f = class extends j(P) {
187
188
  ...e.data
188
189
  }
189
190
  }));
190
- this.nodes = o, t.forEach((e, s) => {
191
- e.nodeId = o[s].id;
191
+ this.nodes = s, t.forEach((e, r) => {
192
+ e.nodeId = s[r].id;
192
193
  });
193
194
  }
194
195
  }
@@ -200,56 +201,56 @@ let f = class extends j(P) {
200
201
  }
201
202
  connectedCallback() {
202
203
  super.connectedCallback(), this._discoverNodes(), this._resizeObserver = new ResizeObserver((t) => {
203
- for (const o of t)
204
- if (o.target === this)
205
- this._width = o.contentRect.width, this._height = o.contentRect.height;
206
- else if (o.target !== this._renderer) {
207
- const e = o.target.dataset.id;
208
- e && this._updateNodeDimensions(e, o.target);
204
+ for (const s of t)
205
+ if (s.target === this)
206
+ this._width = s.contentRect.width, this._height = s.contentRect.height;
207
+ else if (s.target !== this._renderer) {
208
+ const e = s.target.dataset.id;
209
+ e && this._updateNodeDimensions(e, s.target);
209
210
  }
210
211
  }), this._resizeObserver.observe(this);
211
212
  }
212
213
  disconnectedCallback() {
213
214
  super.disconnectedCallback(), this._resizeObserver?.disconnect();
214
215
  }
215
- async _updateNodeDimensions(t, o) {
216
+ async _updateNodeDimensions(t, s) {
216
217
  const e = this._state.nodeLookup.get(t);
217
218
  if (e) {
218
- "updateComplete" in o && await o.updateComplete;
219
- const { width: s, height: r } = o.getBoundingClientRect(), i = this._state.transform.get()[2];
219
+ "updateComplete" in s && await s.updateComplete;
220
+ const { width: r, height: o } = s.getBoundingClientRect(), i = this._state.transform.get()[2];
220
221
  e.measured = {
221
- width: s / i,
222
- height: r / i
222
+ width: r / i,
223
+ height: o / i
223
224
  };
224
- const n = this.nodes.find((c) => c.id === t);
225
+ const n = this.nodes.find((h) => h.id === t);
225
226
  n && (n.measured = e.measured);
226
- const p = o.querySelectorAll("lit-handle");
227
- if (p && p.length > 0) {
228
- const c = [], a = [];
229
- p.forEach((h) => {
230
- const l = h.getBoundingClientRect(), u = o.getBoundingClientRect(), y = {
231
- id: h.handleId || null,
232
- type: h.type,
233
- position: h.position,
227
+ const c = s.querySelectorAll("lit-handle");
228
+ if (c && c.length > 0) {
229
+ const h = [], a = [];
230
+ c.forEach((p) => {
231
+ const l = p.getBoundingClientRect(), u = s.getBoundingClientRect(), g = {
232
+ id: p.handleId || p.getAttribute("data-handleid") || null,
233
+ type: p.type || p.getAttribute("type"),
234
+ position: p.position || p.getAttribute("data-handlepos"),
234
235
  x: (l.left - u.left) / i,
235
236
  y: (l.top - u.top) / i,
236
237
  width: l.width / i,
237
238
  height: l.height / i
238
239
  };
239
- h.type === "source" ? c.push(y) : a.push(y);
240
+ p.type === "source" ? h.push(g) : a.push(g);
240
241
  }), e.internals.handleBounds = {
241
- source: c,
242
+ source: h,
242
243
  target: a
243
244
  }, console.log(`Node ${t} handleBounds:`, e.internals.handleBounds);
244
245
  }
245
- U(this._state.nodeLookup, this._state.parentLookup, {
246
+ q(this._state.nodeLookup, this._state.parentLookup, {
246
247
  nodeOrigin: this._state.nodeOrigin,
247
248
  nodeExtent: this._state.nodeExtent
248
249
  }), this._state.nodes.set([...this.nodes]), this._notifyChange();
249
250
  }
250
251
  }
251
- _selectNode(t, o) {
252
- const e = this.nodes.map((s) => s.id === t ? { ...s, selected: !s.selected } : o ? s : { ...s, selected: !1 });
252
+ _selectNode(t, s) {
253
+ const e = this.nodes.map((r) => r.id === t ? { ...r, selected: !r.selected } : s ? r : { ...r, selected: !1 });
253
254
  this.nodes = e;
254
255
  }
255
256
  /**
@@ -257,10 +258,10 @@ let f = class extends j(P) {
257
258
  * Useful for Drag & Drop and context menus.
258
259
  */
259
260
  project(t) {
260
- const [o, e, s] = this._state.transform.get();
261
+ const [s, e, r] = this._state.transform.get();
261
262
  return {
262
- x: (t.x - o) / s,
263
- y: (t.y - e) / s
263
+ x: (t.x - s) / r,
264
+ y: (t.y - e) / r
264
265
  };
265
266
  }
266
267
  /**
@@ -269,17 +270,17 @@ let f = class extends j(P) {
269
270
  */
270
271
  async fitView(t = 50) {
271
272
  if (!this._panZoom || this.nodes.length === 0) return;
272
- const o = Array.from(this._state.nodeLookup.values());
273
- if (o.length === 0) return;
274
- let e = 1 / 0, s = 1 / 0, r = -1 / 0, i = -1 / 0;
275
- o.forEach((_) => {
276
- const { x: g, y: S } = _.internals.positionAbsolute, G = _.measured.width || 0, et = _.measured.height || 0;
277
- e = Math.min(e, g), s = Math.min(s, S), r = Math.max(r, g + G), i = Math.max(i, S + et);
273
+ const s = Array.from(this._state.nodeLookup.values());
274
+ if (s.length === 0) return;
275
+ let e = 1 / 0, r = 1 / 0, o = -1 / 0, i = -1 / 0;
276
+ s.forEach((b) => {
277
+ const { x: v, y: C } = b.internals.positionAbsolute, F = b.measured.width || 0, nt = b.measured.height || 0;
278
+ e = Math.min(e, v), r = Math.min(r, C), o = Math.max(o, v + F), i = Math.max(i, C + nt);
278
279
  });
279
- const n = r - e, p = i - s, c = this.offsetWidth, a = this.offsetHeight;
280
- if (c === 0 || a === 0) return;
281
- const h = (c - t * 2) / n, l = (a - t * 2) / p, u = Math.min(h, l, 1), y = (c - n * u) / 2 - e * u, b = (a - p * u) / 2 - s * u;
282
- await this._panZoom.setViewport({ x: y, y: b, zoom: u }, { duration: 400 });
280
+ const n = o - e, c = i - r, h = this.offsetWidth, a = this.offsetHeight;
281
+ if (h === 0 || a === 0) return;
282
+ const p = (h - t * 2) / n, l = (a - t * 2) / c, u = Math.min(p, l, 1), g = (h - n * u) / 2 - e * u, _ = (a - c * u) / 2 - r * u;
283
+ await this._panZoom.setViewport({ x: g, y: _, zoom: u }, { duration: 400 });
283
284
  }
284
285
  _updatePanZoom(t = !1) {
285
286
  this._panZoom && this._panZoom.update({
@@ -288,7 +289,7 @@ let f = class extends j(P) {
288
289
  preventScrolling: !0,
289
290
  panOnScroll: !1,
290
291
  panOnDrag: this.panOnDrag,
291
- panOnScrollMode: it.Free,
292
+ panOnScrollMode: pt.Free,
292
293
  panOnScrollSpeed: 0.5,
293
294
  userSelectionActive: t,
294
295
  zoomOnPinch: this.zoomOnPinch,
@@ -303,7 +304,7 @@ let f = class extends j(P) {
303
304
  });
304
305
  }
305
306
  firstUpdated() {
306
- this._renderer && (this._state.domNode = this._renderer, this._resizeObserver?.observe(this._renderer), this._renderer.addEventListener("pointerdown", (t) => this._onPointerDown(t), { capture: !0 }), this._panZoom = nt({
307
+ this._renderer && (this._state.domNode = this._renderer, this._resizeObserver?.observe(this._renderer), this._renderer.addEventListener("pointerdown", (t) => this._onPointerDown(t), { capture: !0 }), this._panZoom = ct({
307
308
  domNode: this._renderer,
308
309
  minZoom: 0.5,
309
310
  maxZoom: 2,
@@ -311,8 +312,8 @@ let f = class extends j(P) {
311
312
  viewport: this.viewport,
312
313
  onDraggingChange: () => {
313
314
  },
314
- onPanZoom: (t, { x: o, y: e, zoom: s }) => {
315
- this.viewport = { x: o, y: e, zoom: s }, this._state.transform.set([o, e, s]), this._viewport && (this._viewport.style.transform = `translate(${o}px,${e}px) scale(${s})`);
315
+ onPanZoom: (t, { x: s, y: e, zoom: r }) => {
316
+ this.viewport = { x: s, y: e, zoom: r }, this._state.transform.set([s, e, r]), this._viewport && (this._viewport.style.transform = `translate(${s}px,${e}px) scale(${r})`);
316
317
  }
317
318
  }), this._updatePanZoom(), this._state.panZoom = this._panZoom);
318
319
  }
@@ -320,44 +321,44 @@ let f = class extends j(P) {
320
321
  (t.has("nodes") || t.has("nodesDraggable")) && this._setupDrags(), this._panZoom && (t.has("panOnDrag") || t.has("zoomOnScroll") || t.has("zoomOnPinch") || t.has("zoomOnDoubleClick")) && this._updatePanZoom();
321
322
  }
322
323
  _setupDrags() {
323
- const t = this.shadowRoot?.querySelectorAll(".xyflow__node"), o = /* @__PURE__ */ new Set();
324
+ const t = this.shadowRoot?.querySelectorAll(".xyflow__node"), s = /* @__PURE__ */ new Set();
324
325
  t?.forEach((e) => {
325
- const s = e.dataset.id;
326
- if (s) {
327
- if (o.add(s), this._resizeObserver?.observe(e), e.onclick = (i) => {
328
- i.stopPropagation(), this._selectNode(s, i.shiftKey || i.metaKey);
326
+ const r = e.dataset.id;
327
+ if (r) {
328
+ if (s.add(r), this._resizeObserver?.observe(e), e.onclick = (i) => {
329
+ i.stopPropagation(), this._selectNode(r, i.shiftKey || i.metaKey);
329
330
  }, e.style.cursor = this.nodesDraggable ? "grab" : "default", !this.nodesDraggable) {
330
- this._drags.delete(s);
331
+ this._drags.delete(r);
331
332
  return;
332
333
  }
333
- let r = this._drags.get(s);
334
- r || (r = at({
334
+ let o = this._drags.get(r);
335
+ o || (o = ht({
335
336
  getStoreItems: () => ({
336
337
  ...this._state,
337
338
  nodes: this._state.nodes.get(),
338
339
  edges: this._state.edges.get(),
339
340
  transform: this._state.transform.get(),
340
341
  panBy: async (i) => {
341
- const { panZoom: n, nodeExtent: p } = this._state, c = this._state.transform.get();
342
+ const { panZoom: n, nodeExtent: c } = this._state, h = this._state.transform.get();
342
343
  return n ? !!await n.setViewportConstrained(
343
344
  {
344
- x: c[0] + i.x,
345
- y: c[1] + i.y,
346
- zoom: c[2]
345
+ x: h[0] + i.x,
346
+ y: h[1] + i.y,
347
+ zoom: h[2]
347
348
  },
348
349
  [[0, 0], [this.offsetWidth, this.offsetHeight]],
349
- p
350
+ c
350
351
  ) : !1;
351
352
  },
352
353
  updateNodePositions: (i) => {
353
- i.forEach((n, p) => {
354
- const c = this._state.nodeLookup.get(p);
355
- if (c) {
356
- c.position = n.position, c.internals.positionAbsolute = n.internals.positionAbsolute;
357
- const a = this.nodes.find((h) => h.id === p);
354
+ i.forEach((n, c) => {
355
+ const h = this._state.nodeLookup.get(c);
356
+ if (h) {
357
+ h.position = n.position, h.internals.positionAbsolute = n.internals.positionAbsolute;
358
+ const a = this.nodes.find((p) => p.id === c);
358
359
  a && (a.position = n.position);
359
360
  }
360
- }), U(this._state.nodeLookup, this._state.parentLookup, {
361
+ }), q(this._state.nodeLookup, this._state.parentLookup, {
361
362
  nodeOrigin: this._state.nodeOrigin,
362
363
  nodeExtent: this._state.nodeExtent
363
364
  }), this._state.nodes.set([...this.nodes]), this._notifyChange();
@@ -365,33 +366,33 @@ let f = class extends j(P) {
365
366
  unselectNodesAndEdges: () => {
366
367
  }
367
368
  })
368
- }), this._drags.set(s, r)), r.update({
369
+ }), this._drags.set(r, o)), o.update({
369
370
  domNode: e,
370
- nodeId: s
371
+ nodeId: r
371
372
  });
372
373
  }
373
374
  });
374
375
  for (const e of this._drags.keys())
375
- o.has(e) || this._drags.delete(e);
376
+ s.has(e) || this._drags.delete(e);
376
377
  }
377
378
  _renderEdge(t) {
378
- const o = this._state.nodeLookup.get(t.source), e = this._state.nodeLookup.get(t.target);
379
- if (!o || !e) return null;
380
- const s = this.nodes.find((g) => g.id === t.source), r = this.nodes.find((g) => g.id === t.target);
381
- if (s?.hidden || r?.hidden) return null;
382
- const i = (o.internals.handleBounds?.source || []).find(
383
- (g) => g.id === (t.sourceHandle || null)
384
- ) || o.internals.handleBounds?.source?.[0] || {
379
+ const s = this._state.nodeLookup.get(t.source), e = this._state.nodeLookup.get(t.target);
380
+ if (!s || !e) return null;
381
+ const r = this.nodes.find((v) => v.id === t.source), o = this.nodes.find((v) => v.id === t.target);
382
+ if (r?.hidden || o?.hidden) return null;
383
+ const i = (s.internals.handleBounds?.source || []).find(
384
+ (v) => v.id === (t.sourceHandle || null)
385
+ ) || s.internals.handleBounds?.source?.[0] || {
385
386
  id: null,
386
387
  type: "source",
387
388
  nodeId: t.source,
388
389
  position: D.Bottom,
389
- x: (o.measured.width || 0) / 2,
390
- y: o.measured.height || 0,
390
+ x: (s.measured.width || 0) / 2,
391
+ y: s.measured.height || 0,
391
392
  width: 1,
392
393
  height: 1
393
394
  }, n = (e.internals.handleBounds?.target || []).find(
394
- (g) => g.id === (t.targetHandle || null)
395
+ (v) => v.id === (t.targetHandle || null)
395
396
  ) || e.internals.handleBounds?.target?.[0] || {
396
397
  id: null,
397
398
  type: "target",
@@ -401,51 +402,51 @@ let f = class extends j(P) {
401
402
  y: 0,
402
403
  width: 1,
403
404
  height: 1
404
- }, p = K(o, i, i.position, !0), c = K(e, n, n.position, !0);
405
- let a = "", h = 0, l = 0;
405
+ }, c = tt(s, i, i.position, !0), h = tt(e, n, n.position, !0);
406
+ let a = "", p = 0, l = 0;
406
407
  const u = {
407
- sourceX: p.x,
408
- sourceY: p.y,
408
+ sourceX: c.x,
409
+ sourceY: c.y,
409
410
  sourcePosition: i.position,
410
- targetX: c.x,
411
- targetY: c.y,
411
+ targetX: h.x,
412
+ targetY: h.y,
412
413
  targetPosition: n.position
413
414
  };
414
415
  switch (t.type) {
415
416
  case "straight":
416
- [a, h, l] = dt(u);
417
+ [a, p, l] = ut(u);
417
418
  break;
418
419
  case "smoothstep":
419
- [a, h, l] = F(u);
420
+ [a, p, l] = et(u);
420
421
  break;
421
422
  case "step":
422
- [a, h, l] = F({ ...u, borderRadius: 0 });
423
+ [a, p, l] = et({ ...u, borderRadius: 0 });
423
424
  break;
424
425
  default:
425
- [a, h, l] = W(u);
426
+ [a, p, l] = J(u);
426
427
  break;
427
428
  }
428
- const y = (g) => {
429
- if (!g) return null;
430
- const S = typeof g == "string" ? g : g.type;
431
- return S ? `lit-flow__${S}${t.selected ? "-selected" : ""}` : null;
432
- }, b = y(t.markerEnd), _ = y(t.markerStart);
433
- return R`
429
+ const g = (v) => {
430
+ if (!v) return null;
431
+ const C = typeof v == "string" ? v : v.type;
432
+ return C ? `lit-flow__${C}${t.selected ? "-selected" : ""}` : null;
433
+ }, _ = g(t.markerEnd), b = g(t.markerStart);
434
+ return Z`
434
435
  <g class="xyflow__edge">
435
436
  <path
436
437
  d="${a}"
437
438
  fill="none"
438
439
  stroke="${t.selected ? "var(--md-sys-color-primary)" : "var(--md-sys-color-outline-variant)"}"
439
440
  stroke-width="${t.selected ? "3" : "2"}"
440
- marker-end="${b ? `url(#${b})` : ""}"
441
- marker-start="${_ ? `url(#${_})` : ""}"
441
+ marker-end="${_ ? `url(#${_})` : ""}"
442
+ marker-start="${b ? `url(#${b})` : ""}"
442
443
  style="pointer-events: none; transition: stroke 0.2s ease-in-out, stroke-width 0.2s ease-in-out;"
443
444
  />
444
- ${t.label ? R`
445
+ ${t.label ? Z`
445
446
  <foreignObject
446
447
  width="100"
447
448
  height="30"
448
- x="${h - 50}"
449
+ x="${p - 50}"
449
450
  y="${l - 15}"
450
451
  requiredExtensions="http://www.w3.org/1999/xhtml"
451
452
  >
@@ -461,20 +462,20 @@ let f = class extends j(P) {
461
462
  return t instanceof HTMLElement || t instanceof SVGElement ? !!(t === this._renderer || t.classList.contains("xyflow__viewport") || t.classList.contains("xyflow__edges") || t.classList.contains("xyflow__nodes")) : !1;
462
463
  }
463
464
  _onPointerDown(t) {
464
- const o = this._isPaneClick(t.target), e = t.shiftKey || this.selectionMode === "select";
465
- if (o && e) {
465
+ const s = this._isPaneClick(t.target), e = t.shiftKey || this.selectionMode === "select";
466
+ if (s && e) {
466
467
  console.log("LitFlow: Selection started", { x: t.clientX, y: t.clientY, shift: t.shiftKey });
467
- const s = this._renderer.getBoundingClientRect();
468
+ const r = this._renderer.getBoundingClientRect();
468
469
  this._selectionStart = {
469
- x: t.clientX - s.left,
470
- y: t.clientY - s.top
470
+ x: t.clientX - r.left,
471
+ y: t.clientY - r.top
471
472
  }, this._selectionRect = { x: this._selectionStart.x, y: this._selectionStart.y, width: 0, height: 0 }, this._updatePanZoom(!0), this._renderer.setPointerCapture(t.pointerId), t.stopImmediatePropagation();
472
473
  }
473
474
  }
474
475
  _onPointerMove(t) {
475
476
  if (this._selectionStart && this._renderer) {
476
- const o = this._renderer.getBoundingClientRect(), e = t.clientX - o.left, s = t.clientY - o.top, r = Math.min(this._selectionStart.x, e), i = Math.min(this._selectionStart.y, s), n = Math.abs(this._selectionStart.x - e), p = Math.abs(this._selectionStart.y - s);
477
- this._selectionRect = { x: r, y: i, width: n, height: p }, this._performSelection(t.shiftKey);
477
+ const s = this._renderer.getBoundingClientRect(), e = t.clientX - s.left, r = t.clientY - s.top, o = Math.min(this._selectionStart.x, e), i = Math.min(this._selectionStart.y, r), n = Math.abs(this._selectionStart.x - e), c = Math.abs(this._selectionStart.y - r);
478
+ this._selectionRect = { x: o, y: i, width: n, height: c }, this._performSelection(t.shiftKey);
478
479
  }
479
480
  }
480
481
  _onPointerUp(t) {
@@ -482,29 +483,29 @@ let f = class extends j(P) {
482
483
  }
483
484
  _performSelection(t) {
484
485
  if (!this._selectionRect) return;
485
- const o = this.project({ x: this._selectionRect.x, y: this._selectionRect.y }), e = this.project({
486
+ const s = this.project({ x: this._selectionRect.x, y: this._selectionRect.y }), e = this.project({
486
487
  x: this._selectionRect.x + this._selectionRect.width,
487
488
  y: this._selectionRect.y + this._selectionRect.height
488
- }), s = {
489
- x: Math.min(o.x, e.x),
490
- y: Math.min(o.y, e.y),
491
- width: Math.abs(o.x - e.x),
492
- height: Math.abs(o.y - e.y)
489
+ }), r = {
490
+ x: Math.min(s.x, e.x),
491
+ y: Math.min(s.y, e.y),
492
+ width: Math.abs(s.x - e.x),
493
+ height: Math.abs(s.y - e.y)
493
494
  };
494
- let r = !1;
495
+ let o = !1;
495
496
  const i = this.nodes.map((a) => {
496
- const h = this._state.nodeLookup.get(a.id);
497
- if (!h) return a;
498
- const l = h.internals.positionAbsolute, u = h.measured.width || 0, y = h.measured.height || 0, _ = l.x >= s.x && l.y >= s.y && l.x + u <= s.x + s.width && l.y + y <= s.y + s.height || t && a.selected;
499
- return _ !== !!a.selected ? (r = !0, { ...a, selected: _ }) : a;
497
+ const p = this._state.nodeLookup.get(a.id);
498
+ if (!p) return a;
499
+ const l = p.internals.positionAbsolute, u = p.measured.width || 0, g = p.measured.height || 0, b = l.x >= r.x && l.y >= r.y && l.x + u <= r.x + r.width && l.y + g <= r.y + r.height || t && a.selected;
500
+ return b !== !!a.selected ? (o = !0, { ...a, selected: b }) : a;
500
501
  });
501
- r && (this.nodes = i);
502
+ o && (this.nodes = i);
502
503
  let n = !1;
503
- const p = new Map(i.map((a) => [a.id, !!a.selected])), c = this.edges.map((a) => {
504
- const h = p.get(a.source), l = p.get(a.target), y = h && l || t && a.selected;
505
- return y !== !!a.selected ? (n = !0, { ...a, selected: y }) : a;
504
+ const c = new Map(i.map((a) => [a.id, !!a.selected])), h = this.edges.map((a) => {
505
+ const p = c.get(a.source), l = c.get(a.target), g = p && l || t && a.selected;
506
+ return g !== !!a.selected ? (n = !0, { ...a, selected: g }) : a;
506
507
  });
507
- n && (this.edges = c), (r || n) && this.dispatchEvent(new CustomEvent("selection-change", {
508
+ n && (this.edges = h), (o || n) && this.dispatchEvent(new CustomEvent("selection-change", {
508
509
  detail: {
509
510
  nodes: this.nodes.filter((a) => a.selected),
510
511
  edges: this.edges.filter((a) => a.selected)
@@ -512,27 +513,27 @@ let f = class extends j(P) {
512
513
  }));
513
514
  }
514
515
  _onHandlePointerDown(t) {
515
- const { event: o, handleId: e, nodeId: s, type: r, handleDomNode: i } = t.detail, n = r === "target";
516
+ const { event: s, handleId: e, nodeId: r, type: o, handleDomNode: i } = t.detail, n = o === "target";
516
517
  if (this._state.connectionInProgress.get() || !this.nodesConnectable)
517
518
  return;
518
- const p = i.getBoundingClientRect(), c = i.parentElement?.getBoundingClientRect(), a = this._state.transform.get()[2], h = {
519
+ const c = i.getBoundingClientRect(), h = i.parentElement?.getBoundingClientRect(), a = this._state.transform.get()[2], p = {
519
520
  id: e,
520
- nodeId: s,
521
- type: r,
521
+ nodeId: r,
522
+ type: o,
522
523
  position: i.position,
523
- x: (p.left - (c?.left ?? 0)) / a,
524
- y: (p.top - (c?.top ?? 0)) / a,
525
- width: p.width / a,
526
- height: p.height / a
524
+ x: (c.left - (h?.left ?? 0)) / a,
525
+ y: (c.top - (h?.top ?? 0)) / a,
526
+ width: c.width / a,
527
+ height: c.height / a
527
528
  };
528
- lt.onPointerDown(o, {
529
+ mt.onPointerDown(s, {
529
530
  handleId: e,
530
- nodeId: s,
531
+ nodeId: r,
531
532
  isTarget: n,
532
533
  domNode: this._renderer,
533
534
  handleDomNode: i,
534
535
  nodeLookup: this._state.nodeLookup,
535
- connectionMode: ht.Strict,
536
+ connectionMode: yt.Strict,
536
537
  lib: "lit",
537
538
  autoPanOnConnect: !0,
538
539
  flowId: "lit-flow",
@@ -546,7 +547,7 @@ let f = class extends j(P) {
546
547
  }), !0) : !1;
547
548
  },
548
549
  getTransform: () => this._state.transform.get(),
549
- getFromHandle: () => h,
550
+ getFromHandle: () => p,
550
551
  updateConnection: (l) => {
551
552
  l.inProgress ? this._state.connectionInProgress.set(l) : this._state.connectionInProgress.set(null);
552
553
  },
@@ -568,24 +569,24 @@ let f = class extends j(P) {
568
569
  }
569
570
  _onDrop(t) {
570
571
  t.preventDefault();
571
- const o = t.dataTransfer?.getData("application/litflow");
572
- if (typeof o > "u" || !o)
572
+ const s = t.dataTransfer?.getData("application/litflow");
573
+ if (typeof s > "u" || !s)
573
574
  return;
574
- const e = this.getBoundingClientRect(), s = this.project({
575
+ const e = this.getBoundingClientRect(), r = this.project({
575
576
  x: t.clientX - e.left,
576
577
  y: t.clientY - e.top
577
578
  });
578
- let r = `${o} node`;
579
+ let o = `${s} node`;
579
580
  if (this.promptOnDrop) {
580
- const n = window.prompt("Enter node label:", r);
581
+ const n = window.prompt("Enter node label:", o);
581
582
  if (n === null) return;
582
- r = n || r;
583
+ o = n || o;
583
584
  }
584
585
  const i = {
585
586
  id: `node_${Date.now()}`,
586
- type: o,
587
- position: s,
588
- data: { label: r }
587
+ type: s,
588
+ position: r,
589
+ data: { label: o }
589
590
  };
590
591
  this.nodes = [...this.nodes, i], this.dispatchEvent(new CustomEvent("node-drop", {
591
592
  detail: { node: i, event: t }
@@ -593,7 +594,7 @@ let f = class extends j(P) {
593
594
  }
594
595
  _renderConnectionLine(t) {
595
596
  if (!t) return null;
596
- const [o] = W({
597
+ const [s] = J({
597
598
  sourceX: t.from.x,
598
599
  sourceY: t.from.y,
599
600
  sourcePosition: t.fromPosition,
@@ -601,10 +602,10 @@ let f = class extends j(P) {
601
602
  targetY: t.to.y,
602
603
  targetPosition: t.toPosition
603
604
  });
604
- return R`
605
+ return Z`
605
606
  <path
606
607
  class="xyflow__connection-path"
607
- d="${o}"
608
+ d="${s}"
608
609
  fill="none"
609
610
  stroke="#b1b1b7"
610
611
  stroke-width="2"
@@ -615,13 +616,13 @@ let f = class extends j(P) {
615
616
  _onKeyDown(t) {
616
617
  if (!(t.target instanceof HTMLInputElement || t.target instanceof HTMLTextAreaElement || t.target.isContentEditable)) {
617
618
  if (t.key === "Delete" || t.key === "Backspace") {
618
- const o = this.nodes.filter((s) => s.selected), e = this.edges.filter((s) => s.selected);
619
- if (o.length > 0 || e.length > 0) {
620
- const s = new Set(o.map((i) => i.id)), r = new Set(e.map((i) => i.id));
619
+ const s = this.nodes.filter((r) => r.selected), e = this.edges.filter((r) => r.selected);
620
+ if (s.length > 0 || e.length > 0) {
621
+ const r = new Set(s.map((i) => i.id)), o = new Set(e.map((i) => i.id));
621
622
  this.edges.forEach((i) => {
622
- (s.has(i.source) || s.has(i.target)) && r.add(i.id);
623
- }), this.nodes = this.nodes.filter((i) => !s.has(i.id)), this.edges = this.edges.filter((i) => !r.has(i.id)), this.dispatchEvent(new CustomEvent("nodes-delete", {
624
- detail: { nodes: o }
623
+ (r.has(i.source) || r.has(i.target)) && o.add(i.id);
624
+ }), this.nodes = this.nodes.filter((i) => !r.has(i.id)), this.edges = this.edges.filter((i) => !o.has(i.id)), this.dispatchEvent(new CustomEvent("nodes-delete", {
625
+ detail: { nodes: s }
625
626
  })), this.dispatchEvent(new CustomEvent("edges-delete", {
626
627
  detail: { edges: e }
627
628
  }));
@@ -629,23 +630,23 @@ let f = class extends j(P) {
629
630
  }
630
631
  if (["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(t.key) && this.nodes.filter((e) => e.selected).length > 0) {
631
632
  t.preventDefault();
632
- const e = t.shiftKey ? 10 : 1, s = {
633
+ const e = t.shiftKey ? 10 : 1, r = {
633
634
  x: t.key === "ArrowLeft" ? -e : t.key === "ArrowRight" ? e : 0,
634
635
  y: t.key === "ArrowUp" ? -e : t.key === "ArrowDown" ? e : 0
635
636
  };
636
- this.nodes = this.nodes.map((r) => r.selected ? {
637
- ...r,
637
+ this.nodes = this.nodes.map((o) => o.selected ? {
638
+ ...o,
638
639
  position: {
639
- x: r.position.x + s.x,
640
- y: r.position.y + s.y
640
+ x: o.position.x + r.x,
641
+ y: o.position.y + r.y
641
642
  }
642
- } : r);
643
+ } : o);
643
644
  }
644
645
  }
645
646
  }
646
647
  render() {
647
- const t = this._state.transform.get(), o = this._state.connectionInProgress.get();
648
- return B`
648
+ const t = this._state.transform.get(), s = this._state.connectionInProgress.get();
649
+ return A`
649
650
  <div
650
651
  class="xyflow__renderer ${this.showGrid ? "has-grid" : ""}"
651
652
  tabindex="0"
@@ -655,7 +656,7 @@ let f = class extends j(P) {
655
656
  @pointermove="${this._onPointerMove}"
656
657
  @pointerup="${this._onPointerUp}"
657
658
  @click="${(e) => {
658
- this._isPaneClick(e.target) && (this.nodes = this.nodes.map((s) => ({ ...s, selected: !1 })), this.edges = this.edges.map((s) => ({ ...s, selected: !1 })));
659
+ this._isPaneClick(e.target) && (this.nodes = this.nodes.map((r) => ({ ...r, selected: !1 })), this.edges = this.edges.map((r) => ({ ...r, selected: !1 })));
659
660
  }}"
660
661
  >
661
662
  <div
@@ -665,14 +666,14 @@ let f = class extends j(P) {
665
666
  <div class="xyflow__nodes" @handle-pointer-down="${this._onHandlePointerDown}">
666
667
  ${this.nodes.map((e) => {
667
668
  if (e.hidden) return null;
668
- const r = this._state.nodeLookup.get(e.id)?.internals.positionAbsolute || e.position, i = this.nodeTypes[e.type || "default"] || this.nodeTypes.default, n = ot(i), p = e.style || {}, c = Object.entries(p).map(([b, _]) => `${b.replace(/([A-Z])/g, "-$1").toLowerCase()}: ${typeof _ == "number" ? `${_}px` : _}`).join("; "), a = e.width || p.width, h = e.height || p.height, l = a ? `width: ${typeof a == "number" ? `${a}px` : a};` : "", u = h ? `height: ${typeof h == "number" ? `${h}px` : h};` : "", y = e.zIndex ? `z-index: ${e.zIndex};` : "";
669
- return B`
669
+ const o = this._state.nodeLookup.get(e.id)?.internals.positionAbsolute || e.position, i = this.nodeTypes[e.type || "default"] || this.nodeTypes.default, n = at(i), c = e.style || {}, h = Object.entries(c).map(([_, b]) => `${_.replace(/([A-Z])/g, "-$1").toLowerCase()}: ${typeof b == "number" ? `${b}px` : b}`).join("; "), a = e.width || c.width, p = e.height || c.height, l = a ? `width: ${typeof a == "number" ? `${a}px` : a};` : "", u = p ? `height: ${typeof p == "number" ? `${p}px` : p};` : "", g = e.zIndex ? `z-index: ${e.zIndex};` : "";
670
+ return A`
670
671
  <${n}
671
672
  class="xyflow__node"
672
673
  data-id="${e.id}"
673
674
  type="${e.type || "default"}"
674
675
  .nodeId="${e.id}"
675
- style="transform: translate(${r.x}px, ${r.y}px); ${c} ${l} ${u} ${y}"
676
+ style="transform: translate(${o.x}px, ${o.y}px); ${h} ${l} ${u} ${g}"
676
677
  .data="${e.data}"
677
678
  .label="${e.data.label}"
678
679
  .type="${e.type || "default"}"
@@ -687,7 +688,7 @@ let f = class extends j(P) {
687
688
  <marker
688
689
  id="lit-flow__arrow"
689
690
  viewBox="0 0 10 10"
690
- refX="5"
691
+ refX="9"
691
692
  refY="5"
692
693
  markerWidth="6"
693
694
  markerHeight="6"
@@ -698,7 +699,7 @@ let f = class extends j(P) {
698
699
  <marker
699
700
  id="lit-flow__arrowclosed"
700
701
  viewBox="0 0 10 10"
701
- refX="5"
702
+ refX="9"
702
703
  refY="5"
703
704
  markerWidth="6"
704
705
  markerHeight="6"
@@ -709,7 +710,7 @@ let f = class extends j(P) {
709
710
  <marker
710
711
  id="lit-flow__arrow-selected"
711
712
  viewBox="0 0 10 10"
712
- refX="5"
713
+ refX="9"
713
714
  refY="5"
714
715
  markerWidth="6"
715
716
  markerHeight="6"
@@ -720,7 +721,7 @@ let f = class extends j(P) {
720
721
  <marker
721
722
  id="lit-flow__arrowclosed-selected"
722
723
  viewBox="0 0 10 10"
723
- refX="5"
724
+ refX="9"
724
725
  refY="5"
725
726
  markerWidth="6"
726
727
  markerHeight="6"
@@ -730,18 +731,18 @@ let f = class extends j(P) {
730
731
  </marker>
731
732
  </defs>
732
733
  ${this.edges.map((e) => this._renderEdge(e))}
733
- ${this._renderConnectionLine(o)}
734
+ ${this._renderConnectionLine(s)}
734
735
  </svg>
735
736
  </div>
736
- ${this._selectionRect ? B`
737
+ ${this._selectionRect ? A`
737
738
  <div
738
739
  class="xyflow__selection"
739
740
  style="transform: translate(${this._selectionRect.x}px, ${this._selectionRect.y}px); width: ${this._selectionRect.width}px; height: ${this._selectionRect.height}px;"
740
741
  ></div>
741
742
  ` : ""}
742
743
  </div>
743
- ${this.showControls ? B`<lit-controls .panZoom="${this._panZoom}" @fit-view="${() => this.fitView()}"></lit-controls>` : ""}
744
- ${this.showMinimap ? B`
744
+ ${this.showControls ? A`<lit-controls .panZoom="${this._panZoom}" @fit-view="${() => this.fitView()}"></lit-controls>` : ""}
745
+ ${this.showMinimap ? A`
745
746
  <lit-minimap
746
747
  .panZoom="${this._panZoom}"
747
748
  .nodeLookup="${this._state.nodeLookup}"
@@ -755,9 +756,9 @@ let f = class extends j(P) {
755
756
  `;
756
757
  }
757
758
  };
758
- f.styles = [
759
- J,
760
- A`
759
+ y.styles = [
760
+ Q,
761
+ B`
761
762
  :host {
762
763
  display: block;
763
764
  width: 100%;
@@ -839,6 +840,16 @@ f.styles = [
839
840
  pointer-events: all;
840
841
  }
841
842
 
843
+ /* Remove default styling for schema nodes which handle their own layout */
844
+ .xyflow__node[type="schema"],
845
+ .xyflow__node[type="gemini-prompt"],
846
+ .xyflow__node[type="gemini-image"] {
847
+ padding: 0;
848
+ border: none;
849
+ background: none;
850
+ box-shadow: none;
851
+ }
852
+
842
853
  .xyflow__node[selected] {
843
854
  border-color: var(--lit-flow-node-selected-border);
844
855
  border-width: 3px;
@@ -943,81 +954,81 @@ f.styles = [
943
954
  }
944
955
  `
945
956
  ];
946
- m([
947
- q(".xyflow__renderer")
948
- ], f.prototype, "_renderer", 2);
949
- m([
950
- q(".xyflow__viewport")
951
- ], f.prototype, "_viewport", 2);
952
- m([
953
- N()
954
- ], f.prototype, "_panZoom", 2);
955
- m([
956
- N()
957
- ], f.prototype, "_state", 2);
958
- m([
957
+ f([
958
+ st(".xyflow__renderer")
959
+ ], y.prototype, "_renderer", 2);
960
+ f([
961
+ st(".xyflow__viewport")
962
+ ], y.prototype, "_viewport", 2);
963
+ f([
964
+ M()
965
+ ], y.prototype, "_panZoom", 2);
966
+ f([
967
+ M()
968
+ ], y.prototype, "_state", 2);
969
+ f([
959
970
  d({ type: Object })
960
- ], f.prototype, "nodeTypes", 2);
961
- m([
971
+ ], y.prototype, "nodeTypes", 2);
972
+ f([
962
973
  d({ type: Boolean, attribute: "show-controls", reflect: !0 })
963
- ], f.prototype, "showControls", 2);
964
- m([
965
- d({ type: Boolean, attribute: "show-minimap", reflect: !0, converter: k })
966
- ], f.prototype, "showMinimap", 2);
967
- m([
968
- d({ type: Boolean, attribute: "show-grid", reflect: !0, converter: k })
969
- ], f.prototype, "showGrid", 2);
970
- m([
971
- d({ type: Boolean, attribute: "nodes-draggable", reflect: !0, converter: k })
972
- ], f.prototype, "nodesDraggable", 2);
973
- m([
974
- d({ type: Boolean, attribute: "nodes-connectable", reflect: !0, converter: k })
975
- ], f.prototype, "nodesConnectable", 2);
976
- m([
977
- d({ type: Boolean, attribute: "pan-on-drag", reflect: !0, converter: k })
978
- ], f.prototype, "panOnDrag", 2);
979
- m([
980
- d({ type: Boolean, attribute: "zoom-on-scroll", reflect: !0, converter: k })
981
- ], f.prototype, "zoomOnScroll", 2);
982
- m([
983
- d({ type: Boolean, attribute: "zoom-on-pinch", reflect: !0, converter: k })
984
- ], f.prototype, "zoomOnPinch", 2);
985
- m([
986
- d({ type: Boolean, attribute: "zoom-on-double-click", reflect: !0, converter: k })
987
- ], f.prototype, "zoomOnDoubleClick", 2);
988
- m([
989
- d({ type: Boolean, attribute: "prompt-on-drop", reflect: !0, converter: k })
990
- ], f.prototype, "promptOnDrop", 2);
991
- m([
974
+ ], y.prototype, "showControls", 2);
975
+ f([
976
+ d({ type: Boolean, attribute: "show-minimap", reflect: !0, converter: S })
977
+ ], y.prototype, "showMinimap", 2);
978
+ f([
979
+ d({ type: Boolean, attribute: "show-grid", reflect: !0, converter: S })
980
+ ], y.prototype, "showGrid", 2);
981
+ f([
982
+ d({ type: Boolean, attribute: "nodes-draggable", reflect: !0, converter: S })
983
+ ], y.prototype, "nodesDraggable", 2);
984
+ f([
985
+ d({ type: Boolean, attribute: "nodes-connectable", reflect: !0, converter: S })
986
+ ], y.prototype, "nodesConnectable", 2);
987
+ f([
988
+ d({ type: Boolean, attribute: "pan-on-drag", reflect: !0, converter: S })
989
+ ], y.prototype, "panOnDrag", 2);
990
+ f([
991
+ d({ type: Boolean, attribute: "zoom-on-scroll", reflect: !0, converter: S })
992
+ ], y.prototype, "zoomOnScroll", 2);
993
+ f([
994
+ d({ type: Boolean, attribute: "zoom-on-pinch", reflect: !0, converter: S })
995
+ ], y.prototype, "zoomOnPinch", 2);
996
+ f([
997
+ d({ type: Boolean, attribute: "zoom-on-double-click", reflect: !0, converter: S })
998
+ ], y.prototype, "zoomOnDoubleClick", 2);
999
+ f([
1000
+ d({ type: Boolean, attribute: "prompt-on-drop", reflect: !0, converter: S })
1001
+ ], y.prototype, "promptOnDrop", 2);
1002
+ f([
992
1003
  d({ type: String, attribute: "selection-mode" })
993
- ], f.prototype, "selectionMode", 2);
994
- m([
995
- N()
996
- ], f.prototype, "_selectionRect", 2);
997
- m([
998
- N()
999
- ], f.prototype, "_width", 2);
1000
- m([
1001
- N()
1002
- ], f.prototype, "_height", 2);
1003
- m([
1004
+ ], y.prototype, "selectionMode", 2);
1005
+ f([
1006
+ M()
1007
+ ], y.prototype, "_selectionRect", 2);
1008
+ f([
1009
+ M()
1010
+ ], y.prototype, "_width", 2);
1011
+ f([
1012
+ M()
1013
+ ], y.prototype, "_height", 2);
1014
+ f([
1004
1015
  d({ type: Array })
1005
- ], f.prototype, "nodes", 1);
1006
- m([
1016
+ ], y.prototype, "nodes", 1);
1017
+ f([
1007
1018
  d({ type: Array })
1008
- ], f.prototype, "edges", 1);
1009
- m([
1019
+ ], y.prototype, "edges", 1);
1020
+ f([
1010
1021
  d({ type: Object })
1011
- ], f.prototype, "viewport", 2);
1012
- f = m([
1013
- O("lit-flow")
1014
- ], f);
1015
- var wt = Object.defineProperty, xt = Object.getOwnPropertyDescriptor, Z = (t, o, e, s) => {
1016
- for (var r = s > 1 ? void 0 : s ? xt(o, e) : o, i = t.length - 1, n; i >= 0; i--)
1017
- (n = t[i]) && (r = (s ? n(o, e, r) : n(r)) || r);
1018
- return s && r && wt(o, e, r), r;
1022
+ ], y.prototype, "viewport", 2);
1023
+ y = f([
1024
+ w("lit-flow")
1025
+ ], y);
1026
+ var St = Object.defineProperty, kt = Object.getOwnPropertyDescriptor, X = (t, s, e, r) => {
1027
+ for (var o = r > 1 ? void 0 : r ? kt(s, e) : s, i = t.length - 1, n; i >= 0; i--)
1028
+ (n = t[i]) && (o = (r ? n(s, e, o) : n(o)) || o);
1029
+ return r && o && St(s, e, o), o;
1019
1030
  };
1020
- let E = class extends P {
1031
+ let N = class extends x {
1021
1032
  constructor() {
1022
1033
  super(), this.type = "source", this.position = D.Top, this.addEventListener("mousedown", (t) => this._onPointerDown(t)), this.addEventListener("touchstart", (t) => this._onPointerDown(t));
1023
1034
  }
@@ -1026,14 +1037,14 @@ let E = class extends P {
1026
1037
  }
1027
1038
  _onPointerDown(t) {
1028
1039
  t.stopPropagation();
1029
- const o = this.getAttribute("data-nodeid");
1040
+ const s = this.getAttribute("data-nodeid");
1030
1041
  this.dispatchEvent(new CustomEvent("handle-pointer-down", {
1031
1042
  bubbles: !0,
1032
1043
  composed: !0,
1033
1044
  detail: {
1034
1045
  event: t,
1035
1046
  handleId: this.handleId,
1036
- nodeId: o,
1047
+ nodeId: s,
1037
1048
  type: this.type,
1038
1049
  handleDomNode: this
1039
1050
  }
@@ -1046,7 +1057,7 @@ let E = class extends P {
1046
1057
  (t.has("nodeId") || t.has("handleId") || t.has("type")) && this.setAttribute("data-id", `lit-flow-${this.nodeId || ""}-${this.handleId || ""}-${this.type}`);
1047
1058
  }
1048
1059
  render() {
1049
- return v`
1060
+ return m`
1050
1061
  <div style="
1051
1062
  width: 100%;
1052
1063
  height: 100%;
@@ -1057,27 +1068,27 @@ let E = class extends P {
1057
1068
  `;
1058
1069
  }
1059
1070
  };
1060
- Z([
1071
+ X([
1061
1072
  d({ type: String, reflect: !0 })
1062
- ], E.prototype, "type", 2);
1063
- Z([
1073
+ ], N.prototype, "type", 2);
1074
+ X([
1064
1075
  d({ type: String, reflect: !0, attribute: "data-handlepos" })
1065
- ], E.prototype, "position", 2);
1066
- Z([
1076
+ ], N.prototype, "position", 2);
1077
+ X([
1067
1078
  d({ type: String, reflect: !0, attribute: "data-handleid" })
1068
- ], E.prototype, "handleId", 2);
1069
- Z([
1079
+ ], N.prototype, "handleId", 2);
1080
+ X([
1070
1081
  d({ type: String, reflect: !0, attribute: "data-nodeid" })
1071
- ], E.prototype, "nodeId", 2);
1072
- E = Z([
1073
- O("lit-handle")
1074
- ], E);
1075
- var $t = Object.defineProperty, Pt = Object.getOwnPropertyDescriptor, Q = (t, o, e, s) => {
1076
- for (var r = s > 1 ? void 0 : s ? Pt(o, e) : o, i = t.length - 1, n; i >= 0; i--)
1077
- (n = t[i]) && (r = (s ? n(o, e, r) : n(r)) || r);
1078
- return s && r && $t(o, e, r), r;
1082
+ ], N.prototype, "nodeId", 2);
1083
+ N = X([
1084
+ w("lit-handle")
1085
+ ], N);
1086
+ var zt = Object.defineProperty, It = Object.getOwnPropertyDescriptor, rt = (t, s, e, r) => {
1087
+ for (var o = r > 1 ? void 0 : r ? It(s, e) : s, i = t.length - 1, n; i >= 0; i--)
1088
+ (n = t[i]) && (o = (r ? n(s, e, o) : n(o)) || o);
1089
+ return r && o && zt(s, e, o), o;
1079
1090
  };
1080
- let Y = class extends j(P) {
1091
+ let U = class extends H(x) {
1081
1092
  _zoomIn() {
1082
1093
  this.panZoom?.scaleBy(1.2);
1083
1094
  }
@@ -1091,7 +1102,7 @@ let Y = class extends j(P) {
1091
1102
  }));
1092
1103
  }
1093
1104
  render() {
1094
- return v`
1105
+ return m`
1095
1106
  <button @click="${this._zoomIn}" title="Zoom In">
1096
1107
  <svg viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
1097
1108
  </button>
@@ -1104,7 +1115,7 @@ let Y = class extends j(P) {
1104
1115
  `;
1105
1116
  }
1106
1117
  };
1107
- Y.styles = A`
1118
+ U.styles = B`
1108
1119
  :host {
1109
1120
  display: block;
1110
1121
  position: absolute;
@@ -1147,26 +1158,26 @@ Y.styles = A`
1147
1158
  fill: currentColor;
1148
1159
  }
1149
1160
  `;
1150
- Q([
1161
+ rt([
1151
1162
  d({ type: Object })
1152
- ], Y.prototype, "panZoom", 2);
1153
- Y = Q([
1154
- O("lit-controls")
1155
- ], Y);
1156
- var Ot = Object.defineProperty, kt = Object.getOwnPropertyDescriptor, C = (t, o, e, s) => {
1157
- for (var r = s > 1 ? void 0 : s ? kt(o, e) : o, i = t.length - 1, n; i >= 0; i--)
1158
- (n = t[i]) && (r = (s ? n(o, e, r) : n(r)) || r);
1159
- return s && r && Ot(o, e, r), r;
1163
+ ], U.prototype, "panZoom", 2);
1164
+ U = rt([
1165
+ w("lit-controls")
1166
+ ], U);
1167
+ var Ct = Object.defineProperty, Dt = Object.getOwnPropertyDescriptor, I = (t, s, e, r) => {
1168
+ for (var o = r > 1 ? void 0 : r ? Dt(s, e) : s, i = t.length - 1, n; i >= 0; i--)
1169
+ (n = t[i]) && (o = (r ? n(s, e, o) : n(o)) || o);
1170
+ return r && o && Ct(s, e, o), o;
1160
1171
  };
1161
- let x = class extends j(P) {
1172
+ let O = class extends H(x) {
1162
1173
  constructor() {
1163
1174
  super(...arguments), this.nodeLookup = /* @__PURE__ */ new Map(), this.transform = [0, 0, 1], this.translateExtent = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], this.width = 0, this.height = 0;
1164
1175
  }
1165
1176
  updated(t) {
1166
1177
  if (!this._minimapInstance && this.panZoom) {
1167
- const o = this.shadowRoot?.querySelector("svg");
1168
- o && (this._minimapInstance = pt({
1169
- domNode: o,
1178
+ const s = this.shadowRoot?.querySelector("svg");
1179
+ s && (this._minimapInstance = ft({
1180
+ domNode: s,
1170
1181
  panZoom: this.panZoom,
1171
1182
  getTransform: () => this.transform,
1172
1183
  getViewScale: () => {
@@ -1188,30 +1199,30 @@ let x = class extends j(P) {
1188
1199
  width: this.width / this.transform[2],
1189
1200
  height: this.height / this.transform[2]
1190
1201
  };
1191
- return this.nodeLookup.size > 0 ? ct(ut(this.nodeLookup), t) : t;
1202
+ return this.nodeLookup.size > 0 ? gt(vt(this.nodeLookup), t) : t;
1192
1203
  }
1193
1204
  render() {
1194
- const t = this._getBoundingRect(), o = {
1205
+ const t = this._getBoundingRect(), s = {
1195
1206
  x: -this.transform[0] / this.transform[2],
1196
1207
  y: -this.transform[1] / this.transform[2],
1197
1208
  width: this.width / this.transform[2],
1198
1209
  height: this.height / this.transform[2]
1199
- }, e = 200, s = 150, r = t.width / e, i = t.height / s, n = Math.max(r, i), p = n * e, c = n * s, a = 5 * n, h = t.x - (p - t.width) / 2 - a, l = t.y - (c - t.height) / 2 - a, u = p + a * 2, y = c + a * 2;
1200
- return v`
1210
+ }, e = 200, r = 150, o = t.width / e, i = t.height / r, n = Math.max(o, i), c = n * e, h = n * r, a = 5 * n, p = t.x - (c - t.width) / 2 - a, l = t.y - (h - t.height) / 2 - a, u = c + a * 2, g = h + a * 2;
1211
+ return m`
1201
1212
  <svg
1202
1213
  width="${e}"
1203
- height="${s}"
1204
- viewBox="${h} ${l} ${u} ${y}"
1214
+ height="${r}"
1215
+ viewBox="${p} ${l} ${u} ${g}"
1205
1216
  >
1206
- ${Array.from(this.nodeLookup.values()).map((b) => {
1207
- const { x: _, y: g } = b.internals.positionAbsolute, S = b.measured.width || 0, G = b.measured.height || 0;
1208
- return R`
1217
+ ${Array.from(this.nodeLookup.values()).map((_) => {
1218
+ const { x: b, y: v } = _.internals.positionAbsolute, C = _.measured.width || 0, F = _.measured.height || 0;
1219
+ return Z`
1209
1220
  <rect
1210
1221
  class="minimap-node"
1211
- x="${_}"
1212
- y="${g}"
1213
- width="${S}"
1214
- height="${G}"
1222
+ x="${b}"
1223
+ y="${v}"
1224
+ width="${C}"
1225
+ height="${F}"
1215
1226
  rx="2"
1216
1227
  ry="2"
1217
1228
  />
@@ -1219,14 +1230,14 @@ let x = class extends j(P) {
1219
1230
  })}
1220
1231
  <path
1221
1232
  class="minimap-mask"
1222
- d="M${h - a},${l - a}h${u + a * 2}v${y + a * 2}h${-u - a * 2}z
1223
- M${o.x},${o.y}h${o.width}v${o.height}h${-o.width}z"
1233
+ d="M${p - a},${l - a}h${u + a * 2}v${g + a * 2}h${-u - a * 2}z
1234
+ M${s.x},${s.y}h${s.width}v${s.height}h${-s.width}z"
1224
1235
  />
1225
1236
  </svg>
1226
1237
  `;
1227
1238
  }
1228
1239
  };
1229
- x.styles = A`
1240
+ O.styles = B`
1230
1241
  :host {
1231
1242
  display: block;
1232
1243
  position: absolute;
@@ -1255,36 +1266,36 @@ x.styles = A`
1255
1266
  fill-rule: evenodd;
1256
1267
  }
1257
1268
  `;
1258
- C([
1269
+ I([
1259
1270
  d({ type: Object })
1260
- ], x.prototype, "panZoom", 2);
1261
- C([
1271
+ ], O.prototype, "panZoom", 2);
1272
+ I([
1262
1273
  d({ type: Object })
1263
- ], x.prototype, "nodeLookup", 2);
1264
- C([
1274
+ ], O.prototype, "nodeLookup", 2);
1275
+ I([
1265
1276
  d({ type: Array })
1266
- ], x.prototype, "transform", 2);
1267
- C([
1277
+ ], O.prototype, "transform", 2);
1278
+ I([
1268
1279
  d({ type: Array })
1269
- ], x.prototype, "translateExtent", 2);
1270
- C([
1280
+ ], O.prototype, "translateExtent", 2);
1281
+ I([
1271
1282
  d({ type: Number })
1272
- ], x.prototype, "width", 2);
1273
- C([
1283
+ ], O.prototype, "width", 2);
1284
+ I([
1274
1285
  d({ type: Number })
1275
- ], x.prototype, "height", 2);
1276
- C([
1277
- N()
1278
- ], x.prototype, "_minimapInstance", 2);
1279
- x = C([
1280
- O("lit-minimap")
1281
- ], x);
1282
- var zt = Object.defineProperty, It = Object.getOwnPropertyDescriptor, tt = (t, o, e, s) => {
1283
- for (var r = s > 1 ? void 0 : s ? It(o, e) : o, i = t.length - 1, n; i >= 0; i--)
1284
- (n = t[i]) && (r = (s ? n(o, e, r) : n(r)) || r);
1285
- return s && r && zt(o, e, r), r;
1286
+ ], O.prototype, "height", 2);
1287
+ I([
1288
+ M()
1289
+ ], O.prototype, "_minimapInstance", 2);
1290
+ O = I([
1291
+ w("lit-minimap")
1292
+ ], O);
1293
+ var Et = Object.defineProperty, Lt = Object.getOwnPropertyDescriptor, it = (t, s, e, r) => {
1294
+ for (var o = r > 1 ? void 0 : r ? Lt(s, e) : s, i = t.length - 1, n; i >= 0; i--)
1295
+ (n = t[i]) && (o = (r ? n(s, e, o) : n(o)) || o);
1296
+ return r && o && Et(s, e, o), o;
1286
1297
  };
1287
- let T = class extends P {
1298
+ let W = class extends x {
1288
1299
  constructor() {
1289
1300
  super(...arguments), this.nodeTypes = [
1290
1301
  { type: "default", label: "Default Node" },
@@ -1292,19 +1303,19 @@ let T = class extends P {
1292
1303
  { type: "output", label: "Output Node" }
1293
1304
  ];
1294
1305
  }
1295
- _onDragStart(t, o) {
1296
- t.dataTransfer && (t.dataTransfer.setData("application/litflow", o), t.dataTransfer.effectAllowed = "move");
1306
+ _onDragStart(t, s) {
1307
+ t.dataTransfer && (t.dataTransfer.setData("application/litflow", s), t.dataTransfer.effectAllowed = "move");
1297
1308
  }
1298
1309
  render() {
1299
- return v`
1310
+ return m`
1300
1311
  <div class="sidebar-title">Node Palette</div>
1301
1312
  <div class="node-palette">
1302
1313
  ${this.nodeTypes.map(
1303
- (t) => v`
1314
+ (t) => m`
1304
1315
  <div
1305
1316
  class="palette-item"
1306
1317
  draggable="true"
1307
- @dragstart="${(o) => this._onDragStart(o, t.type)}"
1318
+ @dragstart="${(s) => this._onDragStart(s, t.type)}"
1308
1319
  >
1309
1320
  ${t.label}
1310
1321
  </div>
@@ -1314,9 +1325,9 @@ let T = class extends P {
1314
1325
  `;
1315
1326
  }
1316
1327
  };
1317
- T.styles = [
1318
- J,
1319
- A`
1328
+ W.styles = [
1329
+ Q,
1330
+ B`
1320
1331
  :host {
1321
1332
  display: block;
1322
1333
  width: 200px;
@@ -1364,18 +1375,18 @@ T.styles = [
1364
1375
  }
1365
1376
  `
1366
1377
  ];
1367
- tt([
1378
+ it([
1368
1379
  d({ type: Array })
1369
- ], T.prototype, "nodeTypes", 2);
1370
- T = tt([
1371
- O("lit-sidebar")
1372
- ], T);
1373
- var Ct = Object.defineProperty, St = Object.getOwnPropertyDescriptor, V = (t, o, e, s) => {
1374
- for (var r = s > 1 ? void 0 : s ? St(o, e) : o, i = t.length - 1, n; i >= 0; i--)
1375
- (n = t[i]) && (r = (s ? n(o, e, r) : n(r)) || r);
1376
- return s && r && Ct(o, e, r), r;
1380
+ ], W.prototype, "nodeTypes", 2);
1381
+ W = it([
1382
+ w("lit-sidebar")
1383
+ ], W);
1384
+ var Nt = Object.defineProperty, Rt = Object.getOwnPropertyDescriptor, K = (t, s, e, r) => {
1385
+ for (var o = r > 1 ? void 0 : r ? Rt(s, e) : s, i = t.length - 1, n; i >= 0; i--)
1386
+ (n = t[i]) && (o = (r ? n(s, e, o) : n(o)) || o);
1387
+ return r && o && Nt(s, e, o), o;
1377
1388
  };
1378
- let M = class extends P {
1389
+ let Y = class extends x {
1379
1390
  constructor() {
1380
1391
  super(...arguments), this.nodeId = "", this._data = {}, this.prompt = "";
1381
1392
  }
@@ -1389,15 +1400,15 @@ let M = class extends P {
1389
1400
  return this._data;
1390
1401
  }
1391
1402
  _onInput(t) {
1392
- const o = t.target;
1393
- this.prompt = o.value, this.dispatchEvent(new CustomEvent("node-data-change", {
1403
+ const s = t.target;
1404
+ this.prompt = s.value, this.dispatchEvent(new CustomEvent("node-data-change", {
1394
1405
  bubbles: !0,
1395
1406
  composed: !0,
1396
1407
  detail: { id: this.nodeId, data: { prompt: this.prompt } }
1397
1408
  }));
1398
1409
  }
1399
1410
  render() {
1400
- return v`
1411
+ return m`
1401
1412
  <div class="gemini-node prompt-node" style="
1402
1413
  padding: 12px;
1403
1414
  background: var(--md-sys-color-surface-container-high);
@@ -1453,24 +1464,24 @@ let M = class extends P {
1453
1464
  `;
1454
1465
  }
1455
1466
  };
1456
- V([
1467
+ K([
1457
1468
  d({ type: String, attribute: "data-id", reflect: !0 })
1458
- ], M.prototype, "nodeId", 2);
1459
- V([
1469
+ ], Y.prototype, "nodeId", 2);
1470
+ K([
1460
1471
  d({ type: Object })
1461
- ], M.prototype, "data", 1);
1462
- V([
1472
+ ], Y.prototype, "data", 1);
1473
+ K([
1463
1474
  d({ type: String })
1464
- ], M.prototype, "prompt", 2);
1465
- M = V([
1466
- O("lit-gemini-prompt-node")
1467
- ], M);
1468
- var Dt = Object.defineProperty, Et = Object.getOwnPropertyDescriptor, H = (t, o, e, s) => {
1469
- for (var r = s > 1 ? void 0 : s ? Et(o, e) : o, i = t.length - 1, n; i >= 0; i--)
1470
- (n = t[i]) && (r = (s ? n(o, e, r) : n(r)) || r);
1471
- return s && r && Dt(o, e, r), r;
1475
+ ], Y.prototype, "prompt", 2);
1476
+ Y = K([
1477
+ w("lit-gemini-prompt-node")
1478
+ ], Y);
1479
+ var Bt = Object.defineProperty, Mt = Object.getOwnPropertyDescriptor, T = (t, s, e, r) => {
1480
+ for (var o = r > 1 ? void 0 : r ? Mt(s, e) : s, i = t.length - 1, n; i >= 0; i--)
1481
+ (n = t[i]) && (o = (r ? n(s, e, o) : n(o)) || o);
1482
+ return r && o && Bt(s, e, o), o;
1472
1483
  };
1473
- let L = class extends P {
1484
+ let R = class extends x {
1474
1485
  constructor() {
1475
1486
  super(...arguments), this.nodeId = "", this._data = {}, this.imageUrl = "", this.status = "idle";
1476
1487
  }
@@ -1484,7 +1495,7 @@ let L = class extends P {
1484
1495
  return this._data;
1485
1496
  }
1486
1497
  render() {
1487
- return v`
1498
+ return m`
1488
1499
  <div class="gemini-node image-node" style="
1489
1500
  padding: 12px;
1490
1501
  background: var(--md-sys-color-surface-container-high);
@@ -1513,7 +1524,7 @@ let L = class extends P {
1513
1524
  overflow: hidden;
1514
1525
  border: 1px dashed var(--md-sys-color-outline);
1515
1526
  ">
1516
- ${this.status === "loading" ? v`<div style="font-size: 12px; color: var(--md-sys-color-outline);">Generating...</div>` : this.imageUrl ? v`<img src="${this.imageUrl}" style="width: 100%; height: 100%; object-fit: cover;" />` : v`<div style="font-size: 12px; color: var(--md-sys-color-outline);">No image generated</div>`}
1527
+ ${this.status === "loading" ? m`<div style="font-size: 12px; color: var(--md-sys-color-outline);">Generating...</div>` : this.imageUrl ? m`<img src="${this.imageUrl}" style="width: 100%; height: 100%; object-fit: cover;" />` : m`<div style="font-size: 12px; color: var(--md-sys-color-outline);">No image generated</div>`}
1517
1528
  </div>
1518
1529
 
1519
1530
  <lit-handle type="target" data-handlepos="${D.Top}" data-nodeid="${this.nodeId}"></lit-handle>
@@ -1521,32 +1532,287 @@ let L = class extends P {
1521
1532
  `;
1522
1533
  }
1523
1534
  };
1524
- H([
1535
+ T([
1525
1536
  d({ type: String, attribute: "data-id", reflect: !0 })
1526
- ], L.prototype, "nodeId", 2);
1527
- H([
1537
+ ], R.prototype, "nodeId", 2);
1538
+ T([
1528
1539
  d({ type: Object })
1529
- ], L.prototype, "data", 1);
1530
- H([
1540
+ ], R.prototype, "data", 1);
1541
+ T([
1542
+ d({ type: String })
1543
+ ], R.prototype, "imageUrl", 2);
1544
+ T([
1545
+ d({ type: String })
1546
+ ], R.prototype, "status", 2);
1547
+ R = T([
1548
+ w("lit-gemini-image-node")
1549
+ ], R);
1550
+ var jt = Object.defineProperty, At = Object.getOwnPropertyDescriptor, V = (t, s, e, r) => {
1551
+ for (var o = r > 1 ? void 0 : r ? At(s, e) : s, i = t.length - 1, n; i >= 0; i--)
1552
+ (n = t[i]) && (o = (r ? n(s, e, o) : n(o)) || o);
1553
+ return r && o && jt(s, e, o), o;
1554
+ };
1555
+ let E = class extends x {
1556
+ constructor() {
1557
+ super(...arguments), this.label = "", this.value = "", this.type = "default", this.icon = "📄";
1558
+ }
1559
+ render() {
1560
+ return m`
1561
+ ${this.icon ? m`<span class="icon">${this.icon}</span>` : ""}
1562
+ ${this.label ? m`<span class="label">${this.label}:</span>` : ""}
1563
+ <span class="value">${this.value || "..."}</span>
1564
+ `;
1565
+ }
1566
+ };
1567
+ E.styles = [
1568
+ Q,
1569
+ B`
1570
+ :host {
1571
+ display: inline-flex;
1572
+ align-items: center;
1573
+ gap: 6px;
1574
+ padding: 4px 10px;
1575
+ background: var(--md-sys-color-secondary-container);
1576
+ color: var(--md-sys-color-on-secondary-container);
1577
+ border-radius: 16px;
1578
+ font-family: var(--md-sys-typescale-body-medium-font);
1579
+ font-size: 11px;
1580
+ line-height: 1;
1581
+ border: 1px solid var(--md-sys-color-outline-variant);
1582
+ white-space: nowrap;
1583
+ user-select: none;
1584
+ }
1585
+
1586
+ .icon {
1587
+ font-size: 14px;
1588
+ }
1589
+
1590
+ .value {
1591
+ font-weight: 500;
1592
+ max-width: 120px;
1593
+ overflow: hidden;
1594
+ text-overflow: ellipsis;
1595
+ }
1596
+
1597
+ :host([type="generative"]) {
1598
+ background: #f3e5f5; /* Light Purple fallback */
1599
+ color: #4a148c;
1600
+ border-color: #ce93d8;
1601
+ }
1602
+
1603
+ :host([type="input"]) {
1604
+ background: var(--md-sys-color-primary-container);
1605
+ color: var(--md-sys-color-on-primary-container);
1606
+ }
1607
+ `
1608
+ ];
1609
+ V([
1610
+ d({ type: String })
1611
+ ], E.prototype, "label", 2);
1612
+ V([
1531
1613
  d({ type: String })
1532
- ], L.prototype, "imageUrl", 2);
1533
- H([
1614
+ ], E.prototype, "value", 2);
1615
+ V([
1616
+ d({ type: String, reflect: !0 })
1617
+ ], E.prototype, "type", 2);
1618
+ V([
1619
+ d({ type: String })
1620
+ ], E.prototype, "icon", 2);
1621
+ E = V([
1622
+ w("lit-chiclet")
1623
+ ], E);
1624
+ var Zt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, j = (t, s, e, r) => {
1625
+ for (var o = r > 1 ? void 0 : r ? Yt(s, e) : s, i = t.length - 1, n; i >= 0; i--)
1626
+ (n = t[i]) && (o = (r ? n(s, e, o) : n(o)) || o);
1627
+ return r && o && Zt(s, e, o), o;
1628
+ };
1629
+ let L = class extends x {
1630
+ constructor() {
1631
+ super(...arguments), this.label = "Node", this.inputSchema = { properties: {} }, this.outputSchema = { properties: {} }, this.data = {}, this.status = "idle";
1632
+ }
1633
+ createRenderRoot() {
1634
+ return this;
1635
+ }
1636
+ render() {
1637
+ const t = this.inputSchema?.properties && Object.keys(this.inputSchema.properties).length > 0 ? this.inputSchema : this.data?.inputSchema || { properties: {} }, s = this.outputSchema?.properties && Object.keys(this.outputSchema.properties).length > 0 ? this.outputSchema : this.data?.outputSchema || { properties: {} }, e = Object.entries(t.properties || {}), r = Object.entries(s.properties || {});
1638
+ return m`
1639
+ <style>
1640
+ :host {
1641
+ --md-sys-color-surface-container: #f3edf7;
1642
+ --md-sys-color-on-surface: #1b1b1f;
1643
+ --md-sys-color-outline: #74777f;
1644
+ --md-sys-color-surface-container-high: #ece6f0;
1645
+ --md-sys-color-outline-variant: #c4c6d0;
1646
+ --md-sys-color-on-surface-variant: #44474f;
1647
+ --md-sys-color-primary: #005ac1;
1648
+ --md-sys-color-error: #ba1a1a;
1649
+ --md-sys-shape-corner-medium: 12px;
1650
+ --md-sys-elevation-1: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);
1651
+ display: block;
1652
+ }
1653
+
1654
+ .node-container {
1655
+ display: flex;
1656
+ flex-direction: column;
1657
+ min-width: 200px;
1658
+ background: var(--md-sys-color-surface-container);
1659
+ color: var(--md-sys-color-on-surface);
1660
+ border: 1px solid var(--md-sys-color-outline);
1661
+ border-radius: var(--md-sys-shape-corner-medium);
1662
+ box-shadow: var(--md-sys-elevation-1);
1663
+ box-sizing: border-box;
1664
+ position: relative;
1665
+ transition: border-color 0.2s, box-shadow 0.2s;
1666
+ }
1667
+
1668
+ .node-container.working {
1669
+ border-color: var(--md-sys-color-primary);
1670
+ box-shadow: 0 0 8px rgba(0, 90, 193, 0.4);
1671
+ }
1672
+
1673
+ .node-container.error {
1674
+ border-color: var(--md-sys-color-error);
1675
+ }
1676
+
1677
+ /* Selected state style injection from parent would be needed, or we check attribute manually */
1678
+ :host([selected]) .node-container {
1679
+ border: 2px solid var(--md-sys-color-primary);
1680
+ margin: -1px;
1681
+ }
1682
+
1683
+ .header {
1684
+ background: var(--md-sys-color-surface-container-high);
1685
+ padding: 12px 16px;
1686
+ font-weight: 500;
1687
+ border-bottom: 1px solid var(--md-sys-color-outline-variant);
1688
+ display: flex;
1689
+ align-items: center;
1690
+ gap: 8px;
1691
+ border-radius: var(--md-sys-shape-corner-medium) var(--md-sys-shape-corner-medium) 0 0;
1692
+ margin: 0;
1693
+ }
1694
+
1695
+ .content {
1696
+ padding: 16px;
1697
+ display: flex;
1698
+ flex-direction: column;
1699
+ gap: 12px;
1700
+ }
1701
+
1702
+ .port {
1703
+ position: relative;
1704
+ display: flex;
1705
+ align-items: center;
1706
+ min-height: 24px;
1707
+ width: 100%;
1708
+ }
1709
+
1710
+ .port.input {
1711
+ justify-content: flex-start;
1712
+ }
1713
+
1714
+ .port.output {
1715
+ justify-content: flex-end;
1716
+ }
1717
+
1718
+ /* Handle Positioning */
1719
+ lit-handle {
1720
+ position: absolute;
1721
+ z-index: 10;
1722
+ }
1723
+
1724
+ .port.input lit-handle {
1725
+ left: -22px !important;
1726
+ top: 50%;
1727
+ transform: translateY(-50%);
1728
+ }
1729
+
1730
+ .port.output lit-handle {
1731
+ left: auto !important;
1732
+ right: -22px !important;
1733
+ top: 50%;
1734
+ transform: translateY(-50%);
1735
+ }
1736
+
1737
+ label {
1738
+ font-size: 12px;
1739
+ color: var(--md-sys-color-on-surface-variant);
1740
+ pointer-events: none;
1741
+ }
1742
+ </style>
1743
+ <div class="node-container ${this.status}">
1744
+ <div class="header">
1745
+ <span class="icon">🧩</span>
1746
+ <span>${this.data?.label || this.label}</span>
1747
+ </div>
1748
+ <div class="content">
1749
+ ${e.length > 0 ? m`
1750
+ <div class="inputs">
1751
+ ${ot(e, ([o, i]) => m`
1752
+ <div class="port input">
1753
+ <lit-handle type="target" position="left" data-handleid="${o}" id="${o}"></lit-handle>
1754
+ ${this.data?.[o] ? m`<lit-chiclet
1755
+ type="input"
1756
+ .label="${i.title || o}"
1757
+ .value="${this.data[o]}"
1758
+ icon="${i.behavior?.includes("llm-content") ? "✨" : "📄"}"
1759
+ ></lit-chiclet>` : m`<label>${i.title || o}</label>`}
1760
+ </div>
1761
+ `)}
1762
+ </div>
1763
+ ` : ""}
1764
+
1765
+ ${r.length > 0 ? m`
1766
+ <div class="outputs">
1767
+ ${ot(r, ([o, i]) => m`
1768
+ <div class="port output">
1769
+ ${this.data?.[o] ? m`<lit-chiclet
1770
+ type="generative"
1771
+ .label="${i.title || o}"
1772
+ .value="${this.data[o]}"
1773
+ icon="🪄"
1774
+ ></lit-chiclet>` : m`<label>${i.title || o}</label>`}
1775
+ <lit-handle type="source" position="right" data-handleid="${o}" id="${o}"></lit-handle>
1776
+ </div>
1777
+ `)}
1778
+ </div>
1779
+ ` : ""}
1780
+ </div>
1781
+ </div>
1782
+ `;
1783
+ }
1784
+ };
1785
+ j([
1786
+ d({ type: String })
1787
+ ], L.prototype, "label", 2);
1788
+ j([
1789
+ d({ type: Object })
1790
+ ], L.prototype, "inputSchema", 2);
1791
+ j([
1792
+ d({ type: Object })
1793
+ ], L.prototype, "outputSchema", 2);
1794
+ j([
1795
+ d({ type: Object })
1796
+ ], L.prototype, "data", 2);
1797
+ j([
1534
1798
  d({ type: String })
1535
1799
  ], L.prototype, "status", 2);
1536
- L = H([
1537
- O("lit-gemini-image-node")
1800
+ L = j([
1801
+ w("lit-schema-node")
1538
1802
  ], L);
1539
1803
  export {
1540
- Y as LitControls,
1541
- w as LitEdge,
1542
- f as LitFlow,
1543
- L as LitGeminiImageNode,
1544
- M as LitGeminiPromptNode,
1545
- E as LitHandle,
1546
- x as LitMinimap,
1547
- $ as LitNode,
1548
- T as LitSidebar,
1549
- ft as createInitialState,
1550
- J as m3Tokens
1804
+ E as LitChiclet,
1805
+ U as LitControls,
1806
+ $ as LitEdge,
1807
+ y as LitFlow,
1808
+ R as LitGeminiImageNode,
1809
+ Y as LitGeminiPromptNode,
1810
+ N as LitHandle,
1811
+ O as LitMinimap,
1812
+ P as LitNode,
1813
+ L as LitSchemaNode,
1814
+ W as LitSidebar,
1815
+ bt as createInitialState,
1816
+ Q as m3Tokens
1551
1817
  };
1552
1818
  //# sourceMappingURL=litflow.js.map