remoraid 2.2.1 → 2.2.6
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 +72 -108
- package/dist/core/index.d.ts +48 -59
- package/dist/core/index.js +71 -109
- package/dist/server/index.d.ts +5 -5
- package/package.json +1 -1
package/dist/core/index.cjs
CHANGED
@@ -53,14 +53,13 @@ __export(exports_core, {
|
|
53
53
|
WidgetWrapper: () => WidgetWrapper,
|
54
54
|
WidgetSelectionHeader: () => WidgetSelectionHeader,
|
55
55
|
Widget: () => Widget,
|
56
|
-
ResponsiveButton: () => ResponsiveButton,
|
57
56
|
RemoraidProvider: () => RemoraidProvider,
|
57
|
+
RemoraidButton: () => RemoraidButton,
|
58
58
|
PageContainer: () => PageContainer,
|
59
59
|
Page: () => Page,
|
60
60
|
NotFoundPage: () => NotFoundPage,
|
61
61
|
EnvironmentShell: () => EnvironmentShell,
|
62
62
|
CloseButton: () => CloseButton,
|
63
|
-
Button: () => Button,
|
64
63
|
BadgeMinimal: () => BadgeMinimal,
|
65
64
|
BadgeGroup: () => BadgeGroup,
|
66
65
|
AppShell: () => AppShell,
|
@@ -81,15 +80,6 @@ var import_react2 = require("react");
|
|
81
80
|
|
82
81
|
// src/core/lib/utils.ts
|
83
82
|
var co = (condition, value, fallback) => condition(value) ? value : fallback;
|
84
|
-
var isRemoraidButtonProps = (e) => {
|
85
|
-
if (typeof e !== "object") {
|
86
|
-
return false;
|
87
|
-
}
|
88
|
-
if (!("label" in e)) {
|
89
|
-
return false;
|
90
|
-
}
|
91
|
-
return true;
|
92
|
-
};
|
93
83
|
|
94
84
|
// src/core/components/RemoraidProvider/ThemeProvider/index.tsx
|
95
85
|
var import_core = require("@mantine/core");
|
@@ -983,20 +973,30 @@ function AlertMinimal({
|
|
983
973
|
}, undefined, true, undefined, this)
|
984
974
|
}, undefined, false, undefined, this);
|
985
975
|
}
|
986
|
-
// src/core/components/
|
987
|
-
var import_core12 = require("@mantine/core");
|
988
|
-
|
989
|
-
// src/core/components/Button/index.tsx
|
976
|
+
// src/core/components/RemoraidButton/index.tsx
|
990
977
|
var import_core11 = require("@mantine/core");
|
991
978
|
var import_icons_react6 = require("@tabler/icons-react");
|
992
979
|
var jsx_dev_runtime15 = require("react/jsx-dev-runtime");
|
993
|
-
|
980
|
+
var isRemoraidButtonProps = (e) => {
|
981
|
+
if (typeof e !== "object") {
|
982
|
+
return false;
|
983
|
+
}
|
984
|
+
if (!("label" in e)) {
|
985
|
+
return false;
|
986
|
+
}
|
987
|
+
return true;
|
988
|
+
};
|
989
|
+
function RemoraidButton({
|
994
990
|
label,
|
991
|
+
responsive,
|
992
|
+
breakpoint,
|
995
993
|
collapsed,
|
996
|
-
|
994
|
+
size,
|
995
|
+
color,
|
997
996
|
onClick,
|
998
997
|
loading,
|
999
998
|
variant,
|
999
|
+
componentsProps,
|
1000
1000
|
...props
|
1001
1001
|
}) {
|
1002
1002
|
const theme = useRemoraidTheme();
|
@@ -1006,81 +1006,45 @@ function Button({
|
|
1006
1006
|
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(import_icons_react6.IconClick, {
|
1007
1007
|
...iconProps
|
1008
1008
|
}, undefined, false, undefined, this);
|
1009
|
-
|
1010
|
-
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(import_core11.Tooltip, {
|
1011
|
-
label,
|
1012
|
-
...componentsProps?.tooltip,
|
1013
|
-
children: /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(import_core11.ActionIcon, {
|
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__ */ jsx_dev_runtime15.jsxDEV(import_core11.Button, {
|
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
|
-
var jsx_dev_runtime16 = require("react/jsx-dev-runtime");
|
1036
|
-
function ResponsiveButton({
|
1037
|
-
breakpoint,
|
1038
|
-
componentsProps,
|
1039
|
-
...remoraidButtonProps
|
1040
|
-
}) {
|
1041
|
-
return /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(jsx_dev_runtime16.Fragment, {
|
1009
|
+
return /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(jsx_dev_runtime15.Fragment, {
|
1042
1010
|
children: [
|
1043
|
-
/* @__PURE__ */
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1011
|
+
/* @__PURE__ */ jsx_dev_runtime15.jsxDEV(import_core11.Tooltip, {
|
1012
|
+
label,
|
1013
|
+
...componentsProps?.tooltip,
|
1014
|
+
children: /* @__PURE__ */ jsx_dev_runtime15.jsxDEV(import_core11.ActionIcon, {
|
1015
|
+
"aria-label": label,
|
1016
|
+
variant: variant ?? "default",
|
1017
|
+
onClick,
|
1018
|
+
loading,
|
1019
|
+
size: size ? `input-${size}` : "input-sm",
|
1020
|
+
color,
|
1021
|
+
...componentsProps?.button,
|
1022
|
+
...componentsProps?.ActionIcon,
|
1023
|
+
hiddenFrom: responsive === false ? undefined : breakpoint ?? "md",
|
1024
|
+
display: responsive === false && collapsed !== true ? "none" : componentsProps?.ActionIcon?.display ?? componentsProps?.button?.display,
|
1025
|
+
children: icon
|
1058
1026
|
}, undefined, false, undefined, this)
|
1059
1027
|
}, undefined, false, undefined, this),
|
1060
|
-
/* @__PURE__ */
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
}
|
1073
|
-
},
|
1074
|
-
collapsed: false
|
1075
|
-
}, undefined, false, undefined, this)
|
1028
|
+
/* @__PURE__ */ jsx_dev_runtime15.jsxDEV(import_core11.Button, {
|
1029
|
+
onClick,
|
1030
|
+
loading,
|
1031
|
+
variant: variant ?? "default",
|
1032
|
+
size,
|
1033
|
+
color,
|
1034
|
+
leftSection: props.icon ? icon : undefined,
|
1035
|
+
...componentsProps?.button,
|
1036
|
+
...componentsProps?.Button,
|
1037
|
+
visibleFrom: responsive === false ? undefined : breakpoint ?? "md",
|
1038
|
+
display: responsive === false && collapsed ? "none" : componentsProps?.Button?.display ?? componentsProps?.button?.display,
|
1039
|
+
children: label
|
1076
1040
|
}, undefined, false, undefined, this)
|
1077
1041
|
]
|
1078
1042
|
}, undefined, true, undefined, this);
|
1079
1043
|
}
|
1080
1044
|
// src/core/components/Widget/WidgetWrapper/index.tsx
|
1081
|
-
var
|
1045
|
+
var import_core12 = require("@mantine/core");
|
1082
1046
|
var import_react7 = require("react");
|
1083
|
-
var
|
1047
|
+
var jsx_dev_runtime16 = require("react/jsx-dev-runtime");
|
1084
1048
|
function WidgetWrapper({
|
1085
1049
|
children,
|
1086
1050
|
config,
|
@@ -1106,12 +1070,12 @@ function WidgetWrapper({
|
|
1106
1070
|
registerWidget(page.pageId, config);
|
1107
1071
|
}
|
1108
1072
|
}, [pageRegistered]);
|
1109
|
-
return /* @__PURE__ */
|
1073
|
+
return /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(import_core12.Transition, {
|
1110
1074
|
mounted: page !== null && isWidgetSelected(page.pageId, config.widgetId),
|
1111
1075
|
transition: "fade-left",
|
1112
1076
|
duration: theme.transitionDurations.medium,
|
1113
1077
|
timingFunction: "ease",
|
1114
|
-
children: (transitionStyle) => /* @__PURE__ */
|
1078
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(import_core12.Paper, {
|
1115
1079
|
p: "md",
|
1116
1080
|
shadow: "md",
|
1117
1081
|
bg: theme.transparentBackground,
|
@@ -1127,7 +1091,7 @@ function WidgetWrapper({
|
|
1127
1091
|
updateActiveWidget(null);
|
1128
1092
|
},
|
1129
1093
|
children: [
|
1130
|
-
withCloseButton !== false && /* @__PURE__ */
|
1094
|
+
withCloseButton !== false && /* @__PURE__ */ jsx_dev_runtime16.jsxDEV(CloseButton, {
|
1131
1095
|
widgetId: config.widgetId
|
1132
1096
|
}, undefined, false, undefined, this),
|
1133
1097
|
children
|
@@ -1136,8 +1100,8 @@ function WidgetWrapper({
|
|
1136
1100
|
}, undefined, false, undefined, this);
|
1137
1101
|
}
|
1138
1102
|
// src/core/components/Widget/index.tsx
|
1139
|
-
var
|
1140
|
-
var
|
1103
|
+
var import_core13 = require("@mantine/core");
|
1104
|
+
var jsx_dev_runtime17 = require("react/jsx-dev-runtime");
|
1141
1105
|
var react2 = require("react");
|
1142
1106
|
function Widget({
|
1143
1107
|
children,
|
@@ -1155,7 +1119,7 @@ function Widget({
|
|
1155
1119
|
const badgesGap = (typeof gaps === "object" ? gaps.badges : gaps) ?? "xs";
|
1156
1120
|
const buttonsGap = (typeof gaps === "object" ? gaps.buttons : gaps) ?? "xs";
|
1157
1121
|
const alertsGap = (typeof gaps === "object" ? gaps.alerts : gaps) ?? "xs";
|
1158
|
-
return /* @__PURE__ */
|
1122
|
+
return /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(WidgetWrapper, {
|
1159
1123
|
config: {
|
1160
1124
|
widgetId: id,
|
1161
1125
|
name: title,
|
@@ -1168,33 +1132,33 @@ function Widget({
|
|
1168
1132
|
},
|
1169
1133
|
...componentsProps?.wrapper,
|
1170
1134
|
children: [
|
1171
|
-
/* @__PURE__ */
|
1135
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(import_core13.Group, {
|
1172
1136
|
justify: "space-between",
|
1173
1137
|
wrap: "nowrap",
|
1174
1138
|
children: [
|
1175
|
-
/* @__PURE__ */
|
1139
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(import_core13.Group, {
|
1176
1140
|
gap: badgesGap,
|
1177
1141
|
wrap: "nowrap",
|
1178
1142
|
children: [
|
1179
|
-
/* @__PURE__ */
|
1143
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(import_core13.Title, {
|
1180
1144
|
order: 1,
|
1181
1145
|
size: "h3",
|
1182
1146
|
lineClamp: 1,
|
1183
1147
|
children: title
|
1184
1148
|
}, undefined, false, undefined, this),
|
1185
|
-
badges !== undefined && /* @__PURE__ */
|
1149
|
+
badges !== undefined && /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(BadgeGroup, {
|
1186
1150
|
badges,
|
1187
1151
|
gap: badgesGap,
|
1188
1152
|
...componentsProps?.badgeGroup
|
1189
1153
|
}, undefined, false, undefined, this)
|
1190
1154
|
]
|
1191
1155
|
}, undefined, true, undefined, this),
|
1192
|
-
/* @__PURE__ */
|
1156
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(import_core13.Group, {
|
1193
1157
|
gap: buttonsGap,
|
1194
1158
|
wrap: "nowrap",
|
1195
1159
|
children: buttons !== undefined && buttons.map((e, i) => {
|
1196
1160
|
if (isRemoraidButtonProps(e)) {
|
1197
|
-
return /* @__PURE__ */ react2.createElement(
|
1161
|
+
return /* @__PURE__ */ react2.createElement(RemoraidButton, {
|
1198
1162
|
...e,
|
1199
1163
|
key: i
|
1200
1164
|
});
|
@@ -1204,7 +1168,7 @@ function Widget({
|
|
1204
1168
|
}, undefined, false, undefined, this)
|
1205
1169
|
]
|
1206
1170
|
}, undefined, true, undefined, this),
|
1207
|
-
/* @__PURE__ */
|
1171
|
+
/* @__PURE__ */ jsx_dev_runtime17.jsxDEV(import_core13.Divider, {
|
1208
1172
|
my: "md"
|
1209
1173
|
}, undefined, false, undefined, this),
|
1210
1174
|
alerts !== undefined && alerts.map((a, i) => {
|
@@ -1217,20 +1181,20 @@ function Widget({
|
|
1217
1181
|
}
|
1218
1182
|
return a;
|
1219
1183
|
}),
|
1220
|
-
loading ? /* @__PURE__ */
|
1221
|
-
children: /* @__PURE__ */
|
1184
|
+
loading ? /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(import_core13.Center, {
|
1185
|
+
children: /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(import_core13.Loader, {
|
1222
1186
|
...componentsProps?.loader
|
1223
1187
|
}, undefined, false, undefined, this)
|
1224
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
1188
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime17.jsxDEV(jsx_dev_runtime17.Fragment, {
|
1225
1189
|
children
|
1226
1190
|
}, undefined, false, undefined, this)
|
1227
1191
|
]
|
1228
1192
|
}, undefined, true, undefined, this);
|
1229
1193
|
}
|
1230
1194
|
// src/core/components/Page/NotFoundPage/index.tsx
|
1231
|
-
var
|
1195
|
+
var import_core14 = require("@mantine/core");
|
1232
1196
|
var import_navigation3 = require("next/navigation");
|
1233
|
-
var
|
1197
|
+
var jsx_dev_runtime18 = require("react/jsx-dev-runtime");
|
1234
1198
|
function NotFoundPage({
|
1235
1199
|
children,
|
1236
1200
|
message,
|
@@ -1238,11 +1202,11 @@ function NotFoundPage({
|
|
1238
1202
|
}) {
|
1239
1203
|
const pathname = import_navigation3.usePathname();
|
1240
1204
|
const theme = useRemoraidTheme();
|
1241
|
-
return /* @__PURE__ */
|
1205
|
+
return /* @__PURE__ */ jsx_dev_runtime18.jsxDEV(Page, {
|
1242
1206
|
name: "Not Found",
|
1243
1207
|
...componentsProps?.page,
|
1244
1208
|
children: [
|
1245
|
-
/* @__PURE__ */
|
1209
|
+
/* @__PURE__ */ jsx_dev_runtime18.jsxDEV(import_core14.Alert, {
|
1246
1210
|
...theme.alertProps.negative,
|
1247
1211
|
title: "404 - Page Not Found",
|
1248
1212
|
children: message ?? `Could not find page ${pathname}.`
|
@@ -1252,8 +1216,8 @@ function NotFoundPage({
|
|
1252
1216
|
}, undefined, true, undefined, this);
|
1253
1217
|
}
|
1254
1218
|
// src/core/components/EnvironmentShell/index.tsx
|
1255
|
-
var
|
1256
|
-
var
|
1219
|
+
var import_core15 = require("@mantine/core");
|
1220
|
+
var jsx_dev_runtime19 = require("react/jsx-dev-runtime");
|
1257
1221
|
function EnvironmentShell({
|
1258
1222
|
children,
|
1259
1223
|
environment,
|
@@ -1267,7 +1231,7 @@ function EnvironmentShell({
|
|
1267
1231
|
const undefinedKeys = Object.keys(environment).filter((key) => environment[key] === undefined);
|
1268
1232
|
const alertTitle = `Please Specify Environment Variable${undefinedKeys.length > 1 ? "s" : ""}`;
|
1269
1233
|
const alertMessage = `Components could not be rendered because the following environment variables are not specified: ${undefinedKeys.join(", ")}.`;
|
1270
|
-
const alert = /* @__PURE__ */
|
1234
|
+
const alert = /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(import_core15.Alert, {
|
1271
1235
|
...theme.alertProps.neutral,
|
1272
1236
|
title: alertTitle,
|
1273
1237
|
m,
|
@@ -1275,12 +1239,12 @@ function EnvironmentShell({
|
|
1275
1239
|
children: message ?? alertMessage
|
1276
1240
|
}, undefined, false, undefined, this);
|
1277
1241
|
if (undefinedKeys.length === 0) {
|
1278
|
-
return /* @__PURE__ */
|
1242
|
+
return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(jsx_dev_runtime19.Fragment, {
|
1279
1243
|
children
|
1280
1244
|
}, undefined, false, undefined, this);
|
1281
1245
|
}
|
1282
1246
|
if (withContainer) {
|
1283
|
-
return /* @__PURE__ */
|
1247
|
+
return /* @__PURE__ */ jsx_dev_runtime19.jsxDEV(PageContainer, {
|
1284
1248
|
componentsProps: { container: componentsProps?.container },
|
1285
1249
|
children: alert
|
1286
1250
|
}, undefined, false, undefined, this);
|
package/dist/core/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { PropsWithChildren as PropsWithChildren4, ReactNode as ReactNode5 } from "react";
|
2
|
-
import {
|
2
|
+
import { AlertProps, IndicatorProps, MantineBreakpoint, MantineColorScheme, MantineSize, MantineTheme, ScrollAreaProps } from "@mantine/core";
|
3
3
|
import { Icon, IconProps } from "@tabler/icons-react";
|
4
4
|
import { ImageProps } from "next/image";
|
5
5
|
import { ReactNode } from "react";
|
@@ -60,14 +60,6 @@ interface PageConfiguration {
|
|
60
60
|
name: string;
|
61
61
|
registerPageDirectly?: boolean;
|
62
62
|
}
|
63
|
-
type ResponsiveButtonSize = "small" | "medium";
|
64
|
-
interface RemoraidButtonProps {
|
65
|
-
label: string;
|
66
|
-
icon?: Icon;
|
67
|
-
onClick?: () => void;
|
68
|
-
loading?: boolean;
|
69
|
-
variant?: Extract<ButtonVariant, ActionIconVariant>;
|
70
|
-
}
|
71
63
|
declare const defaultNavbarSettings: { [V in NavbarVariant] : NavbarSettings };
|
72
64
|
declare const defaultUserExperience: UserExperience;
|
73
65
|
interface UserExperienceContext {
|
@@ -182,51 +174,48 @@ interface AlertMinimalProps {
|
|
182
174
|
};
|
183
175
|
}
|
184
176
|
declare function AlertMinimal({ children, title, category, text, onClose, mounted, mt, mb, componentsProps }: PropsWithChildren6<AlertMinimalProps>): ReactNode11;
|
185
|
-
import { ActionIconProps
|
186
|
-
import { IconProps as
|
187
|
-
import { ReactNode as
|
177
|
+
import { ActionIconProps, ActionIconVariant, ButtonProps, ButtonVariant, MantineBreakpoint as MantineBreakpoint3, MantineColor, MantineSize as MantineSize5, TooltipProps as TooltipProps3 } from "@mantine/core";
|
178
|
+
import { Icon as Icon2, IconProps as IconProps2 } from "@tabler/icons-react";
|
179
|
+
import { ReactNode as ReactNode12 } from "react";
|
188
180
|
type Common<
|
189
181
|
A,
|
190
182
|
B
|
191
183
|
> = Pick<A & B, keyof A & keyof B>;
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
184
|
+
interface RemoraidButtonProps {
|
185
|
+
label: string;
|
186
|
+
responsive?: boolean;
|
187
|
+
breakpoint?: MantineBreakpoint3;
|
196
188
|
collapsed?: boolean;
|
189
|
+
size?: MantineSize5;
|
190
|
+
color?: MantineColor;
|
191
|
+
icon?: Icon2;
|
192
|
+
onClick?: () => void;
|
193
|
+
loading?: boolean;
|
194
|
+
variant?: Extract<ButtonVariant, ActionIconVariant>;
|
197
195
|
componentsProps?: {
|
198
196
|
tooltip?: Partial<TooltipProps3>
|
199
197
|
icon?: Partial<IconProps2>
|
200
|
-
button
|
201
|
-
actionIcon?: Partial<ActionIconProps>
|
202
|
-
};
|
203
|
-
}
|
204
|
-
declare function Button2({ label, collapsed, componentsProps, onClick, loading, variant,...props }: ButtonProps): ReactNode12;
|
205
|
-
interface ResponsiveButtonProps extends RemoraidButtonProps {
|
206
|
-
breakpoint?: MantineBreakpoint3;
|
207
|
-
componentsProps?: {
|
198
|
+
button: Omit<Partial<Common<ButtonProps, ActionIconProps>>, "variant" | "onClick" | "size" | "color" | "loading">
|
208
199
|
Button?: Partial<ButtonProps>
|
209
|
-
|
210
|
-
tooltip?: Partial<TooltipProps4>
|
211
|
-
icon?: Partial<IconProps3>
|
200
|
+
ActionIcon?: Partial<ActionIconProps>
|
212
201
|
};
|
213
202
|
}
|
214
|
-
declare function
|
215
|
-
import { MantineSize as
|
216
|
-
import { PropsWithChildren as PropsWithChildren7, ReactNode as
|
203
|
+
declare function RemoraidButton({ label, responsive, breakpoint, collapsed, size, color, onClick, loading, variant, componentsProps,...props }: RemoraidButtonProps): ReactNode12;
|
204
|
+
import { MantineSize as MantineSize6, PaperProps, TransitionProps as TransitionProps3 } from "@mantine/core";
|
205
|
+
import { PropsWithChildren as PropsWithChildren7, ReactNode as ReactNode13 } from "react";
|
217
206
|
interface WidgetWrapperComponentsProps {
|
218
207
|
container?: Partial<PaperProps>;
|
219
208
|
transition?: Partial<Omit<TransitionProps3, "mounted">>;
|
220
209
|
}
|
221
210
|
interface WidgetWrapperProps {
|
222
211
|
config: WidgetConfiguration;
|
223
|
-
mt?:
|
212
|
+
mt?: MantineSize6 | number;
|
224
213
|
withCloseButton?: boolean;
|
225
214
|
componentsProps?: WidgetWrapperComponentsProps;
|
226
215
|
}
|
227
|
-
declare function WidgetWrapper({ children, config, mt, withCloseButton, componentsProps }: PropsWithChildren7<WidgetWrapperProps>):
|
228
|
-
import { MantineSize as
|
229
|
-
import { PropsWithChildren as PropsWithChildren8, ReactNode as
|
216
|
+
declare function WidgetWrapper({ children, config, mt, withCloseButton, componentsProps }: PropsWithChildren7<WidgetWrapperProps>): ReactNode13;
|
217
|
+
import { MantineSize as MantineSize7, LoaderProps } from "@mantine/core";
|
218
|
+
import { PropsWithChildren as PropsWithChildren8, ReactNode as ReactNode14 } from "react";
|
230
219
|
interface WidgetComponentsProps extends WidgetWrapperComponentsProps {
|
231
220
|
wrapper?: Partial<Omit<WidgetWrapperProps, "widgetId">>;
|
232
221
|
loader?: Partial<LoaderProps>;
|
@@ -236,40 +225,40 @@ interface WidgetProps {
|
|
236
225
|
id: string;
|
237
226
|
title: string;
|
238
227
|
config?: Partial<Omit<WidgetConfiguration, "widgetId">>;
|
239
|
-
badges?: (BadgeMinimalProps |
|
240
|
-
buttons?: (
|
241
|
-
alerts?: (AlertMinimalProps |
|
242
|
-
gaps?:
|
243
|
-
badges?:
|
244
|
-
buttons?:
|
245
|
-
alerts?:
|
228
|
+
badges?: (BadgeMinimalProps | ReactNode14)[];
|
229
|
+
buttons?: (RemoraidButtonProps | ReactNode14)[];
|
230
|
+
alerts?: (AlertMinimalProps | ReactNode14)[];
|
231
|
+
gaps?: MantineSize7 | number | {
|
232
|
+
badges?: MantineSize7 | number
|
233
|
+
buttons?: MantineSize7 | number
|
234
|
+
alerts?: MantineSize7 | number
|
246
235
|
};
|
247
236
|
loading?: boolean;
|
248
|
-
mt?:
|
237
|
+
mt?: MantineSize7 | number;
|
249
238
|
componentsProps?: WidgetComponentsProps;
|
250
239
|
}
|
251
|
-
declare function Widget({ children, id, config, title, badges, buttons, alerts, gaps, loading, mt, componentsProps }: PropsWithChildren8<WidgetProps>):
|
252
|
-
import { ContainerProps, MantineSize as
|
253
|
-
import { PropsWithChildren as PropsWithChildren9, ReactNode as
|
240
|
+
declare function Widget({ children, id, config, title, badges, buttons, alerts, gaps, loading, mt, componentsProps }: PropsWithChildren8<WidgetProps>): ReactNode14;
|
241
|
+
import { ContainerProps, MantineSize as MantineSize8 } from "@mantine/core";
|
242
|
+
import { PropsWithChildren as PropsWithChildren9, ReactNode as ReactNode15 } from "react";
|
254
243
|
interface PageProps {
|
255
244
|
name?: string;
|
256
245
|
config?: Partial<Omit<PageConfiguration, "name">>;
|
257
|
-
pt?:
|
246
|
+
pt?: MantineSize8 | number;
|
258
247
|
componentsProps?: {
|
259
248
|
container?: ContainerProps
|
260
249
|
};
|
261
250
|
}
|
262
|
-
declare function Page({ children, name, config, pt, componentsProps }: PropsWithChildren9<PageProps>):
|
263
|
-
import { ContainerProps as ContainerProps2, MantineSize as
|
264
|
-
import { PropsWithChildren as PropsWithChildren10, ReactNode as
|
251
|
+
declare function Page({ children, name, config, pt, componentsProps }: PropsWithChildren9<PageProps>): ReactNode15;
|
252
|
+
import { ContainerProps as ContainerProps2, MantineSize as MantineSize9 } from "@mantine/core";
|
253
|
+
import { PropsWithChildren as PropsWithChildren10, ReactNode as ReactNode16 } from "react";
|
265
254
|
interface PageContainerProps {
|
266
|
-
pt?:
|
255
|
+
pt?: MantineSize9 | number;
|
267
256
|
componentsProps?: {
|
268
257
|
container?: ContainerProps2
|
269
258
|
};
|
270
259
|
}
|
271
|
-
declare function PageContainer({ children, pt, componentsProps }: PropsWithChildren10<PageContainerProps>):
|
272
|
-
import { PropsWithChildren as PropsWithChildren11, ReactNode as
|
260
|
+
declare function PageContainer({ children, pt, componentsProps }: PropsWithChildren10<PageContainerProps>): ReactNode16;
|
261
|
+
import { PropsWithChildren as PropsWithChildren11, ReactNode as ReactNode17 } from "react";
|
273
262
|
import { PageProps as PageProps2 } from "..";
|
274
263
|
interface NotFoundPageProps {
|
275
264
|
message?: string;
|
@@ -277,18 +266,18 @@ interface NotFoundPageProps {
|
|
277
266
|
page?: PageProps2
|
278
267
|
};
|
279
268
|
}
|
280
|
-
declare function NotFoundPage({ children, message, componentsProps }: PropsWithChildren11<NotFoundPageProps>):
|
281
|
-
import { ContainerProps as ContainerProps3, MantineSize as
|
282
|
-
import { PropsWithChildren as PropsWithChildren12, ReactNode as
|
269
|
+
declare function NotFoundPage({ children, message, componentsProps }: PropsWithChildren11<NotFoundPageProps>): ReactNode17;
|
270
|
+
import { ContainerProps as ContainerProps3, MantineSize as MantineSize10 } from "@mantine/core";
|
271
|
+
import { PropsWithChildren as PropsWithChildren12, ReactNode as ReactNode18 } from "react";
|
283
272
|
interface EnvironmentShellProps {
|
284
273
|
environment: Record<string, string | undefined>;
|
285
274
|
message?: string;
|
286
|
-
m?:
|
287
|
-
mt?:
|
275
|
+
m?: MantineSize10 | number;
|
276
|
+
mt?: MantineSize10 | number;
|
288
277
|
withContainer?: boolean;
|
289
278
|
componentsProps?: {
|
290
279
|
container?: ContainerProps3
|
291
280
|
};
|
292
281
|
}
|
293
|
-
declare function EnvironmentShell({ children, environment, message, m, mt, withContainer, componentsProps }: PropsWithChildren12<EnvironmentShellProps>):
|
294
|
-
export { userExperienceCookieName, useWidgets, useRemoraidUserExperience, useRemoraidTheme, defaultUserExperience, defaultNavbarSettings, createRemoraidTheme, WidgetsProviderProps, WidgetWrapperProps, WidgetWrapper, WidgetSelectionHeaderProps, WidgetSelectionHeader, WidgetProps, WidgetConfiguration, Widget, UserExperienceProviderProps, UserExperience, TransitionDuration, ThemeProviderProps,
|
282
|
+
declare function EnvironmentShell({ children, environment, message, m, mt, withContainer, componentsProps }: PropsWithChildren12<EnvironmentShellProps>): ReactNode18;
|
283
|
+
export { userExperienceCookieName, useWidgets, useRemoraidUserExperience, useRemoraidTheme, defaultUserExperience, defaultNavbarSettings, createRemoraidTheme, WidgetsProviderProps, WidgetWrapperProps, WidgetWrapper, WidgetSelectionHeaderProps, WidgetSelectionHeader, WidgetProps, WidgetConfiguration, Widget, UserExperienceProviderProps, UserExperience, TransitionDuration, ThemeProviderProps, RemoraidThemeCallback, RemoraidTheme, RemoraidProviderProps, RemoraidProvider, RemoraidIconSize, RemoraidButtonProps, RemoraidButton, RemoraidBreakpoint, PartialRemoraidTheme, PageProps, PageContainerProps, PageContainer, PageConfiguration, Page, NotFoundPageProps, NotFoundPage, NavbarVariant, NavbarSettings, NavbarProps, NavbarLink, EnvironmentShellProps, EnvironmentShell, CloseButtonProps, CloseButton, BadgeMinimalProps, BadgeMinimal, BadgeGroupProps, BadgeGroup, AppShellProps, AppShellLogo, AppShell, AlertMinimalProps, AlertMinimal, AlertCategory };
|
package/dist/core/index.js
CHANGED
@@ -31,15 +31,6 @@ 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
|
-
};
|
43
34
|
|
44
35
|
// src/core/components/RemoraidProvider/ThemeProvider/index.tsx
|
45
36
|
import {
|
@@ -977,26 +968,34 @@ function AlertMinimal({
|
|
977
968
|
}, undefined, true, undefined, this)
|
978
969
|
}, undefined, false, undefined, this);
|
979
970
|
}
|
980
|
-
// src/core/components/
|
981
|
-
import {
|
982
|
-
Box
|
983
|
-
} from "@mantine/core";
|
984
|
-
|
985
|
-
// src/core/components/Button/index.tsx
|
971
|
+
// src/core/components/RemoraidButton/index.tsx
|
986
972
|
import {
|
987
973
|
ActionIcon as ActionIcon2,
|
988
|
-
|
989
|
-
|
974
|
+
Button,
|
975
|
+
Tooltip as Tooltip4
|
990
976
|
} from "@mantine/core";
|
991
977
|
import { IconClick } from "@tabler/icons-react";
|
992
|
-
import { jsxDEV as jsxDEV15 } from "react/jsx-dev-runtime";
|
993
|
-
|
978
|
+
import { jsxDEV as jsxDEV15, Fragment as Fragment3 } from "react/jsx-dev-runtime";
|
979
|
+
var isRemoraidButtonProps = (e) => {
|
980
|
+
if (typeof e !== "object") {
|
981
|
+
return false;
|
982
|
+
}
|
983
|
+
if (!("label" in e)) {
|
984
|
+
return false;
|
985
|
+
}
|
986
|
+
return true;
|
987
|
+
};
|
988
|
+
function RemoraidButton({
|
994
989
|
label,
|
990
|
+
responsive,
|
991
|
+
breakpoint,
|
995
992
|
collapsed,
|
996
|
-
|
993
|
+
size,
|
994
|
+
color,
|
997
995
|
onClick,
|
998
996
|
loading,
|
999
997
|
variant,
|
998
|
+
componentsProps,
|
1000
999
|
...props
|
1001
1000
|
}) {
|
1002
1001
|
const theme = useRemoraidTheme();
|
@@ -1006,73 +1005,37 @@ function Button({
|
|
1006
1005
|
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV15(IconClick, {
|
1007
1006
|
...iconProps
|
1008
1007
|
}, undefined, false, undefined, this);
|
1009
|
-
|
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, {
|
1008
|
+
return /* @__PURE__ */ jsxDEV15(Fragment3, {
|
1042
1009
|
children: [
|
1043
|
-
/* @__PURE__ */
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1010
|
+
/* @__PURE__ */ jsxDEV15(Tooltip4, {
|
1011
|
+
label,
|
1012
|
+
...componentsProps?.tooltip,
|
1013
|
+
children: /* @__PURE__ */ jsxDEV15(ActionIcon2, {
|
1014
|
+
"aria-label": label,
|
1015
|
+
variant: variant ?? "default",
|
1016
|
+
onClick,
|
1017
|
+
loading,
|
1018
|
+
size: size ? `input-${size}` : "input-sm",
|
1019
|
+
color,
|
1020
|
+
...componentsProps?.button,
|
1021
|
+
...componentsProps?.ActionIcon,
|
1022
|
+
hiddenFrom: responsive === false ? undefined : breakpoint ?? "md",
|
1023
|
+
display: responsive === false && collapsed !== true ? "none" : componentsProps?.ActionIcon?.display ?? componentsProps?.button?.display,
|
1024
|
+
children: icon
|
1058
1025
|
}, undefined, false, undefined, this)
|
1059
1026
|
}, undefined, false, undefined, this),
|
1060
|
-
/* @__PURE__ */
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
}
|
1073
|
-
},
|
1074
|
-
collapsed: false
|
1075
|
-
}, undefined, false, undefined, this)
|
1027
|
+
/* @__PURE__ */ jsxDEV15(Button, {
|
1028
|
+
onClick,
|
1029
|
+
loading,
|
1030
|
+
variant: variant ?? "default",
|
1031
|
+
size,
|
1032
|
+
color,
|
1033
|
+
leftSection: props.icon ? icon : undefined,
|
1034
|
+
...componentsProps?.button,
|
1035
|
+
...componentsProps?.Button,
|
1036
|
+
visibleFrom: responsive === false ? undefined : breakpoint ?? "md",
|
1037
|
+
display: responsive === false && collapsed ? "none" : componentsProps?.Button?.display ?? componentsProps?.button?.display,
|
1038
|
+
children: label
|
1076
1039
|
}, undefined, false, undefined, this)
|
1077
1040
|
]
|
1078
1041
|
}, undefined, true, undefined, this);
|
@@ -1083,7 +1046,7 @@ import {
|
|
1083
1046
|
Transition as Transition4
|
1084
1047
|
} from "@mantine/core";
|
1085
1048
|
import { useEffect as useEffect3 } from "react";
|
1086
|
-
import { jsxDEV as
|
1049
|
+
import { jsxDEV as jsxDEV16 } from "react/jsx-dev-runtime";
|
1087
1050
|
function WidgetWrapper({
|
1088
1051
|
children,
|
1089
1052
|
config,
|
@@ -1109,12 +1072,12 @@ function WidgetWrapper({
|
|
1109
1072
|
registerWidget(page.pageId, config);
|
1110
1073
|
}
|
1111
1074
|
}, [pageRegistered]);
|
1112
|
-
return /* @__PURE__ */
|
1075
|
+
return /* @__PURE__ */ jsxDEV16(Transition4, {
|
1113
1076
|
mounted: page !== null && isWidgetSelected(page.pageId, config.widgetId),
|
1114
1077
|
transition: "fade-left",
|
1115
1078
|
duration: theme.transitionDurations.medium,
|
1116
1079
|
timingFunction: "ease",
|
1117
|
-
children: (transitionStyle) => /* @__PURE__ */
|
1080
|
+
children: (transitionStyle) => /* @__PURE__ */ jsxDEV16(Paper3, {
|
1118
1081
|
p: "md",
|
1119
1082
|
shadow: "md",
|
1120
1083
|
bg: theme.transparentBackground,
|
@@ -1130,7 +1093,7 @@ function WidgetWrapper({
|
|
1130
1093
|
updateActiveWidget(null);
|
1131
1094
|
},
|
1132
1095
|
children: [
|
1133
|
-
withCloseButton !== false && /* @__PURE__ */
|
1096
|
+
withCloseButton !== false && /* @__PURE__ */ jsxDEV16(CloseButton, {
|
1134
1097
|
widgetId: config.widgetId
|
1135
1098
|
}, undefined, false, undefined, this),
|
1136
1099
|
children
|
@@ -1146,7 +1109,7 @@ import {
|
|
1146
1109
|
Loader,
|
1147
1110
|
Title
|
1148
1111
|
} from "@mantine/core";
|
1149
|
-
import { jsxDEV as
|
1112
|
+
import { jsxDEV as jsxDEV17, Fragment as Fragment4 } from "react/jsx-dev-runtime";
|
1150
1113
|
import { createElement as createElement2 } from "react";
|
1151
1114
|
function Widget({
|
1152
1115
|
children,
|
@@ -1164,7 +1127,7 @@ function Widget({
|
|
1164
1127
|
const badgesGap = (typeof gaps === "object" ? gaps.badges : gaps) ?? "xs";
|
1165
1128
|
const buttonsGap = (typeof gaps === "object" ? gaps.buttons : gaps) ?? "xs";
|
1166
1129
|
const alertsGap = (typeof gaps === "object" ? gaps.alerts : gaps) ?? "xs";
|
1167
|
-
return /* @__PURE__ */
|
1130
|
+
return /* @__PURE__ */ jsxDEV17(WidgetWrapper, {
|
1168
1131
|
config: {
|
1169
1132
|
widgetId: id,
|
1170
1133
|
name: title,
|
@@ -1177,33 +1140,33 @@ function Widget({
|
|
1177
1140
|
},
|
1178
1141
|
...componentsProps?.wrapper,
|
1179
1142
|
children: [
|
1180
|
-
/* @__PURE__ */
|
1143
|
+
/* @__PURE__ */ jsxDEV17(Group4, {
|
1181
1144
|
justify: "space-between",
|
1182
1145
|
wrap: "nowrap",
|
1183
1146
|
children: [
|
1184
|
-
/* @__PURE__ */
|
1147
|
+
/* @__PURE__ */ jsxDEV17(Group4, {
|
1185
1148
|
gap: badgesGap,
|
1186
1149
|
wrap: "nowrap",
|
1187
1150
|
children: [
|
1188
|
-
/* @__PURE__ */
|
1151
|
+
/* @__PURE__ */ jsxDEV17(Title, {
|
1189
1152
|
order: 1,
|
1190
1153
|
size: "h3",
|
1191
1154
|
lineClamp: 1,
|
1192
1155
|
children: title
|
1193
1156
|
}, undefined, false, undefined, this),
|
1194
|
-
badges !== undefined && /* @__PURE__ */
|
1157
|
+
badges !== undefined && /* @__PURE__ */ jsxDEV17(BadgeGroup, {
|
1195
1158
|
badges,
|
1196
1159
|
gap: badgesGap,
|
1197
1160
|
...componentsProps?.badgeGroup
|
1198
1161
|
}, undefined, false, undefined, this)
|
1199
1162
|
]
|
1200
1163
|
}, undefined, true, undefined, this),
|
1201
|
-
/* @__PURE__ */
|
1164
|
+
/* @__PURE__ */ jsxDEV17(Group4, {
|
1202
1165
|
gap: buttonsGap,
|
1203
1166
|
wrap: "nowrap",
|
1204
1167
|
children: buttons !== undefined && buttons.map((e, i) => {
|
1205
1168
|
if (isRemoraidButtonProps(e)) {
|
1206
|
-
return /* @__PURE__ */ createElement2(
|
1169
|
+
return /* @__PURE__ */ createElement2(RemoraidButton, {
|
1207
1170
|
...e,
|
1208
1171
|
key: i
|
1209
1172
|
});
|
@@ -1213,7 +1176,7 @@ function Widget({
|
|
1213
1176
|
}, undefined, false, undefined, this)
|
1214
1177
|
]
|
1215
1178
|
}, undefined, true, undefined, this),
|
1216
|
-
/* @__PURE__ */
|
1179
|
+
/* @__PURE__ */ jsxDEV17(Divider3, {
|
1217
1180
|
my: "md"
|
1218
1181
|
}, undefined, false, undefined, this),
|
1219
1182
|
alerts !== undefined && alerts.map((a, i) => {
|
@@ -1226,11 +1189,11 @@ function Widget({
|
|
1226
1189
|
}
|
1227
1190
|
return a;
|
1228
1191
|
}),
|
1229
|
-
loading ? /* @__PURE__ */
|
1230
|
-
children: /* @__PURE__ */
|
1192
|
+
loading ? /* @__PURE__ */ jsxDEV17(Center, {
|
1193
|
+
children: /* @__PURE__ */ jsxDEV17(Loader, {
|
1231
1194
|
...componentsProps?.loader
|
1232
1195
|
}, undefined, false, undefined, this)
|
1233
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
1196
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV17(Fragment4, {
|
1234
1197
|
children
|
1235
1198
|
}, undefined, false, undefined, this)
|
1236
1199
|
]
|
@@ -1239,7 +1202,7 @@ function Widget({
|
|
1239
1202
|
// src/core/components/Page/NotFoundPage/index.tsx
|
1240
1203
|
import { Alert as Alert2 } from "@mantine/core";
|
1241
1204
|
import { usePathname as usePathname3 } from "next/navigation";
|
1242
|
-
import { jsxDEV as
|
1205
|
+
import { jsxDEV as jsxDEV18 } from "react/jsx-dev-runtime";
|
1243
1206
|
function NotFoundPage({
|
1244
1207
|
children,
|
1245
1208
|
message,
|
@@ -1247,11 +1210,11 @@ function NotFoundPage({
|
|
1247
1210
|
}) {
|
1248
1211
|
const pathname = usePathname3();
|
1249
1212
|
const theme = useRemoraidTheme();
|
1250
|
-
return /* @__PURE__ */
|
1213
|
+
return /* @__PURE__ */ jsxDEV18(Page, {
|
1251
1214
|
name: "Not Found",
|
1252
1215
|
...componentsProps?.page,
|
1253
1216
|
children: [
|
1254
|
-
/* @__PURE__ */
|
1217
|
+
/* @__PURE__ */ jsxDEV18(Alert2, {
|
1255
1218
|
...theme.alertProps.negative,
|
1256
1219
|
title: "404 - Page Not Found",
|
1257
1220
|
children: message ?? `Could not find page ${pathname}.`
|
@@ -1262,7 +1225,7 @@ function NotFoundPage({
|
|
1262
1225
|
}
|
1263
1226
|
// src/core/components/EnvironmentShell/index.tsx
|
1264
1227
|
import { Alert as Alert3 } from "@mantine/core";
|
1265
|
-
import { jsxDEV as
|
1228
|
+
import { jsxDEV as jsxDEV19, Fragment as Fragment5 } from "react/jsx-dev-runtime";
|
1266
1229
|
function EnvironmentShell({
|
1267
1230
|
children,
|
1268
1231
|
environment,
|
@@ -1276,7 +1239,7 @@ function EnvironmentShell({
|
|
1276
1239
|
const undefinedKeys = Object.keys(environment).filter((key) => environment[key] === undefined);
|
1277
1240
|
const alertTitle = `Please Specify Environment Variable${undefinedKeys.length > 1 ? "s" : ""}`;
|
1278
1241
|
const alertMessage = `Components could not be rendered because the following environment variables are not specified: ${undefinedKeys.join(", ")}.`;
|
1279
|
-
const alert = /* @__PURE__ */
|
1242
|
+
const alert = /* @__PURE__ */ jsxDEV19(Alert3, {
|
1280
1243
|
...theme.alertProps.neutral,
|
1281
1244
|
title: alertTitle,
|
1282
1245
|
m,
|
@@ -1284,12 +1247,12 @@ function EnvironmentShell({
|
|
1284
1247
|
children: message ?? alertMessage
|
1285
1248
|
}, undefined, false, undefined, this);
|
1286
1249
|
if (undefinedKeys.length === 0) {
|
1287
|
-
return /* @__PURE__ */
|
1250
|
+
return /* @__PURE__ */ jsxDEV19(Fragment5, {
|
1288
1251
|
children
|
1289
1252
|
}, undefined, false, undefined, this);
|
1290
1253
|
}
|
1291
1254
|
if (withContainer) {
|
1292
|
-
return /* @__PURE__ */
|
1255
|
+
return /* @__PURE__ */ jsxDEV19(PageContainer, {
|
1293
1256
|
componentsProps: { container: componentsProps?.container },
|
1294
1257
|
children: alert
|
1295
1258
|
}, undefined, false, undefined, this);
|
@@ -1307,14 +1270,13 @@ export {
|
|
1307
1270
|
WidgetWrapper,
|
1308
1271
|
WidgetSelectionHeader,
|
1309
1272
|
Widget,
|
1310
|
-
ResponsiveButton,
|
1311
1273
|
RemoraidProvider,
|
1274
|
+
RemoraidButton,
|
1312
1275
|
PageContainer,
|
1313
1276
|
Page,
|
1314
1277
|
NotFoundPage,
|
1315
1278
|
EnvironmentShell,
|
1316
1279
|
CloseButton,
|
1317
|
-
Button,
|
1318
1280
|
BadgeMinimal,
|
1319
1281
|
BadgeGroup,
|
1320
1282
|
AppShell,
|
package/dist/server/index.d.ts
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
import { ContainerProps as ContainerProps3, MantineSize as
|
1
|
+
import { ContainerProps as ContainerProps3, MantineSize as MantineSize10 } from "@mantine/core";
|
2
2
|
interface EnvironmentShellProps {
|
3
3
|
environment: Record<string, string | undefined>;
|
4
4
|
message?: string;
|
5
|
-
m?:
|
6
|
-
mt?:
|
5
|
+
m?: MantineSize10 | number;
|
6
|
+
mt?: MantineSize10 | number;
|
7
7
|
withContainer?: boolean;
|
8
8
|
componentsProps?: {
|
9
9
|
container?: ContainerProps3
|
10
10
|
};
|
11
11
|
}
|
12
|
-
import { PropsWithChildren as PropsWithChildren13, ReactNode as
|
12
|
+
import { PropsWithChildren as PropsWithChildren13, ReactNode as ReactNode19 } from "react";
|
13
13
|
interface ServerEnvironmentShellProps extends EnvironmentShellProps {}
|
14
|
-
declare function EnvironmentShell2({ children, environment, message }: PropsWithChildren13<ServerEnvironmentShellProps>):
|
14
|
+
declare function EnvironmentShell2({ children, environment, message }: PropsWithChildren13<ServerEnvironmentShellProps>): ReactNode19;
|
15
15
|
export { ServerEnvironmentShellProps, EnvironmentShell2 as EnvironmentShell };
|