remoraid 2.5.6 → 2.7.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.
- package/dist/core/index.cjs +338 -271
- package/dist/core/index.d.ts +95 -63
- package/dist/core/index.js +321 -253
- package/dist/server/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/core/index.js
CHANGED
@@ -5603,7 +5603,6 @@ var co = (condition, value, fallback) => condition(value) ? value : fallback;
|
|
5603
5603
|
import {
|
5604
5604
|
px,
|
5605
5605
|
rgba,
|
5606
|
-
useMantineColorScheme,
|
5607
5606
|
useMantineTheme
|
5608
5607
|
} from "@mantine/core";
|
5609
5608
|
import {
|
@@ -5612,17 +5611,61 @@ import {
|
|
5612
5611
|
IconInfoCircle
|
5613
5612
|
} from "@tabler/icons-react";
|
5614
5613
|
import React3, {
|
5614
|
+
useContext as useContext3,
|
5615
|
+
useMemo as useMemo2
|
5616
|
+
} from "react";
|
5617
|
+
|
5618
|
+
// src/core/components/RemoraidProvider/HydrationStatusProvider/index.tsx
|
5619
|
+
import { useMantineColorScheme } from "@mantine/core";
|
5620
|
+
import {
|
5621
|
+
createContext,
|
5615
5622
|
useContext as useContext2,
|
5616
|
-
|
5623
|
+
useEffect,
|
5624
|
+
useMemo,
|
5625
|
+
useState as useState2
|
5617
5626
|
} from "react";
|
5618
5627
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
5628
|
+
var defaultHydrationStatus = {
|
5629
|
+
hasHydrated: false,
|
5630
|
+
ensureHydration: () => {
|
5631
|
+
return;
|
5632
|
+
}
|
5633
|
+
};
|
5634
|
+
var hydrationStatusContext = createContext(defaultHydrationStatus);
|
5635
|
+
var useHydrationStatus = () => {
|
5636
|
+
return useContext2(hydrationStatusContext);
|
5637
|
+
};
|
5638
|
+
var useHydratedMantineColorScheme = () => {
|
5639
|
+
const { ensureHydration } = useHydrationStatus();
|
5640
|
+
return ensureHydration(useMantineColorScheme()) ?? {};
|
5641
|
+
};
|
5642
|
+
function HydrationStatusProvider({
|
5643
|
+
children
|
5644
|
+
}) {
|
5645
|
+
const [hasHydrated, setHasHydrated] = useState2(defaultHydrationStatus.hasHydrated);
|
5646
|
+
const hydrationStatus = useMemo(() => ({
|
5647
|
+
hasHydrated,
|
5648
|
+
ensureHydration: (v) => hasHydrated ? v : undefined
|
5649
|
+
}), [hasHydrated]);
|
5650
|
+
useEffect(() => {
|
5651
|
+
setHasHydrated(true);
|
5652
|
+
}, []);
|
5653
|
+
return /* @__PURE__ */ jsxDEV2(hydrationStatusContext.Provider, {
|
5654
|
+
value: hydrationStatus,
|
5655
|
+
children
|
5656
|
+
}, undefined, false, undefined, this);
|
5657
|
+
}
|
5658
|
+
|
5659
|
+
// src/core/components/RemoraidProvider/ThemeProvider/index.tsx
|
5660
|
+
import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
|
5619
5661
|
var isMantinePrimaryShade = (primaryShade) => {
|
5620
5662
|
if (isNaN(Number(primaryShade))) {
|
5621
5663
|
return true;
|
5622
5664
|
}
|
5623
5665
|
return false;
|
5624
5666
|
};
|
5625
|
-
var createRemoraidTheme = (customTheme,
|
5667
|
+
var createRemoraidTheme = (customTheme, dependencies) => {
|
5668
|
+
const { mantineTheme, colorScheme } = dependencies ?? {};
|
5626
5669
|
const defaultMediumIconProps = { size: "1.125em" };
|
5627
5670
|
let transparentBackground;
|
5628
5671
|
let primaryColor;
|
@@ -5639,93 +5682,89 @@ var createRemoraidTheme = (customTheme, mantineTheme, colorScheme) => {
|
|
5639
5682
|
};
|
5640
5683
|
}
|
5641
5684
|
return {
|
5642
|
-
|
5685
|
+
containerSize: 1300,
|
5686
|
+
jsonStringifySpace: 2,
|
5687
|
+
transparentBackground,
|
5688
|
+
primaryColor,
|
5689
|
+
spacingPx,
|
5690
|
+
...customTheme,
|
5643
5691
|
transitionDurations: {
|
5644
5692
|
["short" /* Short */]: 200,
|
5645
5693
|
["medium" /* Medium */]: 350,
|
5646
|
-
["long" /* Long */]: 500
|
5694
|
+
["long" /* Long */]: 500,
|
5695
|
+
...customTheme?.transitionDurations
|
5647
5696
|
},
|
5648
5697
|
breakpoints: {
|
5649
5698
|
["buttonCollapse" /* ButtonCollapse */]: "md",
|
5650
|
-
["badgeGroupCollapse" /* BadgeGroupCollapse */]: "md"
|
5699
|
+
["badgeGroupCollapse" /* BadgeGroupCollapse */]: "md",
|
5700
|
+
...customTheme?.breakpoints
|
5651
5701
|
},
|
5652
5702
|
scrollAreaProps: {
|
5653
5703
|
scrollbarSize: 8,
|
5654
5704
|
scrollHideDelay: 20,
|
5655
|
-
type: "hover"
|
5705
|
+
type: "hover",
|
5706
|
+
...customTheme?.scrollAreaProps
|
5656
5707
|
},
|
5657
|
-
containerSize: 1300,
|
5658
5708
|
alertProps: {
|
5659
5709
|
["negative" /* Negative */]: {
|
5660
|
-
icon: /* @__PURE__ */
|
5710
|
+
icon: /* @__PURE__ */ jsxDEV3(IconAlertCircle, {
|
5661
5711
|
...defaultMediumIconProps
|
5662
5712
|
}, undefined, false, undefined, this),
|
5663
5713
|
variant: "light",
|
5664
5714
|
color: "red",
|
5665
|
-
title: "Attention!"
|
5715
|
+
title: "Attention!",
|
5716
|
+
...customTheme?.alertProps?.negative
|
5666
5717
|
},
|
5667
5718
|
["neutral" /* Neutral */]: {
|
5668
|
-
icon: /* @__PURE__ */
|
5719
|
+
icon: /* @__PURE__ */ jsxDEV3(IconInfoCircle, {
|
5669
5720
|
...defaultMediumIconProps
|
5670
5721
|
}, undefined, false, undefined, this),
|
5671
5722
|
variant: "light",
|
5672
5723
|
color: mantineTheme?.primaryColor,
|
5673
|
-
title: "Information"
|
5724
|
+
title: "Information",
|
5725
|
+
...customTheme?.alertProps?.neutral
|
5674
5726
|
},
|
5675
5727
|
["positive" /* Positive */]: {
|
5676
|
-
icon: /* @__PURE__ */
|
5728
|
+
icon: /* @__PURE__ */ jsxDEV3(IconCircleCheck, {
|
5677
5729
|
...defaultMediumIconProps
|
5678
5730
|
}, undefined, false, undefined, this),
|
5679
5731
|
variant: "light",
|
5680
5732
|
color: "green",
|
5681
|
-
title: "Success"
|
5733
|
+
title: "Success",
|
5734
|
+
...customTheme?.alertProps?.positive
|
5682
5735
|
}
|
5683
5736
|
},
|
5684
5737
|
iconProps: {
|
5685
|
-
["medium" /* Medium */]:
|
5686
|
-
|
5687
|
-
|
5688
|
-
|
5689
|
-
|
5690
|
-
|
5691
|
-
|
5692
|
-
|
5738
|
+
["medium" /* Medium */]: {
|
5739
|
+
...defaultMediumIconProps,
|
5740
|
+
...customTheme?.iconProps?.medium
|
5741
|
+
},
|
5742
|
+
["tiny" /* Tiny */]: {
|
5743
|
+
size: 14,
|
5744
|
+
stroke: 3,
|
5745
|
+
...customTheme?.iconProps?.tiny
|
5746
|
+
}
|
5747
|
+
}
|
5693
5748
|
};
|
5694
5749
|
};
|
5695
|
-
var isRemoraidTheme = (x) => {
|
5696
|
-
if (!x) {
|
5697
|
-
return false;
|
5698
|
-
}
|
5699
|
-
if (typeof x !== "object") {
|
5700
|
-
return false;
|
5701
|
-
}
|
5702
|
-
if (!("complete" in x)) {
|
5703
|
-
return false;
|
5704
|
-
}
|
5705
|
-
return true;
|
5706
|
-
};
|
5707
5750
|
var themeContext = React3.createContext(createRemoraidTheme());
|
5708
5751
|
var useRemoraidTheme = () => {
|
5709
|
-
return
|
5752
|
+
return useContext3(themeContext);
|
5710
5753
|
};
|
5711
5754
|
function ThemeProvider({
|
5712
|
-
|
5713
|
-
|
5755
|
+
theme,
|
5756
|
+
children
|
5714
5757
|
}) {
|
5715
5758
|
const mantineTheme = useMantineTheme();
|
5716
|
-
const { colorScheme } =
|
5717
|
-
const remoraidTheme =
|
5718
|
-
|
5719
|
-
|
5720
|
-
|
5721
|
-
}
|
5722
|
-
|
5723
|
-
|
5724
|
-
|
5725
|
-
}
|
5726
|
-
return value;
|
5727
|
-
}, [colorScheme]);
|
5728
|
-
return /* @__PURE__ */ jsxDEV2(themeContext.Provider, {
|
5759
|
+
const { colorScheme } = useHydratedMantineColorScheme();
|
5760
|
+
const remoraidTheme = useMemo2(() => {
|
5761
|
+
const dependencies = {
|
5762
|
+
mantineTheme,
|
5763
|
+
colorScheme
|
5764
|
+
};
|
5765
|
+
return createRemoraidTheme(typeof theme === "function" ? theme(dependencies) : theme, dependencies);
|
5766
|
+
}, [colorScheme, theme]);
|
5767
|
+
return /* @__PURE__ */ jsxDEV3(themeContext.Provider, {
|
5729
5768
|
value: remoraidTheme,
|
5730
5769
|
children
|
5731
5770
|
}, undefined, false, undefined, this);
|
@@ -5735,7 +5774,7 @@ function ThemeProvider({
|
|
5735
5774
|
import { CookiesProvider } from "react-cookie";
|
5736
5775
|
|
5737
5776
|
// src/core/components/RemoraidProvider/CoreUserExperienceProvider/index.tsx
|
5738
|
-
import { useContext as
|
5777
|
+
import { useContext as useContext5 } from "react";
|
5739
5778
|
|
5740
5779
|
// src/core/components/AppShell/NavbarMinimal/index.tsx
|
5741
5780
|
import {
|
@@ -5743,7 +5782,6 @@ import {
|
|
5743
5782
|
UnstyledButton,
|
5744
5783
|
Stack,
|
5745
5784
|
rem,
|
5746
|
-
useMantineColorScheme as useMantineColorScheme2,
|
5747
5785
|
Flex,
|
5748
5786
|
Paper,
|
5749
5787
|
Divider,
|
@@ -5758,29 +5796,29 @@ import {
|
|
5758
5796
|
} from "@tabler/icons-react";
|
5759
5797
|
import Link from "next/link";
|
5760
5798
|
import { usePathname } from "next/navigation";
|
5761
|
-
import { useState as
|
5799
|
+
import { useState as useState3 } from "react";
|
5762
5800
|
|
5763
5801
|
// src/core/components/AppShell/AppProvider/index.tsx
|
5764
|
-
import { createContext, useContext as
|
5765
|
-
import { jsxDEV as
|
5802
|
+
import { createContext as createContext2, useContext as useContext4 } from "react";
|
5803
|
+
import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
|
5766
5804
|
var defaultAppContext = { navigablePages: [] };
|
5767
|
-
var appContext =
|
5805
|
+
var appContext = createContext2(defaultAppContext);
|
5768
5806
|
var useRemoraidApp = () => {
|
5769
|
-
return
|
5807
|
+
return useContext4(appContext);
|
5770
5808
|
};
|
5771
5809
|
function AppProvider({
|
5772
5810
|
children,
|
5773
5811
|
navigablePages,
|
5774
5812
|
user
|
5775
5813
|
}) {
|
5776
|
-
return /* @__PURE__ */
|
5814
|
+
return /* @__PURE__ */ jsxDEV4(appContext.Provider, {
|
5777
5815
|
value: { navigablePages, user },
|
5778
5816
|
children
|
5779
5817
|
}, undefined, false, undefined, this);
|
5780
5818
|
}
|
5781
5819
|
|
5782
5820
|
// src/core/components/AppShell/NavbarMinimal/index.tsx
|
5783
|
-
import { jsxDEV as
|
5821
|
+
import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
|
5784
5822
|
function NavbarLink({
|
5785
5823
|
icon,
|
5786
5824
|
label,
|
@@ -5790,30 +5828,30 @@ function NavbarLink({
|
|
5790
5828
|
indicator,
|
5791
5829
|
settings
|
5792
5830
|
}) {
|
5793
|
-
const [isHoveringRoleIndicator, setIsHoveringRoleIndicator] =
|
5831
|
+
const [isHoveringRoleIndicator, setIsHoveringRoleIndicator] = useState3(false);
|
5794
5832
|
const iconProps = {
|
5795
5833
|
size: settings.iconSize,
|
5796
5834
|
stroke: 1.5
|
5797
5835
|
};
|
5798
5836
|
const Icon2 = icon ?? IconLink;
|
5799
5837
|
if (!href) {
|
5800
|
-
return /* @__PURE__ */
|
5838
|
+
return /* @__PURE__ */ jsxDEV5(Tooltip, {
|
5801
5839
|
label,
|
5802
5840
|
position: "right",
|
5803
5841
|
transitionProps: { duration: 0 },
|
5804
|
-
children: /* @__PURE__ */
|
5842
|
+
children: /* @__PURE__ */ jsxDEV5(UnstyledButton, {
|
5805
5843
|
onClick,
|
5806
5844
|
className: "remoraid-navbar-minimal-link",
|
5807
5845
|
"data-active": active || undefined,
|
5808
5846
|
w: settings.linkSize,
|
5809
5847
|
h: settings.linkSize,
|
5810
|
-
children: /* @__PURE__ */
|
5848
|
+
children: /* @__PURE__ */ jsxDEV5(Icon2, {
|
5811
5849
|
...iconProps
|
5812
5850
|
}, undefined, false, undefined, this)
|
5813
5851
|
}, undefined, false, undefined, this)
|
5814
5852
|
}, undefined, false, undefined, this);
|
5815
5853
|
}
|
5816
|
-
const button = /* @__PURE__ */
|
5854
|
+
const button = /* @__PURE__ */ jsxDEV5(UnstyledButton, {
|
5817
5855
|
onClick,
|
5818
5856
|
className: "remoraid-navbar-minimal-link",
|
5819
5857
|
"data-active": active || undefined,
|
@@ -5821,15 +5859,15 @@ function NavbarLink({
|
|
5821
5859
|
h: settings.linkSize,
|
5822
5860
|
component: Link,
|
5823
5861
|
href,
|
5824
|
-
children: /* @__PURE__ */
|
5862
|
+
children: /* @__PURE__ */ jsxDEV5(Icon2, {
|
5825
5863
|
...iconProps
|
5826
5864
|
}, undefined, false, undefined, this)
|
5827
5865
|
}, undefined, false, undefined, this);
|
5828
|
-
return /* @__PURE__ */
|
5866
|
+
return /* @__PURE__ */ jsxDEV5(Tooltip, {
|
5829
5867
|
label,
|
5830
5868
|
position: "right",
|
5831
5869
|
transitionProps: { duration: 0 },
|
5832
|
-
children: indicator === undefined ? button : /* @__PURE__ */
|
5870
|
+
children: indicator === undefined ? button : /* @__PURE__ */ jsxDEV5(Indicator, {
|
5833
5871
|
withBorder: true,
|
5834
5872
|
size: 13,
|
5835
5873
|
offset: 2,
|
@@ -5858,14 +5896,14 @@ function NavbarMinimal({
|
|
5858
5896
|
const { userExperience } = useRemoraidUserExperience();
|
5859
5897
|
const pathname = usePathname();
|
5860
5898
|
const theme = useRemoraidTheme();
|
5861
|
-
const { setColorScheme, colorScheme } =
|
5899
|
+
const { setColorScheme, colorScheme } = useHydratedMantineColorScheme();
|
5862
5900
|
const app = useRemoraidApp();
|
5863
|
-
const [isHoveringRoleIndicator, setIsHoveringRoleIndicator] =
|
5901
|
+
const [isHoveringRoleIndicator, setIsHoveringRoleIndicator] = useState3(false);
|
5864
5902
|
const settings = {
|
5865
5903
|
...userExperience.navbarSettings,
|
5866
5904
|
...settingsProp
|
5867
5905
|
};
|
5868
|
-
const links = app.navigablePages.filter((link) => !settings.hiddenPages.includes(link.href)).map((link) => /* @__PURE__ */
|
5906
|
+
const links = app.navigablePages.filter((link) => !settings.hiddenPages.includes(link.href)).map((link) => /* @__PURE__ */ jsxDEV5(NavbarLink, {
|
5869
5907
|
active: link.href === pathname,
|
5870
5908
|
indicator: linkIndicator,
|
5871
5909
|
settings,
|
@@ -5878,19 +5916,19 @@ function NavbarMinimal({
|
|
5878
5916
|
height: settings.linkSize
|
5879
5917
|
}
|
5880
5918
|
});
|
5881
|
-
return /* @__PURE__ */
|
5919
|
+
return /* @__PURE__ */ jsxDEV5(Paper, {
|
5882
5920
|
h: "100%",
|
5883
5921
|
py: settings.py,
|
5884
5922
|
bg: theme.transparentBackground,
|
5885
5923
|
radius: 0,
|
5886
5924
|
shadow: "md",
|
5887
|
-
children: /* @__PURE__ */
|
5925
|
+
children: /* @__PURE__ */ jsxDEV5(Flex, {
|
5888
5926
|
direction: "column",
|
5889
5927
|
h: "100%",
|
5890
5928
|
align: "center",
|
5891
5929
|
px: settings.px,
|
5892
5930
|
children: [
|
5893
|
-
logoIndicator === undefined ? logoImage : /* @__PURE__ */
|
5931
|
+
logoIndicator === undefined ? logoImage : /* @__PURE__ */ jsxDEV5(Indicator, {
|
5894
5932
|
withBorder: true,
|
5895
5933
|
offset: 2,
|
5896
5934
|
size: 13,
|
@@ -5899,28 +5937,28 @@ function NavbarMinimal({
|
|
5899
5937
|
...logoIndicator(isHoveringRoleIndicator),
|
5900
5938
|
children: logoImage
|
5901
5939
|
}, undefined, false, undefined, this),
|
5902
|
-
/* @__PURE__ */
|
5940
|
+
/* @__PURE__ */ jsxDEV5(Divider, {
|
5903
5941
|
my: "md",
|
5904
5942
|
variant: "dashed",
|
5905
5943
|
w: "100%"
|
5906
5944
|
}, undefined, false, undefined, this),
|
5907
|
-
/* @__PURE__ */
|
5945
|
+
/* @__PURE__ */ jsxDEV5(Stack, {
|
5908
5946
|
justify: "flex-start",
|
5909
5947
|
gap: 0,
|
5910
5948
|
flex: 1,
|
5911
5949
|
children: links
|
5912
5950
|
}, undefined, false, undefined, this),
|
5913
|
-
/* @__PURE__ */
|
5951
|
+
/* @__PURE__ */ jsxDEV5(Stack, {
|
5914
5952
|
justify: "center",
|
5915
5953
|
gap: 0,
|
5916
5954
|
children: [
|
5917
|
-
user !== undefined && (user === null ? /* @__PURE__ */
|
5955
|
+
user !== undefined && (user === null ? /* @__PURE__ */ jsxDEV5(NavbarLink, {
|
5918
5956
|
icon: IconLogin,
|
5919
5957
|
label: "Login",
|
5920
5958
|
href: "/login",
|
5921
5959
|
active: pathname === "/login",
|
5922
5960
|
settings
|
5923
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
5961
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV5(NavbarLink, {
|
5924
5962
|
icon: IconLogout,
|
5925
5963
|
label: "Logout",
|
5926
5964
|
onClick: () => {
|
@@ -5931,14 +5969,13 @@ function NavbarMinimal({
|
|
5931
5969
|
href: "/login",
|
5932
5970
|
settings
|
5933
5971
|
}, undefined, false, undefined, this)),
|
5934
|
-
/* @__PURE__ */
|
5972
|
+
/* @__PURE__ */ jsxDEV5(NavbarLink, {
|
5935
5973
|
icon: colorScheme === "dark" ? IconSun : IconMoon,
|
5936
5974
|
onClick: () => {
|
5937
|
-
if (colorScheme
|
5938
|
-
|
5939
|
-
} else {
|
5940
|
-
setColorScheme("dark");
|
5975
|
+
if (!colorScheme || !setColorScheme) {
|
5976
|
+
return;
|
5941
5977
|
}
|
5978
|
+
setColorScheme(colorScheme === "dark" ? "light" : "dark");
|
5942
5979
|
},
|
5943
5980
|
label: "Toggle Color Scheme",
|
5944
5981
|
settings
|
@@ -5952,13 +5989,13 @@ function NavbarMinimal({
|
|
5952
5989
|
|
5953
5990
|
// src/core/components/UserExperienceProviderWrapper/index.tsx
|
5954
5991
|
import {
|
5955
|
-
createContext as
|
5956
|
-
useEffect,
|
5957
|
-
useState as
|
5992
|
+
createContext as createContext3,
|
5993
|
+
useEffect as useEffect2,
|
5994
|
+
useState as useState4
|
5958
5995
|
} from "react";
|
5959
5996
|
import { useCookies } from "react-cookie";
|
5960
|
-
import { jsxDEV as
|
5961
|
-
var createUserExperienceContext = (defaultUserExperience) =>
|
5997
|
+
import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
|
5998
|
+
var createUserExperienceContext = (defaultUserExperience) => createContext3({
|
5962
5999
|
userExperience: defaultUserExperience,
|
5963
6000
|
updateUserExperience: () => {},
|
5964
6001
|
processedCookie: false,
|
@@ -5977,14 +6014,14 @@ function UserExperienceProviderWrapper({
|
|
5977
6014
|
...defaultUserExperience,
|
5978
6015
|
...initialValue
|
5979
6016
|
};
|
5980
|
-
const [userExperience, setUserExperience] =
|
5981
|
-
const [processedCookie, setProcessedCookie] =
|
6017
|
+
const [userExperience, setUserExperience] = useState4(initialUserExperience);
|
6018
|
+
const [processedCookie, setProcessedCookie] = useState4(false);
|
5982
6019
|
const updateUserExperience = (p) => {
|
5983
6020
|
const updatedUserExperience = typeof p === "function" ? p(userExperience) : p;
|
5984
6021
|
setCookie(cookieName, updatedUserExperience, { path: "/" });
|
5985
6022
|
setUserExperience(updatedUserExperience);
|
5986
6023
|
};
|
5987
|
-
|
6024
|
+
useEffect2(() => {
|
5988
6025
|
const userExperienceCookie = cookies[cookieName];
|
5989
6026
|
if (userExperienceCookie && isValidUserExperience(userExperienceCookie)) {
|
5990
6027
|
setUserExperience(userExperienceCookie);
|
@@ -5993,7 +6030,7 @@ function UserExperienceProviderWrapper({
|
|
5993
6030
|
setProcessedCookie(true);
|
5994
6031
|
}
|
5995
6032
|
}, [cookies]);
|
5996
|
-
return /* @__PURE__ */
|
6033
|
+
return /* @__PURE__ */ jsxDEV6(context.Provider, {
|
5997
6034
|
value: {
|
5998
6035
|
userExperience,
|
5999
6036
|
updateUserExperience,
|
@@ -6005,7 +6042,7 @@ function UserExperienceProviderWrapper({
|
|
6005
6042
|
}
|
6006
6043
|
|
6007
6044
|
// src/core/components/RemoraidProvider/CoreUserExperienceProvider/index.tsx
|
6008
|
-
import { jsxDEV as
|
6045
|
+
import { jsxDEV as jsxDEV7 } from "react/jsx-dev-runtime";
|
6009
6046
|
var defaultNavbarSettings = {
|
6010
6047
|
["minimal" /* Minimal */]: defaultSettings
|
6011
6048
|
};
|
@@ -6017,7 +6054,7 @@ var defaultUserExperience = {
|
|
6017
6054
|
var defaultUserExperienceCookieName = "remoraid-core-user-experience";
|
6018
6055
|
var coreUserExperienceContext = createUserExperienceContext(defaultUserExperience);
|
6019
6056
|
var useRemoraidUserExperience = () => {
|
6020
|
-
return
|
6057
|
+
return useContext5(coreUserExperienceContext);
|
6021
6058
|
};
|
6022
6059
|
function CoreUserExperienceProvider({
|
6023
6060
|
children,
|
@@ -6060,7 +6097,7 @@ function CoreUserExperienceProvider({
|
|
6060
6097
|
}
|
6061
6098
|
return true;
|
6062
6099
|
};
|
6063
|
-
return /* @__PURE__ */
|
6100
|
+
return /* @__PURE__ */ jsxDEV7(UserExperienceProviderWrapper, {
|
6064
6101
|
context: coreUserExperienceContext,
|
6065
6102
|
isValidUserExperience,
|
6066
6103
|
cookieName: cookieName ?? defaultUserExperienceCookieName,
|
@@ -6071,24 +6108,27 @@ function CoreUserExperienceProvider({
|
|
6071
6108
|
}
|
6072
6109
|
|
6073
6110
|
// src/core/components/RemoraidProvider/index.tsx
|
6074
|
-
import { jsxDEV as
|
6111
|
+
import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
|
6075
6112
|
function RemoraidProvider({
|
6076
6113
|
children,
|
6077
6114
|
theme,
|
6078
6115
|
initialUserExperience,
|
6079
6116
|
componentsProps
|
6080
6117
|
}) {
|
6081
|
-
return /* @__PURE__ */
|
6118
|
+
return /* @__PURE__ */ jsxDEV8(CookiesProvider, {
|
6082
6119
|
...componentsProps?.CookiesProvider,
|
6083
|
-
children: /* @__PURE__ */
|
6084
|
-
|
6085
|
-
|
6086
|
-
|
6087
|
-
|
6088
|
-
|
6089
|
-
|
6090
|
-
...componentsProps?.
|
6091
|
-
children
|
6120
|
+
children: /* @__PURE__ */ jsxDEV8(HydrationStatusProvider, {
|
6121
|
+
...componentsProps?.HydrationStatusProviderProps,
|
6122
|
+
children: /* @__PURE__ */ jsxDEV8(ThemeProvider, {
|
6123
|
+
theme,
|
6124
|
+
...componentsProps?.ThemeProvider,
|
6125
|
+
children: /* @__PURE__ */ jsxDEV8(CoreUserExperienceProvider, {
|
6126
|
+
initialValue: initialUserExperience,
|
6127
|
+
...componentsProps?.CoreUserExperienceProvider,
|
6128
|
+
children: /* @__PURE__ */ jsxDEV8(WidgetsProvider, {
|
6129
|
+
...componentsProps?.WidgetsProvider,
|
6130
|
+
children
|
6131
|
+
}, undefined, false, undefined, this)
|
6092
6132
|
}, undefined, false, undefined, this)
|
6093
6133
|
}, undefined, false, undefined, this)
|
6094
6134
|
}, undefined, false, undefined, this)
|
@@ -6100,33 +6140,30 @@ import {
|
|
6100
6140
|
Burger,
|
6101
6141
|
rem as rem2,
|
6102
6142
|
Group as Group2,
|
6103
|
-
useMantineTheme as
|
6104
|
-
useMantineColorScheme as useMantineColorScheme4,
|
6143
|
+
useMantineTheme as useMantineTheme2,
|
6105
6144
|
Paper as Paper2,
|
6106
6145
|
px as px2
|
6107
6146
|
} from "@mantine/core";
|
6108
6147
|
import { useDisclosure } from "@mantine/hooks";
|
6109
6148
|
|
6110
6149
|
// src/core/components/AppShell/Footer/index.tsx
|
6111
|
-
import { Group
|
6150
|
+
import { Group } from "@mantine/core";
|
6112
6151
|
import { IconPennant } from "@tabler/icons-react";
|
6113
|
-
import { jsxDEV as
|
6152
|
+
import { jsxDEV as jsxDEV9 } from "react/jsx-dev-runtime";
|
6114
6153
|
function Footer() {
|
6115
|
-
|
6116
|
-
const { colorScheme } = useMantineColorScheme3();
|
6117
|
-
return /* @__PURE__ */ jsxDEV8(Group, {
|
6154
|
+
return /* @__PURE__ */ jsxDEV9(Group, {
|
6118
6155
|
justify: "center",
|
6119
6156
|
w: "100%",
|
6120
6157
|
py: "md",
|
6121
|
-
children: /* @__PURE__ */
|
6158
|
+
children: /* @__PURE__ */ jsxDEV9(IconPennant, {
|
6122
6159
|
size: 50,
|
6123
|
-
color:
|
6160
|
+
color: "var(--mantine-color-default-border)"
|
6124
6161
|
}, undefined, false, undefined, this)
|
6125
6162
|
}, undefined, false, undefined, this);
|
6126
6163
|
}
|
6127
6164
|
|
6128
6165
|
// src/core/components/AppShell/index.tsx
|
6129
|
-
import { jsxDEV as
|
6166
|
+
import { jsxDEV as jsxDEV10, Fragment } from "react/jsx-dev-runtime";
|
6130
6167
|
function AppShell({
|
6131
6168
|
children,
|
6132
6169
|
logo,
|
@@ -6135,18 +6172,21 @@ function AppShell({
|
|
6135
6172
|
navigablePages
|
6136
6173
|
}) {
|
6137
6174
|
const { userExperience } = useRemoraidUserExperience();
|
6138
|
-
const mantineTheme =
|
6175
|
+
const mantineTheme = useMantineTheme2();
|
6139
6176
|
const theme = useRemoraidTheme();
|
6140
|
-
const { colorScheme } =
|
6177
|
+
const { colorScheme } = useHydratedMantineColorScheme();
|
6141
6178
|
const [opened, { toggle }] = useDisclosure();
|
6142
6179
|
const navbarVariant = navbar && navbar.variant ? navbar.variant : userExperience.navbarVariant;
|
6143
|
-
const navbarSettings =
|
6180
|
+
const navbarSettings = {
|
6181
|
+
...userExperience.navbarSettings,
|
6182
|
+
...navbar?.settings
|
6183
|
+
};
|
6144
6184
|
const navbarLinkSizePx = co((v) => !Number.isNaN(v), Number(px2(navbarSettings.linkSize)), 0);
|
6145
6185
|
const navbarPaddingPx = typeof navbarSettings.px === "number" ? navbarSettings.px : theme.spacingPx ? theme.spacingPx[navbarSettings.px] : 0;
|
6146
|
-
return /* @__PURE__ */
|
6186
|
+
return /* @__PURE__ */ jsxDEV10(AppProvider, {
|
6147
6187
|
user,
|
6148
6188
|
navigablePages,
|
6149
|
-
children: /* @__PURE__ */
|
6189
|
+
children: /* @__PURE__ */ jsxDEV10(MantineAppShell, {
|
6150
6190
|
header: { height: 0 },
|
6151
6191
|
navbar: {
|
6152
6192
|
width: rem2(`${navbarLinkSizePx + 2 * navbarPaddingPx}px`),
|
@@ -6155,13 +6195,13 @@ function AppShell({
|
|
6155
6195
|
},
|
6156
6196
|
bg: colorScheme === "dark" ? mantineTheme.colors.dark[9] : mantineTheme.colors.gray[0],
|
6157
6197
|
children: [
|
6158
|
-
/* @__PURE__ */
|
6198
|
+
/* @__PURE__ */ jsxDEV10(MantineAppShell.Header, {
|
6159
6199
|
withBorder: false,
|
6160
|
-
children: /* @__PURE__ */
|
6200
|
+
children: /* @__PURE__ */ jsxDEV10(Group2, {
|
6161
6201
|
p: "md",
|
6162
6202
|
bg: colorScheme === "dark" ? mantineTheme.colors.dark[8] : mantineTheme.colors.gray[3],
|
6163
6203
|
hiddenFrom: "sm",
|
6164
|
-
children: /* @__PURE__ */
|
6204
|
+
children: /* @__PURE__ */ jsxDEV10(Burger, {
|
6165
6205
|
opened,
|
6166
6206
|
onClick: toggle,
|
6167
6207
|
h: 20,
|
@@ -6169,25 +6209,25 @@ function AppShell({
|
|
6169
6209
|
}, undefined, false, undefined, this)
|
6170
6210
|
}, undefined, false, undefined, this)
|
6171
6211
|
}, undefined, false, undefined, this),
|
6172
|
-
/* @__PURE__ */
|
6212
|
+
/* @__PURE__ */ jsxDEV10(MantineAppShell.Navbar, {
|
6173
6213
|
withBorder: false,
|
6174
|
-
children: navbarVariant === "minimal" /* Minimal */ && /* @__PURE__ */
|
6214
|
+
children: navbarVariant === "minimal" /* Minimal */ && /* @__PURE__ */ jsxDEV10(NavbarMinimal, {
|
6175
6215
|
logo,
|
6176
6216
|
user,
|
6177
6217
|
...navbar
|
6178
6218
|
}, undefined, false, undefined, this)
|
6179
6219
|
}, undefined, false, undefined, this),
|
6180
|
-
/* @__PURE__ */
|
6181
|
-
children: /* @__PURE__ */
|
6220
|
+
/* @__PURE__ */ jsxDEV10(MantineAppShell.Main, {
|
6221
|
+
children: /* @__PURE__ */ jsxDEV10(Fragment, {
|
6182
6222
|
children: [
|
6183
|
-
/* @__PURE__ */
|
6223
|
+
/* @__PURE__ */ jsxDEV10(Paper2, {
|
6184
6224
|
radius: 0,
|
6185
6225
|
my: "md",
|
6186
6226
|
h: 20,
|
6187
6227
|
hiddenFrom: "sm"
|
6188
6228
|
}, undefined, false, undefined, this),
|
6189
6229
|
children,
|
6190
|
-
/* @__PURE__ */
|
6230
|
+
/* @__PURE__ */ jsxDEV10(Footer, {}, undefined, false, undefined, this)
|
6191
6231
|
]
|
6192
6232
|
}, undefined, true, undefined, this)
|
6193
6233
|
}, undefined, false, undefined, this)
|
@@ -6196,31 +6236,25 @@ function AppShell({
|
|
6196
6236
|
}, undefined, false, undefined, this);
|
6197
6237
|
}
|
6198
6238
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
6199
|
-
import {
|
6200
|
-
Chip,
|
6201
|
-
Divider as Divider2,
|
6202
|
-
Flex as Flex2,
|
6203
|
-
ScrollArea,
|
6204
|
-
Text
|
6205
|
-
} from "@mantine/core";
|
6239
|
+
import { Chip as Chip2, Divider as Divider2, Flex as Flex3, Text } from "@mantine/core";
|
6206
6240
|
|
6207
6241
|
// src/core/components/Page/index.tsx
|
6208
6242
|
import React6, {
|
6209
|
-
useContext as
|
6210
|
-
useEffect as
|
6243
|
+
useContext as useContext6,
|
6244
|
+
useEffect as useEffect3
|
6211
6245
|
} from "react";
|
6212
6246
|
import { usePathname as usePathname2 } from "next/navigation";
|
6213
6247
|
|
6214
6248
|
// src/core/components/Page/PageContainer/index.tsx
|
6215
6249
|
import { Container } from "@mantine/core";
|
6216
|
-
import { jsxDEV as
|
6250
|
+
import { jsxDEV as jsxDEV11 } from "react/jsx-dev-runtime";
|
6217
6251
|
function PageContainer({
|
6218
6252
|
children,
|
6219
6253
|
pt,
|
6220
6254
|
componentsProps
|
6221
6255
|
}) {
|
6222
6256
|
const theme = useRemoraidTheme();
|
6223
|
-
return /* @__PURE__ */
|
6257
|
+
return /* @__PURE__ */ jsxDEV11(Container, {
|
6224
6258
|
size: theme.containerSize,
|
6225
6259
|
pt: pt ?? "md",
|
6226
6260
|
...componentsProps?.container,
|
@@ -6229,10 +6263,10 @@ function PageContainer({
|
|
6229
6263
|
}
|
6230
6264
|
|
6231
6265
|
// src/core/components/Page/index.tsx
|
6232
|
-
import { jsxDEV as
|
6266
|
+
import { jsxDEV as jsxDEV12 } from "react/jsx-dev-runtime";
|
6233
6267
|
var pageContext = React6.createContext(null);
|
6234
6268
|
var usePage = () => {
|
6235
|
-
return
|
6269
|
+
return useContext6(pageContext);
|
6236
6270
|
};
|
6237
6271
|
function Page({
|
6238
6272
|
children,
|
@@ -6244,16 +6278,16 @@ function Page({
|
|
6244
6278
|
const pathname = usePathname2();
|
6245
6279
|
const { isPageRegistered, registerPage } = useWidgets();
|
6246
6280
|
const pageId = config?.pageId ?? pathname;
|
6247
|
-
|
6281
|
+
useEffect3(() => {
|
6248
6282
|
if (!isPageRegistered(pageId)) {
|
6249
6283
|
if (config?.registerPageDirectly) {
|
6250
6284
|
registerPage(pageId, []);
|
6251
6285
|
}
|
6252
6286
|
}
|
6253
6287
|
}, []);
|
6254
|
-
return /* @__PURE__ */
|
6288
|
+
return /* @__PURE__ */ jsxDEV12(pageContext.Provider, {
|
6255
6289
|
value: { name: name ?? pathname, pageId, ...config },
|
6256
|
-
children: /* @__PURE__ */
|
6290
|
+
children: /* @__PURE__ */ jsxDEV12(PageContainer, {
|
6257
6291
|
pt,
|
6258
6292
|
componentsProps: { container: componentsProps?.container },
|
6259
6293
|
children
|
@@ -6263,7 +6297,44 @@ function Page({
|
|
6263
6297
|
|
6264
6298
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
6265
6299
|
import { IconCheck } from "@tabler/icons-react";
|
6266
|
-
|
6300
|
+
|
6301
|
+
// src/core/components/ScrollableChipGroup/index.tsx
|
6302
|
+
import {
|
6303
|
+
Chip,
|
6304
|
+
Flex as Flex2,
|
6305
|
+
ScrollArea
|
6306
|
+
} from "@mantine/core";
|
6307
|
+
import { jsxDEV as jsxDEV13 } from "react/jsx-dev-runtime";
|
6308
|
+
function ScrollableChipGroup({
|
6309
|
+
value,
|
6310
|
+
onChange,
|
6311
|
+
gap,
|
6312
|
+
componentsProps,
|
6313
|
+
children
|
6314
|
+
}) {
|
6315
|
+
const theme = useRemoraidTheme();
|
6316
|
+
return /* @__PURE__ */ jsxDEV13(ScrollArea, {
|
6317
|
+
...theme.scrollAreaProps,
|
6318
|
+
...componentsProps?.scrollArea,
|
6319
|
+
children: /* @__PURE__ */ jsxDEV13(Chip.Group, {
|
6320
|
+
value,
|
6321
|
+
onChange,
|
6322
|
+
...componentsProps?.chipGroup,
|
6323
|
+
multiple: true,
|
6324
|
+
children: /* @__PURE__ */ jsxDEV13(Flex2, {
|
6325
|
+
justify: "flex-start",
|
6326
|
+
align: "center",
|
6327
|
+
gap: gap ?? "xs",
|
6328
|
+
h: "auto",
|
6329
|
+
...componentsProps?.container,
|
6330
|
+
children
|
6331
|
+
}, undefined, false, undefined, this)
|
6332
|
+
}, undefined, false, undefined, this)
|
6333
|
+
}, undefined, false, undefined, this);
|
6334
|
+
}
|
6335
|
+
|
6336
|
+
// src/core/components/WidgetSelectionHeader/index.tsx
|
6337
|
+
import { jsxDEV as jsxDEV14 } from "react/jsx-dev-runtime";
|
6267
6338
|
function WidgetSelectionHeader({
|
6268
6339
|
title,
|
6269
6340
|
disabledWidgets,
|
@@ -6276,45 +6347,35 @@ function WidgetSelectionHeader({
|
|
6276
6347
|
console.error("'WidgetSelectionHeader' must be rendered inside of a 'Page' component.");
|
6277
6348
|
return null;
|
6278
6349
|
}
|
6279
|
-
return /* @__PURE__ */
|
6350
|
+
return /* @__PURE__ */ jsxDEV14(Flex3, {
|
6280
6351
|
justify: "flex-start",
|
6281
6352
|
align: "center",
|
6282
6353
|
gap: "xs",
|
6283
6354
|
mt,
|
6284
6355
|
children: [
|
6285
|
-
/* @__PURE__ */
|
6356
|
+
/* @__PURE__ */ jsxDEV14(Text, {
|
6286
6357
|
size: "lg",
|
6287
6358
|
fw: 400,
|
6288
6359
|
children: title ?? page.name
|
6289
6360
|
}, undefined, false, undefined, this),
|
6290
|
-
/* @__PURE__ */
|
6361
|
+
/* @__PURE__ */ jsxDEV14(Divider2, {
|
6291
6362
|
orientation: "vertical"
|
6292
6363
|
}, undefined, false, undefined, this),
|
6293
|
-
isPageRegistered(page.pageId) && /* @__PURE__ */
|
6294
|
-
|
6295
|
-
|
6296
|
-
|
6297
|
-
|
6298
|
-
|
6299
|
-
|
6300
|
-
|
6301
|
-
|
6302
|
-
|
6303
|
-
|
6304
|
-
|
6305
|
-
|
6306
|
-
|
6307
|
-
|
6308
|
-
value: widgetId,
|
6309
|
-
size: "sm",
|
6310
|
-
disabled: disabledWidgets && disabledWidgets.includes(widgetId),
|
6311
|
-
icon: /* @__PURE__ */ jsxDEV12(IconCheck, {
|
6312
|
-
...theme.iconProps.tiny
|
6313
|
-
}, undefined, false, undefined, this),
|
6314
|
-
children: widgets[page.pageId][widgetId].name
|
6315
|
-
}, widgetId, false, undefined, this))
|
6316
|
-
}, undefined, false, undefined, this)
|
6317
|
-
}, undefined, false, undefined, this)
|
6364
|
+
isPageRegistered(page.pageId) && /* @__PURE__ */ jsxDEV14(ScrollableChipGroup, {
|
6365
|
+
value: Object.keys(widgets[page.pageId]).filter((widgetId) => widgets[page.pageId][widgetId].selected),
|
6366
|
+
onChange: (value) => {
|
6367
|
+
updateWidgetSelectionBulk(page.pageId, value);
|
6368
|
+
},
|
6369
|
+
componentsProps: { scrollArea: { flex: 1 } },
|
6370
|
+
children: Object.keys(widgets[page.pageId]).map((widgetId) => /* @__PURE__ */ jsxDEV14(Chip2, {
|
6371
|
+
value: widgetId,
|
6372
|
+
size: "sm",
|
6373
|
+
disabled: disabledWidgets && disabledWidgets.includes(widgetId),
|
6374
|
+
icon: /* @__PURE__ */ jsxDEV14(IconCheck, {
|
6375
|
+
...theme.iconProps.tiny
|
6376
|
+
}, undefined, false, undefined, this),
|
6377
|
+
children: widgets[page.pageId][widgetId].name
|
6378
|
+
}, widgetId, false, undefined, this))
|
6318
6379
|
}, undefined, false, undefined, this)
|
6319
6380
|
]
|
6320
6381
|
}, undefined, true, undefined, this);
|
@@ -6322,17 +6383,17 @@ function WidgetSelectionHeader({
|
|
6322
6383
|
// src/core/components/Widget/WidgetWrapper/CloseButton/index.tsx
|
6323
6384
|
import { ActionIcon, Transition } from "@mantine/core";
|
6324
6385
|
import { IconX } from "@tabler/icons-react";
|
6325
|
-
import { jsxDEV as
|
6386
|
+
import { jsxDEV as jsxDEV15 } from "react/jsx-dev-runtime";
|
6326
6387
|
function CloseButton({ widgetId }) {
|
6327
6388
|
const theme = useRemoraidTheme();
|
6328
6389
|
const { activeWidget, updateWidgetSelection } = useWidgets();
|
6329
6390
|
const page = usePage();
|
6330
|
-
return /* @__PURE__ */
|
6391
|
+
return /* @__PURE__ */ jsxDEV15(Transition, {
|
6331
6392
|
mounted: activeWidget === widgetId,
|
6332
6393
|
transition: "pop-top-right",
|
6333
6394
|
duration: theme.transitionDurations.short,
|
6334
6395
|
timingFunction: "ease",
|
6335
|
-
children: (transitionStyle) => /* @__PURE__ */
|
6396
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV15(ActionIcon, {
|
6336
6397
|
pos: "absolute",
|
6337
6398
|
size: "xs",
|
6338
6399
|
className: "remoraid-close-button",
|
@@ -6345,7 +6406,7 @@ function CloseButton({ widgetId }) {
|
|
6345
6406
|
updateWidgetSelection(page.pageId, widgetId, false);
|
6346
6407
|
},
|
6347
6408
|
style: transitionStyle,
|
6348
|
-
children: /* @__PURE__ */
|
6409
|
+
children: /* @__PURE__ */ jsxDEV15(IconX, {
|
6349
6410
|
...theme.iconProps.tiny
|
6350
6411
|
}, undefined, false, undefined, this)
|
6351
6412
|
}, undefined, false, undefined, this)
|
@@ -6365,7 +6426,7 @@ import {
|
|
6365
6426
|
Tooltip as Tooltip2,
|
6366
6427
|
Transition as Transition2
|
6367
6428
|
} from "@mantine/core";
|
6368
|
-
import { jsxDEV as
|
6429
|
+
import { jsxDEV as jsxDEV16 } from "react/jsx-dev-runtime";
|
6369
6430
|
var isBadgeMinimalProps = (e) => {
|
6370
6431
|
if (typeof e !== "object") {
|
6371
6432
|
return false;
|
@@ -6378,17 +6439,17 @@ var isBadgeMinimalProps = (e) => {
|
|
6378
6439
|
function BadgeMinimal(props) {
|
6379
6440
|
const { label, tooltip, mounted, componentsProps } = props;
|
6380
6441
|
const theme = useRemoraidTheme();
|
6381
|
-
return /* @__PURE__ */
|
6442
|
+
return /* @__PURE__ */ jsxDEV16(Transition2, {
|
6382
6443
|
mounted: mounted !== false,
|
6383
6444
|
transition: "fade",
|
6384
6445
|
duration: theme.transitionDurations.short,
|
6385
6446
|
timingFunction: "ease",
|
6386
6447
|
...componentsProps?.transition,
|
6387
|
-
children: (transitionStyle) => /* @__PURE__ */
|
6448
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV16(Tooltip2, {
|
6388
6449
|
disabled: !tooltip,
|
6389
6450
|
label: tooltip,
|
6390
6451
|
...componentsProps?.tooltip,
|
6391
|
-
children: /* @__PURE__ */
|
6452
|
+
children: /* @__PURE__ */ jsxDEV16(Badge, {
|
6392
6453
|
variant: "default",
|
6393
6454
|
...componentsProps?.badge,
|
6394
6455
|
style: {
|
@@ -6403,7 +6464,7 @@ function BadgeMinimal(props) {
|
|
6403
6464
|
}
|
6404
6465
|
|
6405
6466
|
// src/core/components/BadgeGroup/index.tsx
|
6406
|
-
import { jsxDEV as
|
6467
|
+
import { jsxDEV as jsxDEV17, Fragment as Fragment2 } from "react/jsx-dev-runtime";
|
6407
6468
|
import { createElement } from "react";
|
6408
6469
|
function BadgeGroup({
|
6409
6470
|
badges,
|
@@ -6413,9 +6474,9 @@ function BadgeGroup({
|
|
6413
6474
|
}) {
|
6414
6475
|
const theme = useRemoraidTheme();
|
6415
6476
|
const numVisibleBadges = badges.filter((e) => isBadgeMinimalProps(e) ? e.mounted !== false : true).length;
|
6416
|
-
return /* @__PURE__ */
|
6477
|
+
return /* @__PURE__ */ jsxDEV17(Fragment2, {
|
6417
6478
|
children: [
|
6418
|
-
/* @__PURE__ */
|
6479
|
+
/* @__PURE__ */ jsxDEV17(Group3, {
|
6419
6480
|
gap: gap ?? "xs",
|
6420
6481
|
wrap: "nowrap",
|
6421
6482
|
visibleFrom: breakpoint ?? theme.breakpoints.badgeGroupCollapse,
|
@@ -6429,10 +6490,10 @@ function BadgeGroup({
|
|
6429
6490
|
return e;
|
6430
6491
|
})
|
6431
6492
|
}, undefined, false, undefined, this),
|
6432
|
-
/* @__PURE__ */
|
6493
|
+
/* @__PURE__ */ jsxDEV17(Tooltip3, {
|
6433
6494
|
label: `${numVisibleBadges} badge${numVisibleBadges === 1 ? "" : "s"}`,
|
6434
6495
|
...componentsProps?.tooltip,
|
6435
|
-
children: /* @__PURE__ */
|
6496
|
+
children: /* @__PURE__ */ jsxDEV17(Badge2, {
|
6436
6497
|
hiddenFrom: breakpoint ?? theme.breakpoints.badgeGroupCollapse,
|
6437
6498
|
hidden: numVisibleBadges === 0,
|
6438
6499
|
variant: "light",
|
@@ -6450,7 +6511,7 @@ import {
|
|
6450
6511
|
Alert,
|
6451
6512
|
Transition as Transition3
|
6452
6513
|
} from "@mantine/core";
|
6453
|
-
import { jsxDEV as
|
6514
|
+
import { jsxDEV as jsxDEV18 } from "react/jsx-dev-runtime";
|
6454
6515
|
var isAlertMinimalProps = (e) => {
|
6455
6516
|
if (typeof e !== "object") {
|
6456
6517
|
return false;
|
@@ -6472,13 +6533,13 @@ function AlertMinimal({
|
|
6472
6533
|
componentsProps
|
6473
6534
|
}) {
|
6474
6535
|
const theme = useRemoraidTheme();
|
6475
|
-
return /* @__PURE__ */
|
6536
|
+
return /* @__PURE__ */ jsxDEV18(Transition3, {
|
6476
6537
|
mounted: mounted !== false,
|
6477
6538
|
transition: "fade",
|
6478
6539
|
duration: theme.transitionDurations.short,
|
6479
6540
|
timingFunction: "ease",
|
6480
6541
|
...componentsProps?.transition,
|
6481
|
-
children: (transitionStyle) => /* @__PURE__ */
|
6542
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV18(Alert, {
|
6482
6543
|
...theme.alertProps[category],
|
6483
6544
|
title: title ?? theme.alertProps[category].title,
|
6484
6545
|
withCloseButton: onClose !== undefined,
|
@@ -6504,7 +6565,7 @@ import {
|
|
6504
6565
|
Tooltip as Tooltip4
|
6505
6566
|
} from "@mantine/core";
|
6506
6567
|
import { IconClick } from "@tabler/icons-react";
|
6507
|
-
import { jsxDEV as
|
6568
|
+
import { jsxDEV as jsxDEV19, Fragment as Fragment3 } from "react/jsx-dev-runtime";
|
6508
6569
|
var isRemoraidButtonProps = (e) => {
|
6509
6570
|
if (typeof e !== "object") {
|
6510
6571
|
return false;
|
@@ -6529,17 +6590,17 @@ function RemoraidButton({
|
|
6529
6590
|
}) {
|
6530
6591
|
const theme = useRemoraidTheme();
|
6531
6592
|
const iconProps = { ...theme.iconProps.medium, ...componentsProps?.icon };
|
6532
|
-
const icon = props.icon ? /* @__PURE__ */
|
6593
|
+
const icon = props.icon ? /* @__PURE__ */ jsxDEV19(props.icon, {
|
6533
6594
|
...iconProps
|
6534
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
6595
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV19(IconClick, {
|
6535
6596
|
...iconProps
|
6536
6597
|
}, undefined, false, undefined, this);
|
6537
|
-
return /* @__PURE__ */
|
6598
|
+
return /* @__PURE__ */ jsxDEV19(Fragment3, {
|
6538
6599
|
children: [
|
6539
|
-
/* @__PURE__ */
|
6600
|
+
/* @__PURE__ */ jsxDEV19(Tooltip4, {
|
6540
6601
|
label,
|
6541
6602
|
...componentsProps?.tooltip,
|
6542
|
-
children: /* @__PURE__ */
|
6603
|
+
children: /* @__PURE__ */ jsxDEV19(ActionIcon2, {
|
6543
6604
|
"aria-label": label,
|
6544
6605
|
variant: variant ?? "default",
|
6545
6606
|
onClick,
|
@@ -6553,7 +6614,7 @@ function RemoraidButton({
|
|
6553
6614
|
children: icon
|
6554
6615
|
}, undefined, false, undefined, this)
|
6555
6616
|
}, undefined, false, undefined, this),
|
6556
|
-
/* @__PURE__ */
|
6617
|
+
/* @__PURE__ */ jsxDEV19(Button, {
|
6557
6618
|
onClick,
|
6558
6619
|
loading,
|
6559
6620
|
variant: variant ?? "default",
|
@@ -6574,8 +6635,8 @@ import {
|
|
6574
6635
|
Paper as Paper3,
|
6575
6636
|
Transition as Transition4
|
6576
6637
|
} from "@mantine/core";
|
6577
|
-
import { useEffect as
|
6578
|
-
import { jsxDEV as
|
6638
|
+
import { useEffect as useEffect4 } from "react";
|
6639
|
+
import { jsxDEV as jsxDEV20 } from "react/jsx-dev-runtime";
|
6579
6640
|
function WidgetWrapper({
|
6580
6641
|
children,
|
6581
6642
|
config,
|
@@ -6593,7 +6654,7 @@ function WidgetWrapper({
|
|
6593
6654
|
const page = usePage();
|
6594
6655
|
const theme = useRemoraidTheme();
|
6595
6656
|
const pageRegistered = page ? isPageRegistered(page.pageId) : false;
|
6596
|
-
|
6657
|
+
useEffect4(() => {
|
6597
6658
|
if (!page) {
|
6598
6659
|
return;
|
6599
6660
|
}
|
@@ -6601,12 +6662,12 @@ function WidgetWrapper({
|
|
6601
6662
|
registerWidget(page.pageId, config);
|
6602
6663
|
}
|
6603
6664
|
}, [pageRegistered]);
|
6604
|
-
return /* @__PURE__ */
|
6665
|
+
return /* @__PURE__ */ jsxDEV20(Transition4, {
|
6605
6666
|
mounted: page !== null && isWidgetSelected(page.pageId, config.widgetId),
|
6606
6667
|
transition: "fade-left",
|
6607
6668
|
duration: theme.transitionDurations.medium,
|
6608
6669
|
timingFunction: "ease",
|
6609
|
-
children: (transitionStyle) => /* @__PURE__ */
|
6670
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV20(Paper3, {
|
6610
6671
|
p: "md",
|
6611
6672
|
shadow: "md",
|
6612
6673
|
bg: theme.transparentBackground,
|
@@ -6622,7 +6683,7 @@ function WidgetWrapper({
|
|
6622
6683
|
updateActiveWidget(null);
|
6623
6684
|
},
|
6624
6685
|
children: [
|
6625
|
-
withCloseButton !== false && /* @__PURE__ */
|
6686
|
+
withCloseButton !== false && /* @__PURE__ */ jsxDEV20(CloseButton, {
|
6626
6687
|
widgetId: config.widgetId
|
6627
6688
|
}, undefined, false, undefined, this),
|
6628
6689
|
children
|
@@ -6641,7 +6702,7 @@ import {
|
|
6641
6702
|
Loader,
|
6642
6703
|
Title
|
6643
6704
|
} from "@mantine/core";
|
6644
|
-
import { jsxDEV as
|
6705
|
+
import { jsxDEV as jsxDEV21, Fragment as Fragment4 } from "react/jsx-dev-runtime";
|
6645
6706
|
import { createElement as createElement2 } from "react";
|
6646
6707
|
function Widget({
|
6647
6708
|
children,
|
@@ -6659,7 +6720,7 @@ function Widget({
|
|
6659
6720
|
const badgesGap = (typeof gaps === "object" ? gaps.badges : gaps) ?? "xs";
|
6660
6721
|
const buttonsGap = (typeof gaps === "object" ? gaps.buttons : gaps) ?? "xs";
|
6661
6722
|
const alertsGap = (typeof gaps === "object" ? gaps.alerts : gaps) ?? "xs";
|
6662
|
-
return /* @__PURE__ */
|
6723
|
+
return /* @__PURE__ */ jsxDEV21(WidgetWrapper_default, {
|
6663
6724
|
config: {
|
6664
6725
|
widgetId: id,
|
6665
6726
|
name: title,
|
@@ -6672,28 +6733,28 @@ function Widget({
|
|
6672
6733
|
},
|
6673
6734
|
...componentsProps?.wrapper,
|
6674
6735
|
children: [
|
6675
|
-
/* @__PURE__ */
|
6736
|
+
/* @__PURE__ */ jsxDEV21(Group4, {
|
6676
6737
|
justify: "space-between",
|
6677
6738
|
wrap: "nowrap",
|
6678
6739
|
children: [
|
6679
|
-
/* @__PURE__ */
|
6740
|
+
/* @__PURE__ */ jsxDEV21(Group4, {
|
6680
6741
|
gap: badgesGap,
|
6681
6742
|
wrap: "nowrap",
|
6682
6743
|
children: [
|
6683
|
-
/* @__PURE__ */
|
6744
|
+
/* @__PURE__ */ jsxDEV21(Title, {
|
6684
6745
|
order: 1,
|
6685
6746
|
size: "h3",
|
6686
6747
|
lineClamp: 1,
|
6687
6748
|
children: title
|
6688
6749
|
}, undefined, false, undefined, this),
|
6689
|
-
badges !== undefined && /* @__PURE__ */
|
6750
|
+
badges !== undefined && /* @__PURE__ */ jsxDEV21(BadgeGroup, {
|
6690
6751
|
badges,
|
6691
6752
|
gap: badgesGap,
|
6692
6753
|
...componentsProps?.badgeGroup
|
6693
6754
|
}, undefined, false, undefined, this)
|
6694
6755
|
]
|
6695
6756
|
}, undefined, true, undefined, this),
|
6696
|
-
/* @__PURE__ */
|
6757
|
+
/* @__PURE__ */ jsxDEV21(Group4, {
|
6697
6758
|
gap: buttonsGap,
|
6698
6759
|
wrap: "nowrap",
|
6699
6760
|
children: buttons !== undefined && buttons.map((e, i) => {
|
@@ -6708,7 +6769,7 @@ function Widget({
|
|
6708
6769
|
}, undefined, false, undefined, this)
|
6709
6770
|
]
|
6710
6771
|
}, undefined, true, undefined, this),
|
6711
|
-
/* @__PURE__ */
|
6772
|
+
/* @__PURE__ */ jsxDEV21(Divider3, {
|
6712
6773
|
my: "md"
|
6713
6774
|
}, undefined, false, undefined, this),
|
6714
6775
|
alerts !== undefined && alerts.map((a, i) => {
|
@@ -6721,11 +6782,11 @@ function Widget({
|
|
6721
6782
|
}
|
6722
6783
|
return a;
|
6723
6784
|
}),
|
6724
|
-
loading ? /* @__PURE__ */
|
6725
|
-
children: /* @__PURE__ */
|
6785
|
+
loading ? /* @__PURE__ */ jsxDEV21(Center, {
|
6786
|
+
children: /* @__PURE__ */ jsxDEV21(Loader, {
|
6726
6787
|
...componentsProps?.loader
|
6727
6788
|
}, undefined, false, undefined, this)
|
6728
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
6789
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV21(Fragment4, {
|
6729
6790
|
children
|
6730
6791
|
}, undefined, false, undefined, this)
|
6731
6792
|
]
|
@@ -6734,7 +6795,7 @@ function Widget({
|
|
6734
6795
|
// src/core/components/NotFoundPage/index.tsx
|
6735
6796
|
import { Alert as Alert2 } from "@mantine/core";
|
6736
6797
|
import { usePathname as usePathname3 } from "next/navigation";
|
6737
|
-
import { jsxDEV as
|
6798
|
+
import { jsxDEV as jsxDEV22 } from "react/jsx-dev-runtime";
|
6738
6799
|
function NotFoundPage({
|
6739
6800
|
children,
|
6740
6801
|
message,
|
@@ -6742,11 +6803,11 @@ function NotFoundPage({
|
|
6742
6803
|
}) {
|
6743
6804
|
const pathname = usePathname3();
|
6744
6805
|
const theme = useRemoraidTheme();
|
6745
|
-
return /* @__PURE__ */
|
6806
|
+
return /* @__PURE__ */ jsxDEV22(Page, {
|
6746
6807
|
name: "Not Found",
|
6747
6808
|
...componentsProps?.page,
|
6748
6809
|
children: [
|
6749
|
-
/* @__PURE__ */
|
6810
|
+
/* @__PURE__ */ jsxDEV22(Alert2, {
|
6750
6811
|
...theme.alertProps.negative,
|
6751
6812
|
title: "404 - Page Not Found",
|
6752
6813
|
children: message ?? `Could not find page ${pathname}.`
|
@@ -6757,7 +6818,7 @@ function NotFoundPage({
|
|
6757
6818
|
}
|
6758
6819
|
// src/core/components/EnvironmentShell/index.tsx
|
6759
6820
|
import { Alert as Alert3 } from "@mantine/core";
|
6760
|
-
import { jsxDEV as
|
6821
|
+
import { jsxDEV as jsxDEV23, Fragment as Fragment5 } from "react/jsx-dev-runtime";
|
6761
6822
|
function EnvironmentShell({
|
6762
6823
|
children,
|
6763
6824
|
environment,
|
@@ -6771,7 +6832,7 @@ function EnvironmentShell({
|
|
6771
6832
|
const undefinedKeys = Object.keys(environment).filter((key) => environment[key] === undefined);
|
6772
6833
|
const alertTitle = `Please Specify Environment Variable${undefinedKeys.length > 1 ? "s" : ""}`;
|
6773
6834
|
const alertMessage = `Components could not be rendered because the following environment variables are not specified: ${undefinedKeys.join(", ")}.`;
|
6774
|
-
const alert = /* @__PURE__ */
|
6835
|
+
const alert = /* @__PURE__ */ jsxDEV23(Alert3, {
|
6775
6836
|
...theme.alertProps.neutral,
|
6776
6837
|
title: alertTitle,
|
6777
6838
|
m,
|
@@ -6779,12 +6840,12 @@ function EnvironmentShell({
|
|
6779
6840
|
children: message ?? alertMessage
|
6780
6841
|
}, undefined, false, undefined, this);
|
6781
6842
|
if (undefinedKeys.length === 0) {
|
6782
|
-
return /* @__PURE__ */
|
6843
|
+
return /* @__PURE__ */ jsxDEV23(Fragment5, {
|
6783
6844
|
children
|
6784
6845
|
}, undefined, false, undefined, this);
|
6785
6846
|
}
|
6786
6847
|
if (withContainer) {
|
6787
|
-
return /* @__PURE__ */
|
6848
|
+
return /* @__PURE__ */ jsxDEV23(PageContainer, {
|
6788
6849
|
componentsProps: { container: componentsProps?.container },
|
6789
6850
|
children: alert
|
6790
6851
|
}, undefined, false, undefined, this);
|
@@ -6792,26 +6853,27 @@ function EnvironmentShell({
|
|
6792
6853
|
return alert;
|
6793
6854
|
}
|
6794
6855
|
// src/core/components/SettingsWidget/index.tsx
|
6795
|
-
import { createContext as
|
6856
|
+
import { createContext as createContext4, useContext as useContext7 } from "react";
|
6796
6857
|
import { IconRestore } from "@tabler/icons-react";
|
6797
6858
|
|
6798
6859
|
// src/core/components/SettingsWidget/SaveButton/index.tsx
|
6799
6860
|
import { IconDeviceFloppy } from "@tabler/icons-react";
|
6800
6861
|
import { Group as Group5 } from "@mantine/core";
|
6801
|
-
import { jsxDEV as
|
6862
|
+
import { jsxDEV as jsxDEV24 } from "react/jsx-dev-runtime";
|
6802
6863
|
function SaveButton({
|
6803
6864
|
onSaveChanges,
|
6804
6865
|
insideContainer,
|
6805
6866
|
componentsProps
|
6806
6867
|
}) {
|
6807
6868
|
const settingsWidgetOptions = useSettingsWidgetContext();
|
6808
|
-
const button = /* @__PURE__ */
|
6869
|
+
const button = /* @__PURE__ */ jsxDEV24(RemoraidButton, {
|
6809
6870
|
label: "Save Changes",
|
6810
6871
|
icon: IconDeviceFloppy,
|
6811
6872
|
onClick: onSaveChanges,
|
6812
6873
|
responsive: false,
|
6813
6874
|
...componentsProps?.button,
|
6814
6875
|
componentsProps: {
|
6876
|
+
...componentsProps?.button?.componentsProps,
|
6815
6877
|
button: {
|
6816
6878
|
disabled: settingsWidgetOptions.unsavedChanges === false,
|
6817
6879
|
...componentsProps?.button?.componentsProps?.button
|
@@ -6819,7 +6881,7 @@ function SaveButton({
|
|
6819
6881
|
}
|
6820
6882
|
}, undefined, false, undefined, this);
|
6821
6883
|
if (insideContainer !== false) {
|
6822
|
-
return /* @__PURE__ */
|
6884
|
+
return /* @__PURE__ */ jsxDEV24(Group5, {
|
6823
6885
|
w: "100%",
|
6824
6886
|
justify: "flex-end",
|
6825
6887
|
mt: "md",
|
@@ -6831,11 +6893,11 @@ function SaveButton({
|
|
6831
6893
|
}
|
6832
6894
|
|
6833
6895
|
// src/core/components/SettingsWidget/index.tsx
|
6834
|
-
import { jsxDEV as
|
6896
|
+
import { jsxDEV as jsxDEV25 } from "react/jsx-dev-runtime";
|
6835
6897
|
var defaultSettingsWidgetContext = {};
|
6836
|
-
var settingsWidgetContext =
|
6898
|
+
var settingsWidgetContext = createContext4(defaultSettingsWidgetContext);
|
6837
6899
|
var useSettingsWidgetContext = () => {
|
6838
|
-
return
|
6900
|
+
return useContext7(settingsWidgetContext);
|
6839
6901
|
};
|
6840
6902
|
function SettingsWidget({
|
6841
6903
|
children,
|
@@ -6844,9 +6906,9 @@ function SettingsWidget({
|
|
6844
6906
|
custom,
|
6845
6907
|
widgetProps
|
6846
6908
|
}) {
|
6847
|
-
return /* @__PURE__ */
|
6909
|
+
return /* @__PURE__ */ jsxDEV25(settingsWidgetContext.Provider, {
|
6848
6910
|
value: { custom, unsavedChanges },
|
6849
|
-
children: /* @__PURE__ */
|
6911
|
+
children: /* @__PURE__ */ jsxDEV25(Widget, {
|
6850
6912
|
title: "Settings",
|
6851
6913
|
id: "settings",
|
6852
6914
|
mt: "md",
|
@@ -6856,7 +6918,8 @@ function SettingsWidget({
|
|
6856
6918
|
{
|
6857
6919
|
label: "Restore Default Values",
|
6858
6920
|
icon: IconRestore,
|
6859
|
-
onClick: onRestoreDefaultValues
|
6921
|
+
onClick: onRestoreDefaultValues,
|
6922
|
+
componentsProps: { button: { disabled: custom === false } }
|
6860
6923
|
}
|
6861
6924
|
] : [],
|
6862
6925
|
...widgetProps?.buttons ?? []
|
@@ -6881,27 +6944,27 @@ var SettingsWidget_default = Object.assign(SettingsWidget, {
|
|
6881
6944
|
SaveButton
|
6882
6945
|
});
|
6883
6946
|
// src/core/components/SettingsWidget/SettingsTable/index.tsx
|
6884
|
-
import { createContext as
|
6947
|
+
import { createContext as createContext5, useContext as useContext8 } from "react";
|
6885
6948
|
import { Table as Table2 } from "@mantine/core";
|
6886
6949
|
|
6887
6950
|
// src/core/components/SettingsWidget/SettingsTable/Row/index.tsx
|
6888
6951
|
import { Table, Text as Text2 } from "@mantine/core";
|
6889
|
-
import { jsxDEV as
|
6952
|
+
import { jsxDEV as jsxDEV26 } from "react/jsx-dev-runtime";
|
6890
6953
|
function Row({
|
6891
6954
|
children,
|
6892
6955
|
label
|
6893
6956
|
}) {
|
6894
6957
|
const options = useSettingsTableOptions();
|
6895
|
-
return /* @__PURE__ */
|
6958
|
+
return /* @__PURE__ */ jsxDEV26(Table.Tr, {
|
6896
6959
|
children: [
|
6897
|
-
/* @__PURE__ */
|
6960
|
+
/* @__PURE__ */ jsxDEV26(Table.Th, {
|
6898
6961
|
w: options.leftColumnWidth,
|
6899
|
-
children: /* @__PURE__ */
|
6962
|
+
children: /* @__PURE__ */ jsxDEV26(Text2, {
|
6900
6963
|
size: "sm",
|
6901
6964
|
children: label
|
6902
6965
|
}, undefined, false, undefined, this)
|
6903
6966
|
}, undefined, false, undefined, this),
|
6904
|
-
/* @__PURE__ */
|
6967
|
+
/* @__PURE__ */ jsxDEV26(Table.Td, {
|
6905
6968
|
py: "xs",
|
6906
6969
|
children
|
6907
6970
|
}, undefined, false, undefined, this)
|
@@ -6910,29 +6973,29 @@ function Row({
|
|
6910
6973
|
}
|
6911
6974
|
|
6912
6975
|
// src/core/components/SettingsWidget/SettingsTable/index.tsx
|
6913
|
-
import { jsxDEV as
|
6976
|
+
import { jsxDEV as jsxDEV27 } from "react/jsx-dev-runtime";
|
6914
6977
|
var defaultSettingsTableOptions = {
|
6915
6978
|
leftColumnWidth: "38.2%"
|
6916
6979
|
};
|
6917
|
-
var settingsTableOptionsContext =
|
6980
|
+
var settingsTableOptionsContext = createContext5(defaultSettingsTableOptions);
|
6918
6981
|
var useSettingsTableOptions = () => {
|
6919
|
-
return
|
6982
|
+
return useContext8(settingsTableOptionsContext);
|
6920
6983
|
};
|
6921
6984
|
function SettingsTable({
|
6922
6985
|
children,
|
6923
6986
|
leftColumnWidth
|
6924
6987
|
}) {
|
6925
6988
|
const theme = useRemoraidTheme();
|
6926
|
-
return /* @__PURE__ */
|
6989
|
+
return /* @__PURE__ */ jsxDEV27(settingsTableOptionsContext.Provider, {
|
6927
6990
|
value: {
|
6928
6991
|
leftColumnWidth: leftColumnWidth ?? defaultSettingsTableOptions.leftColumnWidth
|
6929
6992
|
},
|
6930
|
-
children: /* @__PURE__ */
|
6993
|
+
children: /* @__PURE__ */ jsxDEV27(Table2, {
|
6931
6994
|
bg: theme.transparentBackground,
|
6932
6995
|
withTableBorder: true,
|
6933
6996
|
variant: "vertical",
|
6934
6997
|
layout: "fixed",
|
6935
|
-
children: /* @__PURE__ */
|
6998
|
+
children: /* @__PURE__ */ jsxDEV27(Table2.Tbody, {
|
6936
6999
|
children
|
6937
7000
|
}, undefined, false, undefined, this)
|
6938
7001
|
}, undefined, false, undefined, this)
|
@@ -6944,9 +7007,9 @@ var SettingsTable_default = Object.assign(SettingsTable, {
|
|
6944
7007
|
// src/core/components/NavbarSettingsWidget/index.tsx
|
6945
7008
|
import { cloneElement } from "react";
|
6946
7009
|
var import_lodash = __toESM(require_lodash(), 1);
|
6947
|
-
import { Chip as
|
7010
|
+
import { Chip as Chip3, Group as Group6 } from "@mantine/core";
|
6948
7011
|
import { IconLink as IconLink2 } from "@tabler/icons-react";
|
6949
|
-
import { jsxDEV as
|
7012
|
+
import { jsxDEV as jsxDEV28 } from "react/jsx-dev-runtime";
|
6950
7013
|
var defaultNavbarSettingsWidgetId = "navbar-settings";
|
6951
7014
|
function NavbarSettingsWidget({
|
6952
7015
|
additionalRows,
|
@@ -6956,7 +7019,7 @@ function NavbarSettingsWidget({
|
|
6956
7019
|
const { userExperience, updateUserExperience, initialUserExperience } = useRemoraidUserExperience();
|
6957
7020
|
const app = useRemoraidApp();
|
6958
7021
|
const theme = useRemoraidTheme();
|
6959
|
-
return /* @__PURE__ */
|
7022
|
+
return /* @__PURE__ */ jsxDEV28(SettingsWidget_default, {
|
6960
7023
|
widgetProps: {
|
6961
7024
|
id: defaultNavbarSettingsWidgetId,
|
6962
7025
|
title: "Navbar Settings",
|
@@ -6969,11 +7032,11 @@ function NavbarSettingsWidget({
|
|
6969
7032
|
}));
|
6970
7033
|
},
|
6971
7034
|
custom: !import_lodash.isEqual(userExperience.navbarSettings, initialUserExperience.navbarSettings),
|
6972
|
-
children: /* @__PURE__ */
|
7035
|
+
children: /* @__PURE__ */ jsxDEV28(SettingsTable_default, {
|
6973
7036
|
children: [
|
6974
|
-
/* @__PURE__ */
|
7037
|
+
/* @__PURE__ */ jsxDEV28(SettingsTable_default.Row, {
|
6975
7038
|
label: "Select which pages you want to display or hide",
|
6976
|
-
children: /* @__PURE__ */
|
7039
|
+
children: /* @__PURE__ */ jsxDEV28(Chip3.Group, {
|
6977
7040
|
multiple: true,
|
6978
7041
|
value: app.navigablePages.filter((p) => !userExperience.navbarSettings.hiddenPages.includes(p.href)).map((p) => p.href),
|
6979
7042
|
onChange: (newValue) => {
|
@@ -6985,12 +7048,12 @@ function NavbarSettingsWidget({
|
|
6985
7048
|
}
|
6986
7049
|
}));
|
6987
7050
|
},
|
6988
|
-
children: /* @__PURE__ */
|
7051
|
+
children: /* @__PURE__ */ jsxDEV28(Group6, {
|
6989
7052
|
justify: "flex-start",
|
6990
7053
|
gap: "xs",
|
6991
|
-
children: app.navigablePages.map((p) => ({ ...p, icon: p.icon ?? IconLink2 })).map((p, i) => /* @__PURE__ */
|
7054
|
+
children: app.navigablePages.map((p) => ({ ...p, icon: p.icon ?? IconLink2 })).map((p, i) => /* @__PURE__ */ jsxDEV28(Chip3, {
|
6992
7055
|
value: p.href,
|
6993
|
-
icon: /* @__PURE__ */
|
7056
|
+
icon: /* @__PURE__ */ jsxDEV28(p.icon, {
|
6994
7057
|
...theme.iconProps.tiny,
|
6995
7058
|
color: theme.primaryColor
|
6996
7059
|
}, undefined, false, undefined, this),
|
@@ -7013,6 +7076,9 @@ export {
|
|
7013
7076
|
useRemoraidUserExperience,
|
7014
7077
|
useRemoraidTheme,
|
7015
7078
|
useRemoraidApp,
|
7079
|
+
usePage,
|
7080
|
+
useHydrationStatus,
|
7081
|
+
useHydratedMantineColorScheme,
|
7016
7082
|
defaultUserExperienceCookieName,
|
7017
7083
|
defaultUserExperience,
|
7018
7084
|
defaultSettingsWidgetContext as defaultSettingsWidgetOptions,
|
@@ -7029,6 +7095,7 @@ export {
|
|
7029
7095
|
TransitionDuration,
|
7030
7096
|
SettingsWidget_default as SettingsWidget,
|
7031
7097
|
SettingsTable_default as SettingsTable,
|
7098
|
+
ScrollableChipGroup,
|
7032
7099
|
RemoraidProvider,
|
7033
7100
|
RemoraidIconSize,
|
7034
7101
|
RemoraidButton,
|
@@ -7038,6 +7105,7 @@ export {
|
|
7038
7105
|
NotFoundPage,
|
7039
7106
|
NavbarVariant,
|
7040
7107
|
NavbarSettingsWidget,
|
7108
|
+
HydrationStatusProvider,
|
7041
7109
|
EnvironmentShell,
|
7042
7110
|
BadgeMinimal,
|
7043
7111
|
BadgeGroup,
|