@molecule/app-i18n-react-i18next 1.0.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/LICENSE ADDED
@@ -0,0 +1,115 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work.
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object
40
+ form, that is based on (or derived from) the Work and for which the
41
+ editorial revisions, annotations, elaborations, or other modifications
42
+ represent, as a whole, an original work of authorship.
43
+
44
+ "Contribution" shall mean any work of authorship, including the
45
+ original version of the Work and any modifications or additions
46
+ to that Work, that is intentionally submitted to the Licensor for
47
+ inclusion in the Work by the copyright owner or by an individual or
48
+ Legal Entity authorized to submit on behalf of the copyright owner.
49
+
50
+ "Contributor" shall mean Licensor and any individual or Legal Entity
51
+ on behalf of whom a Contribution has been received by the Licensor and
52
+ subsequently incorporated within the Work.
53
+
54
+ 2. Grant of Copyright License. Subject to the terms and conditions of
55
+ this License, each Contributor hereby grants to You a perpetual,
56
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
57
+ copyright license to reproduce, prepare Derivative Works of,
58
+ publicly display, publicly perform, sublicense, and distribute the
59
+ Work and such Derivative Works in Source or Object form.
60
+
61
+ 3. Grant of Patent License. Subject to the terms and conditions of
62
+ this License, each Contributor hereby grants to You a perpetual,
63
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
64
+ patent license to make, have made, use, offer to sell, sell, import,
65
+ and otherwise transfer the Work.
66
+
67
+ 4. Redistribution. You may reproduce and distribute copies of the
68
+ Work or Derivative Works thereof in any medium, with or without
69
+ modifications, and in Source or Object form, provided that You
70
+ meet the following conditions:
71
+
72
+ (a) You must give any other recipients of the Work or
73
+ Derivative Works a copy of this License; and
74
+
75
+ (b) You must cause any modified files to carry prominent notices
76
+ stating that You changed the files; and
77
+
78
+ (c) You must retain, in the Source form of any Derivative Works
79
+ that You distribute, all copyright, patent, trademark, and
80
+ attribution notices from the Source form of the Work,
81
+ excluding those notices that do not pertain to any part of
82
+ the Derivative Works; and
83
+
84
+ (d) If the Work includes a "NOTICE" text file as part of its
85
+ distribution, then any Derivative Works that You distribute must
86
+ include a readable copy of the attribution notices contained
87
+ within such NOTICE file.
88
+
89
+ 5. Submission of Contributions.
90
+
91
+ 6. Trademarks. This License does not grant permission to use the trade
92
+ names, trademarks, service marks, or product names of the Licensor.
93
+
94
+ 7. Disclaimer of Warranty. Unless required by applicable law or
95
+ agreed to in writing, Licensor provides the Work on an "AS IS" BASIS,
96
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND.
97
+
98
+ 8. Limitation of Liability. In no event and under no legal theory shall
99
+ any Contributor be liable to You for damages.
100
+
101
+ 9. Accepting Warranty or Additional Liability.
102
+
103
+ Copyright 2026 Molecule Dev, Inc.
104
+
105
+ Licensed under the Apache License, Version 2.0 (the "License");
106
+ you may not use this file except in compliance with the License.
107
+ You may obtain a copy of the License at
108
+
109
+ http://www.apache.org/licenses/LICENSE-2.0
110
+
111
+ Unless required by applicable law or agreed to in writing, software
112
+ distributed under the License is distributed on an "AS IS" BASIS,
113
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
114
+ See the License for the specific language governing permissions and
115
+ limitations under the License.
@@ -0,0 +1,19 @@
1
+ /**
2
+ * React hooks for i18n.
3
+ *
4
+ * @module
5
+ */
6
+ import type { DateFormatOptions, InterpolationValues, NumberFormatOptions } from './types.js';
7
+ /**
8
+ * React hook that provides translation, locale switching, and formatting functions
9
+ * using `react-i18next` under the hood. Wraps `useTranslation()` into the molecule i18n interface.
10
+ * @returns An object with `t` (translate), `locale`, `setLocale`, `formatNumber`, and `formatDate`.
11
+ */
12
+ export declare const useI18n: () => {
13
+ t: (key: string, values?: InterpolationValues) => string;
14
+ locale: string;
15
+ setLocale: (locale: string) => Promise<unknown>;
16
+ formatNumber: (value: number, options?: NumberFormatOptions) => string;
17
+ formatDate: (value: Date | number | string, options?: DateFormatOptions) => string;
18
+ };
19
+ //# sourceMappingURL=hooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAE7F;;;;GAIG;AACH,eAAO,MAAM,OAAO,QAAO;IACzB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,mBAAmB,KAAK,MAAM,CAAA;IACxD,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IAC/C,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,KAAK,MAAM,CAAA;IACtE,UAAU,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,KAAK,MAAM,CAAA;CAkBnF,CAAA"}
package/dist/hooks.js ADDED
@@ -0,0 +1,28 @@
1
+ /**
2
+ * React hooks for i18n.
3
+ *
4
+ * @module
5
+ */
6
+ import { useTranslation } from 'react-i18next';
7
+ /**
8
+ * React hook that provides translation, locale switching, and formatting functions
9
+ * using `react-i18next` under the hood. Wraps `useTranslation()` into the molecule i18n interface.
10
+ * @returns An object with `t` (translate), `locale`, `setLocale`, `formatNumber`, and `formatDate`.
11
+ */
12
+ export const useI18n = () => {
13
+ const { t, i18n } = useTranslation();
14
+ return {
15
+ t: (key, values) => t(key, values),
16
+ locale: i18n.language,
17
+ setLocale: (locale) => i18n.changeLanguage(locale),
18
+ formatNumber: (value, options) => new Intl.NumberFormat(i18n.language, options).format(value),
19
+ formatDate: (value, options) => {
20
+ const date = value instanceof Date ? value : new Date(value);
21
+ return new Intl.DateTimeFormat(i18n.language, {
22
+ dateStyle: options?.dateStyle,
23
+ timeStyle: options?.timeStyle,
24
+ }).format(date);
25
+ },
26
+ };
27
+ };
28
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAI9C;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,GAMrB,EAAE;IACF,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,cAAc,EAAE,CAAA;IAEpC,OAAO;QACL,CAAC,EAAE,CAAC,GAAW,EAAE,MAA4B,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,MAAiC,CAAC;QAC3F,MAAM,EAAE,IAAI,CAAC,QAAQ;QACrB,SAAS,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC;QAC1D,YAAY,EAAE,CAAC,KAAa,EAAE,OAA6B,EAAE,EAAE,CAC7D,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAmC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;QACzF,UAAU,EAAE,CAAC,KAA6B,EAAE,OAA2B,EAAE,EAAE;YACzE,MAAM,IAAI,GAAG,KAAK,YAAY,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAA;YAC5D,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE;gBAC5C,SAAS,EAAE,OAAO,EAAE,SAAS;gBAC7B,SAAS,EAAE,OAAO,EAAE,SAAS;aACA,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QAC/C,CAAC;KACF,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * react-i18next provider for molecule.dev.
3
+ *
4
+ * Implements the I18nProvider interface using i18next and react-i18next.
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * import { setProvider } from '@molecule/app-i18n'
9
+ * import { createReactI18nextProvider } from '@molecule/app-i18n-react-i18next'
10
+ *
11
+ * const provider = createReactI18nextProvider({
12
+ * defaultLocale: 'en',
13
+ * locales: [
14
+ * { code: 'en', name: 'English', translations: { ... } },
15
+ * { code: 'fr', name: 'French', translations: { ... } },
16
+ * ],
17
+ * })
18
+ *
19
+ * setProvider(provider)
20
+ * ```
21
+ *
22
+ * @remarks
23
+ * **Startup locale vs. `detection`:** with `detection: true` (the default),
24
+ * `defaultLocale` is only the FALLBACK — the actual startup locale is
25
+ * whatever the browser detector resolves (querystring, then `navigator`, by
26
+ * default). Apps that want a pinned startup locale must pass
27
+ * `detection: false` (or an explicit `i18nextOptions.lng`).
28
+ *
29
+ * **`setLocale()` contract:** `createReactI18nextProvider()` is a thin
30
+ * wrapper over `@molecule/app-i18n-i18next`'s `createI18nextProvider()`, so
31
+ * its `setLocale()` THROWS for an unregistered locale — see that package's
32
+ * remarks for the fleet-wide contract. The separate `useI18n()` hook below,
33
+ * however, calls `react-i18next`'s raw `i18n.changeLanguage()` directly and
34
+ * is NOT an `I18nProvider` — it does not throw for an unregistered locale.
35
+ *
36
+ *
37
+ * **React Suspense:** the provider sets `react.useSuspense: true` by default,
38
+ * so components using `useTranslation()`/`Trans` may SUSPEND while i18next
39
+ * initializes — wrap the app (or the i18n-using subtree) in a
40
+ * `<Suspense fallback={…}>` boundary, or opt out with
41
+ * `i18nextOptions: { react: { useSuspense: false } }`.
42
+ *
43
+ * @module
44
+ */
45
+ export * from './hooks.js';
46
+ export * from './provider.js';
47
+ export * from './types.js';
48
+ export * from './utilities.js';
49
+ export { I18nextProvider, Trans, useTranslation } from 'react-i18next';
50
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAG9B,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,51 @@
1
+ /**
2
+ * react-i18next provider for molecule.dev.
3
+ *
4
+ * Implements the I18nProvider interface using i18next and react-i18next.
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * import { setProvider } from '@molecule/app-i18n'
9
+ * import { createReactI18nextProvider } from '@molecule/app-i18n-react-i18next'
10
+ *
11
+ * const provider = createReactI18nextProvider({
12
+ * defaultLocale: 'en',
13
+ * locales: [
14
+ * { code: 'en', name: 'English', translations: { ... } },
15
+ * { code: 'fr', name: 'French', translations: { ... } },
16
+ * ],
17
+ * })
18
+ *
19
+ * setProvider(provider)
20
+ * ```
21
+ *
22
+ * @remarks
23
+ * **Startup locale vs. `detection`:** with `detection: true` (the default),
24
+ * `defaultLocale` is only the FALLBACK — the actual startup locale is
25
+ * whatever the browser detector resolves (querystring, then `navigator`, by
26
+ * default). Apps that want a pinned startup locale must pass
27
+ * `detection: false` (or an explicit `i18nextOptions.lng`).
28
+ *
29
+ * **`setLocale()` contract:** `createReactI18nextProvider()` is a thin
30
+ * wrapper over `@molecule/app-i18n-i18next`'s `createI18nextProvider()`, so
31
+ * its `setLocale()` THROWS for an unregistered locale — see that package's
32
+ * remarks for the fleet-wide contract. The separate `useI18n()` hook below,
33
+ * however, calls `react-i18next`'s raw `i18n.changeLanguage()` directly and
34
+ * is NOT an `I18nProvider` — it does not throw for an unregistered locale.
35
+ *
36
+ *
37
+ * **React Suspense:** the provider sets `react.useSuspense: true` by default,
38
+ * so components using `useTranslation()`/`Trans` may SUSPEND while i18next
39
+ * initializes — wrap the app (or the i18n-using subtree) in a
40
+ * `<Suspense fallback={…}>` boundary, or opt out with
41
+ * `i18nextOptions: { react: { useSuspense: false } }`.
42
+ *
43
+ * @module
44
+ */
45
+ export * from './hooks.js';
46
+ export * from './provider.js';
47
+ export * from './types.js';
48
+ export * from './utilities.js';
49
+ // Re-export react-i18next hooks and components
50
+ export { I18nextProvider, Trans, useTranslation } from 'react-i18next';
51
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAE9B,+CAA+C;AAC/C,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * react-i18next provider implementation.
3
+ *
4
+ * Thin wrapper around the base i18next provider that adds the
5
+ * react-i18next plugin and React-specific configuration.
6
+ *
7
+ * @module
8
+ */
9
+ import { createI18nextProvider } from '@molecule/app-i18n-i18next';
10
+ import type { ReactI18nextProviderConfig } from './types.js';
11
+ /**
12
+ * Creates a React-specific i18n provider that wraps the base i18next provider with the
13
+ * `react-i18next` plugin. Enables `useSuspense` by default for React Suspense integration.
14
+ * @param config - Same as `I18nextProviderConfig` plus optional React-specific overrides.
15
+ * @returns An `I18nProvider` with the `react-i18next` plugin pre-registered.
16
+ */
17
+ export declare const createReactI18nextProvider: (config?: ReactI18nextProviderConfig) => ReturnType<typeof createI18nextProvider>;
18
+ /**
19
+ * Default provider instance.
20
+ */
21
+ export declare const provider: import("@molecule/app-i18n").I18nProvider & {
22
+ i18n: import("i18next").i18n;
23
+ initialize: () => Promise<void>;
24
+ };
25
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAElE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAA;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,GACrC,SAAQ,0BAA+B,KACtC,UAAU,CAAC,OAAO,qBAAqB,CAWzC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ;;;CAA+B,CAAA"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * react-i18next provider implementation.
3
+ *
4
+ * Thin wrapper around the base i18next provider that adds the
5
+ * react-i18next plugin and React-specific configuration.
6
+ *
7
+ * @module
8
+ */
9
+ import { initReactI18next } from 'react-i18next';
10
+ import { createI18nextProvider } from '@molecule/app-i18n-i18next';
11
+ /**
12
+ * Creates a React-specific i18n provider that wraps the base i18next provider with the
13
+ * `react-i18next` plugin. Enables `useSuspense` by default for React Suspense integration.
14
+ * @param config - Same as `I18nextProviderConfig` plus optional React-specific overrides.
15
+ * @returns An `I18nProvider` with the `react-i18next` plugin pre-registered.
16
+ */
17
+ export const createReactI18nextProvider = (config = {}) => {
18
+ return createI18nextProvider({
19
+ ...config,
20
+ plugins: [initReactI18next, ...(config.plugins ?? [])],
21
+ i18nextOptions: {
22
+ react: {
23
+ useSuspense: true,
24
+ },
25
+ ...config.i18nextOptions,
26
+ },
27
+ });
28
+ };
29
+ /**
30
+ * Default provider instance.
31
+ */
32
+ export const provider = createReactI18nextProvider();
33
+ //# sourceMappingURL=provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAEhD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAIlE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,SAAqC,EAAE,EACG,EAAE;IAC5C,OAAO,qBAAqB,CAAC;QAC3B,GAAG,MAAM;QACT,OAAO,EAAE,CAAC,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;QACtD,cAAc,EAAE;YACd,KAAK,EAAE;gBACL,WAAW,EAAE,IAAI;aAClB;YACD,GAAG,MAAM,CAAC,cAAc;SACzB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,0BAA0B,EAAE,CAAA"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Type definitions for react-i18next provider.
3
+ *
4
+ * Re-exports all types from the base i18next provider.
5
+ *
6
+ * @module
7
+ */
8
+ export type { DateFormatOptions, I18nextProviderConfig, I18nProvider, InterpolationValues, LocaleConfig, NumberFormatOptions, Translations, } from '@molecule/app-i18n-i18next';
9
+ import type { I18nextProviderConfig } from '@molecule/app-i18n-i18next';
10
+ /**
11
+ * Configuration options for the react-i18next provider.
12
+ *
13
+ * Identical to I18nextProviderConfig — the React-specific setup
14
+ * (initReactI18next plugin, Suspense) is handled automatically.
15
+ */
16
+ export type ReactI18nextProviderConfig = I18nextProviderConfig;
17
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EACV,iBAAiB,EACjB,qBAAqB,EACrB,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACnB,YAAY,GACb,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAEvE;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,GAAG,qBAAqB,CAAA"}
package/dist/types.js ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Type definitions for react-i18next provider.
3
+ *
4
+ * Re-exports all types from the base i18next provider.
5
+ *
6
+ * @module
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Utility functions for react-i18next provider.
3
+ *
4
+ * Re-exports from the base i18next provider.
5
+ *
6
+ * @module
7
+ */
8
+ export { localeConfigToResources } from '@molecule/app-i18n-i18next';
9
+ //# sourceMappingURL=utilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../src/utilities.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Utility functions for react-i18next provider.
3
+ *
4
+ * Re-exports from the base i18next provider.
5
+ *
6
+ * @module
7
+ */
8
+ export { localeConfigToResources } from '@molecule/app-i18n-i18next';
9
+ //# sourceMappingURL=utilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utilities.js","sourceRoot":"","sources":["../src/utilities.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA"}
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@molecule/app-i18n-react-i18next",
3
+ "version": "1.0.0",
4
+ "description": "react-i18next provider for molecule.dev",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "scripts": {
9
+ "build": "tsc",
10
+ "test": "vitest run",
11
+ "test:watch": "vitest"
12
+ },
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/index.js"
17
+ }
18
+ },
19
+ "files": [
20
+ "dist"
21
+ ],
22
+ "keywords": [
23
+ "molecule",
24
+ "i18n",
25
+ "react-i18next",
26
+ "translations",
27
+ "localization"
28
+ ],
29
+ "license": "Apache-2.0",
30
+ "dependencies": {
31
+ "@molecule/app-i18n-i18next": "1.0.0",
32
+ "i18next": "26.3.6",
33
+ "react-i18next": "17.0.11"
34
+ },
35
+ "devDependencies": {
36
+ "@types/node": "26.1.2",
37
+ "@types/react": "19.2.17",
38
+ "react": "19.2.8",
39
+ "typescript": "6.0.3",
40
+ "vitest": "4.1.10"
41
+ },
42
+ "peerDependencies": {
43
+ "@molecule/app-i18n": "^1.0.0",
44
+ "react": "^18.0.0 || ^19.0.0"
45
+ },
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "https://github.com/molecule-dev/molecule.git",
49
+ "directory": "packages/app/bonds/i18n/react-i18next"
50
+ },
51
+ "homepage": "https://github.com/molecule-dev/molecule/tree/main/packages/app/bonds/i18n/react-i18next",
52
+ "bugs": "https://github.com/molecule-dev/molecule/issues",
53
+ "publishConfig": {
54
+ "access": "public"
55
+ }
56
+ }