@pelatform/starter.shared 0.2.15 → 0.2.17

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +62 -22
  2. package/dist/index.js +510 -228
  3. package/package.json +8 -8
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ReactNode, CSSProperties, ComponentProps, PropsWithChildren, ComponentType } from 'react';
3
+ import { ReactNode, ComponentProps, CSSProperties, PropsWithChildren, ComponentType } from 'react';
4
4
  import { MenuItem } from 'pelatform-ui';
5
5
  import { NavItem, LanguageSwitcherProps } from 'pelatform-ui/components';
6
6
  export { Logo as LogoDefault } from 'pelatform-ui/components';
@@ -10,56 +10,85 @@ import { AnyAuthClient, ImageOptions, User, Workspace, ApiKey } from '@pelatform
10
10
  import { Toaster, Avatar, buttonVariants, Dialog, Card, Button, Input } from 'pelatform-ui/default';
11
11
  import { LucideIcon } from 'lucide-react';
12
12
 
13
- declare function AuthLayout({ children, logo, disableFooter, signInHint, signInHref, }: {
13
+ declare function AuthLayout({ children, className, logo, disableFooter, signInHint, signInHref, }: {
14
14
  children: ReactNode;
15
+ className?: string;
15
16
  logo?: ReactNode;
16
17
  disableFooter?: boolean;
17
18
  signInHint?: boolean;
18
19
  signInHref?: string;
19
20
  }): react_jsx_runtime.JSX.Element;
20
21
 
21
- declare function Header({ children }: {
22
+ declare function Header({ children, className }: {
22
23
  children: ReactNode;
24
+ className?: string;
25
+ }): react_jsx_runtime.JSX.Element;
26
+ declare function HeaderLeft({ className }: {
27
+ className?: string;
23
28
  }): react_jsx_runtime.JSX.Element;
24
- declare function HeaderLeft(): react_jsx_runtime.JSX.Element;
25
- declare function HeaderRight({ sidebar, button, homeUrl, }: {
29
+ declare function HeaderRight({ className, sidebar, button, homeUrl, }: {
30
+ className?: string;
26
31
  sidebar?: ReactNode;
27
32
  button?: ReactNode;
28
33
  homeUrl?: string;
29
34
  }): react_jsx_runtime.JSX.Element;
30
- declare function HeaderSidebarMobile({ children }: {
35
+ declare function HeaderSidebarMobile({ children, className, }: {
31
36
  children: ReactNode;
37
+ className?: string;
32
38
  }): react_jsx_runtime.JSX.Element;
33
39
 
34
- declare function LayoutLoader({ children }: {
40
+ declare function LayoutLoader({ children, className }: {
35
41
  children: ReactNode;
42
+ className?: string;
36
43
  }): string | number | bigint | boolean | react_jsx_runtime.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
37
44
 
38
- declare function Sidebar({ children }: {
45
+ declare function UserMenu({ homeUrl, disableSettings, disableSecurity, disableAdminMenu, hiddenSwitcher, side, align, sideOffset, }: {
46
+ homeUrl?: string;
47
+ disableSettings?: boolean;
48
+ disableSecurity?: boolean;
49
+ disableAdminMenu?: boolean;
50
+ hiddenSwitcher?: boolean;
51
+ side?: "bottom" | "top" | "right" | "left";
52
+ align?: "center" | "end" | "start";
53
+ sideOffset?: number;
54
+ }): react_jsx_runtime.JSX.Element;
55
+
56
+ declare function Sidebar({ children, className }: {
39
57
  children: ReactNode;
58
+ className?: string;
40
59
  }): react_jsx_runtime.JSX.Element | null;
41
- declare function SidebarHeaderBack({ linkHref, admin, text, }: {
60
+ declare function SidebarHeaderBack({ className, linkHref, admin, text, }: {
61
+ className?: string;
42
62
  linkHref?: string;
43
63
  admin?: boolean;
44
64
  text?: string;
45
65
  }): react_jsx_runtime.JSX.Element;
46
- declare function SidebarContent({ children }: {
66
+ declare function SidebarContent({ children, className, }: {
47
67
  children: ReactNode;
68
+ className?: string;
48
69
  }): react_jsx_runtime.JSX.Element;
49
- declare function SidebarContentMenu({ menu, type, }: {
70
+ declare function SidebarContentMenu({ className, menu, type, }: {
71
+ className?: string;
50
72
  menu: MenuItem[];
51
73
  type?: "default" | "toggle";
52
74
  }): react_jsx_runtime.JSX.Element;
75
+ declare function SidebarFooter({ children, className, side, align, sideOffset, ...props }: ComponentProps<typeof UserMenu> & {
76
+ children?: ReactNode;
77
+ className?: string;
78
+ }): react_jsx_runtime.JSX.Element;
53
79
 
54
- declare function SiteFooter({ disableProjectBy }: {
80
+ declare function SiteFooter({ className, disableProjectBy, }: {
81
+ className?: string;
55
82
  disableProjectBy?: boolean;
56
83
  }): react_jsx_runtime.JSX.Element;
57
84
 
58
- declare function SiteHeader({ menu, logo, }: {
85
+ declare function SiteHeader({ className, menu, logo, }: {
86
+ className?: string;
59
87
  menu: NavItem[];
60
88
  logo?: ReactNode;
61
89
  }): react_jsx_runtime.JSX.Element;
62
- declare function SiteHeaderSecondary({ menu, logo, loginHref, loginTarget, }: {
90
+ declare function SiteHeaderSecondary({ className, menu, logo, loginHref, loginTarget, }: {
91
+ className?: string;
63
92
  menu: NavItem[];
64
93
  logo?: ReactNode;
65
94
  loginHref?: string;
@@ -73,15 +102,30 @@ type ToolbarProps = {
73
102
  };
74
103
  declare function Toolbar(props: ToolbarProps): react_jsx_runtime.JSX.Element;
75
104
 
105
+ type WrapperClassNames = {
106
+ body?: string;
107
+ layout?: string;
108
+ header?: string;
109
+ headerLeft?: string;
110
+ headerRight?: string;
111
+ sidebar?: string;
112
+ sidebarContent?: string;
113
+ studioButton?: string;
114
+ wrapper?: string;
115
+ content?: string;
116
+ };
76
117
  interface LayoutWrapperProps {
77
118
  children: ReactNode;
119
+ classNames?: WrapperClassNames;
78
120
  sidebarHeader: ReactNode;
79
121
  sidebarMenu: ReactNode;
122
+ sidebarFooter?: ReactNode;
80
123
  logoHeader?: ReactNode;
124
+ version?: "v1" | "v2";
81
125
  homeUrl?: string;
82
126
  studioUrl?: string;
83
127
  }
84
- declare function LayoutWrapper({ children, sidebarHeader, sidebarMenu, logoHeader, homeUrl, studioUrl, }: LayoutWrapperProps): react_jsx_runtime.JSX.Element;
128
+ declare function LayoutWrapper({ children, classNames, logoHeader, version, ...props }: LayoutWrapperProps): react_jsx_runtime.JSX.Element;
85
129
 
86
130
  /**
87
131
  * Props for the ConfigProvider component
@@ -135,8 +179,9 @@ interface LayoutProviderProps {
135
179
  bodyClassName?: string;
136
180
  className?: string;
137
181
  logoHeader?: ReactNode;
182
+ version?: "v1" | "v2";
138
183
  }
139
- declare function LayoutProvider({ children, style: customStyle, bodyClassName, className, logoHeader, }: LayoutProviderProps): react_jsx_runtime.JSX.Element;
184
+ declare function LayoutProvider({ children, style: customStyle, bodyClassName, className, logoHeader, version, }: LayoutProviderProps): react_jsx_runtime.JSX.Element;
140
185
 
141
186
  interface SharedProvidersProps {
142
187
  children: ReactNode;
@@ -278,11 +323,6 @@ declare function SignedInHint({ linkHref }: {
278
323
  linkHref?: string;
279
324
  }): react_jsx_runtime.JSX.Element;
280
325
 
281
- declare function UserMenu({ homeUrl, hiddenSwitcher, }: {
282
- homeUrl?: string;
283
- hiddenSwitcher?: boolean;
284
- }): react_jsx_runtime.JSX.Element;
285
-
286
326
  type ViewClassNames = {
287
327
  base?: string;
288
328
  content?: string;
@@ -406,4 +446,4 @@ type Provider = {
406
446
  icon?: ProviderIcon;
407
447
  };
408
448
 
409
- export { ApiKeyView, AuthLayout, type AvatarClassNames, type AvatarProps, CardActionComponent, type CardClassNames, CardComponent, type CardComponentProps, CardFooterComponent, CardHeaderComponent, ConfigProvider, type ConfigProviderProps, type DialogClassNames, DialogComponent, type DialogComponentProps, DialogFooterComponent, DisplayIdCard, EmptyState, type EmptyStateProps, Header, HeaderLeft, HeaderRight, HeaderSidebarMobile, LanguageSwitcher, LayoutLoader, LayoutProvider, type LayoutProviderProps, LayoutWrapper, LogoWithHref, LogoWithName, OTPInputGroup, PasswordInput, type Provider, type ProviderIcon, SharedProviders, type SharedProvidersProps, Sidebar, SidebarContent, SidebarContentMenu, SidebarHeaderBack, SignedInHint, SiteFooter, SiteHeader, SiteHeaderSecondary, SkeletonInputComponent, SkeletonViewComponent, Toolbar, UserAvatar, UserMenu, UserView, type ViewClassNames, type ViewProps, WorkspaceLogo, WorkspaceView, socialProviders };
449
+ export { ApiKeyView, AuthLayout, type AvatarClassNames, type AvatarProps, CardActionComponent, type CardClassNames, CardComponent, type CardComponentProps, CardFooterComponent, CardHeaderComponent, ConfigProvider, type ConfigProviderProps, type DialogClassNames, DialogComponent, type DialogComponentProps, DialogFooterComponent, DisplayIdCard, EmptyState, type EmptyStateProps, Header, HeaderLeft, HeaderRight, HeaderSidebarMobile, LanguageSwitcher, LayoutLoader, LayoutProvider, type LayoutProviderProps, LayoutWrapper, LogoWithHref, LogoWithName, OTPInputGroup, PasswordInput, type Provider, type ProviderIcon, SharedProviders, type SharedProvidersProps, Sidebar, SidebarContent, SidebarContentMenu, SidebarFooter, SidebarHeaderBack, SignedInHint, SiteFooter, SiteHeader, SiteHeaderSecondary, SkeletonInputComponent, SkeletonViewComponent, Toolbar, UserAvatar, UserMenu, UserView, type ViewClassNames, type ViewProps, WorkspaceLogo, WorkspaceView, socialProviders };