@effect-app/vue-components 2.10.6 → 2.10.7

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,17 +1,17 @@
1
1
  import { useForm as B } from "@tanstack/vue-form";
2
2
  import { Data as K, S as V, Effect as f, Fiber as $, Option as P, Array as F } from "effect-app";
3
- import { runtimeFiberAsPromise as T } from "./vue-components.es18.js";
3
+ import { runtimeFiberAsPromise as T } from "./vue-components.es17.js";
4
4
  import { computed as x, onUnmounted as W, onMounted as z, onBeforeUnmount as G, watch as D, ref as Z, h as H } from "vue";
5
5
  import { useIntl as Q } from "./vue-components.es3.js";
6
- import X from "./vue-components.es19.js";
7
- import Y from "./vue-components.es20.js";
8
- import C from "./vue-components.es21.js";
6
+ import X from "./vue-components.es18.js";
7
+ import Y from "./vue-components.es19.js";
8
+ import C from "./vue-components.es20.js";
9
9
  import { generateMetaFromSchema as ee, deepMerge as R, defaultsValueFromSchema as re } from "./vue-components.es12.js";
10
10
  import te from "./vue-components.es6.js";
11
11
  import se from "./vue-components.es8.js";
12
- import ne from "./vue-components.es22.js";
13
- import { trace as N } from "./vue-components.es23.js";
14
- import { context as U } from "./vue-components.es24.js";
12
+ import ne from "./vue-components.es21.js";
13
+ import { trace as N } from "./vue-components.es22.js";
14
+ import { context as U } from "./vue-components.es23.js";
15
15
  class oe extends K.TaggedError("FormErrors") {
16
16
  }
