jazz-tools 0.19.8 → 0.19.10

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 (80) hide show
  1. package/.turbo/turbo-build.log +44 -42
  2. package/CHANGELOG.md +19 -3
  3. package/dist/{chunk-2S3Z2CN6.js → chunk-FFEEPZEG.js} +367 -102
  4. package/dist/chunk-FFEEPZEG.js.map +1 -0
  5. package/dist/index.js +1 -1
  6. package/dist/react/hooks.d.ts +1 -1
  7. package/dist/react/hooks.d.ts.map +1 -1
  8. package/dist/react/index.d.ts +1 -1
  9. package/dist/react/index.d.ts.map +1 -1
  10. package/dist/react/index.js +5 -1
  11. package/dist/react/index.js.map +1 -1
  12. package/dist/react-core/hooks.d.ts +59 -0
  13. package/dist/react-core/hooks.d.ts.map +1 -1
  14. package/dist/react-core/index.js +124 -36
  15. package/dist/react-core/index.js.map +1 -1
  16. package/dist/react-core/tests/testUtils.d.ts +1 -0
  17. package/dist/react-core/tests/testUtils.d.ts.map +1 -1
  18. package/dist/react-core/tests/useSuspenseAccount.test.d.ts +2 -0
  19. package/dist/react-core/tests/useSuspenseAccount.test.d.ts.map +1 -0
  20. package/dist/react-core/tests/useSuspenseCoState.test.d.ts +2 -0
  21. package/dist/react-core/tests/useSuspenseCoState.test.d.ts.map +1 -0
  22. package/dist/react-core/use.d.ts +3 -0
  23. package/dist/react-core/use.d.ts.map +1 -0
  24. package/dist/react-native/index.js +5 -1
  25. package/dist/react-native/index.js.map +1 -1
  26. package/dist/react-native-core/crypto/RNCrypto.d.ts +2 -0
  27. package/dist/react-native-core/crypto/RNCrypto.d.ts.map +1 -0
  28. package/dist/react-native-core/crypto/RNCrypto.js +3 -0
  29. package/dist/react-native-core/crypto/RNCrypto.js.map +1 -0
  30. package/dist/react-native-core/hooks.d.ts +1 -1
  31. package/dist/react-native-core/hooks.d.ts.map +1 -1
  32. package/dist/react-native-core/index.js +5 -1
  33. package/dist/react-native-core/index.js.map +1 -1
  34. package/dist/react-native-core/platform.d.ts +2 -1
  35. package/dist/react-native-core/platform.d.ts.map +1 -1
  36. package/dist/testing.js +1 -1
  37. package/dist/testing.js.map +1 -1
  38. package/dist/tools/coValues/interfaces.d.ts +1 -1
  39. package/dist/tools/coValues/interfaces.d.ts.map +1 -1
  40. package/dist/tools/implementation/ContextManager.d.ts +3 -0
  41. package/dist/tools/implementation/ContextManager.d.ts.map +1 -1
  42. package/dist/tools/subscribe/CoValueCoreSubscription.d.ts +8 -22
  43. package/dist/tools/subscribe/CoValueCoreSubscription.d.ts.map +1 -1
  44. package/dist/tools/subscribe/SubscriptionCache.d.ts +51 -0
  45. package/dist/tools/subscribe/SubscriptionCache.d.ts.map +1 -0
  46. package/dist/tools/subscribe/SubscriptionScope.d.ts +17 -1
  47. package/dist/tools/subscribe/SubscriptionScope.d.ts.map +1 -1
  48. package/dist/tools/subscribe/utils.d.ts +9 -1
  49. package/dist/tools/subscribe/utils.d.ts.map +1 -1
  50. package/dist/tools/testing.d.ts +2 -2
  51. package/dist/tools/testing.d.ts.map +1 -1
  52. package/dist/tools/tests/SubscriptionCache.test.d.ts +2 -0
  53. package/dist/tools/tests/SubscriptionCache.test.d.ts.map +1 -0
  54. package/package.json +13 -6
  55. package/src/react/hooks.tsx +2 -0
  56. package/src/react/index.ts +1 -14
  57. package/src/react-core/hooks.ts +167 -18
  58. package/src/react-core/tests/createCoValueSubscriptionContext.test.tsx +18 -8
  59. package/src/react-core/tests/testUtils.tsx +67 -5
  60. package/src/react-core/tests/useCoState.test.ts +3 -7
  61. package/src/react-core/tests/useSubscriptionSelector.test.ts +3 -7
  62. package/src/react-core/tests/useSuspenseAccount.test.tsx +343 -0
  63. package/src/react-core/tests/useSuspenseCoState.test.tsx +1182 -0
  64. package/src/react-core/use.ts +46 -0
  65. package/src/react-native-core/crypto/RNCrypto.ts +1 -0
  66. package/src/react-native-core/hooks.tsx +2 -0
  67. package/src/react-native-core/platform.ts +2 -1
  68. package/src/tools/coValues/interfaces.ts +2 -3
  69. package/src/tools/implementation/ContextManager.ts +13 -0
  70. package/src/tools/subscribe/CoValueCoreSubscription.ts +71 -100
  71. package/src/tools/subscribe/SubscriptionCache.ts +272 -0
  72. package/src/tools/subscribe/SubscriptionScope.ts +113 -7
  73. package/src/tools/subscribe/utils.ts +77 -0
  74. package/src/tools/testing.ts +0 -3
  75. package/src/tools/tests/CoValueCoreSubscription.test.ts +46 -12
  76. package/src/tools/tests/ContextManager.test.ts +85 -0
  77. package/src/tools/tests/SubscriptionCache.test.ts +237 -0
  78. package/src/tools/tests/coMap.test.ts +5 -7
  79. package/tsup.config.ts +1 -0
  80. package/dist/chunk-2S3Z2CN6.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
 
