jazz-react-native 0.12.1 → 0.13.1

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 (82) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/CHANGELOG.md +37 -0
  3. package/README.md +3 -229
  4. package/crypto/index.d.ts +2 -0
  5. package/crypto/index.js +2 -0
  6. package/dist/index.d.ts +3 -6
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +3 -6
  9. package/dist/index.js.map +1 -1
  10. package/dist/provider.d.ts +2 -13
  11. package/dist/provider.d.ts.map +1 -1
  12. package/dist/provider.js +8 -48
  13. package/dist/provider.js.map +1 -1
  14. package/dist/storage/mmkv-store-adapter.d.ts +8 -0
  15. package/dist/storage/mmkv-store-adapter.d.ts.map +1 -0
  16. package/dist/storage/mmkv-store-adapter.js +19 -0
  17. package/dist/storage/mmkv-store-adapter.js.map +1 -0
  18. package/dist/storage/op-sqlite-adapter.d.ts +18 -0
  19. package/dist/storage/op-sqlite-adapter.d.ts.map +1 -0
  20. package/dist/storage/op-sqlite-adapter.js +127 -0
  21. package/dist/storage/op-sqlite-adapter.js.map +1 -0
  22. package/dist/testing.d.ts +1 -1
  23. package/dist/testing.d.ts.map +1 -1
  24. package/dist/testing.js +1 -1
  25. package/dist/testing.js.map +1 -1
  26. package/package.json +13 -16
  27. package/src/index.ts +4 -7
  28. package/src/provider.tsx +12 -91
  29. package/src/storage/mmkv-store-adapter.ts +24 -0
  30. package/src/storage/op-sqlite-adapter.ts +168 -0
  31. package/src/testing.ts +1 -0
  32. package/dist/ReactNativeContextManager.d.ts +0 -30
  33. package/dist/ReactNativeContextManager.d.ts.map +0 -1
  34. package/dist/ReactNativeContextManager.js +0 -39
  35. package/dist/ReactNativeContextManager.js.map +0 -1
  36. package/dist/auth/DemoAuthUI.d.ts +0 -8
  37. package/dist/auth/DemoAuthUI.d.ts.map +0 -1
  38. package/dist/auth/DemoAuthUI.js +0 -156
  39. package/dist/auth/DemoAuthUI.js.map +0 -1
  40. package/dist/auth/auth.d.ts +0 -3
  41. package/dist/auth/auth.d.ts.map +0 -1
  42. package/dist/auth/auth.js +0 -12
  43. package/dist/auth/auth.js.map +0 -1
  44. package/dist/crypto/RNQuickCrypto.d.ts +0 -14
  45. package/dist/crypto/RNQuickCrypto.d.ts.map +0 -1
  46. package/dist/crypto/RNQuickCrypto.js +0 -31
  47. package/dist/crypto/RNQuickCrypto.js.map +0 -1
  48. package/dist/crypto/index.d.ts +0 -2
  49. package/dist/crypto/index.d.ts.map +0 -1
  50. package/dist/crypto/index.js +0 -2
  51. package/dist/crypto/index.js.map +0 -1
  52. package/dist/hooks.d.ts +0 -14
  53. package/dist/hooks.d.ts.map +0 -1
  54. package/dist/hooks.js +0 -35
  55. package/dist/hooks.js.map +0 -1
  56. package/dist/media.d.ts +0 -24
  57. package/dist/media.d.ts.map +0 -1
  58. package/dist/media.js +0 -61
  59. package/dist/media.js.map +0 -1
  60. package/dist/platform.d.ts +0 -46
  61. package/dist/platform.d.ts.map +0 -1
  62. package/dist/platform.js +0 -155
  63. package/dist/platform.js.map +0 -1
  64. package/dist/storage/expo-secure-store-adapter.d.ts +0 -8
  65. package/dist/storage/expo-secure-store-adapter.d.ts.map +0 -1
  66. package/dist/storage/expo-secure-store-adapter.js +0 -25
  67. package/dist/storage/expo-secure-store-adapter.js.map +0 -1
  68. package/dist/storage/kv-store-context.d.ts +0 -17
  69. package/dist/storage/kv-store-context.d.ts.map +0 -1
  70. package/dist/storage/kv-store-context.js +0 -27
  71. package/dist/storage/kv-store-context.js.map +0 -1
  72. package/src/ReactNativeContextManager.ts +0 -70
  73. package/src/auth/DemoAuthUI.tsx +0 -202
  74. package/src/auth/auth.ts +0 -14
  75. package/src/crypto/RNQuickCrypto.ts +0 -59
  76. package/src/crypto/index.ts +0 -1
  77. package/src/hooks.tsx +0 -72
  78. package/src/media.tsx +0 -92
  79. package/src/platform.ts +0 -238
  80. package/src/storage/expo-secure-store-adapter.ts +0 -29
  81. package/src/storage/kv-store-context.ts +0 -39
  82. package/src/testing.tsx +0 -1
