@code0-tech/pictor 0.0.0-mvp.29 → 0.0.0-mvp.30

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 (125) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +6 -0
  2. package/dist/_virtual/index.js +4 -0
  3. package/dist/_virtual/index2.js +4 -0
  4. package/dist/_virtual/react-contenteditable.js +7 -0
  5. package/dist/_virtual/react-contenteditable2.js +4 -0
  6. package/dist/_virtual/react-dom-server-legacy.browser.development.js +4 -0
  7. package/dist/_virtual/react-dom-server-legacy.browser.production.js +4 -0
  8. package/dist/_virtual/react-dom-server.browser.development.js +4 -0
  9. package/dist/_virtual/react-dom-server.browser.production.js +4 -0
  10. package/dist/_virtual/react-is.development.js +4 -0
  11. package/dist/_virtual/react-is.production.min.js +4 -0
  12. package/dist/_virtual/server.browser.js +5 -0
  13. package/dist/_virtual/server.browser2.js +4 -0
  14. package/dist/assets/components/d-resizable/DResizable.style.css +1 -1
  15. package/dist/assets/components/form/Input.style.css +1 -1
  16. package/dist/components/breadcrumb/Breadcrumb.js +12 -12
  17. package/dist/components/button-group/ButtonGroup.js +12 -12
  18. package/dist/components/d-flow/DFlow.edges.hook.js +57 -54
  19. package/dist/components/d-flow/DFlow.js +304 -268
  20. package/dist/components/d-flow/DFlow.nodes.hook.js +60 -59
  21. package/dist/components/d-flow/DFlow.service.d.ts +3 -2
  22. package/dist/components/d-flow/DFlow.service.js +62 -47
  23. package/dist/components/d-flow/DFlow.util.d.ts +4 -0
  24. package/dist/components/d-flow/DFlow.util.js +63 -0
  25. package/dist/components/d-flow/DFlowEdge.js +34 -34
  26. package/dist/components/d-flow-data-type/DFlowDataType.service.js +17 -14
  27. package/dist/components/d-flow-data-type/DFlowDataType.view.d.ts +7 -4
  28. package/dist/components/d-flow-data-type/DFlowDataType.view.js +11 -6
  29. package/dist/components/d-flow-file/DFlowTabDefault.d.ts +0 -3
  30. package/dist/components/d-flow-file/DFlowTabDefault.js +77 -112
  31. package/dist/components/d-flow-file/DFlowTabTrigger.js +38 -49
  32. package/dist/components/d-flow-file/DFlowTabs.js +26 -27
  33. package/dist/components/d-flow-folder/DFlowFolder.js +170 -143
  34. package/dist/components/d-flow-folder/DFlowFolderContextMenu.js +18 -11
  35. package/dist/components/d-flow-folder/DFlowFolderItemPathInput.js +1 -0
  36. package/dist/components/d-flow-function/DFlowFunction.input.hook.js +4 -5
  37. package/dist/components/d-flow-function/DFlowFunction.return.hook.js +1 -1
  38. package/dist/components/d-flow-function/DFlowFunction.view.d.ts +14 -11
  39. package/dist/components/d-flow-function/DFlowFunction.view.js +19 -12
  40. package/dist/components/d-flow-function/DFlowFunctionDefaultCard.js +72 -75
  41. package/dist/components/d-flow-function/DFlowFunctionSuggestionCard.js +27 -32
  42. package/dist/components/d-flow-function/DFlowFunctionTriggerCard.js +17 -10
  43. package/dist/components/d-flow-input/DFlowInputDataType.js +38 -33
  44. package/dist/components/d-flow-input/DFlowInputDefault.d.ts +10 -0
  45. package/dist/components/d-flow-input/DFlowInputDefault.js +128 -0
  46. package/dist/components/d-flow-input/DFlowInputLiteralBadge.d.ts +7 -0
  47. package/dist/components/d-flow-input/DFlowInputLiteralBadge.js +24 -0
  48. package/dist/components/d-flow-input/DFlowInputNodeBadge.d.ts +11 -0
  49. package/dist/components/d-flow-input/DFlowInputNodeBadge.js +44 -0
  50. package/dist/components/d-flow-input/DFlowInputReferenceBadge.d.ts +11 -0
  51. package/dist/components/d-flow-input/DFlowInputReferenceBadge.js +33 -0
  52. package/dist/components/d-flow-panel/DFlowExport.js +1 -1
  53. package/dist/components/d-flow-panel/DFlowMiniMap.js +1 -1
  54. package/dist/components/d-flow-panel/DFlowPanelControl.js +34 -32
  55. package/dist/components/d-flow-suggestion/DFlowDataTypeSuggestions.hook.d.ts +3 -0
  56. package/dist/components/d-flow-suggestion/DFlowDataTypeSuggestions.hook.js +34 -0
  57. package/dist/components/d-flow-suggestion/DFlowFunctionSuggestions.hook.d.ts +3 -0
  58. package/dist/components/d-flow-suggestion/DFlowFunctionSuggestions.hook.js +50 -0
  59. package/dist/components/d-flow-suggestion/DFlowReferenceSuggestions.hook.d.ts +3 -0
  60. package/dist/components/d-flow-suggestion/DFlowReferenceSuggestions.hook.js +133 -0
  61. package/dist/components/d-flow-suggestion/DFlowSuggestion.hook.d.ts +3 -18
  62. package/dist/components/d-flow-suggestion/DFlowSuggestion.hook.js +19 -156
  63. package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.js +47 -58
  64. package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.util.js +5 -4
  65. package/dist/components/d-flow-suggestion/DFlowSuggestionSearchInput.js +6 -6
  66. package/dist/components/d-flow-suggestion/DFlowValueSuggestions.hook.d.ts +3 -0
  67. package/dist/components/d-flow-suggestion/DFlowValueSuggestions.hook.js +44 -0
  68. package/dist/components/d-flow-type/DFlowType.view.d.ts +5 -5
  69. package/dist/components/d-flow-type/DFlowType.view.js +22 -12
  70. package/dist/components/d-flow-validation/DFlowValidation.hook.js +1 -1
  71. package/dist/components/d-flow-validation/DNodeValidation.hook.js +39 -43
  72. package/dist/components/d-resizable/DResizable.d.ts +4 -4
  73. package/dist/components/d-resizable/DResizable.js +22 -21
  74. package/dist/components/d-user/DUserInput.js +23 -21
  75. package/dist/components/file-tabs/FileTabs.service.d.ts +0 -1
  76. package/dist/components/file-tabs/FileTabs.service.js +49 -53
  77. package/dist/components/form/EmailInput.js +9 -9
  78. package/dist/components/form/Input.d.ts +2 -1
  79. package/dist/components/form/Input.js +294 -397
  80. package/dist/components/form/Input.syntax.hook.d.ts +1 -18
  81. package/dist/components/form/Input.syntax.hook.js +7 -73
  82. package/dist/components/form/Input.utils.d.ts +1 -2
  83. package/dist/components/form/Input.utils.js +26 -21
  84. package/dist/components/form/InputContentEditable.hook.d.ts +40 -0
  85. package/dist/components/form/InputContentEditable.hook.js +471 -0
  86. package/dist/components/form/InputSuggestion.d.ts +2 -2
  87. package/dist/components/form/InputSuggestion.js +169 -107
  88. package/dist/components/form/PasswordInput.js +8 -8
  89. package/dist/components/form/TextInput.js +11 -11
  90. package/dist/components/form/useForm.d.ts +1 -0
  91. package/dist/components/form/useForm.js +45 -60
  92. package/dist/components/menu/Menu.js +4 -4
  93. package/dist/index.js +155 -154
  94. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +30 -30
  95. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +8 -8
  96. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +8 -8
  97. package/dist/node_modules/fast-deep-equal/index.js +31 -0
  98. package/dist/node_modules/object-assign/index.js +49 -0
  99. package/dist/node_modules/prop-types/checkPropTypes.js +54 -0
  100. package/dist/node_modules/prop-types/factoryWithThrowingShims.js +52 -0
  101. package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +329 -0
  102. package/dist/node_modules/prop-types/index.js +17 -0
  103. package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +10 -0
  104. package/dist/node_modules/prop-types/lib/has.js +7 -0
  105. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +87 -0
  106. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +70 -0
  107. package/dist/node_modules/prop-types/node_modules/react-is/index.js +10 -0
  108. package/dist/node_modules/react-contenteditable/lib/react-contenteditable.js +132 -0
  109. package/dist/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js +6235 -0
  110. package/dist/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +4096 -0
  111. package/dist/node_modules/react-dom/cjs/react-dom-server.browser.development.js +6753 -0
  112. package/dist/node_modules/react-dom/cjs/react-dom-server.browser.production.js +4645 -0
  113. package/dist/node_modules/react-dom/server.browser.js +15 -0
  114. package/dist/utils/generics.d.ts +2 -0
  115. package/dist/utils/generics.js +93 -80
  116. package/dist/utils/index.js +22 -21
  117. package/dist/utils/inspection.d.ts +4 -2
  118. package/dist/utils/inspection.js +27 -2
  119. package/package.json +10 -8
  120. package/dist/components/form/Input.selection.hook.d.ts +0 -17
  121. package/dist/components/form/Input.selection.hook.js +0 -78
  122. package/dist/components/form/InputSyntax.d.ts +0 -19
  123. package/dist/components/form/InputSyntax.js +0 -52
  124. package/dist/components/form/inputSyntaxMapping.d.ts +0 -3
  125. package/dist/components/form/inputSyntaxMapping.js +0 -42
