@babsey/code-graph 0.1.0 → 0.1.1

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,11 +1,11 @@
1
- import { AbstractNode as We, sortTopologically as Ne, NodeInterface as Xe, displayInSidebar as Me, NodeInterfaceType as R, BaklavaInterfaceTypes as qe, CheckboxInterfaceComponent as Je, setType as S, IntegerInterfaceComponent as Ye, TextInputInterfaceComponent as $e, NumberInterfaceComponent as Qe, SelectInterfaceComponent as Ke, SliderInterfaceComponent as Ze, TextareaInputInterfaceComponent as et, allowMultipleConnections as K, IntegerInterface as tt, TextInputInterface as st, useViewModel as q, useTemporaryConnection as nt, Components as ke, useGraph as ae, GRAPH_NODE_TYPE_PREFIX as se, useTransform as ot, useNodeCategories as at, BaklavaEditor as it, DEFAULT_TOOLBAR_COMMANDS as rt, useBaklava as lt, DependencyEngine as dt, applyResult as ut } from "baklavajs";
1
+ import { AbstractNode as We, sortTopologically as Ne, NodeInterface as Xe, displayInSidebar as $e, NodeInterfaceType as R, BaklavaInterfaceTypes as qe, CheckboxInterfaceComponent as Je, setType as z, IntegerInterfaceComponent as Ye, TextInputInterfaceComponent as Me, NumberInterfaceComponent as Qe, SelectInterfaceComponent as Ke, SliderInterfaceComponent as Ze, TextareaInputInterfaceComponent as et, allowMultipleConnections as K, IntegerInterface as tt, TextInputInterface as st, useViewModel as q, useTemporaryConnection as nt, Components as ke, useGraph as ae, GRAPH_NODE_TYPE_PREFIX as se, useTransform as ot, useNodeCategories as at, BaklavaEditor as it, DEFAULT_TOOLBAR_COMMANDS as rt, useBaklava as lt, DependencyEngine as dt, applyResult as ut } from "baklavajs";
2
2
  import Z from "mustache";
3
- import { reactive as P, defineComponent as U, createElementBlock as r, openBlock as i, toDisplayString as j, markRaw as E, computed as b, createElementVNode as l, withDirectives as ee, vModelText as te, ref as B, onMounted as ie, onUpdated as Oe, normalizeClass as G, createCommentVNode as I, unref as _, renderSlot as W, createStaticVNode as J, onBeforeUnmount as ct, normalizeStyle as re, withModifiers as A, createBlock as O, Fragment as T, createTextVNode as pt, createVNode as z, withKeys as ne, renderList as D, nextTick as ht, toRef as Te, resolveDynamicComponent as Ce, inject as vt, Transition as mt, withCtx as F, onUnmounted as ft, normalizeProps as gt, guardReactiveProps as bt, mergeProps as yt } from "vue";
3
+ import { reactive as H, defineComponent as U, createElementBlock as l, openBlock as i, toDisplayString as j, markRaw as E, computed as b, createElementVNode as r, withDirectives as ee, vModelText as te, ref as V, onMounted as ie, onUpdated as Oe, normalizeClass as G, createCommentVNode as I, unref as _, renderSlot as W, createStaticVNode as J, onBeforeUnmount as ct, normalizeStyle as re, withModifiers as A, createBlock as O, Fragment as T, createTextVNode as pt, createVNode as S, withKeys as ne, renderList as P, nextTick as ht, toRef as Te, resolveDynamicComponent as we, inject as vt, Transition as mt, withCtx as F, onUnmounted as ft, normalizeProps as gt, guardReactiveProps as bt, mergeProps as yt } from "vue";
4
4
  import _t from "toposort";
5
5
  import { v4 as kt } from "uuid";
6
- import { usePointer as Ct } from "@vueuse/core";
6
+ import { usePointer as wt } from "@vueuse/core";
7
7
  Z.escape = (s) => s;
