@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/utils/color.js
CHANGED
|
@@ -378,10 +378,10 @@ var require_array = __commonJS({
|
|
|
378
378
|
return [].concat(...arrays);
|
|
379
379
|
};
|
|
380
380
|
var mergeArray = (arr, excludeFrom = []) => {
|
|
381
|
-
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.
|
|
381
|
+
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepCloneWithExtend)(c, excludeFrom), excludeFrom), {});
|
|
382
382
|
};
|
|
383
383
|
var mergeAndCloneIfArray = (obj) => {
|
|
384
|
-
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.
|
|
384
|
+
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepCloneWithExtend)(obj);
|
|
385
385
|
};
|
|
386
386
|
var cutArrayBeforeValue = (arr, value) => {
|
|
387
387
|
const index = arr.indexOf(value);
|
|
@@ -487,6 +487,8 @@ var require_string = __commonJS({
|
|
|
487
487
|
__export2(string_exports, {
|
|
488
488
|
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
489
489
|
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
490
|
+
decodeNewlines: () => decodeNewlines,
|
|
491
|
+
encodeNewlines: () => encodeNewlines,
|
|
490
492
|
findKeyPosition: () => findKeyPosition,
|
|
491
493
|
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
492
494
|
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
@@ -590,6 +592,12 @@ var require_string = __commonJS({
|
|
|
590
592
|
return char;
|
|
591
593
|
});
|
|
592
594
|
};
|
|
595
|
+
var encodeNewlines = (str) => {
|
|
596
|
+
return str.split("\n").join("/////n").split("`").join("/////tilde").split("$").join("/////dlrsgn");
|
|
597
|
+
};
|
|
598
|
+
var decodeNewlines = (encodedStr) => {
|
|
599
|
+
return encodedStr.split("/////n").join("\n").split("/////tilde").join("`").split("/////dlrsgn").join("$");
|
|
600
|
+
};
|
|
593
601
|
var customEncodeURIComponent = (str) => {
|
|
594
602
|
return str.split("").map((char) => {
|
|
595
603
|
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
@@ -768,7 +776,7 @@ var require_object = __commonJS({
|
|
|
768
776
|
return o;
|
|
769
777
|
};
|
|
770
778
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
771
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
779
|
+
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
772
780
|
for (const prop in obj) {
|
|
773
781
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
774
782
|
continue;
|
|
@@ -1022,7 +1030,7 @@ var require_object = __commonJS({
|
|
|
1022
1030
|
};
|
|
1023
1031
|
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
1024
1032
|
for (const e in params) {
|
|
1025
|
-
if (e === "
|
|
1033
|
+
if (e === "__ref")
|
|
1026
1034
|
continue;
|
|
1027
1035
|
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
1028
1036
|
continue;
|
|
@@ -1144,6 +1152,12 @@ var require_object = __commonJS({
|
|
|
1144
1152
|
if (foundString || foundInArray)
|
|
1145
1153
|
return el;
|
|
1146
1154
|
}
|
|
1155
|
+
if (el.parent && el.parent.childExtend) {
|
|
1156
|
+
const foundString = (0, import_types.isString)(el.parent.childExtend) && el.parent.childExtend === key;
|
|
1157
|
+
const foundInArray = (0, import_types.isArray)(el.parent.childExtend) && el.parent.childExtend.filter((v) => v === key).length;
|
|
1158
|
+
if (foundString || foundInArray)
|
|
1159
|
+
return el;
|
|
1160
|
+
}
|
|
1147
1161
|
};
|
|
1148
1162
|
var getExtendsInElement = (obj) => {
|
|
1149
1163
|
let result = [];
|