@melony/react 0.1.28 → 0.1.31
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/index.cjs +575 -632
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -9
- package/dist/index.d.ts +21 -9
- package/dist/index.js +574 -633
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -59,10 +59,7 @@ interface ThreadService {
|
|
|
59
59
|
|
|
60
60
|
interface MelonyContextValue extends ClientState {
|
|
61
61
|
messages: Message[];
|
|
62
|
-
sendEvent: (event: Event
|
|
63
|
-
runId?: string;
|
|
64
|
-
state?: Record<string, any>;
|
|
65
|
-
}) => Promise<void>;
|
|
62
|
+
sendEvent: (event: Event) => Promise<void>;
|
|
66
63
|
reset: (events?: Event[]) => void;
|
|
67
64
|
client: MelonyClient;
|
|
68
65
|
config?: Config;
|
|
@@ -300,7 +297,6 @@ declare function SidebarToggle({ side, className }: SidebarToggleProps): react_j
|
|
|
300
297
|
interface ThreadListProps {
|
|
301
298
|
className?: string;
|
|
302
299
|
emptyState?: React$1.ReactNode;
|
|
303
|
-
onThreadSelect?: (threadId: string) => void;
|
|
304
300
|
}
|
|
305
301
|
declare const ThreadList: React$1.FC<ThreadListProps>;
|
|
306
302
|
|
|
@@ -310,7 +306,6 @@ interface ThreadPopoverProps {
|
|
|
310
306
|
buttonVariant?: "default" | "outline" | "secondary" | "ghost" | "destructive" | "link";
|
|
311
307
|
buttonSize?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg";
|
|
312
308
|
emptyState?: React$1.ReactNode;
|
|
313
|
-
onThreadSelect?: (threadId: string) => void;
|
|
314
309
|
}
|
|
315
310
|
declare const ThreadPopover: React$1.FC<ThreadPopoverProps>;
|
|
316
311
|
|
|
@@ -323,12 +318,12 @@ interface CreateThreadButtonProps {
|
|
|
323
318
|
}
|
|
324
319
|
declare const CreateThreadButton: React$1.FC<CreateThreadButtonProps>;
|
|
325
320
|
|
|
326
|
-
interface
|
|
321
|
+
interface AccountButtonProps {
|
|
327
322
|
className?: string;
|
|
328
323
|
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
|
|
329
324
|
size?: "default" | "sm" | "lg" | "icon";
|
|
330
325
|
}
|
|
331
|
-
declare const
|
|
326
|
+
declare const AccountButton: React$1.FC<AccountButtonProps>;
|
|
332
327
|
|
|
333
328
|
declare function ThemeToggle(): react_jsx_runtime.JSX.Element;
|
|
334
329
|
|
|
@@ -342,6 +337,23 @@ interface UIRendererProps {
|
|
|
342
337
|
*/
|
|
343
338
|
declare function UIRenderer({ node }: UIRendererProps): react_jsx_runtime.JSX.Element;
|
|
344
339
|
|
|
340
|
+
interface DropdownProps {
|
|
341
|
+
className?: string;
|
|
342
|
+
trigger?: React$1.ReactNode;
|
|
343
|
+
triggerClassName?: string;
|
|
344
|
+
items: {
|
|
345
|
+
label: string;
|
|
346
|
+
icon: React$1.ReactNode;
|
|
347
|
+
onClick: () => void;
|
|
348
|
+
}[];
|
|
349
|
+
}
|
|
350
|
+
declare const Dropdown: React$1.FC<DropdownProps>;
|
|
351
|
+
|
|
352
|
+
interface CreateThreadNavItemProps {
|
|
353
|
+
className?: string;
|
|
354
|
+
}
|
|
355
|
+
declare const CreateThreadNavItem: React$1.FC<CreateThreadNavItemProps>;
|
|
356
|
+
|
|
345
357
|
type Spacing = "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
|
|
346
358
|
type FontSize = "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
|
|
347
359
|
type FontWeight = "normal" | "medium" | "semibold" | "bold";
|
|
@@ -474,4 +486,4 @@ declare const Badge: React__default.FC<BadgeProps>;
|
|
|
474
486
|
|
|
475
487
|
declare function groupEventsToMessages(events: Event[]): Message[];
|
|
476
488
|
|
|
477
|
-
export {
|
|
489
|
+
export { AccountButton, type AccountButtonProps, AuthContext, type AuthContextValue, AuthProvider, type AuthProviderProps, type AuthService, Badge, Box, Button, Card, Chart, ChatHeader, type ChatHeaderProps, Checkbox, Col, Composer, type ComposerOption, type ComposerOptionGroup, CreateThreadButton, type CreateThreadButtonProps, CreateThreadNavItem, type CreateThreadNavItemProps, Divider, Dropdown, type DropdownProps, Form, FullChat, type FullChatProps, Heading, Image, Input, Label, List, ListItem, MelonyContext, type MelonyContextValue, MelonyProvider, type MelonyProviderProps, type Message, PopupChat, type PopupChatProps, RadioGroup, Row, type ScreenSize, Select, Sidebar, SidebarContext, type SidebarContextValue, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarToggle, type SidebarToggleProps, Spacer, type StarterPrompt, Text, Textarea, ThemeProvider, ThemeToggle, Thread, ThreadContext, type ThreadContextValue, type ThreadData, ThreadList, type ThreadListProps, ThreadPopover, type ThreadPopoverProps, ThreadProvider, type ThreadProviderProps, type ThreadService, UIRenderer, type UIRendererProps, type UseMelonyOptions, type User, WelcomeScreen, type WelcomeScreenProps, groupEventsToMessages, useAuth, useMelony, useScreenSize, useSidebar, useTheme, useThreads };
|
package/dist/index.d.ts
CHANGED
|
@@ -59,10 +59,7 @@ interface ThreadService {
|
|
|
59
59
|
|
|
60
60
|
interface MelonyContextValue extends ClientState {
|
|
61
61
|
messages: Message[];
|
|
62
|
-
sendEvent: (event: Event
|
|
63
|
-
runId?: string;
|
|
64
|
-
state?: Record<string, any>;
|
|
65
|
-
}) => Promise<void>;
|
|
62
|
+
sendEvent: (event: Event) => Promise<void>;
|
|
66
63
|
reset: (events?: Event[]) => void;
|
|
67
64
|
client: MelonyClient;
|
|
68
65
|
config?: Config;
|
|
@@ -300,7 +297,6 @@ declare function SidebarToggle({ side, className }: SidebarToggleProps): react_j
|
|
|
300
297
|
interface ThreadListProps {
|
|
301
298
|
className?: string;
|
|
302
299
|
emptyState?: React$1.ReactNode;
|
|
303
|
-
onThreadSelect?: (threadId: string) => void;
|
|
304
300
|
}
|
|
305
301
|
declare const ThreadList: React$1.FC<ThreadListProps>;
|
|
306
302
|
|
|
@@ -310,7 +306,6 @@ interface ThreadPopoverProps {
|
|
|
310
306
|
buttonVariant?: "default" | "outline" | "secondary" | "ghost" | "destructive" | "link";
|
|
311
307
|
buttonSize?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg";
|
|
312
308
|
emptyState?: React$1.ReactNode;
|
|
313
|
-
onThreadSelect?: (threadId: string) => void;
|
|
314
309
|
}
|
|
315
310
|
declare const ThreadPopover: React$1.FC<ThreadPopoverProps>;
|
|
316
311
|
|
|
@@ -323,12 +318,12 @@ interface CreateThreadButtonProps {
|
|
|
323
318
|
}
|
|
324
319
|
declare const CreateThreadButton: React$1.FC<CreateThreadButtonProps>;
|
|
325
320
|
|
|
326
|
-
interface
|
|
321
|
+
interface AccountButtonProps {
|
|
327
322
|
className?: string;
|
|
328
323
|
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
|
|
329
324
|
size?: "default" | "sm" | "lg" | "icon";
|
|
330
325
|
}
|
|
331
|
-
declare const
|
|
326
|
+
declare const AccountButton: React$1.FC<AccountButtonProps>;
|
|
332
327
|
|
|
333
328
|
declare function ThemeToggle(): react_jsx_runtime.JSX.Element;
|
|
334
329
|
|
|
@@ -342,6 +337,23 @@ interface UIRendererProps {
|
|
|
342
337
|
*/
|
|
343
338
|
declare function UIRenderer({ node }: UIRendererProps): react_jsx_runtime.JSX.Element;
|
|
344
339
|
|
|
340
|
+
interface DropdownProps {
|
|
341
|
+
className?: string;
|
|
342
|
+
trigger?: React$1.ReactNode;
|
|
343
|
+
triggerClassName?: string;
|
|
344
|
+
items: {
|
|
345
|
+
label: string;
|
|
346
|
+
icon: React$1.ReactNode;
|
|
347
|
+
onClick: () => void;
|
|
348
|
+
}[];
|
|
349
|
+
}
|
|
350
|
+
declare const Dropdown: React$1.FC<DropdownProps>;
|
|
351
|
+
|
|
352
|
+
interface CreateThreadNavItemProps {
|
|
353
|
+
className?: string;
|
|
354
|
+
}
|
|
355
|
+
declare const CreateThreadNavItem: React$1.FC<CreateThreadNavItemProps>;
|
|
356
|
+
|
|
345
357
|
type Spacing = "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
|
|
346
358
|
type FontSize = "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
|
|
347
359
|
type FontWeight = "normal" | "medium" | "semibold" | "bold";
|
|
@@ -474,4 +486,4 @@ declare const Badge: React__default.FC<BadgeProps>;
|
|
|
474
486
|
|
|
475
487
|
declare function groupEventsToMessages(events: Event[]): Message[];
|
|
476
488
|
|
|
477
|
-
export {
|
|
489
|
+
export { AccountButton, type AccountButtonProps, AuthContext, type AuthContextValue, AuthProvider, type AuthProviderProps, type AuthService, Badge, Box, Button, Card, Chart, ChatHeader, type ChatHeaderProps, Checkbox, Col, Composer, type ComposerOption, type ComposerOptionGroup, CreateThreadButton, type CreateThreadButtonProps, CreateThreadNavItem, type CreateThreadNavItemProps, Divider, Dropdown, type DropdownProps, Form, FullChat, type FullChatProps, Heading, Image, Input, Label, List, ListItem, MelonyContext, type MelonyContextValue, MelonyProvider, type MelonyProviderProps, type Message, PopupChat, type PopupChatProps, RadioGroup, Row, type ScreenSize, Select, Sidebar, SidebarContext, type SidebarContextValue, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarToggle, type SidebarToggleProps, Spacer, type StarterPrompt, Text, Textarea, ThemeProvider, ThemeToggle, Thread, ThreadContext, type ThreadContextValue, type ThreadData, ThreadList, type ThreadListProps, ThreadPopover, type ThreadPopoverProps, ThreadProvider, type ThreadProviderProps, type ThreadService, UIRenderer, type UIRendererProps, type UseMelonyOptions, type User, WelcomeScreen, type WelcomeScreenProps, groupEventsToMessages, useAuth, useMelony, useScreenSize, useSidebar, useTheme, useThreads };
|