sibujs 3.3.2 → 3.3.3
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 +10 -3
- package/dist/build.js +11 -11
- package/dist/cdn.global.js +7 -7
- package/dist/{chunk-N5TQVEKE.js → chunk-23VT3KZB.js} +1 -1
- package/dist/{chunk-IQJ36UTJ.js → chunk-25LY5SRH.js} +31 -24
- package/dist/{chunk-6TCOWMGY.js → chunk-5K6RVA2S.js} +1 -1
- package/dist/{chunk-YUBEOWII.js → chunk-5Y34FWED.js} +16 -5
- package/dist/chunk-7ZHH77QA.js +9 -0
- package/dist/{chunk-G6N3LMO2.js → chunk-F3HO2MP7.js} +1 -1
- package/dist/{chunk-FJIRS3FM.js → chunk-F7HW2NI5.js} +1 -3
- package/dist/{chunk-AEOLHSSQ.js → chunk-IEYFHN5V.js} +72 -25
- package/dist/{chunk-FJO2ZL4Q.js → chunk-IQN5W7GE.js} +73 -16
- package/dist/{chunk-JCQG2I2G.js → chunk-IWFE4AHO.js} +1 -1
- package/dist/{chunk-2ARSB7NG.js → chunk-MYXEBADX.js} +27 -20
- package/dist/{chunk-A7CZH3GN.js → chunk-QCQQ2N5H.js} +41 -20
- package/dist/{chunk-Q46YIQYW.js → chunk-QTOOBABV.js} +22 -5
- package/dist/{chunk-ZEUP4TUD.js → chunk-RZKGMHH4.js} +6 -6
- package/dist/{chunk-QCFBIVIQ.js → chunk-SBPUXWCE.js} +1 -1
- package/dist/{chunk-RLTFJYDN.js → chunk-TBDTU7UO.js} +1 -1
- package/dist/{chunk-P7C7SEJV.js → chunk-TVCCXPU2.js} +5 -5
- package/dist/{chunk-4NJEAPLI.js → chunk-UOMYIAG6.js} +1 -1
- package/dist/{chunk-655B7MMR.js → chunk-WFUUT6TG.js} +15 -8
- package/dist/{chunk-YUR5SX7F.js → chunk-WTFMV2RU.js} +70 -59
- package/dist/{chunk-3JHCYHWN.js → chunk-WWV3SJ3L.js} +19 -13
- package/dist/{chunk-62V653X2.js → chunk-Y35NQNLG.js} +79 -44
- package/dist/{chunk-5VH3GIDX.js → chunk-ZXCZWMZT.js} +1 -1
- 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.js +10 -9
- package/dist/extras.cjs +454 -250
- package/dist/extras.d.cts +1 -1
- package/dist/extras.d.ts +1 -1
- package/dist/extras.js +26 -22
- package/dist/index.cjs +10 -3
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +19 -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 +90 -37
- 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/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 +28 -22
- 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 +1 -1
package/dist/testing.cjs
CHANGED
|
@@ -140,6 +140,12 @@ function dispose(node) {
|
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
+
// src/utils/globalSingleton.ts
|
|
144
|
+
function globalSingleton(key, create) {
|
|
145
|
+
const g = globalThis;
|
|
146
|
+
return g[key] ?? (g[key] = create());
|
|
147
|
+
}
|
|
148
|
+
|
|
143
149
|
// src/testing/a11y.ts
|
|
144
150
|
function escSel(value) {
|
|
145
151
|
return value.replace(/["\\]/g, "\\$&");
|
|
@@ -641,7 +647,7 @@ function checkAriaAttributes(root) {
|
|
|
641
647
|
if (attr.name === "aria-checked" || attr.name === "aria-pressed") {
|
|
642
648
|
validValues.push("mixed");
|
|
643
649
|
}
|
|
644
|
-
if (!validValues.includes(attr.value)
|
|
650
|
+
if (!validValues.includes(attr.value)) {
|
|
645
651
|
violations.push({
|
|
646
652
|
rule: "aria-valid-attr-value",
|
|
647
653
|
level: "error",
|
|
@@ -1297,7 +1303,15 @@ function createHttpMock(routes = [], options = {}) {
|
|
|
1297
1303
|
const mockFetch = async (input, init) => {
|
|
1298
1304
|
const url = typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url;
|
|
1299
1305
|
const method = init?.method || "GET";
|
|
1300
|
-
|
|
1306
|
+
let body;
|
|
1307
|
+
if (init?.body != null) {
|
|
1308
|
+
const raw = String(init.body);
|
|
1309
|
+
try {
|
|
1310
|
+
body = JSON.parse(raw);
|
|
1311
|
+
} catch {
|
|
1312
|
+
body = raw;
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1301
1315
|
requestLog.push({ url, method, body, timestamp: Date.now() });
|
|
1302
1316
|
const route = matchRoute(url, method);
|
|
1303
1317
|
if (!route) {
|
|
@@ -1980,7 +1994,7 @@ function forEachSubscriber(signal, visit) {
|
|
|
1980
1994
|
|
|
1981
1995
|
// src/reactivity/track.ts
|
|
1982
1996
|
var _isDev4 = isDev();
|
|
1983
|
-
var _runtimeVersion = true ? "3.3.
|
|
1997
|
+
var _runtimeVersion = true ? "3.3.3" : "dev";
|
|
1984
1998
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
1985
1999
|
function resolveReactiveApi() {
|
|
1986
2000
|
const g = globalThis;
|
|
@@ -2654,7 +2668,7 @@ function escapeSelector(value) {
|
|
|
2654
2668
|
if (g.CSS && typeof g.CSS.escape === "function") return g.CSS.escape(value);
|
|
2655
2669
|
return value.replace(/[^\w-]/g, (m) => `\\${m.charCodeAt(0).toString(16)} `);
|
|
2656
2670
|
}
|
|
2657
|
-
var _renderedContainers = /* @__PURE__ */ new Set();
|
|
2671
|
+
var _renderedContainers = globalSingleton(/* @__PURE__ */ Symbol.for("sibujs.testing.containers.v1"), () => /* @__PURE__ */ new Set());
|
|
2658
2672
|
function unmountAll() {
|
|
2659
2673
|
for (const container of _renderedContainers) {
|
|
2660
2674
|
for (const child of Array.from(container.childNodes)) dispose(child);
|
package/dist/testing.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
globalSingleton
|
|
3
|
+
} from "./chunk-7ZHH77QA.js";
|
|
4
4
|
import {
|
|
5
5
|
effect
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-23VT3KZB.js";
|
|
7
7
|
import "./chunk-S3NFJO6L.js";
|
|
8
|
-
import
|
|
8
|
+
import {
|
|
9
|
+
dispose
|
|
10
|
+
} from "./chunk-5VGSK6D2.js";
|
|
11
|
+
import "./chunk-UOMYIAG6.js";
|
|
9
12
|
import "./chunk-COY6PUD2.js";
|
|
10
13
|
|
|
11
14
|
// src/testing/a11y.ts
|
|
@@ -509,7 +512,7 @@ function checkAriaAttributes(root) {
|
|
|
509
512
|
if (attr.name === "aria-checked" || attr.name === "aria-pressed") {
|
|
510
513
|
validValues.push("mixed");
|
|
511
514
|
}
|
|
512
|
-
if (!validValues.includes(attr.value)
|
|
515
|
+
if (!validValues.includes(attr.value)) {
|
|
513
516
|
violations.push({
|
|
514
517
|
rule: "aria-valid-attr-value",
|
|
515
518
|
level: "error",
|
|
@@ -1165,7 +1168,15 @@ function createHttpMock(routes = [], options = {}) {
|
|
|
1165
1168
|
const mockFetch = async (input, init) => {
|
|
1166
1169
|
const url = typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url;
|
|
1167
1170
|
const method = init?.method || "GET";
|
|
1168
|
-
|
|
1171
|
+
let body;
|
|
1172
|
+
if (init?.body != null) {
|
|
1173
|
+
const raw = String(init.body);
|
|
1174
|
+
try {
|
|
1175
|
+
body = JSON.parse(raw);
|
|
1176
|
+
} catch {
|
|
1177
|
+
body = raw;
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1169
1180
|
requestLog.push({ url, method, body, timestamp: Date.now() });
|
|
1170
1181
|
const route = matchRoute(url, method);
|
|
1171
1182
|
if (!route) {
|
|
@@ -1894,7 +1905,7 @@ function escapeSelector(value) {
|
|
|
1894
1905
|
if (g.CSS && typeof g.CSS.escape === "function") return g.CSS.escape(value);
|
|
1895
1906
|
return value.replace(/[^\w-]/g, (m) => `\\${m.charCodeAt(0).toString(16)} `);
|
|
1896
1907
|
}
|
|
1897
|
-
var _renderedContainers = /* @__PURE__ */ new Set();
|
|
1908
|
+
var _renderedContainers = globalSingleton(/* @__PURE__ */ Symbol.for("sibujs.testing.containers.v1"), () => /* @__PURE__ */ new Set());
|
|
1898
1909
|
function unmountAll() {
|
|
1899
1910
|
for (const container of _renderedContainers) {
|
|
1900
1911
|
for (const child of Array.from(container.childNodes)) dispose(child);
|