Compare commits

...

65 Commits

Author SHA1 Message Date
Benjamin S. Leveritt
7cfd47b7f3 Add minimal example links 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
c34ce695ea Improves navigation links 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
7666dc6da2 Add documentation for authentication hooks 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
be3ac8aa63 Fix formatting 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
b759668022 Improve browser auth typedocs 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
1ada04f6f4 Add Passphrase section to Auth Methods 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
f3455bc691 Add stub typedocs to browser auth 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
044f61e3d7 Add authentication method page stub 2024-11-25 12:37:47 +00:00
Trisha Lim
6d63f4cf2e Reuse FeatureCard on Coming Soon section 2024-11-25 12:34:23 +00:00
Trisha Lim
b828f41cf0 Renamed LabelledFeatureIcon to FeatureCard 2024-11-25 12:34:23 +00:00
Trisha Lim
14d24888e1 Make coming soon section 4-col 2024-11-25 12:34:23 +00:00
Trisha Lim
29bdb0a120 Add cols prop to GappedGrid component 2024-11-25 12:34:23 +00:00
Trisha Lim
c7ec6baba8 Create card component 2024-11-25 12:34:23 +00:00
Anselm Eickhoff
f8cf198a27 Merge pull request #709 from garden-co/benjamin-jazz-438 2024-11-25 12:32:59 +00:00
Benjamin S. Leveritt
720435e2f2 Add examples to access coFeed 2024-11-25 12:29:57 +00:00
Benjamin S. Leveritt
2dcf6925b4 Add explanation and example for coFeed.push 2024-11-25 12:29:57 +00:00
Benjamin S. Leveritt
55d49a3435 Update CoFeed ensureLoaded
To clarify depth and undefined states
2024-11-25 12:29:57 +00:00
Benjamin S. Leveritt
33d1c11909 Update packages/jazz-tools/src/coValues/coStream.ts
Co-authored-by: Anselm Eickhoff <anselm.eickhoff@gmail.com>
2024-11-25 12:29:57 +00:00
Benjamin S. Leveritt
02ee69672d Update packages/jazz-tools/src/coValues/interfaces.ts
Co-authored-by: Anselm Eickhoff <anselm.eickhoff@gmail.com>
2024-11-25 12:29:57 +00:00
Benjamin S. Leveritt
743f7d068b Tweak CoList docs 2024-11-25 11:51:01 +00:00
Benjamin S. Leveritt
c0a1bb272e Add docs for type ID 2024-11-25 11:49:49 +00:00
Benjamin S. Leveritt
a9f08ebbbe Add a few more notes for coMaps 2024-11-25 11:49:49 +00:00
Benjamin S. Leveritt
0d86b132ea Add more docs to BinaryCoStream docs 2024-11-25 11:49:46 +00:00
Benjamin S. Leveritt
5114bbec88 Add FileStream docs 2024-11-25 11:46:38 +00:00
Benjamin S. Leveritt
29deedb163 Add coStream docs 2024-11-25 11:39:05 +00:00
Benjamin S. Leveritt
a322a0e3b5 Add more coStream docs 2024-11-25 11:35:19 +00:00
Benjamin S. Leveritt
4fea86141f Fix description 2024-11-25 11:34:47 +00:00
Benjamin S. Leveritt
d923d45a82 Add some initial coStream docs 2024-11-25 11:34:11 +00:00
Trisha Lim
8c8a5b242a Add Gio to team page 2024-11-25 10:03:25 +00:00
Benjamin S. Leveritt
d020ee2825 Merge pull request #856 from garden-co/trishalim-jazz-522
API Reference: typography and spacing adjustments
2024-11-23 07:26:36 +00:00
Guido D'Orsi
e00489d8ee Merge pull request #865 from garden-co/fix/less-reads-on-known-state
chore(SyncStateSubscriptionManager): improve the internal API
2024-11-22 18:21:39 +01:00
Anselm Eickhoff
1e08581049 Merge pull request #864 from garden-co/changeset-release/main
Version Packages
2024-11-22 17:20:42 +00:00
Guido D'Orsi
5a5f886bdf chore: formatting 2024-11-22 18:20:41 +01:00
Guido D'Orsi
e5c575ec10 chore(SyncStateSubscriptionManager): improve the internal API 2024-11-22 18:18:44 +01:00
github-actions[bot]
68c2b2598e Version Packages 2024-11-22 17:17:04 +00:00
Anselm Eickhoff
c0ba15cca8 Merge pull request #863 from garden-co/fix/less-reads-on-known-state
perf(SyncStateSubscriptionManager): make the isUploaded computation lazy
2024-11-22 17:15:49 +00:00
Guido D'Orsi
e511d6d56a chore: changeset 2024-11-22 18:03:10 +01:00
Guido D'Orsi
53f4b23c0a perf(SyncStateSubscriptionManager): make the isUploaded computation lazy 2024-11-22 18:02:07 +01:00
Anselm Eickhoff
749a424cf1 Merge pull request #862 from garden-co/changeset-release/main
Version Packages
2024-11-22 16:54:32 +00:00
github-actions[bot]
33c4ef902d Version Packages 2024-11-22 16:52:40 +00:00
Anselm Eickhoff
e2e3751172 Merge pull request #858 from garden-co/fix/improve-peers-close
fix: reduce noise on Peer close and increase load timeout
2024-11-22 16:50:30 +00:00
Anselm Eickhoff
6c62f4be5d Merge pull request #861 from garden-co/optimize-known-state
Optimize known state
2024-11-22 16:50:16 +00:00
Anselm
0a2fae3830 Add changeset 2024-11-22 16:44:16 +00:00
Anselm
4ab533af6b More optimised way to get knownState 2024-11-22 16:44:03 +00:00
Guido D'Orsi
99cda2f33d fix: reduce noise on Peer close and increase load timeout 2024-11-22 17:23:31 +01:00
Anselm Eickhoff
e4fcafd576 Merge pull request #857 from garden-co/changeset-release/main
Version Packages
2024-11-22 15:46:42 +00:00
github-actions[bot]
a9cff03bcb Version Packages 2024-11-22 15:35:56 +00:00
Anselm Eickhoff
26324d4b1e Merge pull request #853 from garden-co/fix/improve-peers-close
fix: clean the queues on peers close
2024-11-22 15:32:43 +00:00
Anselm Eickhoff
bd022ffd5e Merge pull request #854 from garden-co/fix/offline-support-and-faster-load
fix: restore offline support and faster load when storage is active
2024-11-22 15:32:31 +00:00
Trisha Lim
94e3922efc Adjust scroll margin in API Reference pages; fixes #830 2024-11-22 15:00:50 +00:00
Guido D'Orsi
dcc9c2e376 chore: changeset 2024-11-22 15:53:14 +01:00
Guido D'Orsi
48edcaff37 fix: clean the queues on peers close 2024-11-22 15:49:42 +01:00
Trisha Lim
a18ed077ca API Ref: make headings more prominent 2024-11-22 14:48:16 +00:00
Guido D'Orsi
7780346208 fix(jazz-browser): fix unitialized variable when loading offline 2024-11-22 15:36:02 +01:00
Guido D'Orsi
699553fe9f chore: changeset 2024-11-22 10:11:30 +01:00
Guido D'Orsi
bdd5ad7eb1 fix: restore offline support and faster load when storage is active 2024-11-22 10:09:56 +01:00
Guido D'Orsi
a6942030d4 Merge pull request #848 from garden-co/benjamin-jazz-528
Chore: Bump turbo to v2
2024-11-21 18:21:05 +01:00
Benjamin S. Leveritt
905c6b312b Chore: Bump turbo to v2 2024-11-21 17:00:10 +00:00
Trisha Lim
fc845cc930 Fix url for sharing in chat demo 2024-11-20 21:39:26 +00:00
Trisha Lim
0e6ea3f762 Fix chat demo opens 2 different chat rooms 2024-11-20 21:20:09 +00:00
Anselm Eickhoff
f0060e0355 Merge pull request #836 from garden-co/changeset-release/main
Version Packages
2024-11-20 18:42:06 +00:00
github-actions[bot]
9e9788395c Version Packages 2024-11-20 18:41:39 +00:00
Anselm Eickhoff
6371c7689f Merge pull request #835 from garden-co/covalue-state-fix
Send empty known state on all states except available
2024-11-20 18:40:16 +00:00
Anselm
605734c71c Add changeset 2024-11-20 18:39:40 +00:00
Anselm
db5227b463 Send empty known state on all states except available 2024-11-20 18:39:28 +00:00
107 changed files with 2054 additions and 353 deletions

View File

@@ -1,5 +1,43 @@
# @jazz-e2e/binarycostream
## 0.0.108
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
- jazz-react@0.8.31
- jazz-tools@0.8.31
## 0.0.107
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
- jazz-react@0.8.30
- jazz-tools@0.8.30
## 0.0.106
### Patch Changes
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson@0.8.29
- jazz-react@0.8.29
- jazz-tools@0.8.29
## 0.0.105
### Patch Changes
- Updated dependencies [605734c]
- cojson@0.8.28
- jazz-react@0.8.28
- jazz-tools@0.8.28
## 0.0.104
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@jazz-e2e/filestream",
"private": true,
"version": "0.0.104",
"version": "0.0.108",
"type": "module",
"scripts": {
"dev": "vite",
@@ -13,11 +13,11 @@
"test:ui": "playwright test --ui"
},
"dependencies": {
"cojson": "workspace:0.8.27",
"cojson": "workspace:0.8.31",
"hash-slash": "workspace:0.2.1",
"is-ci": "^3.0.1",
"jazz-react": "workspace:0.8.27",
"jazz-tools": "workspace:0.8.27",
"jazz-react": "workspace:0.8.31",
"jazz-tools": "workspace:0.8.31",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},

View File

