@effect-app/vue-components 1.8.10 → 1.8.11

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,12 +1,13 @@
1
- import { Exit as c, Runtime as u } from "effect";
2
- import { dual as n, isFunction as m } from "./vue-components.es26.js";
3
- const i = Symbol.for("clone-trait"), a = n(2, (e, t) => i in e ? e[i](t) : Object.setPrototypeOf(t, Object.getPrototypeOf(e)));
4
- n(2, (e, t) => a(e, { ...e, ...m(t) ? t(e) : t }));
5
- const p = (e, t) => new Promise((o, s) => e.addObserver((r) => {
6
- c.isSuccess(r) ? o(r.value) : s(u.makeFiberFailure(r.cause));
7
- }));
1
+ import { onMounted as e, onUnmounted as u } from "vue";
2
+ function p(t) {
3
+ let n;
4
+ e(() => {
5
+ const o = t();
6
+ o && (n = o);
7
+ }), u(() => {
8
+ n && n();
9
+ });
10
+ }
8
11
  export {
9
- a as clone,
10
- i as cloneTrait,
11
- p as runtimeFiberAsPromise
12
+ p as onMountedWithCleanup
12
13
  };
@@ -1,7 +1,12 @@
1
- import { isFunction as c } from "./vue-components.es26.js";
2
- const s = c, t = (o) => typeof o == "object" && o !== null, i = (o) => t(o) || s(o);
1
+ import { Exit as c, Runtime as u } from "effect";
2
+ import { dual as n, isFunction as m } from "./vue-components.es26.js";
3
+ const i = Symbol.for("clone-trait"), a = n(2, (e, t) => i in e ? e[i](t) : Object.setPrototypeOf(t, Object.getPrototypeOf(e)));
4
+ n(2, (e, t) => a(e, { ...e, ...m(t) ? t(e) : t }));
5
+ const p = (e, t) => new Promise((o, s) => e.addObserver((r) => {
6
+ c.isSuccess(r) ? o(r.value) : s(u.makeFiberFailure(r.cause));
7
+ }));
3
8
  export {
4
- s as isFunction,
5
- i as isObject,
6
- t as isRecordOrArray
9
+ a as clone,
10
+ i as cloneTrait,
11
+ p as runtimeFiberAsPromise
7
12
  };
@@ -1,56 +1,7 @@
1
- import { defineComponent as F, computed as i, onMounted as M, provide as P, createBlock as c, openBlock as s, resolveDynamicComponent as p, withCtx as g, renderSlot as o, createElementBlock as k, normalizeProps as l, guardReactiveProps as u, Fragment as A, renderList as b, mergeProps as B } from "vue";
2
- const N = /* @__PURE__ */ F({
3
- inheritAttrs: !1,
4
- __name: "OmegaArray",
5
- props: {
6
- form: {},
7
- name: {},
8
- defaultItems: {},
9
- items: {}
10
- },
11
- setup(n) {
12
- const a = n, y = a.form.useStore((e) => e.values), d = i(() => {
13
- const e = a.name.replace(/\[/g, ".").replace(/\]/g, "");
14
- try {
15
- return e.split(".").reduce((r, t) => r && r[t], y.value);
16
- } catch (r) {
17
- return console.error(r), [];
18
- }
19
- });
20
- M(async () => {
21
- a.defaultItems && !d.value && a.form.setFieldValue(a.name, a.defaultItems);
22
- });
23
- const $ = i(() => (r) => {
24
- const t = r.replace(/\[\d+\]/g, "");
25
- return a.form.meta[t];
26
- });
27
- return P("getMetaFromArray", $), (e, r) => (s(), c(p(n.form.Field), { name: n.name }, {
28
- default: g(({ field: t, state: f }) => [
29
- o(e.$slots, "pre-array", l(u({ field: t, state: f }))),
30
- (s(!0), k(A, null, b(d.value, (C, m) => (s(), c(p(n.form.Field), {
31
- key: `${n.name}[${Number(m)}]`,
32
- name: (
33
- // eslint-disable-next-line
34
- `${n.name}[${Number(m)}]`
35
- )
36
- }, {
37
- default: g(({ field: v, state: h }) => [
38
- o(e.$slots, "default", B({ ref_for: !0 }, {
39
- subField: v,
40
- subState: h,
41
- index: Number(m),
42
- field: t
43
- }))
44
- ]),
45
- _: 2
46
- }, 1032, ["name"]))), 128)),
47
- o(e.$slots, "post-array", l(u({ field: t, state: f }))),
48
- o(e.$slots, "field", l(u({ field: t })))
49
- ]),
50
- _: 3
51
- }, 8, ["name"]));
52
- }
53
- });
1
+ import { isFunction as c } from "./vue-components.es26.js";
2
+ const s = c, t = (o) => typeof o == "object" && o !== null, i = (o) => t(o) || s(o);
54
3
  export {
55
- N as default
4
+ s as isFunction,
5
+ i as isObject,
6
+ t as isRecordOrArray
56
7
  };
