@t007/toast 0.0.16 → 0.0.20
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 +27 -18
- package/package.json +2 -2
package/dist/index.global.js
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(() => {
|
|
3
|
-
// ../sia-reactor/dist/chunk-
|
|
3
|
+
// ../sia-reactor/dist/chunk-5A44QFT6.js
|
|
4
|
+
function createEl(tag, props, dataset, styles, el = tag ? document?.createElement(tag) : null) {
|
|
5
|
+
return assignEl(el, props, dataset, styles), el;
|
|
6
|
+
}
|
|
7
|
+
function assignEl(el, props, dataset, styles) {
|
|
8
|
+
if (!el) return;
|
|
9
|
+
if (props) {
|
|
10
|
+
for (const k of Object.keys(props)) if (props[k] !== void 0) el[k] = props[k];
|
|
11
|
+
}
|
|
12
|
+
if (dataset) {
|
|
13
|
+
for (const k of Object.keys(dataset)) if (dataset[k] !== void 0) el.dataset[k] = String(dataset[k]);
|
|
14
|
+
}
|
|
15
|
+
if (styles) {
|
|
16
|
+
for (const k of Object.keys(styles)) if (styles[k] !== void 0) el.style[k] = styles[k];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// ../sia-reactor/dist/chunk-P37ADJMM.js
|
|
4
21
|
function onAllMethods(owner, callback, skipOwn = true, nested = false) {
|
|
5
22
|
let proto = owner;
|
|
6
23
|
while (proto && proto !== Object.prototype) {
|
|
@@ -21,31 +38,23 @@
|
|
|
21
38
|
return Math.min(Math.max(val, min), max);
|
|
22
39
|
}
|
|
23
40
|
|
|
24
|
-
// ../sia-reactor/dist/chunk-
|
|
41
|
+
// ../sia-reactor/dist/chunk-EZ4VRGYI.js
|
|
42
|
+
var CTX = {
|
|
43
|
+
/** Flag indicating whether the application is running in development mode. */
|
|
44
|
+
isDevEnv: "undefined" !== typeof process ? process.env.NODE_ENV !== "production" : true,
|
|
45
|
+
/** Flag indicating whether a cascade is currently ongoing so reactors can allow all writes. */
|
|
46
|
+
isCascading: false,
|
|
47
|
+
/** Active `Autotracker` instance, override for automatic dependency collection on `Reactor` traps. */
|
|
48
|
+
autotracker: null
|
|
49
|
+
};
|
|
25
50
|
var RTR_BATCH = "undefined" !== typeof window ? ("undefined" !== typeof queueMicrotask ? queueMicrotask : setTimeout).bind(window) : "undefined" !== typeof process && process.nextTick ? process.nextTick : setTimeout;
|
|
26
51
|
var RTR_LOG = console.log.bind(console, "[S.I.A Reactor]");
|
|
27
|
-
var EVT_WARN = console.warn.bind(console, "[S.I.A Event]");
|
|
28
52
|
var NIL = Object.freeze({});
|
|
29
53
|
function isObj(obj, arraycheck = true) {
|
|
30
54
|
return "object" === typeof obj && obj !== null && (arraycheck ? !Array.isArray(obj) : true);
|
|
31
55
|
}
|
|
32
56
|
|
|
33
57
|
// ../utils/dist/index.js
|
|
34
|
-
function createEl(tag, props, dataset, styles, el = tag ? document?.createElement(tag) : null) {
|
|
35
|
-
return assignEl(el, props, dataset, styles), el;
|
|
36
|
-
}
|
|
37
|
-
function assignEl(el, props, dataset, styles) {
|
|
38
|
-
if (!el) return;
|
|
39
|
-
if (props) {
|
|
40
|
-
for (const k of Object.keys(props)) if (props[k] !== void 0) el[k] = props[k];
|
|
41
|
-
}
|
|
42
|
-
if (dataset) {
|
|
43
|
-
for (const k of Object.keys(dataset)) if (dataset[k] !== void 0) el.dataset[k] = String(dataset[k]);
|
|
44
|
-
}
|
|
45
|
-
if (styles) {
|
|
46
|
-
for (const k of Object.keys(styles)) if (styles[k] !== void 0) el.style[k] = styles[k];
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
58
|
var VIRTUAL_RESOURCE = /* @__PURE__ */ Symbol.for("T007_VIRTUAL_RESOURCE");
|
|
50
59
|
function loadResource(req, type = "style", { module, media, crossOrigin, integrity, referrerPolicy, nonce, fetchPriority, attempts = 3, retryKey = false } = {}, w = window) {
|
|
51
60
|
w.t007 ??= {}, w.t007._resourceCache ??= {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@t007/toast",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"description": "A lightweight, pure JS toast system.",
|
|
5
5
|
"author": "Oketade Oluwatobiloba <tobioketade007@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -53,6 +53,6 @@
|
|
|
53
53
|
"promise"
|
|
54
54
|
],
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@t007/utils": "^0.0.
|
|
56
|
+
"@t007/utils": "^0.0.22"
|
|
57
57
|
}
|
|
58
58
|
}
|