@symbo.ls/uikit 2.11.203 → 2.11.205

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
@@ -864,22 +864,28 @@ var require_cjs = __commonJS({
864
864
  delete objectized[prop];
865
865
  return stack;
866
866
  };
867
- var isEqualDeep = (param, element) => {
868
- if (param === element)
867
+ var isEqualDeep = (param, element, visited = /* @__PURE__ */ new Set()) => {
868
+ if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
869
+ return param === element;
870
+ }
871
+ if (visited.has(param) || visited.has(element)) {
869
872
  return true;
870
- if (!param || !element)
873
+ }
874
+ visited.add(param);
875
+ visited.add(element);
876
+ const keysParam = Object.keys(param);
877
+ const keysElement = Object.keys(element);
878
+ if (keysParam.length !== keysElement.length) {
871
879
  return false;
872
- for (const prop in param) {
873
- const paramProp = param[prop];
874
- const elementProp = element[prop];
875
- if ((0, import_types.isObjectLike)(paramProp)) {
876
- const isEqual = isEqualDeep(paramProp, elementProp);
877
- if (!isEqual)
878
- return false;
879
- } else {
880
- const isEqual = paramProp === elementProp;
881
- if (!isEqual)
882
- return false;
880
+ }
881
+ for (const key of keysParam) {
882
+ if (!keysElement.includes(key)) {
883
+ return false;
884
+ }
885
+ const paramProp = param[key];
886
+ const elementProp = element[key];
887
+ if (!isEqualDeep(paramProp, elementProp, visited)) {
888
+ return false;
883
889
  }
884
890
  }
885
891
  return true;
@@ -921,6 +927,7 @@ var require_cjs = __commonJS({
921
927
  var function_exports = {};
922
928
  __export22(function_exports, {
923
929
  debounce: () => debounce,
930
+ isStringFunction: () => isStringFunction,
924
931
  memoize: () => memoize2
925
932
  });
926
933
  module22.exports = __toCommonJS22(function_exports);
@@ -946,6 +953,10 @@ var require_cjs = __commonJS({
946
953
  }
947
954
  };
948
955
  };
956
+ var isStringFunction = (inputString) => {
957
+ const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
958
+ return functionRegex.test(inputString);
959
+ };
949
960
  }
950
961
  });
951
962
  var require_log2 = __commonJS2({
@@ -3758,22 +3769,28 @@ var require_object = __commonJS({
3758
3769
  delete objectized[prop];
3759
3770
  return stack;
3760
3771
  };
3761
- var isEqualDeep = (param, element) => {
3762
- if (param === element)
3772
+ var isEqualDeep = (param, element, visited = /* @__PURE__ */ new Set()) => {
3773
+ if (typeof param !== "object" || typeof element !== "object" || param === null || element === null) {
3774
+ return param === element;
3775
+ }
3776
+ if (visited.has(param) || visited.has(element)) {
3763
3777
  return true;
3764
- if (!param || !element)
3778
+ }
3779
+ visited.add(param);
3780
+ visited.add(element);
3781
+ const keysParam = Object.keys(param);
3782
+ const keysElement = Object.keys(element);
3783
+ if (keysParam.length !== keysElement.length) {
3765
3784
  return false;
3766
- for (const prop in param) {
3767
- const paramProp = param[prop];
3768
- const elementProp = element[prop];
3769
- if ((0, import_types.isObjectLike)(paramProp)) {
3770
- const isEqual = isEqualDeep(paramProp, elementProp);
3771
- if (!isEqual)
3772
- return false;
3773
- } else {
3774
- const isEqual = paramProp === elementProp;
3775
- if (!isEqual)
3776
- return false;
3785
+ }
3786
+ for (const key of keysParam) {
3787
+ if (!keysElement.includes(key)) {
3788
+ return false;
3789
+ }
3790
+ const paramProp = param[key];
3791
+ const elementProp = element[key];
3792
+ if (!isEqualDeep(paramProp, elementProp, visited)) {
3793
+ return false;
3777
3794
  }
3778
3795
  }
3779
3796
  return true;
@@ -3817,6 +3834,7 @@ var require_function = __commonJS({
3817
3834
  var function_exports = {};
3818
3835
  __export2(function_exports, {
3819
3836
  debounce: () => debounce,
3837
+ isStringFunction: () => isStringFunction,
3820
3838
  memoize: () => memoize2
3821
3839
  });
3822
3840
  module2.exports = __toCommonJS2(function_exports);
@@ -3842,6 +3860,10 @@ var require_function = __commonJS({
3842
3860
  }
3843
3861
  };
3844
3862
  };
3863
+ var isStringFunction = (inputString) => {
3864
+ const functionRegex = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
3865
+ return functionRegex.test(inputString);
3866
+ };
3845
3867
  }
3846
3868
  });
3847
3869
 
@@ -5080,6 +5102,7 @@ __export(domql_exports, {
5080
5102
  Animation: () => Animation,
5081
5103
  Avatar: () => Avatar,
5082
5104
  AvatarBundle: () => AvatarBundle,
5105
+ AvatarChooser: () => AvatarChooser,
5083
5106
  AvatarIndicator: () => AvatarIndicator,
5084
5107
  BalanceCard: () => BalanceCard,
5085
5108
  Block: () => Block,
@@ -6062,6 +6085,8 @@ var Iframe = {
6062
6085
  src: ({ props: props4 }) => props4.src,
6063
6086
  loading: ({ props: props4 }) => props4.loading,
6064
6087
  allowfullscreen: ({ props: props4 }) => props4.allowfullscreen,
6088
+ frameborder: ({ props: props4 }) => props4.frameborder,
6089
+ allow: ({ props: props4 }) => props4.allow,
6065
6090
  referrerpolicy: ({ props: props4 }) => props4.referrerpolicy
6066
6091
  }
6067
6092
  };
@@ -9292,16 +9317,14 @@ var CardLabel = {
9292
9317
  // Avatar/Avatar.js
9293
9318
  var Avatar = {
9294
9319
  extend: Img,
9295
- props: {
9320
+ props: ({ key, props: props4 }) => ({
9296
9321
  display: "block",
9297
9322
  avatarType: "initials",
9298
9323
  borderRadius: "100%",
9299
9324
  boxSize: "C+X C+X",
9300
- cursor: "pointer"
9301
- },
9302
- attr: {
9303
- src: ({ key, props: props4 }) => props4.src || `https://avatars.dicebear.com/api/${props4.avatarType || "adventurer-neutral"}/${props4.key || key}.svg`
9304
- }
9325
+ cursor: "pointer",
9326
+ src: `https://api.dicebear.com/7.x/${props4.avatarType || "adventurer-neutral"}/svg?seed=${props4.key || key}`
9327
+ })
9305
9328
  };
9306
9329
 
9307
9330
  // Avatar/AvatarIndicator.js
@@ -9334,6 +9357,62 @@ var AvatarBundle = {
9334
9357
  ...[{}, {}, {}, {}]
9335
9358
  };
9336
9359
 
9360
+ // Avatar/AvatarChooser.js
9361
+ var AvatarChooser = {
9362
+ extend: Button,
9363
+ tag: "label",
9364
+ props: {
9365
+ round: "C",
9366
+ gap: "Y",
9367
+ padding: "W2 A W2 W2",
9368
+ theme: "tertiary",
9369
+ position: "relative",
9370
+ cursor: "pointer"
9371
+ },
9372
+ Avatar: {
9373
+ props: ({ state }) => ({
9374
+ key: state.key,
9375
+ boxSize: "B1",
9376
+ pointerEvents: "none"
9377
+ })
9378
+ },
9379
+ Select: {
9380
+ props: {
9381
+ outline: "none",
9382
+ pointerEvents: "all",
9383
+ appearance: "none",
9384
+ border: "none",
9385
+ width: "100%",
9386
+ height: "100%",
9387
+ background: "none",
9388
+ color: "currentColor",
9389
+ fontSize: "A",
9390
+ lineHeight: 1,
9391
+ margin: "0 0 0 -B1+X",
9392
+ padding: "0 A 0 B1+X",
9393
+ ":focus-visible": {
9394
+ outline: "none"
9395
+ }
9396
+ },
9397
+ childExtend: { tag: "option" },
9398
+ $setPropsCollection: ({ parent, state }) => {
9399
+ if (!parent.props.options)
9400
+ return [];
9401
+ return parent.props.options.map((v) => {
9402
+ if (v.text === state.key)
9403
+ return { ...v, selected: true };
9404
+ return v;
9405
+ });
9406
+ },
9407
+ on: {
9408
+ change: (ev, { state }) => {
9409
+ state.update({ key: ev.target.value });
9410
+ console.log(state.key);
9411
+ }
9412
+ }
9413
+ }
9414
+ };
9415
+
9337
9416
  // Notification/index.js
9338
9417
  var Notification = {
9339
9418
  extend: Flex,