@effect-app/vue-components 0.27.14 → 0.27.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  import { type DeepKeys, type DeepValue } from "@tanstack/vue-form";
2
2
  import { type OmegaInputProps } from "./OmegaFormStuff";
3
- declare const _default: <From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>>(__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<{
3
+ declare const _default: <// dprint ignore - somehow with 120 chars, this becomes a mess. should report it.
4
+ From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>>(__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<{
4
5
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & (Omit<OmegaInputProps<From, To>, "label" | "type" | "options" | "validators" | "items"> & {
5
6
  defaultItems?: DeepValue<From, DeepKeys<From>>;
6
7
  items?: "please use `defaultItems` instead";
@@ -1,5 +1,6 @@
1
1
  import { type OmegaInputProps } from "./OmegaFormStuff";
2
- declare const _default: <From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>>(__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<{
2
+ declare const _default: <// dprint ignore - somehow with 120 chars, this becomes a mess. should report it.
3
+ From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>>(__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<{
3
4
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & OmegaInputProps<From, To> & {}> & import("vue").PublicProps;
4
5
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
5
6
  attrs: any;
@@ -1,13 +1,13 @@
1
1
  import { type S } from "effect-app";
2
2
  import { type FormProps, type OmegaFormState, type ShowErrorsOn } from "./OmegaFormStuff";
3
- import { type OmegaConfig, type OmegaFormReturn } from "./useOmegaForm";
4
- declare const _default: <From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>, K extends keyof OmegaFormState<From, To> = keyof OmegaFormState<From, To>>(__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<{
3
+ import { type DefaultInputProps, type OmegaConfig, type OmegaFormReturn } from "./useOmegaForm";
4
+ declare const _default: <From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>, K extends keyof OmegaFormState<From, To> = keyof OmegaFormState<From, To>, Props = DefaultInputProps<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<{
5
5
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & ({
6
6
  omegaConfig?: OmegaConfig<From>;
7
7
  subscribe?: K[];
8
8
  showErrorsOn?: ShowErrorsOn;
9
9
  } & Omit<FormProps<From, To>, "onSubmit"> & (({
10
- form: OmegaFormReturn<From, To>;
10
+ form: OmegaFormReturn<From, To, Props>;
11
11
  schema?: undefined;
12
12
  } | {
13
13
  form?: undefined;
@@ -33,7 +33,7 @@ export declare const OmegaFormKey: InjectionKey<OF<any, any>>;
33
33
  type __VLS_PrettifyLocal<T> = {
34
34
  [K in keyof T]: T[K];
35
35
  } & {};
36
- type DefaultProps<From> = {
36
+ export type DefaultInputProps<From> = {
37
37
  label?: string;
38
38
  validators?: FieldValidators<From>;
39
39
  options?: {
@@ -42,7 +42,7 @@ type DefaultProps<From> = {
42
42
  }[];
43
43
  type?: TypeOverride;
44
44
  };
45
- export interface OmegaFormReturn<From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>, Props = DefaultProps<From>> extends OF<From, To> {
45
+ export interface OmegaFormReturn<From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>, Props = DefaultInputProps<From>> extends OF<From, To> {
46
46
  Input: <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<{
47
47
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & {
48
48
  name: Name;
@@ -57,5 +57,5 @@ export interface OmegaFormReturn<From extends Record<PropertyKey, any>, To exten
57
57
  __ctx?: Awaited<typeof __VLS_setup>;
58
58
  };
59
59
  }
60
- export declare const useOmegaForm: <From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>, Props = DefaultProps<From>>(schema: S.Schema<To, From, never>, tanstackFormOptions?: NoInfer<FormProps<From, To>>, omegaConfig?: OmegaConfig<To>) => OmegaFormReturn<From, To, Props>;
60
+ export declare const useOmegaForm: <From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>, Props = DefaultInputProps<From>>(schema: S.Schema<To, From, never>, tanstackFormOptions?: NoInfer<FormProps<From, To>>, omegaConfig?: OmegaConfig<To>) => OmegaFormReturn<From, To, Props>;
61
61
  export {};
@@ -1,6 +1,6 @@
1
1
  import { S as n, Option as c, pipe as L } from "effect-app";
2
2
  import { useIntl as U } from "./vue-components.es3.js";
3
- const _ = n.NonEmptyArray(n.String), N = (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 = {}) => {
3
+ const N = n.NonEmptyArray(n.String), _ = (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 = {}) => {
4
4
  if (t && t._tag === "Transformation")
5
5
  return m({
6
6
  parent: i,
@@ -18,7 +18,7 @@ const _ = n.NonEmptyArray(n.String), N = (e) => n.AST.isUnion(e) && e.types.find
18
18
  if (n.AST.isUnion(r.type)) {
19
19
  const T = r.type.types.filter(
20
20
  (s) => s._tag !== "UndefinedKeyword" && s !== n.Null.ast
21
- );
21
+ ).map((s) => s._tag === "Transformation" ? s.from : s);
22
22
  if (T.some(
23
23
  (s) => "propertySignatures" in s
24
24
  )) {
@@ -156,7 +156,7 @@ const _ = n.NonEmptyArray(n.String), N = (e) => n.AST.isUnion(e) && e.types.find
156
156
  return o;
157
157
  }
158
158
  if (t) {
159
- const r = N(t);
159
+ const r = _(t);
160
160
  if (Object.hasOwnProperty.call(e, "required") || (e.required = !r), n.AST.isUnion(t)) {
161
161
  const a = t.types.find(
162
162
  (u) => u._tag !== "UndefinedKeyword" && u !== n.Null.ast
@@ -226,7 +226,7 @@ const _ = n.NonEmptyArray(n.String), N = (e) => n.AST.isUnion(e) && e.types.find
226
226
  c.liftPredicate((p) => p._tag === "Refinement" && "filter" in p),
227
227
  c.flatMap((p) => n.AST.getJSONSchemaAnnotation(p)),
228
228
  c.filter((p) => "items" in p),
229
- c.filterMap(({ items: p }) => n.decodeUnknownOption(_)(p)),
229
+ c.filterMap(({ items: p }) => n.decodeUnknownOption(N)(p)),
230
230
  c.zipWith(
231
231
  n.AST.getMessageAnnotation(e.ast),
232
232
  (p, o) => ({
@@ -1,8 +1,8 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-5ae97f5e]{display:contents}fieldset[disabled][data-v-5ae97f5e]>*{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-5ae97f5e]{display:contents}fieldset[disabled][data-v-5ae97f5e]>*{pointer-events:none}")),this.shadowRoot.appendChild(o)}},e.call(window.customElements,i,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-fc6624a3]{display:contents}fieldset[disabled][data-v-fc6624a3]>*{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-fc6624a3]{display:contents}fieldset[disabled][data-v-fc6624a3]>*{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
2
  import o from "./vue-components.es20.js";
3
3
 
4
4
  import r from "./vue-components.es17.js";
5
- const t = /* @__PURE__ */ r(o, [["__scopeId", "data-v-5ae97f5e"]]);
5
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-fc6624a3"]]);
6
6
  export {
7
- t as default
7
+ m as default
8
8
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as M, getCurrentInstance as B, computed as u, onBeforeMount as L, watch as S, provide as C, createElementBlock as O, openBlock as h, withModifiers as V, createElementVNode as k, unref as m, renderSlot as p, createCommentVNode as K, Fragment as _ } from "vue";
2
2
  import { useStore as y } from "@tanstack/vue-form";
3
- import { getOmegaStore as $ } from "./vue-components.es27.js";
3
+ import { getOmegaStore as $ } from "./vue-components.es26.js";
4
4
  import { provideOmegaErrors as A } from "./vue-components.es8.js";
5
5
  import { useOmegaForm as W, OmegaFormKey as P } from "./vue-components.es9.js";
6
6
  const x = ["disabled"], q = /* @__PURE__ */ M({
@@ -1,92 +1,13 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");if(i.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),document.head.appendChild(i),window.customElements){const e=window.customElements.define;window.customElements.define=function(s,t){const n=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(n&&n.call(this),this.shadowRoot){const a=document.createElement("style");a.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),this.shadowRoot.appendChild(a)}},e.call(window.customElements,s,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import { defineComponent as w, getCurrentInstance as x, useId as C, computed as a, watch as f, nextTick as N, onMounted as d, ref as $, watchEffect as k, renderSlot as B, normalizeProps as I, guardReactiveProps as O, createElementVNode as _, normalizeClass as q, createBlock as L, createCommentVNode as P, unref as F, openBlock as S, mergeProps as T } from "vue";
3
- import { useStore as z } from "@tanstack/vue-form";
4
- import { useOmegaErrors as A } from "./vue-components.es8.js";
5
- import D from "./vue-components.es48.js";
6
-
7
- const J = /* @__PURE__ */ w({
8
- inheritAttrs: !1,
9
- __name: "OmegaInternalInput",
10
- props: {
11
- field: {},
12
- meta: {},
13
- label: {},
14
- options: {},
15
- type: {},
16
- validators: {}
17
- },
18
- setup(c) {
19
- const e = c, v = x()?.appContext.components.VTextField, l = C(), o = e.field, r = z(o.store, (t) => t), m = a(() => e.type ? e.type : e.meta?.type === "string" ? e.meta.format === "email" ? "email" : "string" : e.meta?.type || "unknown"), n = a(() => r.value.value), g = a(
20
- () => (
21
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
22
- r.value.meta.errors.map((t) => t?.message).filter(Boolean)
23
- )
24
- ), y = (t) => t == null || t === !1 || t === "" || Number.isNaN(t);
25
- f(
26
- () => !!n.value,
27
- () => {
28
- y(n.value) && e.meta?.type !== "boolean" && N(() => {
29
- o.setValue(
30
- e.meta?.nullableOrUndefined === "undefined" ? void 0 : null
31
- );
32
- });
33
- }
34
- ), d(() => {
35
- !n.value && !e.meta?.required && e.meta?.nullableOrUndefined === "null" && o.setValue(null);
36
- });
37
- const { addError: h, removeError: b, showErrors: E, showErrorsOn: V } = A(), s = $(!1);
38
- k(() => {
39
- (E.value || V === "onChange") && (s.value = !0);
40
- });
41
- const u = () => {
42
- s.value = !0;
43
- };
44
- d(() => {
45
- n.value && u();
46
- });
47
- const p = a(() => !s.value && m.value !== "select" ? [] : g.value);
48
- f(
49
- () => r.value.meta.errors,
50
- () => {
51
- r.value.meta.errors.length ? h({
52
- inputId: l,
53
- errors: r.value.meta.errors.map((t) => t.message).filter(Boolean),
54
- label: e.label
55
- }) : b(l);
56
- }
57
- );
58
- const i = a(() => ({
59
- id: l,
60
- required: e.meta?.required,
61
- minLength: e.meta?.type === "string" && e.meta?.minLength,
62
- maxLength: e.meta?.type === "string" && e.meta?.maxLength,
63
- max: e.meta?.type === "number" && e.meta?.maximum,
64
- min: e.meta?.type === "number" && e.meta?.minimum,
65
- name: e.field.name,
66
- modelValue: e.field.state.value,
67
- errorMessages: p.value,
68
- error: !!p.value.length,
69
- field: e.field,
70
- setRealDirty: u,
71
- type: m.value,
72
- label: `${e.label}${e.meta?.required ? " *" : ""}`,
73
- options: e.options
74
- }));
75
- return (t, R) => B(t.$slots, "default", I(O(i.value)), () => [
76
- _("div", {
77
- class: q(t.$attrs.class),
78
- onFocusout: u
79
- }, [
80
- F(v) ? (S(), L(D, T({
81
- key: 0,
82
- "input-props": i.value
83
- }, t.$attrs, {
84
- "vuetify-value": i.value.field.state.value
85
- }), null, 16, ["input-props", "vuetify-value"])) : P("", !0)
86
- ], 34)
87
- ]);
88
- }
89
- });
1
+ import { useStore as u } from "@tanstack/vue-form";
2
+ import { computed as f } from "vue";
3
+ function c(o, t) {
4
+ return f(() => t ? u(o.store, (n) => {
5
+ const r = {};
6
+ for (const e of t)
7
+ r[e] = n[e];
8
+ return r;
9
+ }).value : {});
10
+ }
90
11
  export {
91
- J as default
12
+ c as getOmegaStore
92
13
  };
@@ -1,13 +1,92 @@
1
- import { useStore as u } from "@tanstack/vue-form";
2
- import { computed as f } from "vue";
3
- function c(o, t) {
4
- return f(() => t ? u(o.store, (n) => {
5
- const r = {};
6
- for (const e of t)
7
- r[e] = n[e];
8
- return r;
9
- }).value : {});
10
- }
1
+ (function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");if(i.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),document.head.appendChild(i),window.customElements){const e=window.customElements.define;window.customElements.define=function(s,t){const n=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(n&&n.call(this),this.shadowRoot){const a=document.createElement("style");a.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),this.shadowRoot.appendChild(a)}},e.call(window.customElements,s,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import { defineComponent as w, getCurrentInstance as x, useId as C, computed as a, watch as f, nextTick as N, onMounted as d, ref as $, watchEffect as k, renderSlot as B, normalizeProps as I, guardReactiveProps as O, createElementVNode as _, normalizeClass as q, createBlock as L, createCommentVNode as P, unref as F, openBlock as S, mergeProps as T } from "vue";
3
+ import { useStore as z } from "@tanstack/vue-form";
4
+ import { useOmegaErrors as A } from "./vue-components.es8.js";
5
+ import D from "./vue-components.es48.js";
6
+
7
+ const J = /* @__PURE__ */ w({
8
+ inheritAttrs: !1,
9
+ __name: "OmegaInternalInput",
10
+ props: {
11
+ field: {},
12
+ meta: {},
13
+ label: {},
14
+ options: {},
15
+ type: {},
16
+ validators: {}
17
+ },
18
+ setup(c) {
19
+ const e = c, v = x()?.appContext.components.VTextField, l = C(), o = e.field, r = z(o.store, (t) => t), m = a(() => e.type ? e.type : e.meta?.type === "string" ? e.meta.format === "email" ? "email" : "string" : e.meta?.type || "unknown"), n = a(() => r.value.value), g = a(
20
+ () => (
21
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
22
+ r.value.meta.errors.map((t) => t?.message).filter(Boolean)
23
+ )
24
+ ), y = (t) => t == null || t === !1 || t === "" || Number.isNaN(t);
25
+ f(
26
+ () => !!n.value,
27
+ () => {
28
+ y(n.value) && e.meta?.type !== "boolean" && N(() => {
29
+ o.setValue(
30
+ e.meta?.nullableOrUndefined === "undefined" ? void 0 : null
31
+ );
32
+ });
33
+ }
34
+ ), d(() => {
35
+ !n.value && !e.meta?.required && e.meta?.nullableOrUndefined === "null" && o.setValue(null);
36
+ });
37
+ const { addError: h, removeError: b, showErrors: E, showErrorsOn: V } = A(), s = $(!1);
38
+ k(() => {
39
+ (E.value || V === "onChange") && (s.value = !0);
40
+ });
41
+ const u = () => {
42
+ s.value = !0;
43
+ };
44
+ d(() => {
45
+ n.value && u();
46
+ });
47
+ const p = a(() => !s.value && m.value !== "select" ? [] : g.value);
48
+ f(
49
+ () => r.value.meta.errors,
50
+ () => {
51
+ r.value.meta.errors.length ? h({
52
+ inputId: l,
53
+ errors: r.value.meta.errors.map((t) => t.message).filter(Boolean),
54
+ label: e.label
55
+ }) : b(l);
56
+ }
57
+ );
58
+ const i = a(() => ({
59
+ id: l,
60
+ required: e.meta?.required,
61
+ minLength: e.meta?.type === "string" && e.meta?.minLength,
62
+ maxLength: e.meta?.type === "string" && e.meta?.maxLength,
63
+ max: e.meta?.type === "number" && e.meta?.maximum,
64
+ min: e.meta?.type === "number" && e.meta?.minimum,
65
+ name: e.field.name,
66
+ modelValue: e.field.state.value,
67
+ errorMessages: p.value,
68
+ error: !!p.value.length,
69
+ field: e.field,
70
+ setRealDirty: u,
71
+ type: m.value,
72
+ label: `${e.label}${e.meta?.required ? " *" : ""}`,
73
+ options: e.options
74
+ }));
75
+ return (t, R) => B(t.$slots, "default", I(O(i.value)), () => [
76
+ _("div", {
77
+ class: q(t.$attrs.class),
78
+ onFocusout: u
79
+ }, [
80
+ F(v) ? (S(), L(D, T({
81
+ key: 0,
82
+ "input-props": i.value
83
+ }, t.$attrs, {
84
+ "vuetify-value": i.value.field.state.value
85
+ }), null, 16, ["input-props", "vuetify-value"])) : P("", !0)
86
+ ], 34)
87
+ ]);
88
+ }
89
+ });
11
90
  export {
12
- c as getOmegaStore
91
+ J as default
13
92
  };
@@ -1,4 +1,4 @@
1
- import f from "./vue-components.es26.js";
1
+ import f from "./vue-components.es27.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import { ContextAPI as l } from "./vue-components.es40.js";
2
- import { getSpanContext as m, setSpan as d } from "./vue-components.es42.js";
2
+ import { getSpanContext as m, setSpan as d } from "./vue-components.es46.js";
3
3
  import { NonRecordingSpan as p } from "./vue-components.es39.js";
4
4
  import { isSpanContextValid as S } from "./vue-components.es37.js";
5
5
  var f = l.getInstance(), I = (
@@ -1,6 +1,6 @@
1
1
  import { NoopContextManager as f } from "./vue-components.es47.js";
2
- import { registerGlobal as s, getGlobal as p, unregisterGlobal as g } from "./vue-components.es46.js";
3
- import { DiagAPI as u } from "./vue-components.es43.js";
2
+ import { registerGlobal as s, getGlobal as p, unregisterGlobal as g } from "./vue-components.es45.js";
3
+ import { DiagAPI as u } from "./vue-components.es42.js";
4
4
  var y = function(t, e) {
5
5
  var a = typeof Symbol == "function" && t[Symbol.iterator];
6
6
  if (!a) return t;
@@ -1,8 +1,8 @@
1
- import { registerGlobal as a, getGlobal as p, unregisterGlobal as s } from "./vue-components.es46.js";
1
+ import { registerGlobal as a, getGlobal as p, unregisterGlobal as s } from "./vue-components.es45.js";
2
2
  import { ProxyTracerProvider as i } from "./vue-components.es34.js";
3
3
  import { wrapSpanContext as c, isSpanContextValid as h } from "./vue-components.es37.js";
4
- import { deleteSpan as g, getSpan as S, getActiveSpan as x, getSpanContext as d, setSpan as f, setSpanContext as l } from "./vue-components.es42.js";
5
- import { DiagAPI as o } from "./vue-components.es43.js";
4
+ import { deleteSpan as g, getSpan as S, getActiveSpan as x, getSpanContext as d, setSpan as f, setSpanContext as l } from "./vue-components.es46.js";
5
+ import { DiagAPI as o } from "./vue-components.es42.js";
6
6
  var n = "trace", y = (
7
7
  /** @class */
8
8
  (function() {
@@ -1,31 +1,67 @@
1
- import { createContextKey as o } from "./vue-components.es30.js";
2
- import { NonRecordingSpan as a } from "./vue-components.es39.js";
3
- import { ContextAPI as u } from "./vue-components.es40.js";
4
- var n = o("OpenTelemetry Context Key SPAN");
5
- function r(e) {
6
- return e.getValue(n) || void 0;
7
- }
8
- function S() {
9
- return r(u.getInstance().active());
10
- }
11
- function i(e, t) {
12
- return e.setValue(n, t);
13
- }
14
- function l(e) {
15
- return e.deleteValue(n);
16
- }
17
- function d(e, t) {
18
- return i(e, new a(t));
19
- }
20
- function m(e) {
21
- var t;
22
- return (t = r(e)) === null || t === void 0 ? void 0 : t.spanContext();
23
- }
1
+ import { DiagComponentLogger as m } from "./vue-components.es43.js";
2
+ import { createLogLevelDiagLogger as y } from "./vue-components.es44.js";
3
+ import { DiagLogLevel as d } from "./vue-components.es31.js";
4
+ import { unregisterGlobal as p, getGlobal as v, registerGlobal as w } from "./vue-components.es45.js";
5
+ var b = function(i, n) {
6
+ var r = typeof Symbol == "function" && i[Symbol.iterator];
7
+ if (!r) return i;
8
+ var t = r.call(i), a, e = [], o;
9
+ try {
10
+ for (; (n === void 0 || n-- > 0) && !(a = t.next()).done; ) e.push(a.value);
11
+ } catch (l) {
12
+ o = { error: l };
13
+ } finally {
14
+ try {
15
+ a && !a.done && (r = t.return) && r.call(t);
16
+ } finally {
17
+ if (o) throw o.error;
18
+ }
19
+ }
20
+ return e;
21
+ }, _ = function(i, n, r) {
22
+ if (r || arguments.length === 2) for (var t = 0, a = n.length, e; t < a; t++)
23
+ (e || !(t in n)) && (e || (e = Array.prototype.slice.call(n, 0, t)), e[t] = n[t]);
24
+ return i.concat(e || Array.prototype.slice.call(n));
25
+ }, h = "diag", P = (
26
+ /** @class */
27
+ (function() {
28
+ function i() {
29
+ function n(a) {
30
+ return function() {
31
+ for (var e = [], o = 0; o < arguments.length; o++)
32
+ e[o] = arguments[o];
33
+ var l = v("diag");
34
+ if (l)
35
+ return l[a].apply(l, _([], b(e), !1));
36
+ };
37
+ }
38
+ var r = this, t = function(a, e) {
39
+ var o, l, g;
40
+ if (e === void 0 && (e = { logLevel: d.INFO }), a === r) {
41
+ var u = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
42
+ return r.error((o = u.stack) !== null && o !== void 0 ? o : u.message), !1;
43
+ }
44
+ typeof e == "number" && (e = {
45
+ logLevel: e
46
+ });
47
+ var f = v("diag"), s = y((l = e.logLevel) !== null && l !== void 0 ? l : d.INFO, a);
48
+ if (f && !e.suppressOverrideMessage) {
49
+ var c = (g = new Error().stack) !== null && g !== void 0 ? g : "<failed to generate stacktrace>";
50
+ f.warn("Current logger will be overwritten from " + c), s.warn("Current logger will overwrite one already registered from " + c);
51
+ }
52
+ return w("diag", s, r, !0);
53
+ };
54
+ r.setLogger = t, r.disable = function() {
55
+ p(h, r);
56
+ }, r.createComponentLogger = function(a) {
57
+ return new m(a);
58
+ }, r.verbose = n("verbose"), r.debug = n("debug"), r.info = n("info"), r.warn = n("warn"), r.error = n("error");
59
+ }
60
+ return i.instance = function() {
61
+ return this._instance || (this._instance = new i()), this._instance;
62
+ }, i;
63
+ })()
64
+ );
24
65
  export {
25
- l as deleteSpan,
26
- S as getActiveSpan,
27
- r as getSpan,
28
- m as getSpanContext,
29
- i as setSpan,
30
- d as setSpanContext
66
+ P as DiagAPI
31
67
  };
@@ -1,67 +1,58 @@
1
- import { DiagComponentLogger as m } from "./vue-components.es44.js";
2
- import { createLogLevelDiagLogger as y } from "./vue-components.es45.js";
3
- import { DiagLogLevel as d } from "./vue-components.es31.js";
4
- import { unregisterGlobal as p, getGlobal as v, registerGlobal as w } from "./vue-components.es46.js";
5
- var b = function(i, n) {
6
- var r = typeof Symbol == "function" && i[Symbol.iterator];
7
- if (!r) return i;
8
- var t = r.call(i), a, e = [], o;
1
+ import { getGlobal as f } from "./vue-components.es45.js";
2
+ var p = function(n, e) {
3
+ var r = typeof Symbol == "function" && n[Symbol.iterator];
4
+ if (!r) return n;
5
+ var t = r.call(n), o, a = [], g;
9
6
  try {
10
- for (; (n === void 0 || n-- > 0) && !(a = t.next()).done; ) e.push(a.value);
11
- } catch (l) {
12
- o = { error: l };
7
+ for (; (e === void 0 || e-- > 0) && !(o = t.next()).done; ) a.push(o.value);
8
+ } catch (s) {
9
+ g = { error: s };
13
10
  } finally {
14
11
  try {
15
- a && !a.done && (r = t.return) && r.call(t);
12
+ o && !o.done && (r = t.return) && r.call(t);
16
13
  } finally {
17
- if (o) throw o.error;
14
+ if (g) throw g.error;
18
15
  }
19
16
  }
20
- return e;
21
- }, _ = function(i, n, r) {
22
- if (r || arguments.length === 2) for (var t = 0, a = n.length, e; t < a; t++)
23
- (e || !(t in n)) && (e || (e = Array.prototype.slice.call(n, 0, t)), e[t] = n[t]);
24
- return i.concat(e || Array.prototype.slice.call(n));
25
- }, h = "diag", P = (
17
+ return a;
18
+ }, l = function(n, e, r) {
19
+ if (r || arguments.length === 2) for (var t = 0, o = e.length, a; t < o; t++)
20
+ (a || !(t in e)) && (a || (a = Array.prototype.slice.call(e, 0, t)), a[t] = e[t]);
21
+ return n.concat(a || Array.prototype.slice.call(e));
22
+ }, i = (
26
23
  /** @class */
27
24
  (function() {
28
- function i() {
29
- function n(a) {
30
- return function() {
31
- for (var e = [], o = 0; o < arguments.length; o++)
32
- e[o] = arguments[o];
33
- var l = v("diag");
34
- if (l)
35
- return l[a].apply(l, _([], b(e), !1));
36
- };
37
- }
38
- var r = this, t = function(a, e) {
39
- var o, l, g;
40
- if (e === void 0 && (e = { logLevel: d.INFO }), a === r) {
41
- var u = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
42
- return r.error((o = u.stack) !== null && o !== void 0 ? o : u.message), !1;
43
- }
44
- typeof e == "number" && (e = {
45
- logLevel: e
46
- });
47
- var f = v("diag"), s = y((l = e.logLevel) !== null && l !== void 0 ? l : d.INFO, a);
48
- if (f && !e.suppressOverrideMessage) {
49
- var c = (g = new Error().stack) !== null && g !== void 0 ? g : "<failed to generate stacktrace>";
50
- f.warn("Current logger will be overwritten from " + c), s.warn("Current logger will overwrite one already registered from " + c);
51
- }
52
- return w("diag", s, r, !0);
53
- };
54
- r.setLogger = t, r.disable = function() {
55
- p(h, r);
56
- }, r.createComponentLogger = function(a) {
57
- return new m(a);
58
- }, r.verbose = n("verbose"), r.debug = n("debug"), r.info = n("info"), r.warn = n("warn"), r.error = n("error");
25
+ function n(e) {
26
+ this._namespace = e.namespace || "DiagComponentLogger";
59
27
  }
60
- return i.instance = function() {
61
- return this._instance || (this._instance = new i()), this._instance;
62
- }, i;
28
+ return n.prototype.debug = function() {
29
+ for (var e = [], r = 0; r < arguments.length; r++)
30
+ e[r] = arguments[r];
31
+ return u("debug", this._namespace, e);
32
+ }, n.prototype.error = function() {
33
+ for (var e = [], r = 0; r < arguments.length; r++)
34
+ e[r] = arguments[r];
35
+ return u("error", this._namespace, e);
36
+ }, n.prototype.info = function() {
37
+ for (var e = [], r = 0; r < arguments.length; r++)
38
+ e[r] = arguments[r];
39
+ return u("info", this._namespace, e);
40
+ }, n.prototype.warn = function() {
41
+ for (var e = [], r = 0; r < arguments.length; r++)
42
+ e[r] = arguments[r];
43
+ return u("warn", this._namespace, e);
44
+ }, n.prototype.verbose = function() {
45
+ for (var e = [], r = 0; r < arguments.length; r++)
46
+ e[r] = arguments[r];
47
+ return u("verbose", this._namespace, e);
48
+ }, n;
63
49
  })()
64
50
  );
51
+ function u(n, e, r) {
52
+ var t = f("diag");
53
+ if (t)
54
+ return r.unshift(e), t[n].apply(t, l([], p(r), !1));
55
+ }
65
56
  export {
66
- P as DiagAPI
57
+ i as DiagComponentLogger
67
58
  };
@@ -1,58 +1,19 @@
1
- import { getGlobal as f } from "./vue-components.es46.js";
2
- var p = function(n, e) {
3
- var r = typeof Symbol == "function" && n[Symbol.iterator];
4
- if (!r) return n;
5
- var t = r.call(n), o, a = [], g;
6
- try {
7
- for (; (e === void 0 || e-- > 0) && !(o = t.next()).done; ) a.push(o.value);
8
- } catch (s) {
9
- g = { error: s };
10
- } finally {
11
- try {
12
- o && !o.done && (r = t.return) && r.call(t);
13
- } finally {
14
- if (g) throw g.error;
15
- }
1
+ import { DiagLogLevel as r } from "./vue-components.es31.js";
2
+ function c(n, o) {
3
+ n < r.NONE ? n = r.NONE : n > r.ALL && (n = r.ALL), o = o || {};
4
+ function i(t, f) {
5
+ var e = o[t];
6
+ return typeof e == "function" && n >= f ? e.bind(o) : function() {
7
+ };
16
8
  }
17
- return a;
18
- }, l = function(n, e, r) {
19
- if (r || arguments.length === 2) for (var t = 0, o = e.length, a; t < o; t++)
20
- (a || !(t in e)) && (a || (a = Array.prototype.slice.call(e, 0, t)), a[t] = e[t]);
21
- return n.concat(a || Array.prototype.slice.call(e));
22
- }, i = (
23
- /** @class */
24
- (function() {
25
- function n(e) {
26
- this._namespace = e.namespace || "DiagComponentLogger";
27
- }
28
- return n.prototype.debug = function() {
29
- for (var e = [], r = 0; r < arguments.length; r++)
30
- e[r] = arguments[r];
31
- return u("debug", this._namespace, e);
32
- }, n.prototype.error = function() {
33
- for (var e = [], r = 0; r < arguments.length; r++)
34
- e[r] = arguments[r];
35
- return u("error", this._namespace, e);
36
- }, n.prototype.info = function() {
37
- for (var e = [], r = 0; r < arguments.length; r++)
38
- e[r] = arguments[r];
39
- return u("info", this._namespace, e);
40
- }, n.prototype.warn = function() {
41
- for (var e = [], r = 0; r < arguments.length; r++)
42
- e[r] = arguments[r];
43
- return u("warn", this._namespace, e);
44
- }, n.prototype.verbose = function() {
45
- for (var e = [], r = 0; r < arguments.length; r++)
46
- e[r] = arguments[r];
47
- return u("verbose", this._namespace, e);
48
- }, n;
49
- })()
50
- );
51
- function u(n, e, r) {
52
- var t = f("diag");
53
- if (t)
54
- return r.unshift(e), t[n].apply(t, l([], p(r), !1));
9
+ return {
10
+ error: i("error", r.ERROR),
11
+ warn: i("warn", r.WARN),
12
+ info: i("info", r.INFO),
13
+ debug: i("debug", r.DEBUG),
14
+ verbose: i("verbose", r.VERBOSE)
15
+ };
55
16
  }
56
17
  export {
57
- i as DiagComponentLogger
18
+ c as createLogLevelDiagLogger
58
19
  };
@@ -1,19 +1,35 @@
1
- import { DiagLogLevel as r } from "./vue-components.es31.js";
2
- function c(n, o) {
3
- n < r.NONE ? n = r.NONE : n > r.ALL && (n = r.ALL), o = o || {};
4
- function i(t, f) {
5
- var e = o[t];
6
- return typeof e == "function" && n >= f ? e.bind(o) : function() {
7
- };
8
- }
9
- return {
10
- error: i("error", r.ERROR),
11
- warn: i("warn", r.WARN),
12
- info: i("info", r.INFO),
13
- debug: i("debug", r.DEBUG),
14
- verbose: i("verbose", r.VERBOSE)
1
+ import { VERSION as t } from "./vue-components.es50.js";
2
+ import { isCompatible as f } from "./vue-components.es51.js";
3
+ import { _globalThis as m } from "./vue-components.es52.js";
4
+ var u = t.split(".")[0], n = Symbol.for("opentelemetry.js.api." + u), l = m;
5
+ function d(r, o, e, i) {
6
+ var v;
7
+ i === void 0 && (i = !1);
8
+ var s = l[n] = (v = l[n]) !== null && v !== void 0 ? v : {
9
+ version: t
15
10
  };
11
+ if (!i && s[r]) {
12
+ var a = new Error("@opentelemetry/api: Attempted duplicate registration of API: " + r);
13
+ return e.error(a.stack || a.message), !1;
14
+ }
15
+ if (s.version !== t) {
16
+ var a = new Error("@opentelemetry/api: Registration of version v" + s.version + " for " + r + " does not match previously registered API v" + t);
17
+ return e.error(a.stack || a.message), !1;
18
+ }
19
+ return s[r] = o, e.debug("@opentelemetry/api: Registered a global for " + r + " v" + t + "."), !0;
20
+ }
21
+ function E(r) {
22
+ var o, e, i = (o = l[n]) === null || o === void 0 ? void 0 : o.version;
23
+ if (!(!i || !f(i)))
24
+ return (e = l[n]) === null || e === void 0 ? void 0 : e[r];
25
+ }
26
+ function _(r, o) {
27
+ o.debug("@opentelemetry/api: Unregistering a global for " + r + " v" + t + ".");
28
+ var e = l[n];
29
+ e && delete e[r];
16
30
  }
17
31
  export {
18
- c as createLogLevelDiagLogger
32
+ E as getGlobal,
33
+ d as registerGlobal,
34
+ _ as unregisterGlobal
19
35
  };
@@ -1,35 +1,31 @@
1
- import { VERSION as t } from "./vue-components.es50.js";
2
- import { isCompatible as f } from "./vue-components.es51.js";
3
- import { _globalThis as m } from "./vue-components.es52.js";
4
- var u = t.split(".")[0], n = Symbol.for("opentelemetry.js.api." + u), l = m;
5
- function d(r, o, e, i) {
6
- var v;
7
- i === void 0 && (i = !1);
8
- var s = l[n] = (v = l[n]) !== null && v !== void 0 ? v : {
9
- version: t
10
- };
11
- if (!i && s[r]) {
12
- var a = new Error("@opentelemetry/api: Attempted duplicate registration of API: " + r);
13
- return e.error(a.stack || a.message), !1;
14
- }
15
- if (s.version !== t) {
16
- var a = new Error("@opentelemetry/api: Registration of version v" + s.version + " for " + r + " does not match previously registered API v" + t);
17
- return e.error(a.stack || a.message), !1;
18
- }
19
- return s[r] = o, e.debug("@opentelemetry/api: Registered a global for " + r + " v" + t + "."), !0;
1
+ import { createContextKey as o } from "./vue-components.es30.js";
2
+ import { NonRecordingSpan as a } from "./vue-components.es39.js";
3
+ import { ContextAPI as u } from "./vue-components.es40.js";
4
+ var n = o("OpenTelemetry Context Key SPAN");
5
+ function r(e) {
6
+ return e.getValue(n) || void 0;
20
7
  }
21
- function E(r) {
22
- var o, e, i = (o = l[n]) === null || o === void 0 ? void 0 : o.version;
23
- if (!(!i || !f(i)))
24
- return (e = l[n]) === null || e === void 0 ? void 0 : e[r];
8
+ function S() {
9
+ return r(u.getInstance().active());
25
10
  }
26
- function _(r, o) {
27
- o.debug("@opentelemetry/api: Unregistering a global for " + r + " v" + t + ".");
28
- var e = l[n];
29
- e && delete e[r];
11
+ function i(e, t) {
12
+ return e.setValue(n, t);
13
+ }
14
+ function l(e) {
15
+ return e.deleteValue(n);
16
+ }
17
+ function d(e, t) {
18
+ return i(e, new a(t));
19
+ }
20
+ function m(e) {
21
+ var t;
22
+ return (t = r(e)) === null || t === void 0 ? void 0 : t.spanContext();
30
23
  }
31
24
  export {
32
- E as getGlobal,
33
- d as registerGlobal,
34
- _ as unregisterGlobal
25
+ l as deleteSpan,
26
+ S as getActiveSpan,
27
+ r as getSpan,
28
+ m as getSpanContext,
29
+ i as setSpan,
30
+ d as setSpanContext
35
31
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as y, inject as h, computed as l, createBlock as s, openBlock as i, resolveDynamicComponent as M, withCtx as p, createCommentVNode as $, mergeProps as b, renderSlot as C, normalizeProps as k, guardReactiveProps as F } from "vue";
2
2
  import { useIntl as A } from "./vue-components.es3.js";
3
3
  import { generateInputStandardSchemaFromFieldMeta as w } from "./vue-components.es10.js";
4
- import I from "./vue-components.es26.js";
4
+ import I from "./vue-components.es27.js";
5
5
  const z = /* @__PURE__ */ y({
6
6
  inheritAttrs: !1,
7
7
  __name: "OmegaInput",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-app/vue-components",
3
- "version": "0.27.14",
3
+ "version": "0.27.16",
4
4
  "peerDependencies": {
5
5
  "@mdi/js": "^7.4.47",
6
6
  "effect": "^3.17.13",
@@ -28,6 +28,7 @@
28
28
  "vite-plugin-css-injected-by-js": "^3.5.2",
29
29
  "vitepress": "^1.6.4",
30
30
  "vitest": "^3.2.4",
31
+ "vue-router": "^4.2.2",
31
32
  "vue-tsc": "^3.0.7",
32
33
  "@effect-app/eslint-shared-config": "0.2.1"
33
34
  },
@@ -42,11 +42,9 @@
42
42
  <script
43
43
  setup
44
44
  lang="ts"
45
- generic="
46
- // dprint ignore - somehow with 120 chars, this becomes a mess. should report it.
45
+ generic="// dprint ignore - somehow with 120 chars, this becomes a mess. should report it.
47
46
  From extends Record<PropertyKey, any>,
48
- To extends Record<PropertyKey, any>
49
- "
47
+ To extends Record<PropertyKey, any>"
50
48
  >
51
49
  import { type DeepKeys, type DeepValue } from "@tanstack/vue-form"
52
50
  import { computed, onMounted, provide } from "vue"
@@ -15,10 +15,8 @@
15
15
  <script
16
16
  setup
17
17
  lang="ts"
18
- generic="
19
- From extends Record<PropertyKey, string>,
20
- To extends Record<PropertyKey, string>
21
- "
18
+ generic="From extends Record<PropertyKey, string>,
19
+ To extends Record<PropertyKey, string>"
22
20
  >
23
21
  import { type DeepKeys } from "@tanstack/vue-form"
24
22
  import { Array as A, Order, pipe } from "effect-app"
@@ -17,11 +17,9 @@
17
17
  <script
18
18
  setup
19
19
  lang="ts"
20
- generic="
21
- From extends Record<PropertyKey, any>,
20
+ generic="From extends Record<PropertyKey, any>,
22
21
  To extends Record<PropertyKey, any>,
23
- Name extends DeepKeys<From>
24
- "
22
+ Name extends DeepKeys<From>"
25
23
  >
26
24
  import { type DeepKeys } from "@tanstack/vue-form"
27
25
  import { inject } from "vue"
@@ -253,6 +253,8 @@ export const createMeta = <T = any>(
253
253
  { meta = {}, parent = "", property, propertySignatures }: CreateMeta,
254
254
  acc: Partial<MetaRecord<T>> = {}
255
255
  ): MetaRecord<T> | FieldMeta => {
256
+ // unwraps class..
257
+ // TODO: might want to recursively unwrap.
256
258
  if (property && property._tag === "Transformation") {
257
259
  return createMeta<T>({
258
260
  parent,
@@ -276,9 +278,15 @@ export const createMeta = <T = any>(
276
278
 
277
279
  const typeToProcess = p.type
278
280
  if (S.AST.isUnion(p.type)) {
279
- const nonNullTypes = p.type.types.filter(
280
- (t) => t._tag !== "UndefinedKeyword" && t !== S.Null.ast
281
- )
281
+ const nonNullTypes = p
282
+ .type
283
+ .types
284
+ .filter(
285
+ (t) => t._tag !== "UndefinedKeyword" && t !== S.Null.ast
286
+ )
287
+ // unwrap classes..
288
+ // TODO: might want to recursively unwrap.
289
+ .map((_) => _._tag === "Transformation" ? _.from : _)
282
290
 
283
291
  const hasStructMembers = nonNullTypes.some(
284
292
  (t) => "propertySignatures" in t
@@ -28,11 +28,9 @@
28
28
  <script
29
29
  setup
30
30
  lang="ts"
31
- generic="
32
- // dprint ignore - somehow with 120 chars, this becomes a mess. should report it.
31
+ generic="// dprint ignore - somehow with 120 chars, this becomes a mess. should report it.
33
32
  From extends Record<PropertyKey, any>,
34
- To extends Record<PropertyKey, any>
35
- "
33
+ To extends Record<PropertyKey, any>"
36
34
  >
37
35
  import { computed, inject, type Ref } from "vue"
38
36
  import { useIntl } from "../../utils"
@@ -27,11 +27,10 @@
27
27
  <script
28
28
  setup
29
29
  lang="ts"
30
- generic="
31
- From extends Record<PropertyKey, any>,
30
+ generic="From extends Record<PropertyKey, any>,
32
31
  To extends Record<PropertyKey, any>,
33
- K extends keyof OmegaFormState<From, To> = keyof OmegaFormState<From, To>
34
- "
32
+ K extends keyof OmegaFormState<From, To> = keyof OmegaFormState<From, To>,
33
+ Props = DefaultInputProps<From>"
35
34
  >
36
35
  /**
37
36
  * Form component that wraps TanStack Form's useForm hook
@@ -70,7 +69,7 @@ import { computed, getCurrentInstance, onBeforeMount, provide, watch } from "vue
70
69
  import { getOmegaStore } from "./getOmegaStore"
71
70
  import { provideOmegaErrors } from "./OmegaErrorsContext"
72
71
  import { type FilterItems, type FormProps, type OmegaFormApi, type OmegaFormState, type ShowErrorsOn } from "./OmegaFormStuff"
73
- import { type OmegaConfig, OmegaFormKey, type OmegaFormReturn, useOmegaForm } from "./useOmegaForm"
72
+ import { type DefaultInputProps, type OmegaConfig, OmegaFormKey, type OmegaFormReturn, useOmegaForm } from "./useOmegaForm"
74
73
 
75
74
  type OnSubmit = NonNullable<FormProps<From, To>["onSubmit"]>
76
75
  type OnSubmitArg = Parameters<OnSubmit>[0]
@@ -86,7 +85,7 @@ type OmegaWrapperProps =
86
85
  & Omit<FormProps<From, To>, "onSubmit">
87
86
  & (
88
87
  | {
89
- form: OmegaFormReturn<From, To>
88
+ form: OmegaFormReturn<From, To, Props>
90
89
  schema?: undefined
91
90
  }
92
91
  | {
@@ -54,7 +54,7 @@ type __VLS_PrettifyLocal<T> =
54
54
  }
55
55
  & {}
56
56
 
57
- type DefaultProps<From> = {
57
+ export type DefaultInputProps<From> = {
58
58
  label?: string
59
59
  validators?: FieldValidators<From>
60
60
  options?: {
@@ -67,7 +67,7 @@ type DefaultProps<From> = {
67
67
  export interface OmegaFormReturn<
68
68
  From extends Record<PropertyKey, any>,
69
69
  To extends Record<PropertyKey, any>,
70
- Props = DefaultProps<From>
70
+ Props = DefaultInputProps<From>
71
71
  > extends OF<From, To> {
72
72
  // this crazy thing here is copied from the OmegaFormInput.vue.d.ts, with `From` removed as Generic, instead closed over from the From generic above..
73
73
  Input: <Name extends DeepKeys<From>>(
@@ -109,7 +109,7 @@ export const useOmegaForm = <
109
109
  From extends Record<PropertyKey, any>,
110
110
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
111
111
  To extends Record<PropertyKey, any>,
112
- Props = DefaultProps<From>
112
+ Props = DefaultInputProps<From>
113
113
  >(
114
114
  schema: S.Schema<To, From, never>,
115
115
  tanstackFormOptions?: NoInfer<FormProps<From, To>>,