@gentiq/ui 1.0.0-alpha.10 → 1.0.0-alpha.12

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.ts CHANGED
@@ -4,6 +4,7 @@ import { ChatStatus } from '@gentiq/react';
4
4
  import { ClassProp } from 'class-variance-authority/types';
5
5
  import { ComponentProps } from 'react';
6
6
  import { ComponentType } from 'react';
7
+ import { ComposerInputProps } from '@gentiq/react';
7
8
  import { CreditsStatus } from '@gentiq/core';
8
9
  import { EntitlementWindow } from '@gentiq/core';
9
10
  import { FileUIPart } from 'ai';
@@ -25,6 +26,7 @@ import { ReasoningUIPart } from 'ai';
25
26
  import { RefAttributes } from 'react';
26
27
  import { ReferenceAdapter } from '@gentiq/core';
27
28
  import { ReferencesSourceProps } from '@gentiq/react';
29
+ import { RefObject } from 'react';
28
30
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
29
31
  import { SendMessageInput } from '@gentiq/react';
30
32
  import { SettingsFieldMode } from '@gentiq/react';
@@ -44,13 +46,75 @@ export declare interface AccountSettingsFields {
44
46
  [key: string]: SettingsFieldMode | undefined;
45
47
  }
46
48
 
49
+ /** Top-end conversation actions menu (`⋮`) for the active thread in `AppHeader`. */
50
+ export declare function ActiveThreadMenu({ className }?: ActiveThreadMenuProps): JSX.Element | null;
51
+
52
+ /** Props for {@link ActiveThreadMenu}. */
53
+ export declare interface ActiveThreadMenuProps {
54
+ /** Additional class names on the menu trigger button. */
55
+ className?: string;
56
+ }
57
+
58
+ /** Brand logo and app name used in the sidebar header and top bar. */
59
+ export declare function AppBrand({ iconOnly, className }: AppBrandProps): JSX.Element;
60
+
61
+ /** Props for {@link AppBrand}. */
62
+ export declare interface AppBrandProps {
63
+ /** Render only the brand icon without the app name. */
64
+ iconOnly?: boolean;
65
+ /** Additional class names on the brand container. */
66
+ className?: string;
67
+ }
68
+
69
+ /**
70
+ * The default top bar above the chat: sidebar toggle and new-chat button on mobile or when the
71
+ * sidebar is hidden, optional centered slot content, and actions/menus on the trailing end.
72
+ */
73
+ export declare function AppHeader({ hideActions, className, start, center, end }: AppHeaderProps): JSX.Element;
74
+
75
+ /** Props for the top bar (`components.Header`), including section overrides for `AppHeader`. */
76
+ export declare interface AppHeaderProps {
77
+ /** True on read-only shared chat views where interactive chat actions are hidden. */
78
+ hideActions?: boolean;
79
+ /** Additional class names on the `<header>` element. */
80
+ className?: string;
81
+ /** Replaces the leading section of the header (sidebar toggle, new-chat button, brand). */
82
+ start?: ReactNode;
83
+ /** Optional centered content inside the header (e.g. a model selector or thread title). */
84
+ center?: ReactNode;
85
+ /** Replaces the trailing section of the header (actions, usage meter, thread/settings menus). */
86
+ end?: ReactNode;
87
+ }
88
+
47
89
  /**
48
90
  * The default sidebar: a new-conversation button and the user's conversations, built from
49
91
  * `ThreadList.*`. Switches into the grouped settings navigation while settings are open.
50
92
  */
