@effect-app/vue-components 4.0.0-beta.220 → 4.0.0-beta.222

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 (46) hide show
  1. package/dist/types/components/CommandButton.vue.d.ts +1 -1
  2. package/dist/types/components/OmegaForm/OmegaAutoGen.vue.d.ts +1 -1
  3. package/dist/types/components/OmegaForm/index.d.ts +1 -1
  4. package/dist/types/components/OmegaForm/meta/checks.d.ts +1 -1
  5. package/dist/types/components/OmegaForm/meta/createMeta.d.ts +2 -1
  6. package/dist/types/components/OmegaForm/meta/defaults.d.ts +1 -1
  7. package/dist/types/components/OmegaForm/meta/redacted.d.ts +1 -1
  8. package/dist/types/components/OmegaForm/meta/types.d.ts +1 -1
  9. package/dist/types/components/OmegaForm/meta/walker.d.ts +1 -1
  10. package/dist/types/components/OmegaForm/submit.d.ts +1 -1
  11. package/dist/types/components/OmegaForm/types.d.ts +3 -1
  12. package/dist/types/components/OmegaForm/useOmegaForm.d.ts +1 -1
  13. package/dist/types/components/OmegaForm/validation/localized.d.ts +1 -1
  14. package/dist/types/utils/index.d.ts +3 -3
  15. package/dist/vue-components.es.js +5 -5
  16. package/dist/vue-components12.es.js +1 -1
  17. package/dist/vue-components13.es.js +1 -1
  18. package/dist/vue-components14.es.js +1 -1
  19. package/dist/vue-components15.es.js +23 -21
  20. package/dist/vue-components16.es.js +1 -1
  21. package/dist/vue-components19.es.js +37 -36
  22. package/dist/vue-components24.es.js +1 -1
  23. package/dist/vue-components67.es.js +40 -26
  24. package/dist/vue-components68.es.js +81 -5
  25. package/dist/vue-components69.es.js +32 -17
  26. package/dist/vue-components70.es.js +18 -39
  27. package/dist/vue-components71.es.js +47 -80
  28. package/package.json +3 -3
  29. package/src/components/CommandButton.vue +1 -1
  30. package/src/components/OmegaForm/OmegaAutoGen.vue +1 -1
  31. package/src/components/OmegaForm/index.ts +1 -1
  32. package/src/components/OmegaForm/meta/checks.ts +2 -1
  33. package/src/components/OmegaForm/meta/createMeta.ts +3 -1
  34. package/src/components/OmegaForm/meta/defaults.ts +3 -1
  35. package/src/components/OmegaForm/meta/redacted.ts +1 -1
  36. package/src/components/OmegaForm/meta/types.ts +1 -1
  37. package/src/components/OmegaForm/meta/walker.ts +1 -1
  38. package/src/components/OmegaForm/submit.ts +4 -1
  39. package/src/components/OmegaForm/types.ts +3 -1
  40. package/src/components/OmegaForm/useOmegaForm.ts +2 -1
  41. package/src/components/OmegaForm/useRegisterField.ts +1 -1
  42. package/src/components/OmegaForm/validation/localized.ts +2 -1
  43. package/src/utils/index.ts +2 -2
  44. package/dist/vue-components72.es.js +0 -33
  45. package/dist/vue-components73.es.js +0 -19
  46. package/dist/vue-components74.es.js +0 -48
@@ -1,4 +1,4 @@
1
- import type { CommandBase, Progress } from "@effect-app/vue";
1
+ import type { CommandBase, Progress } from "@effect-app/vue/makeClient";
2
2
  import type * as AsyncResult from "effect/unstable/reactivity/AsyncResult";
3
3
  import type { VBtn } from "vuetify/components";
4
4
  export type VBtnProps = VBtn["$props"];
@@ -1,5 +1,5 @@
1
1
  import { type DeepKeys } from "@tanstack/vue-form";
2
- import { Order } from "effect-app";
2
+ import * as Order from "effect/Order";
3
3
  import { type OmegaAutoGenMeta, type OmegaInputProps } from "./types";
4
4
  declare const __VLS_export: <// dprint-ignore
5
5
  From extends Record<PropertyKey, string>, To extends Record<PropertyKey, string>, 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_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
@@ -1,4 +1,4 @@
1
- import type { S } from "effect-app";
1
+ import type * as S from "effect-app/Schema";
2
2
  export { getInputType, type SupportedInputs } from "./inputs";
3
3
  export { createMeta, generateMetaFromSchema, isNullableOrUndefined, metadataFromAst } from "./meta/createMeta";
4
4
  export type { CreateMeta, FilterItems } from "./meta/createMeta";
@@ -1,4 +1,4 @@
1
- import { S } from "effect-app";
1
+ import * as S from "effect-app/Schema";
2
2
  import type { FieldMeta } from "./types";
3
3
  export declare const getCheckMetas: (property: S.AST.AST) => Array<Record<string, any>>;
4
4
  export declare const getFieldMetadataFromAst: (property: S.AST.AST) => Partial<FieldMeta> & Record<string, unknown>;
@@ -1,4 +1,5 @@
1
- import { type Effect, S } from "effect-app";
1
+ import type * as Effect from "effect-app/Effect";
2
+ import * as S from "effect-app/Schema";
2
3
  import type { FieldMeta, MetaRecord } from "./types";
