@code0-tech/pictor 0.0.0-mvp.3 → 0.0.0-mvp.5

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 (109) hide show
  1. package/dist/_virtual/compiler-runtime.js +5 -0
  2. package/dist/_virtual/compiler-runtime2.js +4 -0
  3. package/dist/_virtual/react-compiler-runtime.development.js +4 -0
  4. package/dist/_virtual/react-compiler-runtime.production.js +4 -0
  5. package/dist/assets/components/d-flow/DFlow.style.css +1 -0
  6. package/dist/assets/{DFlow.css → node_modules/@xyflow/react/dist/style.css} +1 -1
  7. package/dist/components/avatar/Avatar.js +2 -2
  8. package/dist/components/badge/Badge.js +2 -2
  9. package/dist/components/breadcrumb/Breadcrumb.js +17 -16
  10. package/dist/components/button/Button.js +6 -5
  11. package/dist/components/button-group/ButtonGroup.js +6 -5
  12. package/dist/components/card/Card.js +2 -2
  13. package/dist/components/card/CardSection.js +1 -1
  14. package/dist/components/col/Col.js +9 -8
  15. package/dist/components/command/Command.js +19 -18
  16. package/dist/components/container/Container.js +12 -11
  17. package/dist/components/d-flow/DFlow.edges.hook.js +9 -10
  18. package/dist/components/d-flow/DFlow.js +6 -4
  19. package/dist/components/d-flow/DFlow.nodes.hook.js +18 -19
  20. package/dist/components/d-flow/control/DFlowControl.js +1 -1
  21. package/dist/components/d-flow/data-type/DFlowDataType.service.js +89 -5
  22. package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +18 -4
  23. package/dist/components/d-flow/data-type/index.js +1 -1
  24. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.js +220 -4
  25. package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.js +227 -4
  26. package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.js +1 -1
  27. package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +241 -5
  28. package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.js +8 -6
  29. package/dist/components/d-flow/edge/DFlowEdge.js +1 -1
  30. package/dist/components/d-flow/folder/DFlowFolder.js +16 -15
  31. package/dist/components/d-flow/function/DFlowFunction.return.hook.js +1 -1
  32. package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +19 -20
  33. package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +51 -51
  34. package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +1 -1
  35. package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +1 -1
  36. package/dist/components/d-flow/index.js +8 -8
  37. package/dist/components/d-flow/input/DFlowInputDataType.js +201 -201
  38. package/dist/components/d-flow/minimap/DFlowMiniMap.js +6 -5
  39. package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +61 -62
  40. package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +1 -1
  41. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.js +1 -1
  42. package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.js +1 -1
  43. package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +9 -8
  44. package/dist/components/d-flow/tab/DFlowTabs.js +1 -1
  45. package/dist/components/d-flow/validation/DFlowValidation.js +15 -14
  46. package/dist/components/d-fullscreen/DFullScreen.d.ts +1 -2
  47. package/dist/components/d-fullscreen/DFullScreen.js +15 -14
  48. package/dist/components/d-layout/DLayout.js +13 -12
  49. package/dist/components/d-namespace/index.js +6 -6
  50. package/dist/components/d-organization/index.js +5 -5
  51. package/dist/components/d-resizable/DResizable.js +17 -16
  52. package/dist/components/d-user/index.js +4 -4
  53. package/dist/components/dialog/Dialog.js +18 -17
  54. package/dist/components/file-tabs/FileTabs.js +41 -40
  55. package/dist/components/flex/Flex.js +2 -2
  56. package/dist/components/form/CheckboxInput.js +2 -2
  57. package/dist/components/form/Input.js +1 -1
  58. package/dist/components/form/InputDescription.js +1 -1
  59. package/dist/components/form/InputLabel.js +1 -1
  60. package/dist/components/form/InputMessage.js +1 -1
  61. package/dist/components/form/InputSuggestion.js +1 -1
  62. package/dist/components/form/PinInput.js +2 -2
  63. package/dist/components/form/RadioGroup.js +2 -2
  64. package/dist/components/form/RadioInput.js +2 -2
  65. package/dist/components/menu/Menu.js +2 -2
  66. package/dist/components/quote/Quote.js +4 -3
  67. package/dist/components/row/Row.js +10 -9
  68. package/dist/components/scroll-area/ScrollArea.js +18 -17
  69. package/dist/components/segmented-control/SegmentedControl.js +12 -11
  70. package/dist/components/text/Text.js +2 -2
  71. package/dist/components/tooltip/Tooltip.js +10 -9
  72. package/dist/index.js +219 -218
  73. package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +21 -0
  74. package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +14 -0
  75. package/dist/node_modules/react/compiler-runtime.js +10 -0
  76. package/dist/utils/contextStore.js +1 -1
  77. package/dist/utils/generics.js +88 -89
  78. package/package.json +4 -6
  79. package/dist/DFlowDataType.service-Dz8pQUeO.js +0 -793
  80. package/dist/compiler-runtime-BNHg76kC.js +0 -36
  81. /package/dist/assets/{Avatar.css → components/avatar/Avatar.style.css} +0 -0
  82. /package/dist/assets/{Badge.css → components/badge/Badge.style.css} +0 -0
  83. /package/dist/assets/{Breadcrumb.css → components/breadcrumb/Breadcrumb.style.css} +0 -0
  84. /package/dist/assets/{Button.css → components/button/Button.style.css} +0 -0
  85. /package/dist/assets/{ButtonGroup.css → components/button-group/ButtonGroup.style.css} +0 -0
  86. /package/dist/assets/{Card.css → components/card/Card.style.css} +0 -0
  87. /package/dist/assets/{Col.css → components/col/Col.style.css} +0 -0
  88. /package/dist/assets/{Command.css → components/command/Command.style.css} +0 -0
  89. /package/dist/assets/{Container.css → components/container/Container.style.css} +0 -0
  90. /package/dist/assets/{DFlowFolder.css → components/d-flow/folder/DFlowFolder.style.css} +0 -0
  91. /package/dist/assets/{DFlowFunctionDefaultCard.css → components/d-flow/function/DFlowFunctionDefaultCard.style.css} +0 -0
  92. /package/dist/assets/{DFlowInputDataType.css → components/d-flow/input/DFlowInputDataType.style.css} +0 -0
  93. /package/dist/assets/{DFlowMiniMap.css → components/d-flow/minimap/DFlowMiniMap.style.css} +0 -0
  94. /package/dist/assets/{DFlowSuggestionSearchInput.css → components/d-flow/suggestion/DFlowSuggestionSearchInput.style.css} +0 -0
  95. /package/dist/assets/{DFlowValidation.css → components/d-flow/validation/DFlowValidation.style.css} +0 -0
  96. /package/dist/assets/{DFullScreen.css → components/d-fullscreen/DFullScreen.style.css} +0 -0
  97. /package/dist/assets/{DLayout.css → components/d-layout/DLayout.style.css} +0 -0
  98. /package/dist/assets/{DResizable.css → components/d-resizable/DResizable.style.css} +0 -0
  99. /package/dist/assets/{Dialog.css → components/dialog/Dialog.style.css} +0 -0
  100. /package/dist/assets/{FileTabs.css → components/file-tabs/FileTabs.style.css} +0 -0
  101. /package/dist/assets/{Flex.css → components/flex/Flex.style.css} +0 -0
  102. /package/dist/assets/{Input.css → components/form/Input.style.css} +0 -0
  103. /package/dist/assets/{Menu.css → components/menu/Menu.style.css} +0 -0
  104. /package/dist/assets/{Quote.css → components/quote/Quote.style.css} +0 -0
  105. /package/dist/assets/{Row.css → components/row/Row.style.css} +0 -0
  106. /package/dist/assets/{ScrollArea.css → components/scroll-area/ScrollArea.style.css} +0 -0
  107. /package/dist/assets/{SegmentedControl.css → components/segmented-control/SegmentedControl.style.css} +0 -0
  108. /package/dist/assets/{Text.css → components/text/Text.style.css} +0 -0
  109. /package/dist/assets/{Tooltip.css → components/tooltip/Tooltip.style.css} +0 -0
