@react-native-firebase/ml 24.1.1 → 25.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/CHANGELOG.md +4 -0
- package/dist/module/index.js +23 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/modular.js +33 -0
- package/dist/module/modular.js.map +1 -0
- package/{lib/index.js → dist/module/namespaced.js} +12 -22
- package/dist/module/namespaced.js.map +1 -0
- package/dist/module/package.json +1 -0
- package/dist/module/types/internal.js +2 -0
- package/dist/module/types/internal.js.map +1 -0
- package/dist/module/types/ml.js +4 -0
- package/dist/module/types/ml.js.map +1 -0
- package/dist/module/types/namespaced.js +62 -0
- package/dist/module/types/namespaced.js.map +1 -0
- package/dist/module/version.js +5 -0
- package/dist/module/version.js.map +1 -0
- package/dist/typescript/lib/index.d.ts +6 -0
- package/dist/typescript/lib/index.d.ts.map +1 -0
- package/dist/typescript/lib/modular.d.ts +9 -0
- package/dist/typescript/lib/modular.d.ts.map +1 -0
- package/dist/typescript/lib/namespaced.d.ts +12 -0
- package/dist/typescript/lib/namespaced.d.ts.map +1 -0
- package/dist/typescript/lib/types/internal.d.ts +13 -0
- package/dist/typescript/lib/types/internal.d.ts.map +1 -0
- package/dist/typescript/lib/types/ml.d.ts +14 -0
- package/dist/typescript/lib/types/ml.d.ts.map +1 -0
- package/dist/typescript/lib/types/namespaced.d.ts +77 -0
- package/dist/typescript/lib/types/namespaced.d.ts.map +1 -0
- package/dist/typescript/lib/version.d.ts +2 -0
- package/dist/typescript/lib/version.d.ts.map +1 -0
- package/dist/typescript/package.json +1 -0
- package/lib/index.ts +25 -0
- package/lib/modular.ts +32 -0
- package/lib/namespaced.ts +71 -0
- package/lib/types/internal.ts +29 -0
- package/lib/types/ml.ts +32 -0
- package/lib/{index.d.ts → types/namespaced.ts} +22 -26
- package/lib/version.ts +2 -0
- package/package.json +41 -7
- package/tsconfig.json +15 -0
- package/typedoc.json +1 -3
- package/lib/modular/index.d.ts +0 -14
- package/lib/modular/index.js +0 -17
- package/lib/version.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [25.0.0](https://github.com/invertase/react-native-firebase/compare/v24.0.0...v25.0.0) (2026-06-23)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @react-native-firebase/ml
|
|
9
|
+
|
|
6
10
|
## [24.1.1](https://github.com/invertase/react-native-firebase/compare/v24.1.0...v24.1.1) (2026-06-10)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @react-native-firebase/ml
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this library except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
export * from "./modular.js";
|
|
21
|
+
export * from "./namespaced.js";
|
|
22
|
+
export { default } from "./namespaced.js";
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["default"],"sourceRoot":"../../lib","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,cAAW;AAMzB,cAAc,iBAAc;AAC5B,SAASA,OAAO,QAAQ,iBAAc","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this library except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { getApp } from '@react-native-firebase/app';
|
|
21
|
+
/**
|
|
22
|
+
* Returns the {@link FirebaseML} instance for the default or given {@link FirebaseApp}.
|
|
23
|
+
*
|
|
24
|
+
* @param app - The Firebase `FirebaseApp` to use. When omitted, the default app is used.
|
|
25
|
+
* @returns The ML service instance for that app.
|
|
26
|
+
*/
|
|
27
|
+
export function getML(app) {
|
|
28
|
+
if (app) {
|
|
29
|
+
return getApp(app.name).ml();
|
|
30
|
+
}
|
|
31
|
+
return getApp().ml();
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=modular.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getApp","getML","app","name","ml"],"sourceRoot":"../../lib","sources":["modular.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,4BAA4B;AAGnD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,KAAKA,CAACC,GAAiB,EAAc;EACnD,IAAIA,GAAG,EAAE;IACP,OAAOF,MAAM,CAACE,GAAG,CAACC,IAAI,CAAC,CAACC,EAAE,CAAC,CAAC;EAC9B;EACA,OAAOJ,MAAM,CAAC,CAAC,CAACI,EAAE,CAAC,CAAC;AACtB","ignoreList":[]}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
/*
|
|
2
4
|
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
3
5
|
*
|
|
@@ -15,29 +17,18 @@
|
|
|
15
17
|
*
|
|
16
18
|
*/
|
|
17
19
|
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const statics = {};
|
|
26
|
-
|
|
20
|
+
import { createModuleNamespace, FirebaseModule, getFirebaseRoot } from '@react-native-firebase/app/dist/module/internal';
|
|
21
|
+
import "./types/internal.js";
|
|
22
|
+
import { version } from "./version.js";
|
|
23
|
+
const statics = {
|
|
24
|
+
SDK_VERSION: version
|
|
25
|
+
};
|
|
27
26
|
const namespace = 'ml';
|
|
28
|
-
|
|
29
27
|
const nativeModuleName = 'RNFBMLModule';
|
|
30
|
-
|
|
31
28
|
class FirebaseMLModule extends FirebaseModule {}
|
|
32
|
-
|
|
33
29
|
// import { SDK_VERSION } from '@react-native-firebase/ml';
|
|
34
30
|
export const SDK_VERSION = version;
|
|
35
|
-
|
|
36
|
-
export * from './modular';
|
|
37
|
-
|
|
38
|
-
// import ML from '@react-native-firebase/ml';
|
|
39
|
-
// ml().X(...);
|
|
40
|
-
export default createModuleNamespace({
|
|
31
|
+
const defaultExport = createModuleNamespace({
|
|
41
32
|
statics,
|
|
42
33
|
version,
|
|
43
34
|
namespace,
|
|
@@ -45,13 +36,12 @@ export default createModuleNamespace({
|
|
|
45
36
|
nativeEvents: false,
|
|
46
37
|
hasMultiAppSupport: true,
|
|
47
38
|
hasCustomUrlOrRegionSupport: false,
|
|
48
|
-
ModuleClass: FirebaseMLModule
|
|
39
|
+
ModuleClass: FirebaseMLModule
|
|
49
40
|
});
|
|
41
|
+
export default defaultExport;
|
|
50
42
|
|
|
51
43
|
// import ml, { firebase } from '@react-native-firebase/ml';
|
|
52
44
|
// ml().X(...);
|
|
53
45
|
// firebase.ml().X(...);
|
|
54
46
|
export const firebase = getFirebaseRoot();
|
|
55
|
-
|
|
56
|
-
// e.g.
|
|
57
|
-
// // import { MLCloudTextRecognizerModelType } from '@react-native-firebase/ml';
|
|
47
|
+
//# sourceMappingURL=namespaced.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createModuleNamespace","FirebaseModule","getFirebaseRoot","version","statics","SDK_VERSION","namespace","nativeModuleName","FirebaseMLModule","defaultExport","nativeEvents","hasMultiAppSupport","hasCustomUrlOrRegionSupport","ModuleClass","firebase"],"sourceRoot":"../../lib","sources":["namespaced.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SACEA,qBAAqB,EACrBC,cAAc,EACdC,eAAe,QACV,iDAAiD;AACxD,OAAO,qBAAkB;AAEzB,SAASC,OAAO,QAAQ,cAAW;AAEnC,MAAMC,OAAO,GAAG;EACdC,WAAW,EAAEF;AACf,CAAC;AAED,MAAMG,SAAS,GAAG,IAAI;AAEtB,MAAMC,gBAAgB,GAAG,cAAc;AAEvC,MAAMC,gBAAgB,SAASP,cAAc,CAA0B;AAUvE;AACA,OAAO,MAAMI,WAAW,GAAGF,OAAO;AAElC,MAAMM,aAAa,GAAGT,qBAAqB,CAAC;EAC1CI,OAAO;EACPD,OAAO;EACPG,SAAS;EACTC,gBAAgB;EAChBG,YAAY,EAAE,KAAK;EACnBC,kBAAkB,EAAE,IAAI;EACxBC,2BAA2B,EAAE,KAAK;EAClCC,WAAW,EAAEL;AACf,CAAC,CAA2B;AAE5B,eAAeC,aAAa;;AAE5B;AACA;AACA;AACA,OAAO,MAAMK,QAAQ,GACnBZ,eAAe,CAAC,CAKf","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../lib","sources":["types/internal.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../lib","sources":["types/ml.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this library except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Firebase ML package for React Native.
|
|
21
|
+
*
|
|
22
|
+
* #### Example 1
|
|
23
|
+
*
|
|
24
|
+
* Access the firebase export from the `ml` package:
|
|
25
|
+
*
|
|
26
|
+
* ```js
|
|
27
|
+
* import { firebase } from '@react-native-firebase/ml';
|
|
28
|
+
*
|
|
29
|
+
* // firebase.ml().X
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* #### Example 2
|
|
33
|
+
*
|
|
34
|
+
* Using the default export from the `ml` package:
|
|
35
|
+
*
|
|
36
|
+
* ```js
|
|
37
|
+
* import ml from '@react-native-firebase/ml';
|
|
38
|
+
*
|
|
39
|
+
* // ml().X
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* #### Example 3
|
|
43
|
+
*
|
|
44
|
+
* Using the default export from the `app` package:
|
|
45
|
+
*
|
|
46
|
+
* ```js
|
|
47
|
+
* import firebase from '@react-native-firebase/app';
|
|
48
|
+
* import '@react-native-firebase/ml';
|
|
49
|
+
*
|
|
50
|
+
* // firebase.ml().X
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @firebase ml
|
|
54
|
+
*/
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated Use the exported types directly instead.
|
|
57
|
+
* FirebaseMLTypes namespace is kept for backwards compatibility.
|
|
58
|
+
*/
|
|
59
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
60
|
+
export let FirebaseMLTypes;
|
|
61
|
+
/* eslint-enable @typescript-eslint/no-namespace */
|
|
62
|
+
//# sourceMappingURL=namespaced.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FirebaseMLTypes"],"sourceRoot":"../../../lib","sources":["types/namespaced.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA,WACiBA,eAAe;AAsChC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["version"],"sourceRoot":"../../lib","sources":["version.ts"],"mappings":";;AAAA;AACA,OAAO,MAAMA,OAAO,GAAG,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/index.ts"],"names":[],"mappings":"AAiBA,cAAc,WAAW,CAAC;AAE1B,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE1D,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FirebaseApp, FirebaseML } from './types/ml';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the {@link FirebaseML} instance for the default or given {@link FirebaseApp}.
|
|
4
|
+
*
|
|
5
|
+
* @param app - The Firebase `FirebaseApp` to use. When omitted, the default app is used.
|
|
6
|
+
* @returns The ML service instance for that app.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getML(app?: FirebaseApp): FirebaseML;
|
|
9
|
+
//# sourceMappingURL=modular.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modular.d.ts","sourceRoot":"","sources":["../../../lib/modular.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE1D;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,GAAG,CAAC,EAAE,WAAW,GAAG,UAAU,CAKnD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNativeFirebase } from '@react-native-firebase/app';
|
|
2
|
+
import './types/internal';
|
|
3
|
+
import type { FirebaseMLTypes } from './types/namespaced';
|
|
4
|
+
type MLNamespace = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<FirebaseMLTypes.Module, FirebaseMLTypes.Statics> & {
|
|
5
|
+
firebase: ReactNativeFirebase.Module;
|
|
6
|
+
app(name?: string): ReactNativeFirebase.FirebaseApp;
|
|
7
|
+
};
|
|
8
|
+
export declare const SDK_VERSION = "25.0.0";
|
|
9
|
+
declare const defaultExport: MLNamespace;
|
|
10
|
+
export default defaultExport;
|
|
11
|
+
export declare const firebase: ReactNativeFirebase.FirebaseNamespacedExport<"ml", FirebaseMLTypes.Module, FirebaseMLTypes.Statics, true>;
|
|
12
|
+
//# sourceMappingURL=namespaced.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namespaced.d.ts","sourceRoot":"","sources":["../../../lib/namespaced.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAMtE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAa1D,KAAK,WAAW,GAAG,mBAAmB,CAAC,+BAA+B,CACpE,eAAe,CAAC,MAAM,EACtB,eAAe,CAAC,OAAO,CACxB,GAAG;IACF,QAAQ,EAAE,mBAAmB,CAAC,MAAM,CAAC;IACrC,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,mBAAmB,CAAC,WAAW,CAAC;CACrD,CAAC;AAGF,eAAO,MAAM,WAAW,WAAU,CAAC;AAEnC,QAAA,MAAM,aAAa,EASF,WAAW,CAAC;AAE7B,eAAe,aAAa,CAAC;AAK7B,eAAO,MAAM,QAAQ,EACa,mBAAmB,CAAC,wBAAwB,CAC1E,IAAI,EACJ,eAAe,CAAC,MAAM,EACtB,eAAe,CAAC,OAAO,EACvB,IAAI,CACL,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wrapped native module contract for `RNFBMLModule`.
|
|
3
|
+
* The namespaced `FirebaseMLModule` implementation does not call into native from JS;
|
|
4
|
+
* this type anchors `FirebaseModule<typeof nativeModuleName>` and documents the bridge key.
|
|
5
|
+
*/
|
|
6
|
+
export interface RNFBMLModule {
|
|
7
|
+
}
|
|
8
|
+
declare module '@react-native-firebase/app/dist/module/internal/NativeModules' {
|
|
9
|
+
interface ReactNativeFirebaseNativeModules {
|
|
10
|
+
RNFBMLModule: RNFBMLModule;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../lib/types/internal.ts"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,MAAM,WAAW,YAAY;CAAG;AAEhC,OAAO,QAAQ,+DAA+D,CAAC;IAC7E,UAAU,gCAAgC;QACxC,YAAY,EAAE,YAAY,CAAC;KAC5B;CACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNativeFirebase } from '@react-native-firebase/app';
|
|
2
|
+
export type FirebaseApp = ReactNativeFirebase.FirebaseApp;
|
|
3
|
+
/**
|
|
4
|
+
* Firebase ML service instance for the modular API.
|
|
5
|
+
*
|
|
6
|
+
* Current Firebase JS SDK releases do not ship a `firebase/ml` modular entry point; this interface
|
|
7
|
+
* follows the same modular service-instance pattern used elsewhere in React Native Firebase (see e.g.
|
|
8
|
+
* the Firestore package's `Firestore` type).
|
|
9
|
+
*/
|
|
10
|
+
export interface FirebaseML extends ReactNativeFirebase.FirebaseModule {
|
|
11
|
+
/** The FirebaseApp this module is associated with */
|
|
12
|
+
app: FirebaseApp;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=ml.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ml.d.ts","sourceRoot":"","sources":["../../../../lib/types/ml.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,MAAM,MAAM,WAAW,GAAG,mBAAmB,CAAC,WAAW,CAAC;AAE1D;;;;;;GAMG;AACH,MAAM,WAAW,UAAW,SAAQ,mBAAmB,CAAC,cAAc;IACpE,qDAAqD;IACrD,GAAG,EAAE,WAAW,CAAC;CAClB"}
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../lib/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
package/lib/index.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
export * from './modular';
|
|
19
|
+
|
|
20
|
+
export type { FirebaseApp, FirebaseML } from './types/ml';
|
|
21
|
+
|
|
22
|
+
export type { FirebaseMLTypes } from './types/namespaced';
|
|
23
|
+
|
|
24
|
+
export * from './namespaced';
|
|
25
|
+
export { default } from './namespaced';
|
package/lib/modular.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
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 { getApp } from '@react-native-firebase/app';
|
|
19
|
+
import type { FirebaseApp, FirebaseML } from './types/ml';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Returns the {@link FirebaseML} instance for the default or given {@link FirebaseApp}.
|
|
23
|
+
*
|
|
24
|
+
* @param app - The Firebase `FirebaseApp` to use. When omitted, the default app is used.
|
|
25
|
+
* @returns The ML service instance for that app.
|
|
26
|
+
*/
|
|
27
|
+
export function getML(app?: FirebaseApp): FirebaseML {
|
|
28
|
+
if (app) {
|
|
29
|
+
return getApp(app.name).ml();
|
|
30
|
+
}
|
|
31
|
+
return getApp().ml();
|
|
32
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
>;
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
/**
|
|
19
|
+
* Wrapped native module contract for `RNFBMLModule`.
|
|
20
|
+
* The namespaced `FirebaseMLModule` implementation does not call into native from JS;
|
|
21
|
+
* this type anchors `FirebaseModule<typeof nativeModuleName>` and documents the bridge key.
|
|
22
|
+
*/
|
|
23
|
+
export interface RNFBMLModule {}
|
|
24
|
+
|
|
25
|
+
declare module '@react-native-firebase/app/dist/module/internal/NativeModules' {
|
|
26
|
+
interface ReactNativeFirebaseNativeModules {
|
|
27
|
+
RNFBMLModule: RNFBMLModule;
|
|
28
|
+
}
|
|
29
|
+
}
|
package/lib/types/ml.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
export type FirebaseApp = ReactNativeFirebase.FirebaseApp;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Firebase ML service instance for the modular API.
|
|
24
|
+
*
|
|
25
|
+
* Current Firebase JS SDK releases do not ship a `firebase/ml` modular entry point; this interface
|
|
26
|
+
* follows the same modular service-instance pattern used elsewhere in React Native Firebase (see e.g.
|
|
27
|
+
* the Firestore package's `Firestore` type).
|
|
28
|
+
*/
|
|
29
|
+
export interface FirebaseML extends ReactNativeFirebase.FirebaseModule {
|
|
30
|
+
/** The FirebaseApp this module is associated with */
|
|
31
|
+
app: FirebaseApp;
|
|
32
|
+
}
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
*
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { ReactNativeFirebase } from '@react-native-firebase/app';
|
|
18
|
+
import type { ReactNativeFirebase } from '@react-native-firebase/app';
|
|
19
|
+
|
|
19
20
|
/**
|
|
20
21
|
* Firebase ML package for React Native.
|
|
21
22
|
*
|
|
@@ -52,46 +53,40 @@ import { ReactNativeFirebase } from '@react-native-firebase/app';
|
|
|
52
53
|
*
|
|
53
54
|
* @firebase ml
|
|
54
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 */
|
|
55
61
|
export namespace FirebaseMLTypes {
|
|
56
|
-
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated Use the exported types directly instead. FirebaseMLTypes namespace is kept for backwards compatibility.
|
|
64
|
+
*/
|
|
65
|
+
type FirebaseModule = ReactNativeFirebase.FirebaseModule;
|
|
57
66
|
|
|
67
|
+
/**
|
|
68
|
+
* @deprecated Use the default export statics instead.
|
|
69
|
+
*/
|
|
58
70
|
export interface Statics {
|
|
71
|
+
/** @deprecated Use the default export statics instead. */
|
|
59
72
|
SDK_VERSION: string;
|
|
60
73
|
}
|
|
61
74
|
|
|
62
|
-
|
|
75
|
+
/**
|
|
76
|
+
* @deprecated Use the exported `FirebaseML` type instead.
|
|
77
|
+
*/
|
|
78
|
+
export interface Module extends FirebaseModule {
|
|
63
79
|
/**
|
|
80
|
+
* @deprecated Use the exported `FirebaseML` type instead.
|
|
81
|
+
*
|
|
64
82
|
* The current `FirebaseApp` instance for this Firebase service.
|
|
65
83
|
*/
|
|
66
84
|
app: ReactNativeFirebase.FirebaseApp;
|
|
67
85
|
}
|
|
68
86
|
}
|
|
69
87
|
|
|
70
|
-
type MLNamespace = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<
|
|
71
|
-
FirebaseMLTypes.Module,
|
|
72
|
-
FirebaseMLTypes.Statics
|
|
73
|
-
> & {
|
|
74
|
-
firebase: ReactNativeFirebase.Module;
|
|
75
|
-
app(name?: string): ReactNativeFirebase.FirebaseApp;
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
declare const defaultExport: MLNamespace;
|
|
79
|
-
|
|
80
|
-
export const firebase: ReactNativeFirebase.Module & {
|
|
81
|
-
ml: typeof defaultExport;
|
|
82
|
-
app(name?: string): ReactNativeFirebase.FirebaseApp & { ml(): FirebaseMLTypes.Module };
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export default defaultExport;
|
|
86
|
-
|
|
87
|
-
export * from './modular';
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Attach namespace to `firebase.` and `FirebaseApp.`.
|
|
91
|
-
*/
|
|
92
88
|
declare module '@react-native-firebase/app' {
|
|
93
89
|
namespace ReactNativeFirebase {
|
|
94
|
-
import FirebaseModuleWithStaticsAndApp = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp;
|
|
95
90
|
interface Module {
|
|
96
91
|
ml: FirebaseModuleWithStaticsAndApp<FirebaseMLTypes.Module, FirebaseMLTypes.Statics>;
|
|
97
92
|
}
|
|
@@ -101,3 +96,4 @@ declare module '@react-native-firebase/app' {
|
|
|
101
96
|
}
|
|
102
97
|
}
|
|
103
98
|
}
|
|
99
|
+
/* eslint-enable @typescript-eslint/no-namespace */
|
package/lib/version.ts
ADDED
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-firebase/ml",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.0",
|
|
4
4
|
"author": "Invertase <oss@invertase.io> (http://invertase.io)",
|
|
5
5
|
"description": "React Native Firebase - Firebase ML brings the power of machine learning vision to your React Native application, supporting both Android & iOS.",
|
|
6
|
-
"main": "
|
|
7
|
-
"types": "lib/index.d.ts",
|
|
6
|
+
"main": "./dist/module/index.js",
|
|
7
|
+
"types": "./dist/typescript/lib/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"build": "genversion --semi lib/version.
|
|
9
|
+
"build": "genversion --esm --semi lib/version.ts",
|
|
10
10
|
"build:clean": "rimraf android/build && rimraf ios/build",
|
|
11
|
-
"
|
|
11
|
+
"compile": "bob build",
|
|
12
|
+
"prepare": "yarn run build && yarn compile"
|
|
12
13
|
},
|
|
13
14
|
"repository": {
|
|
14
15
|
"type": "git",
|
|
@@ -26,11 +27,44 @@
|
|
|
26
27
|
"image labeler"
|
|
27
28
|
],
|
|
28
29
|
"peerDependencies": {
|
|
29
|
-
"@react-native-firebase/app": "
|
|
30
|
+
"@react-native-firebase/app": "25.0.0"
|
|
30
31
|
},
|
|
31
32
|
"publishConfig": {
|
|
32
33
|
"access": "public",
|
|
33
34
|
"provenance": true
|
|
34
35
|
},
|
|
35
|
-
"
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"react-native-builder-bob": "^0.41.0"
|
|
38
|
+
},
|
|
39
|
+
"exports": {
|
|
40
|
+
".": {
|
|
41
|
+
"source": "./lib/index.ts",
|
|
42
|
+
"types": "./dist/typescript/lib/index.d.ts",
|
|
43
|
+
"default": "./dist/module/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./package.json": "./package.json"
|
|
46
|
+
},
|
|
47
|
+
"react-native-builder-bob": {
|
|
48
|
+
"source": "lib",
|
|
49
|
+
"output": "dist",
|
|
50
|
+
"targets": [
|
|
51
|
+
[
|
|
52
|
+
"module",
|
|
53
|
+
{
|
|
54
|
+
"esm": true
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
[
|
|
58
|
+
"typescript",
|
|
59
|
+
{
|
|
60
|
+
"tsc": "../../node_modules/.bin/tsc"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"eslintIgnore": [
|
|
66
|
+
"node_modules/",
|
|
67
|
+
"dist/"
|
|
68
|
+
],
|
|
69
|
+
"gitHead": "eac5bf5f3c80b158bf85b33789e4b64bfd16bbe1"
|
|
36
70
|
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.packages.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"rootDir": ".",
|
|
5
|
+
"paths": {
|
|
6
|
+
"@react-native-firebase/app/dist/module/internal": ["../app/dist/typescript/lib/internal"],
|
|
7
|
+
"@react-native-firebase/app/dist/module/internal/NativeModules": [
|
|
8
|
+
"../app/dist/typescript/lib/internal/NativeModules"
|
|
9
|
+
],
|
|
10
|
+
"@react-native-firebase/app": ["../app/dist/typescript/lib"]
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"include": ["lib/**/*"],
|
|
14
|
+
"exclude": ["node_modules", "dist", "__tests__", "**/*.test.ts"]
|
|
15
|
+
}
|
package/typedoc.json
CHANGED
package/lib/modular/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ReactNativeFirebase } from '@react-native-firebase/app';
|
|
2
|
-
import { FirebaseMLTypes } from '..';
|
|
3
|
-
|
|
4
|
-
type FirebaseML = FirebaseMLTypes.Module;
|
|
5
|
-
import FirebaseApp = ReactNativeFirebase.FirebaseApp;
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Returns the existing default {@link FirebaseML} instance that is associated with the
|
|
9
|
-
* default {@link @firebase/app!FirebaseApp}. If no instance exists, initializes a new
|
|
10
|
-
* instance with default settings.
|
|
11
|
-
*
|
|
12
|
-
* @returns The {@link FirebaseML} instance of the provided app.
|
|
13
|
-
*/
|
|
14
|
-
export declare function getML(app?: FirebaseApp): FirebaseML;
|
package/lib/modular/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { getApp } from '@react-native-firebase/app';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @typedef {import('@firebase/app').FirebaseApp} FirebaseApp
|
|
5
|
-
* @typedef {import('..').FirebaseMLTypes.Module} FirebaseML
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @param {FirebaseApp | undefined} app
|
|
10
|
-
* @returns {FirebaseML}
|
|
11
|
-
*/
|
|
12
|
-
export function getML(app) {
|
|
13
|
-
if (app) {
|
|
14
|
-
return getApp(app.name).ml();
|
|
15
|
-
}
|
|
16
|
-
return getApp().ml();
|
|
17
|
-
}
|
package/lib/version.js
DELETED