2
- > jazz-tools@0.19.8 build /home/runner/_work/jazz/jazz/packages/jazz-tools
2
+ > jazz-tools@0.19.10 build /home/runner/_work/jazz/jazz/packages/jazz-tools
3
3
  > tsup && pnpm types && pnpm build:svelte
4
4
 
5
5
  CLI Building entry: {"index":"src/index.ts","testing":"src/testing.ts","tools/ssr":"src/tools/ssr/index.ts"}
@@ -22,7 +22,7 @@
22
22
  CLI Using tsconfig: tsconfig.json
23
23
  CLI Building entry: {"index":"src/react-native/index.ts","testing":"src/react-native/testing.ts","crypto":"src/react-native/crypto.ts","polyfills":"src/react-native-core/polyfills/index.js"}
24
24
  CLI Using tsconfig: tsconfig.json
25
- CLI Building entry: {"index":"src/react-native-core/index.ts","testing":"src/react-native-core/testing.tsx","crypto":"src/react-native-core/crypto/index.ts"}
25
+ CLI Building entry: {"index":"src/react-native-core/index.ts","testing":"src/react-native-core/testing.tsx","crypto":"src/react-native-core/crypto/index.ts","crypto/RNCrypto":"src/react-native-core/crypto/RNCrypto.ts"}
26
26
  CLI Using tsconfig: tsconfig.json
27
27
  CLI Building entry: {"index":"src/tiptap/index.ts"}
28
28
  CLI Using tsconfig: tsconfig.json
@@ -109,21 +109,21 @@
109
109
  ESM Build start
110
110
  ESM dist/tiptap/index.js 564.00 B
111
111
  ESM dist/tiptap/index.js.map 1.21 KB
112
- ESM ⚡️ Build success in 51ms
112
+ ESM ⚡️ Build success in 57ms
113
113
  ESM dist/worker/index.js 3.19 KB
114
114
  ESM dist/worker/edge-wasm.js 215.00 B
115
115
  ESM dist/worker/napi-crypto.js 110.00 B
116
116
  ESM dist/worker/index.js.map 6.24 KB
117
117
  ESM dist/worker/edge-wasm.js.map 434.00 B
118
118
  ESM dist/worker/napi-crypto.js.map 162.00 B
119
- ESM ⚡️ Build success in 50ms
119
+ ESM ⚡️ Build success in 56ms
120
120
  ESM dist/better-auth/auth/client.js 4.50 KB
121
121
  ESM dist/better-auth/auth/server.js 8.36 KB
122
122
  ESM dist/better-auth/auth/react.js 799.00 B
123
123
  ESM dist/better-auth/auth/client.js.map 8.32 KB
124
124
  ESM dist/better-auth/auth/server.js.map 15.31 KB
125
125
  ESM dist/better-auth/auth/react.js.map 2.04 KB
126
- ESM ⚡️ Build success in 51ms
126
+ ESM ⚡️ Build success in 48ms
127
127
  ESM dist/media/index.js 236.00 B
128
128
  ESM dist/media/index.browser.js 2.79 KB
129
129
  ESM dist/media/index.native.js 4.01 KB
@@ -134,82 +134,84 @@
134
134
  ESM dist/media/index.native.js.map 8.10 KB
135
135
  ESM dist/media/index.server.js.map 6.37 KB
136
136
  ESM dist/media/chunk-3LKBM3G3.js.map 16.99 KB
