@effect-app/vue-components 2.9.2 → 2.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/types/components/OmegaForm/OmegaFormStuff.d.ts +2 -0
  2. package/dist/types/components/OmegaForm/useOmegaForm.d.ts +13 -2
  3. package/dist/vue-components.es.js +17 -15
  4. package/dist/vue-components.es10.js +120 -115
  5. package/dist/vue-components.es12.js +282 -204
  6. package/dist/vue-components.es16.js +4 -10
  7. package/dist/vue-components.es17.js +10 -97
  8. package/dist/vue-components.es2.js +29 -27
  9. package/dist/vue-components.es20.js +2 -2
  10. package/dist/vue-components.es21.js +2 -2
  11. package/dist/vue-components.es22.js +1 -1
  12. package/dist/vue-components.es23.js +1 -1
  13. package/dist/vue-components.es31.js +2 -4
  14. package/dist/vue-components.es32.js +1 -1
  15. package/dist/vue-components.es33.js +111 -2
  16. package/dist/vue-components.es35.js +9 -0
  17. package/dist/vue-components.es36.js +32 -7
  18. package/dist/vue-components.es40.js +6 -0
  19. package/dist/vue-components.es41.js +23 -4
  20. package/dist/vue-components.es42.js +5 -23
  21. package/dist/vue-components.es43.js +21 -5
  22. package/dist/vue-components.es44.js +25 -16
  23. package/dist/vue-components.es45.js +15 -23
  24. package/dist/vue-components.es46.js +7 -17
  25. package/dist/vue-components.es47.js +5 -12
  26. package/dist/vue-components.es48.js +19 -5
  27. package/dist/vue-components.es49.js +9 -19
  28. package/dist/vue-components.es50.js +31 -9
  29. package/dist/vue-components.es51.js +42 -25
  30. package/dist/vue-components.es52.js +16 -38
  31. package/dist/vue-components.es53.js +11 -26
  32. package/dist/vue-components.es54.js +65 -11
  33. package/dist/vue-components.es55.js +45 -54
  34. package/dist/vue-components.es56.js +15 -54
  35. package/dist/vue-components.es57.js +31 -15
  36. package/dist/vue-components.es58.js +26 -30
  37. package/dist/vue-components.es59.js +42 -29
  38. package/dist/vue-components.es60.js +2 -42
  39. package/dist/vue-components.es61.js +44 -2
  40. package/dist/vue-components.es62.js +2 -44
  41. package/dist/vue-components.es7.js +1 -1
  42. package/dist/vue-components.es9.js +10 -33
  43. package/package.json +3 -3
  44. package/src/components/OmegaForm/OmegaFormStuff.ts +174 -11
  45. package/src/components/OmegaForm/OmegaTaggedUnionInternal.vue +0 -48
  46. package/src/components/OmegaForm/useOmegaForm.ts +49 -25
  47. package/dist/types/components/OmegaForm/defaultAST.d.ts +0 -4
  48. package/dist/vue-components.es34.js +0 -113
  49. package/dist/vue-components.es37.js +0 -34
  50. package/dist/vue-components.es63.js +0 -4
  51. package/src/components/OmegaForm/defaultAST.ts +0 -191
  52. /package/dist/{vue-components.es39.js → vue-components.es38.js} +0 -0
@@ -151,4 +151,6 @@ export type OmegaAutoGenMeta<From extends Record<PropertyKey, any>, To extends R
151
151
  declare const supportedInputs: readonly ["button", "checkbox", "color", "date", "email", "number", "password", "radio", "range", "search", "submit", "tel", "text", "time", "url"];
152
152
  export type SupportedInputs = typeof supportedInputs[number];
153
153
  export declare const getInputType: (input: string) => SupportedInputs;
154
+ export declare function deepMerge(target: any, source: any): any;
155
+ export declare const defaultsValueFromSchema: (schema: S.Schema<any>, record?: Record<string, any>) => any;
154
156
  export {};
