@effect-app/vue-components 1.8.3 → 1.8.5

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 (68) hide show
  1. package/dist/types/components/OmegaForm/InputProps.d.ts +0 -1
  2. package/dist/types/components/OmegaForm/OmegaErrorsInternal.vue.d.ts +0 -1
  3. package/dist/types/components/OmegaForm/OmegaInput.vue.d.ts +0 -1
  4. package/dist/types/components/OmegaForm/OmegaInternalInput.vue.d.ts +6 -1
  5. package/dist/types/components/OmegaForm/index.d.ts +0 -1
  6. package/dist/types/components/OmegaForm/useOmegaForm.d.ts +6 -1
  7. package/dist/types/components/OmegaForm/useRegisterField.d.ts +7 -0
  8. package/dist/vue-components.es.js +24 -26
  9. package/dist/vue-components.es10.js +23 -352
  10. package/dist/vue-components.es11.js +2 -27
  11. package/dist/vue-components.es12.js +11 -2
  12. package/dist/vue-components.es13.js +1 -1
  13. package/dist/vue-components.es14.js +1 -1
  14. package/dist/vue-components.es17.js +5 -5
  15. package/dist/vue-components.es18.js +2 -2
  16. package/dist/vue-components.es19.js +1 -1
  17. package/dist/vue-components.es2.js +19 -21
  18. package/dist/vue-components.es20.js +1 -1
  19. package/dist/vue-components.es24.js +135 -11
  20. package/dist/vue-components.es26.js +44 -0
  21. package/dist/vue-components.es27.js +2 -42
  22. package/dist/vue-components.es28.js +1 -1
  23. package/dist/vue-components.es29.js +89 -2
  24. package/dist/vue-components.es31.js +9 -0
  25. package/dist/vue-components.es32.js +31 -7
  26. package/dist/vue-components.es34.js +6 -0
  27. package/dist/vue-components.es35.js +23 -4
  28. package/dist/vue-components.es36.js +5 -23
  29. package/dist/vue-components.es37.js +21 -5
  30. package/dist/vue-components.es38.js +25 -16
  31. package/dist/vue-components.es39.js +15 -23
  32. package/dist/vue-components.es4.js +2 -2
  33. package/dist/vue-components.es40.js +7 -17
  34. package/dist/vue-components.es41.js +5 -12
  35. package/dist/vue-components.es42.js +19 -5
  36. package/dist/vue-components.es43.js +9 -19
  37. package/dist/vue-components.es44.js +31 -9
  38. package/dist/vue-components.es45.js +42 -25
  39. package/dist/vue-components.es46.js +16 -38
  40. package/dist/vue-components.es47.js +11 -26
  41. package/dist/vue-components.es48.js +65 -11
  42. package/dist/vue-components.es49.js +45 -54
  43. package/dist/vue-components.es5.js +10 -9
  44. package/dist/vue-components.es50.js +15 -54
  45. package/dist/vue-components.es51.js +31 -15
  46. package/dist/vue-components.es52.js +26 -30
  47. package/dist/vue-components.es53.js +42 -29
  48. package/dist/vue-components.es54.js +2 -42
  49. package/dist/vue-components.es55.js +44 -2
  50. package/dist/vue-components.es56.js +2 -44
  51. package/dist/vue-components.es6.js +31 -53
  52. package/dist/vue-components.es7.js +219 -27
  53. package/dist/vue-components.es8.js +28 -211
  54. package/dist/vue-components.es9.js +355 -29
  55. package/package.json +1 -1
  56. package/src/components/OmegaForm/InputProps.ts +0 -1
  57. package/src/components/OmegaForm/OmegaErrorsInternal.vue +1 -2
  58. package/src/components/OmegaForm/OmegaInput.vue +1 -0
  59. package/src/components/OmegaForm/OmegaInternalInput.vue +14 -59
  60. package/src/components/OmegaForm/index.ts +0 -1
  61. package/src/components/OmegaForm/useOmegaForm.ts +42 -13
  62. package/src/components/OmegaForm/useRegisterField.ts +15 -0
  63. package/dist/types/components/OmegaForm/OmegaErrorsContext.d.ts +0 -38
  64. package/dist/vue-components.es25.js +0 -137
  65. package/dist/vue-components.es30.js +0 -92
  66. package/dist/vue-components.es33.js +0 -33
  67. package/dist/vue-components.es57.js +0 -4
  68. package/src/components/OmegaForm/OmegaErrorsContext.ts +0 -67
