@symbo.ls/scratch 2.11.338 → 2.11.352
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/factory.js +11 -17
- package/dist/cjs/index.js +11 -17
- package/dist/cjs/set.js +11 -17
- package/dist/cjs/system/color.js +11 -17
- package/dist/cjs/system/document.js +11 -17
- package/dist/cjs/system/font.js +11 -17
- package/dist/cjs/system/index.js +11 -17
- package/dist/cjs/system/reset.js +11 -17
- package/dist/cjs/system/shadow.js +11 -17
- package/dist/cjs/system/spacing.js +11 -17
- package/dist/cjs/system/svg.js +11 -17
- package/dist/cjs/system/theme.js +11 -17
- package/dist/cjs/system/timing.js +11 -17
- package/dist/cjs/system/typography.js +11 -17
- package/dist/cjs/transforms/index.js +11 -17
- package/dist/cjs/utils/color.js +11 -17
- package/dist/cjs/utils/index.js +11 -17
- package/dist/cjs/utils/sequence.js +11 -17
- package/dist/cjs/utils/sprite.js +11 -17
- package/dist/cjs/utils/var.js +11 -17
- package/package.json +5 -4
package/dist/cjs/factory.js
CHANGED
|
@@ -428,14 +428,15 @@ var require_string = __commonJS({
|
|
|
428
428
|
};
|
|
429
429
|
var brackRegex = {
|
|
430
430
|
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
431
|
-
3: /\{\{\s*((
|
|
431
|
+
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
432
432
|
};
|
|
433
|
-
var replaceLiteralsWithObjectFields = (str, state,
|
|
434
|
-
if (!str.includes(
|
|
433
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
434
|
+
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
435
435
|
return str;
|
|
436
|
-
|
|
436
|
+
const reg = brackRegex[options.bracketsLength || 2];
|
|
437
|
+
return str.replace(reg, (_, parentPath, variable) => {
|
|
437
438
|
if (parentPath) {
|
|
438
|
-
const parentLevels = parentPath.match(
|
|
439
|
+
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
439
440
|
let parentState = state;
|
|
440
441
|
for (let i = 0; i < parentLevels; i++) {
|
|
441
442
|
parentState = parentState.parent;
|
|
@@ -482,7 +483,6 @@ var require_object = __commonJS({
|
|
|
482
483
|
__export2(object_exports, {
|
|
483
484
|
clone: () => clone,
|
|
484
485
|
deepClone: () => deepClone2,
|
|
485
|
-
deepCloneEntrance: () => deepCloneEntrance,
|
|
486
486
|
deepCloneExclude: () => deepCloneExclude,
|
|
487
487
|
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
488
488
|
deepContains: () => deepContains,
|
|
@@ -598,6 +598,8 @@ var require_object = __commonJS({
|
|
|
598
598
|
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
599
599
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
600
600
|
for (const prop in obj) {
|
|
601
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
602
|
+
continue;
|
|
601
603
|
if (prop === "__proto__")
|
|
602
604
|
continue;
|
|
603
605
|
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
@@ -615,21 +617,13 @@ var require_object = __commonJS({
|
|
|
615
617
|
}
|
|
616
618
|
return o;
|
|
617
619
|
};
|
|
618
|
-
var deepCloneEntrance = (...params) => {
|
|
619
|
-
let extended;
|
|
620
|
-
try {
|
|
621
|
-
extended = deepCloneWithExtend(...params);
|
|
622
|
-
} catch {
|
|
623
|
-
console.log("HERE", extended);
|
|
624
|
-
}
|
|
625
|
-
return extended;
|
|
626
|
-
};
|
|
627
620
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
628
621
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
629
622
|
for (const prop in obj) {
|
|
630
|
-
|
|
623
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
624
|
+
continue;
|
|
631
625
|
const objProp = obj[prop];
|
|
632
|
-
if (
|
|
626
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
633
627
|
continue;
|
|
634
628
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
635
629
|
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
package/dist/cjs/index.js
CHANGED
|
@@ -464,14 +464,15 @@ var require_string = __commonJS({
|
|
|
464
464
|
};
|
|
465
465
|
var brackRegex = {
|
|
466
466
|
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
467
|
-
3: /\{\{\s*((
|
|
467
|
+
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
468
468
|
};
|
|
469
|
-
var replaceLiteralsWithObjectFields = (str, state,
|
|
470
|
-
if (!str.includes(
|
|
469
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
470
|
+
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
471
471
|
return str;
|
|
472
|
-
|
|
472
|
+
const reg = brackRegex[options.bracketsLength || 2];
|
|
473
|
+
return str.replace(reg, (_, parentPath, variable) => {
|
|
473
474
|
if (parentPath) {
|
|
474
|
-
const parentLevels = parentPath.match(
|
|
475
|
+
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
475
476
|
let parentState = state;
|
|
476
477
|
for (let i = 0; i < parentLevels; i++) {
|
|
477
478
|
parentState = parentState.parent;
|
|
@@ -518,7 +519,6 @@ var require_object = __commonJS({
|
|
|
518
519
|
__export2(object_exports, {
|
|
519
520
|
clone: () => clone,
|
|
520
521
|
deepClone: () => deepClone2,
|
|
521
|
-
deepCloneEntrance: () => deepCloneEntrance,
|
|
522
522
|
deepCloneExclude: () => deepCloneExclude,
|
|
523
523
|
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
524
524
|
deepContains: () => deepContains,
|
|
@@ -634,6 +634,8 @@ var require_object = __commonJS({
|
|
|
634
634
|
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
635
635
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
636
636
|
for (const prop in obj) {
|
|
637
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
638
|
+
continue;
|
|
637
639
|
if (prop === "__proto__")
|
|
638
640
|
continue;
|
|
639
641
|
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
@@ -651,21 +653,13 @@ var require_object = __commonJS({
|
|
|
651
653
|
}
|
|
652
654
|
return o;
|
|
653
655
|
};
|
|
654
|
-
var deepCloneEntrance = (...params) => {
|
|
655
|
-
let extended;
|
|
656
|
-
try {
|
|
657
|
-
extended = deepCloneWithExtend(...params);
|
|
658
|
-
} catch {
|
|
659
|
-
console.log("HERE", extended);
|
|
660
|
-
}
|
|
661
|
-
return extended;
|
|
662
|
-
};
|
|
663
656
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
664
657
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
665
658
|
for (const prop in obj) {
|
|
666
|
-
|
|
659
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
660
|
+
continue;
|
|
667
661
|
const objProp = obj[prop];
|
|
668
|
-
if (
|
|
662
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
669
663
|
continue;
|
|
670
664
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
671
665
|
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
package/dist/cjs/set.js
CHANGED
|
@@ -428,14 +428,15 @@ var require_string = __commonJS({
|
|
|
428
428
|
};
|
|
429
429
|
var brackRegex = {
|
|
430
430
|
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
431
|
-
3: /\{\{\s*((
|
|
431
|
+
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
432
432
|
};
|
|
433
|
-
var replaceLiteralsWithObjectFields = (str, state,
|
|
434
|
-
if (!str.includes(
|
|
433
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
434
|
+
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
435
435
|
return str;
|
|
436
|
-
|
|
436
|
+
const reg = brackRegex[options.bracketsLength || 2];
|
|
437
|
+
return str.replace(reg, (_, parentPath, variable) => {
|
|
437
438
|
if (parentPath) {
|
|
438
|
-
const parentLevels = parentPath.match(
|
|
439
|
+
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
439
440
|
let parentState = state;
|
|
440
441
|
for (let i = 0; i < parentLevels; i++) {
|
|
441
442
|
parentState = parentState.parent;
|
|
@@ -482,7 +483,6 @@ var require_object = __commonJS({
|
|
|
482
483
|
__export2(object_exports, {
|
|
483
484
|
clone: () => clone,
|
|
484
485
|
deepClone: () => deepClone2,
|
|
485
|
-
deepCloneEntrance: () => deepCloneEntrance,
|
|
486
486
|
deepCloneExclude: () => deepCloneExclude,
|
|
487
487
|
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
488
488
|
deepContains: () => deepContains,
|
|
@@ -598,6 +598,8 @@ var require_object = __commonJS({
|
|
|
598
598
|
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
599
599
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
600
600
|
for (const prop in obj) {
|
|
601
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
602
|
+
continue;
|
|
601
603
|
if (prop === "__proto__")
|
|
602
604
|
continue;
|
|
603
605
|
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
@@ -615,21 +617,13 @@ var require_object = __commonJS({
|
|
|
615
617
|
}
|
|
616
618
|
return o;
|
|
617
619
|
};
|
|
618
|
-
var deepCloneEntrance = (...params) => {
|
|
619
|
-
let extended;
|
|
620
|
-
try {
|
|
621
|
-
extended = deepCloneWithExtend(...params);
|
|
622
|
-
} catch {
|
|
623
|
-
console.log("HERE", extended);
|
|
624
|
-
}
|
|
625
|
-
return extended;
|
|
626
|
-
};
|
|
627
620
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
628
621
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
629
622
|
for (const prop in obj) {
|
|
630
|
-
|
|
623
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
624
|
+
continue;
|
|
631
625
|
const objProp = obj[prop];
|
|
632
|
-
if (
|
|
626
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
633
627
|
continue;
|
|
634
628
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
635
629
|
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
package/dist/cjs/system/color.js
CHANGED
|
@@ -428,14 +428,15 @@ var require_string = __commonJS({
|
|
|
428
428
|
};
|
|
429
429
|
var brackRegex = {
|
|
430
430
|
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
431
|
-
3: /\{\{\s*((
|
|
431
|
+
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
432
432
|
};
|
|
433
|
-
var replaceLiteralsWithObjectFields = (str, state,
|
|
434
|
-
if (!str.includes(
|
|
433
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
434
|
+
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
435
435
|
return str;
|
|
436
|
-
|
|
436
|
+
const reg = brackRegex[options.bracketsLength || 2];
|
|
437
|
+
return str.replace(reg, (_, parentPath, variable) => {
|
|
437
438
|
if (parentPath) {
|
|
438
|
-
const parentLevels = parentPath.match(
|
|
439
|
+
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
439
440
|
let parentState = state;
|
|
440
441
|
for (let i = 0; i < parentLevels; i++) {
|
|
441
442
|
parentState = parentState.parent;
|
|
@@ -482,7 +483,6 @@ var require_object = __commonJS({
|
|
|
482
483
|
__export2(object_exports, {
|
|
483
484
|
clone: () => clone,
|
|
484
485
|
deepClone: () => deepClone2,
|
|
485
|
-
deepCloneEntrance: () => deepCloneEntrance,
|
|
486
486
|
deepCloneExclude: () => deepCloneExclude,
|
|
487
487
|
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
488
488
|
deepContains: () => deepContains,
|
|
@@ -598,6 +598,8 @@ var require_object = __commonJS({
|
|
|
598
598
|
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
599
599
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
600
600
|
for (const prop in obj) {
|
|
601
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
602
|
+
continue;
|
|
601
603
|
if (prop === "__proto__")
|
|
602
604
|
continue;
|
|
603
605
|
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
@@ -615,21 +617,13 @@ var require_object = __commonJS({
|
|
|
615
617
|
}
|
|
616
618
|
return o;
|
|
617
619
|
};
|
|
618
|
-
var deepCloneEntrance = (...params) => {
|
|
619
|
-
let extended;
|
|
620
|
-
try {
|
|
621
|
-
extended = deepCloneWithExtend(...params);
|
|
622
|
-
} catch {
|
|
623
|
-
console.log("HERE", extended);
|
|
624
|
-
}
|
|
625
|
-
return extended;
|
|
626
|
-
};
|
|
627
620
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
628
621
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
629
622
|
for (const prop in obj) {
|
|
630
|
-
|
|
623
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
624
|
+
continue;
|
|
631
625
|
const objProp = obj[prop];
|
|
632
|
-
if (
|
|
626
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
633
627
|
continue;
|
|
634
628
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
635
629
|
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
@@ -428,14 +428,15 @@ var require_string = __commonJS({
|
|
|
428
428
|
};
|
|
429
429
|
var brackRegex = {
|
|
430
430
|
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
431
|
-
3: /\{\{\s*((
|
|
431
|
+
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
432
432
|
};
|
|
433
|
-
var replaceLiteralsWithObjectFields = (str, state,
|
|
434
|
-
if (!str.includes(
|
|
433
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
434
|
+
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
435
435
|
return str;
|
|
436
|
-
|
|
436
|
+
const reg = brackRegex[options.bracketsLength || 2];
|
|
437
|
+
return str.replace(reg, (_, parentPath, variable) => {
|
|
437
438
|
if (parentPath) {
|
|
438
|
-
const parentLevels = parentPath.match(
|
|
439
|
+
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
439
440
|
let parentState = state;
|
|
440
441
|
for (let i = 0; i < parentLevels; i++) {
|
|
441
442
|
parentState = parentState.parent;
|
|
@@ -482,7 +483,6 @@ var require_object = __commonJS({
|
|
|
482
483
|
__export2(object_exports, {
|
|
483
484
|
clone: () => clone,
|
|
484
485
|
deepClone: () => deepClone2,
|
|
485
|
-
deepCloneEntrance: () => deepCloneEntrance,
|
|
486
486
|
deepCloneExclude: () => deepCloneExclude,
|
|
487
487
|
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
488
488
|
deepContains: () => deepContains,
|
|
@@ -598,6 +598,8 @@ var require_object = __commonJS({
|
|
|
598
598
|
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
599
599
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
600
600
|
for (const prop in obj) {
|
|
601
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
602
|
+
continue;
|
|
601
603
|
if (prop === "__proto__")
|
|
602
604
|
continue;
|
|
603
605
|
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
@@ -615,21 +617,13 @@ var require_object = __commonJS({
|
|
|
615
617
|
}
|
|
616
618
|
return o;
|
|
617
619
|
};
|
|
618
|
-
var deepCloneEntrance = (...params) => {
|
|
619
|
-
let extended;
|
|
620
|
-
try {
|
|
621
|
-
extended = deepCloneWithExtend(...params);
|
|
622
|
-
} catch {
|
|
623
|
-
console.log("HERE", extended);
|
|
624
|
-
}
|
|
625
|
-
return extended;
|
|
626
|
-
};
|
|
627
620
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
628
621
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
629
622
|
for (const prop in obj) {
|
|
630
|
-
|
|
623
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
624
|
+
continue;
|
|
631
625
|
const objProp = obj[prop];
|
|
632
|
-
if (
|
|
626
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
633
627
|
continue;
|
|
634
628
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
635
629
|
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
package/dist/cjs/system/font.js
CHANGED
|
@@ -428,14 +428,15 @@ var require_string = __commonJS({
|
|
|
428
428
|
};
|
|
429
429
|
var brackRegex = {
|
|
430
430
|
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
431
|
-
3: /\{\{\s*((
|
|
431
|
+
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
432
432
|
};
|
|
433
|
-
var replaceLiteralsWithObjectFields = (str, state,
|
|
434
|
-
if (!str.includes(
|
|
433
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
434
|
+
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
435
435
|
return str;
|
|
436
|
-
|
|
436
|
+
const reg = brackRegex[options.bracketsLength || 2];
|
|
437
|
+
return str.replace(reg, (_, parentPath, variable) => {
|
|
437
438
|
if (parentPath) {
|
|
438
|
-
const parentLevels = parentPath.match(
|
|
439
|
+
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
439
440
|
let parentState = state;
|
|
440
441
|
for (let i = 0; i < parentLevels; i++) {
|
|
441
442
|
parentState = parentState.parent;
|
|
@@ -482,7 +483,6 @@ var require_object = __commonJS({
|
|
|
482
483
|
__export2(object_exports, {
|
|
483
484
|
clone: () => clone,
|
|
484
485
|
deepClone: () => deepClone2,
|
|
485
|
-
deepCloneEntrance: () => deepCloneEntrance,
|
|
486
486
|
deepCloneExclude: () => deepCloneExclude,
|
|
487
487
|
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
488
488
|
deepContains: () => deepContains,
|
|
@@ -598,6 +598,8 @@ var require_object = __commonJS({
|
|
|
598
598
|
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
599
599
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
600
600
|
for (const prop in obj) {
|
|
601
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
602
|
+
continue;
|
|
601
603
|
if (prop === "__proto__")
|
|
602
604
|
continue;
|
|
603
605
|
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
@@ -615,21 +617,13 @@ var require_object = __commonJS({
|
|
|
615
617
|
}
|
|
616
618
|
return o;
|
|
617
619
|
};
|
|
618
|
-
var deepCloneEntrance = (...params) => {
|
|
619
|
-
let extended;
|
|
620
|
-
try {
|
|
621
|
-
extended = deepCloneWithExtend(...params);
|
|
622
|
-
} catch {
|
|
623
|
-
console.log("HERE", extended);
|
|
624
|
-
}
|
|
625
|
-
return extended;
|
|
626
|
-
};
|
|
627
620
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
628
621
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
629
622
|
for (const prop in obj) {
|
|
630
|
-
|
|
623
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
624
|
+
continue;
|
|
631
625
|
const objProp = obj[prop];
|
|
632
|
-
if (
|
|
626
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
633
627
|
continue;
|
|
634
628
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
635
629
|
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
package/dist/cjs/system/index.js
CHANGED
|
@@ -428,14 +428,15 @@ var require_string = __commonJS({
|
|
|
428
428
|
};
|
|
429
429
|
var brackRegex = {
|
|
430
430
|
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
431
|
-
3: /\{\{\s*((
|
|
431
|
+
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
432
432
|
};
|
|
433
|
-
var replaceLiteralsWithObjectFields = (str, state,
|
|
434
|
-
if (!str.includes(
|
|
433
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
434
|
+
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
435
435
|
return str;
|
|
436
|
-
|
|
436
|
+
const reg = brackRegex[options.bracketsLength || 2];
|
|
437
|
+
return str.replace(reg, (_, parentPath, variable) => {
|
|
437
438
|
if (parentPath) {
|
|
438
|
-
const parentLevels = parentPath.match(
|
|
439
|
+
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
439
440
|
let parentState = state;
|
|
440
441
|
for (let i = 0; i < parentLevels; i++) {
|
|
441
442
|
parentState = parentState.parent;
|
|
@@ -482,7 +483,6 @@ var require_object = __commonJS({
|
|
|
482
483
|
__export2(object_exports, {
|
|
483
484
|
clone: () => clone,
|
|
484
485
|
deepClone: () => deepClone2,
|
|
485
|
-
deepCloneEntrance: () => deepCloneEntrance,
|
|
486
486
|
deepCloneExclude: () => deepCloneExclude,
|
|
487
487
|
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
488
488
|
deepContains: () => deepContains,
|
|
@@ -598,6 +598,8 @@ var require_object = __commonJS({
|
|
|
598
598
|
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
599
599
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
600
600
|
for (const prop in obj) {
|
|
601
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
602
|
+
continue;
|
|
601
603
|
if (prop === "__proto__")
|
|
602
604
|
continue;
|
|
603
605
|
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
@@ -615,21 +617,13 @@ var require_object = __commonJS({
|
|
|
615
617
|
}
|
|
616
618
|
return o;
|
|
617
619
|
};
|
|
618
|
-
var deepCloneEntrance = (...params) => {
|
|
619
|
-
let extended;
|
|
620
|
-
try {
|
|
621
|
-
extended = deepCloneWithExtend(...params);
|
|
622
|
-
} catch {
|
|
623
|
-
console.log("HERE", extended);
|
|
624
|
-
}
|
|
625
|
-
return extended;
|
|
626
|
-
};
|
|
627
620
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
628
621
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
629
622
|
for (const prop in obj) {
|
|
630
|
-
|
|
623
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
624
|
+
continue;
|
|
631
625
|
const objProp = obj[prop];
|
|
632
|
-
if (
|
|
626
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
633
627
|
continue;
|
|
634
628
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
635
629
|
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
package/dist/cjs/system/reset.js
CHANGED
|
@@ -428,14 +428,15 @@ var require_string = __commonJS({
|
|
|
428
428
|
};
|
|
429
429
|
var brackRegex = {
|
|
430
430
|
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
431
|
-
3: /\{\{\s*((
|
|
431
|
+
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
432
432
|
};
|
|
433
|
-
var replaceLiteralsWithObjectFields = (str, state,
|
|
434
|
-
if (!str.includes(
|
|
433
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
434
|
+
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
435
435
|
return str;
|
|
436
|
-
|
|
436
|
+
const reg = brackRegex[options.bracketsLength || 2];
|
|
437
|
+
return str.replace(reg, (_, parentPath, variable) => {
|
|
437
438
|
if (parentPath) {
|
|
438
|
-
const parentLevels = parentPath.match(
|
|
439
|
+
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
439
440
|
let parentState = state;
|
|
440
441
|
for (let i = 0; i < parentLevels; i++) {
|
|
441
442
|
parentState = parentState.parent;
|
|
@@ -482,7 +483,6 @@ var require_object = __commonJS({
|
|
|
482
483
|
__export2(object_exports, {
|
|
483
484
|
clone: () => clone,
|
|
484
485
|
deepClone: () => deepClone2,
|
|
485
|
-
deepCloneEntrance: () => deepCloneEntrance,
|
|
486
486
|
deepCloneExclude: () => deepCloneExclude,
|
|
487
487
|
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
488
488
|
deepContains: () => deepContains,
|
|
@@ -598,6 +598,8 @@ var require_object = __commonJS({
|
|
|
598
598
|
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
599
599
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
600
600
|
for (const prop in obj) {
|
|
601
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
602
|
+
continue;
|
|
601
603
|
if (prop === "__proto__")
|
|
602
604
|
continue;
|
|
603
605
|
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
@@ -615,21 +617,13 @@ var require_object = __commonJS({
|
|
|
615
617
|
}
|
|
616
618
|
return o;
|
|
617
619
|
};
|
|
618
|
-
var deepCloneEntrance = (...params) => {
|
|
619
|
-
let extended;
|
|
620
|
-
try {
|
|
621
|
-
extended = deepCloneWithExtend(...params);
|
|
622
|
-
} catch {
|
|
623
|
-
console.log("HERE", extended);
|
|
624
|
-
}
|
|
625
|
-
return extended;
|
|
626
|
-
};
|
|
627
620
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
628
621
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
629
622
|
for (const prop in obj) {
|
|
630
|
-
|
|
623
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
624
|
+
continue;
|
|
631
625
|
const objProp = obj[prop];
|
|
632
|
-
if (
|
|
626
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
633
627
|
continue;
|
|
634
628
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
635
629
|
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
@@ -428,14 +428,15 @@ var require_string = __commonJS({
|
|
|
428
428
|
};
|
|
429
429
|
var brackRegex = {
|
|
430
430
|
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
431
|
-
3: /\{\{\s*((
|
|
431
|
+
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
432
432
|
};
|
|
433
|
-
var replaceLiteralsWithObjectFields = (str, state,
|
|
434
|
-
if (!str.includes(
|
|
433
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
434
|
+
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
435
435
|
return str;
|
|
436
|
-
|
|
436
|
+
const reg = brackRegex[options.bracketsLength || 2];
|
|
437
|
+
return str.replace(reg, (_, parentPath, variable) => {
|
|
437
438
|
if (parentPath) {
|
|
438
|
-
const parentLevels = parentPath.match(
|
|
439
|
+
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
439
440
|
let parentState = state;
|
|
440
441
|
for (let i = 0; i < parentLevels; i++) {
|
|
441
442
|
parentState = parentState.parent;
|
|
@@ -482,7 +483,6 @@ var require_object = __commonJS({
|
|
|
482
483
|
__export2(object_exports, {
|
|
483
484
|
clone: () => clone,
|
|
484
485
|
deepClone: () => deepClone2,
|
|
485
|
-
deepCloneEntrance: () => deepCloneEntrance,
|
|
486
486
|
deepCloneExclude: () => deepCloneExclude,
|
|
487
487
|
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
488
488
|
deepContains: () => deepContains,
|
|
@@ -598,6 +598,8 @@ var require_object = __commonJS({
|
|
|
598
598
|
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
599
599
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
600
600
|
for (const prop in obj) {
|
|
601
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
602
|
+
continue;
|
|
601
603
|
if (prop === "__proto__")
|
|
602
604
|
continue;
|
|
603
605
|
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
@@ -615,21 +617,13 @@ var require_object = __commonJS({
|
|
|
615
617
|
}
|
|
616
618
|
return o;
|
|
617
619
|
};
|
|
618
|
-
var deepCloneEntrance = (...params) => {
|
|
619
|
-
let extended;
|
|
620
|
-
try {
|
|
621
|
-
extended = deepCloneWithExtend(...params);
|
|
622
|
-
} catch {
|
|
623
|
-
console.log("HERE", extended);
|
|
624
|
-
}
|
|
625
|
-
return extended;
|
|
626
|
-
};
|
|
627
620
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
628
621
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
629
622
|
for (const prop in obj) {
|
|
630
|
-
|
|
623
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
624
|
+
continue;
|
|
631
625
|
const objProp = obj[prop];
|
|
632
|
-
if (
|
|
626
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
633
627
|
continue;
|
|
634
628
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
635
629
|
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|
|
@@ -428,14 +428,15 @@ var require_string = __commonJS({
|
|
|
428
428
|
};
|
|
429
429
|
var brackRegex = {
|
|
430
430
|
2: /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g,
|
|
431
|
-
3: /\{\{\s*((
|
|
431
|
+
3: /\{\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}\}/g
|
|
432
432
|
};
|
|
433
|
-
var replaceLiteralsWithObjectFields = (str, state,
|
|
434
|
-
if (!str.includes(
|
|
433
|
+
var replaceLiteralsWithObjectFields = (str, state, options = {}) => {
|
|
434
|
+
if (!str.includes(options.bracketsLength === 3 ? "{{{" : "{{"))
|
|
435
435
|
return str;
|
|
436
|
-
|
|
436
|
+
const reg = brackRegex[options.bracketsLength || 2];
|
|
437
|
+
return str.replace(reg, (_, parentPath, variable) => {
|
|
437
438
|
if (parentPath) {
|
|
438
|
-
const parentLevels = parentPath.match(
|
|
439
|
+
const parentLevels = parentPath.match(options.bracketsLength === 3 ? /\.\.\.\//g : /\.\.\//g).length;
|
|
439
440
|
let parentState = state;
|
|
440
441
|
for (let i = 0; i < parentLevels; i++) {
|
|
441
442
|
parentState = parentState.parent;
|
|
@@ -482,7 +483,6 @@ var require_object = __commonJS({
|
|
|
482
483
|
__export2(object_exports, {
|
|
483
484
|
clone: () => clone,
|
|
484
485
|
deepClone: () => deepClone2,
|
|
485
|
-
deepCloneEntrance: () => deepCloneEntrance,
|
|
486
486
|
deepCloneExclude: () => deepCloneExclude,
|
|
487
487
|
deepCloneWithExtend: () => deepCloneWithExtend,
|
|
488
488
|
deepContains: () => deepContains,
|
|
@@ -598,6 +598,8 @@ var require_object = __commonJS({
|
|
|
598
598
|
var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
|
|
599
599
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
600
600
|
for (const prop in obj) {
|
|
601
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
602
|
+
continue;
|
|
601
603
|
if (prop === "__proto__")
|
|
602
604
|
continue;
|
|
603
605
|
if (excludeFrom.includes(prop) || prop.startsWith("__"))
|
|
@@ -615,21 +617,13 @@ var require_object = __commonJS({
|
|
|
615
617
|
}
|
|
616
618
|
return o;
|
|
617
619
|
};
|
|
618
|
-
var deepCloneEntrance = (...params) => {
|
|
619
|
-
let extended;
|
|
620
|
-
try {
|
|
621
|
-
extended = deepCloneWithExtend(...params);
|
|
622
|
-
} catch {
|
|
623
|
-
console.log("HERE", extended);
|
|
624
|
-
}
|
|
625
|
-
return extended;
|
|
626
|
-
};
|
|
627
620
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
628
621
|
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
629
622
|
for (const prop in obj) {
|
|
630
|
-
|
|
623
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
624
|
+
continue;
|
|
631
625
|
const objProp = obj[prop];
|
|
632
|
-
if (
|
|
626
|
+
if (excludeFrom.includes(prop) || prop.startsWith("__") || options.cleanUndefined && (0, import_types.isUndefined)(objProp) || options.cleanNull && (0, import_types.isNull)(objProp))
|
|
633
627
|
continue;
|
|
634
628
|
if ((0, import_types.isObjectLike)(objProp)) {
|
|
635
629
|
o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
|