@@ -1,4 +1,4 @@
1
1
 
2
- > jazz-react-native@0.12.1 build /home/runner/_work/jazz/jazz/packages/jazz-react-native
2
+ > jazz-react-native@0.13.1 build /home/runner/_work/jazz/jazz/packages/jazz-react-native
3
3
  > rm -rf ./dist && tsc --sourceMap --outDir dist
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # jazz-browser
2
2
 
3
+ ## 0.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 63a7aa0: Add exports for clerk and crypto to make import shortcuts work everywhere
8
+
9
+ ## 0.13.0
10
+
11
+ ### Minor Changes
12
+
13
+ - bce3bcc: Introduce jazz-expo and use only vanilla deps for jazz-react-native
14
+
15
+ Upgrade guide: https://jazz.tools/docs/react/upgrade/0-13-0
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [a013538]
20
+ - Updated dependencies [bce3bcc]
21
+ - Updated dependencies [afd1374]
22
+ - Updated dependencies [bce3bcc]
23
+ - cojson@0.13.0
24
+ - jazz-react-native-core@0.13.0
25
+ - jazz-tools@0.13.0
26
+ - cojson-storage@0.13.0
27
+
28
+ ## 0.12.2
29
+
30
+ ### Patch Changes
31
+
32
+ - Updated dependencies [c2f4827]
33
+ - cojson@0.12.2
34
+ - cojson-storage-rn-sqlite@0.12.2
35
+ - cojson-transport-ws@0.12.2
36
+ - jazz-react-core@0.12.2
37
+ - jazz-tools@0.12.2
38
+ - jazz-react-native-media-images@0.12.2
39
+
3
40
  ## 0.12.1
4
41
 
5
42
  ### Patch Changes
package/README.md CHANGED
@@ -1,233 +1,7 @@
1
1
  # 🎷 Jazz + React Native
2
2
 
