@jasonshimmy/custom-elements-runtime 3.3.0 → 3.5.0
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/README.md +28 -7
- package/dist/css-utils-Bn-dO44e.js +203 -0
- package/dist/{css-utils-CC43BbEy.js.map → css-utils-Bn-dO44e.js.map} +1 -1
- package/dist/{css-utils-CC43BbEy.js → css-utils-CFeP8SK1.cjs} +5 -71
- package/dist/{css-utils-mgjmH8qX.cjs.map → css-utils-CFeP8SK1.cjs.map} +1 -1
- package/dist/custom-elements-runtime.cjs.js +3 -4
- package/dist/custom-elements-runtime.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.colors.cjs.js +1 -2
- package/dist/custom-elements-runtime.colors.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.colors.es.js +277 -277
- package/dist/custom-elements-runtime.colors.es.js.map +1 -1
- package/dist/custom-elements-runtime.directive-enhancements.cjs.js +1 -2
- package/dist/custom-elements-runtime.directive-enhancements.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.directive-enhancements.es.js +106 -122
- package/dist/custom-elements-runtime.directive-enhancements.es.js.map +1 -1
- package/dist/custom-elements-runtime.directives.cjs.js +1 -2
- package/dist/custom-elements-runtime.directives.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.directives.es.js +60 -65
- package/dist/custom-elements-runtime.directives.es.js.map +1 -1
- package/dist/custom-elements-runtime.dom-jit-css.cjs.js +1 -7
- package/dist/custom-elements-runtime.dom-jit-css.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.dom-jit-css.es.js +103 -115
- package/dist/custom-elements-runtime.dom-jit-css.es.js.map +1 -1
- package/dist/custom-elements-runtime.es.js +206 -253
- package/dist/custom-elements-runtime.es.js.map +1 -1
- package/dist/custom-elements-runtime.event-bus.cjs.js +1 -2
- package/dist/custom-elements-runtime.event-bus.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.event-bus.es.js +102 -108
- package/dist/custom-elements-runtime.event-bus.es.js.map +1 -1
- package/dist/custom-elements-runtime.jit-css.cjs.js +1 -2
- package/dist/custom-elements-runtime.jit-css.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.jit-css.es.js +14 -32
- package/dist/custom-elements-runtime.jit-css.es.js.map +1 -1
- package/dist/custom-elements-runtime.router.cjs.js +20 -21
- package/dist/custom-elements-runtime.router.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.router.es.js +866 -926
- package/dist/custom-elements-runtime.router.es.js.map +1 -1
- package/dist/custom-elements-runtime.ssr-middleware.cjs.js +3 -4
- package/dist/custom-elements-runtime.ssr-middleware.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.ssr-middleware.es.js +67 -73
- package/dist/custom-elements-runtime.ssr-middleware.es.js.map +1 -1
- package/dist/custom-elements-runtime.ssr.cjs.js +1 -1
- package/dist/custom-elements-runtime.ssr.es.js +3 -13
- package/dist/custom-elements-runtime.store.cjs.js +1 -2
- package/dist/custom-elements-runtime.store.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.store.es.js +32 -33
- package/dist/custom-elements-runtime.store.es.js.map +1 -1
- package/dist/custom-elements-runtime.transitions.cjs.js +1 -2
- package/dist/custom-elements-runtime.transitions.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.transitions.es.js +200 -210
- package/dist/custom-elements-runtime.transitions.es.js.map +1 -1
- package/dist/custom-elements-runtime.vite-plugin.cjs.js +4 -2
- package/dist/custom-elements-runtime.vite-plugin.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.vite-plugin.es.js +155 -78
- package/dist/custom-elements-runtime.vite-plugin.es.js.map +1 -1
- package/dist/helpers-DcEpRwq5.cjs +5 -0
- package/dist/helpers-DcEpRwq5.cjs.map +1 -0
- package/dist/helpers-tJgb4Qve.js +693 -0
- package/dist/helpers-tJgb4Qve.js.map +1 -0
- package/dist/hooks-CEUnvtsA.js +407 -0
- package/dist/hooks-CEUnvtsA.js.map +1 -0
- package/dist/hooks-CNfugc95.cjs +2 -0
- package/dist/hooks-CNfugc95.cjs.map +1 -0
- package/dist/logger-DIJ0UH3R.js +36 -0
- package/dist/{logger-L25axmB-.js.map → logger-DIJ0UH3R.js.map} +1 -1
- package/dist/logger-Dkht1dCX.cjs +2 -0
- package/dist/{logger-BYIN7ysT.cjs.map → logger-Dkht1dCX.cjs.map} +1 -1
- package/dist/namespace-helpers-CIUkG8Mn.js +56 -0
- package/dist/{namespace-helpers-BucDdgz_.js.map → namespace-helpers-CIUkG8Mn.js.map} +1 -1
- package/dist/namespace-helpers-yYIb7INq.cjs +2 -0
- package/dist/{namespace-helpers-Bf7rm9JV.cjs.map → namespace-helpers-yYIb7INq.cjs.map} +1 -1
- package/dist/runtime/tag-utils.d.ts +11 -0
- package/dist/ssr-BpYy9XlW.js +170 -0
- package/dist/{ssr-B3lxl1vr.js.map → ssr-BpYy9XlW.js.map} +1 -1
- package/dist/ssr-CFabTOyi.cjs +4 -0
- package/dist/{ssr-DtD9e5iA.cjs.map → ssr-CFabTOyi.cjs.map} +1 -1
- package/dist/ssr.d.ts +33 -0
- package/dist/style-A8l3aQ52.cjs +55 -0
- package/dist/{style-Bjn8zDiZ.cjs.map → style-A8l3aQ52.cjs.map} +1 -1
- package/dist/style-DSSoCbC9.js +1877 -0
- package/dist/{style-DuDoj_xK.js.map → style-DSSoCbC9.js.map} +1 -1
- package/dist/tag-utils-CoSXTr1F.js +10 -0
- package/dist/tag-utils-CoSXTr1F.js.map +1 -0
- package/dist/tag-utils-XJ3dkcPQ.cjs +2 -0
- package/dist/tag-utils-XJ3dkcPQ.cjs.map +1 -0
- package/dist/template-compiler-B4B_jAPN.cjs +19 -0
- package/dist/{template-compiler-BB4JJdqk.cjs.map → template-compiler-B4B_jAPN.cjs.map} +1 -1
- package/dist/template-compiler-C3h8_vbE.js +3044 -0
- package/dist/{template-compiler-Cs5axmn4.js.map → template-compiler-C3h8_vbE.js.map} +1 -1
- package/dist/vite-plugin.d.ts +96 -2
- package/package.json +8 -8
- package/dist/css-utils-mgjmH8qX.cjs +0 -577
- package/dist/hooks-_3xP4G2N.js +0 -1189
- package/dist/hooks-_3xP4G2N.js.map +0 -1
- package/dist/hooks-fYQgZk2g.cjs +0 -7
- package/dist/hooks-fYQgZk2g.cjs.map +0 -1
- package/dist/logger-BYIN7ysT.cjs +0 -3
- package/dist/logger-L25axmB-.js +0 -41
- package/dist/namespace-helpers-Bf7rm9JV.cjs +0 -3
- package/dist/namespace-helpers-BucDdgz_.js +0 -61
- package/dist/ssr-B3lxl1vr.js +0 -165
- package/dist/ssr-DtD9e5iA.cjs +0 -5
- package/dist/style-Bjn8zDiZ.cjs +0 -56
- package/dist/style-DuDoj_xK.js +0 -1972
- package/dist/template-compiler-BB4JJdqk.cjs +0 -23
- package/dist/template-compiler-Cs5axmn4.js +0 -3236
|
@@ -1,272 +1,225 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import {
|
|
3
|
-
import { n as g, r as
|
|
4
|
-
import { o as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./logger-DIJ0UH3R.js";
|
|
2
|
+
import { D as i, E as a, _ as o, b as s, g as c, h as l, k as u, m as d, n as f, v as p, x as m, y as h } from "./helpers-tJgb4Qve.js";
|
|
3
|
+
import { n as g, r as _, t as v } from "./template-compiler-C3h8_vbE.js";
|
|
4
|
+
import { o as y } from "./css-utils-Bn-dO44e.js";
|
|
5
|
+
import { _ as b, a as x, d as S, f as C, g as w, h as T, i as E, l as D, m as O, n as k, o as A, p as j, r as M, s as N, u as P, v as F, y as I } from "./hooks-CEUnvtsA.js";
|
|
6
|
+
//#region src/lib/runtime/hydration.ts
|
|
7
|
+
function L(e = document) {
|
|
8
|
+
typeof CustomEvent > "u" || (e instanceof Document ? e.documentElement : e).dispatchEvent(new CustomEvent("cer:hydrate", {
|
|
9
|
+
bubbles: !0,
|
|
10
|
+
composed: !0
|
|
11
|
+
}));
|
|
10
12
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/lib/runtime/monitoring/health-monitor.ts
|
|
15
|
+
var R = 100, z = 3e4;
|
|
16
|
+
function B(e, t, n) {
|
|
17
|
+
return n === "jitCacheHitRate" ? e < t * .5 ? "critical" : e < t ? "warning" : "healthy" : e > t * 2 ? "critical" : e > t ? "warning" : "healthy";
|
|
14
18
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
function V(e) {
|
|
20
|
+
let t = [];
|
|
21
|
+
return e.memoryUsage?.status !== "healthy" && t.push("Consider reducing component complexity or implementing better memory cleanup"), e.averageRenderTime?.status !== "healthy" && t.push("Optimize component render functions - consider lazy loading or virtualization"), e.jitCacheHitRate?.status !== "healthy" && t.push("JIT CSS cache performance is poor - review CSS patterns for optimization"), e.componentErrorRate?.status !== "healthy" && t.push("High component error rate detected - review error handling and component logic"), e.activeReactiveStates?.status !== "healthy" && t.push("High number of reactive states - consider state consolidation or cleanup"), e.memoryLeakIndicator?.status !== "healthy" && t.push("Potential memory leak detected - review component cleanup and event listener management"), t;
|
|
18
22
|
}
|
|
19
|
-
function
|
|
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
|
-
getMetricHistory: M,
|
|
100
|
-
clearHistory: L
|
|
101
|
-
};
|
|
23
|
+
function H() {
|
|
24
|
+
let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), i = null;
|
|
25
|
+
function a(t, n, r) {
|
|
26
|
+
e.set(t, {
|
|
27
|
+
name: t,
|
|
28
|
+
value: n,
|
|
29
|
+
threshold: r,
|
|
30
|
+
status: "healthy",
|
|
31
|
+
lastUpdated: Date.now(),
|
|
32
|
+
history: []
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function o() {
|
|
36
|
+
a("activeComponents", 0, 1e3), a("componentCreateRate", 0, 50), a("componentErrorRate", 0, .1), a("memoryUsage", 0, 50 * 1024 * 1024), a("memoryGrowthRate", 0, 1024 * 1024), a("averageRenderTime", 0, 16), a("slowRenderCount", 0, 10), a("jitCacheHitRate", 100, 80), a("activeReactiveStates", 0, 5e3), a("dependencyUpdates", 0, 100), a("memoryLeakIndicator", 0, .1);
|
|
37
|
+
}
|
|
38
|
+
function s(t, n) {
|
|
39
|
+
let r = e.get(t);
|
|
40
|
+
r && (r.value = n, r.lastUpdated = Date.now(), r.history.push(n), r.history.length > R && r.history.shift(), r.status = B(n, r.threshold, t));
|
|
41
|
+
}
|
|
42
|
+
function c() {
|
|
43
|
+
let t = {}, n = "healthy";
|
|
44
|
+
for (let [r, i] of e) t[r] = { ...i }, i.status === "critical" ? n = "critical" : i.status === "warning" && n === "healthy" && (n = "warning");
|
|
45
|
+
return {
|
|
46
|
+
overall: n,
|
|
47
|
+
metrics: t,
|
|
48
|
+
timestamp: Date.now(),
|
|
49
|
+
recommendations: V(t)
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function l() {
|
|
53
|
+
if ("memory" in performance && performance.memory) {
|
|
54
|
+
let t = performance.memory;
|
|
55
|
+
s("memoryUsage", t.usedJSHeapSize);
|
|
56
|
+
let n = e.get("memoryUsage");
|
|
57
|
+
if (n && n.history.length > 1) {
|
|
58
|
+
let e = n.history[n.history.length - 2], t = n.history[n.history.length - 1];
|
|
59
|
+
s("memoryGrowthRate", Math.max(0, t - e));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function u(e) {
|
|
64
|
+
for (let n of t) try {
|
|
65
|
+
n(e);
|
|
66
|
+
} catch (e) {
|
|
67
|
+
r("Error in health monitor listener:", e);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function d() {
|
|
71
|
+
l();
|
|
72
|
+
let e = c();
|
|
73
|
+
u(e), e.overall === "critical" ? r("🚨 Runtime Health: Critical issues detected", e.recommendations) : e.overall === "warning" && n("⚠️ Runtime Health: Performance warnings", e.recommendations);
|
|
74
|
+
}
|
|
75
|
+
function f() {
|
|
76
|
+
typeof window > "u" || (i = setInterval(d, z));
|
|
77
|
+
}
|
|
78
|
+
function p() {
|
|
79
|
+
i !== null && (clearInterval(i), i = null);
|
|
80
|
+
}
|
|
81
|
+
function m(e) {
|
|
82
|
+
t.add(e);
|
|
83
|
+
}
|
|
84
|
+
function h(e) {
|
|
85
|
+
t.delete(e);
|
|
86
|
+
}
|
|
87
|
+
function g(t) {
|
|
88
|
+
let n = e.get(t);
|
|
89
|
+
return n ? [...n.history] : [];
|
|
90
|
+
}
|
|
91
|
+
function _() {
|
|
92
|
+
for (let t of e.values()) t.history = [];
|
|
93
|
+
}
|
|
94
|
+
return o(), f(), {
|
|
95
|
+
updateMetric: s,
|
|
96
|
+
getHealthReport: c,
|
|
97
|
+
addListener: m,
|
|
98
|
+
removeListener: h,
|
|
99
|
+
stop: p,
|
|
100
|
+
getMetricHistory: g,
|
|
101
|
+
clearHistory: _
|
|
102
|
+
};
|
|
102
103
|
}
|
|
103
|
-
var
|
|
104
|
-
function
|
|
105
|
-
|
|
104
|
+
var U = null;
|
|
105
|
+
function W() {
|
|
106
|
+
return U ||= H(), U;
|
|
106
107
|
}
|
|
107
|
-
function
|
|
108
|
-
|
|
108
|
+
function G(e, t) {
|
|
109
|
+
W().updateMetric(e, t);
|
|
109
110
|
}
|
|
110
|
-
function
|
|
111
|
-
|
|
111
|
+
function K() {
|
|
112
|
+
return W().getHealthReport();
|
|
112
113
|
}
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region src/lib/keep-alive.ts
|
|
116
|
+
function q() {
|
|
117
|
+
typeof window > "u" || typeof customElements > "u" || customElements.get("cer-keep-alive") || customElements.define("cer-keep-alive", J());
|
|
115
118
|
}
|
|
116
|
-
function
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
119
|
+
function J() {
|
|
120
|
+
return class extends HTMLElement {
|
|
121
|
+
_cache = /* @__PURE__ */ new Map();
|
|
122
|
+
_slot = null;
|
|
123
|
+
_slotListener = null;
|
|
124
|
+
connectedCallback() {
|
|
125
|
+
this.shadowRoot || this.attachShadow({ mode: "open" }), this.shadowRoot.querySelector("slot") || (this.shadowRoot.innerHTML = "<slot></slot>"), this._slot = this.shadowRoot.querySelector("slot"), this._slot && (this._slotListener = () => this._handleSlotChange(), this._slot.addEventListener("slotchange", this._slotListener), this._handleSlotChange());
|
|
126
|
+
}
|
|
127
|
+
disconnectedCallback() {
|
|
128
|
+
this._slot && this._slotListener && this._slot.removeEventListener("slotchange", this._slotListener), this._slotListener = null;
|
|
129
|
+
}
|
|
130
|
+
clearCache(e) {
|
|
131
|
+
e ? this._cache.delete(e) : this._cache.clear();
|
|
132
|
+
}
|
|
133
|
+
_handleSlotChange() {
|
|
134
|
+
if (!this._slot) return;
|
|
135
|
+
let e = this._slot.assignedElements({ flatten: !0 });
|
|
136
|
+
for (let t of e) {
|
|
137
|
+
let e = this._buildCacheKey(t);
|
|
138
|
+
if (!this._cache.has(e)) this._cache.set(e, t);
|
|
139
|
+
else {
|
|
140
|
+
let n = this._cache.get(e);
|
|
141
|
+
if (n !== t) try {
|
|
142
|
+
t.parentNode?.replaceChild(n, t);
|
|
143
|
+
} catch {
|
|
144
|
+
this._cache.set(e, t);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
_buildCacheKey(e) {
|
|
150
|
+
let t = e.tagName.toLowerCase(), n = e.getAttribute("id");
|
|
151
|
+
return n ? `${t}:${n}` : t;
|
|
152
|
+
}
|
|
153
|
+
};
|
|
151
154
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region src/lib/runtime/builtin-components.ts
|
|
157
|
+
function Y() {
|
|
158
|
+
typeof customElements < "u" && customElements.get("cer-suspense") || g("cer-suspense", () => {
|
|
159
|
+
let { pending: e } = b({ pending: !1 });
|
|
160
|
+
return e ? v`<slot name="fallback"><span>Loading…</span></slot>` : v`<slot></slot>`;
|
|
161
|
+
});
|
|
157
162
|
}
|
|
158
|
-
function
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
163
|
+
function X() {
|
|
164
|
+
typeof customElements < "u" && customElements.get("cer-error-boundary") || g("cer-error-boundary", () => {
|
|
165
|
+
let e = h(!1), t = h("");
|
|
166
|
+
return w((n) => {
|
|
167
|
+
e.value = !0, t.value = n.message;
|
|
168
|
+
}), S({
|
|
169
|
+
_cerHandleChildError: (n) => {
|
|
170
|
+
e.peek() || (e.value = !0, t.value = n instanceof Error ? n.message : String(n));
|
|
171
|
+
},
|
|
172
|
+
reset: () => {
|
|
173
|
+
e.value = !1, t.value = "";
|
|
174
|
+
}
|
|
175
|
+
}), e.value ? v`<slot name="fallback"
|
|
171
176
|
><div role="alert">
|
|
172
177
|
<strong>Something went wrong.</strong>
|
|
173
|
-
${t.value ?
|
|
178
|
+
${t.value ? v`<p>${t.value}</p>` : v``}
|
|
174
179
|
</div></slot
|
|
175
|
-
>` :
|
|
176
|
-
|
|
180
|
+
>` : v`<slot></slot>`;
|
|
181
|
+
});
|
|
177
182
|
}
|
|
178
|
-
function
|
|
179
|
-
|
|
183
|
+
function Z() {
|
|
184
|
+
Y(), X(), q();
|
|
180
185
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
const t = T.getOrCreateState(null), r = t.peek();
|
|
196
|
-
if (r !== null) return r;
|
|
197
|
-
const n = y(e, () => t.initSilent(null));
|
|
198
|
-
return t.initSilent(n), n;
|
|
199
|
-
}
|
|
200
|
-
return y(e);
|
|
186
|
+
//#endregion
|
|
187
|
+
//#region src/lib/teleport.ts
|
|
188
|
+
function Q(e) {
|
|
189
|
+
if (typeof document > "u" || A()) return {
|
|
190
|
+
portal: () => {},
|
|
191
|
+
destroy: () => {}
|
|
192
|
+
};
|
|
193
|
+
if (E()) {
|
|
194
|
+
let t = p.getOrCreateState(null), n = t.peek();
|
|
195
|
+
if (n !== null) return n;
|
|
196
|
+
let r = $(e, () => t.initSilent(null));
|
|
197
|
+
return t.initSilent(r), r;
|
|
198
|
+
}
|
|
199
|
+
return $(e);
|
|
201
200
|
}
|
|
202
|
-
function
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}
|
|
223
|
-
n.parentNode && n.parentNode.removeChild(n), t?.();
|
|
224
|
-
}
|
|
225
|
-
};
|
|
201
|
+
function $(e, t) {
|
|
202
|
+
let n = typeof e == "string" ? document.querySelector(e) : e;
|
|
203
|
+
if (!n) return console.warn(`[useTeleport] Target "${String(e)}" not found in the document. Teleported content will not be rendered.`), {
|
|
204
|
+
portal: () => {},
|
|
205
|
+
destroy: () => {}
|
|
206
|
+
};
|
|
207
|
+
let r = document.createElement("cer-teleport");
|
|
208
|
+
r.dataset.cerTeleport = "", n.appendChild(r);
|
|
209
|
+
let i = {};
|
|
210
|
+
return {
|
|
211
|
+
portal(e) {
|
|
212
|
+
_(r, e == null ? [] : Array.isArray(e) ? e : [e], void 0, i);
|
|
213
|
+
},
|
|
214
|
+
destroy() {
|
|
215
|
+
try {
|
|
216
|
+
_(r, [], void 0, i);
|
|
217
|
+
} catch {}
|
|
218
|
+
r.parentNode && r.parentNode.removeChild(r), t?.();
|
|
219
|
+
}
|
|
220
|
+
};
|
|
226
221
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
g as component,
|
|
230
|
-
F as computed,
|
|
231
|
-
ae as createComposable,
|
|
232
|
-
N as createHealthMonitor,
|
|
233
|
-
ve as css,
|
|
234
|
-
me as decodeEntities,
|
|
235
|
-
le as defineModel,
|
|
236
|
-
J as devLog,
|
|
237
|
-
Z as flushDOMUpdates,
|
|
238
|
-
D as getCurrentComponentContext,
|
|
239
|
-
v as getHealthMonitor,
|
|
240
|
-
Ee as getHealthStatus,
|
|
241
|
-
l as html,
|
|
242
|
-
Ce as hydrateApp,
|
|
243
|
-
ne as inject,
|
|
244
|
-
pe as isReactiveState,
|
|
245
|
-
ee as nextTick,
|
|
246
|
-
ue as provide,
|
|
247
|
-
f as ref,
|
|
248
|
-
_e as registerBuiltinComponents,
|
|
249
|
-
q as registerErrorBoundary,
|
|
250
|
-
$ as registerKeepAlive,
|
|
251
|
-
P as registerSuspense,
|
|
252
|
-
te as scheduleWithPriority,
|
|
253
|
-
G as setDevMode,
|
|
254
|
-
Y as unsafeHTML,
|
|
255
|
-
we as updateHealthMetric,
|
|
256
|
-
se as useDesignTokens,
|
|
257
|
-
de as useEmit,
|
|
258
|
-
A as useExpose,
|
|
259
|
-
re as useGlobalStyle,
|
|
260
|
-
ce as useOnAttributeChanged,
|
|
261
|
-
ie as useOnConnected,
|
|
262
|
-
oe as useOnDisconnected,
|
|
263
|
-
I as useOnError,
|
|
264
|
-
k as useProps,
|
|
265
|
-
he as useSlots,
|
|
266
|
-
fe as useStyle,
|
|
267
|
-
Re as useTeleport,
|
|
268
|
-
W as watch,
|
|
269
|
-
Q as watchEffect
|
|
270
|
-
};
|
|
222
|
+
//#endregion
|
|
223
|
+
export { l as ReactiveState, g as component, c as computed, k as createComposable, H as createHealthMonitor, y as css, f as decodeEntities, M as defineModel, t as devLog, a as flushDOMUpdates, E as getCurrentComponentContext, W as getHealthMonitor, K as getHealthStatus, v as html, L as hydrateApp, x as inject, o as isReactiveState, i as nextTick, N as provide, h as ref, Z as registerBuiltinComponents, X as registerErrorBoundary, q as registerKeepAlive, Y as registerSuspense, u as scheduleWithPriority, e as setDevMode, d as unsafeHTML, G as updateHealthMetric, D as useDesignTokens, P as useEmit, S as useExpose, C as useGlobalStyle, j as useOnAttributeChanged, O as useOnConnected, T as useOnDisconnected, w as useOnError, b as useProps, F as useSlots, I as useStyle, Q as useTeleport, s as watch, m as watchEffect };
|
|
271
224
|
|
|
272
225
|
//# sourceMappingURL=custom-elements-runtime.es.js.map
|