3
4
  export type FilterItems = {
4
5
  items: readonly [string, ...string[]];
@@ -1,2 +1,2 @@
1
- import { S } from "effect-app";
1
+ import * as S from "effect-app/Schema";
2
2
  export declare const defaultsValueFromSchema: (schema: S.Schema<any>, record?: Record<string, any>) => any;
@@ -1,2 +1,2 @@
1
- import { S } from "effect-app";
1
+ import * as S from "effect-app/Schema";
2
2
  export declare const toFormSchema: <From, To>(schema: S.Codec<To, From>) => S.Codec<To, From>;
@@ -1,5 +1,5 @@
1
1
  import type { DeepKeys } from "@tanstack/vue-form";
2
- import type { S } from "effect-app";
2
+ import type * as S from "effect-app/Schema";
3
3
  import type { Redacted } from "effect/Redacted";
4
4
  type StripRedacted<T> = T extends Redacted<any> ? string : T extends ReadonlyArray<infer U> ? ReadonlyArray<StripRedacted<U>> : T extends Record<string, any> ? {
5
5
  [K in keyof T]: StripRedacted<T[K]>;
@@ -1,4 +1,4 @@
1
- import { S } from "effect-app";
1
+ import * as S from "effect-app/Schema";
2
2
  import type { FieldMeta, MetaRecord } from "./types";
3
3
  export type WalkerContext<T> = {
4
4
  acc: Partial<MetaRecord<T>>;
@@ -1,6 +1,6 @@
1
1
  import * as api from "@opentelemetry/api";
2
2
  import type { DeepKeys, StandardSchemaV1Issue, ValidationError, ValidationErrorMap } from "@tanstack/vue-form";
3
- import { Effect } from "effect-app";
3
+ import * as Effect from "effect-app/Effect";
4
4
  import type { Fiber as EffectFiber } from "effect/Fiber";
5
5
  import type { OmegaFormApi, OmegaFormParams } from "./types";
6
6
  declare const FormErrors_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
@@ -1,7 +1,9 @@
1
1
  import type { DeepKeys, DeepValue, FieldApi, FieldAsyncValidateOrFn, FieldState, FieldValidateOrFn, FormApi, FormAsyncValidateOrFn, FormOptions, FormState, FormValidateOrFn, StandardSchemaV1, VueFormApi } from "@tanstack/vue-form";
2
- import type { Effect, Order, S } from "effect-app";
2
+ import type * as Effect from "effect-app/Effect";
3
+ import type * as S from "effect-app/Schema";
3
4
  import type { UnionToTuples } from "effect-app/utils";
4
5
  import type { Fiber as EffectFiber } from "effect/Fiber";
6
+ import type * as Order from "effect/Order";
5
7
  import type { Redacted } from "effect/Redacted";
6
8
  import type { AllowedComponentProps, ComponentCustomProps, ComputedRef, PublicProps, ShallowUnwrapRef, VNode, VNodeProps } from "vue";
7
9
  import type { MergedInputProps, OmegaFieldInternalApi, TaggedUnionOptionsArray } from "./InputProps";
@@ -1,4 +1,4 @@
1
- import { S } from "effect-app";
1
+ import * as S from "effect-app/Schema";
2
2
  import { type InjectionKey } from "vue";
3
3
  import type { DefaultTypeProps, FormProps, OF, OmegaConfig, OmegaFormReturn } from "./types";
4
4
  export { useErrorLabel } from "./errors";
@@ -1,5 +1,5 @@
1
1
  import type { StandardSchemaV1 } from "@tanstack/vue-form";
2
- import { S } from "effect-app";
2
+ import * as S from "effect-app/Schema";
3
3
  import type { useIntl } from "../../../utils";
4
4
  export type TransFn = ReturnType<typeof useIntl>["trans"];
5
5
  export declare const makeStandardSchemaV1Hooks: (trans: TransFn) => {
@@ -1,12 +1,12 @@
1
- import { type makeIntl } from "@effect-app/vue";
2
- import type { S } from "effect-app";
1
+ import { type makeIntl } from "@effect-app/vue/makeIntl";
2
+ import type * as S from "effect-app/Schema";
3
3
  import { type InjectionKey } from "vue";
4
4
  export declare const useIntlKey: InjectionKey<ReturnType<typeof makeIntl>["useIntl"]>;
5
5
  export declare const useIntl: () => {
6
6
  locale: import("vue").Ref<string, string>;
7
7
  trans: (id: string, values?: Record<string, import("intl-messageformat").PrimitiveType | import("intl-messageformat").FormatXMLElementFn<string, string>>) => string;
8
8
  readonly formatMessage: (descriptor: import("@formatjs/intl").MessageDescriptor, values?: Record<string, import("intl-messageformat").PrimitiveType | import("intl-messageformat").FormatXMLElementFn<string, string>>, opts?: import("intl-messageformat").Options) => string;
9
- readonly intl: import("@effect-app/vue").IntlShape<string>;
9
+ readonly intl: import("@effect-app/vue/makeIntl").IntlShape<string>;
10
10
  };
11
11
  export declare const provideIntl: (intl: ReturnType<typeof makeIntl>["useIntl"]) => void;
12
12
  /**
@@ -13,11 +13,11 @@ import y from "./vue-components34.es.js";
13
13
  import b from "./vue-components36.es.js";
14
14
  import x from "./vue-components38.es.js";
15
15
  import S from "./vue-components40.es.js";
16
- import { FormErrors as C } from "./vue-components70.es.js";
17
- import { OmegaFormKey as w, useOmegaForm as T } from "./vue-components71.es.js";
18
- import { createUseFormWithCustomInput as E } from "./vue-components72.es.js";
19
- import { duplicateSchema as D } from "./vue-components73.es.js";
20
- import { components_exports as O } from "./vue-components74.es.js";
16
+ import { FormErrors as C } from "./vue-components67.es.js";
17
+ import { OmegaFormKey as w, useOmegaForm as T } from "./vue-components68.es.js";
18
+ import { createUseFormWithCustomInput as E } from "./vue-components69.es.js";
19
+ import { duplicateSchema as D } from "./vue-components70.es.js";
20
+ import { components_exports as O } from "./vue-components71.es.js";
21
21
  //#region src/index.ts
22
22
  function k(e) {
23
23
  for (let t in O) if (Object.prototype.hasOwnProperty.call(O, t)) {
@@ -1,4 +1,4 @@
1
- import { S as e } from "effect-app";
1
+ import * as e from "effect-app/Schema";
2
2
  //#region src/components/OmegaForm/meta/checks.ts
3
3
  var t = (e) => (e.checks ?? []).flatMap((e) => {
4
4
  if (e._tag === "FilterGroup") return e.checks.flatMap((e) => {
@@ -1,6 +1,6 @@
1
1
  import { getFieldMetadataFromAst as e } from "./vue-components12.es.js";
2
2
  import { isNullableOrUndefined as t, unwrapDeclaration as n } from "./vue-components14.es.js";
3
- import { S as r } from "effect-app";
3
+ import * as r from "effect-app/Schema";
4
4
  //#region src/components/OmegaForm/meta/walker.ts
5
5
  var i = (e) => r.AST.isUndefined(e) || r.AST.isNull(e), a = (e) => r.AST.isUnion(e) && e.types.length === 1 && r.AST.isLiteral(e.types[0]) ? e.types[0] : e, o = (e) => e.flatMap((e) => r.AST.isUnion(e) ? o(e.types) : [e]), s = (t, n) => {
6
6
  let { nullableOrUndefined: i, required: a } = n;
@@ -1,6 +1,6 @@
1
1
  import { getTransformationFrom as e } from "./vue-components6.es.js";
2
2
  import { classifyAndWalkUnion as t, leafMetaForAst as n, walkStruct as r } from "./vue-components13.es.js";
3
- import { S as i } from "effect-app";
3
+ import * as i from "effect-app/Schema";
4
4
  //#region src/components/OmegaForm/meta/createMeta.ts
5
5
  var a = (t) => {
6
6
  let n = e(t);
@@ -1,10 +1,12 @@
1
1
  import { isNullableOrUndefined as e, unwrapDeclaration as t } from "./vue-components14.es.js";
2
- import { Effect as n, Option as r, S as i } from "effect-app";
2
+ import * as n from "effect-app/Schema";
3
+ import * as r from "effect-app/Effect";
4
+ import * as i from "effect-app/Option";
3
5
  //#region src/components/OmegaForm/meta/defaults.ts
4
6
  var a = (e) => {
5
7
  if (e?.transformation?.decode?.run) try {
6
- let t = n.runSync(e.transformation.decode.run(r.none()));
7
- return r.isSome(t) ? t.value : void 0;
8
+ let t = r.runSync(e.transformation.decode.run(i.none()));
9
+ return i.isSome(t) ? t.value : void 0;
8
10
  } catch {
9
11
  return;
10
12
  }
@@ -17,43 +19,43 @@ var a = (e) => {
17
19
  function s(e) {
18
20
  return e && "members" in e && Array.isArray(e.members);
19
21
  }
20
- var c = (n, r = {}) => {
21
- let a = n.ast, l = o(a);
22
+ var c = (r, i = {}) => {
23
+ let a = r.ast, l = o(a);
22
24
  if (l !== void 0) return l;
23
- if (e(n.ast) === "null") return null;
24
- if (e(n.ast) === "undefined") return;
25
- let u = i.AST.isObjects(a) ? a : i.AST.isDeclaration(a) ? t(a) : void 0;
26
- if (u && i.AST.isObjects(u)) {
25
+ if (e(r.ast) === "null") return null;
26
+ if (e(r.ast) === "undefined") return;
27
+ let u = n.AST.isObjects(a) ? a : n.AST.isDeclaration(a) ? t(a) : void 0;
28
+ if (u && n.AST.isObjects(u)) {
27
29
  let t = {};
28
- for (let n of u.propertySignatures) {
29
- let a = n.name.toString(), s = n.type, l = o(s);
30
+ for (let r of u.propertySignatures) {
31
+ let a = r.name.toString(), s = r.type, l = o(s);
30
32
  if (l !== void 0) {
31
33
  t[a] = l;
32
34
  continue;
33
35
  }
34
- let u = c(i.make(s), r[a] || {});
36
+ let u = c(n.make(s), i[a] || {});
35
37
  u === void 0 ? e(s) === "undefined" && (t[a] = void 0) : t[a] = u;
36
38
  }
37
39
  return {
38
40
  ...t,
39
- ...r
41
+ ...i
40
42
  };
41
43
  }
42
- let d = i.AST.isUnion(a) ? a.types : s(n) ? n.members.map((e) => e.ast) : void 0;
44
+ let d = n.AST.isUnion(a) ? a.types : s(r) ? r.members.map((e) => e.ast) : void 0;
43
45
  if (d) {
44
46
  let e = {};
45
- for (let n of d) {
46
- let r = t(n);
47
- if (i.AST.isObjects(r)) for (let t of r.propertySignatures) {
47
+ for (let r of d) {
48
+ let i = t(r);
49
+ if (n.AST.isObjects(i)) for (let t of i.propertySignatures) {
48
50
  let n = t.name.toString(), r = o(t.type), i = e[n] ? o(e[n].ast) : void 0;
49
51
  (!e[n] || r !== void 0 && i === void 0) && (e[n] = { ast: t.type });
50
52
  }
51
53
  }
52
- return Object.keys(e).length === 0 ? Object.keys(r).length > 0 ? r : void 0 : Object.entries(e).reduce((e, [t, { ast: n }]) => (e[t] = c(i.make(n), r[t] || {}), e), r);
54
+ return Object.keys(e).length === 0 ? Object.keys(i).length > 0 ? i : void 0 : Object.entries(e).reduce((e, [t, { ast: r }]) => (e[t] = c(n.make(r), i[t] || {}), e), i);
53
55
  }
54
- if (Object.keys(r).length === 0) {
55
- if (i.AST.isString(a)) return "";
56
- if (i.AST.isBoolean(a)) return !1;
56
+ if (Object.keys(i).length === 0) {
57
+ if (n.AST.isString(a)) return "";
58
+ if (n.AST.isBoolean(a)) return !1;
57
59
  }
58
60
  };
59
61
  //#endregion
@@ -1,4 +1,4 @@
1
- import { S as e } from "effect-app";
1
+ import * as e from "effect-app/Schema";
2
2
  //#region src/components/OmegaForm/meta/redacted.ts
3
3
  var t = (t) => e.AST.isDeclaration(t) && t.annotations?.typeConstructor?._tag === "effect/Redacted" && !t.encoding, n = (n) => {
4
4
  let r = n.ast, i = e.AST.isObjects(r) ? r : e.AST.isDeclaration(r) ? e.AST.toEncoded(r) : null;
@@ -1,4 +1,5 @@
1
- import { Option as e, S as t } from "effect-app";
1
+ import * as e from "effect-app/Schema";
2
+ import * as t from "effect-app/Option";
2
3
  //#region src/components/OmegaForm/validation/localized.ts
3
4
  var n = (n) => ({
4
5
  leafHook: (r) => {
@@ -8,18 +9,18 @@ var n = (n) => ({
8
9
  case "MissingKey": return n("validation.empty");
9
10
  case "InvalidType": {
10
11
  let i = r.ast;
11
- return e.isNone(r.actual) || e.isSome(r.actual) && r.actual.value === void 0 || t.AST.isString(i) ? n("validation.empty") : t.AST.isBoolean(i) ? n("validation.not_a_valid", { type: "boolean" }) : t.AST.isNumber(i) ? n("validation.number.expected", { actualValue: e.isSome(r.actual) ? String(r.actual.value) : "NaN" }) : n("validation.not_a_valid");
12
+ return t.isNone(r.actual) || t.isSome(r.actual) && r.actual.value === void 0 || e.AST.isString(i) ? n("validation.empty") : e.AST.isBoolean(i) ? n("validation.not_a_valid", { type: "boolean" }) : e.AST.isNumber(i) ? n("validation.number.expected", { actualValue: t.isSome(r.actual) ? String(r.actual.value) : "NaN" }) : n("validation.not_a_valid");
12
13
  }
13
14
  default: return n("validation.not_a_valid");
14
15
  }
15
16
  },
16
- checkHook: (e) => {
17
- if (e.filter.annotations?.identifier === "Email") return n("validation.email.invalid");
18
- let r = e.filter.annotations?.meta ?? {};
17
+ checkHook: (t) => {
18
+ if (t.filter.annotations?.identifier === "Email") return n("validation.email.invalid");
19
+ let r = t.filter.annotations?.meta ?? {};
19
20
  switch (r._tag) {
20
21
  case "isMinLength": return r.minLength === 1 ? n("validation.empty") : n("validation.string.minLength", { minLength: r.minLength });
21
22
  case "isMaxLength": return n("validation.string.maxLength", { maxLength: r.maxLength });
22
- case "isInt": return n("validation.integer.expected", { actualValue: e.actual === void 0 ? "NaN" : String(e.actual) });
23
+ case "isInt": return n("validation.integer.expected", { actualValue: t.actual === void 0 ? "NaN" : String(t.actual) });
23
24
  case "isGreaterThanOrEqualTo": return n(r.minimum === 0 ? "validation.number.positive" : "validation.number.min", {
24
25
  minimum: r.minimum,
25
26
  isExclusive: !0
@@ -36,57 +37,57 @@ var n = (n) => ({
36
37
  maximum: r.exclusiveMaximum,
37
38
  isExclusive: !1
38
39
  });
39
- default: return t.SchemaIssue.defaultCheckHook(e);
40
+ default: return e.SchemaIssue.defaultCheckHook(t);
40
41
  }
41
42
  }
42
- }), r = (e, r) => {
43
+ }), r = (t, r) => {
43
44
  let { checkHook: i, leafHook: a } = n(r);
44
- return t.toStandardSchemaV1(e, {
45
+ return e.toStandardSchemaV1(t, {
45
46
  leafHook: a,
46
47
  checkHook: i
47
48
  });
48
- }, i = (e) => t.AST.isUnion(e) && e.types.every(t.AST.isLiteral), a = (e, n) => {
49
- if (i(e)) {
50
- if (e.annotations?.message !== void 0) return e;
51
- let r = e.types.map((e) => e.literal);
52
- return new t.AST.Union(e.types, e.mode, {
53
- ...e.annotations,
49
+ }, i = (t) => e.AST.isUnion(t) && t.types.every(e.AST.isLiteral), a = (t, n) => {
50
+ if (i(t)) {
51
+ if (t.annotations?.message !== void 0) return t;
52
+ let r = t.types.map((e) => e.literal);
53
+ return new e.AST.Union(t.types, t.mode, {
54
+ ...t.annotations,
54
55
  message: n("validation.not_a_valid", {
55
56
  type: "select",
56
57
  message: r.join(", ")
57
58
  })
58
- }, e.checks, e.encoding, e.context);
59
+ }, t.checks, t.encoding, t.context);
59
60
  }
60
- if (t.AST.isUnion(e)) {
61
- let r = e.types.map((e) => a(e, n));
62
- return r.some((t, n) => t !== e.types[n]) ? new t.AST.Union(r, e.mode, e.annotations, e.checks, e.encoding, e.context) : e;
61
+ if (e.AST.isUnion(t)) {
62
+ let r = t.types.map((e) => a(e, n));
63
+ return r.some((e, n) => e !== t.types[n]) ? new e.AST.Union(r, t.mode, t.annotations, t.checks, t.encoding, t.context) : t;
63
64
  }
64
- if (t.AST.isArrays(e)) {
65
- let r = e.rest.map((e) => a(e, n)), o = e.elements.map((e) => a(e, n)), s = e.annotations;
66
- if (e.annotations?.message === void 0 && e.rest.length === 1 && i(e.rest[0])) {
67
- let t = e.rest[0].types.map((e) => e.literal);
65
+ if (e.AST.isArrays(t)) {
66
+ let r = t.rest.map((e) => a(e, n)), o = t.elements.map((e) => a(e, n)), s = t.annotations;
67
+ if (t.annotations?.message === void 0 && t.rest.length === 1 && i(t.rest[0])) {
68
+ let e = t.rest[0].types.map((e) => e.literal);
68
69
  s = {
69
- ...e.annotations,
70
+ ...t.annotations,
70
71
  message: n("validation.not_a_valid", {
71
72
  type: "multiple",
72
- message: t.join(", ")
73
+ message: e.join(", ")
73
74
  })
74
75
  };
75
76
  }
76
- let c = r.some((t, n) => t !== e.rest[n]), l = o.some((t, n) => t !== e.elements[n]);
77
- return !c && !l && s === e.annotations ? e : new t.AST.Arrays(e.isMutable, o, r, s, e.checks, e.encoding, e.context);
77
+ let c = r.some((e, n) => e !== t.rest[n]), l = o.some((e, n) => e !== t.elements[n]);
78
+ return !c && !l && s === t.annotations ? t : new e.AST.Arrays(t.isMutable, o, r, s, t.checks, t.encoding, t.context);
78
79
  }
79
- if (t.AST.isObjects(e)) {
80
- let r = e.propertySignatures.map((e) => {
81
- let r = a(e.type, n);
82
- return r === e.type ? e : new t.AST.PropertySignature(e.name, r);
80
+ if (e.AST.isObjects(t)) {
81
+ let r = t.propertySignatures.map((t) => {
82
+ let r = a(t.type, n);
83
+ return r === t.type ? t : new e.AST.PropertySignature(t.name, r);
83
84
  });
84
- return r.some((t, n) => t !== e.propertySignatures[n]) ? new t.AST.Objects(r, e.indexSignatures, e.annotations, e.checks, e.encoding, e.context) : e;
85
+ return r.some((e, n) => e !== t.propertySignatures[n]) ? new e.AST.Objects(r, t.indexSignatures, t.annotations, t.checks, t.encoding, t.context) : t;
85
86
  }
86
- return e;
87
- }, o = (e, n) => {
88
- let r = a(e.ast, n);
89
- return r === e.ast ? e : t.make(r);
87
+ return t;
88
+ }, o = (t, n) => {
89
+ let r = a(t.ast, n);
90
+ return r === t.ast ? t : e.make(r);
90
91
  };
91
92
  //#endregion
92
93
  export { o as annotateLiteralUnionMessages, n as makeStandardSchemaV1Hooks, r as toLocalizedStandardSchemaV1 };
@@ -1,5 +1,5 @@
1
1
  import { Fragment as e, computed as t, createElementBlock as n, createVNode as r, defineComponent as i, mergeProps as a, openBlock as o, renderList as s, renderSlot as c, unref as l } from "vue";
2
- import { Order as u } from "effect-app";
2
+ import * as u from "effect/Order";
3
3
  //#region src/components/OmegaForm/OmegaAutoGen.vue?vue&type=script&setup=true&lang.ts
4
4
  var d = /* @__PURE__ */ i({
5
5
  __name: "OmegaAutoGen",
@@ -1,29 +1,43 @@
1
- //#region ../../node_modules/.pnpm/effect@4.0.0-beta.62/node_modules/effect/dist/Function.js
2
- var e = function(e, t) {
3
- if (typeof e == "function") return function() {
4
- return e(arguments) ? t.apply(this, arguments) : (e) => t(e, ...arguments);
1
+ import { context as e } from "./vue-components64.es.js";
2
+ import { trace as t } from "./vue-components66.es.js";
3
+ import * as n from "effect-app/Effect";
4
+ import * as r from "effect-app/Option";
5
+ import { runtimeFiberAsPromise as i } from "effect-app/utils";
6
+ import * as a from "effect/Data";
7
+ import * as o from "effect/Fiber";
8
+ //#region src/components/OmegaForm/submit.ts
9
+ var s = class extends a.TaggedError("FormErrors") {}, c = (n, r) => n ? e.with(t.setSpan(e.active(), n), r) : r(), l = (e, t, r) => {
10
+ if (e) return ({ formApi: a, meta: s, value: l }) => c(s?.currentSpan, async () => {
11
+ let c = e({
12
+ formApi: a,
13
+ meta: s,
14
+ value: await r(t(l))
15
+ });
16
+ if (o.isFiber(c)) return await i(c);
17
+ if (n.isEffect(c)) {
18
+ let e = await r(c);
19
+ return o.isFiber(e) ? await i(e) : e;
20
+ }
21
+ return c;
22
+ });
23
+ }, u = (i) => {
24
+ let a = i.handleSubmit.bind(i), o = async (e) => await a(e), c = (n) => o({
25
+ currentSpan: t.getSpan(e.active()),
26
+ ...n
27
+ }), l = (e) => n.currentSpan.pipe(n.option, n.flatMap((t) => n.promise(() => o(r.isSome(t) ? {
28
+ currentSpan: t.value,
29
+ ...e
30
+ } : e))));
31
+ return {
32
+ handleSubmit: c,
33
+ handleSubmitEffect: (e) => e?.checkErrors ? l(e?.meta).pipe(n.flatMap(n.fnUntraced(function* () {
34
+ let e = i.getAllErrors();
35
+ if (Object.keys(e.fields).length || e.form.errors.length) return yield* n.fail(new s({
36
+ form: e.form,
37
+ fields: e.fields
38
+ }));
39
+ }))) : l(e?.meta)
5
40
  };
6
- switch (e) {
7
- case 0:
8
- case 1: throw RangeError(`Invalid arity ${e}`);
9
- case 2: return function(e, n) {
10
- return arguments.length >= 2 ? t(e, n) : function(n) {
11
- return t(n, e);
12
- };
13
- };
14
- case 3: return function(e, n, r) {
15
- return arguments.length >= 3 ? t(e, n, r) : function(r) {
16
- return t(r, e, n);
17
- };
18
- };
19
- default: return function() {
20
- if (arguments.length >= e) return t.apply(this, arguments);
21
- let n = arguments;
22
- return function(e) {
23
- return t(e, ...n);
24
- };
25
- };
26
- }
27
41
  };
28
42
  //#endregion
29
- export { e as dual };
43
+ export { s as FormErrors, u as makeSubmitHandlers, l as wrapOnSubmit };
@@ -1,6 +1,82 @@
1
- //#region ../../node_modules/.pnpm/effect@4.0.0-beta.62/node_modules/effect/dist/Predicate.js
2
- function e(e) {
3
- return typeof e == "function";
4
- }
1
+ import { useIntl as e } from "./vue-components6.es.js";
2
+ import { generateMetaFromSchema as t } from "./vue-components14.es.js";
3
+ import { defaultsValueFromSchema as n } from "./vue-components15.es.js";
4
+ import { toFormSchema as r } from "./vue-components16.es.js";
5
+ import { usePersistency as i } from "./vue-components18.es.js";
6
+ import { annotateLiteralUnionMessages as a, toLocalizedStandardSchemaV1 as o } from "./vue-components19.es.js";
7
+ import { eHoc as s, makeFieldMap as c } from "./vue-components20.es.js";
8
+ import { fHoc as l } from "./vue-components21.es.js";
9
+ import u from "./vue-components23.es.js";
10
+ import d from "./vue-components25.es.js";
11
+ import f from "./vue-components29.es.js";
12
+ import p from "./vue-components36.es.js";
13
+ import m from "./vue-components40.es.js";
14
+ import h from "./vue-components44.es.js";
15
+ import { makeSubmitHandlers as g, wrapOnSubmit as _ } from "./vue-components67.es.js";
16
+ import { watch as v } from "vue";
17
+ import * as y from "effect-app/Schema";
18
+ import { revalidateLogic as b, useForm as x } from "@tanstack/vue-form";
19
+ import * as S from "effect-app/Context";
20
+ import { makeRunPromise as C } from "@effect-app/vue/runtime";
21
+ //#region src/components/OmegaForm/useOmegaForm.ts
22
+ var w = Symbol("OmegaForm"), T = C(S.empty()), E = (S, C, w) => {
23
+ if (!S) throw Error("Schema is required");
24
+ let { trans: E } = e(), D = r(S), O = o(a(D, E), E), k = y.decodeUnknownEffectConcurrently(D), { meta: A, unionMeta: j } = t(D), M = { form: void 0 }, N = i({
25
+ meta: A,
26
+ persistency: w?.persistency,
27
+ preventWindowExit: w?.preventWindowExit,
28
+ defaultValuesPriority: w?.defaultValuesPriority,
29
+ tanstackDefaultValues: C?.defaultValues,
30
+ schemaDefaultValues: () => n(S),
31
+ getForm: () => M.form
32
+ }), P = x({
33
+ ...C,
34
+ validationLogic: b(),
35
+ validators: {
36
+ onDynamic: O,
37
+ ...C?.validators
38
+ },
39
+ onSubmit: _(C?.onSubmit, k, T),
40
+ defaultValues: N.defaultValues.value
41
+ });
42
+ M.form = P;
43
+ let F = () => {
44
+ Object.keys(A).forEach((e) => {
45
+ P.setFieldValue(e, void 0);
46
+ });
47
+ };
48
+ if (w?.preventWindowExit === "prevent-and-reset") {
49
+ let e = P.useStore((e) => e.isSubmitting), t = P.useStore((e) => e.submissionAttempts), n = P.useStore((e) => e.canSubmit), r = P.useStore((e) => e.values);
50
+ v([e, t], ([e, t], [i]) => {
51
+ i && !e && t > 0 && n.value && P.reset(r.value);
52
+ });
53
+ }
54
+ let { handleSubmit: I, handleSubmitEffect: L } = g(P), { fieldMap: R, registerField: z } = c(), B = Object.assign(P, {
55
+ i18nNamespace: w?.i18nNamespace,
56
+ ignorePreventCloseEvents: w?.ignorePreventCloseEvents,
57
+ meta: A,
58
+ unionMeta: j,
59
+ clear: F,
60
+ handleSubmit: I,
61
+ handleSubmitEffect: L,
62
+ registerField: z
63
+ }), V = {
64
+ form: B,
65
+ fieldMap: R
66
+ };
67
+ return Object.assign(B, {
68
+ _paths: void 0,
69
+ _keys: void 0,
70
+ _schema: S,
71
+ errorContext: V,
72
+ Form: l(B)(h),
73
+ Input: l(B)(w?.input ?? p),
74
+ TaggedUnion: l(B)(m),
75
+ Field: P.Field,
76
+ Errors: s(V)(f),
77
+ Array: l(B)(u),
78
+ AutoGen: l(B)(d)
79
+ });
80
+ };
5
81
  //#endregion
6
- export { e as isFunction };
82
+ export { w as OmegaFormKey, E as useOmegaForm };
@@ -1,18 +1,33 @@
1
- import { dual as e } from "./vue-components67.es.js";
2
- import { isFunction as t } from "./vue-components68.es.js";
3
- import { Cause as n, Effect as r, Exit as i, Fiber as a } from "effect";
4
- //#region ../effect-app/dist/utils.js
5
- var o = Symbol.for("clone-trait"), s = e(2, (e, t) => o in e ? e[o](t) : Object.setPrototypeOf(t, Object.getPrototypeOf(e)));
6
- e(2, (e, n) => s(e, {
7
- ...e,
8
- ...t(n) ? n(e) : n
9
- }));
10
- var c = (e, t) => {
11
- let n = () => r.runSync(a.interrupt(e));
12
- return t.aborted ? (n(), e) : (t.addEventListener("abort", n), e);
13
- }, l = (e, t) => (t && c(e, t), new Promise((t, r) => e.addObserver((e) => {
14
- i.isSuccess(e) ? t(e.value) : r(n.squash(e.cause));
15
- })));
16
- (function* () {}).constructor;
1
+ import e from "./vue-components36.es.js";
2
+ import { useOmegaForm as t } from "./vue-components68.es.js";
3
+ import { h as n } from "vue";
4
+ //#region src/components/OmegaForm/createUseFormWithCustomInput.ts
5
+ var r = (r) => (...i) => {
6
+ let [a, o, s] = i, c = {
7
+ name: "WrappedInput",
8
+ inheritAttrs: !1,
9
+ setup(t, { attrs: i, slots: a }) {
10
+ return () => n(e, {
11
+ ...t,
12
+ ...i
13
+ }, {
14
+ default: ({ field: e, state: t, ...o }) => n(r, {
15
+ ...Object.fromEntries(Object.entries(i).filter(([e]) => !Object.prototype.hasOwnProperty.call(o, e) && e !== "form")),
16
+ field: e,
17
+ state: t,
18
+ inputProps: o
19
+ }, {
20
+ ...a.label && { label: (e) => a.label(e) },
21
+ ...a.default && { default: (e) => a.default(e) }
22
+ }),
23
+ ...a.label && { label: (e) => a.label(e) }
24
+ });
25
+ }
26
+ };
27
+ return t(a, o, {
28
+ ...s,
29
+ input: c
30
+ });
31
+ };
17
32
  //#endregion
18
- export { l as runtimeFiberAsPromise };
33
+ export { r as createUseFormWithCustomInput };
@@ -1,40 +1,19 @@
1
- import { context as e } from "./vue-components64.es.js";
2
- import { trace as t } from "./vue-components66.es.js";
3
- import { runtimeFiberAsPromise as n } from "./vue-components69.es.js";
4
- import { Data as r, Effect as i, Fiber as a, Option as o } from "effect-app";
5
- //#region src/components/OmegaForm/submit.ts
6
- var s = class extends r.TaggedError("FormErrors") {}, c = (n, r) => n ? e.with(t.setSpan(e.active(), n), r) : r(), l = (e, t, r) => {
7
- if (e) return ({ formApi: o, meta: s, value: l }) => c(s?.currentSpan, async () => {
8
- let c = e({
9
- formApi: o,
10
- meta: s,
11
- value: await r(t(l))
12
- });
13
- if (a.isFiber(c)) return await n(c);
14
- if (i.isEffect(c)) {
15
- let e = await r(c);
16
- return a.isFiber(e) ? await n(e) : e;
17
- }
18
- return c;
19
- });
20
- }, u = (n) => {
21
- let r = n.handleSubmit.bind(n), a = async (e) => await r(e), c = (n) => a({
22
- currentSpan: t.getSpan(e.active()),
23
- ...n
24
- }), l = (e) => i.currentSpan.pipe(i.option, i.flatMap((t) => i.promise(() => a(o.isSome(t) ? {
25
- currentSpan: t.value,
26
- ...e
27
- } : e))));
28
- return {
29
- handleSubmit: c,
30
- handleSubmitEffect: (e) => e?.checkErrors ? l(e?.meta).pipe(i.flatMap(i.fnUntraced(function* () {
31
- let e = n.getAllErrors();
32
- if (Object.keys(e.fields).length || e.form.errors.length) return yield* i.fail(new s({
33
- form: e.form,
34
- fields: e.fields
35
- }));
36
- }))) : l(e?.meta)
37
- };
38
- };
1
+ import "./vue-components8.es.js";
2
+ import "./vue-components11.es.js";
3
+ import "./vue-components14.es.js";
4
+ import "./vue-components15.es.js";
5
+ import "./vue-components16.es.js";
6
+ import "./vue-components18.es.js";
7
+ import "./vue-components19.es.js";
8
+ import "./vue-components20.es.js";
9
+ import "./vue-components34.es.js";
10
+ import "./vue-components36.es.js";
11
+ import "./vue-components38.es.js";
12
+ import "./vue-components40.es.js";
13
+ import "./vue-components67.es.js";
14
+ import "./vue-components68.es.js";
15
+ import "./vue-components69.es.js";
16
+ //#region src/components/OmegaForm/index.ts
17
+ var e = (e) => e;
39
18
  //#endregion
40
- export { s as FormErrors, u as makeSubmitHandlers, l as wrapOnSubmit };
19
+ export { e as duplicateSchema };
@@ -1,81 +1,48 @@
1
- import { useIntl as e } from "./vue-components6.es.js";
2
- import { generateMetaFromSchema as t } from "./vue-components14.es.js";
3
- import { defaultsValueFromSchema as n } from "./vue-components15.es.js";
4
- import { toFormSchema as r } from "./vue-components16.es.js";
5
- import { usePersistency as i } from "./vue-components18.es.js";
6
- import { annotateLiteralUnionMessages as a, toLocalizedStandardSchemaV1 as o } from "./vue-components19.es.js";
7
- import { eHoc as s, makeFieldMap as c } from "./vue-components20.es.js";
8
- import { fHoc as l } from "./vue-components21.es.js";
9
- import u from "./vue-components23.es.js";
10
- import d from "./vue-components25.es.js";
11
- import f from "./vue-components29.es.js";
12
- import p from "./vue-components36.es.js";
13
- import m from "./vue-components40.es.js";
14
- import h from "./vue-components44.es.js";
15
- import { makeSubmitHandlers as g, wrapOnSubmit as _ } from "./vue-components70.es.js";
16
- import { watch as v } from "vue";
17
- import { Context as y, S as b } from "effect-app";
18
- import { revalidateLogic as x, useForm as S } from "@tanstack/vue-form";
19
- import { makeRunPromise as C } from "@effect-app/vue/runtime";
20
- //#region src/components/OmegaForm/useOmegaForm.ts
21
- var w = Symbol("OmegaForm"), T = C(y.empty()), E = (y, C, w) => {
22
- if (!y) throw Error("Schema is required");
23
- let { trans: E } = e(), D = r(y), O = o(a(D, E), E), k = b.decodeUnknownEffectConcurrently(D), { meta: A, unionMeta: j } = t(D), M = { form: void 0 }, N = i({
24
- meta: A,
25
- persistency: w?.persistency,
26
- preventWindowExit: w?.preventWindowExit,
27
- defaultValuesPriority: w?.defaultValuesPriority,
28
- tanstackDefaultValues: C?.defaultValues,
29
- schemaDefaultValues: () => n(y),
30
- getForm: () => M.form
31
- }), P = S({
32
- ...C,
33
- validationLogic: x(),
34
- validators: {
35
- onDynamic: O,
36
- ...C?.validators
37
- },
38
- onSubmit: _(C?.onSubmit, k, T),
39
- defaultValues: N.defaultValues.value
40
- });
41
- M.form = P;
42
- let F = () => {
43
- Object.keys(A).forEach((e) => {
44
- P.setFieldValue(e, void 0);
45
- });
46
- };
47
- if (w?.preventWindowExit === "prevent-and-reset") {
48
- let e = P.useStore((e) => e.isSubmitting), t = P.useStore((e) => e.submissionAttempts), n = P.useStore((e) => e.canSubmit), r = P.useStore((e) => e.values);
49
- v([e, t], ([e, t], [i]) => {
50
- i && !e && t > 0 && n.value && P.reset(r.value);
51
- });
52
- }
53
- let { handleSubmit: I, handleSubmitEffect: L } = g(P), { fieldMap: R, registerField: z } = c(), B = Object.assign(P, {
54
- i18nNamespace: w?.i18nNamespace,
55
- ignorePreventCloseEvents: w?.ignorePreventCloseEvents,
56
- meta: A,
57
- unionMeta: j,
58
- clear: F,
59
- handleSubmit: I,
60
- handleSubmitEffect: L,
61
- registerField: z
62
- }), V = {
63
- form: B,
64
- fieldMap: R
65
- };
66
- return Object.assign(B, {
67
- _paths: void 0,
68
- _keys: void 0,
69
- _schema: y,
70
- errorContext: V,
71
- Form: l(B)(h),
72
- Input: l(B)(w?.input ?? p),
73
- TaggedUnion: l(B)(m),
74
- Field: P.Field,
75
- Errors: s(V)(f),
76
- Array: l(B)(u),
77
- AutoGen: l(B)(d)
78
- });
79
- };
1
+ import { __exportAll as e } from "./vue-components2.es.js";
2
+ import t from "./vue-components4.es.js";
3
+ import { useOnClose as n, usePreventClose as r } from "./vue-components8.es.js";
4
+ import i from "./vue-components10.es.js";
5
+ import { getInputType as a } from "./vue-components11.es.js";
6
+ import { createMeta as o, generateMetaFromSchema as s, isNullableOrUndefined as c, metadataFromAst as l } from "./vue-components14.es.js";
7
+ import { defaultsValueFromSchema as u } from "./vue-components15.es.js";
8
+ import { toFormSchema as d } from "./vue-components16.es.js";
9
+ import { deepMerge as f } from "./vue-components18.es.js";
10
+ import { makeStandardSchemaV1Hooks as p, toLocalizedStandardSchemaV1 as m } from "./vue-components19.es.js";
11
+ import { useErrorLabel as h } from "./vue-components20.es.js";
12
+ import g from "./vue-components34.es.js";
13
+ import _ from "./vue-components36.es.js";
14
+ import v from "./vue-components38.es.js";
15
+ import y from "./vue-components40.es.js";
16
+ import { FormErrors as b } from "./vue-components67.es.js";
17
+ import { OmegaFormKey as x, useOmegaForm as S } from "./vue-components68.es.js";
18
+ import { createUseFormWithCustomInput as C } from "./vue-components69.es.js";
19
+ import { duplicateSchema as w } from "./vue-components70.es.js";
20
+ //#region src/components/index.ts
21
+ var T = /* @__PURE__ */ e({
22
+ CommandButton: () => t,
23
+ Dialog: () => i,
24
+ FormErrors: () => b,
25
+ OmegaFormKey: () => x,
26
+ OmegaInput: () => _,
27
+ OmegaTaggedUnion: () => y,
28
+ OmegaTaggedUnionInternal: () => v,
29
+ OmegaVuetifyInput: () => g,
30
+ createMeta: () => o,
31
+ createUseFormWithCustomInput: () => C,
32
+ deepMerge: () => f,
33
+ defaultsValueFromSchema: () => u,
34
+ duplicateSchema: () => w,
35
+ generateMetaFromSchema: () => s,
36
+ getInputType: () => a,
37
+ isNullableOrUndefined: () => c,
38
+ makeStandardSchemaV1Hooks: () => p,
39
+ metadataFromAst: () => l,
40
+ toFormSchema: () => d,
41
+ toLocalizedStandardSchemaV1: () => m,
42
+ useErrorLabel: () => h,
43
+ useOmegaForm: () => S,
44
+ useOnClose: () => n,
45
+ usePreventClose: () => r
46
+ });
80
47
  //#endregion
81
- export { w as OmegaFormKey, E as useOmegaForm };
48
+ export { T as components_exports };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-app/vue-components",
3
- "version": "4.0.0-beta.220",
3
+ "version": "4.0.0-beta.222",
4
4
  "peerDependencies": {
5
5
  "@mdi/js": "^7.4.47",
6
6
  "effect": "^4.0.0-beta.62",
@@ -57,8 +57,8 @@
57
57
  "highlight.js": "^11.11.1",
58
58
  "mitt": "^3.0.1",
59
59
  "vue3-highlightjs": "^1.0.5",
60
- "@effect-app/vue": "4.0.0-beta.220",
61
- "effect-app": "4.0.0-beta.220"
60
+ "@effect-app/vue": "4.0.0-beta.222",
61
+ "effect-app": "4.0.0-beta.222"
62
62
  },
63
63
  "scripts": {
64
64
  "check": "vue-tsc",
@@ -3,7 +3,7 @@
3
3
  lang="ts"
4
4
  generic="I = never, RA = unknown, RE = unknown"
5
5
  >
6
- import type { CommandBase, Progress } from "@effect-app/vue"
6
+ import type { CommandBase, Progress } from "@effect-app/vue/makeClient"
7
7
  import type * as AsyncResult from "effect/unstable/reactivity/AsyncResult"
8
8
  import { computed } from "vue"
9
9
  import type { VBtn } from "vuetify/components"
@@ -20,7 +20,7 @@
20
20
  Name extends DeepKeys<From>"
21
21
  >
22
22
  import { type DeepKeys } from "@tanstack/vue-form"
23
- import { Order } from "effect-app"
23
+ import * as Order from "effect/Order"
24
24
  import { computed } from "vue"
25
25
  import { type FieldMeta } from "./meta/types"
26
26
  import { type FieldPath, type OmegaAutoGenMeta, type OmegaInputProps } from "./types"
@@ -1,4 +1,4 @@
1
- import type { S } from "effect-app"
1
+ import type * as S from "effect-app/Schema"
2
2
 
3
3
  export { getInputType, type SupportedInputs } from "./inputs"
4
4
  export { createMeta, generateMetaFromSchema, isNullableOrUndefined, metadataFromAst } from "./meta/createMeta"
@@ -1,5 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
- import { type Record, S } from "effect-app"
2
+ import * as S from "effect-app/Schema"
3
+ import type * as Record from "effect/Record"
3
4
  import type { FieldMeta } from "./types"
4
5
 
5
6
  export const getCheckMetas = (property: S.AST.AST): Array<Record<string, any>> => {
@@ -1,5 +1,7 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
- import { type Effect, type Record, S } from "effect-app"
2
+ import type * as Effect from "effect-app/Effect"
3
+ import * as S from "effect-app/Schema"
4
+ import type * as Record from "effect/Record"
3
5
  import { getTransformationFrom } from "../../../utils"
4
6
  import type { FieldMeta, MetaRecord } from "./types"
5
7
  import { classifyAndWalkUnion, leafMetaForAst, type ParentMeta, type WalkerContext, walkStruct } from "./walker"
@@ -1,5 +1,7 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
- import { Effect, Option, S } from "effect-app"
2
+ import * as Effect from "effect-app/Effect"
3
+ import * as Option from "effect-app/Option"
4
+ import * as S from "effect-app/Schema"
3
5
  import { isNullableOrUndefined, unwrapDeclaration } from "./createMeta"
4
6
 
5
7
  const extractDefaultFromLink = (link: any): unknown | undefined => {
@@ -1,4 +1,4 @@
1
- import { S } from "effect-app"
1
+ import * as S from "effect-app/Schema"
2
2
 
3
3
  /*
4
4
  * Checks if an AST node is a S.Redacted Declaration without encoding.
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  import type { DeepKeys } from "@tanstack/vue-form"
3
- import type { S } from "effect-app"
3
+ import type * as S from "effect-app/Schema"
4
4
  import type { Redacted } from "effect/Redacted"
5
5
 
6
6
  // Recursively replace Redacted<A> with its inner type so DeepKeys treats it as a leaf
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any -- AST walker interops with Effect Schema generics */
2
2
  /* eslint-disable @typescript-eslint/no-use-before-define -- mutual recursion between walk and helpers (handleStruct/handleUnion/etc.) */
3
- import { S } from "effect-app"
3
+ import * as S from "effect-app/Schema"
4
4
  import { getFieldMetadataFromAst } from "./checks"
5
5
  import { isNullableOrUndefined, unwrapDeclaration } from "./createMeta"
6
6
  import type { FieldMeta, MetaRecord, NestedKeyOf, SelectFieldMeta } from "./types"
@@ -2,8 +2,11 @@
2
2
 
3
3
  import * as api from "@opentelemetry/api"
4
4
  import type { DeepKeys, StandardSchemaV1Issue, ValidationError, ValidationErrorMap } from "@tanstack/vue-form"
5
- import { Data, Effect, Fiber, Option } from "effect-app"
5
+ import * as Effect from "effect-app/Effect"
6
+ import * as Option from "effect-app/Option"
6
7
  import { runtimeFiberAsPromise } from "effect-app/utils"
8
+ import * as Data from "effect/Data"
9
+ import * as Fiber from "effect/Fiber"
7
10
  import type { Fiber as EffectFiber } from "effect/Fiber"
8
11
  import type { OmegaFormApi, OmegaFormParams } from "./types"
9
12
 
@@ -1,8 +1,10 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  import type { DeepKeys, DeepValue, FieldApi, FieldAsyncValidateOrFn, FieldState, FieldValidateOrFn, FormApi, FormAsyncValidateOrFn, FormOptions, FormState, FormValidateOrFn, StandardSchemaV1, VueFormApi } from "@tanstack/vue-form"
3
- import type { Effect, Order, S } from "effect-app"
3
+ import type * as Effect from "effect-app/Effect"
4
+ import type * as S from "effect-app/Schema"
4
5
  import type { UnionToTuples } from "effect-app/utils"
5
6
  import type { Fiber as EffectFiber } from "effect/Fiber"
7
+ import type * as Order from "effect/Order"
6
8
  import type { Redacted } from "effect/Redacted"
7
9
  import type { AllowedComponentProps, ComponentCustomProps, ComputedRef, PublicProps, ShallowUnwrapRef, VNode, VNodeProps } from "vue"
8
10
  import type { MergedInputProps, OmegaFieldInternalApi, TaggedUnionOptionsArray } from "./InputProps"
@@ -2,7 +2,8 @@
2
2
  /* eslint-disable @typescript-eslint/no-explicit-any */
3
3
 
4
4
  import { type FormAsyncValidateOrFn, type FormValidateOrFn, revalidateLogic, type StandardSchemaV1, useForm } from "@tanstack/vue-form"
5
- import { Context, S } from "effect-app"
5
+ import * as Context from "effect-app/Context"
6
+ import * as S from "effect-app/Schema"
6
7
  import { type InjectionKey, watch } from "vue"
7
8
  import { eHoc, makeFieldMap } from "./errors"
8
9
  import { fHoc } from "./hocs"
@@ -1,4 +1,4 @@
1
- import { injectCertain } from "@effect-app/vue"
1
+ import { injectCertain } from "@effect-app/vue/makeContext"
2
2
  import { type ComputedRef, type InjectionKey, onUnmounted, provide, watch } from "vue"
3
3
 
4
4
  const Key = Symbol("injected") as InjectionKey<Map<string, { label: string; id: string }>>
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  import type { StandardSchemaV1 } from "@tanstack/vue-form"
3
- import { Option, S } from "effect-app"
3
+ import * as Option from "effect-app/Option"
4
+ import * as S from "effect-app/Schema"
4
5
  import type { useIntl } from "../../../utils"
5
6
 
6
7
  export type TransFn = ReturnType<typeof useIntl>["trans"]
@@ -1,5 +1,5 @@
1
- import { type makeIntl } from "@effect-app/vue"
2
- import type { S } from "effect-app"
1
+ import { type makeIntl } from "@effect-app/vue/makeIntl"
2
+ import type * as S from "effect-app/Schema"
3
3
  import { inject, type InjectionKey, provide } from "vue"
4
4
 
5
5
  export const useIntlKey = Symbol() as InjectionKey<
@@ -1,33 +0,0 @@
1
- import e from "./vue-components36.es.js";
2
- import { useOmegaForm as t } from "./vue-components71.es.js";
3
- import { h as n } from "vue";
4
- //#region src/components/OmegaForm/createUseFormWithCustomInput.ts
5
- var r = (r) => (...i) => {
6
- let [a, o, s] = i, c = {
7
- name: "WrappedInput",
8
- inheritAttrs: !1,
9
- setup(t, { attrs: i, slots: a }) {
10
- return () => n(e, {
11
- ...t,
12
- ...i
13
- }, {
14
- default: ({ field: e, state: t, ...o }) => n(r, {
15
- ...Object.fromEntries(Object.entries(i).filter(([e]) => !Object.prototype.hasOwnProperty.call(o, e) && e !== "form")),
16
- field: e,
17
- state: t,
18
- inputProps: o
19
- }, {
20
- ...a.label && { label: (e) => a.label(e) },
21
- ...a.default && { default: (e) => a.default(e) }
22
- }),
23
- ...a.label && { label: (e) => a.label(e) }
24
- });
25
- }
26
- };
27
- return t(a, o, {
28
- ...s,
29
- input: c
30
- });
31
- };
32
- //#endregion
33
- export { r as createUseFormWithCustomInput };
@@ -1,19 +0,0 @@
1
- import "./vue-components8.es.js";
2
- import "./vue-components11.es.js";
3
- import "./vue-components14.es.js";
4
- import "./vue-components15.es.js";
5
- import "./vue-components16.es.js";
6
- import "./vue-components18.es.js";
7
- import "./vue-components19.es.js";
8
- import "./vue-components20.es.js";
9
- import "./vue-components34.es.js";
10
- import "./vue-components36.es.js";
11
- import "./vue-components38.es.js";
12
- import "./vue-components40.es.js";
13
- import "./vue-components70.es.js";
14
- import "./vue-components71.es.js";
15
- import "./vue-components72.es.js";
16
- //#region src/components/OmegaForm/index.ts
17
- var e = (e) => e;
18
- //#endregion
19
- export { e as duplicateSchema };
@@ -1,48 +0,0 @@
1
- import { __exportAll as e } from "./vue-components2.es.js";
2
- import t from "./vue-components4.es.js";
3
- import { useOnClose as n, usePreventClose as r } from "./vue-components8.es.js";
4
- import i from "./vue-components10.es.js";
5
- import { getInputType as a } from "./vue-components11.es.js";
6
- import { createMeta as o, generateMetaFromSchema as s, isNullableOrUndefined as c, metadataFromAst as l } from "./vue-components14.es.js";
7
- import { defaultsValueFromSchema as u } from "./vue-components15.es.js";
8
- import { toFormSchema as d } from "./vue-components16.es.js";
9
- import { deepMerge as f } from "./vue-components18.es.js";
10
- import { makeStandardSchemaV1Hooks as p, toLocalizedStandardSchemaV1 as m } from "./vue-components19.es.js";
11
- import { useErrorLabel as h } from "./vue-components20.es.js";
12
- import g from "./vue-components34.es.js";
13
- import _ from "./vue-components36.es.js";
14
- import v from "./vue-components38.es.js";
15
- import y from "./vue-components40.es.js";
16
- import { FormErrors as b } from "./vue-components70.es.js";
17
- import { OmegaFormKey as x, useOmegaForm as S } from "./vue-components71.es.js";
18
- import { createUseFormWithCustomInput as C } from "./vue-components72.es.js";
19
- import { duplicateSchema as w } from "./vue-components73.es.js";
20
- //#region src/components/index.ts
21
- var T = /* @__PURE__ */ e({
22
- CommandButton: () => t,
23
- Dialog: () => i,
24
- FormErrors: () => b,
25
- OmegaFormKey: () => x,
26
- OmegaInput: () => _,
27
- OmegaTaggedUnion: () => y,
28
- OmegaTaggedUnionInternal: () => v,
29
- OmegaVuetifyInput: () => g,
30
- createMeta: () => o,
31
- createUseFormWithCustomInput: () => C,
32
- deepMerge: () => f,
33
- defaultsValueFromSchema: () => u,
34
- duplicateSchema: () => w,
35
- generateMetaFromSchema: () => s,
36
- getInputType: () => a,
37
- isNullableOrUndefined: () => c,
38
- makeStandardSchemaV1Hooks: () => p,
39
- metadataFromAst: () => l,
40
- toFormSchema: () => d,
41
- toLocalizedStandardSchemaV1: () => m,
42
- useErrorLabel: () => h,
43
- useOmegaForm: () => S,
44
- useOnClose: () => n,
45
- usePreventClose: () => r
46
- });
47
- //#endregion
48
- export { T as components_exports };