@react-native-firebase/ml 25.0.1 → 26.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/RNFBML.podspec +7 -6
  3. package/android/build.gradle +19 -0
  4. package/{dist/module/modular.js → android/src/reactnative/java/io/invertase/firebase/ml/NativeRNFBTurboML.java} +7 -13
  5. package/android/src/reactnative/java/io/invertase/firebase/ml/ReactNativeFirebaseMLPackage.java +1 -0
  6. package/android/src/reactnative/java/io/invertase/firebase/ml/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboMLSpec.java +35 -0
  7. package/android/src/reactnative/java/io/invertase/firebase/ml/generated/jni/CMakeLists.txt +36 -0
  8. package/android/src/reactnative/java/io/invertase/firebase/ml/generated/jni/RNFBMLTurboModules-generated.cpp +29 -0
  9. package/android/src/reactnative/java/io/invertase/firebase/ml/generated/jni/RNFBMLTurboModules.h +31 -0
  10. package/android/src/reactnative/java/io/invertase/firebase/ml/generated/jni/react/renderer/components/RNFBMLTurboModules/RNFBMLTurboModulesJSI-generated.cpp +22 -0
  11. package/android/src/reactnative/java/io/invertase/firebase/ml/generated/jni/react/renderer/components/RNFBMLTurboModules/RNFBMLTurboModulesJSI.h +64 -0
  12. package/dist/module/index.js +30 -3
  13. package/dist/module/index.js.map +1 -1
  14. package/dist/module/version.js +1 -1
  15. package/dist/typescript/lib/index.d.ts +15 -4
  16. package/dist/typescript/lib/index.d.ts.map +1 -1
  17. package/dist/typescript/lib/types/internal.d.ts +1 -1
  18. package/dist/typescript/lib/types/internal.d.ts.map +1 -1
  19. package/dist/typescript/lib/version.d.ts +1 -1
  20. package/ios/RNFBML/RNFBMLModule.h +23 -0
  21. package/{lib/modular.ts → ios/RNFBML/RNFBMLModule.mm} +15 -14
  22. package/ios/RNFBML.xcodeproj/project.pbxproj +4 -4
  23. package/ios/generated/RCTAppDependencyProvider.h +25 -0
  24. package/ios/generated/RCTAppDependencyProvider.mm +55 -0
  25. package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  26. package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  27. package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
  28. package/ios/generated/RCTThirdPartyComponentsProvider.mm +23 -0
  29. package/ios/generated/RNFBMLTurboModules/RNFBMLTurboModules-generated.mm +34 -0
  30. package/ios/generated/RNFBMLTurboModules/RNFBMLTurboModules.h +62 -0
  31. package/ios/generated/RNFBMLTurboModulesJSI-generated.cpp +22 -0
  32. package/ios/generated/RNFBMLTurboModulesJSI.h +64 -0
  33. package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
  34. package/lib/index.ts +37 -5
  35. package/lib/types/internal.ts +1 -1
  36. package/lib/version.ts +1 -1
  37. package/package.json +22 -4
  38. package/react-native.config.js +10 -0
  39. package/specs/NativeRNFBTurboML.ts +6 -0
  40. package/typedoc.json +1 -1
  41. package/dist/module/modular.js.map +0 -1
  42. package/dist/module/namespaced.js +0 -47
  43. package/dist/module/namespaced.js.map +0 -1
  44. package/dist/module/types/namespaced.js +0 -62
  45. package/dist/module/types/namespaced.js.map +0 -1
  46. package/dist/typescript/lib/modular.d.ts +0 -9
  47. package/dist/typescript/lib/modular.d.ts.map +0 -1
  48. package/dist/typescript/lib/namespaced.d.ts +0 -12
  49. package/dist/typescript/lib/namespaced.d.ts.map +0 -1
  50. package/dist/typescript/lib/types/namespaced.d.ts +0 -77
  51. package/dist/typescript/lib/types/namespaced.d.ts.map +0 -1
  52. package/lib/namespaced.ts +0 -71
  53. package/lib/types/namespaced.ts +0 -99
