Compare commits
60 Commits
jazz-nodej
...
1740-updat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44134d2023 | ||
|
|
b5a4422b83 | ||
|
|
1f7e284406 | ||
|
|
87fc02a43a | ||
|
|
773898fb61 | ||
|
|
5b9e1190e1 | ||
|
|
47ef85fd54 | ||
|
|
a4d287d625 | ||
|
|
4c2c936df9 | ||
|
|
1ce3cd25ec | ||
|
|
556b8c966f | ||
|
|
082c1844aa | ||
|
|
df790abb6c | ||
|
|
bd31a353b6 | ||
|
|
c3a028ce00 | ||
|
|
de7dfdec24 | ||
|
|
e73ebea96a | ||
|
|
1aac833d19 | ||
|
|
82d8ba14e3 | ||
|
|
104592ab4a | ||
|
|
32cc542fea | ||
|
|
a4288804ea | ||
|
|
5d03659f69 | ||
|
|
c81a2e14f8 | ||
|
|
ee5a673a39 | ||
|
|
2835ee04fa | ||
|
|
1550652258 | ||
|
|
a5bb3f900f | ||
|
|
a75c93f28b | ||
|
|
5acca937fa | ||
|
|
7d97aa75f9 | ||
|
|
a49c90b075 | ||
|
|
390bd0e700 | ||
|
|
7a7c895346 | ||
|
|
3b2b611f8e | ||
|
|
8327e99879 | ||
|
|
87ee7cabe1 | ||
|
|
252b5d70ad | ||
|
|
63a3bc9abb | ||
|
|
69dd564c96 | ||
|
|
cb8ab02c7b | ||
|
|
7f79f1ec49 | ||
|
|
ea6224da93 | ||
|
|
8e0acd5bc7 | ||
|
|
f9628924b5 | ||
|
|
9091e0d096 | ||
|
|
eb090996dc | ||
|
|
789bd91ade | ||
|
|
680e8fbc54 | ||
|
|
97d5b78423 | ||
|
|
55479a7446 | ||
|
|
8dbb0a6803 | ||
|
|
7979c22755 | ||
|
|
f2a19694e5 | ||
|
|
7d39a3b085 | ||
|
|
cd9d9c75f9 | ||
|
|
223d5f83df | ||
|
|
99815d15bb | ||
|
|
e1d414fde9 | ||
|
|
d72c9fbc29 |
@@ -9,18 +9,18 @@
|
||||
"cojson-storage",
|
||||
"cojson-storage-indexeddb",
|
||||
"cojson-storage-sqlite",
|
||||
"cojson-storage-rn-sqlite",
|
||||
"cojson-transport-ws",
|
||||
"jazz-browser",
|
||||
"jazz-auth-clerk",
|
||||
"jazz-browser-media-images",
|
||||
"jazz-expo",
|
||||
"jazz-inspector",
|
||||
"jazz-nodejs",
|
||||
"jazz-react",
|
||||
"jazz-react-core",
|
||||
"jazz-react-auth-clerk",
|
||||
"jazz-react-native-core",
|
||||
"jazz-react-native",
|
||||
"jazz-react-native-auth-clerk",
|
||||
"jazz-react-native-media-images",
|
||||
"jazz-run",
|
||||
"jazz-svelte",
|
||||
|
||||
5
.changeset/good-parrots-rhyme.md
Normal file
5
.changeset/good-parrots-rhyme.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"multiauth": patch
|
||||
---
|
||||
|
||||
Use the new Resolve API
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -23,7 +23,6 @@ test-results
|
||||
.husky
|
||||
|
||||
.vscode/*
|
||||
.idea/*
|
||||
|
||||
.svelte-kit
|
||||
|
||||
|
||||
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
6
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
6
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
||||
8
.idea/jazz.iml
generated
Normal file
8
.idea/jazz.iml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/jazz.iml" filepath="$PROJECT_DIR$/.idea/jazz.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
19
.idea/php.xml
generated
Normal file
19
.idea/php.xml
generated
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="MessDetectorOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCSFixerOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCodeSnifferOptionsConfiguration">
|
||||
<option name="highlightLevel" value="WARNING" />
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PhpStanOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PsalmOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/prettier.xml
generated
Normal file
6
.idea/prettier.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="PrettierConfiguration">
|
||||
<option name="myConfigurationMode" value="AUTOMATIC" />
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,39 +1,5 @@
|
||||
# chat-rn-expo-clerk
|
||||
|
||||
## 1.0.95
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-expo@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
- jazz-react-native-media-images@0.13.2
|
||||
|
||||
## 1.0.94
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [63a7aa0]
|
||||
- jazz-expo@0.13.1
|
||||
|
||||
## 1.0.93
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [bce3bcc]
|
||||
- Updated dependencies [afd1374]
|
||||
- jazz-expo@0.13.0
|
||||
- jazz-tools@0.13.0
|
||||
- jazz-react-native-media-images@0.13.0
|
||||
|
||||
## 1.0.92
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.12.2
|
||||
- jazz-react-native-auth-clerk@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
- jazz-react-native-media-images@0.12.2
|
||||
|
||||
## 1.0.91
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -165,8 +165,8 @@ export default function Conversation() {
|
||||
!isMe ? "mt-2 text-gray-500" : "mt-1 text-gray-200",
|
||||
)}
|
||||
>
|
||||
{item._edits.text.madeAt?.getHours().toString().padStart(2, "0")}:
|
||||
{item._edits.text.madeAt?.getMinutes().toString().padStart(2, "0")}
|
||||
{item._edits.text.madeAt.getHours()}:
|
||||
{item._edits.text.madeAt.getMinutes()}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "chat-rn-expo-clerk",
|
||||
"main": "index.js",
|
||||
"version": "1.0.95",
|
||||
"version": "1.0.91",
|
||||
"scripts": {
|
||||
"build": "expo export -p ios",
|
||||
"start": "expo start",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { useClerk } from "@clerk/clerk-expo";
|
||||
import { JazzProviderWithClerk } from "jazz-expo/auth/clerk";
|
||||
// FIXME: why isn't the export working? IDE is fine, Metro doesn't like the non 'dist' import
|
||||
import { JazzProviderWithClerk } from "jazz-expo/dist/auth/clerk";
|
||||
import React, { PropsWithChildren } from "react";
|
||||
import { apiKey } from "./apiKey";
|
||||
|
||||
|
||||
@@ -1,35 +1,5 @@
|
||||
# chat-rn-expo
|
||||
|
||||
## 1.0.82
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-expo@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
|
||||
## 1.0.81
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [63a7aa0]
|
||||
- jazz-expo@0.13.1
|
||||
|
||||
## 1.0.80
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [bce3bcc]
|
||||
- Updated dependencies [afd1374]
|
||||
- jazz-expo@0.13.0
|
||||
- jazz-tools@0.13.0
|
||||
|
||||
## 1.0.88
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
|
||||
## 1.0.87
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "chat-rn-expo",
|
||||
"version": "1.0.82",
|
||||
"version": "1.0.79",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "expo export -p ios",
|
||||
|
||||
@@ -125,12 +125,8 @@ export default function ChatScreen({ navigation }: { navigation: any }) {
|
||||
!isMe ? "mt-2" : "mt-1",
|
||||
)}
|
||||
>
|
||||
{item?._edits?.text?.madeAt?.getHours().toString().padStart(2, "0")}
|
||||
:
|
||||
{item?._edits?.text?.madeAt
|
||||
?.getMinutes()
|
||||
.toString()
|
||||
.padStart(2, "0")}
|
||||
{item?._edits?.text?.madeAt?.getHours()}:
|
||||
{item?._edits?.text?.madeAt?.getMinutes()}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
# chat-rn
|
||||
|
||||
## 1.0.91
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c551839]
|
||||
- cojson@0.13.2
|
||||
- cojson-transport-ws@0.13.2
|
||||
- jazz-react-native@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
|
||||
## 1.0.90
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [63a7aa0]
|
||||
- jazz-react-native@0.13.1
|
||||
|
||||
## 1.0.89
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [a013538]
|
||||
- Updated dependencies [bce3bcc]
|
||||
- Updated dependencies [afd1374]
|
||||
- Updated dependencies [bce3bcc]
|
||||
- cojson@0.13.0
|
||||
- jazz-react-native@0.13.0
|
||||
- jazz-tools@0.13.0
|
||||
- cojson-transport-ws@0.13.0
|
||||
@@ -1290,7 +1290,7 @@ PODS:
|
||||
- Yoga
|
||||
- react-native-netinfo (11.4.1):
|
||||
- React-Core
|
||||
- react-native-safe-area-context (4.12.0):
|
||||
- react-native-safe-area-context (5.3.0):
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- hermes-engine
|
||||
@@ -1303,8 +1303,8 @@ PODS:
|
||||
- React-featureflags
|
||||
- React-graphics
|
||||
- React-ImageManager
|
||||
- react-native-safe-area-context/common (= 4.12.0)
|
||||
- react-native-safe-area-context/fabric (= 4.12.0)
|
||||
- react-native-safe-area-context/common (= 5.3.0)
|
||||
- react-native-safe-area-context/fabric (= 5.3.0)
|
||||
- React-NativeModulesApple
|
||||
- React-RCTFabric
|
||||
- React-rendererdebug
|
||||
@@ -1313,7 +1313,7 @@ PODS:
|
||||
- ReactCommon/turbomodule/bridging
|
||||
- ReactCommon/turbomodule/core
|
||||
- Yoga
|
||||
- react-native-safe-area-context/common (4.12.0):
|
||||
- react-native-safe-area-context/common (5.3.0):
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- hermes-engine
|
||||
@@ -1334,7 +1334,7 @@ PODS:
|
||||
- ReactCommon/turbomodule/bridging
|
||||
- ReactCommon/turbomodule/core
|
||||
- Yoga
|
||||
- react-native-safe-area-context/fabric (4.12.0):
|
||||
- react-native-safe-area-context/fabric (5.3.0):
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- hermes-engine
|
||||
@@ -1644,7 +1644,7 @@ PODS:
|
||||
- ReactCommon/turbomodule/bridging
|
||||
- ReactCommon/turbomodule/core
|
||||
- Yoga
|
||||
- RNScreens (4.4.0):
|
||||
- RNScreens (4.1.0):
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- hermes-engine
|
||||
@@ -1665,9 +1665,9 @@ PODS:
|
||||
- ReactCodegen
|
||||
- ReactCommon/turbomodule/bridging
|
||||
- ReactCommon/turbomodule/core
|
||||
- RNScreens/common (= 4.4.0)
|
||||
- RNScreens/common (= 4.1.0)
|
||||
- Yoga
|
||||
- RNScreens/common (4.4.0):
|
||||
- RNScreens/common (4.1.0):
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- hermes-engine
|
||||
@@ -1920,72 +1920,72 @@ SPEC CHECKSUMS:
|
||||
fmt: 10c6e61f4be25dc963c36bd73fc7b1705fe975be
|
||||
glog: 08b301085f15bcbb6ff8632a8ebaf239aae04e6a
|
||||
hermes-engine: eb4a80f6bf578536c58a44198ec93a30f6e69218
|
||||
op-sqlite: 7ecaedd41684cc6c9f6fa267db0da48cbb11dc90
|
||||
op-sqlite: 17f173ae72a5e9617bf9000c9e0474cc518fdc5c
|
||||
RCT-Folly: bf5c0376ffe4dd2cf438dcf86db385df9fdce648
|
||||
RCTDeprecation: 7691283dd69fed46f6653d376de6fa83aaad774c
|
||||
RCTRequired: eac044a04629288f272ee6706e31f81f3a2b4bfe
|
||||
RCTTypeSafety: cfe499e127eda6dd46e5080e12d80d0bfe667228
|
||||
React: 1f3737a983fdd26fb3d388ddbca41a26950fe929
|
||||
React-callinvoker: 5c15ac628eab5468fe0b4dc453495f4742761f00
|
||||
React-Core: e467bf49f10da6fe92d915d2311cd0fd9bfbe052
|
||||
React-CoreModules: 0299b3c0782edd3b37c8445ba07bf18ceb73812d
|
||||
React-cxxreact: 54e253030b3b82b05575f19a1fb0e25c049f30ba
|
||||
React-Core: 4b90a977a5b2777fd8f4a8db7325a83431ecd2d8
|
||||
React-CoreModules: 385bbacfa34ac9208aa24f239a5184fa7ab1cd28
|
||||
React-cxxreact: 3e09bcdf1f86b931b5e96bf5429d7c274a0ec168
|
||||
React-debug: 2086b55a5e55fb0abae58c42b8f280ebd708c956
|
||||
React-defaultsnativemodule: f80f41ea8c1216917fd224b553291360e0e6a175
|
||||
React-domnativemodule: b14aaaf4afbaa7e1dbc86ad78cbcc71eb59f1faf
|
||||
React-Fabric: 409ce8a065374d737bdbc0fce506dcdda8f51e88
|
||||
React-FabricComponents: bd5faafffd07e56cf217d5417e80ec29348c19d9
|
||||
React-FabricImage: 04d01f3ecfed6121733613a5c794f684e81cb3fb
|
||||
React-defaultsnativemodule: 491e2541856e3580dae7f29d80754673a2134e48
|
||||
React-domnativemodule: 4aaed5d5eef3da7d7d49b1f2ae8f422a4d7794b7
|
||||
React-Fabric: 5b8373d1bd34bf269b13529a0ebee0643165ccf8
|
||||
React-FabricComponents: 3f8528c3ed060464a120e161ffaef9307a88817b
|
||||
React-FabricImage: 8efa4e206b1e5cf2e8e1e48fd345619c5c0484f4
|
||||
React-featureflags: 4503c901bf16b267b689e8a1aed24e951e0b091b
|
||||
React-featureflagsnativemodule: 79c980bfc96bcdcc9bd793d49fe75bbfb0e417ad
|
||||
React-graphics: c2febdc940fb3ebdaef082d940b70254ef49c7a1
|
||||
React-hermes: 91baa15c07e76b0768d6e10f4dac1c080a47eef4
|
||||
React-idlecallbacksnativemodule: 5daef402290b91e54a884101b032186c03fa1827
|
||||
React-ImageManager: b258354a48a92168edc41fdc0c14a4310cc4d576
|
||||
React-jserrorhandler: 45d858315f6474dad3912aadb3f6595004dc5f4f
|
||||
React-jsi: 87fa67556d7a82125bc77930bf973717fb726d14
|
||||
React-jsiexecutor: 3a92052dd96cff1cd693fa3ef8d9738b1d05372a
|
||||
React-jsinspector: 05aff7dd91b0685d351cdeb8c151c9f9ec97accd
|
||||
React-jsitracing: 419fa21e8543f5a938b11b5a0bfc257b00dac7a5
|
||||
React-logger: 5cad0c76d056809523289e589309012215a393b5
|
||||
React-Mapbuffer: a381120aea722d2244d4e4b663a10d4c3b2d4e51
|
||||
React-microtasksnativemodule: d9b946675010659cddd1c7611c074216579c8ad3
|
||||
react-native-get-random-values: d16467cf726c618e9c7a8c3c39c31faa2244bbba
|
||||
react-native-mmkv: b4af3744580f08e1ffc7761103b408d313b2f772
|
||||
react-native-netinfo: cec9c4e86083cb5b6aba0e0711f563e2fbbff187
|
||||
react-native-safe-area-context: 0f16e24dc808e9f0ced17f2bdcec692b2376fb68
|
||||
React-featureflagsnativemodule: 415168f5d23413fd0cc55ad98c41a3f3f135b2a7
|
||||
React-graphics: c619a6e974baf9a7dbae8442944c7b7408391d46
|
||||
React-hermes: 24bfc254f1ba83182d4936641898fe963af343fb
|
||||
React-idlecallbacksnativemodule: 2c2e4c3f561a98c84a7a68c0d1f868b64ca5f839
|
||||
React-ImageManager: ba9c89729be310413c610444a658fac505253d2c
|
||||
React-jserrorhandler: bf16ea495377b22223bf93f3ef6d0711b9852613
|
||||
React-jsi: ede7e8c96f997f8772871c82688cea53c1ffb148
|
||||
React-jsiexecutor: fc9b287189ce800a92d5ab4e7291508eacaab451
|
||||
React-jsinspector: fa5e8b22102b599c2bb2aeafebbf957a1ab836da
|
||||
React-jsitracing: f38c15aeb910bafcf3ba2e24af8c92e6af4ce1d4
|
||||
React-logger: f9d104eace4ce03d7d5ab96802069d9905082225
|
||||
React-Mapbuffer: 23ffe602d0f5ca53b861ef8534cb8c63c4479671
|
||||
React-microtasksnativemodule: 73fdf0c53b6d50d55de2d5bd9abfb8c006b043a4
|
||||
react-native-get-random-values: 21325b2244dfa6b58878f51f9aa42821e7ba3d06
|
||||
react-native-mmkv: 21d0f6ed2d9532f2370cef81eca4ccbef7350441
|
||||
react-native-netinfo: f0a9899081c185db1de5bb2fdc1c88c202a059ac
|
||||
react-native-safe-area-context: 26a64672a8d76556e54682ab5aa0a6b6798d8a8e
|
||||
React-nativeconfig: 67fa7a63ea288cb5b1d0dd2deaf240405fec164f
|
||||
React-NativeModulesApple: 34b7a4d7441a4ee78d18109ff107c1ccf7c074a9
|
||||
React-perflogger: d1149037ac466ad2141d4ae541ca16cb73b2343b
|
||||
React-performancetimeline: 6b46b0a17727a3ec22ec4777d156d6b6efc4f8eb
|
||||
React-NativeModulesApple: cbf1a34443e1f67b56344547f4b0af69e1c685ba
|
||||
React-perflogger: f02ee21d98773121d77993b3c1a8be445840fae3
|
||||
React-performancetimeline: 7021d68884291b649b4c39ecb71e0fd3a2e53a59
|
||||
React-RCTActionSheet: ad84d5a0bd1ad1782f0b78b280c6f329ad79a53a
|
||||
React-RCTAnimation: 64ed42bb43b33b0d861126f83048429606390903
|
||||
React-RCTAppDelegate: de8150cd7e748bd7a98ffc05c88f21c668407ab4
|
||||
React-RCTBlob: e74dfdbbfcd46d9d1eec3b3a0f045e655e3f7861
|
||||
React-RCTFabric: bc0327e719fb12f969ac0e17485ba274b9c2c335
|
||||
React-RCTImage: 1b6d8ad60f74a3cec4ee52e0ca55f1773afd03f4
|
||||
React-RCTLinking: 88b2384d876346fbb16839a60c1d20830b2e95fe
|
||||
React-RCTNetwork: 88aa473814e796d3a7bc6a0b51e7ae5749bdc243
|
||||
React-RCTSettings: 0d73a1846aef87ef07c2026c186ea0d80602a130
|
||||
React-RCTText: bfdb776f849156f895909ee999b4b5f2f9cf9a0b
|
||||
React-RCTVibration: 81c8bbcc841ce5a7ae6e1bd2ec949b30e58d1fcf
|
||||
React-RCTAnimation: 388460f7c124c76e337c6646738a83d6ea147095
|
||||
React-RCTAppDelegate: 4661e2a44f7ce1033bf6f373f7d5368b11f5a2be
|
||||
React-RCTBlob: 07cccbb74e22ce66745358799f6ab02a5bed2993
|
||||
React-RCTFabric: 77ebcd07a3c1f3d4c2d2f67f69033a65d16a36a8
|
||||
React-RCTImage: 8fbdae841ea1217c44f4c413bba2403134b83cd1
|
||||
React-RCTLinking: c59bf8286ba2cc327b01bb524fb9c16446dc18bc
|
||||
React-RCTNetwork: 2c137a0aaaed2cf4bb53aff82a2bb8c34f2fbeac
|
||||
React-RCTSettings: 9fcd32c5b38af6421a3dd20cdd9ebf09df0a9a6d
|
||||
React-RCTText: 5308618477fec454282809065bd121c2bd3dd5e1
|
||||
React-RCTVibration: 7b2a186756b5c8e586e3e7948eed4432a93299c0
|
||||
React-rendererconsistency: 65d4692825fda4d9516924b68c29d0f28da3158c
|
||||
React-rendererdebug: ab3696594d3506acc22ecea4dd68ac258c529c2d
|
||||
React-rendererdebug: 0b97f49d44c91862e1576961faf6bde836ed4eb3
|
||||
React-rncore: 6aca111c05a48c58189a005cb10a7b52780738dc
|
||||
React-RuntimeApple: 5245e8cf30e417fe3e798ed991b938679656ab8f
|
||||
React-RuntimeCore: c79d23b31aded614f4afeaac53f4da37c792c362
|
||||
React-RuntimeApple: aa20633298595444bf2dfbc5246889b4f475b871
|
||||
React-RuntimeCore: 8ac56cc6d82a1090f1d15d48b487c9a5a1d7d915
|
||||
React-runtimeexecutor: 732038d7c356ba74132f1d16253a410621d3c2c1
|
||||
React-RuntimeHermes: b3b1d7fc42d74141a71ae23fedbc4e07e5a7fbd2
|
||||
React-runtimescheduler: 6e804311c6c9512ffe7f4b68d012767b225c48a1
|
||||
React-RuntimeHermes: a695d944686adc97f85a1b34c31840a0a39e356c
|
||||
React-runtimescheduler: 00666e100e35a13f28fb2fdab22817cf62bbd6a3
|
||||
React-timing: c2915214b94a62bdf77d2965c31f76bc25b362a5
|
||||
React-utils: 0342746d2cf989cf5e0d1b84c98cfa152edbdf3f
|
||||
ReactCodegen: ca395237650513af628c32aa1eb8fd586c771b13
|
||||
ReactCommon: 81e0744ee33adfd6d586141b927024f488bc49ea
|
||||
RNCClipboard: bdad452a8a44c90098dab5468152a6f72cb689be
|
||||
RNScreens: 351f431ef2a042a1887d4d90e1c1024b8ae9d123
|
||||
React-utils: 9f9a6a31d703b136eb1614d914c10a3c96b1e6dd
|
||||
ReactCodegen: 5d7e2d2948a6629a51a59ebc99f620e2afb13ee5
|
||||
ReactCommon: 04292c6f596181ebf755e7929d96d2148542b0e8
|
||||
RNCClipboard: c1dd9a853d56764a04ba278f61cd2cb58a138396
|
||||
RNScreens: 27587018b2e6082f5172b1ecf158c14a0e8842d6
|
||||
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
|
||||
Yoga: 90d80701b27946c4b23461c00a7207f300a6ff71
|
||||
|
||||
PODFILE CHECKSUM: 3c941cec20e8dff1c7d38ce78a515b4cca0ee574
|
||||
|
||||
COCOAPODS: 1.16.2
|
||||
COCOAPODS: 1.15.2
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"name": "chat-rn",
|
||||
"version": "1.0.91",
|
||||
"main": "index.js",
|
||||
"version": "1.0.87",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"android": "react-native run-android",
|
||||
"ios": "react-native run-ios",
|
||||
"lint": "eslint .",
|
||||
"start": "react-native start",
|
||||
"test": "jest",
|
||||
"pods": "pod-install"
|
||||
"pods": "bundle install && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install --project-directory=ios"
|
||||
},
|
||||
"dependencies": {
|
||||
"@azure/core-asynciterator-polyfill": "^1.0.2",
|
||||
@@ -53,7 +53,6 @@
|
||||
"babel-jest": "^29.6.3",
|
||||
"eslint": "^8.19.0",
|
||||
"jest": "^29.6.3",
|
||||
"pod-install": "^0.3.5",
|
||||
"prettier": "2.8.8",
|
||||
"react-test-renderer": "18.3.1",
|
||||
"typescript": "5.0.4"
|
||||
|
||||
@@ -116,12 +116,8 @@ export function ChatScreen({ navigation }: { navigation: any }) {
|
||||
!isMe ? styles.timestampOther : styles.timestampMy,
|
||||
]}
|
||||
>
|
||||
{item?._edits?.text?.madeAt?.getHours().toString().padStart(2, "0")}
|
||||
:
|
||||
{item?._edits?.text?.madeAt
|
||||
?.getMinutes()
|
||||
.toString()
|
||||
.padStart(2, "0")}
|
||||
{item?._edits?.text?.madeAt?.getHours()}:
|
||||
{item?._edits?.text?.madeAt?.getMinutes()}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -1,31 +1,5 @@
|
||||
# chat-vue
|
||||
|
||||
## 0.0.75
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
- jazz-vue@0.13.2
|
||||
|
||||
## 0.0.74
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [afd1374]
|
||||
- jazz-tools@0.13.0
|
||||
- jazz-browser@0.13.0
|
||||
- jazz-vue@0.13.0
|
||||
|
||||
## 0.0.73
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [cc684eb]
|
||||
- jazz-browser@0.12.2
|
||||
- jazz-vue@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
|
||||
## 0.0.72
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "chat-vue",
|
||||
"version": "0.0.75",
|
||||
"version": "0.0.72",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,34 +1,5 @@
|
||||
# jazz-example-chat
|
||||
|
||||
## 0.0.172
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [ae4be2b]
|
||||
- jazz-inspector@0.13.2
|
||||
- jazz-react@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
|
||||
## 0.0.171
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2796689]
|
||||
- Updated dependencies [afd1374]
|
||||
- Updated dependencies [2224ed4]
|
||||
- jazz-inspector@0.13.0
|
||||
- jazz-tools@0.13.0
|
||||
- jazz-react@0.13.0
|
||||
|
||||
## 0.0.170
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8a71835]
|
||||
- jazz-inspector@0.12.2
|
||||
- jazz-react@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
|
||||
## 0.0.169
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-chat",
|
||||
"private": true,
|
||||
"version": "0.0.172",
|
||||
"version": "0.0.169",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,30 +1,5 @@
|
||||
# minimal-auth-clerk
|
||||
|
||||
## 0.0.71
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.13.2
|
||||
- jazz-react-auth-clerk@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
|
||||
## 0.0.70
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [afd1374]
|
||||
- jazz-tools@0.13.0
|
||||
- jazz-react@0.13.0
|
||||
- jazz-react-auth-clerk@0.13.0
|
||||
|
||||
## 0.0.69
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.12.2
|
||||
- jazz-react-auth-clerk@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
|
||||
## 0.0.68
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "clerk",
|
||||
"private": true,
|
||||
"version": "0.0.71",
|
||||
"version": "0.0.68",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,27 +1,5 @@
|
||||
# file-share-svelte
|
||||
|
||||
## 0.0.55
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
|
||||
## 0.0.54
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [afd1374]
|
||||
- jazz-tools@0.13.0
|
||||
- jazz-svelte@0.13.0
|
||||
|
||||
## 0.0.53
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
|
||||
## 0.0.52
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "file-share-svelte",
|
||||
"version": "0.0.55",
|
||||
"version": "0.0.52",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,32 +1,5 @@
|
||||
# jazz-tailwind-demo-auth-starter
|
||||
|
||||
## 0.0.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [ae4be2b]
|
||||
- jazz-inspector@0.13.2
|
||||
- jazz-react@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
|
||||
## 0.0.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2796689]
|
||||
- Updated dependencies [afd1374]
|
||||
- Updated dependencies [2224ed4]
|
||||
- jazz-inspector@0.13.0
|
||||
- jazz-tools@0.13.0
|
||||
- jazz-react@0.13.0
|
||||
|
||||
## 0.0.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
|
||||
## 0.0.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "filestream",
|
||||
"private": true,
|
||||
"version": "0.0.11",
|
||||
"version": "0.0.8",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -13,7 +13,6 @@
|
||||
"dependencies": {
|
||||
"jazz-react": "workspace:*",
|
||||
"jazz-tools": "workspace:*",
|
||||
"jazz-inspector": "workspace:*",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1"
|
||||
},
|
||||
|
||||
@@ -208,10 +208,6 @@ export function FileWidget() {
|
||||
<span className="font-bold">Size</span>
|
||||
<span>{formatFileSize(fileData?.totalSizeBytes)}</span>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<span className="font-bold">CoValue ID</span>
|
||||
<span>{me.profile.file.id}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { JazzInspector } from "jazz-inspector";
|
||||
import { JazzProvider } from "jazz-react";
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
@@ -24,7 +23,6 @@ createRoot(document.getElementById("root")!).render(
|
||||
}}
|
||||
AccountSchema={JazzAccount}
|
||||
>
|
||||
<JazzInspector />
|
||||
<App />
|
||||
</JazzProvider>
|
||||
</StrictMode>,
|
||||
|
||||
@@ -1,27 +1,5 @@
|
||||
# form
|
||||
|
||||
## 0.1.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
|
||||
## 0.1.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [afd1374]
|
||||
- jazz-tools@0.13.0
|
||||
- jazz-react@0.13.0
|
||||
|
||||
## 0.1.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
|
||||
## 0.1.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "form",
|
||||
"private": true,
|
||||
"version": "0.1.13",
|
||||
"version": "0.1.10",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,27 +1,5 @@
|
||||
# image-upload
|
||||
|
||||
## 0.0.69
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
|
||||
## 0.0.68
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [afd1374]
|
||||
- jazz-tools@0.13.0
|
||||
- jazz-react@0.13.0
|
||||
|
||||
## 0.0.67
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
|
||||
## 0.0.66
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "image-upload",
|
||||
"private": true,
|
||||
"version": "0.0.69",
|
||||
"version": "0.0.66",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,39 +1,5 @@
|
||||
# jazz-example-inspector
|
||||
|
||||
## 0.0.122
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [ae4be2b]
|
||||
- Updated dependencies [c551839]
|
||||
- jazz-inspector@0.13.2
|
||||
- cojson@0.13.2
|
||||
- cojson-transport-ws@0.13.2
|
||||
|
||||
## 0.0.121
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 2796689: various fixes and css refactoring
|
||||
- Updated dependencies [a013538]
|
||||
- Updated dependencies [2796689]
|
||||
- Updated dependencies [2224ed4]
|
||||
- Updated dependencies [bce3bcc]
|
||||
- cojson@0.13.0
|
||||
- jazz-inspector@0.13.0
|
||||
- cojson-transport-ws@0.13.0
|
||||
|
||||
## 0.0.120
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 8a71835: use goober for css
|
||||
- Updated dependencies [8a71835]
|
||||
- Updated dependencies [c2f4827]
|
||||
- jazz-inspector@0.12.2
|
||||
- cojson@0.12.2
|
||||
- cojson-transport-ws@0.12.2
|
||||
|
||||
## 0.0.119
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-inspector-app",
|
||||
"private": true,
|
||||
"version": "0.0.122",
|
||||
"version": "0.0.119",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -12,7 +12,6 @@ import { WasmCrypto } from "cojson/crypto/WasmCrypto";
|
||||
import {
|
||||
Breadcrumbs,
|
||||
Button,
|
||||
GlobalStyles,
|
||||
Icon,
|
||||
Input,
|
||||
PageStack,
|
||||
@@ -127,7 +126,7 @@ export default function CoJsonViewerApp() {
|
||||
}
|
||||
|
||||
return (
|
||||
<GlobalStyles
|
||||
<div
|
||||
className={clsx(
|
||||
"h-screen overflow-hidden flex flex-col",
|
||||
" text-stone-700 bg-white",
|
||||
@@ -203,7 +202,7 @@ export default function CoJsonViewerApp() {
|
||||
</form>
|
||||
)}
|
||||
</PageStack>
|
||||
</GlobalStyles>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -303,7 +302,6 @@ function AddAccountForm({
|
||||
type="password"
|
||||
value={secret}
|
||||
onChange={(e) => setSecret(e.target.value)}
|
||||
placeholder="sealerSecret_ziz7NA12340abcdef123789..."
|
||||
/>
|
||||
<Button className="mt-3" type="submit">
|
||||
Add account
|
||||
|
||||
@@ -1,27 +1,5 @@
|
||||
# multi-cursors
|
||||
|
||||
## 0.0.65
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
|
||||
## 0.0.64
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [afd1374]
|
||||
- jazz-tools@0.13.0
|
||||
- jazz-react@0.13.0
|
||||
|
||||
## 0.0.63
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
|
||||
## 0.0.62
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,64 +1,3 @@
|
||||
# Jazz Multi-Cursors Example
|
||||
# Multi-cursor example
|
||||
|
||||
Track user presence on a canvas with multiple cursors and out of bounds indicators.
|
||||
|
||||
## Getting started
|
||||
|
||||
You can either
|
||||
1. Clone the jazz repository, and run the app within the monorepo.
|
||||
2. Or create a new Jazz project using this example as a template.
|
||||
|
||||
|
||||
### Using the example as a template
|
||||
|
||||
Create a new Jazz project, and use this example as a template.
|
||||
```bash
|
||||
npx create-jazz-app@latest multi-cursors-app --example multi-cursors
|
||||
```
|
||||
|
||||
Go to the new project directory.
|
||||
```bash
|
||||
cd multi-cursors-app
|
||||
```
|
||||
|
||||
Run the dev server.
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Using the monorepo
|
||||
|
||||
This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation).
|
||||
|
||||
Clone the jazz repository.
|
||||
```bash
|
||||
git clone https://github.com/garden-co/jazz.git
|
||||
```
|
||||
|
||||
Install and build dependencies.
|
||||
```bash
|
||||
pnpm i && npx turbo build
|
||||
```
|
||||
|
||||
Go to the example directory.
|
||||
```bash
|
||||
cd jazz/examples/multi-cursors/
|
||||
```
|
||||
|
||||
Start the dev server.
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.
|
||||
|
||||
## Questions / problems / feedback
|
||||
|
||||
If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or open an issue or PR to fix something that seems wrong.
|
||||
|
||||
|
||||
## Configuration: sync server
|
||||
|
||||
By default, the example app uses [Jazz Cloud](https://jazz.tools/cloud) (`wss://cloud.jazz.tools`) - so cross-device use, invites and collaboration should just work.
|
||||
|
||||
You can also run a local sync server by running `npx jazz-run sync` and adding the query param `?sync=ws://localhost:4200` to the URL of the example app (for example: `http://localhost:5173/?peer=ws://localhost:4200`), or by setting the `sync` parameter of `JazzProvider` component in [./src/main.tsx](./src/main.tsx).
|
||||
An example app of using Jazz for showing multiple-cursors on a simple canvas.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "multi-cursors",
|
||||
"private": true,
|
||||
"version": "0.0.65",
|
||||
"version": "0.0.62",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -30,6 +30,6 @@
|
||||
"tailwindcss": "^3.4.17",
|
||||
"typescript": "~5.6.2",
|
||||
"vite": "^6.0.11",
|
||||
"vitest": "3.1.1"
|
||||
"vitest": "3.0.5"
|
||||
}
|
||||
}
|
||||
@@ -1,31 +1,5 @@
|
||||
# multiauth
|
||||
|
||||
## 0.0.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.13.2
|
||||
- jazz-react-auth-clerk@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
|
||||
## 0.0.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [afd1374]
|
||||
- jazz-tools@0.13.0
|
||||
- jazz-react@0.13.0
|
||||
- jazz-react-auth-clerk@0.13.0
|
||||
|
||||
## 0.0.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b108c61: Use the new Resolve API
|
||||
- jazz-react@0.12.2
|
||||
- jazz-react-auth-clerk@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
|
||||
## 0.0.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "multiauth",
|
||||
"private": true,
|
||||
"version": "0.0.12",
|
||||
"version": "0.0.9",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,34 +1,5 @@
|
||||
# jazz-example-musicplayer
|
||||
|
||||
## 0.0.93
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [ae4be2b]
|
||||
- jazz-inspector@0.13.2
|
||||
- jazz-react@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
|
||||
## 0.0.92
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2796689]
|
||||
- Updated dependencies [afd1374]
|
||||
- Updated dependencies [2224ed4]
|
||||
- jazz-inspector@0.13.0
|
||||
- jazz-tools@0.13.0
|
||||
- jazz-react@0.13.0
|
||||
|
||||
## 0.0.91
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8a71835]
|
||||
- jazz-inspector@0.12.2
|
||||
- jazz-react@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
|
||||
## 0.0.90
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-music-player",
|
||||
"private": true,
|
||||
"version": "0.0.93",
|
||||
"version": "0.0.90",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,27 +1,5 @@
|
||||
# organization
|
||||
|
||||
## 0.0.65
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
|
||||
## 0.0.64
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [afd1374]
|
||||
- jazz-tools@0.13.0
|
||||
- jazz-react@0.13.0
|
||||
|
||||
## 0.0.63
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
|
||||
## 0.0.62
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "organization",
|
||||
"private": true,
|
||||
"version": "0.0.65",
|
||||
"version": "0.0.62",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,23 +1,5 @@
|
||||
# passkey-svelte
|
||||
|
||||
## 0.0.59
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.13.2
|
||||
|
||||
## 0.0.58
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.13.0
|
||||
|
||||
## 0.0.57
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.12.2
|
||||
|
||||
## 0.0.56
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "passkey-svelte",
|
||||
"version": "0.0.59",
|
||||
"version": "0.0.56",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
@@ -1,27 +1,5 @@
|
||||
# minimal-auth-passkey
|
||||
|
||||
## 0.0.70
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
|
||||
## 0.0.69
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [afd1374]
|
||||
- jazz-tools@0.13.0
|
||||
- jazz-react@0.13.0
|
||||
|
||||
## 0.0.68
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
|
||||
## 0.0.67
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "passkey",
|
||||
"private": true,
|
||||
"version": "0.0.70",
|
||||
"version": "0.0.67",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,27 +1,5 @@
|
||||
# passphrase
|
||||
|
||||
## 0.0.67
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
|
||||
## 0.0.66
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [afd1374]
|
||||
- jazz-tools@0.13.0
|
||||
- jazz-react@0.13.0
|
||||
|
||||
## 0.0.65
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
|
||||
## 0.0.64
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "passphrase",
|
||||
"private": true,
|
||||
"version": "0.0.67",
|
||||
"version": "0.0.64",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,27 +1,5 @@
|
||||
# jazz-password-manager
|
||||
|
||||
## 0.0.91
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
|
||||
## 0.0.90
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [afd1374]
|
||||
- jazz-tools@0.13.0
|
||||
- jazz-react@0.13.0
|
||||
|
||||
## 0.0.89
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
|
||||
## 0.0.88
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-password-manager",
|
||||
"private": true,
|
||||
"version": "0.0.91",
|
||||
"version": "0.0.88",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,27 +1,5 @@
|
||||
# jazz-example-pets
|
||||
|
||||
## 0.0.189
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
|
||||
## 0.0.188
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [afd1374]
|
||||
- jazz-tools@0.13.0
|
||||
- jazz-react@0.13.0
|
||||
|
||||
## 0.0.187
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
|
||||
## 0.0.186
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-pets",
|
||||
"private": true,
|
||||
"version": "0.0.189",
|
||||
"version": "0.0.186",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,27 +1,5 @@
|
||||
# reactions
|
||||
|
||||
## 0.0.69
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
|
||||
## 0.0.68
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [afd1374]
|
||||
- jazz-tools@0.13.0
|
||||
- jazz-react@0.13.0
|
||||
|
||||
## 0.0.67
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
|
||||
## 0.0.66
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "reactions",
|
||||
"private": true,
|
||||
"version": "0.0.69",
|
||||
"version": "0.0.66",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,31 +1,5 @@
|
||||
# todo-vue
|
||||
|
||||
## 0.0.73
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
- jazz-vue@0.13.2
|
||||
|
||||
## 0.0.72
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [afd1374]
|
||||
- jazz-tools@0.13.0
|
||||
- jazz-browser@0.13.0
|
||||
- jazz-vue@0.13.0
|
||||
|
||||
## 0.0.71
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [cc684eb]
|
||||
- jazz-browser@0.12.2
|
||||
- jazz-vue@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
|
||||
## 0.0.70
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "todo-vue",
|
||||
"version": "0.0.73",
|
||||
"version": "0.0.70",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,27 +1,5 @@
|
||||
# jazz-example-todo
|
||||
|
||||
## 0.0.188
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
|
||||
## 0.0.187
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [afd1374]
|
||||
- jazz-tools@0.13.0
|
||||
- jazz-react@0.13.0
|
||||
|
||||
## 0.0.186
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
|
||||
## 0.0.185
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-todo",
|
||||
"private": true,
|
||||
"version": "0.0.188",
|
||||
"version": "0.0.185",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,34 +1,5 @@
|
||||
# version-history
|
||||
|
||||
## 0.0.66
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [ae4be2b]
|
||||
- jazz-inspector@0.13.2
|
||||
- jazz-react@0.13.2
|
||||
- jazz-tools@0.13.2
|
||||
|
||||
## 0.0.65
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2796689]
|
||||
- Updated dependencies [afd1374]
|
||||
- Updated dependencies [2224ed4]
|
||||
- jazz-inspector@0.13.0
|
||||
- jazz-tools@0.13.0
|
||||
- jazz-react@0.13.0
|
||||
|
||||
## 0.0.64
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8a71835]
|
||||
- jazz-inspector@0.12.2
|
||||
- jazz-react@0.12.2
|
||||
- jazz-tools@0.12.2
|
||||
|
||||
## 0.0.63
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "version-history",
|
||||
"private": true,
|
||||
"version": "0.0.66",
|
||||
"version": "0.0.63",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,20 +1,36 @@
|
||||
# Jazz Design System
|
||||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
|
||||
|
||||
## Getting Started
|
||||
|
||||
First, install packages
|
||||
|
||||
```bash
|
||||
pnpm i
|
||||
```
|
||||
|
||||
Then run the development server:
|
||||
First, run the development server:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
# or
|
||||
yarn dev
|
||||
# or
|
||||
pnpm dev
|
||||
# or
|
||||
bun dev
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
|
||||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
||||
|
||||
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
|
||||
|
||||
## Learn More
|
||||
|
||||
To learn more about Next.js, take a look at the following resources:
|
||||
|
||||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
||||
|
||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
|
||||
|
||||
## Deploy on Vercel
|
||||
|
||||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
||||
|
||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
AlertCircleIcon,
|
||||
AlertTriangleIcon,
|
||||
ArrowDownIcon,
|
||||
ArrowRightIcon,
|
||||
@@ -26,7 +27,6 @@ import {
|
||||
MessageCircleQuestionIcon,
|
||||
MonitorSmartphoneIcon,
|
||||
MoonIcon,
|
||||
MousePointer2Icon,
|
||||
MousePointerSquareDashedIcon,
|
||||
ScanFace,
|
||||
ScrollIcon,
|
||||
@@ -50,7 +50,6 @@ const icons = {
|
||||
close: XIcon,
|
||||
code: CodeIcon,
|
||||
copy: ClipboardIcon,
|
||||
cursor: MousePointer2Icon,
|
||||
darkTheme: MoonIcon,
|
||||
delete: TrashIcon,
|
||||
devices: MonitorSmartphoneIcon,
|
||||
|
||||
@@ -34,8 +34,8 @@ const commitMono = localFont({
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Jazz Design System by Garden Computing, Inc",
|
||||
description: "Jazz Design System by Garden Computing, Inc",
|
||||
title: "Create Next App",
|
||||
description: "Generated by create next app",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
|
||||
@@ -13,7 +13,7 @@ Without any additional steps the user can use Jazz normally, but they would be l
|
||||
To make Accounts work across devices, you can store/retrieve the account keys from an authentication method by using the corresponding hooks and providers.
|
||||
|
||||
<ContentByFramework framework={["react", "vue", "svelte"]}>
|
||||
## Authentication with passkeys [!framework=react,vue,svelte]
|
||||
## Authentication with passkeys
|
||||
|
||||
Passkey authentication is fully local-first and the most secure of the auth methods that Jazz provides (because keys are managed by the device/operating system itself).
|
||||
|
||||
@@ -209,14 +209,13 @@ However, once authenticated, your users won't need to interact with Clerk anymor
|
||||
|
||||
<ContentByFramework framework="react">
|
||||
The clerk provider is not built into `jazz-react` and needs the `jazz-react-auth-clerk` package to be installed.
|
||||
|
||||
After installing the package you can use the `JazzProviderWithClerk` component to wrap your app:
|
||||
</ContentByFramework>
|
||||
|
||||
<ContentByFramework framework="react-native-expo">
|
||||
You can use the `JazzProviderWithClerk` component to wrap your app. Note the `__experimental_resourceCache` option. This helps render Clerk components when offline.
|
||||
The clerk provider is not built into `jazz-expo` and needs the `jazz-expo/auth/clerk` import to be installed. Note the `__experimental_resourceCache` option. This helps render Clerk components when offline.
|
||||
</ContentByFramework>
|
||||
|
||||
After installing the package you can use the `JazzProviderWithClerk` component to wrap your app:
|
||||
<ContentByFramework framework="react">
|
||||
<CodeGroup>
|
||||
```tsx
|
||||
|
||||
@@ -15,11 +15,11 @@ The Jazz docs are currently heavily work in progress, sorry about that!
|
||||
|
||||
## Quickstart
|
||||
|
||||
You can use [`create-jazz-app`](/docs/tools/create-jazz-app) to create a new Jazz project from one of our starter templates or example apps:
|
||||
Run the following command to create a new Jazz project from one of our example apps:
|
||||
|
||||
<CodeGroup>
|
||||
```sh
|
||||
npx create-jazz-app@latest --api-key you@example.com
|
||||
npx create-jazz-app@latest
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
@@ -53,19 +53,10 @@ export default async function Page({
|
||||
|
||||
try {
|
||||
const mdxSource = await getMdxSource(framework, slugPath);
|
||||
const {
|
||||
default: Content,
|
||||
tableOfContents,
|
||||
headingsFrameworkVisibility,
|
||||
test,
|
||||
} = mdxSource;
|
||||
const { default: Content, tableOfContents } = mdxSource;
|
||||
|
||||
// Remove items that should not be shown for the current framework
|
||||
const tocItems = (tableOfContents as Toc).filter(({ id }) =>
|
||||
id && id in headingsFrameworkVisibility
|
||||
? headingsFrameworkVisibility[id]?.includes(framework)
|
||||
: true,
|
||||
);
|
||||
// Exclude h1 from table of contents
|
||||
const tocItems = (tableOfContents as Toc)?.[0]?.children;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
export const metadata = {
|
||||
title: "create-jazz-app",
|
||||
};
|
||||
|
||||
import { CodeGroup } from "@/components/forMdx";
|
||||
|
||||
# create-jazz-app
|
||||
|
||||
Jazz comes with a CLI tool that helps you quickly scaffold new Jazz applications. There are two main ways to get started:
|
||||
|
||||
1. **Starter templates** - Pre-configured setups to start you off with your preferred framework
|
||||
2. **Example apps** - Extend one of our [example applications](https://jazz.tools/examples) to build your project
|
||||
|
||||
## Quick Start with Starter Templates
|
||||
|
||||
Create a new Jazz app from a starter template in seconds:
|
||||
|
||||
<CodeGroup>
|
||||
```bash
|
||||
npx create-jazz-app@latest --api-key you@example.com
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
This launches an interactive CLI that guides you through selecting:
|
||||
- Pre-configured frameworks and authentication methods (See [Available Starters](#available-starters))
|
||||
- Package manager
|
||||
- Project name
|
||||
- Jazz Cloud API key (optional) - Provides seamless sync and storage for your app
|
||||
|
||||
## Command Line Options
|
||||
|
||||
If you know what you want, you can specify options directly from the command line:
|
||||
|
||||
<CodeGroup>
|
||||
```bash
|
||||
# Basic usage with project name
|
||||
npx create-jazz-app@latest my-app --framework react --api-key you@example.com
|
||||
|
||||
# Specify a starter template
|
||||
npx create-jazz-app@latest my-app --starter react-passkey-auth --api-key you@example.com
|
||||
|
||||
# Specify example app
|
||||
npx create-jazz-app@latest my-app --example chat --api-key you@example.com
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
### Available Options
|
||||
|
||||
- `directory` - Directory to create the project in (defaults to project name)
|
||||
- `-f, --framework` - Framework to use (React, React Native, Svelte, Vue)
|
||||
- `-s, --starter` - Starter template to use
|
||||
- `-e, --example` - Example project to use
|
||||
- `-p, --package-manager` - Package manager to use (npm, yarn, pnpm, bun, deno)
|
||||
- `-k, --api-key` - Jazz Cloud API key (during our [free public alpha](/docs/react/sync-and-storage#free-public-alpha), you can use your email as the API key)
|
||||
- `-h, --help` - Display help information
|
||||
|
||||
## Start From an Example App
|
||||
|
||||
Want to start from one of [our example apps](https://jazz.tools/examples)? Our example apps include specific examples of features and use cases. They demonstrate real-world patterns for building with Jazz. Use one as your starting point:
|
||||
|
||||
<CodeGroup>
|
||||
```bash
|
||||
npx create-jazz-app@latest --example chat
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
## Available Starters
|
||||
|
||||
Starter templates are minimal setups that include the basic configuration needed to get started with Jazz. They're perfect when you want a clean slate to build on.
|
||||
|
||||
Choose from these ready-to-use starter templates:
|
||||
|
||||
- `react-passkey-auth` - React with Passkey authentication (easiest to start with)
|
||||
- `react-clerk-auth` - React with Clerk authentication
|
||||
- `vue-demo-auth` - Vue with Demo authentication
|
||||
- `svelte-passkey-auth` - Svelte with Passkey authentication
|
||||
- `rn-clerk-auth` - React Native with Clerk authentication
|
||||
|
||||
Run `npx create-jazz-app --help` to see the latest list of available starters.
|
||||
|
||||
## What Happens Behind the Scenes
|
||||
|
||||
When you run `create-jazz-app`, we'll:
|
||||
|
||||
1. Ask for your preferences (or use your command line arguments)
|
||||
2. Clone the appropriate starter template
|
||||
3. Update dependencies to their latest versions
|
||||
4. Install all required packages
|
||||
5. Set up your project and show next steps
|
||||
|
||||
## Requirements
|
||||
|
||||
- Node.js 14.0.0 or later
|
||||
- Your preferred package manager (npm, yarn, pnpm, bun, or deno)
|
||||
@@ -79,10 +79,10 @@ If you're using Clerk auth in your Expo application, you'll need to:
|
||||
```tsx twoslash
|
||||
// @noErrors: 2300 2307
|
||||
// Before
|
||||
import { JazzProviderWithClerk } from "jazz-react-native-clerk"; // [!code --]
|
||||
import { ClerkAuthProvider, useClerkAuth } from "jazz-react-native-clerk"; // [!code --]
|
||||
|
||||
// After
|
||||
import { JazzProviderWithClerk } from "jazz-expo/auth/clerk"; // [!code ++]
|
||||
import { ClerkAuthProvider, useClerkAuth } from "jazz-expo/auth/clerk"; // [!code ++]
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
@@ -134,6 +134,31 @@ declare module "jazz-expo" { // [!code ++:5]
|
||||
|
||||
The `jazz-expo` implementation supports the Expo New Architecture.
|
||||
|
||||
## Styling with NativeWind
|
||||
|
||||
For Expo projects, remember to use NativeWind CSS for styling, which is the recommended approach for Jazz applications built with Expo:
|
||||
|
||||
<CodeGroup>
|
||||
```tsx twoslash
|
||||
// @noErrors: 2305 2686
|
||||
import { View, Text } from "react-native";
|
||||
import { styled } from "nativewind";
|
||||
|
||||
const StyledView = styled(View);
|
||||
const StyledText = styled(Text);
|
||||
|
||||
export function MyComponent() {
|
||||
return (
|
||||
<StyledView className="p-4 bg-white dark:bg-slate-800">
|
||||
<StyledText className="text-black dark:text-white text-lg font-bold">
|
||||
Hello, Jazz with Expo!
|
||||
</StyledText>
|
||||
</StyledView>
|
||||
);
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
## For More Information
|
||||
|
||||
For detailed setup instructions, refer to the [React Native Expo Setup Guide](/docs/react-native-expo/project-setup)
|
||||
|
||||
@@ -8,9 +8,7 @@ CoFeeds are append-only data structures that track entries from different user s
|
||||
|
||||
Each account can have multiple sessions (different browser tabs, devices, or app instances), making CoFeeds ideal for building features like activity logs, presence indicators, and notification systems.
|
||||
|
||||
The following examples demonstrate a practical use of CoFeeds:
|
||||
- [Multi-cursors](https://github.com/garden-co/jazz/tree/main/examples/multi-cursors) - track user presence on a canvas with multiple cursors and out of bounds indicators
|
||||
- [Reactions](https://github.com/garden-co/jazz/tree/main/examples/reactions) - store per-user emoji reaction using a CoFeed
|
||||
The [Reactions example](https://github.com/garden-co/jazz/tree/main/examples/reactions) demonstrates a practical use of CoFeeds.
|
||||
|
||||
## Creating CoFeeds
|
||||
|
||||
|
||||
@@ -253,38 +253,6 @@ const ReactionsIllustration = () => (
|
||||
</div>
|
||||
);
|
||||
|
||||
const MultiCursorIllustration = () => (
|
||||
<div className="flex bg-stone-100 h-full flex-col items-center justify-center dark:bg-transparent p-4">
|
||||
<div className=" bg-white md:aspect-[3/2] flex flex-col rounded-md shadow-xl shadow-stone-400/20 dark:shadow-none">
|
||||
<div className="w-full py-2 flex items-center gap-1.5 px-2 border-b dark:border-b-stone-200">
|
||||
<span className="rounded-full size-2 bg-stone-200"></span>
|
||||
<span className="rounded-full size-2 bg-stone-200"></span>
|
||||
<span className="rounded-full size-2 bg-stone-200"></span>
|
||||
</div>
|
||||
|
||||
<div className="h-full mx-auto flex flex-col justify-center p-12 sm:p-16">
|
||||
<div className="inline-block relative px-1 ring-1 ring-blue-400">
|
||||
<div className="absolute size-2 bg-white border border-blue-400 -left-1 -top-1"></div>
|
||||
<div className="absolute size-2 bg-white border border-blue-400 -right-1 -top-1"></div>
|
||||
<div className="absolute size-2 bg-white border border-blue-400 -left-1 -bottom-1"></div>
|
||||
<div className="absolute size-2 bg-white border border-blue-400 -right-1 -bottom-1"></div>
|
||||
|
||||
<span className="text-lg font-semibold md:text-2xl md:font-bold text-stone-800 ">
|
||||
Hello, world!
|
||||
</span>
|
||||
<div className="absolute -top-10 right-4 text-rose-600 flex items-end gap-1">
|
||||
<Icon name="cursor"></Icon> <span className="text-xs">Mia</span>
|
||||
</div>
|
||||
<div className="absolute -bottom-10 left-4 text-green-600 flex items-end gap-1">
|
||||
<Icon name="cursor"></Icon>{" "}
|
||||
<span className="text-xs">Sebastian</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
const PetIllustration = () => (
|
||||
<div className="h-full p-4 bg-[url('/dog.jpg')] bg-cover bg-center p-4 flex items-end">
|
||||
<div className="inline-flex justify-center gap-1 mx-auto">
|
||||
@@ -427,16 +395,6 @@ const reactExamples: Example[] = [
|
||||
demoUrl: "https://reactions-demo.jazz.tools",
|
||||
illustration: <ReactionsIllustration />,
|
||||
},
|
||||
{
|
||||
name: "Cursor presence",
|
||||
slug: "multi-cursors",
|
||||
description:
|
||||
"Track user presence on a canvas with multiple cursors and out of bounds indicators.",
|
||||
tech: [tech.react],
|
||||
features: [features.coFeed],
|
||||
demoUrl: "https://jazz-multi-cursors.vercel.app",
|
||||
illustration: <MultiCursorIllustration />,
|
||||
},
|
||||
{
|
||||
name: "Rate my pet",
|
||||
slug: "pets",
|
||||
@@ -526,8 +484,7 @@ const rnExamples: Example[] = [
|
||||
{
|
||||
name: "Chat",
|
||||
slug: "chat-rn",
|
||||
description:
|
||||
"A simple React Native app that creates a chat room with a shareable link.",
|
||||
description: "A simple React Native app that creates a chat room with a shareable link.",
|
||||
tech: [tech.reactNative],
|
||||
illustration: <ChatIllustration />,
|
||||
},
|
||||
@@ -535,8 +492,7 @@ const rnExamples: Example[] = [
|
||||
{
|
||||
name: "Chat",
|
||||
slug: "chat-rn-expo",
|
||||
description:
|
||||
"A simple Expo app that creates a chat room with a shareable link.",
|
||||
description: "A simple Expo app that creates a chat room with a shareable link.",
|
||||
tech: [tech.reactNative, tech.expo],
|
||||
illustration: <ChatIllustration />,
|
||||
},
|
||||
@@ -544,8 +500,7 @@ const rnExamples: Example[] = [
|
||||
{
|
||||
name: "Chat",
|
||||
slug: "chat-rn-expo-clerk",
|
||||
description:
|
||||
"Exactly like the React Native Expo chat app, with Clerk for auth.",
|
||||
description: "Exactly like the React Native Expo chat app, with Clerk for auth.",
|
||||
tech: [tech.reactNative, tech.expo],
|
||||
features: [features.clerk],
|
||||
illustration: <ClerkIllustration />,
|
||||
|
||||
@@ -51,7 +51,7 @@ export default function DocsLayout({
|
||||
</div>
|
||||
<div className={clsx("md:col-span-8 lg:col-span-9 flex gap-12")}>
|
||||
{children}
|
||||
{!!tocItems?.length && (
|
||||
{tocItems?.length && (
|
||||
<>
|
||||
<TableOfContents
|
||||
className="pl-3 py-6 shrink-0 text-sm sticky align-start top-[61px] w-[16rem] h-[calc(100vh-61px)] overflow-y-auto hidden lg:block"
|
||||
|
||||
@@ -20,7 +20,7 @@ const TocList = ({
|
||||
};
|
||||
|
||||
return (
|
||||
<ul className="space-y-2" style={{ paddingLeft: level ? "1rem" : "0" }}>
|
||||
<ul className="space-y-2" style={{ paddingLeft: "1rem" }}>
|
||||
{items.map((item) => (
|
||||
<li key={item.id} className="space-y-2">
|
||||
{item.id && (
|
||||
|
||||
@@ -56,8 +56,8 @@ export const docNavigationItems = [
|
||||
"react-native": 100,
|
||||
"react-native-expo": 100,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Tools",
|
||||
@@ -67,11 +67,6 @@ export const docNavigationItems = [
|
||||
href: "/docs/ai-tools",
|
||||
done: 100,
|
||||
},
|
||||
{
|
||||
name: "create-jazz-app",
|
||||
href: "/docs/tools/create-jazz-app",
|
||||
done: 100,
|
||||
},
|
||||
{
|
||||
name: "Inspector",
|
||||
href: "/docs/inspector",
|
||||
@@ -87,7 +82,7 @@ export const docNavigationItems = [
|
||||
{
|
||||
name: "0.13.0 - React Native Split",
|
||||
href: "/docs/upgrade/0-13-0",
|
||||
done: 100,
|
||||
done: 100
|
||||
},
|
||||
{
|
||||
// upgrade guides
|
||||
|
||||
@@ -26,11 +26,13 @@ export function InterpolateInCode(replace: { [key: string]: string }) {
|
||||
}: { highlightedCode: string }) => {
|
||||
const newHighlightedCode = Object.entries(replace).reduce(
|
||||
(acc, [key, value]) => {
|
||||
return acc.replaceAll(key, value);
|
||||
return acc.replaceAll(
|
||||
key.replaceAll("$", "$").replaceAll("_", "_"),
|
||||
value,
|
||||
);
|
||||
},
|
||||
highlightedCode,
|
||||
);
|
||||
|
||||
return <div dangerouslySetInnerHTML={{ __html: newHighlightedCode }} />;
|
||||
},
|
||||
};
|
||||
|
||||
@@ -2,10 +2,8 @@ import createMDX from "@next/mdx";
|
||||
import { transformerNotationDiff } from "@shikijs/transformers";
|
||||
import { transformerTwoslash } from "@shikijs/twoslash";
|
||||
import withToc from "@stefanprobst/rehype-extract-toc";
|
||||
import { valueToEstree } from "estree-util-value-to-estree";
|
||||
import GithubSlugger from "github-slugger";
|
||||
import { headingRank } from "hast-util-heading-rank";
|
||||
import { toString } from "hast-util-to-string";
|
||||
import withTocExport from "@stefanprobst/rehype-extract-toc/mdx";
|
||||
import rehypeSlug from "rehype-slug";
|
||||
import { createHighlighter } from "shiki";
|
||||
import { SKIP, visit } from "unist-util-visit";
|
||||
import { jazzDark } from "./themes/jazzDark.mjs";
|
||||
@@ -22,18 +20,7 @@ const withMDX = createMDX({
|
||||
// Add markdown plugins here, as desired
|
||||
options: {
|
||||
remarkPlugins: [highlightPlugin, remarkHtmlToJsx],
|
||||
rehypePlugins: [
|
||||
// Add id to heading elements, and indicate which frameworks to show the heading for
|
||||
// This is a modified version of rehype-slug
|
||||
withSlugAndHeadingsFrameworkVisibility,
|
||||
|
||||
// Create table of contents array
|
||||
withToc,
|
||||
|
||||
// Return the table of contents and framework visibility data when importing a .mdx file
|
||||
// This is a modified version of withTocExport from @stefanprobst/rehype-extract-toc
|
||||
withTocAndFrameworkHeadingsVisibilityExport,
|
||||
],
|
||||
rehypePlugins: [rehypeSlug, withToc, withTocExport],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -98,6 +85,10 @@ function highlightPlugin() {
|
||||
};
|
||||
}
|
||||
|
||||
function escape(s) {
|
||||
return s.replace(/[^0-9A-Za-z ]/g, (c) => "&#" + c.charCodeAt(0) + ";");
|
||||
}
|
||||
|
||||
function remarkHtmlToJsx() {
|
||||
async function transform(...args) {
|
||||
// Async import since these packages are all in ESM
|
||||
@@ -125,83 +116,4 @@ function remarkHtmlToJsx() {
|
||||
return transform;
|
||||
}
|
||||
|
||||
const slugs = new GithubSlugger();
|
||||
|
||||
export function withSlugAndHeadingsFrameworkVisibility() {
|
||||
return function (tree, vfile) {
|
||||
slugs.reset();
|
||||
vfile.data.headingsFrameworkVisibility = {};
|
||||
|
||||
visit(tree, "element", function (node) {
|
||||
if (headingRank(node) && !node.properties.id) {
|
||||
const lastChild = node.children?.[node.children.length - 1];
|
||||
if (!lastChild || lastChild.type !== "text") return;
|
||||
|
||||
const match = lastChild.value.match(
|
||||
/\s*\[\!framework=([a-zA-Z0-9,_-]+)\]\s*$/,
|
||||
);
|
||||
if (match) {
|
||||
const frameworks = match[1];
|
||||
|
||||
lastChild.value = lastChild.value.replace(
|
||||
/\s*\[\!framework=[a-zA-Z0-9,_-]+\]\s*$/,
|
||||
"",
|
||||
);
|
||||
|
||||
node.properties.id = slugs.slug(lastChild.value);
|
||||
vfile.data.headingsFrameworkVisibility[node.properties.id] =
|
||||
frameworks.split(",");
|
||||
} else {
|
||||
node.properties.id = slugs.slug(toString(node));
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export function withTocAndFrameworkHeadingsVisibilityExport() {
|
||||
return function transformer(tree, vfile) {
|
||||
if (vfile.data.toc == null) return;
|
||||
|
||||
tree.children.unshift({
|
||||
type: "mdxjsEsm",
|
||||
data: {
|
||||
estree: {
|
||||
type: "Program",
|
||||
sourceType: "module",
|
||||
body: [
|
||||
{
|
||||
type: "ExportNamedDeclaration",
|
||||
source: null,
|
||||
specifiers: [],
|
||||
declaration: {
|
||||
type: "VariableDeclaration",
|
||||
kind: "const",
|
||||
declarations: [
|
||||
{
|
||||
type: "VariableDeclarator",
|
||||
id: {
|
||||
type: "Identifier",
|
||||
name: "headingsFrameworkVisibility",
|
||||
},
|
||||
init: valueToEstree(vfile.data.headingsFrameworkVisibility),
|
||||
},
|
||||
{
|
||||
type: "VariableDeclarator",
|
||||
id: { type: "Identifier", name: "tableOfContents" },
|
||||
init: valueToEstree(
|
||||
// exclude h1
|
||||
vfile.data.toc.length ? vfile.data.toc[0].children : [],
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export default config;
|
||||
|
||||
@@ -32,11 +32,7 @@
|
||||
"@vercel/analytics": "^1.3.1",
|
||||
"@vercel/speed-insights": "^1.0.12",
|
||||
"clsx": "^2.1.1",
|
||||
"estree-util-value-to-estree": "^3.3.2",
|
||||
"gcmp-design-system": "workspace:*",
|
||||
"github-slugger": "^2.0.0",
|
||||
"hast-util-heading-rank": "^3.0.0",
|
||||
"hast-util-to-string": "^3.0.1",
|
||||
"jazz-browser": "link:../../packages/jazz-browser",
|
||||
"jazz-browser-media-images": "link:../../packages/jazz-browser-media-images",
|
||||
"jazz-nodejs": "link:../../packages/jazz-nodejs",
|
||||
@@ -51,6 +47,7 @@
|
||||
"qrcode": "^1.5.4",
|
||||
"react": "^18",
|
||||
"react-dom": "^18",
|
||||
"rehype-slug": "^6.0.0",
|
||||
"shiki": "^3.2.1",
|
||||
"tailwind-merge": "^1.14.0",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
|
||||
61
homepage/pnpm-lock.yaml
generated
61
homepage/pnpm-lock.yaml
generated
@@ -223,21 +223,9 @@ importers:
|
||||
clsx:
|
||||
specifier: ^2.1.1
|
||||
version: 2.1.1
|
||||
estree-util-value-to-estree:
|
||||
specifier: ^3.3.2
|
||||
version: 3.3.2
|
||||
gcmp-design-system:
|
||||
specifier: workspace:*
|
||||
version: link:../design-system
|
||||
github-slugger:
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.0
|
||||
hast-util-heading-rank:
|
||||
specifier: ^3.0.0
|
||||
version: 3.0.0
|
||||
hast-util-to-string:
|
||||
specifier: ^3.0.1
|
||||
version: 3.0.1
|
||||
jazz-browser:
|
||||
specifier: link:../../packages/jazz-browser
|
||||
version: link:../../packages/jazz-browser
|
||||
@@ -280,6 +268,9 @@ importers:
|
||||
react-dom:
|
||||
specifier: ^18
|
||||
version: 18.3.1(react@18.3.1)
|
||||
rehype-slug:
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
shiki:
|
||||
specifier: ^3.2.1
|
||||
version: 3.2.1
|
||||
@@ -1991,9 +1982,6 @@ packages:
|
||||
resolution: {integrity: sha512-Y+ughcF9jSUJvncXwqRageavjrNPAI+1M/L3BI3PyLp1nmgYTGUXU6t5z1Y7OWuThoDdhPME07bQU+d5LxdJqw==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
|
||||
estree-util-value-to-estree@3.3.2:
|
||||
resolution: {integrity: sha512-hYH1aSvQI63Cvq3T3loaem6LW4u72F187zW4FHpTrReJSm6W66vYTFNO1vH/chmcOulp1HlAj1pxn8Ag0oXI5Q==}
|
||||
|
||||
estree-util-visit@1.2.1:
|
||||
resolution: {integrity: sha512-xbgqcrkIVbIG+lI/gzbvd9SGTJL4zqJKBFttUl5pP27KhAjtMKbX/mQXJ7qgyXpMgVy/zvpm0xoQQaGL8OloOw==}
|
||||
|
||||
@@ -2872,6 +2860,9 @@ packages:
|
||||
regex@6.0.1:
|
||||
resolution: {integrity: sha512-uorlqlzAKjKQZ5P+kTJr3eeJGSVroLKoHmquUj4zHWuR+hEyNqlXsSKlYYF5F4NI6nl7tWCs0apKJ0lmfsXAPA==}
|
||||
|
||||
rehype-slug@6.0.0:
|
||||
resolution: {integrity: sha512-lWyvf/jwu+oS5+hL5eClVd3hNdmwM1kAC0BUvEGD19pajQMIzcNUd/k9GsfQ+FfECvX+JE+e9/btsKH0EjJT6A==}
|
||||
|
||||
remark-mdx@2.3.0:
|
||||
resolution: {integrity: sha512-g53hMkpM0I98MU266IzDFMrTD980gNF3BJnkyFcmN+dD873mQeD5rdMO3Y2X+x8umQfbSE0PcoEDl7ledSA+2g==}
|
||||
|
||||
@@ -5147,7 +5138,7 @@ snapshots:
|
||||
|
||||
'@types/acorn@4.0.6':
|
||||
dependencies:
|
||||
'@types/estree': 1.0.6
|
||||
'@types/estree': 1.0.5
|
||||
|
||||
'@types/d3-voronoi@1.1.12': {}
|
||||
|
||||
@@ -5167,7 +5158,7 @@ snapshots:
|
||||
|
||||
'@types/estree-jsx@1.0.5':
|
||||
dependencies:
|
||||
'@types/estree': 1.0.6
|
||||
'@types/estree': 1.0.5
|
||||
|
||||
'@types/estree@1.0.5': {}
|
||||
|
||||
@@ -5656,7 +5647,7 @@ snapshots:
|
||||
|
||||
estree-util-attach-comments@2.1.1:
|
||||
dependencies:
|
||||
'@types/estree': 1.0.6
|
||||
'@types/estree': 1.0.5
|
||||
|
||||
estree-util-build-jsx@2.2.2:
|
||||
dependencies:
|
||||
@@ -5678,10 +5669,6 @@ snapshots:
|
||||
dependencies:
|
||||
is-plain-obj: 3.0.0
|
||||
|
||||
estree-util-value-to-estree@3.3.2:
|
||||
dependencies:
|
||||
'@types/estree': 1.0.6
|
||||
|
||||
estree-util-visit@1.2.1:
|
||||
dependencies:
|
||||
'@types/estree-jsx': 1.0.5
|
||||
@@ -5694,7 +5681,7 @@ snapshots:
|
||||
|
||||
estree-walker@3.0.3:
|
||||
dependencies:
|
||||
'@types/estree': 1.0.6
|
||||
'@types/estree': 1.0.5
|
||||
|
||||
events@3.3.0: {}
|
||||
|
||||
@@ -5793,7 +5780,7 @@ snapshots:
|
||||
|
||||
hast-util-to-estree@2.3.3:
|
||||
dependencies:
|
||||
'@types/estree': 1.0.6
|
||||
'@types/estree': 1.0.5
|
||||
'@types/estree-jsx': 1.0.5
|
||||
'@types/hast': 2.3.10
|
||||
'@types/unist': 2.0.10
|
||||
@@ -5900,7 +5887,7 @@ snapshots:
|
||||
|
||||
is-reference@3.0.2:
|
||||
dependencies:
|
||||
'@types/estree': 1.0.6
|
||||
'@types/estree': 1.0.5
|
||||
|
||||
isexe@2.0.0: {}
|
||||
|
||||
@@ -6241,7 +6228,7 @@ snapshots:
|
||||
|
||||
micromark-extension-mdx-expression@1.0.8:
|
||||
dependencies:
|
||||
'@types/estree': 1.0.6
|
||||
'@types/estree': 1.0.5
|
||||
micromark-factory-mdx-expression: 1.0.9
|
||||
micromark-factory-space: 1.1.0
|
||||
micromark-util-character: 1.2.0
|
||||
@@ -6264,7 +6251,7 @@ snapshots:
|
||||
micromark-extension-mdx-jsx@1.0.5:
|
||||
dependencies:
|
||||
'@types/acorn': 4.0.6
|
||||
'@types/estree': 1.0.6
|
||||
'@types/estree': 1.0.5
|
||||
estree-util-is-identifier-name: 2.1.0
|
||||
micromark-factory-mdx-expression: 1.0.9
|
||||
micromark-factory-space: 1.1.0
|
||||
@@ -6297,7 +6284,7 @@ snapshots:
|
||||
|
||||
micromark-extension-mdxjs-esm@1.0.5:
|
||||
dependencies:
|
||||
'@types/estree': 1.0.6
|
||||
'@types/estree': 1.0.5
|
||||
micromark-core-commonmark: 1.1.0
|
||||
micromark-util-character: 1.2.0
|
||||
micromark-util-events-to-acorn: 1.2.3
|
||||
@@ -6369,7 +6356,7 @@ snapshots:
|
||||
|
||||
micromark-factory-mdx-expression@1.0.9:
|
||||
dependencies:
|
||||
'@types/estree': 1.0.6
|
||||
'@types/estree': 1.0.5
|
||||
micromark-util-character: 1.2.0
|
||||
micromark-util-events-to-acorn: 1.2.3
|
||||
micromark-util-symbol: 1.1.0
|
||||
@@ -6380,7 +6367,7 @@ snapshots:
|
||||
|
||||
micromark-factory-mdx-expression@2.0.1:
|
||||
dependencies:
|
||||
'@types/estree': 1.0.6
|
||||
'@types/estree': 1.0.5
|
||||
devlop: 1.1.0
|
||||
micromark-util-character: 2.1.0
|
||||
micromark-util-events-to-acorn: 2.0.2
|
||||
@@ -6496,7 +6483,7 @@ snapshots:
|
||||
micromark-util-events-to-acorn@1.2.3:
|
||||
dependencies:
|
||||
'@types/acorn': 4.0.6
|
||||
'@types/estree': 1.0.6
|
||||
'@types/estree': 1.0.5
|
||||
'@types/unist': 2.0.10
|
||||
estree-util-visit: 1.2.1
|
||||
micromark-util-symbol: 1.1.0
|
||||
@@ -6507,7 +6494,7 @@ snapshots:
|
||||
micromark-util-events-to-acorn@2.0.2:
|
||||
dependencies:
|
||||
'@types/acorn': 4.0.6
|
||||
'@types/estree': 1.0.6
|
||||
'@types/estree': 1.0.5
|
||||
'@types/unist': 3.0.2
|
||||
devlop: 1.1.0
|
||||
estree-util-visit: 2.0.0
|
||||
@@ -6814,7 +6801,7 @@ snapshots:
|
||||
|
||||
periscopic@3.1.0:
|
||||
dependencies:
|
||||
'@types/estree': 1.0.6
|
||||
'@types/estree': 1.0.5
|
||||
estree-walker: 3.0.3
|
||||
is-reference: 3.0.2
|
||||
|
||||
@@ -6955,6 +6942,14 @@ snapshots:
|
||||
dependencies:
|
||||
regex-utilities: 2.3.0
|
||||
|
||||
rehype-slug@6.0.0:
|
||||
dependencies:
|
||||
'@types/hast': 3.0.4
|
||||
github-slugger: 2.0.0
|
||||
hast-util-heading-rank: 3.0.0
|
||||
hast-util-to-string: 3.0.1
|
||||
unist-util-visit: 5.0.0
|
||||
|
||||
remark-mdx@2.3.0:
|
||||
dependencies:
|
||||
mdast-util-mdx: 2.0.1
|
||||
|
||||
11
package.json
11
package.json
@@ -16,17 +16,16 @@
|
||||
"@changesets/cli": "^2.27.10",
|
||||
"@playwright/test": "^1.50.1",
|
||||
"@vitejs/plugin-react": "^4.3.3",
|
||||
"@vitest/browser": "^3.1.1",
|
||||
"@vitest/coverage-istanbul": "3.1.1",
|
||||
"@vitest/coverage-v8": "3.1.1",
|
||||
"@vitest/ui": "3.1.1",
|
||||
"happy-dom": "^17.4.4",
|
||||
"@vitest/browser": "^3.0.5",
|
||||
"@vitest/coverage-istanbul": "3.0.5",
|
||||
"@vitest/ui": "3.0.5",
|
||||
"happy-dom": "^16.8.1",
|
||||
"lefthook": "^1.8.2",
|
||||
"pkg-pr-new": "^0.0.39",
|
||||
"playwright": "^1.50.1",
|
||||
"turbo": "^2.3.1",
|
||||
"typedoc": "^0.25.13",
|
||||
"vitest": "3.1.1"
|
||||
"vitest": "3.0.5"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "turbo dev",
|
||||
|
||||
@@ -1,30 +1,5 @@
|
||||
# cojson-storage-indexeddb
|
||||
|
||||
## 0.13.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c551839]
|
||||
- cojson@0.13.2
|
||||
- cojson-storage@0.13.2
|
||||
|
||||
## 0.13.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [a013538]
|
||||
- Updated dependencies [bce3bcc]
|
||||
- cojson@0.13.0
|
||||
- cojson-storage@0.13.0
|
||||
|
||||
## 0.12.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2f4827]
|
||||
- cojson@0.12.2
|
||||
- cojson-storage@0.12.2
|
||||
|
||||
## 0.12.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cojson-storage-indexeddb",
|
||||
"version": "0.13.2",
|
||||
"version": "0.12.1",
|
||||
"main": "dist/index.js",
|
||||
"type": "module",
|
||||
"types": "dist/index.d.ts",
|
||||
@@ -10,7 +10,9 @@
|
||||
"cojson-storage": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitest/browser": "^3.0.5",
|
||||
"typescript": "~5.6.2",
|
||||
"vitest": "3.0.5",
|
||||
"webdriverio": "^8.15.0"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -1,30 +1,5 @@
|
||||
# cojson-storage-sqlite
|
||||
|
||||
## 0.13.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c551839]
|
||||
- cojson@0.13.2
|
||||
- cojson-storage@0.13.2
|
||||
|
||||
## 0.13.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [a013538]
|
||||
- Updated dependencies [bce3bcc]
|
||||
- cojson@0.13.0
|
||||
- cojson-storage@0.13.0
|
||||
|
||||
## 0.12.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2f4827]
|
||||
- cojson@0.12.2
|
||||
- cojson-storage@0.12.2
|
||||
|
||||
## 0.12.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "cojson-storage-sqlite",
|
||||
"type": "module",
|
||||
"version": "0.13.2",
|
||||
"version": "0.12.1",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"better-sqlite3": "^11.7.0",
|
||||
"cojson": "workspace:0.13.2",
|
||||
"cojson": "workspace:0.12.1",
|
||||
"cojson-storage": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,27 +1,5 @@
|
||||
# cojson-storage
|
||||
|
||||
## 0.13.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c551839]
|
||||
- cojson@0.13.2
|
||||
|
||||
## 0.13.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [a013538]
|
||||
- Updated dependencies [bce3bcc]
|
||||
- cojson@0.13.0
|
||||
|
||||
## 0.12.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2f4827]
|
||||
- cojson@0.12.2
|
||||
|
||||
## 0.12.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cojson-storage",
|
||||
"version": "0.13.2",
|
||||
"version": "0.12.1",
|
||||
"main": "dist/index.js",
|
||||
"type": "module",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@@ -1,27 +1,5 @@
|
||||
# cojson-transport-nodejs-ws
|
||||
|
||||
## 0.13.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c551839]
|
||||
- cojson@0.13.2
|
||||
|
||||
## 0.13.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [a013538]
|
||||
- Updated dependencies [bce3bcc]
|
||||
- cojson@0.13.0
|
||||
|
||||
## 0.12.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2f4827]
|
||||
- cojson@0.12.2
|
||||
|
||||
## 0.12.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "cojson-transport-ws",
|
||||
"type": "module",
|
||||
"version": "0.13.2",
|
||||
"version": "0.12.1",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
logger,
|
||||
} from "cojson";
|
||||
import { BatchedOutgoingMessages } from "./BatchedOutgoingMessages.js";
|
||||
import { deserializeMessages } from "./serialization.js";
|
||||
import { deserializeMessages, getErrorMessage } from "./serialization.js";
|
||||
import type { AnyWebSocket } from "./types.js";
|
||||
|
||||
export const BUFFER_LIMIT = 100_000;
|
||||
@@ -20,16 +20,11 @@ export type CreateWebSocketPeerOpts = {
|
||||
expectPings?: boolean;
|
||||
batchingByDefault?: boolean;
|
||||
deletePeerStateOnClose?: boolean;
|
||||
pingTimeout?: number;
|
||||
onClose?: () => void;
|
||||
onSuccess?: () => void;
|
||||
};
|
||||
|
||||
function createPingTimeoutListener(
|
||||
enabled: boolean,
|
||||
timeout: number,
|
||||
callback: () => void,
|
||||
) {
|
||||
function createPingTimeoutListener(enabled: boolean, callback: () => void) {
|
||||
if (!enabled) {
|
||||
return {
|
||||
reset() {},
|
||||
@@ -44,7 +39,7 @@ function createPingTimeoutListener(
|
||||
pingTimeout && clearTimeout(pingTimeout);
|
||||
pingTimeout = setTimeout(() => {
|
||||
callback();
|
||||
}, timeout);
|
||||
}, 10_000);
|
||||
},
|
||||
clear() {
|
||||
pingTimeout && clearTimeout(pingTimeout);
|
||||
@@ -133,7 +128,6 @@ export function createWebSocketPeer({
|
||||
expectPings = true,
|
||||
batchingByDefault = true,
|
||||
deletePeerStateOnClose = false,
|
||||
pingTimeout = 10_000,
|
||||
onSuccess,
|
||||
onClose,
|
||||
}: CreateWebSocketPeerOpts): Peer {
|
||||
@@ -162,18 +156,14 @@ export function createWebSocketPeer({
|
||||
handleClose();
|
||||
});
|
||||
|
||||
const pingTimeoutListener = createPingTimeoutListener(
|
||||
expectPings,
|
||||
pingTimeout,
|
||||
() => {
|
||||
incoming
|
||||
.push("PingTimeout")
|
||||
.catch((e) =>
|
||||
logger.error("Error while pushing ping timeout", { err: e }),
|
||||
);
|
||||
emitClosedEvent();
|
||||
},
|
||||
);
|
||||
const pingTimeout = createPingTimeoutListener(expectPings, () => {
|
||||
incoming
|
||||
.push("PingTimeout")
|
||||
.catch((e) =>
|
||||
logger.error("Error while pushing ping timeout", { err: e }),
|
||||
);
|
||||
emitClosedEvent();
|
||||
});
|
||||
|
||||
const outgoingMessages = createOutgoingMessagesManager(
|
||||
websocket,
|
||||
@@ -182,8 +172,6 @@ export function createWebSocketPeer({
|
||||
let isFirstMessage = true;
|
||||
|
||||
function handleIncomingMsg(event: { data: unknown }) {
|
||||
pingTimeoutListener.reset();
|
||||
|
||||
if (event.data === "") {
|
||||
return;
|
||||
}
|
||||
@@ -209,6 +197,8 @@ export function createWebSocketPeer({
|
||||
outgoingMessages.setBatchingEnabled(true);
|
||||
}
|
||||
|
||||
pingTimeout.reset();
|
||||
|
||||
for (const msg of messages) {
|
||||
if (msg && "action" in msg) {
|
||||
incoming
|
||||
@@ -232,7 +222,7 @@ export function createWebSocketPeer({
|
||||
|
||||
websocket.removeEventListener("message", handleIncomingMsg);
|
||||
websocket.removeEventListener("close", handleClose);
|
||||
pingTimeoutListener.clear();
|
||||
pingTimeout.clear();
|
||||
emitClosedEvent();
|
||||
|
||||
if (websocket.readyState === 0) {
|
||||
|
||||
@@ -126,7 +126,7 @@ describe("createWebSocketPeer", () => {
|
||||
action: "content",
|
||||
id: "co_zlow",
|
||||
new: {},
|
||||
priority: 6,
|
||||
priority: 1,
|
||||
};
|
||||
|
||||
void peer.outgoing.push(message1);
|
||||
@@ -214,7 +214,7 @@ describe("createWebSocketPeer", () => {
|
||||
action: "content",
|
||||
id: "co_zlow",
|
||||
new: {},
|
||||
priority: 6,
|
||||
priority: 1,
|
||||
};
|
||||
|
||||
void peer.outgoing.push(message1);
|
||||
@@ -243,7 +243,7 @@ describe("createWebSocketPeer", () => {
|
||||
action: "content",
|
||||
id: "co_zlow",
|
||||
new: {},
|
||||
priority: 6,
|
||||
priority: 1,
|
||||
};
|
||||
|
||||
void peer.outgoing.push(message1);
|
||||
@@ -269,7 +269,7 @@ describe("createWebSocketPeer", () => {
|
||||
action: "content",
|
||||
id: "co_zlow",
|
||||
new: {},
|
||||
priority: 6,
|
||||
priority: 1,
|
||||
};
|
||||
|
||||
const stream: SyncMessage[] = [];
|
||||
@@ -316,7 +316,7 @@ describe("createWebSocketPeer", () => {
|
||||
action: "content",
|
||||
id: "co_zlow",
|
||||
new: {},
|
||||
priority: 6,
|
||||
priority: 1,
|
||||
};
|
||||
|
||||
const stream: SyncMessage[] = [];
|
||||
@@ -365,7 +365,7 @@ describe("createWebSocketPeer", () => {
|
||||
action: "content",
|
||||
id: "co_zlow",
|
||||
new: {},
|
||||
priority: 6,
|
||||
priority: 1,
|
||||
};
|
||||
|
||||
void peer.outgoing.push(message1);
|
||||
@@ -411,7 +411,7 @@ describe("createWebSocketPeer", () => {
|
||||
action: "content",
|
||||
id: "co_zlow",
|
||||
new: {},
|
||||
priority: 6,
|
||||
priority: 1,
|
||||
};
|
||||
|
||||
void peer.outgoing.push(message1);
|
||||
@@ -450,7 +450,7 @@ describe("createWebSocketPeer", () => {
|
||||
action: "content",
|
||||
id: "co_zlow",
|
||||
new: {},
|
||||
priority: 6,
|
||||
priority: 1,
|
||||
};
|
||||
|
||||
void peer.outgoing.push(message1);
|
||||
|
||||
@@ -4,7 +4,6 @@ import { afterEach, beforeEach, describe, expect, test } from "vitest";
|
||||
import { WebSocket } from "ws";
|
||||
import { createWebSocketPeer } from "../createWebSocketPeer";
|
||||
import { startSyncServer } from "./syncServer";
|
||||
import { waitFor } from "./utils";
|
||||
|
||||
describe("WebSocket Peer Integration", () => {
|
||||
let server: any;
|
||||
@@ -130,35 +129,4 @@ describe("WebSocket Peer Integration", () => {
|
||||
expect(disconnectCalled).toBe(true);
|
||||
expect(ws.readyState).toBe(WebSocket.CLOSED);
|
||||
});
|
||||
|
||||
test("should trigger a timeout if the server does not respond", async () => {
|
||||
const clientAgent = crypto.newRandomAgentSecret();
|
||||
const clientNode = new LocalNode(
|
||||
new ControlledAgent(clientAgent, crypto),
|
||||
crypto.newRandomSessionID(crypto.getAgentID(clientAgent)),
|
||||
crypto,
|
||||
);
|
||||
|
||||
const ws = new WebSocket(syncServerUrl);
|
||||
let disconnectCalled = false;
|
||||
|
||||
const peer = createWebSocketPeer({
|
||||
id: "test-client",
|
||||
websocket: ws,
|
||||
role: "server",
|
||||
pingTimeout: 5,
|
||||
onClose: () => {
|
||||
disconnectCalled = true;
|
||||
},
|
||||
});
|
||||
|
||||
clientNode.syncManager.addPeer(peer);
|
||||
|
||||
// Wait for connection to establish and the timeout to kick in
|
||||
await waitFor(() => {
|
||||
expect(disconnectCalled).toBe(true);
|
||||
});
|
||||
|
||||
expect(ws.readyState).toBe(WebSocket.CLOSED);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,27 +1,5 @@
|
||||
# cojson
|
||||
|
||||
## 0.13.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- c551839: Add jazz.messagequeue.pushed/pulled counters, remove jazz.messagequeue.size gauge
|
||||
|
||||
## 0.13.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- bce3bcc: Version bump. Release focused on React Native.
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- a013538: Correctly load CoValues after they are marked as unavailable and improve timeout management
|
||||
|
||||
## 0.12.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- c2f4827: StreamingHash: Remove redundant clone and skip double hash generation when creating a local transaction
|
||||
|
||||
## 0.12.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -25,10 +25,11 @@
|
||||
},
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"version": "0.13.2",
|
||||
"version": "0.12.1",
|
||||
"devDependencies": {
|
||||
"@opentelemetry/sdk-metrics": "^2.0.0",
|
||||
"typescript": "~5.6.2"
|
||||
"typescript": "~5.6.2",
|
||||
"vitest": "3.0.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@noble/ciphers": "^0.1.3",
|
||||
|
||||
@@ -10,21 +10,10 @@ import { CO_VALUE_PRIORITY } from "./priority.js";
|
||||
import { Peer, SyncMessage } from "./sync.js";
|
||||
|
||||
export class PeerState {
|
||||
private queue: PriorityBasedMessageQueue;
|
||||
|
||||
constructor(
|
||||
private peer: Peer,
|
||||
knownStates: PeerKnownStates | undefined,
|
||||
) {
|
||||
/**
|
||||
* We set as default priority HIGH to handle all the messages without a
|
||||
* priority property as HIGH priority.
|
||||
*
|
||||
* This way we consider all the non-content messsages as HIGH priority.
|
||||
*/
|
||||
this.queue = new PriorityBasedMessageQueue(CO_VALUE_PRIORITY.HIGH, {
|
||||
peerRole: peer.role,
|
||||
});
|
||||
this.optimisticKnownStates = knownStates?.clone() ?? new PeerKnownStates();
|
||||
|
||||
// We assume that exchanges with storage peers are always successful
|
||||
@@ -87,6 +76,13 @@ export class PeerState {
|
||||
return this.peer.role === "server" || this.peer.role === "storage";
|
||||
}
|
||||
|
||||
/**
|
||||
* We set as default priority HIGH to handle all the messages without a
|
||||
* priority property as HIGH priority.
|
||||
*
|
||||
* This way we consider all the non-content messsages as HIGH priority.
|
||||
*/
|
||||
private queue = new PriorityBasedMessageQueue(CO_VALUE_PRIORITY.HIGH);
|
||||
private processing = false;
|
||||
public closed = false;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Counter, ValueType, metrics } from "@opentelemetry/api";
|
||||
import { CO_VALUE_PRIORITY, type CoValuePriority } from "./priority.js";
|
||||
import { ValueType, metrics } from "@opentelemetry/api";
|
||||
import type { CoValuePriority } from "./priority.js";
|
||||
import type { SyncMessage } from "./sync.js";
|
||||
|
||||
function promiseWithResolvers<R>() {
|
||||
@@ -34,7 +34,7 @@ type Tuple<T, N extends number, A extends unknown[] = []> = A extends {
|
||||
? A
|
||||
: Tuple<T, N, [...A, T]>;
|
||||
|
||||
type QueueTuple = Tuple<LinkedList<QueueEntry>, 3>;
|
||||
type QueueTuple = Tuple<LinkedList<QueueEntry>, 8>;
|
||||
|
||||
type LinkedListNode<T> = {
|
||||
value: T;
|
||||
@@ -46,8 +46,6 @@ type LinkedListNode<T> = {
|
||||
* as our queues can grow very large when the system is under pressure.
|
||||
*/
|
||||
export class LinkedList<T> {
|
||||
constructor(private meter?: QueueMeter) {}
|
||||
|
||||
head: LinkedListNode<T> | undefined = undefined;
|
||||
tail: LinkedListNode<T> | undefined = undefined;
|
||||
length = 0;
|
||||
@@ -66,7 +64,6 @@ export class LinkedList<T> {
|
||||
}
|
||||
|
||||
this.length++;
|
||||
this.meter?.push();
|
||||
}
|
||||
|
||||
shift() {
|
||||
@@ -85,84 +82,35 @@ export class LinkedList<T> {
|
||||
|
||||
this.length--;
|
||||
|
||||
this.meter?.pull();
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
class QueueMeter {
|
||||
private pullCounter: Counter;
|
||||
private pushCounter: Counter;
|
||||
|
||||
constructor(
|
||||
prefix: string,
|
||||
private attrs?: Record<string, string | number>,
|
||||
) {
|
||||
this.pullCounter = metrics
|
||||
.getMeter("cojosn")
|
||||
.createCounter(`${prefix}.pulled`, {
|
||||
description: "Number of messages pulled from the queue",
|
||||
valueType: ValueType.INT,
|
||||
unit: "1",
|
||||
});
|
||||
this.pushCounter = metrics
|
||||
.getMeter("cojosn")
|
||||
.createCounter(`${prefix}.pushed`, {
|
||||
description: "Number of messages pushed to the queue",
|
||||
valueType: ValueType.INT,
|
||||
unit: "1",
|
||||
});
|
||||
|
||||
/**
|
||||
* This makes sure that those metrics are generated (and emitted) as soon as the queue is created.
|
||||
* This is to avoid edge cases where one series reset is delayed, which would cause spikes or dips
|
||||
* when queried - and it also more correctly represents the actual state of the queue after a restart.
|
||||
*/
|
||||
this.pullCounter.add(0, this.attrs);
|
||||
this.pushCounter.add(0, this.attrs);
|
||||
}
|
||||
|
||||
public pull() {
|
||||
this.pullCounter.add(1, this.attrs);
|
||||
}
|
||||
|
||||
public push() {
|
||||
this.pushCounter.add(1, this.attrs);
|
||||
}
|
||||
}
|
||||
|
||||
function meteredList<T>(attrs?: Record<string, string | number>) {
|
||||
return new LinkedList<T>(new QueueMeter("jazz.messagequeue", attrs));
|
||||
}
|
||||
|
||||
const PRIORITY_TO_QUEUE_INDEX = {
|
||||
[CO_VALUE_PRIORITY.HIGH]: 0,
|
||||
[CO_VALUE_PRIORITY.MEDIUM]: 1,
|
||||
[CO_VALUE_PRIORITY.LOW]: 2,
|
||||
} as const;
|
||||
|
||||
export class PriorityBasedMessageQueue {
|
||||
private queues: QueueTuple;
|
||||
|
||||
constructor(
|
||||
private defaultPriority: CoValuePriority,
|
||||
/**
|
||||
* Optional attributes to be added to the generated metrics.
|
||||
* By default the metrics will have the priority as an attribute.
|
||||
*/
|
||||
attrs?: Record<string, string | number>,
|
||||
) {
|
||||
this.queues = [
|
||||
meteredList({ priority: CO_VALUE_PRIORITY.HIGH, ...attrs }),
|
||||
meteredList({ priority: CO_VALUE_PRIORITY.MEDIUM, ...attrs }),
|
||||
meteredList({ priority: CO_VALUE_PRIORITY.LOW, ...attrs }),
|
||||
];
|
||||
}
|
||||
private queues: QueueTuple = [
|
||||
new LinkedList<QueueEntry>(),
|
||||
new LinkedList<QueueEntry>(),
|
||||
new LinkedList<QueueEntry>(),
|
||||
new LinkedList<QueueEntry>(),
|
||||
new LinkedList<QueueEntry>(),
|
||||
new LinkedList<QueueEntry>(),
|
||||
new LinkedList<QueueEntry>(),
|
||||
new LinkedList<QueueEntry>(),
|
||||
];
|
||||
queueSizeCounter = metrics
|
||||
.getMeter("cojson")
|
||||
.createUpDownCounter("jazz.messagequeue.size", {
|
||||
description: "Size of the message queue",
|
||||
valueType: ValueType.INT,
|
||||
unit: "entry",
|
||||
});
|
||||
|
||||
private getQueue(priority: CoValuePriority) {
|
||||
return this.queues[PRIORITY_TO_QUEUE_INDEX[priority]];
|
||||
return this.queues[priority];
|
||||
}
|
||||
|
||||
constructor(private defaultPriority: CoValuePriority) {}
|
||||
|
||||
public push(msg: SyncMessage) {
|
||||
const { promise, resolve, reject } = promiseWithResolvers<void>();
|
||||
const entry: QueueEntry = { msg, promise, resolve, reject };
|
||||
@@ -171,12 +119,24 @@ export class PriorityBasedMessageQueue {
|
||||
|
||||
this.getQueue(priority).push(entry);
|
||||
|
||||
this.queueSizeCounter.add(1, {
|
||||
priority,
|
||||
});
|
||||
|
||||
return promise;
|
||||
}
|
||||
|
||||
public pull() {
|
||||
const priority = this.queues.findIndex((queue) => queue.length > 0);
|
||||
|
||||
if (priority === -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.queueSizeCounter.add(-1, {
|
||||
priority,
|
||||
});
|
||||
|
||||
return this.queues[priority]?.shift();
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user