remoraid 2.10.7 → 2.14.7

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.
@@ -977,7 +977,7 @@ var require_lodash = __commonJS((exports, module) => {
977
977
  }
978
978
  SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
979
979
  SetCache.prototype.has = setCacheHas;
980
- function Stack3(entries) {
980
+ function Stack4(entries) {
981
981
  var data = this.__data__ = new ListCache(entries);
982
982
  this.size = data.size;
983
983
  }
@@ -1011,11 +1011,11 @@ var require_lodash = __commonJS((exports, module) => {
1011
1011
  this.size = data.size;
1012
1012
  return this;
1013
1013
  }
1014
- Stack3.prototype.clear = stackClear;
1015
- Stack3.prototype["delete"] = stackDelete;
1016
- Stack3.prototype.get = stackGet;
1017
- Stack3.prototype.has = stackHas;
1018
- Stack3.prototype.set = stackSet;
1014
+ Stack4.prototype.clear = stackClear;
1015
+ Stack4.prototype["delete"] = stackDelete;
1016
+ Stack4.prototype.get = stackGet;
1017
+ Stack4.prototype.has = stackHas;
1018
+ Stack4.prototype.set = stackSet;
1019
1019
  function arrayLikeKeys(value, inherited) {
1020
1020
  var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes(value.length, String) : [], length = result2.length;
1021
1021
  for (var key in value) {
@@ -1131,7 +1131,7 @@ var require_lodash = __commonJS((exports, module) => {
1131
1131
  result2 = initCloneByTag(value, tag, isDeep);
1132
1132
  }
1133
1133
  }
1134
- stack || (stack = new Stack3);
1134
+ stack || (stack = new Stack4);
1135
1135
  var stacked = stack.get(value);
1136
1136
  if (stacked) {
1137
1137
  return stacked;
@@ -1400,21 +1400,21 @@ var require_lodash = __commonJS((exports, module) => {
1400
1400
  objIsObj = false;
1401
1401
  }
1402
1402
  if (isSameTag && !objIsObj) {
1403
- stack || (stack = new Stack3);
1403
+ stack || (stack = new Stack4);
1404
1404
  return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
1405
1405
  }
1406
1406
  if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
1407
1407
  var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
1408
1408
  if (objIsWrapped || othIsWrapped) {
1409
1409
  var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
1410
- stack || (stack = new Stack3);
1410
+ stack || (stack = new Stack4);
1411
1411
  return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
1412
1412
  }
1413
1413
  }
1414
1414
  if (!isSameTag) {
1415
1415
  return false;
1416
1416
  }
1417
- stack || (stack = new Stack3);
1417
+ stack || (stack = new Stack4);
1418
1418
  return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
1419
1419
  }
1420
1420
  function baseIsMap(value) {
@@ -1440,7 +1440,7 @@ var require_lodash = __commonJS((exports, module) => {
1440
1440
  return false;
1441
1441
  }
1442
1442
  } else {
1443
- var stack = new Stack3;
1443
+ var stack = new Stack4;
1444
1444
  if (customizer) {
1445
1445
  var result2 = customizer(objValue, srcValue, key, object, source, stack);
1446
1446
  }
@@ -1536,7 +1536,7 @@ var require_lodash = __commonJS((exports, module) => {
1536
1536
  return;
1537
1537
  }
1538
1538
  baseFor(source, function(srcValue, key) {
1539
- stack || (stack = new Stack3);
1539
+ stack || (stack = new Stack4);
1540
1540
  if (isObject(srcValue)) {
1541
1541
  baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
1542
1542
  } else {
@@ -5618,7 +5618,43 @@ var FrameLayoutVariant;
5618
5618
  })(FrameLayoutVariant ||= {});
5619
5619
 
5620
5620
  // src/core/lib/utils.ts
5621
+ import {
5622
+ isValidElement
5623
+ } from "react";
5621
5624
  var co = (condition, value, fallback) => condition(value) ? value : fallback;
5625
+ var isValidElementOfType = (type, value) => {
5626
+ return isValidElement(value) && value.type === type;
5627
+ };
5628
+ var getElementTypeName = (type) => {
5629
+ if (typeof type === "string") {
5630
+ return type;
5631
+ }
5632
+ if (typeof type === "function") {
5633
+ return type.displayName ?? type.name ?? "anonymous component";
5634
+ }
5635
+ return "unknown";
5636
+ };
5637
+ var asElementOfType = (type, element, additionalErrorMessage) => {
5638
+ if (isValidElementOfType(type, element)) {
5639
+ return element;
5640
+ }
5641
+ throw new TypeError(`Expected React element of type ${getElementTypeName(type)}, but received type: ${getElementTypeName(element.type)}.${additionalErrorMessage !== undefined && additionalErrorMessage.length > 0 ? ` ${additionalErrorMessage}` : ""}`);
5642
+ };
5643
+ var asChildrenOfType = (type, children, additionalErrorMessage) => {
5644
+ if (children === undefined || children === null) {
5645
+ return children;
5646
+ }
5647
+ if (Array.isArray(children)) {
5648
+ return children.map((child) => asChildrenOfType(type, child, additionalErrorMessage));
5649
+ }
5650
+ return asElementOfType(type, children, additionalErrorMessage);
5651
+ };
5652
+ var asElementOrPropsOfType = (type, elementOrProps, additionalErrorMessage) => {
5653
+ if (isValidElement(elementOrProps)) {
5654
+ return asElementOfType(type, elementOrProps, additionalErrorMessage);
5655
+ }
5656
+ return elementOrProps;
5657
+ };
5622
5658
 
5623
5659
  // src/core/components/RemoraidProvider/ThemeProvider/index.tsx
5624
5660
  import {
@@ -5820,10 +5856,10 @@ function UserExperienceProviderWrapper({
5820
5856
  initialValue
5821
5857
  }) {
5822
5858
  const [cookies, setCookie] = useCookies();
5823
- const initialUserExperience = {
5824
- ...defaultUserExperience,
5825
- ...initialValue
5826
- };
5859
+ let initialUserExperience = defaultUserExperience;
5860
+ if (typeof initialValue === "object" && typeof initialUserExperience === "object") {
5861
+ initialUserExperience = { ...initialUserExperience, ...initialValue };
5862
+ }
5827
5863
  const [userExperience, setUserExperience] = useState3(initialUserExperience);
5828
5864
  const [processedCookie, setProcessedCookie] = useState3(false);
5829
5865
  const updateUserExperience = (p) => {
@@ -6375,23 +6411,27 @@ var FrameLayout_default = Object.assign(FrameLayout, {
6375
6411
  // src/core/components/AppShell/index.tsx
6376
6412
  import { jsxDEV as jsxDEV13, Fragment as Fragment2 } from "react/jsx-dev-runtime";
6377
6413
  var defaultAppShellLayoutId = "remoraidAppShell";
6378
- var defaultProps = {
6379
- navbarVariant: null,
6380
- footerVariant: null
6381
- };
6414
+ var defaultAppShellNavbarPositions = { ["minimal" /* Minimal */]: "left" /* Left */ };
6415
+ var defaultAppShellFooterPositions = { ["minimal" /* Minimal */]: "content" /* Content */ };
6382
6416
  function AppShell(props) {
6383
6417
  const {
6384
6418
  children,
6385
6419
  navbarVariant,
6386
6420
  footerVariant,
6387
- navbarPosition,
6388
- footerPosition,
6389
6421
  appContext: appContext2,
6390
6422
  componentsProps
6391
6423
  } = {
6392
- ...defaultProps,
6424
+ navbarVariant: null,
6425
+ footerVariant: null,
6393
6426
  ...props
6394
6427
  };
6428
+ let { navbarPosition, footerPosition } = props;
6429
+ if (navbarVariant !== null && navbarPosition === undefined) {
6430
+ navbarPosition = defaultAppShellNavbarPositions[navbarVariant];
6431
+ }
6432
+ if (footerVariant !== null && footerPosition === undefined) {
6433
+ footerPosition = defaultAppShellFooterPositions[footerVariant];
6434
+ }
6395
6435
  let navbar;
6396
6436
  let footer;
6397
6437
  let navbarContainerProps = {};
@@ -6415,32 +6455,50 @@ function AppShell(props) {
6415
6455
  return /* @__PURE__ */ jsxDEV13(AppProvider, {
6416
6456
  appContext: appContext2,
6417
6457
  ...componentsProps?.AppProvider,
6418
- children: /* @__PURE__ */ jsxDEV13(FrameLayout_default, {
6419
- layoutId: defaultAppShellLayoutId,
6420
- ...componentsProps?.layout,
6421
- children: [
6422
- navbarPosition !== undefined && navbarPosition !== "content" /* Content */ && /* @__PURE__ */ jsxDEV13(FrameLayout_default.Element, {
6423
- section: navbarPosition,
6424
- componentsProps: { container: { ...navbarContainerProps } },
6425
- children: navbar
6426
- }, undefined, false, undefined, this),
6427
- footerPosition !== undefined && footerPosition !== "content" /* Content */ && /* @__PURE__ */ jsxDEV13(FrameLayout_default.Element, {
6428
- section: footerPosition,
6429
- componentsProps: { container: { ...footerContainerProps } },
6430
- children: footer
6431
- }, undefined, false, undefined, this),
6432
- navbarPosition !== undefined && navbarPosition === "content" /* Content */ && /* @__PURE__ */ jsxDEV13(Fragment2, {
6433
- children: navbar
6434
- }, undefined, false, undefined, this),
6435
- /* @__PURE__ */ jsxDEV13(Box3, {
6436
- ...componentsProps?.childrenContainer,
6437
- children
6438
- }, undefined, false, undefined, this),
6439
- footerPosition !== undefined && footerPosition === "content" /* Content */ && /* @__PURE__ */ jsxDEV13(Fragment2, {
6440
- children: footer
6441
- }, undefined, false, undefined, this)
6442
- ]
6443
- }, undefined, true, undefined, this)
6458
+ children: /* @__PURE__ */ jsxDEV13(Box3, {
6459
+ h: "100vh",
6460
+ ...componentsProps?.container,
6461
+ children: /* @__PURE__ */ jsxDEV13(FrameLayout_default, {
6462
+ layoutId: defaultAppShellLayoutId,
6463
+ ...componentsProps?.layout,
6464
+ children: [
6465
+ navbarPosition !== undefined && navbarPosition !== "content" /* Content */ && /* @__PURE__ */ jsxDEV13(FrameLayout_default.Element, {
6466
+ section: navbarPosition,
6467
+ ...componentsProps?.navbarLayoutElement,
6468
+ componentsProps: {
6469
+ ...componentsProps?.navbarLayoutElement?.componentsProps,
6470
+ container: {
6471
+ ...navbarContainerProps,
6472
+ ...componentsProps?.navbarLayoutElement?.componentsProps?.container
6473
+ }
6474
+ },
6475
+ children: navbar
6476
+ }, undefined, false, undefined, this),
6477
+ footerPosition !== undefined && footerPosition !== "content" /* Content */ && /* @__PURE__ */ jsxDEV13(FrameLayout_default.Element, {
6478
+ section: footerPosition,
6479
+ ...componentsProps?.footerLayoutElement,
6480
+ componentsProps: {
6481
+ ...componentsProps?.footerLayoutElement?.componentsProps,
6482
+ container: {
6483
+ ...footerContainerProps,
6484
+ ...componentsProps?.footerLayoutElement?.componentsProps?.container
6485
+ }
6486
+ },
6487
+ children: footer
6488
+ }, undefined, false, undefined, this),
6489
+ navbarPosition !== undefined && navbarPosition === "content" /* Content */ && /* @__PURE__ */ jsxDEV13(Fragment2, {
6490
+ children: navbar
6491
+ }, undefined, false, undefined, this),
6492
+ /* @__PURE__ */ jsxDEV13(Box3, {
6493
+ ...componentsProps?.childrenContainer,
6494
+ children
6495
+ }, undefined, false, undefined, this),
6496
+ footerPosition !== undefined && footerPosition === "content" /* Content */ && /* @__PURE__ */ jsxDEV13(Fragment2, {
6497
+ children: footer
6498
+ }, undefined, false, undefined, this)
6499
+ ]
6500
+ }, undefined, true, undefined, this)
6501
+ }, undefined, false, undefined, this)
6444
6502
  }, undefined, false, undefined, this);
6445
6503
  }
6446
6504
  var AppShell_default = Object.assign(AppShell, {
@@ -6630,7 +6688,7 @@ import {
6630
6688
  Group as Group3,
6631
6689
  Tooltip as Tooltip3
6632
6690
  } from "@mantine/core";
6633
- import React7 from "react";
6691
+ import React7, { isValidElement as isValidElement2 } from "react";
6634
6692
 
6635
6693
  // src/core/components/BadgeMinimal/index.tsx
6636
6694
  import {
@@ -6639,15 +6697,6 @@ import {
6639
6697
  Transition as Transition2
6640
6698
  } from "@mantine/core";
6641
6699
  import { jsxDEV as jsxDEV19 } from "react/jsx-dev-runtime";
6642
- var isBadgeMinimalProps = (e) => {
6643
- if (typeof e !== "object") {
6644
- return false;
6645
- }
6646
- if (!("label" in e)) {
6647
- return false;
6648
- }
6649
- return true;
6650
- };
6651
6700
  function BadgeMinimal(props) {
6652
6701
  const { label, tooltip, mounted, componentsProps } = props;
6653
6702
  const theme = useRemoraidTheme();
@@ -6679,27 +6728,30 @@ function BadgeMinimal(props) {
6679
6728
  import { jsxDEV as jsxDEV20, Fragment as Fragment3 } from "react/jsx-dev-runtime";
6680
6729
  import { createElement } from "react";
6681
6730
  function BadgeGroup({
6682
- badges,
6731
+ badges: badgesProp,
6683
6732
  gap,
6684
6733
  breakpoint,
6685
6734
  componentsProps
6686
6735
  }) {
6687
6736
  const theme = useRemoraidTheme();
6688
- const numVisibleBadges = badges.filter((e) => isBadgeMinimalProps(e) ? e.mounted !== false : true).length;
6737
+ const badges = badgesProp.map((badge) => asElementOrPropsOfType(BadgeMinimal, badge, "Check 'badges' property passed to 'BadgeGroup'."));
6738
+ const numVisibleBadges = badges.filter((badge) => isValidElementOfType(BadgeMinimal, badge) ? badge.props.mounted : badge.mounted !== false).length;
6689
6739
  return /* @__PURE__ */ jsxDEV20(Fragment3, {
6690
6740
  children: [
6691
6741
  /* @__PURE__ */ jsxDEV20(Group3, {
6692
6742
  gap: gap ?? "xs",
6693
6743
  wrap: "nowrap",
6694
6744
  visibleFrom: breakpoint ?? theme.breakpoints.badgeGroupCollapse,
6695
- children: badges.map((e, i) => {
6696
- if (isBadgeMinimalProps(e)) {
6697
- return /* @__PURE__ */ createElement(BadgeMinimal, {
6698
- ...e,
6699
- key: i
6700
- });
6701
- }
6702
- return e;
6745
+ children: badges.map((badge, i) => {
6746
+ if (isValidElementOfType(BadgeMinimal, badge)) {
6747
+ return badge;
6748
+ } else if (isValidElement2(badge)) {
6749
+ throw new TypeError(`Expected React element of type ${BadgeMinimal.name}, but received type: ${typeof badge.type === "string" ? badge.type : badge.type?.name ?? "unknown"}. Check the 'badges' property of this widget.`);
6750
+ }
6751
+ return /* @__PURE__ */ createElement(BadgeMinimal, {
6752
+ ...badge,
6753
+ key: i
6754
+ });
6703
6755
  })
6704
6756
  }, undefined, false, undefined, this),
6705
6757
  /* @__PURE__ */ jsxDEV20(Tooltip3, {
@@ -6724,17 +6776,7 @@ import {
6724
6776
  Transition as Transition3
6725
6777
  } from "@mantine/core";
6726
6778
  import { jsxDEV as jsxDEV21 } from "react/jsx-dev-runtime";
6727
- var isAlertMinimalProps = (e) => {
6728
- if (typeof e !== "object") {
6729
- return false;
6730
- }
6731
- if (!("category" in e)) {
6732
- return false;
6733
- }
6734
- return true;
6735
- };
6736
6779
  function AlertMinimal({
6737
- children,
6738
6780
  title,
6739
6781
  category,
6740
6782
  text,
@@ -6742,7 +6784,8 @@ function AlertMinimal({
6742
6784
  mounted,
6743
6785
  mt,
6744
6786
  mb,
6745
- componentsProps
6787
+ componentsProps,
6788
+ children
6746
6789
  }) {
6747
6790
  const theme = useRemoraidTheme();
6748
6791
  return /* @__PURE__ */ jsxDEV21(Transition3, {
@@ -6778,15 +6821,6 @@ import {
6778
6821
  } from "@mantine/core";
6779
6822
  import { IconClick } from "@tabler/icons-react";
6780
6823
  import { jsxDEV as jsxDEV22, Fragment as Fragment4 } from "react/jsx-dev-runtime";
6781
- var isRemoraidButtonProps = (e) => {
6782
- if (typeof e !== "object") {
6783
- return false;
6784
- }
6785
- if (!("label" in e)) {
6786
- return false;
6787
- }
6788
- return true;
6789
- };
6790
6824
  function RemoraidButton({
6791
6825
  label,
6792
6826
  responsive,
@@ -6912,7 +6946,8 @@ import {
6912
6946
  Divider as Divider3,
6913
6947
  Group as Group4,
6914
6948
  Loader,
6915
- Title
6949
+ Title,
6950
+ Stack as Stack3
6916
6951
  } from "@mantine/core";
6917
6952
  import { jsxDEV as jsxDEV24, Fragment as Fragment5 } from "react/jsx-dev-runtime";
6918
6953
  import { createElement as createElement2 } from "react";
@@ -6921,14 +6956,17 @@ function Widget({
6921
6956
  id,
6922
6957
  config,
6923
6958
  title,
6924
- badges,
6925
- buttons,
6926
- alerts,
6959
+ badges: badgesProp,
6960
+ buttons: buttonsProp,
6961
+ alerts: alertsProp,
6927
6962
  gaps,
6928
6963
  loading,
6929
6964
  mt,
6930
6965
  componentsProps
6931
6966
  }) {
6967
+ const buttons = buttonsProp?.map((button) => asElementOrPropsOfType(RemoraidButton, button, "Check the 'buttons' property of this widget."));
6968
+ const alerts = alertsProp?.map((alert) => asElementOrPropsOfType(AlertMinimal, alert, "Check the 'alerts' property of this widget."));
6969
+ const badges = badgesProp?.map((badge) => asElementOrPropsOfType(BadgeMinimal, badge, "Check the 'badges' property of this widget."));
6932
6970
  const badgesGap = (typeof gaps === "object" ? gaps.badges : gaps) ?? "xs";
6933
6971
  const buttonsGap = (typeof gaps === "object" ? gaps.buttons : gaps) ?? "xs";
6934
6972
  const alertsGap = (typeof gaps === "object" ? gaps.alerts : gaps) ?? "xs";
@@ -6969,31 +7007,37 @@ function Widget({
6969
7007
  /* @__PURE__ */ jsxDEV24(Group4, {
6970
7008
  gap: buttonsGap,
6971
7009
  wrap: "nowrap",
6972
- children: buttons !== undefined && buttons.map((e, i) => {
6973
- if (isRemoraidButtonProps(e)) {
6974
- return /* @__PURE__ */ createElement2(RemoraidButton, {
6975
- ...e,
6976
- key: i
6977
- });
7010
+ children: buttons !== undefined && buttons.map((button, i) => {
7011
+ if (isValidElementOfType(RemoraidButton, button)) {
7012
+ return button;
6978
7013
  }
6979
- return e;
7014
+ return /* @__PURE__ */ createElement2(RemoraidButton, {
7015
+ ...button,
7016
+ key: i
7017
+ });
6980
7018
  })
6981
7019
  }, undefined, false, undefined, this)
6982
7020
  ]
6983
7021
  }, undefined, true, undefined, this),
6984
7022
  /* @__PURE__ */ jsxDEV24(Divider3, {
6985
- my: "md"
7023
+ my: "md",
7024
+ ...componentsProps?.divider
6986
7025
  }, undefined, false, undefined, this),
6987
- alerts !== undefined && alerts.map((a, i) => {
6988
- if (isAlertMinimalProps(a)) {
7026
+ /* @__PURE__ */ jsxDEV24(Stack3, {
7027
+ align: "stretch",
7028
+ gap: alertsGap,
7029
+ mb: alerts && alerts.length > 0 ? "md" : 0,
7030
+ ...componentsProps?.alertsContainer,
7031
+ children: alerts?.map((alert, i) => {
7032
+ if (isValidElementOfType(AlertMinimal, alert)) {
7033
+ return alert;
7034
+ }
6989
7035
  return /* @__PURE__ */ createElement2(AlertMinimal, {
6990
- ...a,
6991
- mb: alertsGap,
7036
+ ...alert,
6992
7037
  key: i
6993
7038
  });
6994
- }
6995
- return a;
6996
- }),
7039
+ })
7040
+ }, undefined, false, undefined, this),
6997
7041
  loading ? /* @__PURE__ */ jsxDEV24(Center, {
6998
7042
  children: /* @__PURE__ */ jsxDEV24(Loader, {
6999
7043
  ...componentsProps?.loader
@@ -7194,10 +7238,11 @@ var useSettingsTableOptions = () => {
7194
7238
  return useContext10(settingsTableOptionsContext);
7195
7239
  };
7196
7240
  function SettingsTable({
7197
- children,
7198
- leftColumnWidth
7241
+ leftColumnWidth,
7242
+ children: childrenProp
7199
7243
  }) {
7200
7244
  const theme = useRemoraidTheme();
7245
+ const children = asChildrenOfType(Row, childrenProp, "Check children passed to 'SettingsTable' component.");
7201
7246
  return /* @__PURE__ */ jsxDEV30(settingsTableOptionsContext.Provider, {
7202
7247
  value: {
7203
7248
  leftColumnWidth: leftColumnWidth ?? defaultSettingsTableOptions.leftColumnWidth
@@ -7217,7 +7262,6 @@ var SettingsTable_default = Object.assign(SettingsTable, {
7217
7262
  Row
7218
7263
  });
7219
7264
  // src/core/components/NavbarSettingsWidget/index.tsx
7220
- import { cloneElement } from "react";
7221
7265
  var import_lodash = __toESM(require_lodash(), 1);
7222
7266
  import { Chip as Chip3, Group as Group6 } from "@mantine/core";
7223
7267
  import { IconLink as IconLink2 } from "@tabler/icons-react";
@@ -7245,6 +7289,7 @@ function NavbarSettingsWidget({
7245
7289
  },
7246
7290
  custom: !import_lodash.isEqual(userExperience.navbar, initialUserExperience.navbar),
7247
7291
  children: /* @__PURE__ */ jsxDEV31(SettingsTable_default, {
7292
+ ...componentsProps?.table,
7248
7293
  children: [
7249
7294
  /* @__PURE__ */ jsxDEV31(SettingsTable_default.Row, {
7250
7295
  label: "Select which pages you want to display or hide",
@@ -7275,12 +7320,60 @@ function NavbarSettingsWidget({
7275
7320
  }, undefined, false, undefined, this)
7276
7321
  }, undefined, false, undefined, this)
7277
7322
  }, "select-hidden-pages", false, undefined, this),
7278
- ...(additionalRows ?? []).map((row, i) => row.key ? row : cloneElement(row, { key: i }))
7279
- ],
7280
- ...componentsProps?.table
7281
- }, undefined, false, undefined, this)
7323
+ additionalRows && additionalRows.map((row, i) => {
7324
+ if (isValidElementOfType(SettingsTable_default.Row, row)) {
7325
+ return row;
7326
+ }
7327
+ return /* @__PURE__ */ jsxDEV31(SettingsTable_default.Row, {
7328
+ ...row
7329
+ }, i, false, undefined, this);
7330
+ })
7331
+ ]
7332
+ }, undefined, true, undefined, this)
7282
7333
  }, undefined, false, undefined, this);
7283
7334
  }
7335
+ // src/core/components/ContextClusterProvider/index.tsx
7336
+ import React8 from "react";
7337
+ import { jsxDEV as jsxDEV32 } from "react/jsx-dev-runtime";
7338
+ var createContextCluster = (generalDefaultValue, staticIds) => {
7339
+ const isStaticId = (id) => {
7340
+ if (staticIds?.find((staticId) => staticId === id)) {
7341
+ return true;
7342
+ }
7343
+ return false;
7344
+ };
7345
+ const contexts = {};
7346
+ const defaultValues = {};
7347
+ const createContext8 = (id, defaultValue) => {
7348
+ const context = React8.createContext(defaultValue ?? generalDefaultValue);
7349
+ contexts[id] = context;
7350
+ defaultValues[id] = defaultValue ?? generalDefaultValue;
7351
+ return context;
7352
+ };
7353
+ const useContext11 = (id) => {
7354
+ if (isStaticId(id)) {
7355
+ return contexts[id] ? React8.useContext(contexts[id]) : generalDefaultValue;
7356
+ }
7357
+ return contexts[id] ? React8.useContext(contexts[id]) : null;
7358
+ };
7359
+ return {
7360
+ contexts,
7361
+ defaultValues,
7362
+ generalDefaultValue,
7363
+ createContext: createContext8,
7364
+ useContext: useContext11
7365
+ };
7366
+ };
7367
+ function ContextClusterProvider({
7368
+ cluster,
7369
+ values = {},
7370
+ children
7371
+ }) {
7372
+ return Object.entries(cluster.contexts).reduceRight((t, [id, context]) => /* @__PURE__ */ jsxDEV32(context.Provider, {
7373
+ value: values[id] ?? cluster.defaultValues[id] ?? cluster.generalDefaultValue,
7374
+ children: t
7375
+ }, undefined, false, undefined, this), children);
7376
+ }
7284
7377
  export {
7285
7378
  useWidgets,
7286
7379
  useSettingsWidgetContext as useSettingsWidgetOptions,
@@ -7293,7 +7386,9 @@ export {
7293
7386
  useHydrationStatus,
7294
7387
  useHydratedMantineColorScheme,
7295
7388
  useFrameLayout,
7389
+ isValidElementOfType,
7296
7390
  isFrameLayout,
7391
+ getElementTypeName,
7297
7392
  defaultUserExperienceCookieName,
7298
7393
  defaultUserExperience,
7299
7394
  defaultSettingsWidgetContext as defaultSettingsWidgetOptions,
@@ -7301,10 +7396,17 @@ export {
7301
7396
  defaultNavbarSettingsWidgetId,
7302
7397
  defaultLayoutsContext,
7303
7398
  defaultFrameLayoutContext,
7399
+ defaultAppShellNavbarPositions,
7304
7400
  defaultAppShellLayoutId,
7401
+ defaultAppShellFooterPositions,
7305
7402
  defaultAppContext,
7306
7403
  createUserExperienceContext,
7307
7404
  createRemoraidTheme,
7405
+ createContextCluster,
7406
+ co,
7407
+ asElementOrPropsOfType,
7408
+ asElementOfType,
7409
+ asChildrenOfType,
7308
7410
  WidgetWrapper_default as WidgetWrapper,
7309
7411
  WidgetSelectionHeader,
7310
7412
  Widget,
@@ -7329,6 +7431,7 @@ export {
7329
7431
  FrameLayout_default as FrameLayout,
7330
7432
  FooterVariant,
7331
7433
  EnvironmentShell,
7434
+ ContextClusterProvider,
7332
7435
  BadgeMinimal,
7333
7436
  BadgeGroup,
7334
7437
  AppShell_default as AppShell,
@@ -9,7 +9,7 @@ interface EnvironmentShellProps {
9
9
  container?: ContainerProps3
10
10
  };
11
11
  }
12
- import { PropsWithChildren as PropsWithChildren21, ReactNode as ReactNode33 } from "react";
12
+ import { PropsWithChildren as PropsWithChildren22, ReactNode as ReactNode34 } from "react";
13
13
  interface ServerEnvironmentShellProps extends EnvironmentShellProps {}
14
- declare function EnvironmentShell2({ children, environment, message }: PropsWithChildren21<ServerEnvironmentShellProps>): ReactNode33;
14
+ declare function EnvironmentShell2({ children, environment, message }: PropsWithChildren22<ServerEnvironmentShellProps>): ReactNode34;
15
15
  export { ServerEnvironmentShellProps, EnvironmentShell2 as EnvironmentShell };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remoraid",
3
- "version": "2.10.7",
3
+ "version": "2.14.7",
4
4
  "author": "Konrad Goldammer",
5
5
  "repository": {
6
6
  "type": "git",