@symbo.ls/utils 2.11.417 → 2.11.421
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/cjs/browser.js +6 -4
- package/dist/cjs/codify.js +7 -1
- package/dist/cjs/index.js +13 -5
- package/dist/cjs/scaling.js +7 -1
- package/package.json +2 -2
- package/src/browser.js +6 -4
package/dist/cjs/browser.js
CHANGED
|
@@ -23,12 +23,14 @@ __export(browser_exports, {
|
|
|
23
23
|
toggleFullscreen: () => toggleFullscreen
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(browser_exports);
|
|
26
|
-
var toggleFullscreen = (el) => {
|
|
26
|
+
var toggleFullscreen = async (el) => {
|
|
27
27
|
if (!document.fullscreenElement) {
|
|
28
|
-
|
|
28
|
+
try {
|
|
29
|
+
await (el.node || document).requestFullscreen();
|
|
30
|
+
} catch (err) {
|
|
29
31
|
console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`);
|
|
30
|
-
}
|
|
32
|
+
}
|
|
31
33
|
} else {
|
|
32
|
-
document.exitFullscreen();
|
|
34
|
+
await document.exitFullscreen();
|
|
33
35
|
}
|
|
34
36
|
};
|
package/dist/cjs/codify.js
CHANGED
|
@@ -732,7 +732,7 @@ var require_object = __commonJS({
|
|
|
732
732
|
return o;
|
|
733
733
|
};
|
|
734
734
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
735
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
735
|
+
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
736
736
|
for (const prop in obj) {
|
|
737
737
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
738
738
|
continue;
|
|
@@ -1108,6 +1108,12 @@ var require_object = __commonJS({
|
|
|
1108
1108
|
if (foundString || foundInArray)
|
|
1109
1109
|
return el;
|
|
1110
1110
|
}
|
|
1111
|
+
if (el.parent && el.parent.childExtend) {
|
|
1112
|
+
const foundString = (0, import_types.isString)(el.parent.childExtend) && el.parent.childExtend === key;
|
|
1113
|
+
const foundInArray = (0, import_types.isArray)(el.parent.childExtend) && el.parent.childExtend.filter((v) => v === key).length;
|
|
1114
|
+
if (foundString || foundInArray)
|
|
1115
|
+
return el;
|
|
1116
|
+
}
|
|
1111
1117
|
};
|
|
1112
1118
|
var getExtendsInElement = (obj) => {
|
|
1113
1119
|
let result = [];
|
package/dist/cjs/index.js
CHANGED
|
@@ -732,7 +732,7 @@ var require_object = __commonJS({
|
|
|
732
732
|
return o;
|
|
733
733
|
};
|
|
734
734
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
735
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
735
|
+
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
736
736
|
for (const prop in obj) {
|
|
737
737
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
738
738
|
continue;
|
|
@@ -1108,6 +1108,12 @@ var require_object = __commonJS({
|
|
|
1108
1108
|
if (foundString || foundInArray)
|
|
1109
1109
|
return el;
|
|
1110
1110
|
}
|
|
1111
|
+
if (el.parent && el.parent.childExtend) {
|
|
1112
|
+
const foundString = (0, import_types.isString)(el.parent.childExtend) && el.parent.childExtend === key;
|
|
1113
|
+
const foundInArray = (0, import_types.isArray)(el.parent.childExtend) && el.parent.childExtend.filter((v) => v === key).length;
|
|
1114
|
+
if (foundString || foundInArray)
|
|
1115
|
+
return el;
|
|
1116
|
+
}
|
|
1111
1117
|
};
|
|
1112
1118
|
var getExtendsInElement = (obj) => {
|
|
1113
1119
|
let result = [];
|
|
@@ -1537,13 +1543,15 @@ module.exports = __toCommonJS(src_exports);
|
|
|
1537
1543
|
var import_utils2 = __toESM(require_cjs(), 1);
|
|
1538
1544
|
|
|
1539
1545
|
// src/browser.js
|
|
1540
|
-
var toggleFullscreen = (el) => {
|
|
1546
|
+
var toggleFullscreen = async (el) => {
|
|
1541
1547
|
if (!document.fullscreenElement) {
|
|
1542
|
-
|
|
1548
|
+
try {
|
|
1549
|
+
await (el.node || document).requestFullscreen();
|
|
1550
|
+
} catch (err) {
|
|
1543
1551
|
console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`);
|
|
1544
|
-
}
|
|
1552
|
+
}
|
|
1545
1553
|
} else {
|
|
1546
|
-
document.exitFullscreen();
|
|
1554
|
+
await document.exitFullscreen();
|
|
1547
1555
|
}
|
|
1548
1556
|
};
|
|
1549
1557
|
|
package/dist/cjs/scaling.js
CHANGED
|
@@ -732,7 +732,7 @@ var require_object = __commonJS({
|
|
|
732
732
|
return o;
|
|
733
733
|
};
|
|
734
734
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
735
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
735
|
+
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
736
736
|
for (const prop in obj) {
|
|
737
737
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
738
738
|
continue;
|
|
@@ -1108,6 +1108,12 @@ var require_object = __commonJS({
|
|
|
1108
1108
|
if (foundString || foundInArray)
|
|
1109
1109
|
return el;
|
|
1110
1110
|
}
|
|
1111
|
+
if (el.parent && el.parent.childExtend) {
|
|
1112
|
+
const foundString = (0, import_types.isString)(el.parent.childExtend) && el.parent.childExtend === key;
|
|
1113
|
+
const foundInArray = (0, import_types.isArray)(el.parent.childExtend) && el.parent.childExtend.filter((v) => v === key).length;
|
|
1114
|
+
if (foundString || foundInArray)
|
|
1115
|
+
return el;
|
|
1116
|
+
}
|
|
1111
1117
|
};
|
|
1112
1118
|
var getExtendsInElement = (obj) => {
|
|
1113
1119
|
let result = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/utils",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.421",
|
|
4
4
|
"author": "symbo.ls",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@domql/utils": "latest"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "c8c0374c888db13ddd96d6602f441ab80f13c203"
|
|
30
30
|
}
|
package/src/browser.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
export const toggleFullscreen = (el) => {
|
|
3
|
+
export const toggleFullscreen = async (el) => {
|
|
4
4
|
if (!document.fullscreenElement) {
|
|
5
|
-
|
|
5
|
+
try {
|
|
6
|
+
await (el.node || document).requestFullscreen()
|
|
7
|
+
} catch (err) {
|
|
6
8
|
console.warn(`Error attempting to enable fullscreen mode: ${err.message} (${err.name})`)
|
|
7
|
-
}
|
|
9
|
+
}
|
|
8
10
|
} else {
|
|
9
|
-
document.exitFullscreen()
|
|
11
|
+
await document.exitFullscreen()
|
|
10
12
|
}
|
|
11
13
|
}
|