@@ -1,34 +1,33 @@
1
- import { DataTypeVariant as P, DataTypeRulesVariant as h, GenericCombinationStrategyType as j } from "@code0-tech/sagittarius-graphql-types";
2
- const O = "GENERIC", y = (e) => typeof e == "object" && e !== null && !Array.isArray(e), l = (e) => y(e) ? "genericKey" in e || "genericType" in e || "dataType" in e : !1, K = (e) => y(e) && "target" in e && Array.isArray(e.sourceDataTypeIdentifiers), z = (e) => y(e) && "variant" in e && "identifier" in e, G = (e) => y(e) && "variant" in e && "config" in e, S = (e) => {
1
+ const C = "GENERIC", y = (e) => typeof e == "object" && e !== null && !Array.isArray(e), T = (e) => y(e) ? "genericKey" in e || "genericType" in e || "dataType" in e : !1, A = (e) => y(e) && "target" in e && Array.isArray(e.sourceDataTypeIdentifiers), E = (e) => y(e) && "variant" in e && "identifier" in e, b = (e) => y(e) && "variant" in e && "config" in e, O = (e) => {
3
2
  if (e)
4
3
  return typeof e == "string" ? e : e?.dataType?.identifier ?? e?.genericType?.dataType?.identifier ?? void 0;
5
- }, w = (e, n) => {
4
+ }, j = (e, n) => {
6
5
  if (e)
7
6
  return typeof e == "string" ? n && n.has(e) ? e : void 0 : e.genericKey ?? void 0;
8
- }, x = (e) => !e || typeof e == "string" ? [] : e.genericType?.genericMappers ?? [], R = (e, n) => ({
7
+ }, _ = (e) => !e || typeof e == "string" ? [] : e.genericType?.genericMappers ?? [], G = (e, n) => ({
9
8
  ...e,
10
9
  sourceDataTypeIdentifiers: n
11
- }), _ = (e) => {
10
+ }), R = (e) => {
12
11
  const n = e.genericCombinationStrategies ?? [];
13
12
  return new Set(n.map((i) => i.type));
14
- }, D = (e) => {
13
+ }, m = (e) => {
15
14
  if (Array.isArray(e))
16
- return e.map(D);
15
+ return e.map(m);
17
16
  if (y(e)) {
18
17
  const n = {};
19
18
  return Object.entries(e).forEach(([i, t]) => {
20
- i === "__typename" || i === "id" || i === "createdAt" || i === "updatedAt" || (n[i] = D(t));
19
+ i === "__typename" || i === "id" || i === "createdAt" || i === "updatedAt" || (n[i] = m(t));
21
20
  }), n;
22
21
  }
23
22
  return e;
24
- }, M = (e, n) => {
23
+ }, S = (e, n) => {
25
24
  if (!n) return !e;
26
25
  if (typeof n == "string")
27
- return n === O ? !0 : S(e) === n;
26
+ return n === C ? !0 : O(e) === n;
28
27
  if (n.genericKey) return !0;
29
- const t = S(n), a = S(e);
28
+ const t = O(n), a = O(e);
30
29
  return !!t && t === a;
31
- }, J = (e, n) => {
30
+ }, z = (e, n) => {
32
31
  switch (e.__typename) {
33
32
  case "DataTypeRulesContainsKeyConfig":
34
33
  case "DataTypeRulesContainsTypeConfig":
@@ -36,13 +35,13 @@ const O = "GENERIC", y = (e) => typeof e == "object" && e !== null && !Array.isA
36
35
  const i = e.dataTypeIdentifier;
37
36
  return i ? {
38
37
  ...e,
39
- dataTypeIdentifier: b(i, n)
38
+ dataTypeIdentifier: M(i, n)
40
39
  } : e;
41
40
  }
42
41
  case "DataTypeRulesInputTypesConfig": {
43
42
  const i = e, t = i.inputTypes?.map((a) => ({
44
43
  ...a,
45
- dataTypeIdentifier: b(a.dataTypeIdentifier, n)
44
+ dataTypeIdentifier: M(a.dataTypeIdentifier, n)
46
45
  }));
47
46
  return {
48
47
  ...i,
@@ -52,41 +51,41 @@ const O = "GENERIC", y = (e) => typeof e == "object" && e !== null && !Array.isA
52
51
  default:
53
52
  return e;
54
53
  }
55
- }, V = (e, n, i) => {
54
+ }, w = (e, n, i) => {
56
55
  const t = {}, a = new Set(i), c = (s, r) => {
57
56
  if (!s || !r) return;
58
- const f = w(s, a);
57
+ const f = j(s, a);
59
58
  if (f && a.has(f)) {
60
- l(r) && (t[f] = r);
59
+ T(r) && (t[f] = r);
61
60
  return;
62
61
  }
63
- const o = x(s);
62
+ const o = _(s);
64
63
  if (o.length === 0) return;
65
- const u = x(r);
64
+ const u = _(r);
66
65
  for (const p of o) {
67
- const T = u.find((g) => g.target === p.target);
68
- if (!T) continue;
69
- const d = (p.sourceDataTypeIdentifiers ?? []).map((g) => w(g, a)).filter((g) => !!g && a.has(g)), I = _(p), C = T.sourceDataTypeIdentifiers ?? [];
70
- if ((I.has(j.And) || I.has(j.Or)) && C.length === 1 && d.length === (p.sourceDataTypeIdentifiers?.length ?? 0))
66
+ const l = u.find((g) => g.target === p.target);
67
+ if (!l) continue;
68
+ const d = (p.sourceDataTypeIdentifiers ?? []).map((g) => j(g, a)).filter((g) => !!g && a.has(g)), I = R(p), D = l.sourceDataTypeIdentifiers ?? [];
69
+ if ((I.has("AND") || I.has("OR")) && D.length === 1 && d.length === (p.sourceDataTypeIdentifiers?.length ?? 0))
71
70
  for (const g of d)
72
- t[g] = C[0];
71
+ t[g] = D[0];
73
72
  else {
74
- const g = Math.min(p.sourceDataTypeIdentifiers?.length ?? 0, C.length);
75
- for (let A = 0; A < g; A++)
76
- c(p.sourceDataTypeIdentifiers[A], C[A]);
73
+ const g = Math.min(p.sourceDataTypeIdentifiers?.length ?? 0, D.length);
74
+ for (let K = 0; K < g; K++)
75
+ c(p.sourceDataTypeIdentifiers[K], D[K]);
77
76
  }
78
77
  }
79
78
  };
80
79
  return c(e, n), t;
81
- }, b = (e, n) => {
82
- if (!l(e)) return e;
80
+ }, M = (e, n) => {
81
+ if (!T(e)) return e;
83
82
  const {
84
83
  genericKey: i,
85
84
  genericType: t
86
85
  } = e;
87
86
  if (i && n.has(i)) {
88
87
  const c = n.get(i);
89
- return c && l(c) ? c : e;
88
+ return c && T(c) ? c : e;
90
89
  }
91
90
  if (!t) return e;
92
91
  const a = (t.genericMappers ?? []).map((c) => {
@@ -96,10 +95,10 @@ const O = "GENERIC", y = (e) => typeof e == "object" && e !== null && !Array.isA
96
95
  const f = r.genericKey;
97
96
  if (f && n.has(f)) {
98
97
  const o = n.get(f);
99
- o && K(o) ? s.push(...o.sourceDataTypeIdentifiers) : o && l(o) ? s.push(o) : s.push(r);
100
- } else l(r) ? s.push(b(r, n)) : s.push(r);
98
+ o && A(o) ? s.push(...o.sourceDataTypeIdentifiers) : o && T(o) ? s.push(o) : s.push(r);
99
+ } else T(r) ? s.push(M(r, n)) : s.push(r);
101
100
  }
102
- return R(c, s);
101
+ return G(c, s);
103
102
  });
104
103
  return {
105
104
  ...e,
@@ -108,30 +107,30 @@ const O = "GENERIC", y = (e) => typeof e == "object" && e !== null && !Array.isA
108
107
  genericMappers: a
109
108
  }
110
109
  };
