@nicorp/nui 0.4.0 → 0.6.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 +136 -0
- package/dist/index.es.js +5536 -5275
- 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,121 @@ 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 */
|
|
1038
|
+
reasoning_thoughtFor: string;
|
|
1039
|
+
/** Use {name} placeholder */
|
|
1040
|
+
toolCall_calling: string;
|
|
1041
|
+
/** Use {name} placeholder */
|
|
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 */
|
|
1058
|
+
filePreview_remove: string;
|
|
1059
|
+
modelSelector_placeholder: string;
|
|
1060
|
+
modelSelector_searchPlaceholder: string;
|
|
1061
|
+
modelSelector_noResults: string;
|
|
1062
|
+
common_close: string;
|
|
1063
|
+
common_search: string;
|
|
1064
|
+
common_noResults: string;
|
|
1065
|
+
common_previous: string;
|
|
1066
|
+
common_next: string;
|
|
1067
|
+
common_more: string;
|
|
1068
|
+
common_copyCode: string;
|
|
1069
|
+
combobox_placeholder: string;
|
|
1070
|
+
combobox_searchPlaceholder: string;
|
|
1071
|
+
combobox_empty: string;
|
|
1072
|
+
multiselect_placeholder: string;
|
|
1073
|
+
multiselect_searchPlaceholder: string;
|
|
1074
|
+
multiselect_empty: string;
|
|
1075
|
+
/** Use {count} placeholder */
|
|
1076
|
+
multiselect_selected: string;
|
|
1077
|
+
datePicker_placeholder: string;
|
|
1078
|
+
dataTable_searchPlaceholder: string;
|
|
1079
|
+
dataTable_noResults: string;
|
|
1080
|
+
/** Use {page} and {total} placeholders */
|
|
1081
|
+
dataTable_pageOf: string;
|
|
1082
|
+
dataTable_previous: string;
|
|
1083
|
+
dataTable_next: string;
|
|
1084
|
+
fileUpload_dragDrop: string;
|
|
1085
|
+
/** Use {size} placeholder */
|
|
1086
|
+
fileUpload_maxSize: string;
|
|
1087
|
+
tagInput_placeholder: string;
|
|
1088
|
+
pagination_previous: string;
|
|
1089
|
+
pagination_next: string;
|
|
1090
|
+
pagination_morePages: string;
|
|
1091
|
+
pagination_goToPrevious: string;
|
|
1092
|
+
pagination_goToNext: string;
|
|
1093
|
+
modeToggle_toggleTheme: string;
|
|
1094
|
+
modeToggle_light: string;
|
|
1095
|
+
modeToggle_dark: string;
|
|
1096
|
+
modeToggle_system: string;
|
|
1097
|
+
modeToggle_colorTheme: string;
|
|
1098
|
+
carousel_previousSlide: string;
|
|
1099
|
+
carousel_nextSlide: string;
|
|
1100
|
+
breadcrumb_more: string;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
/**
|
|
1104
|
+
* Provides a locale dictionary to every NUI AI component in the tree.
|
|
1105
|
+
*
|
|
1106
|
+
* @example
|
|
1107
|
+
* ```tsx
|
|
1108
|
+
* <NUIProvider locale="ru">
|
|
1109
|
+
* <App />
|
|
1110
|
+
* </NUIProvider>
|
|
1111
|
+
* ```
|
|
1112
|
+
*
|
|
1113
|
+
* @example Custom locale
|
|
1114
|
+
* ```tsx
|
|
1115
|
+
* <NUIProvider locale={{ chatInput_placeholder: "Ask anything…" }}>
|
|
1116
|
+
* <App />
|
|
1117
|
+
* </NUIProvider>
|
|
1118
|
+
* ```
|
|
1119
|
+
*/
|
|
1120
|
+
export declare function NUIProvider({ locale, children }: NUIProviderProps): JSX_2.Element;
|
|
1121
|
+
|
|
1122
|
+
export declare interface NUIProviderProps {
|
|
1123
|
+
/** Built-in locale key ("en" | "ru") or a custom (partial) locale dictionary.
|
|
1124
|
+
* Missing keys fall back to English. */
|
|
1125
|
+
locale?: "en" | "ru" | (string & {}) | Partial<NUILocale>;
|
|
1126
|
+
children: React_2.ReactNode;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1012
1129
|
export declare function NumberInput({ value, onChange, min, max, step, disabled, className, }: NumberInputProps): JSX_2.Element;
|
|
1013
1130
|
|
|
1014
1131
|
export declare interface NumberInputProps {
|
|
@@ -1107,6 +1224,8 @@ export declare interface ReasoningBlockProps extends React_2.HTMLAttributes<HTML
|
|
|
1107
1224
|
title?: string;
|
|
1108
1225
|
}
|
|
1109
1226
|
|
|
1227
|
+
export declare const ru: NUILocale;
|
|
1228
|
+
|
|
1110
1229
|
export declare const ScrollArea: React_2.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
1111
1230
|
orientation?: ScrollAreaOrientation;
|
|
1112
1231
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -1395,8 +1514,25 @@ export declare const TooltipProvider: React_2.FC<TooltipPrimitive.TooltipProvide
|
|
|
1395
1514
|
|
|
1396
1515
|
export declare const TooltipTrigger: React_2.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
1397
1516
|
|
|
1517
|
+
/**
|
|
1518
|
+
* Simple template interpolation: replaces `{key}` placeholders.
|
|
1519
|
+
*
|
|
1520
|
+
* @example
|
|
1521
|
+
* ```ts
|
|
1522
|
+
* t("Calling {name}...", { name: "search" })
|
|
1523
|
+
* // → "Calling search..."
|
|
1524
|
+
* ```
|
|
1525
|
+
*/
|
|
1526
|
+
export declare function tpl(template: string, vars: Record<string, string | number>): string;
|
|
1527
|
+
|
|
1398
1528
|
declare type UseCarouselParameters = Parameters<typeof default_2>;
|
|
1399
1529
|
|
|
1530
|
+
/**
|
|
1531
|
+
* Returns the current NUI locale dictionary.
|
|
1532
|
+
* Falls back to English when used outside a `<NUIProvider>`.
|
|
1533
|
+
*/
|
|
1534
|
+
export declare function useNUILocale(): NUILocale;
|
|
1535
|
+
|
|
1400
1536
|
export declare function useTheme(): ThemeProviderState;
|
|
1401
1537
|
|
|
1402
1538
|
export declare const VStack: React_2.ForwardRefExoticComponent<StackProps & React_2.RefAttributes<HTMLDivElement>>;
|