@symbo.ls/scratch 2.11.94 → 2.11.125

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.
@@ -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
- // ../../node_modules/@domql/key/dist/cjs/index.js
34
- var require_cjs = __commonJS({
35
- "../../node_modules/@domql/key/dist/cjs/index.js"(exports, module2) {
33
+ // ../../node_modules/@domql/utils/dist/cjs/key.js
34
+ var require_key = __commonJS({
35
+ "../../node_modules/@domql/utils/dist/cjs/key.js"(exports, module2) {
36
36
  "use strict";
37
37
  var __defProp2 = Object.defineProperty;
38
38
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -69,6 +69,44 @@ var require_cjs = __commonJS({
69
69
  }
70
70
  });
71
71
 
72
+ // ../../node_modules/@domql/utils/dist/cjs/env.js
73
+ var require_env = __commonJS({
74
+ "../../node_modules/@domql/utils/dist/cjs/env.js"(exports, module2) {
75
+ "use strict";
76
+ var __defProp2 = Object.defineProperty;
77
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
78
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
79
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
80
+ var __export2 = (target, all) => {
81
+ for (var name in all)
82
+ __defProp2(target, name, { get: all[name], enumerable: true });
83
+ };
84
+ var __copyProps2 = (to, from, except, desc) => {
85
+ if (from && typeof from === "object" || typeof from === "function") {
86
+ for (let key of __getOwnPropNames2(from))
87
+ if (!__hasOwnProp2.call(to, key) && key !== except)
88
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
89
+ }
90
+ return to;
91
+ };
92
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
93
+ var env_exports = {};
94
+ __export2(env_exports, {
95
+ NODE_ENV: () => NODE_ENV,
96
+ getNev: () => getNev,
97
+ isDevelopment: () => isDevelopment,
98
+ isProduction: () => isProduction,
99
+ isTest: () => isTest
100
+ });
101
+ module2.exports = __toCommonJS2(env_exports);
102
+ var NODE_ENV = "development";
103
+ var isProduction = (env = NODE_ENV) => env === "production" || env === "prod" || env !== "development" && env !== "dev" && env !== "test";
104
+ var isTest = (env = NODE_ENV) => env === "test";
105
+ var isDevelopment = (env = NODE_ENV) => env === "development" || env === "dev";
106
+ var getNev = (key, env = NODE_ENV) => env[key];
107
+ }
108
+ });
109
+
72
110
  // ../../node_modules/@domql/tags/dist/cjs/htmlTags.js
73
111
  var require_htmlTags = __commonJS({
74
112
  "../../node_modules/@domql/tags/dist/cjs/htmlTags.js"(exports, module2) {
@@ -233,7 +271,7 @@ var require_htmlTags = __commonJS({
233
271
  });
234
272
 
235
273
  // ../../node_modules/@domql/tags/dist/cjs/index.js
236
- var require_cjs2 = __commonJS({
274
+ var require_cjs = __commonJS({
237
275
  "../../node_modules/@domql/tags/dist/cjs/index.js"(exports, module2) {
238
276
  "use strict";
239
277
  var __defProp2 = Object.defineProperty;
@@ -257,7 +295,7 @@ var require_cjs2 = __commonJS({
257
295
  });
258
296
 
259
297
  // ../../node_modules/@domql/globals/dist/cjs/index.js
260
- var require_cjs3 = __commonJS({
298
+ var require_cjs2 = __commonJS({
261
299
  "../../node_modules/@domql/globals/dist/cjs/index.js"(exports, module2) {
262
300
  "use strict";
263
301
  var __defProp2 = Object.defineProperty;
@@ -319,7 +357,7 @@ var require_node = __commonJS({
319
357
  isNode: () => isNode
320
358
  });
321
359
  module2.exports = __toCommonJS2(node_exports);
322
- var import_globals2 = require_cjs3();
360
+ var import_globals2 = require_cjs2();
323
361
  var isNode = (obj) => {
324
362
  return (typeof Node === "object" ? obj instanceof import_globals2.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
325
363
  };
@@ -368,7 +406,7 @@ var require_types = __commonJS({
368
406
  isValidHtmlTag: () => isValidHtmlTag
369
407
  });
370
408
  module2.exports = __toCommonJS2(types_exports);
371
- var import_tags = require_cjs2();
409
+ var import_tags = require_cjs();
372
410
  var import_node = require_node();
373
411
  var isValidHtmlTag = (arg) => import_tags.HTML_TAGS.body.includes(arg);
374
412
  var isObject5 = (arg) => {
@@ -500,7 +538,7 @@ var require_array = __commonJS({
500
538
  return arr;
501
539
  };
502
540
  var createNestedObject = (arr, lastValue) => {
503
- let nestedObject = {};
541
+ const nestedObject = {};
504
542
  if (arr.length === 0) {
505
543
  return lastValue;
506
544
  }
@@ -541,6 +579,7 @@ var require_string = __commonJS({
541
579
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
542
580
  var string_exports = {};
543
581
  __export2(string_exports, {
582
+ replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
544
583
  stringIncludesAny: () => stringIncludesAny
545
584
  });
546
585
  module2.exports = __toCommonJS2(string_exports);
@@ -552,6 +591,28 @@ var require_string = __commonJS({
552
591
  }
553
592
  return false;
554
593
  };
594
+ var brackRegex = /\{\{\s*((?:\.\.\/)+)?([^}\s]+)\s*\}\}/g;
595
+ var replaceLiteralsWithObjectFields = (str, state) => {
596
+ if (!str.includes("{{"))
597
+ return str;
598
+ return str.replace(brackRegex, (_, parentPath, variable) => {
599
+ if (parentPath) {
600
+ const parentLevels = parentPath.match(/\.\.\//g).length;
601
+ let parentState = state;
602
+ for (let i = 0; i < parentLevels; i++) {
603
+ parentState = parentState.parent;
604
+ if (!parentState) {
605
+ return "";
606
+ }
607
+ }
608
+ const value = parentState[variable.trim()];
609
+ return value !== void 0 ? `${value}` : "";
610
+ } else {
611
+ const value = state[variable.trim()];
612
+ return value !== void 0 ? `${value}` : "";
613
+ }
614
+ });
615
+ };
555
616
  }
556
617
  });
557
618
 
@@ -603,7 +664,7 @@ var require_object = __commonJS({
603
664
  stringToObject: () => stringToObject
604
665
  });
605
666
  module2.exports = __toCommonJS2(object_exports);
606
- var import_globals2 = require_cjs3();
667
+ var import_globals2 = require_cjs2();
607
668
  var import_types = require_types();
608
669
  var import_array = require_array();
609
670
  var import_string = require_string();
@@ -624,7 +685,8 @@ var require_object = __commonJS({
624
685
  };
625
686
  var merge = (element, obj, excludeFrom = []) => {
626
687
  for (const e in obj) {
627
- if (excludeFrom.includes(e) || e.startsWith("__"))
688
+ const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, e);
689
+ if (!hasOwnProperty || excludeFrom.includes(e) || e.startsWith("__"))
628
690
  continue;
629
691
  const elementProp = element[e];
630
692
  const objProp = obj[e];
@@ -636,7 +698,8 @@ var require_object = __commonJS({
636
698
  };
637
699
  var deepMerge2 = (element, extend, excludeFrom = []) => {
638
700
  for (const e in extend) {
639
- if (excludeFrom.includes(e) || e.startsWith("__"))
701
+ const hasOwnProperty = Object.prototype.hasOwnProperty.call(extend, e);
702
+ if (!hasOwnProperty || excludeFrom.includes(e) || e.startsWith("__"))
640
703
  continue;
641
704
  const elementProp = element[e];
642
705
  const extendProp = extend[e];
@@ -651,7 +714,8 @@ var require_object = __commonJS({
651
714
  var clone = (obj, excludeFrom = []) => {
652
715
  const o = {};
653
716
  for (const prop in obj) {
654
- if (excludeFrom.includes(prop) || prop.startsWith("__"))
717
+ const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, prop);
718
+ if (!hasOwnProperty || excludeFrom.includes(prop) || prop.startsWith("__"))
655
719
  continue;
656
720
  o[prop] = obj[prop];
657
721
  }
@@ -663,7 +727,8 @@ var require_object = __commonJS({
663
727
  }
664
728
  const o = {};
665
729
  for (const k in obj) {
666
- if (excludeFrom.includes(k) || k.startsWith("__"))
730
+ const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, k);
731
+ if (!hasOwnProperty || excludeFrom.includes(k) || k.startsWith("__"))
667
732
  continue;
668
733
  let v = obj[k];
669
734
  if (k === "extend" && (0, import_types.isArray)(v)) {
@@ -684,6 +749,8 @@ var require_object = __commonJS({
684
749
  var deepClone2 = (obj, excludeFrom = []) => {
685
750
  const o = (0, import_types.isArray)(obj) ? [] : {};
686
751
  for (const prop in obj) {
752
+ if (prop === "__proto__")
753
+ continue;
687
754
  if (excludeFrom.includes(prop) || prop.startsWith("__"))
688
755
  continue;
689
756
  let objProp = obj[prop];
@@ -785,6 +852,9 @@ var require_object = __commonJS({
785
852
  };
786
853
  var deepDestringify = (obj, stringified = {}) => {
787
854
  for (const prop in obj) {
855
+ const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, prop);
856
+ if (!hasOwnProperty)
857
+ continue;
788
858
  const objProp = obj[prop];
789
859
  if ((0, import_types.isString)(objProp)) {
790
860
  if (objProp.includes("=>") || objProp.includes("function") || objProp.startsWith("(")) {
@@ -903,6 +973,8 @@ var require_object = __commonJS({
903
973
  };
904
974
  var overwriteDeep = (obj, params, excludeFrom = []) => {
905
975
  for (const e in params) {
976
+ if (e === "__proto__")
977
+ continue;
906
978
  if (excludeFrom.includes(e) || e.startsWith("__"))
907
979
  continue;
908
980
  const objProp = obj[e];
@@ -1057,8 +1129,100 @@ var require_log = __commonJS({
1057
1129
  }
1058
1130
  });
1059
1131
 
1132
+ // ../../node_modules/@domql/utils/dist/cjs/globals.js
1133
+ var require_globals = __commonJS({
1134
+ "../../node_modules/@domql/utils/dist/cjs/globals.js"(exports, module2) {
1135
+ "use strict";
1136
+ var __defProp2 = Object.defineProperty;
1137
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
1138
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
1139
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1140
+ var __export2 = (target, all) => {
1141
+ for (var name in all)
1142
+ __defProp2(target, name, { get: all[name], enumerable: true });
1143
+ };
1144
+ var __copyProps2 = (to, from, except, desc) => {
1145
+ if (from && typeof from === "object" || typeof from === "function") {
1146
+ for (let key of __getOwnPropNames2(from))
1147
+ if (!__hasOwnProp2.call(to, key) && key !== except)
1148
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1149
+ }
1150
+ return to;
1151
+ };
1152
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
1153
+ var globals_exports = {};
1154
+ __export2(globals_exports, {
1155
+ document: () => document3,
1156
+ global: () => global,
1157
+ self: () => self,
1158
+ window: () => window2
1159
+ });
1160
+ module2.exports = __toCommonJS2(globals_exports);
1161
+ var global = globalThis;
1162
+ var self = globalThis;
1163
+ var window2 = globalThis;
1164
+ var document3 = window2.document;
1165
+ }
1166
+ });
1167
+
1168
+ // ../../node_modules/@domql/utils/dist/cjs/cookie.js
1169
+ var require_cookie = __commonJS({
1170
+ "../../node_modules/@domql/utils/dist/cjs/cookie.js"(exports, module2) {
1171
+ "use strict";
1172
+ var __defProp2 = Object.defineProperty;
1173
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
1174
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
1175
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
1176
+ var __export2 = (target, all) => {
1177
+ for (var name in all)
1178
+ __defProp2(target, name, { get: all[name], enumerable: true });
1179
+ };
1180
+ var __copyProps2 = (to, from, except, desc) => {
1181
+ if (from && typeof from === "object" || typeof from === "function") {
1182
+ for (let key of __getOwnPropNames2(from))
1183
+ if (!__hasOwnProp2.call(to, key) && key !== except)
1184
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
1185
+ }
1186
+ return to;
1187
+ };
1188
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
1189
+ var cookie_exports = {};
1190
+ __export2(cookie_exports, {
1191
+ getCookie: () => getCookie,
1192
+ isMobile: () => isMobile,
1193
+ setCookie: () => setCookie
1194
+ });
1195
+ module2.exports = __toCommonJS2(cookie_exports);
1196
+ var import_types = require_types();
1197
+ var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
1198
+ var setCookie = (cname, cvalue, exdays = 365) => {
1199
+ if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
1200
+ return;
1201
+ const d = /* @__PURE__ */ new Date();
1202
+ d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
1203
+ const expires = `expires=${d.toUTCString()}`;
1204
+ document.cookie = `${cname}=${cvalue};${expires};path=/`;
1205
+ };
1206
+ var getCookie = (cname) => {
1207
+ if ((0, import_types.isUndefined)(document) || (0, import_types.isUndefined)(document.cookie))
1208
+ return;
1209
+ const name = `${cname}=`;
1210
+ const decodedCookie = decodeURIComponent(document.cookie);
1211
+ const ca = decodedCookie.split(";");
1212
+ for (let i = 0; i < ca.length; i++) {
1213
+ let c = ca[i];
1214
+ while (c.charAt(0) === " ")
1215
+ c = c.substring(1);
1216
+ if (c.indexOf(name) === 0)
1217
+ return c.substring(name.length, c.length);
1218
+ }
1219
+ return "";
1220
+ };
1221
+ }
1222
+ });
1223
+
1060
1224
  // ../../node_modules/@domql/utils/dist/cjs/index.js
1061
- var require_cjs4 = __commonJS({
1225
+ var require_cjs3 = __commonJS({
1062
1226
  "../../node_modules/@domql/utils/dist/cjs/index.js"(exports, module2) {
1063
1227
  "use strict";
1064
1228
  var __defProp2 = Object.defineProperty;
@@ -1077,7 +1241,8 @@ var require_cjs4 = __commonJS({
1077
1241
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
1078
1242
  var utils_exports = {};
1079
1243
  module2.exports = __toCommonJS2(utils_exports);
1080
- __reExport(utils_exports, require_cjs(), module2.exports);
1244
+ __reExport(utils_exports, require_key(), module2.exports);
1245
+ __reExport(utils_exports, require_env(), module2.exports);
1081
1246
  __reExport(utils_exports, require_types(), module2.exports);
1082
1247
  __reExport(utils_exports, require_object(), module2.exports);
1083
1248
  __reExport(utils_exports, require_function(), module2.exports);
@@ -1085,6 +1250,8 @@ var require_cjs4 = __commonJS({
1085
1250
  __reExport(utils_exports, require_node(), module2.exports);
1086
1251
  __reExport(utils_exports, require_log(), module2.exports);
1087
1252
  __reExport(utils_exports, require_string(), module2.exports);
1253
+ __reExport(utils_exports, require_globals(), module2.exports);
1254
+ __reExport(utils_exports, require_cookie(), module2.exports);
1088
1255
  }
1089
1256
  });
1090
1257
 
@@ -1099,7 +1266,7 @@ __export(color_exports, {
1099
1266
  module.exports = __toCommonJS(color_exports);
1100
1267
 
1101
1268
  // src/factory.js
1102
- var import_utils = __toESM(require_cjs4(), 1);
1269
+ var import_utils = __toESM(require_cjs3(), 1);
1103
1270
 
1104
1271
  // src/defaultConfig/index.js
1105
1272
  var defaultConfig_exports = {};
@@ -1122,6 +1289,7 @@ __export(defaultConfig_exports, {
1122
1289
  SPACING: () => SPACING,
1123
1290
  SVG: () => SVG,
1124
1291
  SVG_DATA: () => SVG_DATA,
1292
+ TEMPLATES: () => TEMPLATES,
1125
1293
  THEME: () => THEME,
1126
1294
  TIMING: () => TIMING,
1127
1295
  TYPOGRAPHY: () => TYPOGRAPHY,
@@ -1296,6 +1464,9 @@ var ANIMATION = {};
1296
1464
  var SVG = {};
1297
1465
  var SVG_DATA = {};
1298
1466
 
1467
+ // src/defaultConfig/templates.js
1468
+ var TEMPLATES = {};
1469
+
1299
1470
  // src/defaultConfig/index.js
1300
1471
  var RESET = {};
1301
1472
 
@@ -1318,11 +1489,11 @@ var getActiveConfig = (def) => {
1318
1489
  };
1319
1490
 
1320
1491
  // src/system/color.js
1321
- var import_utils9 = __toESM(require_cjs4(), 1);
1492
+ var import_utils9 = __toESM(require_cjs3(), 1);
1322
1493
 
1323
1494
  // src/utils/color.js
1324
- var import_globals = __toESM(require_cjs3(), 1);
1325
- var import_utils2 = __toESM(require_cjs4(), 1);
1495
+ var import_globals = __toESM(require_cjs2(), 1);
1496
+ var import_utils2 = __toESM(require_cjs3(), 1);
1326
1497
  var colorStringToRgbaArray = (color) => {
1327
1498
  if (color === "")
1328
1499
  return;
@@ -1417,19 +1588,19 @@ var getRgbTone = (rgb, tone) => {
1417
1588
  };
1418
1589
 
1419
1590
  // src/utils/sequence.js
1420
- var import_utils5 = __toESM(require_cjs4(), 1);
1591
+ var import_utils5 = __toESM(require_cjs3(), 1);
1421
1592
 
1422
1593
  // ../utils/src/index.js
1423
- var import_utils4 = __toESM(require_cjs4());
1594
+ var import_utils4 = __toESM(require_cjs3());
1424
1595
 
1425
1596
  // ../utils/src/scaling.js
1426
- var import_utils3 = __toESM(require_cjs4());
1597
+ var import_utils3 = __toESM(require_cjs3());
1427
1598
 
1428
1599
  // src/utils/var.js
1429
- var import_utils7 = __toESM(require_cjs4(), 1);
1600
+ var import_utils7 = __toESM(require_cjs3(), 1);
1430
1601
 
1431
1602
  // src/utils/sprite.js
1432
- var import_utils8 = __toESM(require_cjs4(), 1);
1603
+ var import_utils8 = __toESM(require_cjs3(), 1);
1433
1604
 
1434
1605
  // src/system/color.js
1435
1606
  var getColor = (value, key, config) => {