@effect-app/vue-components 0.27.15 → 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,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,6 +1,6 @@
1
- import { VERSION as t } from "./vue-components.es51.js";
2
- import { isCompatible as f } from "./vue-components.es52.js";
3
- import { _globalThis as m } from "./vue-components.es53.js";
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
4
  var u = t.split(".")[0], n = Symbol.for("opentelemetry.js.api." + u), l = m;
5
5
  function d(r, o, e, i) {
6
6
  var v;
@@ -1,6 +1,4 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");if(i.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),document.head.appendChild(i),window.customElements){const e=window.customElements.define;window.customElements.define=function(s,t){const n=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(n&&n.call(this),this.shadowRoot){const a=document.createElement("style");a.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),this.shadowRoot.appendChild(a)}},e.call(window.customElements,s,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import o from "./vue-components.es48.js";
3
-
1
+ var r = "1.9.0";
4
2
  export {
5
- o as default
3
+ r as VERSION
6
4
  };
@@ -1,4 +1,46 @@
1
- var r = "1.9.0";
1
+ import { VERSION as d } from "./vue-components.es50.js";
2
+ var h = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
3
+ function s(c) {
4
+ var m = /* @__PURE__ */ new Set([c]), f = /* @__PURE__ */ new Set(), t = c.match(h);
5
+ if (!t)
6
+ return function() {
7
+ return !1;
8
+ };
9
+ var e = {
10
+ major: +t[1],
11
+ minor: +t[2],
12
+ patch: +t[3],
13
+ prerelease: t[4]
14
+ };
15
+ if (e.prerelease != null)
16
+ return function(r) {
17
+ return r === c;
18
+ };
19
+ function a(n) {
20
+ return f.add(n), !1;
21
+ }
22
+ function p(n) {
23
+ return m.add(n), !0;
24
+ }
25
+ return function(r) {
26
+ if (m.has(r))
27
+ return !0;
28
+ if (f.has(r))
29
+ return !1;
30
+ var i = r.match(h);
31
+ if (!i)
32
+ return a(r);
33
+ var u = {
34
+ major: +i[1],
35
+ minor: +i[2],
36
+ patch: +i[3],
37
+ prerelease: i[4]
38
+ };
39
+ return u.prerelease != null || e.major !== u.major ? a(r) : e.major === 0 ? e.minor === u.minor && e.patch <= u.patch ? p(r) : a(r) : e.minor <= u.minor ? p(r) : a(r);
40
+ };
41
+ }
42
+ var v = s(d);
2
43
  export {
3
- r as VERSION
44
+ s as _makeCompatibilityCheck,
45
+ v as isCompatible
4
46
  };
@@ -1,46 +1,4 @@
1
- import { VERSION as d } from "./vue-components.es51.js";
2
- var h = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
3
- function s(c) {
4
- var m = /* @__PURE__ */ new Set([c]), f = /* @__PURE__ */ new Set(), t = c.match(h);
5
- if (!t)
6
- return function() {
7
- return !1;
8
- };
9
- var e = {
10
- major: +t[1],
11
- minor: +t[2],
12
- patch: +t[3],
13
- prerelease: t[4]
14
- };
15
- if (e.prerelease != null)
16
- return function(r) {
17
- return r === c;
18
- };
19
- function a(n) {
20
- return f.add(n), !1;
21
- }
22
- function p(n) {
23
- return m.add(n), !0;
24
- }
25
- return function(r) {
26
- if (m.has(r))
27
- return !0;
28
- if (f.has(r))
29
- return !1;
30
- var i = r.match(h);
31
- if (!i)
32
- return a(r);
33
- var u = {
34
- major: +i[1],
35
- minor: +i[2],
36
- patch: +i[3],
37
- prerelease: i[4]
38
- };
39
- return u.prerelease != null || e.major !== u.major ? a(r) : e.major === 0 ? e.minor === u.minor && e.patch <= u.patch ? p(r) : a(r) : e.minor <= u.minor ? p(r) : a(r);
40
- };
41
- }
42
- var v = s(d);
1
+ var o = typeof globalThis == "object" ? globalThis : typeof self == "object" ? self : typeof window == "object" ? window : typeof global == "object" ? global : {};
43
2
  export {
44
- s as _makeCompatibilityCheck,
45
- v as isCompatible
3
+ o as _globalThis
46
4
  };
@@ -1,4 +1,6 @@
1
- var o = typeof globalThis == "object" ? globalThis : typeof self == "object" ? self : typeof window == "object" ? window : typeof global == "object" ? global : {};
1
+ (function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");if(i.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),document.head.appendChild(i),window.customElements){const e=window.customElements.define;window.customElements.define=function(s,t){const n=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(n&&n.call(this),this.shadowRoot){const a=document.createElement("style");a.appendChild(document.createTextNode(".omega-input .v-input__details:has(.v-messages:empty){grid-template-rows:0fr;transition:all .2s}.omega-input .v-messages:empty{min-height:0}.omega-input .v-input__details:has(.v-messages){transition:all .2s;overflow:hidden;min-height:0;display:grid;grid-template-rows:1fr}.omega-input .v-messages{transition:all .2s}.omega-input .v-messages>*{transition-duration:0s!important}.omega-input [role=alert]:has(.v-messages:empty){padding:0}.omega-input .v-btn{cursor:pointer;width:auto;appearance:none;box-shadow:none;display:block;min-width:auto;height:auto;padding:.5em .5em .5em 1em}")),this.shadowRoot.appendChild(a)}},e.call(window.customElements,s,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import o from "./vue-components.es48.js";
3
+
2
4
  export {
3
- o as _globalThis
5
+ o as default
4
6
  };
@@ -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.15",
3
+ "version": "0.27.16",
4
4
  "peerDependencies": {
5
5
  "@mdi/js": "^7.4.47",
6
6
  "effect": "^3.17.13",
@@ -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"
@@ -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>>,