gt-react-native 0.0.1-alpha.9 → 0.0.2-alpha.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/README.md +34 -11
- package/lib/commonjs/NativeGtReactNative.js +9 -0
- package/lib/commonjs/NativeGtReactNative.js.map +1 -0
- package/lib/commonjs/errors-dir/constants.js +8 -0
- package/lib/commonjs/errors-dir/constants.js.map +1 -0
- package/lib/commonjs/errors-dir/errors.js +10 -0
- package/lib/commonjs/errors-dir/errors.js.map +1 -0
- package/lib/commonjs/errors-dir/warnings.js +18 -0
- package/lib/commonjs/errors-dir/warnings.js.map +1 -0
- package/lib/commonjs/index.js +158 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/internal.js +13 -0
- package/lib/commonjs/internal.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/plugin-dir/index.js +54 -0
- package/lib/commonjs/plugin-dir/index.js.map +1 -0
- package/lib/commonjs/plugin-dir/types.js +2 -0
- package/lib/commonjs/plugin-dir/types.js.map +1 -0
- package/lib/commonjs/plugin-dir/utils/resolveLocales.js +74 -0
- package/lib/commonjs/plugin-dir/utils/resolveLocales.js.map +1 -0
- package/lib/commonjs/plugin.js +14 -0
- package/lib/commonjs/plugin.js.map +1 -0
- package/lib/commonjs/provider/GTProvider.js +24 -0
- package/lib/commonjs/provider/GTProvider.js.map +1 -0
- package/lib/commonjs/provider/hooks/locale/useDetermineLocale.js +146 -0
- package/lib/commonjs/provider/hooks/locale/useDetermineLocale.js.map +1 -0
- package/lib/commonjs/provider/hooks/useRegionState.js +47 -0
- package/lib/commonjs/provider/hooks/useRegionState.js.map +1 -0
- package/lib/commonjs/tools/testLocalePolyfill.js +68 -0
- package/lib/commonjs/tools/testLocalePolyfill.js.map +1 -0
- package/lib/commonjs/types/config.js +6 -0
- package/lib/commonjs/types/config.js.map +1 -0
- package/lib/commonjs/utils/getNativeLocales.js +58 -0
- package/lib/commonjs/utils/getNativeLocales.js.map +1 -0
- package/lib/commonjs/utils/nativeStore.js +39 -0
- package/lib/commonjs/utils/nativeStore.js.map +1 -0
- package/lib/commonjs/utils/utils.js +17 -0
- package/lib/commonjs/utils/utils.js.map +1 -0
- package/lib/module/errors-dir/constants.js +1 -1
- package/lib/module/errors-dir/constants.js.map +1 -1
- package/lib/module/errors-dir/errors.js +5 -0
- package/lib/module/errors-dir/errors.js.map +1 -0
- package/lib/module/errors-dir/warnings.js +12 -0
- package/lib/module/errors-dir/warnings.js.map +1 -0
- package/lib/module/index.js +1 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal.js +4 -0
- package/lib/module/internal.js.map +1 -0
- package/lib/module/plugin-dir/index.js +49 -0
- package/lib/module/plugin-dir/index.js.map +1 -0
- package/lib/module/plugin-dir/types.js +2 -0
- package/lib/module/plugin-dir/types.js.map +1 -0
- package/lib/module/plugin-dir/utils/resolveLocales.js +69 -0
- package/lib/module/plugin-dir/utils/resolveLocales.js.map +1 -0
- package/lib/module/plugin.js +4 -0
- package/lib/module/plugin.js.map +1 -0
- package/lib/module/tools/testLocalePolyfill.js +64 -0
- package/lib/module/tools/testLocalePolyfill.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/NativeGtReactNative.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/errors-dir/constants.d.ts +2 -0
- package/lib/typescript/commonjs/src/errors-dir/constants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/errors-dir/errors.d.ts +2 -0
- package/lib/typescript/commonjs/src/errors-dir/errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/errors-dir/warnings.d.ts +4 -0
- package/lib/typescript/commonjs/src/errors-dir/warnings.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/index.d.ts +1 -2
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internal.d.ts +2 -0
- package/lib/typescript/commonjs/src/internal.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/plugin-dir/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/plugin-dir/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/plugin-dir/types.d.ts +10 -0
- package/lib/typescript/commonjs/src/plugin-dir/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/plugin-dir/utils/resolveLocales.d.ts +13 -0
- package/lib/typescript/commonjs/src/plugin-dir/utils/resolveLocales.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/plugin.d.ts +2 -0
- package/lib/typescript/commonjs/src/plugin.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/provider/GTProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/provider/hooks/locale/useDetermineLocale.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/provider/hooks/useRegionState.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/tools/testLocalePolyfill.d.ts +12 -0
- package/lib/typescript/commonjs/src/tools/testLocalePolyfill.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/config.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/getNativeLocales.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/nativeStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/vitest.config.d.ts +3 -0
- package/lib/typescript/commonjs/vitest.config.d.ts.map +1 -0
- package/lib/typescript/module/src/NativeGtReactNative.d.ts +10 -0
- package/lib/typescript/module/src/NativeGtReactNative.d.ts.map +1 -0
- package/lib/typescript/module/src/errors-dir/constants.d.ts +2 -0
- package/lib/typescript/module/src/errors-dir/constants.d.ts.map +1 -0
- package/lib/typescript/module/src/errors-dir/errors.d.ts +2 -0
- package/lib/typescript/module/src/errors-dir/errors.d.ts.map +1 -0
- package/lib/typescript/module/src/errors-dir/warnings.d.ts +4 -0
- package/lib/typescript/module/src/errors-dir/warnings.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +6 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/internal.d.ts +2 -0
- package/lib/typescript/module/src/internal.d.ts.map +1 -0
- package/lib/typescript/module/src/plugin-dir/index.d.ts +6 -0
- package/lib/typescript/module/src/plugin-dir/index.d.ts.map +1 -0
- package/lib/typescript/module/src/plugin-dir/types.d.ts +10 -0
- package/lib/typescript/module/src/plugin-dir/types.d.ts.map +1 -0
- package/lib/typescript/module/src/plugin-dir/utils/resolveLocales.d.ts +13 -0
- package/lib/typescript/module/src/plugin-dir/utils/resolveLocales.d.ts.map +1 -0
- package/lib/typescript/module/src/plugin.d.ts +2 -0
- package/lib/typescript/module/src/plugin.d.ts.map +1 -0
- package/lib/typescript/module/src/provider/GTProvider.d.ts +4 -0
- package/lib/typescript/module/src/provider/GTProvider.d.ts.map +1 -0
- package/lib/typescript/module/src/provider/hooks/locale/useDetermineLocale.d.ts +4 -0
- package/lib/typescript/module/src/provider/hooks/locale/useDetermineLocale.d.ts.map +1 -0
- package/lib/typescript/module/src/provider/hooks/useRegionState.d.ts +3 -0
- package/lib/typescript/module/src/provider/hooks/useRegionState.d.ts.map +1 -0
- package/lib/typescript/module/src/tools/testLocalePolyfill.d.ts +12 -0
- package/lib/typescript/module/src/tools/testLocalePolyfill.d.ts.map +1 -0
- package/lib/typescript/module/src/types/config.d.ts +30 -0
- package/lib/typescript/module/src/types/config.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/getNativeLocales.d.ts +10 -0
- package/lib/typescript/module/src/utils/getNativeLocales.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/nativeStore.d.ts +16 -0
- package/lib/typescript/module/src/utils/nativeStore.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/utils.d.ts +3 -0
- package/lib/typescript/module/src/utils/utils.d.ts.map +1 -0
- package/lib/typescript/module/vitest.config.d.ts +3 -0
- package/lib/typescript/module/vitest.config.d.ts.map +1 -0
- package/package.json +48 -17
- package/src/errors-dir/constants.ts +1 -1
- package/src/errors-dir/errors.ts +3 -0
- package/src/errors-dir/warnings.ts +14 -0
- package/src/index.tsx +0 -2
- package/src/internal.ts +1 -0
- package/src/plugin-dir/index.ts +80 -0
- package/src/plugin-dir/types.ts +10 -0
- package/src/plugin-dir/utils/resolveLocales.ts +95 -0
- package/src/plugin.ts +1 -0
- package/src/tools/testLocalePolyfill.ts +82 -0
- package/android/app/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeGtReactNativeSpec.java +0 -51
- package/android/app/build/generated/source/codegen/jni/CMakeLists.txt +0 -28
- package/android/app/build/generated/source/codegen/jni/GtReactNativeSpec-generated.cpp +0 -50
- package/android/app/build/generated/source/codegen/jni/GtReactNativeSpec.h +0 -31
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/GtReactNativeSpec/GtReactNativeSpecJSI-generated.cpp +0 -51
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/GtReactNativeSpec/GtReactNativeSpecJSI.h +0 -98
- package/lib/module/utils/polyfill.js +0 -39
- package/lib/module/utils/polyfill.js.map +0 -1
- package/lib/typescript/src/NativeGtReactNative.d.ts.map +0 -1
- package/lib/typescript/src/errors-dir/constants.d.ts +0 -2
- package/lib/typescript/src/errors-dir/constants.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/lib/typescript/src/provider/GTProvider.d.ts.map +0 -1
- package/lib/typescript/src/provider/hooks/locale/useDetermineLocale.d.ts.map +0 -1
- package/lib/typescript/src/provider/hooks/useRegionState.d.ts.map +0 -1
- package/lib/typescript/src/types/config.d.ts.map +0 -1
- package/lib/typescript/src/utils/getNativeLocales.d.ts.map +0 -1
- package/lib/typescript/src/utils/nativeStore.d.ts.map +0 -1
- package/lib/typescript/src/utils/polyfill.d.ts +0 -29
- package/lib/typescript/src/utils/polyfill.d.ts.map +0 -1
- package/lib/typescript/src/utils/utils.d.ts.map +0 -1
- package/src/utils/polyfill.ts +0 -51
- /package/lib/typescript/{src → commonjs/src}/NativeGtReactNative.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/provider/GTProvider.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/provider/hooks/locale/useDetermineLocale.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/provider/hooks/useRegionState.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/types/config.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/utils/getNativeLocales.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/utils/nativeStore.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/utils/utils.d.ts +0 -0
- /package/lib/typescript/{package.json → module/package.json} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getNativeLocales.d.ts","sourceRoot":"","sources":["../../../../src/utils/getNativeLocales.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,EAAE,CAa3C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nativeStore.d.ts","sourceRoot":"","sources":["../../../../src/utils/nativeStore.ts"],"names":[],"mappings":"AAGA;;GAEG;AAEH;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKzD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAM/D"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import '@formatjs/intl-getcanonicallocales/polyfill';
|
|
2
|
-
import '@formatjs/intl-locale/polyfill';
|
|
3
|
-
import '@formatjs/intl-displaynames/polyfill';
|
|
4
|
-
import '@formatjs/intl-listformat/polyfill';
|
|
5
|
-
import '@formatjs/intl-pluralrules/polyfill-force';
|
|
6
|
-
import '@formatjs/intl-numberformat/polyfill';
|
|
7
|
-
import '@formatjs/intl-relativetimeformat/polyfill';
|
|
8
|
-
import '@formatjs/intl-datetimeformat/polyfill';
|
|
9
|
-
import '@formatjs/intl-datetimeformat/add-all-tz';
|
|
10
|
-
import '@formatjs/intl-displaynames/locale-data/en';
|
|
11
|
-
import '@formatjs/intl-displaynames/locale-data/zh';
|
|
12
|
-
import '@formatjs/intl-displaynames/locale-data/es';
|
|
13
|
-
import '@formatjs/intl-listformat/locale-data/en';
|
|
14
|
-
import '@formatjs/intl-listformat/locale-data/zh';
|
|
15
|
-
import '@formatjs/intl-listformat/locale-data/es';
|
|
16
|
-
import '@formatjs/intl-pluralrules/locale-data/en';
|
|
17
|
-
import '@formatjs/intl-pluralrules/locale-data/zh';
|
|
18
|
-
import '@formatjs/intl-pluralrules/locale-data/es';
|
|
19
|
-
import '@formatjs/intl-numberformat/locale-data/en';
|
|
20
|
-
import '@formatjs/intl-numberformat/locale-data/zh';
|
|
21
|
-
import '@formatjs/intl-numberformat/locale-data/es';
|
|
22
|
-
import '@formatjs/intl-relativetimeformat/locale-data/en';
|
|
23
|
-
import '@formatjs/intl-relativetimeformat/locale-data/zh';
|
|
24
|
-
import '@formatjs/intl-relativetimeformat/locale-data/es';
|
|
25
|
-
import '@formatjs/intl-datetimeformat/locale-data/en';
|
|
26
|
-
import '@formatjs/intl-datetimeformat/locale-data/zh';
|
|
27
|
-
import '@formatjs/intl-datetimeformat/locale-data/es';
|
|
28
|
-
export declare function polyfillLocales(locales: string[]): Promise<void>;
|
|
29
|
-
//# sourceMappingURL=polyfill.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"polyfill.d.ts","sourceRoot":"","sources":["../../../../src/utils/polyfill.ts"],"names":[],"mappings":"AAGA,OAAO,6CAA6C,CAAC;AACrD,OAAO,gCAAgC,CAAC;AACxC,OAAO,sCAAsC,CAAC;AAC9C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,2CAA2C,CAAC;AACnD,OAAO,sCAAsC,CAAC;AAC9C,OAAO,4CAA4C,CAAC;AACpD,OAAO,wCAAwC,CAAC;AAChD,OAAO,0CAA0C,CAAC;AAElD,OAAO,4CAA4C,CAAC;AACpD,OAAO,4CAA4C,CAAC;AACpD,OAAO,4CAA4C,CAAC;AAEpD,OAAO,0CAA0C,CAAC;AAClD,OAAO,0CAA0C,CAAC;AAClD,OAAO,0CAA0C,CAAC;AAElD,OAAO,2CAA2C,CAAC;AACnD,OAAO,2CAA2C,CAAC;AACnD,OAAO,2CAA2C,CAAC;AAEnD,OAAO,4CAA4C,CAAC;AACpD,OAAO,4CAA4C,CAAC;AACpD,OAAO,4CAA4C,CAAC;AAEpD,OAAO,kDAAkD,CAAC;AAC1D,OAAO,kDAAkD,CAAC;AAC1D,OAAO,kDAAkD,CAAC;AAE1D,OAAO,8CAA8C,CAAC;AACtD,OAAO,8CAA8C,CAAC;AACtD,OAAO,8CAA8C,CAAC;AAatD,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,iBAEtD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,sCAAsC,CAAC;AAE9C,wBAAgB,eAAe,CAAC,MAAM,EAAE,iBAAiB,GAAG,iBAAiB,CAM5E"}
|
package/src/utils/polyfill.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
// Intl object not natively supported, see: https://formatjs.github.io/docs/polyfills
|
|
2
|
-
// See also: The Ultimate Guide to React Native Optimization - page 124
|
|
3
|
-
|
|
4
|
-
import '@formatjs/intl-getcanonicallocales/polyfill';
|
|
5
|
-
import '@formatjs/intl-locale/polyfill';
|
|
6
|
-
import '@formatjs/intl-displaynames/polyfill';
|
|
7
|
-
import '@formatjs/intl-listformat/polyfill';
|
|
8
|
-
import '@formatjs/intl-pluralrules/polyfill-force'; // https://github.com/formatjs/formatjs/issues/4463
|
|
9
|
-
import '@formatjs/intl-numberformat/polyfill';
|
|
10
|
-
import '@formatjs/intl-relativetimeformat/polyfill';
|
|
11
|
-
import '@formatjs/intl-datetimeformat/polyfill';
|
|
12
|
-
import '@formatjs/intl-datetimeformat/add-all-tz';
|
|
13
|
-
|
|
14
|
-
import '@formatjs/intl-displaynames/locale-data/en';
|
|
15
|
-
import '@formatjs/intl-displaynames/locale-data/zh';
|
|
16
|
-
import '@formatjs/intl-displaynames/locale-data/es';
|
|
17
|
-
|
|
18
|
-
import '@formatjs/intl-listformat/locale-data/en';
|
|
19
|
-
import '@formatjs/intl-listformat/locale-data/zh';
|
|
20
|
-
import '@formatjs/intl-listformat/locale-data/es';
|
|
21
|
-
|
|
22
|
-
import '@formatjs/intl-pluralrules/locale-data/en';
|
|
23
|
-
import '@formatjs/intl-pluralrules/locale-data/zh';
|
|
24
|
-
import '@formatjs/intl-pluralrules/locale-data/es';
|
|
25
|
-
|
|
26
|
-
import '@formatjs/intl-numberformat/locale-data/en';
|
|
27
|
-
import '@formatjs/intl-numberformat/locale-data/zh';
|
|
28
|
-
import '@formatjs/intl-numberformat/locale-data/es';
|
|
29
|
-
|
|
30
|
-
import '@formatjs/intl-relativetimeformat/locale-data/en';
|
|
31
|
-
import '@formatjs/intl-relativetimeformat/locale-data/zh';
|
|
32
|
-
import '@formatjs/intl-relativetimeformat/locale-data/es';
|
|
33
|
-
|
|
34
|
-
import '@formatjs/intl-datetimeformat/locale-data/en';
|
|
35
|
-
import '@formatjs/intl-datetimeformat/locale-data/zh';
|
|
36
|
-
import '@formatjs/intl-datetimeformat/locale-data/es';
|
|
37
|
-
|
|
38
|
-
async function polyfillLocale(locale: string) {
|
|
39
|
-
await Promise.all([
|
|
40
|
-
import(`@formatjs/intl-displaynames/locale-data/${locale}`),
|
|
41
|
-
import(`@formatjs/intl-listformat/locale-data/${locale}`),
|
|
42
|
-
import(`@formatjs/intl-pluralrules/locale-data/${locale}`),
|
|
43
|
-
import(`@formatjs/intl-numberformat/locale-data/${locale}`),
|
|
44
|
-
import(`@formatjs/intl-relativetimeformat/locale-data/${locale}`),
|
|
45
|
-
import(`@formatjs/intl-datetimeformat/locale-data/${locale}`),
|
|
46
|
-
]);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export async function polyfillLocales(locales: string[]) {
|
|
50
|
-
await Promise.all(locales.map(polyfillLocale));
|
|
51
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|