sibujs 3.3.2 → 3.4.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/dist/browser.cjs +21 -4
- package/dist/browser.js +4 -4
- package/dist/build.cjs +3343 -3009
- package/dist/build.js +12 -11
- package/dist/cdn.global.js +7 -7
- package/dist/{chunk-AEOLHSSQ.js → chunk-3DVGCW7O.js} +72 -25
- package/dist/{chunk-6TCOWMGY.js → chunk-3Z2NGWQI.js} +1 -1
- package/dist/chunk-7ZHH77QA.js +9 -0
- package/dist/{chunk-2ARSB7NG.js → chunk-APFRCIRI.js} +2906 -2569
- package/dist/{chunk-62V653X2.js → chunk-AXFWGY32.js} +79 -44
- package/dist/{chunk-N5TQVEKE.js → chunk-BUKYCWHX.js} +1 -1
- package/dist/{chunk-655B7MMR.js → chunk-CEBWDD63.js} +15 -8
- package/dist/{chunk-YUBEOWII.js → chunk-ELXMRSVN.js} +16 -5
- package/dist/{chunk-FJIRS3FM.js → chunk-F7HW2NI5.js} +1 -3
- package/dist/{chunk-P7C7SEJV.js → chunk-FKQG7FTY.js} +5 -5
- package/dist/{chunk-RLTFJYDN.js → chunk-H5FI5WDP.js} +1 -1
- package/dist/{chunk-G6N3LMO2.js → chunk-ITWCTZYH.js} +1 -1
- package/dist/{chunk-YUR5SX7F.js → chunk-JCO7AHNU.js} +70 -59
- package/dist/{chunk-ZEUP4TUD.js → chunk-JNGGM2XE.js} +6 -6
- package/dist/{chunk-QCFBIVIQ.js → chunk-K35BAR4P.js} +1 -1
- package/dist/{chunk-JCQG2I2G.js → chunk-KZBEVFXZ.js} +1 -1
- package/dist/{chunk-FJO2ZL4Q.js → chunk-OAVXAFAY.js} +73 -16
- package/dist/{chunk-A7CZH3GN.js → chunk-ODXVQ3CS.js} +41 -20
- package/dist/{chunk-4NJEAPLI.js → chunk-OOUQUCNN.js} +1 -1
- package/dist/{chunk-5VH3GIDX.js → chunk-RT3IYFN2.js} +1 -1
- package/dist/{chunk-Q46YIQYW.js → chunk-S3V6ZXPI.js} +22 -5
- package/dist/{chunk-IQJ36UTJ.js → chunk-WSGLJYFI.js} +31 -24
- package/dist/{chunk-3JHCYHWN.js → chunk-WWV3SJ3L.js} +19 -13
- package/dist/data.cjs +16 -2
- package/dist/data.js +7 -6
- package/dist/devtools.cjs +71 -21
- package/dist/devtools.d.cts +12 -5
- package/dist/devtools.d.ts +12 -5
- package/dist/devtools.js +6 -5
- package/dist/ecosystem.cjs +11 -2
- package/dist/ecosystem.d.cts +1 -1
- package/dist/ecosystem.d.ts +1 -1
- package/dist/ecosystem.js +10 -9
- package/dist/extras.cjs +454 -250
- package/dist/extras.d.cts +2 -2
- package/dist/extras.d.ts +2 -2
- package/dist/extras.js +26 -22
- package/dist/index.cjs +3385 -3045
- package/dist/index.d.cts +1179 -1057
- package/dist/index.d.ts +1179 -1057
- package/dist/index.js +32 -19
- package/dist/motion.cjs +223 -204
- package/dist/motion.d.cts +8 -1
- package/dist/motion.d.ts +8 -1
- package/dist/motion.js +6 -3
- package/dist/patterns.cjs +13 -6
- package/dist/patterns.d.cts +4 -1
- package/dist/patterns.d.ts +4 -1
- package/dist/patterns.js +5 -5
- package/dist/performance.cjs +70 -56
- package/dist/performance.js +6 -5
- package/dist/plugins.cjs +98 -42
- package/dist/plugins.d.cts +2 -1
- package/dist/plugins.d.ts +2 -1
- package/dist/plugins.js +89 -36
- package/dist/ssr.cjs +112 -91
- package/dist/ssr.d.cts +8 -1
- package/dist/ssr.d.ts +8 -1
- package/dist/ssr.js +9 -8
- package/dist/{tagFactory-S17H2qxu.d.ts → tagFactory-Bzupt4Pj.d.cts} +1 -1
- package/dist/{tagFactory-S17H2qxu.d.cts → tagFactory-Bzupt4Pj.d.ts} +1 -1
- package/dist/testing.cjs +18 -4
- package/dist/testing.js +18 -7
- package/dist/ui.cjs +322 -281
- package/dist/ui.d.cts +0 -20
- package/dist/ui.d.ts +0 -20
- package/dist/ui.js +27 -21
- package/dist/widgets.cjs +75 -13
- package/dist/widgets.d.cts +6 -1
- package/dist/widgets.d.ts +6 -1
- package/dist/widgets.js +7 -6
- package/package.json +4 -1
package/dist/browser.cjs
CHANGED
|
@@ -497,7 +497,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
497
497
|
|
|
498
498
|
// src/reactivity/track.ts
|
|
499
499
|
var _isDev3 = isDev();
|
|
500
|
-
var _runtimeVersion = true ? "3.
|
|
500
|
+
var _runtimeVersion = true ? "3.4.0" : "dev";
|
|
501
501
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
502
502
|
function resolveReactiveApi() {
|
|
503
503
|
const g = globalThis;
|
|
@@ -1013,7 +1013,7 @@ function battery() {
|
|
|
1013
1013
|
let disposed = false;
|
|
1014
1014
|
if (typeof navigator !== "undefined" && "getBattery" in navigator) {
|
|
1015
1015
|
setSupported(true);
|
|
1016
|
-
navigator.getBattery().then((bm) => {
|
|
1016
|
+
const batteryPromise = navigator.getBattery().then((bm) => {
|
|
1017
1017
|
if (disposed) return;
|
|
1018
1018
|
battery2 = bm;
|
|
1019
1019
|
batch(() => {
|
|
@@ -1031,6 +1031,9 @@ function battery() {
|
|
|
1031
1031
|
bm.addEventListener("chargingtimechange", onChargingTimeChange);
|
|
1032
1032
|
bm.addEventListener("dischargingtimechange", onDischargingTimeChange);
|
|
1033
1033
|
});
|
|
1034
|
+
batteryPromise.catch(() => {
|
|
1035
|
+
if (!disposed) setSupported(false);
|
|
1036
|
+
});
|
|
1034
1037
|
}
|
|
1035
1038
|
function dispose() {
|
|
1036
1039
|
disposed = true;
|
|
@@ -1588,9 +1591,17 @@ function wakeLock() {
|
|
|
1588
1591
|
}
|
|
1589
1592
|
const api = navigator.wakeLock;
|
|
1590
1593
|
let sentinel = null;
|
|
1594
|
+
let disposed = false;
|
|
1591
1595
|
async function request() {
|
|
1596
|
+
if (disposed) return;
|
|
1592
1597
|
try {
|
|
1593
|
-
|
|
1598
|
+
const s = await api.request("screen");
|
|
1599
|
+
if (disposed) {
|
|
1600
|
+
s.release().catch(() => {
|
|
1601
|
+
});
|
|
1602
|
+
return;
|
|
1603
|
+
}
|
|
1604
|
+
sentinel = s;
|
|
1594
1605
|
setActive(true);
|
|
1595
1606
|
sentinel.addEventListener("release", () => {
|
|
1596
1607
|
setActive(false);
|
|
@@ -1617,6 +1628,7 @@ function wakeLock() {
|
|
|
1617
1628
|
};
|
|
1618
1629
|
document.addEventListener("visibilitychange", onVisibility);
|
|
1619
1630
|
function dispose() {
|
|
1631
|
+
disposed = true;
|
|
1620
1632
|
document.removeEventListener("visibilitychange", onVisibility);
|
|
1621
1633
|
release().catch((err) => {
|
|
1622
1634
|
if (typeof console !== "undefined") {
|
|
@@ -1648,6 +1660,7 @@ function animationFrame(options = {}) {
|
|
|
1648
1660
|
let id = null;
|
|
1649
1661
|
let prev = -1;
|
|
1650
1662
|
let start = -1;
|
|
1663
|
+
let disposed = false;
|
|
1651
1664
|
const minFrameMs = options.fpsLimit ? 1e3 / options.fpsLimit : 0;
|
|
1652
1665
|
const step = (now) => {
|
|
1653
1666
|
if (start < 0) start = now;
|
|
@@ -1661,7 +1674,7 @@ function animationFrame(options = {}) {
|
|
|
1661
1674
|
id = requestAnimationFrame(step);
|
|
1662
1675
|
};
|
|
1663
1676
|
function resume() {
|
|
1664
|
-
if (id !== null) return;
|
|
1677
|
+
if (disposed || id !== null) return;
|
|
1665
1678
|
setRunning(true);
|
|
1666
1679
|
id = requestAnimationFrame(step);
|
|
1667
1680
|
}
|
|
@@ -1675,6 +1688,7 @@ function animationFrame(options = {}) {
|
|
|
1675
1688
|
start = -1;
|
|
1676
1689
|
}
|
|
1677
1690
|
function dispose() {
|
|
1691
|
+
disposed = true;
|
|
1678
1692
|
pause();
|
|
1679
1693
|
}
|
|
1680
1694
|
if (options.immediate !== false) resume();
|
|
@@ -1733,7 +1747,9 @@ function bounds(target) {
|
|
|
1733
1747
|
}
|
|
1734
1748
|
};
|
|
1735
1749
|
}
|
|
1750
|
+
let disposed = false;
|
|
1736
1751
|
function refresh() {
|
|
1752
|
+
if (disposed) return;
|
|
1737
1753
|
setRect(readRect(target));
|
|
1738
1754
|
}
|
|
1739
1755
|
refresh();
|
|
@@ -1745,6 +1761,7 @@ function bounds(target) {
|
|
|
1745
1761
|
const onScroll = () => refresh();
|
|
1746
1762
|
window.addEventListener("scroll", onScroll, { passive: true, capture: true });
|
|
1747
1763
|
function dispose() {
|
|
1764
|
+
disposed = true;
|
|
1748
1765
|
resizeObserver?.disconnect();
|
|
1749
1766
|
window.removeEventListener("scroll", onScroll, { capture: true });
|
|
1750
1767
|
}
|
package/dist/browser.js
CHANGED
|
@@ -35,12 +35,12 @@ import {
|
|
|
35
35
|
visibility,
|
|
36
36
|
wakeLock,
|
|
37
37
|
windowSize
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-S3V6ZXPI.js";
|
|
39
39
|
import "./chunk-H3SRKIYX.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-BUKYCWHX.js";
|
|
41
41
|
import "./chunk-S3NFJO6L.js";
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-KZBEVFXZ.js";
|
|
43
|
+
import "./chunk-OOUQUCNN.js";
|
|
44
44
|
import "./chunk-COY6PUD2.js";
|
|
45
45
|
export {
|
|
46
46
|
animationFrame,
|