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.cjs
CHANGED
|
@@ -5466,6 +5466,7 @@ __export(exports_core, {
|
|
|
5466
5466
|
useSettingsTableOptions: () => useSettingsTableOptions,
|
|
5467
5467
|
useRemoraidUserExperience: () => useRemoraidUserExperience,
|
|
5468
5468
|
useRemoraidTheme: () => useRemoraidTheme,
|
|
5469
|
+
useRemoraidRouter: () => useRemoraidRouter,
|
|
5469
5470
|
useRemoraidApp: () => useRemoraidApp,
|
|
5470
5471
|
usePage: () => usePage,
|
|
5471
5472
|
useLayouts: () => useLayouts,
|
|
@@ -5490,6 +5491,7 @@ __export(exports_core, {
|
|
|
5490
5491
|
defaultTransitionDurations: () => defaultTransitionDurations,
|
|
5491
5492
|
defaultSettingsWidgetOptions: () => defaultSettingsWidgetContext,
|
|
5492
5493
|
defaultSettingsTableOptions: () => defaultSettingsTableOptions,
|
|
5494
|
+
defaultRemoraidButtonSize: () => defaultRemoraidButtonSize,
|
|
5493
5495
|
defaultNavbarSettingsWidgetId: () => defaultNavbarSettingsWidgetId,
|
|
5494
5496
|
defaultNavbarPositions: () => defaultNavbarPositions,
|
|
5495
5497
|
defaultLayoutsContext: () => defaultLayoutsContext,
|
|
@@ -5513,6 +5515,7 @@ __export(exports_core, {
|
|
|
5513
5515
|
SettingsWidget: () => SettingsWidget_default,
|
|
5514
5516
|
SettingsTable: () => SettingsTable_default,
|
|
5515
5517
|
ScrollableChipGroup: () => ScrollableChipGroup,
|
|
5518
|
+
RouterProvider: () => RouterProvider,
|
|
5516
5519
|
RemoraidProvider: () => RemoraidProvider,
|
|
5517
5520
|
RemoraidIconSize: () => RemoraidIconSize,
|
|
5518
5521
|
RemoraidButton: () => RemoraidButton,
|
|
@@ -6047,7 +6050,12 @@ function UserExperienceProviderWrapper({
|
|
|
6047
6050
|
initialValue
|
|
6048
6051
|
}) {
|
|
6049
6052
|
const [cookies, setCookie] = import_react_cookie.useCookies();
|
|
6050
|
-
const initialUserExperience = import_lodash3.
|
|
6053
|
+
const initialUserExperience = import_lodash3.mergeWith({}, defaultUserExperience, initialValue, (_objValue, srcValue) => {
|
|
6054
|
+
if (Array.isArray(srcValue)) {
|
|
6055
|
+
return [...srcValue];
|
|
6056
|
+
}
|
|
6057
|
+
return;
|
|
6058
|
+
});
|
|
6051
6059
|
const [userExperience, setUserExperience] = import_react5.useState(initialUserExperience);
|
|
6052
6060
|
const [processedCookie, setProcessedCookie] = import_react5.useState(false);
|
|
6053
6061
|
const updateUserExperience = (p) => {
|
|
@@ -6137,29 +6145,69 @@ function LayoutsProvider({
|
|
|
6137
6145
|
});
|
|
6138
6146
|
}
|
|
6139
6147
|
|
|
6140
|
-
// src/core/components/RemoraidProvider/index.tsx
|
|
6148
|
+
// src/core/components/RemoraidProvider/RouterProvider/index.tsx
|
|
6149
|
+
var import_react8 = require("react");
|
|
6141
6150
|
var jsx_runtime7 = require("react/jsx-runtime");
|
|
6151
|
+
var defaultRouter = {
|
|
6152
|
+
pathname: "/",
|
|
6153
|
+
push: () => {}
|
|
6154
|
+
};
|
|
6155
|
+
var routerContext = import_react8.createContext(defaultRouter);
|
|
6156
|
+
var useRemoraidRouter = () => {
|
|
6157
|
+
return import_react8.useContext(routerContext);
|
|
6158
|
+
};
|
|
6159
|
+
var getWindowRouter = () => {
|
|
6160
|
+
if (typeof window === "undefined") {
|
|
6161
|
+
return defaultRouter;
|
|
6162
|
+
}
|
|
6163
|
+
return {
|
|
6164
|
+
pathname: window.location.pathname,
|
|
6165
|
+
push: (href) => {
|
|
6166
|
+
window.location.assign(href);
|
|
6167
|
+
},
|
|
6168
|
+
replace: (href) => {
|
|
6169
|
+
window.location.replace(href);
|
|
6170
|
+
}
|
|
6171
|
+
};
|
|
6172
|
+
};
|
|
6173
|
+
function RouterProvider({
|
|
6174
|
+
children,
|
|
6175
|
+
router
|
|
6176
|
+
}) {
|
|
6177
|
+
return /* @__PURE__ */ jsx_runtime7.jsx(routerContext.Provider, {
|
|
6178
|
+
value: router ?? getWindowRouter(),
|
|
6179
|
+
children
|
|
6180
|
+
});
|
|
6181
|
+
}
|
|
6182
|
+
|
|
6183
|
+
// src/core/components/RemoraidProvider/index.tsx
|
|
6184
|
+
var jsx_runtime8 = require("react/jsx-runtime");
|
|
6142
6185
|
function RemoraidProvider({
|
|
6143
6186
|
children,
|
|
6144
6187
|
theme,
|
|
6145
6188
|
initialUserExperience,
|
|
6189
|
+
router,
|
|
6146
6190
|
componentsProps
|
|
6147
6191
|
}) {
|
|
6148
|
-
return /* @__PURE__ */
|
|
6192
|
+
return /* @__PURE__ */ jsx_runtime8.jsx(import_react_cookie2.CookiesProvider, {
|
|
6149
6193
|
...componentsProps?.CookiesProvider,
|
|
6150
|
-
children: /* @__PURE__ */
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
...componentsProps?.
|
|
6155
|
-
children: /* @__PURE__ */
|
|
6156
|
-
|
|
6157
|
-
...componentsProps?.
|
|
6158
|
-
children: /* @__PURE__ */
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6194
|
+
children: /* @__PURE__ */ jsx_runtime8.jsx(RouterProvider, {
|
|
6195
|
+
router,
|
|
6196
|
+
...componentsProps?.RouterProvider,
|
|
6197
|
+
children: /* @__PURE__ */ jsx_runtime8.jsx(HydrationStatusProvider, {
|
|
6198
|
+
...componentsProps?.HydrationStatusProviderProps,
|
|
6199
|
+
children: /* @__PURE__ */ jsx_runtime8.jsx(ThemeProvider, {
|
|
6200
|
+
theme,
|
|
6201
|
+
...componentsProps?.ThemeProvider,
|
|
6202
|
+
children: /* @__PURE__ */ jsx_runtime8.jsx(CoreUserExperienceProvider, {
|
|
6203
|
+
initialValue: initialUserExperience,
|
|
6204
|
+
...componentsProps?.CoreUserExperienceProvider,
|
|
6205
|
+
children: /* @__PURE__ */ jsx_runtime8.jsx(WidgetsProvider, {
|
|
6206
|
+
...componentsProps?.WidgetsProvider,
|
|
6207
|
+
children: /* @__PURE__ */ jsx_runtime8.jsx(LayoutsProvider, {
|
|
6208
|
+
...componentsProps?.LayoutsProviderProps,
|
|
6209
|
+
children
|
|
6210
|
+
})
|
|
6163
6211
|
})
|
|
6164
6212
|
})
|
|
6165
6213
|
})
|
|
@@ -6172,9 +6220,9 @@ var import_core13 = require("@mantine/core");
|
|
|
6172
6220
|
var import_react18 = require("react");
|
|
6173
6221
|
|
|
6174
6222
|
// src/core/components/AppShell/AppProvider/index.tsx
|
|
6175
|
-
var
|
|
6223
|
+
var import_react9 = require("react");
|
|
6176
6224
|
var import_lodash4 = __toESM(require_lodash());
|
|
6177
|
-
var
|
|
6225
|
+
var jsx_runtime9 = require("react/jsx-runtime");
|
|
6178
6226
|
var defaultAppContext = {
|
|
6179
6227
|
name: "Hello, World!",
|
|
6180
6228
|
nav: [],
|
|
@@ -6182,16 +6230,16 @@ var defaultAppContext = {
|
|
|
6182
6230
|
footerVariant: "minimal" /* Minimal */,
|
|
6183
6231
|
navbarMobileVariant: null
|
|
6184
6232
|
};
|
|
6185
|
-
var appContext =
|
|
6233
|
+
var appContext = import_react9.createContext(defaultAppContext);
|
|
6186
6234
|
var useRemoraidApp = () => {
|
|
6187
|
-
return
|
|
6235
|
+
return import_react9.useContext(appContext);
|
|
6188
6236
|
};
|
|
6189
6237
|
function AppProvider({
|
|
6190
6238
|
appContext: appContextProp,
|
|
6191
6239
|
children
|
|
6192
6240
|
}) {
|
|
6193
6241
|
const { logo, ...appContextPropWithoutLogo } = appContextProp;
|
|
6194
|
-
return /* @__PURE__ */
|
|
6242
|
+
return /* @__PURE__ */ jsx_runtime9.jsx(appContext.Provider, {
|
|
6195
6243
|
value: { ...import_lodash4.merge(defaultAppContext, appContextPropWithoutLogo), logo },
|
|
6196
6244
|
children
|
|
6197
6245
|
});
|
|
@@ -6235,7 +6283,7 @@ function clsx() {
|
|
|
6235
6283
|
var clsx_default = clsx;
|
|
6236
6284
|
|
|
6237
6285
|
// src/core/components/Page/PageContainer/index.tsx
|
|
6238
|
-
var
|
|
6286
|
+
var jsx_runtime10 = require("react/jsx-runtime");
|
|
6239
6287
|
function PageContainer({
|
|
6240
6288
|
children,
|
|
6241
6289
|
p = 0,
|
|
@@ -6243,7 +6291,7 @@ function PageContainer({
|
|
|
6243
6291
|
componentsProps
|
|
6244
6292
|
}) {
|
|
6245
6293
|
const theme = useRemoraidTheme();
|
|
6246
|
-
return /* @__PURE__ */
|
|
6294
|
+
return /* @__PURE__ */ jsx_runtime10.jsx(import_core3.Container, {
|
|
6247
6295
|
size: theme.containerSize,
|
|
6248
6296
|
p,
|
|
6249
6297
|
w: "100%",
|
|
@@ -6256,10 +6304,10 @@ function PageContainer({
|
|
|
6256
6304
|
|
|
6257
6305
|
// src/core/components/FrameLayout/index.tsx
|
|
6258
6306
|
var import_core5 = require("@mantine/core");
|
|
6259
|
-
var
|
|
6307
|
+
var import_react11 = require("react");
|
|
6260
6308
|
|
|
6261
6309
|
// src/core/components/FrameLayout/Element/index.tsx
|
|
6262
|
-
var
|
|
6310
|
+
var import_react10 = require("react");
|
|
6263
6311
|
var import_core4 = require("@mantine/core");
|
|
6264
6312
|
|
|
6265
6313
|
// src/core/lib/errors.ts
|
|
@@ -6272,10 +6320,10 @@ class InvalidComponentUsageError extends Error {
|
|
|
6272
6320
|
|
|
6273
6321
|
// src/core/components/FrameLayout/Element/index.tsx
|
|
6274
6322
|
var import_lodash5 = __toESM(require_lodash());
|
|
6275
|
-
var
|
|
6276
|
-
var layoutElementContext =
|
|
6323
|
+
var jsx_runtime11 = require("react/jsx-runtime");
|
|
6324
|
+
var layoutElementContext = import_react10.createContext(null);
|
|
6277
6325
|
var useFrameLayoutElement = () => {
|
|
6278
|
-
return
|
|
6326
|
+
return import_react10.useContext(layoutElementContext);
|
|
6279
6327
|
};
|
|
6280
6328
|
function Element2({
|
|
6281
6329
|
section,
|
|
@@ -6305,17 +6353,17 @@ function Element2({
|
|
|
6305
6353
|
if (section === "left" /* Left */ || section === "right" /* Right */) {
|
|
6306
6354
|
containerProps.h = "100%";
|
|
6307
6355
|
}
|
|
6308
|
-
const element = includePageContainer ? /* @__PURE__ */
|
|
6356
|
+
const element = includePageContainer ? /* @__PURE__ */ jsx_runtime11.jsx(PageContainer, {
|
|
6309
6357
|
p: 0,
|
|
6310
6358
|
hidden,
|
|
6311
6359
|
...componentsProps?.PageContainer,
|
|
6312
6360
|
children
|
|
6313
6361
|
}) : children;
|
|
6314
|
-
return /* @__PURE__ */
|
|
6362
|
+
return /* @__PURE__ */ jsx_runtime11.jsx(import_core4.Portal, {
|
|
6315
6363
|
target: layout.sections[section],
|
|
6316
|
-
children: /* @__PURE__ */
|
|
6364
|
+
children: /* @__PURE__ */ jsx_runtime11.jsx(layoutElementContext.Provider, {
|
|
6317
6365
|
value: { layoutType: "frame" /* Frame */, section },
|
|
6318
|
-
children: includeContainer ? /* @__PURE__ */
|
|
6366
|
+
children: includeContainer ? /* @__PURE__ */ jsx_runtime11.jsx(import_core4.Box, {
|
|
6319
6367
|
"data-hidden": hidden,
|
|
6320
6368
|
...import_lodash5.merge(containerProps, componentsProps?.container),
|
|
6321
6369
|
className: clsx_default("remoraid-frame-layout-element", containerProps?.className, componentsProps?.container?.className),
|
|
@@ -6326,10 +6374,10 @@ function Element2({
|
|
|
6326
6374
|
}
|
|
6327
6375
|
|
|
6328
6376
|
// src/core/components/FrameLayout/index.tsx
|
|
6329
|
-
var
|
|
6330
|
-
var layoutContext =
|
|
6377
|
+
var jsx_runtime12 = require("react/jsx-runtime");
|
|
6378
|
+
var layoutContext = import_react11.createContext(null);
|
|
6331
6379
|
var useFrameLayout = () => {
|
|
6332
|
-
return
|
|
6380
|
+
return import_react11.useContext(layoutContext);
|
|
6333
6381
|
};
|
|
6334
6382
|
function FrameLayout({
|
|
6335
6383
|
layoutId,
|
|
@@ -6340,14 +6388,14 @@ function FrameLayout({
|
|
|
6340
6388
|
}) {
|
|
6341
6389
|
const { layouts, setLayouts } = useLayouts();
|
|
6342
6390
|
const layout = layouts[layoutId];
|
|
6343
|
-
const defaultSections =
|
|
6391
|
+
const defaultSections = import_react11.useMemo(() => ({
|
|
6344
6392
|
["bottom" /* Bottom */]: null,
|
|
6345
6393
|
["right" /* Right */]: null,
|
|
6346
6394
|
["top" /* Top */]: null,
|
|
6347
6395
|
["left" /* Left */]: null,
|
|
6348
6396
|
["content" /* Content */]: null
|
|
6349
6397
|
}), []);
|
|
6350
|
-
const setSections =
|
|
6398
|
+
const setSections = import_react11.useCallback((value) => {
|
|
6351
6399
|
setLayouts((prev) => ({
|
|
6352
6400
|
...prev,
|
|
6353
6401
|
[layoutId]: {
|
|
@@ -6356,37 +6404,37 @@ function FrameLayout({
|
|
|
6356
6404
|
}
|
|
6357
6405
|
}));
|
|
6358
6406
|
}, [layoutId, setLayouts, defaultSections]);
|
|
6359
|
-
const topSectionRef =
|
|
6407
|
+
const topSectionRef = import_react11.useCallback((n) => {
|
|
6360
6408
|
setSections((prev) => ({
|
|
6361
6409
|
...prev,
|
|
6362
6410
|
["top" /* Top */]: n
|
|
6363
6411
|
}));
|
|
6364
6412
|
}, [setSections]);
|
|
6365
|
-
const bottomSectionRef =
|
|
6413
|
+
const bottomSectionRef = import_react11.useCallback((n) => {
|
|
6366
6414
|
setSections((prev) => ({
|
|
6367
6415
|
...prev,
|
|
6368
6416
|
["bottom" /* Bottom */]: n
|
|
6369
6417
|
}));
|
|
6370
6418
|
}, [setSections]);
|
|
6371
|
-
const leftSectionRef =
|
|
6419
|
+
const leftSectionRef = import_react11.useCallback((n) => {
|
|
6372
6420
|
setSections((prev) => ({
|
|
6373
6421
|
...prev,
|
|
6374
6422
|
["left" /* Left */]: n
|
|
6375
6423
|
}));
|
|
6376
6424
|
}, [setSections]);
|
|
6377
|
-
const rightSectionRef =
|
|
6425
|
+
const rightSectionRef = import_react11.useCallback((n) => {
|
|
6378
6426
|
setSections((prev) => ({
|
|
6379
6427
|
...prev,
|
|
6380
6428
|
["right" /* Right */]: n
|
|
6381
6429
|
}));
|
|
6382
6430
|
}, [setSections]);
|
|
6383
|
-
const contentSectionRef =
|
|
6431
|
+
const contentSectionRef = import_react11.useCallback((n) => {
|
|
6384
6432
|
setSections((prev) => ({
|
|
6385
6433
|
...prev,
|
|
6386
6434
|
["content" /* Content */]: n
|
|
6387
6435
|
}));
|
|
6388
6436
|
}, [setSections]);
|
|
6389
|
-
const contentSection = /* @__PURE__ */
|
|
6437
|
+
const contentSection = /* @__PURE__ */ jsx_runtime12.jsx(import_core5.Stack, {
|
|
6390
6438
|
ref: contentSectionRef,
|
|
6391
6439
|
h: "100%",
|
|
6392
6440
|
gap: gutter,
|
|
@@ -6395,15 +6443,15 @@ function FrameLayout({
|
|
|
6395
6443
|
className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-content-section", componentsProps?.sectionContainers?.["content" /* Content */]?.className),
|
|
6396
6444
|
children
|
|
6397
6445
|
});
|
|
6398
|
-
const layoutContextValue =
|
|
6446
|
+
const layoutContextValue = import_react11.useMemo(() => ({
|
|
6399
6447
|
type: "frame" /* Frame */,
|
|
6400
6448
|
sections: defaultSections,
|
|
6401
6449
|
...layout,
|
|
6402
6450
|
layoutId
|
|
6403
6451
|
}), [layout?.sections, defaultSections, layoutId]);
|
|
6404
|
-
return /* @__PURE__ */
|
|
6452
|
+
return /* @__PURE__ */ jsx_runtime12.jsx(layoutContext.Provider, {
|
|
6405
6453
|
value: layoutContextValue,
|
|
6406
|
-
children: /* @__PURE__ */
|
|
6454
|
+
children: /* @__PURE__ */ jsx_runtime12.jsxs(import_core5.Group, {
|
|
6407
6455
|
gap: 0,
|
|
6408
6456
|
h: "100%",
|
|
6409
6457
|
w: "100%",
|
|
@@ -6414,7 +6462,7 @@ function FrameLayout({
|
|
|
6414
6462
|
},
|
|
6415
6463
|
className: clsx_default("remoraid-frame-layout", componentsProps?.horizontalContainer?.className),
|
|
6416
6464
|
children: [
|
|
6417
|
-
/* @__PURE__ */
|
|
6465
|
+
/* @__PURE__ */ jsx_runtime12.jsx(import_core5.Group, {
|
|
6418
6466
|
ref: leftSectionRef,
|
|
6419
6467
|
h: "100%",
|
|
6420
6468
|
wrap: "nowrap",
|
|
@@ -6423,26 +6471,26 @@ function FrameLayout({
|
|
|
6423
6471
|
...componentsProps?.sectionContainers?.["left" /* Left */],
|
|
6424
6472
|
className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-left-section", componentsProps?.sectionContainers?.["left" /* Left */]?.className)
|
|
6425
6473
|
}),
|
|
6426
|
-
/* @__PURE__ */
|
|
6474
|
+
/* @__PURE__ */ jsx_runtime12.jsxs(import_core5.Stack, {
|
|
6427
6475
|
h: "100%",
|
|
6428
6476
|
flex: 1,
|
|
6429
6477
|
gap: 0,
|
|
6430
6478
|
...componentsProps?.verticalContainer,
|
|
6431
6479
|
className: clsx_default("remoraid-frame-layout-vertical-container", componentsProps?.verticalContainer?.className),
|
|
6432
6480
|
children: [
|
|
6433
|
-
/* @__PURE__ */
|
|
6481
|
+
/* @__PURE__ */ jsx_runtime12.jsx(import_core5.Stack, {
|
|
6434
6482
|
ref: topSectionRef,
|
|
6435
6483
|
gap: gutter,
|
|
6436
6484
|
flex: 0,
|
|
6437
6485
|
...componentsProps?.sectionContainers?.["top" /* Top */],
|
|
6438
6486
|
className: clsx_default("remoraid-frame-layout-section", "remoraid-frame-layout-top-section", componentsProps?.sectionContainers?.["top" /* Top */]?.className)
|
|
6439
6487
|
}),
|
|
6440
|
-
includeScrollArea ? /* @__PURE__ */
|
|
6488
|
+
includeScrollArea ? /* @__PURE__ */ jsx_runtime12.jsx(import_core5.ScrollArea, {
|
|
6441
6489
|
flex: 1,
|
|
6442
6490
|
...componentsProps?.ScrollArea,
|
|
6443
6491
|
children: contentSection
|
|
6444
6492
|
}) : contentSection,
|
|
6445
|
-
/* @__PURE__ */
|
|
6493
|
+
/* @__PURE__ */ jsx_runtime12.jsx(import_core5.Stack, {
|
|
6446
6494
|
ref: bottomSectionRef,
|
|
6447
6495
|
gap: gutter,
|
|
6448
6496
|
flex: 0,
|
|
@@ -6451,7 +6499,7 @@ function FrameLayout({
|
|
|
6451
6499
|
})
|
|
6452
6500
|
]
|
|
6453
6501
|
}),
|
|
6454
|
-
/* @__PURE__ */
|
|
6502
|
+
/* @__PURE__ */ jsx_runtime12.jsx(import_core5.Group, {
|
|
6455
6503
|
ref: rightSectionRef,
|
|
6456
6504
|
h: "100%",
|
|
6457
6505
|
gap: gutter,
|
|
@@ -6469,7 +6517,7 @@ var FrameLayout_default = Object.assign(FrameLayout, {
|
|
|
6469
6517
|
});
|
|
6470
6518
|
|
|
6471
6519
|
// src/core/components/AppShell/Footer/FooterMinimal/index.tsx
|
|
6472
|
-
var
|
|
6520
|
+
var jsx_runtime13 = require("react/jsx-runtime");
|
|
6473
6521
|
function FooterMinimal({
|
|
6474
6522
|
icon: Icon2 = import_icons_react2.IconPennant,
|
|
6475
6523
|
componentsProps
|
|
@@ -6480,10 +6528,10 @@ function FooterMinimal({
|
|
|
6480
6528
|
footer: { position }
|
|
6481
6529
|
}
|
|
6482
6530
|
} = useAppShellUserExperience();
|
|
6483
|
-
const content = /* @__PURE__ */
|
|
6531
|
+
const content = /* @__PURE__ */ jsx_runtime13.jsx(PageContainer, {
|
|
6484
6532
|
...componentsProps?.container,
|
|
6485
|
-
children: /* @__PURE__ */
|
|
6486
|
-
children: /* @__PURE__ */
|
|
6533
|
+
children: /* @__PURE__ */ jsx_runtime13.jsx(import_core6.Center, {
|
|
6534
|
+
children: /* @__PURE__ */ jsx_runtime13.jsx(Icon2, {
|
|
6487
6535
|
color: "var(--mantine-color-default-border)",
|
|
6488
6536
|
...theme.componentsProps.icons.huge,
|
|
6489
6537
|
...componentsProps?.icon
|
|
@@ -6491,7 +6539,7 @@ function FooterMinimal({
|
|
|
6491
6539
|
})
|
|
6492
6540
|
});
|
|
6493
6541
|
if (position === "bottom" /* Bottom */) {
|
|
6494
|
-
return /* @__PURE__ */
|
|
6542
|
+
return /* @__PURE__ */ jsx_runtime13.jsx(FrameLayout_default.Element, {
|
|
6495
6543
|
section: position,
|
|
6496
6544
|
includeContainer: true,
|
|
6497
6545
|
...componentsProps?.layoutElement,
|
|
@@ -6506,7 +6554,7 @@ function FooterMinimal({
|
|
|
6506
6554
|
}
|
|
6507
6555
|
|
|
6508
6556
|
// src/core/components/AppShell/Footer/index.tsx
|
|
6509
|
-
var
|
|
6557
|
+
var jsx_runtime14 = require("react/jsx-runtime");
|
|
6510
6558
|
var supportedFooterPositions = {
|
|
6511
6559
|
["minimal" /* Minimal */]: [
|
|
6512
6560
|
null,
|
|
@@ -6520,7 +6568,7 @@ var defaultFooterPositions = {
|
|
|
6520
6568
|
function Footer({ componentsProps }) {
|
|
6521
6569
|
const { footerVariant } = useRemoraidApp();
|
|
6522
6570
|
if (footerVariant === "minimal" /* Minimal */) {
|
|
6523
|
-
return /* @__PURE__ */
|
|
6571
|
+
return /* @__PURE__ */ jsx_runtime14.jsx(FooterMinimal, {
|
|
6524
6572
|
...componentsProps?.FooterMinimal
|
|
6525
6573
|
});
|
|
6526
6574
|
}
|
|
@@ -6534,16 +6582,13 @@ var Footer_default = Object.assign(Footer, {
|
|
|
6534
6582
|
var import_react16 = require("react");
|
|
6535
6583
|
|
|
6536
6584
|
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6537
|
-
var import_react13 = require("react");
|
|
6538
6585
|
var import_core9 = require("@mantine/core");
|
|
6539
|
-
var import_navigation2 = require("next/navigation");
|
|
6540
6586
|
var import_lodash8 = __toESM(require_lodash());
|
|
6541
6587
|
|
|
6542
6588
|
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/NavigationMenu/index.tsx
|
|
6543
6589
|
var import_core7 = require("@mantine/core");
|
|
6544
|
-
var
|
|
6545
|
-
var
|
|
6546
|
-
var jsx_runtime14 = require("react/jsx-runtime");
|
|
6590
|
+
var import_react12 = require("react");
|
|
6591
|
+
var jsx_runtime15 = require("react/jsx-runtime");
|
|
6547
6592
|
function NavigationMenu({
|
|
6548
6593
|
target,
|
|
6549
6594
|
elements,
|
|
@@ -6552,13 +6597,13 @@ function NavigationMenu({
|
|
|
6552
6597
|
}) {
|
|
6553
6598
|
const theme = useRemoraidTheme();
|
|
6554
6599
|
const mantineTheme = import_core7.useMantineTheme();
|
|
6555
|
-
const
|
|
6556
|
-
const
|
|
6557
|
-
const item = (element) => /* @__PURE__ */
|
|
6600
|
+
const router = useRemoraidRouter();
|
|
6601
|
+
const { pathname } = router;
|
|
6602
|
+
const item = (element) => /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Transition, {
|
|
6558
6603
|
mounted: element.mounted ?? true,
|
|
6559
6604
|
...componentsProps?.transition,
|
|
6560
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
6561
|
-
leftSection: element.icon ? /* @__PURE__ */
|
|
6605
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Menu.Item, {
|
|
6606
|
+
leftSection: element.icon ? /* @__PURE__ */ jsx_runtime15.jsx(element.icon, {
|
|
6562
6607
|
...theme.componentsProps.icons.small
|
|
6563
6608
|
}) : undefined,
|
|
6564
6609
|
c: element.type === "anchor" /* Anchor */ && element.href === pathname ? mantineTheme.primaryColor : undefined,
|
|
@@ -6574,25 +6619,25 @@ function NavigationMenu({
|
|
|
6574
6619
|
children: element.label
|
|
6575
6620
|
})
|
|
6576
6621
|
});
|
|
6577
|
-
const targetElement =
|
|
6622
|
+
const targetElement = import_react12.isValidElement(target) ? target : item(target);
|
|
6578
6623
|
if (elements === undefined || elements.length === 0) {
|
|
6579
6624
|
return targetElement;
|
|
6580
6625
|
}
|
|
6581
|
-
return /* @__PURE__ */
|
|
6626
|
+
return /* @__PURE__ */ jsx_runtime15.jsxs(import_core7.Menu, {
|
|
6582
6627
|
trigger: "click-hover",
|
|
6583
6628
|
...componentsProps?.Menu,
|
|
6584
6629
|
children: [
|
|
6585
|
-
/* @__PURE__ */
|
|
6586
|
-
children: /* @__PURE__ */
|
|
6630
|
+
/* @__PURE__ */ jsx_runtime15.jsx(import_core7.Menu.Target, {
|
|
6631
|
+
children: /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Box, {
|
|
6587
6632
|
children: targetElement
|
|
6588
6633
|
})
|
|
6589
6634
|
}),
|
|
6590
|
-
/* @__PURE__ */
|
|
6635
|
+
/* @__PURE__ */ jsx_runtime15.jsxs(import_core7.Menu.Dropdown, {
|
|
6591
6636
|
children: [
|
|
6592
|
-
label !== undefined && /* @__PURE__ */
|
|
6637
|
+
label !== undefined && /* @__PURE__ */ jsx_runtime15.jsx(import_core7.Menu.Label, {
|
|
6593
6638
|
children: label
|
|
6594
6639
|
}),
|
|
6595
|
-
elements.map((element, i) => /* @__PURE__ */
|
|
6640
|
+
elements.map((element, i) => /* @__PURE__ */ jsx_runtime15.jsx(NavigationMenu, {
|
|
6596
6641
|
target: item(element),
|
|
6597
6642
|
elements: element.children,
|
|
6598
6643
|
componentsProps
|
|
@@ -6609,9 +6654,9 @@ var import_icons_react4 = require("@tabler/icons-react");
|
|
|
6609
6654
|
// src/core/components/RemoraidButton/index.tsx
|
|
6610
6655
|
var import_core8 = require("@mantine/core");
|
|
6611
6656
|
var import_icons_react3 = require("@tabler/icons-react");
|
|
6612
|
-
var
|
|
6657
|
+
var import_react13 = require("react");
|
|
6613
6658
|
var import_lodash7 = __toESM(require_lodash());
|
|
6614
|
-
var
|
|
6659
|
+
var jsx_runtime16 = require("react/jsx-runtime");
|
|
6615
6660
|
var defaultRemoraidButtonSize = "sm";
|
|
6616
6661
|
function RemoraidButton({
|
|
6617
6662
|
label,
|
|
@@ -6635,7 +6680,7 @@ function RemoraidButton({
|
|
|
6635
6680
|
const collapsed = collapsedProp ?? false;
|
|
6636
6681
|
const iconSize = iconSizeProp ?? getDefaultButtonIconSize(size);
|
|
6637
6682
|
const Icon3 = iconProp ?? import_icons_react3.IconClick;
|
|
6638
|
-
const iconElement =
|
|
6683
|
+
const iconElement = import_react13.isValidElement(Icon3) ? Icon3 : /* @__PURE__ */ jsx_runtime16.jsx(Icon3, {
|
|
6639
6684
|
...import_lodash7.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
6640
6685
|
});
|
|
6641
6686
|
const clickTransformationClassNames = {
|
|
@@ -6648,18 +6693,18 @@ function RemoraidButton({
|
|
|
6648
6693
|
["tiltRight" /* TiltRight */]: "remoraid-button-tilt-right"
|
|
6649
6694
|
};
|
|
6650
6695
|
const clickTransformationClass = clickTransformationClassNames[clickTransformation];
|
|
6651
|
-
return /* @__PURE__ */
|
|
6696
|
+
return /* @__PURE__ */ jsx_runtime16.jsx(import_core8.Transition, {
|
|
6652
6697
|
mounted,
|
|
6653
6698
|
transition: "fade",
|
|
6654
6699
|
duration: theme.transitionDurations.short,
|
|
6655
6700
|
timingFunction: "ease",
|
|
6656
6701
|
...componentsProps?.transition,
|
|
6657
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
6702
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_runtime16.jsxs(jsx_runtime16.Fragment, {
|
|
6658
6703
|
children: [
|
|
6659
|
-
/* @__PURE__ */
|
|
6704
|
+
/* @__PURE__ */ jsx_runtime16.jsx(import_core8.Tooltip, {
|
|
6660
6705
|
label,
|
|
6661
6706
|
...componentsProps?.tooltip,
|
|
6662
|
-
children: /* @__PURE__ */
|
|
6707
|
+
children: /* @__PURE__ */ jsx_runtime16.jsx(import_core8.ActionIcon, {
|
|
6663
6708
|
"aria-label": label,
|
|
6664
6709
|
variant,
|
|
6665
6710
|
onClick,
|
|
@@ -6675,7 +6720,7 @@ function RemoraidButton({
|
|
|
6675
6720
|
children: iconElement
|
|
6676
6721
|
})
|
|
6677
6722
|
}),
|
|
6678
|
-
/* @__PURE__ */
|
|
6723
|
+
/* @__PURE__ */ jsx_runtime16.jsx(import_core8.Button, {
|
|
6679
6724
|
onClick,
|
|
6680
6725
|
loading,
|
|
6681
6726
|
variant,
|
|
@@ -6696,8 +6741,7 @@ function RemoraidButton({
|
|
|
6696
6741
|
}
|
|
6697
6742
|
|
|
6698
6743
|
// src/core/components/AppShell/Navbar/NavbarMinimal/NavbarMinimalContent/index.tsx
|
|
6699
|
-
var
|
|
6700
|
-
var jsx_runtime16 = require("react/jsx-runtime");
|
|
6744
|
+
var jsx_runtime17 = require("react/jsx-runtime");
|
|
6701
6745
|
function NavbarMinimalContent({
|
|
6702
6746
|
orientation,
|
|
6703
6747
|
maxElements,
|
|
@@ -6707,8 +6751,8 @@ function NavbarMinimalContent({
|
|
|
6707
6751
|
const theme = useRemoraidTheme();
|
|
6708
6752
|
const { userExperience: appShellUserExperience } = useAppShellUserExperience();
|
|
6709
6753
|
const app = useRemoraidApp();
|
|
6710
|
-
const router =
|
|
6711
|
-
const pathname =
|
|
6754
|
+
const router = useRemoraidRouter();
|
|
6755
|
+
const { pathname } = router;
|
|
6712
6756
|
const layoutElement = useFrameLayoutElement();
|
|
6713
6757
|
const { colorScheme, setColorScheme } = useHydratedMantineColorScheme();
|
|
6714
6758
|
const collapseStaticElementsBreakpoint = collapseStaticElementsBreakpointProp ?? theme.breakpoints.navbarStaticElementsCollapse;
|
|
@@ -6729,21 +6773,10 @@ function NavbarMinimalContent({
|
|
|
6729
6773
|
buttonCollapsed = false;
|
|
6730
6774
|
}
|
|
6731
6775
|
const buttonClickTransformation = orientation === "horizontal" /* Horizontal */ ? "tiltRight" /* TiltRight */ : "default" /* Default */;
|
|
6732
|
-
const
|
|
6733
|
-
const logoIconSize = getDefaultButtonIconSize(logoButtonSize);
|
|
6734
|
-
const logoButton = app.logo ? /* @__PURE__ */ jsx_runtime16.jsx(RemoraidButton, {
|
|
6776
|
+
const logoButton = app.logo ? /* @__PURE__ */ jsx_runtime17.jsx(RemoraidButton, {
|
|
6735
6777
|
label: app.name,
|
|
6736
6778
|
variant: "subtle",
|
|
6737
|
-
icon:
|
|
6738
|
-
src: app.logo,
|
|
6739
|
-
alt: "App logo",
|
|
6740
|
-
...componentsProps?.logo,
|
|
6741
|
-
style: {
|
|
6742
|
-
width: theme.componentsProps.icons[logoIconSize].size,
|
|
6743
|
-
height: theme.componentsProps.icons[logoIconSize].size,
|
|
6744
|
-
...componentsProps?.logo?.style
|
|
6745
|
-
}
|
|
6746
|
-
}),
|
|
6779
|
+
icon: app.logo,
|
|
6747
6780
|
responsive: buttonResponsive,
|
|
6748
6781
|
collapsed: buttonCollapsed,
|
|
6749
6782
|
clickTransformation: buttonClickTransformation,
|
|
@@ -6761,9 +6794,9 @@ function NavbarMinimalContent({
|
|
|
6761
6794
|
componentsProps?.logoButton?.onClick?.(e);
|
|
6762
6795
|
}
|
|
6763
6796
|
}) : undefined;
|
|
6764
|
-
const button = (element, key) => /* @__PURE__ */
|
|
6797
|
+
const button = (element, key) => /* @__PURE__ */ jsx_runtime17.jsx(NavigationMenu, {
|
|
6765
6798
|
label: element.label,
|
|
6766
|
-
target: /* @__PURE__ */
|
|
6799
|
+
target: /* @__PURE__ */ jsx_runtime17.jsx(RemoraidButton, {
|
|
6767
6800
|
mounted: element.mounted,
|
|
6768
6801
|
label: element.label,
|
|
6769
6802
|
icon: element.icon,
|
|
@@ -6806,11 +6839,11 @@ function NavbarMinimalContent({
|
|
|
6806
6839
|
const staticElements = elements.filter((element) => element.static);
|
|
6807
6840
|
const staticButtons = staticElements.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0)).map((element, i) => button(element, `static-nav-element-${i}`));
|
|
6808
6841
|
const collapseStaticElements = staticElements.filter((element) => element.mounted ?? true).length > 1;
|
|
6809
|
-
const staticMenuButton = collapseStaticElements ? /* @__PURE__ */
|
|
6842
|
+
const staticMenuButton = collapseStaticElements ? /* @__PURE__ */ jsx_runtime17.jsx(import_core9.Box, {
|
|
6810
6843
|
hiddenFrom: collapseStaticElementsBreakpoint,
|
|
6811
|
-
children: /* @__PURE__ */
|
|
6844
|
+
children: /* @__PURE__ */ jsx_runtime17.jsx(NavigationMenu, {
|
|
6812
6845
|
elements: staticElements,
|
|
6813
|
-
target: /* @__PURE__ */
|
|
6846
|
+
target: /* @__PURE__ */ jsx_runtime17.jsx(RemoraidButton, {
|
|
6814
6847
|
label: "Static elements",
|
|
6815
6848
|
icon: import_icons_react4.IconDots,
|
|
6816
6849
|
responsive: orientation === "vertical" /* Vertical */ ? buttonResponsive : false,
|
|
@@ -6831,41 +6864,41 @@ function NavbarMinimalContent({
|
|
|
6831
6864
|
}, componentsProps?.NavigationMenu?.componentsProps)
|
|
6832
6865
|
})
|
|
6833
6866
|
}) : null;
|
|
6834
|
-
return /* @__PURE__ */
|
|
6867
|
+
return /* @__PURE__ */ jsx_runtime17.jsx(import_core9.Paper, {
|
|
6835
6868
|
bg: theme.transparentBackground,
|
|
6836
6869
|
h: "100%",
|
|
6837
6870
|
p: "md",
|
|
6838
6871
|
shadow: "md",
|
|
6839
6872
|
...componentsProps?.container,
|
|
6840
|
-
children: orientation === "vertical" /* Vertical */ ? /* @__PURE__ */
|
|
6873
|
+
children: orientation === "vertical" /* Vertical */ ? /* @__PURE__ */ jsx_runtime17.jsxs(import_core9.Stack, {
|
|
6841
6874
|
h: "100%",
|
|
6842
6875
|
children: [
|
|
6843
6876
|
logoButton,
|
|
6844
|
-
/* @__PURE__ */
|
|
6877
|
+
/* @__PURE__ */ jsx_runtime17.jsx(import_core9.ScrollArea, {
|
|
6845
6878
|
flex: 1,
|
|
6846
|
-
children: /* @__PURE__ */
|
|
6879
|
+
children: /* @__PURE__ */ jsx_runtime17.jsx(import_core9.Stack, {
|
|
6847
6880
|
children: buttons
|
|
6848
6881
|
})
|
|
6849
6882
|
}),
|
|
6850
|
-
/* @__PURE__ */
|
|
6883
|
+
/* @__PURE__ */ jsx_runtime17.jsx(import_core9.Stack, {
|
|
6851
6884
|
visibleFrom: collapseStaticElements ? collapseStaticElementsBreakpoint : undefined,
|
|
6852
6885
|
children: staticButtons
|
|
6853
6886
|
}),
|
|
6854
6887
|
staticMenuButton
|
|
6855
6888
|
]
|
|
6856
|
-
}) : /* @__PURE__ */
|
|
6889
|
+
}) : /* @__PURE__ */ jsx_runtime17.jsxs(import_core9.Group, {
|
|
6857
6890
|
wrap: "nowrap",
|
|
6858
6891
|
children: [
|
|
6859
6892
|
logoButton,
|
|
6860
|
-
/* @__PURE__ */
|
|
6893
|
+
/* @__PURE__ */ jsx_runtime17.jsx(import_core9.ScrollArea, {
|
|
6861
6894
|
flex: 1,
|
|
6862
6895
|
style: { contain: "inline-size" },
|
|
6863
|
-
children: /* @__PURE__ */
|
|
6896
|
+
children: /* @__PURE__ */ jsx_runtime17.jsx(import_core9.Group, {
|
|
6864
6897
|
wrap: "nowrap",
|
|
6865
6898
|
children: buttons
|
|
6866
6899
|
})
|
|
6867
6900
|
}),
|
|
6868
|
-
/* @__PURE__ */
|
|
6901
|
+
/* @__PURE__ */ jsx_runtime17.jsx(import_core9.Group, {
|
|
6869
6902
|
wrap: "nowrap",
|
|
6870
6903
|
visibleFrom: collapseStaticElements ? collapseStaticElementsBreakpoint : undefined,
|
|
6871
6904
|
children: staticButtons
|
|
@@ -6888,7 +6921,7 @@ var import_core12 = require("@mantine/core");
|
|
|
6888
6921
|
var import_core10 = require("@mantine/core");
|
|
6889
6922
|
var import_icons_react5 = require("@tabler/icons-react");
|
|
6890
6923
|
var import_lodash9 = __toESM(require_lodash());
|
|
6891
|
-
var
|
|
6924
|
+
var jsx_runtime18 = require("react/jsx-runtime");
|
|
6892
6925
|
function ControlButton({
|
|
6893
6926
|
icon: Icon4 = import_icons_react5.IconClick,
|
|
6894
6927
|
mounted = true,
|
|
@@ -6901,17 +6934,17 @@ function ControlButton({
|
|
|
6901
6934
|
componentsProps
|
|
6902
6935
|
}) {
|
|
6903
6936
|
const theme = useRemoraidTheme();
|
|
6904
|
-
return /* @__PURE__ */
|
|
6937
|
+
return /* @__PURE__ */ jsx_runtime18.jsx(import_core10.Transition, {
|
|
6905
6938
|
mounted,
|
|
6906
6939
|
transition: "fade",
|
|
6907
6940
|
duration: theme.transitionDurations.short,
|
|
6908
6941
|
timingFunction: "ease",
|
|
6909
6942
|
...componentsProps?.transition,
|
|
6910
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
6943
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_runtime18.jsx(import_core10.Tooltip, {
|
|
6911
6944
|
label: tooltip,
|
|
6912
6945
|
disabled: !Boolean(tooltip),
|
|
6913
6946
|
...componentsProps?.tooltip,
|
|
6914
|
-
children: /* @__PURE__ */
|
|
6947
|
+
children: /* @__PURE__ */ jsx_runtime18.jsx(import_core10.ActionIcon, {
|
|
6915
6948
|
"data-control-button": true,
|
|
6916
6949
|
size,
|
|
6917
6950
|
color,
|
|
@@ -6922,7 +6955,7 @@ function ControlButton({
|
|
|
6922
6955
|
order,
|
|
6923
6956
|
...import_lodash9.merge(transitionStyle, componentsProps?.button?.style)
|
|
6924
6957
|
},
|
|
6925
|
-
children: /* @__PURE__ */
|
|
6958
|
+
children: /* @__PURE__ */ jsx_runtime18.jsx(Icon4, {
|
|
6926
6959
|
...import_lodash9.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
6927
6960
|
})
|
|
6928
6961
|
})
|
|
@@ -6935,7 +6968,7 @@ var import_react14 = require("react");
|
|
|
6935
6968
|
var import_core11 = require("@mantine/core");
|
|
6936
6969
|
var import_icons_react6 = require("@tabler/icons-react");
|
|
6937
6970
|
var import_lodash10 = __toESM(require_lodash());
|
|
6938
|
-
var
|
|
6971
|
+
var jsx_runtime19 = require("react/jsx-runtime");
|
|
6939
6972
|
function Controls({
|
|
6940
6973
|
groupRef,
|
|
6941
6974
|
mounted = true,
|
|
@@ -6993,14 +7026,14 @@ function Controls({
|
|
|
6993
7026
|
const handlePointerUp = (e) => {
|
|
6994
7027
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
6995
7028
|
};
|
|
6996
|
-
return /* @__PURE__ */
|
|
7029
|
+
return /* @__PURE__ */ jsx_runtime19.jsx(import_core11.Transition, {
|
|
6997
7030
|
mounted,
|
|
6998
7031
|
keepMounted: true,
|
|
6999
7032
|
transition: "pop",
|
|
7000
7033
|
duration: theme.transitionDurations.short,
|
|
7001
7034
|
timingFunction: "ease",
|
|
7002
7035
|
...componentsProps?.transition,
|
|
7003
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
7036
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_runtime19.jsx(import_core11.Paper, {
|
|
7004
7037
|
ref: containerRef,
|
|
7005
7038
|
pos: "absolute",
|
|
7006
7039
|
p: gutter,
|
|
@@ -7016,14 +7049,14 @@ function Controls({
|
|
|
7016
7049
|
...import_lodash10.merge(transitionStyle, componentsProps?.container?.style)
|
|
7017
7050
|
},
|
|
7018
7051
|
className: clsx_default("remoraid-controls", componentsProps?.container?.className),
|
|
7019
|
-
children: /* @__PURE__ */
|
|
7052
|
+
children: /* @__PURE__ */ jsx_runtime19.jsxs(import_core11.Group, {
|
|
7020
7053
|
gap: gutter,
|
|
7021
7054
|
ref: groupRef,
|
|
7022
7055
|
wrap: "nowrap",
|
|
7023
7056
|
...componentsProps?.group,
|
|
7024
7057
|
className: clsx_default("remoraid-controls-group", componentsProps?.group?.className),
|
|
7025
7058
|
children: [
|
|
7026
|
-
/* @__PURE__ */
|
|
7059
|
+
/* @__PURE__ */ jsx_runtime19.jsx(import_icons_react6.IconGripHorizontal, {
|
|
7027
7060
|
...import_lodash10.merge({}, theme.componentsProps.icons[iconSize], { order: -100, color: "var(--mantine-color-default-border)" }, componentsProps?.gripIcon)
|
|
7028
7061
|
}),
|
|
7029
7062
|
children,
|
|
@@ -7031,7 +7064,7 @@ function Controls({
|
|
|
7031
7064
|
if (isValidElementOfType(ControlButton, button)) {
|
|
7032
7065
|
return button;
|
|
7033
7066
|
}
|
|
7034
|
-
return /* @__PURE__ */
|
|
7067
|
+
return /* @__PURE__ */ jsx_runtime19.jsx(ControlButton, {
|
|
7035
7068
|
...button
|
|
7036
7069
|
}, i);
|
|
7037
7070
|
})
|
|
@@ -7042,7 +7075,7 @@ function Controls({
|
|
|
7042
7075
|
}
|
|
7043
7076
|
|
|
7044
7077
|
// src/core/components/Pinnable/index.tsx
|
|
7045
|
-
var
|
|
7078
|
+
var jsx_runtime20 = require("react/jsx-runtime");
|
|
7046
7079
|
function Pinnable({
|
|
7047
7080
|
layoutType: layoutTypeProp,
|
|
7048
7081
|
section,
|
|
@@ -7062,7 +7095,7 @@ function Pinnable({
|
|
|
7062
7095
|
if (layout && layout.type !== layoutType) {
|
|
7063
7096
|
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.`);
|
|
7064
7097
|
}
|
|
7065
|
-
const controlButton = import_react15.useMemo(() => /* @__PURE__ */
|
|
7098
|
+
const controlButton = import_react15.useMemo(() => /* @__PURE__ */ jsx_runtime20.jsx(ControlButton, {
|
|
7066
7099
|
icon: pinned ? import_icons_react7.IconPinnedOff : import_icons_react7.IconPin,
|
|
7067
7100
|
tooltip: pinned ? "Unpin" : "Pin",
|
|
7068
7101
|
color: "green",
|
|
@@ -7073,7 +7106,7 @@ function Pinnable({
|
|
|
7073
7106
|
componentsProps?.button?.onClick?.(e);
|
|
7074
7107
|
}
|
|
7075
7108
|
}), [pinned, componentsProps?.button]);
|
|
7076
|
-
const element = /* @__PURE__ */
|
|
7109
|
+
const element = /* @__PURE__ */ jsx_runtime20.jsxs(import_core12.Box, {
|
|
7077
7110
|
pos: "relative",
|
|
7078
7111
|
ref: containerRef,
|
|
7079
7112
|
"data-hidden": hidden,
|
|
@@ -7081,11 +7114,11 @@ function Pinnable({
|
|
|
7081
7114
|
...componentsProps?.container,
|
|
7082
7115
|
className: clsx_default("remoraid-pinnable", componentsProps?.container?.className),
|
|
7083
7116
|
children: [
|
|
7084
|
-
controlsContainer === undefined ? /* @__PURE__ */
|
|
7117
|
+
controlsContainer === undefined ? /* @__PURE__ */ jsx_runtime20.jsx(Controls, {
|
|
7085
7118
|
dragContainerRef: containerRef,
|
|
7086
7119
|
...componentsProps?.controls,
|
|
7087
7120
|
children: controlButton
|
|
7088
|
-
}) : controlsContainer !== null && /* @__PURE__ */
|
|
7121
|
+
}) : controlsContainer !== null && /* @__PURE__ */ jsx_runtime20.jsx(import_core12.Portal, {
|
|
7089
7122
|
target: controlsContainer,
|
|
7090
7123
|
children: controlButton
|
|
7091
7124
|
}),
|
|
@@ -7099,7 +7132,7 @@ function Pinnable({
|
|
|
7099
7132
|
return null;
|
|
7100
7133
|
}
|
|
7101
7134
|
if (pinned && layoutType === "frame" /* Frame */) {
|
|
7102
|
-
return /* @__PURE__ */
|
|
7135
|
+
return /* @__PURE__ */ jsx_runtime20.jsx(FrameLayout_default.Element, {
|
|
7103
7136
|
layoutId,
|
|
7104
7137
|
section,
|
|
7105
7138
|
hidden,
|
|
@@ -7111,7 +7144,7 @@ function Pinnable({
|
|
|
7111
7144
|
}
|
|
7112
7145
|
|
|
7113
7146
|
// src/core/components/AppShell/Navbar/NavbarMinimal/index.tsx
|
|
7114
|
-
var
|
|
7147
|
+
var jsx_runtime21 = require("react/jsx-runtime");
|
|
7115
7148
|
function NavbarMinimal({
|
|
7116
7149
|
pinnable = true,
|
|
7117
7150
|
componentsProps
|
|
@@ -7129,7 +7162,7 @@ function NavbarMinimal({
|
|
|
7129
7162
|
setHover(false);
|
|
7130
7163
|
};
|
|
7131
7164
|
if (position === "left" /* Left */ || position === "right" /* Right */) {
|
|
7132
|
-
return /* @__PURE__ */
|
|
7165
|
+
return /* @__PURE__ */ jsx_runtime21.jsx(FrameLayout_default.Element, {
|
|
7133
7166
|
section: position,
|
|
7134
7167
|
includeContainer: true,
|
|
7135
7168
|
...componentsProps?.layoutElement,
|
|
@@ -7140,19 +7173,19 @@ function NavbarMinimal({
|
|
|
7140
7173
|
}
|
|
7141
7174
|
}
|
|
7142
7175
|
}, componentsProps?.layoutElement?.componentsProps),
|
|
7143
|
-
children: /* @__PURE__ */
|
|
7176
|
+
children: /* @__PURE__ */ jsx_runtime21.jsx(NavbarMinimalContent, {
|
|
7144
7177
|
orientation: "vertical" /* Vertical */,
|
|
7145
7178
|
...componentsProps?.content
|
|
7146
7179
|
})
|
|
7147
7180
|
});
|
|
7148
7181
|
}
|
|
7149
7182
|
if (position === "top" /* Top */ || position === "bottom" /* Bottom */) {
|
|
7150
|
-
const content = /* @__PURE__ */
|
|
7183
|
+
const content = /* @__PURE__ */ jsx_runtime21.jsx(NavbarMinimalContent, {
|
|
7151
7184
|
orientation: "horizontal" /* Horizontal */,
|
|
7152
7185
|
...componentsProps?.content
|
|
7153
7186
|
});
|
|
7154
7187
|
if (pinnable) {
|
|
7155
|
-
return /* @__PURE__ */
|
|
7188
|
+
return /* @__PURE__ */ jsx_runtime21.jsx(PageContainer, {
|
|
7156
7189
|
...componentsProps?.container,
|
|
7157
7190
|
componentsProps: {
|
|
7158
7191
|
...componentsProps?.container?.componentsProps,
|
|
@@ -7161,7 +7194,7 @@ function NavbarMinimal({
|
|
|
7161
7194
|
className: clsx_default("hide-if-empty", componentsProps?.container?.componentsProps?.container?.className)
|
|
7162
7195
|
}
|
|
7163
7196
|
},
|
|
7164
|
-
children: /* @__PURE__ */
|
|
7197
|
+
children: /* @__PURE__ */ jsx_runtime21.jsx(Pinnable, {
|
|
7165
7198
|
section: position,
|
|
7166
7199
|
initialValue: true,
|
|
7167
7200
|
...componentsProps?.Pinnable,
|
|
@@ -7204,9 +7237,9 @@ function NavbarMinimal({
|
|
|
7204
7237
|
return content;
|
|
7205
7238
|
}
|
|
7206
7239
|
if (position === "content" /* Content */) {
|
|
7207
|
-
return /* @__PURE__ */
|
|
7240
|
+
return /* @__PURE__ */ jsx_runtime21.jsx(PageContainer, {
|
|
7208
7241
|
...componentsProps?.container,
|
|
7209
|
-
children: /* @__PURE__ */
|
|
7242
|
+
children: /* @__PURE__ */ jsx_runtime21.jsx(NavbarMinimalContent, {
|
|
7210
7243
|
orientation: "horizontal" /* Horizontal */,
|
|
7211
7244
|
...componentsProps?.content
|
|
7212
7245
|
})
|
|
@@ -7217,7 +7250,7 @@ function NavbarMinimal({
|
|
|
7217
7250
|
|
|
7218
7251
|
// src/core/components/AppShell/Navbar/index.tsx
|
|
7219
7252
|
var import_icons_react8 = require("@tabler/icons-react");
|
|
7220
|
-
var
|
|
7253
|
+
var jsx_runtime22 = require("react/jsx-runtime");
|
|
7221
7254
|
var supportedNavbarPositions = {
|
|
7222
7255
|
["minimal" /* Minimal */]: [
|
|
7223
7256
|
null,
|
|
@@ -7265,21 +7298,21 @@ var getDefaultNavigationElements = ({
|
|
|
7265
7298
|
}
|
|
7266
7299
|
}
|
|
7267
7300
|
];
|
|
7268
|
-
function
|
|
7301
|
+
function Navbar({ componentsProps }) {
|
|
7269
7302
|
const { navbarVariant } = useRemoraidApp();
|
|
7270
7303
|
if (navbarVariant === "minimal" /* Minimal */) {
|
|
7271
|
-
return /* @__PURE__ */
|
|
7304
|
+
return /* @__PURE__ */ jsx_runtime22.jsx(NavbarMinimal, {
|
|
7272
7305
|
...componentsProps?.NavbarMinimal
|
|
7273
7306
|
});
|
|
7274
7307
|
}
|
|
7275
7308
|
return null;
|
|
7276
7309
|
}
|
|
7277
|
-
var Navbar_default = Object.assign(
|
|
7310
|
+
var Navbar_default = Object.assign(Navbar, {
|
|
7278
7311
|
NavbarMinimal
|
|
7279
7312
|
});
|
|
7280
7313
|
|
|
7281
7314
|
// src/core/components/AppShell/AppShellUserExperienceProvider/index.tsx
|
|
7282
|
-
var
|
|
7315
|
+
var jsx_runtime23 = require("react/jsx-runtime");
|
|
7283
7316
|
var defaultAppShellUserExperience = {
|
|
7284
7317
|
navbar: {
|
|
7285
7318
|
position: null,
|
|
@@ -7316,7 +7349,7 @@ function AppShellUserExperienceProvider({
|
|
|
7316
7349
|
}
|
|
7317
7350
|
return true;
|
|
7318
7351
|
};
|
|
7319
|
-
return /* @__PURE__ */
|
|
7352
|
+
return /* @__PURE__ */ jsx_runtime23.jsx(UserExperienceProviderWrapper, {
|
|
7320
7353
|
context: appShellUserExperienceContext,
|
|
7321
7354
|
isValidUserExperience,
|
|
7322
7355
|
cookieName: cookieName ?? defaultAppShellUserExperienceCookieName,
|
|
@@ -7334,7 +7367,7 @@ function AppShellUserExperienceProvider({
|
|
|
7334
7367
|
}
|
|
7335
7368
|
|
|
7336
7369
|
// src/core/components/AppShell/index.tsx
|
|
7337
|
-
var
|
|
7370
|
+
var jsx_runtime24 = require("react/jsx-runtime");
|
|
7338
7371
|
var remoraidAppShellLayoutId = "remoraid-app-shell";
|
|
7339
7372
|
function AppShell({
|
|
7340
7373
|
gutter,
|
|
@@ -7358,25 +7391,25 @@ function AppShell({
|
|
|
7358
7391
|
}
|
|
7359
7392
|
meta.content = computedBodyColor;
|
|
7360
7393
|
}, [colorScheme]);
|
|
7361
|
-
return /* @__PURE__ */
|
|
7394
|
+
return /* @__PURE__ */ jsx_runtime24.jsx(AppProvider, {
|
|
7362
7395
|
appContext: appContext2,
|
|
7363
7396
|
...componentsProps?.AppProvider,
|
|
7364
|
-
children: /* @__PURE__ */
|
|
7397
|
+
children: /* @__PURE__ */ jsx_runtime24.jsx(AppShellUserExperienceProvider, {
|
|
7365
7398
|
...componentsProps?.AppShellUserExperienceProvider,
|
|
7366
7399
|
initialValue: import_lodash13.merge(initialUserExperience, componentsProps?.AppShellUserExperienceProvider?.initialValue),
|
|
7367
|
-
children: /* @__PURE__ */
|
|
7400
|
+
children: /* @__PURE__ */ jsx_runtime24.jsx(import_core13.Box, {
|
|
7368
7401
|
h: "100dvh",
|
|
7369
7402
|
...componentsProps?.container,
|
|
7370
|
-
children: /* @__PURE__ */
|
|
7403
|
+
children: /* @__PURE__ */ jsx_runtime24.jsxs(FrameLayout_default, {
|
|
7371
7404
|
layoutId: remoraidAppShellLayoutId,
|
|
7372
7405
|
gutter: gutter ?? theme.primaryGutter,
|
|
7373
7406
|
...componentsProps?.layout,
|
|
7374
7407
|
children: [
|
|
7375
|
-
/* @__PURE__ */
|
|
7408
|
+
/* @__PURE__ */ jsx_runtime24.jsx(Navbar_default, {
|
|
7376
7409
|
...componentsProps?.navbar
|
|
7377
7410
|
}),
|
|
7378
7411
|
children,
|
|
7379
|
-
/* @__PURE__ */
|
|
7412
|
+
/* @__PURE__ */ jsx_runtime24.jsx(Footer_default, {
|
|
7380
7413
|
...componentsProps?.footer
|
|
7381
7414
|
})
|
|
7382
7415
|
]
|
|
@@ -7395,8 +7428,7 @@ var import_core16 = require("@mantine/core");
|
|
|
7395
7428
|
// src/core/components/Page/index.tsx
|
|
7396
7429
|
var import_core14 = require("@mantine/core");
|
|
7397
7430
|
var import_react19 = __toESM(require("react"));
|
|
7398
|
-
var
|
|
7399
|
-
var jsx_runtime24 = require("react/jsx-runtime");
|
|
7431
|
+
var jsx_runtime25 = require("react/jsx-runtime");
|
|
7400
7432
|
var pageContext = import_react19.default.createContext(null);
|
|
7401
7433
|
var usePage = () => {
|
|
7402
7434
|
return import_react19.useContext(pageContext);
|
|
@@ -7409,7 +7441,7 @@ function Page({
|
|
|
7409
7441
|
componentsProps
|
|
7410
7442
|
}) {
|
|
7411
7443
|
const theme = useRemoraidTheme();
|
|
7412
|
-
const pathname =
|
|
7444
|
+
const { pathname } = useRemoraidRouter();
|
|
7413
7445
|
const { isPageRegistered, registerPage } = useWidgets();
|
|
7414
7446
|
const pageId = config?.pageId ?? pathname;
|
|
7415
7447
|
import_react19.useEffect(() => {
|
|
@@ -7419,11 +7451,11 @@ function Page({
|
|
|
7419
7451
|
}
|
|
7420
7452
|
}
|
|
7421
7453
|
}, []);
|
|
7422
|
-
return /* @__PURE__ */
|
|
7423
|
-
value: { name: name ??
|
|
7424
|
-
children: /* @__PURE__ */
|
|
7454
|
+
return /* @__PURE__ */ jsx_runtime25.jsx(pageContext.Provider, {
|
|
7455
|
+
value: { name: name ?? pageId, pageId, ...config },
|
|
7456
|
+
children: /* @__PURE__ */ jsx_runtime25.jsx(PageContainer, {
|
|
7425
7457
|
...componentsProps?.PageContainer,
|
|
7426
|
-
children: /* @__PURE__ */
|
|
7458
|
+
children: /* @__PURE__ */ jsx_runtime25.jsx(import_core14.Stack, {
|
|
7427
7459
|
gap: gap ?? theme.primaryGutter,
|
|
7428
7460
|
...componentsProps?.Stack,
|
|
7429
7461
|
className: clsx_default("remoraid-page", componentsProps?.Stack?.className),
|
|
@@ -7439,7 +7471,7 @@ var import_react20 = require("react");
|
|
|
7439
7471
|
|
|
7440
7472
|
// src/core/components/ScrollableChipGroup/index.tsx
|
|
7441
7473
|
var import_core15 = require("@mantine/core");
|
|
7442
|
-
var
|
|
7474
|
+
var jsx_runtime26 = require("react/jsx-runtime");
|
|
7443
7475
|
function ScrollableChipGroup({
|
|
7444
7476
|
value,
|
|
7445
7477
|
ref,
|
|
@@ -7448,16 +7480,16 @@ function ScrollableChipGroup({
|
|
|
7448
7480
|
componentsProps,
|
|
7449
7481
|
children
|
|
7450
7482
|
}) {
|
|
7451
|
-
return /* @__PURE__ */
|
|
7483
|
+
return /* @__PURE__ */ jsx_runtime26.jsx(import_core15.ScrollArea, {
|
|
7452
7484
|
ref,
|
|
7453
7485
|
...componentsProps?.ScrollArea,
|
|
7454
7486
|
style: { contain: "inline-size", ...componentsProps?.ScrollArea?.style },
|
|
7455
|
-
children: /* @__PURE__ */
|
|
7487
|
+
children: /* @__PURE__ */ jsx_runtime26.jsx(import_core15.Chip.Group, {
|
|
7456
7488
|
value,
|
|
7457
7489
|
onChange,
|
|
7458
7490
|
...componentsProps?.chipGroup,
|
|
7459
7491
|
multiple: true,
|
|
7460
|
-
children: /* @__PURE__ */
|
|
7492
|
+
children: /* @__PURE__ */ jsx_runtime26.jsx(import_core15.Flex, {
|
|
7461
7493
|
justify: "flex-start",
|
|
7462
7494
|
align: "center",
|
|
7463
7495
|
gap,
|
|
@@ -7471,7 +7503,7 @@ function ScrollableChipGroup({
|
|
|
7471
7503
|
|
|
7472
7504
|
// src/core/components/WidgetSelectionHeader/index.tsx
|
|
7473
7505
|
var import_lodash14 = __toESM(require_lodash());
|
|
7474
|
-
var
|
|
7506
|
+
var jsx_runtime27 = require("react/jsx-runtime");
|
|
7475
7507
|
function WidgetSelectionHeader({
|
|
7476
7508
|
title,
|
|
7477
7509
|
pinnableSection = "top" /* Top */,
|
|
@@ -7502,7 +7534,7 @@ function WidgetSelectionHeader({
|
|
|
7502
7534
|
const scrollAreaRef = import_react20.useRef(null);
|
|
7503
7535
|
const widgets = widgetsContext2.widgets[page.pageId] ?? {};
|
|
7504
7536
|
const selectedWidgets = Object.entries(widgets).reduce((t, [widgetId, widget]) => widget?.selected ? [...t, widgetId] : t, []);
|
|
7505
|
-
const element = /* @__PURE__ */
|
|
7537
|
+
const element = /* @__PURE__ */ jsx_runtime27.jsxs(import_core16.Flex, {
|
|
7506
7538
|
justify: "flex-start",
|
|
7507
7539
|
align: "center",
|
|
7508
7540
|
gap: "md",
|
|
@@ -7521,15 +7553,16 @@ function WidgetSelectionHeader({
|
|
|
7521
7553
|
},
|
|
7522
7554
|
className: clsx_default(!pinnableSection ? "remoraid-non-widget-segment" : undefined, !pinnableSection ? "remoraid-segment" : undefined, componentsProps?.container?.className),
|
|
7523
7555
|
children: [
|
|
7524
|
-
/* @__PURE__ */
|
|
7556
|
+
/* @__PURE__ */ jsx_runtime27.jsx(import_core16.Text, {
|
|
7525
7557
|
size: "md",
|
|
7526
7558
|
...componentsProps?.title,
|
|
7527
7559
|
children: title ?? page.name
|
|
7528
7560
|
}),
|
|
7529
|
-
/* @__PURE__ */
|
|
7530
|
-
orientation: "vertical"
|
|
7561
|
+
/* @__PURE__ */ jsx_runtime27.jsx(import_core16.Divider, {
|
|
7562
|
+
orientation: "vertical",
|
|
7563
|
+
...componentsProps?.divider
|
|
7531
7564
|
}),
|
|
7532
|
-
isPageRegistered(page.pageId) && /* @__PURE__ */
|
|
7565
|
+
isPageRegistered(page.pageId) && /* @__PURE__ */ jsx_runtime27.jsx(ScrollableChipGroup, {
|
|
7533
7566
|
value: selectedWidgets,
|
|
7534
7567
|
ref: scrollAreaRef,
|
|
7535
7568
|
...componentsProps?.ScrollableChipGroup,
|
|
@@ -7542,19 +7575,19 @@ function WidgetSelectionHeader({
|
|
|
7542
7575
|
if (!widget) {
|
|
7543
7576
|
return;
|
|
7544
7577
|
}
|
|
7545
|
-
return /* @__PURE__ */
|
|
7578
|
+
return /* @__PURE__ */ jsx_runtime27.jsxs(import_core16.Menu, {
|
|
7546
7579
|
trigger: "hover",
|
|
7547
7580
|
...componentsProps?.widgetMenu,
|
|
7548
7581
|
children: [
|
|
7549
|
-
/* @__PURE__ */
|
|
7550
|
-
children: /* @__PURE__ */
|
|
7551
|
-
children: /* @__PURE__ */
|
|
7582
|
+
/* @__PURE__ */ jsx_runtime27.jsx(import_core16.Menu.Target, {
|
|
7583
|
+
children: /* @__PURE__ */ jsx_runtime27.jsx(import_core16.Box, {
|
|
7584
|
+
children: /* @__PURE__ */ jsx_runtime27.jsx(import_core16.Chip, {
|
|
7552
7585
|
variant: selectedWidgets.includes(widgetId) ? "filled" : "outline",
|
|
7553
7586
|
color: activeWidget === widgetId ? mantineTheme.primaryColor : "gray",
|
|
7554
7587
|
value: widgetId,
|
|
7555
7588
|
size: "sm",
|
|
7556
7589
|
disabled: disabledWidgets?.includes(widgetId),
|
|
7557
|
-
icon: /* @__PURE__ */
|
|
7590
|
+
icon: /* @__PURE__ */ jsx_runtime27.jsx(import_icons_react9.IconCheck, {
|
|
7558
7591
|
...theme.componentsProps.icons.extraSmall
|
|
7559
7592
|
}),
|
|
7560
7593
|
...componentsProps?.Chip,
|
|
@@ -7568,10 +7601,10 @@ function WidgetSelectionHeader({
|
|
|
7568
7601
|
})
|
|
7569
7602
|
})
|
|
7570
7603
|
}),
|
|
7571
|
-
/* @__PURE__ */
|
|
7604
|
+
/* @__PURE__ */ jsx_runtime27.jsxs(import_core16.Menu.Dropdown, {
|
|
7572
7605
|
children: [
|
|
7573
|
-
/* @__PURE__ */
|
|
7574
|
-
leftSection: /* @__PURE__ */
|
|
7606
|
+
/* @__PURE__ */ jsx_runtime27.jsx(import_core16.Menu.Item, {
|
|
7607
|
+
leftSection: /* @__PURE__ */ jsx_runtime27.jsx(import_icons_react9.IconNavigation, {
|
|
7575
7608
|
...theme.componentsProps.icons.small
|
|
7576
7609
|
}),
|
|
7577
7610
|
onClick: () => {
|
|
@@ -7581,8 +7614,8 @@ function WidgetSelectionHeader({
|
|
|
7581
7614
|
disabled: !widget.selected,
|
|
7582
7615
|
children: "Scroll to widget"
|
|
7583
7616
|
}),
|
|
7584
|
-
/* @__PURE__ */
|
|
7585
|
-
leftSection: /* @__PURE__ */
|
|
7617
|
+
/* @__PURE__ */ jsx_runtime27.jsx(import_core16.Menu.Item, {
|
|
7618
|
+
leftSection: /* @__PURE__ */ jsx_runtime27.jsx(import_icons_react9.IconFocus, {
|
|
7586
7619
|
...theme.componentsProps.icons.small
|
|
7587
7620
|
}),
|
|
7588
7621
|
onClick: () => {
|
|
@@ -7620,7 +7653,7 @@ function WidgetSelectionHeader({
|
|
|
7620
7653
|
});
|
|
7621
7654
|
}, [activeWidget]);
|
|
7622
7655
|
if (pinnableSection) {
|
|
7623
|
-
return /* @__PURE__ */
|
|
7656
|
+
return /* @__PURE__ */ jsx_runtime27.jsx(Pinnable, {
|
|
7624
7657
|
section: pinnableSection,
|
|
7625
7658
|
initialValue: initiallyPinned,
|
|
7626
7659
|
...componentsProps?.Pinnable,
|
|
@@ -7667,7 +7700,7 @@ var import_react21 = __toESM(require("react"));
|
|
|
7667
7700
|
|
|
7668
7701
|
// src/core/components/BadgeMinimal/index.tsx
|
|
7669
7702
|
var import_core17 = require("@mantine/core");
|
|
7670
|
-
var
|
|
7703
|
+
var jsx_runtime28 = require("react/jsx-runtime");
|
|
7671
7704
|
function BadgeMinimal({
|
|
7672
7705
|
label,
|
|
7673
7706
|
tooltip,
|
|
@@ -7675,17 +7708,17 @@ function BadgeMinimal({
|
|
|
7675
7708
|
componentsProps
|
|
7676
7709
|
}) {
|
|
7677
7710
|
const theme = useRemoraidTheme();
|
|
7678
|
-
return /* @__PURE__ */
|
|
7711
|
+
return /* @__PURE__ */ jsx_runtime28.jsx(import_core17.Transition, {
|
|
7679
7712
|
mounted,
|
|
7680
7713
|
transition: "fade",
|
|
7681
7714
|
duration: theme.transitionDurations.short,
|
|
7682
7715
|
timingFunction: "ease",
|
|
7683
7716
|
...componentsProps?.transition,
|
|
7684
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
7717
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_runtime28.jsx(import_core17.Tooltip, {
|
|
7685
7718
|
label: tooltip,
|
|
7686
7719
|
disabled: !Boolean(tooltip),
|
|
7687
7720
|
...componentsProps?.tooltip,
|
|
7688
|
-
children: /* @__PURE__ */
|
|
7721
|
+
children: /* @__PURE__ */ jsx_runtime28.jsx(import_core17.Badge, {
|
|
7689
7722
|
variant: "default",
|
|
7690
7723
|
...componentsProps?.badge,
|
|
7691
7724
|
style: {
|
|
@@ -7701,7 +7734,7 @@ function BadgeMinimal({
|
|
|
7701
7734
|
|
|
7702
7735
|
// src/core/components/BadgeGroup/index.tsx
|
|
7703
7736
|
var import_lodash15 = __toESM(require_lodash());
|
|
7704
|
-
var
|
|
7737
|
+
var jsx_runtime29 = require("react/jsx-runtime");
|
|
7705
7738
|
var react = require("react");
|
|
7706
7739
|
function BadgeGroup({
|
|
7707
7740
|
badges: badgesProp,
|
|
@@ -7722,9 +7755,9 @@ function BadgeGroup({
|
|
|
7722
7755
|
key: i
|
|
7723
7756
|
});
|
|
7724
7757
|
});
|
|
7725
|
-
return /* @__PURE__ */
|
|
7758
|
+
return /* @__PURE__ */ jsx_runtime29.jsxs(jsx_runtime29.Fragment, {
|
|
7726
7759
|
children: [
|
|
7727
|
-
/* @__PURE__ */
|
|
7760
|
+
/* @__PURE__ */ jsx_runtime29.jsx(import_core18.Group, {
|
|
7728
7761
|
gap,
|
|
7729
7762
|
wrap: "nowrap",
|
|
7730
7763
|
visibleFrom: numVisibleBadges > 1 ? breakpoint : undefined,
|
|
@@ -7732,17 +7765,17 @@ function BadgeGroup({
|
|
|
7732
7765
|
className: clsx_default("hide-if-empty", componentsProps?.container?.className),
|
|
7733
7766
|
children: badgesElement
|
|
7734
7767
|
}),
|
|
7735
|
-
/* @__PURE__ */
|
|
7768
|
+
/* @__PURE__ */ jsx_runtime29.jsx(import_core18.Transition, {
|
|
7736
7769
|
mounted: numVisibleBadges > 1,
|
|
7737
7770
|
transition: "fade",
|
|
7738
7771
|
duration: theme.transitionDurations.short,
|
|
7739
7772
|
timingFunction: "ease",
|
|
7740
7773
|
...componentsProps?.cumulativeBadgeTransition,
|
|
7741
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
7774
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_runtime29.jsxs(import_core18.HoverCard, {
|
|
7742
7775
|
...componentsProps?.HoverCard,
|
|
7743
7776
|
children: [
|
|
7744
|
-
/* @__PURE__ */
|
|
7745
|
-
children: /* @__PURE__ */
|
|
7777
|
+
/* @__PURE__ */ jsx_runtime29.jsx(import_core18.HoverCard.Target, {
|
|
7778
|
+
children: /* @__PURE__ */ jsx_runtime29.jsxs(import_core18.Badge, {
|
|
7746
7779
|
hiddenFrom: breakpoint,
|
|
7747
7780
|
variant: "dot",
|
|
7748
7781
|
...componentsProps?.cumulativeBadge,
|
|
@@ -7756,9 +7789,9 @@ function BadgeGroup({
|
|
|
7756
7789
|
]
|
|
7757
7790
|
})
|
|
7758
7791
|
}),
|
|
7759
|
-
/* @__PURE__ */
|
|
7792
|
+
/* @__PURE__ */ jsx_runtime29.jsx(import_core18.HoverCard.Dropdown, {
|
|
7760
7793
|
p: gap,
|
|
7761
|
-
children: /* @__PURE__ */
|
|
7794
|
+
children: /* @__PURE__ */ jsx_runtime29.jsx(import_core18.Stack, {
|
|
7762
7795
|
gap,
|
|
7763
7796
|
...componentsProps?.hoverContainer,
|
|
7764
7797
|
children: badgesElement
|
|
@@ -7773,7 +7806,7 @@ function BadgeGroup({
|
|
|
7773
7806
|
// src/core/components/AlertMinimal/index.tsx
|
|
7774
7807
|
var import_core19 = require("@mantine/core");
|
|
7775
7808
|
var import_lodash16 = __toESM(require_lodash());
|
|
7776
|
-
var
|
|
7809
|
+
var jsx_runtime30 = require("react/jsx-runtime");
|
|
7777
7810
|
function AlertMinimal({
|
|
7778
7811
|
category,
|
|
7779
7812
|
children,
|
|
@@ -7790,21 +7823,22 @@ function AlertMinimal({
|
|
|
7790
7823
|
iconSize = "small" /* Small */,
|
|
7791
7824
|
componentsProps
|
|
7792
7825
|
} = import_lodash16.merge({}, theme.componentsProps.alerts[category], props);
|
|
7793
|
-
return /* @__PURE__ */
|
|
7826
|
+
return /* @__PURE__ */ jsx_runtime30.jsx(import_core19.Transition, {
|
|
7794
7827
|
mounted,
|
|
7795
7828
|
transition: "fade",
|
|
7796
7829
|
duration: theme.transitionDurations.short,
|
|
7797
7830
|
timingFunction: "ease",
|
|
7798
7831
|
...componentsProps?.transition,
|
|
7799
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
7832
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_runtime30.jsxs(import_core19.Alert, {
|
|
7800
7833
|
title,
|
|
7801
7834
|
color,
|
|
7802
7835
|
variant: "light",
|
|
7803
7836
|
onClose,
|
|
7804
7837
|
withCloseButton: onClose !== undefined,
|
|
7805
|
-
icon: Icon4 ? /* @__PURE__ */
|
|
7838
|
+
icon: Icon4 ? /* @__PURE__ */ jsx_runtime30.jsx(Icon4, {
|
|
7806
7839
|
...import_lodash16.merge({}, theme.componentsProps.icons[iconSize], componentsProps?.icon)
|
|
7807
7840
|
}) : undefined,
|
|
7841
|
+
...componentsProps?.alert,
|
|
7808
7842
|
style: import_lodash16.merge(transitionStyle, componentsProps?.alert?.style),
|
|
7809
7843
|
children: [
|
|
7810
7844
|
text,
|
|
@@ -7818,7 +7852,7 @@ var import_core20 = require("@mantine/core");
|
|
|
7818
7852
|
var import_react22 = require("react");
|
|
7819
7853
|
var import_icons_react10 = require("@tabler/icons-react");
|
|
7820
7854
|
var import_lodash17 = __toESM(require_lodash());
|
|
7821
|
-
var
|
|
7855
|
+
var jsx_runtime31 = require("react/jsx-runtime");
|
|
7822
7856
|
function WidgetWrapper({
|
|
7823
7857
|
config,
|
|
7824
7858
|
mt = 0,
|
|
@@ -7857,7 +7891,7 @@ function WidgetWrapper({
|
|
|
7857
7891
|
updateActiveWidget(null);
|
|
7858
7892
|
};
|
|
7859
7893
|
const mounted = Boolean(widget?.selected);
|
|
7860
|
-
let element = /* @__PURE__ */
|
|
7894
|
+
let element = /* @__PURE__ */ jsx_runtime31.jsx(import_core20.Transition, {
|
|
7861
7895
|
mounted,
|
|
7862
7896
|
transition: "fade-left",
|
|
7863
7897
|
duration: theme.transitionDurations.medium,
|
|
@@ -7869,7 +7903,7 @@ function WidgetWrapper({
|
|
|
7869
7903
|
}
|
|
7870
7904
|
componentsProps?.transition?.onExited?.();
|
|
7871
7905
|
},
|
|
7872
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
7906
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_runtime31.jsxs(import_core20.Paper, {
|
|
7873
7907
|
ref: containerRef,
|
|
7874
7908
|
p: "md",
|
|
7875
7909
|
shadow: "md",
|
|
@@ -7892,12 +7926,12 @@ function WidgetWrapper({
|
|
|
7892
7926
|
className: clsx_default("remoraid-segment", componentsProps?.container?.className),
|
|
7893
7927
|
id: config.widgetId,
|
|
7894
7928
|
children: [
|
|
7895
|
-
/* @__PURE__ */
|
|
7929
|
+
/* @__PURE__ */ jsx_runtime31.jsx(Controls, {
|
|
7896
7930
|
dragContainerRef: containerRef,
|
|
7897
7931
|
groupRef: controlsContainerRef,
|
|
7898
7932
|
mounted: activeWidget === config.widgetId,
|
|
7899
7933
|
...componentsProps?.controls,
|
|
7900
|
-
children: /* @__PURE__ */
|
|
7934
|
+
children: /* @__PURE__ */ jsx_runtime31.jsx(ControlButton, {
|
|
7901
7935
|
mounted: withCloseButton,
|
|
7902
7936
|
icon: import_icons_react10.IconX,
|
|
7903
7937
|
tooltip: "Hide widget",
|
|
@@ -7926,7 +7960,7 @@ function WidgetWrapper({
|
|
|
7926
7960
|
})
|
|
7927
7961
|
});
|
|
7928
7962
|
if (pinnableSection !== undefined) {
|
|
7929
|
-
element = /* @__PURE__ */
|
|
7963
|
+
element = /* @__PURE__ */ jsx_runtime31.jsx(Pinnable, {
|
|
7930
7964
|
section: pinnableSection,
|
|
7931
7965
|
controlsContainer,
|
|
7932
7966
|
hidden: Boolean(widget?.hidden),
|
|
@@ -7963,7 +7997,7 @@ function WidgetWrapper({
|
|
|
7963
7997
|
var import_core21 = require("@mantine/core");
|
|
7964
7998
|
var import_react23 = require("react");
|
|
7965
7999
|
var import_lodash18 = __toESM(require_lodash());
|
|
7966
|
-
var
|
|
8000
|
+
var jsx_runtime32 = require("react/jsx-runtime");
|
|
7967
8001
|
var react2 = require("react");
|
|
7968
8002
|
function Widget({
|
|
7969
8003
|
id,
|
|
@@ -7986,7 +8020,7 @@ function Widget({
|
|
|
7986
8020
|
const badgesGap = (typeof gaps === "object" ? gaps.badges : gaps) ?? "xs";
|
|
7987
8021
|
const buttonsGap = (typeof gaps === "object" ? gaps.buttons : gaps) ?? "xs";
|
|
7988
8022
|
const alertsGap = (typeof gaps === "object" ? gaps.alerts : gaps) ?? "xs";
|
|
7989
|
-
return /* @__PURE__ */
|
|
8023
|
+
return /* @__PURE__ */ jsx_runtime32.jsx(WidgetWrapper, {
|
|
7990
8024
|
config: {
|
|
7991
8025
|
widgetId: id,
|
|
7992
8026
|
...config,
|
|
@@ -7998,39 +8032,39 @@ function Widget({
|
|
|
7998
8032
|
mt,
|
|
7999
8033
|
...componentsProps?.wrapper,
|
|
8000
8034
|
pinnableSection: pinnableSection ?? componentsProps?.wrapper?.pinnableSection,
|
|
8001
|
-
children: /* @__PURE__ */
|
|
8035
|
+
children: /* @__PURE__ */ jsx_runtime32.jsxs(import_core21.Stack, {
|
|
8002
8036
|
gap: "md",
|
|
8003
8037
|
mih: 0,
|
|
8004
8038
|
...componentsProps?.contentContainer,
|
|
8005
8039
|
children: [
|
|
8006
|
-
/* @__PURE__ */
|
|
8040
|
+
/* @__PURE__ */ jsx_runtime32.jsxs(import_core21.Group, {
|
|
8007
8041
|
justify: "space-between",
|
|
8008
8042
|
wrap: "nowrap",
|
|
8009
8043
|
children: [
|
|
8010
|
-
/* @__PURE__ */
|
|
8044
|
+
/* @__PURE__ */ jsx_runtime32.jsxs(import_core21.Stack, {
|
|
8011
8045
|
gap: 4,
|
|
8012
8046
|
children: [
|
|
8013
|
-
/* @__PURE__ */
|
|
8047
|
+
/* @__PURE__ */ jsx_runtime32.jsxs(import_core21.Group, {
|
|
8014
8048
|
gap: badgesGap,
|
|
8015
8049
|
wrap: "nowrap",
|
|
8016
8050
|
children: [
|
|
8017
|
-
/* @__PURE__ */
|
|
8051
|
+
/* @__PURE__ */ jsx_runtime32.jsx(import_core21.Title, {
|
|
8018
8052
|
order: 1,
|
|
8019
8053
|
size: "h2",
|
|
8020
8054
|
lineClamp: 1,
|
|
8021
8055
|
...componentsProps?.title,
|
|
8022
8056
|
children: title ?? id
|
|
8023
8057
|
}),
|
|
8024
|
-
badges !== undefined && /* @__PURE__ */
|
|
8058
|
+
badges !== undefined && /* @__PURE__ */ jsx_runtime32.jsx(BadgeGroup, {
|
|
8025
8059
|
badges,
|
|
8026
8060
|
gap: badgesGap,
|
|
8027
8061
|
...componentsProps?.badgeGroup
|
|
8028
8062
|
})
|
|
8029
8063
|
]
|
|
8030
8064
|
}),
|
|
8031
|
-
/* @__PURE__ */
|
|
8065
|
+
/* @__PURE__ */ jsx_runtime32.jsx(import_core21.Transition, {
|
|
8032
8066
|
mounted: Boolean(description),
|
|
8033
|
-
children: (transitionStyle) => /* @__PURE__ */
|
|
8067
|
+
children: (transitionStyle) => /* @__PURE__ */ jsx_runtime32.jsx(import_core21.Text, {
|
|
8034
8068
|
size: "sm",
|
|
8035
8069
|
c: "dimmed",
|
|
8036
8070
|
...componentsProps?.description,
|
|
@@ -8040,7 +8074,7 @@ function Widget({
|
|
|
8040
8074
|
})
|
|
8041
8075
|
]
|
|
8042
8076
|
}),
|
|
8043
|
-
/* @__PURE__ */
|
|
8077
|
+
/* @__PURE__ */ jsx_runtime32.jsx(import_core21.Group, {
|
|
8044
8078
|
gap: buttonsGap,
|
|
8045
8079
|
wrap: "nowrap",
|
|
8046
8080
|
children: buttons !== undefined && buttons.map((button, i) => {
|
|
@@ -8055,12 +8089,12 @@ function Widget({
|
|
|
8055
8089
|
})
|
|
8056
8090
|
]
|
|
8057
8091
|
}),
|
|
8058
|
-
/* @__PURE__ */
|
|
8059
|
-
children: /* @__PURE__ */
|
|
8092
|
+
/* @__PURE__ */ jsx_runtime32.jsx(import_core21.Box, {
|
|
8093
|
+
children: /* @__PURE__ */ jsx_runtime32.jsx(import_core21.Divider, {
|
|
8060
8094
|
...componentsProps?.divider
|
|
8061
8095
|
})
|
|
8062
8096
|
}),
|
|
8063
|
-
/* @__PURE__ */
|
|
8097
|
+
/* @__PURE__ */ jsx_runtime32.jsx(import_core21.Stack, {
|
|
8064
8098
|
align: "stretch",
|
|
8065
8099
|
gap: alertsGap,
|
|
8066
8100
|
...componentsProps?.alertsContainer,
|
|
@@ -8075,12 +8109,12 @@ function Widget({
|
|
|
8075
8109
|
});
|
|
8076
8110
|
})
|
|
8077
8111
|
}),
|
|
8078
|
-
(loading || import_react23.Children.toArray(children).length > 0) && /* @__PURE__ */
|
|
8112
|
+
(loading || import_react23.Children.toArray(children).length > 0) && /* @__PURE__ */ jsx_runtime32.jsx(import_core21.ScrollArea.Autosize, {
|
|
8079
8113
|
flex: 1,
|
|
8080
8114
|
...componentsProps?.childrenContainer,
|
|
8081
8115
|
className: clsx_default("remoraid-widget-children-container", componentsProps?.childrenContainer?.className),
|
|
8082
|
-
children: loading ? /* @__PURE__ */
|
|
8083
|
-
children: /* @__PURE__ */
|
|
8116
|
+
children: loading ? /* @__PURE__ */ jsx_runtime32.jsx(import_core21.Center, {
|
|
8117
|
+
children: /* @__PURE__ */ jsx_runtime32.jsx(import_core21.Loader, {
|
|
8084
8118
|
...componentsProps?.loader
|
|
8085
8119
|
})
|
|
8086
8120
|
}) : children
|
|
@@ -8090,19 +8124,18 @@ function Widget({
|
|
|
8090
8124
|
});
|
|
8091
8125
|
}
|
|
8092
8126
|
// src/core/components/NotFoundPage/index.tsx
|
|
8093
|
-
var
|
|
8094
|
-
var jsx_runtime32 = require("react/jsx-runtime");
|
|
8127
|
+
var jsx_runtime33 = require("react/jsx-runtime");
|
|
8095
8128
|
function NotFoundPage({
|
|
8096
8129
|
children,
|
|
8097
8130
|
message,
|
|
8098
8131
|
componentsProps
|
|
8099
8132
|
}) {
|
|
8100
|
-
const pathname =
|
|
8101
|
-
return /* @__PURE__ */
|
|
8133
|
+
const { pathname } = useRemoraidRouter();
|
|
8134
|
+
return /* @__PURE__ */ jsx_runtime33.jsxs(Page, {
|
|
8102
8135
|
name: "Not Found",
|
|
8103
8136
|
...componentsProps?.page,
|
|
8104
8137
|
children: [
|
|
8105
|
-
/* @__PURE__ */
|
|
8138
|
+
/* @__PURE__ */ jsx_runtime33.jsx(AlertMinimal, {
|
|
8106
8139
|
category: "negative" /* Negative */,
|
|
8107
8140
|
title: "404 - Page Not Found",
|
|
8108
8141
|
children: message ?? `Could not find page ${pathname}.`
|
|
@@ -8112,7 +8145,7 @@ function NotFoundPage({
|
|
|
8112
8145
|
});
|
|
8113
8146
|
}
|
|
8114
8147
|
// src/core/components/EnvironmentShell/index.tsx
|
|
8115
|
-
var
|
|
8148
|
+
var jsx_runtime34 = require("react/jsx-runtime");
|
|
8116
8149
|
var EnvironmentShellVariant;
|
|
8117
8150
|
((EnvironmentShellVariant2) => {
|
|
8118
8151
|
EnvironmentShellVariant2["Alert"] = "alert";
|
|
@@ -8129,7 +8162,7 @@ function EnvironmentShell({
|
|
|
8129
8162
|
}) {
|
|
8130
8163
|
const undefinedKeys = Object.keys(environment).filter((key) => environment[key] === undefined);
|
|
8131
8164
|
const defaultMessage = `Components could not be rendered because the following environment variable${undefinedKeys.length > 1 ? "s" : ""} are not specified: ${undefinedKeys.join(", ")}.`;
|
|
8132
|
-
const alertElement = /* @__PURE__ */
|
|
8165
|
+
const alertElement = /* @__PURE__ */ jsx_runtime34.jsx(AlertMinimal, {
|
|
8133
8166
|
mounted: undefinedKeys.length > 0,
|
|
8134
8167
|
title: `Please specify environment variable${undefinedKeys.length > 1 ? "s" : ""}`,
|
|
8135
8168
|
category: "negative" /* Negative */,
|
|
@@ -8141,7 +8174,7 @@ function EnvironmentShell({
|
|
|
8141
8174
|
}
|
|
8142
8175
|
if (variant === "alert" /* Alert */) {
|
|
8143
8176
|
if (includeAlertContainer) {
|
|
8144
|
-
return /* @__PURE__ */
|
|
8177
|
+
return /* @__PURE__ */ jsx_runtime34.jsx(PageContainer, {
|
|
8145
8178
|
...componentsProps?.alertContainer,
|
|
8146
8179
|
children: alertElement
|
|
8147
8180
|
});
|
|
@@ -8160,14 +8193,14 @@ var import_icons_react12 = require("@tabler/icons-react");
|
|
|
8160
8193
|
// src/core/components/SettingsWidget/SaveButton/index.tsx
|
|
8161
8194
|
var import_icons_react11 = require("@tabler/icons-react");
|
|
8162
8195
|
var import_core22 = require("@mantine/core");
|
|
8163
|
-
var
|
|
8196
|
+
var jsx_runtime35 = require("react/jsx-runtime");
|
|
8164
8197
|
function SaveButton({
|
|
8165
8198
|
onSaveChanges,
|
|
8166
8199
|
insideContainer,
|
|
8167
8200
|
componentsProps
|
|
8168
8201
|
}) {
|
|
8169
8202
|
const settingsWidgetOptions = useSettingsWidgetContext();
|
|
8170
|
-
const button = /* @__PURE__ */
|
|
8203
|
+
const button = /* @__PURE__ */ jsx_runtime35.jsx(RemoraidButton, {
|
|
8171
8204
|
label: "Save Changes",
|
|
8172
8205
|
icon: import_icons_react11.IconDeviceFloppy,
|
|
8173
8206
|
onClick: onSaveChanges,
|
|
@@ -8182,7 +8215,7 @@ function SaveButton({
|
|
|
8182
8215
|
}
|
|
8183
8216
|
});
|
|
8184
8217
|
if (insideContainer !== false) {
|
|
8185
|
-
return /* @__PURE__ */
|
|
8218
|
+
return /* @__PURE__ */ jsx_runtime35.jsx(import_core22.Group, {
|
|
8186
8219
|
w: "100%",
|
|
8187
8220
|
justify: "flex-end",
|
|
8188
8221
|
mt: "md",
|
|
@@ -8194,7 +8227,7 @@ function SaveButton({
|
|
|
8194
8227
|
}
|
|
8195
8228
|
|
|
8196
8229
|
// src/core/components/SettingsWidget/index.tsx
|
|
8197
|
-
var
|
|
8230
|
+
var jsx_runtime36 = require("react/jsx-runtime");
|
|
8198
8231
|
var defaultSettingsWidgetContext = {};
|
|
8199
8232
|
var settingsWidgetContext = import_react24.createContext(defaultSettingsWidgetContext);
|
|
8200
8233
|
var useSettingsWidgetContext = () => {
|
|
@@ -8207,9 +8240,9 @@ function SettingsWidget({
|
|
|
8207
8240
|
custom,
|
|
8208
8241
|
widgetProps
|
|
8209
8242
|
}) {
|
|
8210
|
-
return /* @__PURE__ */
|
|
8243
|
+
return /* @__PURE__ */ jsx_runtime36.jsx(settingsWidgetContext.Provider, {
|
|
8211
8244
|
value: { custom, unsavedChanges },
|
|
8212
|
-
children: /* @__PURE__ */
|
|
8245
|
+
children: /* @__PURE__ */ jsx_runtime36.jsx(Widget, {
|
|
8213
8246
|
title: "Settings",
|
|
8214
8247
|
id: "settings",
|
|
8215
8248
|
...widgetProps,
|
|
@@ -8249,22 +8282,22 @@ var import_core24 = require("@mantine/core");
|
|
|
8249
8282
|
|
|
8250
8283
|
// src/core/components/SettingsWidget/SettingsTable/Row/index.tsx
|
|
8251
8284
|
var import_core23 = require("@mantine/core");
|
|
8252
|
-
var
|
|
8285
|
+
var jsx_runtime37 = require("react/jsx-runtime");
|
|
8253
8286
|
function Row({
|
|
8254
8287
|
children,
|
|
8255
8288
|
label
|
|
8256
8289
|
}) {
|
|
8257
8290
|
const options = useSettingsTableOptions();
|
|
8258
|
-
return /* @__PURE__ */
|
|
8291
|
+
return /* @__PURE__ */ jsx_runtime37.jsxs(import_core23.Table.Tr, {
|
|
8259
8292
|
children: [
|
|
8260
|
-
/* @__PURE__ */
|
|
8293
|
+
/* @__PURE__ */ jsx_runtime37.jsx(import_core23.Table.Th, {
|
|
8261
8294
|
w: options.leftColumnWidth,
|
|
8262
|
-
children: /* @__PURE__ */
|
|
8295
|
+
children: /* @__PURE__ */ jsx_runtime37.jsx(import_core23.Text, {
|
|
8263
8296
|
size: "sm",
|
|
8264
8297
|
children: label
|
|
8265
8298
|
})
|
|
8266
8299
|
}),
|
|
8267
|
-
/* @__PURE__ */
|
|
8300
|
+
/* @__PURE__ */ jsx_runtime37.jsx(import_core23.Table.Td, {
|
|
8268
8301
|
py: "xs",
|
|
8269
8302
|
children
|
|
8270
8303
|
})
|
|
@@ -8273,7 +8306,7 @@ function Row({
|
|
|
8273
8306
|
}
|
|
8274
8307
|
|
|
8275
8308
|
// src/core/components/SettingsWidget/SettingsTable/index.tsx
|
|
8276
|
-
var
|
|
8309
|
+
var jsx_runtime38 = require("react/jsx-runtime");
|
|
8277
8310
|
var defaultSettingsTableOptions = {
|
|
8278
8311
|
leftColumnWidth: "38.2%"
|
|
8279
8312
|
};
|
|
@@ -8287,16 +8320,16 @@ function SettingsTable({
|
|
|
8287
8320
|
}) {
|
|
8288
8321
|
const children = asChildrenOfType(Row, childrenProp, "Check children passed to 'SettingsTable' component.");
|
|
8289
8322
|
const theme = useRemoraidTheme();
|
|
8290
|
-
return /* @__PURE__ */
|
|
8323
|
+
return /* @__PURE__ */ jsx_runtime38.jsx(settingsTableOptionsContext.Provider, {
|
|
8291
8324
|
value: {
|
|
8292
8325
|
leftColumnWidth: leftColumnWidth ?? defaultSettingsTableOptions.leftColumnWidth
|
|
8293
8326
|
},
|
|
8294
|
-
children: /* @__PURE__ */
|
|
8327
|
+
children: /* @__PURE__ */ jsx_runtime38.jsx(import_core24.Table, {
|
|
8295
8328
|
bg: theme.transparentBackground,
|
|
8296
8329
|
withTableBorder: true,
|
|
8297
8330
|
variant: "vertical",
|
|
8298
8331
|
layout: "fixed",
|
|
8299
|
-
children: /* @__PURE__ */
|
|
8332
|
+
children: /* @__PURE__ */ jsx_runtime38.jsx(import_core24.Table.Tbody, {
|
|
8300
8333
|
children
|
|
8301
8334
|
})
|
|
8302
8335
|
})
|
|
@@ -8308,7 +8341,7 @@ var SettingsTable_default = Object.assign(SettingsTable, {
|
|
|
8308
8341
|
// src/core/components/NavbarSettingsWidget/index.tsx
|
|
8309
8342
|
var import_lodash19 = __toESM(require_lodash());
|
|
8310
8343
|
var import_core25 = require("@mantine/core");
|
|
8311
|
-
var
|
|
8344
|
+
var jsx_runtime39 = require("react/jsx-runtime");
|
|
8312
8345
|
var defaultNavbarSettingsWidgetId = "navbar-settings";
|
|
8313
8346
|
function NavbarSettingsWidget({
|
|
8314
8347
|
additionalRows: additionalRowsProp,
|
|
@@ -8330,7 +8363,7 @@ function NavbarSettingsWidget({
|
|
|
8330
8363
|
["right" /* Right */]: "Right",
|
|
8331
8364
|
["content" /* Content */]: "Content section"
|
|
8332
8365
|
};
|
|
8333
|
-
return /* @__PURE__ */
|
|
8366
|
+
return /* @__PURE__ */ jsx_runtime39.jsx(SettingsWidget_default, {
|
|
8334
8367
|
widgetProps: {
|
|
8335
8368
|
id: defaultNavbarSettingsWidgetId,
|
|
8336
8369
|
title: "Navbar Settings",
|
|
@@ -8343,12 +8376,12 @@ function NavbarSettingsWidget({
|
|
|
8343
8376
|
}));
|
|
8344
8377
|
},
|
|
8345
8378
|
custom: !import_lodash19.isEqual(userExperience.navbar, initialUserExperience.navbar),
|
|
8346
|
-
children: /* @__PURE__ */
|
|
8379
|
+
children: /* @__PURE__ */ jsx_runtime39.jsxs(SettingsTable_default, {
|
|
8347
8380
|
...componentsProps?.table,
|
|
8348
8381
|
children: [
|
|
8349
|
-
/* @__PURE__ */
|
|
8382
|
+
/* @__PURE__ */ jsx_runtime39.jsx(SettingsTable_default.Row, {
|
|
8350
8383
|
label: "Select navbar position",
|
|
8351
|
-
children: /* @__PURE__ */
|
|
8384
|
+
children: /* @__PURE__ */ jsx_runtime39.jsx(import_core25.Select, {
|
|
8352
8385
|
value: userExperience.navbar.position ?? "hidden",
|
|
8353
8386
|
data: app.navbarVariant === null ? [] : supportedNavbarPositions[app.navbarVariant].map((position) => ({
|
|
8354
8387
|
value: position ?? "hidden",
|
|
@@ -8368,9 +8401,9 @@ function NavbarSettingsWidget({
|
|
|
8368
8401
|
}
|
|
8369
8402
|
})
|
|
8370
8403
|
}, "select-navbar-position"),
|
|
8371
|
-
/* @__PURE__ */
|
|
8404
|
+
/* @__PURE__ */ jsx_runtime39.jsx(SettingsTable_default.Row, {
|
|
8372
8405
|
label: "Select navbar mode",
|
|
8373
|
-
children: /* @__PURE__ */
|
|
8406
|
+
children: /* @__PURE__ */ jsx_runtime39.jsx(import_core25.Select, {
|
|
8374
8407
|
value: userExperience.navbar.mode,
|
|
8375
8408
|
data: Object.values(NavbarMode).map((mode) => ({
|
|
8376
8409
|
value: mode,
|
|
@@ -8391,7 +8424,7 @@ function NavbarSettingsWidget({
|
|
|
8391
8424
|
if (isValidElementOfType(SettingsTable_default.Row, row)) {
|
|
8392
8425
|
return row;
|
|
8393
8426
|
}
|
|
8394
|
-
return /* @__PURE__ */
|
|
8427
|
+
return /* @__PURE__ */ jsx_runtime39.jsx(SettingsTable_default.Row, {
|
|
8395
8428
|
...row
|
|
8396
8429
|
}, i);
|
|
8397
8430
|
})
|
|
@@ -8402,7 +8435,7 @@ function NavbarSettingsWidget({
|
|
|
8402
8435
|
// src/core/components/FooterSettingsWidget/index.tsx
|
|
8403
8436
|
var import_lodash20 = __toESM(require_lodash());
|
|
8404
8437
|
var import_core26 = require("@mantine/core");
|
|
8405
|
-
var
|
|
8438
|
+
var jsx_runtime40 = require("react/jsx-runtime");
|
|
8406
8439
|
var defaultFooterSettingsWidgetId = "footer-settings";
|
|
8407
8440
|
function FooterSettingsWidget({
|
|
8408
8441
|
additionalRows: additionalRowsProp,
|
|
@@ -8419,7 +8452,7 @@ function FooterSettingsWidget({
|
|
|
8419
8452
|
["right" /* Right */]: "Right",
|
|
8420
8453
|
["content" /* Content */]: "Content section"
|
|
8421
8454
|
};
|
|
8422
|
-
return /* @__PURE__ */
|
|
8455
|
+
return /* @__PURE__ */ jsx_runtime40.jsx(SettingsWidget_default, {
|
|
8423
8456
|
widgetProps: {
|
|
8424
8457
|
id: defaultFooterSettingsWidgetId,
|
|
8425
8458
|
title: "Footer Settings",
|
|
@@ -8432,12 +8465,12 @@ function FooterSettingsWidget({
|
|
|
8432
8465
|
}));
|
|
8433
8466
|
},
|
|
8434
8467
|
custom: !import_lodash20.isEqual(userExperience.footer, initialUserExperience.footer),
|
|
8435
|
-
children: /* @__PURE__ */
|
|
8468
|
+
children: /* @__PURE__ */ jsx_runtime40.jsxs(SettingsTable_default, {
|
|
8436
8469
|
...componentsProps?.table,
|
|
8437
8470
|
children: [
|
|
8438
|
-
/* @__PURE__ */
|
|
8471
|
+
/* @__PURE__ */ jsx_runtime40.jsx(SettingsTable_default.Row, {
|
|
8439
8472
|
label: "Select footer position",
|
|
8440
|
-
children: /* @__PURE__ */
|
|
8473
|
+
children: /* @__PURE__ */ jsx_runtime40.jsx(import_core26.Select, {
|
|
8441
8474
|
value: userExperience.footer.position ?? "hidden",
|
|
8442
8475
|
data: app.footerVariant === null ? [] : supportedFooterPositions[app.footerVariant].map((position) => ({
|
|
8443
8476
|
value: position ?? "hidden",
|
|
@@ -8461,7 +8494,7 @@ function FooterSettingsWidget({
|
|
|
8461
8494
|
if (isValidElementOfType(SettingsTable_default.Row, row)) {
|
|
8462
8495
|
return row;
|
|
8463
8496
|
}
|
|
8464
|
-
return /* @__PURE__ */
|
|
8497
|
+
return /* @__PURE__ */ jsx_runtime40.jsx(SettingsTable_default.Row, {
|
|
8465
8498
|
...row
|
|
8466
8499
|
}, i);
|
|
8467
8500
|
})
|
|
@@ -8471,7 +8504,7 @@ function FooterSettingsWidget({
|
|
|
8471
8504
|
}
|
|
8472
8505
|
// src/core/components/ContextClusterProvider/index.tsx
|
|
8473
8506
|
var import_react26 = __toESM(require("react"));
|
|
8474
|
-
var
|
|
8507
|
+
var jsx_runtime41 = require("react/jsx-runtime");
|
|
8475
8508
|
var createContextCluster = (generalDefaultValue, staticIds) => {
|
|
8476
8509
|
const isStaticId = (id) => {
|
|
8477
8510
|
if (staticIds?.find((staticId) => staticId === id)) {
|
|
@@ -8481,13 +8514,13 @@ var createContextCluster = (generalDefaultValue, staticIds) => {
|
|
|
8481
8514
|
};
|
|
8482
8515
|
const contexts = {};
|
|
8483
8516
|
const defaultValues = {};
|
|
8484
|
-
const
|
|
8517
|
+
const createContext10 = (id, defaultValue) => {
|
|
8485
8518
|
const context = import_react26.default.createContext(defaultValue ?? generalDefaultValue);
|
|
8486
8519
|
contexts[id] = context;
|
|
8487
8520
|
defaultValues[id] = defaultValue ?? generalDefaultValue;
|
|
8488
8521
|
return context;
|
|
8489
8522
|
};
|
|
8490
|
-
const
|
|
8523
|
+
const useContext14 = (id) => {
|
|
8491
8524
|
if (isStaticId(id)) {
|
|
8492
8525
|
return contexts[id] ? import_react26.default.useContext(contexts[id]) : generalDefaultValue;
|
|
8493
8526
|
}
|
|
@@ -8497,8 +8530,8 @@ var createContextCluster = (generalDefaultValue, staticIds) => {
|
|
|
8497
8530
|
contexts,
|
|
8498
8531
|
defaultValues,
|
|
8499
8532
|
generalDefaultValue,
|
|
8500
|
-
createContext:
|
|
8501
|
-
useContext:
|
|
8533
|
+
createContext: createContext10,
|
|
8534
|
+
useContext: useContext14
|
|
8502
8535
|
};
|
|
8503
8536
|
};
|
|
8504
8537
|
function ContextClusterProvider({
|
|
@@ -8506,7 +8539,7 @@ function ContextClusterProvider({
|
|
|
8506
8539
|
values = {},
|
|
8507
8540
|
children
|
|
8508
8541
|
}) {
|
|
8509
|
-
return Object.entries(cluster.contexts).reduceRight((t, [id, context]) => context ? /* @__PURE__ */
|
|
8542
|
+
return Object.entries(cluster.contexts).reduceRight((t, [id, context]) => context ? /* @__PURE__ */ jsx_runtime41.jsx(context.Provider, {
|
|
8510
8543
|
value: values[id] ?? cluster.defaultValues[id] ?? cluster.generalDefaultValue,
|
|
8511
8544
|
children: t
|
|
8512
8545
|
}) : t, children);
|
|
@@ -8514,7 +8547,7 @@ function ContextClusterProvider({
|
|
|
8514
8547
|
// src/core/components/InputWrapperScrollArea/index.tsx
|
|
8515
8548
|
var import_core27 = require("@mantine/core");
|
|
8516
8549
|
var import_react27 = require("react");
|
|
8517
|
-
var
|
|
8550
|
+
var jsx_runtime42 = require("react/jsx-runtime");
|
|
8518
8551
|
function InputWrapperScrollArea({
|
|
8519
8552
|
children,
|
|
8520
8553
|
label,
|
|
@@ -8526,7 +8559,7 @@ function InputWrapperScrollArea({
|
|
|
8526
8559
|
}) {
|
|
8527
8560
|
const theme = useRemoraidTheme();
|
|
8528
8561
|
const [isHovering, setIsHovering] = import_react27.useState(false);
|
|
8529
|
-
return /* @__PURE__ */
|
|
8562
|
+
return /* @__PURE__ */ jsx_runtime42.jsx(import_core27.Input.Wrapper, {
|
|
8530
8563
|
label,
|
|
8531
8564
|
error,
|
|
8532
8565
|
onMouseEnter: () => setIsHovering(true),
|
|
@@ -8534,7 +8567,7 @@ function InputWrapperScrollArea({
|
|
|
8534
8567
|
description,
|
|
8535
8568
|
withAsterisk: required,
|
|
8536
8569
|
...componentsProps?.container,
|
|
8537
|
-
children: /* @__PURE__ */
|
|
8570
|
+
children: /* @__PURE__ */ jsx_runtime42.jsx(import_core27.Paper, {
|
|
8538
8571
|
shadow: "none",
|
|
8539
8572
|
p: 0,
|
|
8540
8573
|
mt: Boolean(description) ? 4 : 0,
|
|
@@ -8545,12 +8578,12 @@ function InputWrapperScrollArea({
|
|
|
8545
8578
|
transition: "border-color .1s",
|
|
8546
8579
|
borderColor: error ? "var(--mantine-color-error)" : isHovering ? "var(--mantine-primary-color-filled)" : undefined
|
|
8547
8580
|
},
|
|
8548
|
-
children: /* @__PURE__ */
|
|
8581
|
+
children: /* @__PURE__ */ jsx_runtime42.jsx(import_core27.ScrollArea, {
|
|
8549
8582
|
mah,
|
|
8550
8583
|
px: "md",
|
|
8551
8584
|
flex: 1,
|
|
8552
8585
|
...componentsProps?.ScrollArea,
|
|
8553
|
-
children: /* @__PURE__ */
|
|
8586
|
+
children: /* @__PURE__ */ jsx_runtime42.jsx(import_core27.Box, {
|
|
8554
8587
|
...componentsProps?.childrenContainer,
|
|
8555
8588
|
children
|
|
8556
8589
|
})
|