remoraid 2.43.2 → 2.44.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.
@@ -6047,29 +6047,72 @@ function LayoutsProvider({
6047
6047
  });
6048
6048
  }
6049
6049
 
6050
- // src/core/components/RemoraidProvider/index.tsx
6050
+ // src/core/components/RemoraidProvider/RouterProvider/index.tsx
6051
+ import {
6052
+ createContext as createContext4,
6053
+ useContext as useContext6
6054
+ } from "react";
6051
6055
  import { jsx as jsx7 } from "react/jsx-runtime";
6056
+ var defaultRouter = {
6057
+ pathname: "/",
6058
+ push: () => {}
6059
+ };
6060
+ var routerContext = createContext4(defaultRouter);
6061
+ var useRemoraidRouter = () => {
6062
+ return useContext6(routerContext);
6063
+ };
6064
+ var getWindowRouter = () => {
6065
+ if (typeof window === "undefined") {
6066
+ return defaultRouter;
6067
+ }
6068
+ return {
6069
+ pathname: window.location.pathname,
6070
+ push: (href) => {
6071
+ window.location.assign(href);
6072
+ },
6073
+ replace: (href) => {
6074
+ window.location.replace(href);
6075
+ }
6076
+ };
6077
+ };
6078
+ function RouterProvider({
6079
+ children,
6080
+ router
6081
+ }) {
6082
+ return /* @__PURE__ */ jsx7(routerContext.Provider, {
6083
+ value: router ?? getWindowRouter(),
6084
+ children
6085
+ });
6086
+ }
6087
+
6088
+ // src/core/components/RemoraidProvider/index.tsx
6089
+ import { jsx as jsx8 } from "react/jsx-runtime";
6052
6090
  function RemoraidProvider({
6053
6091
  children,
6054
6092
  theme,
6055
6093
  initialUserExperience,
6094
+ router,
6056
6095
  componentsProps
6057
6096
  }) {
6058
- return /* @__PURE__ */ jsx7(CookiesProvider, {
6097
+ return /* @__PURE__ */ jsx8(CookiesProvider, {
6059
6098
  ...componentsProps?.CookiesProvider,
6060
- children: /* @__PURE__ */ jsx7(HydrationStatusProvider, {
6061
- ...componentsProps?.HydrationStatusProviderProps,
6062
- children: /* @__PURE__ */ jsx7(ThemeProvider, {
6063
- theme,
6064
- ...componentsProps?.ThemeProvider,
6065
- children: /* @__PURE__ */ jsx7(CoreUserExperienceProvider, {
6066
- initialValue: initialUserExperience,
6067
- ...componentsProps?.CoreUserExperienceProvider,
6068
- children: /* @__PURE__ */ jsx7(WidgetsProvider, {
6069
- ...componentsProps?.WidgetsProvider,
6070
- children: /* @__PURE__ */ jsx7(LayoutsProvider, {
6071
- ...componentsProps?.LayoutsProviderProps,
6072
- children
6099
+ children: /* @__PURE__ */ jsx8(RouterProvider, {
6100
+ router,
6101
+ ...componentsProps?.RouterProvider,
6102
+ children: /* @__PURE__ */ jsx8(HydrationStatusProvider, {
6103
+ ...componentsProps?.HydrationStatusProviderProps,
6104
+ children: /* @__PURE__ */ jsx8(ThemeProvider, {
6105
+ theme,
6106
+ ...componentsProps?.ThemeProvider,
6107
+ children: /* @__PURE__ */ jsx8(CoreUserExperienceProvider, {
6108
+ initialValue: initialUserExperience,
6109
+ ...componentsProps?.CoreUserExperienceProvider,
6110
+ children: /* @__PURE__ */ jsx8(WidgetsProvider, {
6111
+ ...componentsProps?.WidgetsProvider,
6112
+ children: /* @__PURE__ */ jsx8(LayoutsProvider, {
6113
+ ...componentsProps?.LayoutsProviderProps,
6114
+ children
6115
+ })
6073
6116
  })
6074
6117
  })
6075
6118
  })
@@ -6083,8 +6126,8 @@ import { useEffect as useEffect4 } from "react";
6083
6126
 
6084
6127
  // src/core/components/AppShell/AppProvider/index.tsx
6085
6128
  var import_lodash4 = __toESM(require_lodash(), 1);
6086
- import { createContext as createContext4, useContext as useContext6 } from "react";
6087
- import { jsx as jsx8 } from "react/jsx-runtime";
6129
+ import { createContext as createContext5, useContext as useContext7 } from "react";
6130
+ import { jsx as jsx9 } from "react/jsx-runtime";
6088
6131
  var defaultAppContext = {
6089
6132
  name: "Hello, World!",
6090
6133
  nav: [],
@@ -6092,16 +6135,16 @@ var defaultAppContext = {
6092
6135
  footerVariant: "minimal" /* Minimal */,
6093
6136
  navbarMobileVariant: null
6094
6137
  };
6095
- var appContext = createContext4(defaultAppContext);
6138
+ var appContext = createContext5(defaultAppContext);
6096
6139
  var useRemoraidApp = () => {
6097
- return useContext6(appContext);
6140
+ return useContext7(appContext);
6098
6141
  };
6099
6142
  function AppProvider({
6100
6143
  appContext: appContextProp,
6101
6144
  children
6102
6145
  }) {
6103
6146
  const { logo, ...appContextPropWithoutLogo } = appContextProp;
6104
- return /* @__PURE__ */ jsx8(appContext.Provider, {
6147
+ return /* @__PURE__ */ jsx9(appContext.Provider, {
6105
6148
  value: { ...import_lodash4.merge(defaultAppContext, appContextPropWithoutLogo), logo },
6106
6149
  children
6107
6150
  });
@@ -6112,7 +6155,7 @@ var import_lodash13 = __toESM(require_lodash(), 1);
6112
6155
 
6113
6156
  // src/core/components/AppShell/AppShellUserExperienceProvider/index.tsx
6114
6157
  var import_lodash12 = __toESM(require_lodash(), 1);
6115
- import { useContext as useContext9 } from "react";
6158
+ import { useContext as useContext10 } from "react";
6116
6159
 
6117
6160
  // src/core/components/AppShell/Footer/FooterMinimal/index.tsx
6118
6161
  import { Center } from "@mantine/core";
@@ -6145,7 +6188,7 @@ function clsx() {
6145
6188
  var clsx_default = clsx;
6146
6189
 
6147
6190
  // src/core/components/Page/PageContainer/index.tsx
6148
- import { jsx as jsx9 } from "react/jsx-runtime";
6191
+ import { jsx as jsx10 } from "react/jsx-runtime";
6149
6192
  function PageContainer({
6150
6193
  children,
6151
6194
  p = 0,
@@ -6153,7 +6196,7 @@ function PageContainer({
6153
6196
  componentsProps
6154
6197
  }) {
6155
6198
  const theme = useRemoraidTheme();
6156
- return /* @__PURE__ */ jsx9(Container, {
6199
+ return /* @__PURE__ */ jsx10(Container, {
6157
6200
  size: theme.containerSize,
6158
6201
  p,
6159
6202
  w: "100%",
@@ -6171,14 +6214,14 @@ import {
6171
6214
  Stack
6172
6215
  } from "@mantine/core";
6173
6216
  import {
6174
- createContext as createContext6,
6217
+ createContext as createContext7,
6175
6218
  useCallback,
6176
- useContext as useContext8,
6219
+ useContext as useContext9,
6177
6220
  useMemo as useMemo3
6178
6221
  } from "react";
6179
6222
 
6180
6223
  // src/core/components/FrameLayout/Element/index.tsx
6181
- import { createContext as createContext5, useContext as useContext7 } from "react";
6224
+ import { createContext as createContext6, useContext as useContext8 } from "react";
6182
6225
  import { Box, Portal } from "@mantine/core";
6183
6226
 
6184
6227
  // src/core/lib/errors.ts
@@ -6191,10 +6234,10 @@ class InvalidComponentUsageError extends Error {
6191
6234
 
6192
6235
  // src/core/components/FrameLayout/Element/index.tsx
6193
6236
  var import_lodash5 = __toESM(require_lodash(), 1);
6194
- import { jsx as jsx10 } from "react/jsx-runtime";
6195
- var layoutElementContext = createContext5(null);
6237
+ import { jsx as jsx11 } from "react/jsx-runtime";
6238
+ var layoutElementContext = createContext6(null);
6196
6239
  var useFrameLayoutElement = () => {
6197
- return useContext7(layoutElementContext);
6240
+ return useContext8(layoutElementContext);
6198
6241
  };
6199
6242
  function Element2({
6200
6243
  section,
@@ -6224,17 +6267,17 @@ function Element2({
6224
6267
  if (section === "left" /* Left */ || section === "right" /* Right */) {
6225
6268
  containerProps.h = "100%";
6226
6269
  }
6227
- const element = includePageContainer ? /* @__PURE__ */ jsx10(PageContainer, {
6270
+ const element = includePageContainer ? /* @__PURE__ */ jsx11(PageContainer, {
6228
6271
  p: 0,
6229
6272
  hidden,
6230
6273
  ...componentsProps?.PageContainer,
6231
6274
  children
6232
6275
  }) : children;
6233
- return /* @__PURE__ */ jsx10(Portal, {
6276
+ return /* @__PURE__ */ jsx11(Portal, {
6234
6277
  target: layout.sections[section],
6235
- children: /* @__PURE__ */ jsx10(layoutElementContext.Provider, {
6278
+ children: /* @__PURE__ */ jsx11(layoutElementContext.Provider, {
6236
6279
  value: { layoutType: "frame" /* Frame */, section },
6237
- children: includeContainer ? /* @__PURE__ */ jsx10(Box, {
6280
+ children: includeContainer ? /* @__PURE__ */ jsx11(Box, {
6238
6281
  "data-hidden": hidden,
6239
6282
  ...import_lodash5.merge(containerProps, componentsProps?.container),
6240
6283
  className: clsx_default("remoraid-frame-layout-element", containerProps?.className, componentsProps?.container?.className),
@@ -6245,10 +6288,10 @@ function Element2({
6245
6288
  }
6246
6289
 
6247
6290
  // src/core/components/FrameLayout/index.tsx
6248
- import { jsx as jsx11, jsxs } from "react/jsx-runtime";
6249
- var layoutContext = createContext6(null);
6291
+ import { jsx as jsx12, jsxs } from "react/jsx-runtime";
6292
+ var layoutContext = createContext7(null);
6250
6293
  var useFrameLayout = () => {
6251
- return useContext8(layoutContext);
6294
+ return useContext9(layoutContext);
6252
6295
  };
6253
6296
  function FrameLayout({
6254
6297
  layoutId,
@@ -6305,7 +6348,7 @@ function FrameLayout({
6305
6348
  ["content" /* Content */]: n
6306
6349
  }));
6307
6350
  }, [setSections]);
6308
- const contentSection = /* @__PURE__ */ jsx11(Stack, {
6351
+ const contentSection = /* @__PURE__ */ jsx12(Stack, {
6309
6352
  ref: contentSectionRef,
6310
6353
  h: "100%",
6311
6354
  gap: gutter,
@@ -6320,7 +6363,7 @@ function FrameLayout({
6320
6363
  ...layout,
6321
6364
  layoutId
6322
6365
  }), [layout?.sections, defaultSections, layoutId]);
6323
- return /* @__PURE__ */ jsx11(layoutContext.Provider, {
6366
+ return /* @__PURE__ */ jsx12(layoutContext.Provider, {
6324
6367
  value: layoutContextValue,
6325
6368
  children: /* @__PURE__ */ jsxs(Group, {
6326
6369
  gap: 0,
@@ -6333,7 +6376,7 @@ function FrameLayout({
6333
6376
  },
6334
6377
  className: clsx_default("remoraid-frame-layout", componentsProps?.horizontalContainer?.className),
6335
6378
  children: [
6336
- /* @__PURE__ */ jsx11(Group, {
6379
+ /* @__PURE__ */ jsx12(Group, {
6337
6380
  ref: leftSectionRef,
6338
6381
  h: "100%",
6339
6382
  wrap: "nowrap",
@@ -6349,19 +6392,19 @@ function FrameLayout({
6349
6392
  ...componentsProps?.verticalContainer,
6350
6393
  className: clsx_default("remoraid-frame-layout-vertical-container", componentsProps?.verticalContainer?.className),
6351
6394
  children: [
6352
- /* @__PURE__ */ jsx11(Stack, {
6395
+ /* @__PURE__ */ jsx12(Stack, {
6353
6396
  ref: topSectionRef,
6354
6397
  gap: gutter,
6355
6398
  flex: 0,
6356
6399
  ...componentsProps?.sectionContainers?.["top" /* Top */],
6357
6400
  className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-top-section", componentsProps?.sectionContainers?.["top" /* Top */]?.className)
6358
6401
  }),
6359
- includeScrollArea ? /* @__PURE__ */ jsx11(ScrollArea, {
6402
+ includeScrollArea ? /* @__PURE__ */ jsx12(ScrollArea, {
6360
6403
  flex: 1,
6361
6404
  ...componentsProps?.ScrollArea,
6362
6405
  children: contentSection
6363
6406
  }) : contentSection,
6364
- /* @__PURE__ */ jsx11(Stack, {
6407
+ /* @__PURE__ */ jsx12(Stack, {
6365
6408
  ref: bottomSectionRef,
6366
6409
  gap: gutter,
6367
6410
  flex: 0,
@@ -6370,7 +6413,7 @@ function FrameLayout({
6370
6413
  })
6371
6414
  ]
6372
6415
  }),
6373
- /* @__PURE__ */ jsx11(Group, {
6416
+ /* @__PURE__ */ jsx12(Group, {
6374
6417
  ref: rightSectionRef,
6375
6418
  h: "100%",
6376
6419
  gap: gutter,
@@ -6388,7 +6431,7 @@ var FrameLayout_default = Object.assign(FrameLayout, {
6388
6431
  });
6389
6432
 
6390
6433
  // src/core/components/AppShell/Footer/FooterMinimal/index.tsx
6391
- import { jsx as jsx12 } from "react/jsx-runtime";
6434
+ import { jsx as jsx13 } from "react/jsx-runtime";
6392
6435
  function FooterMinimal({
6393
6436
  icon: Icon2 = IconPennant,
6394
6437
  componentsProps
@@ -6399,10 +6442,10 @@ function FooterMinimal({
6399
6442
  footer: { position }
6400
6443
  }
6401
6444
  } = useAppShellUserExperience();
6402
- const content = /* @__PURE__ */ jsx12(PageContainer, {
6445
+ const content = /* @__PURE__ */ jsx13(PageContainer, {
6403
6446
  ...componentsProps?.container,
6404
- children: /* @__PURE__ */ jsx12(Center, {
6405
- children: /* @__PURE__ */ jsx12(Icon2, {
6447
+ children: /* @__PURE__ */ jsx13(Center, {
6448
+ children: /* @__PURE__ */ jsx13(Icon2, {
6406
6449
  color: "var(--mantine-color-default-border)",
6407
6450
  ...theme.componentsProps.icons.huge,
6408
6451
  ...componentsProps?.icon
@@ -6410,7 +6453,7 @@ function FooterMinimal({
6410
6453
  })
6411
6454
  });
6412
6455
  if (position === "bottom" /* Bottom */) {
6413
- return /* @__PURE__ */ jsx12(FrameLayout_default.Element, {
6456
+ return /* @__PURE__ */ jsx13(FrameLayout_default.Element, {
6414
6457
  section: position,
6415
6458
  includeContainer: true,
6416
6459
  ...componentsProps?.layoutElement,
@@ -6425,7 +6468,7 @@ function FooterMinimal({
6425
6468
  }
6426
6469
 
6427
6470
  // src/core/components/AppShell/Footer/index.tsx
6428
- import { jsx as jsx13 } from "react/jsx-runtime";
6471
+ import { jsx as jsx14 } from "react/jsx-runtime";
6429
6472
  var supportedFooterPositions = {
6430
6473
  ["minimal" /* Minimal */]: [
6431
6474
  null,
@@ -6439,7 +6482,7 @@ var defaultFooterPositions = {
6439
6482
  function Footer({ componentsProps }) {
6440
6483
  const { footerVariant } = useRemoraidApp();
6441
6484
  if (footerVariant === "minimal" /* Minimal */) {
6442
- return /* @__PURE__ */ jsx13(FooterMinimal, {
6485
+ return /* @__PURE__ */ jsx14(FooterMinimal, {
6443
6486
  ...componentsProps?.FooterMinimal
6444
6487
  });
6445
6488
  }
@@ -6453,7 +6496,6 @@ var Footer_default = Object.assign(Footer, {
6453
6496
  import { useState as useState7 } from "react";
6454
6497
 
6455
6498
  // src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
6456
- import { isValidElement as isValidElement4 } from "react";
6457
6499
  import {
6458
6500
  Box as Box3,
6459
6501
  Group as Group2,
@@ -6461,7 +6503,6 @@ import {
6461
6503
  ScrollArea as ScrollArea2,
6462
6504
  Stack as Stack2
6463
6505
  } from "@mantine/core";
6464
- import { usePathname as usePathname2, useRouter as useRouter2 } from "next/navigation";
6465
6506
  var import_lodash8 = __toESM(require_lodash(), 1);
6466
6507
 
6467
6508
  // src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/NavigationMenu/index.tsx
@@ -6471,9 +6512,8 @@ import {
6471
6512
  Transition,
6472
6513
  useMantineTheme as useMantineTheme2
6473
6514
  } from "@mantine/core";
6474
- import { usePathname, useRouter } from "next/navigation";
6475
6515
  import { isValidElement as isValidElement2 } from "react";
6476
- import { jsx as jsx14, jsxs as jsxs2 } from "react/jsx-runtime";
6516
+ import { jsx as jsx15, jsxs as jsxs2 } from "react/jsx-runtime";
6477
6517
  function NavigationMenu({
6478
6518
  target,
6479
6519
  elements,
@@ -6482,13 +6522,13 @@ function NavigationMenu({
6482
6522
  }) {
6483
6523
  const theme = useRemoraidTheme();
6484
6524
  const mantineTheme = useMantineTheme2();
6485
- const pathname = usePathname();
6486
- const router = useRouter();
6487
- const item = (element) => /* @__PURE__ */ jsx14(Transition, {
6525
+ const router = useRemoraidRouter();
6526
+ const { pathname } = router;
6527
+ const item = (element) => /* @__PURE__ */ jsx15(Transition, {
6488
6528
  mounted: element.mounted ?? true,
6489
6529
  ...componentsProps?.transition,
6490
- children: (transitionStyle) => /* @__PURE__ */ jsx14(Menu.Item, {
6491
- leftSection: element.icon ? /* @__PURE__ */ jsx14(element.icon, {
6530
+ children: (transitionStyle) => /* @__PURE__ */ jsx15(Menu.Item, {
6531
+ leftSection: element.icon ? /* @__PURE__ */ jsx15(element.icon, {
6492
6532
  ...theme.componentsProps.icons.small
6493
6533
  }) : undefined,
6494
6534
  c: element.type === "anchor" /* Anchor */ && element.href === pathname ? mantineTheme.primaryColor : undefined,
@@ -6512,17 +6552,17 @@ function NavigationMenu({
6512
6552
  trigger: "click-hover",
6513
6553
  ...componentsProps?.Menu,
6514
6554
  children: [
6515
- /* @__PURE__ */ jsx14(Menu.Target, {
6516
- children: /* @__PURE__ */ jsx14(Box2, {
6555
+ /* @__PURE__ */ jsx15(Menu.Target, {
6556
+ children: /* @__PURE__ */ jsx15(Box2, {
6517
6557
  children: targetElement
6518
6558
  })
6519
6559
  }),
6520
6560
  /* @__PURE__ */ jsxs2(Menu.Dropdown, {
6521
6561
  children: [
6522
- label !== undefined && /* @__PURE__ */ jsx14(Menu.Label, {
6562
+ label !== undefined && /* @__PURE__ */ jsx15(Menu.Label, {
6523
6563
  children: label
6524
6564
  }),
6525
- elements.map((element, i) => /* @__PURE__ */ jsx14(NavigationMenu, {
6565
+ elements.map((element, i) => /* @__PURE__ */ jsx15(NavigationMenu, {
6526
6566
  target: item(element),
6527
6567
  elements: element.children,
6528
6568
  componentsProps
@@ -6548,7 +6588,7 @@ import { IconClick } from "@tabler/icons-react";
6548
6588
  import {
6549
6589
  isValidElement as isValidElement3
6550
6590
  } from "react";
6551
- import { jsx as jsx15, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
6591
+ import { jsx as jsx16, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
6552
6592
  var defaultRemoraidButtonSize = "sm";
6553
6593
  function RemoraidButton({
6554
6594
  label,
@@ -6572,7 +6612,7 @@ function RemoraidButton({
6572
6612
  const collapsed = collapsedProp ?? false;
6573
6613
  const iconSize = iconSizeProp ?? getDefaultButtonIconSize(size);
6574
6614
  const Icon3 = iconProp ?? IconClick;
6575
- const iconElement = isValidElement3(Icon3) ? Icon3 : /* @__PURE__ */ jsx15(Icon3, {
6615
+ const iconElement = isValidElement3(Icon3) ? Icon3 : /* @__PURE__ */ jsx16(Icon3, {
6576
6616
  ...import_lodash7.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
6577
6617
  });
6578
6618
  const clickTransformationClassNames = {
@@ -6585,7 +6625,7 @@ function RemoraidButton({
6585
6625
  ["tiltRight" /* TiltRight */]: "remoraid-button-tilt-right"
6586
6626
  };
6587
6627
  const clickTransformationClass = clickTransformationClassNames[clickTransformation];
6588
- return /* @__PURE__ */ jsx15(Transition2, {
6628
+ return /* @__PURE__ */ jsx16(Transition2, {
6589
6629
  mounted,
6590
6630
  transition: "fade",
6591
6631
  duration: theme.transitionDurations.short,
@@ -6593,10 +6633,10 @@ function RemoraidButton({
6593
6633
  ...componentsProps?.transition,
6594
6634
  children: (transitionStyle) => /* @__PURE__ */ jsxs3(Fragment, {
6595
6635
  children: [
6596
- /* @__PURE__ */ jsx15(Tooltip, {
6636
+ /* @__PURE__ */ jsx16(Tooltip, {
6597
6637
  label,
6598
6638
  ...componentsProps?.tooltip,
6599
- children: /* @__PURE__ */ jsx15(ActionIcon, {
6639
+ children: /* @__PURE__ */ jsx16(ActionIcon, {
6600
6640
  "aria-label": label,
6601
6641
  variant,
6602
6642
  onClick,
@@ -6612,7 +6652,7 @@ function RemoraidButton({
6612
6652
  children: iconElement
6613
6653
  })
6614
6654
  }),
6615
- /* @__PURE__ */ jsx15(Button, {
6655
+ /* @__PURE__ */ jsx16(Button, {
6616
6656
  onClick,
6617
6657
  loading,
6618
6658
  variant,
@@ -6633,8 +6673,7 @@ function RemoraidButton({
6633
6673
  }
6634
6674
 
6635
6675
  // src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
6636
- import Image from "next/image";
6637
- import { jsx as jsx16, jsxs as jsxs4 } from "react/jsx-runtime";
6676
+ import { jsx as jsx17, jsxs as jsxs4 } from "react/jsx-runtime";
6638
6677
  function NavbarMinimalContent({
6639
6678
  orientation,
6640
6679
  maxElements,
@@ -6644,8 +6683,8 @@ function NavbarMinimalContent({
6644
6683
  const theme = useRemoraidTheme();
6645
6684
  const { userExperience: appShellUserExperience } = useAppShellUserExperience();
6646
6685
  const app = useRemoraidApp();
6647
- const router = useRouter2();
6648
- const pathname = usePathname2();
6686
+ const router = useRemoraidRouter();
6687
+ const { pathname } = router;
6649
6688
  const layoutElement = useFrameLayoutElement();
6650
6689
  const { colorScheme, setColorScheme } = useHydratedMantineColorScheme();
6651
6690
  const collapseStaticElementsBreakpoint = collapseStaticElementsBreakpointProp ?? theme.breakpoints.navbarStaticElementsCollapse;
@@ -6666,21 +6705,10 @@ function NavbarMinimalContent({
6666
6705
  buttonCollapsed = false;
6667
6706
  }
6668
6707
  const buttonClickTransformation = orientation === "horizontal" /* Horizontal */ ? "tiltRight" /* TiltRight */ : "default" /* Default */;
6669
- const logoButtonSize = componentsProps?.logoButton?.size ?? componentsProps?.button?.size ?? defaultRemoraidButtonSize;
6670
- const logoIconSize = getDefaultButtonIconSize(logoButtonSize);
6671
- const logoButton = app.logo ? /* @__PURE__ */ jsx16(RemoraidButton, {
6708
+ const logoButton = app.logo ? /* @__PURE__ */ jsx17(RemoraidButton, {
6672
6709
  label: app.name,
6673
6710
  variant: "subtle",
6674
- icon: isValidElement4(app.logo) || isIcon(app.logo) ? app.logo : /* @__PURE__ */ jsx16(Image, {
6675
- src: app.logo,
6676
- alt: "App logo",
6677
- ...componentsProps?.logo,
6678
- style: {
6679
- width: theme.componentsProps.icons[logoIconSize].size,
6680
- height: theme.componentsProps.icons[logoIconSize].size,
6681
- ...componentsProps?.logo?.style
6682
- }
6683
- }),
6711
+ icon: app.logo,
6684
6712
  responsive: buttonResponsive,
6685
6713
  collapsed: buttonCollapsed,
6686
6714
  clickTransformation: buttonClickTransformation,
@@ -6698,9 +6726,9 @@ function NavbarMinimalContent({
6698
6726
  componentsProps?.logoButton?.onClick?.(e);
6699
6727
  }
6700
6728
  }) : undefined;
6701
- const button = (element, key) => /* @__PURE__ */ jsx16(NavigationMenu, {
6729
+ const button = (element, key) => /* @__PURE__ */ jsx17(NavigationMenu, {
6702
6730
  label: element.label,
6703
- target: /* @__PURE__ */ jsx16(RemoraidButton, {
6731
+ target: /* @__PURE__ */ jsx17(RemoraidButton, {
6704
6732
  mounted: element.mounted,
6705
6733
  label: element.label,
6706
6734
  icon: element.icon,
@@ -6743,11 +6771,11 @@ function NavbarMinimalContent({
6743
6771
  const staticElements = elements.filter((element) => element.static);
6744
6772
  const staticButtons = staticElements.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0)).map((element, i) => button(element, `static-nav-element-${i}`));
6745
6773
  const collapseStaticElements = staticElements.filter((element) => element.mounted ?? true).length > 1;
6746
- const staticMenuButton = collapseStaticElements ? /* @__PURE__ */ jsx16(Box3, {
6774
+ const staticMenuButton = collapseStaticElements ? /* @__PURE__ */ jsx17(Box3, {
6747
6775
  hiddenFrom: collapseStaticElementsBreakpoint,
6748
- children: /* @__PURE__ */ jsx16(NavigationMenu, {
6776
+ children: /* @__PURE__ */ jsx17(NavigationMenu, {
6749
6777
  elements: staticElements,
6750
- target: /* @__PURE__ */ jsx16(RemoraidButton, {
6778
+ target: /* @__PURE__ */ jsx17(RemoraidButton, {
6751
6779
  label: "Static elements",
6752
6780
  icon: IconDots,
6753
6781
  responsive: orientation === "vertical" /* Vertical */ ? buttonResponsive : false,
@@ -6768,7 +6796,7 @@ function NavbarMinimalContent({
6768
6796
  }, componentsProps?.NavigationMenu?.componentsProps)
6769
6797
  })
6770
6798
  }) : null;
6771
- return /* @__PURE__ */ jsx16(Paper, {
6799
+ return /* @__PURE__ */ jsx17(Paper, {
6772
6800
  bg: theme.transparentBackground,
6773
6801
  h: "100%",
6774
6802
  p: "md",
@@ -6778,13 +6806,13 @@ function NavbarMinimalContent({
6778
6806
  h: "100%",
6779
6807
  children: [
6780
6808
  logoButton,
6781
- /* @__PURE__ */ jsx16(ScrollArea2, {
6809
+ /* @__PURE__ */ jsx17(ScrollArea2, {
6782
6810
  flex: 1,
6783
- children: /* @__PURE__ */ jsx16(Stack2, {
6811
+ children: /* @__PURE__ */ jsx17(Stack2, {
6784
6812
  children: buttons
6785
6813
  })
6786
6814
  }),
6787
- /* @__PURE__ */ jsx16(Stack2, {
6815
+ /* @__PURE__ */ jsx17(Stack2, {
6788
6816
  visibleFrom: collapseStaticElements ? collapseStaticElementsBreakpoint : undefined,
6789
6817
  children: staticButtons
6790
6818
  }),
@@ -6794,15 +6822,15 @@ function NavbarMinimalContent({
6794
6822
  wrap: "nowrap",
6795
6823
  children: [
6796
6824
  logoButton,
6797
- /* @__PURE__ */ jsx16(ScrollArea2, {
6825
+ /* @__PURE__ */ jsx17(ScrollArea2, {
6798
6826
  flex: 1,
6799
6827
  style: { contain: "inline-size" },
6800
- children: /* @__PURE__ */ jsx16(Group2, {
6828
+ children: /* @__PURE__ */ jsx17(Group2, {
6801
6829
  wrap: "nowrap",
6802
6830
  children: buttons
6803
6831
  })
6804
6832
  }),
6805
- /* @__PURE__ */ jsx16(Group2, {
6833
+ /* @__PURE__ */ jsx17(Group2, {
6806
6834
  wrap: "nowrap",
6807
6835
  visibleFrom: collapseStaticElements ? collapseStaticElementsBreakpoint : undefined,
6808
6836
  children: staticButtons
@@ -6834,7 +6862,7 @@ import {
6834
6862
  } from "@mantine/core";
6835
6863
  import { IconClick as IconClick2 } from "@tabler/icons-react";
6836
6864
  var import_lodash9 = __toESM(require_lodash(), 1);
6837
- import { jsx as jsx17 } from "react/jsx-runtime";
6865
+ import { jsx as jsx18 } from "react/jsx-runtime";
6838
6866
  function ControlButton({
6839
6867
  icon: Icon4 = IconClick2,
6840
6868
  mounted = true,
@@ -6847,17 +6875,17 @@ function ControlButton({
6847
6875
  componentsProps
6848
6876
  }) {
6849
6877
  const theme = useRemoraidTheme();
6850
- return /* @__PURE__ */ jsx17(Transition3, {
6878
+ return /* @__PURE__ */ jsx18(Transition3, {
6851
6879
  mounted,
6852
6880
  transition: "fade",
6853
6881
  duration: theme.transitionDurations.short,
6854
6882
  timingFunction: "ease",
6855
6883
  ...componentsProps?.transition,
6856
- children: (transitionStyle) => /* @__PURE__ */ jsx17(Tooltip2, {
6884
+ children: (transitionStyle) => /* @__PURE__ */ jsx18(Tooltip2, {
6857
6885
  label: tooltip,
6858
6886
  disabled: !Boolean(tooltip),
6859
6887
  ...componentsProps?.tooltip,
6860
- children: /* @__PURE__ */ jsx17(ActionIcon2, {
6888
+ children: /* @__PURE__ */ jsx18(ActionIcon2, {
6861
6889
  "data-control-button": true,
6862
6890
  size,
6863
6891
  color,
@@ -6868,7 +6896,7 @@ function ControlButton({
6868
6896
  order,
6869
6897
  ...import_lodash9.merge(transitionStyle, componentsProps?.button?.style)
6870
6898
  },
6871
- children: /* @__PURE__ */ jsx17(Icon4, {
6899
+ children: /* @__PURE__ */ jsx18(Icon4, {
6872
6900
  ...import_lodash9.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
6873
6901
  })
6874
6902
  })
@@ -6885,7 +6913,7 @@ import {
6885
6913
  } from "@mantine/core";
6886
6914
  import { IconGripHorizontal } from "@tabler/icons-react";
6887
6915
  var import_lodash10 = __toESM(require_lodash(), 1);
6888
- import { jsx as jsx18, jsxs as jsxs5 } from "react/jsx-runtime";
6916
+ import { jsx as jsx19, jsxs as jsxs5 } from "react/jsx-runtime";
6889
6917
  function Controls({
6890
6918
  groupRef,
6891
6919
  mounted = true,
@@ -6943,14 +6971,14 @@ function Controls({
6943
6971
  const handlePointerUp = (e) => {
6944
6972
  e.currentTarget.releasePointerCapture(e.pointerId);
6945
6973
  };
6946
- return /* @__PURE__ */ jsx18(Transition4, {
6974
+ return /* @__PURE__ */ jsx19(Transition4, {
6947
6975
  mounted,
6948
6976
  keepMounted: true,
6949
6977
  transition: "pop",
6950
6978
  duration: theme.transitionDurations.short,
6951
6979
  timingFunction: "ease",
6952
6980
  ...componentsProps?.transition,
6953
- children: (transitionStyle) => /* @__PURE__ */ jsx18(Paper2, {
6981
+ children: (transitionStyle) => /* @__PURE__ */ jsx19(Paper2, {
6954
6982
  ref: containerRef,
6955
6983
  pos: "absolute",
6956
6984
  p: gutter,
@@ -6973,7 +7001,7 @@ function Controls({
6973
7001
  ...componentsProps?.group,
6974
7002
  className: clsx_default("remoraid-controls-group", componentsProps?.group?.className),
6975
7003
  children: [
6976
- /* @__PURE__ */ jsx18(IconGripHorizontal, {
7004
+ /* @__PURE__ */ jsx19(IconGripHorizontal, {
6977
7005
  ...import_lodash10.merge({}, theme.componentsProps.icons[iconSize], { order: -100, color: "var(--mantine-color-default-border)" }, componentsProps?.gripIcon)
6978
7006
  }),
6979
7007
  children,
@@ -6981,7 +7009,7 @@ function Controls({
6981
7009
  if (isValidElementOfType(ControlButton, button)) {
6982
7010
  return button;
6983
7011
  }
6984
- return /* @__PURE__ */ jsx18(ControlButton, {
7012
+ return /* @__PURE__ */ jsx19(ControlButton, {
6985
7013
  ...button
6986
7014
  }, i);
6987
7015
  })
@@ -6992,7 +7020,7 @@ function Controls({
6992
7020
  }
6993
7021
 
6994
7022
  // src/core/components/Pinnable/index.tsx
6995
- import { jsx as jsx19, jsxs as jsxs6 } from "react/jsx-runtime";
7023
+ import { jsx as jsx20, jsxs as jsxs6 } from "react/jsx-runtime";
6996
7024
  function Pinnable({
6997
7025
  layoutType: layoutTypeProp,
6998
7026
  section,
@@ -7012,7 +7040,7 @@ function Pinnable({
7012
7040
  if (layout && layout.type !== layoutType) {
7013
7041
  throw new TypeError(`Prop 'layoutId' in '${Pinnable.name}' refers to a layout of type ${layout.type}, expected ${layoutType}. Leave 'layoutId' undefined, if you want to use the layout in '${AppShell_default.name}' as reference layout.`);
7014
7042
  }
7015
- const controlButton = useMemo4(() => /* @__PURE__ */ jsx19(ControlButton, {
7043
+ const controlButton = useMemo4(() => /* @__PURE__ */ jsx20(ControlButton, {
7016
7044
  icon: pinned ? IconPinnedOff : IconPin,
7017
7045
  tooltip: pinned ? "Unpin" : "Pin",
7018
7046
  color: "green",
@@ -7031,11 +7059,11 @@ function Pinnable({
7031
7059
  ...componentsProps?.container,
7032
7060
  className: clsx_default("remoraid-pinnable", componentsProps?.container?.className),
7033
7061
  children: [
7034
- controlsContainer === undefined ? /* @__PURE__ */ jsx19(Controls, {
7062
+ controlsContainer === undefined ? /* @__PURE__ */ jsx20(Controls, {
7035
7063
  dragContainerRef: containerRef,
7036
7064
  ...componentsProps?.controls,
7037
7065
  children: controlButton
7038
- }) : controlsContainer !== null && /* @__PURE__ */ jsx19(Portal2, {
7066
+ }) : controlsContainer !== null && /* @__PURE__ */ jsx20(Portal2, {
7039
7067
  target: controlsContainer,
7040
7068
  children: controlButton
7041
7069
  }),
@@ -7049,7 +7077,7 @@ function Pinnable({
7049
7077
  return null;
7050
7078
  }
7051
7079
  if (pinned && layoutType === "frame" /* Frame */) {
7052
- return /* @__PURE__ */ jsx19(FrameLayout_default.Element, {
7080
+ return /* @__PURE__ */ jsx20(FrameLayout_default.Element, {
7053
7081
  layoutId,
7054
7082
  section,
7055
7083
  hidden,
@@ -7061,7 +7089,7 @@ function Pinnable({
7061
7089
  }
7062
7090
 
7063
7091
  // src/core/components/AppShell/Navbar/NavbarMinimal/index.tsx
7064
- import { jsx as jsx20 } from "react/jsx-runtime";
7092
+ import { jsx as jsx21 } from "react/jsx-runtime";
7065
7093
  function NavbarMinimal({
7066
7094
  pinnable = true,
7067
7095
  componentsProps
@@ -7079,7 +7107,7 @@ function NavbarMinimal({
7079
7107
  setHover(false);
7080
7108
  };
7081
7109
  if (position === "left" /* Left */ || position === "right" /* Right */) {
7082
- return /* @__PURE__ */ jsx20(FrameLayout_default.Element, {
7110
+ return /* @__PURE__ */ jsx21(FrameLayout_default.Element, {
7083
7111
  section: position,
7084
7112
  includeContainer: true,
7085
7113
  ...componentsProps?.layoutElement,
@@ -7090,19 +7118,19 @@ function NavbarMinimal({
7090
7118
  }
7091
7119
  }
7092
7120
  }, componentsProps?.layoutElement?.componentsProps),
7093
- children: /* @__PURE__ */ jsx20(NavbarMinimalContent, {
7121
+ children: /* @__PURE__ */ jsx21(NavbarMinimalContent, {
7094
7122
  orientation: "vertical" /* Vertical */,
7095
7123
  ...componentsProps?.content
7096
7124
  })
7097
7125
  });
7098
7126
  }
7099
7127
  if (position === "top" /* Top */ || position === "bottom" /* Bottom */) {
7100
- const content = /* @__PURE__ */ jsx20(NavbarMinimalContent, {
7128
+ const content = /* @__PURE__ */ jsx21(NavbarMinimalContent, {
7101
7129
  orientation: "horizontal" /* Horizontal */,
7102
7130
  ...componentsProps?.content
7103
7131
  });
7104
7132
  if (pinnable) {
7105
- return /* @__PURE__ */ jsx20(PageContainer, {
7133
+ return /* @__PURE__ */ jsx21(PageContainer, {
7106
7134
  ...componentsProps?.container,
7107
7135
  componentsProps: {
7108
7136
  ...componentsProps?.container?.componentsProps,
@@ -7111,7 +7139,7 @@ function NavbarMinimal({
7111
7139
  className: clsx_default("hide-if-empty", componentsProps?.container?.componentsProps?.container?.className)
7112
7140
  }
7113
7141
  },
7114
- children: /* @__PURE__ */ jsx20(Pinnable, {
7142
+ children: /* @__PURE__ */ jsx21(Pinnable, {
7115
7143
  section: position,
7116
7144
  initialValue: true,
7117
7145
  ...componentsProps?.Pinnable,
@@ -7154,9 +7182,9 @@ function NavbarMinimal({
7154
7182
  return content;
7155
7183
  }
7156
7184
  if (position === "content" /* Content */) {
7157
- return /* @__PURE__ */ jsx20(PageContainer, {
7185
+ return /* @__PURE__ */ jsx21(PageContainer, {
7158
7186
  ...componentsProps?.container,
7159
- children: /* @__PURE__ */ jsx20(NavbarMinimalContent, {
7187
+ children: /* @__PURE__ */ jsx21(NavbarMinimalContent, {
7160
7188
  orientation: "horizontal" /* Horizontal */,
7161
7189
  ...componentsProps?.content
7162
7190
  })
@@ -7167,7 +7195,7 @@ function NavbarMinimal({
7167
7195
 
7168
7196
  // src/core/components/AppShell/Navbar/index.tsx
7169
7197
  import { IconLogin, IconLogout, IconMoon, IconSun } from "@tabler/icons-react";
7170
- import { jsx as jsx21 } from "react/jsx-runtime";
7198
+ import { jsx as jsx22 } from "react/jsx-runtime";
7171
7199
  var supportedNavbarPositions = {
7172
7200
  ["minimal" /* Minimal */]: [
7173
7201
  null,
@@ -7215,21 +7243,21 @@ var getDefaultNavigationElements = ({
7215
7243
  }
7216
7244
  }
7217
7245
  ];
7218
- function Navbar2({ componentsProps }) {
7246
+ function Navbar({ componentsProps }) {
7219
7247
  const { navbarVariant } = useRemoraidApp();
7220
7248
  if (navbarVariant === "minimal" /* Minimal */) {
7221
- return /* @__PURE__ */ jsx21(NavbarMinimal, {
7249
+ return /* @__PURE__ */ jsx22(NavbarMinimal, {
7222
7250
  ...componentsProps?.NavbarMinimal
7223
7251
  });
7224
7252
  }
7225
7253
  return null;
7226
7254
  }
7227
- var Navbar_default = Object.assign(Navbar2, {
7255
+ var Navbar_default = Object.assign(Navbar, {
7228
7256
  NavbarMinimal
7229
7257
  });
7230
7258
 
7231
7259
  // src/core/components/AppShell/AppShellUserExperienceProvider/index.tsx
7232
- import { jsx as jsx22 } from "react/jsx-runtime";
7260
+ import { jsx as jsx23 } from "react/jsx-runtime";
7233
7261
  var defaultAppShellUserExperience = {
7234
7262
  navbar: {
7235
7263
  position: null,
@@ -7243,7 +7271,7 @@ var defaultAppShellUserExperience = {
7243
7271
  var defaultAppShellUserExperienceCookieName = "remoraid-app-shell-user-experience";
7244
7272
  var appShellUserExperienceContext = createUserExperienceContext(defaultAppShellUserExperience);
7245
7273
  var useAppShellUserExperience = () => {
7246
- return useContext9(appShellUserExperienceContext);
7274
+ return useContext10(appShellUserExperienceContext);
7247
7275
  };
7248
7276
  function AppShellUserExperienceProvider({
7249
7277
  children,
@@ -7266,7 +7294,7 @@ function AppShellUserExperienceProvider({
7266
7294
  }
7267
7295
  return true;
7268
7296
  };
7269
- return /* @__PURE__ */ jsx22(UserExperienceProviderWrapper, {
7297
+ return /* @__PURE__ */ jsx23(UserExperienceProviderWrapper, {
7270
7298
  context: appShellUserExperienceContext,
7271
7299
  isValidUserExperience,
7272
7300
  cookieName: cookieName ?? defaultAppShellUserExperienceCookieName,
@@ -7284,7 +7312,7 @@ function AppShellUserExperienceProvider({
7284
7312
  }
7285
7313
 
7286
7314
  // src/core/components/AppShell/index.tsx
7287
- import { jsx as jsx23, jsxs as jsxs7 } from "react/jsx-runtime";
7315
+ import { jsx as jsx24, jsxs as jsxs7 } from "react/jsx-runtime";
7288
7316
  var remoraidAppShellLayoutId = "remoraid-app-shell";
7289
7317
  function AppShell({
7290
7318
  gutter,
@@ -7308,13 +7336,13 @@ function AppShell({
7308
7336
  }
7309
7337
  meta.content = computedBodyColor;
7310
7338
  }, [colorScheme]);
7311
- return /* @__PURE__ */ jsx23(AppProvider, {
7339
+ return /* @__PURE__ */ jsx24(AppProvider, {
7312
7340
  appContext: appContext2,
7313
7341
  ...componentsProps?.AppProvider,
7314
- children: /* @__PURE__ */ jsx23(AppShellUserExperienceProvider, {
7342
+ children: /* @__PURE__ */ jsx24(AppShellUserExperienceProvider, {
7315
7343
  ...componentsProps?.AppShellUserExperienceProvider,
7316
7344
  initialValue: import_lodash13.merge(initialUserExperience, componentsProps?.AppShellUserExperienceProvider?.initialValue),
7317
- children: /* @__PURE__ */ jsx23(Box5, {
7345
+ children: /* @__PURE__ */ jsx24(Box5, {
7318
7346
  h: "100dvh",
7319
7347
  ...componentsProps?.container,
7320
7348
  children: /* @__PURE__ */ jsxs7(FrameLayout_default, {
@@ -7322,11 +7350,11 @@ function AppShell({
7322
7350
  gutter: gutter ?? theme.primaryGutter,
7323
7351
  ...componentsProps?.layout,
7324
7352
  children: [
7325
- /* @__PURE__ */ jsx23(Navbar_default, {
7353
+ /* @__PURE__ */ jsx24(Navbar_default, {
7326
7354
  ...componentsProps?.navbar
7327
7355
  }),
7328
7356
  children,
7329
- /* @__PURE__ */ jsx23(Footer_default, {
7357
+ /* @__PURE__ */ jsx24(Footer_default, {
7330
7358
  ...componentsProps?.footer
7331
7359
  })
7332
7360
  ]
@@ -7352,15 +7380,14 @@ import {
7352
7380
 
7353
7381
  // src/core/components/Page/index.tsx
7354
7382
  import { Stack as Stack3 } from "@mantine/core";
7355
- import React7, {
7356
- useContext as useContext10,
7383
+ import React8, {
7384
+ useContext as useContext11,
7357
7385
  useEffect as useEffect5
7358
7386
  } from "react";
7359
- import { usePathname as usePathname3 } from "next/navigation";
7360
- import { jsx as jsx24 } from "react/jsx-runtime";
7361
- var pageContext = React7.createContext(null);
7387
+ import { jsx as jsx25 } from "react/jsx-runtime";
7388
+ var pageContext = React8.createContext(null);
7362
7389
  var usePage = () => {
7363
- return useContext10(pageContext);
7390
+ return useContext11(pageContext);
7364
7391
  };
7365
7392
  function Page({
7366
7393
  children,
@@ -7370,7 +7397,7 @@ function Page({
7370
7397
  componentsProps
7371
7398
  }) {
7372
7399
  const theme = useRemoraidTheme();
7373
- const pathname = usePathname3();
7400
+ const { pathname } = useRemoraidRouter();
7374
7401
  const { isPageRegistered, registerPage } = useWidgets();
7375
7402
  const pageId = config?.pageId ?? pathname;
7376
7403
  useEffect5(() => {
@@ -7380,11 +7407,11 @@ function Page({
7380
7407
  }
7381
7408
  }
7382
7409
  }, []);
7383
- return /* @__PURE__ */ jsx24(pageContext.Provider, {
7410
+ return /* @__PURE__ */ jsx25(pageContext.Provider, {
7384
7411
  value: { name: name ?? pathname, pageId, ...config },
7385
- children: /* @__PURE__ */ jsx24(PageContainer, {
7412
+ children: /* @__PURE__ */ jsx25(PageContainer, {
7386
7413
  ...componentsProps?.PageContainer,
7387
- children: /* @__PURE__ */ jsx24(Stack3, {
7414
+ children: /* @__PURE__ */ jsx25(Stack3, {
7388
7415
  gap: gap ?? theme.primaryGutter,
7389
7416
  ...componentsProps?.Stack,
7390
7417
  className: clsx_default("remoraid-page", componentsProps?.Stack?.className),
@@ -7404,7 +7431,7 @@ import {
7404
7431
  Flex,
7405
7432
  ScrollArea as ScrollArea3
7406
7433
  } from "@mantine/core";
7407
- import { jsx as jsx25 } from "react/jsx-runtime";
7434
+ import { jsx as jsx26 } from "react/jsx-runtime";
7408
7435
  function ScrollableChipGroup({
7409
7436
  value,
7410
7437
  ref,
@@ -7413,16 +7440,16 @@ function ScrollableChipGroup({
7413
7440
  componentsProps,
7414
7441
  children
7415
7442
  }) {
7416
- return /* @__PURE__ */ jsx25(ScrollArea3, {
7443
+ return /* @__PURE__ */ jsx26(ScrollArea3, {
7417
7444
  ref,
7418
7445
  ...componentsProps?.ScrollArea,
7419
7446
  style: { contain: "inline-size", ...componentsProps?.ScrollArea?.style },
7420
- children: /* @__PURE__ */ jsx25(Chip.Group, {
7447
+ children: /* @__PURE__ */ jsx26(Chip.Group, {
7421
7448
  value,
7422
7449
  onChange,
7423
7450
  ...componentsProps?.chipGroup,
7424
7451
  multiple: true,
7425
- children: /* @__PURE__ */ jsx25(Flex, {
7452
+ children: /* @__PURE__ */ jsx26(Flex, {
7426
7453
  justify: "flex-start",
7427
7454
  align: "center",
7428
7455
  gap,
@@ -7436,7 +7463,7 @@ function ScrollableChipGroup({
7436
7463
 
7437
7464
  // src/core/components/WidgetSelectionHeader/index.tsx
7438
7465
  var import_lodash14 = __toESM(require_lodash(), 1);
7439
- import { jsx as jsx26, jsxs as jsxs8 } from "react/jsx-runtime";
7466
+ import { jsx as jsx27, jsxs as jsxs8 } from "react/jsx-runtime";
7440
7467
  function WidgetSelectionHeader({
7441
7468
  title,
7442
7469
  pinnableSection = "top" /* Top */,
@@ -7486,15 +7513,15 @@ function WidgetSelectionHeader({
7486
7513
  },
7487
7514
  className: clsx_default(!pinnableSection ? "remoraid-non-widget-segment" : undefined, !pinnableSection ? "remoraid-segment" : undefined, componentsProps?.container?.className),
7488
7515
  children: [
7489
- /* @__PURE__ */ jsx26(Text, {
7516
+ /* @__PURE__ */ jsx27(Text, {
7490
7517
  size: "md",
7491
7518
  ...componentsProps?.title,
7492
7519
  children: title ?? page.name
7493
7520
  }),
7494
- /* @__PURE__ */ jsx26(Divider, {
7521
+ /* @__PURE__ */ jsx27(Divider, {
7495
7522
  orientation: "vertical"
7496
7523
  }),
7497
- isPageRegistered(page.pageId) && /* @__PURE__ */ jsx26(ScrollableChipGroup, {
7524
+ isPageRegistered(page.pageId) && /* @__PURE__ */ jsx27(ScrollableChipGroup, {
7498
7525
  value: selectedWidgets,
7499
7526
  ref: scrollAreaRef,
7500
7527
  ...componentsProps?.ScrollableChipGroup,
@@ -7511,15 +7538,15 @@ function WidgetSelectionHeader({
7511
7538
  trigger: "hover",
7512
7539
  ...componentsProps?.widgetMenu,
7513
7540
  children: [
7514
- /* @__PURE__ */ jsx26(Menu2.Target, {
7515
- children: /* @__PURE__ */ jsx26(Box6, {
7516
- children: /* @__PURE__ */ jsx26(Chip2, {
7541
+ /* @__PURE__ */ jsx27(Menu2.Target, {
7542
+ children: /* @__PURE__ */ jsx27(Box6, {
7543
+ children: /* @__PURE__ */ jsx27(Chip2, {
7517
7544
  variant: selectedWidgets.includes(widgetId) ? "filled" : "outline",
7518
7545
  color: activeWidget === widgetId ? mantineTheme.primaryColor : "gray",
7519
7546
  value: widgetId,
7520
7547
  size: "sm",
7521
7548
  disabled: disabledWidgets?.includes(widgetId),
7522
- icon: /* @__PURE__ */ jsx26(IconCheck, {
7549
+ icon: /* @__PURE__ */ jsx27(IconCheck, {
7523
7550
  ...theme.componentsProps.icons.extraSmall
7524
7551
  }),
7525
7552
  ...componentsProps?.Chip,
@@ -7535,8 +7562,8 @@ function WidgetSelectionHeader({
7535
7562
  }),
7536
7563
  /* @__PURE__ */ jsxs8(Menu2.Dropdown, {
7537
7564
  children: [
7538
- /* @__PURE__ */ jsx26(Menu2.Item, {
7539
- leftSection: /* @__PURE__ */ jsx26(IconNavigation, {
7565
+ /* @__PURE__ */ jsx27(Menu2.Item, {
7566
+ leftSection: /* @__PURE__ */ jsx27(IconNavigation, {
7540
7567
  ...theme.componentsProps.icons.small
7541
7568
  }),
7542
7569
  onClick: () => {
@@ -7546,8 +7573,8 @@ function WidgetSelectionHeader({
7546
7573
  disabled: !widget.selected,
7547
7574
  children: "Scroll to widget"
7548
7575
  }),
7549
- /* @__PURE__ */ jsx26(Menu2.Item, {
7550
- leftSection: /* @__PURE__ */ jsx26(IconFocus, {
7576
+ /* @__PURE__ */ jsx27(Menu2.Item, {
7577
+ leftSection: /* @__PURE__ */ jsx27(IconFocus, {
7551
7578
  ...theme.componentsProps.icons.small
7552
7579
  }),
7553
7580
  onClick: () => {
@@ -7585,7 +7612,7 @@ function WidgetSelectionHeader({
7585
7612
  });
7586
7613
  }, [activeWidget]);
7587
7614
  if (pinnableSection) {
7588
- return /* @__PURE__ */ jsx26(Pinnable, {
7615
+ return /* @__PURE__ */ jsx27(Pinnable, {
7589
7616
  section: pinnableSection,
7590
7617
  initialValue: initiallyPinned,
7591
7618
  ...componentsProps?.Pinnable,
@@ -7634,7 +7661,7 @@ import {
7634
7661
  Stack as Stack4,
7635
7662
  Transition as Transition6
7636
7663
  } from "@mantine/core";
7637
- import React8 from "react";
7664
+ import React9 from "react";
7638
7665
 
7639
7666
  // src/core/components/BadgeMinimal/index.tsx
7640
7667
  import {
@@ -7642,7 +7669,7 @@ import {
7642
7669
  Tooltip as Tooltip3,
7643
7670
  Transition as Transition5
7644
7671
  } from "@mantine/core";
7645
- import { jsx as jsx27 } from "react/jsx-runtime";
7672
+ import { jsx as jsx28 } from "react/jsx-runtime";
7646
7673
  function BadgeMinimal({
7647
7674
  label,
7648
7675
  tooltip,
@@ -7650,17 +7677,17 @@ function BadgeMinimal({
7650
7677
  componentsProps
7651
7678
  }) {
7652
7679
  const theme = useRemoraidTheme();
7653
- return /* @__PURE__ */ jsx27(Transition5, {
7680
+ return /* @__PURE__ */ jsx28(Transition5, {
7654
7681
  mounted,
7655
7682
  transition: "fade",
7656
7683
  duration: theme.transitionDurations.short,
7657
7684
  timingFunction: "ease",
7658
7685
  ...componentsProps?.transition,
7659
- children: (transitionStyle) => /* @__PURE__ */ jsx27(Tooltip3, {
7686
+ children: (transitionStyle) => /* @__PURE__ */ jsx28(Tooltip3, {
7660
7687
  label: tooltip,
7661
7688
  disabled: !Boolean(tooltip),
7662
7689
  ...componentsProps?.tooltip,
7663
- children: /* @__PURE__ */ jsx27(Badge, {
7690
+ children: /* @__PURE__ */ jsx28(Badge, {
7664
7691
  variant: "default",
7665
7692
  ...componentsProps?.badge,
7666
7693
  style: {
@@ -7676,7 +7703,7 @@ function BadgeMinimal({
7676
7703
 
7677
7704
  // src/core/components/BadgeGroup/index.tsx
7678
7705
  var import_lodash15 = __toESM(require_lodash(), 1);
7679
- import { jsx as jsx28, jsxs as jsxs9, Fragment as Fragment2 } from "react/jsx-runtime";
7706
+ import { jsx as jsx29, jsxs as jsxs9, Fragment as Fragment2 } from "react/jsx-runtime";
7680
7707
  import { createElement } from "react";
7681
7708
  function BadgeGroup({
7682
7709
  badges: badgesProp,
@@ -7699,7 +7726,7 @@ function BadgeGroup({
7699
7726
  });
7700
7727
  return /* @__PURE__ */ jsxs9(Fragment2, {
7701
7728
  children: [
7702
- /* @__PURE__ */ jsx28(Group4, {
7729
+ /* @__PURE__ */ jsx29(Group4, {
7703
7730
  gap,
7704
7731
  wrap: "nowrap",
7705
7732
  visibleFrom: numVisibleBadges > 1 ? breakpoint : undefined,
@@ -7707,7 +7734,7 @@ function BadgeGroup({
7707
7734
  className: clsx_default("hide-if-empty", componentsProps?.container?.className),
7708
7735
  children: badgesElement
7709
7736
  }),
7710
- /* @__PURE__ */ jsx28(Transition6, {
7737
+ /* @__PURE__ */ jsx29(Transition6, {
7711
7738
  mounted: numVisibleBadges > 1,
7712
7739
  transition: "fade",
7713
7740
  duration: theme.transitionDurations.short,
@@ -7716,7 +7743,7 @@ function BadgeGroup({
7716
7743
  children: (transitionStyle) => /* @__PURE__ */ jsxs9(HoverCard, {
7717
7744
  ...componentsProps?.HoverCard,
7718
7745
  children: [
7719
- /* @__PURE__ */ jsx28(HoverCard.Target, {
7746
+ /* @__PURE__ */ jsx29(HoverCard.Target, {
7720
7747
  children: /* @__PURE__ */ jsxs9(Badge2, {
7721
7748
  hiddenFrom: breakpoint,
7722
7749
  variant: "dot",
@@ -7731,9 +7758,9 @@ function BadgeGroup({
7731
7758
  ]
7732
7759
  })
7733
7760
  }),
7734
- /* @__PURE__ */ jsx28(HoverCard.Dropdown, {
7761
+ /* @__PURE__ */ jsx29(HoverCard.Dropdown, {
7735
7762
  p: gap,
7736
- children: /* @__PURE__ */ jsx28(Stack4, {
7763
+ children: /* @__PURE__ */ jsx29(Stack4, {
7737
7764
  gap,
7738
7765
  ...componentsProps?.hoverContainer,
7739
7766
  children: badgesElement
@@ -7748,7 +7775,7 @@ function BadgeGroup({
7748
7775
  // src/core/components/AlertMinimal/index.tsx
7749
7776
  import { Alert, Transition as Transition7 } from "@mantine/core";
7750
7777
  var import_lodash16 = __toESM(require_lodash(), 1);
7751
- import { jsx as jsx29, jsxs as jsxs10 } from "react/jsx-runtime";
7778
+ import { jsx as jsx30, jsxs as jsxs10 } from "react/jsx-runtime";
7752
7779
  function AlertMinimal({
7753
7780
  category,
7754
7781
  children,
@@ -7765,7 +7792,7 @@ function AlertMinimal({
7765
7792
  iconSize = "small" /* Small */,
7766
7793
  componentsProps
7767
7794
  } = import_lodash16.merge({}, theme.componentsProps.alerts[category], props);
7768
- return /* @__PURE__ */ jsx29(Transition7, {
7795
+ return /* @__PURE__ */ jsx30(Transition7, {
7769
7796
  mounted,
7770
7797
  transition: "fade",
7771
7798
  duration: theme.transitionDurations.short,
@@ -7777,7 +7804,7 @@ function AlertMinimal({
7777
7804
  variant: "light",
7778
7805
  onClose,
7779
7806
  withCloseButton: onClose !== undefined,
7780
- icon: Icon4 ? /* @__PURE__ */ jsx29(Icon4, {
7807
+ icon: Icon4 ? /* @__PURE__ */ jsx30(Icon4, {
7781
7808
  ...import_lodash16.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
7782
7809
  }) : undefined,
7783
7810
  style: import_lodash16.merge(transitionStyle, componentsProps?.alert?.style),
@@ -7798,7 +7825,7 @@ import {
7798
7825
  } from "react";
7799
7826
  import { IconX } from "@tabler/icons-react";
7800
7827
  var import_lodash17 = __toESM(require_lodash(), 1);
7801
- import { jsx as jsx30, jsxs as jsxs11 } from "react/jsx-runtime";
7828
+ import { jsx as jsx31, jsxs as jsxs11 } from "react/jsx-runtime";
7802
7829
  function WidgetWrapper({
7803
7830
  config,
7804
7831
  mt = 0,
@@ -7837,7 +7864,7 @@ function WidgetWrapper({
7837
7864
  updateActiveWidget(null);
7838
7865
  };
7839
7866
  const mounted = Boolean(widget?.selected);
7840
- let element = /* @__PURE__ */ jsx30(Transition8, {
7867
+ let element = /* @__PURE__ */ jsx31(Transition8, {
7841
7868
  mounted,
7842
7869
  transition: "fade-left",
7843
7870
  duration: theme.transitionDurations.medium,
@@ -7872,12 +7899,12 @@ function WidgetWrapper({
7872
7899
  className: clsx_default("remoraid-segment", componentsProps?.container?.className),
7873
7900
  id: config.widgetId,
7874
7901
  children: [
7875
- /* @__PURE__ */ jsx30(Controls, {
7902
+ /* @__PURE__ */ jsx31(Controls, {
7876
7903
  dragContainerRef: containerRef,
7877
7904
  groupRef: controlsContainerRef,
7878
7905
  mounted: activeWidget === config.widgetId,
7879
7906
  ...componentsProps?.controls,
7880
- children: /* @__PURE__ */ jsx30(ControlButton, {
7907
+ children: /* @__PURE__ */ jsx31(ControlButton, {
7881
7908
  mounted: withCloseButton,
7882
7909
  icon: IconX,
7883
7910
  tooltip: "Hide widget",
@@ -7906,7 +7933,7 @@ function WidgetWrapper({
7906
7933
  })
7907
7934
  });
7908
7935
  if (pinnableSection !== undefined) {
7909
- element = /* @__PURE__ */ jsx30(Pinnable, {
7936
+ element = /* @__PURE__ */ jsx31(Pinnable, {
7910
7937
  section: pinnableSection,
7911
7938
  controlsContainer,
7912
7939
  hidden: Boolean(widget?.hidden),
@@ -7954,7 +7981,7 @@ import {
7954
7981
  } from "@mantine/core";
7955
7982
  import { Children } from "react";
7956
7983
  var import_lodash18 = __toESM(require_lodash(), 1);
7957
- import { jsx as jsx31, jsxs as jsxs12 } from "react/jsx-runtime";
7984
+ import { jsx as jsx32, jsxs as jsxs12 } from "react/jsx-runtime";
7958
7985
  import { createElement as createElement2 } from "react";
7959
7986
  function Widget({
7960
7987
  id,
@@ -7977,7 +8004,7 @@ function Widget({
7977
8004
  const badgesGap = (typeof gaps === "object" ? gaps.badges : gaps) ?? "xs";
7978
8005
  const buttonsGap = (typeof gaps === "object" ? gaps.buttons : gaps) ?? "xs";
7979
8006
  const alertsGap = (typeof gaps === "object" ? gaps.alerts : gaps) ?? "xs";
7980
- return /* @__PURE__ */ jsx31(WidgetWrapper, {
8007
+ return /* @__PURE__ */ jsx32(WidgetWrapper, {
7981
8008
  config: {
7982
8009
  widgetId: id,
7983
8010
  ...config,
@@ -8005,23 +8032,23 @@ function Widget({
8005
8032
  gap: badgesGap,
8006
8033
  wrap: "nowrap",
8007
8034
  children: [
8008
- /* @__PURE__ */ jsx31(Title, {
8035
+ /* @__PURE__ */ jsx32(Title, {
8009
8036
  order: 1,
8010
8037
  size: "h2",
8011
8038
  lineClamp: 1,
8012
8039
  ...componentsProps?.title,
8013
8040
  children: title ?? id
8014
8041
  }),
8015
- badges !== undefined && /* @__PURE__ */ jsx31(BadgeGroup, {
8042
+ badges !== undefined && /* @__PURE__ */ jsx32(BadgeGroup, {
8016
8043
  badges,
8017
8044
  gap: badgesGap,
8018
8045
  ...componentsProps?.badgeGroup
8019
8046
  })
8020
8047
  ]
8021
8048
  }),
8022
- /* @__PURE__ */ jsx31(Transition9, {
8049
+ /* @__PURE__ */ jsx32(Transition9, {
8023
8050
  mounted: Boolean(description),
8024
- children: (transitionStyle) => /* @__PURE__ */ jsx31(Text2, {
8051
+ children: (transitionStyle) => /* @__PURE__ */ jsx32(Text2, {
8025
8052
  size: "sm",
8026
8053
  c: "dimmed",
8027
8054
  ...componentsProps?.description,
@@ -8031,7 +8058,7 @@ function Widget({
8031
8058
  })
8032
8059
  ]
8033
8060
  }),
8034
- /* @__PURE__ */ jsx31(Group5, {
8061
+ /* @__PURE__ */ jsx32(Group5, {
8035
8062
  gap: buttonsGap,
8036
8063
  wrap: "nowrap",
8037
8064
  children: buttons !== undefined && buttons.map((button, i) => {
@@ -8046,12 +8073,12 @@ function Widget({
8046
8073
  })
8047
8074
  ]
8048
8075
  }),
8049
- /* @__PURE__ */ jsx31(Box7, {
8050
- children: /* @__PURE__ */ jsx31(Divider2, {
8076
+ /* @__PURE__ */ jsx32(Box7, {
8077
+ children: /* @__PURE__ */ jsx32(Divider2, {
8051
8078
  ...componentsProps?.divider
8052
8079
  })
8053
8080
  }),
8054
- /* @__PURE__ */ jsx31(Stack5, {
8081
+ /* @__PURE__ */ jsx32(Stack5, {
8055
8082
  align: "stretch",
8056
8083
  gap: alertsGap,
8057
8084
  ...componentsProps?.alertsContainer,
@@ -8066,12 +8093,12 @@ function Widget({
8066
8093
  });
8067
8094
  })
8068
8095
  }),
8069
- (loading || Children.toArray(children).length > 0) && /* @__PURE__ */ jsx31(ScrollArea4.Autosize, {
8096
+ (loading || Children.toArray(children).length > 0) && /* @__PURE__ */ jsx32(ScrollArea4.Autosize, {
8070
8097
  flex: 1,
8071
8098
  ...componentsProps?.childrenContainer,
8072
8099
  className: clsx_default("remoraid-widget-children-container", componentsProps?.childrenContainer?.className),
8073
- children: loading ? /* @__PURE__ */ jsx31(Center2, {
8074
- children: /* @__PURE__ */ jsx31(Loader, {
8100
+ children: loading ? /* @__PURE__ */ jsx32(Center2, {
8101
+ children: /* @__PURE__ */ jsx32(Loader, {
8075
8102
  ...componentsProps?.loader
8076
8103
  })
8077
8104
  }) : children
@@ -8081,19 +8108,18 @@ function Widget({
8081
8108
  });
8082
8109
  }
8083
8110
  // src/core/components/NotFoundPage/index.tsx
8084
- import { usePathname as usePathname4 } from "next/navigation";
8085
- import { jsx as jsx32, jsxs as jsxs13 } from "react/jsx-runtime";
8111
+ import { jsx as jsx33, jsxs as jsxs13 } from "react/jsx-runtime";
8086
8112
  function NotFoundPage({
8087
8113
  children,
8088
8114
  message,
8089
8115
  componentsProps
8090
8116
  }) {
8091
- const pathname = usePathname4();
8117
+ const { pathname } = useRemoraidRouter();
8092
8118
  return /* @__PURE__ */ jsxs13(Page, {
8093
8119
  name: "Not Found",
8094
8120
  ...componentsProps?.page,
8095
8121
  children: [
8096
- /* @__PURE__ */ jsx32(AlertMinimal, {
8122
+ /* @__PURE__ */ jsx33(AlertMinimal, {
8097
8123
  category: "negative" /* Negative */,
8098
8124
  title: "404 - Page Not Found",
8099
8125
  children: message ?? `Could not find page ${pathname}.`
@@ -8103,7 +8129,7 @@ function NotFoundPage({
8103
8129
  });
8104
8130
  }
8105
8131
  // src/core/components/EnvironmentShell/index.tsx
8106
- import { jsx as jsx33 } from "react/jsx-runtime";
8132
+ import { jsx as jsx34 } from "react/jsx-runtime";
8107
8133
  var EnvironmentShellVariant;
8108
8134
  ((EnvironmentShellVariant2) => {
8109
8135
  EnvironmentShellVariant2["Alert"] = "alert";
@@ -8120,7 +8146,7 @@ function EnvironmentShell({
8120
8146
  }) {
8121
8147
  const undefinedKeys = Object.keys(environment).filter((key) => environment[key] === undefined);
8122
8148
  const defaultMessage = `Components could not be rendered because the following environment variable${undefinedKeys.length > 1 ? "s" : ""} are not specified: ${undefinedKeys.join(", ")}.`;
8123
- const alertElement = /* @__PURE__ */ jsx33(AlertMinimal, {
8149
+ const alertElement = /* @__PURE__ */ jsx34(AlertMinimal, {
8124
8150
  mounted: undefinedKeys.length > 0,
8125
8151
  title: `Please specify environment variable${undefinedKeys.length > 1 ? "s" : ""}`,
8126
8152
  category: "negative" /* Negative */,
@@ -8132,7 +8158,7 @@ function EnvironmentShell({
8132
8158
  }
8133
8159
  if (variant === "alert" /* Alert */) {
8134
8160
  if (includeAlertContainer) {
8135
- return /* @__PURE__ */ jsx33(PageContainer, {
8161
+ return /* @__PURE__ */ jsx34(PageContainer, {
8136
8162
  ...componentsProps?.alertContainer,
8137
8163
  children: alertElement
8138
8164
  });
@@ -8145,20 +8171,20 @@ function EnvironmentShell({
8145
8171
  return null;
8146
8172
  }
8147
8173
  // src/core/components/SettingsWidget/index.tsx
8148
- import { createContext as createContext7, useContext as useContext11 } from "react";
8174
+ import { createContext as createContext8, useContext as useContext12 } from "react";
8149
8175
  import { IconRestore } from "@tabler/icons-react";
8150
8176
 
8151
8177
  // src/core/components/SettingsWidget/SaveButton/index.tsx
8152
8178
  import { IconDeviceFloppy } from "@tabler/icons-react";
8153
8179
  import { Group as Group6 } from "@mantine/core";
8154
- import { jsx as jsx34 } from "react/jsx-runtime";
8180
+ import { jsx as jsx35 } from "react/jsx-runtime";
8155
8181
  function SaveButton({
8156
8182
  onSaveChanges,
8157
8183
  insideContainer,
8158
8184
  componentsProps
8159
8185
  }) {
8160
8186
  const settingsWidgetOptions = useSettingsWidgetContext();
8161
- const button = /* @__PURE__ */ jsx34(RemoraidButton, {
8187
+ const button = /* @__PURE__ */ jsx35(RemoraidButton, {
8162
8188
  label: "Save Changes",
8163
8189
  icon: IconDeviceFloppy,
8164
8190
  onClick: onSaveChanges,
@@ -8173,7 +8199,7 @@ function SaveButton({
8173
8199
  }
8174
8200
  });
8175
8201
  if (insideContainer !== false) {
8176
- return /* @__PURE__ */ jsx34(Group6, {
8202
+ return /* @__PURE__ */ jsx35(Group6, {
8177
8203
  w: "100%",
8178
8204
  justify: "flex-end",
8179
8205
  mt: "md",
@@ -8185,11 +8211,11 @@ function SaveButton({
8185
8211
  }
8186
8212
 
8187
8213
  // src/core/components/SettingsWidget/index.tsx
8188
- import { jsx as jsx35 } from "react/jsx-runtime";
8214
+ import { jsx as jsx36 } from "react/jsx-runtime";
8189
8215
  var defaultSettingsWidgetContext = {};
8190
- var settingsWidgetContext = createContext7(defaultSettingsWidgetContext);
8216
+ var settingsWidgetContext = createContext8(defaultSettingsWidgetContext);
8191
8217
  var useSettingsWidgetContext = () => {
8192
- return useContext11(settingsWidgetContext);
8218
+ return useContext12(settingsWidgetContext);
8193
8219
  };
8194
8220
  function SettingsWidget({
8195
8221
  children,
@@ -8198,9 +8224,9 @@ function SettingsWidget({
8198
8224
  custom,
8199
8225
  widgetProps
8200
8226
  }) {
8201
- return /* @__PURE__ */ jsx35(settingsWidgetContext.Provider, {
8227
+ return /* @__PURE__ */ jsx36(settingsWidgetContext.Provider, {
8202
8228
  value: { custom, unsavedChanges },
8203
- children: /* @__PURE__ */ jsx35(Widget, {
8229
+ children: /* @__PURE__ */ jsx36(Widget, {
8204
8230
  title: "Settings",
8205
8231
  id: "settings",
8206
8232
  ...widgetProps,
@@ -8235,12 +8261,12 @@ var SettingsWidget_default = Object.assign(SettingsWidget, {
8235
8261
  SaveButton
8236
8262
  });
8237
8263
  // src/core/components/SettingsWidget/SettingsTable/index.tsx
8238
- import { createContext as createContext8, useContext as useContext12 } from "react";
8264
+ import { createContext as createContext9, useContext as useContext13 } from "react";
8239
8265
  import { Table as Table2 } from "@mantine/core";
8240
8266
 
8241
8267
  // src/core/components/SettingsWidget/SettingsTable/Row/index.tsx
8242
8268
  import { Table, Text as Text3 } from "@mantine/core";
8243
- import { jsx as jsx36, jsxs as jsxs14 } from "react/jsx-runtime";
8269
+ import { jsx as jsx37, jsxs as jsxs14 } from "react/jsx-runtime";
8244
8270
  function Row({
8245
8271
  children,
8246
8272
  label
@@ -8248,14 +8274,14 @@ function Row({
8248
8274
  const options = useSettingsTableOptions();
8249
8275
  return /* @__PURE__ */ jsxs14(Table.Tr, {
8250
8276
  children: [
8251
- /* @__PURE__ */ jsx36(Table.Th, {
8277
+ /* @__PURE__ */ jsx37(Table.Th, {
8252
8278
  w: options.leftColumnWidth,
8253
- children: /* @__PURE__ */ jsx36(Text3, {
8279
+ children: /* @__PURE__ */ jsx37(Text3, {
8254
8280
  size: "sm",
8255
8281
  children: label
8256
8282
  })
8257
8283
  }),
8258
- /* @__PURE__ */ jsx36(Table.Td, {
8284
+ /* @__PURE__ */ jsx37(Table.Td, {
8259
8285
  py: "xs",
8260
8286
  children
8261
8287
  })
@@ -8264,13 +8290,13 @@ function Row({
8264
8290
  }
8265
8291
 
8266
8292
  // src/core/components/SettingsWidget/SettingsTable/index.tsx
8267
- import { jsx as jsx37 } from "react/jsx-runtime";
8293
+ import { jsx as jsx38 } from "react/jsx-runtime";
8268
8294
  var defaultSettingsTableOptions = {
8269
8295
  leftColumnWidth: "38.2%"
8270
8296
  };
8271
- var settingsTableOptionsContext = createContext8(defaultSettingsTableOptions);
8297
+ var settingsTableOptionsContext = createContext9(defaultSettingsTableOptions);
8272
8298
  var useSettingsTableOptions = () => {
8273
- return useContext12(settingsTableOptionsContext);
8299
+ return useContext13(settingsTableOptionsContext);
8274
8300
  };
8275
8301
  function SettingsTable({
8276
8302
  leftColumnWidth,
@@ -8278,16 +8304,16 @@ function SettingsTable({
8278
8304
  }) {
8279
8305
  const children = asChildrenOfType(Row, childrenProp, "Check children passed to 'SettingsTable' component.");
8280
8306
  const theme = useRemoraidTheme();
8281
- return /* @__PURE__ */ jsx37(settingsTableOptionsContext.Provider, {
8307
+ return /* @__PURE__ */ jsx38(settingsTableOptionsContext.Provider, {
8282
8308
  value: {
8283
8309
  leftColumnWidth: leftColumnWidth ?? defaultSettingsTableOptions.leftColumnWidth
8284
8310
  },
8285
- children: /* @__PURE__ */ jsx37(Table2, {
8311
+ children: /* @__PURE__ */ jsx38(Table2, {
8286
8312
  bg: theme.transparentBackground,
8287
8313
  withTableBorder: true,
8288
8314
  variant: "vertical",
8289
8315
  layout: "fixed",
8290
- children: /* @__PURE__ */ jsx37(Table2.Tbody, {
8316
+ children: /* @__PURE__ */ jsx38(Table2.Tbody, {
8291
8317
  children
8292
8318
  })
8293
8319
  })
@@ -8299,7 +8325,7 @@ var SettingsTable_default = Object.assign(SettingsTable, {
8299
8325
  // src/core/components/NavbarSettingsWidget/index.tsx
8300
8326
  var import_lodash19 = __toESM(require_lodash(), 1);
8301
8327
  import { Select } from "@mantine/core";
8302
- import { jsx as jsx38, jsxs as jsxs15 } from "react/jsx-runtime";
8328
+ import { jsx as jsx39, jsxs as jsxs15 } from "react/jsx-runtime";
8303
8329
  var defaultNavbarSettingsWidgetId = "navbar-settings";
8304
8330
  function NavbarSettingsWidget({
8305
8331
  additionalRows: additionalRowsProp,
@@ -8321,7 +8347,7 @@ function NavbarSettingsWidget({
8321
8347
  ["right" /* Right */]: "Right",
8322
8348
  ["content" /* Content */]: "Content section"
8323
8349
  };
8324
- return /* @__PURE__ */ jsx38(SettingsWidget_default, {
8350
+ return /* @__PURE__ */ jsx39(SettingsWidget_default, {
8325
8351
  widgetProps: {
8326
8352
  id: defaultNavbarSettingsWidgetId,
8327
8353
  title: "Navbar Settings",
@@ -8337,9 +8363,9 @@ function NavbarSettingsWidget({
8337
8363
  children: /* @__PURE__ */ jsxs15(SettingsTable_default, {
8338
8364
  ...componentsProps?.table,
8339
8365
  children: [
8340
- /* @__PURE__ */ jsx38(SettingsTable_default.Row, {
8366
+ /* @__PURE__ */ jsx39(SettingsTable_default.Row, {
8341
8367
  label: "Select navbar position",
8342
- children: /* @__PURE__ */ jsx38(Select, {
8368
+ children: /* @__PURE__ */ jsx39(Select, {
8343
8369
  value: userExperience.navbar.position ?? "hidden",
8344
8370
  data: app.navbarVariant === null ? [] : supportedNavbarPositions[app.navbarVariant].map((position) => ({
8345
8371
  value: position ?? "hidden",
@@ -8359,9 +8385,9 @@ function NavbarSettingsWidget({
8359
8385
  }
8360
8386
  })
8361
8387
  }, "select-navbar-position"),
8362
- /* @__PURE__ */ jsx38(SettingsTable_default.Row, {
8388
+ /* @__PURE__ */ jsx39(SettingsTable_default.Row, {
8363
8389
  label: "Select navbar mode",
8364
- children: /* @__PURE__ */ jsx38(Select, {
8390
+ children: /* @__PURE__ */ jsx39(Select, {
8365
8391
  value: userExperience.navbar.mode,
8366
8392
  data: Object.values(NavbarMode).map((mode) => ({
8367
8393
  value: mode,
@@ -8382,7 +8408,7 @@ function NavbarSettingsWidget({
8382
8408
  if (isValidElementOfType(SettingsTable_default.Row, row)) {
8383
8409
  return row;
8384
8410
  }
8385
- return /* @__PURE__ */ jsx38(SettingsTable_default.Row, {
8411
+ return /* @__PURE__ */ jsx39(SettingsTable_default.Row, {
8386
8412
  ...row
8387
8413
  }, i);
8388
8414
  })
@@ -8393,7 +8419,7 @@ function NavbarSettingsWidget({
8393
8419
  // src/core/components/FooterSettingsWidget/index.tsx
8394
8420
  var import_lodash20 = __toESM(require_lodash(), 1);
8395
8421
  import { Select as Select2 } from "@mantine/core";
8396
- import { jsx as jsx39, jsxs as jsxs16 } from "react/jsx-runtime";
8422
+ import { jsx as jsx40, jsxs as jsxs16 } from "react/jsx-runtime";
8397
8423
  var defaultFooterSettingsWidgetId = "footer-settings";
8398
8424
  function FooterSettingsWidget({
8399
8425
  additionalRows: additionalRowsProp,
@@ -8410,7 +8436,7 @@ function FooterSettingsWidget({
8410
8436
  ["right" /* Right */]: "Right",
8411
8437
  ["content" /* Content */]: "Content section"
8412
8438
  };
8413
- return /* @__PURE__ */ jsx39(SettingsWidget_default, {
8439
+ return /* @__PURE__ */ jsx40(SettingsWidget_default, {
8414
8440
  widgetProps: {
8415
8441
  id: defaultFooterSettingsWidgetId,
8416
8442
  title: "Footer Settings",
@@ -8426,9 +8452,9 @@ function FooterSettingsWidget({
8426
8452
  children: /* @__PURE__ */ jsxs16(SettingsTable_default, {
8427
8453
  ...componentsProps?.table,
8428
8454
  children: [
8429
- /* @__PURE__ */ jsx39(SettingsTable_default.Row, {
8455
+ /* @__PURE__ */ jsx40(SettingsTable_default.Row, {
8430
8456
  label: "Select footer position",
8431
- children: /* @__PURE__ */ jsx39(Select2, {
8457
+ children: /* @__PURE__ */ jsx40(Select2, {
8432
8458
  value: userExperience.footer.position ?? "hidden",
8433
8459
  data: app.footerVariant === null ? [] : supportedFooterPositions[app.footerVariant].map((position) => ({
8434
8460
  value: position ?? "hidden",
@@ -8452,7 +8478,7 @@ function FooterSettingsWidget({
8452
8478
  if (isValidElementOfType(SettingsTable_default.Row, row)) {
8453
8479
  return row;
8454
8480
  }
8455
- return /* @__PURE__ */ jsx39(SettingsTable_default.Row, {
8481
+ return /* @__PURE__ */ jsx40(SettingsTable_default.Row, {
8456
8482
  ...row
8457
8483
  }, i);
8458
8484
  })
@@ -8461,8 +8487,8 @@ function FooterSettingsWidget({
8461
8487
  });
8462
8488
  }
8463
8489
  // src/core/components/ContextClusterProvider/index.tsx
8464
- import React9 from "react";
8465
- import { jsx as jsx40 } from "react/jsx-runtime";
8490
+ import React10 from "react";
8491
+ import { jsx as jsx41 } from "react/jsx-runtime";
8466
8492
  var createContextCluster = (generalDefaultValue, staticIds) => {
8467
8493
  const isStaticId = (id) => {
8468
8494
  if (staticIds?.find((staticId) => staticId === id)) {
@@ -8472,24 +8498,24 @@ var createContextCluster = (generalDefaultValue, staticIds) => {
8472
8498
  };
8473
8499
  const contexts = {};
8474
8500
  const defaultValues = {};
8475
- const createContext9 = (id, defaultValue) => {
8476
- const context = React9.createContext(defaultValue ?? generalDefaultValue);
8501
+ const createContext10 = (id, defaultValue) => {
8502
+ const context = React10.createContext(defaultValue ?? generalDefaultValue);
8477
8503
  contexts[id] = context;
8478
8504
  defaultValues[id] = defaultValue ?? generalDefaultValue;
8479
8505
  return context;
8480
8506
  };
8481
- const useContext13 = (id) => {
8507
+ const useContext14 = (id) => {
8482
8508
  if (isStaticId(id)) {
8483
- return contexts[id] ? React9.useContext(contexts[id]) : generalDefaultValue;
8509
+ return contexts[id] ? React10.useContext(contexts[id]) : generalDefaultValue;
8484
8510
  }
8485
- return contexts[id] ? React9.useContext(contexts[id]) : null;
8511
+ return contexts[id] ? React10.useContext(contexts[id]) : null;
8486
8512
  };
8487
8513
  return {
8488
8514
  contexts,
8489
8515
  defaultValues,
8490
8516
  generalDefaultValue,
8491
- createContext: createContext9,
8492
- useContext: useContext13
8517
+ createContext: createContext10,
8518
+ useContext: useContext14
8493
8519
  };
8494
8520
  };
8495
8521
  function ContextClusterProvider({
@@ -8497,7 +8523,7 @@ function ContextClusterProvider({
8497
8523
  values = {},
8498
8524
  children
8499
8525
  }) {
8500
- return Object.entries(cluster.contexts).reduceRight((t, [id, context]) => context ? /* @__PURE__ */ jsx40(context.Provider, {
8526
+ return Object.entries(cluster.contexts).reduceRight((t, [id, context]) => context ? /* @__PURE__ */ jsx41(context.Provider, {
8501
8527
  value: values[id] ?? cluster.defaultValues[id] ?? cluster.generalDefaultValue,
8502
8528
  children: t
8503
8529
  }) : t, children);
@@ -8510,7 +8536,7 @@ import {
8510
8536
  ScrollArea as ScrollArea5
8511
8537
  } from "@mantine/core";
8512
8538
  import { useState as useState10 } from "react";
8513
- import { jsx as jsx41 } from "react/jsx-runtime";
8539
+ import { jsx as jsx42 } from "react/jsx-runtime";
8514
8540
  function InputWrapperScrollArea({
8515
8541
  children,
8516
8542
  label,
@@ -8522,7 +8548,7 @@ function InputWrapperScrollArea({
8522
8548
  }) {
8523
8549
  const theme = useRemoraidTheme();
8524
8550
  const [isHovering, setIsHovering] = useState10(false);
8525
- return /* @__PURE__ */ jsx41(Input.Wrapper, {
8551
+ return /* @__PURE__ */ jsx42(Input.Wrapper, {
8526
8552
  label,
8527
8553
  error,
8528
8554
  onMouseEnter: () => setIsHovering(true),
@@ -8530,7 +8556,7 @@ function InputWrapperScrollArea({
8530
8556
  description,
8531
8557
  withAsterisk: required,
8532
8558
  ...componentsProps?.container,
8533
- children: /* @__PURE__ */ jsx41(Paper4, {
8559
+ children: /* @__PURE__ */ jsx42(Paper4, {
8534
8560
  shadow: "none",
8535
8561
  p: 0,
8536
8562
  mt: Boolean(description) ? 4 : 0,
@@ -8541,12 +8567,12 @@ function InputWrapperScrollArea({
8541
8567
  transition: "border-color .1s",
8542
8568
  borderColor: error ? "var(--mantine-color-error)" : isHovering ? "var(--mantine-primary-color-filled)" : undefined
8543
8569
  },
8544
- children: /* @__PURE__ */ jsx41(ScrollArea5, {
8570
+ children: /* @__PURE__ */ jsx42(ScrollArea5, {
8545
8571
  mah,
8546
8572
  px: "md",
8547
8573
  flex: 1,
8548
8574
  ...componentsProps?.ScrollArea,
8549
- children: /* @__PURE__ */ jsx41(Box8, {
8575
+ children: /* @__PURE__ */ jsx42(Box8, {
8550
8576
  ...componentsProps?.childrenContainer,
8551
8577
  children
8552
8578
  })
@@ -8561,6 +8587,7 @@ export {
8561
8587
  useSettingsTableOptions,
8562
8588
  useRemoraidUserExperience,
8563
8589
  useRemoraidTheme,
8590
+ useRemoraidRouter,
8564
8591
  useRemoraidApp,
8565
8592
  usePage,
8566
8593
  useLayouts,
@@ -8585,6 +8612,7 @@ export {
8585
8612
  defaultTransitionDurations,
8586
8613
  defaultSettingsWidgetContext as defaultSettingsWidgetOptions,
8587
8614
  defaultSettingsTableOptions,
8615
+ defaultRemoraidButtonSize,
8588
8616
  defaultNavbarSettingsWidgetId,
8589
8617
  defaultNavbarPositions,
8590
8618
  defaultLayoutsContext,
@@ -8608,6 +8636,7 @@ export {
8608
8636
  SettingsWidget_default as SettingsWidget,
8609
8637
  SettingsTable_default as SettingsTable,
8610
8638
  ScrollableChipGroup,
8639
+ RouterProvider,
8611
8640
  RemoraidProvider,
8612
8641
  RemoraidIconSize,
8613
8642
  RemoraidButton,