@@ -10,7 +10,6 @@ export type InputProps<From extends Record<PropertyKey, any>, TName extends Deep
10
10
  min?: number | false;
11
11
  errorMessages: string[];
12
12
  error: boolean;
13
- setRealDirty: () => void;
14
13
  label: string;
15
14
  type: string;
16
15
  };
@@ -3,7 +3,6 @@ import { type OmegaError } from "./OmegaFormStuff";
3
3
  type __VLS_Props = {
4
4
  errors: readonly OmegaError[];
5
5
  generalErrors: (Record<string, StandardSchemaV1Issue[]> | undefined)[] | undefined;
6
- showErrors: boolean;
7
6
  };
8
7
  declare var __VLS_6: {
9
8
  errors: readonly OmegaError[];
@@ -14,7 +14,6 @@ declare const __VLS_export: <From extends Record<PropertyKey, any>, To extends R
14
14
  min?: number | false;
15
15
  errorMessages: string[];
16
16
  error: boolean;
17
- setRealDirty: () => void;
18
17
  label: string;
19
18
  type: string;
20
19
  }) => any;
@@ -1,4 +1,5 @@
1
1
  import { type DeepKeys } from "@tanstack/vue-form";
2
+ import { type ComputedRef } from "vue";
2
3
  import type { OmegaFieldInternalApi } from "./InputProps";
3
4
  import type { FieldValidators, MetaRecord, NestedKeyOf, TypeOverride } from "./OmegaFormStuff";
4
5
  declare const __VLS_export: <From extends Record<PropertyKey, any>, Name extends DeepKeys<From>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
@@ -8,6 +9,11 @@ declare const __VLS_export: <From extends Record<PropertyKey, any>, Name extends
8
9
  label: string;
9
10
  type?: TypeOverride;
10
11
  validators?: FieldValidators<From>;
12
+ register: (field: ComputedRef<{
13
+ name: string;
14
+ label: string;
15
+ id: string;
16
+ }>) => void;
11
17
  options?: {
12
18
  title: string;
13
19
  value: string;
@@ -26,7 +32,6 @@ declare const __VLS_export: <From extends Record<PropertyKey, any>, Name extends
26
32
  min?: number | false;
27
33
  errorMessages: string[];
28
34
  error: boolean;
29
- setRealDirty: () => void;
30
35
  label: string;
31
36
  type: string;
32
37
  }) => any;
@@ -1,4 +1,3 @@
1
- export * as OmegaErrorsContext from "./OmegaErrorsContext";
2
1
  export * from "./OmegaFormStuff";
3
2
  export { type OmegaConfig, type OmegaFormReturn, useOmegaForm } from "./useOmegaForm";
4
3
  export { type InputProps, type MergedInputProps } from "./InputProps";
@@ -1,6 +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 { type InjectionKey } from "vue";
3
+ import { ComputedRef, type InjectionKey } from "vue";
4
4
  import { MergedInputProps } from "./InputProps";
5
5
  import { BaseProps, DefaultTypeProps, type FilterItems, type FormProps, type MetaRecord, type NestedKeyOf, OmegaAutoGenMeta, OmegaError, type OmegaFormApi, OmegaFormState, OmegaInputProps, ShowErrorsOn } from "./OmegaFormStuff";
