react-native-intlayer 6.1.5 → 6.1.6
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/cjs/configMetroIntlayer.cjs +27 -18
- package/dist/cjs/configMetroIntlayer.cjs.map +1 -1
- package/dist/cjs/index.cjs +3 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/intlayerProvider.cjs +33 -0
- package/dist/cjs/intlayerProvider.cjs.map +1 -0
- package/dist/esm/configMetroIntlayer.mjs +28 -19
- package/dist/esm/configMetroIntlayer.mjs.map +1 -1
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/intlayerProvider.mjs +9 -0
- package/dist/esm/intlayerProvider.mjs.map +1 -0
- package/dist/types/configMetroIntlayer.d.ts +1 -1
- package/dist/types/configMetroIntlayer.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/intlayerProvider.d.ts +3 -0
- package/dist/types/intlayerProvider.d.ts.map +1 -0
- package/package.json +17 -12
|
@@ -31,47 +31,56 @@ __export(configMetroIntlayer_exports, {
|
|
|
31
31
|
configMetroIntlayer: () => configMetroIntlayer
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(configMetroIntlayer_exports);
|
|
34
|
+
var import_chokidar = require("@intlayer/chokidar");
|
|
34
35
|
var import_config = require("@intlayer/config");
|
|
35
|
-
var
|
|
36
|
+
var import_metro_config = require("expo/metro-config");
|
|
36
37
|
var import_metro_resolver = require("metro-resolver");
|
|
38
|
+
var import_path = require("path");
|
|
37
39
|
var import_exclusionList = require('./exclusionList.cjs');
|
|
38
|
-
var import_chokidar = require("@intlayer/chokidar");
|
|
39
40
|
const configMetroIntlayer = async (baseConfig) => {
|
|
41
|
+
let resolvedBaseConfig;
|
|
40
42
|
const intlayerConfig = (0, import_config.getConfiguration)();
|
|
43
|
+
if (baseConfig) {
|
|
44
|
+
resolvedBaseConfig = baseConfig;
|
|
45
|
+
} else {
|
|
46
|
+
resolvedBaseConfig = (0, import_metro_config.getDefaultConfig)(intlayerConfig.content.baseDir);
|
|
47
|
+
}
|
|
41
48
|
await (0, import_chokidar.prepareIntlayer)(intlayerConfig);
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
49
|
+
const alias = (0, import_config.getAlias)({
|
|
50
|
+
configuration: intlayerConfig,
|
|
51
|
+
formatter: (value) => (0, import_path.resolve)(value)
|
|
52
|
+
// get absolute path
|
|
53
|
+
});
|
|
45
54
|
const config = {
|
|
46
55
|
...baseConfig,
|
|
47
56
|
resolver: {
|
|
48
|
-
...
|
|
49
|
-
resolveRequest: (context, moduleName,
|
|
50
|
-
if (moduleName
|
|
57
|
+
...resolvedBaseConfig.resolver,
|
|
58
|
+
resolveRequest: (context, moduleName, ...args) => {
|
|
59
|
+
if (Object.keys(alias).includes(moduleName)) {
|
|
51
60
|
return {
|
|
52
|
-
filePath:
|
|
61
|
+
filePath: alias[moduleName],
|
|
53
62
|
type: "sourceFile"
|
|
54
63
|
};
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
filePath: require.resolve(configurationPath),
|
|
58
|
-
type: "sourceFile"
|
|
59
|
-
};
|
|
60
|
-
} else if (moduleName === "@intlayer/config/client") {
|
|
64
|
+
}
|
|
65
|
+
if (moduleName === "@intlayer/config/client") {
|
|
61
66
|
return {
|
|
62
67
|
filePath: require.resolve("@intlayer/config/client"),
|
|
63
68
|
type: "sourceFile"
|
|
64
69
|
};
|
|
65
|
-
}
|
|
70
|
+
}
|
|
71
|
+
if (moduleName.startsWith("@intlayer/core/file")) {
|
|
66
72
|
return {
|
|
67
73
|
filePath: require.resolve(moduleName.replace("/file", "/file/browser")),
|
|
68
74
|
type: "sourceFile"
|
|
69
75
|
};
|
|
70
76
|
}
|
|
71
|
-
|
|
77
|
+
if (typeof context.resolveRequest === "function") {
|
|
78
|
+
return context.resolveRequest(context, moduleName, ...args);
|
|
79
|
+
}
|
|
80
|
+
return (0, import_metro_resolver.resolve)(context, moduleName, ...args);
|
|
72
81
|
},
|
|
73
82
|
blockList: (0, import_exclusionList.exclusionList)([
|
|
74
|
-
...[
|
|
83
|
+
...[resolvedBaseConfig.resolver?.blockList ?? []].flat(),
|
|
75
84
|
// the following instruction should be replaced intlayerConfig.content.watchedFilesPattern
|
|
76
85
|
// but using watchedFilesPattern does not exclude the files properly for now
|
|
77
86
|
/.*\.content\.(?:ts|tsx|js|jsx|cjs|cjx|mjs|mjx|json)$/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/configMetroIntlayer.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/configMetroIntlayer.ts"],"sourcesContent":["import { prepareIntlayer } from '@intlayer/chokidar';\nimport { getAlias, getConfiguration } from '@intlayer/config';\nimport { getDefaultConfig } from 'expo/metro-config';\nimport { resolve } from 'metro-resolver';\nimport { resolve as pathResolve } from 'path';\nimport { exclusionList } from './exclusionList';\n\ntype MetroConfig = ReturnType<typeof getDefaultConfig>;\n\n/**\n * // metro.config.js\n * const { getDefaultConfig } = require(\"expo/metro-config\");\n * const { configMetroIntlayer } = require(\"react-native-intlayer/metro\");\n *\n * module.exports = (async () => {\n * const defaultConfig = getDefaultConfig(__dirname);\n *\n * return await configMetroIntlayer(defaultConfig);\n * })();\n * ```\n */\nexport const configMetroIntlayer = async (\n baseConfig?: MetroConfig\n): Promise<MetroConfig> => {\n let resolvedBaseConfig: MetroConfig;\n const intlayerConfig = getConfiguration();\n\n if (baseConfig) {\n resolvedBaseConfig = baseConfig;\n } else {\n resolvedBaseConfig = getDefaultConfig(intlayerConfig.content.baseDir);\n }\n\n await prepareIntlayer(intlayerConfig);\n\n const alias = getAlias({\n configuration: intlayerConfig,\n formatter: (value: string) => pathResolve(value), // get absolute path\n });\n\n const config = {\n ...baseConfig,\n\n resolver: {\n ...resolvedBaseConfig.resolver,\n resolveRequest: (context, moduleName, ...args) => {\n if (Object.keys(alias).includes(moduleName)) {\n return {\n filePath: alias[moduleName as keyof typeof alias],\n type: 'sourceFile',\n };\n }\n\n // Because metro does not resolve subodules, we need to resolve the path manually\n if (moduleName === '@intlayer/config/client') {\n return {\n filePath: require.resolve('@intlayer/config/client'),\n type: 'sourceFile',\n };\n }\n\n // Because metro does not resolve subodules, we need to resolve the path manually\n if (moduleName.startsWith('@intlayer/core/file')) {\n // Force React Native to use the correct transpiled version\n return {\n filePath: require.resolve(\n moduleName.replace('/file', '/file/browser')\n ),\n type: 'sourceFile',\n };\n }\n\n // Delegate to the default resolver to prevent infinite recursion\n if (typeof (context as any).resolveRequest === 'function') {\n return (context as any).resolveRequest(context, moduleName, ...args);\n }\n\n // Fallback to metro-resolver when no default resolver is present\n return resolve(context as any, moduleName, ...args);\n },\n blockList: exclusionList([\n ...[resolvedBaseConfig.resolver?.blockList ?? []].flat(),\n // the following instruction should be replaced intlayerConfig.content.watchedFilesPattern\n // but using watchedFilesPattern does not exclude the files properly for now\n /.*\\.content\\.(?:ts|tsx|js|jsx|cjs|cjx|mjs|mjx|json)$/,\n ]),\n },\n } satisfies MetroConfig;\n\n return config;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAgC;AAChC,oBAA2C;AAC3C,0BAAiC;AACjC,4BAAwB;AACxB,kBAAuC;AACvC,2BAA8B;AAgBvB,MAAM,sBAAsB,OACjC,eACyB;AACzB,MAAI;AACJ,QAAM,qBAAiB,gCAAiB;AAExC,MAAI,YAAY;AACd,yBAAqB;AAAA,EACvB,OAAO;AACL,6BAAqB,sCAAiB,eAAe,QAAQ,OAAO;AAAA,EACtE;AAEA,YAAM,iCAAgB,cAAc;AAEpC,QAAM,YAAQ,wBAAS;AAAA,IACrB,eAAe;AAAA,IACf,WAAW,CAAC,cAAkB,YAAAA,SAAY,KAAK;AAAA;AAAA,EACjD,CAAC;AAED,QAAM,SAAS;AAAA,IACb,GAAG;AAAA,IAEH,UAAU;AAAA,MACR,GAAG,mBAAmB;AAAA,MACtB,gBAAgB,CAAC,SAAS,eAAe,SAAS;AAChD,YAAI,OAAO,KAAK,KAAK,EAAE,SAAS,UAAU,GAAG;AAC3C,iBAAO;AAAA,YACL,UAAU,MAAM,UAAgC;AAAA,YAChD,MAAM;AAAA,UACR;AAAA,QACF;AAGA,YAAI,eAAe,2BAA2B;AAC5C,iBAAO;AAAA,YACL,UAAU,gBAAgB,yBAAyB;AAAA,YACnD,MAAM;AAAA,UACR;AAAA,QACF;AAGA,YAAI,WAAW,WAAW,qBAAqB,GAAG;AAEhD,iBAAO;AAAA,YACL,UAAU,QAAQ,QAChB,WAAW,QAAQ,SAAS,eAAe,CAC7C;AAAA,YACA,MAAM;AAAA,UACR;AAAA,QACF;AAGA,YAAI,OAAQ,QAAgB,mBAAmB,YAAY;AACzD,iBAAQ,QAAgB,eAAe,SAAS,YAAY,GAAG,IAAI;AAAA,QACrE;AAGA,mBAAO,+BAAQ,SAAgB,YAAY,GAAG,IAAI;AAAA,MACpD;AAAA,MACA,eAAW,oCAAc;AAAA,QACvB,GAAG,CAAC,mBAAmB,UAAU,aAAa,CAAC,CAAC,EAAE,KAAK;AAAA;AAAA;AAAA,QAGvD;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO;AACT;","names":["pathResolve"]}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -16,8 +16,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
var index_exports = {};
|
|
17
17
|
module.exports = __toCommonJS(index_exports);
|
|
18
18
|
__reExport(index_exports, require('./intlayerPolyfill.cjs'), module.exports);
|
|
19
|
+
__reExport(index_exports, require('./intlayerProvider.cjs'), module.exports);
|
|
19
20
|
// Annotate the CommonJS export names for ESM import in node:
|
|
20
21
|
0 && (module.exports = {
|
|
21
|
-
...require('./intlayerPolyfill.cjs')
|
|
22
|
+
...require('./intlayerPolyfill.cjs'),
|
|
23
|
+
...require('./intlayerProvider.cjs')
|
|
22
24
|
});
|
|
23
25
|
//# sourceMappingURL=index.cjs.map
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './intlayerPolyfill';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,+BAAd;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './intlayerPolyfill';\nexport * from './intlayerProvider';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,+BAAd;AACA,0BAAc,+BADd;","names":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var intlayerProvider_exports = {};
|
|
20
|
+
__export(intlayerProvider_exports, {
|
|
21
|
+
IntlayerProvider: () => IntlayerProvider
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(intlayerProvider_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_react_intlayer = require("react-intlayer");
|
|
26
|
+
var import_intlayerPolyfill = require('./intlayerPolyfill.cjs');
|
|
27
|
+
(0, import_intlayerPolyfill.intlayerPolyfill)();
|
|
28
|
+
const IntlayerProvider = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_intlayer.IntlayerProviderContent, { children });
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
IntlayerProvider
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=intlayerProvider.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/intlayerProvider.tsx"],"sourcesContent":["import type { PropsWithChildren } from 'react';\nimport { IntlayerProviderContent } from 'react-intlayer';\nimport { intlayerPolyfill } from './intlayerPolyfill';\n\nintlayerPolyfill();\n\nexport const IntlayerProvider = ({ children }: PropsWithChildren) => (\n <IntlayerProviderContent>{children}</IntlayerProviderContent>\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOE;AANF,4BAAwC;AACxC,8BAAiC;AAAA,IAEjC,0CAAiB;AAEV,MAAM,mBAAmB,CAAC,EAAE,SAAS,MAC1C,4CAAC,iDAAyB,UAAS;","names":[]}
|
|
@@ -1,44 +1,53 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { prepareIntlayer } from "@intlayer/chokidar";
|
|
2
|
+
import { getAlias, getConfiguration } from "@intlayer/config";
|
|
3
|
+
import { getDefaultConfig } from "expo/metro-config";
|
|
3
4
|
import { resolve } from "metro-resolver";
|
|
5
|
+
import { resolve as pathResolve } from "path";
|
|
4
6
|
import { exclusionList } from "./exclusionList.mjs";
|
|
5
|
-
import { prepareIntlayer } from "@intlayer/chokidar";
|
|
6
7
|
const configMetroIntlayer = async (baseConfig) => {
|
|
8
|
+
let resolvedBaseConfig;
|
|
7
9
|
const intlayerConfig = getConfiguration();
|
|
10
|
+
if (baseConfig) {
|
|
11
|
+
resolvedBaseConfig = baseConfig;
|
|
12
|
+
} else {
|
|
13
|
+
resolvedBaseConfig = getDefaultConfig(intlayerConfig.content.baseDir);
|
|
14
|
+
}
|
|
8
15
|
await prepareIntlayer(intlayerConfig);
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
const alias = getAlias({
|
|
17
|
+
configuration: intlayerConfig,
|
|
18
|
+
formatter: (value) => pathResolve(value)
|
|
19
|
+
// get absolute path
|
|
20
|
+
});
|
|
12
21
|
const config = {
|
|
13
22
|
...baseConfig,
|
|
14
23
|
resolver: {
|
|
15
|
-
...
|
|
16
|
-
resolveRequest: (context, moduleName,
|
|
17
|
-
if (moduleName
|
|
18
|
-
return {
|
|
19
|
-
filePath: require.resolve(dictionariesPath),
|
|
20
|
-
type: "sourceFile"
|
|
21
|
-
};
|
|
22
|
-
} else if (moduleName === "@intlayer/config/built") {
|
|
24
|
+
...resolvedBaseConfig.resolver,
|
|
25
|
+
resolveRequest: (context, moduleName, ...args) => {
|
|
26
|
+
if (Object.keys(alias).includes(moduleName)) {
|
|
23
27
|
return {
|
|
24
|
-
filePath:
|
|
28
|
+
filePath: alias[moduleName],
|
|
25
29
|
type: "sourceFile"
|
|
26
30
|
};
|
|
27
|
-
}
|
|
31
|
+
}
|
|
32
|
+
if (moduleName === "@intlayer/config/client") {
|
|
28
33
|
return {
|
|
29
34
|
filePath: require.resolve("@intlayer/config/client"),
|
|
30
35
|
type: "sourceFile"
|
|
31
36
|
};
|
|
32
|
-
}
|
|
37
|
+
}
|
|
38
|
+
if (moduleName.startsWith("@intlayer/core/file")) {
|
|
33
39
|
return {
|
|
34
40
|
filePath: require.resolve(moduleName.replace("/file", "/file/browser")),
|
|
35
41
|
type: "sourceFile"
|
|
36
42
|
};
|
|
37
43
|
}
|
|
38
|
-
|
|
44
|
+
if (typeof context.resolveRequest === "function") {
|
|
45
|
+
return context.resolveRequest(context, moduleName, ...args);
|
|
46
|
+
}
|
|
47
|
+
return resolve(context, moduleName, ...args);
|
|
39
48
|
},
|
|
40
49
|
blockList: exclusionList([
|
|
41
|
-
...[
|
|
50
|
+
...[resolvedBaseConfig.resolver?.blockList ?? []].flat(),
|
|
42
51
|
// the following instruction should be replaced intlayerConfig.content.watchedFilesPattern
|
|
43
52
|
// but using watchedFilesPattern does not exclude the files properly for now
|
|
44
53
|
/.*\.content\.(?:ts|tsx|js|jsx|cjs|cjx|mjs|mjx|json)$/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/configMetroIntlayer.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/configMetroIntlayer.ts"],"sourcesContent":["import { prepareIntlayer } from '@intlayer/chokidar';\nimport { getAlias, getConfiguration } from '@intlayer/config';\nimport { getDefaultConfig } from 'expo/metro-config';\nimport { resolve } from 'metro-resolver';\nimport { resolve as pathResolve } from 'path';\nimport { exclusionList } from './exclusionList';\n\ntype MetroConfig = ReturnType<typeof getDefaultConfig>;\n\n/**\n * // metro.config.js\n * const { getDefaultConfig } = require(\"expo/metro-config\");\n * const { configMetroIntlayer } = require(\"react-native-intlayer/metro\");\n *\n * module.exports = (async () => {\n * const defaultConfig = getDefaultConfig(__dirname);\n *\n * return await configMetroIntlayer(defaultConfig);\n * })();\n * ```\n */\nexport const configMetroIntlayer = async (\n baseConfig?: MetroConfig\n): Promise<MetroConfig> => {\n let resolvedBaseConfig: MetroConfig;\n const intlayerConfig = getConfiguration();\n\n if (baseConfig) {\n resolvedBaseConfig = baseConfig;\n } else {\n resolvedBaseConfig = getDefaultConfig(intlayerConfig.content.baseDir);\n }\n\n await prepareIntlayer(intlayerConfig);\n\n const alias = getAlias({\n configuration: intlayerConfig,\n formatter: (value: string) => pathResolve(value), // get absolute path\n });\n\n const config = {\n ...baseConfig,\n\n resolver: {\n ...resolvedBaseConfig.resolver,\n resolveRequest: (context, moduleName, ...args) => {\n if (Object.keys(alias).includes(moduleName)) {\n return {\n filePath: alias[moduleName as keyof typeof alias],\n type: 'sourceFile',\n };\n }\n\n // Because metro does not resolve subodules, we need to resolve the path manually\n if (moduleName === '@intlayer/config/client') {\n return {\n filePath: require.resolve('@intlayer/config/client'),\n type: 'sourceFile',\n };\n }\n\n // Because metro does not resolve subodules, we need to resolve the path manually\n if (moduleName.startsWith('@intlayer/core/file')) {\n // Force React Native to use the correct transpiled version\n return {\n filePath: require.resolve(\n moduleName.replace('/file', '/file/browser')\n ),\n type: 'sourceFile',\n };\n }\n\n // Delegate to the default resolver to prevent infinite recursion\n if (typeof (context as any).resolveRequest === 'function') {\n return (context as any).resolveRequest(context, moduleName, ...args);\n }\n\n // Fallback to metro-resolver when no default resolver is present\n return resolve(context as any, moduleName, ...args);\n },\n blockList: exclusionList([\n ...[resolvedBaseConfig.resolver?.blockList ?? []].flat(),\n // the following instruction should be replaced intlayerConfig.content.watchedFilesPattern\n // but using watchedFilesPattern does not exclude the files properly for now\n /.*\\.content\\.(?:ts|tsx|js|jsx|cjs|cjx|mjs|mjx|json)$/,\n ]),\n },\n } satisfies MetroConfig;\n\n return config;\n};\n"],"mappings":"AAAA,SAAS,uBAAuB;AAChC,SAAS,UAAU,wBAAwB;AAC3C,SAAS,wBAAwB;AACjC,SAAS,eAAe;AACxB,SAAS,WAAW,mBAAmB;AACvC,SAAS,qBAAqB;AAgBvB,MAAM,sBAAsB,OACjC,eACyB;AACzB,MAAI;AACJ,QAAM,iBAAiB,iBAAiB;AAExC,MAAI,YAAY;AACd,yBAAqB;AAAA,EACvB,OAAO;AACL,yBAAqB,iBAAiB,eAAe,QAAQ,OAAO;AAAA,EACtE;AAEA,QAAM,gBAAgB,cAAc;AAEpC,QAAM,QAAQ,SAAS;AAAA,IACrB,eAAe;AAAA,IACf,WAAW,CAAC,UAAkB,YAAY,KAAK;AAAA;AAAA,EACjD,CAAC;AAED,QAAM,SAAS;AAAA,IACb,GAAG;AAAA,IAEH,UAAU;AAAA,MACR,GAAG,mBAAmB;AAAA,MACtB,gBAAgB,CAAC,SAAS,eAAe,SAAS;AAChD,YAAI,OAAO,KAAK,KAAK,EAAE,SAAS,UAAU,GAAG;AAC3C,iBAAO;AAAA,YACL,UAAU,MAAM,UAAgC;AAAA,YAChD,MAAM;AAAA,UACR;AAAA,QACF;AAGA,YAAI,eAAe,2BAA2B;AAC5C,iBAAO;AAAA,YACL,UAAU,gBAAgB,yBAAyB;AAAA,YACnD,MAAM;AAAA,UACR;AAAA,QACF;AAGA,YAAI,WAAW,WAAW,qBAAqB,GAAG;AAEhD,iBAAO;AAAA,YACL,UAAU,QAAQ,QAChB,WAAW,QAAQ,SAAS,eAAe,CAC7C;AAAA,YACA,MAAM;AAAA,UACR;AAAA,QACF;AAGA,YAAI,OAAQ,QAAgB,mBAAmB,YAAY;AACzD,iBAAQ,QAAgB,eAAe,SAAS,YAAY,GAAG,IAAI;AAAA,QACrE;AAGA,eAAO,QAAQ,SAAgB,YAAY,GAAG,IAAI;AAAA,MACpD;AAAA,MACA,WAAW,cAAc;AAAA,QACvB,GAAG,CAAC,mBAAmB,UAAU,aAAa,CAAC,CAAC,EAAE,KAAK;AAAA;AAAA;AAAA,QAGvD;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
package/dist/esm/index.mjs
CHANGED
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './intlayerPolyfill';\n"],"mappings":"AAAA,cAAc;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './intlayerPolyfill';\nexport * from './intlayerProvider';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { IntlayerProviderContent } from "react-intlayer";
|
|
3
|
+
import { intlayerPolyfill } from "./intlayerPolyfill.mjs";
|
|
4
|
+
intlayerPolyfill();
|
|
5
|
+
const IntlayerProvider = ({ children }) => /* @__PURE__ */ jsx(IntlayerProviderContent, { children });
|
|
6
|
+
export {
|
|
7
|
+
IntlayerProvider
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=intlayerProvider.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/intlayerProvider.tsx"],"sourcesContent":["import type { PropsWithChildren } from 'react';\nimport { IntlayerProviderContent } from 'react-intlayer';\nimport { intlayerPolyfill } from './intlayerPolyfill';\n\nintlayerPolyfill();\n\nexport const IntlayerProvider = ({ children }: PropsWithChildren) => (\n <IntlayerProviderContent>{children}</IntlayerProviderContent>\n);\n"],"mappings":"AAOE;AANF,SAAS,+BAA+B;AACxC,SAAS,wBAAwB;AAEjC,iBAAiB;AAEV,MAAM,mBAAmB,CAAC,EAAE,SAAS,MAC1C,oBAAC,2BAAyB,UAAS;","names":[]}
|
|
@@ -12,6 +12,6 @@ type MetroConfig = ReturnType<typeof getDefaultConfig>;
|
|
|
12
12
|
* })();
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
|
-
export declare const configMetroIntlayer: (baseConfig
|
|
15
|
+
export declare const configMetroIntlayer: (baseConfig?: MetroConfig) => Promise<MetroConfig>;
|
|
16
16
|
export {};
|
|
17
17
|
//# sourceMappingURL=configMetroIntlayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configMetroIntlayer.d.ts","sourceRoot":"","sources":["../../src/configMetroIntlayer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"configMetroIntlayer.d.ts","sourceRoot":"","sources":["../../src/configMetroIntlayer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAKrD,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,GAC9B,aAAa,WAAW,KACvB,OAAO,CAAC,WAAW,CAmErB,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intlayerProvider.d.ts","sourceRoot":"","sources":["../../src/intlayerProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAM/C,eAAO,MAAM,gBAAgB,GAAI,cAAc,iBAAiB,4CAE/D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-intlayer",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A React Native plugin for seamless internationalization (i18n), providing locale detection, redirection, and environment-based configuration",
|
|
6
6
|
"keywords": [
|
|
@@ -69,34 +69,39 @@
|
|
|
69
69
|
"./package.json"
|
|
70
70
|
],
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@intlayer/core": "6.1.
|
|
73
|
-
"@intlayer/
|
|
74
|
-
"
|
|
72
|
+
"@intlayer/core": "6.1.6",
|
|
73
|
+
"@intlayer/chokidar": "6.1.6",
|
|
74
|
+
"react-intlayer": "6.1.6",
|
|
75
|
+
"@intlayer/config": "6.1.6"
|
|
75
76
|
},
|
|
76
77
|
"devDependencies": {
|
|
77
78
|
"@types/node": "^24.5.2",
|
|
79
|
+
"@types/react": ">=18.0.0",
|
|
78
80
|
"@typescript-eslint/parser": "^8.44.1",
|
|
79
81
|
"concurrently": "^9.2.1",
|
|
80
82
|
"eslint": "^9.36.0",
|
|
81
|
-
"expo": "^
|
|
83
|
+
"expo": "^54.0.12",
|
|
82
84
|
"metro-resolver": "^0.82.0",
|
|
83
85
|
"prettier": "^3.6.2",
|
|
86
|
+
"react": ">=18.0.0",
|
|
84
87
|
"rimraf": "^6.0.1",
|
|
85
88
|
"tsc-alias": "^1.8.16",
|
|
86
89
|
"tsup": "^8.5.0",
|
|
87
90
|
"typescript": "^5.9.2",
|
|
88
91
|
"vitest": "^3.2.4",
|
|
92
|
+
"@utils/ts-config": "1.0.4",
|
|
89
93
|
"@utils/ts-config-types": "1.0.4",
|
|
90
94
|
"@utils/tsup-config": "1.0.4",
|
|
91
|
-
"@utils/eslint-config": "1.0.4"
|
|
92
|
-
"@utils/ts-config": "1.0.4"
|
|
95
|
+
"@utils/eslint-config": "1.0.4"
|
|
93
96
|
},
|
|
94
97
|
"peerDependencies": {
|
|
95
|
-
"expo": "
|
|
96
|
-
"metro-resolver": "
|
|
97
|
-
"
|
|
98
|
-
"@intlayer/
|
|
99
|
-
"
|
|
98
|
+
"expo": ">=52",
|
|
99
|
+
"metro-resolver": ">=0.80",
|
|
100
|
+
"react": ">=18.0.0",
|
|
101
|
+
"@intlayer/chokidar": "6.1.6",
|
|
102
|
+
"react-intlayer": "6.1.6",
|
|
103
|
+
"@intlayer/core": "6.1.6",
|
|
104
|
+
"@intlayer/config": "6.1.6"
|
|
100
105
|
},
|
|
101
106
|
"engines": {
|
|
102
107
|
"node": ">=14.18"
|