51
- export declare function AppSidebar({ side }: {
93
+ export declare function AppSidebar({ side, className, header, beforeThreads, afterThreads, footer, }: AppSidebarProps): JSX.Element;
94
+
95
+ /** Props for {@link AppSidebar} (`components.Sidebar`). */
96
+ export declare interface AppSidebarProps {
97
+ /** Which edge of the layout the sidebar sits on. Defaults to `'start'`. */
52
98
  side?: 'start' | 'end';
53
- }): JSX.Element;
99
+ /** Additional class names on the sidebar container. */
100
+ className?: string;
101
+ /** Replaces the sidebar header (brand, search toggle, collapse trigger, new-chat button). */
102
+ header?: ReactNode;
103
+ /** Extra content above the conversation list inside the scrollable body. */
104
+ beforeThreads?: ReactNode;
105
+ /** Extra content below the conversation list inside the scrollable body. */
106
+ afterThreads?: ReactNode;
107
+ /** Replaces the sidebar footer (user badge and settings menu). */
108
+ footer?: ReactNode;
109
+ }
110
+
111
+ /**
112
+ * The default assistant message row inside the transcript: source links, message parts, the
113
+ * `MessageActions` bar, and follow-up suggestions. Replace via `components.AssistantMessage`.
114
+ */
115
+ export declare function AssistantMessage(): JSX.Element;
116
+
117
+ export declare type BuiltinSettingsSection = 'profile' | 'general' | 'account' | 'feedback' | 'schedules' | 'connectors';
54
118
 
