@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,18 +402,18 @@ __export(timing_exports, {
331
402
  getTimingFunction: () => getTimingFunction
332
403
  });
333
404
  module.exports = __toCommonJS(timing_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 deepMerge = (element, extend, excludeFrom = METHODS_EXL) => {
439
510
  for (const e in extend) {
440
511
  const hasOwnProperty = Object.prototype.hasOwnProperty.call(extend, e);
@@ -501,9 +572,84 @@ var deepClone = (obj, options = {}) => {
501
572
  return clone;
502
573
  };
503
574
 
504
- // ../../node_modules/@domql/utils/cookie.js
575
+ // ../../../domql/packages/utils/cookie.js
505
576
  var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
506
577
 
578
+ // ../../../domql/packages/event/dist/esm/keys.js
579
+ var STATE_METHODS2 = [
580
+ "update",
581
+ "parse",
582
+ "clean",
583
+ "create",
584
+ "destroy",
585
+ "add",
586
+ "toggle",
587
+ "remove",
588
+ "apply",
589
+ "set",
590
+ "reset",
591
+ "replace",
592
+ "quietReplace",
593
+ "quietUpdate",
594
+ "applyReplace",
595
+ "applyFunction",
596
+ "keys",
597
+ "values",
598
+ "ref",
599
+ "rootUpdate",
600
+ "parentUpdate",
601
+ "parent",
602
+ "__element",
603
+ "__depends",
604
+ "__ref",
605
+ "__children",
606
+ "root",
607
+ "setByPath",
608
+ "setPathCollection",
609
+ "removeByPath",
610
+ "removePathCollection",
611
+ "getByPath"
612
+ ];
613
+ var PROPS_METHODS2 = ["update", "__element"];
614
+ var METHODS2 = [
615
+ "set",
616
+ "reset",
617
+ "update",
618
+ "remove",
619
+ "updateContent",
620
+ "removeContent",
621
+ "lookup",
622
+ "lookdown",
623
+ "lookdownAll",
624
+ "getRef",
625
+ "getPath",
626
+ "setNodeStyles",
627
+ "spotByPath",
628
+ "keys",
629
+ "parse",
630
+ "setProps",
631
+ "parseDeep",
632
+ "variables",
633
+ "if",
634
+ "log",
635
+ "verbose",
636
+ "warn",
637
+ "error",
638
+ "call",
639
+ "nextElement",
640
+ "previousElement"
641
+ ];
642
+ var METHODS_EXL2 = [
643
+ ...["node", "context", "extends", "__element", "__ref"],
644
+ ...METHODS2,
645
+ ...STATE_METHODS2,
646
+ ...PROPS_METHODS2
647
+ ];
648
+
649
+ // ../../../domql/packages/event/dist/esm/globals.js
650
+ var window3 = globalThis;
651
+ var document3 = window3.document;
652
+
507
653
  // src/defaultConfig/index.js
508
654
  var defaultConfig_exports = {};
509
655
  __export(defaultConfig_exports, {
@@ -731,7 +877,7 @@ var isScalingUnit = (unit) => {
731
877
  };
732
878
 
733
879
  // src/utils/sequence.js
734
- var import_utils6 = __toESM(require_cjs(), 1);
880
+ var import_utils5 = __toESM(require_cjs(), 1);
735
881
  var numToLetterMap = {
736
882
  "-6": "U",
737
883
  "-5": "V",
@@ -870,7 +1016,7 @@ var getSequenceValue = (value = "A", sequenceProps) => {
870
1016
  useVariable
871
1017
  } = sequenceProps;
872
1018
  if (isString(value) && value.slice(0, 2) === "--") return `var(${value})`;
873
- const prefix = `--${(0, import_utils6.toDashCase)(sequenceProps.type.replace(".", "-"))}-`;
1019
+ const prefix = `--${(0, import_utils5.toDashCase)(sequenceProps.type.replace(".", "-"))}-`;
874
1020
  const startsWithDashOrLetterRegex = /^-?[a-zA-Z]/i;
875
1021
  const startsWithDashOrLetter = startsWithDashOrLetterRegex.test(value);
876
1022
  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;
@@ -972,7 +1118,7 @@ var applyTimingSequence = () => {
972
1118
  var getTimingFunction = (value) => {
973
1119
  const CONFIG2 = getActiveConfig();
974
1120
  const { TIMING: TIMING2 } = CONFIG2;
975
- return TIMING2[value] || TIMING2[(0, import_utils9.toCamelCase)(value)] || value;
1121
+ return TIMING2[value] || TIMING2[(0, import_utils8.toCamelCase)(value)] || value;
976
1122
  };
977
1123
  var getTimingByKey = (value, property = "timing") => {
978
1124
  const CONFIG2 = getActiveConfig();
@@ -983,3 +1129,4 @@ var getTimingByKey = (value, property = "timing") => {
983
1129
  TIMING2
984
1130
  );
985
1131
  };
1132
+ // @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 {
@@ -333,16 +404,16 @@ __export(typography_exports, {
333
404
  });
334
405
  module.exports = __toCommonJS(typography_exports);
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;
@@ -1057,6 +1203,7 @@ var runThroughMedia = (FACTORY2) => {
1057
1203
  }
1058
1204
  };
1059
1205
  var applyHeadings = (props) => {
1206
+ var _a;
1060
1207
  const CONFIG2 = getActiveConfig();
1061
1208
  if (props.h1Matches) {
1062
1209
  const unit = props.unit;
@@ -1065,8 +1212,9 @@ var applyHeadings = (props) => {
1065
1212
  for (const k in HEADINGS) {
1066
1213
  const headerName = `h${parseInt(k) + 1}`;
1067
1214
  const headerStyle = templates[headerName];
1215
+ if (!HEADINGS[k]) continue;
1068
1216
  templates[headerName] = {
1069
- fontSize: CONFIG2.useVariable ? `var(${HEADINGS[k].variable})` : `${HEADINGS[k].scaling}${unit}`,
1217
+ fontSize: CONFIG2.useVariable ? `var(${(_a = HEADINGS[k]) == null ? void 0 : _a.variable})` : `${HEADINGS[k].scaling}${unit}`,
1070
1218
  margin: headerStyle ? headerStyle.margin : 0,
1071
1219
  lineHeight: headerStyle ? headerStyle.lineHeight : props.lineHeight,
1072
1220
  letterSpacing: headerStyle ? headerStyle.letterSpacing : props.letterSpacing,
@@ -1092,3 +1240,4 @@ var getFontSizeByKey = (value) => {
1092
1240
  TYPOGRAPHY2
1093
1241
  );
1094
1242
  };
1243
+ // @preserve-env