@symbo.ls/uikit 2.11.78 → 2.11.84

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/index.cjs.js CHANGED
@@ -89,13 +89,13 @@ var require_cjs = __commonJS({
89
89
  document: () => document4,
90
90
  global: () => global,
91
91
  self: () => self,
92
- window: () => window3
92
+ window: () => window2
93
93
  });
94
94
  module22.exports = __toCommonJS22(globals_exports);
95
95
  var global = globalThis;
96
96
  var self = globalThis;
97
- var window3 = globalThis;
98
- var document4 = window3.document;
97
+ var window2 = globalThis;
98
+ var document4 = window2.document;
99
99
  }
100
100
  });
101
101
  var require_cjs22 = __commonJS2({
@@ -464,6 +464,9 @@ var require_cjs = __commonJS({
464
464
  var array_exports = {};
465
465
  __export22(array_exports, {
466
466
  arrayContainsOtherArray: () => arrayContainsOtherArray,
467
+ createNestedObject: () => createNestedObject,
468
+ cutArrayAfterValue: () => cutArrayAfterValue,
469
+ cutArrayBeforeValue: () => cutArrayBeforeValue,
467
470
  joinArrays: () => joinArrays,
468
471
  mergeAndCloneIfArray: () => mergeAndCloneIfArray,
469
472
  mergeArray: () => mergeArray,
@@ -503,6 +506,71 @@ var require_cjs = __commonJS({
503
506
  var mergeAndCloneIfArray = (obj) => {
504
507
  return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
505
508
  };
509
+ var cutArrayBeforeValue = (arr, value) => {
510
+ const index = arr.indexOf(value);
511
+ if (index !== -1) {
512
+ return arr.slice(0, index);
513
+ }
514
+ return arr;
515
+ };
516
+ var cutArrayAfterValue = (arr, value) => {
517
+ const index = arr.indexOf(value);
518
+ if (index !== -1) {
519
+ return arr.slice(index + 1);
520
+ }
521
+ return arr;
522
+ };
523
+ var createNestedObject = (arr, lastValue) => {
524
+ let nestedObject = {};
525
+ if (arr.length === 0) {
526
+ return lastValue;
527
+ }
528
+ arr.reduce((obj, value, index) => {
529
+ if (!obj[value]) {
530
+ obj[value] = {};
531
+ }
532
+ if (index === arr.length - 1 && lastValue) {
533
+ obj[value] = lastValue;
534
+ }
535
+ return obj[value];
536
+ }, nestedObject);
537
+ return nestedObject;
538
+ };
539
+ }
540
+ });
541
+ var require_string2 = __commonJS2({
542
+ "../../node_modules/@domql/utils/dist/cjs/string.js"(exports2, module22) {
543
+ "use strict";
544
+ var __defProp22 = Object.defineProperty;
545
+ var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
546
+ var __getOwnPropNames22 = Object.getOwnPropertyNames;
547
+ var __hasOwnProp22 = Object.prototype.hasOwnProperty;
548
+ var __export22 = (target, all) => {
549
+ for (var name in all)
550
+ __defProp22(target, name, { get: all[name], enumerable: true });
551
+ };
552
+ var __copyProps22 = (to, from2, except, desc) => {
553
+ if (from2 && typeof from2 === "object" || typeof from2 === "function") {
554
+ for (let key of __getOwnPropNames22(from2))
555
+ if (!__hasOwnProp22.call(to, key) && key !== except)
556
+ __defProp22(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc22(from2, key)) || desc.enumerable });
557
+ }
558
+ return to;
559
+ };
560
+ var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
561
+ var string_exports = {};
562
+ __export22(string_exports, {
563
+ stringIncludesAny: () => stringIncludesAny
564
+ });
565
+ module22.exports = __toCommonJS22(string_exports);
566
+ var stringIncludesAny = (str, characters2) => {
567
+ for (const char2 of characters2) {
568
+ if (str.includes(char2)) {
569
+ return true;
570
+ }
571
+ }
572
+ return false;
573
+ };
506
574
  }
507
575
  });
508
576
  var require_object2 = __commonJS2({
@@ -544,15 +612,18 @@ var require_cjs = __commonJS({
544
612
  merge: () => merge5,
545
613
  mergeArrayExclude: () => mergeArrayExclude,
546
614
  mergeIfExisted: () => mergeIfExisted,
615
+ objectToString: () => objectToString,
547
616
  overwrite: () => overwrite,
548
617
  overwriteDeep: () => overwriteDeep2,
549
618
  overwriteShallow: () => overwriteShallow4,
550
- removeFromObject: () => removeFromObject
619
+ removeFromObject: () => removeFromObject,
620
+ stringToObject: () => stringToObject
551
621
  });
552
622
  module22.exports = __toCommonJS22(object_exports);
553
623
  var import_globals3 = require_cjs11();
554
624
  var import_types = require_types2();
555
625
  var import_array = require_array2();
626
+ var import_string = require_string2();
556
627
  var exec4 = (param, element, state, context) => {
557
628
  if ((0, import_types.isFunction)(param)) {
558
629
  return param(
@@ -669,6 +740,40 @@ var require_cjs = __commonJS({
669
740
  }
670
741
  return stringified;
671
742
  };
743
+ var objectToString = (obj, indent = 0) => {
744
+ const spaces = " ".repeat(indent);
745
+ let str = "{\n";
746
+ for (const [key, value] of Object.entries(obj)) {
747
+ const keyAllowdChars = (0, import_string.stringIncludesAny)(key, ["-", ":", "@", ".", "!"]);
748
+ const stringedKey = keyAllowdChars ? `'${key}'` : key;
749
+ str += `${spaces} ${stringedKey}: `;
750
+ if ((0, import_types.isArray)(value)) {
751
+ str += "[\n";
752
+ for (const element of value) {
753
+ if ((0, import_types.isObject)(element) && element !== null) {
754
+ str += `${spaces} ${objectToString(element, indent + 2)},
755
+ `;
756
+ } else if ((0, import_types.isString)(element)) {
757
+ str += `${spaces} '${element}',
758
+ `;
759
+ } else {
760
+ str += `${spaces} ${element},
761
+ `;
762
+ }
763
+ }
764
+ str += `${spaces} ]`;
765
+ } else if ((0, import_types.isObject)(value)) {
766
+ str += objectToString(value, indent + 1);
767
+ } else if ((0, import_types.isString)(value)) {
768
+ str += (0, import_string.stringIncludesAny)(value, ["\n", "'"]) ? `\`${value}\`` : `'${value}'`;
769
+ } else {
770
+ str += value;
771
+ }
772
+ str += ",\n";
773
+ }
774
+ str += `${spaces}}`;
775
+ return str;
776
+ };
672
777
  var detachFunctionsFromObject = (obj, detached = {}) => {
673
778
  for (const prop in obj) {
674
779
  const objProp = obj[prop];
@@ -739,6 +844,16 @@ var require_cjs = __commonJS({
739
844
  }
740
845
  return stringified;
741
846
  };
847
+ var stringToObject = (str) => {
848
+ let obj;
849
+ try {
850
+ obj = import_globals3.window.eval("(" + str + ")");
851
+ } catch (e) {
852
+ console.warn(e);
853
+ }
854
+ if (obj)
855
+ return obj;
856
+ };
742
857
  var diffObjects = (original, objToDiff, cache) => {
743
858
  for (const e in objToDiff) {
744
859
  if (e === "ref")
@@ -980,6 +1095,7 @@ var require_cjs = __commonJS({
980
1095
  __reExport(utils_exports2, require_array2(), module22.exports);
981
1096
  __reExport(utils_exports2, require_node2(), module22.exports);
982
1097
  __reExport(utils_exports2, require_log2(), module22.exports);
1098
+ __reExport(utils_exports2, require_string2(), module22.exports);
983
1099
  }
984
1100
  });
985
1101
  var src_exports = {};
@@ -1311,7 +1427,7 @@ var require_cjs = __commonJS({
1311
1427
  return index === 0 ? word.toLowerCase() : word.toUpperCase();
1312
1428
  }).replaceAll(/\s+/g, "");
1313
1429
  };
1314
- var toDashCase = (val) => val.replace(/[A-Z]/g, (match2, offset) => (offset > 0 ? "-" : "") + match2.toLowerCase()).replace(".", "-");
1430
+ var toDashCase = (val) => val.replace(/[^a-zA-Z0-9]/g, " ").trim().toLowerCase().replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
1315
1431
  var arrayzeValue = (val) => {
1316
1432
  if ((0, import_utils22.isString)(val))
1317
1433
  return val.split(" ");
@@ -3042,7 +3158,7 @@ var require_types = __commonJS({
3042
3158
  isNumber: () => isNumber,
3043
3159
  isObject: () => isObject7,
3044
3160
  isObjectLike: () => isObjectLike4,
3045
- isString: () => isString4,
3161
+ isString: () => isString7,
3046
3162
  isUndefined: () => isUndefined,
3047
3163
  isValidHtmlTag: () => isValidHtmlTag
3048
3164
  });
@@ -3055,7 +3171,7 @@ var require_types = __commonJS({
3055
3171
  return false;
3056
3172
  return typeof arg === "object" && arg.constructor === Object;
3057
3173
  };
3058
- var isString4 = (arg) => typeof arg === "string";
3174
+ var isString7 = (arg) => typeof arg === "string";
3059
3175
  var isNumber = (arg) => typeof arg === "number";
3060
3176
  var isFunction3 = (arg) => typeof arg === "function";
3061
3177
  var isBoolean = (arg) => arg === true || arg === false;
@@ -3067,7 +3183,7 @@ var require_types = __commonJS({
3067
3183
  return typeof arg === "object";
3068
3184
  };
3069
3185
  var isDefined = (arg) => {
3070
- return isObject7(arg) || isObjectLike4(arg) || isString4(arg) || isNumber(arg) || isFunction3(arg) || isArray7(arg) || isObjectLike4(arg) || isBoolean(arg) || isNull(arg);
3186
+ return isObject7(arg) || isObjectLike4(arg) || isString7(arg) || isNumber(arg) || isFunction3(arg) || isArray7(arg) || isObjectLike4(arg) || isBoolean(arg) || isNull(arg);
3071
3187
  };
3072
3188
  var isUndefined = (arg) => {
3073
3189
  return arg === void 0;
@@ -3076,7 +3192,7 @@ var require_types = __commonJS({
3076
3192
  boolean: isBoolean,
3077
3193
  array: isArray7,
3078
3194
  object: isObject7,
3079
- string: isString4,
3195
+ string: isString7,
3080
3196
  number: isNumber,
3081
3197
  null: isNull,
3082
3198
  function: isFunction3,
@@ -3122,6 +3238,9 @@ var require_array = __commonJS({
3122
3238
  var array_exports = {};
3123
3239
  __export2(array_exports, {
3124
3240
  arrayContainsOtherArray: () => arrayContainsOtherArray,
3241
+ createNestedObject: () => createNestedObject,
3242
+ cutArrayAfterValue: () => cutArrayAfterValue,
3243
+ cutArrayBeforeValue: () => cutArrayBeforeValue,
3125
3244
  joinArrays: () => joinArrays,
3126
3245
  mergeAndCloneIfArray: () => mergeAndCloneIfArray,
3127
3246
  mergeArray: () => mergeArray,
@@ -3161,6 +3280,73 @@ var require_array = __commonJS({
3161
3280
  var mergeAndCloneIfArray = (obj) => {
3162
3281
  return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
3163
3282
  };
3283
+ var cutArrayBeforeValue = (arr, value) => {
3284
+ const index = arr.indexOf(value);
3285
+ if (index !== -1) {
3286
+ return arr.slice(0, index);
3287
+ }
3288
+ return arr;
3289
+ };
3290
+ var cutArrayAfterValue = (arr, value) => {
3291
+ const index = arr.indexOf(value);
3292
+ if (index !== -1) {
3293
+ return arr.slice(index + 1);
3294
+ }
3295
+ return arr;
3296
+ };
3297
+ var createNestedObject = (arr, lastValue) => {
3298
+ let nestedObject = {};
3299
+ if (arr.length === 0) {
3300
+ return lastValue;
3301
+ }
3302
+ arr.reduce((obj, value, index) => {
3303
+ if (!obj[value]) {
3304
+ obj[value] = {};
3305
+ }
3306
+ if (index === arr.length - 1 && lastValue) {
3307
+ obj[value] = lastValue;
3308
+ }
3309
+ return obj[value];
3310
+ }, nestedObject);
3311
+ return nestedObject;
3312
+ };
3313
+ }
3314
+ });
3315
+
3316
+ // ../../node_modules/@domql/utils/dist/cjs/string.js
3317
+ var require_string = __commonJS({
3318
+ "../../node_modules/@domql/utils/dist/cjs/string.js"(exports, module2) {
3319
+ "use strict";
3320
+ var __defProp2 = Object.defineProperty;
3321
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
3322
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
3323
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
3324
+ var __export2 = (target, all) => {
3325
+ for (var name in all)
3326
+ __defProp2(target, name, { get: all[name], enumerable: true });
3327
+ };
3328
+ var __copyProps2 = (to, from2, except, desc) => {
3329
+ if (from2 && typeof from2 === "object" || typeof from2 === "function") {
3330
+ for (let key of __getOwnPropNames2(from2))
3331
+ if (!__hasOwnProp2.call(to, key) && key !== except)
3332
+ __defProp2(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
3333
+ }
3334
+ return to;
3335
+ };
3336
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
3337
+ var string_exports = {};
3338
+ __export2(string_exports, {
3339
+ stringIncludesAny: () => stringIncludesAny
3340
+ });
3341
+ module2.exports = __toCommonJS2(string_exports);
3342
+ var stringIncludesAny = (str, characters2) => {
3343
+ for (const char2 of characters2) {
3344
+ if (str.includes(char2)) {
3345
+ return true;
3346
+ }
3347
+ }
3348
+ return false;
3349
+ };
3164
3350
  }
3165
3351
  });
3166
3352
 
@@ -3204,15 +3390,18 @@ var require_object = __commonJS({
3204
3390
  merge: () => merge5,
3205
3391
  mergeArrayExclude: () => mergeArrayExclude,
3206
3392
  mergeIfExisted: () => mergeIfExisted,
3393
+ objectToString: () => objectToString,
3207
3394
  overwrite: () => overwrite,
3208
3395
  overwriteDeep: () => overwriteDeep,
3209
3396
  overwriteShallow: () => overwriteShallow4,
3210
- removeFromObject: () => removeFromObject
3397
+ removeFromObject: () => removeFromObject,
3398
+ stringToObject: () => stringToObject
3211
3399
  });
3212
3400
  module2.exports = __toCommonJS2(object_exports);
3213
3401
  var import_globals = require_cjs4();
3214
3402
  var import_types = require_types();
3215
3403
  var import_array = require_array();
3404
+ var import_string = require_string();
3216
3405
  var exec4 = (param, element, state, context) => {
3217
3406
  if ((0, import_types.isFunction)(param)) {
3218
3407
  return param(
@@ -3329,6 +3518,40 @@ var require_object = __commonJS({
3329
3518
  }
3330
3519
  return stringified;
3331
3520
  };
3521
+ var objectToString = (obj, indent = 0) => {
3522
+ const spaces = " ".repeat(indent);
3523
+ let str = "{\n";
3524
+ for (const [key, value] of Object.entries(obj)) {
3525
+ const keyAllowdChars = (0, import_string.stringIncludesAny)(key, ["-", ":", "@", ".", "!"]);
3526
+ const stringedKey = keyAllowdChars ? `'${key}'` : key;
3527
+ str += `${spaces} ${stringedKey}: `;
3528
+ if ((0, import_types.isArray)(value)) {
3529
+ str += "[\n";
3530
+ for (const element of value) {
3531
+ if ((0, import_types.isObject)(element) && element !== null) {
3532
+ str += `${spaces} ${objectToString(element, indent + 2)},
3533
+ `;
3534
+ } else if ((0, import_types.isString)(element)) {
3535
+ str += `${spaces} '${element}',
3536
+ `;
3537
+ } else {
3538
+ str += `${spaces} ${element},
3539
+ `;
3540
+ }
3541
+ }
3542
+ str += `${spaces} ]`;
3543
+ } else if ((0, import_types.isObject)(value)) {
3544
+ str += objectToString(value, indent + 1);
3545
+ } else if ((0, import_types.isString)(value)) {
3546
+ str += (0, import_string.stringIncludesAny)(value, ["\n", "'"]) ? `\`${value}\`` : `'${value}'`;
3547
+ } else {
3548
+ str += value;
3549
+ }
3550
+ str += ",\n";
3551
+ }
3552
+ str += `${spaces}}`;
3553
+ return str;
3554
+ };
3332
3555
  var detachFunctionsFromObject = (obj, detached = {}) => {
3333
3556
  for (const prop in obj) {
3334
3557
  const objProp = obj[prop];
@@ -3399,6 +3622,16 @@ var require_object = __commonJS({
3399
3622
  }
3400
3623
  return stringified;
3401
3624
  };
3625
+ var stringToObject = (str) => {
3626
+ let obj;
3627
+ try {
3628
+ obj = import_globals.window.eval("(" + str + ")");
3629
+ } catch (e) {
3630
+ console.warn(e);
3631
+ }
3632
+ if (obj)
3633
+ return obj;
3634
+ };
3402
3635
  var diffObjects = (original, objToDiff, cache) => {
3403
3636
  for (const e in objToDiff) {
3404
3637
  if (e === "ref")
@@ -3646,6 +3879,7 @@ var require_cjs5 = __commonJS({
3646
3879
  __reExport(utils_exports, require_array(), module2.exports);
3647
3880
  __reExport(utils_exports, require_node(), module2.exports);
3648
3881
  __reExport(utils_exports, require_log(), module2.exports);
3882
+ __reExport(utils_exports, require_string(), module2.exports);
3649
3883
  }
3650
3884
  });
3651
3885
 
@@ -4082,7 +4316,7 @@ var require_inherit = __commonJS({
4082
4316
  createChangesByKey: () => createChangesByKey,
4083
4317
  createInheritedState: () => createInheritedState,
4084
4318
  findInheritedState: () => findInheritedState,
4085
- getChildStateInKey: () => getChildStateInKey,
4319
+ getChildStateInKey: () => getChildStateInKey4,
4086
4320
  getParentStateInKey: () => getParentStateInKey,
4087
4321
  isState: () => isState4
4088
4322
  });
@@ -4101,7 +4335,7 @@ var require_inherit = __commonJS({
4101
4335
  }
4102
4336
  return parentState;
4103
4337
  };
4104
- var getChildStateInKey = (stateKey, parentState, options) => {
4338
+ var getChildStateInKey4 = (stateKey, parentState, options = {}) => {
4105
4339
  const arr = stateKey.split("/");
4106
4340
  const arrLength = arr.length - 1;
4107
4341
  for (let i = 0; i < arrLength; i++) {
@@ -4131,7 +4365,7 @@ var require_inherit = __commonJS({
4131
4365
  }
4132
4366
  if (!parentState)
4133
4367
  return;
4134
- return getChildStateInKey(stateKey, parentState, options);
4368
+ return getChildStateInKey4(stateKey, parentState, options);
4135
4369
  };
4136
4370
  var createInheritedState = (element, parent) => {
4137
4371
  const ref = element.__ref;
@@ -4281,7 +4515,7 @@ var require_updateState = __commonJS({
4281
4515
  preventUpdate: options.preventHoistElementUpdate,
4282
4516
  overwrite: !options.replace
4283
4517
  });
4284
- const hasNotUpdated = !options.preventUpdate || !options.preventHoistElementUpdate;
4518
+ const hasNotUpdated = options.preventUpdate !== true || !options.preventHoistElementUpdate;
4285
4519
  if (!options.preventStateUpdateListener && hasNotUpdated) {
4286
4520
  (0, import_event.triggerEventOnUpdate)("stateUpdated", obj, element, options);
4287
4521
  }
@@ -4297,7 +4531,7 @@ var require_updateState = __commonJS({
4297
4531
  };
4298
4532
  var applyElementUpdate = (state, obj, options) => {
4299
4533
  const element = state.__element;
4300
- if (!options.preventUpdate) {
4534
+ if (options.preventUpdate !== true) {
4301
4535
  element.update({}, {
4302
4536
  ...options,
4303
4537
  updateByState: true
@@ -6941,11 +7175,11 @@ var require_moment = __commonJS({
6941
7175
  }
6942
7176
  }
6943
7177
  var add = createAdder(1, "add"), subtract = createAdder(-1, "subtract");
6944
- function isString4(input) {
7178
+ function isString7(input) {
6945
7179
  return typeof input === "string" || input instanceof String;
6946
7180
  }
6947
7181
  function isMomentInput(input) {
6948
- return isMoment(input) || isDate(input) || isString4(input) || isNumber(input) || isNumberOrStringArray(input) || isMomentInputObject(input) || input === null || input === void 0;
7182
+ return isMoment(input) || isDate(input) || isString7(input) || isNumber(input) || isNumberOrStringArray(input) || isMomentInputObject(input) || input === null || input === void 0;
6949
7183
  }
6950
7184
  function isMomentInputObject(input) {
6951
7185
  var objectTest = isObject7(input) && !isObjectEmpty(input), propertyTest = false, properties = [
@@ -6984,7 +7218,7 @@ var require_moment = __commonJS({
6984
7218
  var arrayTest = isArray7(input), dataTypeTest = false;
6985
7219
  if (arrayTest) {
6986
7220
  dataTypeTest = input.filter(function(item) {
6987
- return !isNumber(item) && isString4(input);
7221
+ return !isNumber(item) && isString7(input);
6988
7222
  }).length === 0;
6989
7223
  }
6990
7224
  return arrayTest && dataTypeTest;
@@ -8661,8 +8895,12 @@ var require_cjs9 = __commonJS({
8661
8895
  });
8662
8896
  module2.exports = __toCommonJS2(router_exports);
8663
8897
  var import_globals = require_cjs4();
8664
- var import_utils16 = require_cjs5();
8665
- var getActiveRoute = (route = import_globals.window.location.pathname, level) => `/${route.split("/")[level + 1]}`;
8898
+ var getActiveRoute = (level = 0, route = import_globals.window.location.pathname) => {
8899
+ const routeArray = route.split("/");
8900
+ const activeRoute = routeArray[level + 1];
8901
+ if (activeRoute)
8902
+ return `/${activeRoute}`;
8903
+ };
8666
8904
  var lastPathname;
8667
8905
  var lastLevel = 0;
8668
8906
  var defaultOptions = {
@@ -8673,52 +8911,52 @@ var require_cjs9 = __commonJS({
8673
8911
  scrollToNode: false,
8674
8912
  scrollNode: import_globals.document && import_globals.document.documentElement,
8675
8913
  scrollBody: false,
8676
- scrollDocument: true,
8677
8914
  useFragment: false,
8678
8915
  updateState: true,
8679
8916
  scrollToOffset: 0,
8680
8917
  scrollToOptions: { behavior: "smooth" }
8681
8918
  };
8682
- var router = (path, element, state = {}, options = defaultOptions) => {
8683
- (0, import_utils16.merge)(options, defaultOptions);
8919
+ var router = (path, element, state = {}, passedOptions = {}) => {
8920
+ const options = { ...defaultOptions, ...passedOptions };
8684
8921
  lastLevel = options.lastLevel;
8685
8922
  const [pathname, hash2] = path.split("#");
8686
8923
  const rootNode = element.node;
8687
- const route = getActiveRoute(pathname, options.level);
8688
- const content = element.routes[route] || element.routes["/*"];
8689
- const scrollNode = options.scrollDocument ? import_globals.document.documentElement : rootNode;
8924
+ const route = getActiveRoute(options.level, pathname);
8925
+ const content = element.routes[route || "/"] || element.routes["/*"];
8926
+ const scrollNode = options.scrollToNode ? rootNode : options.scrollNode;
8690
8927
  const hashChanged = hash2 && hash2 !== import_globals.window.location.hash.slice(1);
8691
8928
  const pathChanged = pathname !== lastPathname;
8692
8929
  lastPathname = pathname;
8693
- if (content) {
8694
- if (options.pushState)
8695
- import_globals.window.history.pushState(state, null, route + (hash2 ? `#${hash2}` : ""));
8696
- if (pathChanged || !hashChanged) {
8697
- element.set({ tag: options.useFragment && "fragment", extend: content });
8698
- if (options.updateState) {
8699
- element.state.update({ route, hash: hash2 }, {
8700
- preventContentUpdate: !options.stateContentUpdate
8701
- });
8702
- }
8703
- }
8704
- if (options.scrollToTop) {
8705
- scrollNode.scrollTo({
8706
- ...options.scrollToOptions || {},
8707
- top: 0,
8708
- left: 0
8709
- });
8710
- }
8711
- if (options.scrollToNode) {
8712
- content.content.node.scrollTo({
8713
- ...options.scrollToOptions || {},
8714
- top: 0,
8715
- left: 0
8716
- });
8930
+ if (!content)
8931
+ return;
8932
+ if (options.pushState) {
8933
+ import_globals.window.history.pushState(state, null, pathname + (hash2 ? `#${hash2}` : ""));
8934
+ }
8935
+ if (pathChanged || !hashChanged) {
8936
+ if (options.updateState) {
8937
+ element.state.update({ route, hash: hash2 }, { preventContentUpdate: true });
8717
8938
  }
8939
+ element.set({
8940
+ tag: options.useFragment && "fragment",
8941
+ extend: content
8942
+ });
8943
+ }
8944
+ if (options.scrollToTop) {
8945
+ scrollNode.scrollTo({
8946
+ ...options.scrollToOptions || {},
8947
+ top: 0,
8948
+ left: 0
8949
+ });
8950
+ }
8951
+ if (options.scrollToNode) {
8952
+ content.content.node.scrollTo({
8953
+ ...options.scrollToOptions || {},
8954
+ top: 0,
8955
+ left: 0
8956
+ });
8718
8957
  }
8719
8958
  if (hash2) {
8720
8959
  const activeNode = import_globals.document.getElementById(hash2);
8721
- console.log(hash2, activeNode);
8722
8960
  if (activeNode) {
8723
8961
  const top = activeNode.getBoundingClientRect().top + rootNode.scrollTop - options.scrollToOffset || 0;
8724
8962
  scrollNode.scrollTo({
@@ -9248,7 +9486,7 @@ var require_cjs10 = __commonJS({
9248
9486
  mergeArrayExclude: () => mergeArrayExclude,
9249
9487
  mergeIfExisted: () => mergeIfExisted,
9250
9488
  overwrite: () => overwrite,
9251
- overwriteDeep: () => overwriteDeep,
9489
+ overwriteDeep: () => overwriteDeep2,
9252
9490
  overwriteShallow: () => overwriteShallow4,
9253
9491
  removeFromObject: () => removeFromObject
9254
9492
  });
@@ -9506,14 +9744,14 @@ var require_cjs10 = __commonJS({
9506
9744
  }
9507
9745
  return obj;
9508
9746
  };
9509
- var overwriteDeep = (obj, params, excludeFrom = []) => {
9747
+ var overwriteDeep2 = (obj, params, excludeFrom = []) => {
9510
9748
  for (const e in params) {
9511
9749
  if (excludeFrom.includes(e) || e.includes("__"))
9512
9750
  continue;
9513
9751
  const objProp = obj[e];
9514
9752
  const paramsProp = params[e];
9515
9753
  if ((0, import_types.isObjectLike)(objProp) && (0, import_types.isObjectLike)(paramsProp)) {
9516
- overwriteDeep(objProp, paramsProp);
9754
+ overwriteDeep2(objProp, paramsProp);
9517
9755
  } else if (paramsProp !== void 0) {
9518
9756
  obj[e] = paramsProp;
9519
9757
  }
@@ -11179,6 +11417,9 @@ var require_cjs10 = __commonJS({
11179
11417
  configReset.h6 = configTemplates.h6;
11180
11418
  }
11181
11419
  const { body, ...templates } = TYPOGRAPHY2.templates;
11420
+ const globalTheme = CONFIG22.useDocumentTheme ? getMediaTheme4("document", `@${CONFIG22.globalTheme}`) : {};
11421
+ if (RESET2.html)
11422
+ (0, import_utils24.overwriteDeep)(RESET2.html, globalTheme);
11182
11423
  return (0, import_utils24.deepMerge)((0, import_utils24.merge)(RESET2, reset), {
11183
11424
  html: {
11184
11425
  position: "absolute",
@@ -11190,8 +11431,8 @@ var require_cjs10 = __commonJS({
11190
11431
  margin: "0",
11191
11432
  WebkitFontSmoothing: "subpixel-antialiased",
11192
11433
  scrollBehavior: "smooth",
11434
+ ...globalTheme,
11193
11435
  fontSize: TYPOGRAPHY2.browserDefault + "px",
11194
- ...CONFIG22.useDocumentTheme ? getMediaTheme4("document", `@${CONFIG22.globalTheme}`) : {},
11195
11436
  fontFamily: DOCUMENT2.fontFamily,
11196
11437
  lineHeight: DOCUMENT2.lineHeight
11197
11438
  },
@@ -12366,6 +12607,12 @@ var Collection = {
12366
12607
  $setCollection: (param, el, state) => {
12367
12608
  if (!param)
12368
12609
  return;
12610
+ if ((0, import_utils2.isString)(param)) {
12611
+ if (param === "state")
12612
+ param = state.parse();
12613
+ else
12614
+ param = (0, import_state.getChildStateInKey)(param, state);
12615
+ }
12369
12616
  let data = (0, import_utils2.isArray)(param) ? param : [];
12370
12617
  if ((0, import_utils2.isObject)(param)) {
12371
12618
  for (const obj in param) {
@@ -12386,6 +12633,12 @@ var Collection = {
12386
12633
  $setStateCollection: (param, el, state) => {
12387
12634
  if (!param)
12388
12635
  return;
12636
+ if ((0, import_utils2.isString)(param)) {
12637
+ if (param === "state")
12638
+ param = state.parse();
12639
+ else
12640
+ param = (0, import_state.getChildStateInKey)(param, state);
12641
+ }
12389
12642
  if ((0, import_state.isState)(param))
12390
12643
  param = param.parse();
12391
12644
  if ((0, import_utils2.isNot)(param)("array", "object"))
@@ -12409,6 +12662,12 @@ var Collection = {
12409
12662
  $setPropsCollection: (param, el, state) => {
12410
12663
  if (!param)
12411
12664
  return;
12665
+ if ((0, import_utils2.isString)(param)) {
12666
+ if (param === "state")
12667
+ param = state.parse();
12668
+ else
12669
+ param = (0, import_state.getChildStateInKey)(param, state);
12670
+ }
12412
12671
  if ((0, import_state.isState)(param))
12413
12672
  param = param.parse();
12414
12673
  if ((0, import_utils2.isNot)(param)("array", "object"))
@@ -12622,7 +12881,7 @@ var XYZ = {
12622
12881
  var import_scratch9 = __toESM(require_cjs());
12623
12882
  var import_utils5 = __toESM(require_cjs5());
12624
12883
 
12625
- // ../../node_modules/@emotion/cache/node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.js
12884
+ // ../../node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.js
12626
12885
  function sheetForTag(tag) {
12627
12886
  if (tag.sheet) {
12628
12887
  return tag.sheet;
@@ -14917,7 +15176,6 @@ var Checkbox = {
14917
15176
  on: {
14918
15177
  render: ({ parent, node: node2 }) => {
14919
15178
  const { indeterminate } = parent.props;
14920
- console.log(indeterminate);
14921
15179
  node2.indeterminate = indeterminate;
14922
15180
  },
14923
15181
  update: ({ parent, node: node2 }) => {
@@ -15093,7 +15351,13 @@ var IconText2 = {
15093
15351
  props: {},
15094
15352
  if: ({ props: props7 }) => props7.name || props7.icon
15095
15353
  },
15096
- text: ({ props: props7 }) => props7.text
15354
+ text: ({ props: props7 }) => props7.text,
15355
+ ".reversed": {
15356
+ props: { flow: "row-reverse" }
15357
+ },
15358
+ ".vertical": {
15359
+ props: { flow: "column" }
15360
+ }
15097
15361
  };
15098
15362
 
15099
15363
  // Link/index.js