remoraid 2.5.6 → 2.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/index.cjs +790 -507
- package/dist/core/index.d.ts +296 -113
- package/dist/core/index.js +793 -503
- package/dist/server/index.d.ts +2 -2
- package/package.json +2 -1
package/dist/core/index.d.ts
CHANGED
@@ -1,34 +1,40 @@
|
|
1
|
-
import { PropsWithChildren as
|
2
|
-
import { AlertProps,
|
1
|
+
import { PropsWithChildren as PropsWithChildren5, ReactNode as ReactNode6 } from "react";
|
2
|
+
import { AlertProps, MantineBreakpoint, MantineColorScheme, MantineSize, MantineTheme, ScrollAreaProps } from "@mantine/core";
|
3
3
|
import { Icon, IconProps } from "@tabler/icons-react";
|
4
4
|
import { ImageProps } from "next/image";
|
5
|
-
import { ReactNode } from "react";
|
5
|
+
import { Dispatch, ReactNode, SetStateAction } from "react";
|
6
6
|
type RemoraidUser = {
|
7
7
|
name: string
|
8
8
|
} | null;
|
9
|
-
interface
|
9
|
+
interface RemoraidAuthContext {
|
10
|
+
user: RemoraidUser;
|
11
|
+
onLogout?: () => void;
|
12
|
+
}
|
13
|
+
type AppLogo = (props: Omit<ImageProps, "src" | "alt">) => ReactNode;
|
14
|
+
interface StaticRemoraidAppContext {
|
10
15
|
navigablePages: {
|
11
16
|
label: string
|
12
17
|
href: string
|
13
18
|
icon?: Icon
|
14
19
|
}[];
|
15
|
-
|
20
|
+
logo?: AppLogo;
|
21
|
+
auth?: RemoraidAuthContext;
|
16
22
|
}
|
23
|
+
type CustomAppVariables = { [K in Exclude<string, keyof StaticRemoraidAppContext>] : any };
|
24
|
+
type RemoraidAppContext<V extends CustomAppVariables> = StaticRemoraidAppContext & V;
|
25
|
+
type AppContextProps<V extends CustomAppVariables> = StaticRemoraidAppContext & V;
|
17
26
|
declare enum NavbarVariant {
|
18
27
|
Minimal = "minimal"
|
19
28
|
}
|
20
|
-
|
21
|
-
|
22
|
-
linkSize: string;
|
23
|
-
px: MantineSize | number;
|
24
|
-
py: MantineSize | number;
|
25
|
-
iconSize?: string | number;
|
29
|
+
declare enum FooterVariant {
|
30
|
+
Minimal = "minimal"
|
26
31
|
}
|
27
32
|
type UserExperience = Record<string, any>;
|
28
33
|
interface CoreUserExperience extends UserExperience {
|
29
|
-
navbarVariant: NavbarVariant;
|
30
|
-
navbarSettings: NavbarSettings;
|
31
34
|
showWelcomeMessage: boolean;
|
35
|
+
navbar: {
|
36
|
+
hiddenPages: string[]
|
37
|
+
};
|
32
38
|
}
|
33
39
|
type UserExperienceProviderProps<T extends UserExperience> = {
|
34
40
|
initialValue?: Partial<T>
|
@@ -59,7 +65,6 @@ declare enum RemoraidIconSize {
|
|
59
65
|
Medium = "medium"
|
60
66
|
}
|
61
67
|
interface RemoraidTheme {
|
62
|
-
complete: true;
|
63
68
|
transitionDurations: Record<TransitionDuration, number>;
|
64
69
|
breakpoints: Record<RemoraidBreakpoint, MantineBreakpoint>;
|
65
70
|
scrollAreaProps: ScrollAreaProps;
|
@@ -71,16 +76,11 @@ interface RemoraidTheme {
|
|
71
76
|
primaryColor?: string;
|
72
77
|
spacingPx?: Record<MantineSize, number>;
|
73
78
|
}
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
interface NavbarProps {
|
78
|
-
settings?: Partial<NavbarSettings>;
|
79
|
-
variant?: NavbarVariant;
|
80
|
-
linkIndicator?: (isHovering: boolean) => IndicatorProps;
|
81
|
-
logoIndicator?: (isHovering: boolean) => IndicatorProps;
|
82
|
-
onLogout?: () => void;
|
79
|
+
interface RemoraidThemeDependencies {
|
80
|
+
mantineTheme: MantineTheme;
|
81
|
+
colorScheme: MantineColorScheme;
|
83
82
|
}
|
83
|
+
type RemoraidThemeCallback = (dependencies: Partial<RemoraidThemeDependencies>) => Partial<RemoraidTheme>;
|
84
84
|
interface WidgetConfiguration {
|
85
85
|
widgetId: string;
|
86
86
|
name: string;
|
@@ -99,6 +99,38 @@ interface SettingsWidgetContext {
|
|
99
99
|
unsavedChanges?: boolean;
|
100
100
|
custom?: boolean;
|
101
101
|
}
|
102
|
+
interface HydrationStatus {
|
103
|
+
hasHydrated: boolean;
|
104
|
+
ensureHydration: <T>(v: T) => T | undefined;
|
105
|
+
}
|
106
|
+
declare enum LayoutType {
|
107
|
+
Frame = "frame"
|
108
|
+
}
|
109
|
+
declare enum FrameLayoutSection {
|
110
|
+
Top = "top",
|
111
|
+
Bottom = "bottom",
|
112
|
+
Left = "left",
|
113
|
+
Right = "right",
|
114
|
+
Content = "content"
|
115
|
+
}
|
116
|
+
type Layout<T extends LayoutType> = T extends LayoutType.Frame ? {
|
117
|
+
sections: Record<Exclude<FrameLayoutSection, FrameLayoutSection.Content>, HTMLDivElement | null>
|
118
|
+
} : never;
|
119
|
+
interface LayoutsContext {
|
120
|
+
layouts: Record<string, Layout<LayoutType>>;
|
121
|
+
setLayouts: Dispatch<SetStateAction<Record<string, Layout<LayoutType>>>>;
|
122
|
+
}
|
123
|
+
type FrameLayoutContext = {
|
124
|
+
layoutId: string | null
|
125
|
+
layout: Layout<LayoutType.Frame>
|
126
|
+
setLayout: Dispatch<SetStateAction<Layout<LayoutType.Frame>>>
|
127
|
+
};
|
128
|
+
declare enum FrameLayoutVariant {
|
129
|
+
Plain = "plain",
|
130
|
+
Sticky = "sticky"
|
131
|
+
}
|
132
|
+
type FrameLayoutNavbarPosition<T extends NavbarVariant> = T extends NavbarVariant.Minimal ? FrameLayoutSection.Left | FrameLayoutSection.Right : FrameLayoutSection;
|
133
|
+
type FrameLayoutFooterPosition<T extends FooterVariant> = T extends FooterVariant.Minimal ? FrameLayoutSection.Content | FrameLayoutSection.Bottom : FrameLayoutSection;
|
102
134
|
interface WidgetsContext {
|
103
135
|
widgets: {
|
104
136
|
[index: string]: {
|
@@ -120,41 +152,187 @@ interface WidgetsContext {
|
|
120
152
|
}
|
121
153
|
declare const useWidgets: () => WidgetsContext;
|
122
154
|
interface WidgetsProviderProps {}
|
123
|
-
|
124
|
-
declare const createRemoraidTheme: (customTheme?: Partial<RemoraidTheme>, mantineTheme?: MantineTheme2, colorScheme?: MantineColorScheme2) => RemoraidTheme;
|
155
|
+
declare const createRemoraidTheme: (customTheme?: Partial<RemoraidTheme>, dependencies?: Partial<RemoraidThemeDependencies>) => RemoraidTheme;
|
125
156
|
declare const useRemoraidTheme: () => RemoraidTheme;
|
126
157
|
interface ThemeProviderProps {
|
127
|
-
theme?: RemoraidTheme | RemoraidThemeCallback
|
158
|
+
theme?: RemoraidTheme | RemoraidThemeCallback;
|
128
159
|
}
|
129
160
|
import { ReactCookieProps } from "react-cookie";
|
161
|
+
import { MantineColorScheme as MantineColorScheme2 } from "@mantine/core";
|
162
|
+
import { PropsWithChildren as PropsWithChildren3, ReactNode as ReactNode4 } from "react";
|
163
|
+
declare const useHydrationStatus: () => HydrationStatus;
|
164
|
+
declare const useHydratedMantineColorScheme: () => {
|
165
|
+
colorScheme?: MantineColorScheme2
|
166
|
+
setColorScheme?: (value: MantineColorScheme2) => void
|
167
|
+
clearColorScheme?: () => void
|
168
|
+
toggleColorScheme?: () => void
|
169
|
+
};
|
170
|
+
interface HydrationStatusProviderProps {}
|
171
|
+
declare function HydrationStatusProvider({ children }: PropsWithChildren3<HydrationStatusProviderProps>): ReactNode4;
|
172
|
+
declare const defaultLayoutsContext: {
|
173
|
+
layouts: {}
|
174
|
+
setLayouts: () => void
|
175
|
+
};
|
176
|
+
declare const useLayouts: () => LayoutsContext;
|
177
|
+
interface LayoutsProviderProps {}
|
130
178
|
interface RemoraidProviderProps {
|
131
|
-
theme?:
|
132
|
-
initialUserExperience?:
|
179
|
+
theme?: ThemeProviderProps["theme"];
|
180
|
+
initialUserExperience?: UserExperienceProviderProps<CoreUserExperience>["initialValue"];
|
133
181
|
componentsProps?: {
|
134
|
-
ThemeProvider?: ThemeProviderProps
|
135
|
-
CoreUserExperienceProvider?: UserExperienceProviderProps<CoreUserExperience
|
136
|
-
WidgetsProvider?: WidgetsProviderProps
|
137
|
-
CookiesProvider?: ReactCookieProps
|
182
|
+
ThemeProvider?: Partial<ThemeProviderProps>
|
183
|
+
CoreUserExperienceProvider?: Partial<UserExperienceProviderProps<CoreUserExperience>>
|
184
|
+
WidgetsProvider?: Partial<WidgetsProviderProps>
|
185
|
+
CookiesProvider?: Partial<ReactCookieProps>
|
186
|
+
HydrationStatusProviderProps?: Partial<HydrationStatusProviderProps>
|
187
|
+
LayoutsProviderProps?: Partial<LayoutsProviderProps>
|
138
188
|
};
|
139
189
|
}
|
140
|
-
declare function RemoraidProvider({ children, theme, initialUserExperience, componentsProps }:
|
141
|
-
import {
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
190
|
+
declare function RemoraidProvider({ children, theme, initialUserExperience, componentsProps }: PropsWithChildren5<RemoraidProviderProps>): ReactNode6;
|
191
|
+
import { BoxProps as BoxProps3 } from "@mantine/core";
|
192
|
+
import { IndicatorProps, PaperProps } from "@mantine/core";
|
193
|
+
import { Icon as Icon2 } from "@tabler/icons-react";
|
194
|
+
import { ReactNode as ReactNode7 } from "react";
|
195
|
+
interface NavbarLinkProps {
|
196
|
+
label: string;
|
197
|
+
linkSize: string;
|
198
|
+
iconSize: string;
|
199
|
+
icon?: Icon2;
|
200
|
+
indicator?: (isHovering: boolean) => IndicatorProps;
|
201
|
+
href?: string;
|
202
|
+
active?: boolean;
|
203
|
+
onClick?(): void;
|
204
|
+
}
|
205
|
+
interface NavbarMinimalProps {
|
206
|
+
linkSize?: string;
|
207
|
+
iconSize?: string;
|
208
|
+
linkIndicator?: (isHovering: boolean) => IndicatorProps;
|
209
|
+
logoIndicator?: (isHovering: boolean) => IndicatorProps;
|
210
|
+
componentsProps?: {
|
211
|
+
container?: Partial<PaperProps>
|
212
|
+
link?: Partial<NavbarLinkProps>
|
213
|
+
};
|
147
214
|
}
|
148
|
-
declare function
|
149
|
-
import {
|
150
|
-
|
151
|
-
|
152
|
-
interface
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
215
|
+
declare function NavbarMinimal({ linkSize, iconSize, linkIndicator, logoIndicator, componentsProps }: NavbarMinimalProps): ReactNode7;
|
216
|
+
import { GroupProps } from "@mantine/core";
|
217
|
+
import { IconProps as IconProps2 } from "@tabler/icons-react";
|
218
|
+
import { ReactNode as ReactNode8 } from "react";
|
219
|
+
interface FooterMinimalProps {
|
220
|
+
componentsProps?: {
|
221
|
+
container?: Partial<GroupProps>
|
222
|
+
icon?: Partial<IconProps2>
|
223
|
+
};
|
224
|
+
}
|
225
|
+
declare function FooterMinimal({ componentsProps }: FooterMinimalProps): ReactNode8;
|
226
|
+
import { PropsWithChildren as PropsWithChildren9, ReactNode as ReactNode12 } from "react";
|
227
|
+
import { PropsWithChildren as PropsWithChildren6, ReactNode as ReactNode9 } from "react";
|
228
|
+
declare const defaultAppContext: RemoraidAppContext<CustomAppVariables>;
|
229
|
+
declare const useRemoraidApp: () => RemoraidAppContext<CustomAppVariables>;
|
230
|
+
interface AppProviderProps<V extends CustomAppVariables = {}> {
|
231
|
+
appContext: AppContextProps<V>;
|
232
|
+
}
|
233
|
+
declare function AppProvider2<V extends CustomAppVariables = {}>({ appContext: appContextProps, children }: PropsWithChildren6<AppProviderProps<V>>): ReactNode9;
|
234
|
+
import { ReactElement } from "react";
|
235
|
+
type Common<
|
236
|
+
A,
|
237
|
+
B
|
238
|
+
> = Pick<A & B, keyof A & keyof B>;
|
239
|
+
type OnlyChildrenOf<
|
240
|
+
T extends (...args: any) => any,
|
241
|
+
P = any
|
242
|
+
> = ReactElement<P, T> | ReactElement<P, T>[];
|
243
|
+
type Optional<
|
244
|
+
T,
|
245
|
+
K extends keyof T
|
246
|
+
> = Omit<T, K> & Partial<Pick<T, K>>;
|
247
|
+
type OptionalIfExtends<
|
248
|
+
T,
|
249
|
+
K extends keyof T,
|
250
|
+
V1,
|
251
|
+
V2
|
252
|
+
> = [V1] extends [V2] ? Optional<T, K> : T;
|
253
|
+
import { BoxProps as BoxProps2, GroupProps as GroupProps2, ScrollAreaProps as ScrollAreaProps2, StackProps } from "@mantine/core";
|
254
|
+
import { PropsWithChildren as PropsWithChildren8, ReactNode as ReactNode11 } from "react";
|
255
|
+
import { PropsWithChildren as PropsWithChildren7, ReactNode as ReactNode10 } from "react";
|
256
|
+
import { BoxProps } from "@mantine/core";
|
257
|
+
interface FrameLayoutElementProps {
|
258
|
+
section: Exclude<FrameLayoutSection, FrameLayoutSection.Content>;
|
259
|
+
includeContainer?: boolean;
|
260
|
+
layoutId?: string;
|
261
|
+
componentsProps?: {
|
262
|
+
container?: Partial<BoxProps>
|
263
|
+
};
|
264
|
+
}
|
265
|
+
declare function Element2({ section, includeContainer, layoutId, componentsProps, children }: PropsWithChildren7<FrameLayoutElementProps>): ReactNode10;
|
266
|
+
declare const isFrameLayout: (layout: Layout<LayoutType>) => layout is Layout<LayoutType.Frame>;
|
267
|
+
type DefaultFrameLayoutVariant = FrameLayoutVariant.Sticky;
|
268
|
+
declare const defaultFrameLayoutContext: FrameLayoutContext;
|
269
|
+
declare const useFrameLayout: () => FrameLayoutContext;
|
270
|
+
interface FrameLayoutPropsWithExplicitVariant<T extends FrameLayoutVariant> {
|
271
|
+
variant: T;
|
272
|
+
layoutId: string;
|
273
|
+
componentsProps?: {
|
274
|
+
childrenContainer?: T extends FrameLayoutVariant.Plain ? Partial<BoxProps2> : T extends FrameLayoutVariant.Sticky ? Partial<ScrollAreaProps2> : never
|
275
|
+
horizontalContainer?: Partial<GroupProps2>
|
276
|
+
verticalContainer?: Partial<StackProps>
|
277
|
+
sectionContainers?: {
|
278
|
+
[FrameLayoutSection.Left]?: Partial<GroupProps2>
|
279
|
+
[FrameLayoutSection.Right]?: Partial<GroupProps2>
|
280
|
+
[FrameLayoutSection.Top]?: Partial<StackProps>
|
281
|
+
[FrameLayoutSection.Bottom]?: Partial<StackProps>
|
282
|
+
}
|
283
|
+
};
|
284
|
+
}
|
285
|
+
type FrameLayoutProps<T extends FrameLayoutVariant = DefaultFrameLayoutVariant> = T extends DefaultFrameLayoutVariant ? Optional<FrameLayoutPropsWithExplicitVariant<T>, "variant"> : FrameLayoutPropsWithExplicitVariant<T>;
|
286
|
+
declare function FrameLayout<T extends FrameLayoutVariant = DefaultFrameLayoutVariant>({ variant, layoutId, componentsProps, children }: PropsWithChildren8<FrameLayoutProps<T>>): ReactNode11;
|
287
|
+
interface FrameLayout {
|
288
|
+
<T extends FrameLayoutVariant = DefaultFrameLayoutVariant>(props: PropsWithChildren8<FrameLayoutProps<T>>): ReactNode11;
|
289
|
+
Element: typeof Element2;
|
290
|
+
}
|
291
|
+
declare const _default: FrameLayout;
|
292
|
+
declare const defaultAppShellLayoutId = "remoraidAppShell";
|
293
|
+
type AppShellNavbarVariant = NavbarVariant | null;
|
294
|
+
type AppShellFooterVariant = FooterVariant | null;
|
295
|
+
type DefaultNavbarVariant = null;
|
296
|
+
type DefaultFooterVariant = null;
|
297
|
+
interface ExplicitAppShellProps<
|
298
|
+
N extends AppShellNavbarVariant,
|
299
|
+
F extends AppShellFooterVariant,
|
300
|
+
V extends CustomAppVariables
|
301
|
+
> {
|
302
|
+
navbarVariant: N;
|
303
|
+
footerVariant: F;
|
304
|
+
navbarPosition: N extends NavbarVariant ? FrameLayoutNavbarPosition<N> : never;
|
305
|
+
footerPosition: F extends FooterVariant ? FrameLayoutFooterPosition<F> : never;
|
306
|
+
appContext: AppContextProps<V>;
|
307
|
+
componentsProps?: {
|
308
|
+
navbar?: N extends NavbarVariant.Minimal ? Partial<NavbarMinimalProps> : never
|
309
|
+
footer?: N extends FooterVariant.Minimal ? Partial<FooterMinimalProps> : never
|
310
|
+
layout?: Partial<FrameLayoutProps<FrameLayoutVariant.Sticky>>
|
311
|
+
childrenContainer?: Partial<BoxProps3>
|
312
|
+
AppProvider?: Partial<AppProviderProps>
|
313
|
+
};
|
314
|
+
}
|
315
|
+
type AppShellProps<
|
316
|
+
N extends AppShellNavbarVariant = DefaultNavbarVariant,
|
317
|
+
F extends AppShellFooterVariant = DefaultFooterVariant,
|
318
|
+
V extends CustomAppVariables = {}
|
319
|
+
> = OptionalIfExtends<OptionalIfExtends<ExplicitAppShellProps<N, F, V>, "footerVariant", F, DefaultFooterVariant>, "navbarVariant", N, DefaultNavbarVariant>;
|
320
|
+
declare function AppShell<
|
321
|
+
N extends AppShellNavbarVariant = DefaultNavbarVariant,
|
322
|
+
F extends AppShellFooterVariant = DefaultFooterVariant,
|
323
|
+
V extends CustomAppVariables = {}
|
324
|
+
>(props: PropsWithChildren9<AppShellProps<N, F, V>>): ReactNode12;
|
325
|
+
interface AppShell {
|
326
|
+
<
|
327
|
+
N extends AppShellNavbarVariant = DefaultNavbarVariant,
|
328
|
+
F extends AppShellFooterVariant = DefaultFooterVariant,
|
329
|
+
V extends CustomAppVariables = {}
|
330
|
+
>(props: PropsWithChildren9<AppShellProps<N, F, V>>): ReactNode12;
|
331
|
+
NavbarMinimal: typeof NavbarMinimal;
|
332
|
+
FooterMinimal: typeof FooterMinimal;
|
333
|
+
}
|
334
|
+
declare const _default2: AppShell;
|
335
|
+
import { Context, PropsWithChildren as PropsWithChildren10, ReactNode as ReactNode13 } from "react";
|
158
336
|
declare const createUserExperienceContext: <T extends UserExperience>(defaultUserExperience: T) => Context<UserExperienceContext<T>>;
|
159
337
|
interface UserExperienceProviderWrapperProps<T extends UserExperience> {
|
160
338
|
context: Context<UserExperienceContext<T>>;
|
@@ -163,28 +341,27 @@ interface UserExperienceProviderWrapperProps<T extends UserExperience> {
|
|
163
341
|
isValidUserExperience: (x: unknown) => x is T;
|
164
342
|
initialValue?: Partial<T>;
|
165
343
|
}
|
166
|
-
declare function UserExperienceProviderWrapper<T extends UserExperience>({ children, context, cookieName, defaultUserExperience, isValidUserExperience, initialValue }:
|
167
|
-
declare const defaultNavbarSettings: Record<NavbarVariant, NavbarSettings>;
|
344
|
+
declare function UserExperienceProviderWrapper<T extends UserExperience>({ children, context, cookieName, defaultUserExperience, isValidUserExperience, initialValue }: PropsWithChildren10<UserExperienceProviderWrapperProps<T>>): ReactNode13;
|
168
345
|
declare const defaultUserExperience: CoreUserExperience;
|
169
346
|
declare const defaultUserExperienceCookieName = "remoraid-core-user-experience";
|
170
347
|
declare const useRemoraidUserExperience: () => UserExperienceContext<CoreUserExperience>;
|
171
348
|
import { MantineSize as MantineSize2 } from "@mantine/core";
|
172
|
-
import { ReactNode as
|
349
|
+
import { ReactNode as ReactNode15 } from "react";
|
173
350
|
interface WidgetSelectionHeaderProps {
|
174
351
|
title?: string;
|
175
352
|
disabledWidgets?: string[];
|
176
353
|
mt?: MantineSize2 | number;
|
177
354
|
}
|
178
|
-
declare function WidgetSelectionHeader({ title, disabledWidgets, mt }: WidgetSelectionHeaderProps):
|
179
|
-
import { ReactNode as
|
355
|
+
declare function WidgetSelectionHeader({ title, disabledWidgets, mt }: WidgetSelectionHeaderProps): ReactNode15;
|
356
|
+
import { ReactNode as ReactNode16 } from "react";
|
180
357
|
interface CloseButtonProps {
|
181
358
|
widgetId: string;
|
182
359
|
}
|
183
|
-
declare function CloseButton2({ widgetId }: CloseButtonProps):
|
360
|
+
declare function CloseButton2({ widgetId }: CloseButtonProps): ReactNode16;
|
184
361
|
import { BadgeProps as BadgeProps2, MantineBreakpoint as MantineBreakpoint2, MantineSize as MantineSize3, TooltipProps as TooltipProps2 } from "@mantine/core";
|
185
|
-
import { ReactNode as
|
362
|
+
import { ReactNode as ReactNode18 } from "react";
|
186
363
|
import { BadgeProps, TooltipProps, TransitionProps } from "@mantine/core";
|
187
|
-
import { ReactNode as
|
364
|
+
import { ReactNode as ReactNode17 } from "react";
|
188
365
|
interface BadgeMinimalProps {
|
189
366
|
label: string;
|
190
367
|
tooltip?: string;
|
@@ -195,9 +372,9 @@ interface BadgeMinimalProps {
|
|
195
372
|
tooltip?: TooltipProps
|
196
373
|
};
|
197
374
|
}
|
198
|
-
declare function BadgeMinimal(props: BadgeMinimalProps):
|
375
|
+
declare function BadgeMinimal(props: BadgeMinimalProps): ReactNode17;
|
199
376
|
interface BadgeGroupProps {
|
200
|
-
badges: (BadgeMinimalProps |
|
377
|
+
badges: (BadgeMinimalProps | ReactNode18)[];
|
201
378
|
gap?: MantineSize3 | number;
|
202
379
|
breakpoint?: MantineBreakpoint2;
|
203
380
|
componentsProps?: {
|
@@ -205,9 +382,9 @@ interface BadgeGroupProps {
|
|
205
382
|
cumulativeBadge?: Partial<Omit<BadgeProps2, "hiddenFrom" | "circle">>
|
206
383
|
};
|
207
384
|
}
|
208
|
-
declare function BadgeGroup({ badges, gap, breakpoint, componentsProps }: BadgeGroupProps):
|
385
|
+
declare function BadgeGroup({ badges, gap, breakpoint, componentsProps }: BadgeGroupProps): ReactNode18;
|
209
386
|
import { AlertProps as AlertProps2, MantineSize as MantineSize4, TransitionProps as TransitionProps2 } from "@mantine/core";
|
210
|
-
import { PropsWithChildren as
|
387
|
+
import { PropsWithChildren as PropsWithChildren12, ReactNode as ReactNode19 } from "react";
|
211
388
|
interface AlertMinimalProps {
|
212
389
|
category: AlertCategory;
|
213
390
|
title?: string;
|
@@ -221,19 +398,10 @@ interface AlertMinimalProps {
|
|
221
398
|
transition?: Omit<TransitionProps2, "mounted">
|
222
399
|
};
|
223
400
|
}
|
224
|
-
declare function AlertMinimal({ children, title, category, text, onClose, mounted, mt, mb, componentsProps }:
|
401
|
+
declare function AlertMinimal({ children, title, category, text, onClose, mounted, mt, mb, componentsProps }: PropsWithChildren12<AlertMinimalProps>): ReactNode19;
|
225
402
|
import { ActionIconProps, ActionIconVariant, ButtonProps, ButtonVariant, MantineBreakpoint as MantineBreakpoint3, MantineColor, MantineSize as MantineSize5, TooltipProps as TooltipProps3 } from "@mantine/core";
|
226
|
-
import { Icon as
|
227
|
-
import { ReactNode as
|
228
|
-
import { ReactElement } from "react";
|
229
|
-
type Common<
|
230
|
-
A,
|
231
|
-
B
|
232
|
-
> = Pick<A & B, keyof A & keyof B>;
|
233
|
-
type OnlyChildrenOf<
|
234
|
-
T extends (...args: any) => any,
|
235
|
-
P = any
|
236
|
-
> = ReactElement<P, T> | ReactElement<P, T>[];
|
403
|
+
import { Icon as Icon3, IconProps as IconProps3 } from "@tabler/icons-react";
|
404
|
+
import { ReactNode as ReactNode20 } from "react";
|
237
405
|
interface RemoraidButtonProps {
|
238
406
|
label: string;
|
239
407
|
responsive?: boolean;
|
@@ -241,23 +409,23 @@ interface RemoraidButtonProps {
|
|
241
409
|
collapsed?: boolean;
|
242
410
|
size?: MantineSize5;
|
243
411
|
color?: MantineColor;
|
244
|
-
icon?:
|
412
|
+
icon?: Icon3;
|
245
413
|
onClick?: () => void;
|
246
414
|
loading?: boolean;
|
247
415
|
variant?: Extract<ButtonVariant, ActionIconVariant>;
|
248
416
|
componentsProps?: {
|
249
417
|
tooltip?: Partial<TooltipProps3>
|
250
|
-
icon?: Partial<
|
251
|
-
button
|
418
|
+
icon?: Partial<IconProps3>
|
419
|
+
button?: Omit<Partial<Common<ButtonProps, ActionIconProps>>, "variant" | "onClick" | "size" | "color" | "loading">
|
252
420
|
Button?: Partial<ButtonProps>
|
253
421
|
ActionIcon?: Partial<ActionIconProps>
|
254
422
|
};
|
255
423
|
}
|
256
|
-
declare function RemoraidButton({ label, responsive, breakpoint, collapsed, size, color, onClick, loading, variant, componentsProps,...props }: RemoraidButtonProps):
|
257
|
-
import { MantineSize as MantineSize6, PaperProps, TransitionProps as TransitionProps3 } from "@mantine/core";
|
258
|
-
import { PropsWithChildren as
|
424
|
+
declare function RemoraidButton({ label, responsive, breakpoint, collapsed, size, color, onClick, loading, variant, componentsProps,...props }: RemoraidButtonProps): ReactNode20;
|
425
|
+
import { MantineSize as MantineSize6, PaperProps as PaperProps2, TransitionProps as TransitionProps3 } from "@mantine/core";
|
426
|
+
import { PropsWithChildren as PropsWithChildren13, ReactNode as ReactNode21 } from "react";
|
259
427
|
interface WidgetWrapperComponentsProps {
|
260
|
-
container?: Partial<
|
428
|
+
container?: Partial<PaperProps2>;
|
261
429
|
transition?: Partial<Omit<TransitionProps3, "mounted">>;
|
262
430
|
}
|
263
431
|
interface WidgetWrapperProps {
|
@@ -266,13 +434,13 @@ interface WidgetWrapperProps {
|
|
266
434
|
withCloseButton?: boolean;
|
267
435
|
componentsProps?: WidgetWrapperComponentsProps;
|
268
436
|
}
|
269
|
-
declare function WidgetWrapper({ children, config, mt, withCloseButton, componentsProps }:
|
270
|
-
interface WidgetWrapper extends React.FC<
|
437
|
+
declare function WidgetWrapper({ children, config, mt, withCloseButton, componentsProps }: PropsWithChildren13<WidgetWrapperProps>): ReactNode21;
|
438
|
+
interface WidgetWrapper extends React.FC<PropsWithChildren13<WidgetWrapperProps>> {
|
271
439
|
CloseButton: typeof CloseButton2;
|
272
440
|
}
|
273
|
-
declare const
|
441
|
+
declare const _default3: WidgetWrapper;
|
274
442
|
import { MantineSize as MantineSize7, LoaderProps } from "@mantine/core";
|
275
|
-
import { PropsWithChildren as
|
443
|
+
import { PropsWithChildren as PropsWithChildren14, ReactNode as ReactNode22 } from "react";
|
276
444
|
interface WidgetComponentsProps extends WidgetWrapperComponentsProps {
|
277
445
|
wrapper?: Partial<Omit<WidgetWrapperProps, "widgetId">>;
|
278
446
|
loader?: Partial<LoaderProps>;
|
@@ -282,9 +450,9 @@ interface WidgetProps {
|
|
282
450
|
id: string;
|
283
451
|
title: string;
|
284
452
|
config?: Partial<Omit<WidgetConfiguration, "widgetId">>;
|
285
|
-
badges?: (BadgeMinimalProps |
|
286
|
-
buttons?: (RemoraidButtonProps |
|
287
|
-
alerts?: (AlertMinimalProps |
|
453
|
+
badges?: (BadgeMinimalProps | ReactNode22)[];
|
454
|
+
buttons?: (RemoraidButtonProps | ReactNode22)[];
|
455
|
+
alerts?: (AlertMinimalProps | ReactNode22)[];
|
288
456
|
gaps?: MantineSize7 | number | {
|
289
457
|
badges?: MantineSize7 | number
|
290
458
|
buttons?: MantineSize7 | number
|
@@ -294,9 +462,10 @@ interface WidgetProps {
|
|
294
462
|
mt?: MantineSize7 | number;
|
295
463
|
componentsProps?: WidgetComponentsProps;
|
296
464
|
}
|
297
|
-
declare function Widget({ children, id, config, title, badges, buttons, alerts, gaps, loading, mt, componentsProps }:
|
465
|
+
declare function Widget({ children, id, config, title, badges, buttons, alerts, gaps, loading, mt, componentsProps }: PropsWithChildren14<WidgetProps>): ReactNode22;
|
298
466
|
import { ContainerProps, MantineSize as MantineSize8 } from "@mantine/core";
|
299
|
-
import { PropsWithChildren as
|
467
|
+
import { PropsWithChildren as PropsWithChildren15, ReactNode as ReactNode23 } from "react";
|
468
|
+
declare const usePage: () => PageConfiguration | null;
|
300
469
|
interface PageProps {
|
301
470
|
name?: string;
|
302
471
|
config?: Partial<Omit<PageConfiguration, "name">>;
|
@@ -305,26 +474,26 @@ interface PageProps {
|
|
305
474
|
container?: ContainerProps
|
306
475
|
};
|
307
476
|
}
|
308
|
-
declare function Page({ children, name, config, pt, componentsProps }:
|
477
|
+
declare function Page({ children, name, config, pt, componentsProps }: PropsWithChildren15<PageProps>): ReactNode23;
|
309
478
|
import { ContainerProps as ContainerProps2, MantineSize as MantineSize9 } from "@mantine/core";
|
310
|
-
import { PropsWithChildren as
|
479
|
+
import { PropsWithChildren as PropsWithChildren16, ReactNode as ReactNode24 } from "react";
|
311
480
|
interface PageContainerProps {
|
312
481
|
pt?: MantineSize9 | number;
|
313
482
|
componentsProps?: {
|
314
483
|
container?: ContainerProps2
|
315
484
|
};
|
316
485
|
}
|
317
|
-
declare function PageContainer({ children, pt, componentsProps }:
|
318
|
-
import { PropsWithChildren as
|
486
|
+
declare function PageContainer({ children, pt, componentsProps }: PropsWithChildren16<PageContainerProps>): ReactNode24;
|
487
|
+
import { PropsWithChildren as PropsWithChildren17, ReactNode as ReactNode25 } from "react";
|
319
488
|
interface NotFoundPageProps {
|
320
489
|
message?: string;
|
321
490
|
componentsProps?: {
|
322
491
|
page?: PageProps
|
323
492
|
};
|
324
493
|
}
|
325
|
-
declare function NotFoundPage({ children, message, componentsProps }:
|
494
|
+
declare function NotFoundPage({ children, message, componentsProps }: PropsWithChildren17<NotFoundPageProps>): ReactNode25;
|
326
495
|
import { ContainerProps as ContainerProps3, MantineSize as MantineSize10 } from "@mantine/core";
|
327
|
-
import { PropsWithChildren as
|
496
|
+
import { PropsWithChildren as PropsWithChildren18, ReactNode as ReactNode26 } from "react";
|
328
497
|
interface EnvironmentShellProps {
|
329
498
|
environment: Record<string, string | undefined>;
|
330
499
|
message?: string;
|
@@ -335,19 +504,19 @@ interface EnvironmentShellProps {
|
|
335
504
|
container?: ContainerProps3
|
336
505
|
};
|
337
506
|
}
|
338
|
-
declare function EnvironmentShell({ children, environment, message, m, mt, withContainer, componentsProps }:
|
339
|
-
import { PropsWithChildren as
|
340
|
-
import { ReactNode as
|
341
|
-
import { GroupProps } from "@mantine/core";
|
507
|
+
declare function EnvironmentShell({ children, environment, message, m, mt, withContainer, componentsProps }: PropsWithChildren18<EnvironmentShellProps>): ReactNode26;
|
508
|
+
import { PropsWithChildren as PropsWithChildren19, ReactNode as ReactNode28 } from "react";
|
509
|
+
import { ReactNode as ReactNode27 } from "react";
|
510
|
+
import { GroupProps as GroupProps3 } from "@mantine/core";
|
342
511
|
interface SettingsWidgetSaveButtonProps {
|
343
512
|
onSaveChanges: () => void;
|
344
513
|
insideContainer?: boolean;
|
345
514
|
componentsProps?: {
|
346
|
-
container?: Partial<
|
515
|
+
container?: Partial<GroupProps3>
|
347
516
|
button?: Partial<RemoraidButtonProps>
|
348
517
|
};
|
349
518
|
}
|
350
|
-
declare function SaveButton2({ onSaveChanges, insideContainer, componentsProps }: SettingsWidgetSaveButtonProps):
|
519
|
+
declare function SaveButton2({ onSaveChanges, insideContainer, componentsProps }: SettingsWidgetSaveButtonProps): ReactNode27;
|
351
520
|
declare const defaultSettingsWidgetContext: {};
|
352
521
|
declare const useSettingsWidgetContext: () => SettingsWidgetContext;
|
353
522
|
interface SettingsWidgetProps {
|
@@ -356,17 +525,17 @@ interface SettingsWidgetProps {
|
|
356
525
|
custom?: boolean;
|
357
526
|
widgetProps?: Partial<WidgetProps>;
|
358
527
|
}
|
359
|
-
declare function SettingsWidget({ children, onRestoreDefaultValues, unsavedChanges, custom, widgetProps }:
|
360
|
-
interface SettingsWidget extends React.FC<
|
528
|
+
declare function SettingsWidget({ children, onRestoreDefaultValues, unsavedChanges, custom, widgetProps }: PropsWithChildren19<SettingsWidgetProps>): ReactNode28;
|
529
|
+
interface SettingsWidget extends React.FC<PropsWithChildren19<SettingsWidgetProps>> {
|
361
530
|
SaveButton: typeof SaveButton2;
|
362
531
|
}
|
363
|
-
declare const
|
364
|
-
import { ReactNode as
|
365
|
-
import { PropsWithChildren as
|
532
|
+
declare const _default4: SettingsWidget;
|
533
|
+
import { ReactNode as ReactNode30 } from "react";
|
534
|
+
import { PropsWithChildren as PropsWithChildren20, ReactNode as ReactNode29 } from "react";
|
366
535
|
interface SettingsTableRowProps {
|
367
536
|
label: string;
|
368
537
|
}
|
369
|
-
declare function Row2({ children, label }:
|
538
|
+
declare function Row2({ children, label }: PropsWithChildren20<SettingsTableRowProps>): ReactNode29;
|
370
539
|
declare const defaultSettingsTableOptions: {
|
371
540
|
leftColumnWidth: string
|
372
541
|
};
|
@@ -375,19 +544,33 @@ interface SettingsTableProps {
|
|
375
544
|
children: OnlyChildrenOf<typeof Row2, SettingsTableRowProps>;
|
376
545
|
leftColumnWidth?: string | number;
|
377
546
|
}
|
378
|
-
declare function SettingsTable({ children, leftColumnWidth }: SettingsTableProps):
|
547
|
+
declare function SettingsTable({ children, leftColumnWidth }: SettingsTableProps): ReactNode30;
|
379
548
|
interface SettingsTable extends React.FC<SettingsTableProps> {
|
380
549
|
Row: typeof Row2;
|
381
550
|
}
|
382
|
-
declare const
|
383
|
-
import { ReactElement as ReactElement2, ReactNode as
|
551
|
+
declare const _default5: SettingsTable;
|
552
|
+
import { ReactElement as ReactElement2, ReactNode as ReactNode31 } from "react";
|
384
553
|
declare const defaultNavbarSettingsWidgetId = "navbar-settings";
|
385
554
|
interface NavbarSettingsWidgetProps {
|
386
|
-
additionalRows?: ReactElement2<SettingsTableRowProps, typeof
|
555
|
+
additionalRows?: ReactElement2<SettingsTableRowProps, typeof _default5.Row>[];
|
387
556
|
widgetProps?: Partial<WidgetProps>;
|
388
557
|
componentsProps?: {
|
389
558
|
table: Partial<Omit<SettingsTableProps, "children">>
|
390
559
|
};
|
391
560
|
}
|
392
|
-
declare function NavbarSettingsWidget({ additionalRows, widgetProps, componentsProps }: NavbarSettingsWidgetProps):
|
393
|
-
|
561
|
+
declare function NavbarSettingsWidget({ additionalRows, widgetProps, componentsProps }: NavbarSettingsWidgetProps): ReactNode31;
|
562
|
+
import { Chip, ChipGroupProps, ChipProps, FlexProps, MantineSize as MantineSize11, ScrollAreaProps as ScrollAreaProps3 } from "@mantine/core";
|
563
|
+
import { ReactNode as ReactNode32 } from "react";
|
564
|
+
interface ScrollbleChipGroupProps {
|
565
|
+
value: string[];
|
566
|
+
onChange?: (value: string[]) => void;
|
567
|
+
gap?: MantineSize11 | number;
|
568
|
+
componentsProps?: {
|
569
|
+
chipGroup?: Partial<ChipGroupProps<true>>
|
570
|
+
scrollArea?: Partial<ScrollAreaProps3>
|
571
|
+
container?: Partial<FlexProps>
|
572
|
+
};
|
573
|
+
children?: OnlyChildrenOf<typeof Chip, ChipProps>;
|
574
|
+
}
|
575
|
+
declare function ScrollableChipGroup({ value, onChange, gap, componentsProps, children }: ScrollbleChipGroupProps): ReactNode32;
|
576
|
+
export { useWidgets, useSettingsWidgetContext as useSettingsWidgetOptions, useSettingsTableOptions, useRemoraidUserExperience, useRemoraidTheme, useRemoraidApp, usePage, useLayouts, useHydrationStatus, useHydratedMantineColorScheme, useFrameLayout, isFrameLayout, defaultUserExperienceCookieName, defaultUserExperience, defaultSettingsWidgetContext as defaultSettingsWidgetOptions, defaultSettingsTableOptions, defaultNavbarSettingsWidgetId, defaultLayoutsContext, defaultFrameLayoutContext, defaultAppShellLayoutId, defaultAppContext, createUserExperienceContext, createRemoraidTheme, WidgetsProviderProps, WidgetWrapperProps, _default3 as WidgetWrapper, WidgetSelectionHeaderProps, WidgetSelectionHeader, WidgetProps, WidgetConfiguration, Widget, UserExperienceProviderWrapperProps, UserExperienceProviderWrapper, UserExperienceProviderProps, UserExperienceContext, UserExperience, TransitionDuration, ThemeProviderProps, StaticRemoraidAppContext, SettingsWidgetSaveButtonProps, SettingsWidgetProps, SettingsWidgetContext, _default4 as SettingsWidget, SettingsTableRowProps, SettingsTableOptions, _default5 as SettingsTable, ScrollbleChipGroupProps, ScrollableChipGroup, RemoraidUser, RemoraidThemeDependencies, RemoraidThemeCallback, RemoraidTheme, RemoraidProviderProps, RemoraidProvider, RemoraidIconSize, RemoraidButtonProps, RemoraidButton, RemoraidBreakpoint, RemoraidAuthContext, RemoraidAppContext, PageProps, PageContainerProps, PageContainer, PageConfiguration, Page, NotFoundPageProps, NotFoundPage, NavbarVariant, NavbarSettingsWidgetProps, NavbarSettingsWidget, NavbarMinimalProps, LayoutsProviderProps, LayoutsContext, LayoutType, Layout, HydrationStatusProviderProps, HydrationStatusProvider, HydrationStatus, FrameLayoutVariant, FrameLayoutSection, FrameLayoutProps, FrameLayoutNavbarPosition, FrameLayoutFooterPosition, FrameLayoutElementProps, FrameLayoutContext, _default as FrameLayout, FooterVariant, FooterMinimalProps, EnvironmentShellProps, EnvironmentShell, DefaultNavbarVariant, DefaultFrameLayoutVariant, DefaultFooterVariant, CustomAppVariables, CoreUserExperience, CloseButtonProps, BadgeMinimalProps, BadgeMinimal, BadgeGroupProps, BadgeGroup, AppShellProps, AppShellNavbarVariant, AppShellFooterVariant, _default2 as AppShell, AppProviderProps, AppProvider2 as AppProvider, AppLogo, AppContextProps, AlertMinimalProps, AlertMinimal, AlertCategory };
|