@code0-tech/pictor 0.0.0-mvp.40 → 0.0.0-mvp.42

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 (56) hide show
  1. package/dist/assets/components/data-table/DataTable.style.css +1 -0
  2. package/dist/assets/components/menu/Menu.style.css +1 -1
  3. package/dist/components/d-flow/DFlow.service.js +80 -100
  4. package/dist/components/d-flow-data-type/DFlowDataType.service.js +6 -7
  5. package/dist/components/d-flow-data-type/rules/DFlowDataTypeContainsKeyRule.d.ts +1 -1
  6. package/dist/components/d-flow-data-type/rules/DFlowDataTypeContainsKeyRule.js +15 -15
  7. package/dist/components/d-flow-data-type/rules/DFlowDataTypeContainsTypeRule.d.ts +1 -1
  8. package/dist/components/d-flow-data-type/rules/DFlowDataTypeContainsTypeRule.js +17 -17
  9. package/dist/components/d-flow-data-type/rules/DFlowDataTypeParentRule.d.ts +1 -1
  10. package/dist/components/d-flow-data-type/rules/DFlowDataTypeParentRule.js +1 -1
  11. package/dist/components/d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.d.ts +2 -1
  12. package/dist/components/d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.js +87 -85
  13. package/dist/components/d-flow-data-type/rules/DFlowDataTypeRule.d.ts +2 -1
  14. package/dist/components/d-flow-function/DFlowFunction.input.hook.d.ts +2 -1
  15. package/dist/components/d-flow-function/DFlowFunction.input.hook.js +5 -5
  16. package/dist/components/d-flow-function/DFlowFunction.return.hook.d.ts +2 -1
  17. package/dist/components/d-flow-function/DFlowFunction.return.hook.js +5 -5
  18. package/dist/components/d-flow-input/DFlowInputDataTypeEditDialog.js +1 -1
  19. package/dist/components/d-flow-input/DFlowInputReferenceBadge.js +17 -17
  20. package/dist/components/d-flow-node/DFlowNode.return.hook.d.ts +5 -0
  21. package/dist/components/d-flow-node/DFlowNode.return.hook.js +27 -0
  22. package/dist/components/d-flow-suggestion/DFlowReferenceSuggestions.hook.js +90 -91
  23. package/dist/components/d-flow-validation/DDataTypeValidation.hook.js +1 -1
  24. package/dist/components/d-flow-validation/DNodeValidation.hook.js +33 -33
  25. package/dist/components/d-flow-validation/DValueValidation.hook.d.ts +2 -1
  26. package/dist/components/d-flow-validation/DValueValidation.hook.js +5 -5
  27. package/dist/components/d-project/DNamespaceProject.service.d.ts +2 -1
  28. package/dist/components/data-table/DataTable.d.ts +23 -0
  29. package/dist/components/data-table/DataTable.js +41 -0
  30. package/dist/components/data-table/DataTableColumn.d.ts +6 -0
  31. package/dist/components/data-table/DataTableColumn.js +22 -0
  32. package/dist/components/data-table/DataTableFilterInput.d.ts +18 -0
  33. package/dist/components/data-table/DataTableFilterInput.js +210 -0
  34. package/dist/components/data-table/DataTableFilterSuggestionMenu.d.ts +7 -0
  35. package/dist/components/data-table/DataTableFilterSuggestionMenu.js +53 -0
  36. package/dist/components/data-table/index.d.ts +4 -0
  37. package/dist/components/data-table/index.js +11 -0
  38. package/dist/components/editor/Editor.d.ts +9 -3
  39. package/dist/components/editor/Editor.js +249 -174
  40. package/dist/components/menu/Menu.d.ts +5 -1
  41. package/dist/components/menu/Menu.js +73 -57
  42. package/dist/index.d.ts +1 -0
  43. package/dist/index.js +182 -171
  44. package/dist/node_modules/@lezer/highlight/dist/index.js +132 -169
  45. package/dist/utils/generics.d.ts +2 -1
  46. package/dist/utils/generics.js +84 -80
  47. package/package.json +32 -21
  48. package/dist/node_modules/@codemirror/language/dist/index.js +0 -429
  49. package/dist/node_modules/@codemirror/lint/dist/index.js +0 -515
  50. package/dist/node_modules/@codemirror/state/dist/index.js +0 -2614
  51. package/dist/node_modules/@codemirror/view/dist/index.js +0 -6227
  52. package/dist/node_modules/@lezer/common/dist/index.js +0 -1357
  53. package/dist/node_modules/@marijn/find-cluster-break/src/index.js +0 -69
  54. package/dist/node_modules/crelt/index.js +0 -27
  55. package/dist/node_modules/style-mod/src/style-mod.js +0 -109
  56. package/dist/node_modules/w3c-keyname/index.js +0 -88
