@melony/react 0.1.47 → 0.1.50

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.d.cts CHANGED
@@ -4,6 +4,7 @@ import { ClientState, MelonyClient } from 'melony/client';
4
4
  import { Message, Event, Config, UINode, UIContract } from 'melony';
5
5
  import { QueryClient } from '@tanstack/react-query';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
+ export * from '@tabler/icons-react';
7
8
 
8
9
  interface MelonyContextValue extends ClientState {
9
10
  messages: Message[];
@@ -412,6 +413,7 @@ type InputProps = BaseComponentProps & UIContract["input"] & {
412
413
  disabled?: boolean;
413
414
  value?: string;
414
415
  };
416
+ type HiddenProps = BaseComponentProps & UIContract["hidden"];
415
417
  type ButtonProps = BaseComponentProps & UIContract["button"] & {
416
418
  fullWidth?: boolean;
417
419
  type?: "button" | "submit";
@@ -420,6 +422,10 @@ type LabelProps = BaseComponentProps & UIContract["label"] & {
420
422
  size?: FontSize;
421
423
  weight?: FontWeight;
422
424
  };
425
+ type ColorPickerProps = BaseComponentProps & UIContract["colorPicker"] & {
426
+ value?: string;
427
+ disabled?: boolean;
428
+ };
423
429
  type UploadProps = BaseComponentProps & UIContract["upload"] & {
424
430
  initialFiles?: {
425
431
  name: string;
@@ -489,4 +495,8 @@ declare const Text: React__default.FC<TextProps>;
489
495
 
490
496
  declare const Badge: React__default.FC<BadgeProps>;
491
497
 
492
- 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, CreateThreadListItem, type CreateThreadListItemProps, Divider, Dropdown, type DropdownProps, Form, FullChat, type FullChatProps, Heading, Image, Input, Label, List, ListItem, MelonyContext, type MelonyContextValue, MelonyProvider, type MelonyProviderProps, 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, Upload, type UseMelonyOptions, type User, WelcomeScreen, type WelcomeScreenProps, useAuth, useMelony, useScreenSize, useSidebar, useTheme, useThreads };
498
+ declare const Hidden: React__default.FC<HiddenProps>;
499
+
500
+ declare const ColorPicker: React__default.FC<ColorPickerProps>;
501
+
502
+ export { AccountButton, type AccountButtonProps, AuthContext, type AuthContextValue, AuthProvider, type AuthProviderProps, type AuthService, Badge, Box, Button, Card, Chart, ChatHeader, type ChatHeaderProps, Checkbox, Col, ColorPicker, Composer, type ComposerOption, type ComposerOptionGroup, CreateThreadButton, type CreateThreadButtonProps, CreateThreadListItem, type CreateThreadListItemProps, Divider, Dropdown, type DropdownProps, Form, FullChat, type FullChatProps, Heading, Hidden, Image, Input, Label, List, ListItem, MelonyContext, type MelonyContextValue, MelonyProvider, type MelonyProviderProps, 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, Upload, type UseMelonyOptions, type User, WelcomeScreen, type WelcomeScreenProps, useAuth, useMelony, useScreenSize, useSidebar, useTheme, useThreads };
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { ClientState, MelonyClient } from 'melony/client';
4
4
  import { Message, Event, Config, UINode, UIContract } from 'melony';
5
5
  import { QueryClient } from '@tanstack/react-query';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
+ export * from '@tabler/icons-react';
7
8
 
8
9
  interface MelonyContextValue extends ClientState {
9
10
  messages: Message[];
@@ -412,6 +413,7 @@ type InputProps = BaseComponentProps & UIContract["input"] & {
412
413
  disabled?: boolean;
413
414
  value?: string;
414
415
  };
416
+ type HiddenProps = BaseComponentProps & UIContract["hidden"];
415
417
  type ButtonProps = BaseComponentProps & UIContract["button"] & {
416
418
  fullWidth?: boolean;
417
419
  type?: "button" | "submit";
@@ -420,6 +422,10 @@ type LabelProps = BaseComponentProps & UIContract["label"] & {
420
422
  size?: FontSize;
421
423
  weight?: FontWeight;
422
424
  };
425
+ type ColorPickerProps = BaseComponentProps & UIContract["colorPicker"] & {
426
+ value?: string;
427
+ disabled?: boolean;
428
+ };
423
429
  type UploadProps = BaseComponentProps & UIContract["upload"] & {
424
430
  initialFiles?: {
425
431
  name: string;
@@ -489,4 +495,8 @@ declare const Text: React__default.FC<TextProps>;
489
495
 
490
496
  declare const Badge: React__default.FC<BadgeProps>;
491
497
 
492
- 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, CreateThreadListItem, type CreateThreadListItemProps, Divider, Dropdown, type DropdownProps, Form, FullChat, type FullChatProps, Heading, Image, Input, Label, List, ListItem, MelonyContext, type MelonyContextValue, MelonyProvider, type MelonyProviderProps, 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, Upload, type UseMelonyOptions, type User, WelcomeScreen, type WelcomeScreenProps, useAuth, useMelony, useScreenSize, useSidebar, useTheme, useThreads };
498
+ declare const Hidden: React__default.FC<HiddenProps>;
499
+
500
+ declare const ColorPicker: React__default.FC<ColorPickerProps>;
501
+
502
+ export { AccountButton, type AccountButtonProps, AuthContext, type AuthContextValue, AuthProvider, type AuthProviderProps, type AuthService, Badge, Box, Button, Card, Chart, ChatHeader, type ChatHeaderProps, Checkbox, Col, ColorPicker, Composer, type ComposerOption, type ComposerOptionGroup, CreateThreadButton, type CreateThreadButtonProps, CreateThreadListItem, type CreateThreadListItemProps, Divider, Dropdown, type DropdownProps, Form, FullChat, type FullChatProps, Heading, Hidden, Image, Input, Label, List, ListItem, MelonyContext, type MelonyContextValue, MelonyProvider, type MelonyProviderProps, 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, Upload, type UseMelonyOptions, type User, WelcomeScreen, type WelcomeScreenProps, useAuth, useMelony, useScreenSize, useSidebar, useTheme, useThreads };
package/dist/index.js CHANGED
@@ -9,6 +9,7 @@ import { twMerge } from 'tailwind-merge';
9
9
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
10
  import * as ICONS from '@tabler/icons-react';
11
11
  import { IconX, IconChevronLeft, IconChevronRight, IconLoader2, IconCheck, IconUpload, IconUser, IconLogout, IconBrandGoogle, IconFileText, IconFile, IconPaperclip, IconChevronDown, IconArrowUp, IconDotsVertical, IconTrash, IconHistory, IconPlus, IconArrowLeft, IconMessage, IconLayoutSidebarLeftExpand, IconLayoutSidebarLeftCollapse, IconLayoutSidebarRightExpand, IconLayoutSidebarRightCollapse, IconDeviceDesktop, IconMoon, IconSun, IconSelector, IconChevronUp } from '@tabler/icons-react';
12
+ export * from '@tabler/icons-react';
12
13
  import { Separator as Separator$1 } from '@base-ui/react/separator';
13
14
  import { mergeProps } from '@base-ui/react/merge-props';
14
15
  import { useRender } from '@base-ui/react/use-render';
@@ -670,6 +671,52 @@ var Image = ({
670
671
  )
671
672
  ] });
672
673
  };
674
+ var Video = ({
675
+ src,
676
+ poster,
677
+ autoPlay = false,
678
+ controls = true,
679
+ loop = false,
680
+ muted = false,
681
+ aspectRatio = "16/9",
682
+ width = "100%",
683
+ className,
684
+ style
685
+ }) => {
686
+ const aspectRatios = {
687
+ "16/9": "aspect-video",
688
+ "4/3": "aspect-[4/3]",
689
+ "1/1": "aspect-square",
690
+ "9/16": "aspect-[9/16]"
691
+ };
692
+ return /* @__PURE__ */ jsx(
693
+ "div",
694
+ {
695
+ className: cn(
696
+ "relative overflow-hidden rounded-lg bg-black shadow-sm",
697
+ aspectRatios[aspectRatio] || "aspect-video",
698
+ className
699
+ ),
700
+ style: {
701
+ width: typeof width === "number" ? `${width}px` : width,
702
+ ...style
703
+ },
704
+ children: /* @__PURE__ */ jsx(
705
+ "video",
706
+ {
707
+ src,
708
+ poster,
709
+ autoPlay,
710
+ controls,
711
+ loop,
712
+ muted,
713
+ playsInline: true,
714
+ className: "h-full w-full object-cover"
715
+ }
716
+ )
717
+ }
718
+ );
719
+ };
673
720
  var Icon = ({
674
721
  name,
675
722
  size,
@@ -2083,6 +2130,7 @@ function UIRenderer({ node }) {
2083
2130
  divider: Divider,
2084
2131
  box: Box,
2085
2132
  image: Image,
2133
+ video: Video,
2086
2134
  icon: Icon,
2087
2135
  list: List,
2088
2136
  listItem: ListItem,
@@ -3955,6 +4003,6 @@ var CreateThreadListItem = ({
3955
4003
  );
3956
4004
  };
3957
4005
 
3958
- export { AccountButton, AuthContext, AuthProvider, Badge2 as Badge, Box, Button2 as Button, Card2 as Card, Chart, ChatHeader, Checkbox, Col, Composer, CreateThreadButton, CreateThreadListItem, Divider, Dropdown, Form, FullChat, Heading, Image, Input2 as Input, Label2 as Label, List, ListItem, MelonyContext, MelonyProvider, PopupChat, RadioGroup, Row, Select2 as Select, Sidebar, SidebarContext, SidebarProvider, SidebarToggle, Spacer, Text, Textarea2 as Textarea, ThemeProvider, ThemeToggle, Thread, ThreadContext, ThreadList, ThreadPopover, ThreadProvider, UIRenderer, Upload, WelcomeScreen, useAuth, useMelony, useScreenSize, useSidebar, useTheme, useThreads };
4006
+ export { AccountButton, AuthContext, AuthProvider, Badge2 as Badge, Box, Button2 as Button, Card2 as Card, Chart, ChatHeader, Checkbox, Col, ColorPicker, Composer, CreateThreadButton, CreateThreadListItem, Divider, Dropdown, Form, FullChat, Heading, Hidden, Image, Input2 as Input, Label2 as Label, List, ListItem, MelonyContext, MelonyProvider, PopupChat, RadioGroup, Row, Select2 as Select, Sidebar, SidebarContext, SidebarProvider, SidebarToggle, Spacer, Text, Textarea2 as Textarea, ThemeProvider, ThemeToggle, Thread, ThreadContext, ThreadList, ThreadPopover, ThreadProvider, UIRenderer, Upload, WelcomeScreen, useAuth, useMelony, useScreenSize, useSidebar, useTheme, useThreads };
3959
4007
  //# sourceMappingURL=index.js.map
3960
4008
  //# sourceMappingURL=index.js.map