@@ -1,181 +1,208 @@
1
- import { jsxs as k, Fragment as R, jsx as c } from "react/jsx-runtime";
2
- import { c as T } from "../../_virtual/compiler-runtime.js";
1
+ import { jsxs as R, Fragment as B, jsx as a } from "react/jsx-runtime";
2
+ import { c as E } from "../../_virtual/compiler-runtime.js";
3
3
  import '../../assets/components/d-flow-folder/DFlowFolder.style.css';/* empty css */
4
4
  import p from "react";
5
- import { useService as E, useStore as H } from "../../utils/contextStore.js";
6
- import { mergeCode0Props as j } from "../../utils/utils.js";
7
- import { IconFolderOpen as N, IconFolderFilled as G, IconDots as V, IconChevronDown as q, IconChevronRight as J, IconFile as K } from "@tabler/icons-react";
5
+ import { useService as V, useStore as q } from "../../utils/contextStore.js";
6
+ import { mergeCode0Props as N } from "../../utils/utils.js";
7
+ import { IconFolderOpen as J, IconFolderFilled as K, IconChevronDown as L, IconChevronRight as Q, IconFile as U } from "@tabler/icons-react";
8
8
  import "../d-flow/DFlow.js";
9
- import { DFlowReactiveService as A } from "../d-flow/DFlow.service.js";
9
+ import { DFlowReactiveService as z } from "../d-flow/DFlow.service.js";
10
+ import { hashToColor as W } from "../d-flow/DFlow.util.js";
10
11
  import "../d-flow-data-type/rules/DFlowDataTypeRegexRule.js";
11
12
  import "../d-flow-data-type/rules/DFlowDataTypeNumberRangeRule.js";
12
13
  import "../d-flow-data-type/rules/DFlowDataTypeItemOfCollectionRule.js";
13
14
  import "../d-flow-data-type/rules/DFlowDataTypeContainsTypeRule.js";
14
15
  import "../d-flow-data-type/rules/DFlowDataTypeContainsKeyRule.js";
15
16
  import "../d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.js";