17
17
  const g = (i) => function(n) {
@@ -1,6 +1,6 @@
1
- import l from "./vue-components.es29.js";
1
+ import l from "./vue-components.es28.js";
2
2
  import { inject as c, provide as u } from "vue";
3
- import { onMountedWithCleanup as f } from "./vue-components.es16.js";
3
+ import { onMountedWithCleanup as f } from "./vue-components.es29.js";
4
4
  const p = () => l(), i = Symbol("DialogBus"), r = () => c(i, null), g = () => {
5
5
  const n = p();
6
6
  return u(i, n), n;
@@ -1,270 +1,273 @@
1
- import { S as i, Option as M } from "effect-app";
1
+ import { S as r, Option as q } from "effect-app";
2
2
  import { getMetadataFromSchema as k } from "@effect-app/vue/form";
3
- import { useIntl as V, getTransformationFrom as q } from "./vue-components.es3.js";
4
- import { isObject as E } from "./vue-components.es17.js";
5
- const $ = (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, w = (e) => {
3
+ import { useIntl as V, getTransformationFrom as _ } from "./vue-components.es3.js";
4
+ import { isObject as E } from "./vue-components.es16.js";
5
+ const $ = (e) => r.AST.isUnion(e) && e.types.find((n) => n._tag === "UndefinedKeyword" || n === r.Null.ast), g = (e) => !e || !r.AST.isUnion(e) ? !1 : e.types.find((n) => n._tag === "UndefinedKeyword") ? "undefined" : e.types.find((n) => n === r.Null.ast) ? "null" : !1, L = (e) => {
6
6
  const n = [];
7
7
  for (const t of e)
8
- if (i.AST.isUnion(t)) {
9
- const l = w(t.types);
10
- n.push(...l);
8
+ if (r.AST.isUnion(t)) {
9
+ const p = L(t.types);
10
+ n.push(...p);
11
11
  } else
12
12
  n.push(t);
13
13
  return n;
14
- }, m = ({ meta: e = {}, parent: n = "", property: t, propertySignatures: l }, o = {}) => {
14
+ }, f = ({ meta: e = {}, parent: n = "", property: t, propertySignatures: p }, o = {}) => {
15
15
  if (t && t._tag === "Transformation")
16
- return m({
16
+ return f({
17
17
  parent: n,
18
18
  meta: e,
19
19
  property: t.from
20
20
  });
21
21
  if (t?._tag === "TypeLiteral" && "propertySignatures" in t)
22
- return m({
22
+ return f({
23
23
  meta: e,
24
24
  propertySignatures: t.propertySignatures
25
25
  });
26
- if (l) {
27
- for (const s of l) {
28
- const r = n ? `${n}.${s.name.toString()}` : s.name.toString(), p = g(s.type);
26
+ if (p) {
27
+ for (const s of p) {
28
+ const i = n ? `${n}.${s.name.toString()}` : s.name.toString(), l = g(s.type);
29
29
  let a;
30
- e._isNullableDiscriminatedUnion && s.name.toString() === "_tag" || e.required === !1 ? a = !1 : a = !p;
31
- const f = s.type;
32
- if (i.AST.isUnion(s.type)) {
33
- const S = w(s.type.types).filter(
34
- (u) => u._tag !== "UndefinedKeyword" && u !== i.Null.ast
35
- ).map(q);
36
- if (S.some(
30
+ e._isNullableDiscriminatedUnion && s.name.toString() === "_tag" || e.required === !1 ? a = !1 : a = !l;
31
+ const m = s.type;
32
+ if (r.AST.isUnion(s.type)) {
33
+ const c = L(s.type.types).filter(
34
+ (u) => u._tag !== "UndefinedKeyword" && u !== r.Null.ast
35
+ ).map(_);
36
+ if (c.some(
37
37
  (u) => "propertySignatures" in u
38
38
  )) {
39
- if (!p) {
40
- const u = m({
41
- parent: r,
39
+ if (!l) {
40
+ const u = f({
41
+ parent: i,
42
42
  property: s.type,
43
- meta: { required: a, nullableOrUndefined: p }
43
+ meta: { required: a, nullableOrUndefined: l }
44
44
  });
45
- o[r] = u;
45
+ o[i] = u;
46
46
  }
47
- for (const u of S)
47
+ for (const u of c)
48
48
  if ("propertySignatures" in u) {
49
- const y = p && S.length > 1;
49
+ const y = l && c.length > 1;
50
50
  Object.assign(
51
51
  o,
52
- m({
53
- parent: r,
52
+ f({
53
+ parent: i,
54
54
  propertySignatures: u.propertySignatures,
55
55
  meta: y ? { _isNullableDiscriminatedUnion: !0 } : {}
56
56
  })
57
57
  );
58
58
  }
59
59
  } else {
60
- const u = S.filter(i.AST.isTupleType);
60
+ const u = c.filter(r.AST.isTupleType);
61
61
  if (u.length > 0) {
62
62
  const y = u[0];
63
- if (o[r] = {
63
+ if (o[i] = {
64
64
  type: "multiple",
65
65
  members: y.elements,
66
66
  rest: y.rest,
67
67
  required: a,
68
- nullableOrUndefined: p
68
+ nullableOrUndefined: l
69
69
  }, y.rest && y.rest.length > 0) {
70
- const b = y.rest[0];
71
- if (b.type._tag === "TypeLiteral" && "propertySignatures" in b.type)
72
- for (const c of b.type.propertySignatures) {
73
- const h = `${r}.${c.name.toString()}`, x = m({
70
+ const S = y.rest[0];
71
+ if (S.type._tag === "TypeLiteral" && "propertySignatures" in S.type)
72
+ for (const d of S.type.propertySignatures) {
73
+ const h = `${i}.${d.name.toString()}`, T = f({
74
74
  parent: h,
75
- property: c.type,
75
+ property: d.type,
76
76
  meta: {
77
- required: !g(c.type),
78
- nullableOrUndefined: g(c.type)
77
+ required: !g(d.type),
78
+ nullableOrUndefined: g(d.type)
79
79
  }
80
80
  });
81
- if (x && typeof x == "object" && "type" in x && (o[h] = x, x.type === "multiple" && i.AST.isTupleType(c.type) && c.type.rest && c.type.rest.length > 0)) {
82
- const U = c.type.rest[0];
83
- if (U.type._tag === "TypeLiteral" && "propertySignatures" in U.type)
84
- for (const A of U.type.propertySignatures) {
85
- const L = `${h}.${A.name.toString()}`, O = m({
86
- parent: L,
81
+ if (T && typeof T == "object" && "type" in T && (o[h] = T, T.type === "multiple" && r.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 M = `${h}.${A.name.toString()}`, O = f({
86
+ parent: M,
87
87
  property: A.type,
88
88
  meta: {
89
89
  required: !g(A.type),
90
90
  nullableOrUndefined: g(A.type)
91
91
  }
92
92
  });
93
- O && typeof O == "object" && "type" in O && (o[L] = O);
93
+ O && typeof O == "object" && "type" in O && (o[M] = O);
94
94
  }
95
95
  }
96
96
  }
97
97
  }
98
98
  } else {
99
- const y = m({
100
- parent: r,
99
+ const y = f({
100
+ parent: i,
101
101
  property: s.type,
102
- meta: { required: a, nullableOrUndefined: p }
102
+ meta: { required: a, nullableOrUndefined: l }
103
103
  });
104
- o[r] = y;
104
+ o[i] = y;
105
105
  }
106
106
  }
107
- } else if ("propertySignatures" in f)
108
- Object.assign(
109
- o,
110
- m({
111
- parent: r,
112
- propertySignatures: f.propertySignatures,
113
- meta: { required: a, nullableOrUndefined: p }
114
- })
115
- );
116
- else if (i.AST.isTupleType(s.type))
117
- if (s.type.rest.length > 0 && s.type.rest[0].type._tag === "TypeLiteral" && "propertySignatures" in s.type.rest[0].type) {
118
- const S = s.type.rest[0].type;
119
- if (S._tag === "TypeLiteral" && "propertySignatures" in S)
120
- for (const d of S.propertySignatures) {
121
- const u = `${r}.${d.name.toString()}`;
122
- if (i.AST.isTupleType(d.type) && d.type.rest.length > 0) {
123
- const y = d.type.rest[0].type;
124
- if (y._tag === "TypeLiteral" && "propertySignatures" in y)
125
- for (const b of y.propertySignatures) {
126
- const c = `${u}.${b.name.toString()}`, h = m({
127
- parent: c,
128
- property: b.type,
129
- meta: {
130
- required: !g(b.type),
131
- nullableOrUndefined: g(b.type)
132
- }
133
- });
134
- o[c] = h;
135
- }
136
- else
137
- o[u] = {
138
- type: "multiple",
139
- members: d.type.elements,
140
- rest: d.type.rest,
141
- required: !g(d.type),
142
- nullableOrUndefined: g(d.type)
143
- };
144
- } else {
145
- const y = m({
146
- parent: u,
147
- property: d.type,
148
- meta: {
149
- required: !g(d.type),
150
- nullableOrUndefined: g(d.type)
151
- }
152
- });
153
- o[u] = y;
107
+ } else {
108
+ const b = _(m);
109
+ if ("propertySignatures" in b)
110
+ Object.assign(
111
+ o,
112
+ f({
113
+ parent: i,
114
+ propertySignatures: b.propertySignatures,
115
+ meta: { required: a, nullableOrUndefined: l }
116
+ })
117
+ );
118
+ else if (r.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 v = s.type.rest[0].type;
121
+ if (v._tag === "TypeLiteral" && "propertySignatures" in v)
122
+ for (const u of v.propertySignatures) {
123
+ const y = `${i}.${u.name.toString()}`;
124
+ if (r.AST.isTupleType(u.type) && u.type.rest.length > 0) {
125
+ const S = u.type.rest[0].type;
126
+ if (S._tag === "TypeLiteral" && "propertySignatures" in S)
127
+ for (const d of S.propertySignatures) {
128
+ const h = `${y}.${d.name.toString()}`, T = f({
129
+ parent: h,
130
+ property: d.type,
131
+ meta: {
132
+ required: !g(d.type),
133
+ nullableOrUndefined: g(d.type)
134
+ }
135
+ });
136
+ o[h] = T;
137
+ }
138
+ else
139
+ o[y] = {
140
+ type: "multiple",
141
+ members: u.type.elements,
142
+ rest: u.type.rest,
143
+ required: !g(u.type),
144
+ nullableOrUndefined: g(u.type)
145
+ };
146
+ } else {
147
+ const S = f({
148
+ parent: y,
149
+ property: u.type,
150
+ meta: {
151
+ required: !g(u.type),
152
+ nullableOrUndefined: g(u.type)
153
+ }
154
+ });
155
+ o[y] = S;
156
+ }
154
157
  }
158
+ } else
159
+ o[i] = {
160
+ type: "multiple",
161
+ members: s.type.elements,
162
+ rest: s.type.rest,
163
+ required: a,
164
+ nullableOrUndefined: l
165
+ };
166
+ else {
167
+ const c = f({
168
+ parent: i,
169
+ property: s.type,
170
+ meta: {
171
+ // an empty string is valid for a S.String field, so we should not mark it as required
172
+ // TODO: handle this better via the createMeta minLength parsing
173
+ required: a && (s.type._tag !== "StringKeyword" || k(s.type).minLength),
174
+ nullableOrUndefined: l
155
175
  }
156
- } else
157
- o[r] = {
158
- type: "multiple",
159
- members: s.type.elements,
160
- rest: s.type.rest,
161
- required: a,
162
- nullableOrUndefined: p
163
- };
164
- else {
165
- const T = m({
166
- parent: r,
167
- property: s.type,
168
- meta: {
169
- // an empty string is valid for a S.String field, so we should not mark it as required
170
- // TODO: handle this better via the createMeta minLength parsing
171
- required: a && (s.type._tag !== "StringKeyword" || k(s.type).minLength),
172
- nullableOrUndefined: p
173
- }
174
- });
175
- o[r] = T;
176
+ });
177
+ o[i] = c;
178
+ }
176
179
  }
177
180
  }
178
181
  return o;
179
182
  }
180
183
  if (t) {
181
184
  const s = $(t);
182
- if (Object.hasOwnProperty.call(e, "required") || (e.required = !s), i.AST.isUnion(t)) {
183
- const p = w(t.types), a = p.find(
184
- (f) => f._tag !== "UndefinedKeyword" && f !== i.Null.ast
185
+ if (Object.hasOwnProperty.call(e, "required") || (e.required = !s), r.AST.isUnion(t)) {
186
+ const l = L(t.types), a = l.find(
187
+ (m) => m._tag !== "UndefinedKeyword" && m !== r.Null.ast
185
188
  );
186
- return "propertySignatures" in a ? m({
189
+ return "propertySignatures" in a ? f({
187
190
  propertySignatures: a.propertySignatures,
188
191
  parent: n,
189
192
  meta: e
190
- }) : p.every(i.AST.isLiteral) ? {
193
+ }) : l.every(r.AST.isLiteral) ? {
191
194
  ...e,
192
195
  type: "select",
193
- members: p.map((f) => f.literal)
196
+ members: l.map((m) => m.literal)
194
197
  } : {
195
198
  ...e,
196
- ...m({
199
+ ...f({
197
200
  parent: n,
198
201
  meta: e,
199
202
  property: a
200
203
  })
201
204
  };
202
205
  }
203
- if (i.AST.isTupleType(t))
206
+ if (r.AST.isTupleType(t))
204
207
  return {
205
208
  ...e,
206
209
  type: "multiple",
207
210
  members: t.elements,
208
211
  rest: t.rest
209
212
  };
210
- const r = i.AST.getAnnotation(
213
+ const i = r.AST.getAnnotation(
211
214
  t,
212
- i.AST.JSONSchemaAnnotationId
213
- ).pipe(M.getOrElse(() => ({})));
214
- return e = { ...e, ...r }, "from" in t ? m({
215
+ r.AST.JSONSchemaAnnotationId
216
+ ).pipe(q.getOrElse(() => ({})));
217
+ return e = { ...e, ...i }, "from" in t ? f({
215
218
  parent: n,
216
219
  meta: e,
217
220
  property: t.from
218
- }) : (e.type = i.AST.getAnnotation(
221
+ }) : (e.type = r.AST.getAnnotation(
219
222
  t,
220
- i.AST.TitleAnnotationId
223
+ r.AST.TitleAnnotationId
221
224
  ).pipe(
222
- M.getOrElse(() => "unknown")
225
+ q.getOrElse(() => "unknown")
223
226
  ), e);
224
227
  }
225
228
  return o;
226
229
  }, N = (e) => {
227
- const n = e.ast, t = {}, l = {};
230
+ const n = e.ast, t = {}, p = {};
228
231
  if (n._tag === "Transformation" || n._tag === "Refinement")
229
- return N(i.make(n.from));
232
+ return N(r.make(n.from));
230
233
  if (n._tag === "Union") {
231
- const r = (n.types || []).filter((a) => a._tag !== "UndefinedKeyword" && a !== i.Null.ast).map(q);
232
- if (r.every((a) => a._tag === "TypeLiteral" && "propertySignatures" in a) && r.length > 0) {
234
+ const i = (n.types || []).filter((a) => a._tag !== "UndefinedKeyword" && a !== r.Null.ast).map(_);
235
+ if (i.every((a) => a._tag === "TypeLiteral" && "propertySignatures" in a) && i.length > 0) {
233
236
  const a = [];
234
- for (const f of r)
235
- if ("propertySignatures" in f) {
236
- const T = f.propertySignatures.find(
237
- (d) => d.name.toString() === "_tag"
237
+ for (const m of i)
238
+ if ("propertySignatures" in m) {
239
+ const b = m.propertySignatures.find(
240
+ (v) => v.name.toString() === "_tag"
238
241
  );
239
- T && i.AST.isLiteral(T.type) && a.push(T.type.literal);
240
- const S = m({
241
- propertySignatures: f.propertySignatures
242
+ b && r.AST.isLiteral(b.type) && a.push(b.type.literal);
243
+ const c = f({
244
+ propertySignatures: m.propertySignatures
242
245
  });
243
- Object.assign(t, S);
246
+ Object.assign(t, c);
244
247
  }
245
248
  return a.length > 0 && (t._tag = {
246
249
  type: "select",
247
250
  members: a,
248
251
  required: !0
249
- }), { meta: t, defaultValues: l };
252
+ }), { meta: t, defaultValues: p };
250
253
  }
251
254
  }
252
255
  if ("propertySignatures" in n) {
253
- const o = m({
256
+ const o = f({
254
257
  propertySignatures: n.propertySignatures
255
258
  });
256
- if (Object.values(o).every((r) => r && "type" in r))
257
- return { meta: o, defaultValues: l };
258
- const s = (r, p = "") => {
259
- for (const a in r) {
260
- const f = p ? `${p}.${a}` : a;
261
- r[a] && typeof r[a] == "object" && "type" in r[a] ? t[f] = r[a] : r[a] && typeof r[a] == "object" && s(r[a], f);
259
+ if (Object.values(o).every((i) => i && "type" in i))
260
+ return { meta: o, defaultValues: p };
261
+ const s = (i, l = "") => {
262
+ for (const a in i) {
263
+ const m = l ? `${l}.${a}` : a;
264
+ i[a] && typeof i[a] == "object" && "type" in i[a] ? t[m] = i[a] : i[a] && typeof i[a] == "object" && s(i[a], m);
262
265
  }
263
266
  };
264
267
  s(o);
265
268
  }
266
- return { meta: t, defaultValues: l };
267
- }, B = (e) => i.extend(e, i.Struct({})), J = (e) => {
269
+ return { meta: t, defaultValues: p };
270
+ }, B = (e) => r.extend(e, r.Struct({})), J = (e) => {
268
271
  const { meta: n } = N(e);
269
272
  return { schema: e, meta: n };
270
273
  }, z = (e) => {
@@ -272,48 +275,48 @@ const $ = (e) => i.AST.isUnion(e) && e.types.find((n) => n._tag === "UndefinedKe
272
275
  let t;
273
276
  switch (e.type) {
274
277
  case "string":
275
- t = i.String.annotations({
278
+ t = r.String.annotations({
276
279
  message: () => n("validation.empty")
277
- }), e.format === "email" && (t = i.compose(
280
+ }), e.format === "email" && (t = r.compose(
278
281
  t,
279
- i.Email.annotations({
282
+ r.Email.annotations({
280
283
  message: () => n("validation.email.invalid")
281
284
  })
282
285
  )), e.required && (t = t.annotations({
283
286
  message: () => n("validation.empty")
284
- }).pipe(i.minLength(1)).annotations({
287
+ }).pipe(r.minLength(1)).annotations({
285
288
  message: () => n("validation.empty")
286
- })), typeof e.maxLength == "number" && (t = t.pipe(i.maxLength(e.maxLength)).annotations({
289
+ })), typeof e.maxLength == "number" && (t = t.pipe(r.maxLength(e.maxLength)).annotations({
287
290
  message: () => n("validation.string.maxLength", {
288
291
  maxLength: e.maxLength
289
292
  })
290
- })), typeof e.minLength == "number" && (t = t.pipe(i.minLength(e.minLength)).annotations({
293
+ })), typeof e.minLength == "number" && (t = t.pipe(r.minLength(e.minLength)).annotations({
291
294
  message: () => n("validation.string.minLength", {
292
295
  minLength: e.minLength
293
296
  })
294
297
  }));
295
298
  break;
296
299
  case "number":
297
- t = i.Number.annotations({
300
+ t = r.Number.annotations({
298
301
  message: () => n("validation.empty")
299
302
  }), e.required && t.annotations({
300
303
  message: () => n("validation.empty")
301
- }), typeof e.minimum == "number" && (t = t.pipe(i.greaterThanOrEqualTo(e.minimum)).annotations({
304
+ }), typeof e.minimum == "number" && (t = t.pipe(r.greaterThanOrEqualTo(e.minimum)).annotations({
302
305
  message: () => n(e.minimum === 0 ? "validation.number.positive" : "validation.number.min", {
303
306
  minimum: e.minimum,
304
307
  isExclusive: !0
305
308
  })
306
- })), typeof e.maximum == "number" && (t = t.pipe(i.lessThanOrEqualTo(e.maximum)).annotations({
309
+ })), typeof e.maximum == "number" && (t = t.pipe(r.lessThanOrEqualTo(e.maximum)).annotations({
307
310
  message: () => n("validation.number.max", {
308
311
  maximum: e.maximum,
309
312
  isExclusive: !0
310
313
  })
311
- })), typeof e.exclusiveMinimum == "number" && (t = t.pipe(i.greaterThan(e.exclusiveMinimum)).annotations({
314
+ })), typeof e.exclusiveMinimum == "number" && (t = t.pipe(r.greaterThan(e.exclusiveMinimum)).annotations({
312
315
  message: () => n(e.exclusiveMinimum === 0 ? "validation.number.positive" : "validation.number.min", {
313
316
  minimum: e.exclusiveMinimum,
314
317
  isExclusive: !1
315
318
  })
316
- })), typeof e.exclusiveMaximum == "number" && (t = t.pipe(i.lessThan(e.exclusiveMaximum)).annotations({
319
+ })), typeof e.exclusiveMaximum == "number" && (t = t.pipe(r.lessThan(e.exclusiveMaximum)).annotations({
317
320
  message: () => n("validation.number.max", {
318
321
  maximum: e.exclusiveMaximum,
319
322
  isExclusive: !1
@@ -321,7 +324,7 @@ const $ = (e) => i.AST.isUnion(e) && e.types.find((n) => n._tag === "UndefinedKe
321
324
  }));
322
325
  break;
323
326
  case "select":
324
- t = i.Literal(...e.members).annotations({
327
+ t = r.Literal(...e.members).annotations({
325
328
  message: () => ({
326
329
  message: n("validation.not_a_valid", {
327
330
  type: "select",
@@ -332,7 +335,7 @@ const $ = (e) => i.AST.isUnion(e) && e.types.find((n) => n._tag === "UndefinedKe
332
335
  });
333
336
  break;
334
337
  case "multiple":
335
- t = i.Array(i.String).annotations({
338
+ t = r.Array(r.String).annotations({
336
339
  message: () => n("validation.not_a_valid", {
337
340
  type: "multiple",
338
341
  message: e.members.join(", ")
@@ -340,22 +343,22 @@ const $ = (e) => i.AST.isUnion(e) && e.types.find((n) => n._tag === "UndefinedKe
340
343
  });
341
344
  break;
342
345
  case "boolean":
343
- t = i.Boolean;
346
+ t = r.Boolean;
344
347
  break;
345
348
  case "unknown":
346
- t = i.Unknown;
349
+ t = r.Unknown;
347
350
  break;
348
351
  default:
349
- console.warn(`Unhandled field type: ${e}`), t = i.Unknown;
352
+ console.warn(`Unhandled field type: ${e}`), t = r.Unknown;
350
353
  break;
351
354
  }
352
355
  return e.required ? t.pipe(
353
- i.annotations({
356
+ r.annotations({
354
357
  message: () => n("validation.empty")
355
358
  })
356
- ) : t = i.NullishOr(t), i.standardSchemaV1(t);
357
- }, C = (e, n) => i.NullOr(e).pipe(
358
- i.transform(i.typeSchema(e), {
359
+ ) : t = r.NullishOr(t), r.standardSchemaV1(t);
360
+ }, C = (e, n) => r.NullOr(e).pipe(
361
+ r.transform(r.typeSchema(e), {
359
362
  decode: (t) => t ?? n(),
360
363
  encode: (t) => t
361
364
  })
@@ -378,71 +381,71 @@ const $ = (e) => i.AST.isUnion(e) && e.types.find((n) => n._tag === "UndefinedKe
378
381
  ], G = (e) => K.includes(e) ? e : "text";
379
382
  function j(e, n) {
380
383
  const t = { ...e };
381
- for (const l in n)
382
- Array.isArray(n[l]) ? t[l] = n[l] : n[l] && E(n[l]) ? t[l] = j(t[l], n[l]) : t[l] = n[l];
384
+ for (const p in n)
385
+ Array.isArray(n[p]) ? t[p] = n[p] : n[p] && E(n[p]) ? t[p] = j(t[p], n[p]) : t[p] = n[p];
383
386
  return t;
384
387
  }
385
- function _(e) {
388
+ function U(e) {
386
389
  return e && "fields" in e && typeof e.fields == "object";
387
390
  }
388
391
  function F(e) {
389
392
  return e && "members" in e && Array.isArray(e.members);
390
393
  }
391
- const v = (e, n = {}) => {
394
+ const x = (e, n = {}) => {
392
395
  const t = e.ast;
393
396
  if (t?.defaultValue)
394
397
  return t.defaultValue();
395
398
  if (g(e.ast) === "null")
396
399
  return null;
397
400
  if (g(e.ast) !== "undefined") {
398
- if (_(e)) {
399
- const l = {};
401
+ if (U(e)) {
402
+ const p = {};
400
403
  for (const [o, s] of Object.entries(e.fields)) {
401
- const r = s?.ast;
402
- if (r?.defaultValue)
404
+ const i = s?.ast;
405
+ if (i?.defaultValue)
403
406
  try {
404
- l[o] = r.defaultValue();
407
+ p[o] = i.defaultValue();
405
408
  continue;
406
409
  } catch {
407
410
  }
408
- const p = v(s, n[o] || {});
409
- p !== void 0 && (l[o] = p);
411
+ const l = x(s, n[o] || {});
412
+ l !== void 0 && (p[o] = l);
410
413
  }
411
- return { ...l, ...n };
414
+ return { ...p, ...n };
412
415
  }
413
- if (e?.from && _(e.from))
414
- return v(e.from, n);
416
+ if (e?.from && U(e.from))
417
+ return x(e.from, n);
415
418
  if (F(e)) {
416
- const l = e.members.reduce((o, s) => (_(s) && Object.entries(s.fields).forEach(([r, p]) => {
417
- const a = p.ast, f = o[r]?.ast;
418
- (!o[r] || a?.defaultValue && !f?.defaultValue) && (o[r] = p);
419
+ const p = e.members.reduce((o, s) => (U(s) && Object.entries(s.fields).forEach(([i, l]) => {
420
+ const a = l.ast, m = o[i]?.ast;
421
+ (!o[i] || a?.defaultValue && !m?.defaultValue) && (o[i] = l);
419
422
  }), o), {});
420
- return Object.entries(l).reduce((o, [s, r]) => (o[s] = v(r, n[s] || {}), o), n);
423
+ return Object.entries(p).reduce((o, [s, i]) => (o[s] = x(i, n[s] || {}), o), n);
421
424
  }
422
425
  if (Object.keys(n).length === 0)
423
426
  switch (e.ast._tag) {
424
427
  case "Refinement":
425
- return v(i.make(e.ast.from), n);
428
+ return x(r.make(e.ast.from), n);
426
429
  case "Transformation": {
427
- const l = i.make(e.ast.from);
428
- return v(l, n);
430
+ const p = r.make(e.ast.from);
431
+ return x(p, n);
429
432
  }
430
433
  case "TypeLiteral": {
431
- const l = { ...n };
434
+ const p = { ...n };
432
435
  for (const o of t.propertySignatures) {
433
- const s = o.name.toString(), r = o.type;
434
- if (r._tag === "Transformation" && r.defaultValue) {
435
- l[s] = r.defaultValue();
436
+ const s = o.name.toString(), i = o.type;
437
+ if (i._tag === "Transformation" && i.defaultValue) {
438
+ p[s] = i.defaultValue();
436
439
  continue;
437
440
  }
438
- if (r.defaultValue) {
439
- l[s] = r.defaultValue();
441
+ if (i.defaultValue) {
442
+ p[s] = i.defaultValue();
440
443
  continue;
441
444
  }
442
- const p = i.make(r), a = v(p, n[s] || {});
443
- a !== void 0 && (l[s] = a);
445
+ const l = r.make(i), a = x(l, n[s] || {});
446
+ a !== void 0 && (p[s] = a);
444
447
  }
445
- return l;
448
+ return p;
446
449
  }
447
450
  case "StringKeyword":
448
451
  return "";
@@ -452,9 +455,9 @@ const v = (e, n = {}) => {
452
455
  }
453
456
  };
454
457
  export {
455
- m as createMeta,
458
+ f as createMeta,
456
459
  j as deepMerge,
457
- v as defaultsValueFromSchema,
460
+ x as defaultsValueFromSchema,
458
461
  B as duplicateSchema,
459
462
  z as generateInputStandardSchemaFromFieldMeta,
460
463
  J as generateMetaFromSchema,
@@ -1,13 +1,6 @@
1
- import { onMounted as e, onUnmounted as u } from "vue";
2
- function p(t) {
3
- let n;
4
- e(() => {
5
- const o = t();
6
- o && (n = o);
7
- }), u(() => {
8
- n && n();
9
- });
10
- }
1
+ import "vue";
2
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
3
+ const t = Object.prototype.toString, c = (o) => t.call(o) === "[object Object]";
11
4
  export {
12
- p as onMountedWithCleanup
5
+ c as isObject
13
6
  };
@@ -1,6 +1,12 @@
1
- import "vue";
2
- typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
3
- const t = Object.prototype.toString, c = (o) => t.call(o) === "[object Object]";
1
+ import { Exit as c, Runtime as u } from "effect";
2
+ import { dual as n, isFunction as m } from "./vue-components.es30.js";
3
+ const i = Symbol.for("clone-trait"), a = n(2, (e, t) => i in e ? e[i](t) : Object.setPrototypeOf(t, Object.getPrototypeOf(e)));
4
+ n(2, (e, t) => a(e, { ...e, ...m(t) ? t(e) : t }));
5
+ const p = (e, t) => new Promise((o, s) => e.addObserver((r) => {
6
+ c.isSuccess(r) ? o(r.value) : s(u.makeFiberFailure(r.cause));
7
+ }));
4
8
  export {
5
- c as isObject
9
+ a as clone,
10
+ i as cloneTrait,
11
+ p as runtimeFiberAsPromise
6
12
  };
@@ -1,12 +1,57 @@
1
- import { Exit as c, Runtime as u } from "effect";
2
- import { dual as n, isFunction as m } from "./vue-components.es30.js";
3
- const i = Symbol.for("clone-trait"), a = n(2, (e, t) => i in e ? e[i](t) : Object.setPrototypeOf(t, Object.getPrototypeOf(e)));
4
- n(2, (e, t) => a(e, { ...e, ...m(t) ? t(e) : t }));
5
- const p = (e, t) => new Promise((o, s) => e.addObserver((r) => {
6
- c.isSuccess(r) ? o(r.value) : s(u.makeFiberFailure(r.cause));
7
- }));
1
+ import { defineComponent as F, computed as f, onMounted as M, provide as P, createBlock as c, openBlock as s, resolveDynamicComponent as p, withCtx as g, renderSlot as o, createElementBlock as k, normalizeProps as l, guardReactiveProps as u, Fragment as A, renderList as C, mergeProps as b } from "vue";
2
+ const N = /* @__PURE__ */ F({
3
+ inheritAttrs: !1,
4
+ __name: "OmegaArray",
5
+ props: {
6
+ form: {},
7
+ inputClass: {},
8
+ name: {},
9
+ defaultItems: {},
10
+ items: {}
11
+ },
12
+ setup(n) {
13
+ const a = n, y = a.form.useStore((e) => e.values), i = f(() => {
14
+ const e = a.name.replace(/\[/g, ".").replace(/\]/g, "");
15
+ try {
16
+ return e.split(".").reduce((r, t) => r && r[t], y.value);
17
+ } catch (r) {
18
+ return console.error(r), [];
19
+ }
20
+ });
21
+ M(async () => {
22
+ a.defaultItems && !i.value && a.form.setFieldValue(a.name, a.defaultItems);
23
+ });
24
+ const $ = f(() => (r) => {
25
+ const t = r.replace(/\[\d+\]/g, "");
26
+ return a.form.meta[t];
27
+ });
28
+ return P("getMetaFromArray", $), (e, r) => (s(), c(p(n.form.Field), { name: n.name }, {
29
+ default: g(({ field: t, state: d }) => [
30
+ o(e.$slots, "pre-array", l(u({ field: t, state: d }))),
31
+ (s(!0), k(A, null, C(i.value, (B, m) => (s(), c(p(n.form.Field), {
32
+ key: `${n.name}[${Number(m)}]`,
33
+ name: (
34
+ // eslint-disable-next-line
35
+ `${n.name}[${Number(m)}]`
36
+ )
37
+ }, {
38
+ default: g(({ field: v, state: h }) => [
39
+ o(e.$slots, "default", b({ ref_for: !0 }, {
40
+ subField: v,
41
+ subState: h,
42
+ index: Number(m),
43
+ field: t
44
+ }))
45
+ ]),
46
+ _: 2
47
+ }, 1032, ["name"]))), 128)),
48
+ o(e.$slots, "post-array", l(u({ field: t, state: d }))),
49
+ o(e.$slots, "field", l(u({ field: t })))
50
+ ]),
51
+ _: 3
52
+ }, 8, ["name"]));
53
+ }
54
+ });
8
55
  export {
9
- a as clone,
10
- i as cloneTrait,
11
- p as runtimeFiberAsPromise
56
+ N as default
12
57
  };
@@ -1,57 +1,70 @@
1
- import { defineComponent as F, computed as f, onMounted as M, provide as P, createBlock as c, openBlock as s, resolveDynamicComponent as p, withCtx as g, renderSlot as o, createElementBlock as k, normalizeProps as l, guardReactiveProps as u, Fragment as A, renderList as C, mergeProps as b } from "vue";
2
- const N = /* @__PURE__ */ F({
3
- inheritAttrs: !1,
4
- __name: "OmegaArray",
1
+ import { defineComponent as O, computed as j, createElementBlock as M, openBlock as _, Fragment as E, renderList as A, renderSlot as F, createVNode as g, unref as h, mergeProps as k } from "vue";
2
+ import { Order as l, pipe as v, Array as u } from "effect-app";
3
+ const I = /* @__PURE__ */ O({
4
+ __name: "OmegaAutoGen",
5
5
  props: {
6
6
  form: {},
7
- inputClass: {},
8
- name: {},
9
- defaultItems: {},
10
- items: {}
7
+ pick: {},
8
+ omit: {},
9
+ labelMap: { type: Function },
10
+ filterMap: { type: Function },
11
+ order: {},
12
+ sort: {}
11
13
  },
12
- setup(n) {
13
- const a = n, y = a.form.useStore((e) => e.values), i = f(() => {
14
- const e = a.name.replace(/\[/g, ".").replace(/\]/g, "");
15
- try {
16
- return e.split(".").reduce((r, t) => r && r[t], y.value);
17
- } catch (r) {
18
- return console.error(r), [];
19
- }
20
- });
21
- M(async () => {
22
- a.defaultItems && !i.value && a.form.setFieldValue(a.name, a.defaultItems);
23
- });
24
- const $ = f(() => (r) => {
25
- const t = r.replace(/\[\d+\]/g, "");
26
- return a.form.meta[t];
27
- });
28
- return P("getMetaFromArray", $), (e, r) => (s(), c(p(n.form.Field), { name: n.name }, {
29
- default: g(({ field: t, state: d }) => [
30
- o(e.$slots, "pre-array", l(u({ field: t, state: d }))),
31
- (s(!0), k(A, null, C(i.value, (B, m) => (s(), c(p(n.form.Field), {
32
- key: `${n.name}[${Number(m)}]`,
33
- name: (
34
- // eslint-disable-next-line
35
- `${n.name}[${Number(m)}]`
36
- )
37
- }, {
38
- default: g(({ field: v, state: h }) => [
39
- o(e.$slots, "default", b({ ref_for: !0 }, {
40
- subField: v,
41
- subState: h,
42
- index: Number(m),
43
- field: t
44
- }))
45
- ]),
46
- _: 2
47
- }, 1032, ["name"]))), 128)),
48
- o(e.$slots, "post-array", l(u({ field: t, state: d }))),
49
- o(e.$slots, "field", l(u({ field: t })))
50
- ]),
51
- _: 3
52
- }, 8, ["name"]));
14
+ setup(i) {
15
+ const p = (e) => (r) => Object.fromEntries(
16
+ Object.entries(r).map(([t, o]) => [t, e(o, t)])
17
+ ), a = (e) => (r) => Object.fromEntries(
18
+ Object.entries(r).filter(([t, o]) => e(o, t))
19
+ ), m = (e) => (r) => Object.entries(r).reduce(
20
+ (t, [o, c]) => {
21
+ const s = e(c, o);
22
+ return s !== !1 && (t[o] = s), t;
23
+ },
24
+ {}
25
+ ), n = i, f = (e, r) => {
26
+ const t = r?.indexOf(e) ?? -1;
27
+ return t === -1 ? Number.MAX_SAFE_INTEGER : t;
28
+ }, d = l.mapInput(
29
+ l.number,
30
+ (e) => f(e.name, n.order || [])
31
+ ), b = j(
32
+ () => v(
33
+ n.form.meta,
34
+ // include / exclude
35
+ a(
36
+ (e, r) => n.pick ? n.pick.includes(r) && !n.omit?.includes(r) : !n.omit?.includes(r)
37
+ ),
38
+ (e) => e,
39
+ // labelMap and adding name
40
+ p((e, r) => ({
41
+ name: r,
42
+ label: n.labelMap?.(r) || r,
43
+ ...e
44
+ })),
45
+ // filterMap
46
+ n.filterMap ? m((e) => {
47
+ const r = n.filterMap?.(e.name, e);
48
+ return r === void 0 || r === !0 ? e : r;
49
+ }) : (e) => e,
50
+ // transform to array
51
+ (e) => Object.values(e),
52
+ // order
53
+ u.sort(d),
54
+ // sort
55
+ n.sort ? u.sort(n.sort) : (e) => e
56
+ )
57
+ );
58
+ return (e, r) => (_(!0), M(E, null, A(b.value, ({ name: t, label: o, ...c }) => F(e.$slots, "default", {
59
+ child: { name: t, label: o, ...c }
60
+ }, () => [
61
+ g(h(i.form).Input, k({
62
+ name: t,
63
+ label: o
64
+ }, { ref_for: !0 }, c), null, 16, ["name", "label"])
65
+ ])), 256));
53
66
  }
54
67
  });
55
68
  export {
56
- N as default
69
+ I as default
57
70
  };
@@ -1,70 +1,8 @@
1
- import { defineComponent as O, computed as j, createElementBlock as M, openBlock as _, Fragment as E, renderList as A, renderSlot as F, createVNode as g, unref as h, mergeProps as k } from "vue";
2
- import { Order as l, pipe as v, Array as u } from "effect-app";
3
- const I = /* @__PURE__ */ O({
4
- __name: "OmegaAutoGen",
5
- props: {
6
- form: {},
7
- pick: {},
8
- omit: {},
9
- labelMap: { type: Function },
10
- filterMap: { type: Function },
11
- order: {},
12
- sort: {}
13
- },
14
- setup(i) {
15
- const p = (e) => (r) => Object.fromEntries(
16
- Object.entries(r).map(([t, o]) => [t, e(o, t)])
17
- ), a = (e) => (r) => Object.fromEntries(
18
- Object.entries(r).filter(([t, o]) => e(o, t))
19
- ), m = (e) => (r) => Object.entries(r).reduce(
20
- (t, [o, c]) => {
21
- const s = e(c, o);
22
- return s !== !1 && (t[o] = s), t;
23
- },
24
- {}
25
- ), n = i, f = (e, r) => {
26
- const t = r?.indexOf(e) ?? -1;
27
- return t === -1 ? Number.MAX_SAFE_INTEGER : t;
28
- }, d = l.mapInput(
29
- l.number,
30
- (e) => f(e.name, n.order || [])
31
- ), b = j(
32
- () => v(
33
- n.form.meta,
34
- // include / exclude
35
- a(
36
- (e, r) => n.pick ? n.pick.includes(r) && !n.omit?.includes(r) : !n.omit?.includes(r)
37
- ),
38
- (e) => e,
39
- // labelMap and adding name
40
- p((e, r) => ({
41
- name: r,
42
- label: n.labelMap?.(r) || r,
43
- ...e
44
- })),
45
- // filterMap
46
- n.filterMap ? m((e) => {
47
- const r = n.filterMap?.(e.name, e);
48
- return r === void 0 || r === !0 ? e : r;
49
- }) : (e) => e,
50
- // transform to array
51
- (e) => Object.values(e),
52
- // order
53
- u.sort(d),
54
- // sort
55
- n.sort ? u.sort(n.sort) : (e) => e
56
- )
57
- );
58
- return (e, r) => (_(!0), M(E, null, A(b.value, ({ name: t, label: o, ...c }) => F(e.$slots, "default", {
59
- child: { name: t, label: o, ...c }
60
- }, () => [
61
- g(h(i.form).Input, k({
62
- name: t,
63
- label: o
64
- }, { ref_for: !0 }, c), null, 16, ["name", "label"])
65
- ])), 256));
66
- }
67
- });
1
+ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");if(a.appendChild(document.createTextNode('.v-enter-from[data-v-6b2bf87e],.v-leave-to[data-v-6b2bf87e]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-6b2bf87e],.v-leave-active[data-v-6b2bf87e]{display:grid;transition:all .15s}.v-enter-to[data-v-6b2bf87e],.v-leave-from[data-v-6b2bf87e]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-6b2bf87e]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-6b2bf87e]{min-height:0}.error-list[data-v-6b2bf87e]{list-style-position:inside}.error-list [data-v-6b2bf87e]::marker{margin:0;padding:0}.error-alert-content[data-v-6b2bf87e]{background-color:var(--error-background, #fff5f5);color:var(--error-color, #c92a2a);padding:1em}.error-link[data-v-6b2bf87e]{font-weight:700;position:relative;color:var(--error-color, #c92a2a);cursor:pointer}.error-link[data-v-6b2bf87e]:after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;background:rgba(from var(--error-color, #c92a2a) r g b / .5)}.text-h6[data-v-6b2bf87e]{font-weight:700;font-size:1.25em}.error-message[data-v-6b2bf87e]{font-style:italic}.error-item[data-v-6b2bf87e]{margin-bottom:.5em;overflow:hidden}.error-item>div[data-v-6b2bf87e]{float:right;width:100%;max-width:calc(100% - 1.5em)}.container[data-v-6b2bf87e]{display:flex;gap:1.5em}.container svg[data-v-6b2bf87e]{width:3em}.container .single-error[data-v-6b2bf87e]{display:inline-block}')),document.head.appendChild(a),window.customElements){const e=window.customElements.define;window.customElements.define=function(i,t){const r=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(r&&r.call(this),this.shadowRoot){const o=document.createElement("style");o.appendChild(document.createTextNode('.v-enter-from[data-v-6b2bf87e],.v-leave-to[data-v-6b2bf87e]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-6b2bf87e],.v-leave-active[data-v-6b2bf87e]{display:grid;transition:all .15s}.v-enter-to[data-v-6b2bf87e],.v-leave-from[data-v-6b2bf87e]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-6b2bf87e]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-6b2bf87e]{min-height:0}.error-list[data-v-6b2bf87e]{list-style-position:inside}.error-list [data-v-6b2bf87e]::marker{margin:0;padding:0}.error-alert-content[data-v-6b2bf87e]{background-color:var(--error-background, #fff5f5);color:var(--error-color, #c92a2a);padding:1em}.error-link[data-v-6b2bf87e]{font-weight:700;position:relative;color:var(--error-color, #c92a2a);cursor:pointer}.error-link[data-v-6b2bf87e]:after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;background:rgba(from var(--error-color, #c92a2a) r g b / .5)}.text-h6[data-v-6b2bf87e]{font-weight:700;font-size:1.25em}.error-message[data-v-6b2bf87e]{font-style:italic}.error-item[data-v-6b2bf87e]{margin-bottom:.5em;overflow:hidden}.error-item>div[data-v-6b2bf87e]{float:right;width:100%;max-width:calc(100% - 1.5em)}.container[data-v-6b2bf87e]{display:flex;gap:1.5em}.container svg[data-v-6b2bf87e]{width:3em}.container .single-error[data-v-6b2bf87e]{display:inline-block}')),this.shadowRoot.appendChild(o)}},e.call(window.customElements,i,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import r from "./vue-components.es33.js";
3
+
4
+ import o from "./vue-components.es35.js";
5
+ const m = /* @__PURE__ */ o(r, [["__scopeId", "data-v-6b2bf87e"]]);
68
6
  export {
69
- I as default
7
+ m as default
70
8
  };
@@ -1,8 +1,8 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");if(a.appendChild(document.createTextNode('.v-enter-from[data-v-6b2bf87e],.v-leave-to[data-v-6b2bf87e]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-6b2bf87e],.v-leave-active[data-v-6b2bf87e]{display:grid;transition:all .15s}.v-enter-to[data-v-6b2bf87e],.v-leave-from[data-v-6b2bf87e]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-6b2bf87e]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-6b2bf87e]{min-height:0}.error-list[data-v-6b2bf87e]{list-style-position:inside}.error-list [data-v-6b2bf87e]::marker{margin:0;padding:0}.error-alert-content[data-v-6b2bf87e]{background-color:var(--error-background, #fff5f5);color:var(--error-color, #c92a2a);padding:1em}.error-link[data-v-6b2bf87e]{font-weight:700;position:relative;color:var(--error-color, #c92a2a);cursor:pointer}.error-link[data-v-6b2bf87e]:after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;background:rgba(from var(--error-color, #c92a2a) r g b / .5)}.text-h6[data-v-6b2bf87e]{font-weight:700;font-size:1.25em}.error-message[data-v-6b2bf87e]{font-style:italic}.error-item[data-v-6b2bf87e]{margin-bottom:.5em;overflow:hidden}.error-item>div[data-v-6b2bf87e]{float:right;width:100%;max-width:calc(100% - 1.5em)}.container[data-v-6b2bf87e]{display:flex;gap:1.5em}.container svg[data-v-6b2bf87e]{width:3em}.container .single-error[data-v-6b2bf87e]{display:inline-block}')),document.head.appendChild(a),window.customElements){const e=window.customElements.define;window.customElements.define=function(i,t){const r=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(r&&r.call(this),this.shadowRoot){const o=document.createElement("style");o.appendChild(document.createTextNode('.v-enter-from[data-v-6b2bf87e],.v-leave-to[data-v-6b2bf87e]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-6b2bf87e],.v-leave-active[data-v-6b2bf87e]{display:grid;transition:all .15s}.v-enter-to[data-v-6b2bf87e],.v-leave-from[data-v-6b2bf87e]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-6b2bf87e]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-6b2bf87e]{min-height:0}.error-list[data-v-6b2bf87e]{list-style-position:inside}.error-list [data-v-6b2bf87e]::marker{margin:0;padding:0}.error-alert-content[data-v-6b2bf87e]{background-color:var(--error-background, #fff5f5);color:var(--error-color, #c92a2a);padding:1em}.error-link[data-v-6b2bf87e]{font-weight:700;position:relative;color:var(--error-color, #c92a2a);cursor:pointer}.error-link[data-v-6b2bf87e]:after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;background:rgba(from var(--error-color, #c92a2a) r g b / .5)}.text-h6[data-v-6b2bf87e]{font-weight:700;font-size:1.25em}.error-message[data-v-6b2bf87e]{font-style:italic}.error-item[data-v-6b2bf87e]{margin-bottom:.5em;overflow:hidden}.error-item>div[data-v-6b2bf87e]{float:right;width:100%;max-width:calc(100% - 1.5em)}.container[data-v-6b2bf87e]{display:flex;gap:1.5em}.container svg[data-v-6b2bf87e]{width:3em}.container .single-error[data-v-6b2bf87e]{display:inline-block}')),this.shadowRoot.appendChild(o)}},e.call(window.customElements,i,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import r from "./vue-components.es33.js";
1
+ (function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-8c9cb27c]{display:contents}fieldset[disabled][data-v-8c9cb27c]>*{pointer-events:none}")),document.head.appendChild(n),window.customElements){const e=window.customElements.define;window.customElements.define=function(o,t){const d=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(d&&d.call(this),this.shadowRoot){const c=document.createElement("style");c.appendChild(document.createTextNode("fieldset[data-v-8c9cb27c]{display:contents}fieldset[disabled][data-v-8c9cb27c]>*{pointer-events:none}")),this.shadowRoot.appendChild(c)}},e.call(window.customElements,o,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import o from "./vue-components.es36.js";
3
3
 
4
- import o from "./vue-components.es35.js";
5
- const m = /* @__PURE__ */ o(r, [["__scopeId", "data-v-6b2bf87e"]]);
4
+ import m from "./vue-components.es35.js";
5
+ const a = /* @__PURE__ */ m(o, [["__scopeId", "data-v-8c9cb27c"]]);
6
6
  export {
7
- m as default
7
+ a as default
8
8
  };
@@ -1,8 +1,5 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-8c9cb27c]{display:contents}fieldset[disabled][data-v-8c9cb27c]>*{pointer-events:none}")),document.head.appendChild(n),window.customElements){const e=window.customElements.define;window.customElements.define=function(o,t){const d=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(d&&d.call(this),this.shadowRoot){const c=document.createElement("style");c.appendChild(document.createTextNode("fieldset[data-v-8c9cb27c]{display:contents}fieldset[disabled][data-v-8c9cb27c]>*{pointer-events:none}")),this.shadowRoot.appendChild(c)}},e.call(window.customElements,o,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import o from "./vue-components.es36.js";
3
-
4
- import m from "./vue-components.es35.js";
5
- const a = /* @__PURE__ */ m(o, [["__scopeId", "data-v-8c9cb27c"]]);
1
+ import { TraceAPI as r } from "./vue-components.es52.js";
2
+ var t = r.getInstance();
6
3
  export {
7
- a as default
4
+ t as trace
8
5
  };
@@ -1,5 +1,5 @@
1
- import { TraceAPI as r } from "./vue-components.es52.js";
2
- var t = r.getInstance();
1
+ import { ContextAPI as t } from "./vue-components.es51.js";
2
+ var o = t.getInstance();
3
3
  export {
4
- t as trace
4
+ o as context
5
5
  };
@@ -1,5 +1,4 @@
1
- import { ContextAPI as t } from "./vue-components.es51.js";
2
- var o = t.getInstance();
1
+ import f from "./vue-components.es6.js";
3
2
  export {
4
- o as context
3
+ f as default
5
4
  };
@@ -1,4 +1,4 @@
1
- import f from "./vue-components.es6.js";
1
+ import f from "./vue-components.es7.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import f from "./vue-components.es7.js";
1
+ import f from "./vue-components.es8.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import f from "./vue-components.es8.js";
1
+ import f from "./vue-components.es9.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,19 @@
1
- import f from "./vue-components.es9.js";
1
+ function c(t) {
2
+ return { all: t = t || /* @__PURE__ */ new Map(), on: function(e, f) {
3
+ var i = t.get(e);
4
+ i ? i.push(f) : t.set(e, [f]);
5
+ }, off: function(e, f) {
6
+ var i = t.get(e);
7
+ i && (f ? i.splice(i.indexOf(f) >>> 0, 1) : t.set(e, []));
8
+ }, emit: function(e, f) {
9
+ var i = t.get(e);
10
+ i && i.slice().map(function(a) {
11
+ a(f);
12
+ }), (i = t.get("*")) && i.slice().map(function(a) {
13
+ a(e, f);
14
+ });
15
+ } };
16
+ }
2
17
  export {
3
- f as default
18
+ c as default
4
19
  };
@@ -1,19 +1,13 @@
1
- function c(t) {
2
- return { all: t = t || /* @__PURE__ */ new Map(), on: function(e, f) {
3
- var i = t.get(e);
4
- i ? i.push(f) : t.set(e, [f]);
5
- }, off: function(e, f) {
6
- var i = t.get(e);
7
- i && (f ? i.splice(i.indexOf(f) >>> 0, 1) : t.set(e, []));
8
- }, emit: function(e, f) {
9
- var i = t.get(e);
10
- i && i.slice().map(function(a) {
11
- a(f);
12
- }), (i = t.get("*")) && i.slice().map(function(a) {
13
- a(e, f);
14
- });
15
- } };
1
+ import { onMounted as e, onUnmounted as u } from "vue";
2
+ function p(t) {
3
+ let n;
4
+ e(() => {
5
+ const o = t();
6
+ o && (n = o);
7
+ }), u(() => {
8
+ n && n();
9
+ });
16
10
  }
17
11
  export {
18
- c as default
12
+ p as onMountedWithCleanup
19
13
  };
@@ -1,4 +1,4 @@
1
- import f from "./vue-components.es19.js";
1
+ import f from "./vue-components.es18.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import f from "./vue-components.es20.js";
1
+ import f from "./vue-components.es19.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as v, mergeModels as C, useModel as k, useSlots as V, computed as _, resolveComponent as g, createBlock as y, openBlock as B, unref as a, createSlots as E, withCtx as u, renderSlot as d, renderList as M, normalizeProps as S, guardReactiveProps as w } from "vue";
2
2
  import { useOnClose as L } from "./vue-components.es11.js";
3
- import { onMountedWithCleanup as h } from "./vue-components.es16.js";
3
+ import { onMountedWithCleanup as h } from "./vue-components.es29.js";
4
4
  const z = /* @__PURE__ */ v({
5
5
  __name: "Dialog",
6
6
  props: /* @__PURE__ */ C({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-app/vue-components",
3
- "version": "2.10.6",
3
+ "version": "2.10.7",
4
4
  "peerDependencies": {
5
5
  "@mdi/js": "^7.4.47",
6
6
  "effect": "^3.19.3",
@@ -53,8 +53,8 @@
53
53
  "highlight.js": "^11.11.1",
54
54
  "mitt": "^3.0.1",
55
55
  "vue3-highlightjs": "^1.0.5",
56
- "@effect-app/vue": "2.93.5",
57
- "effect-app": "3.15.0"
56
+ "effect-app": "3.15.0",
57
+ "@effect-app/vue": "2.93.5"
58
58
  },
59
59
  "scripts": {
60
60
  "build": "pnpm build:run",
@@ -501,18 +501,19 @@ export const createMeta = <T = any>(
501
501
  acc[key as NestedKeyOf<T>] = newMeta as FieldMeta
502
502
  }
503
503
  }
504
- } else if ("propertySignatures" in typeToProcess) {
505
- Object.assign(
506
- acc,
507
- createMeta<T>({
508
- parent: key,
509
- propertySignatures: typeToProcess.propertySignatures,
510
- meta: { required: isRequired, nullableOrUndefined }
511
- })
512
- )
513
504
  } else {
514
- // Check if this is an array type
515
- if (S.AST.isTupleType(p.type)) {
505
+ // Unwrap transformations (like ExtendedClass) to check for propertySignatures
506
+ const unwrappedTypeToProcess = getTransformationFrom(typeToProcess)
507
+ if ("propertySignatures" in unwrappedTypeToProcess) {
508
+ Object.assign(
509
+ acc,
510
+ createMeta<T>({
511
+ parent: key,
512
+ propertySignatures: unwrappedTypeToProcess.propertySignatures,
513
+ meta: { required: isRequired, nullableOrUndefined }
514
+ })
515
+ )
516
+ } else if (S.AST.isTupleType(p.type)) {
516
517
  // Check if it has struct elements
517
518
  const hasStructElements = p.type.rest.length > 0
518
519
  && p.type.rest[0].type._tag === "TypeLiteral"