55
119
  declare function Button({ className, variant, size, asChild, ...props }: React_2.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
56
120
  asChild?: boolean;
@@ -63,6 +127,23 @@ declare const buttonVariants: (props?: ({
63
127
 
64
128
  export declare const Chat: ({ threadId, onThreadChange, components: localComponents, welcome, threadActions, composer, disclaimer, ...rest }: ChatProps) => JSX.Element;
65
129
 
130
+ /**
131
+ * The default background layer behind the chat: the ambient horizon glow shown on new chats when
132
+ * `app.showWelcomeGlow` is not `false`. Replace via `components.ChatBackground`, or pass `null`.
133
+ */
134
+ export declare function ChatBackground({ isNewChat }: ChatBackgroundProps): JSX.Element;
135
+
136
+ /**
137
+ * Props for the `ChatBackground` slot, rendered behind both `AppHeader` and `Chat` in `ChatLayout`
138
+ * (or behind the transcript and welcome screen in standalone `Chat`).
139
+ */
140
+ export declare interface ChatBackgroundProps {
141
+ /** Whether the chat is currently showing the empty new-chat welcome state. */
142
+ isNewChat: boolean;
143
+ /** The active thread id, or `null` for a new thread. */
144
+ threadId: string | null;
145
+ }
146
+
66
147
  /**
67
148
  * The notice under the transcript when a turn fails. Replace it with `components.ChatError`,
68
149
  * e.g. to offer an upgrade when `error.code` is `quota_exceeded`, and render this one for the
@@ -107,10 +188,6 @@ export declare interface ChatLayoutProps {
107
188
  * `disclaimer` apply here the same way.
108
189
  */
109
190
  components?: GentiqComponents;
110
- /** Provide a custom sidebar node, or `null` to hide it entirely. */
111
- sidebar?: ReactNode;
112
- /** Provide a custom header node, or `null` to hide it entirely. */
113
- header?: ReactNode;
114
191
  classNames?: ChatProps['classNames'];
115
192
  disclaimer?: ChatProps['disclaimer'];
116
193
  welcome?: ChatProps['welcome'];
@@ -363,6 +440,11 @@ export declare interface ComposerToolConfig {
363
440
  id: string;
364
441
  /** The control itself — usually an icon button; `PromptInputButton` matches the attach button. */
365
442
  component: ComponentType<ComposerToolProps>;
443
+ /**
444
+ * Which side of the text box the control sits on: `'start'` places it with the attach button;
445
+ * `'end'` (the default) places it in the toolbar beside the send button.
446
+ */
447
+ placement?: 'start' | 'end';
366
448
  /**
367
449
  * Where it sits among the composer's tools. Lower comes first; equal values keep the order
368
450
  * they were registered in. Defaults to `0`, so with no orders set the tools follow the
@@ -474,7 +556,7 @@ export declare interface GeneralSettingsFields {
474
556
  * Takes every `GentiqProvider` and `GentiqUI` option. For a chat inside a page of your own, use
475
557
  * those two with `ChatLayout` instead.
476
558
  */
477
- export declare function GentiqChatApp({ url, api, basePath, paths, admin, components, history, welcome, threadActions, composer, disclaimer, settings, ...provider }: GentiqChatAppProps): JSX.Element | null;
559
+ export declare function GentiqChatApp({ url, api, basePath, paths, admin, classNames, components, history, welcome, threadActions, composer, disclaimer, settings, ...provider }: GentiqChatAppProps): JSX.Element | null;
478
560
 
479
561
  /** Where `GentiqChatApp`'s screens live, each relative to its `basePath`. */
480
562
  export declare interface GentiqChatAppPaths {
@@ -506,6 +588,8 @@ export declare interface GentiqChatAppProps extends Omit<GentiqProviderProps, 'a
506
588
  * `React.lazy` so chat users never download it. Leave it out for no admin panel.
507
589
  */
508
590
  admin?: ReactNode;
591
+ /** Custom CSS class names forwarded to the chat container, message list, and composer wrapper. */
592
+ classNames?: ChatProps['classNames'];
509
593
  }
510
594
 
511
595
  /**
@@ -520,11 +604,46 @@ export declare interface GentiqChatAppProps extends Omit<GentiqProviderProps, 'a
520
604
  * />
521
605
  */
522
606
  export declare interface GentiqComponents {
607
+ /**
608
+ * Replaces the top bar above the chat in `ChatLayout` and `SharedChatView` (where `hideActions`
609
+ * is `true`), or `null` to hide it. Wrap or configure the exported `AppHeader` (e.g. its
610
+ * `start`, `center`, `end` props), or compose your own header from `SidebarTrigger`, `AppBrand`,
611
+ * `ActiveThreadMenu` and `SettingsMenu`.
612
+ */
613
+ Header?: ComponentType<AppHeaderProps> | null;
614
+ /**
615
+ * Replaces the conversation sidebar in `ChatLayout`, or `null` to hide it. Wrap or configure the
616
+ * exported `AppSidebar` (e.g. `side="end"`, `beforeThreads`, `afterThreads`, `header`, `footer`),
617
+ * or build your own with `Sidebar`, `ThreadList.*`, `useSidebar()` and `useSettingsView()`.
618
+ */
619
+ Sidebar?: ComponentType<AppSidebarProps> | null;
620
+ /**
621
+ * Replaces a single conversation row inside `AppSidebar`'s thread list. Renders inside
622
+ * `ThreadList.Items`, so read the row's thread and actions with `useThreadListItem()`.
623
+ */
624
+ ThreadRow?: ComponentType;
625
+ /**
626
+ * Replaces the background layer behind the chat (and behind `AppHeader` in `ChatLayout`), or
627
+ * `null` to remove the default ambient welcome glow. Receives `{ isNewChat, threadId }`.
628
+ */
629
+ ChatBackground?: ComponentType<ChatBackgroundProps> | null;
523
630
  /**
524
631
  * Replaces the entire scrollable message list. It shows the thread of the enclosing
525
632
  * `Thread.Root`: compose `Thread.Viewport`, `Thread.Messages` and the message primitives.
526
633
  */
527
634
  MessageList?: ComponentType<MessageListProps>;
635
+ /**
636
+ * Replaces each user message row inside the built-in `MessageList`. Renders inside the message's
637
+ * scope: read it with `useMessage()` and compose `Message.Root`, `Message.Parts`, `MessageEditor`
638
+ * and `MessageActions`.
639
+ */
640
+ UserMessage?: ComponentType;
641
+ /**
642
+ * Replaces each assistant message row inside the built-in `MessageList`. Renders inside the
643
+ * message's scope: read it with `useMessage()` and compose `Message.Root`, `Message.Parts`,
644
+ * `MessageActions` and `FollowUpSuggestions`.
645
+ */
646
+ AssistantMessage?: ComponentType;
528
647
  /**
529
648
  * Replaces the row of actions under each message (copy, retry, feedback, edit), leaving the
530
649
  * message itself as it is. It renders inside the message's scope: read the message with
@@ -535,6 +654,12 @@ export declare interface GentiqComponents {
535
654
  PromptInput?: ComponentType<PromptInputProps>;
536
655
  /** Replaces the welcome / empty-state screen */
537
656
  WelcomeScreen?: ComponentType<WelcomeScreenProps>;
657
+ /**
658
+ * Replaces the entire empty-state layout on a new chat instead of the centered welcome overlay.
659
+ * Owns the full scrollable viewport and receives `{ composer, disclaimer, send, status }` so
660
+ * custom components can be placed anywhere around or without the wired composer.
661
+ */
662
+ WelcomeLayout?: ComponentType<WelcomeLayoutProps>;
538
663
  /**
539
664
  * Replaces the pending-reply and thread-loading indicator with a custom loader component.
540
665
  */
@@ -640,6 +765,10 @@ export declare interface GentiqComponents {
640
765
  * `fullscreen`. `null` falls back to the banner.
641
766
  */
642
767
  MaintenanceScreen?: ComponentType<MaintenanceNoticeProps> | null;
768
+ /** Replaces the built-in Scheduled Tasks settings section. */
769
+ SchedulesPanel?: ComponentType;
770
+ /** Replaces the built-in Connectors settings section. */
771
+ ConnectorsPanel?: ComponentType;
643
772
  /**
644
773
  * Per-tool/card reference display adapters.
645
774
  * Return label/excerpt/data overrides used in composer chips, sent context,
@@ -733,6 +862,7 @@ export declare function GentiqUI({ components, children, history, welcome, threa
733
862
  */
734
863
  export declare interface GentiqUIOptions {
735
864
  history: Required<HistoryConfig>;
865
+ sidebar: Required<SidebarConfig>;
736
866
  welcome: WelcomeScreenConfig;
737
867
  threadActions: Required<ThreadItemActionsConfig>;
738
868
  /**
@@ -755,6 +885,8 @@ export declare interface GentiqUIOptions {
755
885
  export declare interface GentiqUIOptionsInput {
756
886
  /** The sidebar's thread history. */
757
887
  history?: HistoryConfig;
888
+ /** Plugin shortcuts shown in the chat sidebar. */
889
+ sidebar?: SidebarConfig;
758
890
  /** The welcome screen. */
759
891
  welcome?: WelcomeScreenConfig;
760
892
  /** The actions under each answer. */
@@ -875,6 +1007,12 @@ export declare interface MessageActionsProps {
875
1007
  edit: boolean;
876
1008
  }
877
1009
 
1010
+ /**
1011
+ * The built-in form for editing a message the user sent, in place of its text while they edit it.
1012
+ * Built from `MessageEdit.*`; renders nothing while the message isn't being edited.
1013
+ */
1014
+ export declare function MessageEditor(): JSX.Element;
1015
+
878
1016
  /**
879
1017
  * The built-in transcript: the messages of the thread the enclosing `Thread.Root` shows, with
880
1018
  * the pending indicator, progress notes and the turn's error, built from `Thread.*`, `Message.*`
@@ -928,6 +1066,28 @@ export declare interface PromptInputProps {
928
1066
  className?: string;
929
1067
  }
930
1068
 
1069
+ export declare const PromptInputSubmit: ({ className, variant, size, status, children, ...props }: PromptInputSubmitProps) => JSX.Element;
1070
+
1071
+ export declare type PromptInputSubmitProps = ComponentProps<typeof Button> & {
1072
+ status?: ChatStatus;
1073
+ };
1074
+
1075
+ /**
1076
+ * The built-in composer's text box: `Composer.Input`, growing with its text up to six lines, in
1077
+ * the text's own direction.
1078
+ */
1079
+ export declare const PromptInputTextarea: ForwardRefExoticComponent<ComposerInputProps & RefAttributes<HTMLTextAreaElement>>;
1080
+
1081
+ export declare type PromptInputTextareaProps = ComposerInputProps;
1082
+
1083
+ export declare const PromptInputToolbar: ({ className, ...props }: PromptInputToolbarProps) => JSX.Element;
1084
+
1085
+ export declare type PromptInputToolbarProps = HTMLAttributes<HTMLDivElement>;
1086
+
1087
+ export declare const PromptInputTools: ({ className, ...props }: PromptInputToolsProps) => JSX.Element;
1088
+
1089
+ export declare type PromptInputToolsProps = HTMLAttributes<HTMLDivElement>;
1090
+
931
1091
  /** One allowance: what is left of it, a bar, and when it starts over. */
932
1092
  export declare function QuotaBar({ label, detail, meter, remaining, amount, resetsAt, action, }: QuotaBarProps): JSX.Element;
933
1093
 
@@ -1003,8 +1163,76 @@ export declare interface RequireAuthProps {
1003
1163
  onLoginCodeUsed?: () => void;
1004
1164
  }
1005
1165
 
1166
+ export declare interface ResolvedSettingsSection {
1167
+ id: SettingsSection;
1168
+ label: string;
1169
+ title: string;
1170
+ subtitle?: string;
1171
+ group: string;
1172
+ icon: LucideIcon;
1173
+ faded?: boolean;
1174
+ showInMenu?: boolean;
1175
+ component?: ComponentType;
1176
+ }
1177
+
1006
1178
  export declare type ResolvedSmoothStreaming = Required<UseSmoothTextOptions>;
1007
1179
 
1180
+ declare const Response_2: {
1181
+ ({ className, children, remarkPlugins, rehypePlugins, linkProtocols, wordFade, mode, preserveNewlines, ...props }: ResponseProps): JSX.Element;
1182
+ displayName: string;
1183
+ };
1184
+ export { Response_2 as Response }
1185
+
1186
+ /**
1187
+ * Props for {@link Response}: Gentiq's sanitized markdown, math, code and diagram renderer built on
1188
+ * Streamdown.
1189
+ */
1190
+ export declare type ResponseProps = ComponentProps<typeof Streamdown> & {
1191
+ /**
1192
+ * Extra URL schemes a link may carry, without the `:` (e.g. `['carcard']`).
1193
+ *
1194
+ * The sanitizer only keeps the schemes Streamdown allows — everything else has
1195
+ * its `href` stripped, and the hardening pass then renders the link as
1196
+ * `text [blocked]`. An app that renders its own components off custom-scheme
1197
+ * links (`[Car](carcard://42)` picked up by a `textComponents.a` override)
1198
+ * must list those schemes here for the href to survive.
1199
+ *
1200
+ * `javascript:`, `data:`, `vbscript:` and `file:` stay blocked regardless —
1201
+ * the hardening pass refuses them unconditionally, after this.
1202
+ */
1203
+ linkProtocols?: string[];
1204
+ /**
1205
+ * Wrap each word in its own element so it can fade in as it arrives.
1206
+ *
1207
+ * Set only for messages that stream in this session: it costs a span per word
1208
+ * for the life of the message, which is worth paying on the handful being
1209
+ * written and not on a whole loaded history.
1210
+ */
1211
+ wordFade?: boolean;
1212
+ /**
1213
+ * `'streaming'` only for text that is arriving right now. Defaults to
1214
+ * `'static'`, unlike Streamdown itself.
1215
+ *
1216
+ * Streaming mode splits the message into blocks, memoizes each one, and runs
1217
+ * `remend` over the text to repair markup the model has not finished writing.
1218
+ * All three earn their keep only while a message is arriving: settled text
1219
+ * parses once, as a whole, and wants no repair pass guessing at markup that is
1220
+ * already complete — a guess that can be wrong, and that has no later token to
1221
+ * correct it.
1222
+ *
1223
+ * Callers must treat it as sticky: a message that streamed keeps `'streaming'`
1224
+ * for the rest of its life, because switching back re-parses every block and
1225
+ * replaces the whole message in the DOM.
1226
+ */
1227
+ mode?: 'static' | 'streaming';
1228
+ /**
1229
+ * Treat a bare newline as a line of its own, for a message rendered with
1230
+ * `white-space: pre-wrap` — a user's own text, where markdown's collapsing of
1231
+ * soft breaks is overruled by the CSS and the reader sees separate lines.
1232
+ */
1233
+ preserveNewlines?: boolean;
1234
+ };
1235
+
1008
1236
  declare function ScrollArea({ className, children, ...props }: React_2.ComponentProps<typeof ScrollAreaPrimitive.Root>): JSX.Element;
1009
1237
 
1010
1238
  /**
@@ -1021,6 +1249,10 @@ export declare interface SettingsConfig {
1021
1249
  account?: SettingsSectionConfig<AccountSettingsFields>;
1022
1250
  /** Feedback settings section (Bug reports, Feature requests, etc.) */
1023
1251
  feedback?: SettingsSectionConfig<FeedbackSettingsFields>;
1252
+ /** Scheduled tasks settings section. */
1253
+ schedules?: SettingsSectionConfig;
1254
+ /** External connectors settings section. */
1255
+ connectors?: SettingsSectionConfig;
1024
1256
  };
1025
1257
  /** Which shortcuts and quick actions appear in the floating settings popover menu. */
1026
1258
  menu?: SettingsMenuConfig;
@@ -1028,9 +1260,27 @@ export declare interface SettingsConfig {
1028
1260
  customSections?: CustomSettingsSection[];
1029
1261
  }
1030
1262
 
1031
- export declare function SettingsDialog({ trigger }: {
1263
+ export declare function SettingsDialog({ trigger, open: openProp, onOpenChange, section: sectionProp, onSectionChange, }: SettingsDialogProps): JSX.Element;
1264
+
1265
+ /** Props for {@link SettingsDialog}. */
1266
+ export declare interface SettingsDialogProps {
1267
+ /** Trigger element for uncontrolled modal mode. */
1032
1268
  trigger?: ReactNode;
1033
- }): JSX.Element;
1269
+ /** Controlled open state for modal mode. */
1270
+ open?: boolean;
1271
+ /** Called when the controlled modal opens or closes. */
1272
+ onOpenChange?: (open: boolean) => void;
1273
+ /** Active section in controlled modal mode. */
1274
+ section?: SettingsSection;
1275
+ /** Called when the user switches sections in controlled modal mode. */
1276
+ onSectionChange?: (section: SettingsSection) => void;
1277
+ }
1278
+
1279
+ /**
1280
+ * Floating settings menu anchored to the settings gear trigger. Offers user header, section
1281
+ * shortcuts, inline Theme and Language submenus, and Logout.
1282
+ */
1283
+ export declare function SettingsMenu({ className, side, align, onSelectSection, }: SettingsMenuProps): JSX.Element | null;
1034
1284
 
1035
1285
  /**
1036
1286
  * Controls which shortcuts and quick actions appear in the floating settings popover menu.
@@ -1054,6 +1304,17 @@ export declare interface SettingsMenuConfig {
1054
1304
  showLogout?: boolean;
1055
1305
  }
1056
1306
 
1307
+ /** Props for {@link SettingsMenu}. */
1308
+ export declare interface SettingsMenuProps {
1309
+ className?: string;
1310
+ side?: 'top' | 'bottom' | 'left' | 'right';
1311
+ align?: 'start' | 'center' | 'end';
1312
+ /** Called when a section is chosen outside `ChatLayout` (defaults to opening a modal `SettingsDialog`). */
1313
+ onSelectSection?: (section: SettingsSection) => void;
1314
+ }
1315
+
1316
+ export declare type SettingsSection = BuiltinSettingsSection | (string & {});
1317
+
1057
1318
  /**
1058
1319
  * Configuration for a single settings section (tab).
1059
1320
  */
@@ -1068,6 +1329,13 @@ export declare interface SettingsSectionConfig<T = Record<string, SettingsFieldM
1068
1329
  fields?: T;
1069
1330
  }
1070
1331
 
1332
+ export declare interface SettingsViewState {
1333
+ activeSection: SettingsSection | null;
1334
+ openSection: (section: SettingsSection) => void;
1335
+ close: () => void;
1336
+ triggerRef: RefObject<HTMLButtonElement | null>;
1337
+ }
1338
+
1071
1339
  /** A read-only view of a shared thread, for anyone with the link. */
1072
1340
  export declare function SharedChatView(props: SharedChatViewProps): JSX.Element;
1073
1341
 
@@ -1076,11 +1344,71 @@ export declare interface SharedChatViewProps {
1076
1344
  shareId: string;
1077
1345
  }
1078
1346
 
1079
- export declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React_2.ComponentProps<'div'> & {
1347
+ export declare function Sidebar({ side, variant, collapsible, className, children, ...props }: SidebarProps): JSX.Element;
1348
+
1349
+ /**
1350
+ * Configuration for plugin shortcuts shown in the chat sidebar.
1351
+ */
1352
+ export declare interface SidebarConfig {
1353
+ /** Whether to show the Scheduled Tasks shortcut in the sidebar when the plugin is active. */
1354
+ showSchedules?: boolean;
1355
+ /** Whether to show the Connectors shortcut in the sidebar when the plugin is active. */
1356
+ showConnectors?: boolean;
1357
+ }
1358
+
1359
+ export declare function SidebarContent({ className, ...props }: SidebarContentProps): JSX.Element;
1360
+
1361
+ export declare type SidebarContentProps = React_2.ComponentProps<'div'>;
1362
+
1363
+ export declare interface SidebarContextValue {
1364
+ state: 'expanded' | 'collapsed';
1365
+ open: boolean;
1366
+ setOpen: (open: boolean) => void;
1367
+ openMobile: boolean;
1368
+ setOpenMobile: (open: boolean) => void;
1369
+ isMobile: boolean;
1370
+ toggleSidebar: () => void;
1371
+ }
1372
+
1373
+ export declare function SidebarFooter({ className, ...props }: SidebarFooterProps): JSX.Element;
1374
+
1375
+ export declare type SidebarFooterProps = React_2.ComponentProps<'div'>;
1376
+
1377
+ export declare function SidebarHeader({ className, ...props }: SidebarHeaderProps): JSX.Element;
1378
+
1379
+ export declare type SidebarHeaderProps = React_2.ComponentProps<'div'>;
1380
+
1381
+ export declare function SidebarMenu({ className, ...props }: SidebarMenuProps): JSX.Element;
1382
+
1383
+ export declare function SidebarMenuButton({ asChild, className, ...props }: SidebarMenuButtonProps): JSX.Element;
1384
+
1385
+ export declare type SidebarMenuButtonProps = React_2.ComponentProps<'button'> & {
1386
+ asChild?: boolean;
1387
+ };
1388
+
1389
+ export declare function SidebarMenuItem({ className, ...props }: SidebarMenuItemProps): JSX.Element;
1390
+
1391
+ export declare type SidebarMenuItemProps = React_2.ComponentProps<'li'>;
1392
+
1393
+ export declare type SidebarMenuProps = React_2.ComponentProps<'ul'>;
1394
+
1395
+ export declare type SidebarProps = React_2.ComponentProps<'div'> & {
1396
+ side?: 'start' | 'end';
1397
+ variant?: 'sidebar' | 'floating' | 'inset';
1398
+ collapsible?: 'offcanvas' | 'icon' | 'none';
1399
+ };
1400
+
1401
+ export declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: SidebarProviderProps): JSX.Element;
1402
+
1403
+ export declare type SidebarProviderProps = React_2.ComponentProps<'div'> & {
1080
1404
  defaultOpen?: boolean;
1081
1405
  open?: boolean;
1082
1406
  onOpenChange?: (open: boolean) => void;
1083
- }): JSX.Element;
1407
+ };
1408
+
1409
+ export declare function SidebarTrigger({ className, onClick, ...props }: SidebarTriggerProps): JSX.Element;
1410
+
1411
+ export declare type SidebarTriggerProps = React_2.ComponentProps<typeof Button>;
1084
1412
 
1085
1413
  declare type StreamdownProps = ComponentProps<typeof Streamdown>;
1086
1414
 
@@ -1119,6 +1447,12 @@ export declare interface ThreadItemActionsConfig {
1119
1447
  edit?: boolean;
1120
1448
  }
1121
1449
 
1450
+ /** One conversation in the sidebar: its link, title and time, its pin, and its menu. */
1451
+ export declare function ThreadRow(): JSX.Element;
1452
+
1453
+ /** The row's menu: pin, share, stop sharing, rename and delete, as the options allow. */
1454
+ export declare function ThreadRowMenu(): JSX.Element;
1455
+
1122
1456
  /**
1123
1457
  * The built-in renderer of a tool call that has no component of its own (`tool` in
1124
1458
  * `components.parts`): a card with the call's name, input and output, shown only while
@@ -1178,6 +1512,16 @@ export declare function useChoiceQuestion(): ChoiceQuestionContextValue;
1178
1512
  */
1179
1513
  export declare function useGentiqUIOptions<T>(select: (options: GentiqUIOptions) => T): T;
1180
1514
 
1515
+ export declare function useOptionalSidebar(): SidebarContextValue | null;
1516
+
1517
+ export declare function useResolvedSettingsSections(): {
1518
+ sections: ResolvedSettingsSection[];
1519
+ groups: {
1520
+ title: string;
1521
+ items: ResolvedSettingsSection[];
1522
+ }[];
1523
+ };
1524
+
1181
1525
  /** The built-in sign-in and sign-up page. */
1182
1526
  export declare function UserLoginPage(props: UserLoginPageProps): JSX.Element;
1183
1527
 
@@ -1188,6 +1532,16 @@ export declare interface UserLoginPageProps {
1188
1532
  reason?: UnauthenticatedReason;
1189
1533
  }
1190
1534
 
1535
+ /**
1536
+ * The default user message row inside the transcript: its parts (with an inline edit form while
1537
+ * editing) and the `MessageActions` bar. Replace via `components.UserMessage`.
1538
+ */
1539
+ export declare function UserMessage(): JSX.Element;
1540
+
1541
+ export declare function useSettingsView(): SettingsViewState | null;
1542
+
1543
+ export declare function useSidebar(): SidebarContextValue;
1544
+
1191
1545
  /**
1192
1546
  * Reads `app.smoothStreaming` off the components context and fills in the
1193
1547
  * defaults, so the parts don't each have to interpret the shorthand forms.
@@ -1225,6 +1579,35 @@ export declare interface UseSmoothTextOptions {
1225
1579
  enabled?: boolean;
1226
1580
  }
1227
1581
 
1582
+ /**
1583
+ * Resolves the welcome-screen configuration (greeting, subtitle, icon and the
1584
+ * rotating typewriter messages) into ready-to-render values. Shared by the
1585
+ * new-chat header and the composer's animated placeholder so the resolution
1586
+ * logic lives in one place.
1587
+ */
1588
+ export declare function useWelcomeContent({ enabled, }?: UseWelcomeContentOptions): WelcomeContent;
1589
+
1590
+ export declare interface UseWelcomeContentOptions {
1591
+ /**
1592
+ * Set to false to skip resolving dynamic (user-conditioned) content, e.g. when
1593
+ * the consumer only needs typing messages on the new-chat screen.
1594
+ */
1595
+ enabled?: boolean;
1596
+ }
1597
+
1598
+ export declare interface WelcomeContent {
1599
+ /** Resolved welcome title/greeting. */
1600
+ title: string | null;
1601
+ /** Resolved static subtitle, if configured. */
1602
+ subtitle: string | null;
1603
+ /** Translated rotating typewriter messages (empty when none configured). */
1604
+ typingMessages: string[];
1605
+ /** Whether the current language renders right-to-left. */
1606
+ isRtl: boolean;
1607
+ /** Optional welcome icon. */
1608
+ icon: LucideIcon | ReactNode | undefined;
1609
+ }
1610
+
1228
1611
  /**
1229
1612
  * User data available when building a personalized welcome greeting.
1230
1613
  */
@@ -1236,6 +1619,24 @@ export declare interface WelcomeGreetingContext {
1236
1619
  t: TFunction;
1237
1620
  }
1238
1621
 
1622
+ /**
1623
+ * Props for the `WelcomeLayout` slot, which owns the entire chat viewport on a new chat instead of
1624
+ * the centered welcome overlay.
1625
+ */
1626
+ export declare interface WelcomeLayoutProps {
1627
+ /**
1628
+ * The wired composer (`PromptInputArea` or your custom `PromptInput`), ready to place anywhere in
1629
+ * your layout. Omit it if your welcome page sends via `send()` or your own `Composer.*`.
1630
+ */
1631
+ composer: ReactNode;
1632
+ /** The resolved disclaimer element, or `null` when none is configured. */
1633
+ disclaimer: ReactNode;
1634
+ /** Sends `text` as the thread's first message and transitions to the transcript. */
1635
+ send: (text: string) => void;
1636
+ /** Current chat status. */
1637
+ status: ChatStatus;
1638
+ }
1639
+
1239
1640
  /**
1240
1641
  * The new-chat header: an optional brand icon, the (optionally personalized)
1241
1642
  * title and an optional static subtitle. Rendered directly above the centered