3
- Jazz requires an [Expo development build](https://docs.expo.dev/develop/development-builds/introduction/) using [Expo Prebuild](https://docs.expo.dev/workflow/prebuild/) for native code. It is **not compatible** with Expo Go. Jazz also supports the [New Architecture](https://docs.expo.dev/guides/new-architecture/).
3
+ This package provides dedicated support for framework-less React Native applications. It implements storage adapters specifically for React Native's ecosystem (op-sqlite and MMKV) and is designed to work with the Jazz React Native Core package.
4
4
 
5
- Tested with:
5
+ Jazz documentation has all of the setup and usage instructions. Please refer to the [Jazz documentation](https://jazz.dev/docs/react-native) for more information.
6
6
 
7
- ```json
8
- "expo": "~51.0.0",
9
- "react-native": "~0.74.5",
10
- "react": "^18.2.0",
11
- ```
12
-
13
- ## 🚀 Setup
14
-
15
- ### Create a New Project
16
-
17
- (skip this step if you already have one)
18
-
19
- ```bash
20
- npx create-expo-app -e with-router-tailwind my-jazz-app
21
- cd my-jazz-app
22
- npx expo prebuild
23
- ```
24
-
25
- ### Install dependencies
26
-
27
- ```bash
28
- npx expo install expo-linking expo-secure-store expo-file-system @react-native-community/netinfo @bam.tech/react-native-image-resizer
29
-
30
- npm i -S @azure/core-asynciterator-polyfill react-native-url-polyfill readable-stream react-native-get-random-values @craftzdog/react-native-buffer @op-engineering/op-sqlite
31
-
32
-
33
- npm i -D @babel/plugin-transform-class-static-block
34
-
35
- npm i -S jazz-tools jazz-react-native jazz-react-native-media-images
36
-
37
- ```
38
-
39
- > note: Hermes has added support for `atob` and `btoa` in React Native 0.74. If you are using earlier versions, you may also need to polyfill `atob` and `btoa` in your `package.json` . Packages to try include `text-encoding` and `base-64`, and you can drop `@bacons/text-decoder`.
40
-
41
- ### Fix Incompatible Dependencies
42
-
43
- ```bash
44
- npx expo install --fix
45
- ```
46
-
47
- ### Install Pods
48
-
49
- ```bash
50
- npx pod-install
51
- ```
52
-
53
- ### Configure Metro
54
-
55
- #### Regular Repositories
56
-
57
- If you are not working within a monorepo, create a new file metro.config.js in the root of your project with the following content:
58
-
59
- ```js
60
- const { getDefaultConfig } = require("expo/metro-config");
61
- const path = require("path");
62
- const workspaceRoot = path.resolve(__dirname);
63
- const config = getDefaultConfig(projectRoot);
64
- config.resolver.sourceExts = ["mjs", "js", "json", "ts", "tsx"];
65
- config.resolver.requireCycleIgnorePatterns = [/(^|\/|\\)node_modules($|\/|\\)/];
66
- module.exports = config;
67
- ```
68
-
69
- #### Monorepos
70
-
71
- For monorepos, use the following metro.config.js:
72
-
73
- ```js
74
- const { getDefaultConfig } = require("expo/metro-config");
75
- const { FileStore } = require("metro-cache");
76
- const path = require("path");
77
-
78
- // eslint-disable-next-line no-undef
79
- const projectRoot = __dirname;
80
- const workspaceRoot = path.resolve(projectRoot, "../..");
81
-
82
- const config = getDefaultConfig(projectRoot);
83
-
84
- config.watchFolders = [workspaceRoot];
85
- config.resolver.nodeModulesPaths = [
86
- path.resolve(projectRoot, "node_modules"),
87
- path.resolve(workspaceRoot, "node_modules"),
88
- ];
89
- config.resolver.sourceExts = ["mjs", "js", "json", "ts", "tsx"];
90
- config.resolver.requireCycleIgnorePatterns = [/(^|\/|\\)node_modules($|\/|\\)/];
91
- config.cacheStores = [
92
- new FileStore({
93
- root: path.join(projectRoot, "node_modules", ".cache", "metro"),
94
- }),
95
- ];
96
-
97
- module.exports = config;
98
- ```
99
-
100
- ### Additional Monorepo Configuration (for pnpm users)
101
-
102
- - Add node-linker=hoisted to the root .npmrc (create this file if it doesn’t exist).
103
- - Add the following to the root package.json:
104
-
105
- ```json
106
- "pnpm": {
107
- "peerDependencyRules": {
108
- "ignoreMissing": [
109
- "@babel/*",
110
- "expo-modules-*",
111
- "typescript"
112
- ]
113
- }
114
- }
115
- ```
116
-
117
- For more information, refer to [this](https://github.com/byCedric/expo-monorepo-example#pnpm-workarounds) Expo monorepo example.
118
-
119
- ### Configure Babel
120
-
121
- Add `@babel/plugin-transform-class-static-block` to the array of Babel plugins inside `babel.config.js`:
122
-
123
- ```js
124
- module.exports = function (api) {
125
- api.cache(true);
126
- return {
127
- presets: ["babel-preset-expo"],
128
- plugins: [
129
- "nativewind/babel",
130
- "@babel/plugin-transform-class-static-block",
131
- ],
132
- };
133
- };
134
- ```
135
-
136
- ### Add Polyfills
137
-
138
- Create a file `polyfills.js` at the project root with the following content:
139
-
140
- ```js
141
- import { polyfillGlobal } from 'react-native/Libraries/Utilities/PolyfillFunctions';
142
-
143
- import { Buffer } from '@craftzdog/react-native-buffer';
144
- polyfillGlobal('Buffer', () => Buffer);
145
-
146
- import { ReadableStream } from 'readable-stream';
147
- polyfillGlobal('ReadableStream', () => ReadableStream);
148
-
149
- import '@azure/core-asynciterator-polyfill';
150
-
151
- import '@bacons/text-decoder/install';
152
-
153
- import 'react-native-get-random-values';
154
- ```
155
-
156
- Update `index.js` based on whether you are using expo-router or not:
157
-
158
- #### If using `expo-router`
159
-
160
- ```js
161
- import "./polyfills";
162
- import "expo-router/entry";
163
- ```
164
-
165
- #### Without `expo-router`
166
-
167
- ```js
168
- import "./polyfills";
169
- import { registerRootComponent } from "expo";
170
- import App from "./src/App";
171
- registerRootComponent(App);
172
- ```
173
-
174
- Lastly, ensure that the `"main"` field in your `package.json` points to `index.js`:
175
-
176
- ```js
177
- "main": "index.js",
178
- ```
179
-
180
- ## 🎉 How to Use Jazz
181
-
182
- ### `createJazzRNApp()`
183
-
184
- Create a file `jazz.tsx` with the following contents:
185
-
186
- ```js
187
- import { createJazzRNApp } from "jazz-react-native";
188
-
189
- export const Jazz = createJazzRNApp();
190
- export const { useAccount, useCoState, useAcceptInvite } = Jazz;
191
- ```
192
-
193
- You can optionally pass a custom `kvStore` and `AccountSchema` to `createJazzRNApp()`, otherwise, it defaults to `ExpoSecureStoreAdapter` and `Account`.
194
-
195
- ### Choosing an Auth Method
196
-
197
- Refer to the Jazz + React Native demo projects for implementing authentication:
198
-
199
- - [DemoAuth Example](https://github.com/garden-co/jazz/tree/main/examples/chat-rn)
200
- - [ClerkAuth Example](https://github.com/garden-co/jazz/tree/main/examples/chat-rn-clerk)
201
-
202
- In the demos, you'll find details on:
203
-
204
- - Using JazzProvider with your chosen authentication method
205
- - Defining a Jazz schema
206
- - Creating and subscribing to covalues
207
- - Handling invites
208
-
209
- ### 🖼️ Working with Images
210
-
211
- To work with images in Jazz, import the `createImage` function from [`jazz-react-native-media-images`](https://github.com/garden-co/jazz/tree/main/packages/jazz-react-native-media-images).
212
-
213
- ```js
214
- import { createImage } from "jazz-react-native-media-images";
215
-
216
- const base64ImageDataURI = "data:image/png;base64,...";
217
-
218
- const image = await createImage(base64ImageDataURI, {
219
- owner: newPetPost._owner,
220
- maxSize: 2048, // optional: specify maximum image size
221
- });
222
-
223
- someCovalue.image = image;
224
- ```
225
-
226
- For a complete implementation, please refer to [this](https://github.com/garden-co/jazz/blob/main/examples/pets/src/3_NewPetPostForm.tsx) demo.
227
-
228
- ### 📱 Running Your App
229
-
230
- ```bash
231
- npx expo run:ios
232
- npx expo run:android
233
- ```
7
+ For Expo-based applications, please use the `jazz-expo` package instead.
@@ -0,0 +1,2 @@
1
+ // Re-export the crypto module from the dist folder to make the `jazz-react-native/crypto` import work everywhere
2
+ export * from "jazz-react-native-core/dist/crypto";
@@ -0,0 +1,2 @@
1
+ // Re-export the crypto module from the dist folder to make the `jazz-react-native/crypto` import work everywhere
2
+ export * from "jazz-react-native-core/dist/crypto";
package/dist/index.d.ts CHANGED
@@ -1,8 +1,5 @@
1
+ export * from "jazz-react-native-core";
1
2
  export * from "./provider.js";
2
- export * from "./auth/auth.js";
3
- export * from "./storage/kv-store-context.js";
4
- export * from "./hooks.js";
5
- export * from "./media.js";
6
- export { parseInviteLink } from "jazz-tools";
7
- export { createInviteLink, setupKvStore } from "./platform.js";
3
+ export * from "./storage/mmkv-store-adapter.js";
4
+ export * from "./storage/op-sqlite-adapter.js";
8
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAE3B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AAEvC,cAAc,eAAe,CAAC;AAC9B,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC"}
package/dist/index.js CHANGED
@@ -1,8 +1,5 @@
1
+ export * from "jazz-react-native-core";
1
2
  export * from "./provider.js";
2
- export * from "./auth/auth.js";
3
- export * from "./storage/kv-store-context.js";
4
- export * from "./hooks.js";
5
- export * from "./media.js";
6
- export { parseInviteLink } from "jazz-tools";
7
- export { createInviteLink, setupKvStore } from "./platform.js";
3
+ export * from "./storage/mmkv-store-adapter.js";
4
+ export * from "./storage/op-sqlite-adapter.js";
8
5
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAE3B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AAEvC,cAAc,eAAe,CAAC;AAC9B,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC"}
@@ -1,15 +1,4 @@
1
- import { Account, KvStore } from "jazz-tools";
1
+ import { JazzProviderProps } from "jazz-react-native-core";
2
2
  import React from "react";
3
- import { JazzContextManagerProps } from "./ReactNativeContextManager.js";
4
- export interface Register {
5
- }
6
- export type RegisteredAccount = Register extends {
7
- Account: infer Acc;
8
- } ? Acc : Account;
9
- export type JazzProviderProps<Acc extends Account = RegisteredAccount> = {
10
- children: React.ReactNode;
11
- kvStore?: KvStore;
12
- } & JazzContextManagerProps<Acc>;
13
- /** @category Context & Hooks */
14
- export declare function JazzProvider<Acc extends Account = RegisteredAccount>({ children, guestMode, sync, storage, AccountSchema, defaultProfileName, onLogOut, kvStore, onAnonymousAccountDiscarded, CryptoProvider, }: JazzProviderProps<Acc>): React.JSX.Element;
3
+ export declare function JazzProvider(props: JazzProviderProps): React.JSX.Element;
15
4
  //# sourceMappingURL=provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAmB,OAAO,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,MAAM,WAAW,QAAQ;CAAG;AAE5B,MAAM,MAAM,iBAAiB,GAAG,QAAQ,SAAS;IAAE,OAAO,EAAE,MAAM,GAAG,CAAA;CAAE,GACnE,GAAG,GACH,OAAO,CAAC;AAEZ,MAAM,MAAM,iBAAiB,CAAC,GAAG,SAAS,OAAO,GAAG,iBAAiB,IAAI;IACvE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAC;AAEjC,gCAAgC;AAChC,wBAAgB,YAAY,CAAC,GAAG,SAAS,OAAO,GAAG,iBAAiB,EAAE,EACpE,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,OAAO,EACP,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,OAAO,EACP,2BAA2B,EAC3B,cAAc,GACf,EAAE,iBAAiB,CAAC,GAAG,CAAC,qBAyDxB"}
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAWpD"}
package/dist/provider.js CHANGED
@@ -1,50 +1,10 @@
1
- import { JazzContext, JazzContextManagerContext } from "jazz-react-core";
2
- import React, { useEffect, useRef } from "react";
3
- import { ReactNativeContextManager } from "./ReactNativeContextManager.js";
4
- import { setupKvStore } from "./platform.js";
5
- /** @category Context & Hooks */
6
- export function JazzProvider({ children, guestMode, sync, storage, AccountSchema, defaultProfileName, onLogOut, kvStore, onAnonymousAccountDiscarded, CryptoProvider, }) {
7
- setupKvStore(kvStore);
8
- const [contextManager] = React.useState(() => new ReactNativeContextManager());
9
- const onAnonymousAccountDiscardedRefCallback = useRefCallback(onAnonymousAccountDiscarded);
10
- const onLogOutRefCallback = useRefCallback(onLogOut);
11
- const value = React.useSyncExternalStore(React.useCallback((callback) => {
12
- const props = {
13
- AccountSchema,
14
- guestMode,
15
- sync,
16
- storage,
17
- defaultProfileName,
18
- onLogOut: onLogOutRefCallback,
19
- onAnonymousAccountDiscarded: onAnonymousAccountDiscardedRefCallback,
20
- CryptoProvider,
21
- };
22
- if (contextManager.propsChanged(props)) {
23
- contextManager.createContext(props).catch((error) => {
24
- console.log(error.stack);
25
- console.error("Error creating Jazz context:", error);
26
- });
27
- }
28
- return contextManager.subscribe(callback);
29
- }, [sync, guestMode].concat(storage)), () => contextManager.getCurrentValue(), () => contextManager.getCurrentValue());
30
- useEffect(() => {
31
- // In development mode we don't return a cleanup function because otherwise
32
- // the double effect execution would mark the context as done immediately.
33
- if (process.env.NODE_ENV === "development")
34
- return;
35
- return () => {
36
- contextManager.done();
37
- };
38
- }, []);
39
- return (<JazzContext.Provider value={value}>
40
- <JazzContextManagerContext.Provider value={contextManager}>
41
- {value && children}
42
- </JazzContextManagerContext.Provider>
43
- </JazzContext.Provider>);
44
- }
45
- function useRefCallback(callback) {
46
- const callbackRef = React.useRef(callback);
47
- callbackRef.current = callback;
48
- return useRef((...args) => callbackRef.current?.(...args)).current;
1
+ import { JazzProviderCore } from "jazz-react-native-core";
2
+ import React from "react";
3
+ import { MMKVStore } from "./storage/mmkv-store-adapter.js";
4
+ import { OPSQLiteAdapter } from "./storage/op-sqlite-adapter.js";
5
+ export function JazzProvider(props) {
6
+ // Destructure kvStore and pass everything else via rest
7
+ const { kvStore, storage, ...rest } = props;
8
+ return (<JazzProviderCore {...rest} storage={storage ?? new OPSQLiteAdapter()} kvStore={kvStore ?? new MMKVStore()}/>);
49
9
  }
50
10
  //# sourceMappingURL=provider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAEzE,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAa7C,gCAAgC;AAChC,MAAM,UAAU,YAAY,CAA0C,EACpE,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,OAAO,EACP,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,OAAO,EACP,2BAA2B,EAC3B,cAAc,GACS;IACvB,YAAY,CAAC,OAAO,CAAC,CAAC;IAEtB,MAAM,CAAC,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CACrC,GAAG,EAAE,CAAC,IAAI,yBAAyB,EAAO,CAC3C,CAAC;IAEF,MAAM,sCAAsC,GAAG,cAAc,CAC3D,2BAA2B,CAC5B,CAAC;IACF,MAAM,mBAAmB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;IAErD,MAAM,KAAK,GAAG,KAAK,CA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AyB,CAAC,QAAQ,CACtC;IAAA,EAAE,WAAW,CAAC,QAAQ,CAAC,CACxB,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAoC,QAAY;IACrE,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC3C,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;IAC/B,OAAO,MAAM,CACX,CAAC,GAAG,IAAmB,EAAiB,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC,CAC1E,CAAC,OAAO,CAAC;AACZ,CAAC"}
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAqB,MAAM,wBAAwB,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,MAAM,UAAU,YAAY,CAAC,KAAwB;IACnD,wDAAwD;IACxD,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAE5C,OAAO,CACL,CAAC,gBAAgB,CACf,IAAI,IAAI,CAAC,CACT,OAAO,CAAC,CAAC,OAAO,IAAI,IAAI,eAAe,EAAE,CAAC,CAC1C,OAAO,CAAC,CAAC,OAAO,IAAI,IAAI,SAAS,EAAE,CAAC,EACpC,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { KvStore } from "jazz-react-native-core";
2
+ export declare class MMKVStore implements KvStore {
3
+ get(key: string): Promise<string | null>;
4
+ set(key: string, value: string): Promise<void>;
5
+ delete(key: string): Promise<void>;
6
+ clearAll(): Promise<void>;
7
+ }
8
+ //# sourceMappingURL=mmkv-store-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mmkv-store-adapter.d.ts","sourceRoot":"","sources":["../../src/storage/mmkv-store-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAOjD,qBAAa,SAAU,YAAW,OAAO;IACjC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAIxC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9C,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAGhC"}
@@ -0,0 +1,19 @@
1
+ import { MMKV } from "react-native-mmkv";
2
+ const storage = new MMKV({
3
+ id: "jazz-react-native.default",
4
+ });
5
+ export class MMKVStore {
6
+ async get(key) {
7
+ return storage.getString(key) ?? null;
8
+ }
9
+ async set(key, value) {
10
+ return storage.set(key, value);
11
+ }
12
+ async delete(key) {
13
+ return storage.delete(key);
14
+ }
15
+ async clearAll() {
16
+ return storage.clearAll();
17
+ }
18
+ }
19
+ //# sourceMappingURL=mmkv-store-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mmkv-store-adapter.js","sourceRoot":"","sources":["../../src/storage/mmkv-store-adapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC;IACvB,EAAE,EAAE,2BAA2B;CAChC,CAAC,CAAC;AAEH,MAAM,OAAO,SAAS;IACpB,KAAK,CAAC,GAAG,CAAC,GAAW;QACnB,OAAO,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC;IACxC,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,GAAW,EAAE,KAAa;QAClC,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACjC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,GAAW;QACtB,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC;IAC5B,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ import type { SQLResult, SQLRow, SQLiteAdapter } from "jazz-react-native-core";
2
+ export declare class OPSQLiteAdapter implements SQLiteAdapter {
3
+ private db;
4
+ private dbName;
5
+ private dbPath;
6
+ private initializationPromise;
7
+ private isInitialized;
8
+ constructor(dbName?: string);
9
+ private initializeInternal;
10
+ private ensureInitialized;
11
+ initialize(): Promise<void>;
12
+ execute(sql: string, params?: unknown[]): Promise<SQLResult>;
13
+ executeSync(sql: string, params?: unknown[]): {
14
+ rows: SQLRow[];
15
+ };
16
+ transaction(callback: () => Promise<void>): Promise<void>;
17
+ }
18
+ //# sourceMappingURL=op-sqlite-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"op-sqlite-adapter.d.ts","sourceRoot":"","sources":["../../src/storage/op-sqlite-adapter.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAK/E,qBAAa,eAAgB,YAAW,aAAa;IACnD,OAAO,CAAC,EAAE,CAA2B;IACrC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,qBAAqB,CAA8B;IAC3D,OAAO,CAAC,aAAa,CAAS;gBAEX,MAAM,GAAE,MAAuB;YAMpC,kBAAkB;YAkFlB,iBAAiB;IAkBlB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC;IAwBlE,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG;QAAE,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE;IAU1D,WAAW,CAAC,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAMvE"}
@@ -0,0 +1,127 @@
1
+ import * as opSQLite from "@op-engineering/op-sqlite";
2
+ import { ANDROID_DATABASE_PATH, IOS_LIBRARY_PATH, } from "@op-engineering/op-sqlite";
3
+ import { Platform } from "react-native";
4
+ export class OPSQLiteAdapter {
5
+ db = null;
6
+ dbName;
7
+ dbPath;
8
+ initializationPromise = null;
9
+ isInitialized = false;
10
+ constructor(dbName = "jazz-storage") {
11
+ this.dbName = dbName;
12
+ this.dbPath =
13
+ Platform.OS === "ios" ? IOS_LIBRARY_PATH : ANDROID_DATABASE_PATH;
14
+ }
15
+ async initializeInternal() {
16
+ try {
17
+ // Open database first
18
+ this.db = opSQLite.open({
19
+ name: this.dbName,
20
+ location: this.dbPath,
21
+ });
22
+ // Direct database operations during initialization - don't use execute()
23
+ const db = this.db;
24
+ if (!db)
25
+ throw new Error("Failed to open database");
26
+ await db.execute("PRAGMA journal_mode=WAL");
27
+ const { rows } = await db.execute("PRAGMA user_version");
28
+ const oldVersion = Number(rows[0]?.user_version) ?? 0;
29
+ if (oldVersion === 0) {
30
+ await db.execute(`CREATE TABLE IF NOT EXISTS transactions (
31
+ ses INTEGER,
32
+ idx INTEGER,
33
+ tx TEXT NOT NULL,
34
+ PRIMARY KEY (ses, idx)
35
+ ) WITHOUT ROWID;`);
36
+ await db.execute(`CREATE TABLE IF NOT EXISTS sessions (
37
+ rowID INTEGER PRIMARY KEY,
38
+ coValue INTEGER NOT NULL,
39
+ sessionID TEXT NOT NULL,
40
+ lastIdx INTEGER,
41
+ lastSignature TEXT,
42
+ UNIQUE (sessionID, coValue)
43
+ );`);
44
+ await db.execute(`CREATE INDEX IF NOT EXISTS sessionsByCoValue ON sessions (coValue);`);
45
+ await db.execute(`CREATE TABLE IF NOT EXISTS coValues (
46
+ rowID INTEGER PRIMARY KEY,
47
+ id TEXT NOT NULL UNIQUE,
48
+ header TEXT NOT NULL UNIQUE
49
+ );`);
50
+ await db.execute(`CREATE INDEX IF NOT EXISTS coValuesByID ON coValues (id);`);
51
+ await db.execute("PRAGMA user_version = 1");
52
+ }
53
+ if (oldVersion <= 2) {
54
+ await db.execute(`CREATE TABLE IF NOT EXISTS signatureAfter (
55
+ ses INTEGER,
56
+ idx INTEGER,
57
+ signature TEXT NOT NULL,
58
+ PRIMARY KEY (ses, idx)
59
+ ) WITHOUT ROWID;`);
60
+ await db.execute(`ALTER TABLE sessions ADD COLUMN bytesSinceLastSignature INTEGER;`);
61
+ await db.execute("PRAGMA user_version = 3");
62
+ }
63
+ console.log("[OPSQLiteAdapter] initialization complete");
64
+ }
65
+ catch (e) {
66
+ console.error("[OPSQLiteAdapter] initialization failed:", e);
67
+ throw new Error(`Failed to initialize OPSQLiteAdapter: ${e instanceof Error ? e.message : String(e)}`);
68
+ }
69
+ }
70
+ async ensureInitialized() {
71
+ if (this.isInitialized)
72
+ return;
73
+ if (!this.initializationPromise) {
74
+ this.initializationPromise = (async () => {
75
+ try {
76
+ await this.initializeInternal();
77
+ this.isInitialized = true;
78
+ }
79
+ catch (error) {
80
+ this.initializationPromise = null;
81
+ throw error;
82
+ }
83
+ })();
84
+ }
85
+ await this.initializationPromise;
86
+ }
87
+ async initialize() {
88
+ await this.ensureInitialized();
89
+ }
90
+ async execute(sql, params) {
91
+ await this.ensureInitialized();
92
+ const db = this.db;
93
+ if (!db) {
94
+ throw new Error("Database not available after initialization");
95
+ }
96
+ try {
97
+ const result = await db.execute(sql, params);
98
+ return {
99
+ rows: result.rows,
100
+ insertId: result.rowsAffected > 0
101
+ ? result.rows[0]?.rowid
102
+ : undefined,
103
+ rowsAffected: result.rowsAffected,
104
+ };
105
+ }
106
+ catch (error) {
107
+ console.error("[OPSQLiteAdapter] SQL execution error:", error);
108
+ throw error;
109
+ }
110
+ }
111
+ executeSync(sql, params) {
112
+ if (!this.isInitialized || !this.db) {
113
+ throw new Error("Database not initialized. Call initialize() first.");
114
+ }
115
+ const result = this.db.executeSync(sql, params);
116
+ return {
117
+ rows: result.rows,
118
+ };
119
+ }
120
+ async transaction(callback) {
121
+ if (!this.db) {
122
+ await this.ensureInitialized();
123
+ }
124
+ await this.db.transaction(callback);
125
+ }
126
+ }
127
+ //# sourceMappingURL=op-sqlite-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"op-sqlite-adapter.js","sourceRoot":"","sources":["../../src/storage/op-sqlite-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,2BAA2B,CAAC;AACtD,OAAO,EACL,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAIxC,MAAM,OAAO,eAAe;IAClB,EAAE,GAAsB,IAAI,CAAC;IAC7B,MAAM,CAAS;IACf,MAAM,CAAS;IACf,qBAAqB,GAAyB,IAAI,CAAC;IACnD,aAAa,GAAG,KAAK,CAAC;IAE9B,YAAmB,SAAiB,cAAc;QAChD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM;YACT,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,qBAAqB,CAAC;IACrE,CAAC;IAEO,KAAK,CAAC,kBAAkB;QAC9B,IAAI,CAAC;YACH,sBAAsB;YACtB,IAAI,CAAC,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC;gBACtB,IAAI,EAAE,IAAI,CAAC,MAAM;gBACjB,QAAQ,EAAE,IAAI,CAAC,MAAM;aACtB,CAAC,CAAC;YAEH,yEAAyE;YACzE,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAA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;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,wCAAwC,EAAE,KAAK,CAAC,CAAC;YAC/D,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAEM,WAAW,CAAC,GAAW,EAAE,MAAkB;QAChD,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;QACxE,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,MAAe,CAAC,CAAC;QACzD,OAAO;YACL,IAAI,EAAE,MAAM,CAAC,IAAgB;SAC9B,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,QAA6B;QACpD,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;YACb,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACjC,CAAC;QACD,MAAM,IAAI,CAAC,EAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;CACF"}
package/dist/testing.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "jazz-react-core/testing";
1
+ export * from "jazz-react-native-core/dist/testing";
2
2
  //# sourceMappingURL=testing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../src/testing.tsx"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../src/testing.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC"}
package/dist/testing.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from "jazz-react-core/testing";
1
+ export * from "jazz-react-native-core/dist/testing";
2
2
  //# sourceMappingURL=testing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"testing.js","sourceRoot":"","sources":["../src/testing.tsx"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"testing.js","sourceRoot":"","sources":["../src/testing.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC"}