@@ -1,5 +1,6 @@
1
1
  import { type DeepKeys, DeepValue, StandardSchemaV1Issue, ValidationError, ValidationErrorMap } from "@tanstack/vue-form";
2
2
  import { Effect, Order, S } from "effect-app";
3
+ import { UnionToTuples } from "effect-app/utils";
3
4
  import { ComputedRef, type InjectionKey } from "vue";
4
5
  import { MergedInputProps } from "./InputProps";
5
6
  import { BaseProps, DefaultTypeProps, FieldPath, type FormProps, type MetaRecord, type NestedKeyOf, OmegaArrayProps, OmegaAutoGenMeta, OmegaError, type OmegaFormApi, OmegaFormState } from "./OmegaFormStuff";
@@ -24,6 +25,8 @@ export declare class FormErrors<From> extends FormErrors_base<{
24
25
  }>;
25
26
  }> {
26
27
  }
28
+ export type Policies = "local" | "session" | "querystring";
29
+ export type defaultValuesPriorityUnion = "tanstack" | "persistency" | "schema";
27
30
  export type OmegaConfig<T> = {
28
31
  i18nNamespace?: string;
29
32
  persistency?: {
@@ -31,8 +34,8 @@ export type OmegaConfig<T> = {
31
34
  * - "querystring": Highest priority when persisting
32
35
  * - "local" and then "session": Lower priority storage options
33
36
  */
34
- policies?: ("local" | "session" | "querystring")[];
35
- overrideDefaultValues?: boolean;
37
+ policies?: UnionToTuples<Policies>;
38
+ overrideDefaultValues?: "deprecated: use defaultValuesPriority";
36
39
  id?: string;
37
40
  } & keysRule<T>;
38
41
  ignorePreventCloseEvents?: boolean;
@@ -46,6 +49,14 @@ export type OmegaConfig<T> = {
46
49
  */
47
50
  preventWindowExit?: "prevent" | "prevent-and-reset" | "nope";
48
51
  input?: any;
52
+ /**
53
+ * Default values order is: Tanstack default values passed as second parameter to useOmegaForm, then persistency
54
+ * default values from querystring or local/session storage, then defaults from schema
55
+ * You can customize the order and with omegaConfig.defaultValuesPriority
56
+ * default value = ['tanstack', 'persistency', 'schema']
57
+ */
58
+ defaultValuesPriority?: UnionToTuples<defaultValuesPriorityUnion>;
59
+ defaultFromSchema?: "deprecated: use defaultValuesPriority";
49
60
  };
50
61
  export interface OF<From, To> extends OmegaFormApi<From, To> {
51
62
  meta: MetaRecord<From>;
@@ -5,11 +5,11 @@ 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 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
- import { createUseFormWithCustomInput as W } from "./vue-components.es13.js";
8
+ import { default as b } from "./vue-components.es9.js";
9
+ import { useOmegaForm as M } from "./vue-components.es10.js";
10
+ import { useOnClose as U, usePreventClose as j } from "./vue-components.es11.js";
11
+ import { createMeta as P, deepMerge as V, defaultsValueFromSchema as k, duplicateSchema as w, generateInputStandardSchemaFromFieldMeta as B, generateMetaFromSchema as D, getInputType as K, isNullableOrUndefined as N, nullableInput as W } from "./vue-components.es12.js";
12
+ import { createUseFormWithCustomInput as q } from "./vue-components.es13.js";
13
13
  function r(a) {
14
14
  for (const e in o)
15
15
  if (Object.prototype.hasOwnProperty.call(o, e)) {
@@ -23,22 +23,24 @@ export {
23
23
  g as Dialog,
24
24
  I as OmegaInput,
25
25
  h as OmegaTaggedUnion,
26
- C as OmegaTaggedUnionInternal,
26
+ b as OmegaTaggedUnionInternal,
27
27
  y as OmegaVuetifyInput,
28
28
  P as createMeta,
29
- W as createUseFormWithCustomInput,
29
+ q as createUseFormWithCustomInput,
30
+ V as deepMerge,
30
31
  n as default,
31
- k as duplicateSchema,
32
- w as generateInputStandardSchemaFromFieldMeta,
33
- B as generateMetaFromSchema,
34
- D as getInputType,
32
+ k as defaultsValueFromSchema,
33
+ w as duplicateSchema,
34
+ B as generateInputStandardSchemaFromFieldMeta,
35
+ D as generateMetaFromSchema,
36
+ K as getInputType,
35
37
  f as getTransformationFrom,
36
- K as isNullableOrUndefined,
37
- N as nullableInput,
38
+ N as isNullableOrUndefined,
39
+ W as nullableInput,
38
40
  l as provideIntl,
39
41
  u as useIntl,
40
42
  s as useIntlKey,
41
- T as useOmegaForm,
42
- M as useOnClose,
43
+ M as useOmegaForm,
44
+ U as useOnClose,
43
45
  j as usePreventClose
44
46
  };
@@ -1,228 +1,233 @@
1
- import { useForm as q } from "@tanstack/vue-form";
2
- import { Data as B, S as D, Effect as c, Fiber as A, Option as P, Array as g } from "effect-app";
3
- import { runtimeFiberAsPromise as K } from "./vue-components.es16.js";
4
- import { computed as U, onUnmounted as N, onMounted as T, onBeforeUnmount as G, watch as W, ref as z, h as k } from "vue";
5
- import { deepMerge as O, extractSchemaDefaults as Q } from "./vue-components.es17.js";
1
+ import { useForm as B } from "@tanstack/vue-form";
2
+ import { Data as K, S as $, Effect as l, Fiber as x, Option as P, Array as F } from "effect-app";
3
+ import { runtimeFiberAsPromise as T } from "./vue-components.es17.js";
4
+ import { computed as U, onUnmounted as N, onMounted as G, onBeforeUnmount as z, watch as W, ref as Q, h as H } from "vue";
6
5
  import X from "./vue-components.es18.js";
7
6
  import Y from "./vue-components.es19.js";
8
7
  import Z from "./vue-components.es20.js";
9
- import { generateMetaFromSchema as C } from "./vue-components.es12.js";
10
- import ee from "./vue-components.es6.js";
11
- import re from "./vue-components.es8.js";
12
- import te from "./vue-components.es21.js";
8
+ import { generateMetaFromSchema as C, deepMerge as D, defaultsValueFromSchema as ee } from "./vue-components.es12.js";
9
+ import re from "./vue-components.es6.js";
10
+ import te from "./vue-components.es8.js";
11
+ import se from "./vue-components.es21.js";
13
12
  import { trace as R } from "./vue-components.es22.js";
14
13
  import { context as L } from "./vue-components.es23.js";
15
- class se extends B.TaggedError("FormErrors") {
14
+ class ne extends K.TaggedError("FormErrors") {
16
15
  }
17
- const E = (l) => function(n) {
16
+ const g = (a) => function(n) {
18
17
  return {
19
18
  render() {
20
- return k(n, {
21
- form: l,
19
+ return H(n, {
20
+ form: a,
22
21
  ...this.$attrs
23
22
  }, this.$slots);
24
23
  }
25
24
  };
26
- }, ne = (l) => function(n) {
25
+ }, oe = (a) => function(n) {
27
26
  return {
28
27
  setup() {
29
- const { fieldMap: w, form: v } = l, b = v.useStore((u) => u.errors), m = v.useStore((u) => u.fieldMeta), F = v.useStore((u) => u.errorMap), _ = U(() => {
30
- const u = g.filterMap(
28
+ const { fieldMap: b, form: h } = a, y = h.useStore((d) => d.errors), m = h.useStore((d) => d.fieldMeta), M = h.useStore((d) => d.errorMap), j = U(() => {
29
+ const d = F.filterMap(
31
30
  Object.entries(m.value),
32
- ([M, f]) => {
31
+ ([O, f]) => {
33
32
  const S = f.errors ?? [];
34
33
  if (!S.length) return P.none();
35
- const a = w.value.get(M);
36
- return a ? P.some({
37
- label: a.label,
38
- inputId: a.id,
34
+ const c = b.value.get(O);
35
+ return c ? P.some({
36
+ label: c.label,
37
+ inputId: c.id,
39
38
  // Only show the first error
40
39
  errors: [S[0]?.message].filter(Boolean)
41
40
  }) : P.none();
42
41
  }
43
42
  ), o = [];
44
- if (F.value.onSubmit) {
45
- for (const [M, f] of Object.entries(F.value.onSubmit))
46
- if (g.isArray(f) && f.length)
43
+ if (M.value.onSubmit) {
44
+ for (const [O, f] of Object.entries(M.value.onSubmit))
45
+ if (F.isArray(f) && f.length)
47
46
  for (const S of f) {
48
- const a = S;
49
- if (a?.path && g.isArray(a.path) && a.path.length) {
50
- const y = a.path.join(".");
51
- if (!w.value.has(y)) {
47
+ const c = S;
48
+ if (c?.path && F.isArray(c.path) && c.path.length) {
49
+ const E = c.path.join(".");
50
+ if (!b.value.has(E)) {
52
51
  o.push({
53
- label: y,
54
- inputId: y,
55
- errors: [a.message].filter(Boolean)
52
+ label: E,
53
+ inputId: E,
54
+ errors: [c.message].filter(Boolean)
56
55
  });
57
56
  break;
58
57
  }
59
58
  }
60
59
  }
61
60
  }
62
- return [...u, ...o];
61
+ return [...d, ...o];
63
62
  });
64
63
  return {
65
- generalErrors: b,
66
- errors: _
64
+ generalErrors: y,
65
+ errors: j
67
66
  };
68
67
  },
69
- render({ errors: w, generalErrors: v }) {
70
- return k(n, {
71
- errors: w,
72
- generalErrors: v,
68
+ render({ errors: b, generalErrors: h }) {
69
+ return H(n, {
70
+ errors: b,
71
+ generalErrors: h,
73
72
  ...this.$attrs
74
73
  }, this.$slots);
75
74
  }
76
75
  };
77
- }, be = (l, d, n) => {
78
- if (!l) throw new Error("Schema is required");
79
- const w = D.standardSchemaV1(l), v = D.decode(l), { meta: b } = C(l), m = U(() => {
76
+ }, v = (a, u) => a.includes(u), be = (a, u, n) => {
77
+ if (!a) throw new Error("Schema is required");
78
+ const b = $.standardSchemaV1(a), h = $.decode(a), { meta: y } = C(a), m = U(() => {
80
79
  if (n?.persistency?.id)
81
80
  return n.persistency.id;
82
- const e = window.location.pathname, r = Object.keys(b);
81
+ const e = window.location.pathname, r = Object.keys(y);
83
82
  return `${e}-${r.join("-")}`;
84
- }), F = () => {
83
+ }), M = () => {
85
84
  const e = new URLSearchParams(window.location.search);
86
85
  e.delete(m.value);
87
86
  const r = new URL(window.location.href);
88
87
  r.search = e.toString(), window.history.replaceState({}, "", r.toString());
89
- }, _ = U(() => {
88
+ }, j = U(() => {
90
89
  let e;
91
90
  const r = n?.persistency;
92
91
  if (
93
92
  // query string has higher priority than local/session storage
94
- r?.policies && !e && (r.policies.includes("local") || r.policies.includes("session"))
93
+ r?.policies && !e && (v(r.policies, "local") || v(r.policies, "session"))
95
94
  ) {
96
- const s = r.policies.includes("local") ? localStorage : sessionStorage;
95
+ const s = v(r.policies, "local") ? localStorage : sessionStorage;
97
96
  if (s)
98
97
  try {
99
- const i = JSON.parse(
98
+ const t = JSON.parse(
100
99
  s.getItem(m.value) || "{}"
101
100
  );
102
- s.removeItem(m.value), e = i;
103
- } catch (i) {
104
- console.error(i);
101
+ s.removeItem(m.value), e = t;
102
+ } catch (t) {
103
+ console.error(t);
105
104
  }
106
105
  }
107
- if (r?.policies && r.policies.includes("querystring"))
106
+ if (r?.policies && v(r.policies, "querystring"))
108
107
  try {
109
- const i = new URLSearchParams(window.location.search).get(m.value);
110
- F(), i && (e = O(e || {}, JSON.parse(i)));
108
+ const t = new URLSearchParams(window.location.search).get(m.value);
109
+ M(), t && (e = D(e || {}, JSON.parse(t)));
111
110
  } catch (s) {
112
111
  console.error(s);
113
112
  }
114
- return e ??= {}, Q(
115
- l,
116
- n?.persistency?.overrideDefaultValues ? O(d?.defaultValues || {}, e) : O(e, d?.defaultValues || {})
113
+ e ??= {};
114
+ const i = {
115
+ tanstack: u?.defaultValues || {},
116
+ persistency: e,
117
+ schema: ee(a)
118
+ };
119
+ return (n?.defaultValuesPriority || ["tanstack", "persistency", "schema"]).reverse().reduce(
120
+ (s, t) => Object.keys(s).length ? D(s, i[t]) : i[t],
121
+ {}
117
122
  );
118
- }), u = (e, r) => e ? L.with(R.setSpan(L.active(), e), r) : r(), o = q({
119
- ...d,
123
+ }), d = (e, r) => e ? L.with(R.setSpan(L.active(), e), r) : r(), o = B({
124
+ ...u,
120
125
  validators: {
121
- onSubmit: w,
122
- ...d?.validators || {}
126
+ onSubmit: b,
127
+ ...u?.validators || {}
123
128
  },
124
- onSubmit: d?.onSubmit ? ({ formApi: e, meta: r, value: s }) => u(r?.currentSpan, async () => {
125
- const i = await c.runPromise(v(s)), t = d.onSubmit({
129
+ onSubmit: u?.onSubmit ? ({ formApi: e, meta: r, value: i }) => d(r?.currentSpan, async () => {
130
+ const s = await l.runPromise(h(i)), t = u.onSubmit({
126
131
  formApi: e,
127
132
  meta: r,
128
- value: i
133
+ value: s
129
134
  });
130
- return A.isFiber(t) && A.isRuntimeFiber(t) ? await K(t) : c.isEffect(t) ? await c.runPromise(
135
+ return x.isFiber(t) && x.isRuntimeFiber(t) ? await T(t) : l.isEffect(t) ? await l.runPromise(
131
136
  t.pipe(
132
137
  // meta?.currentSpan
133
138
  // ? Effect.withParentSpan(meta.currentSpan)
134
139
  // : (_) => _,
135
- c.flatMap((p) => A.join(p))
140
+ l.flatMap((p) => x.join(p))
136
141
  )
137
142
  ) : t;
138
143
  }) : void 0,
139
- defaultValues: _.value
140
- }), M = () => {
141
- Object.keys(b).forEach((e) => {
144
+ defaultValues: j.value
145
+ }), O = () => {
146
+ Object.keys(y).forEach((e) => {
142
147
  o.setFieldValue(e, void 0);
143
148
  });
144
- }, f = (e) => e.reduce((r, s) => {
145
- const i = s.split(".");
146
- return i.reduce((t, p, x) => (x === i.length - 1 ? t[p] = o.getFieldValue(s) : t[p] = t[p] ?? {}, t[p]), r), r;
149
+ }, f = (e) => e.reduce((r, i) => {
150
+ const s = i.split(".");
151
+ return s.reduce((t, p, A) => (A === s.length - 1 ? t[p] = o.getFieldValue(i) : t[p] = t[p] ?? {}, t[p]), r), r;
147
152
  }, {}), S = (e) => {
148
153
  if (e) {
149
- if (g.isArray(e.keys))
154
+ if (F.isArray(e.keys))
150
155
  return f(e.keys);
151
- if (g.isArray(e.banKeys)) {
152
- const r = Object.keys(b).filter((s) => e.banKeys?.includes(s));
156
+ if (F.isArray(e.banKeys)) {
157
+ const r = Object.keys(y).filter((i) => e.banKeys?.includes(i));
153
158
  return f(r);
154
159
  }
155
160
  return o.store.state.values;
156
161
  }
157
- }, a = () => {
162
+ }, c = () => {
158
163
  const e = n?.persistency;
159
- if (!(!e?.policies || e.policies.length === 0) && (e.policies.includes("local") || e.policies.includes("session"))) {
160
- const r = e.policies.includes("local") ? localStorage : sessionStorage;
164
+ if (!(!e?.policies || e.policies.length === 0) && (v(e.policies, "local") || v(e.policies, "session"))) {
165
+ const r = v(e.policies, "local") ? localStorage : sessionStorage;
161
166
  if (!r) return;
162
- const s = S(e);
163
- return r.setItem(m.value, JSON.stringify(s));
167
+ const i = S(e);
168
+ return r.setItem(m.value, JSON.stringify(i));
164
169
  }
165
- }, y = () => {
170
+ }, E = () => {
166
171
  const e = n?.persistency;
167
- if (!(!e?.policies || e.policies.length === 0) && e.policies.includes("querystring")) {
168
- const r = S(e), s = new URLSearchParams(window.location.search);
169
- s.set(m.value, JSON.stringify(r));
170
- const i = new URL(window.location.href);
171
- i.search = s.toString(), window.history.replaceState({}, "", i.toString());
172
+ if (!(!e?.policies || e.policies.length === 0) && v(e.policies, "querystring")) {
173
+ const r = S(e), i = new URLSearchParams(window.location.search);
174
+ i.set(m.value, JSON.stringify(r));
175
+ const s = new URL(window.location.href);
176
+ s.search = i.toString(), window.history.replaceState({}, "", s.toString());
172
177
  }
173
178
  }, V = (e) => {
174
179
  o.store.state.isDirty && e.preventDefault();
175
180
  };
176
- if (N(a), T(() => {
177
- window.addEventListener("beforeunload", a), window.addEventListener("blur", y), n?.preventWindowExit && n.preventWindowExit !== "nope" && window.addEventListener("beforeunload", V);
178
- }), G(() => {
179
- window.removeEventListener("beforeunload", a), window.removeEventListener("blur", y), n?.preventWindowExit && n.preventWindowExit !== "nope" && window.removeEventListener("beforeunload", V);
181
+ if (N(c), G(() => {
182
+ window.addEventListener("beforeunload", c), window.addEventListener("blur", E), n?.preventWindowExit && n.preventWindowExit !== "nope" && window.addEventListener("beforeunload", V);
183
+ }), z(() => {
184
+ window.removeEventListener("beforeunload", c), window.removeEventListener("blur", E), n?.preventWindowExit && n.preventWindowExit !== "nope" && window.removeEventListener("beforeunload", V);
180
185
  }), n?.preventWindowExit === "prevent-and-reset") {
181
- const e = o.useStore((t) => t.isSubmitting), r = o.useStore((t) => t.submissionAttempts), s = o.useStore((t) => t.canSubmit), i = o.useStore((t) => t.values);
182
- W([e, r], ([t, p], [x]) => {
183
- x && !t && p > 0 && s.value && o.reset(i.value);
186
+ const e = o.useStore((t) => t.isSubmitting), r = o.useStore((t) => t.submissionAttempts), i = o.useStore((t) => t.canSubmit), s = o.useStore((t) => t.values);
187
+ W([e, r], ([t, p], [A]) => {
188
+ A && !t && p > 0 && i.value && o.reset(s.value);
184
189
  });
185
190
  }
186
- const I = (e) => c.currentSpan.pipe(
187
- c.option,
188
- c.flatMap(
189
- (r) => c.promise(() => o.handleSubmit(P.isSome(r) ? { currentSpan: r.value, ...e } : e))
191
+ const k = (e) => l.currentSpan.pipe(
192
+ l.option,
193
+ l.flatMap(
194
+ (r) => l.promise(() => o.handleSubmit(P.isSome(r) ? { currentSpan: r.value, ...e } : e))
190
195
  )
191
- ), H = (e) => e?.checkErrors ? I(e?.meta).pipe(c.flatMap(c.fnUntraced(function* () {
196
+ ), J = (e) => e?.checkErrors ? k(e?.meta).pipe(l.flatMap(l.fnUntraced(function* () {
192
197
  const r = o.getAllErrors();
193
198
  if (Object.keys(r.fields).length || r.form.errors.length)
194
- return yield* new se({ form: r.form, fields: r.fields });
195
- }))) : I(e?.meta), J = o.handleSubmit, j = z(/* @__PURE__ */ new Map()), h = Object.assign(o, {
199
+ return yield* new ne({ form: r.form, fields: r.fields });
200
+ }))) : k(e?.meta), q = o.handleSubmit, _ = Q(/* @__PURE__ */ new Map()), w = Object.assign(o, {
196
201
  i18nNamespace: n?.i18nNamespace,
197
202
  ignorePreventCloseEvents: n?.ignorePreventCloseEvents,
198
- meta: b,
199
- clear: M,
203
+ meta: y,
204
+ clear: O,
200
205
  handleSubmit: (e) => {
201
206
  const r = R.getSpan(L.active());
202
- return J({ currentSpan: r, ...e });
207
+ return q({ currentSpan: r, ...e });
203
208
  },
204
209
  // /** @experimental */
205
- handleSubmitEffect: H,
210
+ handleSubmitEffect: J,
206
211
  registerField: (e) => {
207
- W(e, (r) => j.value.set(r.name, { label: r.label, id: r.id }), { immediate: !0 }), N(() => j.value.delete(e.value.name));
212
+ W(e, (r) => _.value.set(r.name, { label: r.label, id: r.id }), { immediate: !0 }), N(() => _.value.delete(e.value.name));
208
213
  }
209
- }), $ = { form: h, fieldMap: j };
210
- return Object.assign(h, {
214
+ }), I = { form: w, fieldMap: _ };
215
+ return Object.assign(w, {
211
216
  // Type-level properties for performance optimization (not used at runtime)
212
217
  _paths: void 0,
213
218
  _keys: void 0,
214
- _schema: l,
215
- errorContext: $,
216
- Form: E(h)(te),
217
- Input: E(h)(n?.input ?? ee),
218
- TaggedUnion: E(h)(re),
219
+ _schema: a,
220
+ errorContext: I,
221
+ Form: g(w)(se),
222
+ Input: g(w)(n?.input ?? re),
223
+ TaggedUnion: g(w)(te),
219
224
  Field: o.Field,
220
- Errors: ne($)(Z),
221
- Array: E(h)(X),
222
- AutoGen: E(h)(Y)
225
+ Errors: oe(I)(Z),
226
+ Array: g(w)(X),
227
+ AutoGen: g(w)(Y)
223
228
  });
224
229
  };
225
230
  export {
226
- se as FormErrors,
231
+ ne as FormErrors,
227
232
  be as useOmegaForm
228
233
  };