@effect-app/vue-components 4.0.0-beta.21 → 4.0.0-beta.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,44 +1,49 @@
1
- import { S as i, Effect as F, Option as U } from "effect-app";
2
- import { useIntl as _, getTransformationFrom as q } from "./vue-components.es3.js";
3
- import { isObject as P } from "./vue-components.es16.js";
4
- const b = (e) => {
1
+ import { S as i, Effect as P, Option as w } from "effect-app";
2
+ import { useIntl as I, getTransformationFrom as q } from "./vue-components.es3.js";
3
+ import { isObject as G } from "./vue-components.es16.js";
4
+ const E = /* @__PURE__ */ new Set(), K = () => globalThis.process?.env?.NODE_ENV !== "production", S = (e) => {
5
5
  let t = q(e);
6
6
  for (; i.AST.isDeclaration(t) && t.typeParameters.length > 0; )
7
7
  t = q(t.typeParameters[0]);
8
8
  return t;
9
- }, k = (e) => i.AST.isUndefined(e) || i.AST.isNull(e), D = (e) => i.AST.isUnion(e) ? e.types.find((t) => k(t)) : !1, g = (e) => !e || !i.AST.isUnion(e) ? !1 : e.types.find((t) => i.AST.isUndefined(t)) ? "undefined" : e.types.find((t) => i.AST.isNull(t)) ? "null" : !1, j = (e) => {
9
+ }, j = (e) => i.AST.isUndefined(e) || i.AST.isNull(e), _ = (e) => i.AST.isUnion(e) && e.types.length === 1 && i.AST.isLiteral(e.types[0]) ? e.types[0] : e, B = (e) => i.AST.isUnion(e) ? e.types.find((t) => j(t)) : !1, g = (e) => !e || !i.AST.isUnion(e) ? !1 : e.types.find((t) => i.AST.isUndefined(t)) ? "undefined" : e.types.find((t) => i.AST.isNull(t)) ? "null" : !1, U = (e) => {
10
10
  const t = [];
11
11
  for (const n of e)
12
12
  if (i.AST.isUnion(n)) {
13
- const r = j(n.types);
13
+ const r = U(n.types);
14
14
  t.push(...r);
15
15
  } else
16
16
  t.push(n);
17
17
  return t;
18
- }, V = (e) => j(e).map(b).filter((t) => !k(t)), I = (e) => {
18
+ }, F = (e) => U(e).map(S).filter((t) => !j(t)), C = (e) => {
19
19
  const t = i.AST.resolve(e)?.jsonSchema;
20
20
  return t && typeof t == "object" ? t : {};
21
- }, w = (e) => {
22
- const t = e.context?.defaultValue?.[0];
23
- if (t?.transformation?.decode?.run)
21
+ }, D = (e) => {
22
+ if (e?.transformation?.decode?.run)
24
23
  try {
25
- const n = F.runSync(t.transformation.decode.run(U.none()));
26
- return U.isSome(n) ? n.value : void 0;
24
+ const t = P.runSync(e.transformation.decode.run(w.none()));
25
+ return w.isSome(t) ? t.value : void 0;
27
26
  } catch {
28
27
  return;
29
28
  }
30
- }, G = (e) => (e.checks ?? []).flatMap((n) => {
29
+ }, A = (e) => {
30
+ const t = e.context?.defaultValue?.[0], n = D(t);
31
+ if (n !== void 0) return n;
32
+ const r = e.encoding?.[0];
33
+ if (r && e.context?.isOptional)
34
+ return D(r);
35
+ }, R = (e) => (e.checks ?? []).flatMap((n) => {
31
36
  if (n._tag === "FilterGroup")
32
- return n.checks.flatMap((o) => {
33
- const s = o.annotations?.meta;
37
+ return n.checks.flatMap((a) => {
38
+ const s = a.annotations?.meta;
34
39
  return s && typeof s == "object" ? [s] : [];
35
40
  });
36
41
  const r = n.annotations?.meta;
37
42
  return r && typeof r == "object" ? [r] : [];
38
- }), E = (e) => {
43
+ }), $ = (e) => {
39
44
  const t = {
40
45
  description: i.AST.resolveDescription(e)
41
- }, n = G(e);
46
+ }, n = R(e);
42
47
  if (i.AST.isString(e)) {
43
48
  t.type = "string";
44
49
  for (const r of n)
@@ -64,6 +69,9 @@ const b = (e) => {
64
69
  case "isLessThanOrEqualTo":
65
70
  t.maximum = r.maximum;
66
71
  break;
72
+ case "isBetween":
73
+ t.minimum = r.minimum, t.maximum = r.maximum;
74
+ break;
67
75
  case "isGreaterThan":
68
76
  t.exclusiveMinimum = r.exclusiveMinimum;
69
77
  break;
@@ -71,122 +79,127 @@ const b = (e) => {
71
79
  t.exclusiveMaximum = r.exclusiveMaximum;
72
80
  break;
73
81
  }
74
- } else i.AST.isBoolean(e) ? t.type = "boolean" : t.type = "unknown";
82
+ } else i.AST.isBoolean(e) ? t.type = "boolean" : i.AST.isDeclaration(e) && e.annotations?.typeConstructor?._tag === "Date" ? t.type = "date" : t.type = "unknown";
75
83
  return t;
76
- }, d = ({ meta: e = {}, parent: t = "", property: n, propertySignatures: r }, o = {}) => {
77
- if (n && (n = b(n)), n && i.AST.isObjects(n))
78
- return d({
84
+ }, y = ({ meta: e = {}, parent: t = "", property: n, propertySignatures: r }, a = {}) => {
85
+ if (n && (n = S(n)), n && i.AST.isObjects(n))
86
+ return y({
79
87
  meta: e,
80
88
  propertySignatures: n.propertySignatures
81
89
  });
82
90
  if (r) {
83
91
  for (const s of r) {
84
- const l = t ? `${t}.${s.name.toString()}` : s.name.toString(), a = g(s.type);
85
- let u;
86
- e._isNullableDiscriminatedUnion && s.name.toString() === "_tag" || e.required === !1 ? u = !1 : u = !a;
87
- const m = b(s.type);
92
+ const l = t ? `${t}.${s.name.toString()}` : s.name.toString(), o = g(s.type);
93
+ let m;
94
+ e._isNullableDiscriminatedUnion && s.name.toString() === "_tag" || e.required === !1 ? m = !1 : m = !o;
95
+ const c = S(s.type);
88
96
  if (i.AST.isUnion(s.type)) {
89
- const c = V(s.type.types);
90
- if (c.some(i.AST.isObjects)) {
91
- if (!a) {
92
- const f = d({
97
+ const u = F(s.type.types);
98
+ if (u.some(i.AST.isObjects)) {
99
+ if (!o) {
100
+ const f = y({
93
101
  parent: l,
94
102
  property: s.type,
95
- meta: { required: u, nullableOrUndefined: a }
103
+ meta: { required: m, nullableOrUndefined: o }
96
104
  });
97
- o[l] = f;
105
+ a[l] = f;
98
106
  }
99
- for (const f of c)
107
+ for (const f of u)
100
108
  if (i.AST.isObjects(f)) {
101
- const p = a && c.length > 1;
102
- Object.assign(
103
- o,
104
- d({
105
- parent: l,
106
- propertySignatures: f.propertySignatures,
107
- meta: p ? { _isNullableDiscriminatedUnion: !0 } : {}
108
- })
109
- );
109
+ const p = o && u.length > 1, h = y({
110
+ parent: l,
111
+ propertySignatures: f.propertySignatures,
112
+ meta: p ? { _isNullableDiscriminatedUnion: !0 } : {}
113
+ });
114
+ for (const [d, T] of Object.entries(h)) {
115
+ const b = a[d];
116
+ b && b.type === "select" && T?.type === "select" ? b.members = [
117
+ ...b.members,
118
+ ...T.members.filter(
119
+ (x) => !b.members.includes(x)
120
+ )
121
+ ] : a[d] = T;
122
+ }
110
123
  }
111
124
  } else {
112
- const f = c.filter(i.AST.isArrays);
125
+ const f = u.filter(i.AST.isArrays);
113
126
  if (f.length > 0) {
114
127
  const p = f[0];
115
- if (o[l] = {
128
+ if (a[l] = {
116
129
  type: "multiple",
117
130
  members: p.elements,
118
131
  rest: p.rest,
119
- required: u,
120
- nullableOrUndefined: a
132
+ required: m,
133
+ nullableOrUndefined: o
121
134
  }, p.rest && p.rest.length > 0) {
122
- const S = b(p.rest[0]);
123
- if (i.AST.isObjects(S))
124
- for (const y of S.propertySignatures) {
125
- const A = `${l}.${y.name.toString()}`, h = d({
126
- parent: A,
127
- property: y.type,
135
+ const h = S(p.rest[0]);
136
+ if (i.AST.isObjects(h))
137
+ for (const d of h.propertySignatures) {
138
+ const T = `${l}.${d.name.toString()}`, b = y({
139
+ parent: T,
140
+ property: d.type,
128
141
  meta: {
129
- required: !g(y.type),
130
- nullableOrUndefined: g(y.type)
142
+ required: !g(d.type),
143
+ nullableOrUndefined: g(d.type)
131
144
  }
132
145
  });
133
- if (h && typeof h == "object" && "type" in h && (o[A] = h, h.type === "multiple" && i.AST.isArrays(y.type) && y.type.rest && y.type.rest.length > 0)) {
134
- const L = b(y.type.rest[0]);
135
- if (i.AST.isObjects(L))
136
- for (const v of L.propertySignatures) {
137
- const N = `${A}.${v.name.toString()}`, x = d({
146
+ if (b && typeof b == "object" && "type" in b && (a[T] = b, b.type === "multiple" && i.AST.isArrays(d.type) && d.type.rest && d.type.rest.length > 0)) {
147
+ const x = S(d.type.rest[0]);
148
+ if (i.AST.isObjects(x))
149
+ for (const O of x.propertySignatures) {
150
+ const N = `${T}.${O.name.toString()}`, k = y({
138
151
  parent: N,
139
- property: v.type,
152
+ property: O.type,
140
153
  meta: {
141
- required: !g(v.type),
142
- nullableOrUndefined: g(v.type)
154
+ required: !g(O.type),
155
+ nullableOrUndefined: g(O.type)
143
156
  }
144
157
  });
145
- x && typeof x == "object" && "type" in x && (o[N] = x);
158
+ k && typeof k == "object" && "type" in k && (a[N] = k);
146
159
  }
147
160
  }
148
161
  }
149
162
  }
150
163
  } else {
151
- const p = d({
164
+ const p = y({
152
165
  parent: l,
153
166
  property: s.type,
154
- meta: { required: u, nullableOrUndefined: a }
167
+ meta: { required: m, nullableOrUndefined: o }
155
168
  });
156
- o[l] = p;
169
+ a[l] = p;
157
170
  }
158
171
  }
159
- } else if (i.AST.isObjects(m))
172
+ } else if (i.AST.isObjects(c))
160
173
  Object.assign(
161
- o,
162
- d({
174
+ a,
175
+ y({
163
176
  parent: l,
164
- propertySignatures: m.propertySignatures,
165
- meta: { required: u, nullableOrUndefined: a }
177
+ propertySignatures: c.propertySignatures,
178
+ meta: { required: m, nullableOrUndefined: o }
166
179
  })
167
180
  );
168
181
  else if (i.AST.isArrays(s.type))
169
- if (s.type.rest.length > 0 && i.AST.isObjects(b(s.type.rest[0]))) {
170
- const T = b(s.type.rest[0]);
171
- if (i.AST.isObjects(T))
172
- for (const f of T.propertySignatures) {
182
+ if (s.type.rest.length > 0 && i.AST.isObjects(S(s.type.rest[0]))) {
183
+ const v = S(s.type.rest[0]);
184
+ if (i.AST.isObjects(v))
185
+ for (const f of v.propertySignatures) {
173
186
  const p = `${l}.${f.name.toString()}`;
174
187
  if (i.AST.isArrays(f.type) && f.type.rest.length > 0) {
175
- const S = b(f.type.rest[0]);
176
- if (i.AST.isObjects(S))
177
- for (const y of S.propertySignatures) {
178
- const A = `${p}.${y.name.toString()}`, h = d({
179
- parent: A,
180
- property: y.type,
188
+ const h = S(f.type.rest[0]);
189
+ if (i.AST.isObjects(h))
190
+ for (const d of h.propertySignatures) {
191
+ const T = `${p}.${d.name.toString()}`, b = y({
192
+ parent: T,
193
+ property: d.type,
181
194
  meta: {
182
- required: !g(y.type),
183
- nullableOrUndefined: g(y.type)
195
+ required: !g(d.type),
196
+ nullableOrUndefined: g(d.type)
184
197
  }
185
198
  });
186
- o[A] = h;
199
+ a[T] = b;
187
200
  }
188
201
  else
189
- o[p] = {
202
+ a[p] = {
190
203
  type: "multiple",
191
204
  members: f.type.elements,
192
205
  rest: f.type.rest,
@@ -194,7 +207,7 @@ const b = (e) => {
194
207
  nullableOrUndefined: g(f.type)
195
208
  };
196
209
  } else {
197
- const S = d({
210
+ const h = y({
198
211
  parent: p,
199
212
  property: f.type,
200
213
  meta: {
@@ -202,51 +215,57 @@ const b = (e) => {
202
215
  nullableOrUndefined: g(f.type)
203
216
  }
204
217
  });
205
- o[p] = S;
218
+ a[p] = h;
206
219
  }
207
220
  }
208
221
  } else
209
- o[l] = {
222
+ a[l] = {
210
223
  type: "multiple",
211
224
  members: s.type.elements,
212
225
  rest: s.type.rest,
213
- required: u,
214
- nullableOrUndefined: a
226
+ required: m,
227
+ nullableOrUndefined: o
215
228
  };
216
229
  else {
217
- const c = d({
230
+ const u = y({
218
231
  parent: l,
219
232
  property: s.type,
220
233
  meta: {
221
234
  // an empty string is valid for a S.String field, so we should not mark it as required
222
235
  // TODO: handle this better via the createMeta minLength parsing
223
- required: u && (!i.AST.isString(m) || !!E(s.type).minLength),
224
- nullableOrUndefined: a
236
+ required: m && (!i.AST.isString(c) || !!$(s.type).minLength),
237
+ nullableOrUndefined: o
225
238
  }
226
239
  });
227
- o[l] = c;
240
+ a[l] = u;
228
241
  }
229
242
  }
230
- return o;
243
+ return a;
231
244
  }
232
245
  if (n) {
233
- const s = D(n);
234
- if (n = b(n), Object.hasOwnProperty.call(e, "required") || (e.required = !s), i.AST.isUnion(n)) {
235
- const l = j(n.types).map(b), a = l.find((u) => !k(u));
236
- return i.AST.isObjects(a) ? d({
237
- propertySignatures: a.propertySignatures,
238
- parent: t,
239
- meta: e
240
- }) : l.every((u) => k(u) || i.AST.isLiteral(u)) ? {
246
+ const s = B(n);
247
+ if (n = S(n), Object.hasOwnProperty.call(e, "required") || (e.required = !s), i.AST.isUnion(n)) {
248
+ const l = U(n.types).map(S), o = l.filter((u) => !j(u));
249
+ if (o.length === 1 && i.AST.isLiteral(o[0]) && typeof o[0].literal == "boolean")
250
+ return y({ parent: t, meta: e, property: o[0] });
251
+ const m = o[0];
252
+ if (i.AST.isObjects(m))
253
+ return y({
254
+ propertySignatures: m.propertySignatures,
255
+ parent: t,
256
+ meta: e
257
+ });
258
+ const c = l.map(_);
259
+ return c.every((u) => j(u) || i.AST.isLiteral(u)) ? {
241
260
  ...e,
242
261
  type: "select",
243
- members: l.filter(i.AST.isLiteral).map((u) => u.literal)
262
+ members: c.filter(i.AST.isLiteral).map((u) => u.literal)
244
263
  } : {
245
264
  ...e,
246
- ...d({
265
+ ...y({
247
266
  parent: t,
248
267
  meta: e,
249
- property: a
268
+ property: m
250
269
  })
251
270
  };
252
271
  }
@@ -255,61 +274,64 @@ const b = (e) => {
255
274
  type: "multiple",
256
275
  members: n.elements,
257
276
  rest: n.rest
258
- } : (e = { ...I(n), ...E(n), ...e }, e);
277
+ } : (e = { ...C(n), ...$(n), ...e }, e);
259
278
  }
260
- return o;
261
- }, $ = (e, t = "") => {
279
+ return a;
280
+ }, V = (e, t = "") => {
262
281
  const n = {};
263
282
  for (const r in e) {
264
- const o = e[r], s = t ? `${t}.${r}` : r;
265
- o && typeof o == "object" && "type" in o ? n[s] = o : o && typeof o == "object" && Object.assign(n, $(o, s));
283
+ const a = e[r], s = t ? `${t}.${r}` : r;
284
+ a && typeof a == "object" && "type" in a ? n[s] = a : a && typeof a == "object" && Object.assign(n, V(a, s));
266
285
  }
267
286
  return n;
268
- }, K = (e) => {
269
- const t = b(e.ast), n = {}, r = {}, o = {};
287
+ }, J = (e) => {
288
+ const t = S(e.ast), n = {}, r = {}, a = {};
270
289
  if (i.AST.isUnion(t)) {
271
- const s = V(t.types);
290
+ const s = F(t.types);
272
291
  if (s.every(i.AST.isObjects) && s.length > 0) {
273
- const a = [];
274
- for (const u of s)
275
- if (i.AST.isObjects(u)) {
276
- const m = u.propertySignatures.find(
277
- (f) => f.name.toString() === "_tag"
292
+ const o = [];
293
+ for (const m of s)
294
+ if (i.AST.isObjects(m)) {
295
+ const c = m.propertySignatures.find(
296
+ (p) => p.name.toString() === "_tag"
278
297
  );
279
- let c = null;
280
- m && i.AST.isLiteral(m.type) && (c = m.type.literal, a.push(c));
281
- const T = d({
282
- propertySignatures: u.propertySignatures
298
+ let u = null;
299
+ const v = c ? _(c.type) : null;
300
+ v && i.AST.isLiteral(v) && (u = v.literal, o.push(u), c && i.AST.isUnion(c.type) && K() && u != null && !E.has(u) && (E.add(u), console.warn(
301
+ `[OmegaForm] Union member with _tag "${u}" uses S.Struct({ _tag: S.Literal("${u}"), ... }). Please migrate to S.TaggedStruct("${u}", { ... }) for cleaner AST handling.`
302
+ )));
303
+ const f = y({
304
+ propertySignatures: m.propertySignatures
283
305
  });
284
- c && (o[c] = $(T)), Object.assign(n, T);
306
+ u && (a[u] = V(f)), Object.assign(n, f);
285
307
  }
286
- return a.length > 0 && (n._tag = {
308
+ return o.length > 0 && (n._tag = {
287
309
  type: "select",
288
- members: a,
310
+ members: o,
289
311
  required: !0
290
- }), { meta: n, defaultValues: r, unionMeta: o };
312
+ }), { meta: n, defaultValues: r, unionMeta: a };
291
313
  }
292
314
  }
293
315
  if (i.AST.isObjects(t)) {
294
- const s = d({
316
+ const s = y({
295
317
  propertySignatures: t.propertySignatures
296
318
  });
297
- if (Object.values(s).every((a) => a && "type" in a))
298
- return { meta: s, defaultValues: r, unionMeta: o };
299
- const l = (a, u = "") => {
300
- for (const m in a) {
301
- const c = u ? `${u}.${m}` : m;
302
- a[m] && typeof a[m] == "object" && "type" in a[m] ? n[c] = a[m] : a[m] && typeof a[m] == "object" && l(a[m], c);
319
+ if (Object.values(s).every((o) => o && "type" in o))
320
+ return { meta: s, defaultValues: r, unionMeta: a };
321
+ const l = (o, m = "") => {
322
+ for (const c in o) {
323
+ const u = m ? `${m}.${c}` : c;
324
+ o[c] && typeof o[c] == "object" && "type" in o[c] ? n[u] = o[c] : o[c] && typeof o[c] == "object" && l(o[c], u);
303
325
  }
304
326
  };
305
327
  l(s);
306
328
  }
307
- return { meta: n, defaultValues: r, unionMeta: o };
308
- }, Q = (e) => e, W = (e) => {
309
- const { meta: t, unionMeta: n } = K(e);
329
+ return { meta: n, defaultValues: r, unionMeta: a };
330
+ }, Z = (e) => e, ee = (e) => {
331
+ const { meta: t, unionMeta: n } = J(e);
310
332
  return { schema: e, meta: t, unionMeta: n };
311
- }, X = (e, t) => {
312
- t || (t = _().trans);
333
+ }, te = (e, t) => {
334
+ t || (t = I().trans);
313
335
  let n;
314
336
  switch (e.type) {
315
337
  case "string":
@@ -379,6 +401,9 @@ const b = (e) => {
379
401
  case "boolean":
380
402
  n = i.Boolean;
381
403
  break;
404
+ case "date":
405
+ n = i.Date;
406
+ break;
382
407
  case "unknown":
383
408
  n = i.Unknown;
384
409
  break;
@@ -387,7 +412,7 @@ const b = (e) => {
387
412
  break;
388
413
  }
389
414
  return e.required || (n = i.NullishOr(n)), i.toStandardSchemaV1(n);
390
- }, Y = (e, t) => i.NullOr(e), B = [
415
+ }, W = [
391
416
  "button",
392
417
  "checkbox",
393
418
  "color",
@@ -403,63 +428,61 @@ const b = (e) => {
403
428
  "text",
404
429
  "time",
405
430
  "url"
406
- ], Z = (e) => B.includes(e) ? e : "text";
407
- function R(e, t) {
431
+ ], ne = (e) => W.includes(e) ? e : "text";
432
+ function z(e, t) {
408
433
  const n = { ...e };
409
434
  for (const r in t)
410
- Array.isArray(t[r]) ? n[r] = t[r] : t[r] && P(t[r]) ? n[r] = R(n[r], t[r]) : n[r] = t[r];
435
+ Array.isArray(t[r]) ? n[r] = t[r] : t[r] && G(t[r]) ? n[r] = z(n[r], t[r]) : n[r] = t[r];
411
436
  return n;
412
437
  }
413
- function M(e) {
438
+ function L(e) {
414
439
  return e && "fields" in e && typeof e.fields == "object";
415
440
  }
416
- function C(e) {
441
+ function H(e) {
417
442
  return e && "members" in e && Array.isArray(e.members);
418
443
  }
419
- const O = (e, t = {}) => {
420
- const n = e.ast, r = w(n);
444
+ const M = (e, t = {}) => {
445
+ const n = e.ast, r = A(n);
421
446
  if (r !== void 0)
422
447
  return r;
423
448
  if (g(e.ast) === "null")
424
449
  return null;
425
450
  if (g(e.ast) !== "undefined") {
426
- if (M(e)) {
427
- const o = {};
451
+ if (L(e)) {
452
+ const a = {};
428
453
  for (const [s, l] of Object.entries(e.fields)) {
429
- const a = l?.ast;
430
- if (a?.defaultValue)
431
- try {
432
- o[s] = a.defaultValue();
433
- continue;
434
- } catch {
435
- }
436
- const u = O(l, t[s] || {});
437
- u !== void 0 && (o[s] = u);
454
+ const o = A(l?.ast);
455
+ if (o !== void 0) {
456
+ a[s] = o;
457
+ continue;
458
+ }
459
+ const m = M(l, t[s] || {});
460
+ m !== void 0 ? a[s] = m : g(l.ast) === "undefined" && (a[s] = void 0);
438
461
  }
439
- return { ...o, ...t };
462
+ return { ...a, ...t };
440
463
  }
441
- if (e?.from && M(e.from))
442
- return O(e.from, t);
443
- if (C(e)) {
444
- const o = e.members.reduce((s, l) => (M(l) && Object.entries(l.fields).forEach(([a, u]) => {
445
- const m = u.ast, c = s[a]?.ast;
446
- (!s[a] || m?.defaultValue && !c?.defaultValue) && (s[a] = u);
464
+ if (e?.from && L(e.from))
465
+ return M(e.from, t);
466
+ if (H(e)) {
467
+ const a = e.members.reduce((s, l) => (L(l) && Object.entries(l.fields).forEach(([o, m]) => {
468
+ const c = A(m.ast), u = s[o] ? A(s[o].ast) : void 0;
469
+ (!s[o] || c !== void 0 && u === void 0) && (s[o] = m);
447
470
  }), s), {});
448
- return Object.keys(o).length === 0 ? Object.keys(t).length > 0 ? t : void 0 : Object.entries(o).reduce((s, [l, a]) => (s[l] = O(a, t[l] || {}), s), t);
471
+ return Object.keys(a).length === 0 ? Object.keys(t).length > 0 ? t : void 0 : Object.entries(a).reduce((s, [l, o]) => (s[l] = M(o, t[l] || {}), s), t);
449
472
  }
450
473
  if (Object.keys(t).length === 0) {
451
474
  if (i.AST.isObjects(n)) {
452
- const o = { ...t };
475
+ const a = { ...t };
453
476
  for (const s of n.propertySignatures) {
454
- const l = s.name.toString(), a = s.type, u = w(a);
455
- if (u !== void 0) {
456
- o[l] = u;
477
+ const l = s.name.toString(), o = s.type, m = A(o);
478
+ if (m !== void 0) {
479
+ a[l] = m;
457
480
  continue;
458
481
  }
459
- const m = i.make(a), c = O(m, t[l] || {});
460
- c !== void 0 && (o[l] = c);
482
+ const c = i.make(o), u = M(c, t[l] || {});
483
+ u !== void 0 ? a[l] = u : g(o) === "undefined" && (a[l] = void 0);
461
484
  }
462
- return o;
485
+ return a;
463
486
  }
464
487
  if (i.AST.isString(n))
465
488
  return "";
@@ -469,13 +492,12 @@ const O = (e, t = {}) => {
469
492
  }
470
493
  };
471
494
  export {
472
- d as createMeta,
473
- R as deepMerge,
474
- O as defaultsValueFromSchema,
475
- Q as duplicateSchema,
476
- X as generateInputStandardSchemaFromFieldMeta,
477
- W as generateMetaFromSchema,
478
- Z as getInputType,
479
- g as isNullableOrUndefined,
480
- Y as nullableInput
495
+ y as createMeta,
496
+ z as deepMerge,
497
+ M as defaultsValueFromSchema,
498
+ Z as duplicateSchema,
499
+ te as generateInputStandardSchemaFromFieldMeta,
500
+ ee as generateMetaFromSchema,
501
+ ne as getInputType,
502
+ g as isNullableOrUndefined
481
503
  };
@@ -1,6 +1,6 @@
1
1
  import { Exit as c, Cause as u } from "effect";
2
- import { dual as i } from "./vue-components.es30.js";
3
- import { isFunction as m } from "./vue-components.es31.js";
2
+ import { dual as i } from "./vue-components.es32.js";
3
+ import { isFunction as m } from "./vue-components.es33.js";
4
4
  const n = /* @__PURE__ */ Symbol.for("clone-trait"), a = i(2, (o, t) => n in o ? o[n](t) : Object.setPrototypeOf(t, Object.getPrototypeOf(o)));
5
5
  i(2, (o, t) => a(o, { ...o, ...m(t) ? t(o) : t }));
6
6
  const O = (o, t) => new Promise((r, s) => o.addObserver((e) => {
@@ -1,31 +1,30 @@
1
1
  import { default as t } from "./vue-components.es4.js";
2
2
  import { default as o } from "./vue-components.es5.js";
3
- import { createMeta as u, deepMerge as n, defaultsValueFromSchema as l, duplicateSchema as f, generateInputStandardSchemaFromFieldMeta as p, generateMetaFromSchema as d, getInputType as s, isNullableOrUndefined as g, nullableInput as x } from "./vue-components.es12.js";
4
- import { useOmegaForm as c } from "./vue-components.es10.js";
3
+ import { createMeta as u, deepMerge as n, defaultsValueFromSchema as f, duplicateSchema as p, generateInputStandardSchemaFromFieldMeta as d, generateMetaFromSchema as l, getInputType as s, isNullableOrUndefined as g } from "./vue-components.es12.js";
4
+ import { useOmegaForm as i } from "./vue-components.es10.js";
5
5
  import { default as O } from "./vue-components.es6.js";
6
- import { default as h } from "./vue-components.es7.js";
7
- import { default as C } from "./vue-components.es8.js";
8
- import { default as U } from "./vue-components.es9.js";
9
- import { useOnClose as b, usePreventClose as y } from "./vue-components.es11.js";
10
- import { createUseFormWithCustomInput as v } from "./vue-components.es13.js";
6
+ import { default as I } from "./vue-components.es7.js";
7
+ import { default as S } from "./vue-components.es8.js";
8
+ import { default as M } from "./vue-components.es9.js";
9
+ import { useOnClose as T, usePreventClose as y } from "./vue-components.es11.js";
10
+ import { createUseFormWithCustomInput as b } from "./vue-components.es13.js";
11
11
  export {
12
12
  t as CommandButton,
13
13
  o as Dialog,
14
14
  O as OmegaInput,
15
- C as OmegaTaggedUnion,
16
- U as OmegaTaggedUnionInternal,
17
- h as OmegaVuetifyInput,
15
+ S as OmegaTaggedUnion,
16
+ M as OmegaTaggedUnionInternal,
17
+ I as OmegaVuetifyInput,
18
18
  u as createMeta,
19
- v as createUseFormWithCustomInput,
19
+ b as createUseFormWithCustomInput,
20
20
  n as deepMerge,
21
- l as defaultsValueFromSchema,
22
- f as duplicateSchema,
23
- p as generateInputStandardSchemaFromFieldMeta,
24
- d as generateMetaFromSchema,
21
+ f as defaultsValueFromSchema,
22
+ p as duplicateSchema,
23
+ d as generateInputStandardSchemaFromFieldMeta,
24
+ l as generateMetaFromSchema,
25
25
  s as getInputType,
26
26
  g as isNullableOrUndefined,
27
- x as nullableInput,
28
- c as useOmegaForm,
29
- b as useOnClose,
27
+ i as useOmegaForm,
28
+ T as useOnClose,
30
29
  y as usePreventClose
31
30
  };