@@ -1,70 +1,56 @@
1
- import { defineComponent as O, computed as j, createElementBlock as M, openBlock as _, Fragment as E, renderList as A, renderSlot as F, createVNode as g, unref as h, mergeProps as k } from "vue";
2
- import { Order as l, pipe as v, Array as u } from "effect-app";
3
- const I = /* @__PURE__ */ O({
4
- __name: "OmegaAutoGen",
1
+ import { defineComponent as F, computed as i, onMounted as M, provide as P, createBlock as c, openBlock as s, resolveDynamicComponent as p, withCtx as g, renderSlot as o, createElementBlock as k, normalizeProps as l, guardReactiveProps as u, Fragment as A, renderList as b, mergeProps as B } from "vue";
2
+ const N = /* @__PURE__ */ F({
3
+ inheritAttrs: !1,
4
+ __name: "OmegaArray",
5
5
  props: {
6
6
  form: {},
7
- pick: {},
8
- omit: {},
9
- labelMap: { type: Function },
10
- filterMap: { type: Function },
11
- order: {},
12
- sort: {}
7
+ name: {},
8
+ defaultItems: {},
9
+ items: {}
13
10
  },
14
- setup(i) {
15
- const p = (e) => (r) => Object.fromEntries(
16
- Object.entries(r).map(([t, o]) => [t, e(o, t)])
17
- ), a = (e) => (r) => Object.fromEntries(
18
- Object.entries(r).filter(([t, o]) => e(o, t))
19
- ), m = (e) => (r) => Object.entries(r).reduce(
20
- (t, [o, c]) => {
21
- const s = e(c, o);
22
- return s !== !1 && (t[o] = s), t;
23
- },
24
- {}
25
- ), n = i, f = (e, r) => {
26
- const t = r?.indexOf(e) ?? -1;
27
- return t === -1 ? Number.MAX_SAFE_INTEGER : t;
28
- }, d = l.mapInput(
29
- l.number,
30
- (e) => f(e.name, n.order || [])
31
- ), b = j(
32
- () => v(
33
- n.form.meta,
34
- // include / exclude
35
- a(
36
- (e, r) => n.pick ? n.pick.includes(r) && !n.omit?.includes(r) : !n.omit?.includes(r)
37
- ),
38
- (e) => e,
39
- // labelMap and adding name
40
- p((e, r) => ({
41
- name: r,
42
- label: n.labelMap?.(r) || r,
43
- ...e
44
- })),
45
- // filterMap
46
- n.filterMap ? m((e) => {
47
- const r = n.filterMap?.(e.name, e);
48
- return r === void 0 || r === !0 ? e : r;
49
- }) : (e) => e,
50
- // transform to array
51
- (e) => Object.values(e),
52
- // order
53
- u.sort(d),
54
- // sort
55
- n.sort ? u.sort(n.sort) : (e) => e
56
- )
57
- );
58
- return (e, r) => (_(!0), M(E, null, A(b.value, ({ name: t, label: o, ...c }) => F(e.$slots, "default", {
59
- child: { name: t, label: o, ...c }
60
- }, () => [
61
- g(h(i.form).Input, k({
62
- name: t,
63
- label: o
64
- }, { ref_for: !0 }, c), null, 16, ["name", "label"])
65
- ])), 256));
11
+ setup(n) {
12
+ const a = n, y = a.form.useStore((e) => e.values), d = i(() => {
13
+ const e = a.name.replace(/\[/g, ".").replace(/\]/g, "");
14
+ try {
15
+ return e.split(".").reduce((r, t) => r && r[t], y.value);
16
+ } catch (r) {
17
+ return console.error(r), [];
18
+ }
19
+ });
20
+ M(async () => {
21
+ a.defaultItems && !d.value && a.form.setFieldValue(a.name, a.defaultItems);
22
+ });
23
+ const $ = i(() => (r) => {
24
+ const t = r.replace(/\[\d+\]/g, "");
25
+ return a.form.meta[t];
26
+ });
27
+ return P("getMetaFromArray", $), (e, r) => (s(), c(p(n.form.Field), { name: n.name }, {
28
+ default: g(({ field: t, state: f }) => [
29
+ o(e.$slots, "pre-array", l(u({ field: t, state: f }))),
30
+ (s(!0), k(A, null, b(d.value, (C, m) => (s(), c(p(n.form.Field), {
31
+ key: `${n.name}[${Number(m)}]`,
32
+ name: (
33
+ // eslint-disable-next-line
34
+ `${n.name}[${Number(m)}]`
35
+ )
36
+ }, {
37
+ default: g(({ field: v, state: h }) => [
38
+ o(e.$slots, "default", B({ ref_for: !0 }, {
39
+ subField: v,
40
+ subState: h,
41
+ index: Number(m),
42
+ field: t
43
+ }))
44
+ ]),
45
+ _: 2
46
+ }, 1032, ["name"]))), 128)),
47
+ o(e.$slots, "post-array", l(u({ field: t, state: f }))),
48
+ o(e.$slots, "field", l(u({ field: t })))
49
+ ]),
50
+ _: 3
51
+ }, 8, ["name"]));
66
52
  }
67
53
  });
68
54
  export {
69
- I as default
55
+ N as default
70
56
  };
@@ -1,8 +1,70 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");if(a.appendChild(document.createTextNode(".v-enter-from[data-v-d4ffe76f],.v-leave-to[data-v-d4ffe76f]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-d4ffe76f],.v-leave-active[data-v-d4ffe76f]{display:grid;transition:all .15s}.v-enter-to[data-v-d4ffe76f],.v-leave-from[data-v-d4ffe76f]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-d4ffe76f]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-d4ffe76f]{min-height:0}.error-list[data-v-d4ffe76f]{list-style-position:inside}div.error-list[data-v-d4ffe76f]{container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;gap:1.5em;align-items:start}@container (max-width: 27.125rem){div.error-list[data-v-d4ffe76f]{grid-template-columns:auto 1fr}.error-link[data-v-d4ffe76f]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-d4ffe76f]{grid-template-columns:1fr}.error-message[data-v-d4ffe76f]{grid-column:1 / -1}}.error-item[data-v-d4ffe76f]{display:contents}a[data-v-d4ffe76f]{min-width:min-content}.error-link[data-v-d4ffe76f]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),document.head.appendChild(a),window.customElements){const e=window.customElements.define;window.customElements.define=function(r,t){const i=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(i&&i.call(this),this.shadowRoot){const d=document.createElement("style");d.appendChild(document.createTextNode(".v-enter-from[data-v-d4ffe76f],.v-leave-to[data-v-d4ffe76f]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-d4ffe76f],.v-leave-active[data-v-d4ffe76f]{display:grid;transition:all .15s}.v-enter-to[data-v-d4ffe76f],.v-leave-from[data-v-d4ffe76f]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-d4ffe76f]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-d4ffe76f]{min-height:0}.error-list[data-v-d4ffe76f]{list-style-position:inside}div.error-list[data-v-d4ffe76f]{container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;gap:1.5em;align-items:start}@container (max-width: 27.125rem){div.error-list[data-v-d4ffe76f]{grid-template-columns:auto 1fr}.error-link[data-v-d4ffe76f]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-d4ffe76f]{grid-template-columns:1fr}.error-message[data-v-d4ffe76f]{grid-column:1 / -1}}.error-item[data-v-d4ffe76f]{display:contents}a[data-v-d4ffe76f]{min-width:min-content}.error-link[data-v-d4ffe76f]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),this.shadowRoot.appendChild(d)}},e.call(window.customElements,r,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import r from "./vue-components.es29.js";
3
-
4
- import o from "./vue-components.es31.js";
5
- const e = /* @__PURE__ */ o(r, [["__scopeId", "data-v-d4ffe76f"]]);
1
+ import { defineComponent as O, computed as j, createElementBlock as M, openBlock as _, Fragment as E, renderList as A, renderSlot as F, createVNode as g, unref as h, mergeProps as k } from "vue";
2
+ import { Order as l, pipe as v, Array as u } from "effect-app";
3
+ const I = /* @__PURE__ */ O({
4
+ __name: "OmegaAutoGen",
5
+ props: {
6
+ form: {},
7
+ pick: {},
8
+ omit: {},
9
+ labelMap: { type: Function },
10
+ filterMap: { type: Function },
11
+ order: {},
12
+ sort: {}
13
+ },
14
+ setup(i) {
15
+ const p = (e) => (r) => Object.fromEntries(
16
+ Object.entries(r).map(([t, o]) => [t, e(o, t)])
17
+ ), a = (e) => (r) => Object.fromEntries(
18
+ Object.entries(r).filter(([t, o]) => e(o, t))
19
+ ), m = (e) => (r) => Object.entries(r).reduce(
20
+ (t, [o, c]) => {
21
+ const s = e(c, o);
22
+ return s !== !1 && (t[o] = s), t;
23
+ },
24
+ {}
25
+ ), n = i, f = (e, r) => {
26
+ const t = r?.indexOf(e) ?? -1;
27
+ return t === -1 ? Number.MAX_SAFE_INTEGER : t;
28
+ }, d = l.mapInput(
29
+ l.number,
30
+ (e) => f(e.name, n.order || [])
31
+ ), b = j(
32
+ () => v(
33
+ n.form.meta,
34
+ // include / exclude
35
+ a(
36
+ (e, r) => n.pick ? n.pick.includes(r) && !n.omit?.includes(r) : !n.omit?.includes(r)
37
+ ),
38
+ (e) => e,
39
+ // labelMap and adding name
40
+ p((e, r) => ({
41
+ name: r,
42
+ label: n.labelMap?.(r) || r,
43
+ ...e
44
+ })),
45
+ // filterMap
46
+ n.filterMap ? m((e) => {
47
+ const r = n.filterMap?.(e.name, e);
48
+ return r === void 0 || r === !0 ? e : r;
49
+ }) : (e) => e,
50
+ // transform to array
51
+ (e) => Object.values(e),
52
+ // order
53
+ u.sort(d),
54
+ // sort
55
+ n.sort ? u.sort(n.sort) : (e) => e
56
+ )
57
+ );
58
+ return (e, r) => (_(!0), M(E, null, A(b.value, ({ name: t, label: o, ...c }) => F(e.$slots, "default", {
59
+ child: { name: t, label: o, ...c }
60
+ }, () => [
61
+ g(h(i.form).Input, k({
62
+ name: t,
63
+ label: o
64
+ }, { ref_for: !0 }, c), null, 16, ["name", "label"])
65
+ ])), 256));
66
+ }
67
+ });
6
68
  export {
7
- e as default
69
+ I as default
8
70
  };
@@ -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-8fe92df3]{display:contents}fieldset[disabled][data-v-8fe92df3]>*{pointer-events:none}")),document.head.appendChild(n),window.customElements){const e=window.customElements.define;window.customElements.define=function(i,t){const d=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(d&&d.call(this),this.shadowRoot){const o=document.createElement("style");o.appendChild(document.createTextNode("fieldset[data-v-8fe92df3]{display:contents}fieldset[disabled][data-v-8fe92df3]>*{pointer-events:none}")),this.shadowRoot.appendChild(o)}},e.call(window.customElements,i,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import o from "./vue-components.es32.js";
1
+ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");if(a.appendChild(document.createTextNode(".v-enter-from[data-v-d4ffe76f],.v-leave-to[data-v-d4ffe76f]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-d4ffe76f],.v-leave-active[data-v-d4ffe76f]{display:grid;transition:all .15s}.v-enter-to[data-v-d4ffe76f],.v-leave-from[data-v-d4ffe76f]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-d4ffe76f]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-d4ffe76f]{min-height:0}.error-list[data-v-d4ffe76f]{list-style-position:inside}div.error-list[data-v-d4ffe76f]{container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;gap:1.5em;align-items:start}@container (max-width: 27.125rem){div.error-list[data-v-d4ffe76f]{grid-template-columns:auto 1fr}.error-link[data-v-d4ffe76f]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-d4ffe76f]{grid-template-columns:1fr}.error-message[data-v-d4ffe76f]{grid-column:1 / -1}}.error-item[data-v-d4ffe76f]{display:contents}a[data-v-d4ffe76f]{min-width:min-content}.error-link[data-v-d4ffe76f]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),document.head.appendChild(a),window.customElements){const e=window.customElements.define;window.customElements.define=function(r,t){const i=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(i&&i.call(this),this.shadowRoot){const d=document.createElement("style");d.appendChild(document.createTextNode(".v-enter-from[data-v-d4ffe76f],.v-leave-to[data-v-d4ffe76f]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-d4ffe76f],.v-leave-active[data-v-d4ffe76f]{display:grid;transition:all .15s}.v-enter-to[data-v-d4ffe76f],.v-leave-from[data-v-d4ffe76f]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-d4ffe76f]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-d4ffe76f]{min-height:0}.error-list[data-v-d4ffe76f]{list-style-position:inside}div.error-list[data-v-d4ffe76f]{container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;gap:1.5em;align-items:start}@container (max-width: 27.125rem){div.error-list[data-v-d4ffe76f]{grid-template-columns:auto 1fr}.error-link[data-v-d4ffe76f]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-d4ffe76f]{grid-template-columns:1fr}.error-message[data-v-d4ffe76f]{grid-column:1 / -1}}.error-item[data-v-d4ffe76f]{display:contents}a[data-v-d4ffe76f]{min-width:min-content}.error-link[data-v-d4ffe76f]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),this.shadowRoot.appendChild(d)}},e.call(window.customElements,r,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import r from "./vue-components.es29.js";
3
3
 
4
- import m from "./vue-components.es31.js";
5
- const a = /* @__PURE__ */ m(o, [["__scopeId", "data-v-8fe92df3"]]);
4
+ import o from "./vue-components.es31.js";
5
+ const e = /* @__PURE__ */ o(r, [["__scopeId", "data-v-d4ffe76f"]]);
6
6
  export {
7
- a as default
7
+ e as default
8
8
  };
@@ -1,5 +1,8 @@
1
- import { TraceAPI as r } from "./vue-components.es46.js";
2
- var t = r.getInstance();
1
+ (function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-8fe92df3]{display:contents}fieldset[disabled][data-v-8fe92df3]>*{pointer-events:none}")),document.head.appendChild(n),window.customElements){const e=window.customElements.define;window.customElements.define=function(i,t){const d=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(d&&d.call(this),this.shadowRoot){const o=document.createElement("style");o.appendChild(document.createTextNode("fieldset[data-v-8fe92df3]{display:contents}fieldset[disabled][data-v-8fe92df3]>*{pointer-events:none}")),this.shadowRoot.appendChild(o)}},e.call(window.customElements,i,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import o from "./vue-components.es32.js";
3
+
4
+ import m from "./vue-components.es31.js";
5
+ const a = /* @__PURE__ */ m(o, [["__scopeId", "data-v-8fe92df3"]]);
3
6
  export {
4
- t as trace
7
+ a as default
5
8
  };
@@ -1,5 +1,5 @@
1
- import { ContextAPI as t } from "./vue-components.es45.js";
2
- var o = t.getInstance();
1
+ import { TraceAPI as r } from "./vue-components.es46.js";
2
+ var t = r.getInstance();
3
3
  export {
4
- o as context
4
+ t as trace
5
5
  };
@@ -1,4 +1,5 @@
1
- import f from "./vue-components.es5.js";
1
+ import { ContextAPI as t } from "./vue-components.es45.js";
2
+ var o = t.getInstance();
2
3
  export {
3
- f as default
4
+ o as context
4
5
  };
@@ -1,4 +1,4 @@
1
- import f from "./vue-components.es6.js";
1
+ import f from "./vue-components.es5.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,19 +1,4 @@
1
- function c(t) {
2
- return { all: t = t || /* @__PURE__ */ new Map(), on: function(e, f) {
3
- var i = t.get(e);
4
- i ? i.push(f) : t.set(e, [f]);
5
- }, off: function(e, f) {
6
- var i = t.get(e);
7
- i && (f ? i.splice(i.indexOf(f) >>> 0, 1) : t.set(e, []));
8
- }, emit: function(e, f) {
9
- var i = t.get(e);
10
- i && i.slice().map(function(a) {
11
- a(f);
12
- }), (i = t.get("*")) && i.slice().map(function(a) {
13
- a(e, f);
14
- });
15
- } };
16
- }
1
+ import f from "./vue-components.es6.js";
17
2
  export {
18
- c as default
3
+ f as default
19
4
  };
@@ -1,13 +1,19 @@
1
- import { onMounted as e, onUnmounted as u } from "vue";
2
- function p(t) {
3
- let n;
4
- e(() => {
5
- const o = t();
6
- o && (n = o);
7
- }), u(() => {
8
- n && n();
9
- });
1
+ function c(t) {
2
+ return { all: t = t || /* @__PURE__ */ new Map(), on: function(e, f) {
3
+ var i = t.get(e);
4
+ i ? i.push(f) : t.set(e, [f]);
5
+ }, off: function(e, f) {
6
+ var i = t.get(e);
7
+ i && (f ? i.splice(i.indexOf(f) >>> 0, 1) : t.set(e, []));
8
+ }, emit: function(e, f) {
9
+ var i = t.get(e);
10
+ i && i.slice().map(function(a) {
11
+ a(f);
12
+ }), (i = t.get("*")) && i.slice().map(function(a) {
13
+ a(e, f);
14
+ });
15
+ } };
10
16
  }
11
17
  export {
12
- p as onMountedWithCleanup
18
+ c as default
13
19
  };
@@ -1,4 +1,4 @@
1
- import f from "./vue-components.es14.js";
1
+ import f from "./vue-components.es15.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import f from "./vue-components.es15.js";
1
+ import f from "./vue-components.es16.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as c, mergeModels as f, useModel as v, resolveComponent as C, createBlock as k, openBlock as V, unref as r, createSlots as g, withCtx as d, renderSlot as u, renderList as y, normalizeProps as B, guardReactiveProps as E } from "vue";
2
2
  import { useOnClose as M } from "./vue-components.es8.js";
3
- import { onMountedWithCleanup as _ } from "./vue-components.es23.js";
3
+ import { onMountedWithCleanup as _ } from "./vue-components.es12.js";
4
4
  const P = /* @__PURE__ */ c({
5
5
  __name: "Dialog",
6
6
  props: /* @__PURE__ */ f({
@@ -1,5 +1,5 @@
1
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 b, getCurrentInstance as C, useId as x, computed as n, onMounted as P, renderSlot as _, normalizeProps as m, guardReactiveProps as $, createElementVNode as M, normalizeClass as N, createBlock as V, createCommentVNode as k, unref as q, openBlock as B, mergeProps as F } from "vue";
2
+ import { defineComponent as b, getCurrentInstance as C, useId as x, computed as n, onMounted as _, renderSlot as P, normalizeProps as m, guardReactiveProps as M, createElementVNode as N, normalizeClass as $, createBlock as V, createCommentVNode as k, unref as q, openBlock as B, mergeProps as F } from "vue";
3
3
  import { useStore as I } from "@tanstack/vue-form";
4
4
  import L from "./vue-components.es24.js";
5
5
 
@@ -28,7 +28,7 @@ const U = /* @__PURE__ */ b({
28
28
  e.meta?.nullableOrUndefined === "undefined" ? void 0 : null
29
29
  ) : e.field.handleChange(t), e.field.setMeta((r) => ({ ...r, errorMap: { ...r.errorMap, onSubmit: void 0 } }));
30
30
  };
31
- P(() => {
31
+ _(() => {
32
32
  if (!f.value && !e.meta?.required && e.meta?.nullableOrUndefined === "null") {
33
33
  const t = o.value.meta.isDirty;
34
34
  a.setValue(null), a.setMeta((r) => ({ ...r, isDirty: t }));
@@ -57,9 +57,9 @@ const U = /* @__PURE__ */ b({
57
57
  },
58
58
  field: h(e.field)
59
59
  }));
60
- return (t, r) => _(t.$slots, "default", m($({ ...t.$attrs, ...l.value.inputProps, field: l.value.field })), () => [
61
- M("div", {
62
- class: N(t.$attrs.class)
60
+ return (t, r) => P(t.$slots, "default", m(M({ ...l.value.inputProps, field: l.value.field })), () => [
61
+ N("div", {
62
+ class: $(t.$attrs.class)
63
63
  }, [
64
64
  q(p) ? (B(), V(L, m(F({ key: 0 }, { ...t.$attrs, ...l.value })), null, 16)) : k("", !0)
65
65
  ], 2)
@@ -1,17 +1,17 @@
1
1
  import { useForm as q } from "@tanstack/vue-form";
2
2
  import { Data as K, S as I, Effect as l, Fiber as F, Option as M, Array as P } from "effect-app";
3
- import { runtimeFiberAsPromise as B } from "./vue-components.es12.js";
4
- import { isObject as G } from "./vue-components.es13.js";
3
+ import { runtimeFiberAsPromise as B } from "./vue-components.es13.js";
4
+ import { isObject as G } from "./vue-components.es14.js";
5
5
  import { computed as j, onUnmounted as N, onMounted as T, onBeforeUnmount as W, ref as k, watch as z, h as D } from "vue";
6
6
  import { usePreventClose as Q } from "./vue-components.es8.js";
7
- import X from "./vue-components.es14.js";
8
- import Y from "./vue-components.es15.js";
9
- import Z from "./vue-components.es16.js";
7
+ import X from "./vue-components.es15.js";
8
+ import Y from "./vue-components.es16.js";
9
+ import Z from "./vue-components.es17.js";
10
10
  import { generateMetaFromSchema as C } from "./vue-components.es9.js";
11
11
  import ee from "./vue-components.es5.js";
12
- import re from "./vue-components.es17.js";
13
- import { trace as _ } from "./vue-components.es18.js";
14
- import { context as V } from "./vue-components.es19.js";
12
+ import re from "./vue-components.es18.js";
13
+ import { trace as _ } from "./vue-components.es19.js";
14
+ import { context as V } from "./vue-components.es20.js";
15
15
  class te extends K.TaggedError("FormErrors") {
16
16
  }
17
17
  const w = (c) => function(n) {
@@ -1,6 +1,6 @@
1
- import r from "./vue-components.es22.js";
1
+ import r from "./vue-components.es23.js";
2
2
  import { inject as c, provide as l } from "vue";
3
- import { onMountedWithCleanup as u } from "./vue-components.es23.js";
3
+ import { onMountedWithCleanup as u } from "./vue-components.es12.js";
4
4
  const f = () => r(), i = Symbol("DialogBus"), p = () => c(i, null), g = () => {
5
5
  const e = f();
6
6
  return l(i, e), e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-app/vue-components",
3
- "version": "1.8.10",
3
+ "version": "1.8.11",
4
4
  "peerDependencies": {
5
5
  "@mdi/js": "^7.4.47",
6
6
  "effect": "^3.18.0",
@@ -51,8 +51,8 @@
51
51
  "highlight.js": "^11.11.1",
52
52
  "mitt": "^3.0.1",
53
53
  "vue3-highlightjs": "^1.0.5",
54
- "@effect-app/vue": "2.84.3",
55
- "effect-app": "3.10.2"
54
+ "effect-app": "3.10.2",
55
+ "@effect-app/vue": "2.84.3"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "pnpm build:run",
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <slot v-bind="{ ...$attrs, ...inputProps.inputProps, field: inputProps.field }">
2
+ <slot v-bind="{ ...inputProps.inputProps, field: inputProps.field }">
3
3
  <div :class="$attrs.class">
4
4
  <OmegaInputVuetify
5
5
  v-if="vuetified"