@nicorp/nui 0.6.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
@@ -1100,32 +1100,6 @@ export declare interface NUILocale {
1100
1100
  breadcrumb_more: string;
1101
1101
  }
1102
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
-
1129
1103
  export declare function NumberInput({ value, onChange, min, max, step, disabled, className, }: NumberInputProps): JSX_2.Element;
1130
1104
 
1131
1105
  export declare interface NumberInputProps {
@@ -1525,15 +1499,45 @@ export declare const TooltipTrigger: React_2.ForwardRefExoticComponent<TooltipPr
1525
1499
  */
1526
1500
  export declare function tpl(template: string, vars: Record<string, string | number>): string;
1527
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
+
1528
1530
  declare type UseCarouselParameters = Parameters<typeof default_2>;
1529
1531
 
1532
+ export declare function useTheme(): ThemeProviderState;
1533
+
1530
1534
  /**
1531
1535
  * Returns the current NUI locale dictionary.
1532
- * Falls back to English when used outside a `<NUIProvider>`.
1536
+ * Falls back to English when used outside a `<TranslateProvider>`.
1533
1537
  */
1534
- export declare function useNUILocale(): NUILocale;
1535
-
1536
- export declare function useTheme(): ThemeProviderState;
1538
+ declare function useTranslate(): NUILocale;
1539
+ export { useTranslate as useNUILocale }
1540
+ export { useTranslate }
1537
1541
 
1538
1542
  export declare const VStack: React_2.ForwardRefExoticComponent<StackProps & React_2.RefAttributes<HTMLDivElement>>;
1539
1543
 
package/dist/index.es.js CHANGED
@@ -12649,6 +12649,7 @@ export {
12649
12649
  ci as TooltipContent,
12650
12650
  Zu as TooltipProvider,
12651
12651
  Qu as TooltipTrigger,
12652
+ _u as TranslateProvider,
12652
12653
  ka as VStack,
12653
12654
  ta as badgeVariants,
12654
12655
  fn as buttonVariants,
@@ -12664,6 +12665,7 @@ export {
12664
12665
  nr as toggleVariants,
12665
12666
  He as tpl,
12666
12667
  J as useNUILocale,
12667
- Zn as useTheme
12668
+ Zn as useTheme,
12669
+ J as useTranslate
12668
12670
  };
12669
12671
  //# sourceMappingURL=index.es.js.map