remoraid 2.7.2 → 2.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/index.cjs +645 -429
- package/dist/core/index.d.ts +257 -106
- package/dist/core/index.js +642 -420
- package/dist/server/index.d.ts +2 -2
- package/package.json +2 -1
package/dist/core/index.js
CHANGED
@@ -977,7 +977,7 @@ var require_lodash = __commonJS((exports, module) => {
|
|
977
977
|
}
|
978
978
|
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
979
979
|
SetCache.prototype.has = setCacheHas;
|
980
|
-
function
|
980
|
+
function Stack3(entries) {
|
981
981
|
var data = this.__data__ = new ListCache(entries);
|
982
982
|
this.size = data.size;
|
983
983
|
}
|
@@ -1011,11 +1011,11 @@ var require_lodash = __commonJS((exports, module) => {
|
|
1011
1011
|
this.size = data.size;
|
1012
1012
|
return this;
|
1013
1013
|
}
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1014
|
+
Stack3.prototype.clear = stackClear;
|
1015
|
+
Stack3.prototype["delete"] = stackDelete;
|
1016
|
+
Stack3.prototype.get = stackGet;
|
1017
|
+
Stack3.prototype.has = stackHas;
|
1018
|
+
Stack3.prototype.set = stackSet;
|
1019
1019
|
function arrayLikeKeys(value, inherited) {
|
1020
1020
|
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes(value.length, String) : [], length = result2.length;
|
1021
1021
|
for (var key in value) {
|
@@ -1131,7 +1131,7 @@ var require_lodash = __commonJS((exports, module) => {
|
|
1131
1131
|
result2 = initCloneByTag(value, tag, isDeep);
|
1132
1132
|
}
|
1133
1133
|
}
|
1134
|
-
stack || (stack = new
|
1134
|
+
stack || (stack = new Stack3);
|
1135
1135
|
var stacked = stack.get(value);
|
1136
1136
|
if (stacked) {
|
1137
1137
|
return stacked;
|
@@ -1400,21 +1400,21 @@ var require_lodash = __commonJS((exports, module) => {
|
|
1400
1400
|
objIsObj = false;
|
1401
1401
|
}
|
1402
1402
|
if (isSameTag && !objIsObj) {
|
1403
|
-
stack || (stack = new
|
1403
|
+
stack || (stack = new Stack3);
|
1404
1404
|
return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
1405
1405
|
}
|
1406
1406
|
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
1407
1407
|
var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
|
1408
1408
|
if (objIsWrapped || othIsWrapped) {
|
1409
1409
|
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
|
1410
|
-
stack || (stack = new
|
1410
|
+
stack || (stack = new Stack3);
|
1411
1411
|
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
1412
1412
|
}
|
1413
1413
|
}
|
1414
1414
|
if (!isSameTag) {
|
1415
1415
|
return false;
|
1416
1416
|
}
|
1417
|
-
stack || (stack = new
|
1417
|
+
stack || (stack = new Stack3);
|
1418
1418
|
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
1419
1419
|
}
|
1420
1420
|
function baseIsMap(value) {
|
@@ -1440,7 +1440,7 @@ var require_lodash = __commonJS((exports, module) => {
|
|
1440
1440
|
return false;
|
1441
1441
|
}
|
1442
1442
|
} else {
|
1443
|
-
var stack = new
|
1443
|
+
var stack = new Stack3;
|
1444
1444
|
if (customizer) {
|
1445
1445
|
var result2 = customizer(objValue, srcValue, key, object, source, stack);
|
1446
1446
|
}
|
@@ -1536,7 +1536,7 @@ var require_lodash = __commonJS((exports, module) => {
|
|
1536
1536
|
return;
|
1537
1537
|
}
|
1538
1538
|
baseFor(source, function(srcValue, key) {
|
1539
|
-
stack || (stack = new
|
1539
|
+
stack || (stack = new Stack3);
|
1540
1540
|
if (isObject(srcValue)) {
|
1541
1541
|
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
1542
1542
|
} else {
|
@@ -5573,6 +5573,10 @@ var NavbarVariant;
|
|
5573
5573
|
((NavbarVariant2) => {
|
5574
5574
|
NavbarVariant2["Minimal"] = "minimal";
|
5575
5575
|
})(NavbarVariant ||= {});
|
5576
|
+
var FooterVariant;
|
5577
|
+
((FooterVariant2) => {
|
5578
|
+
FooterVariant2["Minimal"] = "minimal";
|
5579
|
+
})(FooterVariant ||= {});
|
5576
5580
|
var AlertCategory;
|
5577
5581
|
((AlertCategory2) => {
|
5578
5582
|
AlertCategory2["Negative"] = "negative";
|
@@ -5595,6 +5599,23 @@ var RemoraidIconSize;
|
|
5595
5599
|
RemoraidIconSize2["Tiny"] = "tiny";
|
5596
5600
|
RemoraidIconSize2["Medium"] = "medium";
|
5597
5601
|
})(RemoraidIconSize ||= {});
|
5602
|
+
var LayoutType;
|
5603
|
+
((LayoutType2) => {
|
5604
|
+
LayoutType2["Frame"] = "frame";
|
5605
|
+
})(LayoutType ||= {});
|
5606
|
+
var FrameLayoutSection;
|
5607
|
+
((FrameLayoutSection2) => {
|
5608
|
+
FrameLayoutSection2["Top"] = "top";
|
5609
|
+
FrameLayoutSection2["Bottom"] = "bottom";
|
5610
|
+
FrameLayoutSection2["Left"] = "left";
|
5611
|
+
FrameLayoutSection2["Right"] = "right";
|
5612
|
+
FrameLayoutSection2["Content"] = "content";
|
5613
|
+
})(FrameLayoutSection ||= {});
|
5614
|
+
var FrameLayoutVariant;
|
5615
|
+
((FrameLayoutVariant2) => {
|
5616
|
+
FrameLayoutVariant2["Plain"] = "plain";
|
5617
|
+
FrameLayoutVariant2["Sticky"] = "sticky";
|
5618
|
+
})(FrameLayoutVariant ||= {});
|
5598
5619
|
|
5599
5620
|
// src/core/lib/utils.ts
|
5600
5621
|
var co = (condition, value, fallback) => condition(value) ? value : fallback;
|
@@ -5774,18 +5795,171 @@ function ThemeProvider({
|
|
5774
5795
|
import { CookiesProvider } from "react-cookie";
|
5775
5796
|
|
5776
5797
|
// src/core/components/RemoraidProvider/CoreUserExperienceProvider/index.tsx
|
5777
|
-
import { useContext as
|
5798
|
+
import { useContext as useContext4 } from "react";
|
5799
|
+
|
5800
|
+
// src/core/components/UserExperienceProviderWrapper/index.tsx
|
5801
|
+
import {
|
5802
|
+
createContext as createContext2,
|
5803
|
+
useEffect as useEffect2,
|
5804
|
+
useState as useState3
|
5805
|
+
} from "react";
|
5806
|
+
import { useCookies } from "react-cookie";
|
5807
|
+
import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
|
5808
|
+
var createUserExperienceContext = (defaultUserExperience) => createContext2({
|
5809
|
+
userExperience: defaultUserExperience,
|
5810
|
+
updateUserExperience: () => {},
|
5811
|
+
processedCookie: false,
|
5812
|
+
initialUserExperience: defaultUserExperience
|
5813
|
+
});
|
5814
|
+
function UserExperienceProviderWrapper({
|
5815
|
+
children,
|
5816
|
+
context,
|
5817
|
+
cookieName,
|
5818
|
+
defaultUserExperience,
|
5819
|
+
isValidUserExperience,
|
5820
|
+
initialValue
|
5821
|
+
}) {
|
5822
|
+
const [cookies, setCookie] = useCookies();
|
5823
|
+
const initialUserExperience = {
|
5824
|
+
...defaultUserExperience,
|
5825
|
+
...initialValue
|
5826
|
+
};
|
5827
|
+
const [userExperience, setUserExperience] = useState3(initialUserExperience);
|
5828
|
+
const [processedCookie, setProcessedCookie] = useState3(false);
|
5829
|
+
const updateUserExperience = (p) => {
|
5830
|
+
const updatedUserExperience = typeof p === "function" ? p(userExperience) : p;
|
5831
|
+
setCookie(cookieName, updatedUserExperience, { path: "/" });
|
5832
|
+
setUserExperience(updatedUserExperience);
|
5833
|
+
};
|
5834
|
+
useEffect2(() => {
|
5835
|
+
const userExperienceCookie = cookies[cookieName];
|
5836
|
+
if (userExperienceCookie && isValidUserExperience(userExperienceCookie)) {
|
5837
|
+
setUserExperience(userExperienceCookie);
|
5838
|
+
}
|
5839
|
+
if (cookies && !processedCookie) {
|
5840
|
+
setProcessedCookie(true);
|
5841
|
+
}
|
5842
|
+
}, [cookies]);
|
5843
|
+
return /* @__PURE__ */ jsxDEV4(context.Provider, {
|
5844
|
+
value: {
|
5845
|
+
userExperience,
|
5846
|
+
updateUserExperience,
|
5847
|
+
processedCookie,
|
5848
|
+
initialUserExperience
|
5849
|
+
},
|
5850
|
+
children
|
5851
|
+
}, undefined, false, undefined, this);
|
5852
|
+
}
|
5853
|
+
|
5854
|
+
// src/core/components/RemoraidProvider/CoreUserExperienceProvider/index.tsx
|
5855
|
+
import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
|
5856
|
+
var defaultUserExperience = {
|
5857
|
+
showWelcomeMessage: true,
|
5858
|
+
navbar: { hiddenPages: [] }
|
5859
|
+
};
|
5860
|
+
var defaultUserExperienceCookieName = "remoraid-core-user-experience";
|
5861
|
+
var coreUserExperienceContext = createUserExperienceContext(defaultUserExperience);
|
5862
|
+
var useRemoraidUserExperience = () => {
|
5863
|
+
return useContext4(coreUserExperienceContext);
|
5864
|
+
};
|
5865
|
+
function CoreUserExperienceProvider({
|
5866
|
+
children,
|
5867
|
+
initialValue,
|
5868
|
+
cookieName
|
5869
|
+
}) {
|
5870
|
+
const isValidUserExperience = (x) => {
|
5871
|
+
if (typeof x !== "object") {
|
5872
|
+
return false;
|
5873
|
+
}
|
5874
|
+
if (x === null) {
|
5875
|
+
return false;
|
5876
|
+
}
|
5877
|
+
if (!("showWelcomeMessage" in x)) {
|
5878
|
+
return false;
|
5879
|
+
}
|
5880
|
+
if (!("navbar" in x)) {
|
5881
|
+
return false;
|
5882
|
+
}
|
5883
|
+
return true;
|
5884
|
+
};
|
5885
|
+
return /* @__PURE__ */ jsxDEV5(UserExperienceProviderWrapper, {
|
5886
|
+
context: coreUserExperienceContext,
|
5887
|
+
isValidUserExperience,
|
5888
|
+
cookieName: cookieName ?? defaultUserExperienceCookieName,
|
5889
|
+
defaultUserExperience,
|
5890
|
+
initialValue,
|
5891
|
+
children
|
5892
|
+
}, undefined, false, undefined, this);
|
5893
|
+
}
|
5894
|
+
|
5895
|
+
// src/core/components/RemoraidProvider/LayoutsProvider/index.tsx
|
5896
|
+
import {
|
5897
|
+
createContext as createContext3,
|
5898
|
+
useContext as useContext5,
|
5899
|
+
useState as useState4
|
5900
|
+
} from "react";
|
5901
|
+
import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
|
5902
|
+
var defaultLayoutsContext = {
|
5903
|
+
layouts: {},
|
5904
|
+
setLayouts: () => {}
|
5905
|
+
};
|
5906
|
+
var layoutsContext = createContext3(defaultLayoutsContext);
|
5907
|
+
var useLayouts = () => {
|
5908
|
+
return useContext5(layoutsContext);
|
5909
|
+
};
|
5910
|
+
function LayoutsProvider({
|
5911
|
+
children
|
5912
|
+
}) {
|
5913
|
+
const [layouts, setLayouts] = useState4({});
|
5914
|
+
return /* @__PURE__ */ jsxDEV6(layoutsContext.Provider, {
|
5915
|
+
value: { layouts, setLayouts },
|
5916
|
+
children
|
5917
|
+
}, undefined, false, undefined, this);
|
5918
|
+
}
|
5919
|
+
|
5920
|
+
// src/core/components/RemoraidProvider/index.tsx
|
5921
|
+
import { jsxDEV as jsxDEV7 } from "react/jsx-dev-runtime";
|
5922
|
+
function RemoraidProvider({
|
5923
|
+
children,
|
5924
|
+
theme,
|
5925
|
+
initialUserExperience,
|
5926
|
+
componentsProps
|
5927
|
+
}) {
|
5928
|
+
return /* @__PURE__ */ jsxDEV7(CookiesProvider, {
|
5929
|
+
...componentsProps?.CookiesProvider,
|
5930
|
+
children: /* @__PURE__ */ jsxDEV7(HydrationStatusProvider, {
|
5931
|
+
...componentsProps?.HydrationStatusProviderProps,
|
5932
|
+
children: /* @__PURE__ */ jsxDEV7(ThemeProvider, {
|
5933
|
+
theme,
|
5934
|
+
...componentsProps?.ThemeProvider,
|
5935
|
+
children: /* @__PURE__ */ jsxDEV7(CoreUserExperienceProvider, {
|
5936
|
+
initialValue: initialUserExperience,
|
5937
|
+
...componentsProps?.CoreUserExperienceProvider,
|
5938
|
+
children: /* @__PURE__ */ jsxDEV7(WidgetsProvider, {
|
5939
|
+
...componentsProps?.WidgetsProvider,
|
5940
|
+
children: /* @__PURE__ */ jsxDEV7(LayoutsProvider, {
|
5941
|
+
...componentsProps?.LayoutsProviderProps,
|
5942
|
+
children
|
5943
|
+
}, undefined, false, undefined, this)
|
5944
|
+
}, undefined, false, undefined, this)
|
5945
|
+
}, undefined, false, undefined, this)
|
5946
|
+
}, undefined, false, undefined, this)
|
5947
|
+
}, undefined, false, undefined, this)
|
5948
|
+
}, undefined, false, undefined, this);
|
5949
|
+
}
|
5950
|
+
// src/core/components/AppShell/index.tsx
|
5951
|
+
import { Box as Box3 } from "@mantine/core";
|
5778
5952
|
|
5779
5953
|
// src/core/components/AppShell/NavbarMinimal/index.tsx
|
5780
5954
|
import {
|
5781
5955
|
Tooltip,
|
5782
5956
|
UnstyledButton,
|
5783
5957
|
Stack,
|
5784
|
-
rem,
|
5785
5958
|
Flex,
|
5786
5959
|
Paper,
|
5787
5960
|
Divider,
|
5788
|
-
Indicator
|
5961
|
+
Indicator,
|
5962
|
+
rem
|
5789
5963
|
} from "@mantine/core";
|
5790
5964
|
import {
|
5791
5965
|
IconLink,
|
@@ -5796,78 +5970,80 @@ import {
|
|
5796
5970
|
} from "@tabler/icons-react";
|
5797
5971
|
import Link from "next/link";
|
5798
5972
|
import { usePathname } from "next/navigation";
|
5799
|
-
import { useState as
|
5973
|
+
import { useState as useState5 } from "react";
|
5800
5974
|
|
5801
5975
|
// src/core/components/AppShell/AppProvider/index.tsx
|
5802
|
-
import { createContext as
|
5803
|
-
import { jsxDEV as
|
5804
|
-
var defaultAppContext = {
|
5805
|
-
|
5976
|
+
import { createContext as createContext4, useContext as useContext6 } from "react";
|
5977
|
+
import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
|
5978
|
+
var defaultAppContext = {
|
5979
|
+
navigablePages: []
|
5980
|
+
};
|
5981
|
+
var appContext = createContext4(defaultAppContext);
|
5806
5982
|
var useRemoraidApp = () => {
|
5807
|
-
return
|
5983
|
+
return useContext6(appContext);
|
5808
5984
|
};
|
5809
5985
|
function AppProvider({
|
5810
|
-
|
5811
|
-
|
5812
|
-
user
|
5986
|
+
appContext: appContextProps,
|
5987
|
+
children
|
5813
5988
|
}) {
|
5814
|
-
return /* @__PURE__ */
|
5815
|
-
value: {
|
5989
|
+
return /* @__PURE__ */ jsxDEV8(appContext.Provider, {
|
5990
|
+
value: { ...appContextProps },
|
5816
5991
|
children
|
5817
5992
|
}, undefined, false, undefined, this);
|
5818
5993
|
}
|
5819
5994
|
|
5820
5995
|
// src/core/components/AppShell/NavbarMinimal/index.tsx
|
5821
|
-
import { jsxDEV as
|
5996
|
+
import { jsxDEV as jsxDEV9, Fragment } from "react/jsx-dev-runtime";
|
5822
5997
|
function NavbarLink({
|
5823
5998
|
icon,
|
5999
|
+
linkSize,
|
6000
|
+
iconSize,
|
5824
6001
|
label,
|
5825
6002
|
active,
|
5826
6003
|
onClick,
|
5827
6004
|
href,
|
5828
|
-
indicator
|
5829
|
-
settings
|
6005
|
+
indicator
|
5830
6006
|
}) {
|
5831
|
-
const [isHoveringRoleIndicator, setIsHoveringRoleIndicator] =
|
6007
|
+
const [isHoveringRoleIndicator, setIsHoveringRoleIndicator] = useState5(false);
|
5832
6008
|
const iconProps = {
|
5833
|
-
size:
|
6009
|
+
size: iconSize,
|
5834
6010
|
stroke: 1.5
|
5835
6011
|
};
|
5836
6012
|
const Icon2 = icon ?? IconLink;
|
5837
6013
|
if (!href) {
|
5838
|
-
return /* @__PURE__ */
|
6014
|
+
return /* @__PURE__ */ jsxDEV9(Tooltip, {
|
5839
6015
|
label,
|
5840
6016
|
position: "right",
|
5841
6017
|
transitionProps: { duration: 0 },
|
5842
|
-
children: /* @__PURE__ */
|
6018
|
+
children: /* @__PURE__ */ jsxDEV9(UnstyledButton, {
|
5843
6019
|
onClick,
|
5844
6020
|
className: "remoraid-navbar-minimal-link",
|
5845
6021
|
"data-active": active || undefined,
|
5846
|
-
w:
|
5847
|
-
h:
|
5848
|
-
children: /* @__PURE__ */
|
6022
|
+
w: linkSize,
|
6023
|
+
h: linkSize,
|
6024
|
+
children: /* @__PURE__ */ jsxDEV9(Icon2, {
|
5849
6025
|
...iconProps
|
5850
6026
|
}, undefined, false, undefined, this)
|
5851
6027
|
}, undefined, false, undefined, this)
|
5852
6028
|
}, undefined, false, undefined, this);
|
5853
6029
|
}
|
5854
|
-
const button = /* @__PURE__ */
|
6030
|
+
const button = /* @__PURE__ */ jsxDEV9(UnstyledButton, {
|
5855
6031
|
onClick,
|
5856
6032
|
className: "remoraid-navbar-minimal-link",
|
5857
6033
|
"data-active": active || undefined,
|
5858
|
-
w:
|
5859
|
-
h:
|
6034
|
+
w: linkSize,
|
6035
|
+
h: linkSize,
|
5860
6036
|
component: Link,
|
5861
6037
|
href,
|
5862
|
-
children: /* @__PURE__ */
|
6038
|
+
children: /* @__PURE__ */ jsxDEV9(Icon2, {
|
5863
6039
|
...iconProps
|
5864
6040
|
}, undefined, false, undefined, this)
|
5865
6041
|
}, undefined, false, undefined, this);
|
5866
|
-
return /* @__PURE__ */
|
6042
|
+
return /* @__PURE__ */ jsxDEV9(Tooltip, {
|
5867
6043
|
label,
|
5868
6044
|
position: "right",
|
5869
6045
|
transitionProps: { duration: 0 },
|
5870
|
-
children: indicator === undefined ? button : /* @__PURE__ */
|
6046
|
+
children: indicator === undefined ? button : /* @__PURE__ */ jsxDEV9(Indicator, {
|
5871
6047
|
withBorder: true,
|
5872
6048
|
size: 13,
|
5873
6049
|
offset: 2,
|
@@ -5878,98 +6054,94 @@ function NavbarLink({
|
|
5878
6054
|
}, undefined, false, undefined, this)
|
5879
6055
|
}, undefined, false, undefined, this);
|
5880
6056
|
}
|
5881
|
-
var defaultSettings = {
|
5882
|
-
hiddenPages: [],
|
5883
|
-
linkSize: rem("50px"),
|
5884
|
-
iconSize: "50%",
|
5885
|
-
px: "sm",
|
5886
|
-
py: "md"
|
5887
|
-
};
|
5888
6057
|
function NavbarMinimal({
|
5889
|
-
|
5890
|
-
|
5891
|
-
settings: settingsProp,
|
6058
|
+
linkSize = rem("50px"),
|
6059
|
+
iconSize = "50%",
|
5892
6060
|
linkIndicator,
|
5893
6061
|
logoIndicator,
|
5894
|
-
|
6062
|
+
componentsProps
|
5895
6063
|
}) {
|
5896
|
-
const { userExperience } = useRemoraidUserExperience();
|
5897
6064
|
const pathname = usePathname();
|
5898
6065
|
const theme = useRemoraidTheme();
|
5899
6066
|
const { setColorScheme, colorScheme } = useHydratedMantineColorScheme();
|
5900
|
-
const
|
5901
|
-
const
|
5902
|
-
const
|
5903
|
-
|
5904
|
-
|
6067
|
+
const { userExperience } = useRemoraidUserExperience();
|
6068
|
+
const { navigablePages, logo, auth } = useRemoraidApp();
|
6069
|
+
const [isHoveringRoleIndicator, setIsHoveringRoleIndicator] = useState5(false);
|
6070
|
+
const linkProps = {
|
6071
|
+
linkSize,
|
6072
|
+
iconSize,
|
6073
|
+
...componentsProps?.link
|
5905
6074
|
};
|
5906
|
-
const links =
|
6075
|
+
const links = navigablePages.filter((link) => !userExperience.navbar.hiddenPages.includes(link.href)).map((link) => /* @__PURE__ */ jsxDEV9(NavbarLink, {
|
5907
6076
|
active: link.href === pathname,
|
5908
6077
|
indicator: linkIndicator,
|
5909
|
-
|
5910
|
-
...
|
6078
|
+
...link,
|
6079
|
+
...linkProps
|
5911
6080
|
}, link.label, false, undefined, this));
|
5912
|
-
const
|
6081
|
+
const logoProps = {
|
5913
6082
|
style: {
|
5914
6083
|
cursor: "pointer",
|
5915
|
-
width:
|
5916
|
-
height:
|
6084
|
+
width: linkSize,
|
6085
|
+
height: linkSize
|
5917
6086
|
}
|
5918
|
-
}
|
5919
|
-
return /* @__PURE__ */
|
6087
|
+
};
|
6088
|
+
return /* @__PURE__ */ jsxDEV9(Paper, {
|
5920
6089
|
h: "100%",
|
5921
|
-
|
5922
|
-
bg: theme.transparentBackground,
|
5923
|
-
radius: 0,
|
6090
|
+
p: "md",
|
5924
6091
|
shadow: "md",
|
5925
|
-
|
6092
|
+
bg: theme.transparentBackground,
|
6093
|
+
...componentsProps?.container,
|
6094
|
+
children: /* @__PURE__ */ jsxDEV9(Flex, {
|
5926
6095
|
direction: "column",
|
5927
6096
|
h: "100%",
|
5928
6097
|
align: "center",
|
5929
|
-
px: settings.px,
|
5930
6098
|
children: [
|
5931
|
-
|
5932
|
-
|
5933
|
-
|
5934
|
-
|
5935
|
-
|
5936
|
-
|
5937
|
-
|
5938
|
-
|
5939
|
-
|
5940
|
-
|
5941
|
-
|
5942
|
-
|
5943
|
-
|
5944
|
-
|
5945
|
-
|
6099
|
+
logo !== undefined && /* @__PURE__ */ jsxDEV9(Fragment, {
|
6100
|
+
children: [
|
6101
|
+
logoIndicator === undefined ? logo(logoProps) : /* @__PURE__ */ jsxDEV9(Indicator, {
|
6102
|
+
withBorder: true,
|
6103
|
+
offset: 2,
|
6104
|
+
size: 13,
|
6105
|
+
onMouseEnter: () => setIsHoveringRoleIndicator(true),
|
6106
|
+
onMouseLeave: () => setIsHoveringRoleIndicator(false),
|
6107
|
+
...logoIndicator(isHoveringRoleIndicator),
|
6108
|
+
children: logo(logoProps)
|
6109
|
+
}, undefined, false, undefined, this),
|
6110
|
+
/* @__PURE__ */ jsxDEV9(Divider, {
|
6111
|
+
my: "md",
|
6112
|
+
variant: "dashed",
|
6113
|
+
w: "100%"
|
6114
|
+
}, undefined, false, undefined, this)
|
6115
|
+
]
|
6116
|
+
}, undefined, true, undefined, this),
|
6117
|
+
/* @__PURE__ */ jsxDEV9(Stack, {
|
5946
6118
|
justify: "flex-start",
|
5947
6119
|
gap: 0,
|
5948
6120
|
flex: 1,
|
5949
6121
|
children: links
|
5950
6122
|
}, undefined, false, undefined, this),
|
5951
|
-
/* @__PURE__ */
|
6123
|
+
/* @__PURE__ */ jsxDEV9(Stack, {
|
5952
6124
|
justify: "center",
|
5953
6125
|
gap: 0,
|
5954
6126
|
children: [
|
5955
|
-
|
6127
|
+
auth !== undefined && (auth.user === null ? /* @__PURE__ */ jsxDEV9(NavbarLink, {
|
5956
6128
|
icon: IconLogin,
|
5957
6129
|
label: "Login",
|
5958
6130
|
href: "/login",
|
5959
6131
|
active: pathname === "/login",
|
5960
|
-
|
5961
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
6132
|
+
...linkProps
|
6133
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV9(NavbarLink, {
|
5962
6134
|
icon: IconLogout,
|
5963
6135
|
label: "Logout",
|
5964
6136
|
onClick: () => {
|
5965
|
-
if (onLogout) {
|
5966
|
-
onLogout();
|
6137
|
+
if (auth.onLogout) {
|
6138
|
+
auth.onLogout();
|
5967
6139
|
}
|
5968
6140
|
},
|
5969
6141
|
href: "/login",
|
5970
|
-
|
6142
|
+
...linkProps
|
5971
6143
|
}, undefined, false, undefined, this)),
|
5972
|
-
/* @__PURE__ */
|
6144
|
+
/* @__PURE__ */ jsxDEV9(NavbarLink, {
|
5973
6145
|
icon: colorScheme === "dark" ? IconSun : IconMoon,
|
5974
6146
|
onClick: () => {
|
5975
6147
|
if (!colorScheme || !setColorScheme) {
|
@@ -5978,7 +6150,7 @@ function NavbarMinimal({
|
|
5978
6150
|
setColorScheme(colorScheme === "dark" ? "light" : "dark");
|
5979
6151
|
},
|
5980
6152
|
label: "Toggle Color Scheme",
|
5981
|
-
|
6153
|
+
...linkProps
|
5982
6154
|
}, undefined, false, undefined, this)
|
5983
6155
|
]
|
5984
6156
|
}, undefined, true, undefined, this)
|
@@ -5987,274 +6159,314 @@ function NavbarMinimal({
|
|
5987
6159
|
}, undefined, false, undefined, this);
|
5988
6160
|
}
|
5989
6161
|
|
5990
|
-
// src/core/components/
|
6162
|
+
// src/core/components/AppShell/FooterMinimal/index.tsx
|
6163
|
+
import { Group } from "@mantine/core";
|
6164
|
+
import { IconPennant } from "@tabler/icons-react";
|
6165
|
+
import { jsxDEV as jsxDEV10 } from "react/jsx-dev-runtime";
|
6166
|
+
function FooterMinimal({
|
6167
|
+
componentsProps
|
6168
|
+
}) {
|
6169
|
+
return /* @__PURE__ */ jsxDEV10(Group, {
|
6170
|
+
justify: "center",
|
6171
|
+
w: "100%",
|
6172
|
+
py: "md",
|
6173
|
+
...componentsProps?.container,
|
6174
|
+
children: /* @__PURE__ */ jsxDEV10(IconPennant, {
|
6175
|
+
size: 50,
|
6176
|
+
color: "var(--mantine-color-default-border)",
|
6177
|
+
...componentsProps?.icon
|
6178
|
+
}, undefined, false, undefined, this)
|
6179
|
+
}, undefined, false, undefined, this);
|
6180
|
+
}
|
6181
|
+
|
6182
|
+
// src/core/components/FrameLayout/index.tsx
|
5991
6183
|
import {
|
5992
|
-
|
5993
|
-
|
5994
|
-
|
6184
|
+
Box as Box2,
|
6185
|
+
Group as Group2,
|
6186
|
+
ScrollArea,
|
6187
|
+
Stack as Stack2
|
6188
|
+
} from "@mantine/core";
|
6189
|
+
import {
|
6190
|
+
createContext as createContext5,
|
6191
|
+
useCallback,
|
6192
|
+
useContext as useContext7,
|
6193
|
+
useMemo as useMemo3
|
5995
6194
|
} from "react";
|
5996
|
-
|
5997
|
-
|
5998
|
-
|
5999
|
-
|
6000
|
-
|
6001
|
-
|
6002
|
-
|
6003
|
-
|
6004
|
-
|
6005
|
-
children
|
6006
|
-
context,
|
6007
|
-
cookieName,
|
6008
|
-
defaultUserExperience,
|
6009
|
-
isValidUserExperience,
|
6010
|
-
initialValue
|
6195
|
+
|
6196
|
+
// src/core/components/FrameLayout/Element/index.tsx
|
6197
|
+
import { Box, Portal } from "@mantine/core";
|
6198
|
+
import { jsxDEV as jsxDEV11 } from "react/jsx-dev-runtime";
|
6199
|
+
function Element({
|
6200
|
+
section,
|
6201
|
+
includeContainer = true,
|
6202
|
+
layoutId,
|
6203
|
+
componentsProps,
|
6204
|
+
children
|
6011
6205
|
}) {
|
6012
|
-
const
|
6013
|
-
const
|
6014
|
-
|
6015
|
-
|
6016
|
-
}
|
6017
|
-
const [
|
6018
|
-
|
6019
|
-
|
6020
|
-
|
6021
|
-
|
6022
|
-
|
6023
|
-
}
|
6024
|
-
|
6025
|
-
|
6026
|
-
|
6027
|
-
|
6028
|
-
|
6029
|
-
|
6030
|
-
|
6031
|
-
|
6032
|
-
|
6033
|
-
|
6034
|
-
|
6035
|
-
userExperience,
|
6036
|
-
updateUserExperience,
|
6037
|
-
processedCookie,
|
6038
|
-
initialUserExperience
|
6039
|
-
},
|
6040
|
-
children
|
6206
|
+
const { layouts } = useLayouts();
|
6207
|
+
const closestLayout = useFrameLayout();
|
6208
|
+
if (closestLayout.layoutId === null) {
|
6209
|
+
return null;
|
6210
|
+
}
|
6211
|
+
const layout = layouts[layoutId ?? closestLayout.layoutId];
|
6212
|
+
if (!isFrameLayout(layout)) {
|
6213
|
+
return null;
|
6214
|
+
}
|
6215
|
+
if (layout.sections[section] === null) {
|
6216
|
+
return null;
|
6217
|
+
}
|
6218
|
+
let containerProps = {};
|
6219
|
+
if (section === "left" /* Left */ || section === "right" /* Right */) {
|
6220
|
+
containerProps.h = "100%";
|
6221
|
+
}
|
6222
|
+
return /* @__PURE__ */ jsxDEV11(Portal, {
|
6223
|
+
target: layout.sections[section],
|
6224
|
+
children: includeContainer ? /* @__PURE__ */ jsxDEV11(Box, {
|
6225
|
+
...containerProps,
|
6226
|
+
...componentsProps?.container,
|
6227
|
+
children
|
6228
|
+
}, undefined, false, undefined, this) : children
|
6041
6229
|
}, undefined, false, undefined, this);
|
6042
6230
|
}
|
6043
6231
|
|
6044
|
-
// src/core/components/
|
6045
|
-
import { jsxDEV as
|
6046
|
-
var
|
6047
|
-
|
6232
|
+
// src/core/components/FrameLayout/index.tsx
|
6233
|
+
import { jsxDEV as jsxDEV12 } from "react/jsx-dev-runtime";
|
6234
|
+
var isFrameLayout = (layout) => {
|
6235
|
+
if (typeof layout !== "object" || layout === null) {
|
6236
|
+
return false;
|
6237
|
+
}
|
6238
|
+
if (!("sections" in layout)) {
|
6239
|
+
return false;
|
6240
|
+
}
|
6241
|
+
if (typeof layout.sections !== "object" || layout.sections === null) {
|
6242
|
+
return false;
|
6243
|
+
}
|
6244
|
+
return true;
|
6048
6245
|
};
|
6049
|
-
var
|
6050
|
-
|
6051
|
-
|
6052
|
-
|
6246
|
+
var defaultFrameLayoutVariant = "sticky" /* Sticky */;
|
6247
|
+
var defaultFrameLayoutContext = {
|
6248
|
+
layoutId: null,
|
6249
|
+
layout: {
|
6250
|
+
sections: {
|
6251
|
+
["top" /* Top */]: null,
|
6252
|
+
["bottom" /* Bottom */]: null,
|
6253
|
+
["left" /* Left */]: null,
|
6254
|
+
["right" /* Right */]: null
|
6255
|
+
}
|
6256
|
+
},
|
6257
|
+
setLayout: () => {}
|
6053
6258
|
};
|
6054
|
-
var
|
6055
|
-
var
|
6056
|
-
|
6057
|
-
return useContext5(coreUserExperienceContext);
|
6259
|
+
var layoutContext = createContext5(defaultFrameLayoutContext);
|
6260
|
+
var useFrameLayout = () => {
|
6261
|
+
return useContext7(layoutContext);
|
6058
6262
|
};
|
6059
|
-
function
|
6060
|
-
|
6061
|
-
|
6062
|
-
|
6263
|
+
function FrameLayout({
|
6264
|
+
variant = defaultFrameLayoutVariant,
|
6265
|
+
layoutId,
|
6266
|
+
componentsProps,
|
6267
|
+
children
|
6063
6268
|
}) {
|
6064
|
-
const
|
6065
|
-
|
6066
|
-
|
6067
|
-
|
6068
|
-
|
6069
|
-
|
6070
|
-
|
6071
|
-
|
6072
|
-
|
6073
|
-
}
|
6074
|
-
|
6075
|
-
|
6076
|
-
|
6077
|
-
|
6078
|
-
|
6079
|
-
}
|
6080
|
-
|
6081
|
-
|
6082
|
-
|
6083
|
-
|
6084
|
-
|
6085
|
-
}
|
6086
|
-
|
6087
|
-
|
6088
|
-
|
6089
|
-
|
6090
|
-
|
6091
|
-
}
|
6092
|
-
|
6093
|
-
|
6094
|
-
|
6095
|
-
|
6096
|
-
|
6097
|
-
}
|
6098
|
-
|
6269
|
+
const theme = useRemoraidTheme();
|
6270
|
+
const { layouts, setLayouts } = useLayouts();
|
6271
|
+
const layout = layouts[layoutId];
|
6272
|
+
const setLayout = useMemo3(() => {
|
6273
|
+
return (value) => {
|
6274
|
+
setLayouts((prev) => ({
|
6275
|
+
...prev,
|
6276
|
+
[layoutId]: typeof value === "function" ? value(prev[layoutId]) : value
|
6277
|
+
}));
|
6278
|
+
};
|
6279
|
+
}, [layoutId, setLayouts]);
|
6280
|
+
const topSection = useCallback((n) => {
|
6281
|
+
setLayout((prev) => ({
|
6282
|
+
...prev,
|
6283
|
+
sections: { ...prev?.sections, ["top" /* Top */]: n }
|
6284
|
+
}));
|
6285
|
+
}, [setLayout]);
|
6286
|
+
const bottomSection = useCallback((n) => {
|
6287
|
+
setLayout((prev) => ({
|
6288
|
+
...prev,
|
6289
|
+
sections: { ...prev?.sections, ["bottom" /* Bottom */]: n }
|
6290
|
+
}));
|
6291
|
+
}, [setLayout]);
|
6292
|
+
const leftSection = useCallback((n) => {
|
6293
|
+
setLayout((prev) => ({
|
6294
|
+
...prev,
|
6295
|
+
sections: { ...prev?.sections, ["left" /* Left */]: n }
|
6296
|
+
}));
|
6297
|
+
}, [setLayout]);
|
6298
|
+
const rightSection = useCallback((n) => {
|
6299
|
+
setLayout((prev) => ({
|
6300
|
+
...prev,
|
6301
|
+
sections: { ...prev?.sections, ["right" /* Right */]: n }
|
6302
|
+
}));
|
6303
|
+
}, [setLayout]);
|
6304
|
+
let contentSection = children;
|
6305
|
+
const childrenContainerProps = {
|
6306
|
+
flex: 1,
|
6307
|
+
...componentsProps?.childrenContainer
|
6099
6308
|
};
|
6100
|
-
|
6101
|
-
|
6102
|
-
|
6103
|
-
|
6104
|
-
|
6105
|
-
|
6106
|
-
|
6107
|
-
|
6108
|
-
|
6109
|
-
|
6110
|
-
|
6111
|
-
|
6112
|
-
|
6113
|
-
|
6114
|
-
|
6115
|
-
|
6116
|
-
|
6117
|
-
|
6118
|
-
|
6119
|
-
|
6120
|
-
|
6121
|
-
|
6122
|
-
|
6123
|
-
|
6124
|
-
|
6125
|
-
|
6126
|
-
|
6127
|
-
|
6128
|
-
|
6129
|
-
|
6130
|
-
|
6131
|
-
|
6309
|
+
if (variant === "plain" /* Plain */) {
|
6310
|
+
contentSection = /* @__PURE__ */ jsxDEV12(Box2, {
|
6311
|
+
...childrenContainerProps,
|
6312
|
+
children: contentSection
|
6313
|
+
}, undefined, false, undefined, this);
|
6314
|
+
} else if (variant === "sticky" /* Sticky */) {
|
6315
|
+
contentSection = /* @__PURE__ */ jsxDEV12(ScrollArea, {
|
6316
|
+
...theme.scrollAreaProps,
|
6317
|
+
...childrenContainerProps,
|
6318
|
+
children
|
6319
|
+
}, undefined, false, undefined, this);
|
6320
|
+
}
|
6321
|
+
return /* @__PURE__ */ jsxDEV12(layoutContext.Provider, {
|
6322
|
+
value: { layoutId, layout, setLayout },
|
6323
|
+
children: /* @__PURE__ */ jsxDEV12(Group2, {
|
6324
|
+
gap: 0,
|
6325
|
+
h: "100%",
|
6326
|
+
w: "100%",
|
6327
|
+
wrap: "nowrap",
|
6328
|
+
...componentsProps?.horizontalContainer,
|
6329
|
+
children: [
|
6330
|
+
/* @__PURE__ */ jsxDEV12(Group2, {
|
6331
|
+
ref: leftSection,
|
6332
|
+
h: "100%",
|
6333
|
+
gap: 0,
|
6334
|
+
wrap: "nowrap",
|
6335
|
+
...componentsProps?.sectionContainers?.["left" /* Left */]
|
6336
|
+
}, undefined, false, undefined, this),
|
6337
|
+
/* @__PURE__ */ jsxDEV12(Stack2, {
|
6338
|
+
h: "100%",
|
6339
|
+
flex: 1,
|
6340
|
+
gap: 0,
|
6341
|
+
...componentsProps?.verticalContainer,
|
6342
|
+
children: [
|
6343
|
+
/* @__PURE__ */ jsxDEV12(Stack2, {
|
6344
|
+
h: "100%",
|
6345
|
+
ref: topSection,
|
6346
|
+
gap: 0,
|
6347
|
+
flex: 0,
|
6348
|
+
...componentsProps?.sectionContainers?.["top" /* Top */]
|
6349
|
+
}, undefined, false, undefined, this),
|
6350
|
+
contentSection,
|
6351
|
+
/* @__PURE__ */ jsxDEV12(Stack2, {
|
6352
|
+
h: "100%",
|
6353
|
+
ref: bottomSection,
|
6354
|
+
gap: 0,
|
6355
|
+
flex: 0,
|
6356
|
+
...componentsProps?.sectionContainers?.["bottom" /* Bottom */]
|
6357
|
+
}, undefined, false, undefined, this)
|
6358
|
+
]
|
6359
|
+
}, undefined, true, undefined, this),
|
6360
|
+
/* @__PURE__ */ jsxDEV12(Group2, {
|
6361
|
+
gap: 0,
|
6362
|
+
ref: rightSection,
|
6363
|
+
h: "100%",
|
6364
|
+
wrap: "nowrap",
|
6365
|
+
...componentsProps?.sectionContainers?.["right" /* Right */]
|
6132
6366
|
}, undefined, false, undefined, this)
|
6133
|
-
|
6134
|
-
}, undefined,
|
6135
|
-
}, undefined, false, undefined, this);
|
6136
|
-
}
|
6137
|
-
// src/core/components/AppShell/index.tsx
|
6138
|
-
import {
|
6139
|
-
AppShell as MantineAppShell,
|
6140
|
-
Burger,
|
6141
|
-
rem as rem2,
|
6142
|
-
Group as Group2,
|
6143
|
-
useMantineTheme as useMantineTheme2,
|
6144
|
-
Paper as Paper2,
|
6145
|
-
px as px2
|
6146
|
-
} from "@mantine/core";
|
6147
|
-
import { useDisclosure } from "@mantine/hooks";
|
6148
|
-
|
6149
|
-
// src/core/components/AppShell/Footer/index.tsx
|
6150
|
-
import { Group } from "@mantine/core";
|
6151
|
-
import { IconPennant } from "@tabler/icons-react";
|
6152
|
-
import { jsxDEV as jsxDEV9 } from "react/jsx-dev-runtime";
|
6153
|
-
function Footer() {
|
6154
|
-
return /* @__PURE__ */ jsxDEV9(Group, {
|
6155
|
-
justify: "center",
|
6156
|
-
w: "100%",
|
6157
|
-
py: "md",
|
6158
|
-
children: /* @__PURE__ */ jsxDEV9(IconPennant, {
|
6159
|
-
size: 50,
|
6160
|
-
color: "var(--mantine-color-default-border)"
|
6161
|
-
}, undefined, false, undefined, this)
|
6367
|
+
]
|
6368
|
+
}, undefined, true, undefined, this)
|
6162
6369
|
}, undefined, false, undefined, this);
|
6163
6370
|
}
|
6371
|
+
var FrameLayout_default = Object.assign(FrameLayout, {
|
6372
|
+
Element
|
6373
|
+
});
|
6164
6374
|
|
6165
6375
|
// src/core/components/AppShell/index.tsx
|
6166
|
-
import { jsxDEV as
|
6167
|
-
|
6168
|
-
|
6169
|
-
|
6170
|
-
|
6171
|
-
|
6172
|
-
|
6173
|
-
|
6174
|
-
|
6175
|
-
|
6176
|
-
|
6177
|
-
|
6178
|
-
|
6179
|
-
|
6180
|
-
|
6181
|
-
|
6182
|
-
...
|
6376
|
+
import { jsxDEV as jsxDEV13, Fragment as Fragment2 } from "react/jsx-dev-runtime";
|
6377
|
+
var defaultAppShellLayoutId = "remoraidAppShell";
|
6378
|
+
var defaultProps = {
|
6379
|
+
navbarVariant: null,
|
6380
|
+
footerVariant: null
|
6381
|
+
};
|
6382
|
+
function AppShell(props) {
|
6383
|
+
const {
|
6384
|
+
children,
|
6385
|
+
navbarVariant,
|
6386
|
+
footerVariant,
|
6387
|
+
navbarPosition,
|
6388
|
+
footerPosition,
|
6389
|
+
appContext: appContext2,
|
6390
|
+
componentsProps
|
6391
|
+
} = {
|
6392
|
+
...defaultProps,
|
6393
|
+
...props
|
6183
6394
|
};
|
6184
|
-
|
6185
|
-
|
6186
|
-
|
6187
|
-
|
6188
|
-
|
6189
|
-
|
6190
|
-
|
6191
|
-
|
6192
|
-
|
6193
|
-
|
6194
|
-
|
6195
|
-
|
6196
|
-
|
6395
|
+
let navbar;
|
6396
|
+
let footer;
|
6397
|
+
let navbarContainerProps = {};
|
6398
|
+
let footerContainerProps = {};
|
6399
|
+
if (navbarVariant === "minimal" /* Minimal */) {
|
6400
|
+
navbar = /* @__PURE__ */ jsxDEV13(NavbarMinimal, {
|
6401
|
+
...componentsProps?.navbar
|
6402
|
+
}, undefined, false, undefined, this);
|
6403
|
+
navbarContainerProps.py = "md";
|
6404
|
+
if (navbarPosition === "left" /* Left */) {
|
6405
|
+
navbarContainerProps.pl = "md";
|
6406
|
+
} else if (navbarPosition === "right" /* Right */) {
|
6407
|
+
navbarContainerProps.pr = "md";
|
6408
|
+
}
|
6409
|
+
}
|
6410
|
+
if (footerVariant === "minimal" /* Minimal */) {
|
6411
|
+
footer = /* @__PURE__ */ jsxDEV13(FooterMinimal, {
|
6412
|
+
...componentsProps?.footer
|
6413
|
+
}, undefined, false, undefined, this);
|
6414
|
+
}
|
6415
|
+
return /* @__PURE__ */ jsxDEV13(AppProvider, {
|
6416
|
+
appContext: appContext2,
|
6417
|
+
...componentsProps?.AppProvider,
|
6418
|
+
children: /* @__PURE__ */ jsxDEV13(FrameLayout_default, {
|
6419
|
+
layoutId: defaultAppShellLayoutId,
|
6420
|
+
...componentsProps?.layout,
|
6197
6421
|
children: [
|
6198
|
-
/* @__PURE__ */
|
6199
|
-
|
6200
|
-
|
6201
|
-
|
6202
|
-
bg: colorScheme === "dark" ? mantineTheme.colors.dark[8] : mantineTheme.colors.gray[3],
|
6203
|
-
hiddenFrom: "sm",
|
6204
|
-
children: /* @__PURE__ */ jsxDEV10(Burger, {
|
6205
|
-
opened,
|
6206
|
-
onClick: toggle,
|
6207
|
-
h: 20,
|
6208
|
-
size: 18
|
6209
|
-
}, undefined, false, undefined, this)
|
6210
|
-
}, undefined, false, undefined, this)
|
6422
|
+
navbarPosition !== undefined && navbarPosition !== "content" /* Content */ && /* @__PURE__ */ jsxDEV13(FrameLayout_default.Element, {
|
6423
|
+
section: navbarPosition,
|
6424
|
+
componentsProps: { container: { ...navbarContainerProps } },
|
6425
|
+
children: navbar
|
6211
6426
|
}, undefined, false, undefined, this),
|
6212
|
-
/* @__PURE__ */
|
6213
|
-
|
6214
|
-
|
6215
|
-
|
6216
|
-
user,
|
6217
|
-
...navbar
|
6218
|
-
}, undefined, false, undefined, this)
|
6427
|
+
footerPosition !== undefined && footerPosition !== "content" /* Content */ && /* @__PURE__ */ jsxDEV13(FrameLayout_default.Element, {
|
6428
|
+
section: footerPosition,
|
6429
|
+
componentsProps: { container: { ...footerContainerProps } },
|
6430
|
+
children: footer
|
6219
6431
|
}, undefined, false, undefined, this),
|
6220
|
-
/* @__PURE__ */
|
6221
|
-
children:
|
6222
|
-
|
6223
|
-
|
6224
|
-
|
6225
|
-
|
6226
|
-
|
6227
|
-
|
6228
|
-
|
6229
|
-
children,
|
6230
|
-
/* @__PURE__ */ jsxDEV10(Footer, {}, undefined, false, undefined, this)
|
6231
|
-
]
|
6232
|
-
}, undefined, true, undefined, this)
|
6432
|
+
navbarPosition !== undefined && navbarPosition === "content" /* Content */ && /* @__PURE__ */ jsxDEV13(Fragment2, {
|
6433
|
+
children: navbar
|
6434
|
+
}, undefined, false, undefined, this),
|
6435
|
+
/* @__PURE__ */ jsxDEV13(Box3, {
|
6436
|
+
...componentsProps?.childrenContainer,
|
6437
|
+
children
|
6438
|
+
}, undefined, false, undefined, this),
|
6439
|
+
footerPosition !== undefined && footerPosition === "content" /* Content */ && /* @__PURE__ */ jsxDEV13(Fragment2, {
|
6440
|
+
children: footer
|
6233
6441
|
}, undefined, false, undefined, this)
|
6234
6442
|
]
|
6235
6443
|
}, undefined, true, undefined, this)
|
6236
6444
|
}, undefined, false, undefined, this);
|
6237
6445
|
}
|
6446
|
+
var AppShell_default = Object.assign(AppShell, {
|
6447
|
+
NavbarMinimal,
|
6448
|
+
FooterMinimal
|
6449
|
+
});
|
6238
6450
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
6239
6451
|
import { Chip as Chip2, Divider as Divider2, Flex as Flex3, Text } from "@mantine/core";
|
6240
6452
|
|
6241
6453
|
// src/core/components/Page/index.tsx
|
6242
6454
|
import React6, {
|
6243
|
-
useContext as
|
6455
|
+
useContext as useContext8,
|
6244
6456
|
useEffect as useEffect3
|
6245
6457
|
} from "react";
|
6246
6458
|
import { usePathname as usePathname2 } from "next/navigation";
|
6247
6459
|
|
6248
6460
|
// src/core/components/Page/PageContainer/index.tsx
|
6249
6461
|
import { Container } from "@mantine/core";
|
6250
|
-
import { jsxDEV as
|
6462
|
+
import { jsxDEV as jsxDEV14 } from "react/jsx-dev-runtime";
|
6251
6463
|
function PageContainer({
|
6252
6464
|
children,
|
6253
6465
|
pt,
|
6254
6466
|
componentsProps
|
6255
6467
|
}) {
|
6256
6468
|
const theme = useRemoraidTheme();
|
6257
|
-
return /* @__PURE__ */
|
6469
|
+
return /* @__PURE__ */ jsxDEV14(Container, {
|
6258
6470
|
size: theme.containerSize,
|
6259
6471
|
pt: pt ?? "md",
|
6260
6472
|
...componentsProps?.container,
|
@@ -6263,10 +6475,10 @@ function PageContainer({
|
|
6263
6475
|
}
|
6264
6476
|
|
6265
6477
|
// src/core/components/Page/index.tsx
|
6266
|
-
import { jsxDEV as
|
6478
|
+
import { jsxDEV as jsxDEV15 } from "react/jsx-dev-runtime";
|
6267
6479
|
var pageContext = React6.createContext(null);
|
6268
6480
|
var usePage = () => {
|
6269
|
-
return
|
6481
|
+
return useContext8(pageContext);
|
6270
6482
|
};
|
6271
6483
|
function Page({
|
6272
6484
|
children,
|
@@ -6285,9 +6497,9 @@ function Page({
|
|
6285
6497
|
}
|
6286
6498
|
}
|
6287
6499
|
}, []);
|
6288
|
-
return /* @__PURE__ */
|
6500
|
+
return /* @__PURE__ */ jsxDEV15(pageContext.Provider, {
|
6289
6501
|
value: { name: name ?? pathname, pageId, ...config },
|
6290
|
-
children: /* @__PURE__ */
|
6502
|
+
children: /* @__PURE__ */ jsxDEV15(PageContainer, {
|
6291
6503
|
pt,
|
6292
6504
|
componentsProps: { container: componentsProps?.container },
|
6293
6505
|
children
|
@@ -6302,9 +6514,9 @@ import { IconCheck } from "@tabler/icons-react";
|
|
6302
6514
|
import {
|
6303
6515
|
Chip,
|
6304
6516
|
Flex as Flex2,
|
6305
|
-
ScrollArea
|
6517
|
+
ScrollArea as ScrollArea2
|
6306
6518
|
} from "@mantine/core";
|
6307
|
-
import { jsxDEV as
|
6519
|
+
import { jsxDEV as jsxDEV16 } from "react/jsx-dev-runtime";
|
6308
6520
|
function ScrollableChipGroup({
|
6309
6521
|
value,
|
6310
6522
|
onChange,
|
@@ -6313,15 +6525,15 @@ function ScrollableChipGroup({
|
|
6313
6525
|
children
|
6314
6526
|
}) {
|
6315
6527
|
const theme = useRemoraidTheme();
|
6316
|
-
return /* @__PURE__ */
|
6528
|
+
return /* @__PURE__ */ jsxDEV16(ScrollArea2, {
|
6317
6529
|
...theme.scrollAreaProps,
|
6318
6530
|
...componentsProps?.scrollArea,
|
6319
|
-
children: /* @__PURE__ */
|
6531
|
+
children: /* @__PURE__ */ jsxDEV16(Chip.Group, {
|
6320
6532
|
value,
|
6321
6533
|
onChange,
|
6322
6534
|
...componentsProps?.chipGroup,
|
6323
6535
|
multiple: true,
|
6324
|
-
children: /* @__PURE__ */
|
6536
|
+
children: /* @__PURE__ */ jsxDEV16(Flex2, {
|
6325
6537
|
justify: "flex-start",
|
6326
6538
|
align: "center",
|
6327
6539
|
gap: gap ?? "xs",
|
@@ -6334,7 +6546,7 @@ function ScrollableChipGroup({
|
|
6334
6546
|
}
|
6335
6547
|
|
6336
6548
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
6337
|
-
import { jsxDEV as
|
6549
|
+
import { jsxDEV as jsxDEV17 } from "react/jsx-dev-runtime";
|
6338
6550
|
function WidgetSelectionHeader({
|
6339
6551
|
title,
|
6340
6552
|
disabledWidgets,
|
@@ -6347,31 +6559,31 @@ function WidgetSelectionHeader({
|
|
6347
6559
|
console.error("'WidgetSelectionHeader' must be rendered inside of a 'Page' component.");
|
6348
6560
|
return null;
|
6349
6561
|
}
|
6350
|
-
return /* @__PURE__ */
|
6562
|
+
return /* @__PURE__ */ jsxDEV17(Flex3, {
|
6351
6563
|
justify: "flex-start",
|
6352
6564
|
align: "center",
|
6353
6565
|
gap: "xs",
|
6354
6566
|
mt,
|
6355
6567
|
children: [
|
6356
|
-
/* @__PURE__ */
|
6568
|
+
/* @__PURE__ */ jsxDEV17(Text, {
|
6357
6569
|
size: "lg",
|
6358
6570
|
fw: 400,
|
6359
6571
|
children: title ?? page.name
|
6360
6572
|
}, undefined, false, undefined, this),
|
6361
|
-
/* @__PURE__ */
|
6573
|
+
/* @__PURE__ */ jsxDEV17(Divider2, {
|
6362
6574
|
orientation: "vertical"
|
6363
6575
|
}, undefined, false, undefined, this),
|
6364
|
-
isPageRegistered(page.pageId) && /* @__PURE__ */
|
6576
|
+
isPageRegistered(page.pageId) && /* @__PURE__ */ jsxDEV17(ScrollableChipGroup, {
|
6365
6577
|
value: Object.keys(widgets[page.pageId]).filter((widgetId) => widgets[page.pageId][widgetId].selected),
|
6366
6578
|
onChange: (value) => {
|
6367
6579
|
updateWidgetSelectionBulk(page.pageId, value);
|
6368
6580
|
},
|
6369
6581
|
componentsProps: { scrollArea: { flex: 1 } },
|
6370
|
-
children: Object.keys(widgets[page.pageId]).map((widgetId) => /* @__PURE__ */
|
6582
|
+
children: Object.keys(widgets[page.pageId]).map((widgetId) => /* @__PURE__ */ jsxDEV17(Chip2, {
|
6371
6583
|
value: widgetId,
|
6372
6584
|
size: "sm",
|
6373
6585
|
disabled: disabledWidgets && disabledWidgets.includes(widgetId),
|
6374
|
-
icon: /* @__PURE__ */
|
6586
|
+
icon: /* @__PURE__ */ jsxDEV17(IconCheck, {
|
6375
6587
|
...theme.iconProps.tiny
|
6376
6588
|
}, undefined, false, undefined, this),
|
6377
6589
|
children: widgets[page.pageId][widgetId].name
|
@@ -6383,17 +6595,17 @@ function WidgetSelectionHeader({
|
|
6383
6595
|
// src/core/components/Widget/WidgetWrapper/CloseButton/index.tsx
|
6384
6596
|
import { ActionIcon, Transition } from "@mantine/core";
|
6385
6597
|
import { IconX } from "@tabler/icons-react";
|
6386
|
-
import { jsxDEV as
|
6598
|
+
import { jsxDEV as jsxDEV18 } from "react/jsx-dev-runtime";
|
6387
6599
|
function CloseButton({ widgetId }) {
|
6388
6600
|
const theme = useRemoraidTheme();
|
6389
6601
|
const { activeWidget, updateWidgetSelection } = useWidgets();
|
6390
6602
|
const page = usePage();
|
6391
|
-
return /* @__PURE__ */
|
6603
|
+
return /* @__PURE__ */ jsxDEV18(Transition, {
|
6392
6604
|
mounted: activeWidget === widgetId,
|
6393
6605
|
transition: "pop-top-right",
|
6394
6606
|
duration: theme.transitionDurations.short,
|
6395
6607
|
timingFunction: "ease",
|
6396
|
-
children: (transitionStyle) => /* @__PURE__ */
|
6608
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV18(ActionIcon, {
|
6397
6609
|
pos: "absolute",
|
6398
6610
|
size: "xs",
|
6399
6611
|
className: "remoraid-close-button",
|
@@ -6406,7 +6618,7 @@ function CloseButton({ widgetId }) {
|
|
6406
6618
|
updateWidgetSelection(page.pageId, widgetId, false);
|
6407
6619
|
},
|
6408
6620
|
style: transitionStyle,
|
6409
|
-
children: /* @__PURE__ */
|
6621
|
+
children: /* @__PURE__ */ jsxDEV18(IconX, {
|
6410
6622
|
...theme.iconProps.tiny
|
6411
6623
|
}, undefined, false, undefined, this)
|
6412
6624
|
}, undefined, false, undefined, this)
|
@@ -6426,7 +6638,7 @@ import {
|
|
6426
6638
|
Tooltip as Tooltip2,
|
6427
6639
|
Transition as Transition2
|
6428
6640
|
} from "@mantine/core";
|
6429
|
-
import { jsxDEV as
|
6641
|
+
import { jsxDEV as jsxDEV19 } from "react/jsx-dev-runtime";
|
6430
6642
|
var isBadgeMinimalProps = (e) => {
|
6431
6643
|
if (typeof e !== "object") {
|
6432
6644
|
return false;
|
@@ -6439,17 +6651,17 @@ var isBadgeMinimalProps = (e) => {
|
|
6439
6651
|
function BadgeMinimal(props) {
|
6440
6652
|
const { label, tooltip, mounted, componentsProps } = props;
|
6441
6653
|
const theme = useRemoraidTheme();
|
6442
|
-
return /* @__PURE__ */
|
6654
|
+
return /* @__PURE__ */ jsxDEV19(Transition2, {
|
6443
6655
|
mounted: mounted !== false,
|
6444
6656
|
transition: "fade",
|
6445
6657
|
duration: theme.transitionDurations.short,
|
6446
6658
|
timingFunction: "ease",
|
6447
6659
|
...componentsProps?.transition,
|
6448
|
-
children: (transitionStyle) => /* @__PURE__ */
|
6660
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV19(Tooltip2, {
|
6449
6661
|
disabled: !tooltip,
|
6450
6662
|
label: tooltip,
|
6451
6663
|
...componentsProps?.tooltip,
|
6452
|
-
children: /* @__PURE__ */
|
6664
|
+
children: /* @__PURE__ */ jsxDEV19(Badge, {
|
6453
6665
|
variant: "default",
|
6454
6666
|
...componentsProps?.badge,
|
6455
6667
|
style: {
|
@@ -6464,7 +6676,7 @@ function BadgeMinimal(props) {
|
|
6464
6676
|
}
|
6465
6677
|
|
6466
6678
|
// src/core/components/BadgeGroup/index.tsx
|
6467
|
-
import { jsxDEV as
|
6679
|
+
import { jsxDEV as jsxDEV20, Fragment as Fragment3 } from "react/jsx-dev-runtime";
|
6468
6680
|
import { createElement } from "react";
|
6469
6681
|
function BadgeGroup({
|
6470
6682
|
badges,
|
@@ -6474,9 +6686,9 @@ function BadgeGroup({
|
|
6474
6686
|
}) {
|
6475
6687
|
const theme = useRemoraidTheme();
|
6476
6688
|
const numVisibleBadges = badges.filter((e) => isBadgeMinimalProps(e) ? e.mounted !== false : true).length;
|
6477
|
-
return /* @__PURE__ */
|
6689
|
+
return /* @__PURE__ */ jsxDEV20(Fragment3, {
|
6478
6690
|
children: [
|
6479
|
-
/* @__PURE__ */
|
6691
|
+
/* @__PURE__ */ jsxDEV20(Group3, {
|
6480
6692
|
gap: gap ?? "xs",
|
6481
6693
|
wrap: "nowrap",
|
6482
6694
|
visibleFrom: breakpoint ?? theme.breakpoints.badgeGroupCollapse,
|
@@ -6490,10 +6702,10 @@ function BadgeGroup({
|
|
6490
6702
|
return e;
|
6491
6703
|
})
|
6492
6704
|
}, undefined, false, undefined, this),
|
6493
|
-
/* @__PURE__ */
|
6705
|
+
/* @__PURE__ */ jsxDEV20(Tooltip3, {
|
6494
6706
|
label: `${numVisibleBadges} badge${numVisibleBadges === 1 ? "" : "s"}`,
|
6495
6707
|
...componentsProps?.tooltip,
|
6496
|
-
children: /* @__PURE__ */
|
6708
|
+
children: /* @__PURE__ */ jsxDEV20(Badge2, {
|
6497
6709
|
hiddenFrom: breakpoint ?? theme.breakpoints.badgeGroupCollapse,
|
6498
6710
|
hidden: numVisibleBadges === 0,
|
6499
6711
|
variant: "light",
|
@@ -6511,7 +6723,7 @@ import {
|
|
6511
6723
|
Alert,
|
6512
6724
|
Transition as Transition3
|
6513
6725
|
} from "@mantine/core";
|
6514
|
-
import { jsxDEV as
|
6726
|
+
import { jsxDEV as jsxDEV21 } from "react/jsx-dev-runtime";
|
6515
6727
|
var isAlertMinimalProps = (e) => {
|
6516
6728
|
if (typeof e !== "object") {
|
6517
6729
|
return false;
|
@@ -6533,13 +6745,13 @@ function AlertMinimal({
|
|
6533
6745
|
componentsProps
|
6534
6746
|
}) {
|
6535
6747
|
const theme = useRemoraidTheme();
|
6536
|
-
return /* @__PURE__ */
|
6748
|
+
return /* @__PURE__ */ jsxDEV21(Transition3, {
|
6537
6749
|
mounted: mounted !== false,
|
6538
6750
|
transition: "fade",
|
6539
6751
|
duration: theme.transitionDurations.short,
|
6540
6752
|
timingFunction: "ease",
|
6541
6753
|
...componentsProps?.transition,
|
6542
|
-
children: (transitionStyle) => /* @__PURE__ */
|
6754
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV21(Alert, {
|
6543
6755
|
...theme.alertProps[category],
|
6544
6756
|
title: title ?? theme.alertProps[category].title,
|
6545
6757
|
withCloseButton: onClose !== undefined,
|
@@ -6565,7 +6777,7 @@ import {
|
|
6565
6777
|
Tooltip as Tooltip4
|
6566
6778
|
} from "@mantine/core";
|
6567
6779
|
import { IconClick } from "@tabler/icons-react";
|
6568
|
-
import { jsxDEV as
|
6780
|
+
import { jsxDEV as jsxDEV22, Fragment as Fragment4 } from "react/jsx-dev-runtime";
|
6569
6781
|
var isRemoraidButtonProps = (e) => {
|
6570
6782
|
if (typeof e !== "object") {
|
6571
6783
|
return false;
|
@@ -6590,17 +6802,17 @@ function RemoraidButton({
|
|
6590
6802
|
}) {
|
6591
6803
|
const theme = useRemoraidTheme();
|
6592
6804
|
const iconProps = { ...theme.iconProps.medium, ...componentsProps?.icon };
|
6593
|
-
const icon = props.icon ? /* @__PURE__ */
|
6805
|
+
const icon = props.icon ? /* @__PURE__ */ jsxDEV22(props.icon, {
|
6594
6806
|
...iconProps
|
6595
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
6807
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV22(IconClick, {
|
6596
6808
|
...iconProps
|
6597
6809
|
}, undefined, false, undefined, this);
|
6598
|
-
return /* @__PURE__ */
|
6810
|
+
return /* @__PURE__ */ jsxDEV22(Fragment4, {
|
6599
6811
|
children: [
|
6600
|
-
/* @__PURE__ */
|
6812
|
+
/* @__PURE__ */ jsxDEV22(Tooltip4, {
|
6601
6813
|
label,
|
6602
6814
|
...componentsProps?.tooltip,
|
6603
|
-
children: /* @__PURE__ */
|
6815
|
+
children: /* @__PURE__ */ jsxDEV22(ActionIcon2, {
|
6604
6816
|
"aria-label": label,
|
6605
6817
|
variant: variant ?? "default",
|
6606
6818
|
onClick,
|
@@ -6614,7 +6826,7 @@ function RemoraidButton({
|
|
6614
6826
|
children: icon
|
6615
6827
|
}, undefined, false, undefined, this)
|
6616
6828
|
}, undefined, false, undefined, this),
|
6617
|
-
/* @__PURE__ */
|
6829
|
+
/* @__PURE__ */ jsxDEV22(Button, {
|
6618
6830
|
onClick,
|
6619
6831
|
loading,
|
6620
6832
|
variant: variant ?? "default",
|
@@ -6632,11 +6844,11 @@ function RemoraidButton({
|
|
6632
6844
|
}
|
6633
6845
|
// src/core/components/Widget/WidgetWrapper/index.tsx
|
6634
6846
|
import {
|
6635
|
-
Paper as
|
6847
|
+
Paper as Paper2,
|
6636
6848
|
Transition as Transition4
|
6637
6849
|
} from "@mantine/core";
|
6638
6850
|
import { useEffect as useEffect4 } from "react";
|
6639
|
-
import { jsxDEV as
|
6851
|
+
import { jsxDEV as jsxDEV23 } from "react/jsx-dev-runtime";
|
6640
6852
|
function WidgetWrapper({
|
6641
6853
|
children,
|
6642
6854
|
config,
|
@@ -6662,12 +6874,12 @@ function WidgetWrapper({
|
|
6662
6874
|
registerWidget(page.pageId, config);
|
6663
6875
|
}
|
6664
6876
|
}, [pageRegistered]);
|
6665
|
-
return /* @__PURE__ */
|
6877
|
+
return /* @__PURE__ */ jsxDEV23(Transition4, {
|
6666
6878
|
mounted: page !== null && isWidgetSelected(page.pageId, config.widgetId),
|
6667
6879
|
transition: "fade-left",
|
6668
6880
|
duration: theme.transitionDurations.medium,
|
6669
6881
|
timingFunction: "ease",
|
6670
|
-
children: (transitionStyle) => /* @__PURE__ */
|
6882
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV23(Paper2, {
|
6671
6883
|
p: "md",
|
6672
6884
|
shadow: "md",
|
6673
6885
|
bg: theme.transparentBackground,
|
@@ -6683,7 +6895,7 @@ function WidgetWrapper({
|
|
6683
6895
|
updateActiveWidget(null);
|
6684
6896
|
},
|
6685
6897
|
children: [
|
6686
|
-
withCloseButton !== false && /* @__PURE__ */
|
6898
|
+
withCloseButton !== false && /* @__PURE__ */ jsxDEV23(CloseButton, {
|
6687
6899
|
widgetId: config.widgetId
|
6688
6900
|
}, undefined, false, undefined, this),
|
6689
6901
|
children
|
@@ -6702,7 +6914,7 @@ import {
|
|
6702
6914
|
Loader,
|
6703
6915
|
Title
|
6704
6916
|
} from "@mantine/core";
|
6705
|
-
import { jsxDEV as
|
6917
|
+
import { jsxDEV as jsxDEV24, Fragment as Fragment5 } from "react/jsx-dev-runtime";
|
6706
6918
|
import { createElement as createElement2 } from "react";
|
6707
6919
|
function Widget({
|
6708
6920
|
children,
|
@@ -6720,7 +6932,7 @@ function Widget({
|
|
6720
6932
|
const badgesGap = (typeof gaps === "object" ? gaps.badges : gaps) ?? "xs";
|
6721
6933
|
const buttonsGap = (typeof gaps === "object" ? gaps.buttons : gaps) ?? "xs";
|
6722
6934
|
const alertsGap = (typeof gaps === "object" ? gaps.alerts : gaps) ?? "xs";
|
6723
|
-
return /* @__PURE__ */
|
6935
|
+
return /* @__PURE__ */ jsxDEV24(WidgetWrapper_default, {
|
6724
6936
|
config: {
|
6725
6937
|
widgetId: id,
|
6726
6938
|
name: title,
|
@@ -6733,28 +6945,28 @@ function Widget({
|
|
6733
6945
|
},
|
6734
6946
|
...componentsProps?.wrapper,
|
6735
6947
|
children: [
|
6736
|
-
/* @__PURE__ */
|
6948
|
+
/* @__PURE__ */ jsxDEV24(Group4, {
|
6737
6949
|
justify: "space-between",
|
6738
6950
|
wrap: "nowrap",
|
6739
6951
|
children: [
|
6740
|
-
/* @__PURE__ */
|
6952
|
+
/* @__PURE__ */ jsxDEV24(Group4, {
|
6741
6953
|
gap: badgesGap,
|
6742
6954
|
wrap: "nowrap",
|
6743
6955
|
children: [
|
6744
|
-
/* @__PURE__ */
|
6956
|
+
/* @__PURE__ */ jsxDEV24(Title, {
|
6745
6957
|
order: 1,
|
6746
6958
|
size: "h3",
|
6747
6959
|
lineClamp: 1,
|
6748
6960
|
children: title
|
6749
6961
|
}, undefined, false, undefined, this),
|
6750
|
-
badges !== undefined && /* @__PURE__ */
|
6962
|
+
badges !== undefined && /* @__PURE__ */ jsxDEV24(BadgeGroup, {
|
6751
6963
|
badges,
|
6752
6964
|
gap: badgesGap,
|
6753
6965
|
...componentsProps?.badgeGroup
|
6754
6966
|
}, undefined, false, undefined, this)
|
6755
6967
|
]
|
6756
6968
|
}, undefined, true, undefined, this),
|
6757
|
-
/* @__PURE__ */
|
6969
|
+
/* @__PURE__ */ jsxDEV24(Group4, {
|
6758
6970
|
gap: buttonsGap,
|
6759
6971
|
wrap: "nowrap",
|
6760
6972
|
children: buttons !== undefined && buttons.map((e, i) => {
|
@@ -6769,7 +6981,7 @@ function Widget({
|
|
6769
6981
|
}, undefined, false, undefined, this)
|
6770
6982
|
]
|
6771
6983
|
}, undefined, true, undefined, this),
|
6772
|
-
/* @__PURE__ */
|
6984
|
+
/* @__PURE__ */ jsxDEV24(Divider3, {
|
6773
6985
|
my: "md"
|
6774
6986
|
}, undefined, false, undefined, this),
|
6775
6987
|
alerts !== undefined && alerts.map((a, i) => {
|
@@ -6782,11 +6994,11 @@ function Widget({
|
|
6782
6994
|
}
|
6783
6995
|
return a;
|
6784
6996
|
}),
|
6785
|
-
loading ? /* @__PURE__ */
|
6786
|
-
children: /* @__PURE__ */
|
6997
|
+
loading ? /* @__PURE__ */ jsxDEV24(Center, {
|
6998
|
+
children: /* @__PURE__ */ jsxDEV24(Loader, {
|
6787
6999
|
...componentsProps?.loader
|
6788
7000
|
}, undefined, false, undefined, this)
|
6789
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
7001
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV24(Fragment5, {
|
6790
7002
|
children
|
6791
7003
|
}, undefined, false, undefined, this)
|
6792
7004
|
]
|
@@ -6795,7 +7007,7 @@ function Widget({
|
|
6795
7007
|
// src/core/components/NotFoundPage/index.tsx
|
6796
7008
|
import { Alert as Alert2 } from "@mantine/core";
|
6797
7009
|
import { usePathname as usePathname3 } from "next/navigation";
|
6798
|
-
import { jsxDEV as
|
7010
|
+
import { jsxDEV as jsxDEV25 } from "react/jsx-dev-runtime";
|
6799
7011
|
function NotFoundPage({
|
6800
7012
|
children,
|
6801
7013
|
message,
|
@@ -6803,11 +7015,11 @@ function NotFoundPage({
|
|
6803
7015
|
}) {
|
6804
7016
|
const pathname = usePathname3();
|
6805
7017
|
const theme = useRemoraidTheme();
|
6806
|
-
return /* @__PURE__ */
|
7018
|
+
return /* @__PURE__ */ jsxDEV25(Page, {
|
6807
7019
|
name: "Not Found",
|
6808
7020
|
...componentsProps?.page,
|
6809
7021
|
children: [
|
6810
|
-
/* @__PURE__ */
|
7022
|
+
/* @__PURE__ */ jsxDEV25(Alert2, {
|
6811
7023
|
...theme.alertProps.negative,
|
6812
7024
|
title: "404 - Page Not Found",
|
6813
7025
|
children: message ?? `Could not find page ${pathname}.`
|
@@ -6818,7 +7030,7 @@ function NotFoundPage({
|
|
6818
7030
|
}
|
6819
7031
|
// src/core/components/EnvironmentShell/index.tsx
|
6820
7032
|
import { Alert as Alert3 } from "@mantine/core";
|
6821
|
-
import { jsxDEV as
|
7033
|
+
import { jsxDEV as jsxDEV26, Fragment as Fragment6 } from "react/jsx-dev-runtime";
|
6822
7034
|
function EnvironmentShell({
|
6823
7035
|
children,
|
6824
7036
|
environment,
|
@@ -6832,7 +7044,7 @@ function EnvironmentShell({
|
|
6832
7044
|
const undefinedKeys = Object.keys(environment).filter((key) => environment[key] === undefined);
|
6833
7045
|
const alertTitle = `Please Specify Environment Variable${undefinedKeys.length > 1 ? "s" : ""}`;
|
6834
7046
|
const alertMessage = `Components could not be rendered because the following environment variables are not specified: ${undefinedKeys.join(", ")}.`;
|
6835
|
-
const alert = /* @__PURE__ */
|
7047
|
+
const alert = /* @__PURE__ */ jsxDEV26(Alert3, {
|
6836
7048
|
...theme.alertProps.neutral,
|
6837
7049
|
title: alertTitle,
|
6838
7050
|
m,
|
@@ -6840,12 +7052,12 @@ function EnvironmentShell({
|
|
6840
7052
|
children: message ?? alertMessage
|
6841
7053
|
}, undefined, false, undefined, this);
|
6842
7054
|
if (undefinedKeys.length === 0) {
|
6843
|
-
return /* @__PURE__ */
|
7055
|
+
return /* @__PURE__ */ jsxDEV26(Fragment6, {
|
6844
7056
|
children
|
6845
7057
|
}, undefined, false, undefined, this);
|
6846
7058
|
}
|
6847
7059
|
if (withContainer) {
|
6848
|
-
return /* @__PURE__ */
|
7060
|
+
return /* @__PURE__ */ jsxDEV26(PageContainer, {
|
6849
7061
|
componentsProps: { container: componentsProps?.container },
|
6850
7062
|
children: alert
|
6851
7063
|
}, undefined, false, undefined, this);
|
@@ -6853,20 +7065,20 @@ function EnvironmentShell({
|
|
6853
7065
|
return alert;
|
6854
7066
|
}
|
6855
7067
|
// src/core/components/SettingsWidget/index.tsx
|
6856
|
-
import { createContext as
|
7068
|
+
import { createContext as createContext6, useContext as useContext9 } from "react";
|
6857
7069
|
import { IconRestore } from "@tabler/icons-react";
|
6858
7070
|
|
6859
7071
|
// src/core/components/SettingsWidget/SaveButton/index.tsx
|
6860
7072
|
import { IconDeviceFloppy } from "@tabler/icons-react";
|
6861
7073
|
import { Group as Group5 } from "@mantine/core";
|
6862
|
-
import { jsxDEV as
|
7074
|
+
import { jsxDEV as jsxDEV27 } from "react/jsx-dev-runtime";
|
6863
7075
|
function SaveButton({
|
6864
7076
|
onSaveChanges,
|
6865
7077
|
insideContainer,
|
6866
7078
|
componentsProps
|
6867
7079
|
}) {
|
6868
7080
|
const settingsWidgetOptions = useSettingsWidgetContext();
|
6869
|
-
const button = /* @__PURE__ */
|
7081
|
+
const button = /* @__PURE__ */ jsxDEV27(RemoraidButton, {
|
6870
7082
|
label: "Save Changes",
|
6871
7083
|
icon: IconDeviceFloppy,
|
6872
7084
|
onClick: onSaveChanges,
|
@@ -6881,7 +7093,7 @@ function SaveButton({
|
|
6881
7093
|
}
|
6882
7094
|
}, undefined, false, undefined, this);
|
6883
7095
|
if (insideContainer !== false) {
|
6884
|
-
return /* @__PURE__ */
|
7096
|
+
return /* @__PURE__ */ jsxDEV27(Group5, {
|
6885
7097
|
w: "100%",
|
6886
7098
|
justify: "flex-end",
|
6887
7099
|
mt: "md",
|
@@ -6893,11 +7105,11 @@ function SaveButton({
|
|
6893
7105
|
}
|
6894
7106
|
|
6895
7107
|
// src/core/components/SettingsWidget/index.tsx
|
6896
|
-
import { jsxDEV as
|
7108
|
+
import { jsxDEV as jsxDEV28 } from "react/jsx-dev-runtime";
|
6897
7109
|
var defaultSettingsWidgetContext = {};
|
6898
|
-
var settingsWidgetContext =
|
7110
|
+
var settingsWidgetContext = createContext6(defaultSettingsWidgetContext);
|
6899
7111
|
var useSettingsWidgetContext = () => {
|
6900
|
-
return
|
7112
|
+
return useContext9(settingsWidgetContext);
|
6901
7113
|
};
|
6902
7114
|
function SettingsWidget({
|
6903
7115
|
children,
|
@@ -6906,9 +7118,9 @@ function SettingsWidget({
|
|
6906
7118
|
custom,
|
6907
7119
|
widgetProps
|
6908
7120
|
}) {
|
6909
|
-
return /* @__PURE__ */
|
7121
|
+
return /* @__PURE__ */ jsxDEV28(settingsWidgetContext.Provider, {
|
6910
7122
|
value: { custom, unsavedChanges },
|
6911
|
-
children: /* @__PURE__ */
|
7123
|
+
children: /* @__PURE__ */ jsxDEV28(Widget, {
|
6912
7124
|
title: "Settings",
|
6913
7125
|
id: "settings",
|
6914
7126
|
mt: "md",
|
@@ -6944,27 +7156,27 @@ var SettingsWidget_default = Object.assign(SettingsWidget, {
|
|
6944
7156
|
SaveButton
|
6945
7157
|
});
|
6946
7158
|
// src/core/components/SettingsWidget/SettingsTable/index.tsx
|
6947
|
-
import { createContext as
|
7159
|
+
import { createContext as createContext7, useContext as useContext10 } from "react";
|
6948
7160
|
import { Table as Table2 } from "@mantine/core";
|
6949
7161
|
|
6950
7162
|
// src/core/components/SettingsWidget/SettingsTable/Row/index.tsx
|
6951
7163
|
import { Table, Text as Text2 } from "@mantine/core";
|
6952
|
-
import { jsxDEV as
|
7164
|
+
import { jsxDEV as jsxDEV29 } from "react/jsx-dev-runtime";
|
6953
7165
|
function Row({
|
6954
7166
|
children,
|
6955
7167
|
label
|
6956
7168
|
}) {
|
6957
7169
|
const options = useSettingsTableOptions();
|
6958
|
-
return /* @__PURE__ */
|
7170
|
+
return /* @__PURE__ */ jsxDEV29(Table.Tr, {
|
6959
7171
|
children: [
|
6960
|
-
/* @__PURE__ */
|
7172
|
+
/* @__PURE__ */ jsxDEV29(Table.Th, {
|
6961
7173
|
w: options.leftColumnWidth,
|
6962
|
-
children: /* @__PURE__ */
|
7174
|
+
children: /* @__PURE__ */ jsxDEV29(Text2, {
|
6963
7175
|
size: "sm",
|
6964
7176
|
children: label
|
6965
7177
|
}, undefined, false, undefined, this)
|
6966
7178
|
}, undefined, false, undefined, this),
|
6967
|
-
/* @__PURE__ */
|
7179
|
+
/* @__PURE__ */ jsxDEV29(Table.Td, {
|
6968
7180
|
py: "xs",
|
6969
7181
|
children
|
6970
7182
|
}, undefined, false, undefined, this)
|
@@ -6973,29 +7185,29 @@ function Row({
|
|
6973
7185
|
}
|
6974
7186
|
|
6975
7187
|
// src/core/components/SettingsWidget/SettingsTable/index.tsx
|
6976
|
-
import { jsxDEV as
|
7188
|
+
import { jsxDEV as jsxDEV30 } from "react/jsx-dev-runtime";
|
6977
7189
|
var defaultSettingsTableOptions = {
|
6978
7190
|
leftColumnWidth: "38.2%"
|
6979
7191
|
};
|
6980
|
-
var settingsTableOptionsContext =
|
7192
|
+
var settingsTableOptionsContext = createContext7(defaultSettingsTableOptions);
|
6981
7193
|
var useSettingsTableOptions = () => {
|
6982
|
-
return
|
7194
|
+
return useContext10(settingsTableOptionsContext);
|
6983
7195
|
};
|
6984
7196
|
function SettingsTable({
|
6985
7197
|
children,
|
6986
7198
|
leftColumnWidth
|
6987
7199
|
}) {
|
6988
7200
|
const theme = useRemoraidTheme();
|
6989
|
-
return /* @__PURE__ */
|
7201
|
+
return /* @__PURE__ */ jsxDEV30(settingsTableOptionsContext.Provider, {
|
6990
7202
|
value: {
|
6991
7203
|
leftColumnWidth: leftColumnWidth ?? defaultSettingsTableOptions.leftColumnWidth
|
6992
7204
|
},
|
6993
|
-
children: /* @__PURE__ */
|
7205
|
+
children: /* @__PURE__ */ jsxDEV30(Table2, {
|
6994
7206
|
bg: theme.transparentBackground,
|
6995
7207
|
withTableBorder: true,
|
6996
7208
|
variant: "vertical",
|
6997
7209
|
layout: "fixed",
|
6998
|
-
children: /* @__PURE__ */
|
7210
|
+
children: /* @__PURE__ */ jsxDEV30(Table2.Tbody, {
|
6999
7211
|
children
|
7000
7212
|
}, undefined, false, undefined, this)
|
7001
7213
|
}, undefined, false, undefined, this)
|
@@ -7009,7 +7221,7 @@ import { cloneElement } from "react";
|
|
7009
7221
|
var import_lodash = __toESM(require_lodash(), 1);
|
7010
7222
|
import { Chip as Chip3, Group as Group6 } from "@mantine/core";
|
7011
7223
|
import { IconLink as IconLink2 } from "@tabler/icons-react";
|
7012
|
-
import { jsxDEV as
|
7224
|
+
import { jsxDEV as jsxDEV31 } from "react/jsx-dev-runtime";
|
7013
7225
|
var defaultNavbarSettingsWidgetId = "navbar-settings";
|
7014
7226
|
function NavbarSettingsWidget({
|
7015
7227
|
additionalRows,
|
@@ -7019,7 +7231,7 @@ function NavbarSettingsWidget({
|
|
7019
7231
|
const { userExperience, updateUserExperience, initialUserExperience } = useRemoraidUserExperience();
|
7020
7232
|
const app = useRemoraidApp();
|
7021
7233
|
const theme = useRemoraidTheme();
|
7022
|
-
return /* @__PURE__ */
|
7234
|
+
return /* @__PURE__ */ jsxDEV31(SettingsWidget_default, {
|
7023
7235
|
widgetProps: {
|
7024
7236
|
id: defaultNavbarSettingsWidgetId,
|
7025
7237
|
title: "Navbar Settings",
|
@@ -7028,32 +7240,32 @@ function NavbarSettingsWidget({
|
|
7028
7240
|
onRestoreDefaultValues: () => {
|
7029
7241
|
updateUserExperience((prev) => ({
|
7030
7242
|
...prev,
|
7031
|
-
|
7243
|
+
navbar: initialUserExperience.navbar
|
7032
7244
|
}));
|
7033
7245
|
},
|
7034
|
-
custom: !import_lodash.isEqual(userExperience.
|
7035
|
-
children: /* @__PURE__ */
|
7246
|
+
custom: !import_lodash.isEqual(userExperience.navbar, initialUserExperience.navbar),
|
7247
|
+
children: /* @__PURE__ */ jsxDEV31(SettingsTable_default, {
|
7036
7248
|
children: [
|
7037
|
-
/* @__PURE__ */
|
7249
|
+
/* @__PURE__ */ jsxDEV31(SettingsTable_default.Row, {
|
7038
7250
|
label: "Select which pages you want to display or hide",
|
7039
|
-
children: /* @__PURE__ */
|
7251
|
+
children: /* @__PURE__ */ jsxDEV31(Chip3.Group, {
|
7040
7252
|
multiple: true,
|
7041
|
-
value: app.navigablePages.filter((p) => !userExperience.
|
7253
|
+
value: app.navigablePages.filter((p) => !userExperience.navbar.hiddenPages.includes(p.href)).map((p) => p.href),
|
7042
7254
|
onChange: (newValue) => {
|
7043
7255
|
updateUserExperience((prev) => ({
|
7044
7256
|
...prev,
|
7045
|
-
|
7046
|
-
...prev.
|
7257
|
+
navbar: {
|
7258
|
+
...prev.navbar,
|
7047
7259
|
hiddenPages: app.navigablePages.filter((p) => !newValue.includes(p.href)).map((p) => p.href)
|
7048
7260
|
}
|
7049
7261
|
}));
|
7050
7262
|
},
|
7051
|
-
children: /* @__PURE__ */
|
7263
|
+
children: /* @__PURE__ */ jsxDEV31(Group6, {
|
7052
7264
|
justify: "flex-start",
|
7053
7265
|
gap: "xs",
|
7054
|
-
children: app.navigablePages.map((p) => ({ ...p, icon: p.icon ?? IconLink2 })).map((p, i) => /* @__PURE__ */
|
7266
|
+
children: app.navigablePages.map((p) => ({ ...p, icon: p.icon ?? IconLink2 })).map((p, i) => /* @__PURE__ */ jsxDEV31(Chip3, {
|
7055
7267
|
value: p.href,
|
7056
|
-
icon: /* @__PURE__ */
|
7268
|
+
icon: /* @__PURE__ */ jsxDEV31(p.icon, {
|
7057
7269
|
...theme.iconProps.tiny,
|
7058
7270
|
color: theme.primaryColor
|
7059
7271
|
}, undefined, false, undefined, this),
|
@@ -7077,14 +7289,19 @@ export {
|
|
7077
7289
|
useRemoraidTheme,
|
7078
7290
|
useRemoraidApp,
|
7079
7291
|
usePage,
|
7292
|
+
useLayouts,
|
7080
7293
|
useHydrationStatus,
|
7081
7294
|
useHydratedMantineColorScheme,
|
7295
|
+
useFrameLayout,
|
7296
|
+
isFrameLayout,
|
7082
7297
|
defaultUserExperienceCookieName,
|
7083
7298
|
defaultUserExperience,
|
7084
7299
|
defaultSettingsWidgetContext as defaultSettingsWidgetOptions,
|
7085
7300
|
defaultSettingsTableOptions,
|
7086
7301
|
defaultNavbarSettingsWidgetId,
|
7087
|
-
|
7302
|
+
defaultLayoutsContext,
|
7303
|
+
defaultFrameLayoutContext,
|
7304
|
+
defaultAppShellLayoutId,
|
7088
7305
|
defaultAppContext,
|
7089
7306
|
createUserExperienceContext,
|
7090
7307
|
createRemoraidTheme,
|
@@ -7105,11 +7322,16 @@ export {
|
|
7105
7322
|
NotFoundPage,
|
7106
7323
|
NavbarVariant,
|
7107
7324
|
NavbarSettingsWidget,
|
7325
|
+
LayoutType,
|
7108
7326
|
HydrationStatusProvider,
|
7327
|
+
FrameLayoutVariant,
|
7328
|
+
FrameLayoutSection,
|
7329
|
+
FrameLayout_default as FrameLayout,
|
7330
|
+
FooterVariant,
|
7109
7331
|
EnvironmentShell,
|
7110
7332
|
BadgeMinimal,
|
7111
7333
|
BadgeGroup,
|
7112
|
-
AppShell,
|
7334
|
+
AppShell_default as AppShell,
|
7113
7335
|
AppProvider,
|
7114
7336
|
AlertMinimal,
|
7115
7337
|
AlertCategory
|