@nicorp/nui 0.3.1 → 0.5.0
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.js +10 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +435 -0
- package/dist/index.es.js +6772 -5254
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -220,6 +220,13 @@ export declare const ChartTooltip: typeof Tooltip_2;
|
|
|
220
220
|
|
|
221
221
|
export declare const ChatBubble: React_2.ForwardRefExoticComponent<ChatBubbleProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
222
222
|
|
|
223
|
+
export declare const ChatBubbleActions: React_2.ForwardRefExoticComponent<ChatBubbleActionsProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
224
|
+
|
|
225
|
+
export declare interface ChatBubbleActionsProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
226
|
+
/** Show always or on hover @default "hover" */
|
|
227
|
+
visibility?: "always" | "hover";
|
|
228
|
+
}
|
|
229
|
+
|
|
223
230
|
export declare const ChatBubbleAvatar: React_2.ForwardRefExoticComponent<ChatBubbleAvatarProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
224
231
|
|
|
225
232
|
export declare interface ChatBubbleAvatarProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
@@ -232,6 +239,8 @@ export declare const ChatBubbleMessage: React_2.ForwardRefExoticComponent<ChatBu
|
|
|
232
239
|
export declare interface ChatBubbleMessageProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
233
240
|
variant?: "sent" | "received";
|
|
234
241
|
isLoading?: boolean;
|
|
242
|
+
/** Delivery status indicator */
|
|
243
|
+
status?: "sending" | "sent" | "delivered" | "read" | "error";
|
|
235
244
|
}
|
|
236
245
|
|
|
237
246
|
export declare interface ChatBubbleProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
@@ -248,6 +257,44 @@ export declare const ChatContainer: React_2.ForwardRefExoticComponent<ChatContai
|
|
|
248
257
|
export declare interface ChatContainerProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
249
258
|
}
|
|
250
259
|
|
|
260
|
+
export declare const ChatFollowUp: React_2.ForwardRefExoticComponent<ChatFollowUpProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
261
|
+
|
|
262
|
+
export declare interface ChatFollowUpProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
|
|
263
|
+
/** The question AI is asking */
|
|
264
|
+
question: string;
|
|
265
|
+
/** Answer options to display as buttons */
|
|
266
|
+
options: FollowUpOption[];
|
|
267
|
+
/** Called when user picks an option */
|
|
268
|
+
onSelect?: (optionId: string, label: string) => void;
|
|
269
|
+
/** Currently selected option id (disables further selection) */
|
|
270
|
+
selected?: string;
|
|
271
|
+
/** Allow user to type a custom answer @default false */
|
|
272
|
+
allowFreeText?: boolean;
|
|
273
|
+
/** Called when user submits free-text answer */
|
|
274
|
+
onFreeTextSubmit?: (text: string) => void;
|
|
275
|
+
/** Grid columns for options @default 1 */
|
|
276
|
+
columns?: 1 | 2;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export declare const ChatHeader: React_2.ForwardRefExoticComponent<ChatHeaderProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
280
|
+
|
|
281
|
+
export declare interface ChatHeaderProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
282
|
+
/** Chat title */
|
|
283
|
+
title?: string;
|
|
284
|
+
/** Model name to display */
|
|
285
|
+
model?: string;
|
|
286
|
+
/** Model icon (emoji or URL) */
|
|
287
|
+
modelIcon?: string;
|
|
288
|
+
/** Connection/typing status */
|
|
289
|
+
status?: "online" | "offline" | "typing";
|
|
290
|
+
/** Clear conversation handler */
|
|
291
|
+
onClear?: () => void;
|
|
292
|
+
/** Settings handler */
|
|
293
|
+
onSettings?: () => void;
|
|
294
|
+
/** Back button handler (mobile) */
|
|
295
|
+
onBack?: () => void;
|
|
296
|
+
}
|
|
297
|
+
|
|
251
298
|
export declare const ChatInput: React_2.ForwardRefExoticComponent<ChatInputProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
252
299
|
|
|
253
300
|
export declare interface ChatInputProps {
|
|
@@ -256,6 +303,22 @@ export declare interface ChatInputProps {
|
|
|
256
303
|
disabled?: boolean;
|
|
257
304
|
isLoading?: boolean;
|
|
258
305
|
showAttach?: boolean;
|
|
306
|
+
/** Handler for file attachment — triggers hidden file input */
|
|
307
|
+
onAttach?: (files: FileList) => void;
|
|
308
|
+
/** Accept attribute for file input @default "*" */
|
|
309
|
+
acceptFiles?: string;
|
|
310
|
+
/** Stop/cancel handler — shows stop button instead of spinner when loading */
|
|
311
|
+
onStop?: () => void;
|
|
312
|
+
/** Controlled mode value */
|
|
313
|
+
value?: string;
|
|
314
|
+
/** Controlled mode change handler */
|
|
315
|
+
onChange?: (value: string) => void;
|
|
316
|
+
/** Content rendered above the textarea (e.g. ModelSelector, ChatModeSelector) */
|
|
317
|
+
headerSlot?: React_2.ReactNode;
|
|
318
|
+
/** Content rendered below the textarea (e.g. FilePreview, char counter) */
|
|
319
|
+
footerSlot?: React_2.ReactNode;
|
|
320
|
+
/** Max character length — shows counter when set */
|
|
321
|
+
maxLength?: number;
|
|
259
322
|
className?: string;
|
|
260
323
|
}
|
|
261
324
|
|
|
@@ -266,8 +329,133 @@ export declare interface ChatListProps extends React_2.HTMLAttributes<HTMLDivEle
|
|
|
266
329
|
autoScroll?: boolean;
|
|
267
330
|
}
|
|
268
331
|
|
|
332
|
+
export declare const ChatMessage: React_2.ForwardRefExoticComponent<ChatMessageProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
333
|
+
|
|
334
|
+
export declare interface ChatMessageAction {
|
|
335
|
+
type: "copy" | "retry" | "edit" | "like" | "dislike" | "share";
|
|
336
|
+
handler?: () => void;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export declare interface ChatMessageCitation {
|
|
340
|
+
index: number;
|
|
341
|
+
title: string;
|
|
342
|
+
url: string;
|
|
343
|
+
snippet?: string;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export declare interface ChatMessageFollowUp {
|
|
347
|
+
question: string;
|
|
348
|
+
options: {
|
|
349
|
+
id: string;
|
|
350
|
+
label: string;
|
|
351
|
+
description?: string;
|
|
352
|
+
}[];
|
|
353
|
+
selected?: string;
|
|
354
|
+
allowFreeText?: boolean;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export declare interface ChatMessageProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'content'> {
|
|
358
|
+
/** Message direction */
|
|
359
|
+
variant?: "sent" | "received";
|
|
360
|
+
/** Avatar image URL */
|
|
361
|
+
avatar?: string;
|
|
362
|
+
/** Avatar fallback text */
|
|
363
|
+
avatarFallback?: string;
|
|
364
|
+
/** Message content */
|
|
365
|
+
content?: React_2.ReactNode;
|
|
366
|
+
/** Timestamp text (e.g. "2:30 PM") */
|
|
367
|
+
timestamp?: string;
|
|
368
|
+
/** Loading state (bouncing dots) */
|
|
369
|
+
isLoading?: boolean;
|
|
370
|
+
/** Message delivery status */
|
|
371
|
+
status?: "sending" | "sent" | "delivered" | "read" | "error";
|
|
372
|
+
/** Action buttons to show */
|
|
373
|
+
actions?: ("copy" | "retry" | "edit" | "like" | "dislike" | "share")[];
|
|
374
|
+
/** Raw text content for copy action */
|
|
375
|
+
textContent?: string;
|
|
376
|
+
/** Like/dislike state */
|
|
377
|
+
likeState?: "liked" | "disliked" | null;
|
|
378
|
+
/** Action handlers */
|
|
379
|
+
onCopy?: () => void;
|
|
380
|
+
onRetry?: () => void;
|
|
381
|
+
onEdit?: () => void;
|
|
382
|
+
onLike?: () => void;
|
|
383
|
+
onDislike?: () => void;
|
|
384
|
+
onShare?: () => void;
|
|
385
|
+
/** Follow-up question */
|
|
386
|
+
followUp?: ChatMessageFollowUp;
|
|
387
|
+
onFollowUpSelect?: (optionId: string, label: string) => void;
|
|
388
|
+
onFollowUpFreeText?: (text: string) => void;
|
|
389
|
+
/** Reasoning/thinking block */
|
|
390
|
+
reasoning?: ChatMessageReasoning;
|
|
391
|
+
/** Tool calls */
|
|
392
|
+
toolCalls?: ChatMessageToolCall[];
|
|
393
|
+
/** Source citations */
|
|
394
|
+
citations?: ChatMessageCitation[];
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
export declare interface ChatMessageReasoning {
|
|
398
|
+
content: string;
|
|
399
|
+
isThinking?: boolean;
|
|
400
|
+
duration?: number;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
export declare interface ChatMessageToolCall {
|
|
404
|
+
name: string;
|
|
405
|
+
args?: Record<string, unknown>;
|
|
406
|
+
result?: string;
|
|
407
|
+
status: "running" | "success" | "error";
|
|
408
|
+
error?: string;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
export declare const ChatModeSelector: React_2.ForwardRefExoticComponent<ChatModeSelectorProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
412
|
+
|
|
413
|
+
export declare interface ChatModeSelectorProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
414
|
+
modes: ModeOption[];
|
|
415
|
+
value?: string;
|
|
416
|
+
onChange?: (modeId: string) => void;
|
|
417
|
+
/** Visual size @default "default" */
|
|
418
|
+
size?: "sm" | "default";
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export declare const ChatToolCall: React_2.ForwardRefExoticComponent<ChatToolCallProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
422
|
+
|
|
423
|
+
export declare interface ChatToolCallProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
424
|
+
/** Tool/function name */
|
|
425
|
+
name: string;
|
|
426
|
+
/** Arguments passed to the tool */
|
|
427
|
+
args?: Record<string, unknown>;
|
|
428
|
+
/** Result from the tool */
|
|
429
|
+
result?: string;
|
|
430
|
+
/** Call status */
|
|
431
|
+
status: "running" | "success" | "error";
|
|
432
|
+
/** Error message (when status=error) */
|
|
433
|
+
error?: string;
|
|
434
|
+
/** Start in open state @default false */
|
|
435
|
+
defaultOpen?: boolean;
|
|
436
|
+
}
|
|
437
|
+
|
|
269
438
|
export declare const Checkbox: React_2.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
270
439
|
|
|
440
|
+
export declare interface Citation {
|
|
441
|
+
/** Citation index (displayed as [1], [2], etc.) */
|
|
442
|
+
index: number;
|
|
443
|
+
/** Source title */
|
|
444
|
+
title: string;
|
|
445
|
+
/** Source URL */
|
|
446
|
+
url: string;
|
|
447
|
+
/** Optional text snippet from source */
|
|
448
|
+
snippet?: string;
|
|
449
|
+
/** Favicon or icon URL */
|
|
450
|
+
favicon?: string;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export declare const CitationBadge: React_2.ForwardRefExoticComponent<CitationBadgeProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
454
|
+
|
|
455
|
+
export declare interface CitationBadgeProps extends React_2.HTMLAttributes<HTMLButtonElement> {
|
|
456
|
+
citation: Citation;
|
|
457
|
+
}
|
|
458
|
+
|
|
271
459
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
272
460
|
|
|
273
461
|
export declare function Code({ className, ...props }: CodeProps): JSX_2.Element;
|
|
@@ -453,6 +641,28 @@ export declare const ContextMenuSubTrigger: React_2.ForwardRefExoticComponent<Om
|
|
|
453
641
|
|
|
454
642
|
export declare const ContextMenuTrigger: React_2.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuTriggerProps & React_2.RefAttributes<HTMLSpanElement>>;
|
|
455
643
|
|
|
644
|
+
export declare interface Conversation {
|
|
645
|
+
id: string;
|
|
646
|
+
title: string;
|
|
647
|
+
lastMessage?: string;
|
|
648
|
+
updatedAt: Date;
|
|
649
|
+
model?: string;
|
|
650
|
+
icon?: string;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
export declare const ConversationList: React_2.ForwardRefExoticComponent<ConversationListProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
654
|
+
|
|
655
|
+
export declare interface ConversationListProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, "onSelect"> {
|
|
656
|
+
conversations: Conversation[];
|
|
657
|
+
activeId?: string;
|
|
658
|
+
onSelect?: (id: string) => void;
|
|
659
|
+
onNew?: () => void;
|
|
660
|
+
onDelete?: (id: string) => void;
|
|
661
|
+
onRename?: (id: string, title: string) => void;
|
|
662
|
+
/** Show search input @default true */
|
|
663
|
+
showSearch?: boolean;
|
|
664
|
+
}
|
|
665
|
+
|
|
456
666
|
export declare const CopyInput: React_2.ForwardRefExoticComponent<CopyInputProps & React_2.RefAttributes<HTMLInputElement>>;
|
|
457
667
|
|
|
458
668
|
declare interface CopyInputProps extends React_2.InputHTMLAttributes<HTMLInputElement> {
|
|
@@ -561,6 +771,31 @@ export declare interface EmptyStateProps {
|
|
|
561
771
|
className?: string;
|
|
562
772
|
}
|
|
563
773
|
|
|
774
|
+
export declare const en: NUILocale;
|
|
775
|
+
|
|
776
|
+
export declare interface FileItem {
|
|
777
|
+
id?: string;
|
|
778
|
+
name: string;
|
|
779
|
+
/** Size in bytes */
|
|
780
|
+
size: number;
|
|
781
|
+
/** MIME type */
|
|
782
|
+
type: string;
|
|
783
|
+
/** URL for preview (images) or download */
|
|
784
|
+
url?: string;
|
|
785
|
+
/** Thumbnail URL (optional, for images) */
|
|
786
|
+
thumbnail?: string;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
export declare const FilePreview: React_2.ForwardRefExoticComponent<FilePreviewProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
790
|
+
|
|
791
|
+
export declare interface FilePreviewProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
792
|
+
files: FileItem[];
|
|
793
|
+
/** Remove handler — shows X button when provided */
|
|
794
|
+
onRemove?: (index: number) => void;
|
|
795
|
+
/** Display variant @default "compact" */
|
|
796
|
+
variant?: "compact" | "grid";
|
|
797
|
+
}
|
|
798
|
+
|
|
564
799
|
export declare function FileUpload({ accept, maxSize, multiple, onUpload, disabled, className, }: FileUploadProps): JSX_2.Element;
|
|
565
800
|
|
|
566
801
|
export declare interface FileUploadProps {
|
|
@@ -582,6 +817,12 @@ export declare interface FlexProps extends React_2.HTMLAttributes<HTMLDivElement
|
|
|
582
817
|
gap?: number | string;
|
|
583
818
|
}
|
|
584
819
|
|
|
820
|
+
export declare interface FollowUpOption {
|
|
821
|
+
id: string;
|
|
822
|
+
label: string;
|
|
823
|
+
description?: string;
|
|
824
|
+
}
|
|
825
|
+
|
|
585
826
|
export declare const Grid: React_2.ForwardRefExoticComponent<GridProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
586
827
|
|
|
587
828
|
export declare interface GridProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
@@ -648,6 +889,27 @@ export declare interface MarkdownRendererProps extends React_2.HTMLAttributes<HT
|
|
|
648
889
|
streaming?: boolean;
|
|
649
890
|
}
|
|
650
891
|
|
|
892
|
+
export declare const MessageActions: React_2.ForwardRefExoticComponent<MessageActionsProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
893
|
+
|
|
894
|
+
export declare interface MessageActionsProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
895
|
+
/** Which actions to show @default ["copy"] */
|
|
896
|
+
actions?: MessageActionType[];
|
|
897
|
+
/** Text content to copy (for copy action) */
|
|
898
|
+
content?: string;
|
|
899
|
+
/** Current like state */
|
|
900
|
+
likeState?: "liked" | "disliked" | null;
|
|
901
|
+
onCopy?: () => void;
|
|
902
|
+
onRetry?: () => void;
|
|
903
|
+
onEdit?: () => void;
|
|
904
|
+
onLike?: () => void;
|
|
905
|
+
onDislike?: () => void;
|
|
906
|
+
onShare?: () => void;
|
|
907
|
+
/** Show always or only on hover @default "hover" */
|
|
908
|
+
visibility?: "always" | "hover";
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
export declare type MessageActionType = "copy" | "retry" | "edit" | "like" | "dislike" | "share";
|
|
912
|
+
|
|
651
913
|
export declare function MetricCard({ title, value, description, trend, trendLabel, icon, className, ...props }: MetricCardProps): JSX_2.Element;
|
|
652
914
|
|
|
653
915
|
declare interface MetricCardProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
@@ -659,6 +921,46 @@ declare interface MetricCardProps extends React_2.HTMLAttributes<HTMLDivElement>
|
|
|
659
921
|
icon?: React_2.ReactNode;
|
|
660
922
|
}
|
|
661
923
|
|
|
924
|
+
export declare interface ModelOption {
|
|
925
|
+
/** Unique model identifier, e.g. "gpt-4o" */
|
|
926
|
+
id: string;
|
|
927
|
+
/** Display name, e.g. "GPT-4o" */
|
|
928
|
+
name: string;
|
|
929
|
+
/** Provider name, e.g. "OpenAI" */
|
|
930
|
+
provider?: string;
|
|
931
|
+
/** Description shown below name */
|
|
932
|
+
description?: string;
|
|
933
|
+
/** Small icon URL or emoji */
|
|
934
|
+
icon?: string;
|
|
935
|
+
/** Capability badges, e.g. ["Fast", "Vision", "128K"] */
|
|
936
|
+
badges?: string[];
|
|
937
|
+
/** Whether the model is disabled / unavailable */
|
|
938
|
+
disabled?: boolean;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
export declare const ModelSelector: React_2.ForwardRefExoticComponent<ModelSelectorProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
942
|
+
|
|
943
|
+
export declare interface ModelSelectorProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
944
|
+
/** Available models */
|
|
945
|
+
models: ModelOption[];
|
|
946
|
+
/** Currently selected model id */
|
|
947
|
+
value?: string;
|
|
948
|
+
/** Called when user selects a model */
|
|
949
|
+
onChange?: (modelId: string) => void;
|
|
950
|
+
/** Placeholder when nothing selected @default "Select model" */
|
|
951
|
+
placeholder?: string;
|
|
952
|
+
/** Compact mode — only icon + name in trigger @default false */
|
|
953
|
+
compact?: boolean;
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
export declare interface ModeOption {
|
|
957
|
+
id: string;
|
|
958
|
+
label: string;
|
|
959
|
+
/** Emoji or short icon text */
|
|
960
|
+
icon?: string;
|
|
961
|
+
description?: string;
|
|
962
|
+
}
|
|
963
|
+
|
|
662
964
|
export declare function ModeToggle({ className }: {
|
|
663
965
|
className?: string;
|
|
664
966
|
}): JSX_2.Element;
|
|
@@ -709,6 +1011,82 @@ export declare const navigationMenuTriggerStyle: (props?: ClassProp | undefined)
|
|
|
709
1011
|
|
|
710
1012
|
export declare const NavigationMenuViewport: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuViewportProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
711
1013
|
|
|
1014
|
+
export declare interface NUILocale {
|
|
1015
|
+
chatInput_placeholder: string;
|
|
1016
|
+
chatInput_attachFile: string;
|
|
1017
|
+
chatInput_stopGenerating: string;
|
|
1018
|
+
chatInput_sendMessage: string;
|
|
1019
|
+
conversationList_newChat: string;
|
|
1020
|
+
conversationList_searchPlaceholder: string;
|
|
1021
|
+
conversationList_noResults: string;
|
|
1022
|
+
conversationList_empty: string;
|
|
1023
|
+
conversationList_today: string;
|
|
1024
|
+
conversationList_yesterday: string;
|
|
1025
|
+
conversationList_previous7Days: string;
|
|
1026
|
+
conversationList_older: string;
|
|
1027
|
+
conversationList_rename: string;
|
|
1028
|
+
conversationList_delete: string;
|
|
1029
|
+
chatHeader_online: string;
|
|
1030
|
+
chatHeader_offline: string;
|
|
1031
|
+
chatHeader_typing: string;
|
|
1032
|
+
chatHeader_back: string;
|
|
1033
|
+
chatHeader_clearConversation: string;
|
|
1034
|
+
chatHeader_settings: string;
|
|
1035
|
+
reasoning_title: string;
|
|
1036
|
+
reasoning_thinking: string;
|
|
1037
|
+
/** Use {duration} placeholder, e.g. "Thought for {duration}" */
|
|
1038
|
+
reasoning_thoughtFor: string;
|
|
1039
|
+
/** Use {name} placeholder, e.g. "Calling {name}..." */
|
|
1040
|
+
toolCall_calling: string;
|
|
1041
|
+
/** Use {name} placeholder, e.g. "{name} — failed" */
|
|
1042
|
+
toolCall_failed: string;
|
|
1043
|
+
toolCall_arguments: string;
|
|
1044
|
+
toolCall_result: string;
|
|
1045
|
+
toolCall_error: string;
|
|
1046
|
+
messageActions_copy: string;
|
|
1047
|
+
messageActions_retry: string;
|
|
1048
|
+
messageActions_edit: string;
|
|
1049
|
+
messageActions_like: string;
|
|
1050
|
+
messageActions_dislike: string;
|
|
1051
|
+
messageActions_share: string;
|
|
1052
|
+
messageActions_copied: string;
|
|
1053
|
+
followUp_freeTextPlaceholder: string;
|
|
1054
|
+
followUp_send: string;
|
|
1055
|
+
sourceCitation_sources: string;
|
|
1056
|
+
aiLoading_thinking: string;
|
|
1057
|
+
/** Use {name} placeholder, e.g. "Remove {name}" */
|
|
1058
|
+
filePreview_remove: string;
|
|
1059
|
+
modelSelector_placeholder: string;
|
|
1060
|
+
modelSelector_searchPlaceholder: string;
|
|
1061
|
+
modelSelector_noResults: string;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
/**
|
|
1065
|
+
* Provides a locale dictionary to every NUI AI component in the tree.
|
|
1066
|
+
*
|
|
1067
|
+
* @example
|
|
1068
|
+
* ```tsx
|
|
1069
|
+
* <NUIProvider locale="ru">
|
|
1070
|
+
* <App />
|
|
1071
|
+
* </NUIProvider>
|
|
1072
|
+
* ```
|
|
1073
|
+
*
|
|
1074
|
+
* @example Custom locale
|
|
1075
|
+
* ```tsx
|
|
1076
|
+
* <NUIProvider locale={{ chatInput_placeholder: "Ask anything…" }}>
|
|
1077
|
+
* <App />
|
|
1078
|
+
* </NUIProvider>
|
|
1079
|
+
* ```
|
|
1080
|
+
*/
|
|
1081
|
+
export declare function NUIProvider({ locale, children }: NUIProviderProps): JSX_2.Element;
|
|
1082
|
+
|
|
1083
|
+
export declare interface NUIProviderProps {
|
|
1084
|
+
/** Built-in locale key ("en" | "ru") or a custom (partial) locale dictionary.
|
|
1085
|
+
* Missing keys fall back to English. */
|
|
1086
|
+
locale?: "en" | "ru" | (string & {}) | Partial<NUILocale>;
|
|
1087
|
+
children: React_2.ReactNode;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
712
1090
|
export declare function NumberInput({ value, onChange, min, max, step, disabled, className, }: NumberInputProps): JSX_2.Element;
|
|
713
1091
|
|
|
714
1092
|
export declare interface NumberInputProps {
|
|
@@ -792,6 +1170,23 @@ export declare const RadioGroup: React_2.ForwardRefExoticComponent<Omit<RadioGro
|
|
|
792
1170
|
|
|
793
1171
|
export declare const RadioGroupItem: React_2.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
794
1172
|
|
|
1173
|
+
export declare const ReasoningBlock: React_2.ForwardRefExoticComponent<ReasoningBlockProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1174
|
+
|
|
1175
|
+
export declare interface ReasoningBlockProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1176
|
+
/** Reasoning/thinking content (plain text or markdown) */
|
|
1177
|
+
content: string;
|
|
1178
|
+
/** Whether the AI is still thinking @default false */
|
|
1179
|
+
isThinking?: boolean;
|
|
1180
|
+
/** Duration in seconds (shown in header) */
|
|
1181
|
+
duration?: number;
|
|
1182
|
+
/** Start in open state @default false */
|
|
1183
|
+
defaultOpen?: boolean;
|
|
1184
|
+
/** Custom title @default "Reasoning" */
|
|
1185
|
+
title?: string;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
export declare const ru: NUILocale;
|
|
1189
|
+
|
|
795
1190
|
export declare const ScrollArea: React_2.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
796
1191
|
orientation?: ScrollAreaOrientation;
|
|
797
1192
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -877,6 +1272,14 @@ export declare function Skeleton({ className, ...props }: React.HTMLAttributes<H
|
|
|
877
1272
|
|
|
878
1273
|
export declare const Slider: React_2.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React_2.RefAttributes<HTMLSpanElement>, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
|
|
879
1274
|
|
|
1275
|
+
export declare const SourceCitation: React_2.ForwardRefExoticComponent<SourceCitationProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1276
|
+
|
|
1277
|
+
export declare interface SourceCitationProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1278
|
+
citations: Citation[];
|
|
1279
|
+
/** Display style @default "footer" */
|
|
1280
|
+
variant?: "inline" | "footer";
|
|
1281
|
+
}
|
|
1282
|
+
|
|
880
1283
|
export declare interface StackProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
881
1284
|
spacing?: number | string;
|
|
882
1285
|
align?: "start" | "end" | "center" | "stretch";
|
|
@@ -906,6 +1309,21 @@ export declare interface StepProps {
|
|
|
906
1309
|
description?: string;
|
|
907
1310
|
}
|
|
908
1311
|
|
|
1312
|
+
export declare const StreamingText: React_2.ForwardRefExoticComponent<StreamingTextProps & React_2.RefAttributes<HTMLSpanElement>>;
|
|
1313
|
+
|
|
1314
|
+
export declare interface StreamingTextProps extends React_2.HTMLAttributes<HTMLSpanElement> {
|
|
1315
|
+
/** Full text to render character-by-character */
|
|
1316
|
+
text: string;
|
|
1317
|
+
/** Characters per frame (~60fps) @default 2 */
|
|
1318
|
+
speed?: number;
|
|
1319
|
+
/** Called when typing animation finishes */
|
|
1320
|
+
onComplete?: () => void;
|
|
1321
|
+
/** Show blinking cursor at end @default true */
|
|
1322
|
+
cursor?: boolean;
|
|
1323
|
+
/** Skip animation and show full text immediately @default false */
|
|
1324
|
+
immediate?: boolean;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
909
1327
|
export declare const Switch: React_2.ForwardRefExoticComponent<Omit<SwitchPrimitive.SwitchProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
910
1328
|
|
|
911
1329
|
export declare const Table: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableElement> & React_2.RefAttributes<HTMLTableElement>>;
|
|
@@ -1057,8 +1475,25 @@ export declare const TooltipProvider: React_2.FC<TooltipPrimitive.TooltipProvide
|
|
|
1057
1475
|
|
|
1058
1476
|
export declare const TooltipTrigger: React_2.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
1059
1477
|
|
|
1478
|
+
/**
|
|
1479
|
+
* Simple template interpolation: replaces `{key}` placeholders.
|
|
1480
|
+
*
|
|
1481
|
+
* @example
|
|
1482
|
+
* ```ts
|
|
1483
|
+
* t("Calling {name}...", { name: "search" })
|
|
1484
|
+
* // → "Calling search..."
|
|
1485
|
+
* ```
|
|
1486
|
+
*/
|
|
1487
|
+
export declare function tpl(template: string, vars: Record<string, string | number>): string;
|
|
1488
|
+
|
|
1060
1489
|
declare type UseCarouselParameters = Parameters<typeof default_2>;
|
|
1061
1490
|
|
|
1491
|
+
/**
|
|
1492
|
+
* Returns the current NUI locale dictionary.
|
|
1493
|
+
* Falls back to English when used outside a `<NUIProvider>`.
|
|
1494
|
+
*/
|
|
1495
|
+
export declare function useNUILocale(): NUILocale;
|
|
1496
|
+
|
|
1062
1497
|
export declare function useTheme(): ThemeProviderState;
|
|
1063
1498
|
|
|
1064
1499
|
export declare const VStack: React_2.ForwardRefExoticComponent<StackProps & React_2.RefAttributes<HTMLDivElement>>;
|