@symbo.ls/scratch 3.0.2 → 3.1.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.
@@ -83,7 +83,7 @@ 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 = [
86
+ var STATE_METHODS3 = [
87
87
  "update",
88
88
  "parse",
89
89
  "clean",
@@ -117,8 +117,8 @@ var require_cjs = __commonJS({
117
117
  "removePathCollection",
118
118
  "getByPath"
119
119
  ];
120
- var PROPS_METHODS2 = ["update", "__element"];
121
- var METHODS2 = [
120
+ var PROPS_METHODS3 = ["update", "__element"];
121
+ var METHODS3 = [
122
122
  "set",
123
123
  "reset",
124
124
  "update",
@@ -146,13 +146,84 @@ var require_cjs = __commonJS({
146
146
  "nextElement",
147
147
  "previousElement"
148
148
  ];
149
- var METHODS_EXL2 = [
149
+ var METHODS_EXL3 = [
150
150
  ...["node", "context", "extends", "__element", "__ref"],
151
- ...METHODS2,
152
- ...STATE_METHODS2,
153
- ...PROPS_METHODS2
151
+ ...METHODS3,
152
+ ...STATE_METHODS3,
153
+ ...PROPS_METHODS3
154
154
  ];
155
155
  var isMobile2 = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
156
+ var STATE_METHODS22 = [
157
+ "update",
158
+ "parse",
159
+ "clean",
160
+ "create",
161
+ "destroy",
162
+ "add",
163
+ "toggle",
164
+ "remove",
165
+ "apply",
166
+ "set",
167
+ "reset",
168
+ "replace",
169
+ "quietReplace",
170
+ "quietUpdate",
171
+ "applyReplace",
172
+ "applyFunction",
173
+ "keys",
174
+ "values",
175
+ "ref",
176
+ "rootUpdate",
177
+ "parentUpdate",
178
+ "parent",
179
+ "__element",
180
+ "__depends",
181
+ "__ref",
182
+ "__children",
183
+ "root",
184
+ "setByPath",
185
+ "setPathCollection",
186
+ "removeByPath",
187
+ "removePathCollection",
188
+ "getByPath"
189
+ ];
190
+ var PROPS_METHODS22 = ["update", "__element"];
191
+ var METHODS22 = [
192
+ "set",
193
+ "reset",
194
+ "update",
195
+ "remove",
196
+ "updateContent",
197
+ "removeContent",
198
+ "lookup",
199
+ "lookdown",
200
+ "lookdownAll",
201
+ "getRef",
202
+ "getPath",
203
+ "setNodeStyles",
204
+ "spotByPath",
205
+ "keys",
206
+ "parse",
207
+ "setProps",
208
+ "parseDeep",
209
+ "variables",
210
+ "if",
211
+ "log",
212
+ "verbose",
213
+ "warn",
214
+ "error",
215
+ "call",
216
+ "nextElement",
217
+ "previousElement"
218
+ ];
219
+ var METHODS_EXL22 = [
220
+ ...["node", "context", "extends", "__element", "__ref"],
221
+ ...METHODS22,
222
+ ...STATE_METHODS22,
223
+ ...PROPS_METHODS22
224
+ ];
225
+ var window32 = globalThis;
226
+ var document32 = window32.document;
156
227
  async function toggleFullscreen(opts) {
157
228
  if (!document.fullscreenElement) {
158
229
  try {
@@ -331,16 +402,16 @@ __export(shadow_exports, {
331
402
  });
332
403
  module.exports = __toCommonJS(shadow_exports);
333
404
 
334
- // ../../node_modules/@domql/utils/globals.js
405
+ // ../../../domql/packages/utils/globals.js
335
406
  var window2 = globalThis;
336
407
  var document2 = window2.document;
337
408
 
338
- // ../../node_modules/@domql/utils/node.js
409
+ // ../../../domql/packages/utils/node.js
339
410
  var isDOMNode = (obj) => {
340
411
  return typeof window2 !== "undefined" && (obj instanceof window2.Node || obj instanceof window2.Window || obj === window2 || obj === document);
341
412
  };
342
413
 
343
- // ../../node_modules/@domql/utils/types.js
414
+ // ../../../domql/packages/utils/types.js
344
415
  var isObject = (arg) => {
345
416
  if (arg === null) return false;
346
417
  return typeof arg === "object" && arg.constructor === Object;
@@ -358,7 +429,7 @@ var isUndefined = (arg) => {
358
429
  return arg === void 0;
359
430
  };
360
431
 
361
- // ../../node_modules/@domql/utils/array.js
432
+ // ../../../domql/packages/utils/array.js
362
433
  var unstackArrayOfObjects = (arr, exclude = []) => {
363
434
  return arr.reduce(
364
435
  (a, c) => deepMerge(a, deepClone(c, { exclude }), exclude),
@@ -366,7 +437,7 @@ var unstackArrayOfObjects = (arr, exclude = []) => {
366
437
  );
367
438
  };
368
439
 
369
- // ../../node_modules/@domql/utils/keys.js
440
+ // ../../../domql/packages/utils/keys.js
370
441
  var STATE_METHODS = [
371
442
  "update",
372
443
  "parse",
@@ -437,7 +508,7 @@ var METHODS_EXL = [
437
508
  ...PROPS_METHODS
438
509
  ];
439
510
 
440
- // ../../node_modules/@domql/utils/object.js
511
+ // ../../../domql/packages/utils/object.js
441
512
  var deepMerge = (element, extend, excludeFrom = METHODS_EXL) => {
442
513
  for (const e in extend) {
443
514
  const hasOwnProperty = Object.prototype.hasOwnProperty.call(extend, e);
@@ -504,9 +575,84 @@ var deepClone = (obj, options = {}) => {
504
575
  return clone;
505
576
  };
506
577
 
507
- // ../../node_modules/@domql/utils/cookie.js
578
+ // ../../../domql/packages/utils/cookie.js
508
579
  var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
509
580
 
581
+ // ../../../domql/packages/event/dist/esm/keys.js
582
+ var STATE_METHODS2 = [
583
+ "update",
584
+ "parse",
585
+ "clean",
586
+ "create",
587
+ "destroy",
588
+ "add",
589
+ "toggle",
590
+ "remove",
591
+ "apply",
592
+ "set",
593
+ "reset",
594
+ "replace",
595
+ "quietReplace",
596
+ "quietUpdate",
597
+ "applyReplace",
598
+ "applyFunction",
599
+ "keys",
600
+ "values",
601
+ "ref",
602
+ "rootUpdate",
603
+ "parentUpdate",
604
+ "parent",
605
+ "__element",
606
+ "__depends",
607
+ "__ref",
608
+ "__children",
609
+ "root",
610
+ "setByPath",
611
+ "setPathCollection",
612
+ "removeByPath",
613
+ "removePathCollection",
614
+ "getByPath"
615
+ ];
616
+ var PROPS_METHODS2 = ["update", "__element"];
617
+ var METHODS2 = [
618
+ "set",
619
+ "reset",
620
+ "update",
621
+ "remove",
622
+ "updateContent",
623
+ "removeContent",
624
+ "lookup",
625
+ "lookdown",
626
+ "lookdownAll",
627
+ "getRef",
628
+ "getPath",
629
+ "setNodeStyles",
630
+ "spotByPath",
631
+ "keys",
632
+ "parse",
633
+ "setProps",
634
+ "parseDeep",
635
+ "variables",
636
+ "if",
637
+ "log",
638
+ "verbose",
639
+ "warn",
640
+ "error",
641
+ "call",
642
+ "nextElement",
643
+ "previousElement"
644
+ ];
645
+ var METHODS_EXL2 = [
646
+ ...["node", "context", "extends", "__element", "__ref"],
647
+ ...METHODS2,
648
+ ...STATE_METHODS2,
649
+ ...PROPS_METHODS2
650
+ ];
651
+
652
+ // ../../../domql/packages/event/dist/esm/globals.js
653
+ var window3 = globalThis;
654
+ var document3 = window3.document;
655
+
510
656
  // src/defaultConfig/index.js
511
657
  var defaultConfig_exports = {};
512
658
  __export(defaultConfig_exports, {
@@ -822,7 +968,7 @@ var getRgbTone = (rgb, tone) => {
822
968
  };
823
969
 
824
970
  // src/utils/sequence.js
825
- var import_utils6 = __toESM(require_cjs(), 1);
971
+ var import_utils5 = __toESM(require_cjs(), 1);
826
972
  var numToLetterMap = {
827
973
  "-6": "U",
828
974
  "-5": "V",
@@ -958,7 +1104,7 @@ var getSequenceValue = (value = "A", sequenceProps) => {
958
1104
  useVariable
959
1105
  } = sequenceProps;
960
1106
  if (isString(value) && value.slice(0, 2) === "--") return `var(${value})`;
961
- const prefix = `--${(0, import_utils6.toDashCase)(sequenceProps.type.replace(".", "-"))}-`;
1107
+ const prefix = `--${(0, import_utils5.toDashCase)(sequenceProps.type.replace(".", "-"))}-`;
962
1108
  const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
963
1109
  const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
964
1110
  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;
@@ -1043,7 +1189,7 @@ var getColor = (value, key, config) => {
1043
1189
  };
1044
1190
 
1045
1191
  // src/system/spacing.js
1046
- var import_utils11 = __toESM(require_cjs(), 1);
1192
+ var import_utils10 = __toESM(require_cjs(), 1);
1047
1193
  var getSequence = (sequenceProps) => {
1048
1194
  const CONFIG2 = getActiveConfig();
1049
1195
  const { SPACING: SPACING2 } = CONFIG2;
@@ -1056,7 +1202,7 @@ var getSpacingByKey = (value, propertyName = "padding", sequenceProps) => {
1056
1202
  if (isString(value) && (value.includes("calc") || value.includes("var"))) {
1057
1203
  return { [propertyName]: value };
1058
1204
  }
1059
- const stack = (0, import_utils11.arrayzeValue)(value);
1205
+ const stack = (0, import_utils10.arrayzeValue)(value);
1060
1206
  if (!isArray(stack)) return;
1061
1207
  if (stack.length > 1) {
1062
1208
  let suffix = "";
@@ -1156,3 +1302,4 @@ var getShadow = (value, globalTheme) => {
1156
1302
  if (CONFIG2.verbose) console.warn("Can't find color", value);
1157
1303
  return value;
1158
1304
  };
1305
+ // @preserve-env
@@ -83,7 +83,7 @@ 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 = [
86
+ var STATE_METHODS3 = [
87
87
  "update",
88
88
  "parse",
89
89
  "clean",
@@ -117,8 +117,8 @@ var require_cjs = __commonJS({
117
117
  "removePathCollection",
118
118
  "getByPath"
119
119
  ];
120
- var PROPS_METHODS2 = ["update", "__element"];
121
- var METHODS2 = [
120
+ var PROPS_METHODS3 = ["update", "__element"];
121
+ var METHODS3 = [
122
122
  "set",
123
123
  "reset",
124
124
  "update",
@@ -146,13 +146,84 @@ var require_cjs = __commonJS({
146
146
  "nextElement",
147
147
  "previousElement"
148
148
  ];
149
- var METHODS_EXL2 = [
149
+ var METHODS_EXL3 = [
150
150
  ...["node", "context", "extends", "__element", "__ref"],
151
- ...METHODS2,
152
- ...STATE_METHODS2,
153
- ...PROPS_METHODS2
151
+ ...METHODS3,
152
+ ...STATE_METHODS3,
153
+ ...PROPS_METHODS3
154
154
  ];
155
155
  var isMobile2 = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
156
+ var STATE_METHODS22 = [
157
+ "update",
158
+ "parse",
159
+ "clean",
160
+ "create",
161
+ "destroy",
162
+ "add",
163
+ "toggle",
164
+ "remove",
165
+ "apply",
166
+ "set",
167
+ "reset",
168
+ "replace",
169
+ "quietReplace",
170
+ "quietUpdate",
171
+ "applyReplace",
172
+ "applyFunction",
173
+ "keys",
174
+ "values",
175
+ "ref",
176
+ "rootUpdate",
177
+ "parentUpdate",
178
+ "parent",
179
+ "__element",
180
+ "__depends",
181
+ "__ref",
182
+ "__children",
183
+ "root",
184
+ "setByPath",
185
+ "setPathCollection",
186
+ "removeByPath",
187
+ "removePathCollection",
188
+ "getByPath"
189
+ ];
190
+ var PROPS_METHODS22 = ["update", "__element"];
191
+ var METHODS22 = [
192
+ "set",
193
+ "reset",
194
+ "update",
195
+ "remove",
196
+ "updateContent",
197
+ "removeContent",
198
+ "lookup",
199
+ "lookdown",
200
+ "lookdownAll",
201
+ "getRef",
202
+ "getPath",
203
+ "setNodeStyles",
204
+ "spotByPath",
205
+ "keys",
206
+ "parse",
207
+ "setProps",
208
+ "parseDeep",
209
+ "variables",
210
+ "if",
211
+ "log",
212
+ "verbose",
213
+ "warn",
214
+ "error",
215
+ "call",
216
+ "nextElement",
217
+ "previousElement"
218
+ ];
219
+ var METHODS_EXL22 = [
220
+ ...["node", "context", "extends", "__element", "__ref"],
221
+ ...METHODS22,
222
+ ...STATE_METHODS22,
223
+ ...PROPS_METHODS22
224
+ ];
225
+ var window32 = globalThis;
226
+ var document32 = window32.document;
156
227
  async function toggleFullscreen(opts) {
157
228
  if (!document.fullscreenElement) {
158
229
  try {
@@ -331,18 +402,18 @@ __export(spacing_exports, {
331
402
  getSpacingByKey: () => getSpacingByKey
332
403
  });
333
404
  module.exports = __toCommonJS(spacing_exports);
334
- var import_utils9 = __toESM(require_cjs(), 1);
405
+ var import_utils8 = __toESM(require_cjs(), 1);
335
406
 
336
- // ../../node_modules/@domql/utils/globals.js
407
+ // ../../../domql/packages/utils/globals.js
337
408
  var window2 = globalThis;
338
409
  var document2 = window2.document;
339
410
 
340
- // ../../node_modules/@domql/utils/node.js
411
+ // ../../../domql/packages/utils/node.js
341
412
  var isDOMNode = (obj) => {
342
413
  return typeof window2 !== "undefined" && (obj instanceof window2.Node || obj instanceof window2.Window || obj === window2 || obj === document);
343
414
  };
344
415
 
345
- // ../../node_modules/@domql/utils/types.js
416
+ // ../../../domql/packages/utils/types.js
346
417
  var isString = (arg) => typeof arg === "string";
347
418
  var isFunction = (arg) => typeof arg === "function";
348
419
  var isNull = (arg) => arg === null;
@@ -355,7 +426,7 @@ var isUndefined = (arg) => {
355
426
  return arg === void 0;
356
427
  };
357
428
 
358
- // ../../node_modules/@domql/utils/array.js
429
+ // ../../../domql/packages/utils/array.js
359
430
  var unstackArrayOfObjects = (arr, exclude = []) => {
360
431
  return arr.reduce(
361
432
  (a, c) => deepMerge(a, deepClone(c, { exclude }), exclude),
@@ -363,7 +434,7 @@ var unstackArrayOfObjects = (arr, exclude = []) => {
363
434
  );
364
435
  };
365
436
 
366
- // ../../node_modules/@domql/utils/keys.js
437
+ // ../../../domql/packages/utils/keys.js
367
438
  var STATE_METHODS = [
368
439
  "update",
369
440
  "parse",
@@ -434,7 +505,7 @@ var METHODS_EXL = [
434
505
  ...PROPS_METHODS
435
506
  ];
436
507
 
437
- // ../../node_modules/@domql/utils/object.js
508
+ // ../../../domql/packages/utils/object.js
438
509
  var merge = (element, obj, excludeFrom = []) => {
439
510
  for (const e in obj) {
440
511
  const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, e);
@@ -515,9 +586,84 @@ var deepClone = (obj, options = {}) => {
515
586
  return clone;
516
587
  };
517
588
 
518
- // ../../node_modules/@domql/utils/cookie.js
589
+ // ../../../domql/packages/utils/cookie.js
519
590
  var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
520
591
 
592
+ // ../../../domql/packages/event/dist/esm/keys.js
593
+ var STATE_METHODS2 = [
594
+ "update",
595
+ "parse",
596
+ "clean",
597
+ "create",
598
+ "destroy",
599
+ "add",
600
+ "toggle",
601
+ "remove",
602
+ "apply",
603
+ "set",
604
+ "reset",
605
+ "replace",
606
+ "quietReplace",
607
+ "quietUpdate",
608
+ "applyReplace",
609
+ "applyFunction",
610
+ "keys",
611
+ "values",
612
+ "ref",
613
+ "rootUpdate",
614
+ "parentUpdate",
615
+ "parent",
616
+ "__element",
617
+ "__depends",
618
+ "__ref",
619
+ "__children",
620
+ "root",
621
+ "setByPath",
622
+ "setPathCollection",
623
+ "removeByPath",
624
+ "removePathCollection",
625
+ "getByPath"
626
+ ];
627
+ var PROPS_METHODS2 = ["update", "__element"];
628
+ var METHODS2 = [
629
+ "set",
630
+ "reset",
631
+ "update",
632
+ "remove",
633
+ "updateContent",
634
+ "removeContent",
635
+ "lookup",
636
+ "lookdown",
637
+ "lookdownAll",
638
+ "getRef",
639
+ "getPath",
640
+ "setNodeStyles",
641
+ "spotByPath",
642
+ "keys",
643
+ "parse",
644
+ "setProps",
645
+ "parseDeep",
646
+ "variables",
647
+ "if",
648
+ "log",
649
+ "verbose",
650
+ "warn",
651
+ "error",
652
+ "call",
653
+ "nextElement",
654
+ "previousElement"
655
+ ];
656
+ var METHODS_EXL2 = [
657
+ ...["node", "context", "extends", "__element", "__ref"],
658
+ ...METHODS2,
659
+ ...STATE_METHODS2,
660
+ ...PROPS_METHODS2
661
+ ];
662
+
663
+ // ../../../domql/packages/event/dist/esm/globals.js
664
+ var window3 = globalThis;
665
+ var document3 = window3.document;
666
+
521
667
  // src/defaultConfig/index.js
522
668
  var defaultConfig_exports = {};
523
669
  __export(defaultConfig_exports, {
@@ -745,7 +891,7 @@ var isScalingUnit = (unit) => {
745
891
  };
746
892
 
747
893
  // src/utils/sequence.js
748
- var import_utils6 = __toESM(require_cjs(), 1);
894
+ var import_utils5 = __toESM(require_cjs(), 1);
749
895
  var numToLetterMap = {
750
896
  "-6": "U",
751
897
  "-5": "V",
@@ -884,7 +1030,7 @@ var getSequenceValue = (value = "A", sequenceProps) => {
884
1030
  useVariable
885
1031
  } = sequenceProps;
886
1032
  if (isString(value) && value.slice(0, 2) === "--") return `var(${value})`;
887
- const prefix = `--${(0, import_utils6.toDashCase)(sequenceProps.type.replace(".", "-"))}-`;
1033
+ const prefix = `--${(0, import_utils5.toDashCase)(sequenceProps.type.replace(".", "-"))}-`;
888
1034
  const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
889
1035
  const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
890
1036
  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;
@@ -1052,7 +1198,7 @@ var getSpacingByKey = (value, propertyName = "padding", sequenceProps) => {
1052
1198
  if (isString(value) && (value.includes("calc") || value.includes("var"))) {
1053
1199
  return { [propertyName]: value };
1054
1200
  }
1055
- const stack = (0, import_utils9.arrayzeValue)(value);
1201
+ const stack = (0, import_utils8.arrayzeValue)(value);
1056
1202
  if (!isArray(stack)) return;
1057
1203
  if (stack.length > 1) {
1058
1204
  let suffix = "";
@@ -1108,3 +1254,4 @@ var getSpacingBasedOnRatio = (props, propertyName, val) => {
1108
1254
  }
1109
1255
  return getSpacingByKey(value, propertyName);
1110
1256
  };
1257
+ // @preserve-env