@@ -1,14 +1,15 @@
1
- import { genericMapping as I, staticImplements as A } from "./DFlowDataTypeRule.js";
2
- import { useDataTypeValidation as T } from "../../d-flow-validation/DDataTypeValidation.hook.js";
3
- import { useValueValidation as v } from "../../d-flow-validation/DValueValidation.hook.js";
4
- function P(r, e, t, n) {
5
- var i = k(), o = e(function(s) {
6
- i.initializeInstanceElements(s, a.elements);
7
- }, t), a = i.decorateClass(x(o.d.map(_)), r);
8
- return i.initializeClassElements(o.F, a.elements), i.runClassFinishers(o.F, a.finishers);
9
- }
10
- function k() {
11
- k = function() {
1
+ import { genericMapping as F, staticImplements as R } from "./DFlowDataTypeRule.js";
2
+ import { useDataTypeValidation as E } from "../../d-flow-validation/DDataTypeValidation.hook.js";
3
+ import { useValueValidation as w } from "../../d-flow-validation/DValueValidation.hook.js";
4
+ import { useReturnType as D } from "../../d-flow-function/DFlowFunction.return.hook.js";
5
+ function z(r, e, t, n) {
6
+ var i = P(), o = e(function(a) {
7
+ i.initializeInstanceElements(a, s.elements);
8
+ }, t), s = i.decorateClass(K(o.d.map(O)), r);
9
+ return i.initializeClassElements(o.F, s.elements), i.runClassFinishers(o.F, s.finishers);
10
+ }
11
+ function P() {
12
+ P = function() {
12
13
  return r;
13
14
  };
14
15
  var r = { elementsDefinitionOrder: [["method"], ["field"]], initializeInstanceElements: function(e, t) {
@@ -21,10 +22,10 @@ function k() {
21
22
  var n = e.prototype;
22
23
  ["method", "field"].forEach(function(i) {
23
24
  t.forEach(function(o) {
24
- var a = o.placement;
25
- if (o.kind === i && (a === "static" || a === "prototype")) {
26
- var s = a === "static" ? e : n;
27
- this.defineClassElement(s, o);
25
+ var s = o.placement;
26
+ if (o.kind === i && (s === "static" || s === "prototype")) {
27
+ var a = s === "static" ? e : n;
28
+ this.defineClassElement(a, o);
28
29
  }
29
30
  }, this);
30
31
  }, this);
@@ -37,38 +38,38 @@ function k() {
37
38
  Object.defineProperty(e, t.key, n);
38
39
  }, decorateClass: function(e, t) {
39
40
  var n = [], i = [], o = { static: [], prototype: [], own: [] };
40
- if (e.forEach(function(s) {
41
- this.addElementPlacement(s, o);
42
- }, this), e.forEach(function(s) {
43
- if (!y(s)) return n.push(s);
44
- var l = this.decorateElement(s, o);
41
+ if (e.forEach(function(a) {
42
+ this.addElementPlacement(a, o);
43
+ }, this), e.forEach(function(a) {
44
+ if (!v(a)) return n.push(a);
45
+ var l = this.decorateElement(a, o);
45
46
  n.push(l.element), n.push.apply(n, l.extras), i.push.apply(i, l.finishers);
46
47
  }, this), !t) return { elements: n, finishers: i };
47
- var a = this.decorateConstructor(n, t);
48
- return i.push.apply(i, a.finishers), a.finishers = i, a;
48
+ var s = this.decorateConstructor(n, t);
49
+ return i.push.apply(i, s.finishers), s.finishers = i, s;
49
50
  }, addElementPlacement: function(e, t, n) {
50
51
  var i = t[e.placement];
51
52
  if (!n && i.indexOf(e.key) !== -1) throw new TypeError("Duplicated element (" + e.key + ")");
52
53
  i.push(e.key);
53
54
  }, decorateElement: function(e, t) {
54
- for (var n = [], i = [], o = e.decorators, a = o.length - 1; a >= 0; a--) {
55
- var s = t[e.placement];
56
- s.splice(s.indexOf(e.key), 1);
57
- var l = this.fromElementDescriptor(e), p = this.toElementFinisherExtras((0, o[a])(l) || l);
58
- e = p.element, this.addElementPlacement(e, t), p.finisher && i.push(p.finisher);
59
- var c = p.extras;
55
+ for (var n = [], i = [], o = e.decorators, s = o.length - 1; s >= 0; s--) {
56
+ var a = t[e.placement];
57
+ a.splice(a.indexOf(e.key), 1);
58
+ var l = this.fromElementDescriptor(e), d = this.toElementFinisherExtras((0, o[s])(l) || l);
59
+ e = d.element, this.addElementPlacement(e, t), d.finisher && i.push(d.finisher);
60
+ var c = d.extras;
60
61
  if (c) {
61
- for (var d = 0; d < c.length; d++) this.addElementPlacement(c[d], t);
62
+ for (var p = 0; p < c.length; p++) this.addElementPlacement(c[p], t);
62
63
  n.push.apply(n, c);
63
64
  }
64
65
  }
65
66
  return { element: e, finishers: i, extras: n };
66
67
  }, decorateConstructor: function(e, t) {
67
68
  for (var n = [], i = t.length - 1; i >= 0; i--) {
68
- var o = this.fromClassDescriptor(e), a = this.toClassDescriptor((0, t[i])(o) || o);
69
- if (a.finisher !== void 0 && n.push(a.finisher), a.elements !== void 0) {
70
- e = a.elements;
71
- for (var s = 0; s < e.length - 1; s++) for (var l = s + 1; l < e.length; l++) if (e[s].key === e[l].key && e[s].placement === e[l].placement) throw new TypeError("Duplicated element (" + e[s].key + ")");
69
+ var o = this.fromClassDescriptor(e), s = this.toClassDescriptor((0, t[i])(o) || o);
70
+ if (s.finisher !== void 0 && n.push(s.finisher), s.elements !== void 0) {
71
+ e = s.elements;
72
+ for (var a = 0; a < e.length - 1; a++) for (var l = a + 1; l < e.length; l++) if (e[a].key === e[l].key && e[a].placement === e[l].placement) throw new TypeError("Duplicated element (" + e[a].key + ")");
72
73
  }
73
74
  }
74
75
  return { elements: e, finishers: n };
@@ -76,21 +77,21 @@ function k() {
76
77
  var t = { kind: e.kind, key: e.key, placement: e.placement, descriptor: e.descriptor };
77
78
  return Object.defineProperty(t, Symbol.toStringTag, { value: "Descriptor", configurable: !0 }), e.kind === "field" && (t.initializer = e.initializer), t;
78
79
  }, toElementDescriptors: function(e) {
79
- if (e !== void 0) return S(e).map(function(t) {
80
+ if (e !== void 0) return M(e).map(function(t) {
80
81
  var n = this.toElementDescriptor(t);
81
82
  return this.disallowProperty(t, "finisher", "An element descriptor"), this.disallowProperty(t, "extras", "An element descriptor"), n;
82
83
  }, this);
83
84
  }, toElementDescriptor: function(e) {
84
85
  var t = e.kind + "";
85
86
  if (t !== "method" && t !== "field") throw new TypeError(`An element descriptor's .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "` + t + '"');
86
- var n = E(e.key), i = e.placement + "";
87
+ var n = _(e.key), i = e.placement + "";
87
88
  if (i !== "static" && i !== "prototype" && i !== "own") throw new TypeError(`An element descriptor's .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "` + i + '"');
88
89
  var o = e.descriptor;
89
90
  this.disallowProperty(e, "elements", "An element descriptor");
90
- var a = { kind: t, key: n, placement: i, descriptor: Object.assign({}, o) };
91
- return t !== "field" ? this.disallowProperty(e, "initializer", "A method descriptor") : (this.disallowProperty(o, "get", "The property descriptor of a field descriptor"), this.disallowProperty(o, "set", "The property descriptor of a field descriptor"), this.disallowProperty(o, "value", "The property descriptor of a field descriptor"), a.initializer = e.initializer), a;
91
+ var s = { kind: t, key: n, placement: i, descriptor: Object.assign({}, o) };
92
+ return t !== "field" ? this.disallowProperty(e, "initializer", "A method descriptor") : (this.disallowProperty(o, "get", "The property descriptor of a field descriptor"), this.disallowProperty(o, "set", "The property descriptor of a field descriptor"), this.disallowProperty(o, "value", "The property descriptor of a field descriptor"), s.initializer = e.initializer), s;
92
93
  }, toElementFinisherExtras: function(e) {
93
- return { element: this.toElementDescriptor(e), finisher: g(e, "finisher"), extras: this.toElementDescriptors(e.extras) };
94
+ return { element: this.toElementDescriptor(e), finisher: I(e, "finisher"), extras: this.toElementDescriptors(e.extras) };
94
95
  }, fromClassDescriptor: function(e) {
95
96
  var t = { kind: "class", elements: e.map(this.fromElementDescriptor, this) };
96
97
  return Object.defineProperty(t, Symbol.toStringTag, { value: "Descriptor", configurable: !0 }), t;
@@ -98,7 +99,7 @@ function k() {
98
99
  var t = e.kind + "";
99
100
  if (t !== "class") throw new TypeError(`A class descriptor's .kind property must be "class", but a decorator created a class descriptor with .kind "` + t + '"');
100
101
  this.disallowProperty(e, "key", "A class descriptor"), this.disallowProperty(e, "placement", "A class descriptor"), this.disallowProperty(e, "descriptor", "A class descriptor"), this.disallowProperty(e, "initializer", "A class descriptor"), this.disallowProperty(e, "extras", "A class descriptor");
101
- var n = g(e, "finisher");
102
+ var n = I(e, "finisher");
102
103
  return { elements: this.toElementDescriptors(e.elements), finisher: n };
103
104
  }, runClassFinishers: function(e, t) {
104
105
  for (var n = 0; n < t.length; n++) {
@@ -114,51 +115,51 @@ function k() {
114
115
  } };
115
116
  return r;
116
117
  }
117
- function _(r) {
118
- var e, t = E(r.key);
118
+ function O(r) {
119
+ var e, t = _(r.key);
119
120
  r.kind === "method" ? e = { value: r.value, writable: !0, configurable: !0, enumerable: !1 } : r.kind === "get" ? e = { get: r.value, configurable: !0, enumerable: !1 } : r.kind === "set" ? e = { set: r.value, configurable: !0, enumerable: !1 } : r.kind === "field" && (e = { configurable: !0, writable: !0, enumerable: !0 });
120
121
  var n = { kind: r.kind === "field" ? "field" : "method", key: t, placement: r.static ? "static" : r.kind === "field" ? "own" : "prototype", descriptor: e };
121
122
  return r.decorators && (n.decorators = r.decorators), r.kind === "field" && (n.initializer = r.value), n;
122
123
  }
123
- function C(r, e) {
124
+ function j(r, e) {
124
125
  r.descriptor.get !== void 0 ? e.descriptor.get = r.descriptor.get : e.descriptor.set = r.descriptor.set;
125
126
  }
126
- function x(r) {
127
- for (var e = [], t = function(a) {
128
- return a.kind === "method" && a.key === o.key && a.placement === o.placement;
127
+ function K(r) {
128
+ for (var e = [], t = function(s) {
129
+ return s.kind === "method" && s.key === o.key && s.placement === o.placement;
129
130
  }, n = 0; n < r.length; n++) {
130
131
  var i, o = r[n];
131
132
  if (o.kind === "method" && (i = e.find(t)))
132
- if (b(o.descriptor) || b(i.descriptor)) {
133
- if (y(o) || y(i)) throw new ReferenceError("Duplicated methods (" + o.key + ") can't be decorated.");
133
+ if (T(o.descriptor) || T(i.descriptor)) {
134
+ if (v(o) || v(i)) throw new ReferenceError("Duplicated methods (" + o.key + ") can't be decorated.");
134
135
  i.descriptor = o.descriptor;
135
136
  } else {
136
- if (y(o)) {
137
- if (y(i)) throw new ReferenceError("Decorators can't be placed on different accessors with for the same property (" + o.key + ").");
137
+ if (v(o)) {
138
+ if (v(i)) throw new ReferenceError("Decorators can't be placed on different accessors with for the same property (" + o.key + ").");
138
139
  i.decorators = o.decorators;
139
140
  }
140
- C(o, i);
141
+ j(o, i);
141
142
  }
142
143
  else e.push(o);
143
144
  }
144
145
  return e;
145
146
  }
146
- function y(r) {
147
+ function v(r) {
147
148
  return r.decorators && r.decorators.length;
148
149
  }
149
- function b(r) {
150
+ function T(r) {
150
151
  return r !== void 0 && !(r.value === void 0 && r.writable === void 0);
151
152
  }
152
- function g(r, e) {
153
+ function I(r, e) {
153
154
  var t = r[e];
154
155
  if (t !== void 0 && typeof t != "function") throw new TypeError("Expected '" + e + "' to be a function");
155
156
  return t;
156
157
  }
157
- function E(r) {
158
- var e = F(r, "string");
158
+ function _(r) {
159
+ var e = N(r, "string");
159
160
  return typeof e == "symbol" ? e : e + "";
160
161
  }
161
- function F(r, e) {
162
+ function N(r, e) {
162
163
  if (typeof r != "object" || !r) return r;
163
164
  var t = r[Symbol.toPrimitive];
164
165
  if (t !== void 0) {
@@ -168,32 +169,32 @@ function F(r, e) {
168
169
  }
169
170
  return (e === "string" ? String : Number)(r);
170
171
  }
171
- function S(r) {
172
- return j(r) || O(r) || R(r) || z();
172
+ function M(r) {
173
+ return H(r) || G(r) || B(r) || W();
173
174
  }
174
- function z() {
175
+ function W() {
175
176
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
176
177
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
177
178
  }
178
- function R(r, e) {
179
+ function B(r, e) {
179
180
  if (r) {
180
- if (typeof r == "string") return w(r, e);
181
+ if (typeof r == "string") return A(r, e);
181
182
  var t = {}.toString.call(r).slice(8, -1);
182
- return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? w(r, e) : void 0;
183
+ return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? A(r, e) : void 0;
183
184
  }
184
185
  }
185
- function w(r, e) {
186
+ function A(r, e) {
186
187
  (e == null || e > r.length) && (e = r.length);
187
188
  for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t];
188
189
  return n;
189
190
  }
190
- function O(r) {
191
+ function G(r) {
191
192
  if (typeof Symbol < "u" && r[Symbol.iterator] != null || r["@@iterator"] != null) return Array.from(r);
192
193
  }
193
- function j(r) {
194
+ function H(r) {
194
195
  if (Array.isArray(r)) return r;
195
196
  }
196
- let W = P([A()], function(r) {
197
+ let J = z([R()], function(r) {
197
198
  class e {
198
199
  constructor() {
199
200
  r(this);
@@ -205,37 +206,38 @@ let W = P([A()], function(r) {
205
206
  kind: "method",
206
207
  static: !0,
207
208
  key: "validate",
208
- value: function(n, i, o, a, s) {
209
- const l = o?.get(i?.dataTypeIdentifier?.genericKey), p = o?.get(i?.dataTypeIdentifier?.genericKey)?.sourceDataTypeIdentifiers, c = o?.get(i?.dataTypeIdentifier?.genericKey)?.genericCombinationStrategies;
209
+ value: function(n, i, o, s, a, l) {
210
+ const d = o?.get(i?.dataTypeIdentifier?.genericKey), c = o?.get(i?.dataTypeIdentifier?.genericKey)?.sourceDataTypeIdentifiers, p = o?.get(i?.dataTypeIdentifier?.genericKey)?.genericCombinationStrategies;
210
211
  if (n.__typename != "NodeFunctionIdWrapper") return !1;
211
- if (i?.dataTypeIdentifier?.genericKey && !l && !a?.getDataType(i.dataTypeIdentifier)) return !0;
212
- const d = D(n, s);
213
- if (!d || !d?.parameters?.nodes?.[0]?.value || !(a?.getDataType(i.dataTypeIdentifier) || l) || l && !a?.hasDataTypes(p) || l && (c?.length ?? 0) + 1 != p.length) return !1;
214
- if (d?.parameters?.nodes?.[0]?.value?.__typename === "ReferenceValue") {
215
- if (i?.dataTypeIdentifier?.genericKey && l && p) {
216
- const u = p.map((f) => T(a?.getDataType(f), a?.getDataType((d?.parameters?.nodes?.[0]?.value).dataTypeIdentifier)));
217
- return u.length > 1 ? u.reduce((f, m, h) => c && c[h - 1].type == "OR" ? f || m : f && m) : u[0];
212
+ if (i?.dataTypeIdentifier?.genericKey && !d && !a?.getDataType(i.dataTypeIdentifier)) return !0;
213
+ const u = C(n, s);
214
+ if (!u || !u?.parameters?.nodes?.[0]?.value || !(a?.getDataType(i.dataTypeIdentifier) || d) || d && !a?.hasDataTypes(c) || d && (p?.length ?? 0) + 1 != c.length) return !1;
215
+ if (u?.parameters?.nodes?.[0]?.value?.__typename === "ReferenceValue") {
216
+ const h = u?.parameters?.nodes?.[0]?.value, f = s?.nodes?.nodes?.find((m) => m?.id === h.nodeFunctionId), y = l?.getById(f?.functionDefinition?.id), b = f.parameters?.nodes?.map((m) => m?.value) ?? [];
217
+ if (i?.dataTypeIdentifier?.genericKey && d && c) {
218
+ const m = c.map((g) => E(a?.getDataType(g), a?.getDataType(D(y, b, a, l))));
219
+ return m.length > 1 ? m.reduce((g, k, x) => p && p[x - 1].type == "OR" ? g || k : g && k) : m[0];
218
220
  }
219
221
  if (i?.dataTypeIdentifier?.dataType)
220
- return T(a?.getDataType(i.dataTypeIdentifier), a?.getDataType(d?.parameters?.nodes?.[0]?.value?.dataTypeIdentifier));
221
- } else if (d?.parameters?.nodes?.[0]?.value?.__typename != "NodeFunctionIdWrapper") {
222
- if (i?.dataTypeIdentifier?.genericKey && l && p) {
223
- const u = p.map((f) => v(d?.parameters?.nodes?.[0]?.value, a?.getDataType(f), a, s, f.genericType.genericMappers));
224
- return u.length > 1 ? u.reduce((f, m, h) => c && c[h - 1].type == "OR" ? f || m : f && m) : u[0];
222
+ return E(a?.getDataType(i.dataTypeIdentifier), a?.getDataType(D(y, b, a, l)));
223
+ } else if (u?.parameters?.nodes?.[0]?.value?.__typename != "NodeFunctionIdWrapper") {
224
+ if (i?.dataTypeIdentifier?.genericKey && d && c) {
225
+ const h = c.map((f) => w(u?.parameters?.nodes?.[0]?.value, a?.getDataType(f), a, s, f.genericType.genericMappers));
226
+ return h.length > 1 ? h.reduce((f, y, b) => p && p[b - 1].type == "OR" ? f || y : f && y) : h[0];
225
227
  }
226
- return i?.dataTypeIdentifier?.dataType ? v(d?.parameters?.nodes?.[0]?.value, a?.getDataType(i.dataTypeIdentifier), a) : v(d?.parameters?.nodes?.[0]?.value, a?.getDataType(i.dataTypeIdentifier), a, s, I(i.dataTypeIdentifier?.genericType?.genericMappers, o));
228
+ return i?.dataTypeIdentifier?.dataType ? w(u?.parameters?.nodes?.[0]?.value, a?.getDataType(i.dataTypeIdentifier), a) : w(u?.parameters?.nodes?.[0]?.value, a?.getDataType(i.dataTypeIdentifier), a, s, F(i.dataTypeIdentifier?.genericType?.genericMappers, o));
227
229
  }
228
230
  return !1;
229
231
  }
230
232
  }]
231
233
  };
232
234
  });
233
- const D = (r, e) => {
235
+ const C = (r, e) => {
234
236
  const t = e.nodes?.nodes?.find((n) => n?.id === r.id);
235
237
  if (t) {
236
238
  if (t?.functionDefinition?.runtimeFunctionDefinition?.identifier === "std::control::return") return t;
237
239
  if (t && t.nextNodeId) {
238
- const n = D({
240
+ const n = C({
239
241
  id: t.nextNodeId
240
242
  }, e);
241
243
  if (n) return n;
@@ -243,6 +245,6 @@ const D = (r, e) => {
243
245
  }
244
246
  };
245
247
  export {
246
- W as DFlowDataTypeReturnTypeRule,
247
- D as findReturnNode
248
+ J as DFlowDataTypeReturnTypeRule,
249
+ C as findReturnNode
248
250
  };
@@ -1,7 +1,8 @@
1
1
  import { DFlowDataTypeReactiveService } from '../DFlowDataType.service';
2
2
  import { Flow, GenericMapper, NodeParameterValue } from '@code0-tech/sagittarius-graphql-types';
3
+ import { DFlowFunctionReactiveService } from '../../d-flow-function';
3
4
  export interface DFlowDataTypeRule {
4
- validate(value: NodeParameterValue, config: object, generics?: Map<string, GenericMapper>, service?: DFlowDataTypeReactiveService, flow?: Flow): boolean;
5
+ validate(value: NodeParameterValue, config: object, generics?: Map<string, GenericMapper>, flow?: Flow, dataTypeService?: DFlowDataTypeReactiveService, functionService?: DFlowFunctionReactiveService): boolean;
5
6
  }
6
7
  export declare const staticImplements: <T>() => <U extends T>(constructor: U) => U;
7
8
  export declare const genericMapping: (to?: GenericMapper[], from?: Map<string, GenericMapper>) => GenericMapper[] | undefined;
@@ -1,4 +1,5 @@
1
1
  import { FunctionDefinitionView } from './DFlowFunction.view';
2
2
  import { DFlowDataTypeReactiveService } from '../d-flow-data-type';
3
3
  import { DataTypeIdentifier, NodeParameterValue } from '@code0-tech/sagittarius-graphql-types';
4
- export declare const useInputType: (type: DataTypeIdentifier, func: FunctionDefinitionView, values: NodeParameterValue[], dataTypeService: DFlowDataTypeReactiveService) => DataTypeIdentifier | null;
4
+ import { DFlowFunctionReactiveService } from './DFlowFunction.service';
5
+ export declare const useInputType: (type: DataTypeIdentifier, func: FunctionDefinitionView, values: NodeParameterValue[], dataTypeService: DFlowDataTypeReactiveService, functionService: DFlowFunctionReactiveService) => DataTypeIdentifier | null;
@@ -1,8 +1,8 @@
1
- import { resolveGenericKeys as o, replaceGenericKeysInType as s } from "../../utils/generics.js";
2
- const y = (e, r, n, p) => {
3
- const c = o(r, n, p);
4
- return s(e, c);
1
+ import { resolveGenericKeys as s, replaceGenericKeysInType as t } from "../../utils/generics.js";
2
+ const i = (e, r, n, p, c) => {
3
+ const o = s(r, n, p, c);
4
+ return t(e, o);
5
5
  };
6
6
  export {
7
- y as useInputType
7
+ i as useInputType
8
8
  };
@@ -1,4 +1,5 @@
1
1
  import { FunctionDefinitionView } from './DFlowFunction.view';
2
2
  import { DFlowDataTypeReactiveService } from '../d-flow-data-type';
3
3
  import { DataTypeIdentifier, NodeParameterValue } from '@code0-tech/sagittarius-graphql-types';
4
- export declare const useReturnType: (func: FunctionDefinitionView, values: NodeParameterValue[], dataTypeService: DFlowDataTypeReactiveService) => DataTypeIdentifier | null;
4
+ import { DFlowFunctionReactiveService } from './DFlowFunction.service';
5
+ export declare const useReturnType: (func: FunctionDefinitionView, values: NodeParameterValue[], dataTypeService: DFlowDataTypeReactiveService, functionService: DFlowFunctionReactiveService) => DataTypeIdentifier | null;
@@ -1,9 +1,9 @@
1
- import { resolveGenericKeys as t, replaceGenericKeysInType as y } from "../../utils/generics.js";
2
- const s = (e, r, n) => {
1
+ import { resolveGenericKeys as y, replaceGenericKeysInType as o } from "../../utils/generics.js";
2
+ const i = (e, r, n, p) => {
3
3
  if (!e?.returnType) return null;
4
- const p = t(e, r, n);
5
- return y(e.returnType, p);
4
+ const t = y(e, r, n, p);
5
+ return o(e.returnType, t);
6
6
  };
7
7
  export {
8
- s as useReturnType
8
+ i as useReturnType
9
9
  };
@@ -14,7 +14,7 @@ import { hashToColor as s } from "../d-flow/DFlow.util.js";
14
14
  import { ScrollArea as U, ScrollAreaViewport as X, ScrollAreaScrollbar as f, ScrollAreaThumb as h } from "../scroll-area/ScrollArea.js";
15
15
  import { Spacing as g } from "../spacing/Spacing.js";
16
16
  import { Badge as c } from "../badge/Badge.js";
17
- import { syntaxTree as T } from "../../node_modules/@codemirror/language/dist/index.js";
17
+ import { syntaxTree as T } from "@codemirror/language";
18
18
  import { Button as q } from "../button/Button.js";
19
19
  import { IconX as J } from "@tabler/icons-react";
20
20
  const ue = (i) => {
@@ -1,33 +1,33 @@
1
- import { jsxs as i, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
2
  import { Badge as c } from "../badge/Badge.js";
3
- import l from "react";
4
- import { Text as m } from "../text/Text.js";
3
+ import m from "react";
4
+ import { Text as a } from "../text/Text.js";
5
5
  import { Flex as f } from "../flex/Flex.js";
6
- import { DFlowInputNodeBadge as s } from "./DFlowInputNodeBadge.js";
7
- import { IconVariable as u } from "@tabler/icons-react";
8
- const w = (o) => {
6
+ import { DFlowInputNodeBadge as u } from "./DFlowInputNodeBadge.js";
7
+ import { IconVariable as s } from "@tabler/icons-react";
8
+ const T = (t) => {
9
9
  const {
10
10
  value: e,
11
- flowId: t,
12
- definition: p,
11
+ flowId: r,
12
+ definition: o,
13
13
  ...d
14
- } = o, a = l.useMemo(() => e.nodeFunctionId && t ? /* @__PURE__ */ i(f, { align: "center", display: "inline-flex", children: [
15
- /* @__PURE__ */ r(s, { definition: p, value: {
14
+ } = t, p = m.useMemo(() => e.nodeFunctionId && r ? /* @__PURE__ */ i(f, { align: "center", display: "inline-flex", children: [
15
+ /* @__PURE__ */ n(u, { definition: o, value: {
16
16
  id: e.nodeFunctionId,
17
17
  __typename: "NodeFunctionIdWrapper"
18
- }, flowId: t }),
18
+ }, flowId: r }),
19
19
  "inputTypeIdentifier" in e && e.inputTypeIdentifier ? "." + e.inputTypeIdentifier : "",
20
- e.referencePath ? "." + (e.referencePath?.map((n) => n.path).join(".") ?? "") : ""
21
- ] }) : `{{ ${String(e.depth)}-${String(e.scope)}-${String(e.node)}-${e.referencePath?.map((n) => n.path).join(".") ?? ""} }}`, [e]);
20
+ e.referencePath ? "." + (e.referencePath?.map((l) => l.path).join(".") ?? "") : ""
21
+ ] }) : "undefineds", [e]);
22
22
  return /* @__PURE__ */ i(c, { style: {
23
23
  verticalAlign: "middle"
24
24
  }, color: "warning", py: "0", border: !0, ...d, children: [
25
- /* @__PURE__ */ r(u, { size: 12 }),
26
- /* @__PURE__ */ r(m, { size: "sm", style: {
25
+ /* @__PURE__ */ n(s, { size: 12 }),
26
+ /* @__PURE__ */ n(a, { size: "sm", style: {
27
27
  color: "inherit"
28
- }, children: a })
28
+ }, children: p })
29
29
  ] });
30
30
  };
31
31
  export {
32
- w as DFlowInputReferenceBadge
32
+ T as DFlowInputReferenceBadge
33
33
  };
@@ -0,0 +1,5 @@
1
+ import { DataTypeIdentifier, Flow, NodeFunction } from '@code0-tech/sagittarius-graphql-types';
2
+ import { DFlowFunctionReactiveService } from '../d-flow-function';
3
+ import { DFlowDataTypeReactiveService } from '../d-flow-data-type';
4
+ export declare const useReturnTypes: (flowId: Flow["id"]) => Map<NodeFunction["id"], DataTypeIdentifier | null>;
5
+ export declare function getReturnTypesForFlow(flow: Flow, functionService: DFlowFunctionReactiveService, dataTypeService: DFlowDataTypeReactiveService): Map<NodeFunction['id'], DataTypeIdentifier | null>;
@@ -0,0 +1,27 @@
1
+ import { resolveGenericKeys as v, replaceGenericKeysInType as S } from "../../utils/generics.js";
2
+ import { useService as p, useStore as u } from "../../utils/contextStore.js";
3
+ import T from "react";
4
+ import "merge-props";
5
+ import { DFlowFunctionReactiveService as m } from "../d-flow-function/DFlowFunction.service.js";
6
+ import "js-md5";
7
+ import { DFlowDataTypeReactiveService as w } from "../d-flow-data-type/DFlowDataType.service.js";
8
+ import "../d-flow/DFlow.js";
9
+ import { DFlowReactiveService as a } from "../d-flow/DFlow.service.js";
10
+ const h = (t) => {
11
+ const r = p(a), n = u(a), c = p(m), o = u(m), e = p(w);
12
+ return T.useMemo(() => {
13
+ const i = r.getById(t);
14
+ return d(i, c, e);
15
+ }, [t, n, o, e]);
16
+ };
17
+ function d(t, r, n) {
18
+ const c = t?.nodes?.nodes, o = /* @__PURE__ */ new Map();
19
+ return c?.forEach((e) => {
20
+ const i = e?.parameters?.nodes?.map((y) => y?.value) ?? [], s = r.getById(e?.functionDefinition?.id), f = v(s, i, n, r), l = s?.returnType ? S(s.returnType, f) : null;
21
+ e?.id && o.set(e.id, l);
22
+ }), o;
23
+ }
24
+ export {
25
+ d as getReturnTypesForFlow,
26
+ h as useReturnTypes
27
+ };