@etsoo/toolpad 1.0.12 → 1.0.13
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/babel.config.json +11 -0
- package/build/cjs/Account/Account.js +104 -0
- package/build/cjs/Account/Account.test.js +40 -0
- package/build/cjs/Account/AccountPopoverFooter.js +18 -0
- package/build/cjs/Account/AccountPopoverHeader.js +12 -0
- package/build/cjs/Account/AccountPreview.js +96 -0
- package/build/cjs/Account/AccountPreview.test.js +52 -0
- package/build/cjs/Account/SignInButton.js +56 -0
- package/build/cjs/Account/SignOutButton.js +58 -0
- package/build/cjs/Account/index.js +22 -0
- package/build/cjs/AppProvider/AppProvider.js +40 -0
- package/build/cjs/AppProvider/AppProvider.test.js +18 -0
- package/build/cjs/AppProvider/AppProviderComponent.js +33 -0
- package/build/cjs/AppProvider/AppThemeProvider.js +111 -0
- package/build/cjs/AppProvider/index.js +17 -0
- package/build/cjs/DashboardLayout/DashboardLayout.js +230 -0
- package/build/cjs/DashboardLayout/DashboardLayout.test.js +296 -0
- package/build/cjs/DashboardLayout/DashboardSidebarSubNavigation.js +185 -0
- package/build/cjs/DashboardLayout/ThemeSwitcher.js +84 -0
- package/build/cjs/DashboardLayout/TitleBar.d.ts +2 -0
- package/build/cjs/DashboardLayout/TitleBar.js +57 -0
- package/build/cjs/DashboardLayout/ToolbarActions.js +11 -0
- package/build/cjs/DashboardLayout/index.js +19 -0
- package/build/cjs/DashboardLayout/utils.js +20 -0
- package/build/{PageContainer → cjs/PageContainer}/PageContainer.d.ts +4 -0
- package/build/cjs/PageContainer/PageContainer.js +133 -0
- package/build/cjs/PageContainer/PageContainer.test.js +128 -0
- package/build/cjs/PageContainer/PageContainerToolbar.js +26 -0
- package/build/cjs/PageContainer/PageContainerToolbar.test.js +15 -0
- package/build/cjs/PageContainer/index.js +18 -0
- package/build/cjs/index.js +24 -0
- package/build/cjs/nextjs/AppProvider.js +18 -0
- package/build/cjs/nextjs/AppProvider.test.js +71 -0
- package/build/cjs/nextjs/AppProviderNextApp.js +63 -0
- package/build/cjs/nextjs/AppProviderNextPages.js +73 -0
- package/build/cjs/nextjs/index.js +17 -0
- package/build/cjs/persistence/codec.js +60 -0
- package/build/cjs/persistence/index.js +17 -0
- package/build/cjs/persistence/useStorageState.js +153 -0
- package/build/cjs/persistence/useStorageState.test.js +63 -0
- package/build/cjs/react-router-dom/AppProvider.js +64 -0
- package/build/cjs/react-router-dom/AppProvider.test.js +14 -0
- package/build/cjs/react-router-dom/index.js +17 -0
- package/build/cjs/shared/Link.js +55 -0
- package/build/cjs/shared/components.js +30 -0
- package/build/cjs/shared/context.js +46 -0
- package/build/cjs/shared/locales/LocaleContext.js +71 -0
- package/build/cjs/shared/navigation.js +151 -0
- package/build/cjs/useActivePage/index.js +17 -0
- package/build/cjs/useActivePage/useActivePage.js +83 -0
- package/build/cjs/useLocalStorageState/index.js +17 -0
- package/build/cjs/useLocalStorageState/useLocalStorageState.js +17 -0
- package/build/cjs/useSessionStorageState/index.js +17 -0
- package/build/cjs/useSessionStorageState/useSessionStorageState.js +17 -0
- package/build/cjs/utils/collections.js +53 -0
- package/build/cjs/utils/describeConformance.js +6 -0
- package/build/cjs/utils/events.js +58 -0
- package/build/cjs/utils/hooks/index.js +10 -0
- package/build/cjs/utils/hooks/useBoolean.js +47 -0
- package/build/cjs/utils/hooks/useDebounced.js +64 -0
- package/build/cjs/utils/hooks/useDebouncedHandler.js +77 -0
- package/build/cjs/utils/hooks/useLatest.js +44 -0
- package/build/cjs/utils/hooks/usePageTitle.js +49 -0
- package/build/cjs/utils/hooks/useSsr.js +52 -0
- package/build/cjs/utils/hooks/useStorageState.js +86 -0
- package/build/cjs/utils/warnOnce.js +14 -0
- package/build/mjs/Account/Account.d.ts +63 -0
- package/build/mjs/Account/Account.test.d.ts +1 -0
- package/build/mjs/Account/AccountPopoverFooter.d.ts +6 -0
- package/build/mjs/Account/AccountPopoverHeader.d.ts +6 -0
- package/build/mjs/Account/AccountPreview.d.ts +64 -0
- package/build/mjs/Account/AccountPreview.test.d.ts +1 -0
- package/build/mjs/Account/SignInButton.d.ts +2 -0
- package/build/mjs/Account/SignOutButton.d.ts +3 -0
- package/build/mjs/Account/index.js +6 -0
- package/build/mjs/AppProvider/AppProvider.d.ts +105 -0
- package/build/mjs/AppProvider/AppProvider.test.d.ts +4 -0
- package/build/mjs/AppProvider/AppProviderComponent.d.ts +14 -0
- package/build/mjs/AppProvider/AppThemeProvider.d.ts +12 -0
- package/build/mjs/DashboardLayout/DashboardLayout.d.ts +91 -0
- package/build/{DashboardLayout → mjs/DashboardLayout}/DashboardLayout.js +9 -10
- package/build/mjs/DashboardLayout/DashboardLayout.test.d.ts +1 -0
- package/build/mjs/DashboardLayout/DashboardSidebarSubNavigation.d.ts +16 -0
- package/build/mjs/DashboardLayout/ThemeSwitcher.d.ts +5 -0
- package/build/mjs/DashboardLayout/TitleBar.d.ts +2 -0
- package/build/mjs/DashboardLayout/ToolbarActions.d.ts +5 -0
- package/build/mjs/DashboardLayout/index.d.ts +2 -0
- package/build/mjs/DashboardLayout/utils.d.ts +8 -0
- package/build/mjs/PageContainer/PageContainer.d.ts +61 -0
- package/build/{PageContainer → mjs/PageContainer}/PageContainer.js +8 -4
- package/build/mjs/PageContainer/PageContainer.test.d.ts +1 -0
- package/build/mjs/PageContainer/PageContainerToolbar.d.ts +16 -0
- package/build/mjs/PageContainer/PageContainerToolbar.test.d.ts +1 -0
- package/build/mjs/PageContainer/index.js +2 -0
- package/build/mjs/index.js +8 -0
- package/build/mjs/nextjs/AppProvider.d.ts +6 -0
- package/build/mjs/nextjs/AppProvider.test.d.ts +1 -0
- package/build/mjs/nextjs/AppProviderNextApp.d.ts +5 -0
- package/build/mjs/nextjs/AppProviderNextPages.d.ts +5 -0
- package/build/mjs/nextjs/index.js +1 -0
- package/build/mjs/persistence/codec.d.ts +47 -0
- package/build/mjs/persistence/index.js +1 -0
- package/build/mjs/persistence/useStorageState.d.ts +50 -0
- package/build/mjs/persistence/useStorageState.test.d.ts +1 -0
- package/build/mjs/react-router-dom/AppProvider.d.ts +6 -0
- package/build/mjs/react-router-dom/AppProvider.test.d.ts +1 -0
- package/build/mjs/react-router-dom/index.d.ts +1 -0
- package/build/mjs/react-router-dom/index.js +1 -0
- package/build/mjs/shared/Link.d.ts +8 -0
- package/build/mjs/shared/components.d.ts +5 -0
- package/build/mjs/shared/context.d.ts +12 -0
- package/build/mjs/shared/locales/LocaleContext.d.ts +56 -0
- package/build/mjs/shared/navigation.d.ts +16 -0
- package/build/mjs/useActivePage/index.js +1 -0
- package/build/mjs/useActivePage/useActivePage.d.ts +8 -0
- package/build/mjs/useLocalStorageState/index.js +1 -0
- package/build/mjs/useLocalStorageState/useLocalStorageState.d.ts +2 -0
- package/build/mjs/useSessionStorageState/index.js +1 -0
- package/build/mjs/useSessionStorageState/useSessionStorageState.d.ts +2 -0
- package/build/mjs/utils/collections.d.ts +44 -0
- package/build/mjs/utils/describeConformance.d.ts +7 -0
- package/build/mjs/utils/events.d.ts +27 -0
- package/build/mjs/utils/hooks/index.js +2 -0
- package/build/mjs/utils/hooks/useBoolean.d.ts +11 -0
- package/build/mjs/utils/hooks/useDebounced.d.ts +8 -0
- package/build/mjs/utils/hooks/useDebouncedHandler.d.ts +12 -0
- package/build/mjs/utils/hooks/useLatest.d.ts +6 -0
- package/build/mjs/utils/hooks/usePageTitle.d.ts +4 -0
- package/build/mjs/utils/hooks/useSsr.d.ts +4 -0
- package/build/mjs/utils/hooks/useStorageState.d.ts +10 -0
- package/build/mjs/utils/warnOnce.d.ts +5 -0
- package/package.json +33 -23
- package/src/DashboardLayout/DashboardLayout.tsx +13 -12
- package/src/PageContainer/PageContainer.tsx +12 -4
- package/tsconfig.cjs.json +20 -0
- package/tsconfig.json +2 -2
- package/build/DashboardLayout/TitleBar.d.ts +0 -2
- /package/build/{Account → cjs/Account}/Account.d.ts +0 -0
- /package/build/{Account → cjs/Account}/Account.test.d.ts +0 -0
- /package/build/{Account → cjs/Account}/AccountPopoverFooter.d.ts +0 -0
- /package/build/{Account → cjs/Account}/AccountPopoverHeader.d.ts +0 -0
- /package/build/{Account → cjs/Account}/AccountPreview.d.ts +0 -0
- /package/build/{Account → cjs/Account}/AccountPreview.test.d.ts +0 -0
- /package/build/{Account → cjs/Account}/SignInButton.d.ts +0 -0
- /package/build/{Account → cjs/Account}/SignOutButton.d.ts +0 -0
- /package/build/{Account → cjs/Account}/index.d.ts +0 -0
- /package/build/{AppProvider → cjs/AppProvider}/AppProvider.d.ts +0 -0
- /package/build/{AppProvider → cjs/AppProvider}/AppProvider.test.d.ts +0 -0
- /package/build/{AppProvider → cjs/AppProvider}/AppProviderComponent.d.ts +0 -0
- /package/build/{AppProvider → cjs/AppProvider}/AppThemeProvider.d.ts +0 -0
- /package/build/{AppProvider → cjs/AppProvider}/index.d.ts +0 -0
- /package/build/{DashboardLayout → cjs/DashboardLayout}/DashboardLayout.d.ts +0 -0
- /package/build/{DashboardLayout → cjs/DashboardLayout}/DashboardLayout.test.d.ts +0 -0
- /package/build/{DashboardLayout → cjs/DashboardLayout}/DashboardSidebarSubNavigation.d.ts +0 -0
- /package/build/{DashboardLayout → cjs/DashboardLayout}/ThemeSwitcher.d.ts +0 -0
- /package/build/{DashboardLayout → cjs/DashboardLayout}/ToolbarActions.d.ts +0 -0
- /package/build/{DashboardLayout → cjs/DashboardLayout}/index.d.ts +0 -0
- /package/build/{DashboardLayout → cjs/DashboardLayout}/utils.d.ts +0 -0
- /package/build/{PageContainer → cjs/PageContainer}/PageContainer.test.d.ts +0 -0
- /package/build/{PageContainer → cjs/PageContainer}/PageContainerToolbar.d.ts +0 -0
- /package/build/{PageContainer → cjs/PageContainer}/PageContainerToolbar.test.d.ts +0 -0
- /package/build/{PageContainer → cjs/PageContainer}/index.d.ts +0 -0
- /package/build/{index.d.ts → cjs/index.d.ts} +0 -0
- /package/build/{nextjs → cjs/nextjs}/AppProvider.d.ts +0 -0
- /package/build/{nextjs → cjs/nextjs}/AppProvider.test.d.ts +0 -0
- /package/build/{nextjs → cjs/nextjs}/AppProviderNextApp.d.ts +0 -0
- /package/build/{nextjs → cjs/nextjs}/AppProviderNextPages.d.ts +0 -0
- /package/build/{nextjs → cjs/nextjs}/index.d.ts +0 -0
- /package/build/{persistence → cjs/persistence}/codec.d.ts +0 -0
- /package/build/{persistence → cjs/persistence}/index.d.ts +0 -0
- /package/build/{persistence → cjs/persistence}/useStorageState.d.ts +0 -0
- /package/build/{persistence → cjs/persistence}/useStorageState.test.d.ts +0 -0
- /package/build/{react-router-dom → cjs/react-router-dom}/AppProvider.d.ts +0 -0
- /package/build/{react-router-dom → cjs/react-router-dom}/AppProvider.test.d.ts +0 -0
- /package/build/{react-router-dom → cjs/react-router-dom}/index.d.ts +0 -0
- /package/build/{shared → cjs/shared}/Link.d.ts +0 -0
- /package/build/{shared → cjs/shared}/components.d.ts +0 -0
- /package/build/{shared → cjs/shared}/context.d.ts +0 -0
- /package/build/{shared → cjs/shared}/locales/LocaleContext.d.ts +0 -0
- /package/build/{shared → cjs/shared}/navigation.d.ts +0 -0
- /package/build/{useActivePage → cjs/useActivePage}/index.d.ts +0 -0
- /package/build/{useActivePage → cjs/useActivePage}/useActivePage.d.ts +0 -0
- /package/build/{useLocalStorageState → cjs/useLocalStorageState}/index.d.ts +0 -0
- /package/build/{useLocalStorageState → cjs/useLocalStorageState}/useLocalStorageState.d.ts +0 -0
- /package/build/{useSessionStorageState → cjs/useSessionStorageState}/index.d.ts +0 -0
- /package/build/{useSessionStorageState → cjs/useSessionStorageState}/useSessionStorageState.d.ts +0 -0
- /package/build/{utils → cjs/utils}/collections.d.ts +0 -0
- /package/build/{utils → cjs/utils}/describeConformance.d.ts +0 -0
- /package/build/{utils → cjs/utils}/events.d.ts +0 -0
- /package/build/{utils → cjs/utils}/hooks/index.d.ts +0 -0
- /package/build/{utils → cjs/utils}/hooks/useBoolean.d.ts +0 -0
- /package/build/{utils → cjs/utils}/hooks/useDebounced.d.ts +0 -0
- /package/build/{utils → cjs/utils}/hooks/useDebouncedHandler.d.ts +0 -0
- /package/build/{utils → cjs/utils}/hooks/useLatest.d.ts +0 -0
- /package/build/{utils → cjs/utils}/hooks/usePageTitle.d.ts +0 -0
- /package/build/{utils → cjs/utils}/hooks/useSsr.d.ts +0 -0
- /package/build/{utils → cjs/utils}/hooks/useStorageState.d.ts +0 -0
- /package/build/{utils → cjs/utils}/warnOnce.d.ts +0 -0
- /package/build/{Account → mjs/Account}/Account.js +0 -0
- /package/build/{Account → mjs/Account}/Account.test.js +0 -0
- /package/build/{Account → mjs/Account}/AccountPopoverFooter.js +0 -0
- /package/build/{Account → mjs/Account}/AccountPopoverHeader.js +0 -0
- /package/build/{Account → mjs/Account}/AccountPreview.js +0 -0
- /package/build/{Account → mjs/Account}/AccountPreview.test.js +0 -0
- /package/build/{Account → mjs/Account}/SignInButton.js +0 -0
- /package/build/{Account → mjs/Account}/SignOutButton.js +0 -0
- /package/build/{Account/index.js → mjs/Account/index.d.ts} +0 -0
- /package/build/{AppProvider → mjs/AppProvider}/AppProvider.js +0 -0
- /package/build/{AppProvider → mjs/AppProvider}/AppProvider.test.js +0 -0
- /package/build/{AppProvider → mjs/AppProvider}/AppProviderComponent.js +0 -0
- /package/build/{AppProvider → mjs/AppProvider}/AppThemeProvider.js +0 -0
- /package/build/{AppProvider/index.js → mjs/AppProvider/index.d.ts} +0 -0
- /package/build/{nextjs → mjs/AppProvider}/index.js +0 -0
- /package/build/{DashboardLayout → mjs/DashboardLayout}/DashboardLayout.test.js +0 -0
- /package/build/{DashboardLayout → mjs/DashboardLayout}/DashboardSidebarSubNavigation.js +0 -0
- /package/build/{DashboardLayout → mjs/DashboardLayout}/ThemeSwitcher.js +0 -0
- /package/build/{DashboardLayout → mjs/DashboardLayout}/TitleBar.js +0 -0
- /package/build/{DashboardLayout → mjs/DashboardLayout}/ToolbarActions.js +0 -0
- /package/build/{DashboardLayout → mjs/DashboardLayout}/index.js +0 -0
- /package/build/{DashboardLayout → mjs/DashboardLayout}/utils.js +0 -0
- /package/build/{PageContainer → mjs/PageContainer}/PageContainer.test.js +0 -0
- /package/build/{PageContainer → mjs/PageContainer}/PageContainerToolbar.js +0 -0
- /package/build/{PageContainer → mjs/PageContainer}/PageContainerToolbar.test.js +0 -0
- /package/build/{PageContainer/index.js → mjs/PageContainer/index.d.ts} +0 -0
- /package/build/{index.js → mjs/index.d.ts} +0 -0
- /package/build/{nextjs → mjs/nextjs}/AppProvider.js +0 -0
- /package/build/{nextjs → mjs/nextjs}/AppProvider.test.js +0 -0
- /package/build/{nextjs → mjs/nextjs}/AppProviderNextApp.js +0 -0
- /package/build/{nextjs → mjs/nextjs}/AppProviderNextPages.js +0 -0
- /package/build/{react-router-dom/index.js → mjs/nextjs/index.d.ts} +0 -0
- /package/build/{persistence → mjs/persistence}/codec.js +0 -0
- /package/build/{persistence/index.js → mjs/persistence/index.d.ts} +0 -0
- /package/build/{persistence → mjs/persistence}/useStorageState.js +0 -0
- /package/build/{persistence → mjs/persistence}/useStorageState.test.js +0 -0
- /package/build/{react-router-dom → mjs/react-router-dom}/AppProvider.js +0 -0
- /package/build/{react-router-dom → mjs/react-router-dom}/AppProvider.test.js +0 -0
- /package/build/{shared → mjs/shared}/Link.js +0 -0
- /package/build/{shared → mjs/shared}/components.js +0 -0
- /package/build/{shared → mjs/shared}/context.js +0 -0
- /package/build/{shared → mjs/shared}/locales/LocaleContext.js +0 -0
- /package/build/{shared → mjs/shared}/navigation.js +0 -0
- /package/build/{useActivePage/index.js → mjs/useActivePage/index.d.ts} +0 -0
- /package/build/{useActivePage → mjs/useActivePage}/useActivePage.js +0 -0
- /package/build/{useLocalStorageState/index.js → mjs/useLocalStorageState/index.d.ts} +0 -0
- /package/build/{useLocalStorageState → mjs/useLocalStorageState}/useLocalStorageState.js +0 -0
- /package/build/{useSessionStorageState/index.js → mjs/useSessionStorageState/index.d.ts} +0 -0
- /package/build/{useSessionStorageState → mjs/useSessionStorageState}/useSessionStorageState.js +0 -0
- /package/build/{utils → mjs/utils}/collections.js +0 -0
- /package/build/{utils → mjs/utils}/describeConformance.js +0 -0
- /package/build/{utils → mjs/utils}/events.js +0 -0
- /package/build/{utils/hooks/index.js → mjs/utils/hooks/index.d.ts} +0 -0
- /package/build/{utils → mjs/utils}/hooks/useBoolean.js +0 -0
- /package/build/{utils → mjs/utils}/hooks/useDebounced.js +0 -0
- /package/build/{utils → mjs/utils}/hooks/useDebouncedHandler.js +0 -0
- /package/build/{utils → mjs/utils}/hooks/useLatest.js +0 -0
- /package/build/{utils → mjs/utils}/hooks/usePageTitle.js +0 -0
- /package/build/{utils → mjs/utils}/hooks/useSsr.js +0 -0
- /package/build/{utils → mjs/utils}/hooks/useStorageState.js +0 -0
- /package/build/{utils → mjs/utils}/warnOnce.js +0 -0
- /package/{vite.config.ts → vite.config.mts} +0 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { AvatarProps } from "@mui/material/Avatar";
|
|
3
|
+
import { IconButtonProps } from "@mui/material/IconButton";
|
|
4
|
+
export type AccountPreviewVariant = "condensed" | "expanded";
|
|
5
|
+
export interface AccountPreviewSlots {
|
|
6
|
+
/**
|
|
7
|
+
* The component used for the Avatar
|
|
8
|
+
* @default Avatar
|
|
9
|
+
*/
|
|
10
|
+
avatar?: React.ElementType;
|
|
11
|
+
/**
|
|
12
|
+
* The component used for the overflow icon button in the expanded variant
|
|
13
|
+
* @default IconButton
|
|
14
|
+
*/
|
|
15
|
+
moreIconButton?: React.ElementType;
|
|
16
|
+
/**
|
|
17
|
+
* The component used for the avatar icon button in the condensed variant
|
|
18
|
+
* @default IconButton
|
|
19
|
+
*/
|
|
20
|
+
avatarIconButton?: React.ElementType;
|
|
21
|
+
}
|
|
22
|
+
export interface AccountPreviewProps {
|
|
23
|
+
/**
|
|
24
|
+
* The components used for each slot inside.
|
|
25
|
+
*/
|
|
26
|
+
slots?: AccountPreviewSlots;
|
|
27
|
+
/**
|
|
28
|
+
* The props used for each slot inside.
|
|
29
|
+
*/
|
|
30
|
+
slotProps?: {
|
|
31
|
+
avatar?: AvatarProps;
|
|
32
|
+
moreIconButton?: IconButtonProps;
|
|
33
|
+
avatarIconButton?: IconButtonProps;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* The type of account details to display.
|
|
37
|
+
* @property {'condensed'} condensed - Shows only the user's avatar.
|
|
38
|
+
* @property {'expanded'} expanded - Displays the user's avatar, name, and email if available.
|
|
39
|
+
* @default 'condensed'
|
|
40
|
+
*/
|
|
41
|
+
variant?: AccountPreviewVariant;
|
|
42
|
+
/**
|
|
43
|
+
* The handler used when the preview is expanded
|
|
44
|
+
*/
|
|
45
|
+
handleClick?: React.MouseEventHandler<HTMLElement>;
|
|
46
|
+
/**
|
|
47
|
+
* The state of the Account popover
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
open?: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The AccountPreview component displays user account information.
|
|
54
|
+
*
|
|
55
|
+
* Demos:
|
|
56
|
+
*
|
|
57
|
+
* - [Account](https://mui.com/toolpad/core/react-account/)
|
|
58
|
+
*
|
|
59
|
+
* API:
|
|
60
|
+
*
|
|
61
|
+
* - [AccountPreview API](https://mui.com/toolpad/core/api/account-preview)
|
|
62
|
+
*/
|
|
63
|
+
declare function AccountPreview(props: AccountPreviewProps): import("react/jsx-runtime").JSX.Element | null;
|
|
64
|
+
export { AccountPreview };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Theme } from "@mui/material/styles";
|
|
3
|
+
import { LocaleContextType } from "../shared/locales/LocaleContext";
|
|
4
|
+
export interface NavigateOptions {
|
|
5
|
+
history?: "auto" | "push" | "replace";
|
|
6
|
+
}
|
|
7
|
+
export interface Navigate {
|
|
8
|
+
(url: string | URL, options?: NavigateOptions): void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Abstract router used by Toolpad components.
|
|
12
|
+
*/
|
|
13
|
+
export interface Router {
|
|
14
|
+
pathname: string;
|
|
15
|
+
searchParams: URLSearchParams;
|
|
16
|
+
navigate: Navigate;
|
|
17
|
+
}
|
|
18
|
+
export interface Branding {
|
|
19
|
+
title?: React.ReactNode | [string, (handler: React.MouseEvent<HTMLSpanElement>) => void];
|
|
20
|
+
logo?: React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export interface NavigationPageItem {
|
|
23
|
+
kind?: "page";
|
|
24
|
+
segment?: string;
|
|
25
|
+
title?: string;
|
|
26
|
+
icon?: React.ReactNode;
|
|
27
|
+
pattern?: string;
|
|
28
|
+
action?: React.ReactNode;
|
|
29
|
+
children?: Navigation;
|
|
30
|
+
subs?: string[];
|
|
31
|
+
}
|
|
32
|
+
export interface NavigationSubheaderItem {
|
|
33
|
+
kind: "header";
|
|
34
|
+
title: string;
|
|
35
|
+
}
|
|
36
|
+
export interface NavigationDividerItem {
|
|
37
|
+
kind: "divider";
|
|
38
|
+
}
|
|
39
|
+
export type NavigationItem = NavigationPageItem | NavigationSubheaderItem | NavigationDividerItem;
|
|
40
|
+
export type Navigation = NavigationItem[];
|
|
41
|
+
export interface Session {
|
|
42
|
+
user?: {
|
|
43
|
+
id?: string | null;
|
|
44
|
+
name?: string | null;
|
|
45
|
+
latinName?: string | null;
|
|
46
|
+
image?: string | null;
|
|
47
|
+
email?: string | null;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export interface Authentication {
|
|
51
|
+
signIn: () => void;
|
|
52
|
+
signOut: () => void;
|
|
53
|
+
}
|
|
54
|
+
export declare const AuthenticationContext: React.Context<Authentication | null>;
|
|
55
|
+
export declare const SessionContext: React.Context<Session | null>;
|
|
56
|
+
export type AppTheme = Theme | {
|
|
57
|
+
light: Theme;
|
|
58
|
+
dark: Theme;
|
|
59
|
+
};
|
|
60
|
+
export interface AppProviderProps {
|
|
61
|
+
/**
|
|
62
|
+
* The content of the app provider.
|
|
63
|
+
*/
|
|
64
|
+
children: React.ReactNode;
|
|
65
|
+
/**
|
|
66
|
+
* [Theme or themes](https://mui.com/toolpad/core/react-app-provider/#theming) to be used by the app in light/dark mode. A [CSS variables theme](https://mui.com/material-ui/customization/css-theme-variables/overview/) is recommended.
|
|
67
|
+
* @default createTheme()
|
|
68
|
+
*/
|
|
69
|
+
theme?: AppTheme;
|
|
70
|
+
/**
|
|
71
|
+
* Branding options for the app.
|
|
72
|
+
* @default null
|
|
73
|
+
*/
|
|
74
|
+
branding?: Branding | null;
|
|
75
|
+
/**
|
|
76
|
+
* The labels for the component.
|
|
77
|
+
*/
|
|
78
|
+
localeText?: Partial<LocaleContextType>;
|
|
79
|
+
/**
|
|
80
|
+
* Navigation definition for the app.
|
|
81
|
+
* @default []
|
|
82
|
+
*/
|
|
83
|
+
navigation?: Navigation;
|
|
84
|
+
/**
|
|
85
|
+
* Router implementation used inside Toolpad components.
|
|
86
|
+
* @default null
|
|
87
|
+
*/
|
|
88
|
+
router?: Router;
|
|
89
|
+
/**
|
|
90
|
+
* Session info about the current user.
|
|
91
|
+
* @default null
|
|
92
|
+
*/
|
|
93
|
+
session?: Session | null;
|
|
94
|
+
/**
|
|
95
|
+
* Authentication methods.
|
|
96
|
+
* @default null
|
|
97
|
+
*/
|
|
98
|
+
authentication?: Authentication | null;
|
|
99
|
+
/**
|
|
100
|
+
* The window where the application is rendered.
|
|
101
|
+
* This is needed when rendering the app inside an iframe, for example.
|
|
102
|
+
* @default window
|
|
103
|
+
*/
|
|
104
|
+
window?: Window;
|
|
105
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AppProviderProps } from "./AppProvider";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Demos:
|
|
5
|
+
*
|
|
6
|
+
* - [App Provider](https://mui.com/toolpad/core/react-app-provider/)
|
|
7
|
+
* - [Dashboard Layout](https://mui.com/toolpad/core/react-dashboard-layout/)
|
|
8
|
+
*
|
|
9
|
+
* API:
|
|
10
|
+
*
|
|
11
|
+
* - [AppProvider API](https://mui.com/toolpad/core/api/app-provider)
|
|
12
|
+
*/
|
|
13
|
+
declare function AppProvider(props: AppProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { AppProvider };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { AppTheme } from "./AppProvider";
|
|
3
|
+
interface AppThemeProviderProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
theme: AppTheme;
|
|
6
|
+
window?: Window;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* @ignore - internal component.
|
|
10
|
+
*/
|
|
11
|
+
declare function AppThemeProvider(props: AppThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { AppThemeProvider };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type Theme, SxProps } from "@mui/material";
|
|
3
|
+
import { type AccountProps } from "../Account";
|
|
4
|
+
export interface SidebarFooterProps {
|
|
5
|
+
mini: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface DashboardLayoutSlotProps {
|
|
8
|
+
titlebar?: {};
|
|
9
|
+
toolbarActions?: {};
|
|
10
|
+
toolbarAccount?: AccountProps;
|
|
11
|
+
sidebarFooter?: SidebarFooterProps;
|
|
12
|
+
}
|
|
13
|
+
export interface DashboardLayoutSlots {
|
|
14
|
+
/**
|
|
15
|
+
* The title bar component used in the layout header.
|
|
16
|
+
* @default TitleBar
|
|
17
|
+
*/
|
|
18
|
+
titlebar?: React.JSXElementConstructor<{}>;
|
|
19
|
+
/**
|
|
20
|
+
* The toolbar actions component used in the layout header.
|
|
21
|
+
* @default ToolbarActions
|
|
22
|
+
*/
|
|
23
|
+
toolbarActions?: React.JSXElementConstructor<{}>;
|
|
24
|
+
/**
|
|
25
|
+
* The toolbar account component used in the layout header.
|
|
26
|
+
* @default Account
|
|
27
|
+
*/
|
|
28
|
+
toolbarAccount?: React.JSXElementConstructor<AccountProps>;
|
|
29
|
+
/**
|
|
30
|
+
* Optional footer component used in the layout sidebar.
|
|
31
|
+
* @default null
|
|
32
|
+
*/
|
|
33
|
+
sidebarFooter?: React.JSXElementConstructor<SidebarFooterProps>;
|
|
34
|
+
}
|
|
35
|
+
export interface DashboardLayoutProps {
|
|
36
|
+
/**
|
|
37
|
+
* The content of the dashboard.
|
|
38
|
+
*/
|
|
39
|
+
children: React.ReactNode;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the sidebar should not be collapsible to a mini variant in desktop and tablet viewports.
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
disableCollapsibleSidebar?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the sidebar should start collapsed in desktop size screens.
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
defaultSidebarCollapsed?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the navigation bar and menu icon should be hidden
|
|
52
|
+
* @default false
|
|
53
|
+
*/
|
|
54
|
+
hideNavigation?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Whether the theme switcher should be shown in the toolbar.
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
59
|
+
showThemeSwitcher?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Width of the sidebar when expanded.
|
|
62
|
+
* @default 320
|
|
63
|
+
*/
|
|
64
|
+
sidebarExpandedWidth?: number | string;
|
|
65
|
+
/**
|
|
66
|
+
* The components used for each slot inside.
|
|
67
|
+
* @default {}
|
|
68
|
+
*/
|
|
69
|
+
slots?: DashboardLayoutSlots;
|
|
70
|
+
/**
|
|
71
|
+
* The props used for each slot inside.
|
|
72
|
+
* @default {}
|
|
73
|
+
*/
|
|
74
|
+
slotProps?: DashboardLayoutSlotProps;
|
|
75
|
+
/**
|
|
76
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
77
|
+
*/
|
|
78
|
+
sx?: SxProps<Theme>;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* Demos:
|
|
83
|
+
*
|
|
84
|
+
* - [Dashboard Layout](https://mui.com/toolpad/core/react-dashboard-layout/)
|
|
85
|
+
*
|
|
86
|
+
* API:
|
|
87
|
+
*
|
|
88
|
+
* - [DashboardLayout API](https://mui.com/toolpad/core/api/dashboard-layout)
|
|
89
|
+
*/
|
|
90
|
+
declare function DashboardLayout(props: DashboardLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
91
|
+
export { DashboardLayout };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { useTheme } from "@mui/material";
|
|
5
5
|
import MuiAppBar from "@mui/material/AppBar";
|
|
6
6
|
import Box from "@mui/material/Box";
|
|
7
7
|
import Drawer from "@mui/material/Drawer";
|
|
@@ -20,14 +20,6 @@ import { ThemeSwitcher } from "./ThemeSwitcher";
|
|
|
20
20
|
import { getDrawerSxTransitionMixin, getDrawerWidthTransitionMixin } from "./utils";
|
|
21
21
|
import { TitleBar } from "./TitleBar";
|
|
22
22
|
import { useLocaleText } from "../shared/locales/LocaleContext";
|
|
23
|
-
const AppBar = styled(MuiAppBar)(({ theme }) => ({
|
|
24
|
-
borderWidth: 0,
|
|
25
|
-
borderBottomWidth: 1,
|
|
26
|
-
borderStyle: "solid",
|
|
27
|
-
borderColor: (theme.vars ?? theme).palette.divider,
|
|
28
|
-
boxShadow: "none",
|
|
29
|
-
zIndex: theme.zIndex.drawer + 1
|
|
30
|
-
}));
|
|
31
23
|
/**
|
|
32
24
|
*
|
|
33
25
|
* Demos:
|
|
@@ -147,7 +139,14 @@ function DashboardLayout(props) {
|
|
|
147
139
|
height: "100vh",
|
|
148
140
|
width: "100vw",
|
|
149
141
|
...sx
|
|
150
|
-
}, children: [_jsx(
|
|
142
|
+
}, children: [_jsx(MuiAppBar, { color: "inherit", position: "absolute", sx: (theme) => ({
|
|
143
|
+
borderWidth: 0,
|
|
144
|
+
borderBottomWidth: 1,
|
|
145
|
+
borderStyle: "solid",
|
|
146
|
+
borderColor: theme.palette.divider,
|
|
147
|
+
boxShadow: "none",
|
|
148
|
+
zIndex: theme.zIndex.drawer + 1
|
|
149
|
+
}), children: _jsxs(Toolbar, { sx: { backgroundColor: "inherit", mx: { xs: -0.75, sm: -1.5 } }, children: [!hideNavigation ? (_jsxs(React.Fragment, { children: [_jsx(Box, { sx: {
|
|
151
150
|
mr: { sm: disableCollapsibleSidebar ? 0 : 1 },
|
|
152
151
|
display: { md: "none" }
|
|
153
152
|
}, children: getMenuIcon(isMobileNavigationExpanded) }), _jsx(Box, { sx: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom/vitest";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Navigation } from "../AppProvider";
|
|
2
|
+
interface DashboardSidebarSubNavigationProps {
|
|
3
|
+
subNavigation: Navigation;
|
|
4
|
+
basePath?: string;
|
|
5
|
+
depth?: number;
|
|
6
|
+
onLinkClick: () => void;
|
|
7
|
+
isMini?: boolean;
|
|
8
|
+
isFullyExpanded?: boolean;
|
|
9
|
+
hasDrawerTransitions?: boolean;
|
|
10
|
+
selectedItemId: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @ignore - internal component.
|
|
14
|
+
*/
|
|
15
|
+
declare function DashboardSidebarSubNavigation({ subNavigation, basePath, depth, onLinkClick, isMini, isFullyExpanded, hasDrawerTransitions, selectedItemId }: DashboardSidebarSubNavigationProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { DashboardSidebarSubNavigation };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare function TitleBar(): number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Theme } from "@mui/material";
|
|
2
|
+
export declare function getDrawerSxTransitionMixin(isExpanded: boolean, property: string): {
|
|
3
|
+
transition: (theme: Theme) => string;
|
|
4
|
+
};
|
|
5
|
+
export declare function getDrawerWidthTransitionMixin(isExpanded: boolean): {
|
|
6
|
+
overflowX: string;
|
|
7
|
+
transition: (theme: Theme) => string;
|
|
8
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ContainerProps } from "@mui/material/Container";
|
|
3
|
+
import { PageContainerToolbarProps } from "./PageContainerToolbar";
|
|
4
|
+
export interface PageContainerSlotProps {
|
|
5
|
+
toolbar: PageContainerToolbarProps;
|
|
6
|
+
}
|
|
7
|
+
export interface PageContainerSlots {
|
|
8
|
+
/**
|
|
9
|
+
* The component that renders the actions toolbar.
|
|
10
|
+
* @default Snackbar
|
|
11
|
+
*/
|
|
12
|
+
toolbar: React.ElementType;
|
|
13
|
+
}
|
|
14
|
+
export interface Breadcrumb {
|
|
15
|
+
/**
|
|
16
|
+
* The title of the breadcrumb segment.
|
|
17
|
+
*/
|
|
18
|
+
title: string;
|
|
19
|
+
/**
|
|
20
|
+
* The path the breadcrumb links to.
|
|
21
|
+
*/
|
|
22
|
+
path: string;
|
|
23
|
+
}
|
|
24
|
+
export type PageData = {
|
|
25
|
+
title?: string;
|
|
26
|
+
page?: string;
|
|
27
|
+
breadcrumbs?: Breadcrumb[];
|
|
28
|
+
};
|
|
29
|
+
type PageDataAction = PageData | true;
|
|
30
|
+
export declare const PageDataContext: React.Context<{
|
|
31
|
+
state: PageData;
|
|
32
|
+
dispatch: React.Dispatch<PageDataAction>;
|
|
33
|
+
}>;
|
|
34
|
+
export declare function PageDataContextProvider(props: React.PropsWithChildren<PageData>): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export type PageContainerProps = React.PropsWithChildren<ContainerProps & {
|
|
36
|
+
/**
|
|
37
|
+
* The default title of the page.
|
|
38
|
+
*/
|
|
39
|
+
defaultTitle?: string;
|
|
40
|
+
/**
|
|
41
|
+
* The components used for each slot inside.
|
|
42
|
+
*/
|
|
43
|
+
slots?: PageContainerSlots;
|
|
44
|
+
/**
|
|
45
|
+
* The props used for each slot inside.
|
|
46
|
+
*/
|
|
47
|
+
slotProps?: PageContainerSlotProps;
|
|
48
|
+
}>;
|
|
49
|
+
/**
|
|
50
|
+
* A container component to provide a title and breadcrumbs for your pages.
|
|
51
|
+
*
|
|
52
|
+
* Demos:
|
|
53
|
+
*
|
|
54
|
+
* - [Page Container](https://mui.com/toolpad/core/react-page-container/)
|
|
55
|
+
*
|
|
56
|
+
* API:
|
|
57
|
+
*
|
|
58
|
+
* - [PageContainer API](https://mui.com/toolpad/core/api/page-container)
|
|
59
|
+
*/
|
|
60
|
+
declare function PageContainer(props: PageContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export { PageContainer };
|
|
@@ -35,9 +35,13 @@ function reducer(state, action) {
|
|
|
35
35
|
}
|
|
36
36
|
export function PageDataContextProvider(props) {
|
|
37
37
|
// Destruct
|
|
38
|
-
const { title, breadcrumbs, ...rest } = props;
|
|
38
|
+
const { title, page, breadcrumbs, ...rest } = props;
|
|
39
39
|
// useReducer hook to manage state with our reducer function and initial state
|
|
40
|
-
const [state, dispatch] = React.useReducer(reducer, {
|
|
40
|
+
const [state, dispatch] = React.useReducer(reducer, {
|
|
41
|
+
title,
|
|
42
|
+
page,
|
|
43
|
+
breadcrumbs
|
|
44
|
+
});
|
|
41
45
|
// Provide the state and dispatch function to the context value
|
|
42
46
|
return _jsx(PageDataContext.Provider, { value: { state, dispatch }, ...rest });
|
|
43
47
|
}
|
|
@@ -53,7 +57,7 @@ export function PageDataContextProvider(props) {
|
|
|
53
57
|
* - [PageContainer API](https://mui.com/toolpad/core/api/page-container)
|
|
54
58
|
*/
|
|
55
59
|
function PageContainer(props) {
|
|
56
|
-
const { children, slots, slotProps, ...rest } = props;
|
|
60
|
+
const { children, defaultTitle, slots, slotProps, ...rest } = props;
|
|
57
61
|
const loaded = React.useRef(false);
|
|
58
62
|
const { state, dispatch } = React.useContext(PageDataContext);
|
|
59
63
|
const activePage = useActivePage();
|
|
@@ -66,7 +70,7 @@ function PageContainer(props) {
|
|
|
66
70
|
}
|
|
67
71
|
}, [activePage?.sourcePath]);
|
|
68
72
|
let resolvedBreadcrumbs = state.breadcrumbs ?? activePage?.breadcrumbs ?? [];
|
|
69
|
-
const title = state.title ?? activePage?.title ?? "";
|
|
73
|
+
const title = state.title ?? defaultTitle ?? activePage?.title ?? "";
|
|
70
74
|
if (state.page) {
|
|
71
75
|
resolvedBreadcrumbs = [
|
|
72
76
|
...resolvedBreadcrumbs,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface PageContainerToolbarProps {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* Demos:
|
|
8
|
+
*
|
|
9
|
+
* - [Page Container](https://mui.com/toolpad/core/react-page-container/)
|
|
10
|
+
*
|
|
11
|
+
* API:
|
|
12
|
+
*
|
|
13
|
+
* - [PageContainerToolbar API](https://mui.com/toolpad/core/api/page-container-toolbar)
|
|
14
|
+
*/
|
|
15
|
+
declare function PageContainerToolbar(props: PageContainerToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { PageContainerToolbar };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./AppProvider";
|
|
2
|
+
export * from "./DashboardLayout";
|
|
3
|
+
export * from "./Account";
|
|
4
|
+
export * from "./PageContainer";
|
|
5
|
+
export * from "./useActivePage";
|
|
6
|
+
export * from "./useLocalStorageState";
|
|
7
|
+
export * from "./useSessionStorageState";
|
|
8
|
+
export * from "./persistence/codec";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./AppProvider";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A codec that can encode and decode values of type V to and from strings.
|
|
3
|
+
* @typeParam V The type of values that can be encoded and decoded.
|
|
4
|
+
*/
|
|
5
|
+
export interface Codec<V> {
|
|
6
|
+
/**
|
|
7
|
+
* Decodes a string value into a value of type V.
|
|
8
|
+
* @param value The value to decode.
|
|
9
|
+
* @returns The decoded value.
|
|
10
|
+
*/
|
|
11
|
+
parse: (value: string) => V;
|
|
12
|
+
/**
|
|
13
|
+
* Encodes a value of type V into a string.
|
|
14
|
+
* @param value The value to encode.
|
|
15
|
+
* @returns The encoded value.
|
|
16
|
+
*/
|
|
17
|
+
stringify: (value: V) => string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A codec that can encode and decode Date objects to and from strings.
|
|
21
|
+
*/
|
|
22
|
+
export declare const CODEC_DATE: Codec<Date>;
|
|
23
|
+
/**
|
|
24
|
+
* A codec that can encode and decode Date objects to and from strings, but only the date part.
|
|
25
|
+
*/
|
|
26
|
+
export declare const CODEC_DATE_ONLY: Codec<Date>;
|
|
27
|
+
/**
|
|
28
|
+
* A codec that can encode and decode numbers to and from strings.
|
|
29
|
+
*/
|
|
30
|
+
export declare const CODEC_NUMBER: Codec<number>;
|
|
31
|
+
/**
|
|
32
|
+
* A codec that can encode and decode boolean values to and from strings.
|
|
33
|
+
*/
|
|
34
|
+
export declare const CODE_BOOLEAN: Codec<boolean>;
|
|
35
|
+
/**
|
|
36
|
+
* A codec that can encode and decode JSON values to and from strings.
|
|
37
|
+
*/
|
|
38
|
+
export declare const CODEC_JSON: Codec<unknown>;
|
|
39
|
+
/**
|
|
40
|
+
* A codec that can encode and decode JSON values to and from strings.
|
|
41
|
+
* If the JSON value is invalid, parsing will fail.
|
|
42
|
+
*/
|
|
43
|
+
export declare const CODEC_JSON_STRICT: Codec<unknown>;
|
|
44
|
+
/**
|
|
45
|
+
* A codec that can encode and decode strings to and from strings.
|
|
46
|
+
*/
|
|
47
|
+
export declare const CODEC_STRING: Codec<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./useStorageState";
|