6
6
  type keysRule<T> = {
@@ -44,6 +44,11 @@ export interface OF<From, To> extends OmegaFormApi<From, To> {
44
44
  filterItems?: FilterItems;
45
45
  clear: () => void;
46
46
  i18nNamespace?: string;
47
+ registerField: (field: ComputedRef<{
48
+ name: string;
49
+ label: string;
50
+ id: string;
51
+ }>) => void;
47
52
  /** @experimental */
48
53
  handleSubmitEffect: {
49
54
  /**
@@ -0,0 +1,7 @@
1
+ import { type ComputedRef } from "vue";
2
+ export declare const useRegisterField: (field: ComputedRef<{
3
+ name: string;
4
+ label: string;
5
+ id: string;
6
+ }>) => void;
7
+ export declare const provideRegisterField: () => void;
@@ -1,13 +1,12 @@
1
1
  import * as o from "./vue-components.es2.js";
2
- import { getTransformationFrom as f, provideIntl as u, useIntl as l, useIntlKey as i } from "./vue-components.es3.js";
3
- import { default as x } from "./vue-components.es4.js";
4
- import { default as g } from "./vue-components.es5.js";
5
- import { default as y } from "./vue-components.es6.js";
6
- import * as n from "./vue-components.es7.js";
7
- import { useOmegaForm as F } from "./vue-components.es8.js";
8
- import { useOnClose as C, usePreventClose as S } from "./vue-components.es9.js";
9
- import { createMeta as M, duplicateSchema as j, generateInputStandardSchemaFromFieldMeta as v, generateMetaFromSchema as P, getInputType as T, nullableInput as k } from "./vue-components.es10.js";
10
- import { createUseFormWithCustomInput as D } from "./vue-components.es11.js";
2
+ import { getTransformationFrom as f, provideIntl as s, useIntl as u, useIntlKey as l } from "./vue-components.es3.js";
3
+ import { default as i } from "./vue-components.es4.js";
4
+ import { default as x } from "./vue-components.es5.js";
5
+ import { default as g } from "./vue-components.es6.js";
6
+ import { useOmegaForm as F } from "./vue-components.es7.js";
7
+ import { useOnClose as h, usePreventClose as S } from "./vue-components.es8.js";
8
+ import { createMeta as C, duplicateSchema as M, generateInputStandardSchemaFromFieldMeta as j, generateMetaFromSchema as v, getInputType as P, nullableInput as T } from "./vue-components.es9.js";
9
+ import { createUseFormWithCustomInput as w } from "./vue-components.es10.js";
11
10
  function a(r) {
12
11
  for (const e in o)
13
12
  if (Object.prototype.hasOwnProperty.call(o, e)) {
@@ -15,25 +14,24 @@ function a(r) {
15
14
  t && typeof t == "object" && r.component(e, t);
16
15
  }
17
16
  }
18
- const m = { install: a };
17
+ const n = { install: a };
19
18
  export {
20
- x as Dialog,
21
- n as OmegaErrorsContext,
22
- g as OmegaInput,
23
- y as OmegaVuetifyInput,
24
- M as createMeta,
25
- D as createUseFormWithCustomInput,
26
- m as default,
27
- j as duplicateSchema,
28
- v as generateInputStandardSchemaFromFieldMeta,
29
- P as generateMetaFromSchema,
30
- T as getInputType,
19
+ i as Dialog,
20
+ x as OmegaInput,
21
+ g as OmegaVuetifyInput,
22
+ C as createMeta,
23
+ w as createUseFormWithCustomInput,
24
+ n as default,
25
+ M as duplicateSchema,
26
+ j as generateInputStandardSchemaFromFieldMeta,
27
+ v as generateMetaFromSchema,
28
+ P as getInputType,
31
29
  f as getTransformationFrom,
32
- k as nullableInput,
33
- u as provideIntl,
34
- l as useIntl,
35
- i as useIntlKey,
30
+ T as nullableInput,
31
+ s as provideIntl,
32
+ u as useIntl,
33
+ l as useIntlKey,
36
34
  F as useOmegaForm,
37
- C as useOnClose,
35
+ h as useOnClose,
38
36
  S as usePreventClose
39
37
  };
@@ -1,358 +1,29 @@
1
- import { S as n, Option as c, pipe as q } from "effect-app";
2
- import { getMetadataFromSchema as U } from "@effect-app/vue/form";
3
- import { useIntl as _, getTransformationFrom as N } from "./vue-components.es3.js";
4
- const w = n.NonEmptyArray(n.String), E = (e) => n.AST.isUnion(e) && e.types.find((i) => i._tag === "UndefinedKeyword" || i === n.Null.ast), g = (e) => !e || !n.AST.isUnion(e) ? !1 : e.types.find((i) => i._tag === "UndefinedKeyword") ? "undefined" : e.types.find((i) => i === n.Null.ast) ? "null" : !1, m = ({ meta: e = {}, parent: i = "", property: t, propertySignatures: p }, o = {}) => {
5
- if (t && t._tag === "Transformation")
6
- return m({
7
- parent: i,
8
- meta: e,
9
- property: t.from
10
- });
11
- if (t?._tag === "TypeLiteral" && "propertySignatures" in t)
12
- return m({
13
- meta: e,
14
- propertySignatures: t.propertySignatures
15
- });
16
- if (p) {
17
- for (const r of p) {
18
- const l = i ? `${i}.${r.name.toString()}` : r.name.toString(), a = g(r.type), u = !a, A = r.type;
19
- if (n.AST.isUnion(r.type)) {
20
- const T = r.type.types.filter(
21
- (s) => s._tag !== "UndefinedKeyword" && s !== n.Null.ast
22
- ).map(N);
23
- if (T.some(
24
- (s) => "propertySignatures" in s
25
- )) {
26
- if (!a) {
27
- const s = m({
28
- parent: l,
29
- property: r.type,
30
- meta: { required: u, nullableOrUndefined: a }
31
- });
32
- o[l] = s;
33
- }
34
- for (const s of T)
35
- "propertySignatures" in s && Object.assign(
36
- o,
37
- m({
38
- parent: l,
39
- propertySignatures: s.propertySignatures,
40
- meta: { required: u, nullableOrUndefined: a }
41
- })
42
- );
43
- } else {
44
- const s = T.filter(n.AST.isTupleType);
45
- if (s.length > 0) {
46
- const f = s[0];
47
- if (o[l] = {
48
- type: "multiple",
49
- members: f.elements,
50
- rest: f.rest,
51
- required: u,
52
- nullableOrUndefined: a
53
- }, f.rest && f.rest.length > 0) {
54
- const d = f.rest[0];
55
- if (d.type._tag === "TypeLiteral" && "propertySignatures" in d.type)
56
- for (const y of d.type.propertySignatures) {
57
- const b = `${l}.${y.name.toString()}`, S = m({
58
- parent: b,
59
- property: y.type,
60
- meta: {
61
- required: !g(y.type),
62
- nullableOrUndefined: g(y.type)
63
- }
64
- });
65
- if (S && typeof S == "object" && "type" in S && (o[b] = S, S.type === "multiple" && n.AST.isTupleType(y.type) && y.type.rest && y.type.rest.length > 0)) {
66
- const O = y.type.rest[0];
67
- if (O.type._tag === "TypeLiteral" && "propertySignatures" in O.type)
68
- for (const x of O.type.propertySignatures) {
69
- const M = `${b}.${x.name.toString()}`, v = m({
70
- parent: M,
71
- property: x.type,
72
- meta: {
73
- required: !g(x.type),
74
- nullableOrUndefined: g(x.type)
75
- }
76
- });
77
- v && typeof v == "object" && "type" in v && (o[M] = v);
78
- }
79
- }
80
- }
81
- }
82
- } else {
83
- const f = m({
84
- parent: l,
85
- property: r.type,
86
- meta: { required: u, nullableOrUndefined: a }
87
- });
88
- o[l] = f;
89
- }
1
+ import { h as t } from "vue";
2
+ import i from "./vue-components.es5.js";
3
+ import { useOmegaForm as f } from "./vue-components.es7.js";
4
+ const g = (r) => (...e) => {
5
+ const [o, n, m] = e;
6
+ return f(
7
+ o,
8
+ n,
9
+ {
10
+ ...m,
11
+ input: {
12
+ name: "WrappedInput",
13
+ inheritAttrs: !1,
14
+ setup(p, { attrs: s }) {
15
+ return () => t(i, {
16
+ ...p,
17
+ ...s
18
+ }, {
19
+ // Override the default slot that OmegaInternalInput provides
20
+ default: ({ field: a, ...u }) => t(r, { field: a, inputProps: u })
21
+ });
90
22
  }
91
- } else if ("propertySignatures" in A)
92
- Object.assign(
93
- o,
94
- m({
95
- parent: l,
96
- propertySignatures: A.propertySignatures,
97
- meta: { required: u, nullableOrUndefined: a }
98
- })
99
- );
100
- else if (n.AST.isTupleType(r.type))
101
- if (r.type.rest.length > 0 && r.type.rest[0].type._tag === "TypeLiteral" && "propertySignatures" in r.type.rest[0].type) {
102
- const h = r.type.rest[0].type;
103
- if (h._tag === "TypeLiteral" && "propertySignatures" in h)
104
- for (const s of h.propertySignatures) {
105
- const f = `${l}.${s.name.toString()}`;
106
- if (n.AST.isTupleType(s.type) && s.type.rest.length > 0) {
107
- const d = s.type.rest[0].type;
108
- if (d._tag === "TypeLiteral" && "propertySignatures" in d)
109
- for (const y of d.propertySignatures) {
110
- const b = `${f}.${y.name.toString()}`, S = m({
111
- parent: b,
112
- property: y.type,
113
- meta: {
114
- required: !g(y.type),
115
- nullableOrUndefined: g(y.type)
116
- }
117
- });
118
- o[b] = S;
119
- }
120
- else
121
- o[f] = {
122
- type: "multiple",
123
- members: s.type.elements,
124
- rest: s.type.rest,
125
- required: !g(s.type),
126
- nullableOrUndefined: g(s.type)
127
- };
128
- } else {
129
- const d = m({
130
- parent: f,
131
- property: s.type,
132
- meta: {
133
- required: !g(s.type),
134
- nullableOrUndefined: g(s.type)
135
- }
136
- });
137
- o[f] = d;
138
- }
139
- }
140
- } else
141
- o[l] = {
142
- type: "multiple",
143
- members: r.type.elements,
144
- rest: r.type.rest,
145
- required: u,
146
- nullableOrUndefined: a
147
- };
148
- else {
149
- const T = m({
150
- parent: l,
151
- property: r.type,
152
- meta: {
153
- // an empty string is valid for a S.String field, so we should not mark it as required
154
- // TODO: handle this better via the createMeta minLength parsing
155
- required: u && (r.type._tag !== "StringKeyword" || U(r.type).minLength),
156
- nullableOrUndefined: a
157
- }
158
- });
159
- o[l] = T;
160
23
  }
161
24
  }
162
- return o;
163
- }
164
- if (t) {
165
- const r = E(t);
166
- if (Object.hasOwnProperty.call(e, "required") || (e.required = !r), n.AST.isUnion(t)) {
167
- const a = t.types.find(
168
- (u) => u._tag !== "UndefinedKeyword" && u !== n.Null.ast
169
- );
170
- return "propertySignatures" in a ? m({
171
- propertySignatures: a.propertySignatures,
172
- parent: i,
173
- meta: e
174
- }) : t.types.every(n.AST.isLiteral) ? {
175
- ...e,
176
- type: "select",
177
- members: t.types.map((u) => u.literal)
178
- } : {
179
- ...e,
180
- ...m({
181
- parent: i,
182
- meta: e,
183
- property: a
184
- })
185
- };
186
- }
187
- if (n.AST.isTupleType(t))
188
- return {
189
- ...e,
190
- type: "multiple",
191
- members: t.elements,
192
- rest: t.rest
193
- };
194
- const l = n.AST.getAnnotation(
195
- t,
196
- n.AST.JSONSchemaAnnotationId
197
- ).pipe(c.getOrElse(() => ({})));
198
- return e = { ...e, ...l }, "from" in t ? m({
199
- parent: i,
200
- meta: e,
201
- property: t.from
202
- }) : (e.type = n.AST.getAnnotation(
203
- t,
204
- n.AST.TitleAnnotationId
205
- ).pipe(
206
- c.getOrElse(() => "unknown")
207
- ), e);
208
- }
209
- return o;
210
- }, L = (e) => {
211
- const i = e.ast, t = {};
212
- if (i._tag === "Transformation" || i._tag === "Refinement")
213
- return L(n.make(i.from));
214
- if ("propertySignatures" in i) {
215
- const p = m({
216
- propertySignatures: i.propertySignatures
217
- });
218
- if (Object.values(p).every((r) => r && "type" in r))
219
- return p;
220
- const o = (r, l = "") => {
221
- for (const a in r) {
222
- const u = l ? `${l}.${a}` : a;
223
- r[a] && typeof r[a] == "object" && "type" in r[a] ? t[u] = r[a] : r[a] && typeof r[a] == "object" && o(r[a], u);
224
- }
225
- };
226
- o(p);
227
- }
228
- return t;
229
- }, P = (e) => n.extend(e, n.Struct({})), F = (e) => {
230
- const i = L(e), t = q(
231
- e.ast,
232
- c.liftPredicate((p) => p._tag === "Refinement" && "filter" in p),
233
- c.flatMap((p) => n.AST.getJSONSchemaAnnotation(p)),
234
- c.filter((p) => "items" in p),
235
- c.filterMap(({ items: p }) => n.decodeUnknownOption(w)(p)),
236
- c.zipWith(
237
- n.AST.getMessageAnnotation(e.ast),
238
- (p, o) => ({
239
- items: p,
240
- message: o("")
241
- })
242
- ),
243
- c.getOrUndefined
244
25
  );
245
- return { schema: e, meta: i, filterItems: t };
246
- }, j = (e) => {
247
- const { trans: i } = _();
248
- let t;
249
- switch (e.type) {
250
- case "string":
251
- t = n.String.annotations({
252
- message: () => i("validation.empty")
253
- }), e.format === "email" && (t = n.compose(
254
- t,
255
- n.Email.annotations({
256
- message: () => i("validation.email.invalid")
257
- })
258
- )), e.required && t.annotations({
259
- message: () => i("validation.empty")
260
- }), e.maxLength && (t = t.pipe(n.maxLength(e.maxLength)).annotations({
261
- message: () => i("validation.string.maxLength", {
262
- maxLength: e.maxLength
263
- })
264
- })), e.minLength && (t = t.pipe(n.minLength(e.minLength)).annotations({
265
- message: () => i("validation.string.minLength", {
266
- minLength: e.minLength
267
- })
268
- }));
269
- break;
270
- case "number":
271
- t = n.Number.annotations({
272
- message: () => i("validation.empty")
273
- }), e.required && t.annotations({
274
- message: () => i("validation.empty")
275
- }), e.minimum && (t = t.pipe(n.greaterThanOrEqualTo(e.minimum)).annotations({
276
- message: () => i("validation.number.min", {
277
- minimum: e.minimum,
278
- isExclusive: !0
279
- })
280
- })), e.maximum && (t = t.pipe(n.lessThanOrEqualTo(e.maximum)).annotations({
281
- message: () => i("validation.number.max", {
282
- maximum: e.maximum,
283
- isExclusive: !0
284
- })
285
- })), e.exclusiveMinimum && (t = t.pipe(n.greaterThan(e.exclusiveMinimum)).annotations({
286
- message: () => i("validation.number.min", {
287
- minimum: e.exclusiveMinimum,
288
- isExclusive: !1
289
- })
290
- })), e.exclusiveMaximum && (t = t.pipe(n.lessThan(e.exclusiveMaximum)).annotations({
291
- message: () => i("validation.number.max", {
292
- maximum: e.exclusiveMaximum,
293
- isExclusive: !1
294
- })
295
- }));
296
- break;
297
- case "select":
298
- t = n.Literal(...e.members).annotations({
299
- message: () => ({
300
- message: i("validation.not_a_valid", {
301
- type: "select",
302
- message: e.members.join(", ")
303
- }),
304
- override: !0
305
- })
306
- });
307
- break;
308
- case "multiple":
309
- t = n.Array(n.String).annotations({
310
- message: () => i("validation.not_a_valid", {
311
- type: "multiple",
312
- message: e.members.join(", ")
313
- })
314
- });
315
- break;
316
- case "boolean":
317
- t = n.Boolean;
318
- break;
319
- // todo: switch must be exhaustive or have default case, otherwise falls through with schema undefined.
320
- case "unknown":
321
- t = n.Unknown;
322
- break;
323
- }
324
- return e.required ? t.pipe(
325
- n.annotations({
326
- message: () => i("validation.empty")
327
- })
328
- ) : t = n.NullishOr(t), n.standardSchemaV1(t);
329
- }, R = (e, i) => n.NullOr(e).pipe(
330
- n.transform(n.typeSchema(e), {
331
- decode: (t) => t ?? i(),
332
- encode: (t) => t
333
- })
334
- ), k = [
335
- "button",
336
- "checkbox",
337
- "color",
338
- "date",
339
- "email",
340
- "number",
341
- "password",
342
- "radio",
343
- "range",
344
- "search",
345
- "submit",
346
- "tel",
347
- "text",
348
- "time",
349
- "url"
350
- ], J = (e) => k.includes(e) ? e : "text";
26
+ };
351
27
  export {
352
- m as createMeta,
353
- P as duplicateSchema,
354
- j as generateInputStandardSchemaFromFieldMeta,
355
- F as generateMetaFromSchema,
356
- J as getInputType,
357
- R as nullableInput
28
+ g as createUseFormWithCustomInput
358
29
  };
@@ -1,29 +1,4 @@
1
- import { h as t } from "vue";
2
- import i from "./vue-components.es5.js";
3
- import { useOmegaForm as f } from "./vue-components.es8.js";
4
- const g = (r) => (...e) => {
5
- const [o, n, m] = e;
6
- return f(
7
- o,
8
- n,
9
- {
10
- ...m,
11
- input: {
12
- name: "WrappedInput",
13
- inheritAttrs: !1,
14
- setup(p, { attrs: s }) {
15
- return () => t(i, {
16
- ...p,
17
- ...s
18
- }, {
19
- // Override the default slot that OmegaInternalInput provides
20
- default: ({ field: a, ...u }) => t(r, { field: a, inputProps: u })
21
- });
22
- }
23
- }
24
- }
25
- );
26
- };
1
+ import f from "./vue-components.es4.js";
27
2
  export {
28
- g as createUseFormWithCustomInput
3
+ f as default
29
4
  };
@@ -1,4 +1,13 @@
1
- import f from "./vue-components.es4.js";
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
+ }
2
11
  export {
3
- f as default
12
+ p as onMountedWithCleanup
4
13
  };
@@ -1,5 +1,5 @@
1
1
  import { Exit as c, Runtime as s } from "effect";
2
- import { dual as n, isFunction as m } from "./vue-components.es27.js";
2
+ import { dual as n, isFunction as m } from "./vue-components.es26.js";
3
3
  const i = Symbol.for("clone-trait"), u = n(2, (e, t) => i in e ? e[i](t) : Object.setPrototypeOf(t, Object.getPrototypeOf(e)));
4
4
  n(2, (e, t) => u(e, { ...e, ...m(t) ? t(e) : t }));
5
5
  const b = (e) => new Promise((t, r) => e.addObserver((o) => {
@@ -1,4 +1,4 @@
1
- import { isFunction as c } from "./vue-components.es27.js";
1
+ import { isFunction as c } from "./vue-components.es26.js";
2
2
  const s = c, t = (o) => typeof o == "object" && o !== null, i = (o) => t(o) || s(o);
3
3
  export {
4
4
  s as isFunction,
@@ -1,8 +1,8 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");if(t.appendChild(document.createTextNode(".v-enter-from[data-v-193816ae],.v-leave-to[data-v-193816ae]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-193816ae],.v-leave-active[data-v-193816ae]{display:grid;transition:all .15s}.v-enter-to[data-v-193816ae],.v-leave-from[data-v-193816ae]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-193816ae]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-193816ae]{min-height:0}.error-list[data-v-193816ae]{list-style-position:inside}div.error-list[data-v-193816ae]{container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;gap:1.5em;align-items:start}@container (max-width: 27.125rem){div.error-list[data-v-193816ae]{grid-template-columns:auto 1fr}.error-link[data-v-193816ae]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-193816ae]{grid-template-columns:1fr}.error-message[data-v-193816ae]{grid-column:1 / -1}}.error-item[data-v-193816ae]{display:contents}a[data-v-193816ae]{min-width:min-content}.error-link[data-v-193816ae]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),document.head.appendChild(t),window.customElements){const e=window.customElements.define;window.customElements.define=function(n,a){const i=a.prototype.connectedCallback;return a.prototype.connectedCallback=function(){if(i&&i.call(this),this.shadowRoot){const r=document.createElement("style");r.appendChild(document.createTextNode(".v-enter-from[data-v-193816ae],.v-leave-to[data-v-193816ae]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-193816ae],.v-leave-active[data-v-193816ae]{display:grid;transition:all .15s}.v-enter-to[data-v-193816ae],.v-leave-from[data-v-193816ae]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-193816ae]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-193816ae]{min-height:0}.error-list[data-v-193816ae]{list-style-position:inside}div.error-list[data-v-193816ae]{container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;gap:1.5em;align-items:start}@container (max-width: 27.125rem){div.error-list[data-v-193816ae]{grid-template-columns:auto 1fr}.error-link[data-v-193816ae]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-193816ae]{grid-template-columns:1fr}.error-message[data-v-193816ae]{grid-column:1 / -1}}.error-item[data-v-193816ae]{display:contents}a[data-v-193816ae]{min-width:min-content}.error-link[data-v-193816ae]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),this.shadowRoot.appendChild(r)}},e.call(window.customElements,n,a)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import r from "./vue-components.es30.js";
1
+ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");if(a.appendChild(document.createTextNode(".v-enter-from[data-v-4f889c81],.v-leave-to[data-v-4f889c81]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-4f889c81],.v-leave-active[data-v-4f889c81]{display:grid;transition:all .15s}.v-enter-to[data-v-4f889c81],.v-leave-from[data-v-4f889c81]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-4f889c81]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-4f889c81]{min-height:0}.error-list[data-v-4f889c81]{list-style-position:inside}div.error-list[data-v-4f889c81]{container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;gap:1.5em;align-items:start}@container (max-width: 27.125rem){div.error-list[data-v-4f889c81]{grid-template-columns:auto 1fr}.error-link[data-v-4f889c81]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-4f889c81]{grid-template-columns:1fr}.error-message[data-v-4f889c81]{grid-column:1 / -1}}.error-item[data-v-4f889c81]{display:contents}a[data-v-4f889c81]{min-width:min-content}.error-link[data-v-4f889c81]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),document.head.appendChild(a),window.customElements){const e=window.customElements.define;window.customElements.define=function(n,t){const i=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(i&&i.call(this),this.shadowRoot){const r=document.createElement("style");r.appendChild(document.createTextNode(".v-enter-from[data-v-4f889c81],.v-leave-to[data-v-4f889c81]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-4f889c81],.v-leave-active[data-v-4f889c81]{display:grid;transition:all .15s}.v-enter-to[data-v-4f889c81],.v-leave-from[data-v-4f889c81]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-4f889c81]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-4f889c81]{min-height:0}.error-list[data-v-4f889c81]{list-style-position:inside}div.error-list[data-v-4f889c81]{container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;gap:1.5em;align-items:start}@container (max-width: 27.125rem){div.error-list[data-v-4f889c81]{grid-template-columns:auto 1fr}.error-link[data-v-4f889c81]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-4f889c81]{grid-template-columns:1fr}.error-message[data-v-4f889c81]{grid-column:1 / -1}}.error-item[data-v-4f889c81]{display:contents}a[data-v-4f889c81]{min-width:min-content}.error-link[data-v-4f889c81]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),this.shadowRoot.appendChild(r)}},e.call(window.customElements,n,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import r from "./vue-components.es29.js";
3
3
 
4
- import o from "./vue-components.es32.js";
5
- const m = /* @__PURE__ */ o(r, [["__scopeId", "data-v-193816ae"]]);
4
+ import o from "./vue-components.es31.js";
5
+ const e = /* @__PURE__ */ o(r, [["__scopeId", "data-v-4f889c81"]]);
6
6
  export {
7
- m as default
7
+ e as default
8
8
  };
@@ -1,7 +1,7 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-8fe92df3]{display:contents}fieldset[disabled][data-v-8fe92df3]>*{pointer-events:none}")),document.head.appendChild(n),window.customElements){const e=window.customElements.define;window.customElements.define=function(i,t){const d=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(d&&d.call(this),this.shadowRoot){const o=document.createElement("style");o.appendChild(document.createTextNode("fieldset[data-v-8fe92df3]{display:contents}fieldset[disabled][data-v-8fe92df3]>*{pointer-events:none}")),this.shadowRoot.appendChild(o)}},e.call(window.customElements,i,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import o from "./vue-components.es33.js";
2
+ import o from "./vue-components.es32.js";
3
3
 
4
- import m from "./vue-components.es32.js";
4
+ import m from "./vue-components.es31.js";
5
5
  const a = /* @__PURE__ */ m(o, [["__scopeId", "data-v-8fe92df3"]]);
6
6
  export {
7
7
  a as default
@@ -1,4 +1,4 @@
1
- import { TraceAPI as r } from "./vue-components.es47.js";
1
+ import { TraceAPI as r } from "./vue-components.es46.js";
2
2
  var t = r.getInstance();
3
3
  export {
4
4
  t as trace