remoraid 2.5.6 → 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 +790 -507
- package/dist/core/index.d.ts +296 -113
- package/dist/core/index.js +793 -503
- 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;
|
@@ -5603,7 +5624,6 @@ var co = (condition, value, fallback) => condition(value) ? value : fallback;
|
|
5603
5624
|
import {
|
5604
5625
|
px,
|
5605
5626
|
rgba,
|
5606
|
-
useMantineColorScheme,
|
5607
5627
|
useMantineTheme
|
5608
5628
|
} from "@mantine/core";
|
5609
5629
|
import {
|
@@ -5612,17 +5632,61 @@ import {
|
|
5612
5632
|
IconInfoCircle
|
5613
5633
|
} from "@tabler/icons-react";
|
5614
5634
|
import React3, {
|
5635
|
+
useContext as useContext3,
|
5636
|
+
useMemo as useMemo2
|
5637
|
+
} from "react";
|
5638
|
+
|
5639
|
+
// src/core/components/RemoraidProvider/HydrationStatusProvider/index.tsx
|
5640
|
+
import { useMantineColorScheme } from "@mantine/core";
|
5641
|
+
import {
|
5642
|
+
createContext,
|
5615
5643
|
useContext as useContext2,
|
5616
|
-
|
5644
|
+
useEffect,
|
5645
|
+
useMemo,
|
5646
|
+
useState as useState2
|
5617
5647
|
} from "react";
|
5618
5648
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
5649
|
+
var defaultHydrationStatus = {
|
5650
|
+
hasHydrated: false,
|
5651
|
+
ensureHydration: () => {
|
5652
|
+
return;
|
5653
|
+
}
|
5654
|
+
};
|
5655
|
+
var hydrationStatusContext = createContext(defaultHydrationStatus);
|
5656
|
+
var useHydrationStatus = () => {
|
5657
|
+
return useContext2(hydrationStatusContext);
|
5658
|
+
};
|
5659
|
+
var useHydratedMantineColorScheme = () => {
|
5660
|
+
const { ensureHydration } = useHydrationStatus();
|
5661
|
+
return ensureHydration(useMantineColorScheme()) ?? {};
|
5662
|
+
};
|
5663
|
+
function HydrationStatusProvider({
|
5664
|
+
children
|
5665
|
+
}) {
|
5666
|
+
const [hasHydrated, setHasHydrated] = useState2(defaultHydrationStatus.hasHydrated);
|
5667
|
+
const hydrationStatus = useMemo(() => ({
|
5668
|
+
hasHydrated,
|
5669
|
+
ensureHydration: (v) => hasHydrated ? v : undefined
|
5670
|
+
}), [hasHydrated]);
|
5671
|
+
useEffect(() => {
|
5672
|
+
setHasHydrated(true);
|
5673
|
+
}, []);
|
5674
|
+
return /* @__PURE__ */ jsxDEV2(hydrationStatusContext.Provider, {
|
5675
|
+
value: hydrationStatus,
|
5676
|
+
children
|
5677
|
+
}, undefined, false, undefined, this);
|
5678
|
+
}
|
5679
|
+
|
5680
|
+
// src/core/components/RemoraidProvider/ThemeProvider/index.tsx
|
5681
|
+
import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
|
5619
5682
|
var isMantinePrimaryShade = (primaryShade) => {
|
5620
5683
|
if (isNaN(Number(primaryShade))) {
|
5621
5684
|
return true;
|
5622
5685
|
}
|
5623
5686
|
return false;
|
5624
5687
|
};
|
5625
|
-
var createRemoraidTheme = (customTheme,
|
5688
|
+
var createRemoraidTheme = (customTheme, dependencies) => {
|
5689
|
+
const { mantineTheme, colorScheme } = dependencies ?? {};
|
5626
5690
|
const defaultMediumIconProps = { size: "1.125em" };
|
5627
5691
|
let transparentBackground;
|
5628
5692
|
let primaryColor;
|
@@ -5639,93 +5703,89 @@ var createRemoraidTheme = (customTheme, mantineTheme, colorScheme) => {
|
|
5639
5703
|
};
|
5640
5704
|
}
|
5641
5705
|
return {
|
5642
|
-
|
5706
|
+
containerSize: 1300,
|
5707
|
+
jsonStringifySpace: 2,
|
5708
|
+
transparentBackground,
|
5709
|
+
primaryColor,
|
5710
|
+
spacingPx,
|
5711
|
+
...customTheme,
|
5643
5712
|
transitionDurations: {
|
5644
5713
|
["short" /* Short */]: 200,
|
5645
5714
|
["medium" /* Medium */]: 350,
|
5646
|
-
["long" /* Long */]: 500
|
5715
|
+
["long" /* Long */]: 500,
|
5716
|
+
...customTheme?.transitionDurations
|
5647
5717
|
},
|
5648
5718
|
breakpoints: {
|
5649
5719
|
["buttonCollapse" /* ButtonCollapse */]: "md",
|
5650
|
-
["badgeGroupCollapse" /* BadgeGroupCollapse */]: "md"
|
5720
|
+
["badgeGroupCollapse" /* BadgeGroupCollapse */]: "md",
|
5721
|
+
...customTheme?.breakpoints
|
5651
5722
|
},
|
5652
5723
|
scrollAreaProps: {
|
5653
5724
|
scrollbarSize: 8,
|
5654
5725
|
scrollHideDelay: 20,
|
5655
|
-
type: "hover"
|
5726
|
+
type: "hover",
|
5727
|
+
...customTheme?.scrollAreaProps
|
5656
5728
|
},
|
5657
|
-
containerSize: 1300,
|
5658
5729
|
alertProps: {
|
5659
5730
|
["negative" /* Negative */]: {
|
5660
|
-
icon: /* @__PURE__ */
|
5731
|
+
icon: /* @__PURE__ */ jsxDEV3(IconAlertCircle, {
|
5661
5732
|
...defaultMediumIconProps
|
5662
5733
|
}, undefined, false, undefined, this),
|
5663
5734
|
variant: "light",
|
5664
5735
|
color: "red",
|
5665
|
-
title: "Attention!"
|
5736
|
+
title: "Attention!",
|
5737
|
+
...customTheme?.alertProps?.negative
|
5666
5738
|
},
|
5667
5739
|
["neutral" /* Neutral */]: {
|
5668
|
-
icon: /* @__PURE__ */
|
5740
|
+
icon: /* @__PURE__ */ jsxDEV3(IconInfoCircle, {
|
5669
5741
|
...defaultMediumIconProps
|
5670
5742
|
}, undefined, false, undefined, this),
|
5671
5743
|
variant: "light",
|
5672
5744
|
color: mantineTheme?.primaryColor,
|
5673
|
-
title: "Information"
|
5745
|
+
title: "Information",
|
5746
|
+
...customTheme?.alertProps?.neutral
|
5674
5747
|
},
|
5675
5748
|
["positive" /* Positive */]: {
|
5676
|
-
icon: /* @__PURE__ */
|
5749
|
+
icon: /* @__PURE__ */ jsxDEV3(IconCircleCheck, {
|
5677
5750
|
...defaultMediumIconProps
|
5678
5751
|
}, undefined, false, undefined, this),
|
5679
5752
|
variant: "light",
|
5680
5753
|
color: "green",
|
5681
|
-
title: "Success"
|
5754
|
+
title: "Success",
|
5755
|
+
...customTheme?.alertProps?.positive
|
5682
5756
|
}
|
5683
5757
|
},
|
5684
5758
|
iconProps: {
|
5685
|
-
["medium" /* Medium */]:
|
5686
|
-
|
5687
|
-
|
5688
|
-
|
5689
|
-
|
5690
|
-
|
5691
|
-
|
5692
|
-
|
5759
|
+
["medium" /* Medium */]: {
|
5760
|
+
...defaultMediumIconProps,
|
5761
|
+
...customTheme?.iconProps?.medium
|
5762
|
+
},
|
5763
|
+
["tiny" /* Tiny */]: {
|
5764
|
+
size: 14,
|
5765
|
+
stroke: 3,
|
5766
|
+
...customTheme?.iconProps?.tiny
|
5767
|
+
}
|
5768
|
+
}
|
5693
5769
|
};
|
5694
5770
|
};
|
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
5771
|
var themeContext = React3.createContext(createRemoraidTheme());
|
5708
5772
|
var useRemoraidTheme = () => {
|
5709
|
-
return
|
5773
|
+
return useContext3(themeContext);
|
5710
5774
|
};
|
5711
5775
|
function ThemeProvider({
|
5712
|
-
|
5713
|
-
|
5776
|
+
theme,
|
5777
|
+
children
|
5714
5778
|
}) {
|
5715
5779
|
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, {
|
5780
|
+
const { colorScheme } = useHydratedMantineColorScheme();
|
5781
|
+
const remoraidTheme = useMemo2(() => {
|
5782
|
+
const dependencies = {
|
5783
|
+
mantineTheme,
|
5784
|
+
colorScheme
|
5785
|
+
};
|
5786
|
+
return createRemoraidTheme(typeof theme === "function" ? theme(dependencies) : theme, dependencies);
|
5787
|
+
}, [colorScheme, theme]);
|
5788
|
+
return /* @__PURE__ */ jsxDEV3(themeContext.Provider, {
|
5729
5789
|
value: remoraidTheme,
|
5730
5790
|
children
|
5731
5791
|
}, undefined, false, undefined, this);
|
@@ -5737,17 +5797,169 @@ import { CookiesProvider } from "react-cookie";
|
|
5737
5797
|
// src/core/components/RemoraidProvider/CoreUserExperienceProvider/index.tsx
|
5738
5798
|
import { useContext as useContext4 } from "react";
|
5739
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";
|
5952
|
+
|
5740
5953
|
// src/core/components/AppShell/NavbarMinimal/index.tsx
|
5741
5954
|
import {
|
5742
5955
|
Tooltip,
|
5743
5956
|
UnstyledButton,
|
5744
5957
|
Stack,
|
5745
|
-
rem,
|
5746
|
-
useMantineColorScheme as useMantineColorScheme2,
|
5747
5958
|
Flex,
|
5748
5959
|
Paper,
|
5749
5960
|
Divider,
|
5750
|
-
Indicator
|
5961
|
+
Indicator,
|
5962
|
+
rem
|
5751
5963
|
} from "@mantine/core";
|
5752
5964
|
import {
|
5753
5965
|
IconLink,
|
@@ -5758,78 +5970,80 @@ import {
|
|
5758
5970
|
} from "@tabler/icons-react";
|
5759
5971
|
import Link from "next/link";
|
5760
5972
|
import { usePathname } from "next/navigation";
|
5761
|
-
import { useState as
|
5973
|
+
import { useState as useState5 } from "react";
|
5762
5974
|
|
5763
5975
|
// src/core/components/AppShell/AppProvider/index.tsx
|
5764
|
-
import { createContext, useContext as
|
5765
|
-
import { jsxDEV as
|
5766
|
-
var defaultAppContext = {
|
5767
|
-
|
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);
|
5768
5982
|
var useRemoraidApp = () => {
|
5769
|
-
return
|
5983
|
+
return useContext6(appContext);
|
5770
5984
|
};
|
5771
5985
|
function AppProvider({
|
5772
|
-
|
5773
|
-
|
5774
|
-
user
|
5986
|
+
appContext: appContextProps,
|
5987
|
+
children
|
5775
5988
|
}) {
|
5776
|
-
return /* @__PURE__ */
|
5777
|
-
value: {
|
5989
|
+
return /* @__PURE__ */ jsxDEV8(appContext.Provider, {
|
5990
|
+
value: { ...appContextProps },
|
5778
5991
|
children
|
5779
5992
|
}, undefined, false, undefined, this);
|
5780
5993
|
}
|
5781
5994
|
|
5782
5995
|
// src/core/components/AppShell/NavbarMinimal/index.tsx
|
5783
|
-
import { jsxDEV as
|
5996
|
+
import { jsxDEV as jsxDEV9, Fragment } from "react/jsx-dev-runtime";
|
5784
5997
|
function NavbarLink({
|
5785
5998
|
icon,
|
5999
|
+
linkSize,
|
6000
|
+
iconSize,
|
5786
6001
|
label,
|
5787
6002
|
active,
|
5788
6003
|
onClick,
|
5789
6004
|
href,
|
5790
|
-
indicator
|
5791
|
-
settings
|
6005
|
+
indicator
|
5792
6006
|
}) {
|
5793
|
-
const [isHoveringRoleIndicator, setIsHoveringRoleIndicator] =
|
6007
|
+
const [isHoveringRoleIndicator, setIsHoveringRoleIndicator] = useState5(false);
|
5794
6008
|
const iconProps = {
|
5795
|
-
size:
|
6009
|
+
size: iconSize,
|
5796
6010
|
stroke: 1.5
|
5797
6011
|
};
|
5798
6012
|
const Icon2 = icon ?? IconLink;
|
5799
6013
|
if (!href) {
|
5800
|
-
return /* @__PURE__ */
|
6014
|
+
return /* @__PURE__ */ jsxDEV9(Tooltip, {
|
5801
6015
|
label,
|
5802
6016
|
position: "right",
|
5803
6017
|
transitionProps: { duration: 0 },
|
5804
|
-
children: /* @__PURE__ */
|
6018
|
+
children: /* @__PURE__ */ jsxDEV9(UnstyledButton, {
|
5805
6019
|
onClick,
|
5806
6020
|
className: "remoraid-navbar-minimal-link",
|
5807
6021
|
"data-active": active || undefined,
|
5808
|
-
w:
|
5809
|
-
h:
|
5810
|
-
children: /* @__PURE__ */
|
6022
|
+
w: linkSize,
|
6023
|
+
h: linkSize,
|
6024
|
+
children: /* @__PURE__ */ jsxDEV9(Icon2, {
|
5811
6025
|
...iconProps
|
5812
6026
|
}, undefined, false, undefined, this)
|
5813
6027
|
}, undefined, false, undefined, this)
|
5814
6028
|
}, undefined, false, undefined, this);
|
5815
6029
|
}
|
5816
|
-
const button = /* @__PURE__ */
|
6030
|
+
const button = /* @__PURE__ */ jsxDEV9(UnstyledButton, {
|
5817
6031
|
onClick,
|
5818
6032
|
className: "remoraid-navbar-minimal-link",
|
5819
6033
|
"data-active": active || undefined,
|
5820
|
-
w:
|
5821
|
-
h:
|
6034
|
+
w: linkSize,
|
6035
|
+
h: linkSize,
|
5822
6036
|
component: Link,
|
5823
6037
|
href,
|
5824
|
-
children: /* @__PURE__ */
|
6038
|
+
children: /* @__PURE__ */ jsxDEV9(Icon2, {
|
5825
6039
|
...iconProps
|
5826
6040
|
}, undefined, false, undefined, this)
|
5827
6041
|
}, undefined, false, undefined, this);
|
5828
|
-
return /* @__PURE__ */
|
6042
|
+
return /* @__PURE__ */ jsxDEV9(Tooltip, {
|
5829
6043
|
label,
|
5830
6044
|
position: "right",
|
5831
6045
|
transitionProps: { duration: 0 },
|
5832
|
-
children: indicator === undefined ? button : /* @__PURE__ */
|
6046
|
+
children: indicator === undefined ? button : /* @__PURE__ */ jsxDEV9(Indicator, {
|
5833
6047
|
withBorder: true,
|
5834
6048
|
size: 13,
|
5835
6049
|
offset: 2,
|
@@ -5840,108 +6054,103 @@ function NavbarLink({
|
|
5840
6054
|
}, undefined, false, undefined, this)
|
5841
6055
|
}, undefined, false, undefined, this);
|
5842
6056
|
}
|
5843
|
-
var defaultSettings = {
|
5844
|
-
hiddenPages: [],
|
5845
|
-
linkSize: rem("50px"),
|
5846
|
-
iconSize: "50%",
|
5847
|
-
px: "sm",
|
5848
|
-
py: "md"
|
5849
|
-
};
|
5850
6057
|
function NavbarMinimal({
|
5851
|
-
|
5852
|
-
|
5853
|
-
settings: settingsProp,
|
6058
|
+
linkSize = rem("50px"),
|
6059
|
+
iconSize = "50%",
|
5854
6060
|
linkIndicator,
|
5855
6061
|
logoIndicator,
|
5856
|
-
|
6062
|
+
componentsProps
|
5857
6063
|
}) {
|
5858
|
-
const { userExperience } = useRemoraidUserExperience();
|
5859
6064
|
const pathname = usePathname();
|
5860
6065
|
const theme = useRemoraidTheme();
|
5861
|
-
const { setColorScheme, colorScheme } =
|
5862
|
-
const
|
5863
|
-
const
|
5864
|
-
const
|
5865
|
-
|
5866
|
-
|
6066
|
+
const { setColorScheme, colorScheme } = useHydratedMantineColorScheme();
|
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
|
5867
6074
|
};
|
5868
|
-
const links =
|
6075
|
+
const links = navigablePages.filter((link) => !userExperience.navbar.hiddenPages.includes(link.href)).map((link) => /* @__PURE__ */ jsxDEV9(NavbarLink, {
|
5869
6076
|
active: link.href === pathname,
|
5870
6077
|
indicator: linkIndicator,
|
5871
|
-
|
5872
|
-
...
|
6078
|
+
...link,
|
6079
|
+
...linkProps
|
5873
6080
|
}, link.label, false, undefined, this));
|
5874
|
-
const
|
6081
|
+
const logoProps = {
|
5875
6082
|
style: {
|
5876
6083
|
cursor: "pointer",
|
5877
|
-
width:
|
5878
|
-
height:
|
6084
|
+
width: linkSize,
|
6085
|
+
height: linkSize
|
5879
6086
|
}
|
5880
|
-
}
|
5881
|
-
return /* @__PURE__ */
|
6087
|
+
};
|
6088
|
+
return /* @__PURE__ */ jsxDEV9(Paper, {
|
5882
6089
|
h: "100%",
|
5883
|
-
|
5884
|
-
bg: theme.transparentBackground,
|
5885
|
-
radius: 0,
|
6090
|
+
p: "md",
|
5886
6091
|
shadow: "md",
|
5887
|
-
|
6092
|
+
bg: theme.transparentBackground,
|
6093
|
+
...componentsProps?.container,
|
6094
|
+
children: /* @__PURE__ */ jsxDEV9(Flex, {
|
5888
6095
|
direction: "column",
|
5889
6096
|
h: "100%",
|
5890
6097
|
align: "center",
|
5891
|
-
px: settings.px,
|
5892
6098
|
children: [
|
5893
|
-
|
5894
|
-
|
5895
|
-
|
5896
|
-
|
5897
|
-
|
5898
|
-
|
5899
|
-
|
5900
|
-
|
5901
|
-
|
5902
|
-
|
5903
|
-
|
5904
|
-
|
5905
|
-
|
5906
|
-
|
5907
|
-
|
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, {
|
5908
6118
|
justify: "flex-start",
|
5909
6119
|
gap: 0,
|
5910
6120
|
flex: 1,
|
5911
6121
|
children: links
|
5912
6122
|
}, undefined, false, undefined, this),
|
5913
|
-
/* @__PURE__ */
|
6123
|
+
/* @__PURE__ */ jsxDEV9(Stack, {
|
5914
6124
|
justify: "center",
|
5915
6125
|
gap: 0,
|
5916
6126
|
children: [
|
5917
|
-
|
6127
|
+
auth !== undefined && (auth.user === null ? /* @__PURE__ */ jsxDEV9(NavbarLink, {
|
5918
6128
|
icon: IconLogin,
|
5919
6129
|
label: "Login",
|
5920
6130
|
href: "/login",
|
5921
6131
|
active: pathname === "/login",
|
5922
|
-
|
5923
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
6132
|
+
...linkProps
|
6133
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV9(NavbarLink, {
|
5924
6134
|
icon: IconLogout,
|
5925
6135
|
label: "Logout",
|
5926
6136
|
onClick: () => {
|
5927
|
-
if (onLogout) {
|
5928
|
-
onLogout();
|
6137
|
+
if (auth.onLogout) {
|
6138
|
+
auth.onLogout();
|
5929
6139
|
}
|
5930
6140
|
},
|
5931
6141
|
href: "/login",
|
5932
|
-
|
6142
|
+
...linkProps
|
5933
6143
|
}, undefined, false, undefined, this)),
|
5934
|
-
/* @__PURE__ */
|
6144
|
+
/* @__PURE__ */ jsxDEV9(NavbarLink, {
|
5935
6145
|
icon: colorScheme === "dark" ? IconSun : IconMoon,
|
5936
6146
|
onClick: () => {
|
5937
|
-
if (colorScheme
|
5938
|
-
|
5939
|
-
} else {
|
5940
|
-
setColorScheme("dark");
|
6147
|
+
if (!colorScheme || !setColorScheme) {
|
6148
|
+
return;
|
5941
6149
|
}
|
6150
|
+
setColorScheme(colorScheme === "dark" ? "light" : "dark");
|
5942
6151
|
},
|
5943
6152
|
label: "Toggle Color Scheme",
|
5944
|
-
|
6153
|
+
...linkProps
|
5945
6154
|
}, undefined, false, undefined, this)
|
5946
6155
|
]
|
5947
6156
|
}, undefined, true, undefined, this)
|
@@ -5950,277 +6159,314 @@ function NavbarMinimal({
|
|
5950
6159
|
}, undefined, false, undefined, this);
|
5951
6160
|
}
|
5952
6161
|
|
5953
|
-
// 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
|
5954
6183
|
import {
|
5955
|
-
|
5956
|
-
|
5957
|
-
|
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
|
5958
6194
|
} from "react";
|
5959
|
-
|
5960
|
-
|
5961
|
-
|
5962
|
-
|
5963
|
-
|
5964
|
-
|
5965
|
-
|
5966
|
-
|
5967
|
-
|
5968
|
-
children
|
5969
|
-
context,
|
5970
|
-
cookieName,
|
5971
|
-
defaultUserExperience,
|
5972
|
-
isValidUserExperience,
|
5973
|
-
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
|
5974
6205
|
}) {
|
5975
|
-
const
|
5976
|
-
const
|
5977
|
-
|
5978
|
-
|
5979
|
-
}
|
5980
|
-
const [
|
5981
|
-
|
5982
|
-
|
5983
|
-
|
5984
|
-
|
5985
|
-
|
5986
|
-
}
|
5987
|
-
|
5988
|
-
|
5989
|
-
|
5990
|
-
|
5991
|
-
|
5992
|
-
|
5993
|
-
|
5994
|
-
|
5995
|
-
|
5996
|
-
|
5997
|
-
|
5998
|
-
userExperience,
|
5999
|
-
updateUserExperience,
|
6000
|
-
processedCookie,
|
6001
|
-
initialUserExperience
|
6002
|
-
},
|
6003
|
-
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
|
6004
6229
|
}, undefined, false, undefined, this);
|
6005
6230
|
}
|
6006
6231
|
|
6007
|
-
// src/core/components/
|
6008
|
-
import { jsxDEV as
|
6009
|
-
var
|
6010
|
-
|
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;
|
6011
6245
|
};
|
6012
|
-
var
|
6013
|
-
|
6014
|
-
|
6015
|
-
|
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: () => {}
|
6016
6258
|
};
|
6017
|
-
var
|
6018
|
-
var
|
6019
|
-
|
6020
|
-
return useContext4(coreUserExperienceContext);
|
6259
|
+
var layoutContext = createContext5(defaultFrameLayoutContext);
|
6260
|
+
var useFrameLayout = () => {
|
6261
|
+
return useContext7(layoutContext);
|
6021
6262
|
};
|
6022
|
-
function
|
6023
|
-
|
6024
|
-
|
6025
|
-
|
6263
|
+
function FrameLayout({
|
6264
|
+
variant = defaultFrameLayoutVariant,
|
6265
|
+
layoutId,
|
6266
|
+
componentsProps,
|
6267
|
+
children
|
6026
6268
|
}) {
|
6027
|
-
const
|
6028
|
-
|
6029
|
-
|
6030
|
-
|
6031
|
-
|
6032
|
-
|
6033
|
-
|
6034
|
-
|
6035
|
-
|
6036
|
-
}
|
6037
|
-
|
6038
|
-
|
6039
|
-
|
6040
|
-
|
6041
|
-
|
6042
|
-
}
|
6043
|
-
|
6044
|
-
|
6045
|
-
|
6046
|
-
|
6047
|
-
|
6048
|
-
}
|
6049
|
-
|
6050
|
-
|
6051
|
-
|
6052
|
-
|
6053
|
-
|
6054
|
-
}
|
6055
|
-
|
6056
|
-
|
6057
|
-
|
6058
|
-
|
6059
|
-
|
6060
|
-
}
|
6061
|
-
|
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
|
6062
6308
|
};
|
6063
|
-
|
6064
|
-
|
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
|
-
|
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 */]
|
6092
6366
|
}, undefined, false, undefined, this)
|
6093
|
-
|
6094
|
-
}, undefined,
|
6095
|
-
}, undefined, false, undefined, this);
|
6096
|
-
}
|
6097
|
-
// src/core/components/AppShell/index.tsx
|
6098
|
-
import {
|
6099
|
-
AppShell as MantineAppShell,
|
6100
|
-
Burger,
|
6101
|
-
rem as rem2,
|
6102
|
-
Group as Group2,
|
6103
|
-
useMantineTheme as useMantineTheme3,
|
6104
|
-
useMantineColorScheme as useMantineColorScheme4,
|
6105
|
-
Paper as Paper2,
|
6106
|
-
px as px2
|
6107
|
-
} from "@mantine/core";
|
6108
|
-
import { useDisclosure } from "@mantine/hooks";
|
6109
|
-
|
6110
|
-
// src/core/components/AppShell/Footer/index.tsx
|
6111
|
-
import { Group, useMantineColorScheme as useMantineColorScheme3, useMantineTheme as useMantineTheme2 } from "@mantine/core";
|
6112
|
-
import { IconPennant } from "@tabler/icons-react";
|
6113
|
-
import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
|
6114
|
-
function Footer() {
|
6115
|
-
const theme = useMantineTheme2();
|
6116
|
-
const { colorScheme } = useMantineColorScheme3();
|
6117
|
-
return /* @__PURE__ */ jsxDEV8(Group, {
|
6118
|
-
justify: "center",
|
6119
|
-
w: "100%",
|
6120
|
-
py: "md",
|
6121
|
-
children: /* @__PURE__ */ jsxDEV8(IconPennant, {
|
6122
|
-
size: 50,
|
6123
|
-
color: colorScheme === "dark" ? theme.colors.dark[8] : theme.colors.gray[3]
|
6124
|
-
}, undefined, false, undefined, this)
|
6367
|
+
]
|
6368
|
+
}, undefined, true, undefined, this)
|
6125
6369
|
}, undefined, false, undefined, this);
|
6126
6370
|
}
|
6371
|
+
var FrameLayout_default = Object.assign(FrameLayout, {
|
6372
|
+
Element
|
6373
|
+
});
|
6127
6374
|
|
6128
6375
|
// src/core/components/AppShell/index.tsx
|
6129
|
-
import { jsxDEV as
|
6130
|
-
|
6131
|
-
|
6132
|
-
|
6133
|
-
|
6134
|
-
|
6135
|
-
|
6136
|
-
|
6137
|
-
|
6138
|
-
|
6139
|
-
|
6140
|
-
|
6141
|
-
|
6142
|
-
|
6143
|
-
|
6144
|
-
|
6145
|
-
|
6146
|
-
|
6147
|
-
|
6148
|
-
|
6149
|
-
|
6150
|
-
|
6151
|
-
|
6152
|
-
|
6153
|
-
|
6154
|
-
|
6155
|
-
|
6156
|
-
|
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
|
6394
|
+
};
|
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,
|
6157
6421
|
children: [
|
6158
|
-
/* @__PURE__ */
|
6159
|
-
|
6160
|
-
|
6161
|
-
|
6162
|
-
bg: colorScheme === "dark" ? mantineTheme.colors.dark[8] : mantineTheme.colors.gray[3],
|
6163
|
-
hiddenFrom: "sm",
|
6164
|
-
children: /* @__PURE__ */ jsxDEV9(Burger, {
|
6165
|
-
opened,
|
6166
|
-
onClick: toggle,
|
6167
|
-
h: 20,
|
6168
|
-
size: 18
|
6169
|
-
}, undefined, false, undefined, this)
|
6170
|
-
}, 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
|
6171
6426
|
}, undefined, false, undefined, this),
|
6172
|
-
/* @__PURE__ */
|
6173
|
-
|
6174
|
-
|
6175
|
-
|
6176
|
-
user,
|
6177
|
-
...navbar
|
6178
|
-
}, 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
|
6179
6431
|
}, undefined, false, undefined, this),
|
6180
|
-
/* @__PURE__ */
|
6181
|
-
children:
|
6182
|
-
|
6183
|
-
|
6184
|
-
|
6185
|
-
|
6186
|
-
|
6187
|
-
|
6188
|
-
|
6189
|
-
children,
|
6190
|
-
/* @__PURE__ */ jsxDEV9(Footer, {}, undefined, false, undefined, this)
|
6191
|
-
]
|
6192
|
-
}, 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
|
6193
6441
|
}, undefined, false, undefined, this)
|
6194
6442
|
]
|
6195
6443
|
}, undefined, true, undefined, this)
|
6196
6444
|
}, undefined, false, undefined, this);
|
6197
6445
|
}
|
6446
|
+
var AppShell_default = Object.assign(AppShell, {
|
6447
|
+
NavbarMinimal,
|
6448
|
+
FooterMinimal
|
6449
|
+
});
|
6198
6450
|
// 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";
|
6451
|
+
import { Chip as Chip2, Divider as Divider2, Flex as Flex3, Text } from "@mantine/core";
|
6206
6452
|
|
6207
6453
|
// src/core/components/Page/index.tsx
|
6208
6454
|
import React6, {
|
6209
|
-
useContext as
|
6210
|
-
useEffect as
|
6455
|
+
useContext as useContext8,
|
6456
|
+
useEffect as useEffect3
|
6211
6457
|
} from "react";
|
6212
6458
|
import { usePathname as usePathname2 } from "next/navigation";
|
6213
6459
|
|
6214
6460
|
// src/core/components/Page/PageContainer/index.tsx
|
6215
6461
|
import { Container } from "@mantine/core";
|
6216
|
-
import { jsxDEV as
|
6462
|
+
import { jsxDEV as jsxDEV14 } from "react/jsx-dev-runtime";
|
6217
6463
|
function PageContainer({
|
6218
6464
|
children,
|
6219
6465
|
pt,
|
6220
6466
|
componentsProps
|
6221
6467
|
}) {
|
6222
6468
|
const theme = useRemoraidTheme();
|
6223
|
-
return /* @__PURE__ */
|
6469
|
+
return /* @__PURE__ */ jsxDEV14(Container, {
|
6224
6470
|
size: theme.containerSize,
|
6225
6471
|
pt: pt ?? "md",
|
6226
6472
|
...componentsProps?.container,
|
@@ -6229,10 +6475,10 @@ function PageContainer({
|
|
6229
6475
|
}
|
6230
6476
|
|
6231
6477
|
// src/core/components/Page/index.tsx
|
6232
|
-
import { jsxDEV as
|
6478
|
+
import { jsxDEV as jsxDEV15 } from "react/jsx-dev-runtime";
|
6233
6479
|
var pageContext = React6.createContext(null);
|
6234
6480
|
var usePage = () => {
|
6235
|
-
return
|
6481
|
+
return useContext8(pageContext);
|
6236
6482
|
};
|
6237
6483
|
function Page({
|
6238
6484
|
children,
|
@@ -6244,16 +6490,16 @@ function Page({
|
|
6244
6490
|
const pathname = usePathname2();
|
6245
6491
|
const { isPageRegistered, registerPage } = useWidgets();
|
6246
6492
|
const pageId = config?.pageId ?? pathname;
|
6247
|
-
|
6493
|
+
useEffect3(() => {
|
6248
6494
|
if (!isPageRegistered(pageId)) {
|
6249
6495
|
if (config?.registerPageDirectly) {
|
6250
6496
|
registerPage(pageId, []);
|
6251
6497
|
}
|
6252
6498
|
}
|
6253
6499
|
}, []);
|
6254
|
-
return /* @__PURE__ */
|
6500
|
+
return /* @__PURE__ */ jsxDEV15(pageContext.Provider, {
|
6255
6501
|
value: { name: name ?? pathname, pageId, ...config },
|
6256
|
-
children: /* @__PURE__ */
|
6502
|
+
children: /* @__PURE__ */ jsxDEV15(PageContainer, {
|
6257
6503
|
pt,
|
6258
6504
|
componentsProps: { container: componentsProps?.container },
|
6259
6505
|
children
|
@@ -6263,7 +6509,44 @@ function Page({
|
|
6263
6509
|
|
6264
6510
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
6265
6511
|
import { IconCheck } from "@tabler/icons-react";
|
6266
|
-
|
6512
|
+
|
6513
|
+
// src/core/components/ScrollableChipGroup/index.tsx
|
6514
|
+
import {
|
6515
|
+
Chip,
|
6516
|
+
Flex as Flex2,
|
6517
|
+
ScrollArea as ScrollArea2
|
6518
|
+
} from "@mantine/core";
|
6519
|
+
import { jsxDEV as jsxDEV16 } from "react/jsx-dev-runtime";
|
6520
|
+
function ScrollableChipGroup({
|
6521
|
+
value,
|
6522
|
+
onChange,
|
6523
|
+
gap,
|
6524
|
+
componentsProps,
|
6525
|
+
children
|
6526
|
+
}) {
|
6527
|
+
const theme = useRemoraidTheme();
|
6528
|
+
return /* @__PURE__ */ jsxDEV16(ScrollArea2, {
|
6529
|
+
...theme.scrollAreaProps,
|
6530
|
+
...componentsProps?.scrollArea,
|
6531
|
+
children: /* @__PURE__ */ jsxDEV16(Chip.Group, {
|
6532
|
+
value,
|
6533
|
+
onChange,
|
6534
|
+
...componentsProps?.chipGroup,
|
6535
|
+
multiple: true,
|
6536
|
+
children: /* @__PURE__ */ jsxDEV16(Flex2, {
|
6537
|
+
justify: "flex-start",
|
6538
|
+
align: "center",
|
6539
|
+
gap: gap ?? "xs",
|
6540
|
+
h: "auto",
|
6541
|
+
...componentsProps?.container,
|
6542
|
+
children
|
6543
|
+
}, undefined, false, undefined, this)
|
6544
|
+
}, undefined, false, undefined, this)
|
6545
|
+
}, undefined, false, undefined, this);
|
6546
|
+
}
|
6547
|
+
|
6548
|
+
// src/core/components/WidgetSelectionHeader/index.tsx
|
6549
|
+
import { jsxDEV as jsxDEV17 } from "react/jsx-dev-runtime";
|
6267
6550
|
function WidgetSelectionHeader({
|
6268
6551
|
title,
|
6269
6552
|
disabledWidgets,
|
@@ -6276,45 +6559,35 @@ function WidgetSelectionHeader({
|
|
6276
6559
|
console.error("'WidgetSelectionHeader' must be rendered inside of a 'Page' component.");
|
6277
6560
|
return null;
|
6278
6561
|
}
|
6279
|
-
return /* @__PURE__ */
|
6562
|
+
return /* @__PURE__ */ jsxDEV17(Flex3, {
|
6280
6563
|
justify: "flex-start",
|
6281
6564
|
align: "center",
|
6282
6565
|
gap: "xs",
|
6283
6566
|
mt,
|
6284
6567
|
children: [
|
6285
|
-
/* @__PURE__ */
|
6568
|
+
/* @__PURE__ */ jsxDEV17(Text, {
|
6286
6569
|
size: "lg",
|
6287
6570
|
fw: 400,
|
6288
6571
|
children: title ?? page.name
|
6289
6572
|
}, undefined, false, undefined, this),
|
6290
|
-
/* @__PURE__ */
|
6573
|
+
/* @__PURE__ */ jsxDEV17(Divider2, {
|
6291
6574
|
orientation: "vertical"
|
6292
6575
|
}, 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)
|
6576
|
+
isPageRegistered(page.pageId) && /* @__PURE__ */ jsxDEV17(ScrollableChipGroup, {
|
6577
|
+
value: Object.keys(widgets[page.pageId]).filter((widgetId) => widgets[page.pageId][widgetId].selected),
|
6578
|
+
onChange: (value) => {
|
6579
|
+
updateWidgetSelectionBulk(page.pageId, value);
|
6580
|
+
},
|
6581
|
+
componentsProps: { scrollArea: { flex: 1 } },
|
6582
|
+
children: Object.keys(widgets[page.pageId]).map((widgetId) => /* @__PURE__ */ jsxDEV17(Chip2, {
|
6583
|
+
value: widgetId,
|
6584
|
+
size: "sm",
|
6585
|
+
disabled: disabledWidgets && disabledWidgets.includes(widgetId),
|
6586
|
+
icon: /* @__PURE__ */ jsxDEV17(IconCheck, {
|
6587
|
+
...theme.iconProps.tiny
|
6588
|
+
}, undefined, false, undefined, this),
|
6589
|
+
children: widgets[page.pageId][widgetId].name
|
6590
|
+
}, widgetId, false, undefined, this))
|
6318
6591
|
}, undefined, false, undefined, this)
|
6319
6592
|
]
|
6320
6593
|
}, undefined, true, undefined, this);
|
@@ -6322,17 +6595,17 @@ function WidgetSelectionHeader({
|
|
6322
6595
|
// src/core/components/Widget/WidgetWrapper/CloseButton/index.tsx
|
6323
6596
|
import { ActionIcon, Transition } from "@mantine/core";
|
6324
6597
|
import { IconX } from "@tabler/icons-react";
|
6325
|
-
import { jsxDEV as
|
6598
|
+
import { jsxDEV as jsxDEV18 } from "react/jsx-dev-runtime";
|
6326
6599
|
function CloseButton({ widgetId }) {
|
6327
6600
|
const theme = useRemoraidTheme();
|
6328
6601
|
const { activeWidget, updateWidgetSelection } = useWidgets();
|
6329
6602
|
const page = usePage();
|
6330
|
-
return /* @__PURE__ */
|
6603
|
+
return /* @__PURE__ */ jsxDEV18(Transition, {
|
6331
6604
|
mounted: activeWidget === widgetId,
|
6332
6605
|
transition: "pop-top-right",
|
6333
6606
|
duration: theme.transitionDurations.short,
|
6334
6607
|
timingFunction: "ease",
|
6335
|
-
children: (transitionStyle) => /* @__PURE__ */
|
6608
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV18(ActionIcon, {
|
6336
6609
|
pos: "absolute",
|
6337
6610
|
size: "xs",
|
6338
6611
|
className: "remoraid-close-button",
|
@@ -6345,7 +6618,7 @@ function CloseButton({ widgetId }) {
|
|
6345
6618
|
updateWidgetSelection(page.pageId, widgetId, false);
|
6346
6619
|
},
|
6347
6620
|
style: transitionStyle,
|
6348
|
-
children: /* @__PURE__ */
|
6621
|
+
children: /* @__PURE__ */ jsxDEV18(IconX, {
|
6349
6622
|
...theme.iconProps.tiny
|
6350
6623
|
}, undefined, false, undefined, this)
|
6351
6624
|
}, undefined, false, undefined, this)
|
@@ -6365,7 +6638,7 @@ import {
|
|
6365
6638
|
Tooltip as Tooltip2,
|
6366
6639
|
Transition as Transition2
|
6367
6640
|
} from "@mantine/core";
|
6368
|
-
import { jsxDEV as
|
6641
|
+
import { jsxDEV as jsxDEV19 } from "react/jsx-dev-runtime";
|
6369
6642
|
var isBadgeMinimalProps = (e) => {
|
6370
6643
|
if (typeof e !== "object") {
|
6371
6644
|
return false;
|
@@ -6378,17 +6651,17 @@ var isBadgeMinimalProps = (e) => {
|
|
6378
6651
|
function BadgeMinimal(props) {
|
6379
6652
|
const { label, tooltip, mounted, componentsProps } = props;
|
6380
6653
|
const theme = useRemoraidTheme();
|
6381
|
-
return /* @__PURE__ */
|
6654
|
+
return /* @__PURE__ */ jsxDEV19(Transition2, {
|
6382
6655
|
mounted: mounted !== false,
|
6383
6656
|
transition: "fade",
|
6384
6657
|
duration: theme.transitionDurations.short,
|
6385
6658
|
timingFunction: "ease",
|
6386
6659
|
...componentsProps?.transition,
|
6387
|
-
children: (transitionStyle) => /* @__PURE__ */
|
6660
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV19(Tooltip2, {
|
6388
6661
|
disabled: !tooltip,
|
6389
6662
|
label: tooltip,
|
6390
6663
|
...componentsProps?.tooltip,
|
6391
|
-
children: /* @__PURE__ */
|
6664
|
+
children: /* @__PURE__ */ jsxDEV19(Badge, {
|
6392
6665
|
variant: "default",
|
6393
6666
|
...componentsProps?.badge,
|
6394
6667
|
style: {
|
@@ -6403,7 +6676,7 @@ function BadgeMinimal(props) {
|
|
6403
6676
|
}
|
6404
6677
|
|
6405
6678
|
// src/core/components/BadgeGroup/index.tsx
|
6406
|
-
import { jsxDEV as
|
6679
|
+
import { jsxDEV as jsxDEV20, Fragment as Fragment3 } from "react/jsx-dev-runtime";
|
6407
6680
|
import { createElement } from "react";
|
6408
6681
|
function BadgeGroup({
|
6409
6682
|
badges,
|
@@ -6413,9 +6686,9 @@ function BadgeGroup({
|
|
6413
6686
|
}) {
|
6414
6687
|
const theme = useRemoraidTheme();
|
6415
6688
|
const numVisibleBadges = badges.filter((e) => isBadgeMinimalProps(e) ? e.mounted !== false : true).length;
|
6416
|
-
return /* @__PURE__ */
|
6689
|
+
return /* @__PURE__ */ jsxDEV20(Fragment3, {
|
6417
6690
|
children: [
|
6418
|
-
/* @__PURE__ */
|
6691
|
+
/* @__PURE__ */ jsxDEV20(Group3, {
|
6419
6692
|
gap: gap ?? "xs",
|
6420
6693
|
wrap: "nowrap",
|
6421
6694
|
visibleFrom: breakpoint ?? theme.breakpoints.badgeGroupCollapse,
|
@@ -6429,10 +6702,10 @@ function BadgeGroup({
|
|
6429
6702
|
return e;
|
6430
6703
|
})
|
6431
6704
|
}, undefined, false, undefined, this),
|
6432
|
-
/* @__PURE__ */
|
6705
|
+
/* @__PURE__ */ jsxDEV20(Tooltip3, {
|
6433
6706
|
label: `${numVisibleBadges} badge${numVisibleBadges === 1 ? "" : "s"}`,
|
6434
6707
|
...componentsProps?.tooltip,
|
6435
|
-
children: /* @__PURE__ */
|
6708
|
+
children: /* @__PURE__ */ jsxDEV20(Badge2, {
|
6436
6709
|
hiddenFrom: breakpoint ?? theme.breakpoints.badgeGroupCollapse,
|
6437
6710
|
hidden: numVisibleBadges === 0,
|
6438
6711
|
variant: "light",
|
@@ -6450,7 +6723,7 @@ import {
|
|
6450
6723
|
Alert,
|
6451
6724
|
Transition as Transition3
|
6452
6725
|
} from "@mantine/core";
|
6453
|
-
import { jsxDEV as
|
6726
|
+
import { jsxDEV as jsxDEV21 } from "react/jsx-dev-runtime";
|
6454
6727
|
var isAlertMinimalProps = (e) => {
|
6455
6728
|
if (typeof e !== "object") {
|
6456
6729
|
return false;
|
@@ -6472,13 +6745,13 @@ function AlertMinimal({
|
|
6472
6745
|
componentsProps
|
6473
6746
|
}) {
|
6474
6747
|
const theme = useRemoraidTheme();
|
6475
|
-
return /* @__PURE__ */
|
6748
|
+
return /* @__PURE__ */ jsxDEV21(Transition3, {
|
6476
6749
|
mounted: mounted !== false,
|
6477
6750
|
transition: "fade",
|
6478
6751
|
duration: theme.transitionDurations.short,
|
6479
6752
|
timingFunction: "ease",
|
6480
6753
|
...componentsProps?.transition,
|
6481
|
-
children: (transitionStyle) => /* @__PURE__ */
|
6754
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV21(Alert, {
|
6482
6755
|
...theme.alertProps[category],
|
6483
6756
|
title: title ?? theme.alertProps[category].title,
|
6484
6757
|
withCloseButton: onClose !== undefined,
|
@@ -6504,7 +6777,7 @@ import {
|
|
6504
6777
|
Tooltip as Tooltip4
|
6505
6778
|
} from "@mantine/core";
|
6506
6779
|
import { IconClick } from "@tabler/icons-react";
|
6507
|
-
import { jsxDEV as
|
6780
|
+
import { jsxDEV as jsxDEV22, Fragment as Fragment4 } from "react/jsx-dev-runtime";
|
6508
6781
|
var isRemoraidButtonProps = (e) => {
|
6509
6782
|
if (typeof e !== "object") {
|
6510
6783
|
return false;
|
@@ -6529,17 +6802,17 @@ function RemoraidButton({
|
|
6529
6802
|
}) {
|
6530
6803
|
const theme = useRemoraidTheme();
|
6531
6804
|
const iconProps = { ...theme.iconProps.medium, ...componentsProps?.icon };
|
6532
|
-
const icon = props.icon ? /* @__PURE__ */
|
6805
|
+
const icon = props.icon ? /* @__PURE__ */ jsxDEV22(props.icon, {
|
6533
6806
|
...iconProps
|
6534
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
6807
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV22(IconClick, {
|
6535
6808
|
...iconProps
|
6536
6809
|
}, undefined, false, undefined, this);
|
6537
|
-
return /* @__PURE__ */
|
6810
|
+
return /* @__PURE__ */ jsxDEV22(Fragment4, {
|
6538
6811
|
children: [
|
6539
|
-
/* @__PURE__ */
|
6812
|
+
/* @__PURE__ */ jsxDEV22(Tooltip4, {
|
6540
6813
|
label,
|
6541
6814
|
...componentsProps?.tooltip,
|
6542
|
-
children: /* @__PURE__ */
|
6815
|
+
children: /* @__PURE__ */ jsxDEV22(ActionIcon2, {
|
6543
6816
|
"aria-label": label,
|
6544
6817
|
variant: variant ?? "default",
|
6545
6818
|
onClick,
|
@@ -6553,7 +6826,7 @@ function RemoraidButton({
|
|
6553
6826
|
children: icon
|
6554
6827
|
}, undefined, false, undefined, this)
|
6555
6828
|
}, undefined, false, undefined, this),
|
6556
|
-
/* @__PURE__ */
|
6829
|
+
/* @__PURE__ */ jsxDEV22(Button, {
|
6557
6830
|
onClick,
|
6558
6831
|
loading,
|
6559
6832
|
variant: variant ?? "default",
|
@@ -6571,11 +6844,11 @@ function RemoraidButton({
|
|
6571
6844
|
}
|
6572
6845
|
// src/core/components/Widget/WidgetWrapper/index.tsx
|
6573
6846
|
import {
|
6574
|
-
Paper as
|
6847
|
+
Paper as Paper2,
|
6575
6848
|
Transition as Transition4
|
6576
6849
|
} from "@mantine/core";
|
6577
|
-
import { useEffect as
|
6578
|
-
import { jsxDEV as
|
6850
|
+
import { useEffect as useEffect4 } from "react";
|
6851
|
+
import { jsxDEV as jsxDEV23 } from "react/jsx-dev-runtime";
|
6579
6852
|
function WidgetWrapper({
|
6580
6853
|
children,
|
6581
6854
|
config,
|
@@ -6593,7 +6866,7 @@ function WidgetWrapper({
|
|
6593
6866
|
const page = usePage();
|
6594
6867
|
const theme = useRemoraidTheme();
|
6595
6868
|
const pageRegistered = page ? isPageRegistered(page.pageId) : false;
|
6596
|
-
|
6869
|
+
useEffect4(() => {
|
6597
6870
|
if (!page) {
|
6598
6871
|
return;
|
6599
6872
|
}
|
@@ -6601,12 +6874,12 @@ function WidgetWrapper({
|
|
6601
6874
|
registerWidget(page.pageId, config);
|
6602
6875
|
}
|
6603
6876
|
}, [pageRegistered]);
|
6604
|
-
return /* @__PURE__ */
|
6877
|
+
return /* @__PURE__ */ jsxDEV23(Transition4, {
|
6605
6878
|
mounted: page !== null && isWidgetSelected(page.pageId, config.widgetId),
|
6606
6879
|
transition: "fade-left",
|
6607
6880
|
duration: theme.transitionDurations.medium,
|
6608
6881
|
timingFunction: "ease",
|
6609
|
-
children: (transitionStyle) => /* @__PURE__ */
|
6882
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV23(Paper2, {
|
6610
6883
|
p: "md",
|
6611
6884
|
shadow: "md",
|
6612
6885
|
bg: theme.transparentBackground,
|
@@ -6622,7 +6895,7 @@ function WidgetWrapper({
|
|
6622
6895
|
updateActiveWidget(null);
|
6623
6896
|
},
|
6624
6897
|
children: [
|
6625
|
-
withCloseButton !== false && /* @__PURE__ */
|
6898
|
+
withCloseButton !== false && /* @__PURE__ */ jsxDEV23(CloseButton, {
|
6626
6899
|
widgetId: config.widgetId
|
6627
6900
|
}, undefined, false, undefined, this),
|
6628
6901
|
children
|
@@ -6641,7 +6914,7 @@ import {
|
|
6641
6914
|
Loader,
|
6642
6915
|
Title
|
6643
6916
|
} from "@mantine/core";
|
6644
|
-
import { jsxDEV as
|
6917
|
+
import { jsxDEV as jsxDEV24, Fragment as Fragment5 } from "react/jsx-dev-runtime";
|
6645
6918
|
import { createElement as createElement2 } from "react";
|
6646
6919
|
function Widget({
|
6647
6920
|
children,
|
@@ -6659,7 +6932,7 @@ function Widget({
|
|
6659
6932
|
const badgesGap = (typeof gaps === "object" ? gaps.badges : gaps) ?? "xs";
|
6660
6933
|
const buttonsGap = (typeof gaps === "object" ? gaps.buttons : gaps) ?? "xs";
|
6661
6934
|
const alertsGap = (typeof gaps === "object" ? gaps.alerts : gaps) ?? "xs";
|
6662
|
-
return /* @__PURE__ */
|
6935
|
+
return /* @__PURE__ */ jsxDEV24(WidgetWrapper_default, {
|
6663
6936
|
config: {
|
6664
6937
|
widgetId: id,
|
6665
6938
|
name: title,
|
@@ -6672,28 +6945,28 @@ function Widget({
|
|
6672
6945
|
},
|
6673
6946
|
...componentsProps?.wrapper,
|
6674
6947
|
children: [
|
6675
|
-
/* @__PURE__ */
|
6948
|
+
/* @__PURE__ */ jsxDEV24(Group4, {
|
6676
6949
|
justify: "space-between",
|
6677
6950
|
wrap: "nowrap",
|
6678
6951
|
children: [
|
6679
|
-
/* @__PURE__ */
|
6952
|
+
/* @__PURE__ */ jsxDEV24(Group4, {
|
6680
6953
|
gap: badgesGap,
|
6681
6954
|
wrap: "nowrap",
|
6682
6955
|
children: [
|
6683
|
-
/* @__PURE__ */
|
6956
|
+
/* @__PURE__ */ jsxDEV24(Title, {
|
6684
6957
|
order: 1,
|
6685
6958
|
size: "h3",
|
6686
6959
|
lineClamp: 1,
|
6687
6960
|
children: title
|
6688
6961
|
}, undefined, false, undefined, this),
|
6689
|
-
badges !== undefined && /* @__PURE__ */
|
6962
|
+
badges !== undefined && /* @__PURE__ */ jsxDEV24(BadgeGroup, {
|
6690
6963
|
badges,
|
6691
6964
|
gap: badgesGap,
|
6692
6965
|
...componentsProps?.badgeGroup
|
6693
6966
|
}, undefined, false, undefined, this)
|
6694
6967
|
]
|
6695
6968
|
}, undefined, true, undefined, this),
|
6696
|
-
/* @__PURE__ */
|
6969
|
+
/* @__PURE__ */ jsxDEV24(Group4, {
|
6697
6970
|
gap: buttonsGap,
|
6698
6971
|
wrap: "nowrap",
|
6699
6972
|
children: buttons !== undefined && buttons.map((e, i) => {
|
@@ -6708,7 +6981,7 @@ function Widget({
|
|
6708
6981
|
}, undefined, false, undefined, this)
|
6709
6982
|
]
|
6710
6983
|
}, undefined, true, undefined, this),
|
6711
|
-
/* @__PURE__ */
|
6984
|
+
/* @__PURE__ */ jsxDEV24(Divider3, {
|
6712
6985
|
my: "md"
|
6713
6986
|
}, undefined, false, undefined, this),
|
6714
6987
|
alerts !== undefined && alerts.map((a, i) => {
|
@@ -6721,11 +6994,11 @@ function Widget({
|
|
6721
6994
|
}
|
6722
6995
|
return a;
|
6723
6996
|
}),
|
6724
|
-
loading ? /* @__PURE__ */
|
6725
|
-
children: /* @__PURE__ */
|
6997
|
+
loading ? /* @__PURE__ */ jsxDEV24(Center, {
|
6998
|
+
children: /* @__PURE__ */ jsxDEV24(Loader, {
|
6726
6999
|
...componentsProps?.loader
|
6727
7000
|
}, undefined, false, undefined, this)
|
6728
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
7001
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV24(Fragment5, {
|
6729
7002
|
children
|
6730
7003
|
}, undefined, false, undefined, this)
|
6731
7004
|
]
|
@@ -6734,7 +7007,7 @@ function Widget({
|
|
6734
7007
|
// src/core/components/NotFoundPage/index.tsx
|
6735
7008
|
import { Alert as Alert2 } from "@mantine/core";
|
6736
7009
|
import { usePathname as usePathname3 } from "next/navigation";
|
6737
|
-
import { jsxDEV as
|
7010
|
+
import { jsxDEV as jsxDEV25 } from "react/jsx-dev-runtime";
|
6738
7011
|
function NotFoundPage({
|
6739
7012
|
children,
|
6740
7013
|
message,
|
@@ -6742,11 +7015,11 @@ function NotFoundPage({
|
|
6742
7015
|
}) {
|
6743
7016
|
const pathname = usePathname3();
|
6744
7017
|
const theme = useRemoraidTheme();
|
6745
|
-
return /* @__PURE__ */
|
7018
|
+
return /* @__PURE__ */ jsxDEV25(Page, {
|
6746
7019
|
name: "Not Found",
|
6747
7020
|
...componentsProps?.page,
|
6748
7021
|
children: [
|
6749
|
-
/* @__PURE__ */
|
7022
|
+
/* @__PURE__ */ jsxDEV25(Alert2, {
|
6750
7023
|
...theme.alertProps.negative,
|
6751
7024
|
title: "404 - Page Not Found",
|
6752
7025
|
children: message ?? `Could not find page ${pathname}.`
|
@@ -6757,7 +7030,7 @@ function NotFoundPage({
|
|
6757
7030
|
}
|
6758
7031
|
// src/core/components/EnvironmentShell/index.tsx
|
6759
7032
|
import { Alert as Alert3 } from "@mantine/core";
|
6760
|
-
import { jsxDEV as
|
7033
|
+
import { jsxDEV as jsxDEV26, Fragment as Fragment6 } from "react/jsx-dev-runtime";
|
6761
7034
|
function EnvironmentShell({
|
6762
7035
|
children,
|
6763
7036
|
environment,
|
@@ -6771,7 +7044,7 @@ function EnvironmentShell({
|
|
6771
7044
|
const undefinedKeys = Object.keys(environment).filter((key) => environment[key] === undefined);
|
6772
7045
|
const alertTitle = `Please Specify Environment Variable${undefinedKeys.length > 1 ? "s" : ""}`;
|
6773
7046
|
const alertMessage = `Components could not be rendered because the following environment variables are not specified: ${undefinedKeys.join(", ")}.`;
|
6774
|
-
const alert = /* @__PURE__ */
|
7047
|
+
const alert = /* @__PURE__ */ jsxDEV26(Alert3, {
|
6775
7048
|
...theme.alertProps.neutral,
|
6776
7049
|
title: alertTitle,
|
6777
7050
|
m,
|
@@ -6779,12 +7052,12 @@ function EnvironmentShell({
|
|
6779
7052
|
children: message ?? alertMessage
|
6780
7053
|
}, undefined, false, undefined, this);
|
6781
7054
|
if (undefinedKeys.length === 0) {
|
6782
|
-
return /* @__PURE__ */
|
7055
|
+
return /* @__PURE__ */ jsxDEV26(Fragment6, {
|
6783
7056
|
children
|
6784
7057
|
}, undefined, false, undefined, this);
|
6785
7058
|
}
|
6786
7059
|
if (withContainer) {
|
6787
|
-
return /* @__PURE__ */
|
7060
|
+
return /* @__PURE__ */ jsxDEV26(PageContainer, {
|
6788
7061
|
componentsProps: { container: componentsProps?.container },
|
6789
7062
|
children: alert
|
6790
7063
|
}, undefined, false, undefined, this);
|
@@ -6792,26 +7065,27 @@ function EnvironmentShell({
|
|
6792
7065
|
return alert;
|
6793
7066
|
}
|
6794
7067
|
// src/core/components/SettingsWidget/index.tsx
|
6795
|
-
import { createContext as
|
7068
|
+
import { createContext as createContext6, useContext as useContext9 } from "react";
|
6796
7069
|
import { IconRestore } from "@tabler/icons-react";
|
6797
7070
|
|
6798
7071
|
// src/core/components/SettingsWidget/SaveButton/index.tsx
|
6799
7072
|
import { IconDeviceFloppy } from "@tabler/icons-react";
|
6800
7073
|
import { Group as Group5 } from "@mantine/core";
|
6801
|
-
import { jsxDEV as
|
7074
|
+
import { jsxDEV as jsxDEV27 } from "react/jsx-dev-runtime";
|
6802
7075
|
function SaveButton({
|
6803
7076
|
onSaveChanges,
|
6804
7077
|
insideContainer,
|
6805
7078
|
componentsProps
|
6806
7079
|
}) {
|
6807
7080
|
const settingsWidgetOptions = useSettingsWidgetContext();
|
6808
|
-
const button = /* @__PURE__ */
|
7081
|
+
const button = /* @__PURE__ */ jsxDEV27(RemoraidButton, {
|
6809
7082
|
label: "Save Changes",
|
6810
7083
|
icon: IconDeviceFloppy,
|
6811
7084
|
onClick: onSaveChanges,
|
6812
7085
|
responsive: false,
|
6813
7086
|
...componentsProps?.button,
|
6814
7087
|
componentsProps: {
|
7088
|
+
...componentsProps?.button?.componentsProps,
|
6815
7089
|
button: {
|
6816
7090
|
disabled: settingsWidgetOptions.unsavedChanges === false,
|
6817
7091
|
...componentsProps?.button?.componentsProps?.button
|
@@ -6819,7 +7093,7 @@ function SaveButton({
|
|
6819
7093
|
}
|
6820
7094
|
}, undefined, false, undefined, this);
|
6821
7095
|
if (insideContainer !== false) {
|
6822
|
-
return /* @__PURE__ */
|
7096
|
+
return /* @__PURE__ */ jsxDEV27(Group5, {
|
6823
7097
|
w: "100%",
|
6824
7098
|
justify: "flex-end",
|
6825
7099
|
mt: "md",
|
@@ -6831,11 +7105,11 @@ function SaveButton({
|
|
6831
7105
|
}
|
6832
7106
|
|
6833
7107
|
// src/core/components/SettingsWidget/index.tsx
|
6834
|
-
import { jsxDEV as
|
7108
|
+
import { jsxDEV as jsxDEV28 } from "react/jsx-dev-runtime";
|
6835
7109
|
var defaultSettingsWidgetContext = {};
|
6836
|
-
var settingsWidgetContext =
|
7110
|
+
var settingsWidgetContext = createContext6(defaultSettingsWidgetContext);
|
6837
7111
|
var useSettingsWidgetContext = () => {
|
6838
|
-
return
|
7112
|
+
return useContext9(settingsWidgetContext);
|
6839
7113
|
};
|
6840
7114
|
function SettingsWidget({
|
6841
7115
|
children,
|
@@ -6844,9 +7118,9 @@ function SettingsWidget({
|
|
6844
7118
|
custom,
|
6845
7119
|
widgetProps
|
6846
7120
|
}) {
|
6847
|
-
return /* @__PURE__ */
|
7121
|
+
return /* @__PURE__ */ jsxDEV28(settingsWidgetContext.Provider, {
|
6848
7122
|
value: { custom, unsavedChanges },
|
6849
|
-
children: /* @__PURE__ */
|
7123
|
+
children: /* @__PURE__ */ jsxDEV28(Widget, {
|
6850
7124
|
title: "Settings",
|
6851
7125
|
id: "settings",
|
6852
7126
|
mt: "md",
|
@@ -6856,7 +7130,8 @@ function SettingsWidget({
|
|
6856
7130
|
{
|
6857
7131
|
label: "Restore Default Values",
|
6858
7132
|
icon: IconRestore,
|
6859
|
-
onClick: onRestoreDefaultValues
|
7133
|
+
onClick: onRestoreDefaultValues,
|
7134
|
+
componentsProps: { button: { disabled: custom === false } }
|
6860
7135
|
}
|
6861
7136
|
] : [],
|
6862
7137
|
...widgetProps?.buttons ?? []
|
@@ -6881,27 +7156,27 @@ var SettingsWidget_default = Object.assign(SettingsWidget, {
|
|
6881
7156
|
SaveButton
|
6882
7157
|
});
|
6883
7158
|
// src/core/components/SettingsWidget/SettingsTable/index.tsx
|
6884
|
-
import { createContext as
|
7159
|
+
import { createContext as createContext7, useContext as useContext10 } from "react";
|
6885
7160
|
import { Table as Table2 } from "@mantine/core";
|
6886
7161
|
|
6887
7162
|
// src/core/components/SettingsWidget/SettingsTable/Row/index.tsx
|
6888
7163
|
import { Table, Text as Text2 } from "@mantine/core";
|
6889
|
-
import { jsxDEV as
|
7164
|
+
import { jsxDEV as jsxDEV29 } from "react/jsx-dev-runtime";
|
6890
7165
|
function Row({
|
6891
7166
|
children,
|
6892
7167
|
label
|
6893
7168
|
}) {
|
6894
7169
|
const options = useSettingsTableOptions();
|
6895
|
-
return /* @__PURE__ */
|
7170
|
+
return /* @__PURE__ */ jsxDEV29(Table.Tr, {
|
6896
7171
|
children: [
|
6897
|
-
/* @__PURE__ */
|
7172
|
+
/* @__PURE__ */ jsxDEV29(Table.Th, {
|
6898
7173
|
w: options.leftColumnWidth,
|
6899
|
-
children: /* @__PURE__ */
|
7174
|
+
children: /* @__PURE__ */ jsxDEV29(Text2, {
|
6900
7175
|
size: "sm",
|
6901
7176
|
children: label
|
6902
7177
|
}, undefined, false, undefined, this)
|
6903
7178
|
}, undefined, false, undefined, this),
|
6904
|
-
/* @__PURE__ */
|
7179
|
+
/* @__PURE__ */ jsxDEV29(Table.Td, {
|
6905
7180
|
py: "xs",
|
6906
7181
|
children
|
6907
7182
|
}, undefined, false, undefined, this)
|
@@ -6910,29 +7185,29 @@ function Row({
|
|
6910
7185
|
}
|
6911
7186
|
|
6912
7187
|
// src/core/components/SettingsWidget/SettingsTable/index.tsx
|
6913
|
-
import { jsxDEV as
|
7188
|
+
import { jsxDEV as jsxDEV30 } from "react/jsx-dev-runtime";
|
6914
7189
|
var defaultSettingsTableOptions = {
|
6915
7190
|
leftColumnWidth: "38.2%"
|
6916
7191
|
};
|
6917
|
-
var settingsTableOptionsContext =
|
7192
|
+
var settingsTableOptionsContext = createContext7(defaultSettingsTableOptions);
|
6918
7193
|
var useSettingsTableOptions = () => {
|
6919
|
-
return
|
7194
|
+
return useContext10(settingsTableOptionsContext);
|
6920
7195
|
};
|
6921
7196
|
function SettingsTable({
|
6922
7197
|
children,
|
6923
7198
|
leftColumnWidth
|
6924
7199
|
}) {
|
6925
7200
|
const theme = useRemoraidTheme();
|
6926
|
-
return /* @__PURE__ */
|
7201
|
+
return /* @__PURE__ */ jsxDEV30(settingsTableOptionsContext.Provider, {
|
6927
7202
|
value: {
|
6928
7203
|
leftColumnWidth: leftColumnWidth ?? defaultSettingsTableOptions.leftColumnWidth
|
6929
7204
|
},
|
6930
|
-
children: /* @__PURE__ */
|
7205
|
+
children: /* @__PURE__ */ jsxDEV30(Table2, {
|
6931
7206
|
bg: theme.transparentBackground,
|
6932
7207
|
withTableBorder: true,
|
6933
7208
|
variant: "vertical",
|
6934
7209
|
layout: "fixed",
|
6935
|
-
children: /* @__PURE__ */
|
7210
|
+
children: /* @__PURE__ */ jsxDEV30(Table2.Tbody, {
|
6936
7211
|
children
|
6937
7212
|
}, undefined, false, undefined, this)
|
6938
7213
|
}, undefined, false, undefined, this)
|
@@ -6944,9 +7219,9 @@ var SettingsTable_default = Object.assign(SettingsTable, {
|
|
6944
7219
|
// src/core/components/NavbarSettingsWidget/index.tsx
|
6945
7220
|
import { cloneElement } from "react";
|
6946
7221
|
var import_lodash = __toESM(require_lodash(), 1);
|
6947
|
-
import { Chip as
|
7222
|
+
import { Chip as Chip3, Group as Group6 } from "@mantine/core";
|
6948
7223
|
import { IconLink as IconLink2 } from "@tabler/icons-react";
|
6949
|
-
import { jsxDEV as
|
7224
|
+
import { jsxDEV as jsxDEV31 } from "react/jsx-dev-runtime";
|
6950
7225
|
var defaultNavbarSettingsWidgetId = "navbar-settings";
|
6951
7226
|
function NavbarSettingsWidget({
|
6952
7227
|
additionalRows,
|
@@ -6956,7 +7231,7 @@ function NavbarSettingsWidget({
|
|
6956
7231
|
const { userExperience, updateUserExperience, initialUserExperience } = useRemoraidUserExperience();
|
6957
7232
|
const app = useRemoraidApp();
|
6958
7233
|
const theme = useRemoraidTheme();
|
6959
|
-
return /* @__PURE__ */
|
7234
|
+
return /* @__PURE__ */ jsxDEV31(SettingsWidget_default, {
|
6960
7235
|
widgetProps: {
|
6961
7236
|
id: defaultNavbarSettingsWidgetId,
|
6962
7237
|
title: "Navbar Settings",
|
@@ -6965,32 +7240,32 @@ function NavbarSettingsWidget({
|
|
6965
7240
|
onRestoreDefaultValues: () => {
|
6966
7241
|
updateUserExperience((prev) => ({
|
6967
7242
|
...prev,
|
6968
|
-
|
7243
|
+
navbar: initialUserExperience.navbar
|
6969
7244
|
}));
|
6970
7245
|
},
|
6971
|
-
custom: !import_lodash.isEqual(userExperience.
|
6972
|
-
children: /* @__PURE__ */
|
7246
|
+
custom: !import_lodash.isEqual(userExperience.navbar, initialUserExperience.navbar),
|
7247
|
+
children: /* @__PURE__ */ jsxDEV31(SettingsTable_default, {
|
6973
7248
|
children: [
|
6974
|
-
/* @__PURE__ */
|
7249
|
+
/* @__PURE__ */ jsxDEV31(SettingsTable_default.Row, {
|
6975
7250
|
label: "Select which pages you want to display or hide",
|
6976
|
-
children: /* @__PURE__ */
|
7251
|
+
children: /* @__PURE__ */ jsxDEV31(Chip3.Group, {
|
6977
7252
|
multiple: true,
|
6978
|
-
value: app.navigablePages.filter((p) => !userExperience.
|
7253
|
+
value: app.navigablePages.filter((p) => !userExperience.navbar.hiddenPages.includes(p.href)).map((p) => p.href),
|
6979
7254
|
onChange: (newValue) => {
|
6980
7255
|
updateUserExperience((prev) => ({
|
6981
7256
|
...prev,
|
6982
|
-
|
6983
|
-
...prev.
|
7257
|
+
navbar: {
|
7258
|
+
...prev.navbar,
|
6984
7259
|
hiddenPages: app.navigablePages.filter((p) => !newValue.includes(p.href)).map((p) => p.href)
|
6985
7260
|
}
|
6986
7261
|
}));
|
6987
7262
|
},
|
6988
|
-
children: /* @__PURE__ */
|
7263
|
+
children: /* @__PURE__ */ jsxDEV31(Group6, {
|
6989
7264
|
justify: "flex-start",
|
6990
7265
|
gap: "xs",
|
6991
|
-
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, {
|
6992
7267
|
value: p.href,
|
6993
|
-
icon: /* @__PURE__ */
|
7268
|
+
icon: /* @__PURE__ */ jsxDEV31(p.icon, {
|
6994
7269
|
...theme.iconProps.tiny,
|
6995
7270
|
color: theme.primaryColor
|
6996
7271
|
}, undefined, false, undefined, this),
|
@@ -7013,12 +7288,20 @@ export {
|
|
7013
7288
|
useRemoraidUserExperience,
|
7014
7289
|
useRemoraidTheme,
|
7015
7290
|
useRemoraidApp,
|
7291
|
+
usePage,
|
7292
|
+
useLayouts,
|
7293
|
+
useHydrationStatus,
|
7294
|
+
useHydratedMantineColorScheme,
|
7295
|
+
useFrameLayout,
|
7296
|
+
isFrameLayout,
|
7016
7297
|
defaultUserExperienceCookieName,
|
7017
7298
|
defaultUserExperience,
|
7018
7299
|
defaultSettingsWidgetContext as defaultSettingsWidgetOptions,
|
7019
7300
|
defaultSettingsTableOptions,
|
7020
7301
|
defaultNavbarSettingsWidgetId,
|
7021
|
-
|
7302
|
+
defaultLayoutsContext,
|
7303
|
+
defaultFrameLayoutContext,
|
7304
|
+
defaultAppShellLayoutId,
|
7022
7305
|
defaultAppContext,
|
7023
7306
|
createUserExperienceContext,
|
7024
7307
|
createRemoraidTheme,
|
@@ -7029,6 +7312,7 @@ export {
|
|
7029
7312
|
TransitionDuration,
|
7030
7313
|
SettingsWidget_default as SettingsWidget,
|
7031
7314
|
SettingsTable_default as SettingsTable,
|
7315
|
+
ScrollableChipGroup,
|
7032
7316
|
RemoraidProvider,
|
7033
7317
|
RemoraidIconSize,
|
7034
7318
|
RemoraidButton,
|
@@ -7038,10 +7322,16 @@ export {
|
|
7038
7322
|
NotFoundPage,
|
7039
7323
|
NavbarVariant,
|
7040
7324
|
NavbarSettingsWidget,
|
7325
|
+
LayoutType,
|
7326
|
+
HydrationStatusProvider,
|
7327
|
+
FrameLayoutVariant,
|
7328
|
+
FrameLayoutSection,
|
7329
|
+
FrameLayout_default as FrameLayout,
|
7330
|
+
FooterVariant,
|
7041
7331
|
EnvironmentShell,
|
7042
7332
|
BadgeMinimal,
|
7043
7333
|
BadgeGroup,
|
7044
|
-
AppShell,
|
7334
|
+
AppShell_default as AppShell,
|
7045
7335
|
AppProvider,
|
7046
7336
|
AlertMinimal,
|
7047
7337
|
AlertCategory
|