137
- ESM ⚡️ Build success in 59ms
138
- ESM dist/react-core/index.js 14.72 KB
137
+ ESM ⚡️ Build success in 71ms
138
+ ESM dist/expo/index.js 4.68 KB
139
+ ESM dist/expo/testing.js 112.00 B
140
+ ESM dist/expo/crypto.js 153.00 B
141
+ ESM dist/expo/polyfills.js 858.00 B
142
+ ESM dist/expo/index.js.map 10.23 KB
143
+ ESM dist/expo/testing.js.map 168.00 B
144
+ ESM dist/expo/crypto.js.map 189.00 B
145
+ ESM dist/expo/polyfills.js.map 1.61 KB
146
+ ESM ⚡️ Build success in 63ms
147
+ ESM dist/react-core/index.js 17.04 KB
139
148
  ESM dist/react-core/testing.js 1.22 KB
140
149
  ESM dist/react-core/chunk-7DYMJ74I.js 279.00 B
141
- ESM dist/react-core/index.js.map 41.44 KB
150
+ ESM dist/react-core/index.js.map 49.75 KB
142
151
  ESM dist/react-core/testing.js.map 1.86 KB
143
152
  ESM dist/react-core/chunk-7DYMJ74I.js.map 533.00 B
144
- ESM ⚡️ Build success in 75ms
153
+ ESM ⚡️ Build success in 86ms
145
154
  ESM dist/prosemirror/index.js 77.76 KB
146
155
  ESM dist/prosemirror/index.js.map 307.20 KB
147
- ESM ⚡️ Build success in 77ms
156
+ ESM ⚡️ Build success in 97ms
148
157
  ESM dist/browser/index.js 14.06 KB
149
158
  ESM dist/browser/index.js.map 29.94 KB
150
- ESM ⚡️ Build success in 80ms
159
+ ESM ⚡️ Build success in 103ms
151
160
  ESM dist/better-auth/database-adapter/index.js 26.65 KB
152
161
  ESM dist/better-auth/database-adapter/index.js.map 58.26 KB
153
- ESM ⚡️ Build success in 78ms
154
- ESM dist/expo/index.js 4.68 KB
155
- ESM dist/expo/testing.js 112.00 B
156
- ESM dist/expo/crypto.js 153.00 B
157
- ESM dist/expo/polyfills.js 858.00 B
158
- ESM dist/expo/index.js.map 10.23 KB
159
- ESM dist/expo/testing.js.map 168.00 B
160
- ESM dist/expo/crypto.js.map 189.00 B
161
- ESM dist/expo/polyfills.js.map 1.61 KB
162
- ESM ⚡️ Build success in 85ms
163
- ESM dist/react-native-core/index.js 18.97 KB
164
- ESM dist/react-native-core/testing.js 119.00 B
165
- ESM dist/react-native-core/crypto.js 2.58 KB
166
- ESM dist/react-native-core/index.js.map 38.60 KB
167
- ESM dist/react-native-core/testing.js.map 175.00 B
168
- ESM dist/react-native-core/crypto.js.map 5.25 KB
169
- ESM ⚡️ Build success in 91ms
170
- ESM dist/react-native/index.js 21.51 KB
162
+ ESM ⚡️ Build success in 89ms
163
+ ESM dist/react-native-core/index.js 19.05 KB
164
+ ESM dist/react-native-core/crypto.js 2.58 KB
165
+ ESM dist/react-native-core/testing.js 119.00 B
166
+ ESM dist/react-native-core/crypto/RNCrypto.js 120.00 B
167
+ ESM dist/react-native-core/index.js.map 38.74 KB
168
+ ESM dist/react-native-core/crypto.js.map 5.25 KB
169
+ ESM dist/react-native-core/testing.js.map 175.00 B
170
+ ESM dist/react-native-core/crypto/RNCrypto.js.map 178.00 B
171
+ ESM ⚡️ Build success in 105ms
172
+ ESM dist/react-native/index.js 21.59 KB
171
173
  ESM dist/react-native/testing.js 120.00 B
172
174
  ESM dist/react-native/crypto.js 161.00 B
173
175
  ESM dist/react-native/polyfills.js 858.00 B
174
- ESM dist/react-native/index.js.map 44.15 KB
176
+ ESM dist/react-native/index.js.map 44.29 KB
175
177
  ESM dist/react-native/testing.js.map 176.00 B
176
178
  ESM dist/react-native/crypto.js.map 197.00 B
177
179
  ESM dist/react-native/polyfills.js.map 1.61 KB
178
- ESM ⚡️ Build success in 110ms
179
- ESM dist/react/index.js 25.74 KB
180
+ ESM ⚡️ Build success in 111ms
181
+ ESM dist/react/index.js 25.83 KB
180
182
  ESM dist/react/testing.js 122.00 B
181
183
  ESM dist/react/ssr.js 697.00 B
182
- ESM dist/react/index.js.map 55.43 KB
184
+ ESM dist/react/index.js.map 55.23 KB
183
185
  ESM dist/react/testing.js.map 165.00 B
184
186
  ESM dist/react/ssr.js.map 1.11 KB
