@t007/input 0.0.24 → 0.0.25
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/index.global.js +7 -7
- package/package.json +2 -2
package/dist/index.global.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(() => {
|
|
3
|
-
// ../../../sia-reactor/dist/chunk-
|
|
3
|
+
// ../../../sia-reactor/dist/chunk-RI45W4O6.js
|
|
4
4
|
function createEl(tag, props, dataset, styles, el = tag ? document?.createElement(tag) : null) {
|
|
5
5
|
return assignEl(el, props, dataset, styles), el;
|
|
6
6
|
}
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
var RTR_LOG = console.log.bind(console, "[S.I.A Reactor]");
|
|
31
31
|
var NIL = Object.freeze({});
|
|
32
32
|
|
|
33
|
-
// ../utils/dist/chunk-
|
|
34
|
-
var INTERACTIVE_SELECTOR =
|
|
33
|
+
// ../utils/dist/chunk-N5KX6IW4.js
|
|
34
|
+
var INTERACTIVE_SELECTOR = ":is(button,[href],input:not([type='hidden']),select,textarea,details>summary,[contenteditable='true'],iframe,audio[controls],video[controls],[tabindex]):not([disabled],[tabindex='-1'],[data-focus-guard],[inert],[inert] *)";
|
|
35
35
|
var VIRTUAL_RESOURCE = /* @__PURE__ */ Symbol.for("T007_VIRTUAL_RESOURCE");
|
|
36
36
|
function loadResource(req, type = "style", { module, media, crossOrigin, integrity, referrerPolicy, nonce, fetchPriority, attempts = 3, retryKey = false } = {}, w = window) {
|
|
37
37
|
w.t007 ??= {}, w.t007._resourceCache ??= {};
|
|
@@ -97,10 +97,10 @@
|
|
|
97
97
|
function initScrollAssist(el, { pxPerSecond = 80, assistClassName = "t007-scroll-assist", vertical = true, horizontal = true } = NIL) {
|
|
98
98
|
const parent = el?.parentElement, existing = (t007._scrollers ??= /* @__PURE__ */ new WeakMap()).get(el);
|
|
99
99
|
if (!parent || existing) return existing ? existing : void 0;
|
|
100
|
-
t007.
|
|
100
|
+
t007._scrollers_r_observer ??= new ResizeObserver((entries) => {
|
|
101
101
|
for (const { target } of entries) t007._scrollers.get(target)?.update();
|
|
102
102
|
});
|
|
103
|
-
t007.
|
|
103
|
+
t007._scrollers_m_observer ??= new MutationObserver((entries) => {
|
|
104
104
|
const els = /* @__PURE__ */ new Set();
|
|
105
105
|
for (const entry of entries) {
|
|
106
106
|
let node = entry.target instanceof Element ? entry.target : null;
|
|
@@ -155,12 +155,12 @@
|
|
|
155
155
|
update,
|
|
156
156
|
destroy() {
|
|
157
157
|
stop(), el.removeEventListener("scroll", update);
|
|
158
|
-
t007.
|
|
158
|
+
t007._scrollers_r_observer.unobserve(el), t007._scrollers.delete(el);
|
|
159
159
|
for (const a of Object.values(assist)) a.remove();
|
|
160
160
|
}
|
|
161
161
|
};
|
|
162
162
|
update(), el.addEventListener("scroll", update);
|
|
163
|
-
t007.
|
|
163
|
+
t007._scrollers_r_observer.observe(el), t007._scrollers_m_observer.observe(el, { childList: true, subtree: true, characterData: true });
|
|
164
164
|
return t007._scrollers.set(el, handle), handle;
|
|
165
165
|
}
|
|
166
166
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@t007/input",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"description": "A lightweight, pure JS input system.",
|
|
5
5
|
"author": "Oketade Oluwatobiloba <tobioketade007@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"react-dom": "^18.3.1"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@t007/utils": "^0.0.
|
|
70
|
+
"@t007/utils": "^0.0.27"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"react": "^18.0.0"
|