@symbo.ls/scratch 3.0.1 → 3.0.2
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 +105 -43
- package/dist/cjs/index.js +192 -59
- package/dist/cjs/set.js +191 -58
- package/dist/cjs/system/color.js +183 -52
- package/dist/cjs/system/document.js +185 -52
- package/dist/cjs/system/font.js +183 -52
- package/dist/cjs/system/index.js +192 -59
- package/dist/cjs/system/reset.js +185 -52
- package/dist/cjs/system/shadow.js +184 -53
- package/dist/cjs/system/spacing.js +189 -56
- package/dist/cjs/system/svg.js +182 -51
- package/dist/cjs/system/theme.js +182 -51
- package/dist/cjs/system/timing.js +185 -54
- package/dist/cjs/system/typography.js +187 -54
- package/dist/cjs/transforms/index.js +191 -58
- package/dist/cjs/utils/color.js +74 -3
- package/dist/cjs/utils/index.js +182 -51
- package/dist/cjs/utils/sequence.js +184 -53
- package/dist/cjs/utils/sprite.js +105 -43
- package/dist/cjs/utils/var.js +181 -50
- package/package.json +4 -4
package/dist/cjs/utils/index.js
CHANGED
|
@@ -34,23 +34,23 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
34
34
|
var require_cjs = __commonJS({
|
|
35
35
|
"../utils/dist/cjs/index.js"(exports, module2) {
|
|
36
36
|
"use strict";
|
|
37
|
-
var
|
|
37
|
+
var __defProp2 = Object.defineProperty;
|
|
38
38
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
39
39
|
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
40
|
-
var
|
|
40
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
41
41
|
var __export2 = (target, all) => {
|
|
42
42
|
for (var name in all)
|
|
43
|
-
|
|
43
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
44
44
|
};
|
|
45
45
|
var __copyProps2 = (to, from, except, desc) => {
|
|
46
46
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
47
47
|
for (let key of __getOwnPropNames2(from))
|
|
48
|
-
if (!
|
|
49
|
-
|
|
48
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
49
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
50
50
|
}
|
|
51
51
|
return to;
|
|
52
52
|
};
|
|
53
|
-
var __toCommonJS2 = (mod) => __copyProps2(
|
|
53
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
54
54
|
var index_exports = {};
|
|
55
55
|
__export2(index_exports, {
|
|
56
56
|
arrayzeValue: () => arrayzeValue,
|
|
@@ -83,6 +83,75 @@ var require_cjs = __commonJS({
|
|
|
83
83
|
var isString2 = (arg) => typeof arg === "string";
|
|
84
84
|
var isNumber2 = (arg) => typeof arg === "number";
|
|
85
85
|
var isArray2 = (arg) => Array.isArray(arg);
|
|
86
|
+
var STATE_METHODS2 = [
|
|
87
|
+
"update",
|
|
88
|
+
"parse",
|
|
89
|
+
"clean",
|
|
90
|
+
"create",
|
|
91
|
+
"destroy",
|
|
92
|
+
"add",
|
|
93
|
+
"toggle",
|
|
94
|
+
"remove",
|
|
95
|
+
"apply",
|
|
96
|
+
"set",
|
|
97
|
+
"reset",
|
|
98
|
+
"replace",
|
|
99
|
+
"quietReplace",
|
|
100
|
+
"quietUpdate",
|
|
101
|
+
"applyReplace",
|
|
102
|
+
"applyFunction",
|
|
103
|
+
"keys",
|
|
104
|
+
"values",
|
|
105
|
+
"ref",
|
|
106
|
+
"rootUpdate",
|
|
107
|
+
"parentUpdate",
|
|
108
|
+
"parent",
|
|
109
|
+
"__element",
|
|
110
|
+
"__depends",
|
|
111
|
+
"__ref",
|
|
112
|
+
"__children",
|
|
113
|
+
"root",
|
|
114
|
+
"setByPath",
|
|
115
|
+
"setPathCollection",
|
|
116
|
+
"removeByPath",
|
|
117
|
+
"removePathCollection",
|
|
118
|
+
"getByPath"
|
|
119
|
+
];
|
|
120
|
+
var PROPS_METHODS2 = ["update", "__element"];
|
|
121
|
+
var METHODS2 = [
|
|
122
|
+
"set",
|
|
123
|
+
"reset",
|
|
124
|
+
"update",
|
|
125
|
+
"remove",
|
|
126
|
+
"updateContent",
|
|
127
|
+
"removeContent",
|
|
128
|
+
"lookup",
|
|
129
|
+
"lookdown",
|
|
130
|
+
"lookdownAll",
|
|
131
|
+
"getRef",
|
|
132
|
+
"getPath",
|
|
133
|
+
"setNodeStyles",
|
|
134
|
+
"spotByPath",
|
|
135
|
+
"keys",
|
|
136
|
+
"parse",
|
|
137
|
+
"setProps",
|
|
138
|
+
"parseDeep",
|
|
139
|
+
"variables",
|
|
140
|
+
"if",
|
|
141
|
+
"log",
|
|
142
|
+
"verbose",
|
|
143
|
+
"warn",
|
|
144
|
+
"error",
|
|
145
|
+
"call",
|
|
146
|
+
"nextElement",
|
|
147
|
+
"previousElement"
|
|
148
|
+
];
|
|
149
|
+
var METHODS_EXL2 = [
|
|
150
|
+
...["node", "context", "extends", "__element", "__ref"],
|
|
151
|
+
...METHODS2,
|
|
152
|
+
...STATE_METHODS2,
|
|
153
|
+
...PROPS_METHODS2
|
|
154
|
+
];
|
|
86
155
|
var isMobile2 = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
87
156
|
async function toggleFullscreen(opts) {
|
|
88
157
|
if (!document.fullscreenElement) {
|
|
@@ -309,16 +378,16 @@ var isScalingUnit = (unit) => {
|
|
|
309
378
|
return unit === "em" || unit === "rem" || unit === "vw" || unit === "vh" || unit === "vmax" || unit === "vmin";
|
|
310
379
|
};
|
|
311
380
|
|
|
312
|
-
// node_modules/@domql/utils/
|
|
381
|
+
// ../../node_modules/@domql/utils/globals.js
|
|
313
382
|
var window2 = globalThis;
|
|
314
383
|
var document2 = window2.document;
|
|
315
384
|
|
|
316
|
-
// node_modules/@domql/utils/
|
|
385
|
+
// ../../node_modules/@domql/utils/node.js
|
|
317
386
|
var isDOMNode = (obj) => {
|
|
318
387
|
return typeof window2 !== "undefined" && (obj instanceof window2.Node || obj instanceof window2.Window || obj === window2 || obj === document);
|
|
319
388
|
};
|
|
320
389
|
|
|
321
|
-
// node_modules/@domql/utils/
|
|
390
|
+
// ../../node_modules/@domql/utils/types.js
|
|
322
391
|
var isString = (arg) => typeof arg === "string";
|
|
323
392
|
var isNumber = (arg) => typeof arg === "number";
|
|
324
393
|
var isFunction = (arg) => typeof arg === "function";
|
|
@@ -332,35 +401,92 @@ var isUndefined = (arg) => {
|
|
|
332
401
|
return arg === void 0;
|
|
333
402
|
};
|
|
334
403
|
|
|
335
|
-
// node_modules/@domql/utils/
|
|
336
|
-
var
|
|
337
|
-
return arr.reduce(
|
|
404
|
+
// ../../node_modules/@domql/utils/array.js
|
|
405
|
+
var unstackArrayOfObjects = (arr, exclude = []) => {
|
|
406
|
+
return arr.reduce(
|
|
407
|
+
(a, c) => deepMerge(a, deepClone(c, { exclude }), exclude),
|
|
408
|
+
{}
|
|
409
|
+
);
|
|
338
410
|
};
|
|
339
411
|
|
|
340
|
-
// node_modules/@domql/utils/
|
|
341
|
-
var
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
412
|
+
// ../../node_modules/@domql/utils/keys.js
|
|
413
|
+
var STATE_METHODS = [
|
|
414
|
+
"update",
|
|
415
|
+
"parse",
|
|
416
|
+
"clean",
|
|
417
|
+
"create",
|
|
418
|
+
"destroy",
|
|
419
|
+
"add",
|
|
420
|
+
"toggle",
|
|
421
|
+
"remove",
|
|
422
|
+
"apply",
|
|
423
|
+
"set",
|
|
424
|
+
"reset",
|
|
425
|
+
"replace",
|
|
426
|
+
"quietReplace",
|
|
427
|
+
"quietUpdate",
|
|
428
|
+
"applyReplace",
|
|
429
|
+
"applyFunction",
|
|
430
|
+
"keys",
|
|
431
|
+
"values",
|
|
432
|
+
"ref",
|
|
433
|
+
"rootUpdate",
|
|
434
|
+
"parentUpdate",
|
|
435
|
+
"parent",
|
|
436
|
+
"__element",
|
|
437
|
+
"__depends",
|
|
438
|
+
"__ref",
|
|
439
|
+
"__children",
|
|
440
|
+
"root",
|
|
441
|
+
"setByPath",
|
|
442
|
+
"setPathCollection",
|
|
443
|
+
"removeByPath",
|
|
444
|
+
"removePathCollection",
|
|
445
|
+
"getByPath"
|
|
446
|
+
];
|
|
447
|
+
var PROPS_METHODS = ["update", "__element"];
|
|
448
|
+
var METHODS = [
|
|
449
|
+
"set",
|
|
450
|
+
"reset",
|
|
451
|
+
"update",
|
|
452
|
+
"remove",
|
|
453
|
+
"updateContent",
|
|
454
|
+
"removeContent",
|
|
455
|
+
"lookup",
|
|
456
|
+
"lookdown",
|
|
457
|
+
"lookdownAll",
|
|
458
|
+
"getRef",
|
|
459
|
+
"getPath",
|
|
460
|
+
"setNodeStyles",
|
|
461
|
+
"spotByPath",
|
|
462
|
+
"keys",
|
|
463
|
+
"parse",
|
|
464
|
+
"setProps",
|
|
465
|
+
"parseDeep",
|
|
466
|
+
"variables",
|
|
467
|
+
"if",
|
|
468
|
+
"log",
|
|
469
|
+
"verbose",
|
|
470
|
+
"warn",
|
|
471
|
+
"error",
|
|
472
|
+
"call",
|
|
473
|
+
"nextElement",
|
|
474
|
+
"previousElement"
|
|
475
|
+
];
|
|
476
|
+
var METHODS_EXL = [
|
|
477
|
+
...["node", "context", "extends", "__element", "__ref"],
|
|
478
|
+
...METHODS,
|
|
479
|
+
...STATE_METHODS,
|
|
480
|
+
...PROPS_METHODS
|
|
481
|
+
];
|
|
482
|
+
|
|
483
|
+
// ../../node_modules/@domql/utils/object.js
|
|
484
|
+
var deepMerge = (element, extend, excludeFrom = METHODS_EXL) => {
|
|
361
485
|
for (const e in extend) {
|
|
362
|
-
const
|
|
363
|
-
if (!
|
|
486
|
+
const hasOwnProperty = Object.prototype.hasOwnProperty.call(extend, e);
|
|
487
|
+
if (!hasOwnProperty || excludeFrom.includes(e) || e.startsWith("__")) {
|
|
488
|
+
continue;
|
|
489
|
+
}
|
|
364
490
|
const elementProp = element[e];
|
|
365
491
|
const extendProp = extend[e];
|
|
366
492
|
if (isObjectLike(elementProp) && isObjectLike(extendProp)) {
|
|
@@ -378,7 +504,7 @@ var deepClone = (obj, options = {}) => {
|
|
|
378
504
|
cleanNull = false,
|
|
379
505
|
window: targetWindow,
|
|
380
506
|
visited = /* @__PURE__ */ new WeakMap(),
|
|
381
|
-
|
|
507
|
+
handleExtends = false
|
|
382
508
|
} = options;
|
|
383
509
|
if (!isObjectLike(obj) || isDOMNode(obj)) {
|
|
384
510
|
return obj;
|
|
@@ -386,37 +512,42 @@ var deepClone = (obj, options = {}) => {
|
|
|
386
512
|
if (visited.has(obj)) {
|
|
387
513
|
return visited.get(obj);
|
|
388
514
|
}
|
|
389
|
-
const
|
|
390
|
-
visited.set(obj,
|
|
515
|
+
const clone = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
|
|
516
|
+
visited.set(obj, clone);
|
|
391
517
|
for (const key in obj) {
|
|
392
518
|
if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
|
|
393
|
-
if (exclude.includes(key) || key.startsWith("__") || key === "__proto__")
|
|
519
|
+
if (exclude.includes(key) || key.startsWith("__") || key === "__proto__") {
|
|
520
|
+
continue;
|
|
521
|
+
}
|
|
394
522
|
const value = obj[key];
|
|
395
|
-
if (cleanUndefined && isUndefined(value) || cleanNull && isNull(value))
|
|
523
|
+
if (cleanUndefined && isUndefined(value) || cleanNull && isNull(value)) {
|
|
524
|
+
continue;
|
|
525
|
+
}
|
|
396
526
|
if (isDOMNode(value)) {
|
|
397
|
-
|
|
527
|
+
clone[key] = value;
|
|
398
528
|
continue;
|
|
399
529
|
}
|
|
400
|
-
if (
|
|
401
|
-
|
|
530
|
+
if (handleExtends && key === "extends" && isArray(value)) {
|
|
531
|
+
clone[key] = unstackArrayOfObjects(value, exclude);
|
|
402
532
|
continue;
|
|
403
533
|
}
|
|
404
534
|
if (isFunction(value) && targetWindow) {
|
|
405
|
-
|
|
535
|
+
clone[key] = targetWindow.eval("(" + value.toString() + ")");
|
|
406
536
|
continue;
|
|
407
537
|
}
|
|
408
538
|
if (isObjectLike(value)) {
|
|
409
|
-
|
|
539
|
+
clone[key] = deepClone(value, {
|
|
540
|
+
...options,
|
|
410
541
|
visited
|
|
411
|
-
})
|
|
542
|
+
});
|
|
412
543
|
} else {
|
|
413
|
-
|
|
544
|
+
clone[key] = value;
|
|
414
545
|
}
|
|
415
546
|
}
|
|
416
|
-
return
|
|
547
|
+
return clone;
|
|
417
548
|
};
|
|
418
549
|
|
|
419
|
-
// node_modules/@domql/utils/
|
|
550
|
+
// ../../node_modules/@domql/utils/cookie.js
|
|
420
551
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
421
552
|
|
|
422
553
|
// src/utils/color.js
|
|
@@ -605,7 +736,7 @@ var getFontFaceString = (LIBRARY) => {
|
|
|
605
736
|
};
|
|
606
737
|
|
|
607
738
|
// src/utils/sequence.js
|
|
608
|
-
var
|
|
739
|
+
var import_utils6 = __toESM(require_cjs(), 1);
|
|
609
740
|
|
|
610
741
|
// src/defaultConfig/index.js
|
|
611
742
|
var defaultConfig_exports = {};
|
|
@@ -1001,7 +1132,7 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
1001
1132
|
useVariable
|
|
1002
1133
|
} = sequenceProps;
|
|
1003
1134
|
if (isString(value) && value.slice(0, 2) === "--") return `var(${value})`;
|
|
1004
|
-
const prefix = `--${(0,
|
|
1135
|
+
const prefix = `--${(0, import_utils6.toDashCase)(sequenceProps.type.replace(".", "-"))}-`;
|
|
1005
1136
|
const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
|
|
1006
1137
|
const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
|
|
1007
1138
|
if (value === "none" || value === "auto" || value === "unset" || value === "inherit" || value === "fit-content" || value === "min-content" || value === "max-content" || value.includes("calc") || value.includes("var") || !startsWithDashOrLetter) return value;
|
|
@@ -34,23 +34,23 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
34
34
|
var require_cjs = __commonJS({
|
|
35
35
|
"../utils/dist/cjs/index.js"(exports, module2) {
|
|
36
36
|
"use strict";
|
|
37
|
-
var
|
|
37
|
+
var __defProp2 = Object.defineProperty;
|
|
38
38
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
39
39
|
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
40
|
-
var
|
|
40
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
41
41
|
var __export2 = (target, all) => {
|
|
42
42
|
for (var name in all)
|
|
43
|
-
|
|
43
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
44
44
|
};
|
|
45
45
|
var __copyProps2 = (to, from, except, desc) => {
|
|
46
46
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
47
47
|
for (let key of __getOwnPropNames2(from))
|
|
48
|
-
if (!
|
|
49
|
-
|
|
48
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
49
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
50
50
|
}
|
|
51
51
|
return to;
|
|
52
52
|
};
|
|
53
|
-
var __toCommonJS2 = (mod) => __copyProps2(
|
|
53
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
54
54
|
var index_exports = {};
|
|
55
55
|
__export2(index_exports, {
|
|
56
56
|
arrayzeValue: () => arrayzeValue,
|
|
@@ -83,6 +83,75 @@ var require_cjs = __commonJS({
|
|
|
83
83
|
var isString2 = (arg) => typeof arg === "string";
|
|
84
84
|
var isNumber2 = (arg) => typeof arg === "number";
|
|
85
85
|
var isArray2 = (arg) => Array.isArray(arg);
|
|
86
|
+
var STATE_METHODS2 = [
|
|
87
|
+
"update",
|
|
88
|
+
"parse",
|
|
89
|
+
"clean",
|
|
90
|
+
"create",
|
|
91
|
+
"destroy",
|
|
92
|
+
"add",
|
|
93
|
+
"toggle",
|
|
94
|
+
"remove",
|
|
95
|
+
"apply",
|
|
96
|
+
"set",
|
|
97
|
+
"reset",
|
|
98
|
+
"replace",
|
|
99
|
+
"quietReplace",
|
|
100
|
+
"quietUpdate",
|
|
101
|
+
"applyReplace",
|
|
102
|
+
"applyFunction",
|
|
103
|
+
"keys",
|
|
104
|
+
"values",
|
|
105
|
+
"ref",
|
|
106
|
+
"rootUpdate",
|
|
107
|
+
"parentUpdate",
|
|
108
|
+
"parent",
|
|
109
|
+
"__element",
|
|
110
|
+
"__depends",
|
|
111
|
+
"__ref",
|
|
112
|
+
"__children",
|
|
113
|
+
"root",
|
|
114
|
+
"setByPath",
|
|
115
|
+
"setPathCollection",
|
|
116
|
+
"removeByPath",
|
|
117
|
+
"removePathCollection",
|
|
118
|
+
"getByPath"
|
|
119
|
+
];
|
|
120
|
+
var PROPS_METHODS2 = ["update", "__element"];
|
|
121
|
+
var METHODS2 = [
|
|
122
|
+
"set",
|
|
123
|
+
"reset",
|
|
124
|
+
"update",
|
|
125
|
+
"remove",
|
|
126
|
+
"updateContent",
|
|
127
|
+
"removeContent",
|
|
128
|
+
"lookup",
|
|
129
|
+
"lookdown",
|
|
130
|
+
"lookdownAll",
|
|
131
|
+
"getRef",
|
|
132
|
+
"getPath",
|
|
133
|
+
"setNodeStyles",
|
|
134
|
+
"spotByPath",
|
|
135
|
+
"keys",
|
|
136
|
+
"parse",
|
|
137
|
+
"setProps",
|
|
138
|
+
"parseDeep",
|
|
139
|
+
"variables",
|
|
140
|
+
"if",
|
|
141
|
+
"log",
|
|
142
|
+
"verbose",
|
|
143
|
+
"warn",
|
|
144
|
+
"error",
|
|
145
|
+
"call",
|
|
146
|
+
"nextElement",
|
|
147
|
+
"previousElement"
|
|
148
|
+
];
|
|
149
|
+
var METHODS_EXL2 = [
|
|
150
|
+
...["node", "context", "extends", "__element", "__ref"],
|
|
151
|
+
...METHODS2,
|
|
152
|
+
...STATE_METHODS2,
|
|
153
|
+
...PROPS_METHODS2
|
|
154
|
+
];
|
|
86
155
|
var isMobile2 = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
87
156
|
async function toggleFullscreen(opts) {
|
|
88
157
|
if (!document.fullscreenElement) {
|
|
@@ -272,16 +341,16 @@ __export(sequence_exports, {
|
|
|
272
341
|
});
|
|
273
342
|
module.exports = __toCommonJS(sequence_exports);
|
|
274
343
|
|
|
275
|
-
// node_modules/@domql/utils/
|
|
344
|
+
// ../../node_modules/@domql/utils/globals.js
|
|
276
345
|
var window2 = globalThis;
|
|
277
346
|
var document2 = window2.document;
|
|
278
347
|
|
|
279
|
-
// node_modules/@domql/utils/
|
|
348
|
+
// ../../node_modules/@domql/utils/node.js
|
|
280
349
|
var isDOMNode = (obj) => {
|
|
281
350
|
return typeof window2 !== "undefined" && (obj instanceof window2.Node || obj instanceof window2.Window || obj === window2 || obj === document);
|
|
282
351
|
};
|
|
283
352
|
|
|
284
|
-
// node_modules/@domql/utils/
|
|
353
|
+
// ../../node_modules/@domql/utils/types.js
|
|
285
354
|
var isString = (arg) => typeof arg === "string";
|
|
286
355
|
var isFunction = (arg) => typeof arg === "function";
|
|
287
356
|
var isNull = (arg) => arg === null;
|
|
@@ -294,35 +363,92 @@ var isUndefined = (arg) => {
|
|
|
294
363
|
return arg === void 0;
|
|
295
364
|
};
|
|
296
365
|
|
|
297
|
-
// node_modules/@domql/utils/
|
|
298
|
-
var
|
|
299
|
-
return arr.reduce(
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
var
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
366
|
+
// ../../node_modules/@domql/utils/array.js
|
|
367
|
+
var unstackArrayOfObjects = (arr, exclude = []) => {
|
|
368
|
+
return arr.reduce(
|
|
369
|
+
(a, c) => deepMerge(a, deepClone(c, { exclude }), exclude),
|
|
370
|
+
{}
|
|
371
|
+
);
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
// ../../node_modules/@domql/utils/keys.js
|
|
375
|
+
var STATE_METHODS = [
|
|
376
|
+
"update",
|
|
377
|
+
"parse",
|
|
378
|
+
"clean",
|
|
379
|
+
"create",
|
|
380
|
+
"destroy",
|
|
381
|
+
"add",
|
|
382
|
+
"toggle",
|
|
383
|
+
"remove",
|
|
384
|
+
"apply",
|
|
385
|
+
"set",
|
|
386
|
+
"reset",
|
|
387
|
+
"replace",
|
|
388
|
+
"quietReplace",
|
|
389
|
+
"quietUpdate",
|
|
390
|
+
"applyReplace",
|
|
391
|
+
"applyFunction",
|
|
392
|
+
"keys",
|
|
393
|
+
"values",
|
|
394
|
+
"ref",
|
|
395
|
+
"rootUpdate",
|
|
396
|
+
"parentUpdate",
|
|
397
|
+
"parent",
|
|
398
|
+
"__element",
|
|
399
|
+
"__depends",
|
|
400
|
+
"__ref",
|
|
401
|
+
"__children",
|
|
402
|
+
"root",
|
|
403
|
+
"setByPath",
|
|
404
|
+
"setPathCollection",
|
|
405
|
+
"removeByPath",
|
|
406
|
+
"removePathCollection",
|
|
407
|
+
"getByPath"
|
|
408
|
+
];
|
|
409
|
+
var PROPS_METHODS = ["update", "__element"];
|
|
410
|
+
var METHODS = [
|
|
411
|
+
"set",
|
|
412
|
+
"reset",
|
|
413
|
+
"update",
|
|
414
|
+
"remove",
|
|
415
|
+
"updateContent",
|
|
416
|
+
"removeContent",
|
|
417
|
+
"lookup",
|
|
418
|
+
"lookdown",
|
|
419
|
+
"lookdownAll",
|
|
420
|
+
"getRef",
|
|
421
|
+
"getPath",
|
|
422
|
+
"setNodeStyles",
|
|
423
|
+
"spotByPath",
|
|
424
|
+
"keys",
|
|
425
|
+
"parse",
|
|
426
|
+
"setProps",
|
|
427
|
+
"parseDeep",
|
|
428
|
+
"variables",
|
|
429
|
+
"if",
|
|
430
|
+
"log",
|
|
431
|
+
"verbose",
|
|
432
|
+
"warn",
|
|
433
|
+
"error",
|
|
434
|
+
"call",
|
|
435
|
+
"nextElement",
|
|
436
|
+
"previousElement"
|
|
437
|
+
];
|
|
438
|
+
var METHODS_EXL = [
|
|
439
|
+
...["node", "context", "extends", "__element", "__ref"],
|
|
440
|
+
...METHODS,
|
|
441
|
+
...STATE_METHODS,
|
|
442
|
+
...PROPS_METHODS
|
|
443
|
+
];
|
|
444
|
+
|
|
445
|
+
// ../../node_modules/@domql/utils/object.js
|
|
446
|
+
var deepMerge = (element, extend, excludeFrom = METHODS_EXL) => {
|
|
323
447
|
for (const e in extend) {
|
|
324
|
-
const
|
|
325
|
-
if (!
|
|
448
|
+
const hasOwnProperty = Object.prototype.hasOwnProperty.call(extend, e);
|
|
449
|
+
if (!hasOwnProperty || excludeFrom.includes(e) || e.startsWith("__")) {
|
|
450
|
+
continue;
|
|
451
|
+
}
|
|
326
452
|
const elementProp = element[e];
|
|
327
453
|
const extendProp = extend[e];
|
|
328
454
|
if (isObjectLike(elementProp) && isObjectLike(extendProp)) {
|
|
@@ -340,7 +466,7 @@ var deepClone = (obj, options = {}) => {
|
|
|
340
466
|
cleanNull = false,
|
|
341
467
|
window: targetWindow,
|
|
342
468
|
visited = /* @__PURE__ */ new WeakMap(),
|
|
343
|
-
|
|
469
|
+
handleExtends = false
|
|
344
470
|
} = options;
|
|
345
471
|
if (!isObjectLike(obj) || isDOMNode(obj)) {
|
|
346
472
|
return obj;
|
|
@@ -348,41 +474,46 @@ var deepClone = (obj, options = {}) => {
|
|
|
348
474
|
if (visited.has(obj)) {
|
|
349
475
|
return visited.get(obj);
|
|
350
476
|
}
|
|
351
|
-
const
|
|
352
|
-
visited.set(obj,
|
|
477
|
+
const clone = targetWindow ? isArray(obj) ? new targetWindow.Array() : new targetWindow.Object() : isArray(obj) ? [] : {};
|
|
478
|
+
visited.set(obj, clone);
|
|
353
479
|
for (const key in obj) {
|
|
354
480
|
if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
|
|
355
|
-
if (exclude.includes(key) || key.startsWith("__") || key === "__proto__")
|
|
481
|
+
if (exclude.includes(key) || key.startsWith("__") || key === "__proto__") {
|
|
482
|
+
continue;
|
|
483
|
+
}
|
|
356
484
|
const value = obj[key];
|
|
357
|
-
if (cleanUndefined && isUndefined(value) || cleanNull && isNull(value))
|
|
485
|
+
if (cleanUndefined && isUndefined(value) || cleanNull && isNull(value)) {
|
|
486
|
+
continue;
|
|
487
|
+
}
|
|
358
488
|
if (isDOMNode(value)) {
|
|
359
|
-
|
|
489
|
+
clone[key] = value;
|
|
360
490
|
continue;
|
|
361
491
|
}
|
|
362
|
-
if (
|
|
363
|
-
|
|
492
|
+
if (handleExtends && key === "extends" && isArray(value)) {
|
|
493
|
+
clone[key] = unstackArrayOfObjects(value, exclude);
|
|
364
494
|
continue;
|
|
365
495
|
}
|
|
366
496
|
if (isFunction(value) && targetWindow) {
|
|
367
|
-
|
|
497
|
+
clone[key] = targetWindow.eval("(" + value.toString() + ")");
|
|
368
498
|
continue;
|
|
369
499
|
}
|
|
370
500
|
if (isObjectLike(value)) {
|
|
371
|
-
|
|
501
|
+
clone[key] = deepClone(value, {
|
|
502
|
+
...options,
|
|
372
503
|
visited
|
|
373
|
-
})
|
|
504
|
+
});
|
|
374
505
|
} else {
|
|
375
|
-
|
|
506
|
+
clone[key] = value;
|
|
376
507
|
}
|
|
377
508
|
}
|
|
378
|
-
return
|
|
509
|
+
return clone;
|
|
379
510
|
};
|
|
380
511
|
|
|
381
|
-
// node_modules/@domql/utils/
|
|
512
|
+
// ../../node_modules/@domql/utils/cookie.js
|
|
382
513
|
var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
|
|
383
514
|
|
|
384
515
|
// src/utils/sequence.js
|
|
385
|
-
var
|
|
516
|
+
var import_utils5 = __toESM(require_cjs(), 1);
|
|
386
517
|
|
|
387
518
|
// src/defaultConfig/index.js
|
|
388
519
|
var defaultConfig_exports = {};
|
|
@@ -783,7 +914,7 @@ var getSequenceValue = (value = "A", sequenceProps) => {
|
|
|
783
914
|
useVariable
|
|
784
915
|
} = sequenceProps;
|
|
785
916
|
if (isString(value) && value.slice(0, 2) === "--") return `var(${value})`;
|
|
786
|
-
const prefix = `--${(0,
|
|
917
|
+
const prefix = `--${(0, import_utils5.toDashCase)(sequenceProps.type.replace(".", "-"))}-`;
|
|
787
918
|
const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
|
|
788
919
|
const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
|
|
789
920
|
if (value === "none" || value === "auto" || value === "unset" || value === "inherit" || value === "fit-content" || value === "min-content" || value === "max-content" || value.includes("calc") || value.includes("var") || !startsWithDashOrLetter) return value;
|