@effect-app/vue-components 2.7.5 → 2.7.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.
@@ -136,6 +136,7 @@ export type CreateMeta = {
136
136
  propertySignatures?: never;
137
137
  property: S.AST.AST;
138
138
  });
139
+ export declare const isNullableOrUndefined: (property: false | S.AST.AST | undefined) => false | "undefined" | "null";
139
140
  export declare const createMeta: <T = any>({ meta, parent, property, propertySignatures }: CreateMeta, acc?: Partial<MetaRecord<T>>) => MetaRecord<T> | FieldMeta;
140
141
  export declare const duplicateSchema: <From, To>(schema: S.Schema<To, From, never>) => S.extend<S.Schema<To, From, never>, S.Struct<{}>>;
141
142
  export declare const generateMetaFromSchema: <From, To>(schema: S.Schema<To, From, never>) => {
@@ -1,14 +1,14 @@
1
1
  import * as o from "./vue-components.es2.js";
2
- import { getTransformationFrom as f, provideIntl as u, useIntl as l, useIntlKey as s } from "./vue-components.es3.js";
2
+ import { getTransformationFrom as f, provideIntl as l, useIntl as u, useIntlKey as s } from "./vue-components.es3.js";
3
3
  import { default as i } from "./vue-components.es4.js";
4
4
  import { default as g } from "./vue-components.es5.js";
5
5
  import { default as I } from "./vue-components.es6.js";
6
6
  import { default as y } from "./vue-components.es7.js";
7
7
  import { default as h } from "./vue-components.es8.js";
8
- import { default as S } from "./vue-components.es9.js";
9
- import { useOmegaForm as b } from "./vue-components.es10.js";
10
- import { useOnClose as U, usePreventClose as j } from "./vue-components.es11.js";
11
- import { createMeta as P, duplicateSchema as k, generateInputStandardSchemaFromFieldMeta as w, generateMetaFromSchema as B, getInputType as D, nullableInput as K } from "./vue-components.es12.js";
8
+ import { default as C } from "./vue-components.es9.js";
9
+ import { useOmegaForm as T } from "./vue-components.es10.js";
10
+ import { useOnClose as M, usePreventClose as j } from "./vue-components.es11.js";
11
+ import { createMeta as P, duplicateSchema as k, generateInputStandardSchemaFromFieldMeta as w, generateMetaFromSchema as B, getInputType as D, isNullableOrUndefined as K, nullableInput as N } from "./vue-components.es12.js";
12
12
  import { createUseFormWithCustomInput as W } from "./vue-components.es13.js";
13
13
  function r(a) {
14
14
  for (const e in o)
@@ -23,7 +23,7 @@ export {
23
23
  g as Dialog,
24
24
  I as OmegaInput,
25
25
  h as OmegaTaggedUnion,
26
- S as OmegaTaggedUnionInternal,
26
+ C as OmegaTaggedUnionInternal,
27
27
  y as OmegaVuetifyInput,
28
28
  P as createMeta,
29
29
  W as createUseFormWithCustomInput,
@@ -33,11 +33,12 @@ export {
33
33
  B as generateMetaFromSchema,
34
34
  D as getInputType,
35
35
  f as getTransformationFrom,
36
- K as nullableInput,
37
- u as provideIntl,
38
- l as useIntl,
36
+ K as isNullableOrUndefined,
37
+ N as nullableInput,
38
+ l as provideIntl,
39
+ u as useIntl,
39
40
  s as useIntlKey,
40
- b as useOmegaForm,
41
- U as useOnClose,
41
+ T as useOmegaForm,
42
+ M as useOnClose,
42
43
  j as usePreventClose
43
44
  };
@@ -1,23 +1,23 @@
1
1
  import { useForm as G } from "@tanstack/vue-form";
2
- import { Data as z, S as p, Effect as h, Array as g, Fiber as L, Option as D } from "effect-app";
2
+ import { Data as z, S as p, Effect as b, Array as g, Fiber as O, Option as x } from "effect-app";
3
3
  import { runtimeFiberAsPromise as Q } from "./vue-components.es16.js";
4
4
  import { isObject as X } from "./vue-components.es17.js";
5
- import { computed as j, onUnmounted as R, onMounted as Y, onBeforeUnmount as Z, watch as W, ref as C, h as J } from "vue";
5
+ import { computed as V, onUnmounted as W, onMounted as Y, onBeforeUnmount as Z, watch as H, ref as C, h as q } from "vue";
6
6
  import ee from "./vue-components.es18.js";
7
7
  import te from "./vue-components.es19.js";
8
8
  import re from "./vue-components.es20.js";
9
- import { generateMetaFromSchema as ne } from "./vue-components.es12.js";
10
- import se from "./vue-components.es6.js";
11
- import oe from "./vue-components.es8.js";
12
- import ie from "./vue-components.es21.js";
13
- import { trace as H } from "./vue-components.es22.js";
14
- import { context as V } from "./vue-components.es23.js";
15
- const _ = (c) => {
16
- const i = c.ast;
9
+ import { generateMetaFromSchema as ne, isNullableOrUndefined as se } from "./vue-components.es12.js";
10
+ import oe from "./vue-components.es6.js";
11
+ import ie from "./vue-components.es8.js";
12
+ import ae from "./vue-components.es21.js";
13
+ import { trace as J } from "./vue-components.es22.js";
14
+ import { context as L } from "./vue-components.es23.js";
15
+ const _ = (l) => {
16
+ const i = l.ast;
17
17
  if (i._tag === "Union") {
18
18
  const o = i.types.map((u) => {
19
- const l = p.make(u);
20
- return _(l).ast;
19
+ const c = p.make(u);
20
+ return _(c).ast;
21
21
  }), m = {
22
22
  ...i,
23
23
  types: o
@@ -25,19 +25,19 @@ const _ = (c) => {
25
25
  return p.make(m);
26
26
  }
27
27
  if (i._tag === "Transformation") {
28
- const o = p.make(i.from), m = p.make(i.to), u = _(o), l = _(m), f = {
28
+ const o = p.make(i.from), m = p.make(i.to), u = _(o), c = _(m), f = {
29
29
  ...i,
30
30
  from: u.ast,
31
- to: l.ast
31
+ to: c.ast
32
32
  };
33
33
  return p.make(f);
34
34
  }
35
35
  if (i._tag === "TypeLiteral") {
36
36
  const o = i.propertySignatures.map((u) => {
37
- const l = u.type;
38
- let f = l;
39
- if (l._tag === "TypeLiteral" || l._tag === "Union" || l._tag === "Transformation") {
40
- const k = p.make(l);
37
+ const c = u.type;
38
+ let f = c;
39
+ if (c._tag === "TypeLiteral" || c._tag === "Union" || c._tag === "Transformation") {
40
+ const k = p.make(c);
41
41
  f = _(k).ast;
42
42
  }
43
43
  return {
@@ -51,41 +51,41 @@ const _ = (c) => {
51
51
  };
52
52
  return p.make(m);
53
53
  }
54
- return c;
54
+ return l;
55
55
  };
56
- class ae extends z.TaggedError("FormErrors") {
56
+ class le extends z.TaggedError("FormErrors") {
57
57
  }
58
- const M = (c) => function(o) {
58
+ const M = (l) => function(o) {
59
59
  return {
60
60
  render() {
61
- return J(o, {
62
- form: c,
61
+ return q(o, {
62
+ form: l,
63
63
  ...this.$attrs
64
64
  }, this.$slots);
65
65
  }
66
66
  };
67
- }, ce = (c) => function(o) {
67
+ }, ce = (l) => function(o) {
68
68
  return {
69
69
  setup() {
70
- const { fieldMap: m, form: u } = c, l = u.useStore((S) => S.errors), f = u.useStore((S) => S.fieldMeta), k = u.useStore((S) => S.errorMap), w = j(() => {
70
+ const { fieldMap: m, form: u } = l, c = u.useStore((S) => S.errors), f = u.useStore((S) => S.fieldMeta), k = u.useStore((S) => S.errorMap), h = V(() => {
71
71
  const S = g.filterMap(
72
72
  Object.entries(f.value),
73
- ([x, b]) => {
74
- const a = b.errors ?? [];
75
- if (!a.length) return D.none();
76
- const v = m.value.get(x);
77
- return v ? D.some({
73
+ ([U, w]) => {
74
+ const a = w.errors ?? [];
75
+ if (!a.length) return x.none();
76
+ const v = m.value.get(U);
77
+ return v ? x.some({
78
78
  label: v.label,
79
79
  inputId: v.id,
80
80
  // Only show the first error
81
81
  errors: [a[0]?.message].filter(Boolean)
82
- }) : D.none();
82
+ }) : x.none();
83
83
  }
84
84
  ), F = [];
85
85
  if (k.value.onSubmit) {
86
- for (const [x, b] of Object.entries(k.value.onSubmit))
87
- if (g.isArray(b) && b.length)
88
- for (const a of b) {
86
+ for (const [U, w] of Object.entries(k.value.onSubmit))
87
+ if (g.isArray(w) && w.length)
88
+ for (const a of w) {
89
89
  const v = a;
90
90
  if (v?.path && g.isArray(v.path) && v.path.length) {
91
91
  const A = v.path.join(".");
@@ -103,24 +103,24 @@ const M = (c) => function(o) {
103
103
  return [...S, ...F];
104
104
  });
105
105
  return {
106
- generalErrors: l,
107
- errors: w
106
+ generalErrors: c,
107
+ errors: h
108
108
  };
109
109
  },
110
110
  render({ errors: m, generalErrors: u }) {
111
- return J(o, {
111
+ return q(o, {
112
112
  errors: m,
113
113
  generalErrors: u,
114
114
  ...this.$attrs
115
115
  }, this.$slots);
116
116
  }
117
117
  };
118
- }, ke = (c, i, o) => {
119
- if (!c) throw new Error("Schema is required");
120
- const m = p.standardSchemaV1(c), u = p.decode(c), { meta: l } = ne(c), f = j(() => {
118
+ }, Ae = (l, i, o) => {
119
+ if (!l) throw new Error("Schema is required");
120
+ const m = p.standardSchemaV1(l), u = p.decode(l), { meta: c } = ne(l), f = V(() => {
121
121
  if (o?.persistency?.id)
122
122
  return o.persistency.id;
123
- const e = window.location.pathname, t = Object.keys(l);
123
+ const e = window.location.pathname, t = Object.keys(c);
124
124
  return `${e}-${t.join("-")}`;
125
125
  }), k = () => {
126
126
  const e = new URLSearchParams(window.location.search);
@@ -128,9 +128,9 @@ const M = (c) => function(o) {
128
128
  const t = new URL(window.location.href);
129
129
  t.search = e.toString(), window.history.replaceState({}, "", t.toString());
130
130
  };
131
- function w(e, t) {
131
+ function h(e, t) {
132
132
  for (const r in t)
133
- g.isArray(t[r]) ? e[r] = t[r] : t[r] && X(t[r]) ? (e[r] || (e[r] = {}), w(e[r], t[r])) : e[r] = t[r];
133
+ g.isArray(t[r]) ? e[r] = t[r] : t[r] && X(t[r]) ? (e[r] || (e[r] = {}), h(e[r], t[r])) : e[r] = t[r];
134
134
  return e;
135
135
  }
136
136
  const S = (e) => {
@@ -145,7 +145,7 @@ const M = (c) => function(o) {
145
145
  for (const n of r) {
146
146
  const s = S(n);
147
147
  if (Object.keys(s).length > 0 && n?.fields && Object.entries(n.fields).some(
148
- ([y, K]) => y === "_tag" || y === "type" || y === "kind" ? K?.ast?.defaultValue !== void 0 : !1
148
+ ([y, R]) => y === "_tag" || y === "type" || y === "kind" ? R?.ast?.defaultValue !== void 0 : !1
149
149
  ))
150
150
  return s;
151
151
  }
@@ -156,9 +156,20 @@ const M = (c) => function(o) {
156
156
  if (s?.ast?.defaultValue)
157
157
  try {
158
158
  const y = s.ast.defaultValue();
159
- y !== void 0 && (t[n] = y);
159
+ t[n] = y;
160
160
  } catch {
161
161
  }
162
+ else {
163
+ const y = s.ast;
164
+ switch (se(y)) {
165
+ case "null":
166
+ t[n] = null;
167
+ break;
168
+ case "undefined":
169
+ t[n] = void 0;
170
+ break;
171
+ }
172
+ }
162
173
  const d = S(s);
163
174
  Object.keys(d).length > 0 && (t[n] && typeof t[n] == "object" ? Object.assign(t[n], d) : t[n] || (t[n] = d));
164
175
  }
@@ -166,19 +177,19 @@ const M = (c) => function(o) {
166
177
  }, F = (e = {}) => {
167
178
  let t = {};
168
179
  try {
169
- const r = c.make(e);
170
- t = p.encodeSync(_(c))(r);
180
+ const r = l.make(e);
181
+ t = p.encodeSync(_(l))(r);
171
182
  } catch (r) {
172
183
  window.location.hostname === "localhost" && console.warn("schema.make() failed, extracting defaults from AST:", r);
173
184
  try {
174
- const n = S(c);
175
- t = p.encodeSync(_(c))(n);
185
+ const n = S(l);
186
+ t = p.encodeSync(_(l))(n);
176
187
  } catch (n) {
177
188
  window.location.hostname === "localhost" && console.warn("Could not extract defaults from AST:", n);
178
189
  }
179
190
  }
180
- return w(t, e);
181
- }, x = j(() => {
191
+ return h(t, e);
192
+ }, U = V(() => {
182
193
  let e;
183
194
  const t = o?.persistency;
184
195
  if (
@@ -199,64 +210,64 @@ const M = (c) => function(o) {
199
210
  if (t?.policies && t.policies.includes("querystring"))
200
211
  try {
201
212
  const n = new URLSearchParams(window.location.search).get(f.value);
202
- k(), n && (e = w(e || {}, JSON.parse(n)));
213
+ k(), n && (e = h(e || {}, JSON.parse(n)));
203
214
  } catch (r) {
204
215
  console.error(r);
205
216
  }
206
217
  return e ??= {}, F(
207
- o?.persistency?.overrideDefaultValues ? w(i?.defaultValues || {}, e) : w(e, i?.defaultValues || {})
218
+ o?.persistency?.overrideDefaultValues ? h(i?.defaultValues || {}, e) : h(e, i?.defaultValues || {})
208
219
  );
209
- }), b = (e, t) => e ? V.with(H.setSpan(V.active(), e), t) : t(), a = G({
220
+ }), w = (e, t) => e ? L.with(J.setSpan(L.active(), e), t) : t(), a = G({
210
221
  ...i,
211
222
  validators: {
212
223
  onSubmit: m,
213
224
  ...i?.validators || {}
214
225
  },
215
- onSubmit: i?.onSubmit ? ({ formApi: e, meta: t, value: r }) => b(t?.currentSpan, async () => {
216
- const n = await h.runPromise(u(r)), s = i.onSubmit({
226
+ onSubmit: i?.onSubmit ? ({ formApi: e, meta: t, value: r }) => w(t?.currentSpan, async () => {
227
+ const n = await b.runPromise(u(r)), s = i.onSubmit({
217
228
  formApi: e,
218
229
  meta: t,
219
230
  value: n
220
231
  });
221
- return L.isFiber(s) && L.isRuntimeFiber(s) ? await Q(s) : h.isEffect(s) ? await h.runPromise(
232
+ return O.isFiber(s) && O.isRuntimeFiber(s) ? await Q(s) : b.isEffect(s) ? await b.runPromise(
222
233
  s.pipe(
223
234
  // meta?.currentSpan
224
235
  // ? Effect.withParentSpan(meta.currentSpan)
225
236
  // : (_) => _,
226
- h.flatMap((d) => L.join(d))
237
+ b.flatMap((d) => O.join(d))
227
238
  )
228
239
  ) : s;
229
240
  }) : void 0,
230
- defaultValues: x.value
241
+ defaultValues: U.value
231
242
  }), v = () => {
232
- Object.keys(l).forEach((e) => {
243
+ Object.keys(c).forEach((e) => {
233
244
  a.setFieldValue(e, void 0);
234
245
  });
235
246
  }, A = (e) => e.reduce((t, r) => {
236
247
  const n = r.split(".");
237
248
  return n.reduce((s, d, y) => (y === n.length - 1 ? s[d] = a.getFieldValue(r) : s[d] = s[d] ?? {}, s[d]), t), t;
238
- }, {}), T = (e) => {
249
+ }, {}), j = (e) => {
239
250
  if (e) {
240
251
  if (g.isArray(e.keys))
241
252
  return A(e.keys);
242
253
  if (g.isArray(e.banKeys)) {
243
- const t = Object.keys(l).filter((r) => e.banKeys?.includes(r));
254
+ const t = Object.keys(c).filter((r) => e.banKeys?.includes(r));
244
255
  return A(t);
245
256
  }
246
257
  return a.store.state.values;
247
258
  }
248
- }, P = () => {
259
+ }, D = () => {
249
260
  const e = o?.persistency;
250
261
  if (!(!e?.policies || e.policies.length === 0) && (e.policies.includes("local") || e.policies.includes("session"))) {
251
262
  const t = e.policies.includes("local") ? localStorage : sessionStorage;
252
263
  if (!t) return;
253
- const r = T(e);
264
+ const r = j(e);
254
265
  return t.setItem(f.value, JSON.stringify(r));
255
266
  }
256
- }, O = () => {
267
+ }, T = () => {
257
268
  const e = o?.persistency;
258
269
  if (!(!e?.policies || e.policies.length === 0) && e.policies.includes("querystring")) {
259
- const t = T(e), r = new URLSearchParams(window.location.search);
270
+ const t = j(e), r = new URLSearchParams(window.location.search);
260
271
  r.set(f.value, JSON.stringify(t));
261
272
  const n = new URL(window.location.href);
262
273
  n.search = r.toString(), window.history.replaceState({}, "", n.toString());
@@ -264,48 +275,48 @@ const M = (c) => function(o) {
264
275
  }, I = (e) => {
265
276
  a.store.state.isDirty && e.preventDefault();
266
277
  };
267
- if (R(P), Y(() => {
268
- window.addEventListener("beforeunload", P), window.addEventListener("blur", O), o?.preventWindowExit && o.preventWindowExit !== "nope" && window.addEventListener("beforeunload", I);
278
+ if (W(D), Y(() => {
279
+ window.addEventListener("beforeunload", D), window.addEventListener("blur", T), o?.preventWindowExit && o.preventWindowExit !== "nope" && window.addEventListener("beforeunload", I);
269
280
  }), Z(() => {
270
- window.removeEventListener("beforeunload", P), window.removeEventListener("blur", O), o?.preventWindowExit && o.preventWindowExit !== "nope" && window.removeEventListener("beforeunload", I);
281
+ window.removeEventListener("beforeunload", D), window.removeEventListener("blur", T), o?.preventWindowExit && o.preventWindowExit !== "nope" && window.removeEventListener("beforeunload", I);
271
282
  }), o?.preventWindowExit === "prevent-and-reset") {
272
283
  const e = a.useStore((s) => s.isSubmitting), t = a.useStore((s) => s.submissionAttempts), r = a.useStore((s) => s.canSubmit), n = a.useStore((s) => s.values);
273
- W([e, t], ([s, d], [y]) => {
284
+ H([e, t], ([s, d], [y]) => {
274
285
  y && !s && d > 0 && r.value && a.reset(n.value);
275
286
  });
276
287
  }
277
- const $ = (e) => h.currentSpan.pipe(
278
- h.option,
279
- h.flatMap(
280
- (t) => h.promise(() => a.handleSubmit(D.isSome(t) ? { currentSpan: t.value, ...e } : e))
288
+ const $ = (e) => b.currentSpan.pipe(
289
+ b.option,
290
+ b.flatMap(
291
+ (t) => b.promise(() => a.handleSubmit(x.isSome(t) ? { currentSpan: t.value, ...e } : e))
281
292
  )
282
- ), q = (e) => e?.checkErrors ? $(e?.meta).pipe(h.flatMap(h.fnUntraced(function* () {
293
+ ), B = (e) => e?.checkErrors ? $(e?.meta).pipe(b.flatMap(b.fnUntraced(function* () {
283
294
  const t = a.getAllErrors();
284
295
  if (Object.keys(t.fields).length || t.form.errors.length)
285
- return yield* new ae({ form: t.form, fields: t.fields });
286
- }))) : $(e?.meta), B = a.handleSubmit, U = C(/* @__PURE__ */ new Map()), E = Object.assign(a, {
296
+ return yield* new le({ form: t.form, fields: t.fields });
297
+ }))) : $(e?.meta), K = a.handleSubmit, P = C(/* @__PURE__ */ new Map()), E = Object.assign(a, {
287
298
  i18nNamespace: o?.i18nNamespace,
288
299
  ignorePreventCloseEvents: o?.ignorePreventCloseEvents,
289
- meta: l,
300
+ meta: c,
290
301
  clear: v,
291
302
  handleSubmit: (e) => {
292
- const t = H.getSpan(V.active());
293
- return B({ currentSpan: t, ...e });
303
+ const t = J.getSpan(L.active());
304
+ return K({ currentSpan: t, ...e });
294
305
  },
295
306
  // /** @experimental */
296
- handleSubmitEffect: q,
307
+ handleSubmitEffect: B,
297
308
  registerField: (e) => {
298
- W(e, (t) => U.value.set(t.name, { label: t.label, id: t.id }), { immediate: !0 }), R(() => U.value.delete(e.value.name));
309
+ H(e, (t) => P.value.set(t.name, { label: t.label, id: t.id }), { immediate: !0 }), W(() => P.value.delete(e.value.name));
299
310
  }
300
- }), N = { form: E, fieldMap: U };
311
+ }), N = { form: E, fieldMap: P };
301
312
  return Object.assign(E, {
302
313
  // Type-level properties for performance optimization (not used at runtime)
303
314
  _paths: void 0,
304
315
  _keys: void 0,
305
316
  errorContext: N,
306
- Form: M(E)(ie),
307
- Input: M(E)(o?.input ?? se),
308
- TaggedUnion: M(E)(oe),
317
+ Form: M(E)(ae),
318
+ Input: M(E)(o?.input ?? oe),
319
+ TaggedUnion: M(E)(ie),
309
320
  Field: a.Field,
310
321
  Errors: ce(N)(re),
311
322
  Array: M(E)(ee),
@@ -313,6 +324,6 @@ const M = (c) => function(o) {
313
324
  });
314
325
  };
315
326
  export {
316
- ae as FormErrors,
317
- ke as useOmegaForm
327
+ le as FormErrors,
328
+ Ae as useOmegaForm
318
329
  };
@@ -379,5 +379,6 @@ export {
379
379
  F as generateInputStandardSchemaFromFieldMeta,
380
380
  j as generateMetaFromSchema,
381
381
  R as getInputType,
382
+ d as isNullableOrUndefined,
382
383
  D as nullableInput
383
384
  };
@@ -1,28 +1,29 @@
1
1
  import { default as a } from "./vue-components.es4.js";
2
2
  import { default as r } from "./vue-components.es5.js";
3
- import { createMeta as n, duplicateSchema as u, generateInputStandardSchemaFromFieldMeta as p, generateMetaFromSchema as f, getInputType as l, nullableInput as d } from "./vue-components.es12.js";
4
- import { useOmegaForm as s } from "./vue-components.es10.js";
5
- import { default as i } from "./vue-components.es6.js";
3
+ import { createMeta as n, duplicateSchema as u, generateInputStandardSchemaFromFieldMeta as f, generateMetaFromSchema as l, getInputType as p, isNullableOrUndefined as d, nullableInput as s } from "./vue-components.es12.js";
4
+ import { useOmegaForm as x } from "./vue-components.es10.js";
5
+ import { default as I } from "./vue-components.es6.js";
6
6
  import { default as c } from "./vue-components.es7.js";
7
- import { default as F } from "./vue-components.es8.js";
8
- import { default as C } from "./vue-components.es9.js";
7
+ import { default as h } from "./vue-components.es8.js";
8
+ import { default as S } from "./vue-components.es9.js";
9
9
  import { useOnClose as M, usePreventClose as T } from "./vue-components.es11.js";
10
10
  import { createUseFormWithCustomInput as y } from "./vue-components.es13.js";
11
11
  export {
12
12
  a as CommandButton,
13
13
  r as Dialog,
14
- i as OmegaInput,
15
- F as OmegaTaggedUnion,
16
- C as OmegaTaggedUnionInternal,
14
+ I as OmegaInput,
15
+ h as OmegaTaggedUnion,
16
+ S as OmegaTaggedUnionInternal,
17
17
  c as OmegaVuetifyInput,
18
18
  n as createMeta,
19
19
  y as createUseFormWithCustomInput,
20
20
  u as duplicateSchema,
21
- p as generateInputStandardSchemaFromFieldMeta,
22
- f as generateMetaFromSchema,
23
- l as getInputType,
24
- d as nullableInput,
25
- s as useOmegaForm,
21
+ f as generateInputStandardSchemaFromFieldMeta,
22
+ l as generateMetaFromSchema,
23
+ p as getInputType,
24
+ d as isNullableOrUndefined,
25
+ s as nullableInput,
26
+ x as useOmegaForm,
26
27
  M as useOnClose,
27
28
  T as usePreventClose
28
29
  };
@@ -1,4 +1,4 @@
1
- import { TraceAPI as r } from "./vue-components.es52.js";
1
+ import { TraceAPI as r } from "./vue-components.es51.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.es51.js";
1
+ import { ContextAPI as t } from "./vue-components.es50.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.es53.js";
4
+ import { getOmegaStore as c } from "./vue-components.es52.js";
5
5
  const S = ["disabled"], V = /* @__PURE__ */ m({
6
6
  __name: "OmegaWrapper",
7
7
  props: {
@@ -1,6 +1,25 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");if(i.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),document.head.appendChild(i),window.customElements){const e=window.customElements.define;window.customElements.define=function(s,t){const n=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(n&&n.call(this),this.shadowRoot){const a=document.createElement("style");a.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),this.shadowRoot.appendChild(a)}},e.call(window.customElements,s,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import o from "./vue-components.es38.js";
3
-
1
+ function a(t) {
2
+ return Symbol.for(t);
3
+ }
4
+ var c = (
5
+ /** @class */
6
+ /* @__PURE__ */ (function() {
7
+ function t(u) {
8
+ var e = this;
9
+ e._currentContext = u ? new Map(u) : /* @__PURE__ */ new Map(), e.getValue = function(n) {
10
+ return e._currentContext.get(n);
11
+ }, e.setValue = function(n, r) {
12
+ var o = new t(e._currentContext);
13
+ return o._currentContext.set(n, r), o;
14
+ }, e.deleteValue = function(n) {
15
+ var r = new t(e._currentContext);
16
+ return r._currentContext.delete(n), r;
17
+ };
18
+ }
19
+ return t;
20
+ })()
21
+ ), x = new c();
4
22
  export {
5
- o as default
23
+ x as ROOT_CONTEXT,
24
+ a as createContextKey
6
25
  };
@@ -1,25 +1,7 @@
1
- function a(t) {
2
- return Symbol.for(t);
3
- }
4
- var c = (
5
- /** @class */
6
- /* @__PURE__ */ (function() {
7
- function t(u) {
8
- var e = this;
9
- e._currentContext = u ? new Map(u) : /* @__PURE__ */ new Map(), e.getValue = function(n) {
10
- return e._currentContext.get(n);
11
- }, e.setValue = function(n, r) {
12
- var o = new t(e._currentContext);
13
- return o._currentContext.set(n, r), o;
14
- }, e.deleteValue = function(n) {
15
- var r = new t(e._currentContext);
16
- return r._currentContext.delete(n), r;
17
- };
18
- }
19
- return t;
20
- })()
21
- ), x = new c();
1
+ var R;
2
+ (function(E) {
3
+ E[E.NONE = 0] = "NONE", E[E.ERROR = 30] = "ERROR", E[E.WARN = 50] = "WARN", E[E.INFO = 60] = "INFO", E[E.DEBUG = 70] = "DEBUG", E[E.VERBOSE = 80] = "VERBOSE", E[E.ALL = 9999] = "ALL";
4
+ })(R || (R = {}));
22
5
  export {
23
- x as ROOT_CONTEXT,
24
- a as createContextKey
6
+ R as DiagLogLevel
25
7
  };
@@ -1,7 +1,23 @@
1
- var R;
2
- (function(E) {
3
- E[E.NONE = 0] = "NONE", E[E.ERROR = 30] = "ERROR", E[E.WARN = 50] = "WARN", E[E.INFO = 60] = "INFO", E[E.DEBUG = 70] = "DEBUG", E[E.VERBOSE = 80] = "VERBOSE", E[E.ALL = 9999] = "ALL";
4
- })(R || (R = {}));
1
+ import { NoopTracer as o } from "./vue-components.es43.js";
2
+ var s = new o(), c = (
3
+ /** @class */
4
+ (function() {
5
+ function r(t, e, n, a) {
6
+ this._provider = t, this.name = e, this.version = n, this.options = a;
7
+ }
8
+ return r.prototype.startSpan = function(t, e, n) {
9
+ return this._getTracer().startSpan(t, e, n);
10
+ }, r.prototype.startActiveSpan = function(t, e, n, a) {
11
+ var i = this._getTracer();
12
+ return Reflect.apply(i.startActiveSpan, i, arguments);
13
+ }, r.prototype._getTracer = function() {
14
+ if (this._delegate)
15
+ return this._delegate;
16
+ var t = this._provider.getDelegateTracer(this.name, this.version, this.options);
17
+ return t ? (this._delegate = t, this._delegate) : s;
18
+ }, r;
19
+ })()
20
+ );
5
21
  export {
6
- R as DiagLogLevel
22
+ c as ProxyTracer
7
23
  };
@@ -1,23 +1,32 @@
1
- import { NoopTracer as o } from "./vue-components.es44.js";
2
- var s = new o(), c = (
1
+ import { ContextAPI as l } from "./vue-components.es50.js";
2
+ import { getSpanContext as m, setSpan as d } from "./vue-components.es58.js";
3
+ import { NonRecordingSpan as p } from "./vue-components.es49.js";
4
+ import { isSpanContextValid as S } from "./vue-components.es47.js";
5
+ var f = l.getInstance(), I = (
3
6
  /** @class */
4
7
  (function() {
5
- function r(t, e, n, a) {
6
- this._provider = t, this.name = e, this.version = n, this.options = a;
8
+ function t() {
7
9
  }
8
- return r.prototype.startSpan = function(t, e, n) {
9
- return this._getTracer().startSpan(t, e, n);
10
- }, r.prototype.startActiveSpan = function(t, e, n, a) {
11
- var i = this._getTracer();
12
- return Reflect.apply(i.startActiveSpan, i, arguments);
13
- }, r.prototype._getTracer = function() {
14
- if (this._delegate)
15
- return this._delegate;
16
- var t = this._provider.getDelegateTracer(this.name, this.version, this.options);
17
- return t ? (this._delegate = t, this._delegate) : s;
18
- }, r;
10
+ return t.prototype.startSpan = function(u, e, r) {
11
+ r === void 0 && (r = f.active());
12
+ var i = !!e?.root;
13
+ if (i)
14
+ return new p();
15
+ var n = r && m(r);
16
+ return g(n) && S(n) ? new p(n) : new p();
17
+ }, t.prototype.startActiveSpan = function(u, e, r, i) {
18
+ var n, o, a;
19
+ if (!(arguments.length < 2)) {
20
+ arguments.length === 2 ? a = e : arguments.length === 3 ? (n = e, a = r) : (n = e, o = r, a = i);
21
+ var v = o ?? f.active(), s = this.startSpan(u, n, v), c = d(v, s);
22
+ return f.with(c, a, void 0, s);
23
+ }
24
+ }, t;
19
25
  })()
20
26
  );
27
+ function g(t) {
28
+ return typeof t == "object" && typeof t.spanId == "string" && typeof t.traceId == "string" && typeof t.traceFlags == "number";
29
+ }
21
30
  export {
22
- c as ProxyTracer
31
+ I as NoopTracer
23
32
  };
@@ -1,32 +1,24 @@
1
- import { ContextAPI as l } from "./vue-components.es51.js";
2
- import { getSpanContext as m, setSpan as d } from "./vue-components.es58.js";
3
- import { NonRecordingSpan as p } from "./vue-components.es50.js";
4
- import { isSpanContextValid as S } from "./vue-components.es48.js";
5
- var f = l.getInstance(), I = (
1
+ import { ProxyTracer as i } from "./vue-components.es42.js";
2
+ import { NoopTracerProvider as n } from "./vue-components.es45.js";
3
+ var c = new n(), g = (
6
4
  /** @class */
7
5
  (function() {
8
6
  function t() {
9
7
  }
10
- return t.prototype.startSpan = function(u, e, r) {
11
- r === void 0 && (r = f.active());
12
- var i = !!e?.root;
13
- if (i)
14
- return new p();
15
- var n = r && m(r);
16
- return g(n) && S(n) ? new p(n) : new p();
17
- }, t.prototype.startActiveSpan = function(u, e, r, i) {
18
- var n, o, a;
19
- if (!(arguments.length < 2)) {
20
- arguments.length === 2 ? a = e : arguments.length === 3 ? (n = e, a = r) : (n = e, o = r, a = i);
21
- var v = o ?? f.active(), s = this.startSpan(u, n, v), c = d(v, s);
22
- return f.with(c, a, void 0, s);
23
- }
8
+ return t.prototype.getTracer = function(e, o, a) {
9
+ var r;
10
+ return (r = this.getDelegateTracer(e, o, a)) !== null && r !== void 0 ? r : new i(this, e, o, a);
11
+ }, t.prototype.getDelegate = function() {
12
+ var e;
13
+ return (e = this._delegate) !== null && e !== void 0 ? e : c;
14
+ }, t.prototype.setDelegate = function(e) {
15
+ this._delegate = e;
16
+ }, t.prototype.getDelegateTracer = function(e, o, a) {
17
+ var r;
18
+ return (r = this._delegate) === null || r === void 0 ? void 0 : r.getTracer(e, o, a);
24
19
  }, t;
25
20
  })()
26
21
  );
27
- function g(t) {
28
- return typeof t == "object" && typeof t.spanId == "string" && typeof t.traceId == "string" && typeof t.traceFlags == "number";
29
- }
30
22
  export {
31
- I as NoopTracer
23
+ g as ProxyTracerProvider
32
24
  };
@@ -1,24 +1,14 @@
1
- import { ProxyTracer as i } from "./vue-components.es43.js";
2
- import { NoopTracerProvider as n } from "./vue-components.es46.js";
3
- var c = new n(), g = (
1
+ import { NoopTracer as o } from "./vue-components.es43.js";
2
+ var p = (
4
3
  /** @class */
5
4
  (function() {
6
- function t() {
5
+ function r() {
7
6
  }
8
- return t.prototype.getTracer = function(e, o, a) {
9
- var r;
10
- return (r = this.getDelegateTracer(e, o, a)) !== null && r !== void 0 ? r : new i(this, e, o, a);
11
- }, t.prototype.getDelegate = function() {
12
- var e;
13
- return (e = this._delegate) !== null && e !== void 0 ? e : c;
14
- }, t.prototype.setDelegate = function(e) {
15
- this._delegate = e;
16
- }, t.prototype.getDelegateTracer = function(e, o, a) {
17
- var r;
18
- return (r = this._delegate) === null || r === void 0 ? void 0 : r.getTracer(e, o, a);
19
- }, t;
7
+ return r.prototype.getTracer = function(e, n, t) {
8
+ return new o();
9
+ }, r;
20
10
  })()
21
11
  );
22
12
  export {
23
- g as ProxyTracerProvider
13
+ p as NoopTracerProvider
24
14
  };
@@ -1,14 +1,7 @@
1
- import { NoopTracer as o } from "./vue-components.es44.js";
2
- var p = (
3
- /** @class */
4
- (function() {
5
- function r() {
6
- }
7
- return r.prototype.getTracer = function(e, n, t) {
8
- return new o();
9
- }, r;
10
- })()
11
- );
1
+ var N;
2
+ (function(E) {
3
+ E[E.NONE = 0] = "NONE", E[E.SAMPLED = 1] = "SAMPLED";
4
+ })(N || (N = {}));
12
5
  export {
13
- p as NoopTracerProvider
6
+ N as TraceFlags
14
7
  };
@@ -1,7 +1,21 @@
1
- var N;
2
- (function(E) {
3
- E[E.NONE = 0] = "NONE", E[E.SAMPLED = 1] = "SAMPLED";
4
- })(N || (N = {}));
1
+ import { INVALID_TRACEID as r, INVALID_SPANID as t } from "./vue-components.es48.js";
2
+ import { NonRecordingSpan as i } from "./vue-components.es49.js";
3
+ var a = /^([0-9a-f]{32})$/i, o = /^[0-9a-f]{16}$/i;
4
+ function I(n) {
5
+ return a.test(n) && n !== r;
6
+ }
7
+ function e(n) {
8
+ return o.test(n) && n !== t;
9
+ }
10
+ function A(n) {
11
+ return I(n.traceId) && e(n.spanId);
12
+ }
13
+ function D(n) {
14
+ return new i(n);
15
+ }
5
16
  export {
6
- N as TraceFlags
17
+ A as isSpanContextValid,
18
+ e as isValidSpanId,
19
+ I as isValidTraceId,
20
+ D as wrapSpanContext
7
21
  };
@@ -1,21 +1,11 @@
1
- import { INVALID_TRACEID as r, INVALID_SPANID as t } from "./vue-components.es49.js";
2
- import { NonRecordingSpan as i } from "./vue-components.es50.js";
3
- var a = /^([0-9a-f]{32})$/i, o = /^[0-9a-f]{16}$/i;
4
- function I(n) {
5
- return a.test(n) && n !== r;
6
- }
7
- function e(n) {
8
- return o.test(n) && n !== t;
9
- }
10
- function A(n) {
11
- return I(n.traceId) && e(n.spanId);
12
- }
13
- function D(n) {
14
- return new i(n);
15
- }
1
+ import { TraceFlags as I } from "./vue-components.es46.js";
2
+ var a = "0000000000000000", r = "00000000000000000000000000000000", A = {
3
+ traceId: r,
4
+ spanId: a,
5
+ traceFlags: I.NONE
6
+ };
16
7
  export {
17
- A as isSpanContextValid,
18
- e as isValidSpanId,
19
- I as isValidTraceId,
20
- D as wrapSpanContext
8
+ a as INVALID_SPANID,
9
+ A as INVALID_SPAN_CONTEXT,
10
+ r as INVALID_TRACEID
21
11
  };
@@ -1,11 +1,33 @@
1
- import { TraceFlags as I } from "./vue-components.es47.js";
2
- var a = "0000000000000000", r = "00000000000000000000000000000000", A = {
3
- traceId: r,
4
- spanId: a,
5
- traceFlags: I.NONE
6
- };
1
+ import { INVALID_SPAN_CONTEXT as o } from "./vue-components.es48.js";
2
+ var i = (
3
+ /** @class */
4
+ (function() {
5
+ function t(n) {
6
+ n === void 0 && (n = o), this._spanContext = n;
7
+ }
8
+ return t.prototype.spanContext = function() {
9
+ return this._spanContext;
10
+ }, t.prototype.setAttribute = function(n, e) {
11
+ return this;
12
+ }, t.prototype.setAttributes = function(n) {
13
+ return this;
14
+ }, t.prototype.addEvent = function(n, e) {
15
+ return this;
16
+ }, t.prototype.addLink = function(n) {
17
+ return this;
18
+ }, t.prototype.addLinks = function(n) {
19
+ return this;
20
+ }, t.prototype.setStatus = function(n) {
21
+ return this;
22
+ }, t.prototype.updateName = function(n) {
23
+ return this;
24
+ }, t.prototype.end = function(n) {
25
+ }, t.prototype.isRecording = function() {
26
+ return !1;
27
+ }, t.prototype.recordException = function(n, e) {
28
+ }, t;
29
+ })()
30
+ );
7
31
  export {
8
- a as INVALID_SPANID,
9
- A as INVALID_SPAN_CONTEXT,
10
- r as INVALID_TRACEID
32
+ i as NonRecordingSpan
11
33
  };
@@ -1,33 +1,50 @@
1
- import { INVALID_SPAN_CONTEXT as o } from "./vue-components.es49.js";
2
- var i = (
1
+ import { NoopContextManager as f } from "./vue-components.es59.js";
2
+ import { registerGlobal as s, getGlobal as p, unregisterGlobal as g } from "./vue-components.es57.js";
3
+ import { DiagAPI as u } from "./vue-components.es54.js";
4
+ var y = function(t, e) {
5
+ var a = typeof Symbol == "function" && t[Symbol.iterator];
6
+ if (!a) return t;
7
+ var n = a.call(t), o, r = [], i;
8
+ try {
9
+ for (; (e === void 0 || e-- > 0) && !(o = n.next()).done; ) r.push(o.value);
10
+ } catch (c) {
11
+ i = { error: c };
12
+ } finally {
13
+ try {
14
+ o && !o.done && (a = n.return) && a.call(n);
15
+ } finally {
16
+ if (i) throw i.error;
17
+ }
18
+ }
19
+ return r;
20
+ }, d = function(t, e, a) {
21
+ if (a || arguments.length === 2) for (var n = 0, o = e.length, r; n < o; n++)
22
+ (r || !(n in e)) && (r || (r = Array.prototype.slice.call(e, 0, n)), r[n] = e[n]);
23
+ return t.concat(r || Array.prototype.slice.call(e));
24
+ }, l = "context", _ = new f(), A = (
3
25
  /** @class */
4
26
  (function() {
5
- function t(n) {
6
- n === void 0 && (n = o), this._spanContext = n;
27
+ function t() {
7
28
  }
8
- return t.prototype.spanContext = function() {
9
- return this._spanContext;
10
- }, t.prototype.setAttribute = function(n, e) {
11
- return this;
12
- }, t.prototype.setAttributes = function(n) {
13
- return this;
14
- }, t.prototype.addEvent = function(n, e) {
15
- return this;
16
- }, t.prototype.addLink = function(n) {
17
- return this;
18
- }, t.prototype.addLinks = function(n) {
19
- return this;
20
- }, t.prototype.setStatus = function(n) {
21
- return this;
22
- }, t.prototype.updateName = function(n) {
23
- return this;
24
- }, t.prototype.end = function(n) {
25
- }, t.prototype.isRecording = function() {
26
- return !1;
27
- }, t.prototype.recordException = function(n, e) {
29
+ return t.getInstance = function() {
30
+ return this._instance || (this._instance = new t()), this._instance;
31
+ }, t.prototype.setGlobalContextManager = function(e) {
32
+ return s(l, e, u.instance());
33
+ }, t.prototype.active = function() {
34
+ return this._getContextManager().active();
35
+ }, t.prototype.with = function(e, a, n) {
36
+ for (var o, r = [], i = 3; i < arguments.length; i++)
37
+ r[i - 3] = arguments[i];
38
+ return (o = this._getContextManager()).with.apply(o, d([e, a, n], y(r), !1));
39
+ }, t.prototype.bind = function(e, a) {
40
+ return this._getContextManager().bind(e, a);
41
+ }, t.prototype._getContextManager = function() {
42
+ return p(l) || _;
43
+ }, t.prototype.disable = function() {
44
+ this._getContextManager().disable(), g(l, u.instance());
28
45
  }, t;
29
46
  })()
30
47
  );
31
48
  export {
32
- i as NonRecordingSpan
49
+ A as ContextAPI
33
50
  };
@@ -1,50 +1,28 @@
1
- import { NoopContextManager as f } from "./vue-components.es59.js";
2
- import { registerGlobal as s, getGlobal as p, unregisterGlobal as g } from "./vue-components.es57.js";
3
- import { DiagAPI as u } from "./vue-components.es54.js";
4
- var y = function(t, e) {
5
- var a = typeof Symbol == "function" && t[Symbol.iterator];
6
- if (!a) return t;
7
- var n = a.call(t), o, r = [], i;
8
- try {
9
- for (; (e === void 0 || e-- > 0) && !(o = n.next()).done; ) r.push(o.value);
10
- } catch (c) {
11
- i = { error: c };
12
- } finally {
13
- try {
14
- o && !o.done && (a = n.return) && a.call(n);
15
- } finally {
16
- if (i) throw i.error;
17
- }
18
- }
19
- return r;
20
- }, d = function(t, e, a) {
21
- if (a || arguments.length === 2) for (var n = 0, o = e.length, r; n < o; n++)
22
- (r || !(n in e)) && (r || (r = Array.prototype.slice.call(e, 0, n)), r[n] = e[n]);
23
- return t.concat(r || Array.prototype.slice.call(e));
24
- }, l = "context", _ = new f(), A = (
1
+ import { registerGlobal as a, getGlobal as p, unregisterGlobal as s } from "./vue-components.es57.js";
2
+ import { ProxyTracerProvider as i } from "./vue-components.es44.js";
3
+ import { wrapSpanContext as c, isSpanContextValid as h } from "./vue-components.es47.js";
4
+ import { deleteSpan as g, getSpan as S, getActiveSpan as x, getSpanContext as d, setSpan as f, setSpanContext as l } from "./vue-components.es58.js";
5
+ import { DiagAPI as o } from "./vue-components.es54.js";
6
+ var n = "trace", y = (
25
7
  /** @class */
26
8
  (function() {
27
9
  function t() {
10
+ this._proxyTracerProvider = new i(), this.wrapSpanContext = c, this.isSpanContextValid = h, this.deleteSpan = g, this.getSpan = S, this.getActiveSpan = x, this.getSpanContext = d, this.setSpan = f, this.setSpanContext = l;
28
11
  }
29
12
  return t.getInstance = function() {
30
13
  return this._instance || (this._instance = new t()), this._instance;
31
- }, t.prototype.setGlobalContextManager = function(e) {
32
- return s(l, e, u.instance());
33
- }, t.prototype.active = function() {
34
- return this._getContextManager().active();
35
- }, t.prototype.with = function(e, a, n) {
36
- for (var o, r = [], i = 3; i < arguments.length; i++)
37
- r[i - 3] = arguments[i];
38
- return (o = this._getContextManager()).with.apply(o, d([e, a, n], y(r), !1));
39
- }, t.prototype.bind = function(e, a) {
40
- return this._getContextManager().bind(e, a);
41
- }, t.prototype._getContextManager = function() {
42
- return p(l) || _;
14
+ }, t.prototype.setGlobalTracerProvider = function(r) {
15
+ var e = a(n, this._proxyTracerProvider, o.instance());
16
+ return e && this._proxyTracerProvider.setDelegate(r), e;
17
+ }, t.prototype.getTracerProvider = function() {
18
+ return p(n) || this._proxyTracerProvider;
19
+ }, t.prototype.getTracer = function(r, e) {
20
+ return this.getTracerProvider().getTracer(r, e);
43
21
  }, t.prototype.disable = function() {
44
- this._getContextManager().disable(), g(l, u.instance());
22
+ s(n, o.instance()), this._proxyTracerProvider = new i();
45
23
  }, t;
46
24
  })()
47
25
  );
48
26
  export {
49
- A as ContextAPI
27
+ y as TraceAPI
50
28
  };
@@ -1,28 +1,13 @@
1
- import { registerGlobal as a, getGlobal as p, unregisterGlobal as s } from "./vue-components.es57.js";
2
- import { ProxyTracerProvider as i } from "./vue-components.es45.js";
3
- import { wrapSpanContext as c, isSpanContextValid as h } from "./vue-components.es48.js";
4
- import { deleteSpan as g, getSpan as S, getActiveSpan as x, getSpanContext as d, setSpan as f, setSpanContext as l } from "./vue-components.es58.js";
5
- import { DiagAPI as o } from "./vue-components.es54.js";
6
- var n = "trace", y = (
7
- /** @class */
8
- (function() {
9
- function t() {
10
- this._proxyTracerProvider = new i(), this.wrapSpanContext = c, this.isSpanContextValid = h, this.deleteSpan = g, this.getSpan = S, this.getActiveSpan = x, this.getSpanContext = d, this.setSpan = f, this.setSpanContext = l;
11
- }
12
- return t.getInstance = function() {
13
- return this._instance || (this._instance = new t()), this._instance;
14
- }, t.prototype.setGlobalTracerProvider = function(r) {
15
- var e = a(n, this._proxyTracerProvider, o.instance());
16
- return e && this._proxyTracerProvider.setDelegate(r), e;
17
- }, t.prototype.getTracerProvider = function() {
18
- return p(n) || this._proxyTracerProvider;
19
- }, t.prototype.getTracer = function(r, e) {
20
- return this.getTracerProvider().getTracer(r, e);
21
- }, t.prototype.disable = function() {
22
- s(n, o.instance()), this._proxyTracerProvider = new i();
23
- }, t;
24
- })()
25
- );
1
+ import { useStore as u } from "@tanstack/vue-form";
2
+ import { computed as f } from "vue";
3
+ function c(o, t) {
4
+ return f(() => t ? u(o.store, (n) => {
5
+ const r = {};
6
+ for (const e of t)
7
+ r[e] = n[e];
8
+ return r;
9
+ }).value : {});
10
+ }
26
11
  export {
27
- y as TraceAPI
12
+ c as getOmegaStore
28
13
  };
@@ -1,13 +1,6 @@
1
- import { useStore as u } from "@tanstack/vue-form";
2
- import { computed as f } from "vue";
3
- function c(o, t) {
4
- return f(() => t ? u(o.store, (n) => {
5
- const r = {};
6
- for (const e of t)
7
- r[e] = n[e];
8
- return r;
9
- }).value : {});
10
- }
1
+ (function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");if(i.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),document.head.appendChild(i),window.customElements){const e=window.customElements.define;window.customElements.define=function(s,t){const n=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(n&&n.call(this),this.shadowRoot){const a=document.createElement("style");a.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),this.shadowRoot.appendChild(a)}},e.call(window.customElements,s,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import o from "./vue-components.es38.js";
3
+
11
4
  export {
12
- c as getOmegaStore
5
+ o as default
13
6
  };
@@ -1,6 +1,6 @@
1
1
  import { DiagComponentLogger as m } from "./vue-components.es55.js";
2
2
  import { createLogLevelDiagLogger as y } from "./vue-components.es56.js";
3
- import { DiagLogLevel as d } from "./vue-components.es42.js";
3
+ import { DiagLogLevel as d } from "./vue-components.es41.js";
4
4
  import { unregisterGlobal as p, getGlobal as v, registerGlobal as w } from "./vue-components.es57.js";
5
5
  var b = function(i, n) {
6
6
  var r = typeof Symbol == "function" && i[Symbol.iterator];
@@ -1,4 +1,4 @@
1
- import { DiagLogLevel as r } from "./vue-components.es42.js";
1
+ import { DiagLogLevel as r } from "./vue-components.es41.js";
2
2
  function c(n, o) {
3
3
  n < r.NONE ? n = r.NONE : n > r.ALL && (n = r.ALL), o = o || {};
4
4
  function i(t, f) {
@@ -1,6 +1,6 @@
1
- import { createContextKey as o } from "./vue-components.es41.js";
2
- import { NonRecordingSpan as a } from "./vue-components.es50.js";
3
- import { ContextAPI as u } from "./vue-components.es51.js";
1
+ import { createContextKey as o } from "./vue-components.es40.js";
2
+ import { NonRecordingSpan as a } from "./vue-components.es49.js";
3
+ import { ContextAPI as u } from "./vue-components.es50.js";
4
4
  var n = o("OpenTelemetry Context Key SPAN");
5
5
  function r(e) {
6
6
  return e.getValue(n) || void 0;
@@ -1,4 +1,4 @@
1
- import { ROOT_CONTEXT as l } from "./vue-components.es41.js";
1
+ import { ROOT_CONTEXT as l } from "./vue-components.es40.js";
2
2
  var c = function(t, o) {
3
3
  var n = typeof Symbol == "function" && t[Symbol.iterator];
4
4
  if (!n) return t;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-app/vue-components",
3
- "version": "2.7.5",
3
+ "version": "2.7.6",
4
4
  "peerDependencies": {
5
5
  "@mdi/js": "^7.4.47",
6
6
  "effect": "^3.18.0",
@@ -321,7 +321,7 @@ const getNullableOrUndefined = (property: S.AST.AST) => {
321
321
  )
322
322
  }
323
323
 
324
- const isNullableOrUndefined = (property: false | S.AST.AST | undefined) => {
324
+ export const isNullableOrUndefined = (property: false | S.AST.AST | undefined) => {
325
325
  if (!property || !S.AST.isUnion(property)) return false
326
326
  if (property.types.find((_) => _._tag === "UndefinedKeyword")) {
327
327
  return "undefined"
@@ -11,7 +11,7 @@ import { MergedInputProps } from "./InputProps"
11
11
  import OmegaArray from "./OmegaArray.vue"
12
12
  import OmegaAutoGen from "./OmegaAutoGen.vue"
13
13
  import OmegaErrorsInternal from "./OmegaErrorsInternal.vue"
14
- import { BaseProps, DefaultTypeProps, FieldPath, type FormProps, generateMetaFromSchema, type MetaRecord, type NestedKeyOf, OmegaArrayProps, OmegaAutoGenMeta, OmegaError, type OmegaFormApi, OmegaFormState } from "./OmegaFormStuff"
14
+ import { BaseProps, DefaultTypeProps, FieldPath, type FormProps, generateMetaFromSchema, isNullableOrUndefined, type MetaRecord, type NestedKeyOf, OmegaArrayProps, OmegaAutoGenMeta, OmegaError, type OmegaFormApi, OmegaFormState } from "./OmegaFormStuff"
15
15
  import OmegaInput from "./OmegaInput.vue"
16
16
  import OmegaTaggedUnion from "./OmegaTaggedUnion.vue"
17
17
  import OmegaForm from "./OmegaWrapper.vue"
@@ -813,12 +813,22 @@ export const useOmegaForm = <
813
813
  if ((fieldSchema as any)?.ast?.defaultValue) {
814
814
  try {
815
815
  const defaultValue = (fieldSchema as any).ast.defaultValue()
816
- if (defaultValue !== undefined) {
817
- result[key] = defaultValue
818
- }
816
+ result[key] = defaultValue
819
817
  } catch {
820
818
  // Silently ignore if defaultValue() throws
821
819
  }
820
+ } else {
821
+ // TODO Should we put to null/undefined only leaves?
822
+ const ast = (fieldSchema as any).ast
823
+ const nullableOrUndefined = isNullableOrUndefined(ast)
824
+ switch (nullableOrUndefined) {
825
+ case "null":
826
+ result[key] = null
827
+ break
828
+ case "undefined":
829
+ result[key] = undefined
830
+ break
831
+ }
822
832
  }
823
833
 
824
834
  // Recursively check nested fields for structs and unions