@@ -1,77 +0,0 @@
1
- import type { ReactNativeFirebase } from '@react-native-firebase/app';
2
- /**
3
- * Firebase ML package for React Native.
4
- *
5
- * #### Example 1
6
- *
7
- * Access the firebase export from the `ml` package:
8
- *
9
- * ```js
10
- * import { firebase } from '@react-native-firebase/ml';
11
- *
12
- * // firebase.ml().X
13
- * ```
14
- *
15
- * #### Example 2
16
- *
17
- * Using the default export from the `ml` package:
18
- *
19
- * ```js
20
- * import ml from '@react-native-firebase/ml';
21
- *
22
- * // ml().X
23
- * ```
24
- *
25
- * #### Example 3
26
- *
27
- * Using the default export from the `app` package:
28
- *
29
- * ```js
30
- * import firebase from '@react-native-firebase/app';
31
- * import '@react-native-firebase/ml';
32
- *
33
- * // firebase.ml().X
34
- * ```
35
- *
36
- * @firebase ml
37
- */
38
- /**
39
- * @deprecated Use the exported types directly instead.
40
- * FirebaseMLTypes namespace is kept for backwards compatibility.
41
- */
42
- export declare namespace FirebaseMLTypes {
43
- /**
44
- * @deprecated Use the exported types directly instead. FirebaseMLTypes namespace is kept for backwards compatibility.
45
- */
46
- type FirebaseModule = ReactNativeFirebase.FirebaseModule;
47
- /**
48
- * @deprecated Use the default export statics instead.
49
- */
50
- export interface Statics {
51
- /** @deprecated Use the default export statics instead. */
52
- SDK_VERSION: string;
53
- }
54
- /**
55
- * @deprecated Use the exported `FirebaseML` type instead.
56
- */
57
- export interface Module extends FirebaseModule {
58
- /**
59
- * @deprecated Use the exported `FirebaseML` type instead.
60
- *
61
- * The current `FirebaseApp` instance for this Firebase service.
62
- */
63
- app: ReactNativeFirebase.FirebaseApp;
64
- }
65
- export {};
66
- }
67
- declare module '@react-native-firebase/app' {
68
- namespace ReactNativeFirebase {
69
- interface Module {
70
- ml: FirebaseModuleWithStaticsAndApp<FirebaseMLTypes.Module, FirebaseMLTypes.Statics>;
71
- }
72
- interface FirebaseApp {
73
- ml(): FirebaseMLTypes.Module;
74
- }
75
- }
76
- }
77
- //# sourceMappingURL=namespaced.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"namespaced.d.ts","sourceRoot":"","sources":["../../../../lib/types/namespaced.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH;;;GAGG;AAEH,yBAAiB,eAAe,CAAC;IAC/B;;OAEG;IACH,KAAK,cAAc,GAAG,mBAAmB,CAAC,cAAc,CAAC;IAEzD;;OAEG;IACH,MAAM,WAAW,OAAO;QACtB,0DAA0D;QAC1D,WAAW,EAAE,MAAM,CAAC;KACrB;IAED;;OAEG;IACH,MAAM,WAAW,MAAO,SAAQ,cAAc;QAC5C;;;;WAIG;QACH,GAAG,EAAE,mBAAmB,CAAC,WAAW,CAAC;KACtC;;CACF;AAED,OAAO,QAAQ,4BAA4B,CAAC;IAC1C,UAAU,mBAAmB,CAAC;QAC5B,UAAU,MAAM;YACd,EAAE,EAAE,+BAA+B,CAAC,eAAe,CAAC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;SACtF;QAED,UAAU,WAAW;YACnB,EAAE,IAAI,eAAe,CAAC,MAAM,CAAC;SAC9B;KACF;CACF"}
package/lib/namespaced.ts DELETED
@@ -1,71 +0,0 @@
1
- /*
2
- * Copyright (c) 2016-present Invertase Limited & Contributors
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this library except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- *
16
- */
17
-
18
- import type { ReactNativeFirebase } from '@react-native-firebase/app';
19
- import {
20
- createModuleNamespace,
21
- FirebaseModule,
22
- getFirebaseRoot,
23
- } from '@react-native-firebase/app/dist/module/internal';
24
- import './types/internal';
25
- import type { FirebaseMLTypes } from './types/namespaced';
26
- import { version } from './version';
27
-
28
- const statics = {
29
- SDK_VERSION: version,
30
- };
31
-
32
- const namespace = 'ml';
33
-
34
- const nativeModuleName = 'RNFBMLModule';
35
-
36
- class FirebaseMLModule extends FirebaseModule<typeof nativeModuleName> {}
37
-
38
- type MLNamespace = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<
39
- FirebaseMLTypes.Module,
40
- FirebaseMLTypes.Statics
41
- > & {
42
- firebase: ReactNativeFirebase.Module;
43
- app(name?: string): ReactNativeFirebase.FirebaseApp;
44
- };
45
-
46
- // import { SDK_VERSION } from '@react-native-firebase/ml';
47
- export const SDK_VERSION = version;
48
-
49
- const defaultExport = createModuleNamespace({
50
- statics,
51
- version,
52
- namespace,
53
- nativeModuleName,
54
- nativeEvents: false,
55
- hasMultiAppSupport: true,
56
- hasCustomUrlOrRegionSupport: false,
57
- ModuleClass: FirebaseMLModule,
58
- }) as unknown as MLNamespace;
59
-
60
- export default defaultExport;
61
-
62
- // import ml, { firebase } from '@react-native-firebase/ml';
63
- // ml().X(...);
64
- // firebase.ml().X(...);
65
- export const firebase =
66
- getFirebaseRoot() as unknown as ReactNativeFirebase.FirebaseNamespacedExport<
67
- 'ml',
68
- FirebaseMLTypes.Module,
69
- FirebaseMLTypes.Statics,
70
- true
71
- >;
@@ -1,99 +0,0 @@
1
- /*
2
- * Copyright (c) 2016-present Invertase Limited & Contributors
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this library except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- *
16
- */
17
-
18
- import type { ReactNativeFirebase } from '@react-native-firebase/app';
19
-
20
- /**
21
- * Firebase ML package for React Native.
22
- *
23
- * #### Example 1
24
- *
25
- * Access the firebase export from the `ml` package:
26
- *
27
- * ```js
28
- * import { firebase } from '@react-native-firebase/ml';
29
- *
30
- * // firebase.ml().X
31
- * ```
32
- *
33
- * #### Example 2
34
- *
35
- * Using the default export from the `ml` package:
36
- *
37
- * ```js
38
- * import ml from '@react-native-firebase/ml';
39
- *
40
- * // ml().X
41
- * ```
42
- *
43
- * #### Example 3
44
- *
45
- * Using the default export from the `app` package:
46
- *
47
- * ```js
48
- * import firebase from '@react-native-firebase/app';
49
- * import '@react-native-firebase/ml';
50
- *
51
- * // firebase.ml().X
52
- * ```
53
- *
54
- * @firebase ml
55
- */
56
- /**
57
- * @deprecated Use the exported types directly instead.
58
- * FirebaseMLTypes namespace is kept for backwards compatibility.
59
- */
60
- /* eslint-disable @typescript-eslint/no-namespace */
61
- export namespace FirebaseMLTypes {
62
- /**
63
- * @deprecated Use the exported types directly instead. FirebaseMLTypes namespace is kept for backwards compatibility.
64
- */
65
- type FirebaseModule = ReactNativeFirebase.FirebaseModule;
66
-
67
- /**
68
- * @deprecated Use the default export statics instead.
69
- */
70
- export interface Statics {
71
- /** @deprecated Use the default export statics instead. */
72
- SDK_VERSION: string;
73
- }
74
-
75
- /**
76
- * @deprecated Use the exported `FirebaseML` type instead.
77
- */
78
- export interface Module extends FirebaseModule {
79
- /**
80
- * @deprecated Use the exported `FirebaseML` type instead.
81
- *
82
- * The current `FirebaseApp` instance for this Firebase service.
83
- */
84
- app: ReactNativeFirebase.FirebaseApp;
85
- }
86
- }
87
-
88
- declare module '@react-native-firebase/app' {
89
- namespace ReactNativeFirebase {
90
- interface Module {
91
- ml: FirebaseModuleWithStaticsAndApp<FirebaseMLTypes.Module, FirebaseMLTypes.Statics>;
92
- }
93
-
94
- interface FirebaseApp {
95
- ml(): FirebaseMLTypes.Module;
96
- }
97
- }
98
- }
99
- /* eslint-enable @typescript-eslint/no-namespace */