@melony/react 0.1.50 → 0.1.52

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
@@ -1,7 +1,7 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { ReactNode, CSSProperties } from 'react';
2
+ import React__default, { ReactNode } from 'react';
3
3
  import { ClientState, MelonyClient } from 'melony/client';
4
- import { Message, Event, Config, UINode, UIContract } from 'melony';
4
+ import { Message, Event, Config, UIWidth, UISpacing, UIColor, UIRadius, UINode, UIContract, UIJustify, UIAlign } from 'melony';
5
5
  import { QueryClient } from '@tanstack/react-query';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
  export * from '@tabler/icons-react';
@@ -157,6 +157,13 @@ declare const useAuth: () => AuthContextValue;
157
157
 
158
158
  declare const useThreads: () => ThreadContextValue;
159
159
 
160
+ interface UseSurfaceOptions {
161
+ name: string;
162
+ }
163
+ declare const useSurface: (options: UseSurfaceOptions) => {
164
+ events: Event[];
165
+ };
166
+
160
167
  interface ScreenSize {
161
168
  width: number;
162
169
  height: number;
@@ -172,15 +179,13 @@ interface ScreenSize {
172
179
  declare function useScreenSize(mobileBreakpoint?: number, tabletBreakpoint?: number): ScreenSize;
173
180
 
174
181
  interface ThreadProps {
175
- className?: string;
176
182
  placeholder?: string;
177
183
  starterPrompts?: StarterPrompt[];
178
- onStarterPromptClick?: (prompt: string) => void;
179
184
  options?: ComposerOptionGroup[];
180
185
  autoFocus?: boolean;
181
186
  defaultSelectedIds?: string[];
182
187
  }
183
- declare function Thread({ className, placeholder, starterPrompts: localStarterPrompts, onStarterPromptClick, options: localOptions, autoFocus, defaultSelectedIds, }: ThreadProps): react_jsx_runtime.JSX.Element;
188
+ declare function Thread({ placeholder, starterPrompts: localStarterPrompts, options: localOptions, autoFocus, defaultSelectedIds, }: ThreadProps): react_jsx_runtime.JSX.Element;
184
189
 
185
190
  interface ComposerProps {
186
191
  value: string;
@@ -254,13 +259,13 @@ declare function PopupChat({ title, placeholder, starterPrompts, options, defaul
254
259
  interface SidebarProps {
255
260
  side: "left" | "right";
256
261
  children: React__default.ReactNode;
257
- className?: string;
262
+ width?: UIWidth | string;
258
263
  }
259
264
  /**
260
265
  * A sidebar component that responds to ChatSidebarContext.
261
266
  * Typically used within ChatFull or a layout with ChatSidebarProvider.
262
267
  */
263
- declare function Sidebar({ side, children, className }: SidebarProps): react_jsx_runtime.JSX.Element;
268
+ declare function Sidebar({ side, children, width }: SidebarProps): react_jsx_runtime.JSX.Element;
264
269
 
265
270
  interface FullChatProps {
266
271
  title?: string;
@@ -283,6 +288,23 @@ interface FullChatProps {
283
288
  }
284
289
  declare function FullChat({ title, placeholder, starterPrompts, options, className, headerProps, autoFocus, defaultSelectedIds, }: FullChatProps): react_jsx_runtime.JSX.Element;
285
290
 
291
+ interface SurfaceProps {
292
+ /**
293
+ * The name of the surface to filter events by.
294
+ * Only events with matching Event.surface will be included.
295
+ */
296
+ name: string;
297
+ /**
298
+ * Render function that receives the filtered and slot-deduplicated events.
299
+ */
300
+ children: (events: Event[]) => ReactNode;
301
+ }
302
+ /**
303
+ * A reusable component that listens to Melony events for a specific surface.
304
+ * It automatically handles slot-based deduplication (latest event for a slot replaces previous ones).
305
+ */
306
+ declare function Surface({ name, children }: SurfaceProps): react_jsx_runtime.JSX.Element;
307
+
286
308
  interface SidebarToggleProps {
287
309
  side: "left" | "right";
288
310
  className?: string;
@@ -290,17 +312,14 @@ interface SidebarToggleProps {
290
312
  declare function SidebarToggle({ side, className }: SidebarToggleProps): react_jsx_runtime.JSX.Element | null;
291
313
 
292
314
  interface ThreadListProps {
293
- className?: string;
294
- emptyState?: React$1.ReactNode;
315
+ padding?: UISpacing;
316
+ gap?: UISpacing;
317
+ background?: UIColor;
318
+ radius?: UIRadius;
295
319
  }
296
320
  declare const ThreadList: React$1.FC<ThreadListProps>;
297
321
 
298
322
  interface ThreadPopoverProps {
299
- className?: string;
300
- buttonClassName?: string;
301
- buttonVariant?: "default" | "outline" | "secondary" | "ghost" | "destructive" | "link";
302
- buttonSize?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg";
303
- emptyState?: React$1.ReactNode;
304
323
  }
305
324
  declare const ThreadPopover: React$1.FC<ThreadPopoverProps>;
306
325
 
@@ -332,171 +351,94 @@ interface UIRendererProps {
332
351
  */
333
352
  declare function UIRenderer({ node }: UIRendererProps): react_jsx_runtime.JSX.Element;
334
353
 
335
- interface DropdownProps {
336
- className?: string;
337
- trigger?: React$1.ReactNode;
338
- triggerClassName?: string;
339
- items: {
340
- label: string;
341
- icon: React$1.ReactNode;
342
- onClick: () => void;
343
- }[];
344
- }
345
- declare const Dropdown: React$1.FC<DropdownProps>;
346
-
347
354
  interface CreateThreadListItemProps {
348
- className?: string;
355
+ padding?: UISpacing;
356
+ background?: UIColor;
357
+ radius?: UIRadius;
349
358
  }
350
359
  declare const CreateThreadListItem: React$1.FC<CreateThreadListItemProps>;
351
360
 
352
- type Spacing = "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
353
- type FontSize = "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
354
- type FontWeight = "normal" | "medium" | "semibold" | "bold";
361
+ declare const Button: React__default.FC<UIContract["button"] & {
362
+ justify?: UIJustify;
363
+ }>;
355
364
 
356
- type Size = "sm" | "md" | "lg";
357
- type Align = "start" | "center" | "end" | "stretch";
358
- type Justify = "start" | "center" | "end" | "between" | "around";
359
- type Orientation = "horizontal" | "vertical";
360
- interface BaseComponentProps {
361
- className?: string;
362
- style?: CSSProperties;
363
- }
364
- type CardProps = BaseComponentProps & UIContract["card"] & {
365
- children?: React__default.ReactNode[];
366
- };
367
- type RowProps = BaseComponentProps & UIContract["row"] & {
368
- children?: React__default.ReactNode[];
369
- };
370
- type ColProps = BaseComponentProps & UIContract["col"] & {
371
- children?: React__default.ReactNode[] | React__default.ReactNode;
372
- overflow?: "visible" | "hidden" | "scroll" | "auto";
373
- position?: "static" | "relative" | "absolute" | "fixed" | "sticky";
374
- };
375
- type BoxProps = BaseComponentProps & UIContract["box"] & {
376
- children?: React__default.ReactNode | React__default.ReactNode[];
377
- overflow?: "visible" | "hidden" | "scroll" | "auto";
378
- };
379
- type SpacerProps = BaseComponentProps & UIContract["spacer"];
380
- type DividerProps = BaseComponentProps & UIContract["divider"] & {
381
- size?: Size;
382
- };
383
- type ListProps = BaseComponentProps & {
384
- children?: React__default.ReactNode;
385
- width?: string | number;
386
- };
387
- type ListItemProps = BaseComponentProps & UIContract["listItem"] & {
388
- children?: React__default.ReactNode;
389
- orientation?: Orientation;
390
- align?: Align;
391
- justify?: Justify;
392
- width?: string | number;
393
- padding?: Spacing;
394
- };
395
- type ImageProps = BaseComponentProps & UIContract["image"] & {
396
- fallbackText?: string;
397
- showFallbackIcon?: boolean;
398
- groupId?: string;
399
- };
400
- type ChartProps = BaseComponentProps & UIContract["chart"] & {
401
- size?: Size;
402
- showValues?: boolean;
403
- showGrid?: boolean;
404
- showTooltips?: boolean;
405
- };
406
- type BadgeProps = BaseComponentProps & UIContract["badge"];
407
- type TextProps = BaseComponentProps & UIContract["text"];
408
- type HeadingProps = BaseComponentProps & UIContract["heading"];
409
- type FormProps = BaseComponentProps & UIContract["form"] & {
410
- children?: React__default.ReactNode[];
411
- };
412
- type InputProps = BaseComponentProps & UIContract["input"] & {
413
- disabled?: boolean;
414
- value?: string;
415
- };
416
- type HiddenProps = BaseComponentProps & UIContract["hidden"];
417
- type ButtonProps = BaseComponentProps & UIContract["button"] & {
418
- fullWidth?: boolean;
419
- type?: "button" | "submit";
420
- };
421
- type LabelProps = BaseComponentProps & UIContract["label"] & {
422
- size?: FontSize;
423
- weight?: FontWeight;
424
- };
425
- type ColorPickerProps = BaseComponentProps & UIContract["colorPicker"] & {
426
- value?: string;
427
- disabled?: boolean;
428
- };
429
- type UploadProps = BaseComponentProps & UIContract["upload"] & {
430
- initialFiles?: {
431
- name: string;
432
- url: string;
433
- }[];
434
- mode?: "append" | "replace";
435
- };
436
- type TextareaProps = BaseComponentProps & UIContract["textarea"] & {
437
- value?: string;
438
- disabled?: boolean;
439
- };
440
- type SelectProps = BaseComponentProps & UIContract["select"] & {
441
- value?: string;
442
- disabled?: boolean;
443
- };
444
- type CheckboxProps = BaseComponentProps & UIContract["checkbox"] & {
445
- defaultChecked?: boolean;
446
- disabled?: boolean;
447
- };
448
- type RadioGroupProps = BaseComponentProps & UIContract["radioGroup"] & {
449
- value?: string;
450
- defaultValue?: string;
451
- disabled?: boolean;
452
- };
365
+ declare const Input: React__default.FC<UIContract["input"]>;
453
366
 
454
- declare const Button: React__default.FC<ButtonProps>;
367
+ declare const Textarea: React__default.FC<UIContract["textarea"]>;
455
368
 
456
- declare const Input: React__default.FC<InputProps>;
369
+ declare const Select: React__default.FC<UIContract["select"]>;
457
370
 
458
- declare const Textarea: React__default.FC<TextareaProps>;
371
+ declare const Checkbox: React__default.FC<UIContract["checkbox"]>;
459
372
 
460
- declare const Select: React__default.FC<SelectProps>;
373
+ declare const RadioGroup: React__default.FC<UIContract["radioGroup"]>;
461
374
 
462
- declare const Checkbox: React__default.FC<CheckboxProps>;
375
+ declare const Form: React__default.FC<UIContract["form"] & {
376
+ children?: React__default.ReactNode[];
377
+ }>;
463
378
 
464
- declare const RadioGroup: React__default.FC<RadioGroupProps>;
379
+ declare const Upload: React__default.FC<UIContract["upload"]>;
465
380
 
466
- declare const Form: React__default.FC<FormProps>;
381
+ declare const Heading: React__default.FC<UIContract["heading"]>;
467
382
 
468
- declare const Upload: React__default.FC<UploadProps>;
383
+ declare const Image: React__default.FC<UIContract["image"]>;
469
384
 
470
- declare const Heading: React__default.FC<HeadingProps>;
385
+ declare const Label: React__default.FC<UIContract["label"]>;
471
386
 
472
- declare const Image: React__default.FC<ImageProps>;
387
+ interface DropdownProps {
388
+ className?: string;
389
+ trigger?: React$1.ReactNode;
390
+ triggerClassName?: string;
391
+ items: {
392
+ label: string;
393
+ icon: React$1.ReactNode;
394
+ onClick: () => void;
395
+ }[];
396
+ }
397
+ declare const Dropdown: React$1.FC<DropdownProps>;
473
398
 
474
- declare const Label: React__default.FC<LabelProps>;
399
+ declare const List: React__default.FC<UIContract["list"] & {
400
+ children?: React__default.ReactNode;
401
+ flex?: string;
402
+ overflow?: string;
403
+ }>;
475
404
 
476
- declare const List: React__default.FC<ListProps>;
405
+ declare const ListItem: React__default.FC<UIContract["listItem"] & {
406
+ children?: React__default.ReactNode;
407
+ align?: UIAlign;
408
+ }>;
477
409
 
478
- declare const ListItem: React__default.FC<ListItemProps>;
410
+ declare const Spacer: React__default.FC<UIContract["spacer"]>;
479
411
 
480
- declare const Spacer: React__default.FC<SpacerProps>;
412
+ declare const Divider: React__default.FC<UIContract["divider"]>;
481
413
 
482
- declare const Divider: React__default.FC<DividerProps>;
414
+ declare const Box: React__default.FC<UIContract["box"] & {
415
+ children?: React__default.ReactNode | React__default.ReactNode[];
416
+ }>;
483
417
 
484
- declare const Box: React__default.FC<BoxProps>;
418
+ declare const Float: React__default.FC<UIContract["float"] & {
419
+ children?: React__default.ReactNode | React__default.ReactNode[];
420
+ }>;
485
421
 
486
- declare const Chart: React__default.FC<ChartProps>;
422
+ declare const Chart: React__default.FC<UIContract["chart"]>;
487
423
 
488
- declare const Card: React__default.FC<CardProps>;
424
+ declare const Card: React__default.FC<UIContract["card"] & {
425
+ children?: React__default.ReactNode[];
426
+ }>;
489
427
 
490
- declare const Row: React__default.FC<RowProps>;
428
+ declare const Row: React__default.FC<UIContract["row"] & {
429
+ children?: React__default.ReactNode[];
430
+ }>;
491
431
 
492
- declare const Col: React__default.FC<ColProps>;
432
+ declare const Col: React__default.FC<UIContract["col"] & {
433
+ children?: React__default.ReactNode | React__default.ReactNode[];
434
+ }>;
493
435
 
494
- declare const Text: React__default.FC<TextProps>;
436
+ declare const Text: React__default.FC<UIContract["text"]>;
495
437
 
496
- declare const Badge: React__default.FC<BadgeProps>;
438
+ declare const Badge: React__default.FC<UIContract["badge"]>;
497
439
 
498
- declare const Hidden: React__default.FC<HiddenProps>;
440
+ declare const Hidden: React__default.FC<UIContract["hidden"]>;
499
441
 
500
- declare const ColorPicker: React__default.FC<ColorPickerProps>;
442
+ declare const ColorPicker: React__default.FC<UIContract["colorPicker"]>;
501
443
 
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 };
444
+ 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, Float, 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, Surface, type SurfaceProps, 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 UseSurfaceOptions, type User, WelcomeScreen, type WelcomeScreenProps, useAuth, useMelony, useScreenSize, useSidebar, useSurface, useTheme, useThreads };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { ReactNode, CSSProperties } from 'react';
2
+ import React__default, { ReactNode } from 'react';
3
3
  import { ClientState, MelonyClient } from 'melony/client';
4
- import { Message, Event, Config, UINode, UIContract } from 'melony';
4
+ import { Message, Event, Config, UIWidth, UISpacing, UIColor, UIRadius, UINode, UIContract, UIJustify, UIAlign } from 'melony';
5
5
  import { QueryClient } from '@tanstack/react-query';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
  export * from '@tabler/icons-react';
@@ -157,6 +157,13 @@ declare const useAuth: () => AuthContextValue;
157
157
 
158
158
  declare const useThreads: () => ThreadContextValue;
159
159
 
160
+ interface UseSurfaceOptions {
161
+ name: string;
162
+ }
163
+ declare const useSurface: (options: UseSurfaceOptions) => {
164
+ events: Event[];
165
+ };
166
+
160
167
  interface ScreenSize {
161
168
  width: number;
162
169
  height: number;
@@ -172,15 +179,13 @@ interface ScreenSize {
172
179
  declare function useScreenSize(mobileBreakpoint?: number, tabletBreakpoint?: number): ScreenSize;
173
180
 
174
181
  interface ThreadProps {
175
- className?: string;
176
182
  placeholder?: string;
177
183
  starterPrompts?: StarterPrompt[];
178
- onStarterPromptClick?: (prompt: string) => void;
179
184
  options?: ComposerOptionGroup[];
180
185
  autoFocus?: boolean;
181
186
  defaultSelectedIds?: string[];
182
187
  }
183
- declare function Thread({ className, placeholder, starterPrompts: localStarterPrompts, onStarterPromptClick, options: localOptions, autoFocus, defaultSelectedIds, }: ThreadProps): react_jsx_runtime.JSX.Element;
188
+ declare function Thread({ placeholder, starterPrompts: localStarterPrompts, options: localOptions, autoFocus, defaultSelectedIds, }: ThreadProps): react_jsx_runtime.JSX.Element;
184
189
 
185
190
  interface ComposerProps {
186
191
  value: string;
@@ -254,13 +259,13 @@ declare function PopupChat({ title, placeholder, starterPrompts, options, defaul
254
259
  interface SidebarProps {
255
260
  side: "left" | "right";
256
261
  children: React__default.ReactNode;
257
- className?: string;
262
+ width?: UIWidth | string;
258
263
  }
259
264
  /**
260
265
  * A sidebar component that responds to ChatSidebarContext.
261
266
  * Typically used within ChatFull or a layout with ChatSidebarProvider.
262
267
  */
263
- declare function Sidebar({ side, children, className }: SidebarProps): react_jsx_runtime.JSX.Element;
268
+ declare function Sidebar({ side, children, width }: SidebarProps): react_jsx_runtime.JSX.Element;
264
269
 
265
270
  interface FullChatProps {
266
271
  title?: string;
@@ -283,6 +288,23 @@ interface FullChatProps {
283
288
  }
284
289
  declare function FullChat({ title, placeholder, starterPrompts, options, className, headerProps, autoFocus, defaultSelectedIds, }: FullChatProps): react_jsx_runtime.JSX.Element;
285
290
 
291
+ interface SurfaceProps {
292
+ /**
293
+ * The name of the surface to filter events by.
294
+ * Only events with matching Event.surface will be included.
295
+ */
296
+ name: string;
297
+ /**
298
+ * Render function that receives the filtered and slot-deduplicated events.
299
+ */
300
+ children: (events: Event[]) => ReactNode;
301
+ }
302
+ /**
303
+ * A reusable component that listens to Melony events for a specific surface.
304
+ * It automatically handles slot-based deduplication (latest event for a slot replaces previous ones).
305
+ */
306
+ declare function Surface({ name, children }: SurfaceProps): react_jsx_runtime.JSX.Element;
307
+
286
308
  interface SidebarToggleProps {
287
309
  side: "left" | "right";
288
310
  className?: string;
@@ -290,17 +312,14 @@ interface SidebarToggleProps {
290
312
  declare function SidebarToggle({ side, className }: SidebarToggleProps): react_jsx_runtime.JSX.Element | null;
291
313
 
292
314
  interface ThreadListProps {
293
- className?: string;
294
- emptyState?: React$1.ReactNode;
315
+ padding?: UISpacing;
316
+ gap?: UISpacing;
317
+ background?: UIColor;
318
+ radius?: UIRadius;
295
319
  }
296
320
  declare const ThreadList: React$1.FC<ThreadListProps>;
297
321
 
298
322
  interface ThreadPopoverProps {
299
- className?: string;
300
- buttonClassName?: string;
301
- buttonVariant?: "default" | "outline" | "secondary" | "ghost" | "destructive" | "link";
302
- buttonSize?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg";
303
- emptyState?: React$1.ReactNode;
304
323
  }
305
324
  declare const ThreadPopover: React$1.FC<ThreadPopoverProps>;
306
325
 
@@ -332,171 +351,94 @@ interface UIRendererProps {
332
351
  */
333
352
  declare function UIRenderer({ node }: UIRendererProps): react_jsx_runtime.JSX.Element;
334
353
 
335
- interface DropdownProps {
336
- className?: string;
337
- trigger?: React$1.ReactNode;
338
- triggerClassName?: string;
339
- items: {
340
- label: string;
341
- icon: React$1.ReactNode;
342
- onClick: () => void;
343
- }[];
344
- }
345
- declare const Dropdown: React$1.FC<DropdownProps>;
346
-
347
354
  interface CreateThreadListItemProps {
348
- className?: string;
355
+ padding?: UISpacing;
356
+ background?: UIColor;
357
+ radius?: UIRadius;
349
358
  }
350
359
  declare const CreateThreadListItem: React$1.FC<CreateThreadListItemProps>;
351
360
 
352
- type Spacing = "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
353
- type FontSize = "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
354
- type FontWeight = "normal" | "medium" | "semibold" | "bold";
361
+ declare const Button: React__default.FC<UIContract["button"] & {
362
+ justify?: UIJustify;
363
+ }>;
355
364
 
356
- type Size = "sm" | "md" | "lg";
357
- type Align = "start" | "center" | "end" | "stretch";
358
- type Justify = "start" | "center" | "end" | "between" | "around";
359
- type Orientation = "horizontal" | "vertical";
360
- interface BaseComponentProps {
361
- className?: string;
362
- style?: CSSProperties;
363
- }
364
- type CardProps = BaseComponentProps & UIContract["card"] & {
365
- children?: React__default.ReactNode[];
366
- };
367
- type RowProps = BaseComponentProps & UIContract["row"] & {
368
- children?: React__default.ReactNode[];
369
- };
370
- type ColProps = BaseComponentProps & UIContract["col"] & {
371
- children?: React__default.ReactNode[] | React__default.ReactNode;
372
- overflow?: "visible" | "hidden" | "scroll" | "auto";
373
- position?: "static" | "relative" | "absolute" | "fixed" | "sticky";
374
- };
375
- type BoxProps = BaseComponentProps & UIContract["box"] & {
376
- children?: React__default.ReactNode | React__default.ReactNode[];
377
- overflow?: "visible" | "hidden" | "scroll" | "auto";
378
- };
379
- type SpacerProps = BaseComponentProps & UIContract["spacer"];
380
- type DividerProps = BaseComponentProps & UIContract["divider"] & {
381
- size?: Size;
382
- };
383
- type ListProps = BaseComponentProps & {
384
- children?: React__default.ReactNode;
385
- width?: string | number;
386
- };
387
- type ListItemProps = BaseComponentProps & UIContract["listItem"] & {
388
- children?: React__default.ReactNode;
389
- orientation?: Orientation;
390
- align?: Align;
391
- justify?: Justify;
392
- width?: string | number;
393
- padding?: Spacing;
394
- };
395
- type ImageProps = BaseComponentProps & UIContract["image"] & {
396
- fallbackText?: string;
397
- showFallbackIcon?: boolean;
398
- groupId?: string;
399
- };
400
- type ChartProps = BaseComponentProps & UIContract["chart"] & {
401
- size?: Size;
402
- showValues?: boolean;
403
- showGrid?: boolean;
404
- showTooltips?: boolean;
405
- };
406
- type BadgeProps = BaseComponentProps & UIContract["badge"];
407
- type TextProps = BaseComponentProps & UIContract["text"];
408
- type HeadingProps = BaseComponentProps & UIContract["heading"];
409
- type FormProps = BaseComponentProps & UIContract["form"] & {
410
- children?: React__default.ReactNode[];
411
- };
412
- type InputProps = BaseComponentProps & UIContract["input"] & {
413
- disabled?: boolean;
414
- value?: string;
415
- };
416
- type HiddenProps = BaseComponentProps & UIContract["hidden"];
417
- type ButtonProps = BaseComponentProps & UIContract["button"] & {
418
- fullWidth?: boolean;
419
- type?: "button" | "submit";
420
- };
421
- type LabelProps = BaseComponentProps & UIContract["label"] & {
422
- size?: FontSize;
423
- weight?: FontWeight;
424
- };
425
- type ColorPickerProps = BaseComponentProps & UIContract["colorPicker"] & {
426
- value?: string;
427
- disabled?: boolean;
428
- };
429
- type UploadProps = BaseComponentProps & UIContract["upload"] & {
430
- initialFiles?: {
431
- name: string;
432
- url: string;
433
- }[];
434
- mode?: "append" | "replace";
435
- };
436
- type TextareaProps = BaseComponentProps & UIContract["textarea"] & {
437
- value?: string;
438
- disabled?: boolean;
439
- };
440
- type SelectProps = BaseComponentProps & UIContract["select"] & {
441
- value?: string;
442
- disabled?: boolean;
443
- };
444
- type CheckboxProps = BaseComponentProps & UIContract["checkbox"] & {
445
- defaultChecked?: boolean;
446
- disabled?: boolean;
447
- };
448
- type RadioGroupProps = BaseComponentProps & UIContract["radioGroup"] & {
449
- value?: string;
450
- defaultValue?: string;
451
- disabled?: boolean;
452
- };
365
+ declare const Input: React__default.FC<UIContract["input"]>;
453
366
 
454
- declare const Button: React__default.FC<ButtonProps>;
367
+ declare const Textarea: React__default.FC<UIContract["textarea"]>;
455
368
 
456
- declare const Input: React__default.FC<InputProps>;
369
+ declare const Select: React__default.FC<UIContract["select"]>;
457
370
 
458
- declare const Textarea: React__default.FC<TextareaProps>;
371
+ declare const Checkbox: React__default.FC<UIContract["checkbox"]>;
459
372
 
460
- declare const Select: React__default.FC<SelectProps>;
373
+ declare const RadioGroup: React__default.FC<UIContract["radioGroup"]>;
461
374
 
462
- declare const Checkbox: React__default.FC<CheckboxProps>;
375
+ declare const Form: React__default.FC<UIContract["form"] & {
376
+ children?: React__default.ReactNode[];
377
+ }>;
463
378
 
464
- declare const RadioGroup: React__default.FC<RadioGroupProps>;
379
+ declare const Upload: React__default.FC<UIContract["upload"]>;
465
380
 
466
- declare const Form: React__default.FC<FormProps>;
381
+ declare const Heading: React__default.FC<UIContract["heading"]>;
467
382
 
468
- declare const Upload: React__default.FC<UploadProps>;
383
+ declare const Image: React__default.FC<UIContract["image"]>;
469
384
 
470
- declare const Heading: React__default.FC<HeadingProps>;
385
+ declare const Label: React__default.FC<UIContract["label"]>;
471
386
 
472
- declare const Image: React__default.FC<ImageProps>;
387
+ interface DropdownProps {
388
+ className?: string;
389
+ trigger?: React$1.ReactNode;
390
+ triggerClassName?: string;
391
+ items: {
392
+ label: string;
393
+ icon: React$1.ReactNode;
394
+ onClick: () => void;
395
+ }[];
396
+ }
397
+ declare const Dropdown: React$1.FC<DropdownProps>;
473
398
 
474
- declare const Label: React__default.FC<LabelProps>;
399
+ declare const List: React__default.FC<UIContract["list"] & {
400
+ children?: React__default.ReactNode;
401
+ flex?: string;
402
+ overflow?: string;
403
+ }>;
475
404
 
476
- declare const List: React__default.FC<ListProps>;
405
+ declare const ListItem: React__default.FC<UIContract["listItem"] & {
406
+ children?: React__default.ReactNode;
407
+ align?: UIAlign;
408
+ }>;
477
409
 
478
- declare const ListItem: React__default.FC<ListItemProps>;
410
+ declare const Spacer: React__default.FC<UIContract["spacer"]>;
479
411
 
480
- declare const Spacer: React__default.FC<SpacerProps>;
412
+ declare const Divider: React__default.FC<UIContract["divider"]>;
481
413
 
482
- declare const Divider: React__default.FC<DividerProps>;
414
+ declare const Box: React__default.FC<UIContract["box"] & {
415
+ children?: React__default.ReactNode | React__default.ReactNode[];
416
+ }>;
483
417
 
484
- declare const Box: React__default.FC<BoxProps>;
418
+ declare const Float: React__default.FC<UIContract["float"] & {
419
+ children?: React__default.ReactNode | React__default.ReactNode[];
420
+ }>;
485
421
 
486
- declare const Chart: React__default.FC<ChartProps>;
422
+ declare const Chart: React__default.FC<UIContract["chart"]>;
487
423
 
488
- declare const Card: React__default.FC<CardProps>;
424
+ declare const Card: React__default.FC<UIContract["card"] & {
425
+ children?: React__default.ReactNode[];
426
+ }>;
489
427
 
490
- declare const Row: React__default.FC<RowProps>;
428
+ declare const Row: React__default.FC<UIContract["row"] & {
429
+ children?: React__default.ReactNode[];
430
+ }>;
491
431
 
492
- declare const Col: React__default.FC<ColProps>;
432
+ declare const Col: React__default.FC<UIContract["col"] & {
433
+ children?: React__default.ReactNode | React__default.ReactNode[];
434
+ }>;
493
435
 
494
- declare const Text: React__default.FC<TextProps>;
436
+ declare const Text: React__default.FC<UIContract["text"]>;
495
437
 
496
- declare const Badge: React__default.FC<BadgeProps>;
438
+ declare const Badge: React__default.FC<UIContract["badge"]>;
497
439
 
498
- declare const Hidden: React__default.FC<HiddenProps>;
440
+ declare const Hidden: React__default.FC<UIContract["hidden"]>;
499
441
 
500
- declare const ColorPicker: React__default.FC<ColorPickerProps>;
442
+ declare const ColorPicker: React__default.FC<UIContract["colorPicker"]>;
501
443
 
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 };
444
+ 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, Float, 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, Surface, type SurfaceProps, 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 UseSurfaceOptions, type User, WelcomeScreen, type WelcomeScreenProps, useAuth, useMelony, useScreenSize, useSidebar, useSurface, useTheme, useThreads };