@symbo.ls/scratch 2.10.291 → 2.11.5

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.
@@ -66,6 +66,45 @@ var require_cjs = __commonJS({
66
66
  }
67
67
  });
68
68
 
69
+ // ../../node_modules/@domql/key/dist/cjs/index.js
70
+ var require_cjs2 = __commonJS({
71
+ "../../node_modules/@domql/key/dist/cjs/index.js"(exports, module2) {
72
+ "use strict";
73
+ var __defProp2 = Object.defineProperty;
74
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
75
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
76
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
77
+ var __export2 = (target, all) => {
78
+ for (var name in all)
79
+ __defProp2(target, name, { get: all[name], enumerable: true });
80
+ };
81
+ var __copyProps2 = (to, from, except, desc) => {
82
+ if (from && typeof from === "object" || typeof from === "function") {
83
+ for (let key of __getOwnPropNames2(from))
84
+ if (!__hasOwnProp2.call(to, key) && key !== except)
85
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
86
+ }
87
+ return to;
88
+ };
89
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
90
+ var key_exports = {};
91
+ __export2(key_exports, {
92
+ createKey: () => createKey,
93
+ createSnapshotId: () => createSnapshotId
94
+ });
95
+ module2.exports = __toCommonJS2(key_exports);
96
+ var createKey = function() {
97
+ let index = 0;
98
+ function newId() {
99
+ index++;
100
+ return index;
101
+ }
102
+ return newId;
103
+ }();
104
+ var createSnapshotId = createKey;
105
+ }
106
+ });
107
+
69
108
  // ../../node_modules/@domql/tags/dist/cjs/htmlTags.js
