@symbo.ls/scratch 2.11.410 → 2.11.430
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/defaultConfig/index.js +3 -1
- package/dist/cjs/defaultConfig/responsive.js +3 -1
- package/dist/cjs/factory.js +76 -44
- package/dist/cjs/index.js +2362 -2279
- package/dist/cjs/set.js +2328 -2247
- package/dist/cjs/system/color.js +2207 -2129
- package/dist/cjs/system/document.js +2127 -2049
- package/dist/cjs/system/font.js +1926 -1847
- package/dist/cjs/system/index.js +2346 -2265
- package/dist/cjs/system/reset.js +2131 -2053
- package/dist/cjs/system/shadow.js +2218 -2139
- package/dist/cjs/system/spacing.js +1975 -1896
- package/dist/cjs/system/svg.js +1907 -1829
- package/dist/cjs/system/theme.js +2215 -2137
- package/dist/cjs/system/timing.js +1979 -1898
- package/dist/cjs/system/typography.js +2131 -2053
- package/dist/cjs/transforms/index.js +2246 -2165
- package/dist/cjs/utils/color.js +75 -45
- package/dist/cjs/utils/index.js +2153 -2073
- package/dist/cjs/utils/sequence.js +1892 -1812
- package/dist/cjs/utils/sprite.js +76 -44
- package/dist/cjs/utils/var.js +2102 -2024
- package/package.json +2 -2
- package/src/defaultConfig/responsive.js +3 -1
- package/src/utils/sequence.js +2 -1
|
@@ -182,9 +182,11 @@ var BREAKPOINTS = {
|
|
|
182
182
|
mobileXS: 375
|
|
183
183
|
};
|
|
184
184
|
var DEVICES = {
|
|
185
|
+
screenXXL: [2560, 1440],
|
|
186
|
+
screenXL: [2240, 1260],
|
|
185
187
|
screenL: [1920, 1024],
|
|
186
188
|
screenM: [1680, 1024],
|
|
187
|
-
screenS: [1440,
|
|
189
|
+
screenS: [1440, 720],
|
|
188
190
|
tabletL: [1366, 926],
|
|
189
191
|
tabletM: [1280, 768],
|
|
190
192
|
tabletS: [1024, 768],
|
|
@@ -37,9 +37,11 @@ var BREAKPOINTS = {
|
|
|
37
37
|
mobileXS: 375
|
|
38
38
|
};
|
|
39
39
|
var DEVICES = {
|
|
40
|
+
screenXXL: [2560, 1440],
|
|
41
|
+
screenXL: [2240, 1260],
|
|
40
42
|
screenL: [1920, 1024],
|
|
41
43
|
screenM: [1680, 1024],
|
|
42
|
-
screenS: [1440,
|
|
44
|
+
screenS: [1440, 720],
|
|
43
45
|
tabletL: [1366, 926],
|
|
44
46
|
tabletM: [1280, 768],
|
|
45
47
|
tabletS: [1024, 768],
|
package/dist/cjs/factory.js
CHANGED
|
@@ -130,7 +130,7 @@ var require_globals = __commonJS({
|
|
|
130
130
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
131
131
|
var globals_exports = {};
|
|
132
132
|
__export2(globals_exports, {
|
|
133
|
-
document: () =>
|
|
133
|
+
document: () => document2,
|
|
134
134
|
global: () => global,
|
|
135
135
|
self: () => self,
|
|
136
136
|
window: () => window
|
|
@@ -139,7 +139,7 @@ var require_globals = __commonJS({
|
|
|
139
139
|
var global = globalThis;
|
|
140
140
|
var self = globalThis;
|
|
141
141
|
var window = globalThis;
|
|
142
|
-
var
|
|
142
|
+
var document2 = window.document;
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
|
|
@@ -166,6 +166,7 @@ var require_node = __commonJS({
|
|
|
166
166
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
167
167
|
var node_exports = {};
|
|
168
168
|
__export2(node_exports, {
|
|
169
|
+
isDOMNode: () => isDOMNode,
|
|
169
170
|
isHtmlElement: () => isHtmlElement,
|
|
170
171
|
isNode: () => isNode
|
|
171
172
|
});
|
|
@@ -177,6 +178,9 @@ var require_node = __commonJS({
|
|
|
177
178
|
var isHtmlElement = (obj) => {
|
|
178
179
|
return (typeof HTMLElement === "object" ? obj instanceof import_globals.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
|
|
179
180
|
};
|
|
181
|
+
var isDOMNode = (obj) => {
|
|
182
|
+
return typeof import_globals.window !== "undefined" && (obj instanceof import_globals.window.Node || obj instanceof import_globals.window.Window || obj === import_globals.window || obj === document);
|
|
183
|
+
};
|
|
180
184
|
}
|
|
181
185
|
});
|
|
182
186
|
|
|
@@ -342,10 +346,10 @@ var require_array = __commonJS({
|
|
|
342
346
|
return [].concat(...arrays);
|
|
343
347
|
};
|
|
344
348
|
var mergeArray = (arr, excludeFrom = []) => {
|
|
345
|
-
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.
|
|
349
|
+
return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepCloneWithExtend)(c, excludeFrom), excludeFrom), {});
|
|
346
350
|
};
|
|
347
351
|
var mergeAndCloneIfArray = (obj) => {
|
|
348
|
-
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.
|
|
352
|
+
return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepCloneWithExtend)(obj);
|
|
349
353
|
};
|
|
350
354
|
var cutArrayBeforeValue = (arr, value) => {
|
|
351
355
|
const index = arr.indexOf(value);
|
|
@@ -451,6 +455,8 @@ var require_string = __commonJS({
|
|
|
451
455
|
__export2(string_exports, {
|
|
452
456
|
customDecodeURIComponent: () => customDecodeURIComponent,
|
|
453
457
|
customEncodeURIComponent: () => customEncodeURIComponent,
|
|
458
|
+
decodeNewlines: () => decodeNewlines,
|
|
459
|
+
encodeNewlines: () => encodeNewlines,
|
|
454
460
|
findKeyPosition: () => findKeyPosition,
|
|
455
461
|
lowercaseFirstLetter: () => lowercaseFirstLetter,
|
|
456
462
|
replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
|
|
@@ -554,6 +560,12 @@ var require_string = __commonJS({
|
|
|
554
560
|
return char;
|
|
555
561
|
});
|
|
556
562
|
};
|
|
563
|
+
var encodeNewlines = (str) => {
|
|
564
|
+
return str.split("\n").join("/////n").split("`").join("/////tilde").split("$").join("/////dlrsgn");
|
|
565
|
+
};
|
|
566
|
+
var decodeNewlines = (encodedStr) => {
|
|
567
|
+
return encodedStr.split("/////n").join("\n").split("/////tilde").join("`").split("/////dlrsgn").join("$");
|
|
568
|
+
};
|
|
557
569
|
var customEncodeURIComponent = (str) => {
|
|
558
570
|
return str.split("").map((char) => {
|
|
559
571
|
if (/[^a-zA-Z0-9\s]/.test(char)) {
|
|
@@ -631,6 +643,7 @@ var require_object = __commonJS({
|
|
|
631
643
|
var import_types = require_types();
|
|
632
644
|
var import_array = require_array();
|
|
633
645
|
var import_string = require_string();
|
|
646
|
+
var import_node = require_node();
|
|
634
647
|
var exec = (param, element, state, context) => {
|
|
635
648
|
if ((0, import_types.isFunction)(param)) {
|
|
636
649
|
return param(
|
|
@@ -709,30 +722,31 @@ var require_object = __commonJS({
|
|
|
709
722
|
var mergeArrayExclude = (arr, excl = []) => {
|
|
710
723
|
return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
|
|
711
724
|
};
|
|
712
|
-
var deepClone2 = (obj,
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
725
|
+
var deepClone2 = (obj, exclude = [], cleanUndefined = false, visited = /* @__PURE__ */ new WeakMap()) => {
|
|
726
|
+
if (!(0, import_types.isObjectLike)(obj) || (0, import_node.isDOMNode)(obj))
|
|
727
|
+
return obj;
|
|
728
|
+
if (visited.has(obj))
|
|
729
|
+
return visited.get(obj);
|
|
730
|
+
const clone2 = (0, import_types.isArray)(obj) ? [] : {};
|
|
731
|
+
visited.set(obj, clone2);
|
|
732
|
+
for (const key in obj) {
|
|
733
|
+
if (Object.prototype.hasOwnProperty.call(obj, key) && !exclude.includes(key)) {
|
|
734
|
+
const value = obj[key];
|
|
735
|
+
if ((0, import_node.isDOMNode)(value)) {
|
|
736
|
+
clone2[key] = value;
|
|
737
|
+
} else if (key === "extend" && (0, import_types.isArray)(value)) {
|
|
738
|
+
clone2[key] = (0, import_array.mergeArray)(value, exclude);
|
|
739
|
+
} else if ((0, import_types.isObjectLike)(value)) {
|
|
740
|
+
clone2[key] = deepClone2(value, exclude, cleanUndefined, visited);
|
|
741
|
+
} else {
|
|
742
|
+
clone2[key] = value;
|
|
743
|
+
}
|
|
726
744
|
}
|
|
727
|
-
if ((0, import_types.isObjectLike)(objProp)) {
|
|
728
|
-
o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
|
|
729
|
-
} else
|
|
730
|
-
o[prop] = objProp;
|
|
731
745
|
}
|
|
732
|
-
return
|
|
746
|
+
return clone2;
|
|
733
747
|
};
|
|
734
748
|
var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
|
|
735
|
-
const o = (0, import_types.isArray)(obj) ? [] : {};
|
|
749
|
+
const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
|
|
736
750
|
for (const prop in obj) {
|
|
737
751
|
if (!Object.prototype.hasOwnProperty.call(obj, prop))
|
|
738
752
|
continue;
|
|
@@ -986,7 +1000,7 @@ var require_object = __commonJS({
|
|
|
986
1000
|
};
|
|
987
1001
|
var overwriteDeep = (obj, params, excludeFrom = []) => {
|
|
988
1002
|
for (const e in params) {
|
|
989
|
-
if (e === "
|
|
1003
|
+
if (e === "__ref")
|
|
990
1004
|
continue;
|
|
991
1005
|
if (excludeFrom.includes(e) || e.startsWith("__"))
|
|
992
1006
|
continue;
|
|
@@ -1040,30 +1054,40 @@ var require_object = __commonJS({
|
|
|
1040
1054
|
}
|
|
1041
1055
|
return true;
|
|
1042
1056
|
};
|
|
1043
|
-
var deepContains = (obj1, obj2) => {
|
|
1044
|
-
if (
|
|
1057
|
+
var deepContains = (obj1, obj2, ignoredKeys = ["node", "__ref"]) => {
|
|
1058
|
+
if (obj1 === obj2)
|
|
1059
|
+
return true;
|
|
1060
|
+
if (!(0, import_types.isObjectLike)(obj1) || !(0, import_types.isObjectLike)(obj2))
|
|
1045
1061
|
return false;
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1062
|
+
if ((0, import_node.isDOMNode)(obj1) || (0, import_node.isDOMNode)(obj2))
|
|
1063
|
+
return obj1 === obj2;
|
|
1064
|
+
const stack = [[obj1, obj2]];
|
|
1065
|
+
const visited = /* @__PURE__ */ new WeakSet();
|
|
1066
|
+
while (stack.length > 0) {
|
|
1067
|
+
const [current1, current2] = stack.pop();
|
|
1068
|
+
if (visited.has(current1))
|
|
1069
|
+
continue;
|
|
1070
|
+
visited.add(current1);
|
|
1071
|
+
const keys1 = Object.keys(current1).filter((key) => !ignoredKeys.includes(key));
|
|
1072
|
+
const keys2 = Object.keys(current2).filter((key) => !ignoredKeys.includes(key));
|
|
1073
|
+
if (keys1.length !== keys2.length)
|
|
1074
|
+
return false;
|
|
1075
|
+
for (const key of keys1) {
|
|
1076
|
+
if (!Object.prototype.hasOwnProperty.call(current2, key))
|
|
1050
1077
|
return false;
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
}
|
|
1056
|
-
}
|
|
1057
|
-
} else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
|
|
1058
|
-
for (const key in obj1) {
|
|
1059
|
-
const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
1060
|
-
if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
|
|
1078
|
+
const value1 = current1[key];
|
|
1079
|
+
const value2 = current2[key];
|
|
1080
|
+
if ((0, import_node.isDOMNode)(value1) || (0, import_node.isDOMNode)(value2)) {
|
|
1081
|
+
if (value1 !== value2)
|
|
1061
1082
|
return false;
|
|
1083
|
+
} else if ((0, import_types.isObjectLike)(value1) && (0, import_types.isObjectLike)(value2)) {
|
|
1084
|
+
if (value1 !== value2) {
|
|
1085
|
+
stack.push([value1, value2]);
|
|
1062
1086
|
}
|
|
1087
|
+
} else if (value1 !== value2) {
|
|
1088
|
+
return false;
|
|
1063
1089
|
}
|
|
1064
1090
|
}
|
|
1065
|
-
} else {
|
|
1066
|
-
return obj2 === obj1;
|
|
1067
1091
|
}
|
|
1068
1092
|
return true;
|
|
1069
1093
|
};
|
|
@@ -1108,6 +1132,12 @@ var require_object = __commonJS({
|
|
|
1108
1132
|
if (foundString || foundInArray)
|
|
1109
1133
|
return el;
|
|
1110
1134
|
}
|
|
1135
|
+
if (el.parent && el.parent.childExtend) {
|
|
1136
|
+
const foundString = (0, import_types.isString)(el.parent.childExtend) && el.parent.childExtend === key;
|
|
1137
|
+
const foundInArray = (0, import_types.isArray)(el.parent.childExtend) && el.parent.childExtend.filter((v) => v === key).length;
|
|
1138
|
+
if (foundString || foundInArray)
|
|
1139
|
+
return el;
|
|
1140
|
+
}
|
|
1111
1141
|
};
|
|
1112
1142
|
var getExtendsInElement = (obj) => {
|
|
1113
1143
|
let result = [];
|
|
@@ -1689,9 +1719,11 @@ var BREAKPOINTS = {
|
|
|
1689
1719
|
mobileXS: 375
|
|
1690
1720
|
};
|
|
1691
1721
|
var DEVICES = {
|
|
1722
|
+
screenXXL: [2560, 1440],
|
|
1723
|
+
screenXL: [2240, 1260],
|
|
1692
1724
|
screenL: [1920, 1024],
|
|
1693
1725
|
screenM: [1680, 1024],
|
|
1694
|
-
screenS: [1440,
|
|
1726
|
+
screenS: [1440, 720],
|
|
1695
1727
|
tabletL: [1366, 926],
|
|
1696
1728
|
tabletM: [1280, 768],
|
|
1697
1729
|
tabletS: [1024, 768],
|