remoraid 2.43.2 → 2.45.0
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/adapters/next/index.cjs +84 -0
- package/dist/adapters/next/index.d.ts +27 -0
- package/dist/adapters/next/index.js +43 -0
- package/dist/adapters/react-router/index.cjs +47 -0
- package/dist/adapters/react-router/index.d.ts +7 -0
- package/dist/adapters/react-router/index.js +15 -0
- package/dist/core/index.cjs +302 -269
- package/dist/core/index.d.ts +87 -76
- package/dist/core/index.js +286 -250
- package/dist/jsonforms/index.cjs +269 -275
- package/dist/jsonforms/index.js +255 -258
- package/dist/server/index.d.ts +2 -2
- package/package.json +22 -2
package/dist/core/index.js
CHANGED
|
@@ -5953,7 +5953,12 @@ function UserExperienceProviderWrapper({
|
|
|
5953
5953
|
initialValue
|
|
5954
5954
|
}) {
|
|
5955
5955
|
const [cookies, setCookie] = useCookies();
|
|
5956
|
-
const initialUserExperience = import_lodash3.
|
|
5956
|
+
const initialUserExperience = import_lodash3.mergeWith({}, defaultUserExperience, initialValue, (_objValue, srcValue) => {
|
|
5957
|
+
if (Array.isArray(srcValue)) {
|
|
5958
|
+
return [...srcValue];
|
|
5959
|
+
}
|
|
5960
|
+
return;
|
|
5961
|
+
});
|
|
5957
5962
|
const [userExperience, setUserExperience] = useState3(initialUserExperience);
|
|
5958
5963
|
const [processedCookie, setProcessedCookie] = useState3(false);
|
|
5959
5964
|
const updateUserExperience = (p) => {
|
|
@@ -6047,29 +6052,72 @@ function LayoutsProvider({
|
|
|
6047
6052
|
});
|
|
6048
6053
|
}
|
|
6049
6054
|
|
|
6050
|
-
// src/core/components/RemoraidProvider/index.tsx
|
|
6055
|
+
// src/core/components/RemoraidProvider/RouterProvider/index.tsx
|
|
6056
|
+
import {
|
|
6057
|
+
createContext as createContext4,
|
|
6058
|
+
useContext as useContext6
|
|
6059
|
+
} from "react";
|
|
6051
6060
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
6061
|
+
var defaultRouter = {
|
|
6062
|
+
pathname: "/",
|
|
6063
|
+
push: () => {}
|
|
6064
|
+
};
|
|
6065
|
+
var routerContext = createContext4(defaultRouter);
|
|
6066
|
+
var useRemoraidRouter = () => {
|
|
6067
|
+
return useContext6(routerContext);
|
|
6068
|
+
};
|
|
6069
|
+
var getWindowRouter = () => {
|
|
6070
|
+
if (typeof window === "undefined") {
|
|
6071
|
+
return defaultRouter;
|
|
6072
|
+
}
|
|
6073
|
+
return {
|
|
6074
|
+
pathname: window.location.pathname,
|
|
6075
|
+
push: (href) => {
|
|
6076
|
+
window.location.assign(href);
|
|
6077
|
+
},
|
|
6078
|
+
replace: (href) => {
|
|
6079
|
+
window.location.replace(href);
|
|
6080
|
+
}
|
|
6081
|
+
};
|
|
6082
|
+
};
|
|
6083
|
+
function RouterProvider({
|
|
6084
|
+
children,
|
|
6085
|
+
router
|
|
6086
|
+
}) {
|
|
6087
|
+
return /* @__PURE__ */ jsx7(routerContext.Provider, {
|
|
6088
|
+
value: router ?? getWindowRouter(),
|
|
6089
|
+
children
|
|
6090
|
+
});
|
|
6091
|
+
}
|
|
6092
|
+
|
|
6093
|
+
// src/core/components/RemoraidProvider/index.tsx
|
|
6094
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
6052
6095
|
function RemoraidProvider({
|
|
6053
6096
|
children,
|
|
6054
6097
|
theme,
|
|
6055
6098
|
initialUserExperience,
|
|
6099
|
+
router,
|
|
6056
6100
|
componentsProps
|
|
6057
6101
|
}) {
|
|
6058
|
-
return /* @__PURE__ */
|
|
6102
|
+
return /* @__PURE__ */ jsx8(CookiesProvider, {
|
|
6059
6103
|
...componentsProps?.CookiesProvider,
|
|
6060
|
-
children: /* @__PURE__ */
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
...componentsProps?.
|
|
6065
|
-
children: /* @__PURE__ */
|
|
6066
|
-
|
|
6067
|
-
...componentsProps?.
|
|
6068
|
-
children: /* @__PURE__ */
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6104
|
+
children: /* @__PURE__ */ jsx8(RouterProvider, {
|
|
6105
|
+
router,
|
|
6106
|
+
...componentsProps?.RouterProvider,
|
|
6107
|
+
children: /* @__PURE__ */ jsx8(HydrationStatusProvider, {
|
|
6108
|
+
...componentsProps?.HydrationStatusProviderProps,
|
|
6109
|
+
children: /* @__PURE__ */ jsx8(ThemeProvider, {
|
|
6110
|
+
theme,
|
|
6111
|
+
...componentsProps?.ThemeProvider,
|
|
6112
|
+
children: /* @__PURE__ */ jsx8(CoreUserExperienceProvider, {
|
|
6113
|
+
initialValue: initialUserExperience,
|
|
6114
|
+
...componentsProps?.CoreUserExperienceProvider,
|
|
6115
|
+
children: /* @__PURE__ */ jsx8(WidgetsProvider, {
|
|
6116
|
+
...componentsProps?.WidgetsProvider,
|
|
6117
|
+
children: /* @__PURE__ */ jsx8(LayoutsProvider, {
|
|
6118
|
+
...componentsProps?.LayoutsProviderProps,
|
|
6119
|
+
children
|
|
6120
|
+
})
|
|
6073
6121
|
})
|
|
6074
6122
|
})
|
|
6075
6123
|
})
|
|
@@ -6083,8 +6131,8 @@ import { useEffect as useEffect4 } from "react";
|
|
|
6083
6131
|
|
|
6084
6132
|
// src/core/components/AppShell/AppProvider/index.tsx
|
|
6085
6133
|
var import_lodash4 = __toESM(require_lodash(), 1);
|
|
6086
|
-
import { createContext as
|
|
6087
|
-
import { jsx as
|
|
6134
|
+
import { createContext as createContext5, useContext as useContext7 } from "react";
|
|
6135
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
6088
6136
|
var defaultAppContext = {
|
|
6089
6137
|
name: "Hello, World!",
|
|
6090
6138
|
nav: [],
|
|
@@ -6092,16 +6140,16 @@ var defaultAppContext = {
|
|
|
6092
6140
|
footerVariant: "minimal" /* Minimal */,
|
|
6093
6141
|
navbarMobileVariant: null
|
|
6094
6142
|
};
|
|
6095
|
-
var appContext =
|
|
6143
|
+
var appContext = createContext5(defaultAppContext);
|
|
6096
6144
|
var useRemoraidApp = () => {
|
|
6097
|
-
return
|
|
6145
|
+
return useContext7(appContext);
|
|
6098
6146
|
};
|
|
6099
6147
|
function AppProvider({
|
|
6100
6148
|
appContext: appContextProp,
|
|
6101
6149
|
children
|
|
6102
6150
|
}) {
|
|
6103
6151
|
const { logo, ...appContextPropWithoutLogo } = appContextProp;
|
|
6104
|
-
return /* @__PURE__ */
|
|
6152
|
+
return /* @__PURE__ */ jsx9(appContext.Provider, {
|
|
6105
6153
|
value: { ...import_lodash4.merge(defaultAppContext, appContextPropWithoutLogo), logo },
|
|
6106
6154
|
children
|
|
6107
6155
|
});
|
|
@@ -6112,7 +6160,7 @@ var import_lodash13 = __toESM(require_lodash(), 1);
|
|
|
6112
6160
|
|
|
6113
6161
|
// src/core/components/AppShell/AppShellUserExperienceProvider/index.tsx
|
|
6114
6162
|
var import_lodash12 = __toESM(require_lodash(), 1);
|
|
6115
|
-
import { useContext as
|
|
6163
|
+
import { useContext as useContext10 } from "react";
|
|
6116
6164
|
|
|
6117
6165
|
// src/core/components/AppShell/Footer/FooterMinimal/index.tsx
|
|
6118
6166
|
import { Center } from "@mantine/core";
|
|
@@ -6145,7 +6193,7 @@ function clsx() {
|
|
|
6145
6193
|
var clsx_default = clsx;
|
|
6146
6194
|
|
|
6147
6195
|
// src/core/components/Page/PageContainer/index.tsx
|
|
6148
|
-
import { jsx as
|
|
6196
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
6149
6197
|
function PageContainer({
|
|
6150
6198
|
children,
|
|
6151
6199
|
p = 0,
|
|
@@ -6153,7 +6201,7 @@ function PageContainer({
|
|
|
6153
6201
|
componentsProps
|
|
6154
6202
|
}) {
|
|
6155
6203
|
const theme = useRemoraidTheme();
|
|
6156
|
-
return /* @__PURE__ */
|
|
6204
|
+
return /* @__PURE__ */ jsx10(Container, {
|
|
6157
6205
|
size: theme.containerSize,
|
|
6158
6206
|
p,
|
|
6159
6207
|
w: "100%",
|
|
@@ -6171,14 +6219,14 @@ import {
|
|
|
6171
6219
|
Stack
|
|
6172
6220
|
} from "@mantine/core";
|
|
6173
6221
|
import {
|
|
6174
|
-
createContext as
|
|
6222
|
+
createContext as createContext7,
|
|
6175
6223
|
useCallback,
|
|
6176
|
-
useContext as
|
|
6224
|
+
useContext as useContext9,
|
|
6177
6225
|
useMemo as useMemo3
|
|
6178
6226
|
} from "react";
|
|
6179
6227
|
|
|
6180
6228
|
// src/core/components/FrameLayout/Element/index.tsx
|
|
6181
|
-
import { createContext as
|
|
6229
|
+
import { createContext as createContext6, useContext as useContext8 } from "react";
|
|
6182
6230
|
import { Box, Portal } from "@mantine/core";
|
|
6183
6231
|
|
|
6184
6232
|
// src/core/lib/errors.ts
|
|
@@ -6191,10 +6239,10 @@ class InvalidComponentUsageError extends Error {
|
|
|
6191
6239
|
|
|
6192
6240
|
// src/core/components/FrameLayout/Element/index.tsx
|
|
6193
6241
|
var import_lodash5 = __toESM(require_lodash(), 1);
|
|
6194
|
-
import { jsx as
|
|
6195
|
-
var layoutElementContext =
|
|
6242
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
6243
|
+
var layoutElementContext = createContext6(null);
|
|
6196
6244
|
var useFrameLayoutElement = () => {
|
|
6197
|
-
return
|
|
6245
|
+
return useContext8(layoutElementContext);
|
|
6198
6246
|
};
|
|
6199
6247
|
function Element2({
|
|
6200
6248
|
section,
|
|
@@ -6224,17 +6272,17 @@ function Element2({
|
|
|
6224
6272
|
if (section === "left" /* Left */ || section === "right" /* Right */) {
|
|
6225
6273
|
containerProps.h = "100%";
|
|
6226
6274
|
}
|
|
6227
|
-
const element = includePageContainer ? /* @__PURE__ */
|
|
6275
|
+
const element = includePageContainer ? /* @__PURE__ */ jsx11(PageContainer, {
|
|
6228
6276
|
p: 0,
|
|
6229
6277
|
hidden,
|
|
6230
6278
|
...componentsProps?.PageContainer,
|
|
6231
6279
|
children
|
|
6232
6280
|
}) : children;
|
|
6233
|
-
return /* @__PURE__ */
|
|
6281
|
+
return /* @__PURE__ */ jsx11(Portal, {
|
|
6234
6282
|
target: layout.sections[section],
|
|
6235
|
-
children: /* @__PURE__ */
|
|
6283
|
+
children: /* @__PURE__ */ jsx11(layoutElementContext.Provider, {
|
|
6236
6284
|
value: { layoutType: "frame" /* Frame */, section },
|
|
6237
|
-
children: includeContainer ? /* @__PURE__ */
|
|
6285
|
+
children: includeContainer ? /* @__PURE__ */ jsx11(Box, {
|
|
6238
6286
|
"data-hidden": hidden,
|
|
6239
6287
|
...import_lodash5.merge(containerProps, componentsProps?.container),
|
|
6240
6288
|
className: clsx_default("remoraid-frame-layout-element", containerProps?.className, componentsProps?.container?.className),
|
|
@@ -6245,10 +6293,10 @@ function Element2({
|
|
|
6245
6293
|
}
|
|
6246
6294
|
|
|
6247
6295
|
// src/core/components/FrameLayout/index.tsx
|
|
6248
|
-
import { jsx as
|
|
6249
|
-
var layoutContext =
|
|
6296
|
+
import { jsx as jsx12, jsxs } from "react/jsx-runtime";
|
|
6297
|
+
var layoutContext = createContext7(null);
|
|
6250
6298
|
var useFrameLayout = () => {
|
|
6251
|
-
return
|
|
6299
|
+
return useContext9(layoutContext);
|
|
6252
6300
|
};
|
|
6253
6301
|
function FrameLayout({
|
|
6254
6302
|
layoutId,
|
|
@@ -6305,7 +6353,7 @@ function FrameLayout({
|
|
|
6305
6353
|
["content" /* Content */]: n
|
|
6306
6354
|
}));
|
|
6307
6355
|
}, [setSections]);
|
|
6308
|
-
const contentSection = /* @__PURE__ */
|
|
6356
|
+
const contentSection = /* @__PURE__ */ jsx12(Stack, {
|
|
6309
6357
|
ref: contentSectionRef,
|
|
6310
6358
|
h: "100%",
|
|
6311
6359
|
gap: gutter,
|
|
@@ -6320,7 +6368,7 @@ function FrameLayout({
|
|
|
6320
6368
|
...layout,
|
|
6321
6369
|
layoutId
|
|
6322
6370
|
}), [layout?.sections, defaultSections, layoutId]);
|
|
6323
|
-
return /* @__PURE__ */
|
|
6371
|
+
return /* @__PURE__ */ jsx12(layoutContext.Provider, {
|
|
6324
6372
|
value: layoutContextValue,
|
|
6325
6373
|
children: /* @__PURE__ */ jsxs(Group, {
|
|
6326
6374
|
gap: 0,
|
|
@@ -6333,7 +6381,7 @@ function FrameLayout({
|
|
|
6333
6381
|
},
|
|
6334
6382
|
className: clsx_default("remoraid-frame-layout", componentsProps?.horizontalContainer?.className),
|
|
6335
6383
|
children: [
|
|
6336
|
-
/* @__PURE__ */
|
|
6384
|
+
/* @__PURE__ */ jsx12(Group, {
|
|
6337
6385
|
ref: leftSectionRef,
|
|
6338
6386
|
h: "100%",
|
|
6339
6387
|
wrap: "nowrap",
|
|
@@ -6349,19 +6397,19 @@ function FrameLayout({
|
|
|
6349
6397
|
...componentsProps?.verticalContainer,
|
|
6350
6398
|
className: clsx_default("remoraid-frame-layout-vertical-container", componentsProps?.verticalContainer?.className),
|
|
6351
6399
|
children: [
|
|
6352
|
-
/* @__PURE__ */
|
|
6400
|
+
/* @__PURE__ */ jsx12(Stack, {
|
|
6353
6401
|
ref: topSectionRef,
|
|
6354
6402
|
gap: gutter,
|
|
6355
6403
|
flex: 0,
|
|
6356
6404
|
...componentsProps?.sectionContainers?.["top" /* Top */],
|
|
6357
6405
|
className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-top-section", componentsProps?.sectionContainers?.["top" /* Top */]?.className)
|
|
6358
6406
|
}),
|
|
6359
|
-
includeScrollArea ? /* @__PURE__ */
|
|
6407
|
+
includeScrollArea ? /* @__PURE__ */ jsx12(ScrollArea, {
|
|
6360
6408
|
flex: 1,
|
|
6361
6409
|
...componentsProps?.ScrollArea,
|
|
6362
6410
|
children: contentSection
|
|
6363
6411
|
}) : contentSection,
|
|
6364
|
-
/* @__PURE__ */
|
|
6412
|
+
/* @__PURE__ */ jsx12(Stack, {
|
|
6365
6413
|
ref: bottomSectionRef,
|
|
6366
6414
|
gap: gutter,
|
|
6367
6415
|
flex: 0,
|
|
@@ -6370,7 +6418,7 @@ function FrameLayout({
|
|
|
6370
6418
|
})
|
|
6371
6419
|
]
|
|
6372
6420
|
}),
|
|
6373
|
-
/* @__PURE__ */
|
|
6421
|
+
/* @__PURE__ */ jsx12(Group, {
|
|
6374
6422
|
ref: rightSectionRef,
|
|
6375
6423
|
h: "100%",
|
|
6376
6424
|
gap: gutter,
|
|
@@ -6388,7 +6436,7 @@ var FrameLayout_default = Object.assign(FrameLayout, {
|
|
|
6388
6436
|
});
|
|
6389
6437
|
|
|
6390
6438
|
// src/core/components/AppShell/Footer/FooterMinimal/index.tsx
|
|
6391
|
-
import { jsx as
|
|
6439
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
6392
6440
|
function FooterMinimal({
|
|
6393
6441
|
icon: Icon2 = IconPennant,
|
|
6394
6442
|
componentsProps
|
|
@@ -6399,10 +6447,10 @@ function FooterMinimal({
|
|
|
6399
6447
|
footer: { position }
|
|
6400
6448
|
}
|
|
6401
6449
|
} = useAppShellUserExperience();
|
|
6402
|
-
const content = /* @__PURE__ */
|
|
6450
|
+
const content = /* @__PURE__ */ jsx13(PageContainer, {
|
|
6403
6451
|
...componentsProps?.container,
|
|
6404
|
-
children: /* @__PURE__ */
|
|
6405
|
-
children: /* @__PURE__ */
|
|
6452
|
+
children: /* @__PURE__ */ jsx13(Center, {
|
|
6453
|
+
children: /* @__PURE__ */ jsx13(Icon2, {
|
|
6406
6454
|
color: "var(--mantine-color-default-border)",
|
|
6407
6455
|
...theme.componentsProps.icons.huge,
|
|
6408
6456
|
...componentsProps?.icon
|
|
@@ -6410,7 +6458,7 @@ function FooterMinimal({
|
|
|
6410
6458
|
})
|
|
6411
6459
|
});
|
|
6412
6460
|
if (position === "bottom" /* Bottom */) {
|
|
6413
|
-
return /* @__PURE__ */
|
|
6461
|
+
return /* @__PURE__ */ jsx13(FrameLayout_default.Element, {
|
|
6414
6462
|
section: position,
|
|
6415
6463
|
includeContainer: true,
|
|
6416
6464
|
...componentsProps?.layoutElement,
|
|
@@ -6425,7 +6473,7 @@ function FooterMinimal({
|
|
|
6425
6473
|
}
|
|
6426
6474
|
|
|
6427
6475
|
// src/core/components/AppShell/Footer/index.tsx
|
|
6428
|
-
import { jsx as
|
|
6476
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
6429
6477
|
var supportedFooterPositions = {
|
|
6430
6478
|
["minimal" /* Minimal */]: [
|
|
6431
6479
|
null,
|
|
@@ -6439,7 +6487,7 @@ var defaultFooterPositions = {
|
|
|
6439
6487
|
function Footer({ componentsProps }) {
|
|
6440
6488
|
const { footerVariant } = useRemoraidApp();
|
|
6441
6489
|
if (footerVariant === "minimal" /* Minimal */) {
|
|
6442
|
-
return /* @__PURE__ */
|
|
6490
|
+
return /* @__PURE__ */ jsx14(FooterMinimal, {
|
|
6443
6491
|
...componentsProps?.FooterMinimal
|
|
6444
6492
|
});
|
|
6445
6493
|
}
|
|
@@ -6453,7 +6501,6 @@ var Footer_default = Object.assign(Footer, {
|
|
|
6453
6501
|
import { useState as useState7 } from "react";
|
|
6454
6502
|
|
|
6455
6503
|
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6456
|
-
import { isValidElement as isValidElement4 } from "react";
|
|
6457
6504
|
import {
|
|
6458
6505
|
Box as Box3,
|
|
6459
6506
|
Group as Group2,
|
|
@@ -6461,7 +6508,6 @@ import {
|
|
|
6461
6508
|
ScrollArea as ScrollArea2,
|
|
6462
6509
|
Stack as Stack2
|
|
6463
6510
|
} from "@mantine/core";
|
|
6464
|
-
import { usePathname as usePathname2, useRouter as useRouter2 } from "next/navigation";
|
|
6465
6511
|
var import_lodash8 = __toESM(require_lodash(), 1);
|
|
6466
6512
|
|
|
6467
6513
|
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/NavigationMenu/index.tsx
|
|
@@ -6471,9 +6517,8 @@ import {
|
|
|
6471
6517
|
Transition,
|
|
6472
6518
|
useMantineTheme as useMantineTheme2
|
|
6473
6519
|
} from "@mantine/core";
|
|
6474
|
-
import { usePathname, useRouter } from "next/navigation";
|
|
6475
6520
|
import { isValidElement as isValidElement2 } from "react";
|
|
6476
|
-
import { jsx as
|
|
6521
|
+
import { jsx as jsx15, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
6477
6522
|
function NavigationMenu({
|
|
6478
6523
|
target,
|
|
6479
6524
|
elements,
|
|
@@ -6482,13 +6527,13 @@ function NavigationMenu({
|
|
|
6482
6527
|
}) {
|
|
6483
6528
|
const theme = useRemoraidTheme();
|
|
6484
6529
|
const mantineTheme = useMantineTheme2();
|
|
6485
|
-
const
|
|
6486
|
-
const
|
|
6487
|
-
const item = (element) => /* @__PURE__ */
|
|
6530
|
+
const router = useRemoraidRouter();
|
|
6531
|
+
const { pathname } = router;
|
|
6532
|
+
const item = (element) => /* @__PURE__ */ jsx15(Transition, {
|
|
6488
6533
|
mounted: element.mounted ?? true,
|
|
6489
6534
|
...componentsProps?.transition,
|
|
6490
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
6491
|
-
leftSection: element.icon ? /* @__PURE__ */
|
|
6535
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx15(Menu.Item, {
|
|
6536
|
+
leftSection: element.icon ? /* @__PURE__ */ jsx15(element.icon, {
|
|
6492
6537
|
...theme.componentsProps.icons.small
|
|
6493
6538
|
}) : undefined,
|
|
6494
6539
|
c: element.type === "anchor" /* Anchor */ && element.href === pathname ? mantineTheme.primaryColor : undefined,
|
|
@@ -6512,17 +6557,17 @@ function NavigationMenu({
|
|
|
6512
6557
|
trigger: "click-hover",
|
|
6513
6558
|
...componentsProps?.Menu,
|
|
6514
6559
|
children: [
|
|
6515
|
-
/* @__PURE__ */
|
|
6516
|
-
children: /* @__PURE__ */
|
|
6560
|
+
/* @__PURE__ */ jsx15(Menu.Target, {
|
|
6561
|
+
children: /* @__PURE__ */ jsx15(Box2, {
|
|
6517
6562
|
children: targetElement
|
|
6518
6563
|
})
|
|
6519
6564
|
}),
|
|
6520
6565
|
/* @__PURE__ */ jsxs2(Menu.Dropdown, {
|
|
6521
6566
|
children: [
|
|
6522
|
-
label !== undefined && /* @__PURE__ */
|
|
6567
|
+
label !== undefined && /* @__PURE__ */ jsx15(Menu.Label, {
|
|
6523
6568
|
children: label
|
|
6524
6569
|
}),
|
|
6525
|
-
elements.map((element, i) => /* @__PURE__ */
|
|
6570
|
+
elements.map((element, i) => /* @__PURE__ */ jsx15(NavigationMenu, {
|
|
6526
6571
|
target: item(element),
|
|
6527
6572
|
elements: element.children,
|
|
6528
6573
|
componentsProps
|
|
@@ -6548,7 +6593,7 @@ import { IconClick } from "@tabler/icons-react";
|
|
|
6548
6593
|
import {
|
|
6549
6594
|
isValidElement as isValidElement3
|
|
6550
6595
|
} from "react";
|
|
6551
|
-
import { jsx as
|
|
6596
|
+
import { jsx as jsx16, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
|
|
6552
6597
|
var defaultRemoraidButtonSize = "sm";
|
|
6553
6598
|
function RemoraidButton({
|
|
6554
6599
|
label,
|
|
@@ -6572,7 +6617,7 @@ function RemoraidButton({
|
|
|
6572
6617
|
const collapsed = collapsedProp ?? false;
|
|
6573
6618
|
const iconSize = iconSizeProp ?? getDefaultButtonIconSize(size);
|
|
6574
6619
|
const Icon3 = iconProp ?? IconClick;
|
|
6575
|
-
const iconElement = isValidElement3(Icon3) ? Icon3 : /* @__PURE__ */
|
|
6620
|
+
const iconElement = isValidElement3(Icon3) ? Icon3 : /* @__PURE__ */ jsx16(Icon3, {
|
|
6576
6621
|
...import_lodash7.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
6577
6622
|
});
|
|
6578
6623
|
const clickTransformationClassNames = {
|
|
@@ -6585,7 +6630,7 @@ function RemoraidButton({
|
|
|
6585
6630
|
["tiltRight" /* TiltRight */]: "remoraid-button-tilt-right"
|
|
6586
6631
|
};
|
|
6587
6632
|
const clickTransformationClass = clickTransformationClassNames[clickTransformation];
|
|
6588
|
-
return /* @__PURE__ */
|
|
6633
|
+
return /* @__PURE__ */ jsx16(Transition2, {
|
|
6589
6634
|
mounted,
|
|
6590
6635
|
transition: "fade",
|
|
6591
6636
|
duration: theme.transitionDurations.short,
|
|
@@ -6593,10 +6638,10 @@ function RemoraidButton({
|
|
|
6593
6638
|
...componentsProps?.transition,
|
|
6594
6639
|
children: (transitionStyle) => /* @__PURE__ */ jsxs3(Fragment, {
|
|
6595
6640
|
children: [
|
|
6596
|
-
/* @__PURE__ */
|
|
6641
|
+
/* @__PURE__ */ jsx16(Tooltip, {
|
|
6597
6642
|
label,
|
|
6598
6643
|
...componentsProps?.tooltip,
|
|
6599
|
-
children: /* @__PURE__ */
|
|
6644
|
+
children: /* @__PURE__ */ jsx16(ActionIcon, {
|
|
6600
6645
|
"aria-label": label,
|
|
6601
6646
|
variant,
|
|
6602
6647
|
onClick,
|
|
@@ -6612,7 +6657,7 @@ function RemoraidButton({
|
|
|
6612
6657
|
children: iconElement
|
|
6613
6658
|
})
|
|
6614
6659
|
}),
|
|
6615
|
-
/* @__PURE__ */
|
|
6660
|
+
/* @__PURE__ */ jsx16(Button, {
|
|
6616
6661
|
onClick,
|
|
6617
6662
|
loading,
|
|
6618
6663
|
variant,
|
|
@@ -6633,8 +6678,7 @@ function RemoraidButton({
|
|
|
6633
6678
|
}
|
|
6634
6679
|
|
|
6635
6680
|
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6636
|
-
import
|
|
6637
|
-
import { jsx as jsx16, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
6681
|
+
import { jsx as jsx17, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
6638
6682
|
function NavbarMinimalContent({
|
|
6639
6683
|
orientation,
|
|
6640
6684
|
maxElements,
|
|
@@ -6644,8 +6688,8 @@ function NavbarMinimalContent({
|
|
|
6644
6688
|
const theme = useRemoraidTheme();
|
|
6645
6689
|
const { userExperience: appShellUserExperience } = useAppShellUserExperience();
|
|
6646
6690
|
const app = useRemoraidApp();
|
|
6647
|
-
const router =
|
|
6648
|
-
const pathname =
|
|
6691
|
+
const router = useRemoraidRouter();
|
|
6692
|
+
const { pathname } = router;
|
|
6649
6693
|
const layoutElement = useFrameLayoutElement();
|
|
6650
6694
|
const { colorScheme, setColorScheme } = useHydratedMantineColorScheme();
|
|
6651
6695
|
const collapseStaticElementsBreakpoint = collapseStaticElementsBreakpointProp ?? theme.breakpoints.navbarStaticElementsCollapse;
|
|
@@ -6666,21 +6710,10 @@ function NavbarMinimalContent({
|
|
|
6666
6710
|
buttonCollapsed = false;
|
|
6667
6711
|
}
|
|
6668
6712
|
const buttonClickTransformation = orientation === "horizontal" /* Horizontal */ ? "tiltRight" /* TiltRight */ : "default" /* Default */;
|
|
6669
|
-
const
|
|
6670
|
-
const logoIconSize = getDefaultButtonIconSize(logoButtonSize);
|
|
6671
|
-
const logoButton = app.logo ? /* @__PURE__ */ jsx16(RemoraidButton, {
|
|
6713
|
+
const logoButton = app.logo ? /* @__PURE__ */ jsx17(RemoraidButton, {
|
|
6672
6714
|
label: app.name,
|
|
6673
6715
|
variant: "subtle",
|
|
6674
|
-
icon:
|
|
6675
|
-
src: app.logo,
|
|
6676
|
-
alt: "App logo",
|
|
6677
|
-
...componentsProps?.logo,
|
|
6678
|
-
style: {
|
|
6679
|
-
width: theme.componentsProps.icons[logoIconSize].size,
|
|
6680
|
-
height: theme.componentsProps.icons[logoIconSize].size,
|
|
6681
|
-
...componentsProps?.logo?.style
|
|
6682
|
-
}
|
|
6683
|
-
}),
|
|
6716
|
+
icon: app.logo,
|
|
6684
6717
|
responsive: buttonResponsive,
|
|
6685
6718
|
collapsed: buttonCollapsed,
|
|
6686
6719
|
clickTransformation: buttonClickTransformation,
|
|
@@ -6698,9 +6731,9 @@ function NavbarMinimalContent({
|
|
|
6698
6731
|
componentsProps?.logoButton?.onClick?.(e);
|
|
6699
6732
|
}
|
|
6700
6733
|
}) : undefined;
|
|
6701
|
-
const button = (element, key) => /* @__PURE__ */
|
|
6734
|
+
const button = (element, key) => /* @__PURE__ */ jsx17(NavigationMenu, {
|
|
6702
6735
|
label: element.label,
|
|
6703
|
-
target: /* @__PURE__ */
|
|
6736
|
+
target: /* @__PURE__ */ jsx17(RemoraidButton, {
|
|
6704
6737
|
mounted: element.mounted,
|
|
6705
6738
|
label: element.label,
|
|
6706
6739
|
icon: element.icon,
|
|
@@ -6743,11 +6776,11 @@ function NavbarMinimalContent({
|
|
|
6743
6776
|
const staticElements = elements.filter((element) => element.static);
|
|
6744
6777
|
const staticButtons = staticElements.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0)).map((element, i) => button(element, `static-nav-element-${i}`));
|
|
6745
6778
|
const collapseStaticElements = staticElements.filter((element) => element.mounted ?? true).length > 1;
|
|
6746
|
-
const staticMenuButton = collapseStaticElements ? /* @__PURE__ */
|
|
6779
|
+
const staticMenuButton = collapseStaticElements ? /* @__PURE__ */ jsx17(Box3, {
|
|
6747
6780
|
hiddenFrom: collapseStaticElementsBreakpoint,
|
|
6748
|
-
children: /* @__PURE__ */
|
|
6781
|
+
children: /* @__PURE__ */ jsx17(NavigationMenu, {
|
|
6749
6782
|
elements: staticElements,
|
|
6750
|
-
target: /* @__PURE__ */
|
|
6783
|
+
target: /* @__PURE__ */ jsx17(RemoraidButton, {
|
|
6751
6784
|
label: "Static elements",
|
|
6752
6785
|
icon: IconDots,
|
|
6753
6786
|
responsive: orientation === "vertical" /* Vertical */ ? buttonResponsive : false,
|
|
@@ -6768,7 +6801,7 @@ function NavbarMinimalContent({
|
|
|
6768
6801
|
}, componentsProps?.NavigationMenu?.componentsProps)
|
|
6769
6802
|
})
|
|
6770
6803
|
}) : null;
|
|
6771
|
-
return /* @__PURE__ */
|
|
6804
|
+
return /* @__PURE__ */ jsx17(Paper, {
|
|
6772
6805
|
bg: theme.transparentBackground,
|
|
6773
6806
|
h: "100%",
|
|
6774
6807
|
p: "md",
|
|
@@ -6778,13 +6811,13 @@ function NavbarMinimalContent({
|
|
|
6778
6811
|
h: "100%",
|
|
6779
6812
|
children: [
|
|
6780
6813
|
logoButton,
|
|
6781
|
-
/* @__PURE__ */
|
|
6814
|
+
/* @__PURE__ */ jsx17(ScrollArea2, {
|
|
6782
6815
|
flex: 1,
|
|
6783
|
-
children: /* @__PURE__ */
|
|
6816
|
+
children: /* @__PURE__ */ jsx17(Stack2, {
|
|
6784
6817
|
children: buttons
|
|
6785
6818
|
})
|
|
6786
6819
|
}),
|
|
6787
|
-
/* @__PURE__ */
|
|
6820
|
+
/* @__PURE__ */ jsx17(Stack2, {
|
|
6788
6821
|
visibleFrom: collapseStaticElements ? collapseStaticElementsBreakpoint : undefined,
|
|
6789
6822
|
children: staticButtons
|
|
6790
6823
|
}),
|
|
@@ -6794,15 +6827,15 @@ function NavbarMinimalContent({
|
|
|
6794
6827
|
wrap: "nowrap",
|
|
6795
6828
|
children: [
|
|
6796
6829
|
logoButton,
|
|
6797
|
-
/* @__PURE__ */
|
|
6830
|
+
/* @__PURE__ */ jsx17(ScrollArea2, {
|
|
6798
6831
|
flex: 1,
|
|
6799
6832
|
style: { contain: "inline-size" },
|
|
6800
|
-
children: /* @__PURE__ */
|
|
6833
|
+
children: /* @__PURE__ */ jsx17(Group2, {
|
|
6801
6834
|
wrap: "nowrap",
|
|
6802
6835
|
children: buttons
|
|
6803
6836
|
})
|
|
6804
6837
|
}),
|
|
6805
|
-
/* @__PURE__ */
|
|
6838
|
+
/* @__PURE__ */ jsx17(Group2, {
|
|
6806
6839
|
wrap: "nowrap",
|
|
6807
6840
|
visibleFrom: collapseStaticElements ? collapseStaticElementsBreakpoint : undefined,
|
|
6808
6841
|
children: staticButtons
|
|
@@ -6834,7 +6867,7 @@ import {
|
|
|
6834
6867
|
} from "@mantine/core";
|
|
6835
6868
|
import { IconClick as IconClick2 } from "@tabler/icons-react";
|
|
6836
6869
|
var import_lodash9 = __toESM(require_lodash(), 1);
|
|
6837
|
-
import { jsx as
|
|
6870
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
6838
6871
|
function ControlButton({
|
|
6839
6872
|
icon: Icon4 = IconClick2,
|
|
6840
6873
|
mounted = true,
|
|
@@ -6847,17 +6880,17 @@ function ControlButton({
|
|
|
6847
6880
|
componentsProps
|
|
6848
6881
|
}) {
|
|
6849
6882
|
const theme = useRemoraidTheme();
|
|
6850
|
-
return /* @__PURE__ */
|
|
6883
|
+
return /* @__PURE__ */ jsx18(Transition3, {
|
|
6851
6884
|
mounted,
|
|
6852
6885
|
transition: "fade",
|
|
6853
6886
|
duration: theme.transitionDurations.short,
|
|
6854
6887
|
timingFunction: "ease",
|
|
6855
6888
|
...componentsProps?.transition,
|
|
6856
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
6889
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx18(Tooltip2, {
|
|
6857
6890
|
label: tooltip,
|
|
6858
6891
|
disabled: !Boolean(tooltip),
|
|
6859
6892
|
...componentsProps?.tooltip,
|
|
6860
|
-
children: /* @__PURE__ */
|
|
6893
|
+
children: /* @__PURE__ */ jsx18(ActionIcon2, {
|
|
6861
6894
|
"data-control-button": true,
|
|
6862
6895
|
size,
|
|
6863
6896
|
color,
|
|
@@ -6868,7 +6901,7 @@ function ControlButton({
|
|
|
6868
6901
|
order,
|
|
6869
6902
|
...import_lodash9.merge(transitionStyle, componentsProps?.button?.style)
|
|
6870
6903
|
},
|
|
6871
|
-
children: /* @__PURE__ */
|
|
6904
|
+
children: /* @__PURE__ */ jsx18(Icon4, {
|
|
6872
6905
|
...import_lodash9.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
6873
6906
|
})
|
|
6874
6907
|
})
|
|
@@ -6885,7 +6918,7 @@ import {
|
|
|
6885
6918
|
} from "@mantine/core";
|
|
6886
6919
|
import { IconGripHorizontal } from "@tabler/icons-react";
|
|
6887
6920
|
var import_lodash10 = __toESM(require_lodash(), 1);
|
|
6888
|
-
import { jsx as
|
|
6921
|
+
import { jsx as jsx19, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
6889
6922
|
function Controls({
|
|
6890
6923
|
groupRef,
|
|
6891
6924
|
mounted = true,
|
|
@@ -6943,14 +6976,14 @@ function Controls({
|
|
|
6943
6976
|
const handlePointerUp = (e) => {
|
|
6944
6977
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
6945
6978
|
};
|
|
6946
|
-
return /* @__PURE__ */
|
|
6979
|
+
return /* @__PURE__ */ jsx19(Transition4, {
|
|
6947
6980
|
mounted,
|
|
6948
6981
|
keepMounted: true,
|
|
6949
6982
|
transition: "pop",
|
|
6950
6983
|
duration: theme.transitionDurations.short,
|
|
6951
6984
|
timingFunction: "ease",
|
|
6952
6985
|
...componentsProps?.transition,
|
|
6953
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
6986
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx19(Paper2, {
|
|
6954
6987
|
ref: containerRef,
|
|
6955
6988
|
pos: "absolute",
|
|
6956
6989
|
p: gutter,
|
|
@@ -6973,7 +7006,7 @@ function Controls({
|
|
|
6973
7006
|
...componentsProps?.group,
|
|
6974
7007
|
className: clsx_default("remoraid-controls-group", componentsProps?.group?.className),
|
|
6975
7008
|
children: [
|
|
6976
|
-
/* @__PURE__ */
|
|
7009
|
+
/* @__PURE__ */ jsx19(IconGripHorizontal, {
|
|
6977
7010
|
...import_lodash10.merge({}, theme.componentsProps.icons[iconSize], { order: -100, color: "var(--mantine-color-default-border)" }, componentsProps?.gripIcon)
|
|
6978
7011
|
}),
|
|
6979
7012
|
children,
|
|
@@ -6981,7 +7014,7 @@ function Controls({
|
|
|
6981
7014
|
if (isValidElementOfType(ControlButton, button)) {
|
|
6982
7015
|
return button;
|
|
6983
7016
|
}
|
|
6984
|
-
return /* @__PURE__ */
|
|
7017
|
+
return /* @__PURE__ */ jsx19(ControlButton, {
|
|
6985
7018
|
...button
|
|
6986
7019
|
}, i);
|
|
6987
7020
|
})
|
|
@@ -6992,7 +7025,7 @@ function Controls({
|
|
|
6992
7025
|
}
|
|
6993
7026
|
|
|
6994
7027
|
// src/core/components/Pinnable/index.tsx
|
|
6995
|
-
import { jsx as
|
|
7028
|
+
import { jsx as jsx20, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
6996
7029
|
function Pinnable({
|
|
6997
7030
|
layoutType: layoutTypeProp,
|
|
6998
7031
|
section,
|
|
@@ -7012,7 +7045,7 @@ function Pinnable({
|
|
|
7012
7045
|
if (layout && layout.type !== layoutType) {
|
|
7013
7046
|
throw new TypeError(`Prop 'layoutId' in '${Pinnable.name}' refers to a layout of type ${layout.type}, expected ${layoutType}. Leave 'layoutId' undefined, if you want to use the layout in '${AppShell_default.name}' as reference layout.`);
|
|
7014
7047
|
}
|
|
7015
|
-
const controlButton = useMemo4(() => /* @__PURE__ */
|
|
7048
|
+
const controlButton = useMemo4(() => /* @__PURE__ */ jsx20(ControlButton, {
|
|
7016
7049
|
icon: pinned ? IconPinnedOff : IconPin,
|
|
7017
7050
|
tooltip: pinned ? "Unpin" : "Pin",
|
|
7018
7051
|
color: "green",
|
|
@@ -7031,11 +7064,11 @@ function Pinnable({
|
|
|
7031
7064
|
...componentsProps?.container,
|
|
7032
7065
|
className: clsx_default("remoraid-pinnable", componentsProps?.container?.className),
|
|
7033
7066
|
children: [
|
|
7034
|
-
controlsContainer === undefined ? /* @__PURE__ */
|
|
7067
|
+
controlsContainer === undefined ? /* @__PURE__ */ jsx20(Controls, {
|
|
7035
7068
|
dragContainerRef: containerRef,
|
|
7036
7069
|
...componentsProps?.controls,
|
|
7037
7070
|
children: controlButton
|
|
7038
|
-
}) : controlsContainer !== null && /* @__PURE__ */
|
|
7071
|
+
}) : controlsContainer !== null && /* @__PURE__ */ jsx20(Portal2, {
|
|
7039
7072
|
target: controlsContainer,
|
|
7040
7073
|
children: controlButton
|
|
7041
7074
|
}),
|
|
@@ -7049,7 +7082,7 @@ function Pinnable({
|
|
|
7049
7082
|
return null;
|
|
7050
7083
|
}
|
|
7051
7084
|
if (pinned && layoutType === "frame" /* Frame */) {
|
|
7052
|
-
return /* @__PURE__ */
|
|
7085
|
+
return /* @__PURE__ */ jsx20(FrameLayout_default.Element, {
|
|
7053
7086
|
layoutId,
|
|
7054
7087
|
section,
|
|
7055
7088
|
hidden,
|
|
@@ -7061,7 +7094,7 @@ function Pinnable({
|
|
|
7061
7094
|
}
|
|
7062
7095
|
|
|
7063
7096
|
// src/core/components/AppShell/Navbar/NavbarMinimal/index.tsx
|
|
7064
|
-
import { jsx as
|
|
7097
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
7065
7098
|
function NavbarMinimal({
|
|
7066
7099
|
pinnable = true,
|
|
7067
7100
|
componentsProps
|
|
@@ -7079,7 +7112,7 @@ function NavbarMinimal({
|
|
|
7079
7112
|
setHover(false);
|
|
7080
7113
|
};
|
|
7081
7114
|
if (position === "left" /* Left */ || position === "right" /* Right */) {
|
|
7082
|
-
return /* @__PURE__ */
|
|
7115
|
+
return /* @__PURE__ */ jsx21(FrameLayout_default.Element, {
|
|
7083
7116
|
section: position,
|
|
7084
7117
|
includeContainer: true,
|
|
7085
7118
|
...componentsProps?.layoutElement,
|
|
@@ -7090,19 +7123,19 @@ function NavbarMinimal({
|
|
|
7090
7123
|
}
|
|
7091
7124
|
}
|
|
7092
7125
|
}, componentsProps?.layoutElement?.componentsProps),
|
|
7093
|
-
children: /* @__PURE__ */
|
|
7126
|
+
children: /* @__PURE__ */ jsx21(NavbarMinimalContent, {
|
|
7094
7127
|
orientation: "vertical" /* Vertical */,
|
|
7095
7128
|
...componentsProps?.content
|
|
7096
7129
|
})
|
|
7097
7130
|
});
|
|
7098
7131
|
}
|
|
7099
7132
|
if (position === "top" /* Top */ || position === "bottom" /* Bottom */) {
|
|
7100
|
-
const content = /* @__PURE__ */
|
|
7133
|
+
const content = /* @__PURE__ */ jsx21(NavbarMinimalContent, {
|
|
7101
7134
|
orientation: "horizontal" /* Horizontal */,
|
|
7102
7135
|
...componentsProps?.content
|
|
7103
7136
|
});
|
|
7104
7137
|
if (pinnable) {
|
|
7105
|
-
return /* @__PURE__ */
|
|
7138
|
+
return /* @__PURE__ */ jsx21(PageContainer, {
|
|
7106
7139
|
...componentsProps?.container,
|
|
7107
7140
|
componentsProps: {
|
|
7108
7141
|
...componentsProps?.container?.componentsProps,
|
|
@@ -7111,7 +7144,7 @@ function NavbarMinimal({
|
|
|
7111
7144
|
className: clsx_default("hide-if-empty", componentsProps?.container?.componentsProps?.container?.className)
|
|
7112
7145
|
}
|
|
7113
7146
|
},
|
|
7114
|
-
children: /* @__PURE__ */
|
|
7147
|
+
children: /* @__PURE__ */ jsx21(Pinnable, {
|
|
7115
7148
|
section: position,
|
|
7116
7149
|
initialValue: true,
|
|
7117
7150
|
...componentsProps?.Pinnable,
|
|
@@ -7154,9 +7187,9 @@ function NavbarMinimal({
|
|
|
7154
7187
|
return content;
|
|
7155
7188
|
}
|
|
7156
7189
|
if (position === "content" /* Content */) {
|
|
7157
|
-
return /* @__PURE__ */
|
|
7190
|
+
return /* @__PURE__ */ jsx21(PageContainer, {
|
|
7158
7191
|
...componentsProps?.container,
|
|
7159
|
-
children: /* @__PURE__ */
|
|
7192
|
+
children: /* @__PURE__ */ jsx21(NavbarMinimalContent, {
|
|
7160
7193
|
orientation: "horizontal" /* Horizontal */,
|
|
7161
7194
|
...componentsProps?.content
|
|
7162
7195
|
})
|
|
@@ -7167,7 +7200,7 @@ function NavbarMinimal({
|
|
|
7167
7200
|
|
|
7168
7201
|
// src/core/components/AppShell/Navbar/index.tsx
|
|
7169
7202
|
import { IconLogin, IconLogout, IconMoon, IconSun } from "@tabler/icons-react";
|
|
7170
|
-
import { jsx as
|
|
7203
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
7171
7204
|
var supportedNavbarPositions = {
|
|
7172
7205
|
["minimal" /* Minimal */]: [
|
|
7173
7206
|
null,
|
|
@@ -7215,21 +7248,21 @@ var getDefaultNavigationElements = ({
|
|
|
7215
7248
|
}
|
|
7216
7249
|
}
|
|
7217
7250
|
];
|
|
7218
|
-
function
|
|
7251
|
+
function Navbar({ componentsProps }) {
|
|
7219
7252
|
const { navbarVariant } = useRemoraidApp();
|
|
7220
7253
|
if (navbarVariant === "minimal" /* Minimal */) {
|
|
7221
|
-
return /* @__PURE__ */
|
|
7254
|
+
return /* @__PURE__ */ jsx22(NavbarMinimal, {
|
|
7222
7255
|
...componentsProps?.NavbarMinimal
|
|
7223
7256
|
});
|
|
7224
7257
|
}
|
|
7225
7258
|
return null;
|
|
7226
7259
|
}
|
|
7227
|
-
var Navbar_default = Object.assign(
|
|
7260
|
+
var Navbar_default = Object.assign(Navbar, {
|
|
7228
7261
|
NavbarMinimal
|
|
7229
7262
|
});
|
|
7230
7263
|
|
|
7231
7264
|
// src/core/components/AppShell/AppShellUserExperienceProvider/index.tsx
|
|
7232
|
-
import { jsx as
|
|
7265
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
7233
7266
|
var defaultAppShellUserExperience = {
|
|
7234
7267
|
navbar: {
|
|
7235
7268
|
position: null,
|
|
@@ -7243,7 +7276,7 @@ var defaultAppShellUserExperience = {
|
|
|
7243
7276
|
var defaultAppShellUserExperienceCookieName = "remoraid-app-shell-user-experience";
|
|
7244
7277
|
var appShellUserExperienceContext = createUserExperienceContext(defaultAppShellUserExperience);
|
|
7245
7278
|
var useAppShellUserExperience = () => {
|
|
7246
|
-
return
|
|
7279
|
+
return useContext10(appShellUserExperienceContext);
|
|
7247
7280
|
};
|
|
7248
7281
|
function AppShellUserExperienceProvider({
|
|
7249
7282
|
children,
|
|
@@ -7266,7 +7299,7 @@ function AppShellUserExperienceProvider({
|
|
|
7266
7299
|
}
|
|
7267
7300
|
return true;
|
|
7268
7301
|
};
|
|
7269
|
-
return /* @__PURE__ */
|
|
7302
|
+
return /* @__PURE__ */ jsx23(UserExperienceProviderWrapper, {
|
|
7270
7303
|
context: appShellUserExperienceContext,
|
|
7271
7304
|
isValidUserExperience,
|
|
7272
7305
|
cookieName: cookieName ?? defaultAppShellUserExperienceCookieName,
|
|
@@ -7284,7 +7317,7 @@ function AppShellUserExperienceProvider({
|
|
|
7284
7317
|
}
|
|
7285
7318
|
|
|
7286
7319
|
// src/core/components/AppShell/index.tsx
|
|
7287
|
-
import { jsx as
|
|
7320
|
+
import { jsx as jsx24, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
7288
7321
|
var remoraidAppShellLayoutId = "remoraid-app-shell";
|
|
7289
7322
|
function AppShell({
|
|
7290
7323
|
gutter,
|
|
@@ -7308,13 +7341,13 @@ function AppShell({
|
|
|
7308
7341
|
}
|
|
7309
7342
|
meta.content = computedBodyColor;
|
|
7310
7343
|
}, [colorScheme]);
|
|
7311
|
-
return /* @__PURE__ */
|
|
7344
|
+
return /* @__PURE__ */ jsx24(AppProvider, {
|
|
7312
7345
|
appContext: appContext2,
|
|
7313
7346
|
...componentsProps?.AppProvider,
|
|
7314
|
-
children: /* @__PURE__ */
|
|
7347
|
+
children: /* @__PURE__ */ jsx24(AppShellUserExperienceProvider, {
|
|
7315
7348
|
...componentsProps?.AppShellUserExperienceProvider,
|
|
7316
7349
|
initialValue: import_lodash13.merge(initialUserExperience, componentsProps?.AppShellUserExperienceProvider?.initialValue),
|
|
7317
|
-
children: /* @__PURE__ */
|
|
7350
|
+
children: /* @__PURE__ */ jsx24(Box5, {
|
|
7318
7351
|
h: "100dvh",
|
|
7319
7352
|
...componentsProps?.container,
|
|
7320
7353
|
children: /* @__PURE__ */ jsxs7(FrameLayout_default, {
|
|
@@ -7322,11 +7355,11 @@ function AppShell({
|
|
|
7322
7355
|
gutter: gutter ?? theme.primaryGutter,
|
|
7323
7356
|
...componentsProps?.layout,
|
|
7324
7357
|
children: [
|
|
7325
|
-
/* @__PURE__ */
|
|
7358
|
+
/* @__PURE__ */ jsx24(Navbar_default, {
|
|
7326
7359
|
...componentsProps?.navbar
|
|
7327
7360
|
}),
|
|
7328
7361
|
children,
|
|
7329
|
-
/* @__PURE__ */
|
|
7362
|
+
/* @__PURE__ */ jsx24(Footer_default, {
|
|
7330
7363
|
...componentsProps?.footer
|
|
7331
7364
|
})
|
|
7332
7365
|
]
|
|
@@ -7352,15 +7385,14 @@ import {
|
|
|
7352
7385
|
|
|
7353
7386
|
// src/core/components/Page/index.tsx
|
|
7354
7387
|
import { Stack as Stack3 } from "@mantine/core";
|
|
7355
|
-
import
|
|
7356
|
-
useContext as
|
|
7388
|
+
import React8, {
|
|
7389
|
+
useContext as useContext11,
|
|
7357
7390
|
useEffect as useEffect5
|
|
7358
7391
|
} from "react";
|
|
7359
|
-
import {
|
|
7360
|
-
|
|
7361
|
-
var pageContext = React7.createContext(null);
|
|
7392
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
7393
|
+
var pageContext = React8.createContext(null);
|
|
7362
7394
|
var usePage = () => {
|
|
7363
|
-
return
|
|
7395
|
+
return useContext11(pageContext);
|
|
7364
7396
|
};
|
|
7365
7397
|
function Page({
|
|
7366
7398
|
children,
|
|
@@ -7370,7 +7402,7 @@ function Page({
|
|
|
7370
7402
|
componentsProps
|
|
7371
7403
|
}) {
|
|
7372
7404
|
const theme = useRemoraidTheme();
|
|
7373
|
-
const pathname =
|
|
7405
|
+
const { pathname } = useRemoraidRouter();
|
|
7374
7406
|
const { isPageRegistered, registerPage } = useWidgets();
|
|
7375
7407
|
const pageId = config?.pageId ?? pathname;
|
|
7376
7408
|
useEffect5(() => {
|
|
@@ -7380,11 +7412,11 @@ function Page({
|
|
|
7380
7412
|
}
|
|
7381
7413
|
}
|
|
7382
7414
|
}, []);
|
|
7383
|
-
return /* @__PURE__ */
|
|
7384
|
-
value: { name: name ??
|
|
7385
|
-
children: /* @__PURE__ */
|
|
7415
|
+
return /* @__PURE__ */ jsx25(pageContext.Provider, {
|
|
7416
|
+
value: { name: name ?? pageId, pageId, ...config },
|
|
7417
|
+
children: /* @__PURE__ */ jsx25(PageContainer, {
|
|
7386
7418
|
...componentsProps?.PageContainer,
|
|
7387
|
-
children: /* @__PURE__ */
|
|
7419
|
+
children: /* @__PURE__ */ jsx25(Stack3, {
|
|
7388
7420
|
gap: gap ?? theme.primaryGutter,
|
|
7389
7421
|
...componentsProps?.Stack,
|
|
7390
7422
|
className: clsx_default("remoraid-page", componentsProps?.Stack?.className),
|
|
@@ -7404,7 +7436,7 @@ import {
|
|
|
7404
7436
|
Flex,
|
|
7405
7437
|
ScrollArea as ScrollArea3
|
|
7406
7438
|
} from "@mantine/core";
|
|
7407
|
-
import { jsx as
|
|
7439
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
7408
7440
|
function ScrollableChipGroup({
|
|
7409
7441
|
value,
|
|
7410
7442
|
ref,
|
|
@@ -7413,16 +7445,16 @@ function ScrollableChipGroup({
|
|
|
7413
7445
|
componentsProps,
|
|
7414
7446
|
children
|
|
7415
7447
|
}) {
|
|
7416
|
-
return /* @__PURE__ */
|
|
7448
|
+
return /* @__PURE__ */ jsx26(ScrollArea3, {
|
|
7417
7449
|
ref,
|
|
7418
7450
|
...componentsProps?.ScrollArea,
|
|
7419
7451
|
style: { contain: "inline-size", ...componentsProps?.ScrollArea?.style },
|
|
7420
|
-
children: /* @__PURE__ */
|
|
7452
|
+
children: /* @__PURE__ */ jsx26(Chip.Group, {
|
|
7421
7453
|
value,
|
|
7422
7454
|
onChange,
|
|
7423
7455
|
...componentsProps?.chipGroup,
|
|
7424
7456
|
multiple: true,
|
|
7425
|
-
children: /* @__PURE__ */
|
|
7457
|
+
children: /* @__PURE__ */ jsx26(Flex, {
|
|
7426
7458
|
justify: "flex-start",
|
|
7427
7459
|
align: "center",
|
|
7428
7460
|
gap,
|
|
@@ -7436,7 +7468,7 @@ function ScrollableChipGroup({
|
|
|
7436
7468
|
|
|
7437
7469
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
|
7438
7470
|
var import_lodash14 = __toESM(require_lodash(), 1);
|
|
7439
|
-
import { jsx as
|
|
7471
|
+
import { jsx as jsx27, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
7440
7472
|
function WidgetSelectionHeader({
|
|
7441
7473
|
title,
|
|
7442
7474
|
pinnableSection = "top" /* Top */,
|
|
@@ -7486,15 +7518,16 @@ function WidgetSelectionHeader({
|
|
|
7486
7518
|
},
|
|
7487
7519
|
className: clsx_default(!pinnableSection ? "remoraid-non-widget-segment" : undefined, !pinnableSection ? "remoraid-segment" : undefined, componentsProps?.container?.className),
|
|
7488
7520
|
children: [
|
|
7489
|
-
/* @__PURE__ */
|
|
7521
|
+
/* @__PURE__ */ jsx27(Text, {
|
|
7490
7522
|
size: "md",
|
|
7491
7523
|
...componentsProps?.title,
|
|
7492
7524
|
children: title ?? page.name
|
|
7493
7525
|
}),
|
|
7494
|
-
/* @__PURE__ */
|
|
7495
|
-
orientation: "vertical"
|
|
7526
|
+
/* @__PURE__ */ jsx27(Divider, {
|
|
7527
|
+
orientation: "vertical",
|
|
7528
|
+
...componentsProps?.divider
|
|
7496
7529
|
}),
|
|
7497
|
-
isPageRegistered(page.pageId) && /* @__PURE__ */
|
|
7530
|
+
isPageRegistered(page.pageId) && /* @__PURE__ */ jsx27(ScrollableChipGroup, {
|
|
7498
7531
|
value: selectedWidgets,
|
|
7499
7532
|
ref: scrollAreaRef,
|
|
7500
7533
|
...componentsProps?.ScrollableChipGroup,
|
|
@@ -7511,15 +7544,15 @@ function WidgetSelectionHeader({
|
|
|
7511
7544
|
trigger: "hover",
|
|
7512
7545
|
...componentsProps?.widgetMenu,
|
|
7513
7546
|
children: [
|
|
7514
|
-
/* @__PURE__ */
|
|
7515
|
-
children: /* @__PURE__ */
|
|
7516
|
-
children: /* @__PURE__ */
|
|
7547
|
+
/* @__PURE__ */ jsx27(Menu2.Target, {
|
|
7548
|
+
children: /* @__PURE__ */ jsx27(Box6, {
|
|
7549
|
+
children: /* @__PURE__ */ jsx27(Chip2, {
|
|
7517
7550
|
variant: selectedWidgets.includes(widgetId) ? "filled" : "outline",
|
|
7518
7551
|
color: activeWidget === widgetId ? mantineTheme.primaryColor : "gray",
|
|
7519
7552
|
value: widgetId,
|
|
7520
7553
|
size: "sm",
|
|
7521
7554
|
disabled: disabledWidgets?.includes(widgetId),
|
|
7522
|
-
icon: /* @__PURE__ */
|
|
7555
|
+
icon: /* @__PURE__ */ jsx27(IconCheck, {
|
|
7523
7556
|
...theme.componentsProps.icons.extraSmall
|
|
7524
7557
|
}),
|
|
7525
7558
|
...componentsProps?.Chip,
|
|
@@ -7535,8 +7568,8 @@ function WidgetSelectionHeader({
|
|
|
7535
7568
|
}),
|
|
7536
7569
|
/* @__PURE__ */ jsxs8(Menu2.Dropdown, {
|
|
7537
7570
|
children: [
|
|
7538
|
-
/* @__PURE__ */
|
|
7539
|
-
leftSection: /* @__PURE__ */
|
|
7571
|
+
/* @__PURE__ */ jsx27(Menu2.Item, {
|
|
7572
|
+
leftSection: /* @__PURE__ */ jsx27(IconNavigation, {
|
|
7540
7573
|
...theme.componentsProps.icons.small
|
|
7541
7574
|
}),
|
|
7542
7575
|
onClick: () => {
|
|
@@ -7546,8 +7579,8 @@ function WidgetSelectionHeader({
|
|
|
7546
7579
|
disabled: !widget.selected,
|
|
7547
7580
|
children: "Scroll to widget"
|
|
7548
7581
|
}),
|
|
7549
|
-
/* @__PURE__ */
|
|
7550
|
-
leftSection: /* @__PURE__ */
|
|
7582
|
+
/* @__PURE__ */ jsx27(Menu2.Item, {
|
|
7583
|
+
leftSection: /* @__PURE__ */ jsx27(IconFocus, {
|
|
7551
7584
|
...theme.componentsProps.icons.small
|
|
7552
7585
|
}),
|
|
7553
7586
|
onClick: () => {
|
|
@@ -7585,7 +7618,7 @@ function WidgetSelectionHeader({
|
|
|
7585
7618
|
});
|
|
7586
7619
|
}, [activeWidget]);
|
|
7587
7620
|
if (pinnableSection) {
|
|
7588
|
-
return /* @__PURE__ */
|
|
7621
|
+
return /* @__PURE__ */ jsx27(Pinnable, {
|
|
7589
7622
|
section: pinnableSection,
|
|
7590
7623
|
initialValue: initiallyPinned,
|
|
7591
7624
|
...componentsProps?.Pinnable,
|
|
@@ -7634,7 +7667,7 @@ import {
|
|
|
7634
7667
|
Stack as Stack4,
|
|
7635
7668
|
Transition as Transition6
|
|
7636
7669
|
} from "@mantine/core";
|
|
7637
|
-
import
|
|
7670
|
+
import React9 from "react";
|
|
7638
7671
|
|
|
7639
7672
|
// src/core/components/BadgeMinimal/index.tsx
|
|
7640
7673
|
import {
|
|
@@ -7642,7 +7675,7 @@ import {
|
|
|
7642
7675
|
Tooltip as Tooltip3,
|
|
7643
7676
|
Transition as Transition5
|
|
7644
7677
|
} from "@mantine/core";
|
|
7645
|
-
import { jsx as
|
|
7678
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
7646
7679
|
function BadgeMinimal({
|
|
7647
7680
|
label,
|
|
7648
7681
|
tooltip,
|
|
@@ -7650,17 +7683,17 @@ function BadgeMinimal({
|
|
|
7650
7683
|
componentsProps
|
|
7651
7684
|
}) {
|
|
7652
7685
|
const theme = useRemoraidTheme();
|
|
7653
|
-
return /* @__PURE__ */
|
|
7686
|
+
return /* @__PURE__ */ jsx28(Transition5, {
|
|
7654
7687
|
mounted,
|
|
7655
7688
|
transition: "fade",
|
|
7656
7689
|
duration: theme.transitionDurations.short,
|
|
7657
7690
|
timingFunction: "ease",
|
|
7658
7691
|
...componentsProps?.transition,
|
|
7659
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
7692
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx28(Tooltip3, {
|
|
7660
7693
|
label: tooltip,
|
|
7661
7694
|
disabled: !Boolean(tooltip),
|
|
7662
7695
|
...componentsProps?.tooltip,
|
|
7663
|
-
children: /* @__PURE__ */
|
|
7696
|
+
children: /* @__PURE__ */ jsx28(Badge, {
|
|
7664
7697
|
variant: "default",
|
|
7665
7698
|
...componentsProps?.badge,
|
|
7666
7699
|
style: {
|
|
@@ -7676,7 +7709,7 @@ function BadgeMinimal({
|
|
|
7676
7709
|
|
|
7677
7710
|
// src/core/components/BadgeGroup/index.tsx
|
|
7678
7711
|
var import_lodash15 = __toESM(require_lodash(), 1);
|
|
7679
|
-
import { jsx as
|
|
7712
|
+
import { jsx as jsx29, jsxs as jsxs9, Fragment as Fragment2 } from "react/jsx-runtime";
|
|
7680
7713
|
import { createElement } from "react";
|
|
7681
7714
|
function BadgeGroup({
|
|
7682
7715
|
badges: badgesProp,
|
|
@@ -7699,7 +7732,7 @@ function BadgeGroup({
|
|
|
7699
7732
|
});
|
|
7700
7733
|
return /* @__PURE__ */ jsxs9(Fragment2, {
|
|
7701
7734
|
children: [
|
|
7702
|
-
/* @__PURE__ */
|
|
7735
|
+
/* @__PURE__ */ jsx29(Group4, {
|
|
7703
7736
|
gap,
|
|
7704
7737
|
wrap: "nowrap",
|
|
7705
7738
|
visibleFrom: numVisibleBadges > 1 ? breakpoint : undefined,
|
|
@@ -7707,7 +7740,7 @@ function BadgeGroup({
|
|
|
7707
7740
|
className: clsx_default("hide-if-empty", componentsProps?.container?.className),
|
|
7708
7741
|
children: badgesElement
|
|
7709
7742
|
}),
|
|
7710
|
-
/* @__PURE__ */
|
|
7743
|
+
/* @__PURE__ */ jsx29(Transition6, {
|
|
7711
7744
|
mounted: numVisibleBadges > 1,
|
|
7712
7745
|
transition: "fade",
|
|
7713
7746
|
duration: theme.transitionDurations.short,
|
|
@@ -7716,7 +7749,7 @@ function BadgeGroup({
|
|
|
7716
7749
|
children: (transitionStyle) => /* @__PURE__ */ jsxs9(HoverCard, {
|
|
7717
7750
|
...componentsProps?.HoverCard,
|
|
7718
7751
|
children: [
|
|
7719
|
-
/* @__PURE__ */
|
|
7752
|
+
/* @__PURE__ */ jsx29(HoverCard.Target, {
|
|
7720
7753
|
children: /* @__PURE__ */ jsxs9(Badge2, {
|
|
7721
7754
|
hiddenFrom: breakpoint,
|
|
7722
7755
|
variant: "dot",
|
|
@@ -7731,9 +7764,9 @@ function BadgeGroup({
|
|
|
7731
7764
|
]
|
|
7732
7765
|
})
|
|
7733
7766
|
}),
|
|
7734
|
-
/* @__PURE__ */
|
|
7767
|
+
/* @__PURE__ */ jsx29(HoverCard.Dropdown, {
|
|
7735
7768
|
p: gap,
|
|
7736
|
-
children: /* @__PURE__ */
|
|
7769
|
+
children: /* @__PURE__ */ jsx29(Stack4, {
|
|
7737
7770
|
gap,
|
|
7738
7771
|
...componentsProps?.hoverContainer,
|
|
7739
7772
|
children: badgesElement
|
|
@@ -7748,7 +7781,7 @@ function BadgeGroup({
|
|
|
7748
7781
|
// src/core/components/AlertMinimal/index.tsx
|
|
7749
7782
|
import { Alert, Transition as Transition7 } from "@mantine/core";
|
|
7750
7783
|
var import_lodash16 = __toESM(require_lodash(), 1);
|
|
7751
|
-
import { jsx as
|
|
7784
|
+
import { jsx as jsx30, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
7752
7785
|
function AlertMinimal({
|
|
7753
7786
|
category,
|
|
7754
7787
|
children,
|
|
@@ -7765,7 +7798,7 @@ function AlertMinimal({
|
|
|
7765
7798
|
iconSize = "small" /* Small */,
|
|
7766
7799
|
componentsProps
|
|
7767
7800
|
} = import_lodash16.merge({}, theme.componentsProps.alerts[category], props);
|
|
7768
|
-
return /* @__PURE__ */
|
|
7801
|
+
return /* @__PURE__ */ jsx30(Transition7, {
|
|
7769
7802
|
mounted,
|
|
7770
7803
|
transition: "fade",
|
|
7771
7804
|
duration: theme.transitionDurations.short,
|
|
@@ -7777,9 +7810,10 @@ function AlertMinimal({
|
|
|
7777
7810
|
variant: "light",
|
|
7778
7811
|
onClose,
|
|
7779
7812
|
withCloseButton: onClose !== undefined,
|
|
7780
|
-
icon: Icon4 ? /* @__PURE__ */
|
|
7813
|
+
icon: Icon4 ? /* @__PURE__ */ jsx30(Icon4, {
|
|
7781
7814
|
...import_lodash16.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
7782
7815
|
}) : undefined,
|
|
7816
|
+
...componentsProps?.alert,
|
|
7783
7817
|
style: import_lodash16.merge(transitionStyle, componentsProps?.alert?.style),
|
|
7784
7818
|
children: [
|
|
7785
7819
|
text,
|
|
@@ -7798,7 +7832,7 @@ import {
|
|
|
7798
7832
|
} from "react";
|
|
7799
7833
|
import { IconX } from "@tabler/icons-react";
|
|
7800
7834
|
var import_lodash17 = __toESM(require_lodash(), 1);
|
|
7801
|
-
import { jsx as
|
|
7835
|
+
import { jsx as jsx31, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
7802
7836
|
function WidgetWrapper({
|
|
7803
7837
|
config,
|
|
7804
7838
|
mt = 0,
|
|
@@ -7837,7 +7871,7 @@ function WidgetWrapper({
|
|
|
7837
7871
|
updateActiveWidget(null);
|
|
7838
7872
|
};
|
|
7839
7873
|
const mounted = Boolean(widget?.selected);
|
|
7840
|
-
let element = /* @__PURE__ */
|
|
7874
|
+
let element = /* @__PURE__ */ jsx31(Transition8, {
|
|
7841
7875
|
mounted,
|
|
7842
7876
|
transition: "fade-left",
|
|
7843
7877
|
duration: theme.transitionDurations.medium,
|
|
@@ -7872,12 +7906,12 @@ function WidgetWrapper({
|
|
|
7872
7906
|
className: clsx_default("remoraid-segment", componentsProps?.container?.className),
|
|
7873
7907
|
id: config.widgetId,
|
|
7874
7908
|
children: [
|
|
7875
|
-
/* @__PURE__ */
|
|
7909
|
+
/* @__PURE__ */ jsx31(Controls, {
|
|
7876
7910
|
dragContainerRef: containerRef,
|
|
7877
7911
|
groupRef: controlsContainerRef,
|
|
7878
7912
|
mounted: activeWidget === config.widgetId,
|
|
7879
7913
|
...componentsProps?.controls,
|
|
7880
|
-
children: /* @__PURE__ */
|
|
7914
|
+
children: /* @__PURE__ */ jsx31(ControlButton, {
|
|
7881
7915
|
mounted: withCloseButton,
|
|
7882
7916
|
icon: IconX,
|
|
7883
7917
|
tooltip: "Hide widget",
|
|
@@ -7906,7 +7940,7 @@ function WidgetWrapper({
|
|
|
7906
7940
|
})
|
|
7907
7941
|
});
|
|
7908
7942
|
if (pinnableSection !== undefined) {
|
|
7909
|
-
element = /* @__PURE__ */
|
|
7943
|
+
element = /* @__PURE__ */ jsx31(Pinnable, {
|
|
7910
7944
|
section: pinnableSection,
|
|
7911
7945
|
controlsContainer,
|
|
7912
7946
|
hidden: Boolean(widget?.hidden),
|
|
@@ -7954,7 +7988,7 @@ import {
|
|
|
7954
7988
|
} from "@mantine/core";
|
|
7955
7989
|
import { Children } from "react";
|
|
7956
7990
|
var import_lodash18 = __toESM(require_lodash(), 1);
|
|
7957
|
-
import { jsx as
|
|
7991
|
+
import { jsx as jsx32, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
7958
7992
|
import { createElement as createElement2 } from "react";
|
|
7959
7993
|
function Widget({
|
|
7960
7994
|
id,
|
|
@@ -7977,7 +8011,7 @@ function Widget({
|
|
|
7977
8011
|
const badgesGap = (typeof gaps === "object" ? gaps.badges : gaps) ?? "xs";
|
|
7978
8012
|
const buttonsGap = (typeof gaps === "object" ? gaps.buttons : gaps) ?? "xs";
|
|
7979
8013
|
const alertsGap = (typeof gaps === "object" ? gaps.alerts : gaps) ?? "xs";
|
|
7980
|
-
return /* @__PURE__ */
|
|
8014
|
+
return /* @__PURE__ */ jsx32(WidgetWrapper, {
|
|
7981
8015
|
config: {
|
|
7982
8016
|
widgetId: id,
|
|
7983
8017
|
...config,
|
|
@@ -8005,23 +8039,23 @@ function Widget({
|
|
|
8005
8039
|
gap: badgesGap,
|
|
8006
8040
|
wrap: "nowrap",
|
|
8007
8041
|
children: [
|
|
8008
|
-
/* @__PURE__ */
|
|
8042
|
+
/* @__PURE__ */ jsx32(Title, {
|
|
8009
8043
|
order: 1,
|
|
8010
8044
|
size: "h2",
|
|
8011
8045
|
lineClamp: 1,
|
|
8012
8046
|
...componentsProps?.title,
|
|
8013
8047
|
children: title ?? id
|
|
8014
8048
|
}),
|
|
8015
|
-
badges !== undefined && /* @__PURE__ */
|
|
8049
|
+
badges !== undefined && /* @__PURE__ */ jsx32(BadgeGroup, {
|
|
8016
8050
|
badges,
|
|
8017
8051
|
gap: badgesGap,
|
|
8018
8052
|
...componentsProps?.badgeGroup
|
|
8019
8053
|
})
|
|
8020
8054
|
]
|
|
8021
8055
|
}),
|
|
8022
|
-
/* @__PURE__ */
|
|
8056
|
+
/* @__PURE__ */ jsx32(Transition9, {
|
|
8023
8057
|
mounted: Boolean(description),
|
|
8024
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
8058
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx32(Text2, {
|
|
8025
8059
|
size: "sm",
|
|
8026
8060
|
c: "dimmed",
|
|
8027
8061
|
...componentsProps?.description,
|
|
@@ -8031,7 +8065,7 @@ function Widget({
|
|
|
8031
8065
|
})
|
|
8032
8066
|
]
|
|
8033
8067
|
}),
|
|
8034
|
-
/* @__PURE__ */
|
|
8068
|
+
/* @__PURE__ */ jsx32(Group5, {
|
|
8035
8069
|
gap: buttonsGap,
|
|
8036
8070
|
wrap: "nowrap",
|
|
8037
8071
|
children: buttons !== undefined && buttons.map((button, i) => {
|
|
@@ -8046,12 +8080,12 @@ function Widget({
|
|
|
8046
8080
|
})
|
|
8047
8081
|
]
|
|
8048
8082
|
}),
|
|
8049
|
-
/* @__PURE__ */
|
|
8050
|
-
children: /* @__PURE__ */
|
|
8083
|
+
/* @__PURE__ */ jsx32(Box7, {
|
|
8084
|
+
children: /* @__PURE__ */ jsx32(Divider2, {
|
|
8051
8085
|
...componentsProps?.divider
|
|
8052
8086
|
})
|
|
8053
8087
|
}),
|
|
8054
|
-
/* @__PURE__ */
|
|
8088
|
+
/* @__PURE__ */ jsx32(Stack5, {
|
|
8055
8089
|
align: "stretch",
|
|
8056
8090
|
gap: alertsGap,
|
|
8057
8091
|
...componentsProps?.alertsContainer,
|
|
@@ -8066,12 +8100,12 @@ function Widget({
|
|
|
8066
8100
|
});
|
|
8067
8101
|
})
|
|
8068
8102
|
}),
|
|
8069
|
-
(loading || Children.toArray(children).length > 0) && /* @__PURE__ */
|
|
8103
|
+
(loading || Children.toArray(children).length > 0) && /* @__PURE__ */ jsx32(ScrollArea4.Autosize, {
|
|
8070
8104
|
flex: 1,
|
|
8071
8105
|
...componentsProps?.childrenContainer,
|
|
8072
8106
|
className: clsx_default("remoraid-widget-children-container", componentsProps?.childrenContainer?.className),
|
|
8073
|
-
children: loading ? /* @__PURE__ */
|
|
8074
|
-
children: /* @__PURE__ */
|
|
8107
|
+
children: loading ? /* @__PURE__ */ jsx32(Center2, {
|
|
8108
|
+
children: /* @__PURE__ */ jsx32(Loader, {
|
|
8075
8109
|
...componentsProps?.loader
|
|
8076
8110
|
})
|
|
8077
8111
|
}) : children
|
|
@@ -8081,19 +8115,18 @@ function Widget({
|
|
|
8081
8115
|
});
|
|
8082
8116
|
}
|
|
8083
8117
|
// src/core/components/NotFoundPage/index.tsx
|
|
8084
|
-
import {
|
|
8085
|
-
import { jsx as jsx32, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
8118
|
+
import { jsx as jsx33, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
8086
8119
|
function NotFoundPage({
|
|
8087
8120
|
children,
|
|
8088
8121
|
message,
|
|
8089
8122
|
componentsProps
|
|
8090
8123
|
}) {
|
|
8091
|
-
const pathname =
|
|
8124
|
+
const { pathname } = useRemoraidRouter();
|
|
8092
8125
|
return /* @__PURE__ */ jsxs13(Page, {
|
|
8093
8126
|
name: "Not Found",
|
|
8094
8127
|
...componentsProps?.page,
|
|
8095
8128
|
children: [
|
|
8096
|
-
/* @__PURE__ */
|
|
8129
|
+
/* @__PURE__ */ jsx33(AlertMinimal, {
|
|
8097
8130
|
category: "negative" /* Negative */,
|
|
8098
8131
|
title: "404 - Page Not Found",
|
|
8099
8132
|
children: message ?? `Could not find page ${pathname}.`
|
|
@@ -8103,7 +8136,7 @@ function NotFoundPage({
|
|
|
8103
8136
|
});
|
|
8104
8137
|
}
|
|
8105
8138
|
// src/core/components/EnvironmentShell/index.tsx
|
|
8106
|
-
import { jsx as
|
|
8139
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
8107
8140
|
var EnvironmentShellVariant;
|
|
8108
8141
|
((EnvironmentShellVariant2) => {
|
|
8109
8142
|
EnvironmentShellVariant2["Alert"] = "alert";
|
|
@@ -8120,7 +8153,7 @@ function EnvironmentShell({
|
|
|
8120
8153
|
}) {
|
|
8121
8154
|
const undefinedKeys = Object.keys(environment).filter((key) => environment[key] === undefined);
|
|
8122
8155
|
const defaultMessage = `Components could not be rendered because the following environment variable${undefinedKeys.length > 1 ? "s" : ""} are not specified: ${undefinedKeys.join(", ")}.`;
|
|
8123
|
-
const alertElement = /* @__PURE__ */
|
|
8156
|
+
const alertElement = /* @__PURE__ */ jsx34(AlertMinimal, {
|
|
8124
8157
|
mounted: undefinedKeys.length > 0,
|
|
8125
8158
|
title: `Please specify environment variable${undefinedKeys.length > 1 ? "s" : ""}`,
|
|
8126
8159
|
category: "negative" /* Negative */,
|
|
@@ -8132,7 +8165,7 @@ function EnvironmentShell({
|
|
|
8132
8165
|
}
|
|
8133
8166
|
if (variant === "alert" /* Alert */) {
|
|
8134
8167
|
if (includeAlertContainer) {
|
|
8135
|
-
return /* @__PURE__ */
|
|
8168
|
+
return /* @__PURE__ */ jsx34(PageContainer, {
|
|
8136
8169
|
...componentsProps?.alertContainer,
|
|
8137
8170
|
children: alertElement
|
|
8138
8171
|
});
|
|
@@ -8145,20 +8178,20 @@ function EnvironmentShell({
|
|
|
8145
8178
|
return null;
|
|
8146
8179
|
}
|
|
8147
8180
|
// src/core/components/SettingsWidget/index.tsx
|
|
8148
|
-
import { createContext as
|
|
8181
|
+
import { createContext as createContext8, useContext as useContext12 } from "react";
|
|
8149
8182
|
import { IconRestore } from "@tabler/icons-react";
|
|
8150
8183
|
|
|
8151
8184
|
// src/core/components/SettingsWidget/SaveButton/index.tsx
|
|
8152
8185
|
import { IconDeviceFloppy } from "@tabler/icons-react";
|
|
8153
8186
|
import { Group as Group6 } from "@mantine/core";
|
|
8154
|
-
import { jsx as
|
|
8187
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
8155
8188
|
function SaveButton({
|
|
8156
8189
|
onSaveChanges,
|
|
8157
8190
|
insideContainer,
|
|
8158
8191
|
componentsProps
|
|
8159
8192
|
}) {
|
|
8160
8193
|
const settingsWidgetOptions = useSettingsWidgetContext();
|
|
8161
|
-
const button = /* @__PURE__ */
|
|
8194
|
+
const button = /* @__PURE__ */ jsx35(RemoraidButton, {
|
|
8162
8195
|
label: "Save Changes",
|
|
8163
8196
|
icon: IconDeviceFloppy,
|
|
8164
8197
|
onClick: onSaveChanges,
|
|
@@ -8173,7 +8206,7 @@ function SaveButton({
|
|
|
8173
8206
|
}
|
|
8174
8207
|
});
|
|
8175
8208
|
if (insideContainer !== false) {
|
|
8176
|
-
return /* @__PURE__ */
|
|
8209
|
+
return /* @__PURE__ */ jsx35(Group6, {
|
|
8177
8210
|
w: "100%",
|
|
8178
8211
|
justify: "flex-end",
|
|
8179
8212
|
mt: "md",
|
|
@@ -8185,11 +8218,11 @@ function SaveButton({
|
|
|
8185
8218
|
}
|
|
8186
8219
|
|
|
8187
8220
|
// src/core/components/SettingsWidget/index.tsx
|
|
8188
|
-
import { jsx as
|
|
8221
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
8189
8222
|
var defaultSettingsWidgetContext = {};
|
|
8190
|
-
var settingsWidgetContext =
|
|
8223
|
+
var settingsWidgetContext = createContext8(defaultSettingsWidgetContext);
|
|
8191
8224
|
var useSettingsWidgetContext = () => {
|
|
8192
|
-
return
|
|
8225
|
+
return useContext12(settingsWidgetContext);
|
|
8193
8226
|
};
|
|
8194
8227
|
function SettingsWidget({
|
|
8195
8228
|
children,
|
|
@@ -8198,9 +8231,9 @@ function SettingsWidget({
|
|
|
8198
8231
|
custom,
|
|
8199
8232
|
widgetProps
|
|
8200
8233
|
}) {
|
|
8201
|
-
return /* @__PURE__ */
|
|
8234
|
+
return /* @__PURE__ */ jsx36(settingsWidgetContext.Provider, {
|
|
8202
8235
|
value: { custom, unsavedChanges },
|
|
8203
|
-
children: /* @__PURE__ */
|
|
8236
|
+
children: /* @__PURE__ */ jsx36(Widget, {
|
|
8204
8237
|
title: "Settings",
|
|
8205
8238
|
id: "settings",
|
|
8206
8239
|
...widgetProps,
|
|
@@ -8235,12 +8268,12 @@ var SettingsWidget_default = Object.assign(SettingsWidget, {
|
|
|
8235
8268
|
SaveButton
|
|
8236
8269
|
});
|
|
8237
8270
|
// src/core/components/SettingsWidget/SettingsTable/index.tsx
|
|
8238
|
-
import { createContext as
|
|
8271
|
+
import { createContext as createContext9, useContext as useContext13 } from "react";
|
|
8239
8272
|
import { Table as Table2 } from "@mantine/core";
|
|
8240
8273
|
|
|
8241
8274
|
// src/core/components/SettingsWidget/SettingsTable/Row/index.tsx
|
|
8242
8275
|
import { Table, Text as Text3 } from "@mantine/core";
|
|
8243
|
-
import { jsx as
|
|
8276
|
+
import { jsx as jsx37, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
8244
8277
|
function Row({
|
|
8245
8278
|
children,
|
|
8246
8279
|
label
|
|
@@ -8248,14 +8281,14 @@ function Row({
|
|
|
8248
8281
|
const options = useSettingsTableOptions();
|
|
8249
8282
|
return /* @__PURE__ */ jsxs14(Table.Tr, {
|
|
8250
8283
|
children: [
|
|
8251
|
-
/* @__PURE__ */
|
|
8284
|
+
/* @__PURE__ */ jsx37(Table.Th, {
|
|
8252
8285
|
w: options.leftColumnWidth,
|
|
8253
|
-
children: /* @__PURE__ */
|
|
8286
|
+
children: /* @__PURE__ */ jsx37(Text3, {
|
|
8254
8287
|
size: "sm",
|
|
8255
8288
|
children: label
|
|
8256
8289
|
})
|
|
8257
8290
|
}),
|
|
8258
|
-
/* @__PURE__ */
|
|
8291
|
+
/* @__PURE__ */ jsx37(Table.Td, {
|
|
8259
8292
|
py: "xs",
|
|
8260
8293
|
children
|
|
8261
8294
|
})
|
|
@@ -8264,13 +8297,13 @@ function Row({
|
|
|
8264
8297
|
}
|
|
8265
8298
|
|
|
8266
8299
|
// src/core/components/SettingsWidget/SettingsTable/index.tsx
|
|
8267
|
-
import { jsx as
|
|
8300
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
8268
8301
|
var defaultSettingsTableOptions = {
|
|
8269
8302
|
leftColumnWidth: "38.2%"
|
|
8270
8303
|
};
|
|
8271
|
-
var settingsTableOptionsContext =
|
|
8304
|
+
var settingsTableOptionsContext = createContext9(defaultSettingsTableOptions);
|
|
8272
8305
|
var useSettingsTableOptions = () => {
|
|
8273
|
-
return
|
|
8306
|
+
return useContext13(settingsTableOptionsContext);
|
|
8274
8307
|
};
|
|
8275
8308
|
function SettingsTable({
|
|
8276
8309
|
leftColumnWidth,
|
|
@@ -8278,16 +8311,16 @@ function SettingsTable({
|
|
|
8278
8311
|
}) {
|
|
8279
8312
|
const children = asChildrenOfType(Row, childrenProp, "Check children passed to 'SettingsTable' component.");
|
|
8280
8313
|
const theme = useRemoraidTheme();
|
|
8281
|
-
return /* @__PURE__ */
|
|
8314
|
+
return /* @__PURE__ */ jsx38(settingsTableOptionsContext.Provider, {
|
|
8282
8315
|
value: {
|
|
8283
8316
|
leftColumnWidth: leftColumnWidth ?? defaultSettingsTableOptions.leftColumnWidth
|
|
8284
8317
|
},
|
|
8285
|
-
children: /* @__PURE__ */
|
|
8318
|
+
children: /* @__PURE__ */ jsx38(Table2, {
|
|
8286
8319
|
bg: theme.transparentBackground,
|
|
8287
8320
|
withTableBorder: true,
|
|
8288
8321
|
variant: "vertical",
|
|
8289
8322
|
layout: "fixed",
|
|
8290
|
-
children: /* @__PURE__ */
|
|
8323
|
+
children: /* @__PURE__ */ jsx38(Table2.Tbody, {
|
|
8291
8324
|
children
|
|
8292
8325
|
})
|
|
8293
8326
|
})
|
|
@@ -8299,7 +8332,7 @@ var SettingsTable_default = Object.assign(SettingsTable, {
|
|
|
8299
8332
|
// src/core/components/NavbarSettingsWidget/index.tsx
|
|
8300
8333
|
var import_lodash19 = __toESM(require_lodash(), 1);
|
|
8301
8334
|
import { Select } from "@mantine/core";
|
|
8302
|
-
import { jsx as
|
|
8335
|
+
import { jsx as jsx39, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
8303
8336
|
var defaultNavbarSettingsWidgetId = "navbar-settings";
|
|
8304
8337
|
function NavbarSettingsWidget({
|
|
8305
8338
|
additionalRows: additionalRowsProp,
|
|
@@ -8321,7 +8354,7 @@ function NavbarSettingsWidget({
|
|
|
8321
8354
|
["right" /* Right */]: "Right",
|
|
8322
8355
|
["content" /* Content */]: "Content section"
|
|
8323
8356
|
};
|
|
8324
|
-
return /* @__PURE__ */
|
|
8357
|
+
return /* @__PURE__ */ jsx39(SettingsWidget_default, {
|
|
8325
8358
|
widgetProps: {
|
|
8326
8359
|
id: defaultNavbarSettingsWidgetId,
|
|
8327
8360
|
title: "Navbar Settings",
|
|
@@ -8337,9 +8370,9 @@ function NavbarSettingsWidget({
|
|
|
8337
8370
|
children: /* @__PURE__ */ jsxs15(SettingsTable_default, {
|
|
8338
8371
|
...componentsProps?.table,
|
|
8339
8372
|
children: [
|
|
8340
|
-
/* @__PURE__ */
|
|
8373
|
+
/* @__PURE__ */ jsx39(SettingsTable_default.Row, {
|
|
8341
8374
|
label: "Select navbar position",
|
|
8342
|
-
children: /* @__PURE__ */
|
|
8375
|
+
children: /* @__PURE__ */ jsx39(Select, {
|
|
8343
8376
|
value: userExperience.navbar.position ?? "hidden",
|
|
8344
8377
|
data: app.navbarVariant === null ? [] : supportedNavbarPositions[app.navbarVariant].map((position) => ({
|
|
8345
8378
|
value: position ?? "hidden",
|
|
@@ -8359,9 +8392,9 @@ function NavbarSettingsWidget({
|
|
|
8359
8392
|
}
|
|
8360
8393
|
})
|
|
8361
8394
|
}, "select-navbar-position"),
|
|
8362
|
-
/* @__PURE__ */
|
|
8395
|
+
/* @__PURE__ */ jsx39(SettingsTable_default.Row, {
|
|
8363
8396
|
label: "Select navbar mode",
|
|
8364
|
-
children: /* @__PURE__ */
|
|
8397
|
+
children: /* @__PURE__ */ jsx39(Select, {
|
|
8365
8398
|
value: userExperience.navbar.mode,
|
|
8366
8399
|
data: Object.values(NavbarMode).map((mode) => ({
|
|
8367
8400
|
value: mode,
|
|
@@ -8382,7 +8415,7 @@ function NavbarSettingsWidget({
|
|
|
8382
8415
|
if (isValidElementOfType(SettingsTable_default.Row, row)) {
|
|
8383
8416
|
return row;
|
|
8384
8417
|
}
|
|
8385
|
-
return /* @__PURE__ */
|
|
8418
|
+
return /* @__PURE__ */ jsx39(SettingsTable_default.Row, {
|
|
8386
8419
|
...row
|
|
8387
8420
|
}, i);
|
|
8388
8421
|
})
|
|
@@ -8393,7 +8426,7 @@ function NavbarSettingsWidget({
|
|
|
8393
8426
|
// src/core/components/FooterSettingsWidget/index.tsx
|
|
8394
8427
|
var import_lodash20 = __toESM(require_lodash(), 1);
|
|
8395
8428
|
import { Select as Select2 } from "@mantine/core";
|
|
8396
|
-
import { jsx as
|
|
8429
|
+
import { jsx as jsx40, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
8397
8430
|
var defaultFooterSettingsWidgetId = "footer-settings";
|
|
8398
8431
|
function FooterSettingsWidget({
|
|
8399
8432
|
additionalRows: additionalRowsProp,
|
|
@@ -8410,7 +8443,7 @@ function FooterSettingsWidget({
|
|
|
8410
8443
|
["right" /* Right */]: "Right",
|
|
8411
8444
|
["content" /* Content */]: "Content section"
|
|
8412
8445
|
};
|
|
8413
|
-
return /* @__PURE__ */
|
|
8446
|
+
return /* @__PURE__ */ jsx40(SettingsWidget_default, {
|
|
8414
8447
|
widgetProps: {
|
|
8415
8448
|
id: defaultFooterSettingsWidgetId,
|
|
8416
8449
|
title: "Footer Settings",
|
|
@@ -8426,9 +8459,9 @@ function FooterSettingsWidget({
|
|
|
8426
8459
|
children: /* @__PURE__ */ jsxs16(SettingsTable_default, {
|
|
8427
8460
|
...componentsProps?.table,
|
|
8428
8461
|
children: [
|
|
8429
|
-
/* @__PURE__ */
|
|
8462
|
+
/* @__PURE__ */ jsx40(SettingsTable_default.Row, {
|
|
8430
8463
|
label: "Select footer position",
|
|
8431
|
-
children: /* @__PURE__ */
|
|
8464
|
+
children: /* @__PURE__ */ jsx40(Select2, {
|
|
8432
8465
|
value: userExperience.footer.position ?? "hidden",
|
|
8433
8466
|
data: app.footerVariant === null ? [] : supportedFooterPositions[app.footerVariant].map((position) => ({
|
|
8434
8467
|
value: position ?? "hidden",
|
|
@@ -8452,7 +8485,7 @@ function FooterSettingsWidget({
|
|
|
8452
8485
|
if (isValidElementOfType(SettingsTable_default.Row, row)) {
|
|
8453
8486
|
return row;
|
|
8454
8487
|
}
|
|
8455
|
-
return /* @__PURE__ */
|
|
8488
|
+
return /* @__PURE__ */ jsx40(SettingsTable_default.Row, {
|
|
8456
8489
|
...row
|
|
8457
8490
|
}, i);
|
|
8458
8491
|
})
|
|
@@ -8461,8 +8494,8 @@ function FooterSettingsWidget({
|
|
|
8461
8494
|
});
|
|
8462
8495
|
}
|
|
8463
8496
|
// src/core/components/ContextClusterProvider/index.tsx
|
|
8464
|
-
import
|
|
8465
|
-
import { jsx as
|
|
8497
|
+
import React10 from "react";
|
|
8498
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
8466
8499
|
var createContextCluster = (generalDefaultValue, staticIds) => {
|
|
8467
8500
|
const isStaticId = (id) => {
|
|
8468
8501
|
if (staticIds?.find((staticId) => staticId === id)) {
|
|
@@ -8472,24 +8505,24 @@ var createContextCluster = (generalDefaultValue, staticIds) => {
|
|
|
8472
8505
|
};
|
|
8473
8506
|
const contexts = {};
|
|
8474
8507
|
const defaultValues = {};
|
|
8475
|
-
const
|
|
8476
|
-
const context =
|
|
8508
|
+
const createContext10 = (id, defaultValue) => {
|
|
8509
|
+
const context = React10.createContext(defaultValue ?? generalDefaultValue);
|
|
8477
8510
|
contexts[id] = context;
|
|
8478
8511
|
defaultValues[id] = defaultValue ?? generalDefaultValue;
|
|
8479
8512
|
return context;
|
|
8480
8513
|
};
|
|
8481
|
-
const
|
|
8514
|
+
const useContext14 = (id) => {
|
|
8482
8515
|
if (isStaticId(id)) {
|
|
8483
|
-
return contexts[id] ?
|
|
8516
|
+
return contexts[id] ? React10.useContext(contexts[id]) : generalDefaultValue;
|
|
8484
8517
|
}
|
|
8485
|
-
return contexts[id] ?
|
|
8518
|
+
return contexts[id] ? React10.useContext(contexts[id]) : null;
|
|
8486
8519
|
};
|
|
8487
8520
|
return {
|
|
8488
8521
|
contexts,
|
|
8489
8522
|
defaultValues,
|
|
8490
8523
|
generalDefaultValue,
|
|
8491
|
-
createContext:
|
|
8492
|
-
useContext:
|
|
8524
|
+
createContext: createContext10,
|
|
8525
|
+
useContext: useContext14
|
|
8493
8526
|
};
|
|
8494
8527
|
};
|
|
8495
8528
|
function ContextClusterProvider({
|
|
@@ -8497,7 +8530,7 @@ function ContextClusterProvider({
|
|
|
8497
8530
|
values = {},
|
|
8498
8531
|
children
|
|
8499
8532
|
}) {
|
|
8500
|
-
return Object.entries(cluster.contexts).reduceRight((t, [id, context]) => context ? /* @__PURE__ */
|
|
8533
|
+
return Object.entries(cluster.contexts).reduceRight((t, [id, context]) => context ? /* @__PURE__ */ jsx41(context.Provider, {
|
|
8501
8534
|
value: values[id] ?? cluster.defaultValues[id] ?? cluster.generalDefaultValue,
|
|
8502
8535
|
children: t
|
|
8503
8536
|
}) : t, children);
|
|
@@ -8510,7 +8543,7 @@ import {
|
|
|
8510
8543
|
ScrollArea as ScrollArea5
|
|
8511
8544
|
} from "@mantine/core";
|
|
8512
8545
|
import { useState as useState10 } from "react";
|
|
8513
|
-
import { jsx as
|
|
8546
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
8514
8547
|
function InputWrapperScrollArea({
|
|
8515
8548
|
children,
|
|
8516
8549
|
label,
|
|
@@ -8522,7 +8555,7 @@ function InputWrapperScrollArea({
|
|
|
8522
8555
|
}) {
|
|
8523
8556
|
const theme = useRemoraidTheme();
|
|
8524
8557
|
const [isHovering, setIsHovering] = useState10(false);
|
|
8525
|
-
return /* @__PURE__ */
|
|
8558
|
+
return /* @__PURE__ */ jsx42(Input.Wrapper, {
|
|
8526
8559
|
label,
|
|
8527
8560
|
error,
|
|
8528
8561
|
onMouseEnter: () => setIsHovering(true),
|
|
@@ -8530,7 +8563,7 @@ function InputWrapperScrollArea({
|
|
|
8530
8563
|
description,
|
|
8531
8564
|
withAsterisk: required,
|
|
8532
8565
|
...componentsProps?.container,
|
|
8533
|
-
children: /* @__PURE__ */
|
|
8566
|
+
children: /* @__PURE__ */ jsx42(Paper4, {
|
|
8534
8567
|
shadow: "none",
|
|
8535
8568
|
p: 0,
|
|
8536
8569
|
mt: Boolean(description) ? 4 : 0,
|
|
@@ -8541,12 +8574,12 @@ function InputWrapperScrollArea({
|
|
|
8541
8574
|
transition: "border-color .1s",
|
|
8542
8575
|
borderColor: error ? "var(--mantine-color-error)" : isHovering ? "var(--mantine-primary-color-filled)" : undefined
|
|
8543
8576
|
},
|
|
8544
|
-
children: /* @__PURE__ */
|
|
8577
|
+
children: /* @__PURE__ */ jsx42(ScrollArea5, {
|
|
8545
8578
|
mah,
|
|
8546
8579
|
px: "md",
|
|
8547
8580
|
flex: 1,
|
|
8548
8581
|
...componentsProps?.ScrollArea,
|
|
8549
|
-
children: /* @__PURE__ */
|
|
8582
|
+
children: /* @__PURE__ */ jsx42(Box8, {
|
|
8550
8583
|
...componentsProps?.childrenContainer,
|
|
8551
8584
|
children
|
|
8552
8585
|
})
|
|
@@ -8561,6 +8594,7 @@ export {
|
|
|
8561
8594
|
useSettingsTableOptions,
|
|
8562
8595
|
useRemoraidUserExperience,
|
|
8563
8596
|
useRemoraidTheme,
|
|
8597
|
+
useRemoraidRouter,
|
|
8564
8598
|
useRemoraidApp,
|
|
8565
8599
|
usePage,
|
|
8566
8600
|
useLayouts,
|
|
@@ -8585,6 +8619,7 @@ export {
|
|
|
8585
8619
|
defaultTransitionDurations,
|
|
8586
8620
|
defaultSettingsWidgetContext as defaultSettingsWidgetOptions,
|
|
8587
8621
|
defaultSettingsTableOptions,
|
|
8622
|
+
defaultRemoraidButtonSize,
|
|
8588
8623
|
defaultNavbarSettingsWidgetId,
|
|
8589
8624
|
defaultNavbarPositions,
|
|
8590
8625
|
defaultLayoutsContext,
|
|
@@ -8608,6 +8643,7 @@ export {
|
|
|
8608
8643
|
SettingsWidget_default as SettingsWidget,
|
|
8609
8644
|
SettingsTable_default as SettingsTable,
|
|
8610
8645
|
ScrollableChipGroup,
|
|
8646
|
+
RouterProvider,
|
|
8611
8647
|
RemoraidProvider,
|
|
8612
8648
|
RemoraidIconSize,
|
|
8613
8649
|
RemoraidButton,
|