@@ -1,5 +1,43 @@
# @jazz-e2e/covalues
## 0.0.107
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
- jazz-react@0.8.31
- jazz-tools@0.8.31
## 0.0.106
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
- jazz-react@0.8.30
- jazz-tools@0.8.30
## 0.0.105
### Patch Changes
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson@0.8.29
- jazz-react@0.8.29
- jazz-tools@0.8.29
## 0.0.104
### Patch Changes
- Updated dependencies [605734c]
- cojson@0.8.28
- jazz-react@0.8.28
- jazz-tools@0.8.28
## 0.0.103
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@jazz-e2e/covalues",
"private": true,
"version": "0.0.103",
"version": "0.0.107",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,37 @@
# jazz-example-book-shelf
## 0.1.23
### Patch Changes
- jazz-react@0.8.31
- jazz-tools@0.8.31
- jazz-browser-media-images@0.8.31
## 0.1.22
### Patch Changes
- jazz-react@0.8.30
- jazz-tools@0.8.30
- jazz-browser-media-images@0.8.30
## 0.1.21
### Patch Changes
- jazz-react@0.8.29
- jazz-tools@0.8.29
- jazz-browser-media-images@0.8.29
## 0.1.20
### Patch Changes
- jazz-react@0.8.28
- jazz-tools@0.8.28
- jazz-browser-media-images@0.8.28
## 0.1.19
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-example-book-shelf",
"version": "0.1.19",
"version": "0.1.23",
"private": true,
"scripts": {
"dev": "next dev",
@@ -11,9 +11,9 @@
},
"dependencies": {
"clsx": "^2.0.0",
"jazz-browser-media-images": "workspace:0.8.27",
"jazz-react": "workspace:0.8.27",
"jazz-tools": "workspace:0.8.27",
"jazz-browser-media-images": "workspace:0.8.31",
"jazz-react": "workspace:0.8.31",
"jazz-tools": "workspace:0.8.31",
"next": "14.2.5",
"react": "^18.2.0",
"react-dom": "^18.2.0"

View File

@@ -1,5 +1,47 @@
# jazz-example-chat
## 0.0.107
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
- jazz-react@0.8.31
- jazz-react-auth-clerk@0.8.31
- jazz-tools@0.8.31
## 0.0.106
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
- jazz-react@0.8.30
- jazz-react-auth-clerk@0.8.30
- jazz-tools@0.8.30
## 0.0.105
### Patch Changes
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson@0.8.29
- jazz-react@0.8.29
- jazz-react-auth-clerk@0.8.29
- jazz-tools@0.8.29
## 0.0.104
### Patch Changes
- Updated dependencies [605734c]
- cojson@0.8.28
- jazz-react@0.8.28
- jazz-react-auth-clerk@0.8.28
- jazz-tools@0.8.28
## 0.0.103
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-chat-clerk",
"private": true,
"version": "0.0.103",
"version": "0.0.107",
"type": "module",
"scripts": {
"dev": "vite",
@@ -17,11 +17,11 @@
"@radix-ui/react-toast": "^1.1.4",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"cojson": "workspace:0.8.27",
"cojson": "workspace:0.8.31",
"hash-slash": "workspace:0.2.1",
"jazz-react": "workspace:0.8.27",
"jazz-react-auth-clerk": "workspace:0.8.27",
"jazz-tools": "workspace:0.8.27",
"jazz-react": "workspace:0.8.31",
"jazz-react-auth-clerk": "workspace:0.8.31",
"jazz-tools": "workspace:0.8.31",
"lucide-react": "^0.274.0",
"qrcode": "^1.5.3",
"react": "^18.2.0",

View File

@@ -1,5 +1,41 @@
# chat-rn-clerk
## 1.0.23
### Patch Changes
- jazz-react-auth-clerk@0.8.31
- jazz-react-native@0.8.31
- jazz-tools@0.8.31
- jazz-react-native-media-images@0.8.23
## 1.0.22
### Patch Changes
- jazz-react-auth-clerk@0.8.30
- jazz-react-native@0.8.30
- jazz-tools@0.8.30
- jazz-react-native-media-images@0.8.22
## 1.0.21
### Patch Changes
- jazz-react-native@0.8.29
- jazz-react-auth-clerk@0.8.29
- jazz-tools@0.8.29
- jazz-react-native-media-images@0.8.21
## 1.0.20
### Patch Changes
- jazz-react-auth-clerk@0.8.28
- jazz-react-native@0.8.28
- jazz-tools@0.8.28
- jazz-react-native-media-images@0.8.20
## 1.0.19
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "chat-rn-clerk",
"main": "index.js",
"version": "1.0.19",
"version": "1.0.23",
"scripts": {
"build": "expo export -p ios",
"start": "expo start",

View File

@@ -1,5 +1,33 @@
# chat-rn
## 1.0.22
### Patch Changes
- jazz-react-native@0.8.31
- jazz-tools@0.8.31
## 1.0.21
### Patch Changes
- jazz-react-native@0.8.30
- jazz-tools@0.8.30
## 1.0.20
### Patch Changes
- jazz-react-native@0.8.29
- jazz-tools@0.8.29
## 1.0.19
### Patch Changes
- jazz-react-native@0.8.28
- jazz-tools@0.8.28
## 1.0.18
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "chat-rn",
"version": "1.0.18",
"version": "1.0.22",
"main": "index.js",
"scripts": {
"build": "expo export -p ios",

View File

@@ -1,5 +1,37 @@
# chat-vue
## 0.0.14
### Patch Changes
- jazz-browser@0.8.31
- jazz-tools@0.8.31
- jazz-vue@0.8.19
## 0.0.13
### Patch Changes
- jazz-browser@0.8.30
- jazz-tools@0.8.30
- jazz-vue@0.8.18
## 0.0.12
### Patch Changes
- jazz-browser@0.8.29
- jazz-tools@0.8.29
- jazz-vue@0.8.17
## 0.0.11
### Patch Changes
- jazz-browser@0.8.28
- jazz-tools@0.8.28
- jazz-vue@0.8.16
## 0.0.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "chat-vue",
"version": "0.0.10",
"version": "0.0.14",
"private": true,
"type": "module",
"scripts": {

View File

@@ -1,5 +1,43 @@
# jazz-example-chat
## 0.0.109
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
- jazz-react@0.8.31
- jazz-tools@0.8.31
## 0.0.108
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
- jazz-react@0.8.30
- jazz-tools@0.8.30
## 0.0.107
### Patch Changes
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson@0.8.29
- jazz-react@0.8.29
- jazz-tools@0.8.29
## 0.0.106
### Patch Changes
- Updated dependencies [605734c]
- cojson@0.8.28
- jazz-react@0.8.28
- jazz-tools@0.8.28
## 0.0.105
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-chat",
"private": true,
"version": "0.0.105",
"version": "0.0.109",
"type": "module",
"scripts": {
"dev": "vite",
@@ -18,10 +18,10 @@
"@radix-ui/react-toast": "^1.1.4",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"cojson": "workspace:0.8.27",
"cojson": "workspace:0.8.31",
"hash-slash": "workspace:0.2.1",
"jazz-react": "workspace:0.8.27",
"jazz-tools": "workspace:0.8.27",
"jazz-react": "workspace:0.8.31",
"jazz-tools": "workspace:0.8.31",
"lucide-react": "^0.274.0",
"qrcode": "^1.5.3",
"react": "^18.2.0",

View File

@@ -1,5 +1,39 @@
# jazz-example-inspector
## 0.0.79
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
- cojson-transport-ws@0.8.31
## 0.0.78
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
- cojson-transport-ws@0.8.30
## 0.0.77
### Patch Changes
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson-transport-ws@0.8.29
- cojson@0.8.29
## 0.0.76
### Patch Changes
- Updated dependencies [605734c]
- cojson@0.8.28
- cojson-transport-ws@0.8.28
## 0.0.75
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-inspector",
"private": true,
"version": "0.0.75",
"version": "0.0.79",
"type": "module",
"scripts": {
"dev": "vite",
@@ -16,8 +16,8 @@
"@radix-ui/react-toast": "^1.1.4",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"cojson": "workspace:0.8.27",
"cojson-transport-ws": "workspace:0.8.27",
"cojson": "workspace:0.8.31",
"cojson-transport-ws": "workspace:0.8.31",
"hash-slash": "workspace:0.2.1",
"lucide-react": "^0.274.0",
"qrcode": "^1.5.3",

View File

@@ -1,5 +1,37 @@
# minimal-auth-clerk
## 0.0.8
### Patch Changes
- jazz-react@0.8.31
- jazz-react-auth-clerk@0.8.31
- jazz-tools@0.8.31
## 0.0.7
### Patch Changes
- jazz-react@0.8.30
- jazz-react-auth-clerk@0.8.30
- jazz-tools@0.8.30
## 0.0.6
### Patch Changes
- jazz-react@0.8.29
- jazz-react-auth-clerk@0.8.29
- jazz-tools@0.8.29
## 0.0.5
### Patch Changes
- jazz-react@0.8.28
- jazz-react-auth-clerk@0.8.28
- jazz-tools@0.8.28
## 0.0.4
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "minimal-auth-clerk",
"private": true,
"version": "0.0.4",
"version": "0.0.8",
"type": "module",
"scripts": {
"dev": "vite",
@@ -14,7 +14,7 @@
"@clerk/clerk-react": "^5.4.1",
"jazz-tools": "workspace:*",
"jazz-react": "workspace:*",
"jazz-react-auth-clerk": "workspace:0.8.27",
"jazz-react-auth-clerk": "workspace:0.8.31",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},

View File

@@ -1,5 +1,33 @@
# minimal-auth-passkey
## 0.0.7
### Patch Changes
- jazz-react@0.8.31
- jazz-tools@0.8.31
## 0.0.6
### Patch Changes
- jazz-react@0.8.30
- jazz-tools@0.8.30
## 0.0.5
### Patch Changes
- jazz-react@0.8.29
- jazz-tools@0.8.29
## 0.0.4
### Patch Changes
- jazz-react@0.8.28
- jazz-tools@0.8.28
## 0.0.3
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "minimal-auth-passkey",
"private": true,
"version": "0.0.3",
"version": "0.0.7",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,33 @@
# jazz-example-musicplayer
## 0.0.29
### Patch Changes
- jazz-react@0.8.31
- jazz-tools@0.8.31
## 0.0.28
### Patch Changes
- jazz-react@0.8.30
- jazz-tools@0.8.30
## 0.0.27
### Patch Changes
- jazz-react@0.8.29
- jazz-tools@0.8.29
## 0.0.26
### Patch Changes
- jazz-react@0.8.28
- jazz-tools@0.8.28
## 0.0.25
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-music-player",
"private": true,
"version": "0.0.25",
"version": "0.0.29",
"type": "module",
"scripts": {
"dev": "vite",
@@ -18,8 +18,8 @@
"@radix-ui/react-toast": "^1.1.4",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"jazz-react": "workspace:0.8.27",
"jazz-tools": "workspace:0.8.27",
"jazz-react": "workspace:0.8.31",
"jazz-tools": "workspace:0.8.31",
"lucide-react": "^0.274.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",

View File

@@ -1,5 +1,37 @@
# jazz-example-onboarding
## 0.0.10
### Patch Changes
- jazz-react@0.8.31
- jazz-tools@0.8.31
- jazz-browser-media-images@0.8.31
## 0.0.9
### Patch Changes
- jazz-react@0.8.30
- jazz-tools@0.8.30
- jazz-browser-media-images@0.8.30
## 0.0.8
### Patch Changes
- jazz-react@0.8.29
- jazz-tools@0.8.29
- jazz-browser-media-images@0.8.29
## 0.0.7
### Patch Changes
- jazz-react@0.8.28
- jazz-tools@0.8.28
- jazz-browser-media-images@0.8.28
## 0.0.6
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-onboarding",
"private": true,
"version": "0.0.6",
"version": "0.0.10",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,33 @@
# jazz-password-manager
## 0.0.28
### Patch Changes
- jazz-react@0.8.31
- jazz-tools@0.8.31
## 0.0.27
### Patch Changes
- jazz-react@0.8.30
- jazz-tools@0.8.30
## 0.0.26
### Patch Changes
- jazz-react@0.8.29
- jazz-tools@0.8.29
## 0.0.25
### Patch Changes
- jazz-react@0.8.28
- jazz-tools@0.8.28
## 0.0.24
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-password-manager",
"private": true,
"version": "0.0.24",
"version": "0.0.28",
"type": "module",
"scripts": {
"dev": "vite",
@@ -12,8 +12,8 @@
"clean-install": "rm -rf node_modules pnpm-lock.yaml && pnpm install"
},
"dependencies": {
"jazz-react": "workspace:0.8.27",
"jazz-tools": "workspace:0.8.27",
"jazz-react": "workspace:0.8.31",
"jazz-tools": "workspace:0.8.31",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.41.5",

View File

@@ -1,5 +1,37 @@
# jazz-example-pets
## 0.0.126
### Patch Changes
- jazz-react@0.8.31
- jazz-tools@0.8.31
- jazz-browser-media-images@0.8.31
## 0.0.125
### Patch Changes
- jazz-react@0.8.30
- jazz-tools@0.8.30
- jazz-browser-media-images@0.8.30
## 0.0.124
### Patch Changes
- jazz-react@0.8.29
- jazz-tools@0.8.29
- jazz-browser-media-images@0.8.29
## 0.0.123
### Patch Changes
- jazz-react@0.8.28
- jazz-tools@0.8.28
- jazz-browser-media-images@0.8.28
## 0.0.122
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-pets",
"private": true,
"version": "0.0.122",
"version": "0.0.126",
"type": "module",
"scripts": {
"dev": "vite",
@@ -19,9 +19,9 @@
"@radix-ui/react-toast": "^1.1.4",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"jazz-browser-media-images": "workspace:0.8.27",
"jazz-react": "workspace:0.8.27",
"jazz-tools": "workspace:0.8.27",
"jazz-browser-media-images": "workspace:0.8.31",
"jazz-react": "workspace:0.8.31",
"jazz-tools": "workspace:0.8.31",
"lucide-react": "^0.274.0",
"qrcode": "^1.5.3",
"react": "^18.2.0",
@@ -41,7 +41,7 @@
"@vitejs/plugin-react-swc": "^3.3.2",
"autoprefixer": "^10.4.14",
"is-ci": "^3.0.1",
"jazz-run": "workspace:0.8.27",
"jazz-run": "workspace:0.8.31",
"postcss": "^8.4.27",
"tailwindcss": "3.3.2",
"typescript": "^5.3.3",

View File

@@ -1,5 +1,37 @@
# todo-vue
## 0.0.12
### Patch Changes
- jazz-browser@0.8.31
- jazz-tools@0.8.31
- jazz-vue@0.8.19
## 0.0.11
### Patch Changes
- jazz-browser@0.8.30
- jazz-tools@0.8.30
- jazz-vue@0.8.18
## 0.0.10
### Patch Changes
- jazz-browser@0.8.29
- jazz-tools@0.8.29
- jazz-vue@0.8.17
## 0.0.9
### Patch Changes
- jazz-browser@0.8.28
- jazz-tools@0.8.28
- jazz-vue@0.8.16
## 0.0.8
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "todo-vue",
"version": "0.0.8",
"version": "0.0.12",
"private": true,
"type": "module",
"scripts": {

View File

@@ -1,5 +1,33 @@
# jazz-example-todo
## 0.0.125
### Patch Changes
- jazz-react@0.8.31
- jazz-tools@0.8.31
## 0.0.124
### Patch Changes
- jazz-react@0.8.30
- jazz-tools@0.8.30
## 0.0.123
### Patch Changes
- jazz-react@0.8.29
- jazz-tools@0.8.29
## 0.0.122
### Patch Changes
- jazz-react@0.8.28
- jazz-tools@0.8.28
## 0.0.121
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-todo",
"private": true,
"version": "0.0.121",
"version": "0.0.125",
"type": "module",
"scripts": {
"dev": "vite",
@@ -16,8 +16,8 @@
"@radix-ui/react-toast": "^1.1.4",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"jazz-react": "workspace:0.8.27",
"jazz-tools": "workspace:0.8.27",
"jazz-react": "workspace:0.8.31",
"jazz-tools": "workspace:0.8.31",
"lucide-react": "^0.274.0",
"qrcode": "^1.5.3",
"react": "^18.2.0",

View File

@@ -0,0 +1,12 @@
import { clsx } from "clsx";
export function Card({
children,
className,
}: { children: React.ReactNode; className?: string }) {
return (
<div className={clsx(className, "border rounded-xl shadow-sm")}>
{children}
</div>
);
}

View File

@@ -1,16 +1,16 @@
import clsx from "clsx";
import { ReactNode } from "react";
import { Card } from "../atoms/Card";
export function GridCard(props: { children: ReactNode; className?: string }) {
return (
<div
<Card
className={clsx(
"col-span-2 p-4 [&>h4]:mt-0 [&>h3]:mt-0 [&>:last-child]:mb-0",
"border rounded-xl shadow-sm",
props.className,
)}
>
{props.children}
</div>
</Card>
);
}

View File

@@ -0,0 +1,36 @@
import clsx from "clsx";
import { LucideIcon } from "lucide-react";
import { Card } from "../atoms/Card";
import { Prose } from "./Prose";
export function FeatureCard({
label,
icon: Icon,
explanation,
children,
className,
}: {
label: React.ReactNode;
icon?: LucideIcon;
explanation?: React.ReactNode;
children?: React.ReactNode;
className?: string;
}) {
return (
<Card className={clsx(className, "p-4")}>
{Icon && (
<Icon
className="size-8 text-blue p-1.5 rounded-lg bg-blue-50 dark:text-blue-500 dark:bg-stone-900 mb-2.5 md:size-10"
strokeWidth={1.5}
strokeLinecap="butt"
size={80}
/>
)}
<div className="text-stone-900 font-medium md:text-base dark:text-stone-100 mb-2">
{label}
</div>
{explanation && <Prose>{explanation}</Prose>}
{children}
</Card>
);
}

View File

@@ -6,15 +6,23 @@ export function GappedGrid({
children,
className,
title,
cols = 3,
}: {
children: ReactNode;
className?: string;
title?: string;
cols?: 3 | 4;
}) {
const colsClassName =
cols === 3
? "md:grid-cols-4 lg:grid-cols-6"
: "sm:grid-cols-2 lg:grid-cols-4";
return (
<div
className={clsx(
"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4 lg:gap-8",
"grid grid-cols-2 gap-4 lg:gap-8",
colsClassName,
"items-stretch",
className,
)}

View File

@@ -1,37 +0,0 @@
import clsx from "clsx";
import { LucideIcon } from "lucide-react";
import { Prose } from "./Prose";
export function LabelledFeatureIcon({
label,
icon: Icon,
explanation,
className,
}: {
label: string;
icon: LucideIcon;
explanation: React.ReactNode;
className?: string;
}) {
return (
<div
className={clsx(
className,
"text-base",
"rounded-xl",
"border p-4 shadow-sm",
)}
>
<Icon
className="size-8 text-blue p-1.5 rounded-lg bg-blue-50 dark:text-blue-500 dark:bg-stone-900 mb-2.5 md:size-10"
strokeWidth={1.5}
strokeLinecap="butt"
size={80}
/>
<div className="text-stone-900 font-medium md:text-base dark:text-stone-100 mb-2">
{label}
</div>
<Prose>{explanation}</Prose>
</div>
);
}

View File

@@ -69,6 +69,15 @@ const team: Array<TeamMember> = [
github: "marinoska",
image: "marina.jpeg",
},
{
name: "Giordano Ricci",
titles: ["Full-Stack Dev", "DevOps"],
location: "Lisbon, Portugal ",
linkedin: "giordanoricci",
github: "Elfo404",
website: "https://giordanoricci.com",
image: "gio.jpg",
},
];
function SocialLink({

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

View File

@@ -15,7 +15,7 @@ export default function Layout({
}) {
return (
<DocsLayout nav={<ApiNav />}>
<Prose className="py-8">{children}</Prose>
<Prose className="py-8 [&_*]:scroll-mt-[8rem]">{children}</Prose>
</DocsLayout>
);
}

View File

@@ -0,0 +1,111 @@
import { CodeGroup } from "@/components/forMdx";
# Authentication methods
Jazz supports a variety of authentication methods, which you can use to authenticate users in your app.
- Passphrase (built-in)
- Passkey (built-in)
- Clerk ([React](https://www.npmjs.com/package/jazz-react-auth-clerk) and [vanilla](https://www.npmjs.com/package/jazz-browser-auth-clerk) packages)
## Passphrase
Passphrase authentication allows users to create a new account or log in with an existing one by providing a passphrase.
Passphrase authentication is supported out of the box and imported from `jazz-react`.
### How to use
1. Setup up Jazz as described in the [React setup guide](/docs/project-setup/react).
2. Use the `usePassphraseAuth` hook to authenticate.
<CodeGroup>
```ts
import { usePassphraseAuth } from "jazz-react";
// ...
const [passphraseAuth, passphraseState] = usePassphraseAuth({ appName });
```
</CodeGroup>
## Passkey
Passkey authentication allows users to create a new account or log in with an existing one by providing a passkey.
Passkey authentication is supported out of the box.
We have a [minimal example of a passkey authentication setup](https://github.com/garden-co/jazz/tree/main/examples/minimal-auth-passkey).
### How to use
1. Setup up Jazz as described in the [React setup guide](/docs/project-setup/react).
2. Use the `usePasskeyAuth` hook to authenticate.
<CodeGroup>
```ts
import { usePasskeyAuth } from "jazz-react";
// ...
const [passkeyAuth, passkeyState] = usePasskeyAuth({ appName });
```
</CodeGroup>
## Clerk
We have a React package `jazz-react-auth-clerk` to add Clerk authentication to your app.
We have a [minimal example of a Clerk authentication setup](https://github.com/garden-co/jazz/tree/main/examples/minimal-auth-clerk).
### How to use
1. Setup up Jazz as described in the [React setup guide](/docs/project-setup/react).
2. Install Clerk as described in the [Clerk docs](https://clerk.com/docs/components/overview).
3. Then add the appropriate package to your project (e.g. `jazz-react-auth-clerk`).
<CodeGroup>
```bash
pnpm install jazz-react-auth-clerk
```
</CodeGroup>
4. Provide a Clerk instance to the `useJazzClerkAuth` hook.
<CodeGroup>
```tsx
import { useClerk, SignInButton } from "@clerk/clerk-react";
import { useJazzClerkAuth } from "jazz-react-auth-clerk";
// ...
function JazzAndAuth({ children }: { children: React.ReactNode }) {
const clerk = useClerk();
const [auth, state] = useJazzClerkAuth(clerk);
return (
<>
{clerk.user && auth ? (
<Jazz.Provider auth={auth}></Jazz.Provider>
) : (
<SignInButton />
)}
</>
);
}
createRoot(document.getElementById("root")!).render(
<StrictMode>
<ClerkProvider publishableKey={PUBLISHABLE_KEY} afterSignOutUrl="/">
<JazzAndAuth>
<App />
</JazzAndAuth>
</ClerkProvider>
</StrictMode>,
);
```
</CodeGroup>

View File

@@ -70,7 +70,11 @@ function RenderPackageChild({
return child.getAllSignatures().map((signature, i) => {
const paramTypes = printParamsWithTypes(signature);
return (
<div key={i} id={child.name} className="not-prose mt-4">
<div
key={i}
id={child.name}
className="not-prose mt-4 p-3 rounded bg-stone-50 dark:bg-stone-925"
>
{
<Highlight hide={[0, 2]}>
{`function \n${printSimpleSignature(child, signature) + ":"}\n {}`}
@@ -171,10 +175,7 @@ function RenderClassOrInterface({
</div>
)}
{classOrInterface.categories?.map((category) => (
<div
className="flex flex-col divide-y divide-stone-200 dark:divide-stone-900"
key={category.title}
>
<div className="flex flex-col mt-6 first:mt-0" key={category.title}>
<PropCategory
name={category.title}
description={renderSummary(

View File

@@ -80,15 +80,15 @@ export function ClassOrInterface({
className="inline-flex items-center gap-2 lg:-ml-[22px]"
>
<LinkIcon size={14} className="hidden lg:inline" />
<h3>
<h3 className="text-lg lg:text-xl">
<Highlight>
{(isInterface ? "interface " : "class ") + name + typeParameters}
</Highlight>
</h3>
</Link>
</div>
<div className="flex flex-col gap-5">
<div>{doc}</div>
<div className="flex flex-col gap-5 mt-5">
{doc && <div>{doc}</div>}
<div>{children}</div>
</div>
</div>
@@ -119,7 +119,7 @@ export function PropDecl({
example?: ReactNode;
}) {
return (
<div className="text-sm py-3 flex flex-col gap-5">
<div className="text-sm flex flex-col gap-3 my-2 p-3 rounded bg-stone-50 dark:bg-stone-925">
{(name || type) && (
<div>
{name && <Highlight>{name + ":"}</Highlight>}
@@ -157,7 +157,7 @@ export function FnDecl({
example: ReactNode;
}) {
return (
<div className="text-sm py-3 flex flex-col gap-5">
<div className="text-sm flex flex-col gap-3 my-2 p-3 rounded bg-stone-50 dark:bg-stone-925">
<div className="flex flex-col gap-2">
<div>
{<Highlight>{signature + ":"}</Highlight>}{" "}
@@ -201,7 +201,7 @@ export function PropCategory({
}) {
return (
<>
<div className="col-span-6 uppercase font-medium tracking-widest text-stone-500 text-xs py-3">
<div className="col-span-6 py-3 font-display font-semibold text-lg text-stone-900 dark:text-white">
{name}
</div>
{description && <PropDecl doc={description} example={example} />}

View File

@@ -1,5 +1,6 @@
"use client";
import { Card } from "gcmp-design-system/src/app/components/atoms/Card";
import { H3 } from "gcmp-design-system/src/app/components/atoms/Headings";
import { GappedGrid } from "gcmp-design-system/src/app/components/molecules/GappedGrid";
import { SectionHeader } from "gcmp-design-system/src/app/components/molecules/SectionHeader";
@@ -22,7 +23,7 @@ function Iframe(
const { src, user } = props;
return (
<div className="relative col-span-2 w-full border rounded-xl shadow-sm overflow-hidden lg:col-span-2 dark:bg-black">
<Card className="relative col-span-2 w-full overflow-hidden lg:col-span-2 dark:bg-black">
<iframe
{...props}
src={src}
@@ -31,7 +32,7 @@ function Iframe(
height="390"
allowFullScreen
/>
</div>
</Card>
);
}
@@ -63,15 +64,11 @@ export function ChatDemoSection() {
const isLocal = window.location.hostname === "localhost";
const url1 = isLocal
? "http://localhost:5173"
: "https://jazz-chat-1.vercel.app";
if (chatId) {
const shareServer = isLocal
? "http://localhost:5173"
: "https://chat.jazz.tools";
const url = `${shareServer}/#${chatId}`;
const url = `${shareServer}/${chatId}`;
setShareUrl(url);
QRCode.toDataURL(url, {
@@ -83,7 +80,10 @@ export function ChatDemoSection() {
return; // Once the chatId is set, we don't need to listen for messages anymore
}
setServer1(url1 + `?user=${user1}`);
setServer1(
(isLocal ? "http://localhost:5173" : "https://jazz-chat-1.vercel.app") +
`?user=${user1}`,
);
setServer2(
(isLocal ? "http://localhost:5174" : "https://jazz-chat-2.vercel.app") +
`?user=${user2}`,
@@ -96,8 +96,8 @@ export function ChatDemoSection() {
const listener = (e: MessageEvent) => {
const isValidOrigin = e.origin === server1Url.origin;
if (e.data.type === "chat-load" && isValidOrigin && e.data.id) {
setChatId(e.data.id);
if (e.data.type === "navigate" && isValidOrigin) {
setChatId(new URL(e.data.url).hash);
}
};
window.addEventListener("message", listener);

View File

@@ -1,3 +1,4 @@
import { Card } from "gcmp-design-system/src/app/components/atoms/Card";
import { GappedGrid } from "gcmp-design-system/src/app/components/molecules/GappedGrid";
import { Prose } from "gcmp-design-system/src/app/components/molecules/Prose";
import { SectionHeader } from "gcmp-design-system/src/app/components/molecules/SectionHeader";
@@ -42,8 +43,8 @@ export function CollaborationFeaturesSection() {
<GappedGrid>
{data.map(({ title, description, codeSample: CodeSample }) => (
<div
className="col-span-2 border rounded-xl shadow-sm pt-4 px-4 flex flex-col gap-3"
<Card
className="col-span-2 pt-4 px-4 flex flex-col gap-3"
key={title}
>
<div>
@@ -57,7 +58,7 @@ export function CollaborationFeaturesSection() {
<pre className="flex-1 text-sm border-t border-x rounded-t-lg bg-stone-50 dark:bg-stone-925">
<CodeSample />
</pre>
</div>
</Card>
))}
</GappedGrid>
</div>

View File

@@ -3,9 +3,8 @@ import CursorsAndCaretsDescription from "@/app/(home)/toolkit/cursorsAndCarets.m
import TwoWaySyncDescription from "@/app/(home)/toolkit/twoWaySync.mdx";
import VideoPresenceCallsDescription from "@/app/(home)/toolkit/videoPresenceCalls.mdx";
import { CodeRef } from "gcmp-design-system/src/app/components/atoms/CodeRef";
import { GridCard } from "gcmp-design-system/src/app/components/atoms/GridCard";
import { H3 } from "gcmp-design-system/src/app/components/atoms/Headings";
import { P } from "gcmp-design-system/src/app/components/atoms/Paragraph";
import { FeatureCard } from "gcmp-design-system/src/app/components/molecules/FeatureCard";
import { GappedGrid } from "gcmp-design-system/src/app/components/molecules/GappedGrid";
import { Prose } from "gcmp-design-system/src/app/components/molecules/Prose";
import { SectionHeader } from "gcmp-design-system/src/app/components/molecules/SectionHeader";
@@ -15,39 +14,40 @@ export function ComingSoonSection() {
<div>
<SectionHeader title="More features coming soon" />
<GappedGrid>
<GridCard>
<H3>Cursors & carets</H3>
<P className="text-lg">Ready-made spatial presence.</P>
<GappedGrid cols={4}>
<FeatureCard className="p-4" label={<h3>Cursors & carets</h3>}>
<P>Ready-made spatial presence.</P>
<Prose size="sm">
<CursorsAndCaretsDescription />
</Prose>
</GridCard>
</FeatureCard>
<GridCard>
<H3>Two-way sync to your DB</H3>
<P className="text-lg">Add Jazz to an existing app.</P>
<FeatureCard className="p-4" label={<h3>Two-way sync to your DB</h3>}>
<P>Add Jazz to an existing app.</P>
<Prose size="sm">
<TwoWaySyncDescription />
</Prose>
</GridCard>
</FeatureCard>
<GridCard>
<H3>Video presence & calls</H3>
<P className="text-lg">Stream and record audio & video.</P>
<FeatureCard className="p-4" label={<h3>Video presence & calls</h3>}>
<P>Stream and record audio & video.</P>
<Prose size="sm">
<VideoPresenceCallsDescription />
</Prose>
</GridCard>
</FeatureCard>
<GridCard>
<H3>
<CodeRef>CoPlainText</CodeRef> & <CodeRef>CoRichText</CodeRef>
</H3>
<FeatureCard
className="p-4"
label={
<h3>
<CodeRef>CoPlainText</CodeRef> & <CodeRef>CoRichText</CodeRef>
</h3>
}
>
<Prose size="sm">
<CoPlainTextDescription />
</Prose>
</GridCard>
</FeatureCard>
</GappedGrid>
</div>
);

View File

@@ -1,10 +1,11 @@
import { Button } from "gcmp-design-system/src/app/components/atoms/Button";
import { Card } from "gcmp-design-system/src/app/components/atoms/Card";
import { H2 } from "gcmp-design-system/src/app/components/atoms/Headings";
import { Prose } from "gcmp-design-system/src/app/components/molecules/Prose";
export function EarlyAdopterSection() {
return (
<div className="border rounded-xl shadow-sm p-4 md:py-16">
<Card className="p-4 md:py-16">
<div className="lg:max-w-3xl md:text-center mx-auto space-y-6">
<p className="uppercase text-blue tracking-widest text-sm font-medium dark:text-stone-400">
Become an early adopter
@@ -31,6 +32,6 @@ export function EarlyAdopterSection() {
</Button>
</div>
</div>
</div>
</Card>
);
}

View File

@@ -1,3 +1,4 @@
import { Card } from "gcmp-design-system/src/app/components/atoms/Card";
import { H3 } from "gcmp-design-system/src/app/components/atoms/Headings";
import { Prose } from "gcmp-design-system/src/app/components/molecules/Prose";
import { LockKeyholeIcon } from "lucide-react";
@@ -64,7 +65,7 @@ function Illustration() {
export function EncryptionSection() {
return (
<div className="border rounded-xl bg-white shadow-sm overflow-hidden dark:bg-stone-925">
<Card className="overflow-hidden dark:bg-stone-925">
<div className="flex grid md:grid-cols-3 md:gap-3">
<div className="md:col-span-2 px-4 pb-4 md:p-8">
<H3 className="mb-0 text-balance">
@@ -86,6 +87,6 @@ export function EncryptionSection() {
<Illustration />
</div>
</div>
</Card>
);
}

View File

@@ -1,6 +1,7 @@
import { ServerWorkersDiagram } from "@/components/home/ServerWorkersDiagram";
import { ClerkLogo } from "@/components/icons/ClerkLogo";
import { Button } from "gcmp-design-system/src/app/components/atoms/Button";
import { Card } from "gcmp-design-system/src/app/components/atoms/Card";
import { H3 } from "gcmp-design-system/src/app/components/atoms/Headings";
import { Prose } from "gcmp-design-system/src/app/components/molecules/Prose";
import { SectionHeader } from "gcmp-design-system/src/app/components/molecules/SectionHeader";
@@ -124,10 +125,7 @@ export function FeaturesSection() {
<div className="grid grid-cols-2 sm:grid-cols-4 md:grid-cols-6 gap-4 lg:gap-8">
{features.map(({ title, icon: Icon, description, illustration }) => (
<div
key={title}
className="col-span-2 border rounded-xl shadow-sm overflow-hidden"
>
<Card key={title} className="col-span-2 overflow-hidden">
<div className="h-48 flex w-full items-center justify-center">
{illustration}
</div>
@@ -137,7 +135,7 @@ export function FeaturesSection() {
</h3>
<Prose size="sm">{description}</Prose>
</div>
</div>
</Card>
))}
<div className="border p-4 sm:p-8 shadow-sm rounded-xl col-span-2 sm:col-span-4 space-y-5">

View File

@@ -1,4 +1,5 @@
import { clsx } from "clsx";
import { Card } from "gcmp-design-system/src/app/components/atoms/Card";
import { H2 } from "gcmp-design-system/src/app/components/atoms/Headings";
import { GappedGrid } from "gcmp-design-system/src/app/components/molecules/GappedGrid";
import CodeStepAction from "./CodeStepAction.mdx";
@@ -48,10 +49,10 @@ function Step({
className?: string;
}) {
return (
<div
<Card
className={clsx(
className,
"rounded-lg overflow-hidden shadow-sm flex flex-col gap-6 border",
"overflow-hidden flex flex-col gap-6",
"pt-4 sm:pt-6",
"col-span-2 lg:col-span-3",
)}
@@ -70,7 +71,7 @@ function Step({
<p className="max-w-md">{description}</p>
</div>
<div className="flex-1 pl-4 sm:pl-12">{children}</div>
</div>
</Card>
);
}

View File

@@ -1,4 +1,5 @@
import { LabelledFeatureIcon } from "gcmp-design-system/src/app/components/molecules/LabelledFeatureIcon";
import { FeatureCard } from "gcmp-design-system/src/app/components/molecules/FeatureCard";
import { GappedGrid } from "gcmp-design-system/src/app/components/molecules/GappedGrid";
import { SectionHeader } from "gcmp-design-system/src/app/components/molecules/SectionHeader";
import {
GaugeIcon,
@@ -64,16 +65,16 @@ export function LocalFirstFeaturesSection() {
</>
}
/>
<div className="grid sm:grid-cols-2 lg:grid-cols-4 gap-4 lg:gap-8">
<GappedGrid cols={4}>
{features.map(({ title, icon: Icon, description }) => (
<LabelledFeatureIcon
<FeatureCard
label={title}
icon={Icon}
explanation={description}
key={title}
></LabelledFeatureIcon>
></FeatureCard>
))}
</div>
</GappedGrid>
</div>
);
}

View File

@@ -111,12 +111,27 @@ export const docNavigationItems = [
],
},
{
name: "Authentication",
name: "Authentication methods",
items: [
{
name: "Auth methods overview",
name: "Overview",
href: "/docs/authentication/auth-methods",
done: 0,
done: 80,
},
{
name: "Passphrase",
href: "/docs/authentication/auth-methods#passphrase",
done: 20,
},
{
name: "Passkey",
href: "/docs/authentication/auth-methods#passkey",
done: 20,
},
{
name: "Clerk",
href: "/docs/authentication/auth-methods#clerk",
done: 20,
},
{
name: "Writing your own",

View File

@@ -12,7 +12,7 @@
"happy-dom": "^15.8.3",
"lefthook": "^1.8.2",
"ts-node": "^10.9.1",
"turbo": "^1.11.2",
"turbo": "^2.3.1",
"typedoc": "^0.25.13",
"vitest": "1.5.3"
},

View File

@@ -1,5 +1,35 @@
# cojson-storage-indexeddb
## 0.8.31
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
## 0.8.30
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
## 0.8.29
### Patch Changes
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson@0.8.29
## 0.8.28
### Patch Changes
- Updated dependencies [605734c]
- cojson@0.8.28
## 0.8.27
### Patch Changes

View File

@@ -1,12 +1,12 @@
{
"name": "cojson-storage-indexeddb",
"version": "0.8.27",
"version": "0.8.31",
"main": "dist/index.js",
"type": "module",
"types": "src/index.ts",
"license": "MIT",
"dependencies": {
"cojson": "workspace:0.8.27"
"cojson": "workspace:0.8.31"
},
"devDependencies": {
"@vitest/browser": "^0.34.1",

View File

@@ -1,5 +1,35 @@
# cojson-storage-sqlite
## 0.8.31
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
## 0.8.30
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
## 0.8.29
### Patch Changes
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson@0.8.29
## 0.8.28
### Patch Changes
- Updated dependencies [605734c]
- cojson@0.8.28
## 0.8.27
### Patch Changes

View File

@@ -1,13 +1,13 @@
{
"name": "cojson-storage-sqlite",
"type": "module",
"version": "0.8.27",
"version": "0.8.31",
"main": "dist/index.js",
"types": "src/index.ts",
"license": "MIT",
"dependencies": {
"better-sqlite3": "^8.5.2",
"cojson": "workspace:0.8.27",
"cojson": "workspace:0.8.31",
"typescript": "^5.3.3"
},
"devDependencies": {

View File

@@ -1,5 +1,36 @@
# cojson-transport-nodejs-ws
## 0.8.31
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
## 0.8.30
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
## 0.8.29
### Patch Changes
- dcc9c2e: Clear out the queues when closing a Peer
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson@0.8.29
## 0.8.28
### Patch Changes
- Updated dependencies [605734c]
- cojson@0.8.28
## 0.8.27
### Patch Changes

View File

@@ -1,12 +1,12 @@
{
"name": "cojson-transport-ws",
"type": "module",
"version": "0.8.27",
"version": "0.8.31",
"main": "dist/index.js",
"types": "src/index.ts",
"license": "MIT",
"dependencies": {
"cojson": "workspace:0.8.27",
"cojson": "workspace:0.8.31",
"typescript": "^5.3.3"
},
"scripts": {

View File

@@ -59,6 +59,7 @@ function createOutgoingMessagesManager(
websocket: AnyWebSocket,
batchingByDefault: boolean,
) {
let closed = false;
const outgoingMessages = new BatchedOutgoingMessages((messages) => {
if (websocket.readyState === 1) {
websocket.send(messages);
@@ -68,6 +69,10 @@ function createOutgoingMessagesManager(
let batchingEnabled = batchingByDefault;
async function sendMessage(msg: SyncMessage) {
if (closed) {
return Promise.reject(new Error("WebSocket closed"));
}
if (websocket.readyState !== 1) {
await waitForWebSocketOpen(websocket);
}
@@ -98,6 +103,7 @@ function createOutgoingMessagesManager(
batchingEnabled = enabled;
},
close() {
closed = true;
outgoingMessages.close();
},
};

View File

@@ -153,6 +153,23 @@ describe("createWebSocketPeer", () => {
expect(mockWebSocket.close).toHaveBeenCalled();
});
test("should return a rejection if a message is sent after the peer is closed", async () => {
const { peer } = setup();
peer.outgoing.close();
const message: SyncMessage = {
action: "known",
id: "co_ztest",
header: false,
sessions: {},
};
await expect(peer.outgoing.push(message)).rejects.toThrow(
"WebSocket closed",
);
});
describe("batchingByDefault = true", () => {
test("should batch outgoing messages", async () => {
const { peer, mockWebSocket } = setup();

View File

@@ -1,5 +1,31 @@
# cojson
## 0.8.31
### Patch Changes
- e511d6d: Performance: make the isUploaded check on the SyncStateManager lazy
## 0.8.30
### Patch Changes
- 0a2fae3: More optimised way to get knownState
- 99cda2f: Reduce noise on peer close and increase the load timeout
## 0.8.29
### Patch Changes
- dcc9c2e: Clear out the queues when closing a Peer
- 699553f: Restore offline support and improve loading perfromance when values are cached
## 0.8.28
### Patch Changes
- 605734c: Send empty known state on all states except available
## 0.8.27
### Patch Changes

View File

@@ -19,7 +19,7 @@
},
"type": "module",
"license": "MIT",
"version": "0.8.27",
"version": "0.8.31",
"devDependencies": {
"@types/jest": "^29.5.3",
"typescript": "^5.3.3",

View File

@@ -97,6 +97,10 @@ export class PeerState {
}
pushOutgoingMessage(msg: SyncMessage) {
if (this.closed) {
return Promise.resolve();
}
const promise = this.queue.push(msg);
void this.processQueue();
@@ -114,8 +118,17 @@ export class PeerState {
return this.peer.incoming;
}
private closeQueue() {
let entry: QueueEntry | undefined;
while ((entry = this.queue.pull())) {
// Using resolve here to avoid unnecessary noise in the logs
entry.resolve();
}
}
gracefulShutdown() {
console.debug("Gracefully closing", this.id);
this.closeQueue();
this.peer.outgoing.close();
this.closed = true;
}

View File

@@ -6,29 +6,31 @@ import {
emptyKnownState,
} from "./sync.js";
export type SyncStateGetter = {
isUploaded: boolean;
};
export type GlobalSyncStateListenerCallback = (
peerId: PeerID,
knownState: CoValueKnownState,
sync: SyncStateGetter,
) => void;
export type PeerSyncStateListenerCallback = (
knownState: CoValueKnownState,
sync: SyncStateGetter,
) => void;
export class SyncStateSubscriptionManager {
constructor(private syncManager: SyncManager) {}
private listeners = new Set<
(
peerId: PeerID,
knownState: CoValueKnownState,
uploadCompleted: boolean,
) => void
>();
private listeners = new Set<GlobalSyncStateListenerCallback>();
private listenersByPeers = new Map<
PeerID,
Set<(knownState: CoValueKnownState, uploadCompleted: boolean) => void>
Set<PeerSyncStateListenerCallback>
>();
subscribeToUpdates(
listener: (
peerId: PeerID,
knownState: CoValueKnownState,
uploadCompleted: boolean,
) => void,
) {
subscribeToUpdates(listener: GlobalSyncStateListenerCallback) {
this.listeners.add(listener);
return () => {
@@ -38,7 +40,7 @@ export class SyncStateSubscriptionManager {
subscribeToPeerUpdates(
peerId: PeerID,
listener: (knownState: CoValueKnownState, uploadCompleted: boolean) => void,
listener: PeerSyncStateListenerCallback,
) {
const listeners = this.listenersByPeers.get(peerId) ?? new Set();
@@ -68,19 +70,29 @@ export class SyncStateSubscriptionManager {
}
const knownState = peer.knownStates.get(id) ?? emptyKnownState(id);
const fullyUploadedIntoPeer = this.getIsCoValueFullyUploadedIntoPeer(
peerId,
id,
// Build a lazy sync state object to process the isUploaded info
// only when requested
const syncState = {} as SyncStateGetter;
const getIsUploaded = simpleMemoize(() =>
this.getIsCoValueFullyUploadedIntoPeer(peerId, id),
);
Object.defineProperties(syncState, {
isUploaded: {
enumerable: true,
get: getIsUploaded,
},
});
for (const listener of this.listeners) {
listener(peerId, knownState, fullyUploadedIntoPeer);
listener(peerId, knownState, syncState);
}
if (!peerListeners) return;
for (const listener of peerListeners) {
listener(knownState, fullyUploadedIntoPeer);
listener(knownState, syncState);
}
}
@@ -122,3 +134,8 @@ function getIsUploadCompleted(
return true;
}
function simpleMemoize<T>(fn: () => T): () => T {
let value: T | undefined;
return () => value ?? (value = fn());
}

View File

@@ -155,15 +155,16 @@ export class CoValueCore {
/** @internal */
knownStateUncached(): CoValueKnownState {
const sessions: CoValueKnownState["sessions"] = {};
for (const [sessionID, sessionLog] of this.sessionLogs.entries()) {
sessions[sessionID] = sessionLog.transactions.length;
}
return {
id: this.id,
header: true,
sessions: Object.fromEntries(
[...this.sessionLogs.entries()].map(([k, v]) => [
k,
v.transactions.length,
]),
),
sessions,
};
}

View File

@@ -4,6 +4,7 @@ import { RawCoID } from "./ids.js";
import { PeerID } from "./sync.js";
export const CO_VALUE_LOADING_MAX_RETRIES = 5;
export const CO_VALUE_LOADING_TIMEOUT = 30_000;
export class CoValueUnknownState {
type = "unknown" as const;
@@ -264,22 +265,53 @@ async function loadCoValueFromPeers(
peers: PeerState[],
) {
for (const peer of peers) {
if (coValueEntry.state.type === "loading") {
await peer.pushOutgoingMessage({
action: "load",
id: coValueEntry.id,
header: false,
sessions: {},
});
} else if (coValueEntry.state.type === "available") {
await peer.pushOutgoingMessage({
action: "load",
...coValueEntry.state.coValue.knownState(),
});
if (peer.closed) {
continue;
}
if (coValueEntry.state.type === "available") {
/**
* We don't need to wait for the message to be delivered here.
*
* This way when the coValue becomes available because it's cached we don't wait for the server
* peer to consume the messages queue before moving forward.
*/
peer
.pushOutgoingMessage({
action: "load",
...coValueEntry.state.coValue.knownState(),
})
.catch((err) => {
console.error(`Failed to push load message to peer ${peer.id}`, err);
});
} else {
/**
* We only wait for the load state to be resolved.
*/
peer
.pushOutgoingMessage({
action: "load",
id: coValueEntry.id,
header: false,
sessions: {},
})
.catch((err) => {
console.error(`Failed to push load message to peer ${peer.id}`, err);
});
}
if (coValueEntry.state.type === "loading") {
const timeout = setTimeout(() => {
if (coValueEntry.state.type === "loading") {
console.error("Failed to load coValue from peer", peer.id);
coValueEntry.dispatch({
type: "not-found-in-peer",
peerId: peer.id,
});
}
}, CO_VALUE_LOADING_TIMEOUT);
await coValueEntry.state.waitForPeer(peer.id);
clearTimeout(timeout);
}
}
}

View File

@@ -451,12 +451,17 @@ export class SyncManager {
dependencyEntry.state.type === "available" ||
dependencyEntry.state.type === "loading"
) {
this.local.loadCoValueCore(msg.id, peer.id).catch((e) => {
console.error(
`Error loading coValue ${msg.id} to create loading state, as dependency of ${msg.asDependencyOf}`,
e,
);
});
this.local
.loadCoValueCore(
msg.id,
peer.role === "storage" ? undefined : peer.id,
)
.catch((e) => {
console.error(
`Error loading coValue ${msg.id} to create loading state, as dependency of ${msg.asDependencyOf}`,
e,
);
});
} else {
throw new Error(
"Expected coValue dependency entry to be created, missing subscribe?",
@@ -713,8 +718,8 @@ export class SyncManager {
const unsubscribe =
this.syncStateSubscriptionManager.subscribeToPeerUpdates(
peerId,
(knownState, uploadCompleted) => {
if (uploadCompleted && knownState.id === id) {
(knownState, syncState) => {
if (syncState.isUploaded && knownState.id === id) {
resolve(true);
unsubscribe?.();
}

View File

@@ -57,6 +57,36 @@ describe("PeerState", () => {
consoleSpy.mockRestore();
});
test("should empty the queue when closing", async () => {
const { mockPeer, peerState } = setup();
mockPeer.outgoing.push = vi.fn().mockImplementation((message) => {
return new Promise<void>((resolve) => {
setTimeout(resolve, 100);
});
});
const message1 = peerState.pushOutgoingMessage({
action: "content",
id: "co_z1",
new: {},
priority: CO_VALUE_PRIORITY.HIGH,
});
const message2 = peerState.pushOutgoingMessage({
action: "content",
id: "co_z1",
new: {},
priority: CO_VALUE_PRIORITY.HIGH,
});
peerState.gracefulShutdown();
await Promise.allSettled([message1, message2]);
await expect(message1).resolves.toBe(undefined);
await expect(message2).resolves.toBe(undefined);
});
test("should schedule outgoing messages based on their priority", async () => {
const { peerState } = setup();

View File

@@ -1,4 +1,8 @@
import { describe, expect, onTestFinished, test, vi } from "vitest";
import {
GlobalSyncStateListenerCallback,
PeerSyncStateListenerCallback,
} from "../SyncStateSubscriptionManager.js";
import { connectedPeers } from "../streamUtils.js";
import { emptyKnownState } from "../sync.js";
import { createTestNode, waitFor } from "./testUtils.js";
@@ -29,7 +33,7 @@ describe("SyncStateSubscriptionManager", () => {
const subscriptionManager = client.syncManager.syncStateSubscriptionManager;
const updateSpy = vi.fn();
const updateSpy: GlobalSyncStateListenerCallback = vi.fn();
const unsubscribe = subscriptionManager.subscribeToUpdates(updateSpy);
await client.syncManager.actuallySyncCoValue(map.core);
@@ -37,7 +41,7 @@ describe("SyncStateSubscriptionManager", () => {
expect(updateSpy).toHaveBeenCalledWith(
"jazzCloudConnection",
emptyKnownState(map.core.id),
false,
{ isUploaded: false },
);
await waitFor(() => {
@@ -52,7 +56,7 @@ describe("SyncStateSubscriptionManager", () => {
client.syncManager.peers["jazzCloudConnection"]!.knownStates.get(
map.core.id,
)!,
true,
{ isUploaded: true },
);
// Cleanup
@@ -90,8 +94,8 @@ describe("SyncStateSubscriptionManager", () => {
const subscriptionManager = client.syncManager.syncStateSubscriptionManager;
const updateToJazzCloudSpy = vi.fn();
const updateToStorageSpy = vi.fn();
const updateToJazzCloudSpy: PeerSyncStateListenerCallback = vi.fn();
const updateToStorageSpy: PeerSyncStateListenerCallback = vi.fn();
const unsubscribe1 = subscriptionManager.subscribeToPeerUpdates(
"jazzCloudConnection",
updateToJazzCloudSpy,
@@ -110,7 +114,7 @@ describe("SyncStateSubscriptionManager", () => {
expect(updateToJazzCloudSpy).toHaveBeenCalledWith(
emptyKnownState(map.core.id),
false,
{ isUploaded: false },
);
await waitFor(() => {
@@ -124,12 +128,12 @@ describe("SyncStateSubscriptionManager", () => {
client.syncManager.peers["jazzCloudConnection"]!.knownStates.get(
map.core.id,
)!,
true,
{ isUploaded: true },
);
expect(updateToStorageSpy).toHaveBeenLastCalledWith(
emptyKnownState(map.core.id),
false,
{ isUploaded: false },
);
});

View File

@@ -388,6 +388,79 @@ describe("CoValueState", () => {
vi.useRealTimers();
});
test("should skip closed peers", async () => {
vi.useFakeTimers();
const mockCoValue = createMockCoValueCore(mockCoValueId);
const peer1 = createMockPeerState(
{
id: "peer1",
role: "storage",
},
async () => {
return new Promise(() => {});
},
);
const peer2 = createMockPeerState(
{
id: "peer1",
role: "server",
},
async () => {
state.dispatch({
type: "available",
coValue: mockCoValue,
});
},
);
peer1.closed = true;
const state = CoValueState.Unknown(mockCoValueId);
const loadPromise = state.loadFromPeers([peer1, peer2]);
for (let i = 0; i < CO_VALUE_LOADING_MAX_RETRIES; i++) {
await vi.runAllTimersAsync();
}
await loadPromise;
expect(peer1.pushOutgoingMessage).toHaveBeenCalledTimes(0);
expect(peer2.pushOutgoingMessage).toHaveBeenCalledTimes(1);
expect(state.state.type).toBe("available");
await expect(state.getCoValue()).resolves.toEqual({ id: mockCoValueId });
vi.useRealTimers();
});
test("should not be stuck in loading state when not getting a response", async () => {
vi.useFakeTimers();
const peer1 = createMockPeerState(
{
id: "peer1",
role: "server",
},
async () => {},
);
const state = CoValueState.Unknown(mockCoValueId);
const loadPromise = state.loadFromPeers([peer1]);
for (let i = 0; i < CO_VALUE_LOADING_MAX_RETRIES * 2; i++) {
await vi.runAllTimersAsync();
}
await loadPromise;
expect(peer1.pushOutgoingMessage).toHaveBeenCalledTimes(5);
expect(state.state.type).toBe("unavailable");
await expect(state.getCoValue()).resolves.toEqual("unavailable");
vi.useRealTimers();
});
});
function createMockPeerState(

View File

@@ -1,5 +1,43 @@
# jazz-browser-media-images
## 0.8.31
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
- jazz-browser@0.8.31
- jazz-tools@0.8.31
## 0.8.30
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
- jazz-browser@0.8.30
- jazz-tools@0.8.30
## 0.8.29
### Patch Changes
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson@0.8.29
- jazz-browser@0.8.29
- jazz-tools@0.8.29
## 0.8.28
### Patch Changes
- Updated dependencies [605734c]
- cojson@0.8.28
- jazz-browser@0.8.28
- jazz-tools@0.8.28
## 0.8.27
### Patch Changes

View File

@@ -1,14 +1,14 @@
{
"name": "jazz-browser-auth-clerk",
"version": "0.8.27",
"version": "0.8.31",
"type": "module",
"main": "dist/index.js",
"types": "src/index.ts",
"license": "MIT",
"dependencies": {
"cojson": "workspace:0.8.27",
"jazz-browser": "workspace:0.8.27",
"jazz-tools": "workspace:0.8.27"
"cojson": "workspace:0.8.31",
"jazz-browser": "workspace:0.8.31",
"jazz-tools": "workspace:0.8.31"
},
"scripts": {
"format-and-lint": "biome check .",

View File

@@ -1,5 +1,33 @@
# jazz-browser-media-images
## 0.8.31
### Patch Changes
- jazz-browser@0.8.31
- jazz-tools@0.8.31
## 0.8.30
### Patch Changes
- jazz-browser@0.8.30
- jazz-tools@0.8.30
## 0.8.29
### Patch Changes
- jazz-browser@0.8.29
- jazz-tools@0.8.29
## 0.8.28
### Patch Changes
- jazz-browser@0.8.28
- jazz-tools@0.8.28
## 0.8.27
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-browser-media-images",
"version": "0.8.27",
"version": "0.8.31",
"type": "module",
"main": "dist/index.js",
"types": "src/index.ts",
@@ -8,8 +8,8 @@
"dependencies": {
"@types/image-blob-reduce": "^4.1.1",
"image-blob-reduce": "^4.1.0",
"jazz-browser": "workspace:0.8.27",
"jazz-tools": "workspace:0.8.27",
"jazz-browser": "workspace:0.8.31",
"jazz-tools": "workspace:0.8.31",
"pica": "^9.0.1",
"typescript": "^5.3.3"
},

View File

@@ -1,5 +1,47 @@
# jazz-browser
## 0.8.31
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
- cojson-storage-indexeddb@0.8.31
- cojson-transport-ws@0.8.31
- jazz-tools@0.8.31
## 0.8.30
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
- cojson-storage-indexeddb@0.8.30
- cojson-transport-ws@0.8.30
- jazz-tools@0.8.30
## 0.8.29
### Patch Changes
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson-transport-ws@0.8.29
- cojson@0.8.29
- cojson-storage-indexeddb@0.8.29
- jazz-tools@0.8.29
## 0.8.28
### Patch Changes
- Updated dependencies [605734c]
- cojson@0.8.28
- cojson-storage-indexeddb@0.8.28
- cojson-transport-ws@0.8.28
- jazz-tools@0.8.28
## 0.8.27
### Patch Changes

View File

@@ -1,16 +1,16 @@
{
"name": "jazz-browser",
"version": "0.8.27",
"version": "0.8.31",
"type": "module",
"main": "dist/index.js",
"types": "src/index.ts",
"license": "MIT",
"dependencies": {
"@scure/bip39": "^1.3.0",
"cojson": "workspace:0.8.27",
"cojson-storage-indexeddb": "workspace:0.8.27",
"cojson-transport-ws": "workspace:0.8.27",
"jazz-tools": "workspace:0.8.27",
"cojson": "workspace:0.8.31",
"cojson-storage-indexeddb": "workspace:0.8.31",
"cojson-transport-ws": "workspace:0.8.31",
"jazz-tools": "workspace:0.8.31",
"typescript": "^5.3.3"
},
"scripts": {

View File

@@ -8,6 +8,19 @@ type StorageData = {
const localStorageKey = "demo-auth-logged-in-secret";
/**
* `BrowserDemoAuth` provides a `JazzAuth` object for demo authentication.
*
* Demo authentication is useful for quickly testing your app, as it allows you to create new accounts and log in as existing ones. The authentication persists across page reloads, but as the data is stored in `localStorage`, it will be lost when the browser is closed.
*
* ```
* import { BrowserDemoAuth } from "jazz-browser";
*
* const auth = new BrowserDemoAuth(driver);
* ```
*
* @category Auth Providers
*/
export class BrowserDemoAuth implements AuthMethod {
constructor(
public driver: BrowserDemoAuth.Driver,
@@ -37,6 +50,9 @@ export class BrowserDemoAuth implements AuthMethod {
}
}
/**
* @returns A `JazzAuth` object
*/
async start() {
if (localStorage["demo-auth-logged-in-secret"]) {
const localStorageData = JSON.parse(
@@ -129,7 +145,7 @@ export class BrowserDemoAuth implements AuthMethod {
}
}
/** @category Auth Providers */
/** @internal */
// eslint-disable-next-line @typescript-eslint/no-namespace
export namespace BrowserDemoAuth {
export interface Driver {

View File

@@ -13,6 +13,17 @@ type LocalStorageData = {
const localStorageKey = "jazz-logged-in-secret";
/**
* `BrowserPasskeyAuth` provides a `JazzAuth` object for passkey authentication.
*
* ```ts
* import { BrowserPasskeyAuth } from "jazz-browser";
*
* const auth = new BrowserPasskeyAuth(driver, appName);
* ```
*
* @category Auth Providers
*/
export class BrowserPasskeyAuth implements AuthMethod {
constructor(
public driver: BrowserPasskeyAuth.Driver,
@@ -29,6 +40,9 @@ export class BrowserPasskeyAuth implements AuthMethod {
this.driver.onError(error);
}
/**
* @returns A `JazzAuth` object
*/
async start(crypto: CryptoProvider): Promise<AuthResult> {
if (localStorage[localStorageKey]) {
const localStorageData = JSON.parse(
@@ -171,7 +185,7 @@ export class BrowserPasskeyAuth implements AuthMethod {
}
}
/** @category Auth Providers */
/** @internal */
// eslint-disable-next-line @typescript-eslint/no-namespace
export namespace BrowserPasskeyAuth {
export interface Driver {

View File

@@ -9,6 +9,17 @@ type LocalStorageData = {
const localStorageKey = "jazz-logged-in-secret";
/**
* `BrowserPassphraseAuth` provides a `JazzAuth` object for passphrase authentication.
*
* ```ts
* import { BrowserPassphraseAuth } from "jazz-browser";
*
* const auth = new BrowserPassphraseAuth(driver, wordlist, appName);
* ```
*
* @category Auth Providers
*/
export class BrowserPassphraseAuth implements AuthMethod {
constructor(
public driver: BrowserPassphraseAuth.Driver,
@@ -18,6 +29,9 @@ export class BrowserPassphraseAuth implements AuthMethod {
public appHostname: string = window.location.hostname,
) {}
/**
* @returns A `JazzAuth` object
*/
async start(crypto: CryptoProvider): Promise<AuthResult> {
if (localStorage[localStorageKey]) {
const localStorageData = JSON.parse(
@@ -121,8 +135,7 @@ export class BrowserPassphraseAuth implements AuthMethod {
}
}
/** @category Auth Providers */
// eslint-disable-next-line @typescript-eslint/no-namespace
/** @internal */
export namespace BrowserPassphraseAuth {
export interface Driver {
onReady: (next: {

View File

@@ -1,4 +1,4 @@
import { LSMStorage, Peer, RawAccountID } from "cojson";
import { LSMStorage, LocalNode, Peer, RawAccountID } from "cojson";
import { IDBStorage } from "cojson-storage-indexeddb";
import {
Account,
@@ -64,12 +64,15 @@ export async function createJazzBrowserContext<Acc extends Account>(
options: BrowserContextOptions<Acc> | BaseBrowserContextOptions,
): Promise<BrowserContext<Acc> | BrowserGuestContext> {
const crypto = options.crypto || (await WasmCrypto.create());
let node: LocalNode | undefined = undefined;
const wsPeer = createWebSocketPeerWithReconnection(
options.peer,
options.reconnectionTimeout,
(peer) => {
node.syncManager.addPeer(peer);
if (node) {
node.syncManager.addPeer(peer);
}
},
);
@@ -106,7 +109,7 @@ export async function createJazzBrowserContext<Acc extends Account>(
peersToLoadFrom,
});
const node =
node =
"account" in context ? context.account._raw.core.node : context.agent.node;
return "account" in context

View File

@@ -1,5 +1,43 @@
# jazz-autosub
## 0.8.31
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
- cojson-transport-ws@0.8.31
- jazz-tools@0.8.31
## 0.8.30
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
- cojson-transport-ws@0.8.30
- jazz-tools@0.8.30
## 0.8.29
### Patch Changes
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson-transport-ws@0.8.29
- cojson@0.8.29
- jazz-tools@0.8.29
## 0.8.28
### Patch Changes
- Updated dependencies [605734c]
- cojson@0.8.28
- cojson-transport-ws@0.8.28
- jazz-tools@0.8.28
## 0.8.27
### Patch Changes

View File

@@ -5,11 +5,11 @@
"types": "src/index.ts",
"type": "module",
"license": "MIT",
"version": "0.8.27",
"version": "0.8.31",
"dependencies": {
"cojson": "workspace:0.8.27",
"cojson-transport-ws": "workspace:0.8.27",
"jazz-tools": "workspace:0.8.27",
"cojson": "workspace:0.8.31",
"cojson-transport-ws": "workspace:0.8.31",
"jazz-tools": "workspace:0.8.31",
"ws": "^8.14.2"
},
"devDependencies": {

View File

@@ -1,5 +1,47 @@
# jazz-browser-media-images
## 0.8.31
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
- jazz-browser-auth-clerk@0.8.31
- jazz-react@0.8.31
- jazz-tools@0.8.31
## 0.8.30
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
- jazz-browser-auth-clerk@0.8.30
- jazz-react@0.8.30
- jazz-tools@0.8.30
## 0.8.29
### Patch Changes
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson@0.8.29
- jazz-browser-auth-clerk@0.8.29
- jazz-react@0.8.29
- jazz-tools@0.8.29
## 0.8.28
### Patch Changes
- Updated dependencies [605734c]
- cojson@0.8.28
- jazz-browser-auth-clerk@0.8.28
- jazz-react@0.8.28
- jazz-tools@0.8.28
## 0.8.27
### Patch Changes

View File

@@ -1,15 +1,15 @@
{
"name": "jazz-react-auth-clerk",
"version": "0.8.27",
"version": "0.8.31",
"type": "module",
"main": "dist/index.js",
"types": "src/index.tsx",
"license": "MIT",
"dependencies": {
"cojson": "workspace:0.8.27",
"jazz-browser-auth-clerk": "workspace:0.8.27",
"jazz-react": "workspace:0.8.27",
"jazz-tools": "workspace:0.8.27"
"cojson": "workspace:0.8.31",
"jazz-browser-auth-clerk": "workspace:0.8.31",
"jazz-react": "workspace:0.8.31",
"jazz-tools": "workspace:0.8.31"
},
"peerDependencies": {
"react": "^18.2.0"

View File

@@ -1,5 +1,29 @@
# jazz-browser-media-images
## 0.8.23
### Patch Changes
- jazz-tools@0.8.31
## 0.8.22
### Patch Changes
- jazz-tools@0.8.30
## 0.8.21
### Patch Changes
- jazz-tools@0.8.29
## 0.8.20
### Patch Changes
- jazz-tools@0.8.28
## 0.8.19
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-react-native-media-images",
"version": "0.8.19",
"version": "0.8.23",
"type": "module",
"main": "dist/index.js",
"types": "src/index.ts",

View File

@@ -1,5 +1,43 @@
# jazz-browser
## 0.8.31
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
- cojson-transport-ws@0.8.31
- jazz-tools@0.8.31
## 0.8.30
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
- cojson-transport-ws@0.8.30
- jazz-tools@0.8.30
## 0.8.29
### Patch Changes
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson-transport-ws@0.8.29
- cojson@0.8.29
- jazz-tools@0.8.29
## 0.8.28
### Patch Changes
- Updated dependencies [605734c]
- cojson@0.8.28
- cojson-transport-ws@0.8.28
- jazz-tools@0.8.28
## 0.8.27
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-react-native",
"version": "0.8.27",
"version": "0.8.31",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",

View File

@@ -1,5 +1,43 @@
# jazz-react
## 0.8.31
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
- jazz-browser@0.8.31
- jazz-tools@0.8.31
## 0.8.30
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
- jazz-browser@0.8.30
- jazz-tools@0.8.30
## 0.8.29
### Patch Changes
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson@0.8.29
- jazz-browser@0.8.29
- jazz-tools@0.8.29
## 0.8.28
### Patch Changes
- Updated dependencies [605734c]
- cojson@0.8.28
- jazz-browser@0.8.28
- jazz-tools@0.8.28
## 0.8.27
### Patch Changes

View File

@@ -1,15 +1,15 @@
{
"name": "jazz-react",
"version": "0.8.27",
"version": "0.8.31",
"type": "module",
"main": "dist/index.js",
"types": "src/index.ts",
"license": "MIT",
"dependencies": {
"@scure/bip39": "^1.3.0",
"cojson": "workspace:0.8.27",
"jazz-browser": "workspace:0.8.27",
"jazz-tools": "workspace:0.8.27"
"cojson": "workspace:0.8.31",
"jazz-browser": "workspace:0.8.31",
"jazz-tools": "workspace:0.8.31"
},
"devDependencies": {
"@types/react": "^18.2.19",

View File

@@ -24,7 +24,16 @@ type DemoAuthState = (
errors: string[];
};
/** @category Auth Providers */
/**
* `useDemoAuth` is a hook that provides a `JazzAuth` object for demo authentication.
*
*
* ```ts
* const [auth, state] = useDemoAuth();
* ```
*
* @category Auth Providers
*/
export function useDemoAuth({
seedAccounts,
}: {

View File

@@ -14,7 +14,16 @@ export type PasskeyAuthState = (
errors: string[];
};
/** @category Auth Providers */
/**
* `usePasskeyAuth` hook provides a `JazzAuth` object for passkey authentication.
*
* @example
* ```ts
* const [auth, state] = usePasskeyAuth({ appName, appHostname });
* ```
*
* @category Auth Providers
*/
export function usePasskeyAuth({
appName,
appHostname,

View File

@@ -17,7 +17,16 @@ export type PassphraseAuthState = (
errors: string[];
};
/** @category Auth Providers */
/**
* `usePassphraseAuth` hook provides a `JazzAuth` object for passphrase authentication.
*
* @example
* ```ts
* const [auth, state] = usePassphraseAuth({ appName, appHostname, wordlist });
* ```
*
* @category Auth Providers
*/
export function usePassphraseAuth({
appName,
appHostname,

View File

@@ -1,5 +1,47 @@
# jazz-run
## 0.8.31
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
- cojson-storage-sqlite@0.8.31
- cojson-transport-ws@0.8.31
- jazz-tools@0.8.31
## 0.8.30
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
- cojson-storage-sqlite@0.8.30
- cojson-transport-ws@0.8.30
- jazz-tools@0.8.30
## 0.8.29
### Patch Changes
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson-transport-ws@0.8.29
- cojson@0.8.29
- cojson-storage-sqlite@0.8.29
- jazz-tools@0.8.29
## 0.8.28
### Patch Changes
- Updated dependencies [605734c]
- cojson@0.8.28
- cojson-storage-sqlite@0.8.28
- cojson-transport-ws@0.8.28
- jazz-tools@0.8.28
## 0.8.27
### Patch Changes

View File

@@ -3,7 +3,7 @@
"bin": "./dist/index.js",
"type": "module",
"license": "MIT",
"version": "0.8.27",
"version": "0.8.31",
"scripts": {
"format-and-lint": "biome check .",
"format-and-lint:fix": "biome check . --write",
@@ -18,11 +18,11 @@
"@effect/printer-ansi": "^0.34.5",
"@effect/schema": "^0.71.1",
"@effect/typeclass": "^0.25.5",
"cojson": "workspace:0.8.27",
"cojson-storage-sqlite": "workspace:0.8.27",
"cojson-transport-ws": "workspace:0.8.27",
"cojson": "workspace:0.8.31",
"cojson-storage-sqlite": "workspace:0.8.31",
"cojson-transport-ws": "workspace:0.8.31",
"effect": "^3.6.5",
"jazz-tools": "workspace:0.8.27",
"jazz-tools": "workspace:0.8.31",
"ws": "^8.14.2"
},
"devDependencies": {

View File

@@ -1,5 +1,35 @@
# jazz-tools
## 0.8.31
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
## 0.8.30
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
## 0.8.29
### Patch Changes
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson@0.8.29
## 0.8.28
### Patch Changes
- Updated dependencies [605734c]
- cojson@0.8.28
## 0.8.27
### Patch Changes

View File

@@ -19,7 +19,7 @@
},
"type": "module",
"license": "MIT",
"version": "0.8.27",
"version": "0.8.31",
"dependencies": {
"cojson": "workspace:*",
"fast-check": "^3.17.2"

Some files were not shown because too many files have changed in this diff Show More