185
187
  ESM ⚡️ Build success in 101ms
186
188
  ESM dist/inspector/index.js 125.80 KB
187
189
  ESM dist/inspector/index.js.map 216.33 KB
188
- ESM ⚡️ Build success in 127ms
190
+ ESM ⚡️ Build success in 164ms
189
191
  ESM dist/index.js 29.76 KB
190
192
  ESM dist/testing.js 8.51 KB
191
- ESM dist/chunk-2S3Z2CN6.js 206.41 KB
193
+ ESM dist/chunk-FFEEPZEG.js 213.13 KB
192
194
  ESM dist/tools/ssr.js 156.00 B
193
195
  ESM dist/chunk-M2HGBOXS.js 694.00 B
194
196
  ESM dist/chunk-PZ5AY32C.js 233.00 B
195
197
  ESM dist/index.js.map 60.59 KB
196
- ESM dist/testing.js.map 16.17 KB
197
- ESM dist/chunk-2S3Z2CN6.js.map 486.44 KB
198
+ ESM dist/testing.js.map 16.13 KB
199
+ ESM dist/chunk-FFEEPZEG.js.map 502.18 KB
198
200
  ESM dist/tools/ssr.js.map 71.00 B
199
201
  ESM dist/chunk-M2HGBOXS.js.map 1.10 KB
200
202
  ESM dist/chunk-PZ5AY32C.js.map 71.00 B
201
- ESM ⚡️ Build success in 174ms
203
+ ESM ⚡️ Build success in 188ms
202
204
  ESM dist/inspector/register-custom-element.js 218.00 B
203
- ESM dist/inspector/custom-element-P76EIWEV.js 1.60 MB
204
205
  ESM dist/inspector/register-custom-element.js.map 314.00 B
206
+ ESM dist/inspector/custom-element-P76EIWEV.js 1.60 MB
205
207
  ESM dist/inspector/custom-element-P76EIWEV.js.map 2.45 MB
206
- ESM ⚡️ Build success in 217ms
208
+ ESM ⚡️ Build success in 238ms
207
209
 
208
- > jazz-tools@0.19.8 types /home/runner/_work/jazz/jazz/packages/jazz-tools
210
+ > jazz-tools@0.19.10 types /home/runner/_work/jazz/jazz/packages/jazz-tools
209
211
  > tsc --outDir dist
210
212
 
211
213
 
212
- > jazz-tools@0.19.8 build:svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
214
+ > jazz-tools@0.19.10 build:svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
213
215
  > rm -rf dist/svelte && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json
214
216
 
215
217
  src/svelte -> dist/svelte
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # jazz-tools
2
2
 
3
+ ## 0.19.10
4
+
5
+ ### Patch Changes
6
+
7
+ - cojson@0.19.10
8
+ - cojson-storage-indexeddb@0.19.10
9
+ - cojson-transport-ws@0.19.10
10
+
11
+ ## 0.19.9
12
+
13
+ ### Patch Changes
14
+
15
+ - d901caa: Added cojson-core-rn that improves ReactNative crypto performance
16
+ - a2bb9f0: Added Suspense hooks for React and implemented subscription deduplication for React hooks
17
+ - Updated dependencies [d901caa]
18
+ - cojson@0.19.9
19
+ - cojson-storage-indexeddb@0.19.9
20
+ - cojson-transport-ws@0.19.9
21
+
3
22
  ## 0.19.8
4
23
 
5
24
  ### Patch Changes
@@ -347,7 +366,6 @@
347
366
  ### Patch Changes
348
367
 
349
368
  - f2f478a: Add connection status API for React and Svelte
350
-
351
369
  - **React**: Added `useSyncConnectionStatus()` hook that returns the current connection status to the Jazz sync server
352
370
  - **Svelte**: Added `SyncConnectionStatus` class that provides reactive connection status monitoring
353
371
 
@@ -383,7 +401,6 @@
383
401
  ### Patch Changes
384
402
 
385
403
  - a584ab3: Add WasmCrypto support for Cloudflare Workers and edge runtimes by importing `jazz-tools/load-edge-wasm`.
386
-
387
404
  - Enable WasmCrypto functionality by initializing the WebAssembly environment with the import: `import "jazz-tools/load-edge-wasm"` in edge runtimes.
388
405
  - Guarantee compatibility across Cloudflare Workers and other edge runtime environments.
389
406
 
@@ -767,7 +784,6 @@
767
784
  - 3cd1586: Makes the key rotation not fail when child groups are unavailable or their readkey is not accessible.
768
785
 
769
786
  Also changes the Group.removeMember method to not return a Promise, because:
770
-
771
787
  - All the locally available child groups are rotated immediately
772
788
  - All the remote child groups are rotated in background, but since they are not locally available the user won't need the new key immediately
773
789