@nicorp/nui 0.4.0 → 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 +9 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +97 -0
- package/dist/index.es.js +3505 -3352
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -771,6 +771,8 @@ export declare interface EmptyStateProps {
|
|
|
771
771
|
className?: string;
|
|
772
772
|
}
|
|
773
773
|
|
|
774
|
+
export declare const en: NUILocale;
|
|
775
|
+
|
|
774
776
|
export declare interface FileItem {
|
|
775
777
|
id?: string;
|
|
776
778
|
name: string;
|
|
@@ -1009,6 +1011,82 @@ export declare const navigationMenuTriggerStyle: (props?: ClassProp | undefined)
|
|
|
1009
1011
|
|
|
1010
1012
|
export declare const NavigationMenuViewport: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuViewportProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
1011
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
|
+
|
|
1012
1090
|
export declare function NumberInput({ value, onChange, min, max, step, disabled, className, }: NumberInputProps): JSX_2.Element;
|
|
1013
1091
|
|
|
1014
1092
|
export declare interface NumberInputProps {
|
|
@@ -1107,6 +1185,8 @@ export declare interface ReasoningBlockProps extends React_2.HTMLAttributes<HTML
|
|
|
1107
1185
|
title?: string;
|
|
1108
1186
|
}
|
|
1109
1187
|
|
|
1188
|
+
export declare const ru: NUILocale;
|
|
1189
|
+
|
|
1110
1190
|
export declare const ScrollArea: React_2.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
1111
1191
|
orientation?: ScrollAreaOrientation;
|
|
1112
1192
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -1395,8 +1475,25 @@ export declare const TooltipProvider: React_2.FC<TooltipPrimitive.TooltipProvide
|
|
|
1395
1475
|
|
|
1396
1476
|
export declare const TooltipTrigger: React_2.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
1397
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
|
+
|
|
1398
1489
|
declare type UseCarouselParameters = Parameters<typeof default_2>;
|
|
1399
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
|
+
|
|
1400
1497
|
export declare function useTheme(): ThemeProviderState;
|
|
1401
1498
|
|
|
1402
1499
|
export declare const VStack: React_2.ForwardRefExoticComponent<StackProps & React_2.RefAttributes<HTMLDivElement>>;
|