16
- import { md5 as L } from "js-md5";
17
- import { ScrollArea as Q, ScrollAreaViewport as U, ScrollAreaScrollbar as W, ScrollAreaThumb as X } from "../scroll-area/ScrollArea.js";
18
- import { Flex as z } from "../flex/Flex.js";
19
- import { Text as P } from "../text/Text.js";
20
- import { Button as M } from "../button/Button.js";
21
- import { DFlowFolderContextMenu as B } from "./DFlowFolderContextMenu.js";
22
- const be = p.forwardRef((h, e) => {
17
+ import { ScrollArea as X, ScrollAreaViewport as Y, ScrollAreaScrollbar as Z, ScrollAreaThumb as ee } from "../scroll-area/ScrollArea.js";
18
+ import { Flex as T } from "../flex/Flex.js";
19
+ import { Text as G } from "../text/Text.js";
20
+ import { Button as te } from "../button/Button.js";
21
+ import { DFlowFolderContextMenu as H } from "./DFlowFolderContextMenu.js";
22
+ const Oe = p.forwardRef((I, e) => {
23
23
  const {
24
- activeFlowId: i,
25
- namespaceId: _,
26
- projectId: S
27
- } = h, $ = E(A), u = H(A), v = (l) => l.replace(/^\/+|\/+$/g, "").split("/").filter(Boolean), o = p.useMemo(() => ($.values?.({
28
- namespaceId: _,
29
- projectId: S
30
- }) ?? []).filter((n) => !!n?.name), [u]), b = p.useMemo(() => {
31
- const l = o.find((n) => n.id === i);
32
- return l?.name ? v(l.name) : [];
33
- }, [o, i]), D = p.useMemo(() => {
24
+ activeFlowId: s,
25
+ namespaceId: d,
26
+ projectId: v
27
+ } = I, D = V(z), h = q(z), u = (l) => l.replace(/^\/+|\/+$/g, "").split("/").filter(Boolean), f = p.useMemo(() => (D.values?.({
28
+ namespaceId: d,
29
+ projectId: v
30
+ }) ?? []).filter((r) => !!r?.name), [h]), w = p.useMemo(() => {
31
+ const l = f.find((r) => r.id === s);
32
+ return l?.name ? u(l.name) : [];
33
+ }, [f, s]), C = p.useMemo(() => {
34
34
  const l = {
35
35
  name: "",
36
36
  path: "",
37
37
  children: {}
38
38
  };
39
- for (const n of o) {
40
- const w = v(n.name);
41
- if (w.length === 0) continue;
42
- let r = l, t = "";
43
- for (let O = 0; O < w.length; O++) {
44
- const x = w[O];
45
- t = t ? `${t}/${x}` : x, O === w.length - 1 ? r.children[x] ? r.children[x].flow = n : r.children[x] = {
46
- name: x,
39
+ for (const r of f) {
40
+ const c = u(r.name);
41
+ if (c.length === 0) continue;
42
+ let o = l, t = "";
43
+ for (let i = 0; i < c.length; i++) {
44
+ const n = c[i];
45
+ t = t ? `${t}/${n}` : n, i === c.length - 1 ? o.children[n] ? o.children[n].flow = r : o.children[n] = {
46
+ name: n,
47
47
  path: t,
48
48
  children: {},
49
- flow: n
50
- } : (r.children[x] || (r.children[x] = {
51
- name: x,
49
+ flow: r
50
+ } : (o.children[n] || (o.children[n] = {
51
+ name: n,
52
52
  path: t,
53
53
  children: {}
54
- }), r = r.children[x]);
54
+ }), o = o.children[n]);
55
55
  }
56
56
  }
57
57
  return l;
58
- }, [o]), a = p.useCallback((l) => l ? l.split("/").filter(Boolean).every((w, r) => b[r] === w) : !1, [b]), [s, m] = p.useState("default"), [C, g] = p.useState(0), d = p.useCallback(() => {
59
- m("allOpen"), g((l) => l + 1);
60
- }, []), f = p.useCallback(() => {
61
- m("allClosed"), g((l) => l + 1);
62
- }, []), I = p.useCallback(() => {
63
- m("activePath"), g((l) => l + 1);
58
+ }, [f]), P = p.useCallback((l) => l ? l.split("/").filter(Boolean).every((c, o) => w[o] === c) : !1, [w]), [S, _] = p.useState("default"), [m, F] = p.useState(0), g = p.useCallback(() => {
59
+ _("allOpen"), F((l) => l + 1);
60
+ }, []), k = p.useCallback(() => {
61
+ _("allClosed"), F((l) => l + 1);
62
+ }, []), y = p.useCallback(() => {
63
+ _("activePath"), F((l) => l + 1);
64
64
  }, []);
65
65
  p.useImperativeHandle(e, () => ({
66
- openAll: d,
67
- closeAll: f,
68
- openActivePath: I
69
- }), [d, f, I]);
70
- const y = p.useCallback((l) => s === "allOpen" ? !0 : s === "allClosed" ? !1 : a(l), [a, s]), F = p.useCallback((l) => {
71
- const n = Object.values(l), w = n.filter((t) => !t.flow), r = n.filter((t) => !!t.flow);
72
- return w.sort((t, O) => t.name.localeCompare(O.name)), r.sort((t, O) => t.name.localeCompare(O.name)), /* @__PURE__ */ k(R, { children: [
73
- w.map((t) => /* @__PURE__ */ c(Y, { name: t.name, flows: Object.values(t.children).map((O) => O.flow), defaultOpen: y(t.path), ...h, children: F(t.children) }, `${t.path}-${C}`)),
74
- r.map((t) => /* @__PURE__ */ c(Z, { name: t.name, path: t.path, flow: t.flow, active: t.flow.id === i, "data-flow-id": t.flow.id ?? void 0, ...h }, t.flow.id ?? t.path))
66
+ openAll: g,
67
+ closeAll: k,
68
+ openActivePath: y
69
+ }), [g, k, y]);
70
+ const b = p.useCallback((l) => S === "allOpen" ? !0 : S === "allClosed" ? !1 : P(l), [P, S]), x = p.useCallback((l) => {
71
+ const r = Object.values(l), c = r.filter((t) => !t.flow), o = r.filter((t) => !!t.flow);
72
+ return c.sort((t, i) => t.name.localeCompare(i.name)), o.sort((t, i) => t.name.localeCompare(i.name)), /* @__PURE__ */ R(B, { children: [
73
+ c.map((t) => /* @__PURE__ */ a(le, { name: t.name, flows: Object.values(t.children).map((i) => i.flow), defaultOpen: b(t.path), ...I, children: x(t.children) }, `${t.path}-${m}`)),
74
+ o.map((t) => /* @__PURE__ */ a(oe, { name: t.name, path: t.path, flow: t.flow, active: t.flow.id === s, "data-flow-id": t.flow.id ?? void 0, ...I }, t.flow.id ?? t.path))
75
75
  ] });
76
- }, [i, y, C]);
77
- return /* @__PURE__ */ k(Q, { h: "100%", children: [
78
- /* @__PURE__ */ c(U, { children: /* @__PURE__ */ c("div", { className: "d-folder__root", children: F(D.children) }) }),
79
- /* @__PURE__ */ c(W, { orientation: "vertical", children: /* @__PURE__ */ c(X, {}) })
76
+ }, [s, b, m]);
77
+ return /* @__PURE__ */ R(X, { h: "100%", children: [
78
+ /* @__PURE__ */ a(Y, { children: /* @__PURE__ */ a("div", { className: "d-folder__root", children: x(C.children) }) }),
79
+ /* @__PURE__ */ a(Z, { orientation: "vertical", children: /* @__PURE__ */ a(ee, {}) })
80
80
  ] });
81
- }), Y = (h) => {
82
- const e = T.c(31), {
83
- name: i,
84
- flows: _,
85
- defaultOpen: S,
86
- children: $,
87
- ...u
88
- } = h, v = S === void 0 ? !1 : S, [o, b] = p.useState(v), D = B;
89
- let a;
90
- e[0] !== _ || e[1] !== i ? (a = {
91
- name: i,
92
- flow: _,
81
+ }), le = (I) => {
82
+ const e = E.c(37), {
83
+ name: s,
84
+ flows: d,
85
+ defaultOpen: v,
86
+ children: D,
87
+ onCreate: h,
88
+ onDelete: u,
89
+ onRename: f,
90
+ activeFlowId: w,
91
+ namespaceId: C,
92
+ projectId: P,
93
+ ...S
94
+ } = I, _ = v === void 0 ? !1 : v, [m, F] = p.useState(_);
95
+ let g;
96
+ e[0] !== w || e[1] !== C || e[2] !== h || e[3] !== u || e[4] !== f || e[5] !== P ? (g = {
97
+ onCreate: h,
98
+ onDelete: u,
99
+ onRename: f,
100
+ activeFlowId: w,
101
+ namespaceId: C,
102
+ projectId: P
103
+ }, e[0] = w, e[1] = C, e[2] = h, e[3] = u, e[4] = f, e[5] = P, e[6] = g) : g = e[6];
104
+ const k = g, y = H;
105
+ let b;
106
+ e[7] !== d || e[8] !== s ? (b = {
107
+ name: s,
108
+ flow: d,
93
109
  type: "folder"
94
- }, e[0] = _, e[1] = i, e[2] = a) : a = e[2];
95
- let s;
96
- e[3] === Symbol.for("react.memo_cache_sentinel") ? (s = () => b(ee), e[3] = s) : s = e[3];
97
- const m = j("d-folder", u);
98
- let C;
99
- e[4] === Symbol.for("react.memo_cache_sentinel") ? (C = {
110
+ }, e[7] = d, e[8] = s, e[9] = b) : b = e[9];
111
+ let x;
112
+ e[10] === Symbol.for("react.memo_cache_sentinel") ? (x = () => F(ne), e[10] = x) : x = e[10];
113
+ const l = N("d-folder", S);
114
+ let r;
115
+ e[11] === Symbol.for("react.memo_cache_sentinel") ? (r = {
100
116
  gap: "0.35rem"
101
- }, e[4] = C) : C = e[4];
102
- let g;
103
- e[5] !== o ? (g = o ? /* @__PURE__ */ c(N, { size: 12 }) : /* @__PURE__ */ c(G, { size: 12 }), e[5] = o, e[6] = g) : g = e[6];
104
- let d;
105
- e[7] !== i ? (d = /* @__PURE__ */ c(P, { children: i }), e[7] = i, e[8] = d) : d = e[8];
106
- let f;
107
- e[9] !== g || e[10] !== d ? (f = /* @__PURE__ */ k(z, { align: "center", style: C, children: [
108
- g,
109
- d
110
- ] }), e[9] = g, e[10] = d, e[11] = f) : f = e[11];
111
- let I;
112
- e[12] === Symbol.for("react.memo_cache_sentinel") ? (I = {
117
+ }, e[11] = r) : r = e[11];
118
+ let c;
119
+ e[12] !== m ? (c = m ? /* @__PURE__ */ a(J, { size: 12 }) : /* @__PURE__ */ a(K, { size: 12 }), e[12] = m, e[13] = c) : c = e[13];
120
+ let o;
121
+ e[14] !== s ? (o = /* @__PURE__ */ a(G, { children: s }), e[14] = s, e[15] = o) : o = e[15];
122
+ let t;
123
+ e[16] !== c || e[17] !== o ? (t = /* @__PURE__ */ R(T, { align: "center", style: r, children: [
124
+ c,
125
+ o
126
+ ] }), e[16] = c, e[17] = o, e[18] = t) : t = e[18];
127
+ let i;
128
+ e[19] === Symbol.for("react.memo_cache_sentinel") ? (i = {
113
129
  gap: "0.35rem"
114
- }, e[12] = I) : I = e[12];
115
- let y;
116
- e[13] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ c(M, { p: "0", variant: "none", children: /* @__PURE__ */ c(V, { size: 12 }) }), e[13] = y) : y = e[13];
117
- let F;
118
- e[14] !== o ? (F = /* @__PURE__ */ k(z, { align: "center", style: I, children: [
119
- y,
120
- /* @__PURE__ */ c(M, { p: "0", variant: "none", children: o ? /* @__PURE__ */ c(q, { size: 12 }) : /* @__PURE__ */ c(J, { size: 12 }) })
121
- ] }), e[14] = o, e[15] = F) : F = e[15];
122
- let l;
123
- e[16] !== F || e[17] !== s || e[18] !== m || e[19] !== f ? (l = /* @__PURE__ */ k("div", { onClick: s, ...m, children: [
124
- f,
125
- F
126
- ] }), e[16] = F, e[17] = s, e[18] = m, e[19] = f, e[20] = l) : l = e[20];
130
+ }, e[19] = i) : i = e[19];
127
131
  let n;
128
- e[21] !== D || e[22] !== u || e[23] !== a || e[24] !== l ? (n = /* @__PURE__ */ c(D, { contextData: a, ...u, children: l }), e[21] = D, e[22] = u, e[23] = a, e[24] = l, e[25] = n) : n = e[25];
129
- const w = o ? $ : null;
130
- let r;
131
- e[26] !== w ? (r = /* @__PURE__ */ c("div", { className: "d-folder__content", children: w }), e[26] = w, e[27] = r) : r = e[27];
132
- let t;
133
- return e[28] !== n || e[29] !== r ? (t = /* @__PURE__ */ k(R, { children: [
134
- n,
135
- r
136
- ] }), e[28] = n, e[29] = r, e[30] = t) : t = e[30], t;
137
- }, Z = (h) => {
138
- const e = T.c(30);
139
- let i, _, S, $, u, v, o, b;
140
- if (e[0] !== h) {
132
+ e[20] !== m ? (n = /* @__PURE__ */ a(T, { align: "center", style: i, children: /* @__PURE__ */ a(te, { p: "0", variant: "none", children: m ? /* @__PURE__ */ a(L, { size: 12 }) : /* @__PURE__ */ a(Q, { size: 12 }) }) }), e[20] = m, e[21] = n) : n = e[21];
133
+ let A;
134
+ e[22] !== n || e[23] !== x || e[24] !== l || e[25] !== t ? (A = /* @__PURE__ */ R("div", { onClick: x, ...l, children: [
135
+ t,
136
+ n
137
+ ] }), e[22] = n, e[23] = x, e[24] = l, e[25] = t, e[26] = A) : A = e[26];
138
+ let O;
139
+ e[27] !== y || e[28] !== k || e[29] !== A || e[30] !== b ? (O = /* @__PURE__ */ a(y, { contextData: b, ...k, children: A }), e[27] = y, e[28] = k, e[29] = A, e[30] = b, e[31] = O) : O = e[31];
140
+ const $ = m ? D : null;
141
+ let M;
142
+ e[32] !== $ ? (M = /* @__PURE__ */ a("div", { className: "d-folder__content", children: $ }), e[32] = $, e[33] = M) : M = e[33];
143
+ let j;
144
+ return e[34] !== O || e[35] !== M ? (j = /* @__PURE__ */ R(B, { children: [
145
+ O,
146
+ M
147
+ ] }), e[34] = O, e[35] = M, e[36] = j) : j = e[36], j;
148
+ }, oe = (I) => {
149
+ const e = E.c(38);
150
+ let s, d, v, D, h, u, f, w;
151
+ if (e[0] !== I) {
141
152
  const {
142
- name: g,
143
- path: d,
144
- flow: f,
145
- onSelect: I,
146
- active: y,
147
- ...F
148
- } = h;
149
- S = g;
150
- const l = L(d + S), n = te;
151
- _ = B, e[9] !== f || e[10] !== d ? (o = {
152
- name: d,
153
- flow: f,
153
+ name: k,
154
+ path: y,
155
+ flow: b,
156
+ onSelect: x,
157
+ active: l,
158
+ onCreate: r,
159
+ onDelete: c,
160
+ onRename: o,
161
+ activeFlowId: t,
162
+ namespaceId: i,
163
+ projectId: n,
164
+ ...A
165
+ } = I;
166
+ v = k, h = y, d = b, D = x;
167
+ let O;
168
+ e[9] !== t || e[10] !== i || e[11] !== r || e[12] !== c || e[13] !== o || e[14] !== n ? (O = {
169
+ onCreate: r,
170
+ onDelete: c,
171
+ onRename: o,
172
+ activeFlowId: t,
173
+ namespaceId: i,
174
+ projectId: n
175
+ }, e[9] = t, e[10] = i, e[11] = r, e[12] = c, e[13] = o, e[14] = n, e[15] = O) : O = e[15];
176
+ const $ = O;
177
+ s = H, e[16] !== d || e[17] !== h ? (f = {
178
+ name: h,
179
+ flow: d,
154
180
  type: "item"
155
- }, e[9] = f, e[10] = d, e[11] = o) : o = e[11], b = F, u = j(`d-folder__item ${y ? "d-folder__item--active" : ""}`, F), e[12] !== f || e[13] !== I ? (v = () => I?.(f), e[12] = f, e[13] = I, e[14] = v) : v = e[14], i = K, $ = n(l), e[0] = h, e[1] = i, e[2] = _, e[3] = S, e[4] = $, e[5] = u, e[6] = v, e[7] = o, e[8] = b;
181
+ }, e[16] = d, e[17] = h, e[18] = f) : f = e[18], w = $, u = N(`d-folder__item ${l ? "d-folder__item--active" : ""}`, A), e[0] = I, e[1] = s, e[2] = d, e[3] = v, e[4] = D, e[5] = h, e[6] = u, e[7] = f, e[8] = w;
156
182
  } else
157
- i = e[1], _ = e[2], S = e[3], $ = e[4], u = e[5], v = e[6], o = e[7], b = e[8];
158
- const D = `hsl(${$}, 100%, 72%)`;
159
- let a;
160
- e[15] !== i || e[16] !== D ? (a = /* @__PURE__ */ c(i, { color: D, size: 12 }), e[15] = i, e[16] = D, e[17] = a) : a = e[17];
161
- let s;
162
- e[18] !== S ? (s = /* @__PURE__ */ c(P, { children: S }), e[18] = S, e[19] = s) : s = e[19];
163
- let m;
164
- e[20] !== u || e[21] !== v || e[22] !== a || e[23] !== s ? (m = /* @__PURE__ */ k("div", { ...u, onClick: v, children: [
165
- a,
166
- s
167
- ] }), e[20] = u, e[21] = v, e[22] = a, e[23] = s, e[24] = m) : m = e[24];
183
+ s = e[1], d = e[2], v = e[3], D = e[4], h = e[5], u = e[6], f = e[7], w = e[8];
168
184
  let C;
169
- return e[25] !== _ || e[26] !== o || e[27] !== b || e[28] !== m ? (C = /* @__PURE__ */ c(_, { contextData: o, ...b, children: m }), e[25] = _, e[26] = o, e[27] = b, e[28] = m, e[29] = C) : C = e[29], C;
185
+ e[19] !== d || e[20] !== D ? (C = () => D?.(d), e[19] = d, e[20] = D, e[21] = C) : C = e[21];
186
+ const P = h + v;
187
+ let S;
188
+ e[22] !== P ? (S = W(P), e[22] = P, e[23] = S) : S = e[23];
189
+ let _;
190
+ e[24] !== S ? (_ = /* @__PURE__ */ a(U, { color: S, size: 12 }), e[24] = S, e[25] = _) : _ = e[25];
191
+ let m;
192
+ e[26] !== v ? (m = /* @__PURE__ */ a(G, { children: v }), e[26] = v, e[27] = m) : m = e[27];
193
+ let F;
194
+ e[28] !== u || e[29] !== C || e[30] !== _ || e[31] !== m ? (F = /* @__PURE__ */ R("div", { ...u, onClick: C, children: [
195
+ _,
196
+ m
197
+ ] }), e[28] = u, e[29] = C, e[30] = _, e[31] = m, e[32] = F) : F = e[32];
198
+ let g;
199
+ return e[33] !== s || e[34] !== f || e[35] !== w || e[36] !== F ? (g = /* @__PURE__ */ a(s, { contextData: f, ...w, children: F }), e[33] = s, e[34] = f, e[35] = w, e[36] = F, e[37] = g) : g = e[37], g;
170
200
  };
171
- function ee(h) {
172
- return !h;
173
- }
174
- function te(h) {
175
- return parseInt(h.slice(0, 8), 16) % 360;
201
+ function ne(I) {
202
+ return !I;
176
203
  }
177
204
  export {
178
- be as DFlowFolder,
179
- Y as DFlowFolderGroup,
180
- Z as DFlowFolderItem
205
+ Oe as DFlowFolder,
206
+ le as DFlowFolderGroup,
207
+ oe as DFlowFolderItem
181
208
  };
@@ -1,27 +1,34 @@
1
1
  import { jsx as e, Fragment as a, jsxs as n } from "react/jsx-runtime";
2
2
  import h from "react";
3
- import { ContextMenu as s, ContextMenuTrigger as x, ContextMenuPortal as C, ContextMenuContent as S, ContextMenuSub as f, ContextMenuSubTrigger as M, ContextMenuSubContent as g, ContextMenuItem as r, ContextMenuSeparator as p } from "../context-menu/ContextMenu.js";
3
+ import { ContextMenu as x, ContextMenuTrigger as s, ContextMenuPortal as C, ContextMenuContent as p, ContextMenuSub as S, ContextMenuSubTrigger as f, ContextMenuSubContent as M, ContextMenuItem as r, ContextMenuSeparator as g } from "../context-menu/ContextMenu.js";
4
4
  import { Flex as v } from "../flex/Flex.js";
5
5
  import { Text as i } from "../text/Text.js";
6
6
  import { IconChevronRight as w, IconEdit as D, IconTrash as F } from "@tabler/icons-react";
7
7
  import { useService as R, useStore as T } from "../../utils/contextStore.js";
8
8
  import "merge-props";
9
9
  import { DFlowTypeReactiveService as c } from "../d-flow-type/DFlowType.service.js";
10
- const k = (t) => {
10
+ import "../d-flow-data-type/rules/DFlowDataTypeRegexRule.js";
11
+ import "../d-flow-data-type/rules/DFlowDataTypeNumberRangeRule.js";
12
+ import "../d-flow-data-type/rules/DFlowDataTypeItemOfCollectionRule.js";
13
+ import "../d-flow-data-type/rules/DFlowDataTypeContainsTypeRule.js";
14
+ import "../d-flow-data-type/rules/DFlowDataTypeContainsKeyRule.js";
15
+ import "../d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.js";
16
+ import "js-md5";
17
+ const K = (t) => {
11
18
  const {
12
19
  children: l
13
- } = t, d = R(c), m = T(c), u = h.useMemo(() => d.values(), [m]);
14
- return /* @__PURE__ */ e(a, { children: /* @__PURE__ */ n(s, { children: [
15
- /* @__PURE__ */ e(x, { asChild: !0, children: l }),
16
- /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(S, { children: /* @__PURE__ */ n(f, { children: [
17
- /* @__PURE__ */ e(M, { children: /* @__PURE__ */ n(v, { align: "center", justify: "space-between", w: "100%", children: [
20
+ } = t, m = R(c), d = T(c), u = h.useMemo(() => m.values(), [d]);
21
+ return /* @__PURE__ */ e(a, { children: /* @__PURE__ */ n(x, { children: [
22
+ /* @__PURE__ */ e(s, { asChild: !0, children: l }),
23
+ /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(p, { children: /* @__PURE__ */ n(S, { children: [
24
+ /* @__PURE__ */ e(f, { children: /* @__PURE__ */ n(v, { align: "center", justify: "space-between", w: "100%", children: [
18
25
  /* @__PURE__ */ e(i, { children: "New flow" }),
19
26
  /* @__PURE__ */ e(w, { size: 12 })
20
27
  ] }) }),
21
- /* @__PURE__ */ e(g, { children: u.map((o) => /* @__PURE__ */ e(r, { onSelect: () => {
28
+ /* @__PURE__ */ e(M, { children: u.map((o) => /* @__PURE__ */ e(r, { onSelect: () => {
22
29
  t.onCreate?.(o.id);
23
- }, children: o.names?.nodes[0]?.content ?? o.id }, o.id)) }),
24
- /* @__PURE__ */ e(p, {}),
30
+ }, children: o.names[0]?.content ?? o.id }, o.id)) }),
31
+ /* @__PURE__ */ e(g, {}),
25
32
  /* @__PURE__ */ n(r, { onSelect: () => t.onRename?.(t.contextData), children: [
26
33
  /* @__PURE__ */ e(D, { size: 12, color: "purple" }),
27
34
  /* @__PURE__ */ e(i, { children: "Rename" })
@@ -34,5 +41,5 @@ const k = (t) => {
34
41
  ] }) });
35
42
  };
36
43
  export {
37
- k as DFlowFolderContextMenu
44
+ K as DFlowFolderContextMenu
38
45
  };
@@ -36,6 +36,7 @@ function a(e, r) {
36
36
  return o.map((m, i) => {
37
37
  const s = {
38
38
  type: o.length - 1 !== i ? "block" : "text",
39
+ value: m,
39
40
  start: n,
40
41
  end: n + m.length,
41
42
  visualLength: o.length - 1 !== i ? 1 : m.length,
@@ -1,9 +1,8 @@
1
1
  import { resolveGenericKeys as o, replaceGenericKeysInType as s } from "../../utils/generics.js";
2
- const c = (r, e, n, p) => {
3
- if (!e.returnType) return null;
4
- const t = o(e, n, p);
5
- return s(r, t);
2
+ const y = (e, r, n, p) => {
3
+ const c = o(r, n, p);
4
+ return s(e, c);
6
5
  };
7
6
  export {
8
- c as useInputType
7
+ y as useInputType
9
8
  };
@@ -1,6 +1,6 @@
1
1
  import { resolveGenericKeys as t, replaceGenericKeysInType as y } from "../../utils/generics.js";
2
2
  const s = (e, r, n) => {
3
- if (!e.returnType) return null;
3
+ if (!e?.returnType) return null;
4
4
  const p = t(e, r, n);
5
5
  return y(e.returnType, p);
6
6
  };
@@ -1,9 +1,11 @@
1
- import { DataTypeIdentifier, FunctionDefinition, Maybe, ParameterDefinition, RuntimeFunctionDefinition, Scalars, TranslationConnection } from '@code0-tech/sagittarius-graphql-types';
1
+ import { DataTypeIdentifier, DataTypeIdentifierConnection, FunctionDefinition, Maybe, ParameterDefinition, RuntimeFunctionDefinition, Scalars, Translation } from '@code0-tech/sagittarius-graphql-types';
2
2
  export declare class FunctionDefinitionView {
3
3
  /** Name of the function */
4
4
  private readonly _aliases?;
5
5
  /** Time when this FunctionDefinition was created */
6
6
  private readonly _createdAt?;
7
+ /** All data type identifiers used within this Node Function */
8
+ private readonly _dataTypeIdentifiers?;
7
9
  /** Deprecation message of the function */
8
10
  private readonly _deprecationMessages?;
9
11
  /** Description of the function */
@@ -31,16 +33,17 @@ export declare class FunctionDefinitionView {
31
33
  /** Time when this FunctionDefinition was last updated */
32
34
  private readonly _updatedAt?;
33
35
  constructor(object: FunctionDefinition);
34
- get aliases(): Maybe<TranslationConnection> | undefined;
36
+ get aliases(): Maybe<Array<Translation>> | undefined;
35
37
  get createdAt(): Maybe<Scalars["Time"]["output"]> | undefined;
36
- get deprecationMessages(): Maybe<TranslationConnection> | undefined;
37
- get descriptions(): Maybe<TranslationConnection> | undefined;
38
- get displayMessages(): Maybe<TranslationConnection> | undefined;
39
- get documentations(): Maybe<TranslationConnection> | undefined;
38
+ get dataTypeIdentifiers(): Maybe<DataTypeIdentifierConnection> | undefined;
39
+ get deprecationMessages(): Maybe<Array<Translation>> | undefined;
40
+ get descriptions(): Maybe<Array<Translation>> | undefined;
41
+ get displayMessages(): Maybe<Array<Translation>> | undefined;
42
+ get documentations(): Maybe<Array<Translation>> | undefined;
40
43
  get genericKeys(): Maybe<Array<Scalars["String"]["output"]>> | undefined;
41
44
  get id(): Maybe<Scalars["FunctionDefinitionID"]["output"]> | undefined;
42
45
  get identifier(): Maybe<Scalars["String"]["output"]> | undefined;
43
- get names(): Maybe<TranslationConnection> | undefined;
46
+ get names(): Maybe<Array<Translation>> | undefined;
44
47
  get parameterDefinitions(): Maybe<ParameterDefinitionView[]> | undefined;
45
48
  get returnType(): Maybe<DataTypeIdentifier> | undefined;
46
49
  get runtimeFunctionDefinition(): Maybe<RuntimeFunctionDefinition> | undefined;
@@ -65,14 +68,14 @@ export declare class ParameterDefinitionView {
65
68
  private readonly _names?;
66
69
  /** Time when this ParameterDefinition was last updated */
67
70
  private readonly _updatedAt?;
68
- constructor(object: ParameterDefinition);
71
+ constructor(object: ParameterDefinition, dataTypeIdentifiers: DataTypeIdentifier[]);
69
72
  get createdAt(): Maybe<Scalars["Time"]["output"]> | undefined;
70
73
  get dataTypeIdentifier(): Maybe<DataTypeIdentifier> | undefined;
71
- get descriptions(): Maybe<TranslationConnection> | undefined;
72
- get documentations(): Maybe<TranslationConnection> | undefined;
74
+ get descriptions(): Maybe<Array<Translation>> | undefined;
75
+ get documentations(): Maybe<Array<Translation>> | undefined;
73
76
  get id(): Maybe<Scalars["ParameterDefinitionID"]["output"]> | undefined;
74
77
  get identifier(): Maybe<Scalars["String"]["output"]> | undefined;
75
- get names(): Maybe<TranslationConnection> | undefined;
78
+ get names(): Maybe<Array<Translation>> | undefined;
76
79
  get updatedAt(): Maybe<Scalars["Time"]["output"]> | undefined;
77
80
  json(): ParameterDefinition;
78
81
  }
@@ -1,11 +1,12 @@
1
+ import { resolveDataTypeIdentifiers as d, attachDataTypeIdentifiers as n } from "../d-flow/DFlow.util.js";
1
2
  function t(e, i, s) {
2
- return (i = n(i)) in e ? Object.defineProperty(e, i, { value: s, enumerable: !0, configurable: !0, writable: !0 }) : e[i] = s, e;
3
+ return (i = a(i)) in e ? Object.defineProperty(e, i, { value: s, enumerable: !0, configurable: !0, writable: !0 }) : e[i] = s, e;
3
4
  }
4
- function n(e) {
5
- var i = d(e, "string");
5
+ function a(e) {
6
+ var i = o(e, "string");
6
7
  return typeof i == "symbol" ? i : i + "";
7
8
  }
8
- function d(e, i) {
9
+ function o(e, i) {
9
10
  if (typeof e != "object" || !e) return e;
10
11
  var s = e[Symbol.toPrimitive];
11
12
  if (s !== void 0) {
@@ -15,9 +16,11 @@ function d(e, i) {
15
16
  }
16
17
  return (i === "string" ? String : Number)(e);
17
18
  }
18
- class o {
19
+ class u {
19
20
  constructor(i) {
20
- t(this, "_aliases", void 0), t(this, "_createdAt", void 0), t(this, "_deprecationMessages", void 0), t(this, "_descriptions", void 0), t(this, "_displayMessages", void 0), t(this, "_documentations", void 0), t(this, "_genericKeys", void 0), t(this, "_id", void 0), t(this, "_identifier", void 0), t(this, "_names", void 0), t(this, "_parameterDefinitions", void 0), t(this, "_returnType", void 0), t(this, "_runtimeFunctionDefinition", void 0), t(this, "_throwsError", void 0), t(this, "_updatedAt", void 0), this._aliases = i.aliases, this._createdAt = i.createdAt, this._deprecationMessages = i.deprecationMessages, this._descriptions = i.descriptions, this._displayMessages = i.displayMessages, this._documentations = i.documentations, this._genericKeys = i.genericKeys, this._id = i.id, this._identifier = i.identifier, this._names = i.names, this._parameterDefinitions = i.parameterDefinitions?.nodes?.map((s) => new a(s)) ?? void 0, this._returnType = i.returnType, this._runtimeFunctionDefinition = i.runtimeFunctionDefinition, this._throwsError = i.throwsError, this._updatedAt = i.updatedAt;
21
+ t(this, "_aliases", void 0), t(this, "_createdAt", void 0), t(this, "_dataTypeIdentifiers", void 0), t(this, "_deprecationMessages", void 0), t(this, "_descriptions", void 0), t(this, "_displayMessages", void 0), t(this, "_documentations", void 0), t(this, "_genericKeys", void 0), t(this, "_id", void 0), t(this, "_identifier", void 0), t(this, "_names", void 0), t(this, "_parameterDefinitions", void 0), t(this, "_returnType", void 0), t(this, "_runtimeFunctionDefinition", void 0), t(this, "_throwsError", void 0), t(this, "_updatedAt", void 0);
22
+ const s = d(i.dataTypeIdentifiers?.nodes ?? []);
23
+ this._aliases = i.aliases, this._createdAt = i.createdAt, this._dataTypeIdentifiers = i.dataTypeIdentifiers, this._deprecationMessages = i.deprecationMessages, this._descriptions = i.descriptions, this._displayMessages = i.displayMessages, this._documentations = i.documentations, this._genericKeys = i.genericKeys, this._id = i.id, this._identifier = i.identifier, this._names = i.names, this._parameterDefinitions = i.parameterDefinitions?.nodes?.map((r) => new h(r, s)) ?? void 0, this._returnType = n(s, i.returnType), this._runtimeFunctionDefinition = i.runtimeFunctionDefinition, this._throwsError = i.throwsError, this._updatedAt = i.updatedAt;
21
24
  }
22
25
  get aliases() {
23
26
  return this._aliases;
@@ -25,6 +28,9 @@ class o {
25
28
  get createdAt() {
26
29
  return this._createdAt;
27
30
  }
31
+ get dataTypeIdentifiers() {
32
+ return this._dataTypeIdentifiers;
33
+ }
28
34
  get deprecationMessages() {
29
35
  return this._deprecationMessages;
30
36
  }
@@ -82,13 +88,14 @@ class o {
82
88
  returnType: this._returnType,
83
89
  runtimeFunctionDefinition: this._runtimeFunctionDefinition,
84
90
  throwsError: this._throwsError,
85
- updatedAt: this._updatedAt
91
+ updatedAt: this._updatedAt,
92
+ dataTypeIdentifiers: this._dataTypeIdentifiers
86
93
  };
87
94
  }
88
95
  }
89
- class a {
90
- constructor(i) {
91
- t(this, "_createdAt", void 0), t(this, "_dataTypeIdentifier", void 0), t(this, "_descriptions", void 0), t(this, "_documentations", void 0), t(this, "_id", void 0), t(this, "_identifier", void 0), t(this, "_names", void 0), t(this, "_updatedAt", void 0), this._createdAt = i.createdAt, this._dataTypeIdentifier = i.dataTypeIdentifier, this._descriptions = i.descriptions, this._documentations = i.documentations, this._id = i.id, this._identifier = i.identifier, this._names = i.names, this._updatedAt = i.updatedAt;
96
+ class h {
97
+ constructor(i, s) {
98
+ t(this, "_createdAt", void 0), t(this, "_dataTypeIdentifier", void 0), t(this, "_descriptions", void 0), t(this, "_documentations", void 0), t(this, "_id", void 0), t(this, "_identifier", void 0), t(this, "_names", void 0), t(this, "_updatedAt", void 0), this._createdAt = i.createdAt, this._dataTypeIdentifier = n(s, i.dataTypeIdentifier), this._descriptions = i.descriptions, this._documentations = i.documentations, this._id = i.id, this._identifier = i.identifier, this._names = i.names, this._updatedAt = i.updatedAt;
92
99
  }
93
100
  get createdAt() {
94
101
  return this._createdAt;
@@ -127,6 +134,6 @@ class a {
127
134
  }
128
135
  }
129
136
  export {
130
- o as FunctionDefinitionView,
131
- a as ParameterDefinitionView
137
+ u as FunctionDefinitionView,
138
+ h as ParameterDefinitionView
132
139
  };