@lichens-innovation/react-native-common 3.11.2 → 3.11.4

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
@@ -6,7 +6,7 @@ import { BarcodeScanningResult, BarcodeType } from 'expo-camera';
6
6
  import { Dialog, TextInputProps } from 'react-native-paper';
7
7
  import { ErrorBoundaryProps } from 'expo-router';
8
8
  import { LegendListRef } from '@legendapp/list';
9
- import { i18n, ModuleType } from 'i18next';
9
+ import { ThirdPartyModule, i18n, ModuleType } from 'i18next';
10
10
  import { TabTriggerSlotProps } from 'expo-router/ui';
11
11
  import * as react_jsx_runtime from 'react/jsx-runtime';
12
12
  import * as ImagePicker from 'expo-image-picker';
@@ -232,7 +232,11 @@ declare const languageDetector: {
232
232
  init: () => void;
233
233
  cacheUserLanguage: () => void;
234
234
  };
235
- declare const initCommonI18N: (instance?: i18n) => i18n;
235
+ interface InitCommonI18nArgs {
236
+ initReactI18next: ThirdPartyModule;
237
+ instance: i18n;
238
+ }
239
+ declare const initCommonI18N: ({ initReactI18next, instance }: InitCommonI18nArgs) => i18n;
236
240
 
237
241
  interface LanguageSelectorProps {
238
242
  label?: string;
package/dist/index.js CHANGED
@@ -4070,13 +4070,12 @@ var languageDetector = {
4070
4070
  cacheUserLanguage: () => {
4071
4071
  }
4072
4072
  };
4073
- var initCommonI18N = (instance) => {
4074
- const i18next3 = instance ?? i18next__default.default;
4073
+ var initCommonI18N = ({ initReactI18next, instance }) => {
4075
4074
  const savedLanguage = loadSelectedLanguage();
4076
4075
  if (!savedLanguage) {
4077
4076
  storeSelectedLanguage(DEFAULT_LANGUAGE);
4078
4077
  }
4079
- i18next3.use(languageDetector).use(reactI18next.initReactI18next).init({
4078
+ instance.use(languageDetector).use(initReactI18next).init({
4080
4079
  resources: { fr: common_default2, en: common_default },
4081
4080
  defaultNS: "common",
4082
4081
  fallbackLng: DEFAULT_LANGUAGE,
@@ -4087,7 +4086,7 @@ var initCommonI18N = (instance) => {
4087
4086
  // not needed for react as it escapes by default
4088
4087
  }
4089
4088
  });
4090
- return i18next3;
4089
+ return instance;
4091
4090
  };
4092
4091
  var DeviceFinder = class {
4093
4092
  constructor() {