@symbo.ls/scratch 2.11.410 → 2.11.429
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 +18 -4
- package/dist/cjs/index.js +2297 -2248
- package/dist/cjs/set.js +2234 -2187
- package/dist/cjs/system/color.js +2145 -2101
- package/dist/cjs/system/document.js +2072 -2028
- package/dist/cjs/system/font.js +1846 -1801
- package/dist/cjs/system/index.js +2277 -2230
- package/dist/cjs/system/reset.js +2057 -2013
- package/dist/cjs/system/shadow.js +2154 -2109
- package/dist/cjs/system/spacing.js +1907 -1862
- package/dist/cjs/system/svg.js +1837 -1793
- package/dist/cjs/system/theme.js +2153 -2109
- package/dist/cjs/system/timing.js +1908 -1861
- package/dist/cjs/system/typography.js +2065 -2021
- package/dist/cjs/transforms/index.js +2176 -2129
- package/dist/cjs/utils/color.js +18 -4
- package/dist/cjs/utils/index.js +2082 -2036
- package/dist/cjs/utils/sequence.js +1820 -1774
- package/dist/cjs/utils/sprite.js +18 -4
- package/dist/cjs/utils/var.js +2033 -1989
- package/package.json +2 -2
- package/src/utils/sequence.js +2 -1
package/dist/cjs/factory.js
CHANGED
|
@@ -342,10 +342,10 @@ var require_array = __commonJS({
|
|
|
342
342
|
return [].concat(...arrays);
|
|
343
343
|
};
|
|
344
344
|
var mergeArray = (arr, excludeFrom = []) => {
|
|
345
|
-
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.
|
|
345
|
+
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepCloneWithExtend)(c, excludeFrom), excludeFrom), {});
|
|
346
346
|
};
|
|
347
347
|
var mergeAndCloneIfArray = (obj) => {
|
|
348
|
-
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.
|
|
348
|
+
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepCloneWithExtend)(obj);
|
|
349
349
|
};
|
|
350
350
|
var cutArrayBeforeValue = (arr, value) => {
|
|
351
351
|
const index = arr.indexOf(value);
|
|
@@ -451,6 +451,8 @@ var require_string = __commonJS({
|
|
|
451
451
|
__export2(string_exports, {
|
|
452
452
|
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
453
453
|
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
454
|
+
decodeNewlines: () => decodeNewlines,
|
|
455
|
+
encodeNewlines: () => encodeNewlines,
|
|
454
456
|
findKeyPosition: () => findKeyPosition,
|
|
455
457
|
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
456
458
|
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
@@ -554,6 +556,12 @@ var require_string = __commonJS({
|
|
|
554
556
|
return char;
|
|
555
557
|
});
|
|
556
558
|
};
|
|
559
|
+
var encodeNewlines = (str) => {
|
|
560
|
+
return str.split("\n").join("/////n").split("`").join("/////tilde").split("$").join("/////dlrsgn");
|
|
561
|
+
};
|
|
562
|
+
var decodeNewlines = (encodedStr) => {
|
|
563
|
+
return encodedStr.split("/////n").join("\n").split("/////tilde").join("`").split("/////dlrsgn").join("$");
|
|
564
|
+
};
|
|
557
565
|
var customEncodeURIComponent = (str) => {
|
|
558
566
|
return str.split("").map((char) => {
|
|
559
567
|
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
@@ -732,7 +740,7 @@ var require_object = __commonJS({
|
|
|
732
740
|
return o;
|
|
733
741
|
};
|
|
734
742
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
735
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
743
|
+
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
736
744
|
for (const prop in obj) {
|
|
737
745
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
738
746
|
continue;
|
|
@@ -986,7 +994,7 @@ var require_object = __commonJS({
|
|
|
986
994
|
};
|
|
987
995
|
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
988
996
|
for (const e in params) {
|
|
989
|
-
if (e === "
|
|
997
|
+
if (e === "__ref")
|
|
990
998
|
continue;
|
|
991
999
|
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
992
1000
|
continue;
|
|
@@ -1108,6 +1116,12 @@ var require_object = __commonJS({
|
|
|
1108
1116
|
if (foundString || foundInArray)
|
|
1109
1117
|
return el;
|
|
1110
1118
|
}
|
|
1119
|
+
if (el.parent && el.parent.childExtend) {
|
|
1120
|
+
const foundString = (0, import_types.isString)(el.parent.childExtend) && el.parent.childExtend === key;
|
|
1121
|
+
const foundInArray = (0, import_types.isArray)(el.parent.childExtend) && el.parent.childExtend.filter((v) => v === key).length;
|
|
1122
|
+
if (foundString || foundInArray)
|
|
1123
|
+
return el;
|
|
1124
|
+
}
|
|
1111
1125
|
};
|
|
1112
1126
|
var getExtendsInElement = (obj) => {
|
|
1113
1127
|
let result = [];
|