111
- }, F = (e, n, i) => {
110
+ }, J = (e, n, i) => {
112
111
  const t = {}, a = new Set(i), c = (s, r, f) => {
113
112
  if (!(!s || !r || a.size === 0)) {
114
- if (l(s)) {
113
+ if (T(s)) {
115
114
  const o = s.genericKey;
116
- if (o && a.has(o) && (f ? t[o] = f : (K(r) || l(r)) && (t[o] = r), a.delete(o), a.size === 0))
115
+ if (o && a.has(o) && (f ? t[o] = f : (A(r) || T(r)) && (t[o] = r), a.delete(o), a.size === 0))
117
116
  return;
118
117
  }
119
- if (K(s) && K(r)) {
118
+ if (A(s) && A(r)) {
120
119
  const o = Math.min(s.sourceDataTypeIdentifiers?.length, r.sourceDataTypeIdentifiers?.length);
121
120
  for (let u = 0; u < o; u++)
122
121
  if (c(s.sourceDataTypeIdentifiers[u], r.sourceDataTypeIdentifiers[u], r), a.size === 0) return;
123
122
  return;
124
123
  }
125
- if (z(s) && z(r)) {
124
+ if (E(s) && E(r)) {
126
125
  const o = s.rules?.nodes ?? [], u = r.rules?.nodes ?? [], p = Math.min(o.length, u.length);
127
- for (let T = 0; T < p; T++) {
128
- const d = o[T], I = u[T];
126
+ for (let l = 0; l < p; l++) {
127
+ const d = o[l], I = u[l];
129
128
  if (!(!d || !I) && (c(d, I), a.size === 0))
130
129
  return;
131
130
  }
132
131
  return;
133
132
  }
134
- if (G(s) && G(r)) {
133
+ if (b(s) && b(r)) {
135
134
  c(s.config, r.config);
136
135
  return;
137
136
  }
@@ -149,82 +148,82 @@ const O = "GENERIC", y = (e) => typeof e == "object" && e !== null && !Array.isA
149
148
  }
150
149
  };
151
150
  return c(e, n), t;
152
- }, L = (e, n) => {
151
+ }, Y = (e, n) => {
153
152
  const i = e.rules ? {
154
153
  ...e.rules,
155
154
  nodes: e.rules.nodes?.map((t) => t && {
156
155
  ...t,
157
- config: J(t.config, n)
156
+ config: z(t.config, n)
158
157
  })
159
158
  } : void 0;
160
159
  return {
161
160
  ...e,
162
161
  rules: i
163
162
  };
164
- }, H = (e, n, i, t) => {
163
+ }, k = (e, n, i, t) => {
165
164
  const a = /* @__PURE__ */ new Map(), c = e.genericKeys ?? [];
166
165
  if (!e.parameterDefinitions || c.length <= 0) return a;
167
166
  const s = new Set(c);
168
167
  return e.parameterDefinitions.forEach((r, f) => {
169
168
  const o = r.dataTypeIdentifier, u = n[f], p = i.getTypeFromValue(u, t);
170
169
  if (!o || !p) return;
171
- const T = V(o, p, c);
172
- for (const [d, I] of Object.entries(T))
170
+ const l = w(o, p, c);
171
+ for (const [d, I] of Object.entries(l))
173
172
  s.has(d) && (a.has(d) || a.set(d, I));
174
173
  }), a;
175
174
  };
176
- function W(e, n) {
175
+ function L(e, n) {
177
176
  if (e.variant !== n.variant) return !1;
178
177
  const i = n.rules?.nodes ?? [];
179
178
  if (i.length === 0) return !0;
180
179
  const t = e.rules?.nodes ?? [];
181
180
  for (const a of i) {
182
181
  if (!a) continue;
183
- if (!t.some((s) => s ? k(s, a) : !1)) return !1;
182
+ if (!t.some((s) => s ? x(s, a) : !1)) return !1;
184
183
  }
185
184
  return !0;
186
185
  }
187
- function k(e, n) {
186
+ function x(e, n) {
188
187
  if (e.variant !== n.variant) return !1;
189
188
  switch (n.variant) {
190
- case h.ContainsType:
191
- case h.ReturnType:
192
- return M(e.config.dataTypeIdentifier, n.config.dataTypeIdentifier);
193
- case h.ContainsKey: {
189
+ case "CONTAINS_TYPE":
190
+ case "RETURN_TYPE":
191
+ return S(e.config.dataTypeIdentifier, n.config.dataTypeIdentifier);
192
+ case "CONTAINS_KEY": {
194
193
  const i = e.config, t = n.config;
195
- return i.key !== t.key ? !1 : M(i.dataTypeIdentifier, t.dataTypeIdentifier);
194
+ return i.key !== t.key ? !1 : S(i.dataTypeIdentifier, t.dataTypeIdentifier);
196
195
  }
197
- case h.InputType: {
196
+ case "INPUT_TYPE": {
198
197
  const i = e.config, a = n.config.inputTypes ?? [], c = i.inputTypes ?? [];
199
- return a.every((s) => c.some((r) => M(r.dataTypeIdentifier, s.dataTypeIdentifier)));
198
+ return a.every((s) => c.some((r) => S(r.dataTypeIdentifier, s.dataTypeIdentifier)));
200
199
  }
201
- case h.ItemOfCollection: {
200
+ case "ITEM_OF_COLLECTION": {
202
201
  const i = e.config.items ?? [], t = n.config.items ?? [];
203
202
  return i.length !== t.length ? !1 : i.every((a, c) => a === t[c]);
204
203
  }
205
- case h.NumberRange: {
204
+ case "NUMBER_RANGE": {
206
205
  const i = e.config, t = n.config;
207
206
  return i.from === t.from && i.to === t.to && i.steps === t.steps;
208
207
  }
209
- case h.Regex: {
208
+ case "REGEX": {
210
209
  const i = e.config.pattern, t = n.config.pattern;
211
210
  return i === t;
212
211
  }
213
212
  default:
214
- return JSON.stringify(D(e.config)) === JSON.stringify(D(n.config));
213
+ return JSON.stringify(m(e.config)) === JSON.stringify(m(n.config));
215
214
  }
216
215
  }
217
- function q(e, n) {
218
- const i = (s) => !!(s === O || l(s) && s.genericKey), t = (s, r) => i(s) || i(r) ? !0 : s == null || r == null ? s === r : Array.isArray(r) ? !Array.isArray(s) || s.length !== r.length ? !1 : s.every((f, o) => t(f, r[o])) : y(r) ? y(s) ? Object.keys(r).every((o) => t(s[o], r[o])) : !1 : s === r, a = D(e), c = D(n);
216
+ function V(e, n) {
217
+ const i = (s) => !!(s === C || T(s) && s.genericKey), t = (s, r) => i(s) || i(r) ? !0 : s == null || r == null ? s === r : Array.isArray(r) ? !Array.isArray(s) || s.length !== r.length ? !1 : s.every((f, o) => t(f, r[o])) : y(r) ? y(s) ? Object.keys(r).every((o) => t(s[o], r[o])) : !1 : s === r, a = m(e), c = m(n);
219
218
  return t(a, c);
220
219
  }
221
- const E = (e, n) => {
220
+ const P = (e, n) => {
222
221
  if (typeof e == "string") {
223
222
  const t = n.getDataType(e);
224
223
  if (!t) return e;
225
224
  const a = t.genericKeys ?? [];
226
- if (t.variant === P.Array && a.length > 0) {
227
- const s = t.rules?.nodes?.find((r) => r?.variant === h.ContainsType)?.config?.dataTypeIdentifier;
225
+ if (t.variant === "ARRAY" && a.length > 0) {
226
+ const s = t.rules?.nodes?.find((r) => r?.variant === "CONTAINS_TYPE")?.config?.dataTypeIdentifier;
228
227
  if (s) {
229
228
  const [r] = a;
230
229
  return r ? {
@@ -233,7 +232,7 @@ const E = (e, n) => {
233
232
  dataType: t.json,
234
233
  genericMappers: [{
235
234
  target: r,
236
- sourceDataTypeIdentifiers: [E(s, n)]
235
+ sourceDataTypeIdentifiers: [P(s, n)]
237
236
  }]
238
237
  }
239
238
  } : e;
@@ -241,10 +240,10 @@ const E = (e, n) => {
241
240
  }
242
241
  return e;
243
242
  }
244
- if (!l(e) || !e.genericType) return e;
243
+ if (!T(e) || !e.genericType) return e;
245
244
  const i = e.genericType.genericMappers?.map((t) => ({
246
245
  ...t,
247
- sourceDataTypeIdentifiers: t?.sourceDataTypeIdentifiers?.map((a) => E(a, n))
246
+ sourceDataTypeIdentifiers: t?.sourceDataTypeIdentifiers?.map((a) => P(a, n))
248
247
  })) ?? [];
249
248
  return {
250
249
  ...e,
@@ -253,59 +252,59 @@ const E = (e, n) => {
253
252
  genericMappers: i
254
253
  }
255
254
  };
256
- }, m = (e) => {
255
+ }, h = (e) => {
257
256
  if (Array.isArray(e)) {
258
- const n = e.map(m);
257
+ const n = e.map(h);
259
258
  return n.length <= 1 ? n : n.every(y) ? [...n].sort((a, c) => JSON.stringify(a).localeCompare(JSON.stringify(c))) : n.every((a) => !Array.isArray(a) && !y(a)) ? [...n].sort((a, c) => JSON.stringify(a).localeCompare(JSON.stringify(c))) : n;
260
259
  }
261
260
  if (y(e)) {
262
261
  const n = e;
263
- return Object.keys(n).sort().reduce((i, t) => (i[t] = m(n[t]), i), {});
262
+ return Object.keys(n).sort().reduce((i, t) => (i[t] = h(n[t]), i), {});
264
263
  }
265
264
  return e;
266
- }, B = (e, n = []) => {
265
+ }, F = (e, n = []) => {
267
266
  const i = new Set(n), t = (r) => r ? i.size === 0 ? !0 : i.has(r) : !1, a = (r) => {
268
- const o = t(r.target) ? O : r.target, u = (r.sourceDataTypeIdentifiers ?? []).map((p) => s(p));
269
- return m({
267
+ const o = t(r.target) ? C : r.target, u = (r.sourceDataTypeIdentifiers ?? []).map((p) => s(p));
268
+ return h({
270
269
  ...r,
271
270
  target: o,
272
271
  sourceDataTypeIdentifiers: u
273
272
  });
274
273
  }, c = (r) => {
275
- const o = t(r.genericKey) ? O : r.genericKey, u = {
274
+ const o = t(r.genericKey) ? C : r.genericKey, u = {
276
275
  ...r,
277
276
  genericKey: o,
278
277
  dataType: r.dataType ? s(r.dataType) : r.dataType,
279
278
  genericType: r.genericType ? s(r.genericType) : r.genericType
280
279
  };
281
- return m(u);
280
+ return h(u);
282
281
  };
283
282
  function s(r) {
284
283
  if (r == null) return r;
285
284
  if (Array.isArray(r)) {
286
285
  const f = r.map((o) => s(o));
287
- return m(f);
286
+ return h(f);
288
287
  }
289
- if (l(r))
288
+ if (T(r))
290
289
  return c(r);
291
- if (K(r))
290
+ if (A(r))
292
291
  return a(r);
293
292
  if (y(r)) {
294
293
  const f = Object.entries(r).reduce((o, [u, p]) => (o[u] = s(p), o), {});
295
- return m(f);
294
+ return h(f);
296
295
  }
297
296
  return r;
298
297
  }
299
298
  return s(e);
300
299
  };
301
300
  export {
302
- W as isMatchingDataTypeObject,
303
- q as isMatchingType,
304
- L as replaceGenericKeysInDataTypeObject,
305
- b as replaceGenericKeysInType,
306
- B as replaceGenericsAndSortType,
307
- F as resolveAllGenericKeysInDataTypeObject,
308
- V as resolveGenericKeyMappings,
309
- H as resolveGenericKeys,
310
- E as resolveType
301
+ L as isMatchingDataTypeObject,
302
+ V as isMatchingType,
303
+ Y as replaceGenericKeysInDataTypeObject,
304
+ M as replaceGenericKeysInType,
305
+ F as replaceGenericsAndSortType,
306
+ J as resolveAllGenericKeysInDataTypeObject,
307
+ w as resolveGenericKeyMappings,
308
+ k as resolveGenericKeys,
309
+ P as resolveType
311
310
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code0-tech/pictor",
3
- "version": "0.0.0-mvp.3",
3
+ "version": "0.0.0-mvp.5",
4
4
  "type": "module",
5
5
  "description": "A simple template for a custom React component library",
6
6
  "scripts": {
@@ -78,7 +78,8 @@
78
78
  "typescript": "^5.9.3",
79
79
  "vite": "^7.2.1",
80
80
  "vite-plugin-dts": "^4.5.4",
81
- "vite-plugin-lib-inject-css": "^2.2.2"
81
+ "vite-plugin-lib-inject-css": "^2.2.2",
82
+ "@code0-tech/definition-reader": "^0.0.16"
82
83
  },
83
84
  "main": "dist/index.js",
84
85
  "repository": {
@@ -91,7 +92,7 @@
91
92
  "types": "dist/index.d.ts",
92
93
  "peerDependencies": {
93
94
  "@ariakit/react": "^0.4.5",
94
- "@code0-tech/sagittarius-graphql-types": "^0.0.0-4b2e73eae302fe499001bf42fdb3a6bcc5be78aa",
95
+ "@code0-tech/sagittarius-graphql-types": "^0.0.0-65144a9920c6a8de3bcf24acdcb8eec4158cef73",
95
96
  "@radix-ui/react-checkbox": "^1.3.2",
96
97
  "@radix-ui/react-dialog": "^1.1.14",
97
98
  "@radix-ui/react-dropdown-menu": "^2.1.15",
@@ -114,8 +115,5 @@
114
115
  },
115
116
  "publishConfig": {
116
117
  "access": "public"
117
- },
118
- "dependencies": {
119
- "@code0-tech/definition-reader": "^0.0.16"
120
118
  }
121
119
  }