@koolbase/react-native 12.19.0 → 12.20.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/dist/cjs/index.d.ts +14 -0
- package/dist/cjs/index.js +14 -1
- package/dist/esm/index.d.ts +14 -0
- package/dist/esm/index.js +14 -1
- package/package.json +2 -2
package/dist/cjs/index.d.ts
CHANGED
|
@@ -57,3 +57,17 @@ export type { UseFilesResult } from '@koolbase/core/react';
|
|
|
57
57
|
* ```
|
|
58
58
|
*/
|
|
59
59
|
export declare const useFiles: (bucket: string, query?: import("@koolbase/core/dist/cjs").FilesQuery) => import("@koolbase/core/react").UseFilesResult;
|
|
60
|
+
export type { UseFileResult } from '@koolbase/core/react';
|
|
61
|
+
/**
|
|
62
|
+
* One file's details as React state (storage S4): loading, loaded, notFound
|
|
63
|
+
* or error, with refresh -- only a file the signed-in person may view. Reads
|
|
64
|
+
* it again by itself after a change made through this SDK in the bucket: a
|
|
65
|
+
* deleted or moved file is notFound. An empty path is notFound, with no
|
|
66
|
+
* request. Use it after Koolbase.initialize().
|
|
67
|
+
*
|
|
68
|
+
* ```tsx
|
|
69
|
+
* const photo = useFile('photos', path);
|
|
70
|
+
* if (photo.status === 'loaded') return <Text>{photo.file.name}</Text>;
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export declare const useFile: (bucket: string, path: string | null | undefined) => import("@koolbase/core/react").UseFileResult;
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.useFiles = exports.useRecord = exports.useCollection = exports.SecureAuthStorage = exports.Koolbase = exports.reactNativePlatform = void 0;
|
|
17
|
+
exports.useFile = exports.useFiles = exports.useRecord = exports.useCollection = exports.SecureAuthStorage = exports.Koolbase = exports.reactNativePlatform = void 0;
|
|
18
18
|
const react_native_1 = require("react-native");
|
|
19
19
|
// @koolbase/react-native — composes @koolbase/core for a React Native host.
|
|
20
20
|
//
|
|
@@ -212,3 +212,16 @@ exports.useRecord = (0, react_1.createUseRecord)(() => exports.Koolbase.db);
|
|
|
212
212
|
* ```
|
|
213
213
|
*/
|
|
214
214
|
exports.useFiles = (0, react_1.createUseFiles)(() => exports.Koolbase.storage);
|
|
215
|
+
/**
|
|
216
|
+
* One file's details as React state (storage S4): loading, loaded, notFound
|
|
217
|
+
* or error, with refresh -- only a file the signed-in person may view. Reads
|
|
218
|
+
* it again by itself after a change made through this SDK in the bucket: a
|
|
219
|
+
* deleted or moved file is notFound. An empty path is notFound, with no
|
|
220
|
+
* request. Use it after Koolbase.initialize().
|
|
221
|
+
*
|
|
222
|
+
* ```tsx
|
|
223
|
+
* const photo = useFile('photos', path);
|
|
224
|
+
* if (photo.status === 'loaded') return <Text>{photo.file.name}</Text>;
|
|
225
|
+
* ```
|
|
226
|
+
*/
|
|
227
|
+
exports.useFile = (0, react_1.createUseFile)(() => exports.Koolbase.storage);
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -57,3 +57,17 @@ export type { UseFilesResult } from '@koolbase/core/react';
|
|
|
57
57
|
* ```
|
|
58
58
|
*/
|
|
59
59
|
export declare const useFiles: (bucket: string, query?: import("@koolbase/core").FilesQuery) => import("@koolbase/core/react").UseFilesResult;
|
|
60
|
+
export type { UseFileResult } from '@koolbase/core/react';
|
|
61
|
+
/**
|
|
62
|
+
* One file's details as React state (storage S4): loading, loaded, notFound
|
|
63
|
+
* or error, with refresh -- only a file the signed-in person may view. Reads
|
|
64
|
+
* it again by itself after a change made through this SDK in the bucket: a
|
|
65
|
+
* deleted or moved file is notFound. An empty path is notFound, with no
|
|
66
|
+
* request. Use it after Koolbase.initialize().
|
|
67
|
+
*
|
|
68
|
+
* ```tsx
|
|
69
|
+
* const photo = useFile('photos', path);
|
|
70
|
+
* if (photo.status === 'loaded') return <Text>{photo.file.name}</Text>;
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export declare const useFile: (bucket: string, path: string | null | undefined) => import("@koolbase/core/react").UseFileResult;
|
package/dist/esm/index.js
CHANGED
|
@@ -9,7 +9,7 @@ export * from '@koolbase/core';
|
|
|
9
9
|
export { reactNativePlatform } from './platform.js';
|
|
10
10
|
import { KoolbaseAuth, KoolbaseDatabase, KoolbaseFiscal, KoolbaseStorage, KoolbaseRealtime, KoolbaseFunctions, KoolbaseConnectivity, KoolbaseFlags, KoolbaseAnalytics, disabledAnalytics, KoolbaseMessaging, getOrCreateDeviceId, setPlatform, setSessionRenewal } from '@koolbase/core';
|
|
11
11
|
import { reactNativePlatform } from './platform.js';
|
|
12
|
-
import { createUseCollection, createUseFiles, createUseRecord } from '@koolbase/core/react';
|
|
12
|
+
import { createUseCollection, createUseFile, createUseFiles, createUseRecord } from '@koolbase/core/react';
|
|
13
13
|
let _auth = null;
|
|
14
14
|
let _db = null;
|
|
15
15
|
let _storage = null;
|
|
@@ -193,3 +193,16 @@ export const useRecord = createUseRecord(() => Koolbase.db);
|
|
|
193
193
|
* ```
|
|
194
194
|
*/
|
|
195
195
|
export const useFiles = createUseFiles(() => Koolbase.storage);
|
|
196
|
+
/**
|
|
197
|
+
* One file's details as React state (storage S4): loading, loaded, notFound
|
|
198
|
+
* or error, with refresh -- only a file the signed-in person may view. Reads
|
|
199
|
+
* it again by itself after a change made through this SDK in the bucket: a
|
|
200
|
+
* deleted or moved file is notFound. An empty path is notFound, with no
|
|
201
|
+
* request. Use it after Koolbase.initialize().
|
|
202
|
+
*
|
|
203
|
+
* ```tsx
|
|
204
|
+
* const photo = useFile('photos', path);
|
|
205
|
+
* if (photo.status === 'loaded') return <Text>{photo.file.name}</Text>;
|
|
206
|
+
* ```
|
|
207
|
+
*/
|
|
208
|
+
export const useFile = createUseFile(() => Koolbase.storage);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koolbase/react-native",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.20.0",
|
|
4
4
|
"description": "React Native SDK for Koolbase \u2014 auth, database, storage, realtime, feature flags, and functions in one package.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"types": "./dist/esm/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"url": "https://github.com/koolbase/koolbase-react-native"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@koolbase/core": "12.
|
|
27
|
+
"@koolbase/core": "12.20.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@react-native-async-storage/async-storage": "^2.2.0 || ^3.0.2",
|