Skip to content

Commit 9b3c099

Browse files
committed
fix(hf): remove VNode cache
1 parent b41cd52 commit 9b3c099

29 files changed

Lines changed: 812 additions & 872 deletions

docs/libs/v0/dist/vue/chunks/input-BfByoR1U.js

Lines changed: 0 additions & 191 deletions
This file was deleted.

docs/libs/v0/dist/vue/chunks/input-BlRS66GM.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
import { unwrap as k } from "@duplojs/utils";
2+
import { c as H } from "./kind-DwvbGHaV.js";
3+
import { ref as b, effectScope as C, watch as D, h as R } from "vue";
4+
const S = H("form-field");
5+
function U(e, n) {
6+
return S.setTo(
7+
{
8+
new: e,
9+
defaultValue: n
10+
},
11+
{}
12+
);
13+
}
14+
const W = "@duplojs/utils/kind/";
15+
function j(e) {
16+
const n = `${W}${e}`;
17+
return {
18+
definition: {
19+
name: e,
20+
value: null
21+
},
22+
runTimeKey: n,
23+
addTo(t, s = null) {
24+
return {
25+
...t,
26+
[n]: s
27+
};
28+
},
29+
setTo(t, s = null) {
30+
return t[n] = s, t;
31+
},
32+
has(t) {
33+
return t && (typeof t == "object" || typeof t == "function") && n in t;
34+
},
35+
getValue(t) {
36+
return t[n];
37+
}
38+
};
39+
}
40+
function q(e) {
41+
return (n) => j(`@${e}/${n}`);
42+
}
43+
function te(e, n, t) {
44+
const s = j(e), u = n instanceof Array ? n : [n], c = t ?? class {
45+
}, l = class extends c {
46+
constructor(r = {}, i = []) {
47+
super(...i);
48+
for (const f of u)
49+
this[f.runTimeKey] = r[f.definition.name] ?? null;
50+
}
51+
static [Symbol.hasInstance](r) {
52+
if (!s.has(r))
53+
return !1;
54+
for (const i of u)
55+
if (!i.has(r))
56+
return !1;
57+
return !0;
58+
}
59+
};
60+
return u.forEach((r) => {
61+
l.prototype[r.runTimeKey] = null;
62+
}), l.prototype[s.runTimeKey] = null, l;
63+
}
64+
const a = q(
65+
// @ts-expect-error reserved kind namespace
66+
"DuplojsUtilsEither"
67+
), y = a("information"), m = "@duplojs/utils/value";
68+
function N(e) {
69+
return {
70+
[m]: e
71+
};
72+
}
73+
function A(e) {
74+
return !!e && typeof e == "object" && m in e;
75+
}
76+
const $ = a("left");
77+
function _(e, n = void 0) {
78+
return $.setTo(y.setTo(N(n), e));
79+
}
80+
function E(e) {
81+
return $.has(e) && y.has(e) && A(e);
82+
}
83+
const z = a("right");
84+
function B(e, n = void 0) {
85+
return z.setTo(y.setTo(N(n), e));
86+
}
87+
const G = a("error");
88+
function J(e) {
89+
return G.setTo(_("error", e));
90+
}
91+
const O = a("success");
92+
function Q(e) {
93+
return O.setTo(B("success", e));
94+
}
95+
function ne(e, n) {
96+
return (t = {}) => {
97+
const s = t.defaultValue !== void 0 ? typeof t.defaultValue == "function" ? t.defaultValue() : t.defaultValue : typeof n.defaultValue == "function" ? n.defaultValue() : n.defaultValue, u = typeof t.props == "function" ? t.props : () => t.props, c = t.label, l = typeof c == "string" ? () => c : c;
98+
return U(
99+
(r, i, f) => {
100+
const d = `${i}_INP`, w = t?.template ?? n.template ?? f.input;
101+
let K = !1;
102+
const p = b(null), v = C(), { errorMessage: g } = v.run(() => {
103+
const o = b(null);
104+
return D(
105+
r,
106+
() => {
107+
o.value !== null && V();
108+
},
109+
{ flush: "post" }
110+
), {
111+
errorMessage: o
112+
};
113+
}), V = () => {
114+
const o = p.value?.check?.() || Q(r.value);
115+
if (t.dataParser === void 0 || E(o))
116+
return o;
117+
const P = k(o), h = t.dataParser.parse(P);
118+
if (E(h)) {
119+
const T = k(h);
120+
return g.value = T.issues[0]?.message ?? "Error", J(
121+
[
122+
{
123+
key: d,
124+
dataParserError: T
125+
}
126+
]
127+
);
128+
}
129+
return g.value = null, h;
130+
}, x = () => {
131+
p.value?.reset?.(), g.value = null;
132+
}, F = () => {
133+
v.stop(), K = !0, p.value?.dispose?.();
134+
}, I = () => r.value, L = () => R(
135+
e,
136+
{
137+
...n.props,
138+
...u(),
139+
modelValue: r.value,
140+
"onUpdate:modelValue": (o) => {
141+
K || (r.value = o);
142+
},
143+
id: d,
144+
key: d,
145+
ref: p
146+
}
147+
), M = t.dataParser && (() => g.value);
148+
return {
149+
check: V,
150+
reset: x,
151+
dispose: F,
152+
getVNode: () => w.getVNode(
153+
{
154+
getLabel: l,
155+
fieldKey: d,
156+
getCurrentValue: I,
157+
getErrorMessage: M,
158+
class: t.class
159+
},
160+
{
161+
input: L
162+
}
163+
)
164+
};
165+
},
166+
s
167+
);
168+
};
169+
}
170+
export {
171+
ne as a,
172+
y as b,
173+
U as c,
174+
A as d,
175+
J as e,
176+
S as f,
177+
B as g,
178+
a as h,
179+
E as i,
180+
q as j,
181+
m as k,
182+
_ as l,
183+
te as m,
184+
j as n,
185+
z as r,
186+
Q as s
187+
};

docs/libs/v0/dist/vue/chunks/input-cJ2WV4iw.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/libs/v0/dist/vue/designSystem/index.cjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/libs/v0/dist/vue/designSystem/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { defineComponent as v, computed as g, openBlock as d, createElementBlock as m, normalizeStyle as S, createElementVNode as p, useModel as x, withDirectives as T, Fragment as He, renderList as Ke, toDisplayString as z, vModelSelect as rt, createVNode as M, unref as I, mergeModels as y, vModelRadio as lt, createCommentVNode as $, vModelText as N, defineAsyncComponent as R, normalizeClass as ut, createBlock as U, resolveDynamicComponent as ze, mergeProps as ce, h as W, vModelCheckbox as Ee, ref as se, createTextVNode as ct } from "vue";
2-
import { r as dt, b as mt, d as ft, k as Ie, i as ae, g as H, l as w, h as qe, j as Le, m as Me, s as pt, e as vt, a as _, n as ht } from "../chunks/input-BfByoR1U.js";
2+
import { r as dt, b as mt, d as ft, k as Ie, i as ae, g as H, l as w, h as qe, j as Le, m as Me, s as pt, e as vt, a as _, n as ht } from "../chunks/input-C4gxrRt9.js";
33
import { unwrap as Oe } from "@duplojs/utils";
44
function we(e) {
55
return dt.has(e) && mt.has(e) && ft(e);

0 commit comments

Comments
 (0)