@nicorp/nui 0.5.0 → 0.7.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.d.ts CHANGED
@@ -1034,11 +1034,11 @@ export declare interface NUILocale {
1034
1034
  chatHeader_settings: string;
1035
1035
  reasoning_title: string;
1036
1036
  reasoning_thinking: string;
1037
- /** Use {duration} placeholder, e.g. "Thought for {duration}" */
1037
+ /** Use {duration} placeholder */
1038
1038
  reasoning_thoughtFor: string;
1039
- /** Use {name} placeholder, e.g. "Calling {name}..." */
1039
+ /** Use {name} placeholder */
1040
1040
  toolCall_calling: string;
1041
- /** Use {name} placeholder, e.g. "{name} — failed" */
1041
+ /** Use {name} placeholder */
1042
1042
  toolCall_failed: string;
1043
1043
  toolCall_arguments: string;
1044
1044
  toolCall_result: string;
@@ -1054,37 +1054,50 @@ export declare interface NUILocale {
1054
1054
  followUp_send: string;
1055
1055
  sourceCitation_sources: string;
1056
1056
  aiLoading_thinking: string;
1057
- /** Use {name} placeholder, e.g. "Remove {name}" */
1057
+ /** Use {name} placeholder */
1058
1058
  filePreview_remove: string;
1059
1059
  modelSelector_placeholder: string;
1060
1060
  modelSelector_searchPlaceholder: string;
1061
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;
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;
1088
1101
  }
1089
1102
 
1090
1103
  export declare function NumberInput({ value, onChange, min, max, step, disabled, className, }: NumberInputProps): JSX_2.Element;
@@ -1486,15 +1499,45 @@ export declare const TooltipTrigger: React_2.ForwardRefExoticComponent<TooltipPr
1486
1499
  */
1487
1500
  export declare function tpl(template: string, vars: Record<string, string | number>): string;
1488
1501
 
1502
+ /**
1503
+ * Provides a locale dictionary to every NUI component in the tree.
1504
+ *
1505
+ * @example
1506
+ * ```tsx
1507
+ * <TranslateProvider locale="ru">
1508
+ * <App />
1509
+ * </TranslateProvider>
1510
+ * ```
1511
+ *
1512
+ * @example Custom locale
1513
+ * ```tsx
1514
+ * <TranslateProvider locale={{ chatInput_placeholder: "Ask anything…" }}>
1515
+ * <App />
1516
+ * </TranslateProvider>
1517
+ * ```
1518
+ */
1519
+ declare function TranslateProvider({ locale, children }: TranslateProviderProps): JSX_2.Element;
1520
+ export { TranslateProvider as NUIProvider }
1521
+ export { TranslateProvider }
1522
+
1523
+ export declare interface TranslateProviderProps {
1524
+ /** Built-in locale key ("en" | "ru") or a custom (partial) locale dictionary.
1525
+ * Missing keys fall back to English. */
1526
+ locale?: "en" | "ru" | (string & {}) | Partial<NUILocale>;
1527
+ children: React_2.ReactNode;
1528
+ }
1529
+
1489
1530
  declare type UseCarouselParameters = Parameters<typeof default_2>;
1490
1531
 
1532
+ export declare function useTheme(): ThemeProviderState;
1533
+
1491
1534
  /**
1492
1535
  * Returns the current NUI locale dictionary.
1493
- * Falls back to English when used outside a `<NUIProvider>`.
1536
+ * Falls back to English when used outside a `<TranslateProvider>`.
1494
1537
  */
1495
- export declare function useNUILocale(): NUILocale;
1496
-
1497
- export declare function useTheme(): ThemeProviderState;
1538
+ declare function useTranslate(): NUILocale;
1539
+ export { useTranslate as useNUILocale }
1540
+ export { useTranslate }
1498
1541
 
1499
1542
  export declare const VStack: React_2.ForwardRefExoticComponent<StackProps & React_2.RefAttributes<HTMLDivElement>>;
1500
1543