8
- class wt extends We {
8
+ class Ct extends We {
9
9
  state;
10
10
  code;
11
11
  isCodeNode = !0;
@@ -14,7 +14,7 @@ class wt extends We {
14
14
  inputs = {};
15
15
  outputs = {};
16
16
  constructor() {
17
- super(), this.initializeIo(), this.width = 400, this.twoColumn = !0, this.state = P({
17
+ super(), this.initializeIo(), this.width = 400, this.twoColumn = !0, this.state = H({
18
18
  codeTemplate: "",
19
19
  hidden: !1,
20
20
  integrated: !1,
@@ -176,7 +176,7 @@ class wt extends We {
176
176
  this.state.props = e;
177
177
  }
178
178
  }
179
- class Ee extends wt {
179
+ class Ee extends Ct {
180
180
  /**
181
181
  * The default implementation does nothing.
182
182
  * Overwrite this method to do calculation.
@@ -186,7 +186,7 @@ class Ee extends wt {
186
186
  */
187
187
  calculate;
188
188
  load(e) {
189
- super.load(e), Ve(this.graph, e);
189
+ super.load(e), Be(this.graph, e);
190
190
  }
191
191
  save() {
192
192
  const e = super.save();
@@ -208,7 +208,7 @@ const xt = (s, e = !0) => {
208
208
  const d = e && t.length < n.indexOf(o) ? `${o}=` : "";
209
209
  t.push(`${d}{{ inputs.${o} }}`);
210
210
  }), t;
211
- }, Ve = (s, e) => {
211
+ }, Be = (s, e) => {
212
212
  if (!s) return;
213
213
  const t = s.findNodeById(e.id);
214
214
  if (!t || t.subgraph) return;
@@ -234,18 +234,18 @@ const xt = (s, e = !0) => {
234
234
  intf: {}
235
235
  },
236
236
  setup(s) {
237
- return (e, t) => (i(), r("div", {
237
+ return (e, t) => (i(), l("div", {
238
238
  title: s.intf.state?.script
239
239
  }, j(s.intf.name), 9, Nt));
240
240
  }
241
241
  });
242
- class H extends Xe {
242
+ class D extends Xe {
243
243
  isCodeNode = !0;
244
244
  code;
245
245
  state;
246
246
  type = null;
247
247
  constructor(e, t) {
248
- super(e, t), this.setComponent(E(le)), this.state = P({
248
+ super(e, t), this.setComponent(E(le)), this.state = H({
249
249
  optional: !1,
250
250
  script: ""
251
251
  });
@@ -264,12 +264,12 @@ class H extends Xe {
264
264
  }
265
265
  getValue = () => `${this.value ?? "None"}`;
266
266
  }
267
- const yn = (s, e) => {
267
+ const In = (s, e) => {
268
268
  s.state.optional = e, s.setHidden(e);
269
269
  };
270
- class Y extends H {
270
+ class Y extends D {
271
271
  constructor(e = "", t) {
272
- super(e, t), this.setComponent(E(le)), this.use(Me, !0);
272
+ super(e, t), this.setComponent(E(le)), this.use($e, !0);
273
273
  }
274
274
  set script(e) {
275
275
  if (this.state.script && this.allowMultipleConnections) {
@@ -285,16 +285,16 @@ class Y extends H {
285
285
  super.value = e, this.name !== "_node" && this.setHidden(!1);
286
286
  }
287
287
  }
288
- const Be = new R("boolean"), Mt = new R("dict"), Se = new R("list"), X = new R("node"), de = new R("number"), ue = new R("string"), ze = new R("tuple"), _n = (s) => {
289
- new qe(s.editor, { viewPlugin: s }).addTypes(Be, Mt, Se, X, de, ue, ze);
288
+ const Ve = new R("boolean"), $t = new R("dict"), ze = new R("list"), X = new R("node"), de = new R("number"), ue = new R("string"), Se = new R("tuple"), Nn = (s) => {
289
+ new qe(s.editor, { viewPlugin: s }).addTypes(Ve, $t, ze, X, de, ue, Se);
290
290
  };
291
- class kn extends Y {
291
+ class $n extends Y {
292
292
  constructor(e, t) {
293
- super(e, t), this.setComponent(E(Je)), this.use(S, Be);
293
+ super(e, t), this.setComponent(E(Je)), this.use(z, Ve);
294
294
  }
295
295
  getValue = () => this.value ? "True" : "False";
296
296
  }
297
- class $t extends H {
297
+ class Mt extends D {
298
298
  isCodeNodeOutput = !0;
299
299
  constructor(e = "", t = "") {
300
300
  super(e, t), this.setComponent(E(le));
@@ -307,41 +307,41 @@ class ce extends Y {
307
307
  min;
308
308
  max;
309
309
  constructor(e, t, n, o) {
310
- super(e, t), this.min = n, this.max = o, this.use(S, de);
310
+ super(e, t), this.min = n, this.max = o, this.use(z, de);
311
311
  }
312
312
  validate(e) {
313
313
  return (this.min === void 0 || e >= this.min) && (this.max === void 0 || e <= this.max);
314
314
  }
315
315
  }
316
- class Cn extends ce {
316
+ class Mn extends ce {
317
317
  component = E(Ye);
318
318
  validate(e) {
319
319
  return Number.isInteger(e) && super.validate(e);
320
320
  }
321
321
  }
322
- class wn extends Y {
322
+ class On extends Y {
323
323
  constructor(e = "", t = "") {
324
- super(e, t), this.setComponent(E($e)), this.use(S, Se);
324
+ super(e, t), this.setComponent(E(Me)), this.use(z, ze);
325
325
  }
326
326
  getValue = () => `[${this.value}]`;
327
327
  }
328
- class xn extends ce {
328
+ class Tn extends ce {
329
329
  component = E(Qe);
330
330
  }
331
331
  class pe extends Y {
332
332
  constructor(e, t) {
333
- super(e, t), this.use(S, ue);
333
+ super(e, t), this.use(z, ue);
334
334
  }
335
335
  getValue = () => `"${this.value}"`;
336
336
  }
337
- class In extends pe {
337
+ class En extends pe {
338
338
  component = E(Ke);
339
339
  items;
340
340
  constructor(e, t, n) {
341
341
  super(e, t), this.items = n;
342
342
  }
343
343
  }
344
- class Nn extends ce {
344
+ class Bn extends ce {
345
345
  component = E(Ze);
346
346
  min;
347
347
  max;
@@ -370,40 +370,40 @@ const Ot = U({
370
370
  }
371
371
  }) };
372
372
  }
373
- }), $ = (s, e) => {
373
+ }), N = (s, e) => {
374
374
  const t = s.__vccOpts || s;
375
375
  for (const [n, o] of e)
376
376
  t[n] = o;
377
377
  return t;
378
- }, Tt = { style: { position: "relative" } }, Et = { style: { "font-size": "12px", padding: "0 6px", position: "absolute", top: "-8px", "background-color": "var(--baklava-node-color-background)" } }, Vt = ["placeholder", "title"];
379
- function Bt(s, e, t, n, o, a) {
380
- return i(), r("div", Tt, [
381
- l("label", Et, j(s.intf.name), 1),
382
- ee(l("input", {
378
+ }, Tt = { style: { position: "relative" } }, Et = { style: { "font-size": "12px", padding: "0 6px", position: "absolute", top: "-8px", "background-color": "var(--baklava-node-color-background)" } }, Bt = ["placeholder", "title"];
379
+ function Vt(s, e, t, n, o, a) {
380
+ return i(), l("div", Tt, [
381
+ r("label", Et, j(s.intf.name), 1),
382
+ ee(r("input", {
383
383
  "onUpdate:modelValue": e[0] || (e[0] = (d) => s.v = d),
384
384
  type: "text",
385
385
  class: "baklava-input",
386
386
  placeholder: s.intf.name,
387
387
  title: s.intf.name
388
- }, null, 8, Vt), [
388
+ }, null, 8, Bt), [
389
389
  [te, s.v]
390
390
  ])
391
391
  ]);
392
392
  }
393
- const St = /* @__PURE__ */ $(Ot, [["render", Bt]]);
394
- class Mn extends pe {
395
- component = E(St);
393
+ const zt = /* @__PURE__ */ N(Ot, [["render", Vt]]);
394
+ class Vn extends pe {
395
+ component = E(zt);
396
396
  }
397
- class $n extends pe {
397
+ class zn extends pe {
398
398
  component = E(et);
399
399
  }
400
- class On extends Y {
400
+ class Sn extends Y {
401
401
  constructor(e = "", t = "") {
402
- super(e, t), this.setComponent(E($e)), this.use(S, ze);
402
+ super(e, t), this.setComponent(E(Me)), this.use(z, Se);
403
403
  }
404
404
  getValue = () => `(${this.value})`;
405
405
  }
406
- function Tn(s) {
406
+ function jn(s) {
407
407
  return class extends Ee {
408
408
  type = s.type;
409
409
  inputs = {};
@@ -411,10 +411,10 @@ function Tn(s) {
411
411
  constructor() {
412
412
  super(), this._title = s.title ?? s.type, this.name = s.name ?? s.type, this.updateModules(s.modules), s.variableName && (this.state.variableName = s.variableName), s.codeTemplate && (this.codeTemplate = s.codeTemplate), this.addInput(
413
413
  "_node",
414
- new H("", []).use(S, X).use(K).setHidden(!0)
414
+ new D("", []).use(z, X).use(K).setHidden(!0)
415
415
  ), this.addOutput(
416
416
  "_node",
417
- new H("", []).use(S, X).use(K).setHidden(!0)
417
+ new D("", []).use(z, X).use(K).setHidden(!0)
418
418
  ), this.executeFactory("input", s.inputs), this.executeFactory("output", s.outputs), s.onCreate?.call(this);
419
419
  }
420
420
  // public calculate = definition.calculate
@@ -446,7 +446,7 @@ function Tn(s) {
446
446
  }
447
447
  };
448
448
  }
449
- class zt extends Ee {
449
+ class St extends Ee {
450
450
  /**
451
451
  * The default implementation does nothing.
452
452
  * Overwrite this method to do calculation.
@@ -456,8 +456,8 @@ class zt extends Ee {
456
456
  */
457
457
  calculate;
458
458
  }
459
- function En(s) {
460
- return class extends zt {
459
+ function Ln(s) {
460
+ return class extends St {
461
461
  type = s.type;
462
462
  inputs = {};
463
463
  outputs = {};
@@ -468,10 +468,10 @@ function En(s) {
468
468
  constructor() {
469
469
  super(), this._title = s.title ?? s.type, this.name = s.name ?? s.type, this.updateModules(s.modules), s.codeTemplate && (this.codeTemplate = s.codeTemplate), s.variableName && (this.state.variableName = s.variableName), this.addInput(
470
470
  "_node",
471
- new H("", []).use(S, X).use(K).setHidden(!0)
471
+ new D("", []).use(z, X).use(K).setHidden(!0)
472
472
  ), this.addOutput(
473
473
  "_node",
474
- new H("", []).use(S, X).use(K).setHidden(!0)
474
+ new D("", []).use(z, X).use(K).setHidden(!0)
475
475
  ), this.staticInputKeys.push("_node"), this.staticOutputKeys.push("_node"), this.executeFactory("input", s.inputs), this.executeFactory("output", s.outputs), s.onCreate?.call(this);
476
476
  }
477
477
  onPlaced() {
@@ -503,19 +503,19 @@ function En(s) {
503
503
  if (!this.inputs[t]) {
504
504
  const n = e.inputs[t].value;
505
505
  let o;
506
- typeof n == "number" ? o = new tt(t, n).use(S, de) : o = new st(t, JSON.stringify(n)).use(S, ue), o.use(Me, !0), this.addInput(t, o);
506
+ typeof n == "number" ? o = new tt(t, n).use(z, de) : o = new st(t, JSON.stringify(n)).use(z, ue), o.use($e, !0), this.addInput(t, o);
507
507
  }
508
508
  this.inputs[t] && (this.inputs[t].load(e.inputs[t]), this.inputs[t].nodeId = this.id);
509
509
  }
510
510
  for (const t of Object.keys(e.outputs))
511
511
  if (!this.staticOutputKeys.includes(t)) {
512
512
  if (!this.outputs[t]) {
513
- const n = new $t(t);
513
+ const n = new Mt(t);
514
514
  this.addOutput(t, n);
515
515
  }
516
516
  this.outputs[t] && (this.outputs[t].load(e.outputs[t]), this.outputs[t].nodeId = this.id);
517
517
  }
518
- Ve(this.graph, e), this.preventUpdate = !1, this.events.loaded.emit(this);
518
+ Be(this.graph, e), this.preventUpdate = !1, this.events.loaded.emit(this);
519
519
  }
520
520
  onUpdate() {
521
521
  if (this.preventUpdate) return;
@@ -556,7 +556,7 @@ class jt {
556
556
  _viewModel;
557
557
  _state;
558
558
  constructor(e) {
559
- this._id = kt(), this._viewModel = e, this._state = P({
559
+ this._id = kt(), this._viewModel = e, this._state = H({
560
560
  autosort: !1,
561
561
  lockCode: !1,
562
562
  modules: {},
@@ -780,13 +780,13 @@ const oe = (s) => {
780
780
  return s.nodes.forEach((t) => {
781
781
  t.subgraph ? e = e.concat(oe(t.subgraph)) : t.isCodeNode && e.push(t);
782
782
  }), e;
783
- }, Vn = (s = 0, e = 100) => ({
783
+ }, Un = (s = 0, e = 100) => ({
784
784
  x: s * 420,
785
785
  y: e
786
- }), Bn = (s) => {
786
+ }), Gn = (s) => {
787
787
  const e = { ...s.position };
788
788
  return e.x -= 440, e.y += 50, e;
789
- }, Sn = (s) => {
789
+ }, Rn = (s) => {
790
790
  const { calculationOrder: e, connectionsFromNode: t } = Ne(s);
791
791
  e.forEach((n) => {
792
792
  if (!n.isCodeNode) return;
@@ -795,40 +795,62 @@ const oe = (s) => {
795
795
  a.to.state && a.from.script && (a.to.state.script = a.from.script);
796
796
  });
797
797
  });
798
- }, Lt = ["id"], Ut = { class: "align-middle" }, we = /* @__PURE__ */ U({
798
+ }, Lt = ["id"], Ut = { class: "align-middle" }, Ce = /* @__PURE__ */ U({
799
799
  __name: "CodeGraphNodeInterface",
800
800
  props: {
801
801
  node: {},
802
802
  intf: {}
803
803
  },
804
804
  setup(s) {
805
- const e = s, { viewModel: t } = q(), { hoveredOver: n, temporaryConnection: o } = nt(), a = B(null), d = b(() => e.intf.connectionCount > 0), u = b(() => ({
805
+ const e = s, { viewModel: t } = q(), { hoveredOver: n, temporaryConnection: o } = nt(), a = V(null), d = b(() => e.intf.connectionCount > 0), u = b(() => ({
806
806
  "--connected": d.value
807
807
  })), v = () => {
808
808
  n(e.intf);
809
809
  }, k = () => {
810
810
  n(void 0);
811
- }, w = () => {
811
+ }, C = () => {
812
812
  a.value && t.value.hooks.renderInterface.execute({ intf: e.intf, el: a.value });
813
813
  };
814
- return ie(w), Oe(w), (V, L) => (i(), r("div", {
814
+ return ie(C), Oe(C), (B, L) => (i(), l("div", {
815
815
  id: s.intf.id,
816
816
  ref_key: "el",
817
817
  ref: a,
818
818
  class: G(["baklava-node-interface", u.value])
819
819
  }, [
820
- s.intf.port ? (i(), r("div", {
820
+ s.intf.port ? (i(), l("div", {
821
821
  key: 0,
822
822
  class: G(["__port", { "--selected": _(o)?.from === s.intf }]),
823
823
  onPointerover: v,
824
824
  onPointerout: k
825
825
  }, null, 34)) : I("", !0),
826
- l("span", Ut, [
827
- W(V.$slots, "default")
826
+ r("span", Ut, [
827
+ W(B.$slots, "default")
828
828
  ])
829
829
  ], 10, Lt));
830
830
  }
831
831
  }), Gt = {}, Rt = {
832
+ xmlns: "http://www.w3.org/2000/svg",
833
+ width: "24",
834
+ height: "24",
835
+ viewBox: "0 0 24 24",
836
+ fill: "none",
837
+ stroke: "currentColor",
838
+ "stroke-width": "2",
839
+ "stroke-linecap": "round",
840
+ "stroke-linejoin": "round",
841
+ class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-check"
842
+ };
843
+ function Ht(s, e) {
844
+ return i(), l("svg", Rt, [...e[0] || (e[0] = [
845
+ r("path", {
846
+ stroke: "none",
847
+ d: "M0 0h24v24H0z",
848
+ fill: "none"
849
+ }, null, -1),
850
+ r("path", { d: "M5 12l5 5l10 -10" }, null, -1)
851
+ ])]);
852
+ }
853
+ const Hn = /* @__PURE__ */ N(Gt, [["render", Ht]]), Pt = {}, Dt = {
832
854
  xmlns: "http://www.w3.org/2000/svg",
833
855
  width: "24",
834
856
  height: "24",
@@ -840,17 +862,40 @@ const oe = (s) => {
840
862
  "stroke-linejoin": "round",
841
863
  class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-code-variable"
842
864
  };
843
- function Pt(s, e) {
844
- return i(), r("svg", Rt, [...e[0] || (e[0] = [
845
- l("path", {
865
+ function At(s, e) {
866
+ return i(), l("svg", Dt, [...e[0] || (e[0] = [
867
+ r("path", {
868
+ stroke: "none",
869
+ d: "M0 0h24v24H0z",
870
+ fill: "none"
871
+ }, null, -1),
872
+ r("path", { d: "M4 8m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z" }, null, -1)
873
+ ])]);
874
+ }
875
+ const Ft = /* @__PURE__ */ N(Pt, [["render", At]]), Wt = {}, Xt = {
876
+ xmlns: "http://www.w3.org/2000/svg",
877
+ width: "24",
878
+ height: "24",
879
+ viewBox: "0 0 24 24",
880
+ fill: "none",
881
+ stroke: "currentColor",
882
+ "stroke-width": "2",
883
+ "stroke-linecap": "round",
884
+ "stroke-linejoin": "round",
885
+ class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-copy"
886
+ };
887
+ function qt(s, e) {
888
+ return i(), l("svg", Xt, [...e[0] || (e[0] = [
889
+ r("path", {
846
890
  stroke: "none",
847
891
  d: "M0 0h24v24H0z",
848
892
  fill: "none"
849
893
  }, null, -1),
850
- l("path", { d: "M4 8m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z" }, null, -1)
894
+ r("path", { d: "M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z" }, null, -1),
895
+ r("path", { d: "M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1" }, null, -1)
851
896
  ])]);
852
897
  }
853
- const Dt = /* @__PURE__ */ $(Gt, [["render", Pt]]), Ht = {}, At = {
898
+ const Pn = /* @__PURE__ */ N(Wt, [["render", qt]]), Jt = {}, Yt = {
854
899
  xmlns: "http://www.w3.org/2000/svg",
855
900
  width: "24",
856
901
  height: "24",
@@ -862,19 +907,19 @@ const Dt = /* @__PURE__ */ $(Gt, [["render", Pt]]), Ht = {}, At = {
862
907
  "stroke-linejoin": "round",
863
908
  class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-dots-vertical"
864
909
  };
865
- function Ft(s, e) {
866
- return i(), r("svg", At, [...e[0] || (e[0] = [
867
- l("path", {
910
+ function Qt(s, e) {
911
+ return i(), l("svg", Yt, [...e[0] || (e[0] = [
912
+ r("path", {
868
913
  stroke: "none",
869
914
  d: "M0 0h24v24H0z",
870
915
  fill: "none"
871
916
  }, null, -1),
872
- l("path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1),
873
- l("path", { d: "M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1),
874
- l("path", { d: "M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1)
917
+ r("path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1),
918
+ r("path", { d: "M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1),
919
+ r("path", { d: "M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1)
875
920
  ])]);
876
921
  }
877
- const Wt = /* @__PURE__ */ $(Ht, [["render", Ft]]), Xt = {}, qt = {
922
+ const Kt = /* @__PURE__ */ N(Jt, [["render", Qt]]), Zt = {}, es = {
878
923
  xmlns: "http://www.w3.org/2000/svg",
879
924
  width: "24",
880
925
  height: "24",
@@ -882,17 +927,17 @@ const Wt = /* @__PURE__ */ $(Ht, [["render", Ft]]), Xt = {}, qt = {
882
927
  fill: "currentColor",
883
928
  class: "baklava-icon icon icon-tabler icons-tabler-filled icon-tabler-layout-sidebar-left-collapse"
884
929
  };
885
- function Jt(s, e) {
886
- return i(), r("svg", qt, [...e[0] || (e[0] = [
887
- l("path", {
930
+ function ts(s, e) {
931
+ return i(), l("svg", es, [...e[0] || (e[0] = [
932
+ r("path", {
888
933
  stroke: "none",
889
934
  d: "M0 0h24v24H0z",
890
935
  fill: "none"
891
936
  }, null, -1),
892
- l("path", { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm0 2h-9v14h9a1 1 0 0 0 .993 -.883l.007 -.117v-12a1 1 0 0 0 -.883 -.993l-.117 -.007zm-2.293 4.293a1 1 0 0 1 .083 1.32l-.083 .094l-1.292 1.293l1.292 1.293a1 1 0 0 1 .083 1.32l-.083 .094a1 1 0 0 1 -1.32 .083l-.094 -.083l-2 -2a1 1 0 0 1 -.083 -1.32l.083 -.094l2 -2a1 1 0 0 1 1.414 0z" }, null, -1)
937
+ r("path", { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm0 2h-9v14h9a1 1 0 0 0 .993 -.883l.007 -.117v-12a1 1 0 0 0 -.883 -.993l-.117 -.007zm-2.293 4.293a1 1 0 0 1 .083 1.32l-.083 .094l-1.292 1.293l1.292 1.293a1 1 0 0 1 .083 1.32l-.083 .094a1 1 0 0 1 -1.32 .083l-.094 -.083l-2 -2a1 1 0 0 1 -.083 -1.32l.083 -.094l2 -2a1 1 0 0 1 1.414 0z" }, null, -1)
893
938
  ])]);
894
939
  }
895
- const Yt = /* @__PURE__ */ $(Xt, [["render", Jt]]), Qt = {}, Kt = {
940
+ const ss = /* @__PURE__ */ N(Zt, [["render", ts]]), ns = {}, os = {
896
941
  xmlns: "http://www.w3.org/2000/svg",
897
942
  width: "24",
898
943
  height: "24",
@@ -900,17 +945,17 @@ const Yt = /* @__PURE__ */ $(Xt, [["render", Jt]]), Qt = {}, Kt = {
900
945
  fill: "currentColor",
901
946
  class: "baklava-icon icon icon-tabler icons-tabler-filled icon-tabler-layout-sidebar-left-expand"
902
947
  };
903
- function Zt(s, e) {
904
- return i(), r("svg", Kt, [...e[0] || (e[0] = [
905
- l("path", {
948
+ function as(s, e) {
949
+ return i(), l("svg", os, [...e[0] || (e[0] = [
950
+ r("path", {
906
951
  stroke: "none",
907
952
  d: "M0 0h24v24H0z",
908
953
  fill: "none"
909
954
  }, null, -1),
910
- l("path", { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm0 2h-9v14h9a1 1 0 0 0 .993 -.883l.007 -.117v-12a1 1 0 0 0 -.883 -.993l-.117 -.007zm-4.387 4.21l.094 .083l2 2a1 1 0 0 1 .083 1.32l-.083 .094l-2 2a1 1 0 0 1 -1.497 -1.32l.083 -.094l1.292 -1.293l-1.292 -1.293a1 1 0 0 1 -.083 -1.32l.083 -.094a1 1 0 0 1 1.32 -.083z" }, null, -1)
955
+ r("path", { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm0 2h-9v14h9a1 1 0 0 0 .993 -.883l.007 -.117v-12a1 1 0 0 0 -.883 -.993l-.117 -.007zm-4.387 4.21l.094 .083l2 2a1 1 0 0 1 .083 1.32l-.083 .094l-2 2a1 1 0 0 1 -1.497 -1.32l.083 -.094l1.292 -1.293l-1.292 -1.293a1 1 0 0 1 -.083 -1.32l.083 -.094a1 1 0 0 1 1.32 -.083z" }, null, -1)
911
956
  ])]);
912
957
  }
913
- const es = /* @__PURE__ */ $(Qt, [["render", Zt]]), ts = {}, ss = {
958
+ const is = /* @__PURE__ */ N(ns, [["render", as]]), rs = {}, ls = {
914
959
  xmlns: "http://www.w3.org/2000/svg",
915
960
  width: "24",
916
961
  height: "24",
@@ -918,17 +963,17 @@ const es = /* @__PURE__ */ $(Qt, [["render", Zt]]), ts = {}, ss = {
918
963
  fill: "currentColor",
919
964
  class: "baklava-icon icon icon-tabler icons-tabler-filled icon-tabler-layout-sidebar-right"
920
965
  };
921
- function ns(s, e) {
922
- return i(), r("svg", ss, [...e[0] || (e[0] = [
923
- l("path", {
966
+ function ds(s, e) {
967
+ return i(), l("svg", ls, [...e[0] || (e[0] = [
968
+ r("path", {
924
969
  stroke: "none",
925
970
  d: "M0 0h24v24H0z",
926
971
  fill: "none"
927
972
  }, null, -1),
928
- l("path", { d: "M6 21a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3zm8 -16h-8a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h8z" }, null, -1)
973
+ r("path", { d: "M6 21a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3zm8 -16h-8a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h8z" }, null, -1)
929
974
  ])]);
930
975
  }
931
- const os = /* @__PURE__ */ $(ts, [["render", ns]]), as = {}, is = {
976
+ const us = /* @__PURE__ */ N(rs, [["render", ds]]), cs = {}, ps = {
932
977
  xmlns: "http://www.w3.org/2000/svg",
933
978
  width: "24",
934
979
  height: "24",
@@ -936,17 +981,17 @@ const os = /* @__PURE__ */ $(ts, [["render", ns]]), as = {}, is = {
936
981
  fill: "currentColor",
937
982
  class: "baklava-icon icon icon-tabler icons-tabler-filled icon-tabler-layout-sidebar-right-collapse"
938
983
  };
939
- function rs(s, e) {
940
- return i(), r("svg", is, [...e[0] || (e[0] = [
941
- l("path", {
984
+ function hs(s, e) {
985
+ return i(), l("svg", ps, [...e[0] || (e[0] = [
986
+ r("path", {
942
987
  stroke: "none",
943
988
  d: "M0 0h24v24H0z",
944
989
  fill: "none"
945
990
  }, null, -1),
946
- l("path", { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm-3 2h-9a1 1 0 0 0 -.993 .883l-.007 .117v12a1 1 0 0 0 .883 .993l.117 .007h9v-14zm-5.387 4.21l.094 .083l2 2a1 1 0 0 1 .083 1.32l-.083 .094l-2 2a1 1 0 0 1 -1.497 -1.32l.083 -.094l1.292 -1.293l-1.292 -1.293a1 1 0 0 1 -.083 -1.32l.083 -.094a1 1 0 0 1 1.32 -.083z" }, null, -1)
991
+ r("path", { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm-3 2h-9a1 1 0 0 0 -.993 .883l-.007 .117v12a1 1 0 0 0 .883 .993l.117 .007h9v-14zm-5.387 4.21l.094 .083l2 2a1 1 0 0 1 .083 1.32l-.083 .094l-2 2a1 1 0 0 1 -1.497 -1.32l.083 -.094l1.292 -1.293l-1.292 -1.293a1 1 0 0 1 -.083 -1.32l.083 -.094a1 1 0 0 1 1.32 -.083z" }, null, -1)
947
992
  ])]);
948
993
  }
949
- const ls = /* @__PURE__ */ $(as, [["render", rs]]), ds = {}, us = {
994
+ const vs = /* @__PURE__ */ N(cs, [["render", hs]]), ms = {}, fs = {
950
995
  xmlns: "http://www.w3.org/2000/svg",
951
996
  width: "24",
952
997
  height: "24",
@@ -954,17 +999,17 @@ const ls = /* @__PURE__ */ $(as, [["render", rs]]), ds = {}, us = {
954
999
  fill: "currentColor",
955
1000
  class: "baklava-icon icon icon-tabler icons-tabler-filled icon-tabler-layout-sidebar-right-expand"
956
1001
  };
957
- function cs(s, e) {
958
- return i(), r("svg", us, [...e[0] || (e[0] = [
959
- l("path", {
1002
+ function gs(s, e) {
1003
+ return i(), l("svg", fs, [...e[0] || (e[0] = [
1004
+ r("path", {
960
1005
  stroke: "none",
961
1006
  d: "M0 0h24v24H0z",
962
1007
  fill: "none"
963
1008
  }, null, -1),
964
- l("path", { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm-3 2h-9a1 1 0 0 0 -.993 .883l-.007 .117v12a1 1 0 0 0 .883 .993l.117 .007h9v-14zm-3.293 4.293a1 1 0 0 1 .083 1.32l-.083 .094l-1.292 1.293l1.292 1.293a1 1 0 0 1 .083 1.32l-.083 .094a1 1 0 0 1 -1.32 .083l-.094 -.083l-2 -2a1 1 0 0 1 -.083 -1.32l.083 -.094l2 -2a1 1 0 0 1 1.414 0z" }, null, -1)
1009
+ r("path", { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm-3 2h-9a1 1 0 0 0 -.993 .883l-.007 .117v12a1 1 0 0 0 .883 .993l.117 .007h9v-14zm-3.293 4.293a1 1 0 0 1 .083 1.32l-.083 .094l-1.292 1.293l1.292 1.293a1 1 0 0 1 .083 1.32l-.083 .094a1 1 0 0 1 -1.32 .083l-.094 -.083l-2 -2a1 1 0 0 1 -.083 -1.32l.083 -.094l2 -2a1 1 0 0 1 1.414 0z" }, null, -1)
965
1010
  ])]);
966
1011
  }
967
- const ps = /* @__PURE__ */ $(ds, [["render", cs]]), hs = {}, vs = {
1012
+ const bs = /* @__PURE__ */ N(ms, [["render", gs]]), ys = {}, _s = {
968
1013
  xmlns: "http://www.w3.org/2000/svg",
969
1014
  width: "24",
970
1015
  height: "24",
@@ -976,12 +1021,12 @@ const ps = /* @__PURE__ */ $(ds, [["render", cs]]), hs = {}, vs = {
976
1021
  "stroke-linejoin": "round",
977
1022
  class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-lock-code"
978
1023
  };
979
- function ms(s, e) {
980
- return i(), r("svg", vs, [...e[0] || (e[0] = [
1024
+ function ks(s, e) {
1025
+ return i(), l("svg", _s, [...e[0] || (e[0] = [
981
1026
  J('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M11.5 21h-4.5a2 2 0 0 1 -2 -2v-6a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2"></path><path d="M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0"></path><path d="M8 11v-4a4 4 0 1 1 8 0v4"></path><path d="M20 21l2 -2l-2 -2"></path><path d="M17 17l-2 2l2 2"></path>', 6)
982
1027
  ])]);
983
1028
  }
984
- const fs = /* @__PURE__ */ $(hs, [["render", ms]]), gs = {}, bs = {
1029
+ const ws = /* @__PURE__ */ N(ys, [["render", ks]]), Cs = {}, xs = {
985
1030
  xmlns: "http://www.w3.org/2000/svg",
986
1031
  width: "24",
987
1032
  height: "24",
@@ -993,12 +1038,12 @@ const fs = /* @__PURE__ */ $(hs, [["render", ms]]), gs = {}, bs = {
993
1038
  "stroke-linejoin": "round",
994
1039
  class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-schema"
995
1040
  };
996
- function ys(s, e) {
997
- return i(), r("svg", bs, [...e[0] || (e[0] = [
1041
+ function Is(s, e) {
1042
+ return i(), l("svg", xs, [...e[0] || (e[0] = [
998
1043
  J('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M5 2h5v4h-5z"></path><path d="M15 10h5v4h-5z"></path><path d="M5 18h5v4h-5z"></path><path d="M5 10h5v4h-5z"></path><path d="M10 12h5"></path><path d="M7.5 6v4"></path><path d="M7.5 14v4"></path>', 8)
999
1044
  ])]);
1000
1045
  }
1001
- const _s = /* @__PURE__ */ $(gs, [["render", ys]]), ks = {}, Cs = {
1046
+ const Ns = /* @__PURE__ */ N(Cs, [["render", Is]]), $s = {}, Ms = {
1002
1047
  xmlns: "http://www.w3.org/2000/svg",
1003
1048
  width: "24",
1004
1049
  height: "24",
@@ -1010,12 +1055,12 @@ const _s = /* @__PURE__ */ $(gs, [["render", ys]]), ks = {}, Cs = {
1010
1055
  "stroke-linejoin": "round",
1011
1056
  class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-schema-off"
1012
1057
  };
1013
- function ws(s, e) {
1014
- return i(), r("svg", Cs, [...e[0] || (e[0] = [
1058
+ function Os(s, e) {
1059
+ return i(), l("svg", Ms, [...e[0] || (e[0] = [
1015
1060
  J('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 2h4v4m-4 0h-1v-1"></path><path d="M15 11v-1h5v4h-2"></path><path d="M5 18h5v4h-5z"></path><path d="M5 10h5v4h-5z"></path><path d="M10 12h2"></path><path d="M7.5 7.5v2.5"></path><path d="M7.5 14v4"></path><path d="M3 3l18 18"></path>', 9)
1016
1061
  ])]);
1017
1062
  }
1018
- const xs = /* @__PURE__ */ $(ks, [["render", ws]]), Is = {}, Ns = {
1063
+ const Ts = /* @__PURE__ */ N($s, [["render", Os]]), Es = {}, Bs = {
1019
1064
  xmlns: "http://www.w3.org/2000/svg",
1020
1065
  width: "24",
1021
1066
  height: "24",
@@ -1027,12 +1072,12 @@ const xs = /* @__PURE__ */ $(ks, [["render", ws]]), Is = {}, Ns = {
1027
1072
  "stroke-linejoin": "round",
1028
1073
  class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-transition-bottom"
1029
1074
  };
1030
- function Ms(s, e) {
1031
- return i(), r("svg", Ns, [...e[0] || (e[0] = [
1075
+ function Vs(s, e) {
1076
+ return i(), l("svg", Bs, [...e[0] || (e[0] = [
1032
1077
  J('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M21 18a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3"></path><path d="M3 3m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v0a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z"></path><path d="M12 9v8"></path><path d="M9 14l3 3l3 -3"></path>', 5)
1033
1078
  ])]);
1034
1079
  }
1035
- const $s = /* @__PURE__ */ $(Is, [["render", Ms]]), Os = {}, Ts = {
1080
+ const zs = /* @__PURE__ */ N(Es, [["render", Vs]]), Ss = {}, js = {
1036
1081
  xmlns: "http://www.w3.org/2000/svg",
1037
1082
  width: "24",
1038
1083
  height: "24",
@@ -1044,18 +1089,18 @@ const $s = /* @__PURE__ */ $(Is, [["render", Ms]]), Os = {}, Ts = {
1044
1089
  "stroke-linejoin": "round",
1045
1090
  class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-trash-off"
1046
1091
  };
1047
- function Es(s, e) {
1048
- return i(), r("svg", Ts, [...e[0] || (e[0] = [
1092
+ function Ls(s, e) {
1093
+ return i(), l("svg", js, [...e[0] || (e[0] = [
1049
1094
  J('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M3 3l18 18"></path><path d="M4 7h3m4 0h9"></path><path d="M10 11l0 6"></path><path d="M14 14l0 3"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l.077 -.923"></path><path d="M18.384 14.373l.616 -7.373"></path><path d="M9 5v-1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>', 8)
1050
1095
  ])]);
1051
1096
  }
1052
- const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"], Ss = {
1097
+ const Us = /* @__PURE__ */ N(Ss, [["render", Ls]]), Gs = ["id", "data-node-type"], Rs = {
1053
1098
  class: "__title-label",
1054
1099
  style: { "flex-grow": "1" }
1055
- }, zs = { key: 0 }, js = {
1100
+ }, Hs = { key: 0 }, Ps = {
1056
1101
  class: "__menu",
1057
1102
  style: { display: "flex" }
1058
- }, Ls = { class: "__outputs" }, Us = { key: 0 }, Gs = ["id", "title"], Rs = { class: "__inputs" }, Ps = { key: 0 }, Ds = ["id", "title"], Hs = /* @__PURE__ */ U({
1103
+ }, Ds = { class: "__outputs" }, As = { key: 0 }, Fs = ["id", "title"], Ws = { class: "__inputs" }, Xs = { key: 0 }, qs = ["id", "title"], Js = /* @__PURE__ */ U({
1059
1104
  __name: "CodeGraphNode",
1060
1105
  props: {
1061
1106
  node: {},
@@ -1064,9 +1109,9 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1064
1109
  },
1065
1110
  emits: ["select", "start-drag", "update"],
1066
1111
  setup(s, { emit: e }) {
1067
- const t = ke.ContextMenu, n = ke.NodeInterface, o = s, a = b(() => o.node), d = e, { viewModel: u } = q(), { graph: v, switchGraph: k } = ae(), w = B(null), V = B(!1), L = B(""), N = B(null), m = B(!1);
1112
+ const t = ke.ContextMenu, n = ke.NodeInterface, o = s, a = b(() => o.node), d = e, { viewModel: u } = q(), { graph: v, switchGraph: k } = ae(), C = V(null), B = V(!1), L = V(""), $ = V(null), m = V(!1);
1068
1113
  let y = 0, x = 0;
1069
- const f = B(!1), C = b(() => {
1114
+ const f = V(!1), w = b(() => {
1070
1115
  const c = [
1071
1116
  { value: "edit", label: "Edit" },
1072
1117
  { value: "rename", label: "Rename" },
@@ -1096,10 +1141,10 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1096
1141
  }, me = () => {
1097
1142
  const c = u.value.displayedGraph.sidebar;
1098
1143
  c.nodeId = o.node.id, c.visible = !0;
1099
- }, Pe = () => {
1144
+ }, He = () => {
1100
1145
  const c = u.value.displayedGraph.sidebar;
1101
1146
  c.nodeId = o.node.id;
1102
- }, De = async (c) => {
1147
+ }, Pe = async (c) => {
1103
1148
  switch (c) {
1104
1149
  case "edit":
1105
1150
  me();
@@ -1108,17 +1153,17 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1108
1153
  v.value.removeNode(o.node);
1109
1154
  break;
1110
1155
  case "rename":
1111
- L.value = o.node.title, V.value = !0, await ht(), N.value?.focus();
1156
+ L.value = o.node.title, B.value = !0, await ht(), $.value?.focus();
1112
1157
  break;
1113
1158
  case "editSubgraph":
1114
1159
  k(o.node.template);
1115
1160
  break;
1116
1161
  }
1117
1162
  }, fe = () => {
1118
- a.value.title = L.value, V.value = !1;
1163
+ a.value.title = L.value, B.value = !1;
1119
1164
  }, ge = () => {
1120
- w.value && u.value.hooks.renderNode.execute({ node: o.node, el: w.value });
1121
- }, He = (c) => {
1165
+ C.value && u.value.hooks.renderNode.execute({ node: o.node, el: C.value });
1166
+ }, De = (c) => {
1122
1167
  m.value = !0, y = o.node.width, x = c.clientX, c.preventDefault();
1123
1168
  }, be = (c) => {
1124
1169
  a.value.state && (a.value.state.integrated = c, d("update"));
@@ -1133,26 +1178,26 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1133
1178
  ge(), window.addEventListener("mousemove", ye), window.addEventListener("mouseup", _e);
1134
1179
  }), Oe(ge), ct(() => {
1135
1180
  window.removeEventListener("mousemove", ye), window.removeEventListener("mouseup", _e);
1136
- }), (c, g) => (i(), r("div", {
1181
+ }), (c, g) => (i(), l("div", {
1137
1182
  id: a.value.id,
1138
1183
  ref_key: "el",
1139
- ref: w,
1184
+ ref: C,
1140
1185
  class: G([p.value, "baklava-node"]),
1141
1186
  "data-node-type": a.value.type,
1142
1187
  style: re(je.value),
1143
1188
  onPointerdown: he
1144
1189
  }, [
1145
- _(u).settings.nodes.resizable ? (i(), r("div", {
1190
+ _(u).settings.nodes.resizable ? (i(), l("div", {
1146
1191
  key: 0,
1147
1192
  class: "__resize-handle",
1148
- onMousedown: He
1193
+ onMousedown: De
1149
1194
  }, null, 32)) : I("", !0),
1150
- l("div", {
1195
+ r("div", {
1151
1196
  class: "__title",
1152
1197
  onPointerdown: A(Ge, ["self", "stop"]),
1153
1198
  onContextmenu: A(ve, ["prevent"])
1154
1199
  }, [
1155
- a.value.inputs._node ? (i(), O(we, {
1200
+ a.value.inputs._node ? (i(), O(Ce, {
1156
1201
  key: 0,
1157
1202
  node: a.value,
1158
1203
  intf: a.value.inputs._node,
@@ -1160,10 +1205,10 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1160
1205
  "data-interface-type": "node",
1161
1206
  style: { "flex-grow": "0" }
1162
1207
  }, null, 8, ["node", "intf"])) : I("", !0),
1163
- V.value ? ee((i(), r("input", {
1208
+ B.value ? ee((i(), l("input", {
1164
1209
  key: 2,
1165
1210
  ref_key: "renameInputEl",
1166
- ref: N,
1211
+ ref: $,
1167
1212
  "onUpdate:modelValue": g[4] || (g[4] = (h) => L.value = h),
1168
1213
  class: "baklava-input",
1169
1214
  placeholder: "Node Name",
@@ -1173,56 +1218,56 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1173
1218
  onKeydown: ne(fe, ["enter"])
1174
1219
  }, null, 544)), [
1175
1220
  [te, L.value]
1176
- ]) : (i(), r(T, { key: 1 }, [
1177
- l("div", Ss, [
1178
- a.value.idx > -1 ? (i(), r("span", zs, j(a.value.idx + 1) + " - ", 1)) : I("", !0),
1221
+ ]) : (i(), l(T, { key: 1 }, [
1222
+ r("div", Rs, [
1223
+ a.value.idx > -1 ? (i(), l("span", Hs, j(a.value.idx + 1) + " - ", 1)) : I("", !0),
1179
1224
  pt(j(a.value.title), 1)
1180
1225
  ]),
1181
- l("div", js, [
1182
- a.value.subgraph ? I("", !0) : (i(), r(T, { key: 0 }, [
1183
- a.value.state.lockCode ? (i(), O(_(fs), {
1226
+ r("div", Ps, [
1227
+ a.value.subgraph ? I("", !0) : (i(), l(T, { key: 0 }, [
1228
+ a.value.state.lockCode ? (i(), O(_(ws), {
1184
1229
  key: 0,
1185
1230
  class: "--clickable mx-1",
1186
1231
  onClick: g[0] || (g[0] = (h) => a.value.lockCode = !1)
1187
1232
  })) : I("", !0),
1188
- a.value.state.integrated ? (i(), O(_(Dt), {
1233
+ a.value.state.integrated ? (i(), O(_(Ft), {
1189
1234
  key: 1,
1190
1235
  class: "--clickable mx-1",
1191
1236
  onClick: g[1] || (g[1] = (h) => be(!1))
1192
- })) : (i(), O(_($s), {
1237
+ })) : (i(), O(_(zs), {
1193
1238
  key: 2,
1194
1239
  class: "--clickable mx-1",
1195
1240
  onClick: g[2] || (g[2] = (h) => be(!0))
1196
1241
  })),
1197
- !_(u).displayedGraph.sidebar.visible && _(u).displayedGraph.sidebar.nodeId !== a.value.id ? (i(), O(_(ps), {
1242
+ !_(u).displayedGraph.sidebar.visible && _(u).displayedGraph.sidebar.nodeId !== a.value.id ? (i(), O(_(bs), {
1198
1243
  key: 3,
1199
1244
  class: "--clickable mx-1",
1200
1245
  onClick: me
1201
- })) : _(u).displayedGraph.sidebar.visible && _(u).displayedGraph.sidebar.nodeId !== a.value.id ? (i(), O(_(os), {
1246
+ })) : _(u).displayedGraph.sidebar.visible && _(u).displayedGraph.sidebar.nodeId !== a.value.id ? (i(), O(_(us), {
1202
1247
  key: 4,
1203
1248
  class: "--clickable mx-1",
1204
- onClick: Pe
1205
- })) : (i(), O(_(ls), {
1249
+ onClick: He
1250
+ })) : (i(), O(_(vs), {
1206
1251
  key: 5,
1207
1252
  class: "--clickable mx-1",
1208
1253
  onClick: Re
1209
1254
  }))
1210
1255
  ], 64)),
1211
- z(_(Wt), {
1256
+ S(_(Kt), {
1212
1257
  class: "--clickable mx-1",
1213
1258
  onClick: ve
1214
1259
  }),
1215
- z(_(t), {
1260
+ S(_(t), {
1216
1261
  modelValue: f.value,
1217
1262
  "onUpdate:modelValue": g[3] || (g[3] = (h) => f.value = h),
1218
1263
  x: 0,
1219
1264
  y: 0,
1220
- items: C.value,
1221
- onClick: De
1265
+ items: w.value,
1266
+ onClick: Pe
1222
1267
  }, null, 8, ["modelValue", "items"])
1223
1268
  ])
1224
1269
  ], 64)),
1225
- a.value.outputs._node ? (i(), O(we, {
1270
+ a.value.outputs._node ? (i(), O(Ce, {
1226
1271
  key: 3,
1227
1272
  node: a.value,
1228
1273
  intf: a.value.outputs._node,
@@ -1230,33 +1275,33 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1230
1275
  "data-interface-type": "node"
1231
1276
  }, null, 8, ["node", "intf"])) : I("", !0)
1232
1277
  ], 32),
1233
- l("div", {
1278
+ r("div", {
1234
1279
  class: G(["__content", M.value]),
1235
1280
  onKeydown: g[5] || (g[5] = ne(A(() => {
1236
1281
  }, ["stop"]), ["delete"])),
1237
1282
  onContextmenu: g[6] || (g[6] = A(() => {
1238
1283
  }, ["prevent"]))
1239
1284
  }, [
1240
- l("div", Ls, [
1241
- (i(!0), r(T, null, D(Ue.value, (h) => (i(), r(T, {
1285
+ r("div", Ds, [
1286
+ (i(!0), l(T, null, P(Ue.value, (h) => (i(), l(T, {
1242
1287
  key: h.id
1243
1288
  }, [
1244
- a.value.state?.hidden ? (i(), r("div", Us, [
1245
- h.port ? (i(), r("div", {
1289
+ a.value.state?.hidden ? (i(), l("div", As, [
1290
+ h.port ? (i(), l("div", {
1246
1291
  key: 0,
1247
1292
  id: h.id,
1248
1293
  title: h.name,
1249
1294
  class: "baklava-node-interface --output --connected"
1250
1295
  }, [...g[7] || (g[7] = [
1251
- l("div", { class: "__port" }, null, -1)
1252
- ])], 8, Gs)) : I("", !0)
1296
+ r("div", { class: "__port" }, null, -1)
1297
+ ])], 8, Fs)) : I("", !0)
1253
1298
  ])) : W(c.$slots, "nodeInterface", {
1254
1299
  key: 1,
1255
1300
  type: "output",
1256
1301
  node: a.value,
1257
1302
  intf: h
1258
1303
  }, () => [
1259
- z(_(n), {
1304
+ S(_(n), {
1260
1305
  node: a.value,
1261
1306
  intf: h,
1262
1307
  title: h.type
@@ -1264,26 +1309,26 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1264
1309
  ])
1265
1310
  ], 64))), 128))
1266
1311
  ]),
1267
- l("div", Rs, [
1268
- (i(!0), r(T, null, D(Le.value, (h) => (i(), r(T, {
1312
+ r("div", Ws, [
1313
+ (i(!0), l(T, null, P(Le.value, (h) => (i(), l(T, {
1269
1314
  key: h.id
1270
1315
  }, [
1271
- a.value.state?.hidden ? (i(), r("div", Ps, [
1272
- h.port ? (i(), r("div", {
1316
+ a.value.state?.hidden ? (i(), l("div", Xs, [
1317
+ h.port ? (i(), l("div", {
1273
1318
  key: 0,
1274
1319
  id: h.id,
1275
1320
  title: h.name,
1276
1321
  class: "baklava-node-interface --input --connected"
1277
1322
  }, [...g[8] || (g[8] = [
1278
- l("div", { class: "__port" }, null, -1)
1279
- ])], 8, Ds)) : I("", !0)
1323
+ r("div", { class: "__port" }, null, -1)
1324
+ ])], 8, qs)) : I("", !0)
1280
1325
  ])) : W(c.$slots, "nodeInterface", {
1281
1326
  key: 1,
1282
1327
  node: a.value,
1283
1328
  intf: h,
1284
1329
  type: "input"
1285
1330
  }, () => [
1286
- z(_(n), {
1331
+ S(_(n), {
1287
1332
  node: a.value,
1288
1333
  intf: h,
1289
1334
  title: h.type
@@ -1292,9 +1337,9 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1292
1337
  ], 64))), 128))
1293
1338
  ])
1294
1339
  ], 34)
1295
- ], 46, Bs));
1340
+ ], 46, Gs));
1296
1341
  }
1297
- }), As = ["title"], Fs = {
1342
+ }), Ys = ["title"], Qs = {
1298
1343
  key: 0,
1299
1344
  class: "__label"
1300
1345
  }, xe = /* @__PURE__ */ U({
@@ -1308,42 +1353,42 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1308
1353
  emits: ["update:modelValue"],
1309
1354
  setup(s, { emit: e }) {
1310
1355
  const t = e;
1311
- return (n, o) => (i(), r("div", {
1356
+ return (n, o) => (i(), l("div", {
1312
1357
  class: G(["baklava-checkbox", { "--checked": s.inversed ? !s.modelValue : s.modelValue, "--disabled": s.disabled }]),
1313
1358
  title: s.name,
1314
1359
  onClick: o[0] || (o[0] = (a) => t("update:modelValue", !s.modelValue))
1315
1360
  }, [
1316
- o[1] || (o[1] = l("div", { class: "__checkmark-container" }, [
1317
- l("svg", {
1361
+ o[1] || (o[1] = r("div", { class: "__checkmark-container" }, [
1362
+ r("svg", {
1318
1363
  xmlns: "http://www.w3.org/2000/svg",
1319
1364
  width: "18",
1320
1365
  height: "18",
1321
1366
  viewBox: "0 0 18 18"
1322
1367
  }, [
1323
- l("path", {
1368
+ r("path", {
1324
1369
  class: "__checkmark",
1325
1370
  d: "M 6 5 L 6 10 L 16 10",
1326
1371
  transform: "rotate(-45 10 10)"
1327
1372
  })
1328
1373
  ])
1329
1374
  ], -1)),
1330
- s.name ? (i(), r("div", Fs, j(s.name), 1)) : I("", !0)
1331
- ], 10, As));
1375
+ s.name ? (i(), l("div", Qs, j(s.name), 1)) : I("", !0)
1376
+ ], 10, Ys));
1332
1377
  }
1333
- }), Ws = { class: "__header" }, Xs = { class: "__node-name" }, qs = { class: "__interfaces" }, Js = { class: "__inputs" }, Ys = { style: { display: "flex" } }, Qs = { class: "__outputs" }, Ks = {
1378
+ }), Ks = { class: "__header" }, Zs = { class: "__node-name" }, en = { class: "__interfaces" }, tn = { class: "__inputs" }, sn = { style: { display: "flex" } }, nn = { class: "__outputs" }, on = {
1334
1379
  key: 0,
1335
1380
  class: "__interface"
1336
- }, Zs = { style: { display: "flex" } }, en = /* @__PURE__ */ U({
1381
+ }, an = { style: { display: "flex" } }, rn = /* @__PURE__ */ U({
1337
1382
  __name: "CodeGraphSidebar",
1338
1383
  setup(s) {
1339
- const { viewModel: e } = q(), { graph: t } = ae(), n = B(null), o = Te(e.value.settings.sidebar, "width"), a = b(() => e.value.settings.sidebar.resizable);
1384
+ const { viewModel: e } = q(), { graph: t } = ae(), n = V(null), o = Te(e.value.settings.sidebar, "width"), a = b(() => e.value.settings.sidebar.resizable);
1340
1385
  let d = 0, u = 0;
1341
1386
  const v = b(() => {
1342
1387
  const f = t.value.sidebar.nodeId;
1343
- return t.value.nodes.find((C) => C.id === f);
1344
- }), k = b(() => v.value), w = b(() => ({
1388
+ return t.value.nodes.find((w) => w.id === f);
1389
+ }), k = b(() => v.value), C = b(() => ({
1345
1390
  width: `${o.value}px`
1346
- })), V = b(() => k.value ? Object.values(k.value.inputs).filter((f) => f.displayInSidebar && f.component) : []), L = b(() => k.value ? Object.values(k.value.outputs).filter((f) => f.displayInSidebar && f.component) : []), N = () => {
1391
+ })), B = b(() => k.value ? Object.values(k.value.inputs).filter((f) => f.displayInSidebar && f.component) : []), L = b(() => k.value ? Object.values(k.value.outputs).filter((f) => f.displayInSidebar && f.component) : []), $ = () => {
1347
1392
  t.value.sidebar.visible = !1;
1348
1393
  }, m = () => {
1349
1394
  v.value?.events.update.emit(null);
@@ -1356,50 +1401,50 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1356
1401
  { once: !0 }
1357
1402
  );
1358
1403
  }, x = (f) => {
1359
- const C = n.value?.parentElement?.getBoundingClientRect().width ?? 500, p = f.clientX - u;
1404
+ const w = n.value?.parentElement?.getBoundingClientRect().width ?? 500, p = f.clientX - u;
1360
1405
  let M = d - p;
1361
- M < 300 ? M = 300 : M > 0.9 * C && (M = 0.9 * C), o.value = M;
1406
+ M < 300 ? M = 300 : M > 0.9 * w && (M = 0.9 * w), o.value = M;
1362
1407
  };
1363
- return (f, C) => (i(), r("div", {
1408
+ return (f, w) => (i(), l("div", {
1364
1409
  class: G([{ "--open": _(t).sidebar.visible }, "baklava-sidebar"]),
1365
- style: re(w.value),
1410
+ style: re(C.value),
1366
1411
  ref_key: "el",
1367
1412
  ref: n
1368
1413
  }, [
1369
- a.value ? (i(), r("div", {
1414
+ a.value ? (i(), l("div", {
1370
1415
  key: 0,
1371
1416
  class: "__resizer",
1372
1417
  onMousedown: y
1373
1418
  }, null, 32)) : I("", !0),
1374
- v.value ? (i(), r(T, { key: 1 }, [
1375
- l("div", Ws, [
1376
- l("button", {
1419
+ v.value ? (i(), l(T, { key: 1 }, [
1420
+ r("div", Ks, [
1421
+ r("button", {
1377
1422
  tabindex: "-1",
1378
1423
  class: "__close",
1379
- onClick: N
1424
+ onClick: $
1380
1425
  }, "×"),
1381
- l("div", Xs, [
1382
- l("b", null, j(v.value.title), 1)
1426
+ r("div", Zs, [
1427
+ r("b", null, j(v.value.title), 1)
1383
1428
  ])
1384
1429
  ]),
1385
- l("div", qs, [
1386
- l("div", Js, [
1387
- (i(!0), r(T, null, D(V.value, (p) => (i(), r("div", {
1430
+ r("div", en, [
1431
+ r("div", tn, [
1432
+ (i(!0), l(T, null, P(B.value, (p) => (i(), l("div", {
1388
1433
  key: p.id,
1389
1434
  class: "__interface"
1390
1435
  }, [
1391
- l("div", Ys, [
1392
- z(xe, {
1436
+ r("div", sn, [
1437
+ S(xe, {
1393
1438
  modelValue: p.hidden,
1394
1439
  "onUpdate:modelValue": [
1395
1440
  (M) => p.hidden = M,
1396
- C[0] || (C[0] = () => v.value?.events.update.emit(null))
1441
+ w[0] || (w[0] = () => v.value?.events.update.emit(null))
1397
1442
  ],
1398
1443
  disabled: !p.optional,
1399
1444
  inversed: "",
1400
1445
  style: { "padding-right": "8px" }
1401
1446
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"]),
1402
- (i(), O(Ce(p.component), {
1447
+ (i(), O(we(p.component), {
1403
1448
  modelValue: p.value,
1404
1449
  "onUpdate:modelValue": (M) => p.value = M,
1405
1450
  node: v.value,
@@ -1409,11 +1454,11 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1409
1454
  ])
1410
1455
  ]))), 128))
1411
1456
  ]),
1412
- l("div", Qs, [
1413
- k.value && k.value.state ? (i(), r("div", Ks, [
1414
- C[3] || (C[3] = l("label", null, "Variable name", -1)),
1415
- ee(l("input", {
1416
- "onUpdate:modelValue": C[1] || (C[1] = (p) => k.value.state.variableName = p),
1457
+ r("div", nn, [
1458
+ k.value && k.value.state ? (i(), l("div", on, [
1459
+ w[3] || (w[3] = r("label", null, "Variable name", -1)),
1460
+ ee(r("input", {
1461
+ "onUpdate:modelValue": w[1] || (w[1] = (p) => k.value.state.variableName = p),
1417
1462
  type: "text",
1418
1463
  class: "baklava-input",
1419
1464
  title: "Variable name",
@@ -1423,22 +1468,22 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1423
1468
  [te, k.value.state.variableName]
1424
1469
  ])
1425
1470
  ])) : I("", !0),
1426
- (i(!0), r(T, null, D(L.value, (p) => (i(), r("div", {
1471
+ (i(!0), l(T, null, P(L.value, (p) => (i(), l("div", {
1427
1472
  key: p.id,
1428
1473
  class: "__interface"
1429
1474
  }, [
1430
- l("div", Zs, [
1431
- z(xe, {
1475
+ r("div", an, [
1476
+ S(xe, {
1432
1477
  modelValue: p.hidden,
1433
1478
  "onUpdate:modelValue": [
1434
1479
  (M) => p.hidden = M,
1435
- C[2] || (C[2] = () => v.value?.events.update.emit(null))
1480
+ w[2] || (w[2] = () => v.value?.events.update.emit(null))
1436
1481
  ],
1437
1482
  disabled: !p.optional,
1438
1483
  inversed: "",
1439
1484
  style: { "padding-right": "8px" }
1440
1485
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"]),
1441
- (i(), O(Ce(p.component), {
1486
+ (i(), O(we(p.component), {
1442
1487
  modelValue: p.value,
1443
1488
  "onUpdate:modelValue": (M) => p.value = M,
1444
1489
  node: v.value,
@@ -1453,7 +1498,7 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1453
1498
  ], 64)) : I("", !0)
1454
1499
  ], 6));
1455
1500
  }
1456
- }), tn = U({
1501
+ }), ln = U({
1457
1502
  props: {
1458
1503
  type: {
1459
1504
  type: String,
@@ -1465,82 +1510,82 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1465
1510
  }
1466
1511
  },
1467
1512
  setup(s) {
1468
- const { viewModel: e } = q(), { switchGraph: t } = ae(), n = B(!1), o = b(() => s.type.startsWith(se));
1513
+ const { viewModel: e } = q(), { switchGraph: t } = ae(), n = V(!1), o = b(() => s.type.startsWith(se));
1469
1514
  return { showContextMenu: n, hasContextMenu: o, contextMenuItems: [
1470
1515
  { label: "Edit Subgraph", value: "editSubgraph" },
1471
1516
  { label: "Delete Subgraph", value: "deleteSubgraph" }
1472
1517
  ], openContextMenu: () => {
1473
1518
  n.value = !0;
1474
1519
  }, onContextMenuClick: (v) => {
1475
- const k = s.type.substring(se.length), w = e.value.editor.graphTemplates.find((V) => V.id === k);
1476
- if (w)
1520
+ const k = s.type.substring(se.length), C = e.value.editor.graphTemplates.find((B) => B.id === k);
1521
+ if (C)
1477
1522
  switch (v) {
1478
1523
  case "editSubgraph":
1479
- t(w);
1524
+ t(C);
1480
1525
  break;
1481
1526
  case "deleteSubgraph":
1482
- e.value.editor.removeGraphTemplate(w);
1527
+ e.value.editor.removeGraphTemplate(C);
1483
1528
  break;
1484
1529
  }
1485
1530
  } };
1486
1531
  }
1487
- }), sn = ["data-node-type"], nn = { class: "__title" }, on = { class: "__title-label" };
1488
- function an(s, e, t, n, o, a) {
1489
- return i(), r("div", {
1532
+ }), dn = ["data-node-type"], un = { class: "__title" }, cn = { class: "__title-label" };
1533
+ function pn(s, e, t, n, o, a) {
1534
+ return i(), l("div", {
1490
1535
  class: "baklava-node --palette",
1491
1536
  "data-node-type": s.type
1492
1537
  }, [
1493
- l("div", nn, [
1494
- l("div", on, j(s.title), 1)
1538
+ r("div", un, [
1539
+ r("div", cn, j(s.title), 1)
1495
1540
  ])
1496
- ], 8, sn);
1541
+ ], 8, dn);
1497
1542
  }
1498
- const Ie = /* @__PURE__ */ $(tn, [["render", an]]), rn = {
1543
+ const Ie = /* @__PURE__ */ N(ln, [["render", pn]]), hn = {
1499
1544
  class: "baklava-node --palette",
1500
1545
  style: { "margin-top": "-20px", "margin-bottom": "20px" }
1501
- }, ln = {
1546
+ }, vn = {
1502
1547
  key: 0,
1503
1548
  style: { display: "flex", "justify-content": "space-between" }
1504
- }, dn = ["onClick"], un = {
1549
+ }, mn = ["onClick"], fn = {
1505
1550
  key: 0,
1506
1551
  style: { margin: "auto 0", "font-size": "12px" }
1507
- }, cn = /* @__PURE__ */ U({
1552
+ }, gn = /* @__PURE__ */ U({
1508
1553
  __name: "CodeNodePalette",
1509
1554
  setup(s) {
1510
- const { viewModel: e } = q(), { x: t, y: n } = Ct(), { transform: o } = ot(), a = at(e), d = vt("editorEl"), u = B(""), v = B(null), k = () => u.value ? a.value.filter(
1511
- (N) => N.name.toLowerCase().includes(u.value.toLowerCase()) || Object.values(N.nodeTypes).some(
1555
+ const { viewModel: e } = q(), { x: t, y: n } = wt(), { transform: o } = ot(), a = at(e), d = vt("editorEl"), u = V(""), v = V(null), k = () => u.value ? a.value.filter(
1556
+ ($) => $.name.toLowerCase().includes(u.value.toLowerCase()) || Object.values($.nodeTypes).some(
1512
1557
  (m) => m.title.toLowerCase().includes(u.value.toLowerCase())
1513
1558
  )
1514
- ) : a.value, w = (N) => u.value ? Object.values(N).filter(
1559
+ ) : a.value, C = ($) => u.value ? Object.values($).filter(
1515
1560
  (m) => m.category.toLowerCase().includes(u.value.toLowerCase()) || m.title.toLowerCase().includes(u.value.toLowerCase())
1516
- ) : Object.values(N), V = b(() => {
1561
+ ) : Object.values($), B = b(() => {
1517
1562
  if (!v.value || !d?.value) return {};
1518
- const { left: N, top: m } = d.value.getBoundingClientRect();
1563
+ const { left: $, top: m } = d.value.getBoundingClientRect();
1519
1564
  return {
1520
1565
  top: `${n.value - m}px`,
1521
- left: `${t.value - N}px`
1566
+ left: `${t.value - $}px`
1522
1567
  };
1523
- }), L = (N, m) => {
1568
+ }), L = ($, m) => {
1524
1569
  v.value = {
1525
- type: N,
1570
+ type: $,
1526
1571
  nodeInformation: m
1527
1572
  };
1528
1573
  const y = () => {
1529
- const x = P(new m.type());
1574
+ const x = H(new m.type());
1530
1575
  e.value.displayedGraph.addNode(x);
1531
- const f = d.value.getBoundingClientRect(), [C, p] = o(t.value - f.left, n.value - f.top);
1532
- x.position.x = C, x.position.y = p, v.value = null, document.removeEventListener("pointerup", y);
1576
+ const f = d.value.getBoundingClientRect(), [w, p] = o(t.value - f.left, n.value - f.top);
1577
+ x.position.x = w, x.position.y = p, v.value = null, document.removeEventListener("pointerup", y);
1533
1578
  };
1534
1579
  document.addEventListener("pointerup", y);
1535
1580
  };
1536
- return (N, m) => (i(), r(T, null, [
1537
- l("div", {
1581
+ return ($, m) => (i(), l(T, null, [
1582
+ r("div", {
1538
1583
  class: G([{ "--open": _(e).settings.palette.enabled }, "baklava-node-palette"]),
1539
1584
  onContextmenu: m[1] || (m[1] = A(() => {
1540
1585
  }, ["stop", "prevent"]))
1541
1586
  }, [
1542
- l("div", rn, [
1543
- ee(l("input", {
1587
+ r("div", hn, [
1588
+ ee(r("input", {
1544
1589
  "onUpdate:modelValue": m[0] || (m[0] = (y) => u.value = y),
1545
1590
  type: "text",
1546
1591
  class: "baklava-input",
@@ -1550,17 +1595,17 @@ const Ie = /* @__PURE__ */ $(tn, [["render", an]]), rn = {
1550
1595
  [te, u.value]
1551
1596
  ])
1552
1597
  ]),
1553
- (i(!0), r(T, null, D(k(), (y) => (i(), r("section", {
1598
+ (i(!0), l(T, null, P(k(), (y) => (i(), l("section", {
1554
1599
  key: y.name
1555
1600
  }, [
1556
- y.name !== "default" ? (i(), r("h3", ln, [
1557
- l("div", {
1601
+ y.name !== "default" ? (i(), l("h3", vn, [
1602
+ r("div", {
1558
1603
  onClick: (x) => u.value = y.name,
1559
1604
  style: { cursor: "pointer" }
1560
- }, j(y.name), 9, dn),
1561
- w(y.nodeTypes).length < Object.values(y.nodeTypes).length ? (i(), r("div", un, " ( " + j(w(y.nodeTypes).length) + " / " + j(Object.values(y.nodeTypes).length) + " ) ", 1)) : I("", !0)
1605
+ }, j(y.name), 9, mn),
1606
+ C(y.nodeTypes).length < Object.values(y.nodeTypes).length ? (i(), l("div", fn, " ( " + j(C(y.nodeTypes).length) + " / " + j(Object.values(y.nodeTypes).length) + " ) ", 1)) : I("", !0)
1562
1607
  ])) : I("", !0),
1563
- (i(!0), r(T, null, D(w(y.nodeTypes), (x) => (i(), O(Ie, {
1608
+ (i(!0), l(T, null, P(C(y.nodeTypes), (x) => (i(), O(Ie, {
1564
1609
  key: x.type,
1565
1610
  type: x.type,
1566
1611
  title: x.title,
@@ -1568,14 +1613,14 @@ const Ie = /* @__PURE__ */ $(tn, [["render", an]]), rn = {
1568
1613
  }, null, 8, ["type", "title", "onPointerdown"]))), 128))
1569
1614
  ]))), 128))
1570
1615
  ], 34),
1571
- z(mt, { name: "fade" }, {
1616
+ S(mt, { name: "fade" }, {
1572
1617
  default: F(() => [
1573
- v.value ? (i(), r("div", {
1618
+ v.value ? (i(), l("div", {
1574
1619
  key: 0,
1575
1620
  class: "baklava-dragged-node",
1576
- style: re(V.value)
1621
+ style: re(B.value)
1577
1622
  }, [
1578
- z(Ie, {
1623
+ S(Ie, {
1579
1624
  type: v.value.type,
1580
1625
  title: v.value.nodeInformation.title
1581
1626
  }, null, 8, ["type", "title"])
@@ -1585,7 +1630,7 @@ const Ie = /* @__PURE__ */ $(tn, [["render", an]]), rn = {
1585
1630
  })
1586
1631
  ], 64));
1587
1632
  }
1588
- }), zn = /* @__PURE__ */ U({
1633
+ }), Dn = /* @__PURE__ */ U({
1589
1634
  __name: "CodeGraphEditor",
1590
1635
  props: {
1591
1636
  viewModel: {}
@@ -1598,15 +1643,15 @@ const Ie = /* @__PURE__ */ $(tn, [["render", an]]), rn = {
1598
1643
  t.value.unsubscribe(), t.value.engine.stop();
1599
1644
  }), (o, a) => (i(), O(_(it), { "view-model": t.value }, {
1600
1645
  palette: F(() => [
1601
- z(cn)
1646
+ S(gn)
1602
1647
  ]),
1603
1648
  node: F((d) => [
1604
- z(Hs, yt(d, {
1649
+ S(Js, yt(d, {
1605
1650
  onUpdate: (u) => n(d.node)
1606
1651
  }), null, 16, ["onUpdate"])
1607
1652
  ]),
1608
1653
  sidebar: F((d) => [
1609
- z(en, gt(bt(d)), {
1654
+ S(rn, gt(bt(d)), {
1610
1655
  codeEditor: F(({ node: u }) => [
1611
1656
  W(o.$slots, "sidebarCodeEditor", { node: u })
1612
1657
  ]),
@@ -1616,7 +1661,7 @@ const Ie = /* @__PURE__ */ $(tn, [["render", an]]), rn = {
1616
1661
  _: 3
1617
1662
  }, 8, ["view-model"]));
1618
1663
  }
1619
- }), pn = (s) => {
1664
+ }), bn = (s) => {
1620
1665
  const e = "TOGGLE_PALETTE";
1621
1666
  s.commandHandler.registerCommand(e, {
1622
1667
  execute: () => s.settings.palette.enabled = !s.settings.palette.enabled,
@@ -1636,20 +1681,20 @@ const Ie = /* @__PURE__ */ $(tn, [["render", an]]), rn = {
1636
1681
  command: e,
1637
1682
  title: "Toggle palette",
1638
1683
  // Tooltip text
1639
- icon: b(() => s.settings.palette.enabled ? Yt : es)
1684
+ icon: b(() => s.settings.palette.enabled ? ss : is)
1640
1685
  },
1641
1686
  ...rt,
1642
1687
  {
1643
1688
  command: t,
1644
1689
  title: "Clear all",
1645
1690
  // Tooltip text
1646
- icon: Vs
1691
+ icon: Us
1647
1692
  },
1648
1693
  {
1649
1694
  command: n,
1650
1695
  title: "Toggle minimap",
1651
1696
  // Tooltip text
1652
- icon: b(() => s.settings.enableMinimap ? xs : _s)
1697
+ icon: b(() => s.settings.enableMinimap ? Ts : Ns)
1653
1698
  }
1654
1699
  ];
1655
1700
  }, Q = {
@@ -1667,13 +1712,13 @@ const Ie = /* @__PURE__ */ $(tn, [["render", an]]), rn = {
1667
1712
  },
1668
1713
  displayValueOnHover: !1
1669
1714
  };
1670
- function jn(s) {
1715
+ function An(s) {
1671
1716
  const e = lt(s?.existingEditor);
1672
- e.code = s?.code ? new s.code(e) : new jt(e), pn(e);
1717
+ e.code = s?.code ? new s.code(e) : new jt(e), bn(e);
1673
1718
  const t = {};
1674
1719
  return Object.keys(Q).forEach((n) => {
1675
1720
  t[n] = typeof Q[n] == "object" ? { ...e.settings[n], ...Q[n] } : Q[n];
1676
- }), e.settings = P({ ...e.settings, ...t }), e.settings.nodes.defaultWidth = 350, e.state = P({
1721
+ }), e.settings = H({ ...e.settings, ...t }), e.settings.nodes.defaultWidth = 350, e.state = H({
1677
1722
  modules: {},
1678
1723
  token: null
1679
1724
  }), e.engine = new dt(e.editor), e.subscribe = () => {
@@ -1701,44 +1746,58 @@ function jn(s) {
1701
1746
  }, e;
1702
1747
  }
1703
1748
  export {
1704
- wt as AbstractCodeNode,
1705
- kn as CheckboxInterface,
1749
+ Ct as AbstractCodeNode,
1750
+ Hn as Check,
1751
+ $n as CheckboxInterface,
1706
1752
  jt as Code,
1707
- zn as CodeGraphEditor,
1753
+ Dn as CodeGraphEditor,
1708
1754
  Ee as CodeNode,
1709
1755
  Y as CodeNodeInputInterface,
1710
- H as CodeNodeInterface,
1756
+ D as CodeNodeInterface,
1711
1757
  le as CodeNodeInterfaceComponent,
1712
- $t as CodeNodeOutputInterface,
1758
+ Mt as CodeNodeOutputInterface,
1759
+ Ft as CodeVariable,
1760
+ Pn as Copy,
1713
1761
  Q as DEFAULT_SETTINGS,
1714
- zt as DynamicCodeNode,
1715
- Cn as IntegerInterface,
1716
- wn as ListInputInterface,
1717
- xn as NumberInterface,
1718
- In as SelectInterface,
1719
- Nn as SliderInterface,
1720
- Mn as TextInputInterface,
1721
- St as TextInputInterfaceComponent,
1722
- $n as TextareaInputInterface,
1723
- On as TupleInputInterface,
1724
- _n as addDefaultInterfaceTypes,
1725
- pn as addToolbarCommands,
1726
- Be as booleanType,
1727
- Tn as defineCodeNode,
1728
- En as defineDynamicCodeNode,
1729
- Mt as dictType,
1762
+ Kt as DotsVertical,
1763
+ St as DynamicCodeNode,
1764
+ Mn as IntegerInterface,
1765
+ ss as LayoutSidebarLeftCollapse,
1766
+ is as LayoutSidebarLeftExpand,
1767
+ us as LayoutSidebarRight,
1768
+ vs as LayoutSidebarRightCollapse,
1769
+ bs as LayoutSidebarRightExpand,
1770
+ On as ListInputInterface,
1771
+ ws as LockCode,
1772
+ Tn as NumberInterface,
1773
+ Ns as Schema,
1774
+ Ts as SchemaOff,
1775
+ En as SelectInterface,
1776
+ Bn as SliderInterface,
1777
+ Vn as TextInputInterface,
1778
+ zt as TextInputInterfaceComponent,
1779
+ zn as TextareaInputInterface,
1780
+ zs as TransitionBottom,
1781
+ Us as TrashOff,
1782
+ Sn as TupleInputInterface,
1783
+ Nn as addDefaultInterfaceTypes,
1784
+ bn as addToolbarCommands,
1785
+ Ve as booleanType,
1786
+ jn as defineCodeNode,
1787
+ Ln as defineDynamicCodeNode,
1788
+ $t as dictType,
1730
1789
  xt as formatInputs,
1731
1790
  oe as getCodeNodes,
1732
- Vn as getPositionAtColumn,
1733
- Bn as getPositionBeforeNode,
1734
- Se as listType,
1735
- Ve as loadNodeState,
1791
+ Un as getPositionAtColumn,
1792
+ Gn as getPositionBeforeNode,
1793
+ ze as listType,
1794
+ Be as loadNodeState,
1736
1795
  X as nodeType,
1737
1796
  de as numberType,
1738
1797
  It as saveNodeState,
1739
- yn as setOptional,
1798
+ In as setOptional,
1740
1799
  ue as stringType,
1741
- Sn as transferCodeScript,
1742
- ze as tupleType,
1743
- jn as useCodeGraph
1800
+ Rn as transferCodeScript,
1801
+ Se as tupleType,
1802
+ An as useCodeGraph
1744
1803
  };