@effect-app/vue-components 3.0.4 → 3.0.6

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.
@@ -95,7 +95,7 @@ export type StringFieldMeta = BaseFieldMeta & {
95
95
  format?: string;
96
96
  };
97
97
  export type NumberFieldMeta = BaseFieldMeta & {
98
- type: "number";
98
+ type: "number" | "int";
99
99
  minimum?: number;
100
100
  maximum?: number;
101
101
  exclusiveMinimum?: number;
@@ -1,282 +1,296 @@
1
- import { S as i, Option as q } from "effect-app";
2
- import { getMetadataFromSchema as V } from "@effect-app/vue/form";
3
- import { useIntl as E, getTransformationFrom as U } from "./vue-components.es3.js";
1
+ import { S as i, Option as w } from "effect-app";
2
+ import { getMetadataFromSchema as k } from "@effect-app/vue/form";
3
+ import { useIntl as V, getTransformationFrom as _ } from "./vue-components.es3.js";
4
4
  import { isObject as $ } from "./vue-components.es16.js";
5
- const j = (e) => i.AST.isUnion(e) && e.types.find((n) => n._tag === "UndefinedKeyword" || n === i.Null.ast), g = (e) => !e || !i.AST.isUnion(e) ? !1 : e.types.find((n) => n._tag === "UndefinedKeyword") ? "undefined" : e.types.find((n) => n === i.Null.ast) ? "null" : !1, _ = (e) => {
5
+ const j = (e) => i.AST.isUnion(e) && e.types.find((n) => n._tag === "UndefinedKeyword" || n === i.Null.ast), c = (e) => !e || !i.AST.isUnion(e) ? !1 : e.types.find((n) => n._tag === "UndefinedKeyword") ? "undefined" : e.types.find((n) => n === i.Null.ast) ? "null" : !1, L = (e) => {
6
6
  const n = [];
7
7
  for (const t of e)
8
8
  if (i.AST.isUnion(t)) {
9
- const o = _(t.types);
9
+ const o = L(t.types);
10
10
  n.push(...o);
11
11
  } else
12
12
  n.push(t);
13
13
  return n;
14
- }, y = ({ meta: e = {}, parent: n = "", property: t, propertySignatures: o }, r = {}) => {
15
- if (t && t._tag === "Transformation")
16
- return y({
17
- parent: n,
18
- meta: e,
19
- property: t.from
20
- });
14
+ }, y = ({ meta: e = {}, parent: n = "", property: t, propertySignatures: o }, s = {}) => {
15
+ if (t && t._tag === "Transformation") {
16
+ const r = i.AST.getAnnotation(t, i.AST.TitleAnnotationId).pipe(w.getOrElse(() => ""));
17
+ if (r !== "Int" && r !== "int")
18
+ return y({
19
+ parent: n,
20
+ meta: e,
21
+ property: t.from
22
+ });
23
+ }
21
24
  if (t?._tag === "TypeLiteral" && "propertySignatures" in t)
22
25
  return y({
23
26
  meta: e,
24
27
  propertySignatures: t.propertySignatures
25
28
  });
26
29
  if (o) {
27
- for (const s of o) {
28
- const l = n ? `${n}.${s.name.toString()}` : s.name.toString(), a = g(s.type);
29
- let f;
30
- e._isNullableDiscriminatedUnion && s.name.toString() === "_tag" || e.required === !1 ? f = !1 : f = !a;
31
- const p = s.type;
32
- if (i.AST.isUnion(s.type)) {
33
- const c = _(s.type.types).filter(
34
- (u) => u._tag !== "UndefinedKeyword" && u !== i.Null.ast
35
- ).map(U);
36
- if (c.some(
37
- (u) => "propertySignatures" in u
30
+ for (const r of o) {
31
+ const u = n ? `${n}.${r.name.toString()}` : r.name.toString(), a = c(r.type);
32
+ let m;
33
+ e._isNullableDiscriminatedUnion && r.name.toString() === "_tag" || e.required === !1 ? m = !1 : m = !a;
34
+ const l = r.type;
35
+ if (i.AST.isUnion(r.type)) {
36
+ const S = L(r.type.types).filter(
37
+ (p) => p._tag !== "UndefinedKeyword" && p !== i.Null.ast
38
+ ).map(_);
39
+ if (S.some(
40
+ (p) => "propertySignatures" in p
38
41
  )) {
39
42
  if (!a) {
40
- const u = y({
41
- parent: l,
42
- property: s.type,
43
- meta: { required: f, nullableOrUndefined: a }
43
+ const p = y({
44
+ parent: u,
45
+ property: r.type,
46
+ meta: { required: m, nullableOrUndefined: a }
44
47
  });
45
- r[l] = u;
48
+ s[u] = p;
46
49
  }
47
- for (const u of c)
48
- if ("propertySignatures" in u) {
49
- const m = a && c.length > 1;
50
+ for (const p of S)
51
+ if ("propertySignatures" in p) {
52
+ const f = a && S.length > 1;
50
53
  Object.assign(
51
- r,
54
+ s,
52
55
  y({
53
- parent: l,
54
- propertySignatures: u.propertySignatures,
55
- meta: m ? { _isNullableDiscriminatedUnion: !0 } : {}
56
+ parent: u,
57
+ propertySignatures: p.propertySignatures,
58
+ meta: f ? { _isNullableDiscriminatedUnion: !0 } : {}
56
59
  })
57
60
  );
58
61
  }
59
62
  } else {
60
- const u = c.filter(i.AST.isTupleType);
61
- if (u.length > 0) {
62
- const m = u[0];
63
- if (r[l] = {
63
+ const p = S.filter(i.AST.isTupleType);
64
+ if (p.length > 0) {
65
+ const f = p[0];
66
+ if (s[u] = {
64
67
  type: "multiple",
65
- members: m.elements,
66
- rest: m.rest,
67
- required: f,
68
+ members: f.elements,
69
+ rest: f.rest,
70
+ required: m,
68
71
  nullableOrUndefined: a
69
- }, m.rest && m.rest.length > 0) {
70
- const T = m.rest[0];
72
+ }, f.rest && f.rest.length > 0) {
73
+ const T = f.rest[0];
71
74
  if (T.type._tag === "TypeLiteral" && "propertySignatures" in T.type)
72
- for (const d of T.type.propertySignatures) {
73
- const h = `${l}.${d.name.toString()}`, v = y({
74
- parent: h,
75
- property: d.type,
75
+ for (const g of T.type.propertySignatures) {
76
+ const x = `${u}.${g.name.toString()}`, v = y({
77
+ parent: x,
78
+ property: g.type,
76
79
  meta: {
77
- required: !g(d.type),
78
- nullableOrUndefined: g(d.type)
80
+ required: !c(g.type),
81
+ nullableOrUndefined: c(g.type)
79
82
  }
80
83
  });
81
- if (v && typeof v == "object" && "type" in v && (r[h] = v, v.type === "multiple" && i.AST.isTupleType(d.type) && d.type.rest && d.type.rest.length > 0)) {
82
- const w = d.type.rest[0];
83
- if (w.type._tag === "TypeLiteral" && "propertySignatures" in w.type)
84
- for (const A of w.type.propertySignatures) {
85
- const L = `${h}.${A.name.toString()}`, O = y({
86
- parent: L,
84
+ if (v && typeof v == "object" && "type" in v && (s[x] = v, v.type === "multiple" && i.AST.isTupleType(g.type) && g.type.rest && g.type.rest.length > 0)) {
85
+ const M = g.type.rest[0];
86
+ if (M.type._tag === "TypeLiteral" && "propertySignatures" in M.type)
87
+ for (const A of M.type.propertySignatures) {
88
+ const N = `${x}.${A.name.toString()}`, O = y({
89
+ parent: N,
87
90
  property: A.type,
88
91
  meta: {
89
- required: !g(A.type),
90
- nullableOrUndefined: g(A.type)
92
+ required: !c(A.type),
93
+ nullableOrUndefined: c(A.type)
91
94
  }
92
95
  });
93
- O && typeof O == "object" && "type" in O && (r[L] = O);
96
+ O && typeof O == "object" && "type" in O && (s[N] = O);
94
97
  }
95
98
  }
96
99
  }
97
100
  }
98
101
  } else {
99
- const m = y({
100
- parent: l,
101
- property: s.type,
102
- meta: { required: f, nullableOrUndefined: a }
102
+ const f = y({
103
+ parent: u,
104
+ property: r.type,
105
+ meta: { required: m, nullableOrUndefined: a }
103
106
  });
104
- r[l] = m;
107
+ s[u] = f;
105
108
  }
106
109
  }
107
110
  } else {
108
- const S = U(p);
109
- if ("propertySignatures" in S)
111
+ const d = _(l);
112
+ if ("propertySignatures" in d)
110
113
  Object.assign(
111
- r,
114
+ s,
112
115
  y({
113
- parent: l,
114
- propertySignatures: S.propertySignatures,
115
- meta: { required: f, nullableOrUndefined: a }
116
+ parent: u,
117
+ propertySignatures: d.propertySignatures,
118
+ meta: { required: m, nullableOrUndefined: a }
116
119
  })
117
120
  );
118
- else if (i.AST.isTupleType(s.type))
119
- if (s.type.rest.length > 0 && s.type.rest[0].type._tag === "TypeLiteral" && "propertySignatures" in s.type.rest[0].type) {
120
- const b = s.type.rest[0].type;
121
+ else if (i.AST.isTupleType(r.type))
122
+ if (r.type.rest.length > 0 && r.type.rest[0].type._tag === "TypeLiteral" && "propertySignatures" in r.type.rest[0].type) {
123
+ const b = r.type.rest[0].type;
121
124
  if (b._tag === "TypeLiteral" && "propertySignatures" in b)
122
- for (const u of b.propertySignatures) {
123
- const m = `${l}.${u.name.toString()}`;
124
- if (i.AST.isTupleType(u.type) && u.type.rest.length > 0) {
125
- const T = u.type.rest[0].type;
125
+ for (const p of b.propertySignatures) {
126
+ const f = `${u}.${p.name.toString()}`;
127
+ if (i.AST.isTupleType(p.type) && p.type.rest.length > 0) {
128
+ const T = p.type.rest[0].type;
126
129
  if (T._tag === "TypeLiteral" && "propertySignatures" in T)
127
- for (const d of T.propertySignatures) {
128
- const h = `${m}.${d.name.toString()}`, v = y({
129
- parent: h,
130
- property: d.type,
130
+ for (const g of T.propertySignatures) {
131
+ const x = `${f}.${g.name.toString()}`, v = y({
132
+ parent: x,
133
+ property: g.type,
131
134
  meta: {
132
- required: !g(d.type),
133
- nullableOrUndefined: g(d.type)
135
+ required: !c(g.type),
136
+ nullableOrUndefined: c(g.type)
134
137
  }
135
138
  });
136
- r[h] = v;
139
+ s[x] = v;
137
140
  }
138
141
  else
139
- r[m] = {
142
+ s[f] = {
140
143
  type: "multiple",
141
- members: u.type.elements,
142
- rest: u.type.rest,
143
- required: !g(u.type),
144
- nullableOrUndefined: g(u.type)
144
+ members: p.type.elements,
145
+ rest: p.type.rest,
146
+ required: !c(p.type),
147
+ nullableOrUndefined: c(p.type)
145
148
  };
146
149
  } else {
147
150
  const T = y({
148
- parent: m,
149
- property: u.type,
151
+ parent: f,
152
+ property: p.type,
150
153
  meta: {
151
- required: !g(u.type),
152
- nullableOrUndefined: g(u.type)
154
+ required: !c(p.type),
155
+ nullableOrUndefined: c(p.type)
153
156
  }
154
157
  });
155
- r[m] = T;
158
+ s[f] = T;
156
159
  }
157
160
  }
158
161
  } else
159
- r[l] = {
162
+ s[u] = {
160
163
  type: "multiple",
161
- members: s.type.elements,
162
- rest: s.type.rest,
163
- required: f,
164
+ members: r.type.elements,
165
+ rest: r.type.rest,
166
+ required: m,
164
167
  nullableOrUndefined: a
165
168
  };
166
169
  else {
167
- const c = y({
168
- parent: l,
169
- property: s.type,
170
+ const S = y({
171
+ parent: u,
172
+ property: r.type,
170
173
  meta: {
171
174
  // an empty string is valid for a S.String field, so we should not mark it as required
172
175
  // TODO: handle this better via the createMeta minLength parsing
173
- required: f && (s.type._tag !== "StringKeyword" || V(s.type).minLength),
176
+ required: m && (r.type._tag !== "StringKeyword" || k(r.type).minLength),
174
177
  nullableOrUndefined: a
175
178
  }
176
179
  });
177
- r[l] = c;
180
+ s[u] = S;
178
181
  }
179
182
  }
180
183
  }
181
- return r;
184
+ return s;
182
185
  }
183
186
  if (t) {
184
- const s = j(t);
185
- if (Object.hasOwnProperty.call(e, "required") || (e.required = !s), i.AST.isUnion(t)) {
186
- const a = _(t.types), f = a.find(
187
- (p) => p._tag !== "UndefinedKeyword" && p !== i.Null.ast
187
+ const r = j(t);
188
+ if (Object.hasOwnProperty.call(e, "required") || (e.required = !r), i.AST.isUnion(t)) {
189
+ const m = L(t.types), l = m.find(
190
+ (d) => d._tag !== "UndefinedKeyword" && d !== i.Null.ast
188
191
  );
189
- return "propertySignatures" in f ? y({
190
- propertySignatures: f.propertySignatures,
192
+ return "propertySignatures" in l ? y({
193
+ propertySignatures: l.propertySignatures,
191
194
  parent: n,
192
195
  meta: e
193
- }) : a.every(i.AST.isLiteral) ? {
196
+ }) : m.every(i.AST.isLiteral) ? {
194
197
  ...e,
195
198
  type: "select",
196
- members: a.map((p) => p.literal)
199
+ members: m.map((d) => d.literal)
197
200
  } : {
198
201
  ...e,
199
202
  ...y({
200
203
  parent: n,
201
204
  meta: e,
202
- property: f
205
+ property: l
203
206
  })
204
207
  };
205
208
  }
206
- return i.AST.isTupleType(t) ? {
207
- ...e,
208
- type: "multiple",
209
- members: t.elements,
210
- rest: t.rest
211
- } : (e = { ...i.AST.getAnnotation(
209
+ if (i.AST.isTupleType(t))
210
+ return {
211
+ ...e,
212
+ type: "multiple",
213
+ members: t.elements,
214
+ rest: t.rest
215
+ };
216
+ e = { ...i.AST.getAnnotation(
212
217
  t,
213
218
  i.AST.JSONSchemaAnnotationId
214
- ).pipe(q.getOrElse(() => ({}))), ...e }, "from" in t ? y({
215
- parent: n,
216
- meta: e,
217
- property: t.from
218
- }) : (e.type = i.AST.getAnnotation(
219
+ ).pipe(w.getOrElse(() => ({}))), ...e };
220
+ const a = i.AST.getAnnotation(
219
221
  t,
220
222
  i.AST.TitleAnnotationId
221
223
  ).pipe(
222
- q.getOrElse(() => "unknown")
223
- ), e));
224
+ w.getOrElse(() => "unknown")
225
+ );
226
+ if (a === "Int" || a === "int")
227
+ e.type = "int";
228
+ else {
229
+ if ("from" in t)
230
+ return y({
231
+ parent: n,
232
+ meta: e,
233
+ property: t.from
234
+ });
235
+ e.type = a;
236
+ }
237
+ return e;
224
238
  }
225
- return r;
226
- }, N = (e, n = "") => {
239
+ return s;
240
+ }, q = (e, n = "") => {
227
241
  const t = {};
228
242
  for (const o in e) {
229
- const r = e[o], s = n ? `${n}.${o}` : o;
230
- r && typeof r == "object" && "type" in r ? t[s] = r : r && typeof r == "object" && Object.assign(t, N(r, s));
243
+ const s = e[o], r = n ? `${n}.${o}` : o;
244
+ s && typeof s == "object" && "type" in s ? t[r] = s : s && typeof s == "object" && Object.assign(t, q(s, r));
231
245
  }
232
246
  return t;
233
- }, k = (e) => {
234
- const n = e.ast, t = {}, o = {}, r = {};
247
+ }, E = (e) => {
248
+ const n = e.ast, t = {}, o = {}, s = {};
235
249
  if (n._tag === "Transformation" || n._tag === "Refinement")
236
- return k(i.make(n.from));
250
+ return E(i.make(n.from));
237
251
  if (n._tag === "Union") {
238
- const a = (n.types || []).filter((p) => p._tag !== "UndefinedKeyword" && p !== i.Null.ast).map(U);
239
- if (a.every((p) => p._tag === "TypeLiteral" && "propertySignatures" in p) && a.length > 0) {
240
- const p = [];
241
- for (const S of a)
242
- if ("propertySignatures" in S) {
243
- const c = S.propertySignatures.find(
244
- (m) => m.name.toString() === "_tag"
252
+ const a = (n.types || []).filter((l) => l._tag !== "UndefinedKeyword" && l !== i.Null.ast).map(_);
253
+ if (a.every((l) => l._tag === "TypeLiteral" && "propertySignatures" in l) && a.length > 0) {
254
+ const l = [];
255
+ for (const d of a)
256
+ if ("propertySignatures" in d) {
257
+ const S = d.propertySignatures.find(
258
+ (f) => f.name.toString() === "_tag"
245
259
  );
246
260
  let b = null;
247
- c && i.AST.isLiteral(c.type) && (b = c.type.literal, p.push(b));
248
- const u = y({
249
- propertySignatures: S.propertySignatures
261
+ S && i.AST.isLiteral(S.type) && (b = S.type.literal, l.push(b));
262
+ const p = y({
263
+ propertySignatures: d.propertySignatures
250
264
  });
251
- b && (r[b] = N(u)), Object.assign(t, u);
265
+ b && (s[b] = q(p)), Object.assign(t, p);
252
266
  }
253
- return p.length > 0 && (t._tag = {
267
+ return l.length > 0 && (t._tag = {
254
268
  type: "select",
255
- members: p,
269
+ members: l,
256
270
  required: !0
257
- }), { meta: t, defaultValues: o, unionMeta: r };
271
+ }), { meta: t, defaultValues: o, unionMeta: s };
258
272
  }
259
273
  }
260
274
  if ("propertySignatures" in n) {
261
- const s = y({
275
+ const r = y({
262
276
  propertySignatures: n.propertySignatures
263
277
  });
264
- if (Object.values(s).every((a) => a && "type" in a))
265
- return { meta: s, defaultValues: o, unionMeta: r };
266
- const l = (a, f = "") => {
267
- for (const p in a) {
268
- const S = f ? `${f}.${p}` : p;
269
- a[p] && typeof a[p] == "object" && "type" in a[p] ? t[S] = a[p] : a[p] && typeof a[p] == "object" && l(a[p], S);
278
+ if (Object.values(r).every((a) => a && "type" in a))
279
+ return { meta: r, defaultValues: o, unionMeta: s };
280
+ const u = (a, m = "") => {
281
+ for (const l in a) {
282
+ const d = m ? `${m}.${l}` : l;
283
+ a[l] && typeof a[l] == "object" && "type" in a[l] ? t[d] = a[l] : a[l] && typeof a[l] == "object" && u(a[l], d);
270
284
  }
271
285
  };
272
- l(s);
286
+ u(r);
273
287
  }
274
- return { meta: t, defaultValues: o, unionMeta: r };
288
+ return { meta: t, defaultValues: o, unionMeta: s };
275
289
  }, B = (e) => i.extend(e, i.Struct({})), z = (e) => {
276
- const { meta: n, unionMeta: t } = k(e);
290
+ const { meta: n, unionMeta: t } = E(e);
277
291
  return { schema: e, meta: n, unionMeta: t };
278
292
  }, C = (e, n) => {
279
- n || (n = E().trans);
293
+ n || (n = V().trans);
280
294
  let t;
281
295
  switch (e.type) {
282
296
  case "string":
@@ -301,9 +315,37 @@ const j = (e) => i.AST.isUnion(e) && e.types.find((n) => n._tag === "UndefinedKe
301
315
  })
302
316
  }));
303
317
  break;
304
- case "number":
318
+ case "int": {
305
319
  t = i.Number.annotations({
306
320
  message: () => n("validation.empty")
321
+ }).pipe(
322
+ i.int({ message: (s) => n("validation.integer.expected", { actualValue: String(s.actual) }) })
323
+ ), typeof e.minimum == "number" && (t = t.pipe(i.greaterThanOrEqualTo(e.minimum)).annotations({
324
+ message: () => n(e.minimum === 0 ? "validation.number.positive" : "validation.number.min", {
325
+ minimum: e.minimum,
326
+ isExclusive: !0
327
+ })
328
+ })), typeof e.maximum == "number" && (t = t.pipe(i.lessThanOrEqualTo(e.maximum)).annotations({
329
+ message: () => n("validation.number.max", {
330
+ maximum: e.maximum,
331
+ isExclusive: !0
332
+ })
333
+ })), typeof e.exclusiveMinimum == "number" && (t = t.pipe(i.greaterThan(e.exclusiveMinimum)).annotations({
334
+ message: () => n(e.exclusiveMinimum === 0 ? "validation.number.positive" : "validation.number.min", {
335
+ minimum: e.exclusiveMinimum,
336
+ isExclusive: !1
337
+ })
338
+ })), typeof e.exclusiveMaximum == "number" && (t = t.pipe(i.lessThan(e.exclusiveMaximum)).annotations({
339
+ message: () => n("validation.number.max", {
340
+ maximum: e.exclusiveMaximum,
341
+ isExclusive: !1
342
+ })
343
+ }));
344
+ break;
345
+ }
346
+ case "number":
347
+ t = i.Number.annotations({
348
+ message: () => n("validation.number.expected", { actualValue: "NaN" })
307
349
  }), e.required && t.annotations({
308
350
  message: () => n("validation.empty")
309
351
  }), typeof e.minimum == "number" && (t = t.pipe(i.greaterThanOrEqualTo(e.minimum)).annotations({
@@ -384,71 +426,71 @@ const j = (e) => i.AST.isUnion(e) && e.types.find((n) => n._tag === "UndefinedKe
384
426
  "time",
385
427
  "url"
386
428
  ], H = (e) => K.includes(e) ? e : "text";
387
- function F(e, n) {
429
+ function I(e, n) {
388
430
  const t = { ...e };
389
431
  for (const o in n)
390
- Array.isArray(n[o]) ? t[o] = n[o] : n[o] && $(n[o]) ? t[o] = F(t[o], n[o]) : t[o] = n[o];
432
+ Array.isArray(n[o]) ? t[o] = n[o] : n[o] && $(n[o]) ? t[o] = I(t[o], n[o]) : t[o] = n[o];
391
433
  return t;
392
434
  }
393
- function M(e) {
435
+ function U(e) {
394
436
  return e && "fields" in e && typeof e.fields == "object";
395
437
  }
396
- function P(e) {
438
+ function F(e) {
397
439
  return e && "members" in e && Array.isArray(e.members);
398
440
  }
399
- const x = (e, n = {}) => {
441
+ const h = (e, n = {}) => {
400
442
  const t = e.ast;
401
443
  if (t?.defaultValue)
402
444
  return t.defaultValue();
403
- if (g(e.ast) === "null")
445
+ if (c(e.ast) === "null")
404
446
  return null;
405
- if (g(e.ast) !== "undefined") {
406
- if (M(e)) {
447
+ if (c(e.ast) !== "undefined") {
448
+ if (U(e)) {
407
449
  const o = {};
408
- for (const [r, s] of Object.entries(e.fields)) {
409
- const l = s?.ast;
410
- if (l?.defaultValue)
450
+ for (const [s, r] of Object.entries(e.fields)) {
451
+ const u = r?.ast;
452
+ if (u?.defaultValue)
411
453
  try {
412
- o[r] = l.defaultValue();
454
+ o[s] = u.defaultValue();
413
455
  continue;
414
456
  } catch {
415
457
  }
416
- const a = x(s, n[r] || {});
417
- a !== void 0 && (o[r] = a);
458
+ const a = h(r, n[s] || {});
459
+ a !== void 0 && (o[s] = a);
418
460
  }
419
461
  return { ...o, ...n };
420
462
  }
421
- if (e?.from && M(e.from))
422
- return x(e.from, n);
423
- if (P(e)) {
424
- const o = e.members.reduce((r, s) => (M(s) && Object.entries(s.fields).forEach(([l, a]) => {
425
- const f = a.ast, p = r[l]?.ast;
426
- (!r[l] || f?.defaultValue && !p?.defaultValue) && (r[l] = a);
427
- }), r), {});
428
- return Object.entries(o).reduce((r, [s, l]) => (r[s] = x(l, n[s] || {}), r), n);
463
+ if (e?.from && U(e.from))
464
+ return h(e.from, n);
465
+ if (F(e)) {
466
+ const o = e.members.reduce((s, r) => (U(r) && Object.entries(r.fields).forEach(([u, a]) => {
467
+ const m = a.ast, l = s[u]?.ast;
468
+ (!s[u] || m?.defaultValue && !l?.defaultValue) && (s[u] = a);
469
+ }), s), {});
470
+ return Object.entries(o).reduce((s, [r, u]) => (s[r] = h(u, n[r] || {}), s), n);
429
471
  }
430
472
  if (Object.keys(n).length === 0)
431
473
  switch (e.ast._tag) {
432
474
  case "Refinement":
433
- return x(i.make(e.ast.from), n);
475
+ return h(i.make(e.ast.from), n);
434
476
  case "Transformation": {
435
477
  const o = i.make(e.ast.from);
436
- return x(o, n);
478
+ return h(o, n);
437
479
  }
438
480
  case "TypeLiteral": {
439
481
  const o = { ...n };
440
- for (const r of t.propertySignatures) {
441
- const s = r.name.toString(), l = r.type;
442
- if (l._tag === "Transformation" && l.defaultValue) {
443
- o[s] = l.defaultValue();
482
+ for (const s of t.propertySignatures) {
483
+ const r = s.name.toString(), u = s.type;
484
+ if (u._tag === "Transformation" && u.defaultValue) {
485
+ o[r] = u.defaultValue();
444
486
  continue;
445
487
  }
446
- if (l.defaultValue) {
447
- o[s] = l.defaultValue();
488
+ if (u.defaultValue) {
489
+ o[r] = u.defaultValue();
448
490
  continue;
449
491
  }
450
- const a = i.make(l), f = x(a, n[s] || {});
451
- f !== void 0 && (o[s] = f);
492
+ const a = i.make(u), m = h(a, n[r] || {});
493
+ m !== void 0 && (o[r] = m);
452
494
  }
453
495
  return o;
454
496
  }
@@ -461,12 +503,12 @@ const x = (e, n = {}) => {
461
503
  };
462
504
  export {
463
505
  y as createMeta,
464
- F as deepMerge,
465
- x as defaultsValueFromSchema,
506
+ I as deepMerge,
507
+ h as defaultsValueFromSchema,
466
508
  B as duplicateSchema,
467
509
  C as generateInputStandardSchemaFromFieldMeta,
468
510
  z as generateMetaFromSchema,
469
511
  H as getInputType,
470
- g as isNullableOrUndefined,
512
+ c as isNullableOrUndefined,
471
513
  G as nullableInput
472
514
  };
@@ -1,4 +1,4 @@
1
- import { TraceAPI as r } from "./vue-components.es51.js";
1
+ import { TraceAPI as r } from "./vue-components.es52.js";
2
2
  var t = r.getInstance();
3
3
  export {
4
4
  t as trace
@@ -1,4 +1,4 @@
1
- import { ContextAPI as t } from "./vue-components.es50.js";
1
+ import { ContextAPI as t } from "./vue-components.es51.js";
2
2
  var o = t.getInstance();
3
3
  export {
4
4
  o as context
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as m, createElementBlock as d, openBlock as u, withModifiers as f, createElementVNode as l, unref as s, renderSlot as a } from "vue";
2
2
  import { useStore as b } from "@tanstack/vue-form";
3
3
  import { usePreventClose as p } from "./vue-components.es11.js";
4
- import { getOmegaStore as c } from "./vue-components.es52.js";
4
+ import { getOmegaStore as c } from "./vue-components.es53.js";
5
5
  const S = ["disabled"], V = /* @__PURE__ */ m({
6
6
  __name: "OmegaWrapper",
7
7
  props: {