@symbo.ls/utils 3.14.1 → 3.14.2
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/package.json +1 -1
- package/dist/cjs/browser.js +0 -36
- package/dist/cjs/date.js +0 -33
- package/dist/cjs/detectHeight.js +0 -53
- package/dist/cjs/domqlv3hacks.js +0 -3845
- package/dist/cjs/fibonacci.js +0 -32
- package/dist/cjs/files.js +0 -26
- package/dist/cjs/index.js +0 -4100
- package/dist/cjs/load.js +0 -173
- package/dist/cjs/package.json +0 -4
- package/dist/cjs/scaling.js +0 -53
- package/dist/cjs/style.js +0 -42
package/package.json
CHANGED
package/dist/cjs/browser.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/browser.js
|
|
21
|
-
var browser_exports = {};
|
|
22
|
-
__export(browser_exports, {
|
|
23
|
-
toggleFullscreen: () => toggleFullscreen
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(browser_exports);
|
|
26
|
-
async function toggleFullscreen(opts) {
|
|
27
|
-
if (!document.fullscreenElement) {
|
|
28
|
-
try {
|
|
29
|
-
await (this.node || document).requestFullscreen();
|
|
30
|
-
} catch (err) {
|
|
31
|
-
console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`);
|
|
32
|
-
}
|
|
33
|
-
} else {
|
|
34
|
-
await document.exitFullscreen();
|
|
35
|
-
}
|
|
36
|
-
}
|
package/dist/cjs/date.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/date.js
|
|
21
|
-
var date_exports = {};
|
|
22
|
-
__export(date_exports, {
|
|
23
|
-
formatDate: () => formatDate
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(date_exports);
|
|
26
|
-
var formatDate = (timestamp) => {
|
|
27
|
-
if (!timestamp) return "";
|
|
28
|
-
const d = new Date(timestamp);
|
|
29
|
-
const ye = new Intl.DateTimeFormat("en", { year: "numeric" }).format(d);
|
|
30
|
-
const mo = new Intl.DateTimeFormat("en", { month: "short" }).format(d);
|
|
31
|
-
const da = new Intl.DateTimeFormat("en", { day: "2-digit" }).format(d);
|
|
32
|
-
return `${da} ${mo}, ${ye}`;
|
|
33
|
-
};
|
package/dist/cjs/detectHeight.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/detectHeight.js
|
|
21
|
-
var detectHeight_exports = {};
|
|
22
|
-
__export(detectHeight_exports, {
|
|
23
|
-
detectHeightOnInit: () => detectHeightOnInit
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(detectHeight_exports);
|
|
26
|
-
var detectHeightOnInit = (element, state) => {
|
|
27
|
-
const heightTimeout = setTimeout(() => {
|
|
28
|
-
const { props } = element;
|
|
29
|
-
if (!state.clientHeight) {
|
|
30
|
-
const { node: { clientHeight } } = element;
|
|
31
|
-
if (clientHeight) {
|
|
32
|
-
state.clientHeight = clientHeight;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
if (state.active) {
|
|
36
|
-
if (props.height === "auto") return;
|
|
37
|
-
element.update({
|
|
38
|
-
props: { height: state.clientHeight }
|
|
39
|
-
}, { preventBeforeUpdateListener: true, preventChildrenUpdate: true });
|
|
40
|
-
const setAutoTimeout = setTimeout(() => {
|
|
41
|
-
element.update({
|
|
42
|
-
props: { height: "auto" }
|
|
43
|
-
}, { preventBeforeUpdateListener: true, preventChildrenUpdate: true });
|
|
44
|
-
clearTimeout(setAutoTimeout);
|
|
45
|
-
}, 450);
|
|
46
|
-
} else {
|
|
47
|
-
element.update({
|
|
48
|
-
props: { height: "0" }
|
|
49
|
-
}, { preventBeforeUpdateListener: true, preventChildrenUpdate: true });
|
|
50
|
-
}
|
|
51
|
-
clearTimeout(heightTimeout);
|
|
52
|
-
});
|
|
53
|
-
};
|