remoraid 2.0.0 → 2.2.1
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 +191 -108
- package/dist/core/index.d.ts +74 -44
- package/dist/core/index.js +191 -106
- package/dist/jsonforms/index.cjs +66 -155
- package/dist/jsonforms/index.d.ts +1 -1
- package/dist/jsonforms/index.js +48 -149
- package/dist/modals/index.cjs +63 -0
- package/dist/modals/index.d.ts +15 -0
- package/dist/modals/index.js +31 -0
- package/dist/server/index.cjs +31 -31
- package/dist/server/index.d.ts +11 -7
- package/dist/server/index.js +31 -31
- package/package.json +7 -1
package/dist/core/index.js
CHANGED
@@ -31,6 +31,15 @@ import { useState } from "react";
|
|
31
31
|
|
32
32
|
// src/core/lib/utils.ts
|
33
33
|
var co = (condition, value, fallback) => condition(value) ? value : fallback;
|
34
|
+
var isRemoraidButtonProps = (e) => {
|
35
|
+
if (typeof e !== "object") {
|
36
|
+
return false;
|
37
|
+
}
|
38
|
+
if (!("label" in e)) {
|
39
|
+
return false;
|
40
|
+
}
|
41
|
+
return true;
|
42
|
+
};
|
34
43
|
|
35
44
|
// src/core/components/RemoraidProvider/ThemeProvider/index.tsx
|
36
45
|
import {
|
@@ -118,6 +127,7 @@ var createRemoraidTheme = (customTheme, mantineTheme, colorScheme) => {
|
|
118
127
|
medium: defaultMediumIconProps,
|
119
128
|
tiny: { size: 14, stroke: 3 }
|
120
129
|
},
|
130
|
+
jsonStringifySpace: 2,
|
121
131
|
transparentBackground,
|
122
132
|
primaryColor,
|
123
133
|
spacingPx,
|
@@ -675,13 +685,31 @@ import {
|
|
675
685
|
} from "@mantine/core";
|
676
686
|
|
677
687
|
// src/core/components/Page/index.tsx
|
678
|
-
import { Container } from "@mantine/core";
|
679
688
|
import React5, {
|
680
689
|
useContext as useContext4,
|
681
690
|
useEffect as useEffect2
|
682
691
|
} from "react";
|
683
692
|
import { usePathname as usePathname2 } from "next/navigation";
|
693
|
+
|
694
|
+
// src/core/components/Page/PageContainer/index.tsx
|
695
|
+
import { Container } from "@mantine/core";
|
684
696
|
import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
|
697
|
+
function PageContainer({
|
698
|
+
children,
|
699
|
+
pt,
|
700
|
+
componentsProps
|
701
|
+
}) {
|
702
|
+
const theme = useRemoraidTheme();
|
703
|
+
return /* @__PURE__ */ jsxDEV8(Container, {
|
704
|
+
size: theme.containerSize,
|
705
|
+
pt: pt ?? "md",
|
706
|
+
...componentsProps?.container,
|
707
|
+
children
|
708
|
+
}, undefined, false, undefined, this);
|
709
|
+
}
|
710
|
+
|
711
|
+
// src/core/components/Page/index.tsx
|
712
|
+
import { jsxDEV as jsxDEV9 } from "react/jsx-dev-runtime";
|
685
713
|
var pageContext = React5.createContext(null);
|
686
714
|
var usePage = () => {
|
687
715
|
return useContext4(pageContext);
|
@@ -695,7 +723,6 @@ function Page({
|
|
695
723
|
}) {
|
696
724
|
const pathname = usePathname2();
|
697
725
|
const { isPageRegistered, registerPage } = useWidgets();
|
698
|
-
const theme = useRemoraidTheme();
|
699
726
|
const pageId = config?.pageId ?? pathname;
|
700
727
|
useEffect2(() => {
|
701
728
|
if (!isPageRegistered(pageId)) {
|
@@ -704,12 +731,11 @@ function Page({
|
|
704
731
|
}
|
705
732
|
}
|
706
733
|
}, []);
|
707
|
-
return /* @__PURE__ */
|
734
|
+
return /* @__PURE__ */ jsxDEV9(pageContext.Provider, {
|
708
735
|
value: { name: name ?? pathname, pageId, ...config },
|
709
|
-
children: /* @__PURE__ */
|
710
|
-
|
711
|
-
|
712
|
-
...componentsProps?.container,
|
736
|
+
children: /* @__PURE__ */ jsxDEV9(PageContainer, {
|
737
|
+
pt,
|
738
|
+
componentsProps: { container: componentsProps?.container },
|
713
739
|
children
|
714
740
|
}, undefined, false, undefined, this)
|
715
741
|
}, undefined, false, undefined, this);
|
@@ -717,7 +743,7 @@ function Page({
|
|
717
743
|
|
718
744
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
719
745
|
import { IconCheck } from "@tabler/icons-react";
|
720
|
-
import { jsxDEV as
|
746
|
+
import { jsxDEV as jsxDEV10 } from "react/jsx-dev-runtime";
|
721
747
|
function WidgetSelectionHeader({
|
722
748
|
title,
|
723
749
|
disabledWidgets,
|
@@ -730,39 +756,39 @@ function WidgetSelectionHeader({
|
|
730
756
|
console.error("'WidgetSelectionHeader' must be rendered inside of a 'Page' component.");
|
731
757
|
return null;
|
732
758
|
}
|
733
|
-
return /* @__PURE__ */
|
759
|
+
return /* @__PURE__ */ jsxDEV10(Flex2, {
|
734
760
|
justify: "flex-start",
|
735
761
|
align: "center",
|
736
762
|
gap: "xs",
|
737
763
|
mt,
|
738
764
|
children: [
|
739
|
-
/* @__PURE__ */
|
765
|
+
/* @__PURE__ */ jsxDEV10(Text, {
|
740
766
|
size: "lg",
|
741
767
|
fw: 400,
|
742
768
|
children: title ?? page.name
|
743
769
|
}, undefined, false, undefined, this),
|
744
|
-
/* @__PURE__ */
|
770
|
+
/* @__PURE__ */ jsxDEV10(Divider2, {
|
745
771
|
orientation: "vertical"
|
746
772
|
}, undefined, false, undefined, this),
|
747
|
-
isPageRegistered(page.pageId) && /* @__PURE__ */
|
773
|
+
isPageRegistered(page.pageId) && /* @__PURE__ */ jsxDEV10(ScrollArea, {
|
748
774
|
flex: 1,
|
749
775
|
...theme.scrollAreaProps,
|
750
|
-
children: /* @__PURE__ */
|
776
|
+
children: /* @__PURE__ */ jsxDEV10(Chip.Group, {
|
751
777
|
multiple: true,
|
752
778
|
value: Object.keys(widgets[page.pageId]).filter((widgetId) => widgets[page.pageId][widgetId].selected),
|
753
779
|
onChange: (value) => {
|
754
780
|
updateWidgetSelectionBulk(page.pageId, value);
|
755
781
|
},
|
756
|
-
children: /* @__PURE__ */
|
782
|
+
children: /* @__PURE__ */ jsxDEV10(Flex2, {
|
757
783
|
justify: "flex-start",
|
758
784
|
align: "center",
|
759
785
|
gap: "xs",
|
760
786
|
h: "auto",
|
761
|
-
children: Object.keys(widgets[page.pageId]).map((widgetId) => /* @__PURE__ */
|
787
|
+
children: Object.keys(widgets[page.pageId]).map((widgetId) => /* @__PURE__ */ jsxDEV10(Chip, {
|
762
788
|
value: widgetId,
|
763
789
|
size: "sm",
|
764
790
|
disabled: disabledWidgets && disabledWidgets.includes(widgetId),
|
765
|
-
icon: /* @__PURE__ */
|
791
|
+
icon: /* @__PURE__ */ jsxDEV10(IconCheck, {
|
766
792
|
...theme.iconProps.tiny
|
767
793
|
}, undefined, false, undefined, this),
|
768
794
|
children: widgets[page.pageId][widgetId].name
|
@@ -773,20 +799,20 @@ function WidgetSelectionHeader({
|
|
773
799
|
]
|
774
800
|
}, undefined, true, undefined, this);
|
775
801
|
}
|
776
|
-
// src/core/components/CloseButton/index.tsx
|
802
|
+
// src/core/components/Widget/WidgetWrapper/CloseButton/index.tsx
|
777
803
|
import { ActionIcon, Transition } from "@mantine/core";
|
778
804
|
import { IconX } from "@tabler/icons-react";
|
779
|
-
import { jsxDEV as
|
805
|
+
import { jsxDEV as jsxDEV11 } from "react/jsx-dev-runtime";
|
780
806
|
function CloseButton({ widgetId }) {
|
781
807
|
const theme = useRemoraidTheme();
|
782
808
|
const { activeWidget, updateWidgetSelection } = useWidgets();
|
783
809
|
const page = usePage();
|
784
|
-
return /* @__PURE__ */
|
810
|
+
return /* @__PURE__ */ jsxDEV11(Transition, {
|
785
811
|
mounted: activeWidget === widgetId,
|
786
812
|
transition: "pop-top-right",
|
787
813
|
duration: theme.transitionDurations.short,
|
788
814
|
timingFunction: "ease",
|
789
|
-
children: (transitionStyle) => /* @__PURE__ */
|
815
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV11(ActionIcon, {
|
790
816
|
pos: "absolute",
|
791
817
|
size: "xs",
|
792
818
|
className: "remoraid-close-button",
|
@@ -799,7 +825,7 @@ function CloseButton({ widgetId }) {
|
|
799
825
|
updateWidgetSelection(page.pageId, widgetId, false);
|
800
826
|
},
|
801
827
|
style: transitionStyle,
|
802
|
-
children: /* @__PURE__ */
|
828
|
+
children: /* @__PURE__ */ jsxDEV11(IconX, {
|
803
829
|
...theme.iconProps.tiny
|
804
830
|
}, undefined, false, undefined, this)
|
805
831
|
}, undefined, false, undefined, this)
|
@@ -819,7 +845,7 @@ import {
|
|
819
845
|
Tooltip as Tooltip2,
|
820
846
|
Transition as Transition2
|
821
847
|
} from "@mantine/core";
|
822
|
-
import { jsxDEV as
|
848
|
+
import { jsxDEV as jsxDEV12 } from "react/jsx-dev-runtime";
|
823
849
|
var isBadgeMinimalProps = (e) => {
|
824
850
|
if (typeof e !== "object") {
|
825
851
|
return false;
|
@@ -832,17 +858,17 @@ var isBadgeMinimalProps = (e) => {
|
|
832
858
|
function BadgeMinimal(props) {
|
833
859
|
const { label, tooltip, mounted, componentsProps } = props;
|
834
860
|
const theme = useRemoraidTheme();
|
835
|
-
return /* @__PURE__ */
|
861
|
+
return /* @__PURE__ */ jsxDEV12(Transition2, {
|
836
862
|
mounted: mounted !== false,
|
837
863
|
transition: "fade",
|
838
864
|
duration: theme.transitionDurations.short,
|
839
865
|
timingFunction: "ease",
|
840
866
|
...componentsProps?.transition,
|
841
|
-
children: (transitionStyle) => /* @__PURE__ */
|
867
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV12(Tooltip2, {
|
842
868
|
disabled: !tooltip,
|
843
869
|
label: tooltip,
|
844
870
|
...componentsProps?.tooltip,
|
845
|
-
children: /* @__PURE__ */
|
871
|
+
children: /* @__PURE__ */ jsxDEV12(Badge, {
|
846
872
|
variant: "default",
|
847
873
|
...componentsProps?.badge,
|
848
874
|
style: {
|
@@ -857,7 +883,7 @@ function BadgeMinimal(props) {
|
|
857
883
|
}
|
858
884
|
|
859
885
|
// src/core/components/BadgeGroup/index.tsx
|
860
|
-
import { jsxDEV as
|
886
|
+
import { jsxDEV as jsxDEV13, Fragment as Fragment2 } from "react/jsx-dev-runtime";
|
861
887
|
import { createElement } from "react";
|
862
888
|
function BadgeGroup({
|
863
889
|
badges,
|
@@ -867,9 +893,9 @@ function BadgeGroup({
|
|
867
893
|
}) {
|
868
894
|
const theme = useRemoraidTheme();
|
869
895
|
const numVisibleBadges = badges.filter((e) => isBadgeMinimalProps(e) ? e.mounted !== false : true).length;
|
870
|
-
return /* @__PURE__ */
|
896
|
+
return /* @__PURE__ */ jsxDEV13(Fragment2, {
|
871
897
|
children: [
|
872
|
-
/* @__PURE__ */
|
898
|
+
/* @__PURE__ */ jsxDEV13(Group3, {
|
873
899
|
gap: gap ?? "xs",
|
874
900
|
wrap: "nowrap",
|
875
901
|
visibleFrom: breakpoint ?? theme.breakpoints.badgeGroupCollapse,
|
@@ -883,10 +909,10 @@ function BadgeGroup({
|
|
883
909
|
return e;
|
884
910
|
})
|
885
911
|
}, undefined, false, undefined, this),
|
886
|
-
/* @__PURE__ */
|
912
|
+
/* @__PURE__ */ jsxDEV13(Tooltip3, {
|
887
913
|
label: `${numVisibleBadges} badge${numVisibleBadges === 1 ? "" : "s"}`,
|
888
914
|
...componentsProps?.tooltip,
|
889
|
-
children: /* @__PURE__ */
|
915
|
+
children: /* @__PURE__ */ jsxDEV13(Badge2, {
|
890
916
|
hiddenFrom: breakpoint ?? theme.breakpoints.badgeGroupCollapse,
|
891
917
|
hidden: numVisibleBadges === 0,
|
892
918
|
variant: "light",
|
@@ -904,7 +930,7 @@ import {
|
|
904
930
|
Alert,
|
905
931
|
Transition as Transition3
|
906
932
|
} from "@mantine/core";
|
907
|
-
import { jsxDEV as
|
933
|
+
import { jsxDEV as jsxDEV14 } from "react/jsx-dev-runtime";
|
908
934
|
var isAlertMinimalProps = (e) => {
|
909
935
|
if (typeof e !== "object") {
|
910
936
|
return false;
|
@@ -926,13 +952,13 @@ function AlertMinimal({
|
|
926
952
|
componentsProps
|
927
953
|
}) {
|
928
954
|
const theme = useRemoraidTheme();
|
929
|
-
return /* @__PURE__ */
|
955
|
+
return /* @__PURE__ */ jsxDEV14(Transition3, {
|
930
956
|
mounted: mounted !== false,
|
931
957
|
transition: "fade",
|
932
958
|
duration: theme.transitionDurations.short,
|
933
959
|
timingFunction: "ease",
|
934
960
|
...componentsProps?.transition,
|
935
|
-
children: (transitionStyle) => /* @__PURE__ */
|
961
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV14(Alert, {
|
936
962
|
...theme.alertProps[category],
|
937
963
|
title: title ?? theme.alertProps[category].title,
|
938
964
|
withCloseButton: onClose !== undefined,
|
@@ -952,52 +978,101 @@ function AlertMinimal({
|
|
952
978
|
}, undefined, false, undefined, this);
|
953
979
|
}
|
954
980
|
// src/core/components/ResponsiveButton/index.tsx
|
981
|
+
import {
|
982
|
+
Box
|
983
|
+
} from "@mantine/core";
|
984
|
+
|
985
|
+
// src/core/components/Button/index.tsx
|
955
986
|
import {
|
956
987
|
ActionIcon as ActionIcon2,
|
957
|
-
|
958
|
-
|
988
|
+
Tooltip as Tooltip4,
|
989
|
+
Button as MantineButton
|
959
990
|
} from "@mantine/core";
|
960
991
|
import { IconClick } from "@tabler/icons-react";
|
961
|
-
import { jsxDEV as
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
}
|
971
|
-
function ResponsiveButton(props) {
|
972
|
-
const { onClick, label, loading, variant, componentsProps, breakpoint } = props;
|
992
|
+
import { jsxDEV as jsxDEV15 } from "react/jsx-dev-runtime";
|
993
|
+
function Button({
|
994
|
+
label,
|
995
|
+
collapsed,
|
996
|
+
componentsProps,
|
997
|
+
onClick,
|
998
|
+
loading,
|
999
|
+
variant,
|
1000
|
+
...props
|
1001
|
+
}) {
|
973
1002
|
const theme = useRemoraidTheme();
|
974
|
-
const
|
975
|
-
|
976
|
-
|
977
|
-
|
1003
|
+
const iconProps = { ...theme.iconProps.medium, ...componentsProps?.icon };
|
1004
|
+
const icon = props.icon ? /* @__PURE__ */ jsxDEV15(props.icon, {
|
1005
|
+
...iconProps
|
1006
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV15(IconClick, {
|
1007
|
+
...iconProps
|
978
1008
|
}, undefined, false, undefined, this);
|
979
|
-
|
1009
|
+
if (collapsed === true) {
|
1010
|
+
return /* @__PURE__ */ jsxDEV15(Tooltip4, {
|
1011
|
+
label,
|
1012
|
+
...componentsProps?.tooltip,
|
1013
|
+
children: /* @__PURE__ */ jsxDEV15(ActionIcon2, {
|
1014
|
+
variant: variant ?? "default",
|
1015
|
+
onClick,
|
1016
|
+
loading,
|
1017
|
+
size: "input-sm",
|
1018
|
+
"aria-label": "Refresh",
|
1019
|
+
...componentsProps?.actionIcon,
|
1020
|
+
children: icon
|
1021
|
+
}, undefined, false, undefined, this)
|
1022
|
+
}, undefined, false, undefined, this);
|
1023
|
+
}
|
1024
|
+
return /* @__PURE__ */ jsxDEV15(MantineButton, {
|
1025
|
+
onClick,
|
1026
|
+
loading,
|
1027
|
+
variant: variant ?? "default",
|
1028
|
+
leftSection: props.icon ? icon : undefined,
|
1029
|
+
...componentsProps?.button,
|
1030
|
+
children: label
|
1031
|
+
}, undefined, false, undefined, this);
|
1032
|
+
}
|
1033
|
+
|
1034
|
+
// src/core/components/ResponsiveButton/index.tsx
|
1035
|
+
import { jsxDEV as jsxDEV16, Fragment as Fragment3 } from "react/jsx-dev-runtime";
|
1036
|
+
function ResponsiveButton({
|
1037
|
+
breakpoint,
|
1038
|
+
componentsProps,
|
1039
|
+
...remoraidButtonProps
|
1040
|
+
}) {
|
1041
|
+
return /* @__PURE__ */ jsxDEV16(Fragment3, {
|
980
1042
|
children: [
|
981
|
-
/* @__PURE__ */
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
1043
|
+
/* @__PURE__ */ jsxDEV16(Box, {
|
1044
|
+
hiddenFrom: breakpoint ?? "md",
|
1045
|
+
children: /* @__PURE__ */ jsxDEV16(Button, {
|
1046
|
+
...remoraidButtonProps,
|
1047
|
+
...componentsProps?.Button,
|
1048
|
+
componentsProps: {
|
1049
|
+
tooltip: componentsProps?.tooltip,
|
1050
|
+
icon: componentsProps?.icon,
|
1051
|
+
...componentsProps?.Button?.componentsProps,
|
1052
|
+
actionIcon: {
|
1053
|
+
...componentsProps?.button,
|
1054
|
+
...componentsProps?.Button?.componentsProps?.actionIcon
|
1055
|
+
}
|
1056
|
+
},
|
1057
|
+
collapsed: true
|
992
1058
|
}, undefined, false, undefined, this)
|
993
1059
|
}, undefined, false, undefined, this),
|
994
|
-
/* @__PURE__ */
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1060
|
+
/* @__PURE__ */ jsxDEV16(Box, {
|
1061
|
+
visibleFrom: breakpoint ?? "md",
|
1062
|
+
children: /* @__PURE__ */ jsxDEV16(Button, {
|
1063
|
+
...remoraidButtonProps,
|
1064
|
+
...componentsProps?.Button,
|
1065
|
+
componentsProps: {
|
1066
|
+
tooltip: componentsProps?.tooltip,
|
1067
|
+
icon: componentsProps?.icon,
|
1068
|
+
...componentsProps?.Button?.componentsProps,
|
1069
|
+
button: {
|
1070
|
+
...componentsProps?.button,
|
1071
|
+
...componentsProps?.Button?.componentsProps?.button
|
1072
|
+
}
|
1073
|
+
},
|
1074
|
+
collapsed: false
|
1075
|
+
}, undefined, false, undefined, this)
|
1001
1076
|
}, undefined, false, undefined, this)
|
1002
1077
|
]
|
1003
1078
|
}, undefined, true, undefined, this);
|
@@ -1008,7 +1083,7 @@ import {
|
|
1008
1083
|
Transition as Transition4
|
1009
1084
|
} from "@mantine/core";
|
1010
1085
|
import { useEffect as useEffect3 } from "react";
|
1011
|
-
import { jsxDEV as
|
1086
|
+
import { jsxDEV as jsxDEV17 } from "react/jsx-dev-runtime";
|
1012
1087
|
function WidgetWrapper({
|
1013
1088
|
children,
|
1014
1089
|
config,
|
@@ -1034,12 +1109,12 @@ function WidgetWrapper({
|
|
1034
1109
|
registerWidget(page.pageId, config);
|
1035
1110
|
}
|
1036
1111
|
}, [pageRegistered]);
|
1037
|
-
return /* @__PURE__ */
|
1112
|
+
return /* @__PURE__ */ jsxDEV17(Transition4, {
|
1038
1113
|
mounted: page !== null && isWidgetSelected(page.pageId, config.widgetId),
|
1039
1114
|
transition: "fade-left",
|
1040
1115
|
duration: theme.transitionDurations.medium,
|
1041
1116
|
timingFunction: "ease",
|
1042
|
-
children: (transitionStyle) => /* @__PURE__ */
|
1117
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV17(Paper3, {
|
1043
1118
|
p: "md",
|
1044
1119
|
shadow: "md",
|
1045
1120
|
bg: theme.transparentBackground,
|
@@ -1055,7 +1130,7 @@ function WidgetWrapper({
|
|
1055
1130
|
updateActiveWidget(null);
|
1056
1131
|
},
|
1057
1132
|
children: [
|
1058
|
-
withCloseButton !== false && /* @__PURE__ */
|
1133
|
+
withCloseButton !== false && /* @__PURE__ */ jsxDEV17(CloseButton, {
|
1059
1134
|
widgetId: config.widgetId
|
1060
1135
|
}, undefined, false, undefined, this),
|
1061
1136
|
children
|
@@ -1071,7 +1146,7 @@ import {
|
|
1071
1146
|
Loader,
|
1072
1147
|
Title
|
1073
1148
|
} from "@mantine/core";
|
1074
|
-
import { jsxDEV as
|
1149
|
+
import { jsxDEV as jsxDEV18, Fragment as Fragment4 } from "react/jsx-dev-runtime";
|
1075
1150
|
import { createElement as createElement2 } from "react";
|
1076
1151
|
function Widget({
|
1077
1152
|
children,
|
@@ -1089,7 +1164,7 @@ function Widget({
|
|
1089
1164
|
const badgesGap = (typeof gaps === "object" ? gaps.badges : gaps) ?? "xs";
|
1090
1165
|
const buttonsGap = (typeof gaps === "object" ? gaps.buttons : gaps) ?? "xs";
|
1091
1166
|
const alertsGap = (typeof gaps === "object" ? gaps.alerts : gaps) ?? "xs";
|
1092
|
-
return /* @__PURE__ */
|
1167
|
+
return /* @__PURE__ */ jsxDEV18(WidgetWrapper, {
|
1093
1168
|
config: {
|
1094
1169
|
widgetId: id,
|
1095
1170
|
name: title,
|
@@ -1102,32 +1177,32 @@ function Widget({
|
|
1102
1177
|
},
|
1103
1178
|
...componentsProps?.wrapper,
|
1104
1179
|
children: [
|
1105
|
-
/* @__PURE__ */
|
1180
|
+
/* @__PURE__ */ jsxDEV18(Group4, {
|
1106
1181
|
justify: "space-between",
|
1107
1182
|
wrap: "nowrap",
|
1108
1183
|
children: [
|
1109
|
-
/* @__PURE__ */
|
1184
|
+
/* @__PURE__ */ jsxDEV18(Group4, {
|
1110
1185
|
gap: badgesGap,
|
1111
1186
|
wrap: "nowrap",
|
1112
1187
|
children: [
|
1113
|
-
/* @__PURE__ */
|
1188
|
+
/* @__PURE__ */ jsxDEV18(Title, {
|
1114
1189
|
order: 1,
|
1115
1190
|
size: "h3",
|
1116
1191
|
lineClamp: 1,
|
1117
1192
|
children: title
|
1118
1193
|
}, undefined, false, undefined, this),
|
1119
|
-
badges !== undefined && /* @__PURE__ */
|
1194
|
+
badges !== undefined && /* @__PURE__ */ jsxDEV18(BadgeGroup, {
|
1120
1195
|
badges,
|
1121
1196
|
gap: badgesGap,
|
1122
1197
|
...componentsProps?.badgeGroup
|
1123
1198
|
}, undefined, false, undefined, this)
|
1124
1199
|
]
|
1125
1200
|
}, undefined, true, undefined, this),
|
1126
|
-
/* @__PURE__ */
|
1201
|
+
/* @__PURE__ */ jsxDEV18(Group4, {
|
1127
1202
|
gap: buttonsGap,
|
1128
1203
|
wrap: "nowrap",
|
1129
1204
|
children: buttons !== undefined && buttons.map((e, i) => {
|
1130
|
-
if (
|
1205
|
+
if (isRemoraidButtonProps(e)) {
|
1131
1206
|
return /* @__PURE__ */ createElement2(ResponsiveButton, {
|
1132
1207
|
...e,
|
1133
1208
|
key: i
|
@@ -1138,7 +1213,7 @@ function Widget({
|
|
1138
1213
|
}, undefined, false, undefined, this)
|
1139
1214
|
]
|
1140
1215
|
}, undefined, true, undefined, this),
|
1141
|
-
/* @__PURE__ */
|
1216
|
+
/* @__PURE__ */ jsxDEV18(Divider3, {
|
1142
1217
|
my: "md"
|
1143
1218
|
}, undefined, false, undefined, this),
|
1144
1219
|
alerts !== undefined && alerts.map((a, i) => {
|
@@ -1151,11 +1226,11 @@ function Widget({
|
|
1151
1226
|
}
|
1152
1227
|
return a;
|
1153
1228
|
}),
|
1154
|
-
loading ? /* @__PURE__ */
|
1155
|
-
children: /* @__PURE__ */
|
1229
|
+
loading ? /* @__PURE__ */ jsxDEV18(Center, {
|
1230
|
+
children: /* @__PURE__ */ jsxDEV18(Loader, {
|
1156
1231
|
...componentsProps?.loader
|
1157
1232
|
}, undefined, false, undefined, this)
|
1158
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
1233
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV18(Fragment4, {
|
1159
1234
|
children
|
1160
1235
|
}, undefined, false, undefined, this)
|
1161
1236
|
]
|
@@ -1164,7 +1239,7 @@ function Widget({
|
|
1164
1239
|
// src/core/components/Page/NotFoundPage/index.tsx
|
1165
1240
|
import { Alert as Alert2 } from "@mantine/core";
|
1166
1241
|
import { usePathname as usePathname3 } from "next/navigation";
|
1167
|
-
import { jsxDEV as
|
1242
|
+
import { jsxDEV as jsxDEV19 } from "react/jsx-dev-runtime";
|
1168
1243
|
function NotFoundPage({
|
1169
1244
|
children,
|
1170
1245
|
message,
|
@@ -1172,11 +1247,11 @@ function NotFoundPage({
|
|
1172
1247
|
}) {
|
1173
1248
|
const pathname = usePathname3();
|
1174
1249
|
const theme = useRemoraidTheme();
|
1175
|
-
return /* @__PURE__ */
|
1250
|
+
return /* @__PURE__ */ jsxDEV19(Page, {
|
1176
1251
|
name: "Not Found",
|
1177
1252
|
...componentsProps?.page,
|
1178
1253
|
children: [
|
1179
|
-
/* @__PURE__ */
|
1254
|
+
/* @__PURE__ */ jsxDEV19(Alert2, {
|
1180
1255
|
...theme.alertProps.negative,
|
1181
1256
|
title: "404 - Page Not Found",
|
1182
1257
|
children: message ?? `Could not find page ${pathname}.`
|
@@ -1187,31 +1262,39 @@ function NotFoundPage({
|
|
1187
1262
|
}
|
1188
1263
|
// src/core/components/EnvironmentShell/index.tsx
|
1189
1264
|
import { Alert as Alert3 } from "@mantine/core";
|
1190
|
-
import { jsxDEV as
|
1265
|
+
import { jsxDEV as jsxDEV20, Fragment as Fragment5 } from "react/jsx-dev-runtime";
|
1191
1266
|
function EnvironmentShell({
|
1192
1267
|
children,
|
1193
|
-
|
1268
|
+
environment,
|
1194
1269
|
message,
|
1195
1270
|
m,
|
1196
|
-
mt
|
1271
|
+
mt,
|
1272
|
+
withContainer,
|
1273
|
+
componentsProps
|
1197
1274
|
}) {
|
1198
1275
|
const theme = useRemoraidTheme();
|
1199
|
-
const
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1276
|
+
const undefinedKeys = Object.keys(environment).filter((key) => environment[key] === undefined);
|
1277
|
+
const alertTitle = `Please Specify Environment Variable${undefinedKeys.length > 1 ? "s" : ""}`;
|
1278
|
+
const alertMessage = `Components could not be rendered because the following environment variables are not specified: ${undefinedKeys.join(", ")}.`;
|
1279
|
+
const alert = /* @__PURE__ */ jsxDEV20(Alert3, {
|
1280
|
+
...theme.alertProps.neutral,
|
1281
|
+
title: alertTitle,
|
1282
|
+
m,
|
1283
|
+
mt,
|
1284
|
+
children: message ?? alertMessage
|
1285
|
+
}, undefined, false, undefined, this);
|
1286
|
+
if (undefinedKeys.length === 0) {
|
1287
|
+
return /* @__PURE__ */ jsxDEV20(Fragment5, {
|
1288
|
+
children
|
1210
1289
|
}, undefined, false, undefined, this);
|
1211
1290
|
}
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1291
|
+
if (withContainer) {
|
1292
|
+
return /* @__PURE__ */ jsxDEV20(PageContainer, {
|
1293
|
+
componentsProps: { container: componentsProps?.container },
|
1294
|
+
children: alert
|
1295
|
+
}, undefined, false, undefined, this);
|
1296
|
+
}
|
1297
|
+
return alert;
|
1215
1298
|
}
|
1216
1299
|
export {
|
1217
1300
|
userExperienceCookieName,
|
@@ -1226,10 +1309,12 @@ export {
|
|
1226
1309
|
Widget,
|
1227
1310
|
ResponsiveButton,
|
1228
1311
|
RemoraidProvider,
|
1312
|
+
PageContainer,
|
1229
1313
|
Page,
|
1230
1314
|
NotFoundPage,
|
1231
1315
|
EnvironmentShell,
|
1232
1316
|
CloseButton,
|
1317
|
+
Button,
|
1233
1318
|
BadgeMinimal,
|
1234
1319
|
BadgeGroup,
|
1235
1320
|
AppShell,
|