sibujs 4.1.0 → 4.3.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 +24 -0
- package/dist/browser.cjs +13 -21
- package/dist/browser.js +6 -6
- package/dist/build.cjs +307 -111
- package/dist/build.js +15 -15
- package/dist/cdn.dev.global.js +398 -0
- package/dist/cdn.global.js +10 -10
- package/dist/{chunk-ANGSYNPX.js → chunk-2LSY4WDM.js} +86 -44
- package/dist/{chunk-VPP2FONR.js → chunk-2WLZ6757.js} +17 -10
- package/dist/{chunk-DCDS2PQ6.js → chunk-3E5YNK2F.js} +2 -2
- package/dist/{chunk-TIRZCERI.js → chunk-5DXA2J44.js} +1 -1
- package/dist/{chunk-PFTDGEPZ.js → chunk-7BJLKDBI.js} +3 -3
- package/dist/{chunk-XSZRJW76.js → chunk-7BPN4MXR.js} +6 -6
- package/dist/{chunk-BMSN6NWQ.js → chunk-7GQIRV27.js} +6 -6
- package/dist/{chunk-SHDVWATN.js → chunk-7UBG6LDP.js} +7 -8
- package/dist/{chunk-MRAMKDHQ.js → chunk-7UK6BSAT.js} +1 -1
- package/dist/{chunk-LOFZHP6V.js → chunk-AAHT6AKT.js} +7 -8
- package/dist/{chunk-FMHIQNMP.js → chunk-G7GPNB6N.js} +5 -5
- package/dist/{chunk-XIHMS2Y6.js → chunk-GZYQNIPS.js} +8 -8
- package/dist/{chunk-5INI7D2L.js → chunk-IXKSNWV5.js} +74 -11
- package/dist/{chunk-KSOEJGFO.js → chunk-IYHM4FWD.js} +3 -3
- package/dist/{chunk-AW6HPJ3L.js → chunk-KKLW7YWL.js} +1 -1
- package/dist/{chunk-5GJ5RTHA.js → chunk-L4B3Y3OM.js} +7 -8
- package/dist/{chunk-UFSQEO7P.js → chunk-MYA5HEK5.js} +7 -8
- package/dist/{chunk-HYCCIYNS.js → chunk-NIOYEGBQ.js} +13 -14
- package/dist/{chunk-DHDZ7IVN.js → chunk-QKRPLZ2V.js} +7 -8
- package/dist/{chunk-FB7KQXZI.js → chunk-R4EF7V3K.js} +4 -4
- package/dist/{chunk-IM7N5WR4.js → chunk-RE6KLGMV.js} +2 -2
- package/dist/{chunk-D3SZ4LVS.js → chunk-TSL64O5L.js} +5 -6
- package/dist/{chunk-DAKLOMKS.js → chunk-UD6YE2GW.js} +3 -3
- package/dist/{chunk-4U7KD3RY.js → chunk-USS5ENJ2.js} +3 -3
- package/dist/{chunk-I3VI34DP.js → chunk-XGCZ45NH.js} +149 -33
- package/dist/{chunk-4RH6D7GR.js → chunk-ZVYNIUOG.js} +6 -6
- package/dist/{customElement-CKLoO63w.d.ts → customElement-CNZxEB9G.d.cts} +77 -0
- package/dist/{customElement-CKLoO63w.d.cts → customElement-CNZxEB9G.d.ts} +77 -0
- package/dist/data.cjs +15 -24
- package/dist/data.js +9 -9
- package/dist/devtools.cjs +18 -22
- package/dist/devtools.d.cts +1 -1
- package/dist/devtools.d.ts +1 -1
- package/dist/devtools.js +8 -8
- package/dist/{dispose-4FZ6OFXR.js → dispose-46BOMMQJ.js} +2 -2
- package/dist/ecosystem.cjs +222 -67
- package/dist/ecosystem.js +11 -11
- package/dist/extras.cjs +243 -86
- package/dist/extras.d.cts +2 -2
- package/dist/extras.d.ts +2 -2
- package/dist/extras.js +25 -25
- package/dist/index.cjs +301 -105
- package/dist/index.d.cts +190 -37
- package/dist/index.d.ts +190 -37
- package/dist/index.js +15 -15
- package/dist/{introspect-RjLfIFpL.d.cts → introspect-D5xF-0Es.d.cts} +7 -0
- package/dist/{introspect-DOZfmC-4.d.ts → introspect-rSBIxEQi.d.ts} +7 -0
- package/dist/motion.cjs +13 -22
- package/dist/motion.js +5 -5
- package/dist/patterns.cjs +16 -24
- package/dist/patterns.d.cts +8 -0
- package/dist/patterns.d.ts +8 -0
- package/dist/patterns.js +7 -7
- package/dist/performance.cjs +16 -27
- package/dist/performance.js +9 -9
- package/dist/plugins.cjs +263 -88
- package/dist/plugins.d.cts +102 -2
- package/dist/plugins.d.ts +102 -2
- package/dist/plugins.js +21 -19
- package/dist/{ssr-JFP5535P.js → ssr-Y7XOEPEN.js} +5 -5
- package/dist/ssr.cjs +233 -79
- package/dist/ssr.js +12 -12
- package/dist/testing.cjs +11 -19
- package/dist/testing.js +5 -5
- package/dist/ui.cjs +98 -43
- package/dist/ui.d.cts +7 -1
- package/dist/ui.d.ts +7 -1
- package/dist/ui.js +10 -10
- package/dist/widgets.cjs +13 -21
- package/dist/widgets.d.cts +8 -0
- package/dist/widgets.d.ts +8 -0
- package/dist/widgets.js +9 -9
- package/package.json +5 -2
package/dist/patterns.cjs
CHANGED
|
@@ -44,23 +44,17 @@ __export(patterns_exports, {
|
|
|
44
44
|
module.exports = __toCommonJS(patterns_exports);
|
|
45
45
|
|
|
46
46
|
// src/core/dev.ts
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
// this branch is unreachable here.
|
|
52
|
-
/* v8 ignore next 2 */
|
|
53
|
-
typeof __SIBU_DEV__ !== "undefined" ? __SIBU_DEV__ : typeof process !== "undefined" && process.env?.NODE_ENV !== "production"
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
var _isDev = isDev();
|
|
47
|
+
var DEV = typeof __SIBU_DEV__ !== "undefined" ? !!__SIBU_DEV__ : typeof globalThis.__SIBU_DEV__ !== "undefined" ? !!globalThis.__SIBU_DEV__ : (
|
|
48
|
+
// safe default: off in browser, on in test/dev Node
|
|
49
|
+
typeof process !== "undefined" && process.env?.NODE_ENV !== "production"
|
|
50
|
+
);
|
|
57
51
|
function devAssert(condition, message) {
|
|
58
|
-
if (
|
|
52
|
+
if ((typeof __SIBU_DEV__ !== "undefined" ? __SIBU_DEV__ : DEV) && !condition) {
|
|
59
53
|
throw new Error(`[SibuJS] ${message}`);
|
|
60
54
|
}
|
|
61
55
|
}
|
|
62
56
|
function devWarn(message) {
|
|
63
|
-
if (
|
|
57
|
+
if (typeof __SIBU_DEV__ !== "undefined" ? __SIBU_DEV__ : DEV) {
|
|
64
58
|
console.warn(`[SibuJS] ${message}`);
|
|
65
59
|
}
|
|
66
60
|
}
|
|
@@ -609,17 +603,16 @@ function forEachSubscriber(signal2, visit) {
|
|
|
609
603
|
}
|
|
610
604
|
|
|
611
605
|
// src/reactivity/track.ts
|
|
612
|
-
var
|
|
613
|
-
var _runtimeVersion = true ? "4.1.0" : "dev";
|
|
606
|
+
var _runtimeVersion = true ? "4.3.0" : "dev";
|
|
614
607
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
615
608
|
function resolveReactiveApi() {
|
|
616
609
|
const g = globalThis;
|
|
617
610
|
const existing = g[REGISTRY_KEY];
|
|
618
611
|
if (existing) {
|
|
619
|
-
if (
|
|
612
|
+
if (DEV && !existing.__dupWarned) {
|
|
620
613
|
existing.__dupWarned = true;
|
|
621
614
|
devWarn(
|
|
622
|
-
`Multiple instances of the reactive runtime detected on this page (active: ${existing.version}, duplicate: ${_runtimeVersion}). Reactivity
|
|
615
|
+
`Multiple instances of the reactive runtime detected on this page (active: ${existing.version}, duplicate: ${_runtimeVersion}). Reactivity is NOT broken and no bundler configuration is required: every copy routes through the first one via a global registry, so signal writes still reach subscribers registered by any copy. This is only a SIZE issue \u2014 the duplicate copy's bytes are downloaded and parsed for nothing. If you want them back, de-duplicate sibujs in your bundler (Vite: resolve.dedupe: ['sibujs']). Mismatched VERSIONS above are worth fixing regardless, since only the first one loaded is used.`
|
|
623
616
|
);
|
|
624
617
|
}
|
|
625
618
|
return existing;
|
|
@@ -718,7 +711,6 @@ var isBatching = API2.isBatching;
|
|
|
718
711
|
|
|
719
712
|
// src/core/signals/signal.ts
|
|
720
713
|
var _g = globalThis;
|
|
721
|
-
var _isDev3 = isDev();
|
|
722
714
|
function signal(initial, options) {
|
|
723
715
|
const state2 = {
|
|
724
716
|
value: initial,
|
|
@@ -731,7 +723,7 @@ function signal(initial, options) {
|
|
|
731
723
|
_d: false,
|
|
732
724
|
_validate: void 0
|
|
733
725
|
};
|
|
734
|
-
const debugName =
|
|
726
|
+
const debugName = DEV ? options?.name : void 0;
|
|
735
727
|
const equalsFn = options?.equals;
|
|
736
728
|
if (debugName) state2.__name = debugName;
|
|
737
729
|
function get() {
|
|
@@ -748,7 +740,7 @@ function signal(initial, options) {
|
|
|
748
740
|
if (equalsFn(prev, newValue)) return;
|
|
749
741
|
state2.value = newValue;
|
|
750
742
|
state2.__v++;
|
|
751
|
-
if (
|
|
743
|
+
if (DEV) {
|
|
752
744
|
const hook = _g.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
|
|
753
745
|
if (hook) hook.emit("signal:update", { signal: state2, name: debugName, oldValue: prev, newValue });
|
|
754
746
|
}
|
|
@@ -756,7 +748,7 @@ function signal(initial, options) {
|
|
|
756
748
|
notifySubscribers2(state2);
|
|
757
749
|
}
|
|
758
750
|
};
|
|
759
|
-
} else if (
|
|
751
|
+
} else if (DEV) {
|
|
760
752
|
set = (next) => {
|
|
761
753
|
const prev = state2.value;
|
|
762
754
|
const newValue = typeof next === "function" ? next(prev) : next;
|
|
@@ -781,7 +773,7 @@ function signal(initial, options) {
|
|
|
781
773
|
}
|
|
782
774
|
};
|
|
783
775
|
}
|
|
784
|
-
if (
|
|
776
|
+
if (DEV) {
|
|
785
777
|
const hook = _g.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
|
|
786
778
|
if (hook) hook.emit("signal:create", { signal: state2, name: debugName, getter: get, initial });
|
|
787
779
|
}
|
|
@@ -1710,13 +1702,13 @@ var validators = {
|
|
|
1710
1702
|
function validateProps(props, schema) {
|
|
1711
1703
|
const result = { ...props };
|
|
1712
1704
|
const errors = [];
|
|
1713
|
-
const
|
|
1705
|
+
const isDev = typeof process === "undefined" || process?.env?.NODE_ENV !== "production";
|
|
1714
1706
|
for (const [key, def] of Object.entries(schema)) {
|
|
1715
1707
|
const propDef = typeof def === "function" ? { type: def } : def;
|
|
1716
1708
|
if (result[key] == null && propDef.default !== void 0) {
|
|
1717
1709
|
result[key] = typeof propDef.default === "function" ? propDef.default() : propDef.default;
|
|
1718
1710
|
}
|
|
1719
|
-
if (!
|
|
1711
|
+
if (!isDev) continue;
|
|
1720
1712
|
if (propDef.required && result[key] == null) {
|
|
1721
1713
|
errors.push(`Prop '${key}' is required`);
|
|
1722
1714
|
continue;
|
|
@@ -1731,7 +1723,7 @@ function validateProps(props, schema) {
|
|
|
1731
1723
|
if (validResult !== true) errors.push(validResult);
|
|
1732
1724
|
}
|
|
1733
1725
|
}
|
|
1734
|
-
if (errors.length > 0 &&
|
|
1726
|
+
if (errors.length > 0 && isDev) {
|
|
1735
1727
|
console.warn(`[SibuJS] Prop validation errors:
|
|
1736
1728
|
${errors.map((e) => ` - ${e}`).join("\n")}`);
|
|
1737
1729
|
}
|
package/dist/patterns.d.cts
CHANGED
|
@@ -94,6 +94,14 @@ interface PersistOptions<T = unknown> {
|
|
|
94
94
|
* Must be synchronous — see `encrypt` docs. */
|
|
95
95
|
decrypt?: (value: string) => string;
|
|
96
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* A signal mirrored into persistent storage, rehydrated on creation.
|
|
99
|
+
*
|
|
100
|
+
* @param key Storage key.
|
|
101
|
+
* @param initial Value used when storage holds nothing (or holds junk).
|
|
102
|
+
* @param options Storage backend, serializer and version/migration settings.
|
|
103
|
+
* @returns A `[accessor, setter]` pair with the same shape as `signal`.
|
|
104
|
+
*/
|
|
97
105
|
declare function persisted<T>(key: string, initial: T, options?: PersistOptions<T>): [() => T, (next: T | ((prev: T) => T)) => void];
|
|
98
106
|
|
|
99
107
|
/**
|
package/dist/patterns.d.ts
CHANGED
|
@@ -94,6 +94,14 @@ interface PersistOptions<T = unknown> {
|
|
|
94
94
|
* Must be synchronous — see `encrypt` docs. */
|
|
95
95
|
decrypt?: (value: string) => string;
|
|
96
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* A signal mirrored into persistent storage, rehydrated on creation.
|
|
99
|
+
*
|
|
100
|
+
* @param key Storage key.
|
|
101
|
+
* @param initial Value used when storage holds nothing (or holds junk).
|
|
102
|
+
* @param options Storage backend, serializer and version/migration settings.
|
|
103
|
+
* @returns A `[accessor, setter]` pair with the same shape as `signal`.
|
|
104
|
+
*/
|
|
97
105
|
declare function persisted<T>(key: string, initial: T, options?: PersistOptions<T>): [() => T, (next: T | ((prev: T) => T)) => void];
|
|
98
106
|
|
|
99
107
|
/**
|
package/dist/patterns.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
optimisticList,
|
|
6
6
|
persisted,
|
|
7
7
|
timeline
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-USS5ENJ2.js";
|
|
9
9
|
import {
|
|
10
10
|
RenderProp,
|
|
11
11
|
assertType,
|
|
@@ -23,12 +23,12 @@ import {
|
|
|
23
23
|
withWrapper
|
|
24
24
|
} from "./chunk-VJE6DDYM.js";
|
|
25
25
|
import "./chunk-H3SRKIYX.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-3E5YNK2F.js";
|
|
27
|
+
import "./chunk-7BJLKDBI.js";
|
|
28
|
+
import "./chunk-5DXA2J44.js";
|
|
29
|
+
import "./chunk-MYA5HEK5.js";
|
|
30
|
+
import "./chunk-TSL64O5L.js";
|
|
31
|
+
import "./chunk-2WLZ6757.js";
|
|
32
32
|
export {
|
|
33
33
|
RenderProp,
|
|
34
34
|
assertType,
|
package/dist/performance.cjs
CHANGED
|
@@ -231,23 +231,17 @@ async function processInChunks(items, processor, chunkSize = 50) {
|
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
// src/core/dev.ts
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
// this branch is unreachable here.
|
|
239
|
-
/* v8 ignore next 2 */
|
|
240
|
-
typeof __SIBU_DEV__ !== "undefined" ? __SIBU_DEV__ : typeof process !== "undefined" && process.env?.NODE_ENV !== "production"
|
|
241
|
-
);
|
|
242
|
-
}
|
|
243
|
-
var _isDev = isDev();
|
|
234
|
+
var DEV = typeof __SIBU_DEV__ !== "undefined" ? !!__SIBU_DEV__ : typeof globalThis.__SIBU_DEV__ !== "undefined" ? !!globalThis.__SIBU_DEV__ : (
|
|
235
|
+
// safe default: off in browser, on in test/dev Node
|
|
236
|
+
typeof process !== "undefined" && process.env?.NODE_ENV !== "production"
|
|
237
|
+
);
|
|
244
238
|
function devAssert(condition, message) {
|
|
245
|
-
if (
|
|
239
|
+
if ((typeof __SIBU_DEV__ !== "undefined" ? __SIBU_DEV__ : DEV) && !condition) {
|
|
246
240
|
throw new Error(`[SibuJS] ${message}`);
|
|
247
241
|
}
|
|
248
242
|
}
|
|
249
243
|
function devWarn(message) {
|
|
250
|
-
if (
|
|
244
|
+
if (typeof __SIBU_DEV__ !== "undefined" ? __SIBU_DEV__ : DEV) {
|
|
251
245
|
console.warn(`[SibuJS] ${message}`);
|
|
252
246
|
}
|
|
253
247
|
}
|
|
@@ -796,17 +790,16 @@ function forEachSubscriber(signal2, visit) {
|
|
|
796
790
|
}
|
|
797
791
|
|
|
798
792
|
// src/reactivity/track.ts
|
|
799
|
-
var
|
|
800
|
-
var _runtimeVersion = true ? "4.1.0" : "dev";
|
|
793
|
+
var _runtimeVersion = true ? "4.3.0" : "dev";
|
|
801
794
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
802
795
|
function resolveReactiveApi() {
|
|
803
796
|
const g = globalThis;
|
|
804
797
|
const existing = g[REGISTRY_KEY];
|
|
805
798
|
if (existing) {
|
|
806
|
-
if (
|
|
799
|
+
if (DEV && !existing.__dupWarned) {
|
|
807
800
|
existing.__dupWarned = true;
|
|
808
801
|
devWarn(
|
|
809
|
-
`Multiple instances of the reactive runtime detected on this page (active: ${existing.version}, duplicate: ${_runtimeVersion}). Reactivity
|
|
802
|
+
`Multiple instances of the reactive runtime detected on this page (active: ${existing.version}, duplicate: ${_runtimeVersion}). Reactivity is NOT broken and no bundler configuration is required: every copy routes through the first one via a global registry, so signal writes still reach subscribers registered by any copy. This is only a SIZE issue \u2014 the duplicate copy's bytes are downloaded and parsed for nothing. If you want them back, de-duplicate sibujs in your bundler (Vite: resolve.dedupe: ['sibujs']). Mismatched VERSIONS above are worth fixing regardless, since only the first one loaded is used.`
|
|
810
803
|
);
|
|
811
804
|
}
|
|
812
805
|
return existing;
|
|
@@ -1068,7 +1061,6 @@ var isBatching = API2.isBatching;
|
|
|
1068
1061
|
|
|
1069
1062
|
// src/core/signals/signal.ts
|
|
1070
1063
|
var _g2 = globalThis;
|
|
1071
|
-
var _isDev3 = isDev();
|
|
1072
1064
|
function signal(initial, options) {
|
|
1073
1065
|
const state2 = {
|
|
1074
1066
|
value: initial,
|
|
@@ -1081,7 +1073,7 @@ function signal(initial, options) {
|
|
|
1081
1073
|
_d: false,
|
|
1082
1074
|
_validate: void 0
|
|
1083
1075
|
};
|
|
1084
|
-
const debugName =
|
|
1076
|
+
const debugName = DEV ? options?.name : void 0;
|
|
1085
1077
|
const equalsFn = options?.equals;
|
|
1086
1078
|
if (debugName) state2.__name = debugName;
|
|
1087
1079
|
function get() {
|
|
@@ -1098,7 +1090,7 @@ function signal(initial, options) {
|
|
|
1098
1090
|
if (equalsFn(prev, newValue)) return;
|
|
1099
1091
|
state2.value = newValue;
|
|
1100
1092
|
state2.__v++;
|
|
1101
|
-
if (
|
|
1093
|
+
if (DEV) {
|
|
1102
1094
|
const hook = _g2.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
|
|
1103
1095
|
if (hook) hook.emit("signal:update", { signal: state2, name: debugName, oldValue: prev, newValue });
|
|
1104
1096
|
}
|
|
@@ -1106,7 +1098,7 @@ function signal(initial, options) {
|
|
|
1106
1098
|
notifySubscribers2(state2);
|
|
1107
1099
|
}
|
|
1108
1100
|
};
|
|
1109
|
-
} else if (
|
|
1101
|
+
} else if (DEV) {
|
|
1110
1102
|
set = (next) => {
|
|
1111
1103
|
const prev = state2.value;
|
|
1112
1104
|
const newValue = typeof next === "function" ? next(prev) : next;
|
|
@@ -1131,7 +1123,7 @@ function signal(initial, options) {
|
|
|
1131
1123
|
}
|
|
1132
1124
|
};
|
|
1133
1125
|
}
|
|
1134
|
-
if (
|
|
1126
|
+
if (DEV) {
|
|
1135
1127
|
const hook = _g2.__SIBU_DEVTOOLS_GLOBAL_HOOK__;
|
|
1136
1128
|
if (hook) hook.emit("signal:create", { signal: state2, name: debugName, getter: get, initial });
|
|
1137
1129
|
}
|
|
@@ -1189,7 +1181,6 @@ function reportDrainRunaway(label, executed, remaining) {
|
|
|
1189
1181
|
{ executed, remaining }
|
|
1190
1182
|
);
|
|
1191
1183
|
}
|
|
1192
|
-
var _isDev4 = isDev();
|
|
1193
1184
|
var activeBindingCount = 0;
|
|
1194
1185
|
function dispose(node) {
|
|
1195
1186
|
const stack = [node];
|
|
@@ -1212,13 +1203,13 @@ function dispose(node) {
|
|
|
1212
1203
|
if (!pending || pending.length === 0) break;
|
|
1213
1204
|
const snapshot = pending.slice();
|
|
1214
1205
|
elementDisposers.delete(current);
|
|
1215
|
-
if (
|
|
1206
|
+
if (DEV) activeBindingCount -= snapshot.length;
|
|
1216
1207
|
for (let i2 = 0; i2 < snapshot.length; i2++) {
|
|
1217
1208
|
if (executed >= MAX_DRAIN_TEARDOWNS) {
|
|
1218
1209
|
const rest = snapshot.slice(i2);
|
|
1219
1210
|
const added = elementDisposers.get(current);
|
|
1220
1211
|
elementDisposers.set(current, added ? rest.concat(added) : rest);
|
|
1221
|
-
if (
|
|
1212
|
+
if (DEV) activeBindingCount += rest.length;
|
|
1222
1213
|
reportDrainRunaway("dispose", executed, rest.length + (added?.length ?? 0));
|
|
1223
1214
|
runaway = true;
|
|
1224
1215
|
break;
|
|
@@ -1274,7 +1265,6 @@ function sanitizeUrl(url) {
|
|
|
1274
1265
|
}
|
|
1275
1266
|
|
|
1276
1267
|
// src/performance/domRecycler.ts
|
|
1277
|
-
var _isDev5 = isDev();
|
|
1278
1268
|
var DOMPool = class {
|
|
1279
1269
|
constructor(maxSize = 50) {
|
|
1280
1270
|
this.pools = /* @__PURE__ */ new Map();
|
|
@@ -1301,7 +1291,7 @@ var DOMPool = class {
|
|
|
1301
1291
|
* is almost certainly a bug.
|
|
1302
1292
|
*/
|
|
1303
1293
|
release(element) {
|
|
1304
|
-
if (
|
|
1294
|
+
if (DEV && element.isConnected) {
|
|
1305
1295
|
devWarn(
|
|
1306
1296
|
"DOMPool.release() called on a still-connected element. Detach it from the DOM first (remove() / dispose())."
|
|
1307
1297
|
);
|
|
@@ -1413,7 +1403,6 @@ function noSideEffect(fn) {
|
|
|
1413
1403
|
}
|
|
1414
1404
|
|
|
1415
1405
|
// src/platform/ssr.ts
|
|
1416
|
-
var _isDev6 = isDev();
|
|
1417
1406
|
function trustHTML(html) {
|
|
1418
1407
|
return html;
|
|
1419
1408
|
}
|
package/dist/performance.js
CHANGED
|
@@ -33,18 +33,18 @@ import {
|
|
|
33
33
|
transitionState,
|
|
34
34
|
uniqueId,
|
|
35
35
|
yieldToMain
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-AAHT6AKT.js";
|
|
37
37
|
import {
|
|
38
38
|
trustHTML
|
|
39
|
-
} from "./chunk-
|
|
40
|
-
import "./chunk-
|
|
39
|
+
} from "./chunk-NIOYEGBQ.js";
|
|
40
|
+
import "./chunk-IXKSNWV5.js";
|
|
41
41
|
import "./chunk-7ZHH77QA.js";
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-7BJLKDBI.js";
|
|
43
|
+
import "./chunk-5DXA2J44.js";
|
|
44
|
+
import "./chunk-QKRPLZ2V.js";
|
|
45
|
+
import "./chunk-MYA5HEK5.js";
|
|
46
|
+
import "./chunk-TSL64O5L.js";
|
|
47
|
+
import "./chunk-2WLZ6757.js";
|
|
48
48
|
export {
|
|
49
49
|
DOMPool,
|
|
50
50
|
Features,
|