@poveste/plugin-vue 0.2.1 → 0.3.1
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.
- package/dist/bundled/client/app/MountStory.js +45 -54
- package/dist/bundled/client/app/RenderStory.js +66 -73
- package/dist/bundled/client/app/RouterLinkStub.js +38 -39
- package/dist/bundled/client/app/Story.js +98 -111
- package/dist/bundled/client/app/Variant.js +89 -103
- package/dist/bundled/client/app/auto-props.js +46 -62
- package/dist/bundled/client/app/global-components.js +63 -79
- package/dist/bundled/client/app/host.js +72 -76
- package/dist/bundled/client/app/index.js +3 -6
- package/dist/bundled/client/app/render-context.js +9 -10
- package/dist/bundled/client/app/util.js +68 -65
- package/dist/bundled/client/client.js +4 -9
- package/dist/bundled/client/codegen.js +143 -190
- package/dist/bundled/client/server/Story.js +74 -78
- package/dist/bundled/client/server/Variant.js +45 -45
- package/dist/bundled/client/server/run.js +41 -42
- package/dist/bundled/client/server/stub.js +9 -7
- package/dist/bundled/client/server.js +1 -3
- package/dist/client/app/Story.d.ts +1 -1
- package/dist/client/app/host.d.ts +1 -1
- package/dist/client/server/Story.d.ts +2 -2
- package/dist/client/server/Variant.d.ts +1 -1
- package/package.json +11 -8
- package/src/client/app/Variant.ts +15 -5
- package/src/client/app/__tests__/state-sync.spec.ts +154 -0
- package/src/client/app/host.ts +2 -1
- package/src/client/app/util.ts +24 -10
- package/src/client/codegen.ts +1 -1
- package/src/client/server/Variant.ts +2 -1
- package/tsconfig.json +1 -1
- package/vitest.config.ts +13 -0
|
@@ -1,70 +1,73 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isRef as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
1
|
+
import { isRef as e, unref as t, watch as n } from "@poveste/vendors/vue";
|
|
2
|
+
import { isRef as r, unref as i, watch as a } from "vue";
|
|
3
|
+
import { applyState as o } from "@poveste/shared";
|
|
4
|
+
//#region src/client/app/util.ts
|
|
5
|
+
var s = (e) => typeof e == "object" && !!e;
|
|
6
|
+
function c(e, t = /* @__PURE__ */ new WeakMap()) {
|
|
7
|
+
let n = r(e) ? i(e) : e;
|
|
8
|
+
if (typeof n == "symbol") return n.toString();
|
|
9
|
+
if (!s(n)) return n;
|
|
10
|
+
if (t.has(n)) return t.get(n);
|
|
11
|
+
if (Array.isArray(n)) {
|
|
12
|
+
let e = [];
|
|
13
|
+
return t.set(n, e), e.push(...n.map((e) => c(e, t))), e;
|
|
14
|
+
}
|
|
15
|
+
{
|
|
16
|
+
let e = {};
|
|
17
|
+
return t.set(n, e), l(n, e, t), e;
|
|
18
|
+
}
|
|
20
19
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
function l(e, t, n = /* @__PURE__ */ new WeakMap()) {
|
|
21
|
+
Object.keys(e).forEach((r) => {
|
|
22
|
+
t[r] = c(e[r], n);
|
|
23
|
+
});
|
|
25
24
|
}
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return e.set(t, r), d(t, r, e), r;
|
|
40
|
-
}
|
|
25
|
+
function u(n, r = /* @__PURE__ */ new WeakMap()) {
|
|
26
|
+
let i = e(n) ? t(n) : n;
|
|
27
|
+
if (typeof i == "symbol") return i.toString();
|
|
28
|
+
if (!s(i)) return i;
|
|
29
|
+
if (r.has(i)) return r.get(i);
|
|
30
|
+
if (Array.isArray(i)) {
|
|
31
|
+
let e = [];
|
|
32
|
+
return r.set(i, e), e.push(...i.map((e) => u(e, r))), e;
|
|
33
|
+
}
|
|
34
|
+
{
|
|
35
|
+
let e = {};
|
|
36
|
+
return r.set(i, e), d(i, e, r), e;
|
|
37
|
+
}
|
|
41
38
|
}
|
|
42
|
-
function d(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
function d(e, t, n = /* @__PURE__ */ new WeakMap()) {
|
|
40
|
+
Object.keys(e).forEach((r) => {
|
|
41
|
+
t[r] = c(e[r], n);
|
|
42
|
+
});
|
|
46
43
|
}
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
44
|
+
function f(e, t) {
|
|
45
|
+
let r = !1, i = n(() => e, (e) => {
|
|
46
|
+
if (e != null) {
|
|
47
|
+
if (r) {
|
|
48
|
+
r = !1;
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
r = o(t, u(e));
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
deep: !0,
|
|
55
|
+
immediate: !0
|
|
56
|
+
}), s = a(() => t, (t) => {
|
|
57
|
+
if (t != null) {
|
|
58
|
+
if (r) {
|
|
59
|
+
r = !1;
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
r = o(e, c(t));
|
|
63
|
+
}
|
|
64
|
+
}, {
|
|
65
|
+
deep: !0,
|
|
66
|
+
immediate: !0
|
|
67
|
+
});
|
|
68
|
+
return { stop() {
|
|
69
|
+
i(), s();
|
|
70
|
+
} };
|
|
65
71
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
A as syncStateBundledAndExternal,
|
|
69
|
-
o as toRawDeep
|
|
70
|
-
};
|
|
72
|
+
//#endregion
|
|
73
|
+
export { u as _toRawDeep, f as syncStateBundledAndExternal, c as toRawDeep };
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
+
import { generateSourceCode as e, getTagName as t } from "./codegen.js";
|
|
2
|
+
import n from "./app/MountStory.js";
|
|
3
|
+
import r from "./app/RenderStory.js";
|
|
1
4
|
import "./app/index.js";
|
|
2
|
-
|
|
3
|
-
import { default as m } from "./app/MountStory.js";
|
|
4
|
-
import { default as d } from "./app/RenderStory.js";
|
|
5
|
-
export {
|
|
6
|
-
m as MountStory,
|
|
7
|
-
d as RenderStory,
|
|
8
|
-
o as generateSourceCode,
|
|
9
|
-
a as getTagName
|
|
10
|
-
};
|
|
5
|
+
export { n as MountStory, r as RenderStory, e as generateSourceCode, t as getTagName };
|
|
@@ -1,196 +1,149 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { Text as e, vModelCheckbox as t, vModelDynamic as n, vModelRadio as r, vModelSelect as i, vModelText as a } from "vue";
|
|
2
|
+
import { createAutoBuildingObject as o, indent as s, serializeJs as c, voidElements as l } from "@poveste/shared";
|
|
3
|
+
import { camelCase as u, pascalCase as d } from "change-case";
|
|
4
|
+
//#region src/client/codegen.ts
|
|
5
|
+
async function f(e) {
|
|
6
|
+
let t = e.slots().default?.({ state: e.state ?? {} }) ?? [], n = Array.isArray(t) ? t : [t], r = [];
|
|
7
|
+
for (let t in n) {
|
|
8
|
+
let i = n[t];
|
|
9
|
+
r.push(...(await p(i, e.state?._hPropState?.[t])).lines);
|
|
10
|
+
}
|
|
11
|
+
return r.join("\n");
|
|
12
12
|
}
|
|
13
|
-
async function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
const i = await x(s);
|
|
129
|
-
if (i.isText) {
|
|
130
|
-
e === void 0 && (e = !0);
|
|
131
|
-
const n = i.lines[0];
|
|
132
|
-
!c.length || /^\s/.test(n) ? c.push(n.trim()) : c[c.length - 1] += n;
|
|
133
|
-
} else
|
|
134
|
-
e === void 0 && (e = !1), c.push(...i.lines);
|
|
135
|
-
}
|
|
136
|
-
e !== void 0 && (j = e);
|
|
137
|
-
}
|
|
138
|
-
if (t.children && typeof t.children == "object" && !Array.isArray(t.children)) {
|
|
139
|
-
for (const e in t.children)
|
|
140
|
-
if (typeof t.children[e] == "function") {
|
|
141
|
-
const s = K((r) => `{{ ${r} }}`, (r, l) => {
|
|
142
|
-
if (l === "__v_isRef")
|
|
143
|
-
return () => !1;
|
|
144
|
-
}), i = t.children[e](s.proxy), n = [];
|
|
145
|
-
for (const r of i)
|
|
146
|
-
n.push(...(await x(r)).lines);
|
|
147
|
-
const u = Object.keys(s.cache);
|
|
148
|
-
u.length ? (c.push(`<template #${e}="{ ${u.join(", ")} }">`), c.push(..._(n)), c.push("</template>")) : e === "default" ? c.push(...n) : (c.push(`<template #${e}>`), c.push(..._(n)), c.push("</template>"));
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
const h = [`<${d}`];
|
|
152
|
-
if ($) {
|
|
153
|
-
for (const e of p)
|
|
154
|
-
h.push(..._(e));
|
|
155
|
-
c.length > 0 && h.push(">");
|
|
156
|
-
} else
|
|
157
|
-
p.length === 1 && (h[0] += ` ${p[0]}`), c.length > 0 && (h[0] += ">");
|
|
158
|
-
const k = N.includes(d.toLowerCase());
|
|
159
|
-
c.length > 0 ? c.length === 1 && h.length === 1 && !p.length && j ? a.push(`${h[0]}${c[0]}</${d}>`) : (a.push(...h), a.push(..._(c)), a.push(`</${d}>`)) : h.length > 1 ? (a.push(...h), a.push(k ? ">" : "/>")) : a.push(`${h[0]}${k ? "" : " /"}>`);
|
|
160
|
-
} else if (t?.shapeFlag & 16)
|
|
161
|
-
for (const g of t.children)
|
|
162
|
-
a.push(...(await x(g)).lines);
|
|
163
|
-
return {
|
|
164
|
-
lines: a
|
|
165
|
-
};
|
|
13
|
+
async function p(c, d = null) {
|
|
14
|
+
if (c.type === e) return {
|
|
15
|
+
lines: [c.children],
|
|
16
|
+
isText: !0
|
|
17
|
+
};
|
|
18
|
+
let f = [];
|
|
19
|
+
if (typeof c.type == "object" || typeof c.type == "string") {
|
|
20
|
+
c.type?.__asyncLoader && !c.type.__asyncResolved && await c.type.__asyncLoader();
|
|
21
|
+
let e = [], h = !1, v = ["key"];
|
|
22
|
+
function y(t, n, r = null) {
|
|
23
|
+
let i = "";
|
|
24
|
+
for (let e in n.modifiers) n.modifiers[e] && (i += `.${e}`);
|
|
25
|
+
let a = "";
|
|
26
|
+
n.arg && (a = `:${n.arg}`), r &&= r.replace(/^\$(?:setup|props|data)\./g, "");
|
|
27
|
+
let o = r ? [r] : g(n.value), s = [], c = `v-${t}${a}${i}="`;
|
|
28
|
+
o.length > 1 ? (s.push(`${c}${o[0]}`), s.push(...o.slice(1, o.length - 1)), s.push(`${o[o.length - 1]}"`), h = !0) : s.push(`${c}${o[0] ?? ""}"`), e.push(s);
|
|
29
|
+
}
|
|
30
|
+
if (c.dirs) {
|
|
31
|
+
for (let e of c.dirs) if (e.dir === a || e.dir === i || e.dir === r || e.dir === t || e.dir === n) {
|
|
32
|
+
let t = [`onUpdate:${e.arg ?? "modelValue"}`, `onUpdate:${u(e.arg ?? "modelValue")}`].find((e) => c.props[e]), n = c.props[t], r = null;
|
|
33
|
+
if (n) {
|
|
34
|
+
v.push(t);
|
|
35
|
+
let e = n.toString(), i = /\(\$event\) => (.*?) = \$event/.exec(e);
|
|
36
|
+
i && (r = i[1]);
|
|
37
|
+
}
|
|
38
|
+
y("model", e, r);
|
|
39
|
+
} else if (e.instance._ || e.instance.$) {
|
|
40
|
+
let t = e.instance.$ ?? e.instance._, n;
|
|
41
|
+
for (let r of [t.directives, t.appContext.directives]) {
|
|
42
|
+
for (let t in r) if (r[t] === e.dir) {
|
|
43
|
+
n = t;
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
if (n) break;
|
|
47
|
+
}
|
|
48
|
+
if (!n) {
|
|
49
|
+
for (let r in t.setupState) if (t.setupState[r] === e.dir) {
|
|
50
|
+
n = r.replace(/^v(\w)/, (e, t) => t.toLowerCase());
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
n && y(n, e);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function b(t, n) {
|
|
58
|
+
if (typeof n != "string" || c.dynamicProps?.includes(t)) {
|
|
59
|
+
let r = ":";
|
|
60
|
+
t.startsWith("on") && (r = "@");
|
|
61
|
+
let i = r === "@" ? `${t[2].toLowerCase()}${t.slice(3)}` : t, a = [`onUpdate:${t}`, `onUpdate:${u(t)}`].find((e) => c.dynamicProps?.includes(e) || c.props && e in c.props);
|
|
62
|
+
if (r === ":" && a) {
|
|
63
|
+
v.push(a);
|
|
64
|
+
let e = c.props[a].toString(), r, i = /\(\$event\) => (.*?) = \$event/.exec(e);
|
|
65
|
+
i && (r = i[1]);
|
|
66
|
+
let o = `${t === "modelValue" ? "model" : t}Modifiers`, s = c.props[o] ?? {};
|
|
67
|
+
v.push(o), y("model", {
|
|
68
|
+
arg: t === "modelValue" ? null : t,
|
|
69
|
+
modifiers: s,
|
|
70
|
+
value: n
|
|
71
|
+
}, r);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (n === void 0) return;
|
|
75
|
+
let o;
|
|
76
|
+
if (typeof n == "string" && n.startsWith("{{") && n.endsWith("}}")) o = _(n.substring(2, n.length - 2).trim()).split("\n");
|
|
77
|
+
else if (typeof n == "function") {
|
|
78
|
+
let e = _(n.toString().replace(/'/g, "\\'").replace(/"/g, "'")), t = /function (\S+)\(/.exec(e);
|
|
79
|
+
t ? o = [t[1]] : (e.startsWith("($event) => ") && (e = e.substring(12)), o = e.split("\n"));
|
|
80
|
+
} else o = g(n);
|
|
81
|
+
if (o.length > 1) {
|
|
82
|
+
h = !0;
|
|
83
|
+
let t = [`${r}${i}="${o[0]}`];
|
|
84
|
+
t.push(...o.slice(1, o.length - 1)), t.push(`${o[o.length - 1]}"`), e.push(t);
|
|
85
|
+
} else e.push([`${r}${i}="${o[0]}"`]);
|
|
86
|
+
} else c.type?.props?.[t]?.type === Boolean ? e.push([t]) : e.push([`${t}="${n}"`]);
|
|
87
|
+
}
|
|
88
|
+
for (let e in c.props) {
|
|
89
|
+
if (v.includes(e) || d && e in d) continue;
|
|
90
|
+
let t = c.props[e];
|
|
91
|
+
b(e, t);
|
|
92
|
+
}
|
|
93
|
+
if (d) for (let e in d) b(e, d[e]);
|
|
94
|
+
e.length > 1 && (h = !0);
|
|
95
|
+
let x = m(c), S = !1, C = [];
|
|
96
|
+
if (typeof c.children == "string") x === "pre" ? C.push(c.children) : C.push(...c.children.split("\n")), S = !0;
|
|
97
|
+
else if (Array.isArray(c.children)) {
|
|
98
|
+
let e;
|
|
99
|
+
for (let t of c.children) {
|
|
100
|
+
let n = await p(t);
|
|
101
|
+
if (n.isText) {
|
|
102
|
+
e === void 0 && (e = !0);
|
|
103
|
+
let t = n.lines[0];
|
|
104
|
+
!C.length || /^\s/.test(t) ? C.push(t.trim()) : C[C.length - 1] += t;
|
|
105
|
+
} else e === void 0 && (e = !1), C.push(...n.lines);
|
|
106
|
+
}
|
|
107
|
+
e !== void 0 && (S = e);
|
|
108
|
+
}
|
|
109
|
+
if (c.children && typeof c.children == "object" && !Array.isArray(c.children)) {
|
|
110
|
+
for (let e in c.children) if (typeof c.children[e] == "function") {
|
|
111
|
+
let t = o((e) => `{{ ${e} }}`, (e, t) => {
|
|
112
|
+
if (t === "__v_isRef") return () => !1;
|
|
113
|
+
}), n = c.children[e](t.proxy), r = [];
|
|
114
|
+
for (let e of n) r.push(...(await p(e)).lines);
|
|
115
|
+
let i = Object.keys(t.cache);
|
|
116
|
+
i.length ? (C.push(`<template #${e}="{ ${i.join(", ")} }">`), C.push(...s(r)), C.push("</template>")) : e === "default" ? C.push(...r) : (C.push(`<template #${e}>`), C.push(...s(r)), C.push("</template>"));
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
let w = [`<${x}`];
|
|
120
|
+
if (h) {
|
|
121
|
+
for (let t of e) w.push(...s(t));
|
|
122
|
+
C.length > 0 && w.push(">");
|
|
123
|
+
} else e.length === 1 && (w[0] += ` ${e[0]}`), C.length > 0 && (w[0] += ">");
|
|
124
|
+
let T = l.includes(x.toLowerCase());
|
|
125
|
+
C.length > 0 ? C.length === 1 && w.length === 1 && !e.length && S ? f.push(`${w[0]}${C[0]}</${x}>`) : (f.push(...w), f.push(...s(C)), f.push(`</${x}>`)) : w.length > 1 ? (f.push(...w), f.push(T ? ">" : "/>")) : f.push(`${w[0]}${T ? "" : " /"}>`);
|
|
126
|
+
} else if (c?.shapeFlag & 16) for (let e of c.children) f.push(...(await p(e)).lines);
|
|
127
|
+
return { lines: f };
|
|
166
128
|
}
|
|
167
|
-
function
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
if (t.type?.name)
|
|
175
|
-
return t.type.name;
|
|
176
|
-
if (t.type?.__file)
|
|
177
|
-
return R(t.type.__file);
|
|
178
|
-
}
|
|
179
|
-
return "Anonymous";
|
|
129
|
+
function m(e) {
|
|
130
|
+
if (typeof e.type == "string") return e.type;
|
|
131
|
+
if (e.type?.__asyncResolved) {
|
|
132
|
+
let t = e.type?.__asyncResolved;
|
|
133
|
+
return t.name ?? h(t.__file);
|
|
134
|
+
}
|
|
135
|
+
return e.type?.name ? e.type.name : e.type?.__file ? h(e.type.__file) : "Anonymous";
|
|
180
136
|
}
|
|
181
|
-
function
|
|
182
|
-
|
|
183
|
-
|
|
137
|
+
function h(e) {
|
|
138
|
+
let t = /([^/]+)\.vue$/.exec(e);
|
|
139
|
+
return t ? d(t[1]) : "Anonymous";
|
|
184
140
|
}
|
|
185
|
-
function
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
`);
|
|
141
|
+
function g(e) {
|
|
142
|
+
let t = !!e?.__autoBuildingObject, n = c(e);
|
|
143
|
+
return t ? [_(n.__autoBuildingObjectGetKey)] : _(n).split("\n");
|
|
189
144
|
}
|
|
190
|
-
function
|
|
191
|
-
|
|
145
|
+
function _(e) {
|
|
146
|
+
return e.replace(/\$setup\./g, "");
|
|
192
147
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
O as getTagName
|
|
196
|
-
};
|
|
148
|
+
//#endregion
|
|
149
|
+
export { f as generateSourceCode, m as getTagName };
|