@koolbase/react-native 12.18.0 → 12.19.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 +13 -0
- package/dist/cjs/index.js +13 -1
- package/dist/esm/index.d.ts +13 -0
- package/dist/esm/index.js +13 -1
- package/package.json +2 -2
package/dist/cjs/index.d.ts
CHANGED
|
@@ -44,3 +44,16 @@ export type { UseRecordResult } from '@koolbase/core/react';
|
|
|
44
44
|
export declare const useRecord: (collection: string, id: string | null | undefined, options?: {
|
|
45
45
|
live?: boolean;
|
|
46
46
|
}) => import("@koolbase/core/react").UseRecordResult;
|
|
47
|
+
export type { UseFilesResult } from '@koolbase/core/react';
|
|
48
|
+
/**
|
|
49
|
+
* A bucket's files as React state (storage S4): loading, loaded or error,
|
|
50
|
+
* with refresh and loadMore -- only the files the signed-in person may view.
|
|
51
|
+
* Reloads by itself after an upload, delete, move, copy, metadata change or
|
|
52
|
+
* restore made through this SDK in the bucket. Use it after
|
|
53
|
+
* Koolbase.initialize().
|
|
54
|
+
*
|
|
55
|
+
* ```tsx
|
|
56
|
+
* const photos = useFiles('photos', { prefix: 'trips/', sort: 'createdAt', descending: true });
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare const useFiles: (bucket: string, query?: import("@koolbase/core/dist/cjs").FilesQuery) => import("@koolbase/core/react").UseFilesResult;
|
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.useRecord = exports.useCollection = exports.SecureAuthStorage = exports.Koolbase = exports.reactNativePlatform = void 0;
|
|
17
|
+
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
|
//
|
|
@@ -200,3 +200,15 @@ exports.useCollection = (0, react_1.createUseCollection)(() => exports.Koolbase.
|
|
|
200
200
|
* ```
|
|
201
201
|
*/
|
|
202
202
|
exports.useRecord = (0, react_1.createUseRecord)(() => exports.Koolbase.db);
|
|
203
|
+
/**
|
|
204
|
+
* A bucket's files as React state (storage S4): loading, loaded or error,
|
|
205
|
+
* with refresh and loadMore -- only the files the signed-in person may view.
|
|
206
|
+
* Reloads by itself after an upload, delete, move, copy, metadata change or
|
|
207
|
+
* restore made through this SDK in the bucket. Use it after
|
|
208
|
+
* Koolbase.initialize().
|
|
209
|
+
*
|
|
210
|
+
* ```tsx
|
|
211
|
+
* const photos = useFiles('photos', { prefix: 'trips/', sort: 'createdAt', descending: true });
|
|
212
|
+
* ```
|
|
213
|
+
*/
|
|
214
|
+
exports.useFiles = (0, react_1.createUseFiles)(() => exports.Koolbase.storage);
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -44,3 +44,16 @@ export type { UseRecordResult } from '@koolbase/core/react';
|
|
|
44
44
|
export declare const useRecord: (collection: string, id: string | null | undefined, options?: {
|
|
45
45
|
live?: boolean;
|
|
46
46
|
}) => import("@koolbase/core/react").UseRecordResult;
|
|
47
|
+
export type { UseFilesResult } from '@koolbase/core/react';
|
|
48
|
+
/**
|
|
49
|
+
* A bucket's files as React state (storage S4): loading, loaded or error,
|
|
50
|
+
* with refresh and loadMore -- only the files the signed-in person may view.
|
|
51
|
+
* Reloads by itself after an upload, delete, move, copy, metadata change or
|
|
52
|
+
* restore made through this SDK in the bucket. Use it after
|
|
53
|
+
* Koolbase.initialize().
|
|
54
|
+
*
|
|
55
|
+
* ```tsx
|
|
56
|
+
* const photos = useFiles('photos', { prefix: 'trips/', sort: 'createdAt', descending: true });
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare const useFiles: (bucket: string, query?: import("@koolbase/core").FilesQuery) => import("@koolbase/core/react").UseFilesResult;
|
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, createUseRecord } from '@koolbase/core/react';
|
|
12
|
+
import { createUseCollection, createUseFiles, createUseRecord } from '@koolbase/core/react';
|
|
13
13
|
let _auth = null;
|
|
14
14
|
let _db = null;
|
|
15
15
|
let _storage = null;
|
|
@@ -181,3 +181,15 @@ export const useCollection = createUseCollection(() => Koolbase.db);
|
|
|
181
181
|
* ```
|
|
182
182
|
*/
|
|
183
183
|
export const useRecord = createUseRecord(() => Koolbase.db);
|
|
184
|
+
/**
|
|
185
|
+
* A bucket's files as React state (storage S4): loading, loaded or error,
|
|
186
|
+
* with refresh and loadMore -- only the files the signed-in person may view.
|
|
187
|
+
* Reloads by itself after an upload, delete, move, copy, metadata change or
|
|
188
|
+
* restore made through this SDK in the bucket. Use it after
|
|
189
|
+
* Koolbase.initialize().
|
|
190
|
+
*
|
|
191
|
+
* ```tsx
|
|
192
|
+
* const photos = useFiles('photos', { prefix: 'trips/', sort: 'createdAt', descending: true });
|
|
193
|
+
* ```
|
|
194
|
+
*/
|
|
195
|
+
export const useFiles = createUseFiles(() => Koolbase.storage);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koolbase/react-native",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.19.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.19.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@react-native-async-storage/async-storage": "^2.2.0 || ^3.0.2",
|