sibujs 4.8.0 → 4.9.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 +4 -3
- package/dist/browser.d.cts +3 -2
- package/dist/browser.d.ts +3 -2
- package/dist/browser.js +4 -4
- package/dist/build.cjs +27 -19
- package/dist/build.js +10 -10
- package/dist/cdn.dev.global.js +12 -12
- package/dist/cdn.full.dev.global.js +13 -13
- package/dist/cdn.full.global.js +12 -12
- package/dist/cdn.global.js +12 -12
- package/dist/{chunk-GSGNX35Q.js → chunk-2K3Z3XO4.js} +4 -4
- package/dist/{chunk-UCNP3HVM.js → chunk-562UVHMM.js} +24 -11
- package/dist/{chunk-VWT3VXPL.js → chunk-5MLWTIQE.js} +2 -2
- package/dist/{chunk-4WMSTZ7J.js → chunk-7OV5Q2UU.js} +4 -4
- package/dist/{chunk-CZPRSWSS.js → chunk-CDBKFGXN.js} +1 -1
- package/dist/{chunk-QGMSESDD.js → chunk-CF2KCWRE.js} +2 -2
- package/dist/{chunk-C5PEWEGH.js → chunk-DRMLIF6M.js} +2 -2
- package/dist/{chunk-C7AA2CZX.js → chunk-FHCZMHHE.js} +1 -1
- package/dist/{chunk-J3YQ457H.js → chunk-FNOK662L.js} +35 -27
- package/dist/{chunk-TQQUN4WR.js → chunk-G2WHYEL7.js} +1 -1
- package/dist/{chunk-44MTL7ED.js → chunk-K6K5ACO6.js} +3 -3
- package/dist/{chunk-JUTFX2RM.js → chunk-KG25XMGP.js} +30 -10
- package/dist/{chunk-O6TRVMJI.js → chunk-MPWDSTYK.js} +1 -1
- package/dist/{chunk-LI4W3U6C.js → chunk-NQMKWBKU.js} +1 -1
- package/dist/{chunk-Q5J2LVKH.js → chunk-QBKCK6MJ.js} +1 -1
- package/dist/{chunk-V3LHZSU5.js → chunk-SBTZEYNI.js} +1 -1
- package/dist/{chunk-DSID757X.js → chunk-SYHGGDNW.js} +1 -1
- package/dist/{chunk-RGLPEBDE.js → chunk-TV464N2M.js} +3 -3
- package/dist/{chunk-KJ3UKABJ.js → chunk-X7NRHFZR.js} +1 -1
- package/dist/{chunk-ZVLHNEEL.js → chunk-XJVTQUIV.js} +6 -6
- package/dist/{chunk-EGUQLBHE.js → chunk-YW6HQKGO.js} +5 -4
- package/dist/data.cjs +21 -8
- package/dist/data.d.cts +23 -4
- package/dist/data.d.ts +23 -4
- package/dist/data.js +5 -5
- package/dist/devtools.cjs +1 -1
- package/dist/devtools.js +4 -4
- package/dist/ecosystem.cjs +1 -1
- package/dist/ecosystem.js +7 -7
- package/dist/extras.cjs +54 -20
- package/dist/extras.js +20 -20
- package/dist/index.cjs +27 -19
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +10 -10
- package/dist/motion.cjs +1 -1
- package/dist/motion.js +3 -3
- package/dist/patterns.cjs +1 -1
- package/dist/patterns.js +5 -5
- package/dist/performance.cjs +1 -1
- package/dist/performance.js +4 -4
- package/dist/plugins.cjs +16 -12
- package/dist/plugins.d.cts +6 -0
- package/dist/plugins.d.ts +6 -0
- package/dist/plugins.js +20 -16
- package/dist/ssr.cjs +28 -8
- package/dist/ssr.d.cts +4 -0
- package/dist/ssr.d.ts +4 -0
- package/dist/ssr.js +7 -7
- package/dist/testing.cjs +1 -1
- package/dist/testing.js +2 -2
- package/dist/ui.cjs +2 -2
- package/dist/ui.js +7 -7
- package/dist/widgets.cjs +1 -1
- package/dist/widgets.js +6 -6
- package/package.json +1 -1
package/dist/browser.cjs
CHANGED
|
@@ -674,7 +674,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
674
674
|
}
|
|
675
675
|
|
|
676
676
|
// src/reactivity/track.ts
|
|
677
|
-
var _runtimeVersion = true ? "4.
|
|
677
|
+
var _runtimeVersion = true ? "4.9.0" : "dev";
|
|
678
678
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
679
679
|
function resolveReactiveApi() {
|
|
680
680
|
const g = globalThis;
|
|
@@ -2264,6 +2264,7 @@ function keyboard(options = {}) {
|
|
|
2264
2264
|
};
|
|
2265
2265
|
}
|
|
2266
2266
|
const target = options.target ?? window;
|
|
2267
|
+
const view = options.target?.ownerDocument?.defaultView ?? window;
|
|
2267
2268
|
const filter = options.keys ? new Set(options.keys) : null;
|
|
2268
2269
|
const onDown = (e) => {
|
|
2269
2270
|
if (filter && !filter.has(e.key)) return;
|
|
@@ -2286,14 +2287,14 @@ function keyboard(options = {}) {
|
|
|
2286
2287
|
const onBlur = () => setPressed(/* @__PURE__ */ new Set());
|
|
2287
2288
|
target.addEventListener("keydown", onDown);
|
|
2288
2289
|
target.addEventListener("keyup", onUp);
|
|
2289
|
-
|
|
2290
|
+
view.addEventListener("blur", onBlur);
|
|
2290
2291
|
function isPressed(key) {
|
|
2291
2292
|
return pressed().has(key);
|
|
2292
2293
|
}
|
|
2293
2294
|
function dispose() {
|
|
2294
2295
|
target.removeEventListener("keydown", onDown);
|
|
2295
2296
|
target.removeEventListener("keyup", onUp);
|
|
2296
|
-
|
|
2297
|
+
view.removeEventListener("blur", onBlur);
|
|
2297
2298
|
}
|
|
2298
2299
|
return { pressed, isPressed, dispose };
|
|
2299
2300
|
}
|
package/dist/browser.d.cts
CHANGED
|
@@ -642,8 +642,9 @@ interface KeyboardOptions {
|
|
|
642
642
|
* `KeyboardEvent.key`). On every key event the signal is replaced with a
|
|
643
643
|
* new Set instance so reactive subscribers see the change.
|
|
644
644
|
*
|
|
645
|
-
* Also listens to `
|
|
646
|
-
*
|
|
645
|
+
* Also listens to `blur` on the target's window (the global `window`, or the
|
|
646
|
+
* window of the document a `target` element belongs to) to clear stuck keys
|
|
647
|
+
* if it loses focus mid-press — otherwise held modifiers can "ghost" forever.
|
|
647
648
|
*
|
|
648
649
|
* @example
|
|
649
650
|
* ```ts
|
package/dist/browser.d.ts
CHANGED
|
@@ -642,8 +642,9 @@ interface KeyboardOptions {
|
|
|
642
642
|
* `KeyboardEvent.key`). On every key event the signal is replaced with a
|
|
643
643
|
* new Set instance so reactive subscribers see the change.
|
|
644
644
|
*
|
|
645
|
-
* Also listens to `
|
|
646
|
-
*
|
|
645
|
+
* Also listens to `blur` on the target's window (the global `window`, or the
|
|
646
|
+
* window of the document a `target` element belongs to) to clear stuck keys
|
|
647
|
+
* if it loses focus mid-press — otherwise held modifiers can "ghost" forever.
|
|
647
648
|
*
|
|
648
649
|
* @example
|
|
649
650
|
* ```ts
|
package/dist/browser.js
CHANGED
|
@@ -36,15 +36,15 @@ import {
|
|
|
36
36
|
visibility,
|
|
37
37
|
wakeLock,
|
|
38
38
|
windowSize
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-YW6HQKGO.js";
|
|
40
40
|
import "./chunk-52XFPGSN.js";
|
|
41
41
|
import "./chunk-62BDYGAG.js";
|
|
42
42
|
import "./chunk-7ZHH77QA.js";
|
|
43
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-SBTZEYNI.js";
|
|
44
44
|
import "./chunk-EXXSN3BW.js";
|
|
45
45
|
import "./chunk-7XHATCIH.js";
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-SYHGGDNW.js";
|
|
47
|
+
import "./chunk-G2WHYEL7.js";
|
|
48
48
|
import "./chunk-NYNYSPK7.js";
|
|
49
49
|
export {
|
|
50
50
|
__resetSpeechCoordinator,
|
package/dist/build.cjs
CHANGED
|
@@ -3548,7 +3548,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
3548
3548
|
}
|
|
3549
3549
|
|
|
3550
3550
|
// src/reactivity/track.ts
|
|
3551
|
-
var _runtimeVersion = true ? "4.
|
|
3551
|
+
var _runtimeVersion = true ? "4.9.0" : "dev";
|
|
3552
3552
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
3553
3553
|
function resolveReactiveApi() {
|
|
3554
3554
|
const g2 = globalThis;
|
|
@@ -5817,37 +5817,44 @@ function action(element, action2, param2) {
|
|
|
5817
5817
|
}
|
|
5818
5818
|
}
|
|
5819
5819
|
var clickOutside = (element, callback) => {
|
|
5820
|
+
const doc = element.ownerDocument;
|
|
5820
5821
|
const handler = (e) => {
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
}
|
|
5822
|
+
const target = e.target;
|
|
5823
|
+
if (!(typeof target?.nodeType === "number" && element.contains(target))) callback();
|
|
5824
5824
|
};
|
|
5825
|
-
|
|
5826
|
-
return () =>
|
|
5825
|
+
doc.addEventListener("pointerdown", handler, true);
|
|
5826
|
+
return () => doc.removeEventListener("pointerdown", handler, true);
|
|
5827
5827
|
};
|
|
5828
|
+
var PRESS_END_EVENTS = ["pointerup", "pointerleave", "pointercancel"];
|
|
5828
5829
|
var longPress = (element, options) => {
|
|
5829
5830
|
const duration = options.duration ?? 500;
|
|
5830
5831
|
let timer = null;
|
|
5831
|
-
|
|
5832
|
-
timer = setTimeout(() => {
|
|
5833
|
-
options.callback();
|
|
5834
|
-
timer = null;
|
|
5835
|
-
}, duration);
|
|
5836
|
-
};
|
|
5832
|
+
let owner;
|
|
5837
5833
|
const cancel = () => {
|
|
5838
5834
|
if (timer !== null) {
|
|
5839
5835
|
clearTimeout(timer);
|
|
5840
5836
|
timer = null;
|
|
5841
5837
|
}
|
|
5842
5838
|
};
|
|
5839
|
+
const start = (e) => {
|
|
5840
|
+
const id = e.pointerId;
|
|
5841
|
+
if (timer !== null && id !== owner) return;
|
|
5842
|
+
cancel();
|
|
5843
|
+
owner = id;
|
|
5844
|
+
timer = setTimeout(() => {
|
|
5845
|
+
timer = null;
|
|
5846
|
+
options.callback();
|
|
5847
|
+
}, duration);
|
|
5848
|
+
};
|
|
5849
|
+
const end = (e) => {
|
|
5850
|
+
if (timer !== null && e.pointerId === owner) cancel();
|
|
5851
|
+
};
|
|
5843
5852
|
element.addEventListener("pointerdown", start);
|
|
5844
|
-
element.addEventListener(
|
|
5845
|
-
element.addEventListener("pointerleave", cancel);
|
|
5853
|
+
for (const type of PRESS_END_EVENTS) element.addEventListener(type, end);
|
|
5846
5854
|
return () => {
|
|
5847
5855
|
cancel();
|
|
5848
5856
|
element.removeEventListener("pointerdown", start);
|
|
5849
|
-
element.removeEventListener(
|
|
5850
|
-
element.removeEventListener("pointerleave", cancel);
|
|
5857
|
+
for (const type of PRESS_END_EVENTS) element.removeEventListener(type, end);
|
|
5851
5858
|
};
|
|
5852
5859
|
};
|
|
5853
5860
|
var copyOnClick = (element, getText) => {
|
|
@@ -5881,10 +5888,11 @@ var trapFocus = (element) => {
|
|
|
5881
5888
|
if (elements.length === 0) return;
|
|
5882
5889
|
const first = elements[0];
|
|
5883
5890
|
const last = elements[elements.length - 1];
|
|
5884
|
-
|
|
5891
|
+
const active = element.ownerDocument.activeElement;
|
|
5892
|
+
if (e.shiftKey && active === first) {
|
|
5885
5893
|
e.preventDefault();
|
|
5886
5894
|
last.focus();
|
|
5887
|
-
} else if (!e.shiftKey &&
|
|
5895
|
+
} else if (!e.shiftKey && active === last) {
|
|
5888
5896
|
e.preventDefault();
|
|
5889
5897
|
first.focus();
|
|
5890
5898
|
}
|
|
@@ -6885,7 +6893,7 @@ function KeepAlive(activeKey, cases, options) {
|
|
|
6885
6893
|
return;
|
|
6886
6894
|
}
|
|
6887
6895
|
node = factory();
|
|
6888
|
-
if (node
|
|
6896
|
+
if (node.nodeType === 11) {
|
|
6889
6897
|
const wrapper = document.createElement("div");
|
|
6890
6898
|
wrapper.style.display = "contents";
|
|
6891
6899
|
wrapper.appendChild(node);
|
package/dist/build.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
index_exports
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-FNOK662L.js";
|
|
4
|
+
import "./chunk-QBKCK6MJ.js";
|
|
5
5
|
import "./chunk-FC6KCJSA.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-CDBKFGXN.js";
|
|
7
|
+
import "./chunk-FHCZMHHE.js";
|
|
8
8
|
import "./chunk-62BDYGAG.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-5MLWTIQE.js";
|
|
10
|
+
import "./chunk-MPWDSTYK.js";
|
|
11
11
|
import "./chunk-3ACAAQIN.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-X7NRHFZR.js";
|
|
13
13
|
import "./chunk-7ZHH77QA.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-SBTZEYNI.js";
|
|
15
15
|
import {
|
|
16
16
|
isEventHandlerAttr,
|
|
17
17
|
isHtmlContentAttribute,
|
|
@@ -19,8 +19,8 @@ import {
|
|
|
19
19
|
} from "./chunk-EXXSN3BW.js";
|
|
20
20
|
import "./chunk-7XHATCIH.js";
|
|
21
21
|
import "./chunk-5HZXGZ6T.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-SYHGGDNW.js";
|
|
23
|
+
import "./chunk-G2WHYEL7.js";
|
|
24
24
|
import "./chunk-NYNYSPK7.js";
|
|
25
25
|
|
|
26
26
|
// src/build/sourceEdit.ts
|