70
109
  var require_htmlTags = __commonJS({
71
110
  "../../node_modules/@domql/tags/dist/cjs/htmlTags.js"(exports, module2) {
@@ -230,7 +269,7 @@ var require_htmlTags = __commonJS({
230
269
  });
231
270
 
232
271
  // ../../node_modules/@domql/tags/dist/cjs/index.js
233
- var require_cjs2 = __commonJS({
272
+ var require_cjs3 = __commonJS({
234
273
  "../../node_modules/@domql/tags/dist/cjs/index.js"(exports, module2) {
235
274
  "use strict";
236
275
  var __defProp2 = Object.defineProperty;
@@ -253,6 +292,43 @@ var require_cjs2 = __commonJS({
253
292
  }
254
293
  });
255
294
 
295
+ // ../../node_modules/@domql/utils/dist/cjs/node.js
296
+ var require_node = __commonJS({
297
+ "../../node_modules/@domql/utils/dist/cjs/node.js"(exports, module2) {
298
+ "use strict";
299
+ var __defProp2 = Object.defineProperty;
300
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
301
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
302
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
303
+ var __export2 = (target, all) => {
304
+ for (var name in all)
305
+ __defProp2(target, name, { get: all[name], enumerable: true });
306
+ };
307
+ var __copyProps2 = (to, from, except, desc) => {
308
+ if (from && typeof from === "object" || typeof from === "function") {
309
+ for (let key of __getOwnPropNames2(from))
310
+ if (!__hasOwnProp2.call(to, key) && key !== except)
311
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
312
+ }
313
+ return to;
314
+ };
315
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
316
+ var node_exports = {};
317
+ __export2(node_exports, {
318
+ isHtmlElement: () => isHtmlElement,
319
+ isNode: () => isNode
320
+ });
321
+ module2.exports = __toCommonJS2(node_exports);
322
+ var import_globals2 = require_cjs();
323
+ var isNode = (obj) => {
324
+ return (typeof Node === "object" ? obj instanceof import_globals2.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
325
+ };
326
+ var isHtmlElement = (obj) => {
327
+ return (typeof HTMLElement === "object" ? obj instanceof import_globals2.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
328
+ };
329
+ }
330
+ });
331
+
256
332
  // ../../node_modules/@domql/utils/dist/cjs/types.js
257
333
  var require_types = __commonJS({
258
334
  "../../node_modules/@domql/utils/dist/cjs/types.js"(exports, module2) {
@@ -282,8 +358,6 @@ var require_types = __commonJS({
282
358
  isBoolean: () => isBoolean,
283
359
  isDefined: () => isDefined2,
284
360
  isFunction: () => isFunction,
285
- isHtmlElement: () => isHtmlElement,
286
- isNode: () => isNode,
287
361
  isNot: () => isNot,
288
362
  isNull: () => isNull,
289
363
  isNumber: () => isNumber,
@@ -294,9 +368,9 @@ var require_types = __commonJS({
294
368
  isValidHtmlTag: () => isValidHtmlTag
295
369
  });
296
370
  module2.exports = __toCommonJS2(types_exports);
297
- var import_globals2 = require_cjs();
298
- var import_tags = require_cjs2();
299
- var isValidHtmlTag = (arg) => import_tags.HTML_TAGS.body.indexOf(arg);
371
+ var import_tags = require_cjs3();
372
+ var import_node = require_node();
373
+ var isValidHtmlTag = (arg) => import_tags.HTML_TAGS.body.includes(arg);
300
374
  var isObject4 = (arg) => {
301
375
  if (arg === null)
302
376
  return false;
@@ -313,12 +387,6 @@ var require_types = __commonJS({
313
387
  return false;
314
388
  return typeof arg === "object";
315
389
  };
316
- var isNode = (obj) => {
317
- return typeof import_globals2.window.Node === "object" ? obj instanceof import_globals2.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string";
318
- };
319
- var isHtmlElement = (obj) => {
320
- return typeof import_globals2.window.HTMLElement === "object" ? obj instanceof import_globals2.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string";
321
- };
322
390
  var isDefined2 = (arg) => {
323
391
  return isObject4(arg) || isObjectLike2(arg) || isString4(arg) || isNumber(arg) || isFunction(arg) || isArray3(arg) || isObjectLike2(arg) || isBoolean(arg) || isNull(arg);
324
392
  };
@@ -334,8 +402,8 @@ var require_types = __commonJS({
334
402
  null: isNull,
335
403
  function: isFunction,
336
404
  objectLike: isObjectLike2,
337
- node: isNode,
338
- htmlElement: isHtmlElement,
405
+ node: import_node.isNode,
406
+ htmlElement: import_node.isHtmlElement,
339
407
  defined: isDefined2
340
408
  };
341
409
  var is = (arg) => {
@@ -382,6 +450,8 @@ var require_object = __commonJS({
382
450
  deepStringify: () => deepStringify,
383
451
  detachFunctionsFromObject: () => detachFunctionsFromObject,
384
452
  diff: () => diff,
453
+ diffArrays: () => diffArrays,
454
+ diffObjects: () => diffObjects,
385
455
  exec: () => exec,
386
456
  flattenRecursive: () => flattenRecursive,
387
457
  isEqualDeep: () => isEqualDeep,
@@ -393,7 +463,8 @@ var require_object = __commonJS({
393
463
  mergeIfExisted: () => mergeIfExisted,
394
464
  overwrite: () => overwrite,
395
465
  overwriteDeep: () => overwriteDeep,
396
- overwriteObj: () => overwriteObj
466
+ overwriteObj: () => overwriteObj,
467
+ removeFromObject: () => removeFromObject
397
468
  });
398
469
  module2.exports = __toCommonJS2(object_exports);
399
470
  var import_globals2 = require_cjs();
@@ -425,14 +496,13 @@ var require_object = __commonJS({
425
496
  };
426
497
  var deepMerge2 = (element, extend) => {
427
498
  for (const e in extend) {
499
+ const elementProp = element[e];
428
500
  const extendProp = extend[e];
429
501
  if (e === "parent" || e === "props")
430
502
  continue;
431
- if (element[e] === void 0) {
432
- element[e] = extendProp;
433
- } else if ((0, import_types.isObjectLike)(element[e]) && (0, import_types.isObjectLike)(extendProp)) {
434
- deepMerge2(element[e], extendProp);
435
- } else {
503
+ if ((0, import_types.isObjectLike)(elementProp) && (0, import_types.isObjectLike)(extendProp)) {
504
+ deepMerge2(elementProp, extendProp);
505
+ } else if (elementProp === void 0) {
436
506
  element[e] = extendProp;
437
507
  }
438
508
  }
@@ -601,21 +671,46 @@ var require_object = __commonJS({
601
671
  }
602
672
  return changes;
603
673
  };
604
- var diff = (obj, original, cache) => {
605
- const changes = cache || {};
606
- for (const e in obj) {
674
+ var diffObjects = (original, objToDiff, cache) => {
675
+ for (const e in objToDiff) {
607
676
  if (e === "ref")
608
677
  continue;
609
678
  const originalProp = original[e];
610
- const objProp = obj[e];
611
- if ((0, import_types.isObjectLike)(originalProp) && (0, import_types.isObjectLike)(objProp)) {
612
- changes[e] = {};
613
- diff(originalProp, objProp, changes[e]);
614
- } else if (objProp !== void 0) {
615
- changes[e] = objProp;
679
+ const objToDiffProp = objToDiff[e];
680
+ if ((0, import_types.isObject)(originalProp) && (0, import_types.isObject)(objToDiffProp)) {
681
+ cache[e] = {};
682
+ diff(originalProp, objToDiffProp, cache[e]);
683
+ } else if (objToDiffProp !== void 0) {
684
+ cache[e] = objToDiffProp;
616
685
  }
617
686
  }
618
- return changes;
687
+ return cache;
688
+ };
689
+ var diffArrays = (original, objToDiff, cache) => {
690
+ if (original.length !== objToDiff.length) {
691
+ cache = objToDiff;
692
+ } else {
693
+ const diffArr = [];
694
+ for (let i = 0; i < original.length; i++) {
695
+ const diffObj = diff(original[i], objToDiff[i]);
696
+ if (Object.keys(diffObj).length > 0) {
697
+ diffArr.push(diffObj);
698
+ }
699
+ }
700
+ if (diffArr.length > 0) {
701
+ cache = diffArr;
702
+ }
703
+ }
704
+ return cache;
705
+ };
706
+ var diff = (original, objToDiff, cache = {}) => {
707
+ if ((0, import_types.isArray)(original) && (0, import_types.isArray)(objToDiff)) {
708
+ cache = [];
709
+ diffArrays(original, objToDiff, cache);
710
+ } else {
711
+ diffObjects(original, objToDiff, cache);
712
+ }
713
+ return cache;
619
714
  };
620
715
  var overwriteObj = (params, obj) => {
621
716
  const changes = {};
@@ -680,6 +775,18 @@ var require_object = __commonJS({
680
775
  }
681
776
  return true;
682
777
  };
778
+ var removeFromObject = (obj, props) => {
779
+ if (props === void 0 || props === null)
780
+ return obj;
781
+ if ((0, import_types.is)(props)("string", "number")) {
782
+ delete obj[props];
783
+ } else if ((0, import_types.isArray)(props)) {
784
+ props.forEach((prop) => delete obj[prop]);
785
+ } else {
786
+ throw new Error("Invalid input: props must be a string or an array of strings");
787
+ }
788
+ return obj;
789
+ };
683
790
  }
684
791
  });
685
792
 
@@ -737,14 +844,7 @@ var require_function = __commonJS({
737
844
 
738
845
  // ../../node_modules/@domql/utils/dist/cjs/array.js
739
846
  var require_array = __commonJS({
740
- "../../node_modules/@domql/utils/dist/cjs/array.js"() {
741
- "use strict";
742
- }
743
- });
744
-
745
- // ../../node_modules/@domql/utils/dist/cjs/node.js
746
- var require_node = __commonJS({
747
- "../../node_modules/@domql/utils/dist/cjs/node.js"(exports, module2) {
847
+ "../../node_modules/@domql/utils/dist/cjs/array.js"(exports, module2) {
748
848
  "use strict";
749
849
  var __defProp2 = Object.defineProperty;
750
850
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -763,23 +863,39 @@ var require_node = __commonJS({
763
863
  return to;
764
864
  };
765
865
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
766
- var node_exports = {};
767
- __export2(node_exports, {
768
- cleanWithNode: () => cleanWithNode,
769
- createID: () => createID,
770
- createSnapshotId: () => createSnapshotId
866
+ var array_exports = {};
867
+ __export2(array_exports, {
868
+ arrayContainsOtherArray: () => arrayContainsOtherArray,
869
+ joinArrays: () => joinArrays,
870
+ removeFromArray: () => removeFromArray,
871
+ swapItemsInArray: () => swapItemsInArray
771
872
  });
772
- module2.exports = __toCommonJS2(node_exports);
773
- var cleanWithNode = (extend) => delete extend.node && extend;
774
- var createID = function() {
775
- let index = 0;
776
- function newId() {
777
- index++;
778
- return index;
873
+ module2.exports = __toCommonJS2(array_exports);
874
+ var import_types = require_types();
875
+ var arrayContainsOtherArray = (arr1, arr2) => {
876
+ return arr2.every((val) => arr1.includes(val));
877
+ };
878
+ var removeFromArray = (arr, index) => {
879
+ if ((0, import_types.isString)(index))
880
+ index = parseInt(index);
881
+ if ((0, import_types.isNumber)(index)) {
882
+ if (index < 0 || index >= arr.length || isNaN(index)) {
883
+ throw new Error("Invalid index");
884
+ }
885
+ arr.splice(index, 1);
886
+ } else if ((0, import_types.isArray)(index)) {
887
+ index.forEach((idx) => removeFromArray(arr, idx));
888
+ } else {
889
+ throw new Error("Invalid index");
779
890
  }
780
- return newId;
781
- }();
782
- var createSnapshotId = createID;
891
+ return arr;
892
+ };
893
+ var swapItemsInArray = (arr, i, j) => {
894
+ [arr[i], arr[j]] = [arr[j], arr[i]];
895
+ };
896
+ var joinArrays = (...arrays) => {
897
+ return [].concat(...arrays);
898
+ };
783
899
  }
784
900
  });
785
901
 
@@ -825,7 +941,7 @@ var require_log = __commonJS({
825
941
  });
826
942
 
827
943
  // ../../node_modules/@domql/utils/dist/cjs/index.js
828
- var require_cjs3 = __commonJS({
944
+ var require_cjs4 = __commonJS({
829
945
  "../../node_modules/@domql/utils/dist/cjs/index.js"(exports, module2) {
830
946
  "use strict";
831
947
  var __defProp2 = Object.defineProperty;
@@ -844,6 +960,7 @@ var require_cjs3 = __commonJS({
844
960
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
845
961
  var utils_exports2 = {};
846
962
  module2.exports = __toCommonJS2(utils_exports2);
963
+ __reExport(utils_exports2, require_cjs2(), module2.exports);
847
964
  __reExport(utils_exports2, require_types(), module2.exports);
848
965
  __reExport(utils_exports2, require_object(), module2.exports);
849
966
  __reExport(utils_exports2, require_function(), module2.exports);
@@ -1076,19 +1193,19 @@ var getFontFaceString = (LIBRARY) => {
1076
1193
  };
1077
1194
 
1078
1195
  // src/utils/sequence.js
1079
- var import_utils4 = __toESM(require_cjs3(), 1);
1196
+ var import_utils4 = __toESM(require_cjs4(), 1);
1080
1197
 
1081
1198
  // ../utils/src/index.js
1082
- var import_utils2 = __toESM(require_cjs3());
1199
+ var import_utils2 = __toESM(require_cjs4());
1083
1200
 
1084
1201
  // ../utils/src/scaling.js
1085
- var import_utils = __toESM(require_cjs3());
1202
+ var import_utils = __toESM(require_cjs4());
1086
1203
 
1087
1204
  // ../utils/src/index.js
1088
1205
  var toDashCase = (val) => val.replace(/[A-Z]/g, (match, offset) => (offset > 0 ? "-" : "") + match.toLowerCase()).replace(".", "-");
1089
1206
 
1090
1207
  // src/factory.js
1091
- var import_utils3 = __toESM(require_cjs3(), 1);
1208
+ var import_utils3 = __toESM(require_cjs4(), 1);
1092
1209
 
1093
1210
  // src/defaultConfig/index.js
1094
1211
  var defaultConfig_exports = {};
@@ -1475,7 +1592,7 @@ var findHeadings = (propertyNames) => {
1475
1592
  };
1476
1593
 
1477
1594
  // src/utils/var.js
1478
- var import_utils6 = __toESM(require_cjs3(), 1);
1595
+ var import_utils6 = __toESM(require_cjs4(), 1);
1479
1596
  var setVariables = (result, key) => {
1480
1597
  const CONFIG2 = getActiveConfig();
1481
1598
  const { CSS_VARS: CSS_VARS2 } = CONFIG2;
@@ -1515,7 +1632,7 @@ var applySequenceVars = (props, mediaName, options = {}) => {
1515
1632
  };
1516
1633
 
1517
1634
  // src/utils/sprite.js
1518
- var import_utils7 = __toESM(require_cjs3(), 1);
1635
+ var import_utils7 = __toESM(require_cjs4(), 1);
1519
1636
  var generateSprite = (icons) => {
1520
1637
  const CONFIG2 = getActiveConfig();
1521
1638
  let sprite = "";