@symbo.ls/scratch 2.11.200 → 2.11.212
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 +117 -62
- package/dist/cjs/index.js +117 -62
- package/dist/cjs/set.js +117 -62
- package/dist/cjs/system/color.js +117 -62
- package/dist/cjs/system/document.js +117 -62
- package/dist/cjs/system/font.js +117 -62
- package/dist/cjs/system/index.js +117 -62
- package/dist/cjs/system/reset.js +117 -62
- package/dist/cjs/system/spacing.js +117 -62
- package/dist/cjs/system/svg.js +117 -62
- package/dist/cjs/system/theme.js +117 -62
- package/dist/cjs/system/timing.js +117 -62
- package/dist/cjs/system/typography.js +117 -62
- package/dist/cjs/transforms/index.js +117 -62
- package/dist/cjs/utils/color.js +117 -62
- package/dist/cjs/utils/index.js +117 -62
- package/dist/cjs/utils/sequence.js +117 -62
- package/dist/cjs/utils/sprite.js +117 -62
- package/dist/cjs/utils/var.js +117 -62
- package/package.json +2 -2
package/dist/cjs/factory.js
CHANGED
|
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
//
|
|
33
|
+
// ../../../domql/packages/utils/dist/cjs/key.js
|
|
34
34
|
var require_key = __commonJS({
|
|
35
|
-
"
|
|
35
|
+
"../../../domql/packages/utils/dist/cjs/key.js"(exports, module2) {
|
|
36
36
|
"use strict";
|
|
37
37
|
var __defProp2 = Object.defineProperty;
|
|
38
38
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -69,9 +69,9 @@ var require_key = __commonJS({
|
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
71
|
|
|
72
|
-
//
|
|
72
|
+
// ../../../domql/packages/utils/dist/cjs/env.js
|
|
73
73
|
var require_env = __commonJS({
|
|
74
|
-
"
|
|
74
|
+
"../../../domql/packages/utils/dist/cjs/env.js"(exports, module2) {
|
|
75
75
|
"use strict";
|
|
76
76
|
var __defProp2 = Object.defineProperty;
|
|
77
77
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -107,9 +107,9 @@ var require_env = __commonJS({
|
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
109
|
|
|
110
|
-
//
|
|
110
|
+
// ../../../domql/packages/utils/dist/cjs/globals.js
|
|
111
111
|
var require_globals = __commonJS({
|
|
112
|
-
"
|
|
112
|
+
"../../../domql/packages/utils/dist/cjs/globals.js"(exports, module2) {
|
|
113
113
|
"use strict";
|
|
114
114
|
var __defProp2 = Object.defineProperty;
|
|
115
115
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -143,9 +143,9 @@ var require_globals = __commonJS({
|
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
|
|
146
|
-
//
|
|
146
|
+
// ../../../domql/packages/utils/dist/cjs/node.js
|
|
147
147
|
var require_node = __commonJS({
|
|
148
|
-
"
|
|
148
|
+
"../../../domql/packages/utils/dist/cjs/node.js"(exports, module2) {
|
|
149
149
|
"use strict";
|
|
150
150
|
var __defProp2 = Object.defineProperty;
|
|
151
151
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -180,9 +180,9 @@ var require_node = __commonJS({
|
|
|
180
180
|
}
|
|
181
181
|
});
|
|
182
182
|
|
|
183
|
-
//
|
|
183
|
+
// ../../../domql/packages/utils/dist/cjs/types.js
|
|
184
184
|
var require_types = __commonJS({
|
|
185
|
-
"
|
|
185
|
+
"../../../domql/packages/utils/dist/cjs/types.js"(exports, module2) {
|
|
186
186
|
"use strict";
|
|
187
187
|
var __defProp2 = Object.defineProperty;
|
|
188
188
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -267,9 +267,9 @@ var require_types = __commonJS({
|
|
|
267
267
|
}
|
|
268
268
|
});
|
|
269
269
|
|
|
270
|
-
//
|
|
270
|
+
// ../../../domql/packages/utils/dist/cjs/array.js
|
|
271
271
|
var require_array = __commonJS({
|
|
272
|
-
"
|
|
272
|
+
"../../../domql/packages/utils/dist/cjs/array.js"(exports, module2) {
|
|
273
273
|
"use strict";
|
|
274
274
|
var __defProp2 = Object.defineProperty;
|
|
275
275
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -366,9 +366,9 @@ var require_array = __commonJS({
|
|
|
366
366
|
}
|
|
367
367
|
});
|
|
368
368
|
|
|
369
|
-
//
|
|
369
|
+
// ../../../domql/packages/utils/dist/cjs/string.js
|
|
370
370
|
var require_string = __commonJS({
|
|
371
|
-
"
|
|
371
|
+
"../../../domql/packages/utils/dist/cjs/string.js"(exports, module2) {
|
|
372
372
|
"use strict";
|
|
373
373
|
var __defProp2 = Object.defineProperty;
|
|
374
374
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -426,9 +426,9 @@ var require_string = __commonJS({
|
|
|
426
426
|
}
|
|
427
427
|
});
|
|
428
428
|
|
|
429
|
-
//
|
|
429
|
+
// ../../../domql/packages/utils/dist/cjs/object.js
|
|
430
430
|
var require_object = __commonJS({
|
|
431
|
-
"
|
|
431
|
+
"../../../domql/packages/utils/dist/cjs/object.js"(exports, module2) {
|
|
432
432
|
"use strict";
|
|
433
433
|
var __defProp2 = Object.defineProperty;
|
|
434
434
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -452,6 +452,7 @@ var require_object = __commonJS({
|
|
|
452
452
|
clone: () => clone,
|
|
453
453
|
deepClone: () => deepClone2,
|
|
454
454
|
deepCloneExclude: () => deepCloneExclude,
|
|
455
|
+
deepContains: () => deepContains,
|
|
455
456
|
deepDestringify: () => deepDestringify,
|
|
456
457
|
deepMerge: () => deepMerge2,
|
|
457
458
|
deepStringify: () => deepStringify,
|
|
@@ -514,7 +515,7 @@ var require_object = __commonJS({
|
|
|
514
515
|
const elementProp = element[e];
|
|
515
516
|
const extendProp = extend[e];
|
|
516
517
|
if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
|
|
517
|
-
deepMerge2(elementProp, extendProp);
|
|
518
|
+
deepMerge2(elementProp, extendProp, excludeFrom);
|
|
518
519
|
} else if (elementProp === void 0) {
|
|
519
520
|
element[e] = extendProp;
|
|
520
521
|
}
|
|
@@ -604,8 +605,8 @@ var require_object = __commonJS({
|
|
|
604
605
|
const spaces = " ".repeat(indent);
|
|
605
606
|
let str = "{\n";
|
|
606
607
|
for (const [key, value] of Object.entries(obj)) {
|
|
607
|
-
const
|
|
608
|
-
const stringedKey =
|
|
608
|
+
const keyNotAllowdChars = (0, import_string.stringIncludesAny)(key, ["-", ":", "@", ".", "/", "!"]);
|
|
609
|
+
const stringedKey = keyNotAllowdChars ? `'${key}'` : key;
|
|
609
610
|
str += `${spaces} ${stringedKey}: `;
|
|
610
611
|
if ((0, import_types.isArray)(value)) {
|
|
611
612
|
str += "[\n";
|
|
@@ -660,7 +661,7 @@ var require_object = __commonJS({
|
|
|
660
661
|
}
|
|
661
662
|
return detached;
|
|
662
663
|
};
|
|
663
|
-
var deepDestringify = (obj,
|
|
664
|
+
var deepDestringify = (obj, destringified = {}) => {
|
|
664
665
|
for (const prop in obj) {
|
|
665
666
|
const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, prop);
|
|
666
667
|
if (!hasOwnProperty)
|
|
@@ -670,52 +671,50 @@ var require_object = __commonJS({
|
|
|
670
671
|
if (objProp.includes("=>") || objProp.includes("function") || objProp.startsWith("(")) {
|
|
671
672
|
try {
|
|
672
673
|
const evalProp = import_globals.window.eval(`(${objProp})`);
|
|
673
|
-
|
|
674
|
+
destringified[prop] = evalProp;
|
|
674
675
|
} catch (e) {
|
|
675
676
|
if (e)
|
|
676
|
-
|
|
677
|
+
destringified[prop] = objProp;
|
|
677
678
|
}
|
|
678
679
|
} else {
|
|
679
|
-
|
|
680
|
+
destringified[prop] = objProp;
|
|
680
681
|
}
|
|
681
682
|
} else if ((0, import_types.isArray)(objProp)) {
|
|
682
|
-
|
|
683
|
+
destringified[prop] = [];
|
|
683
684
|
objProp.forEach((arrProp) => {
|
|
684
685
|
if ((0, import_types.isString)(arrProp)) {
|
|
685
686
|
if (arrProp.includes("=>") || arrProp.includes("function") || arrProp.startsWith("(")) {
|
|
686
687
|
try {
|
|
687
688
|
const evalProp = import_globals.window.eval(`(${arrProp})`);
|
|
688
|
-
|
|
689
|
+
destringified[prop].push(evalProp);
|
|
689
690
|
} catch (e) {
|
|
690
691
|
if (e)
|
|
691
|
-
|
|
692
|
+
destringified[prop].push(arrProp);
|
|
692
693
|
}
|
|
693
694
|
} else {
|
|
694
|
-
|
|
695
|
+
destringified[prop].push(arrProp);
|
|
695
696
|
}
|
|
696
697
|
} else if ((0, import_types.isObject)(arrProp)) {
|
|
697
|
-
|
|
698
|
+
destringified[prop].push(deepDestringify(arrProp));
|
|
698
699
|
} else {
|
|
699
|
-
|
|
700
|
+
destringified[prop].push(arrProp);
|
|
700
701
|
}
|
|
701
702
|
});
|
|
702
703
|
} else if ((0, import_types.isObject)(objProp)) {
|
|
703
|
-
|
|
704
|
+
destringified[prop] = deepDestringify(objProp, destringified[prop]);
|
|
704
705
|
} else {
|
|
705
|
-
|
|
706
|
+
destringified[prop] = objProp;
|
|
706
707
|
}
|
|
707
708
|
}
|
|
708
|
-
return
|
|
709
|
+
return destringified;
|
|
709
710
|
};
|
|
710
|
-
var stringToObject = (str) => {
|
|
711
|
-
let obj;
|
|
711
|
+
var stringToObject = (str, verbose) => {
|
|
712
712
|
try {
|
|
713
|
-
|
|
713
|
+
return import_globals.window.eval("(" + str + ")");
|
|
714
714
|
} catch (e) {
|
|
715
|
-
|
|
715
|
+
if (verbose)
|
|
716
|
+
console.warn(e);
|
|
716
717
|
}
|
|
717
|
-
if (obj)
|
|
718
|
-
return obj;
|
|
719
718
|
};
|
|
720
719
|
var diffObjects = (original, objToDiff, cache) => {
|
|
721
720
|
for (const e in objToDiff) {
|
|
@@ -811,23 +810,56 @@ var require_object = __commonJS({
|
|
|
811
810
|
delete objectized[prop];
|
|
812
811
|
return stack;
|
|
813
812
|
};
|
|
814
|
-
var isEqualDeep = (param, element) => {
|
|
815
|
-
if (param === element)
|
|
813
|
+
var isEqualDeep = (param, element, visited = /* @__PURE__ */ new Set()) => {
|
|
814
|
+
if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
|
|
815
|
+
return param === element;
|
|
816
|
+
}
|
|
817
|
+
if (visited.has(param) || visited.has(element)) {
|
|
816
818
|
return true;
|
|
817
|
-
|
|
819
|
+
}
|
|
820
|
+
visited.add(param);
|
|
821
|
+
visited.add(element);
|
|
822
|
+
const keysParam = Object.keys(param);
|
|
823
|
+
const keysElement = Object.keys(element);
|
|
824
|
+
if (keysParam.length !== keysElement.length) {
|
|
818
825
|
return false;
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
826
|
+
}
|
|
827
|
+
for (const key of keysParam) {
|
|
828
|
+
if (!keysElement.includes(key)) {
|
|
829
|
+
return false;
|
|
830
|
+
}
|
|
831
|
+
const paramProp = param[key];
|
|
832
|
+
const elementProp = element[key];
|
|
833
|
+
if (!isEqualDeep(paramProp, elementProp, visited)) {
|
|
834
|
+
return false;
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
return true;
|
|
838
|
+
};
|
|
839
|
+
var deepContains = (obj1, obj2) => {
|
|
840
|
+
if (typeof obj1 !== typeof obj2) {
|
|
841
|
+
return false;
|
|
842
|
+
}
|
|
843
|
+
if ((0, import_types.isObjectLike)(obj1)) {
|
|
844
|
+
if (Array.isArray(obj1) && Array.isArray(obj2)) {
|
|
845
|
+
if (obj1.length !== obj2.length) {
|
|
829
846
|
return false;
|
|
847
|
+
}
|
|
848
|
+
for (let i = 0; i < obj1.length; i++) {
|
|
849
|
+
if (!deepContains(obj1[i], obj2[i])) {
|
|
850
|
+
return false;
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
} else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
|
|
854
|
+
for (const key in obj1) {
|
|
855
|
+
const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj2, key);
|
|
856
|
+
if (!hasOwnProperty || !deepContains(obj1[key], obj2[key])) {
|
|
857
|
+
return false;
|
|
858
|
+
}
|
|
859
|
+
}
|
|
830
860
|
}
|
|
861
|
+
} else {
|
|
862
|
+
return obj2 === obj1;
|
|
831
863
|
}
|
|
832
864
|
return true;
|
|
833
865
|
};
|
|
@@ -846,9 +878,9 @@ var require_object = __commonJS({
|
|
|
846
878
|
}
|
|
847
879
|
});
|
|
848
880
|
|
|
849
|
-
//
|
|
881
|
+
// ../../../domql/packages/utils/dist/cjs/function.js
|
|
850
882
|
var require_function = __commonJS({
|
|
851
|
-
"
|
|
883
|
+
"../../../domql/packages/utils/dist/cjs/function.js"(exports, module2) {
|
|
852
884
|
"use strict";
|
|
853
885
|
var __defProp2 = Object.defineProperty;
|
|
854
886
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -870,10 +902,29 @@ var require_function = __commonJS({
|
|
|
870
902
|
var function_exports = {};
|
|
871
903
|
__export2(function_exports, {
|
|
872
904
|
debounce: () => debounce,
|
|
905
|
+
debounceOnContext: () => debounceOnContext,
|
|
906
|
+
isStringFunction: () => isStringFunction,
|
|
873
907
|
memoize: () => memoize
|
|
874
908
|
});
|
|
875
909
|
module2.exports = __toCommonJS2(function_exports);
|
|
876
|
-
|
|
910
|
+
function debounce(func, wait, immediate) {
|
|
911
|
+
let timeout;
|
|
912
|
+
return function() {
|
|
913
|
+
const context = this;
|
|
914
|
+
const args = arguments;
|
|
915
|
+
const later = function() {
|
|
916
|
+
timeout = null;
|
|
917
|
+
if (!immediate)
|
|
918
|
+
func.apply(context, args);
|
|
919
|
+
};
|
|
920
|
+
const callNow = immediate && !timeout;
|
|
921
|
+
clearTimeout(timeout);
|
|
922
|
+
timeout = setTimeout(later, wait);
|
|
923
|
+
if (callNow)
|
|
924
|
+
func.apply(context, args);
|
|
925
|
+
};
|
|
926
|
+
}
|
|
927
|
+
var debounceOnContext = (element, func, timeout = 300) => {
|
|
877
928
|
let timer;
|
|
878
929
|
return (...args) => {
|
|
879
930
|
clearTimeout(timer);
|
|
@@ -895,12 +946,16 @@ var require_function = __commonJS({
|
|
|
895
946
|
}
|
|
896
947
|
};
|
|
897
948
|
};
|
|
949
|
+
var isStringFunction = (inputString) => {
|
|
950
|
+
const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
951
|
+
return functionRegex.test(inputString);
|
|
952
|
+
};
|
|
898
953
|
}
|
|
899
954
|
});
|
|
900
955
|
|
|
901
|
-
//
|
|
956
|
+
// ../../../domql/packages/utils/dist/cjs/log.js
|
|
902
957
|
var require_log = __commonJS({
|
|
903
|
-
"
|
|
958
|
+
"../../../domql/packages/utils/dist/cjs/log.js"(exports, module2) {
|
|
904
959
|
"use strict";
|
|
905
960
|
var __defProp2 = Object.defineProperty;
|
|
906
961
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -939,9 +994,9 @@ var require_log = __commonJS({
|
|
|
939
994
|
}
|
|
940
995
|
});
|
|
941
996
|
|
|
942
|
-
//
|
|
997
|
+
// ../../../domql/packages/utils/dist/cjs/cookie.js
|
|
943
998
|
var require_cookie = __commonJS({
|
|
944
|
-
"
|
|
999
|
+
"../../../domql/packages/utils/dist/cjs/cookie.js"(exports, module2) {
|
|
945
1000
|
"use strict";
|
|
946
1001
|
var __defProp2 = Object.defineProperty;
|
|
947
1002
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -995,9 +1050,9 @@ var require_cookie = __commonJS({
|
|
|
995
1050
|
}
|
|
996
1051
|
});
|
|
997
1052
|
|
|
998
|
-
//
|
|
1053
|
+
// ../../../domql/packages/utils/dist/cjs/tags.js
|
|
999
1054
|
var require_tags = __commonJS({
|
|
1000
|
-
"
|
|
1055
|
+
"../../../domql/packages/utils/dist/cjs/tags.js"(exports, module2) {
|
|
1001
1056
|
"use strict";
|
|
1002
1057
|
var __defProp2 = Object.defineProperty;
|
|
1003
1058
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -1160,9 +1215,9 @@ var require_tags = __commonJS({
|
|
|
1160
1215
|
}
|
|
1161
1216
|
});
|
|
1162
1217
|
|
|
1163
|
-
//
|
|
1218
|
+
// ../../../domql/packages/utils/dist/cjs/index.js
|
|
1164
1219
|
var require_cjs = __commonJS({
|
|
1165
|
-
"
|
|
1220
|
+
"../../../domql/packages/utils/dist/cjs/index.js"(exports, module2) {
|
|
1166
1221
|
"use strict";
|
|
1167
1222
|
var __defProp2 = Object.defineProperty;
|
|
1168
1223
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|