Compare commits

..

4 Commits

Author SHA1 Message Date
Brad Anderson
8a2ca6b07f fix: got to no zod errors 2025-05-20 13:31:06 -04:00
Brad Anderson
adb64bcbed chore: zod test before any RN rendering 2025-05-20 00:07:43 -04:00
Brad Anderson
69ba1f9348 chore: metro & babel changes 2025-05-20 00:03:15 -04:00
Brad Anderson
3e48c75cbf chore: fix zod dep across monorepo 2025-05-19 23:58:27 -04:00
452 changed files with 17803 additions and 36141 deletions

View File

@@ -2,8 +2,8 @@
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"linked": [],
"fixed": [
"fixed": [],
"linked": [
[
"cojson",
"cojson-storage",
@@ -27,8 +27,6 @@
"jazz-react-native-core",
"jazz-react-native",
"jazz-react-native-media-images",
"jazz-richtext-prosemirror",
"jazz-richtext-tiptap",
"jazz-run",
"jazz-svelte",
"jazz-tools",

View File

@@ -38,6 +38,7 @@ jobs:
- name: chat-rn-expo App Pre Build
working-directory: ./examples/chat-rn-expo
run: |
pnpm build
pnpm expo prebuild --clean
- name: Install Maestro

View File

@@ -1,46 +0,0 @@
name: Playwright Tests
on:
push:
branches: ["main"]
pull_request:
types: [opened, synchronize, reopened]
jobs:
test:
timeout-minutes: 60
runs-on: blacksmith-4vcpu-ubuntu-2204
strategy:
matrix:
project: ["homepage/homepage"]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Source Code
uses: ./.github/actions/source-code/
- name: Install project dependencies
run: pnpm install
working-directory: ./${{ matrix.project }}
- name: Pnpm Build
run: pnpm turbo build
working-directory: ./${{ matrix.project }}
- name: Install Playwright Browsers
run: pnpm exec playwright install
working-directory: ./${{ matrix.project }}
- name: Run Playwright tests
run: pnpm exec playwright test
working-directory: ./${{ matrix.project }}
- uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ hashFiles(format('{0}/package.json', matrix.project)) }}-playwright-report
path: ./${{ matrix.project }}/playwright-report/
retention-days: 30

3
.gitignore vendored
View File

@@ -20,9 +20,6 @@ __screenshots__
# Playwright
test-results
# Java
.java-version
.husky
.vscode/*

View File

@@ -64,7 +64,7 @@
}
},
{
"include": ["**/tests/**"],
"include": ["packages/**/src/tests/**"],
"linter": {
"rules": {
"correctness": {

View File

@@ -1,222 +1,5 @@
# betterauth
## 0.1.24
### Patch Changes
- Updated dependencies [e7e505e]
- Updated dependencies [13b57aa]
- Updated dependencies [5662faa]
- Updated dependencies [2116a59]
- jazz-tools@0.14.21
- jazz-betterauth-server-plugin@0.14.21
- jazz-inspector@0.14.21
- jazz-react@0.14.21
- jazz-react-auth-betterauth@0.14.21
- jazz-betterauth-client-plugin@0.14.21
## 0.1.23
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-betterauth-server-plugin@0.14.20
- jazz-inspector@0.14.20
- jazz-react@0.14.20
- jazz-react-auth-betterauth@0.14.20
- jazz-betterauth-client-plugin@0.14.20
## 0.1.22
### Patch Changes
- jazz-betterauth-client-plugin@0.14.19
- jazz-betterauth-server-plugin@0.14.19
- jazz-react-auth-betterauth@0.14.19
- jazz-inspector@0.14.19
- jazz-react@0.14.19
- jazz-tools@0.14.19
## 0.1.21
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-betterauth-server-plugin@0.14.18
- jazz-inspector@0.14.18
- jazz-react@0.14.18
- jazz-react-auth-betterauth@0.14.18
- jazz-betterauth-client-plugin@0.14.18
## 0.1.20
### Patch Changes
- Updated dependencies [e512df4]
- jazz-betterauth-server-plugin@0.14.17
- jazz-tools@0.14.17
- jazz-betterauth-client-plugin@0.14.17
- jazz-inspector@0.14.17
- jazz-react@0.14.17
- jazz-react-auth-betterauth@0.14.17
## 0.1.19
### Patch Changes
- jazz-betterauth-server-plugin@0.14.16
- jazz-inspector@0.14.16
- jazz-react@0.14.16
- jazz-react-auth-betterauth@0.14.16
- jazz-tools@0.14.16
- jazz-betterauth-client-plugin@0.14.16
## 0.1.18
### Patch Changes
- Updated dependencies [f9590f9]
- jazz-react@0.14.15
- jazz-betterauth-server-plugin@0.14.15
- jazz-inspector@0.14.15
- jazz-react-auth-betterauth@0.14.15
- jazz-tools@0.14.15
- jazz-betterauth-client-plugin@0.14.15
## 0.1.17
### Patch Changes
- Updated dependencies [e32a1f7]
- jazz-tools@0.14.14
- jazz-betterauth-server-plugin@0.14.14
- jazz-inspector@0.14.14
- jazz-react@0.14.14
- jazz-react-auth-betterauth@0.14.14
- jazz-betterauth-client-plugin@0.14.14
## 0.1.16
### Patch Changes
- jazz-inspector@0.14.13
- jazz-react@0.14.13
- jazz-react-auth-betterauth@0.14.13
## 0.1.15
### Patch Changes
- jazz-inspector@0.14.12
- jazz-react@0.14.12
- jazz-react-auth-betterauth@0.14.12
## 0.1.14
### Patch Changes
- Updated dependencies [dc746a2]
- Updated dependencies [f869d9a]
- Updated dependencies [3fe6832]
- jazz-react-auth-betterauth@0.14.10
- jazz-inspector@0.14.10
- jazz-react@0.14.10
- jazz-tools@0.14.10
- jazz-betterauth-server-plugin@0.14.10
- jazz-betterauth-client-plugin@0.14.10
## 0.1.13
### Patch Changes
- Updated dependencies [22c2600]
- jazz-tools@0.14.9
- jazz-betterauth-server-plugin@0.14.9
- jazz-inspector@0.14.9
- jazz-react@0.14.9
- jazz-react-auth-betterauth@0.14.9
- jazz-betterauth-client-plugin@0.14.9
## 0.1.12
### Patch Changes
- Updated dependencies [637ae13]
- jazz-tools@0.14.8
- jazz-betterauth-server-plugin@0.14.8
- jazz-inspector@0.14.8
- jazz-react@0.14.8
- jazz-react-auth-betterauth@0.14.8
- jazz-betterauth-client-plugin@0.14.8
## 0.1.11
### Patch Changes
- Updated dependencies [365b0ea]
- jazz-tools@0.14.7
- jazz-betterauth-server-plugin@0.14.7
- jazz-inspector@0.14.7
- jazz-react@0.14.7
- jazz-react-auth-betterauth@0.14.7
- jazz-betterauth-client-plugin@0.14.7
## 0.1.10
### Patch Changes
- Updated dependencies [9d6d9fe]
- Updated dependencies [9d6d9fe]
- jazz-tools@0.14.6
- jazz-betterauth-server-plugin@0.14.6
- jazz-inspector@0.14.6
- jazz-react@0.14.6
- jazz-react-auth-betterauth@0.14.6
- jazz-betterauth-client-plugin@0.14.6
## 0.1.9
### Patch Changes
- Updated dependencies [91cbb2f]
- Updated dependencies [20b3d88]
- jazz-tools@0.14.5
- jazz-betterauth-server-plugin@0.14.5
- jazz-inspector@0.14.5
- jazz-react@0.14.5
- jazz-react-auth-betterauth@0.14.5
- jazz-betterauth-client-plugin@0.14.5
## 0.1.8
### Patch Changes
- Updated dependencies [011af55]
- jazz-tools@0.14.4
- jazz-betterauth-server-plugin@0.14.4
- jazz-inspector@0.14.4
- jazz-react@0.14.4
- jazz-react-auth-betterauth@0.14.4
- jazz-betterauth-client-plugin@0.14.4
## 0.1.7
### Patch Changes
- Updated dependencies [3d1027f]
- Updated dependencies [c240eed]
- jazz-tools@0.14.2
- jazz-betterauth-server-plugin@0.14.2
- jazz-inspector@0.14.2
- jazz-react@0.14.2
- jazz-react-auth-betterauth@0.14.2
- jazz-betterauth-client-plugin@0.14.2
## 0.1.6
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "betterauth",
"version": "0.1.24",
"version": "0.1.6",
"private": true,
"type": "module",
"scripts": {

View File

@@ -1,178 +1,5 @@
# chat-rn-expo-clerk
## 1.0.144
### Patch Changes
- Updated dependencies [e7e505e]
- Updated dependencies [cfb6786]
- Updated dependencies [13b57aa]
- Updated dependencies [5662faa]
- Updated dependencies [2116a59]
- jazz-tools@0.14.21
- jazz-expo@0.14.21
- jazz-react-native-media-images@0.14.21
## 1.0.143
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-expo@0.14.20
- jazz-react-native-media-images@0.14.20
## 1.0.142
### Patch Changes
- Updated dependencies [061ec99]
- jazz-expo@0.14.19
- jazz-react-native-media-images@0.14.19
- jazz-tools@0.14.19
## 1.0.141
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-expo@0.14.18
- jazz-react-native-media-images@0.14.18
## 1.0.140
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-expo@0.14.17
- jazz-react-native-media-images@0.14.17
## 1.0.139
### Patch Changes
- jazz-expo@0.14.16
- jazz-tools@0.14.16
- jazz-react-native-media-images@0.14.16
## 1.0.138
### Patch Changes
- jazz-expo@0.14.15
- jazz-tools@0.14.15
- jazz-react-native-media-images@0.14.15
## 1.0.137
### Patch Changes
- Updated dependencies [e32a1f7]
- jazz-tools@0.14.14
- jazz-expo@0.14.14
- jazz-react-native-media-images@0.14.14
## 1.0.136
### Patch Changes
- jazz-expo@0.14.13
## 1.0.135
### Patch Changes
- jazz-expo@0.14.12
## 1.0.134
### Patch Changes
- Updated dependencies [98d697f]
- jazz-expo@0.14.11
## 1.0.133
### Patch Changes
- Updated dependencies [dc746a2]
- Updated dependencies [f869d9a]
- Updated dependencies [3fe6832]
- jazz-react-native-media-images@0.14.10
- jazz-tools@0.14.10
- jazz-expo@0.14.10
## 1.0.132
### Patch Changes
- Updated dependencies [22c2600]
- jazz-tools@0.14.9
- jazz-expo@0.14.9
- jazz-react-native-media-images@0.14.9
## 1.0.131
### Patch Changes
- Updated dependencies [637ae13]
- jazz-tools@0.14.8
- jazz-expo@0.14.8
- jazz-react-native-media-images@0.14.8
## 1.0.130
### Patch Changes
- Updated dependencies [365b0ea]
- jazz-tools@0.14.7
- jazz-expo@0.14.7
- jazz-react-native-media-images@0.14.7
## 1.0.129
### Patch Changes
- Updated dependencies [9d6d9fe]
- Updated dependencies [9d6d9fe]
- jazz-tools@0.14.6
- jazz-expo@0.14.6
- jazz-react-native-media-images@0.14.6
## 1.0.128
### Patch Changes
- Updated dependencies [91cbb2f]
- Updated dependencies [20b3d88]
- jazz-tools@0.14.5
- jazz-expo@0.14.5
- jazz-react-native-media-images@0.14.5
## 1.0.127
### Patch Changes
- Updated dependencies [011af55]
- jazz-tools@0.14.4
- jazz-expo@0.14.4
- jazz-react-native-media-images@0.14.4
## 1.0.126
### Patch Changes
- Updated dependencies [3d1027f]
- Updated dependencies [c240eed]
- jazz-tools@0.14.2
- jazz-expo@0.14.2
- jazz-react-native-media-images@0.14.2
## 1.0.125
### Patch Changes

View File

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

View File

@@ -7,10 +7,8 @@ node_modules/
.expo/
dist/
web-build/
expo-env.d.ts
# Native
.kotlin/
*.orig.*
*.jks
*.p8
@@ -35,5 +33,6 @@ yarn-error.*
# typescript
*.tsbuildinfo
android/
ios/
ios
android

View File

@@ -1,99 +1,934 @@
# chat-rn-expo
## 1.0.112
### Patch Changes
- Updated dependencies [cdfc105]
- jazz-tools@0.14.1
- jazz-expo@0.14.1
## 1.0.111
### Patch Changes
- Updated dependencies [5835ed1]
- jazz-tools@0.14.0
- jazz-expo@0.14.0
## 1.0.110
### Patch Changes
- jazz-expo@0.13.32
## 1.0.109
### Patch Changes
- Updated dependencies [e5b170f]
- jazz-tools@0.13.31
- jazz-expo@0.13.31
## 1.0.108
### Patch Changes
- jazz-expo@0.13.30
- jazz-tools@0.13.30
## 1.0.107
### Patch Changes
- jazz-expo@0.13.29
- jazz-tools@0.13.29
## 1.0.106
### Patch Changes
- jazz-expo@0.13.28
- jazz-tools@0.13.28
## 1.0.105
### Patch Changes
- jazz-expo@0.13.27
- jazz-tools@0.13.27
## 1.0.104
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-expo@0.13.26
## 1.0.103
### Patch Changes
- jazz-expo@0.13.25
- jazz-tools@0.13.25
## 1.0.102
### Patch Changes
- Updated dependencies [02a240c]
- jazz-tools@0.13.23
- jazz-expo@0.13.23
## 1.0.101
### Patch Changes
- jazz-expo@0.13.22
## 1.0.100
### Patch Changes
- jazz-expo@0.13.21
- jazz-tools@0.13.21
## 1.0.99
### Patch Changes
- Updated dependencies [439f0fe]
- jazz-tools@0.13.20
- jazz-expo@0.13.20
## 1.0.98
### Patch Changes
- Updated dependencies [80530a4]
- jazz-tools@0.13.19
- jazz-expo@0.13.19
## 1.0.97
### Patch Changes
- Updated dependencies [761759c]
- jazz-tools@0.13.18
- jazz-expo@0.13.18
## 1.0.96
### Patch Changes
- jazz-expo@0.13.17
- jazz-tools@0.13.17
## 1.0.95
### Patch Changes
- jazz-expo@0.13.16
- jazz-tools@0.13.16
## 1.0.94
### Patch Changes
- jazz-expo@0.13.15
- jazz-tools@0.13.15
## 1.0.93
### Patch Changes
- Updated dependencies [bd94012]
- jazz-expo@0.13.14
- jazz-tools@0.13.14
## 1.0.92
### Patch Changes
- jazz-expo@0.13.13
- jazz-tools@0.13.13
## 1.0.91
### Patch Changes
- Updated dependencies [4547525]
- jazz-tools@0.13.12
- jazz-expo@0.13.12
## 1.0.90
### Patch Changes
- Updated dependencies [17273a6]
- jazz-tools@0.13.11
- jazz-expo@0.13.11
## 1.0.89
### Patch Changes
- jazz-expo@0.13.10
- jazz-tools@0.13.10
## 1.0.88
### Patch Changes
- Updated dependencies [a6cf01f]
- jazz-tools@0.13.9
- jazz-expo@0.13.9
## 1.0.87
### Patch Changes
- jazz-expo@0.13.8
## 1.0.86
### Patch Changes
- Updated dependencies [bc3d7bb]
- jazz-tools@0.13.7
- jazz-expo@0.13.7
## 1.0.85
### Patch Changes
- Updated dependencies [fe6f561]
- jazz-tools@0.13.5
- jazz-expo@0.13.5
## 1.0.84
### Patch Changes
- Updated dependencies [3129982]
- Updated dependencies [3129982]
- jazz-expo@0.13.4
- jazz-tools@0.13.4
## 1.0.83
### Patch Changes
- Updated dependencies [12f8bfa]
- Updated dependencies [bd57177]
- jazz-tools@0.13.3
- jazz-expo@0.13.3
## 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
- jazz-react-native@0.12.1
- jazz-tools@0.12.1
## 1.0.86
### Patch Changes
- Updated dependencies [01523dc]
- Updated dependencies [4ea87dc]
- Updated dependencies [1e6da19]
- Updated dependencies [b6c6a0a]
- jazz-tools@0.12.0
- jazz-react-native@0.12.0
## 1.0.85
### Patch Changes
- jazz-react-native@0.11.8
- jazz-tools@0.11.8
## 1.0.84
### Patch Changes
- Updated dependencies [a140f55]
- Updated dependencies [2b0d1b0]
- jazz-tools@0.11.7
- jazz-react-native@0.11.7
## 1.0.83
### Patch Changes
- Updated dependencies [e7c85b7]
- jazz-react-native@0.11.6
- jazz-tools@0.11.6
## 1.0.82
### Patch Changes
- jazz-react-native@0.11.5
- jazz-tools@0.11.5
## 1.0.81
### Patch Changes
- Updated dependencies [57a3dbe]
- Updated dependencies [a717754]
- Updated dependencies [a91f343]
- jazz-tools@0.11.4
- jazz-react-native@0.11.4
## 1.0.80
### Patch Changes
- jazz-react-native@0.11.3
- jazz-tools@0.11.3
## 1.0.79
### Patch Changes
- Updated dependencies [6892dc6]
- jazz-tools@0.11.2
- jazz-react-native@0.11.2
## 1.0.78
### Patch Changes
- jazz-react-native@0.11.1
## 1.0.77
### Patch Changes
- Updated dependencies [6a96d8b]
- Updated dependencies [a35249a]
- Updated dependencies [b9d194a]
- Updated dependencies [a4713df]
- Updated dependencies [34cbdc3]
- Updated dependencies [f039e8f]
- Updated dependencies [e22de9f]
- jazz-tools@0.11.0
- jazz-react-native@0.11.0
## 1.0.76
### Patch Changes
- Updated dependencies [2f99de0]
- jazz-tools@0.10.15
- jazz-react-native@0.10.15
## 1.0.75
### Patch Changes
- Updated dependencies [75211e3]
- jazz-tools@0.10.14
- jazz-react-native@0.10.14
## 1.0.74
### Patch Changes
- Updated dependencies [07feedd]
- jazz-tools@0.10.13
- jazz-react-native@0.10.13
## 1.0.73
### Patch Changes
- Updated dependencies [4612e05]
- jazz-tools@0.10.12
- jazz-react-native@0.10.12
## 1.0.72
### Patch Changes
- Updated dependencies [5a54e4a]
- jazz-react-native@0.10.11
## 1.0.71
### Patch Changes
- Updated dependencies [3405d8f]
- jazz-react-native@0.10.10
## 1.0.70
### Patch Changes
- Updated dependencies [2fb6428]
- jazz-tools@0.10.8
- jazz-react-native@0.10.8
## 1.0.69
### Patch Changes
- Updated dependencies [1136d9b]
- Updated dependencies [0eed228]
- jazz-react-native@0.10.7
- jazz-tools@0.10.7
## 1.0.68
### Patch Changes
- Updated dependencies [ada802b]
- jazz-tools@0.10.6
- jazz-react-native@0.10.6
## 1.0.67
### Patch Changes
- Updated dependencies [59ff77e]
- jazz-tools@0.10.5
- jazz-react-native@0.10.5
## 1.0.66
### Patch Changes
- jazz-react-native@0.10.4
- jazz-tools@0.10.4
## 1.0.65
### Patch Changes
- Updated dependencies [d8582fc]
- jazz-tools@0.10.3
- jazz-react-native@0.10.3
## 1.0.64
### Patch Changes
- jazz-react-native@0.10.2
- jazz-tools@0.10.2
## 1.0.63
### Patch Changes
- Updated dependencies [5a63cba]
- jazz-tools@0.10.1
- jazz-react-native@0.10.1
## 1.0.62
### Patch Changes
- Updated dependencies [498954f]
- Updated dependencies [d42c2aa]
- Updated dependencies [dd03464]
- Updated dependencies [b426342]
- jazz-react-native@0.10.0
- jazz-tools@0.10.0
## 1.0.61
### Patch Changes
- jazz-react-native@0.9.23
- jazz-tools@0.9.23
## 1.0.60
### Patch Changes
- jazz-react-native@0.9.22
## 1.0.59
### Patch Changes
- Updated dependencies [1be017d]
- jazz-tools@0.9.21
- jazz-react-native@0.9.21
## 1.0.58
### Patch Changes
- Updated dependencies [b01cc1f]
- jazz-tools@0.9.20
- jazz-react-native@0.9.20
## 1.0.57
### Patch Changes
- jazz-react-native@0.9.19
- jazz-tools@0.9.19
## 1.0.56
### Patch Changes
- jazz-react-native@0.9.18
- jazz-tools@0.9.18
## 1.0.55
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-react-native@0.9.17
## 1.0.54
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
- jazz-react-native@0.9.16
## 1.0.53
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-react-native@0.9.15
## 1.0.52
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-react-native@0.9.14
## 1.0.51
### Patch Changes
- jazz-react-native@0.9.13
- jazz-tools@0.9.13
## 1.0.50
### Patch Changes
- jazz-react-native@0.9.12
- jazz-tools@0.9.12
## 1.0.49
### Patch Changes
- jazz-react-native@0.9.11
- jazz-tools@0.9.11
## 1.0.48
### Patch Changes
- Updated dependencies [f76274c]
- Updated dependencies [5e83864]
- jazz-react-native@0.9.10
- jazz-tools@0.9.10
## 1.0.47
### Patch Changes
- Updated dependencies [8eb9247]
- jazz-tools@0.9.9
- jazz-react-native@0.9.9
## 1.0.46
### Patch Changes
- Updated dependencies [d1d773b]
- jazz-tools@0.9.8
- jazz-react-native@0.9.8
## 1.0.45
### Patch Changes
- Updated dependencies [8a390d2]
- jazz-react-native@0.9.6
## 1.0.44
### Patch Changes
- Updated dependencies [c871912]
- jazz-react-native@0.9.5
## 1.0.43
### Patch Changes
- jazz-react-native@0.9.4
## 1.0.42
### Patch Changes
- Updated dependencies [7cd691f]
- jazz-react-native@0.9.3
## 1.0.41
### Patch Changes
- Updated dependencies [80fd3e9]
- jazz-react-native@0.9.2
## 1.0.40
### Patch Changes
- Updated dependencies [1b71969]
- jazz-tools@0.9.1
- jazz-react-native@0.9.1
## 1.0.39
### Patch Changes
- Updated dependencies [1da4d55]
- Updated dependencies [8eda792]
- Updated dependencies [1e5e3a1]
- jazz-react-native@0.9.0
- jazz-tools@0.9.0
## 1.0.38
### Patch Changes
- Updated dependencies [dc62b95]
- Updated dependencies [1de26f8]
- jazz-tools@0.8.51
- jazz-react-native@0.8.51
## 1.0.37
### Patch Changes
- jazz-react-native@0.8.50
- jazz-tools@0.8.50
## 1.0.36
### Patch Changes
- jazz-react-native@0.8.49
- jazz-tools@0.8.49
## 1.0.35
### Patch Changes
- Updated dependencies [635e824]
- Updated dependencies [0a85982]
- jazz-tools@0.8.48
- jazz-react-native@0.8.48
## 1.0.34
### Patch Changes
- Updated dependencies [33ef9c4]
- jazz-react-native@0.8.47
## 1.0.33
### Patch Changes
- Updated dependencies [ab4ffbd]
- jazz-react-native@0.8.46
## 1.0.32
### Patch Changes
- Updated dependencies [7701307]
- Updated dependencies [fa41f8e]
- Updated dependencies [88d7d9a]
- Updated dependencies [60e35ea]
- jazz-react-native@0.8.45
- jazz-tools@0.8.45
## 1.0.31
### Patch Changes
- jazz-react-native@0.8.44
- jazz-tools@0.8.44
## 1.0.30
### Patch Changes
- jazz-react-native@0.8.41
- jazz-tools@0.8.41
## 1.0.29
### Patch Changes
- Updated dependencies [0c6b0f3]
- Updated dependencies [249eecb]
- jazz-react-native@0.8.39
- jazz-tools@0.8.39
## 1.0.28
### Patch Changes
- jazz-react-native@0.8.38
- jazz-tools@0.8.38
## 1.0.27
### Patch Changes
- jazz-react-native@0.8.37
- jazz-tools@0.8.37
## 1.0.26
### Patch Changes
- Updated dependencies [c84764a]
- Updated dependencies [441fe27]
- jazz-react-native@0.8.36
- jazz-tools@0.8.36
## 1.0.25
### Patch Changes
- Updated dependencies [8b87117]
- jazz-tools@0.8.35
- jazz-react-native@0.8.35
## 1.0.24
### Patch Changes
- jazz-react-native@0.8.34
- jazz-tools@0.8.34
## 1.0.23
### Patch Changes
- Updated dependencies [df42b2b]
- jazz-tools@0.8.32
- jazz-react-native@0.8.32
## 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
- jazz-react-native@0.8.27
- jazz-tools@0.8.27
## 1.0.17
### Patch Changes
- Updated dependencies [d348c2d]
- Updated dependencies [6902b5b]
- Updated dependencies [1a0cd3d]
- jazz-tools@0.8.23
- jazz-react-native@0.8.23
## 1.0.16
### Patch Changes
- Updated dependencies [149ca97]
- jazz-tools@0.8.21
- jazz-react-native@0.8.21
## 1.0.15
### Patch Changes
- Updated dependencies [3ef3ff3]
- jazz-react-native@0.8.20
## 1.0.14
### Patch Changes
- jazz-react-native@0.8.19
- jazz-tools@0.8.19
## 1.0.13
### Patch Changes
- jazz-react-native@0.8.18
- jazz-tools@0.8.18
## 1.0.12
### Patch Changes
- Updated dependencies [e7e505e]
- Updated dependencies [cfb6786]
- Updated dependencies [13b57aa]
- Updated dependencies [5662faa]
- Updated dependencies [2116a59]
- jazz-tools@0.14.21
- jazz-expo@0.14.21
- jazz-react-native@0.8.17
- jazz-tools@0.8.17
## 1.0.11
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-expo@0.14.20
- jazz-react-native@0.8.16
- jazz-tools@0.8.16
## 1.0.10
### Patch Changes
- Updated dependencies [061ec99]
- jazz-expo@0.14.19
- jazz-tools@0.14.19
- Updated dependencies [cce679b]
- jazz-tools@0.8.15
- jazz-react-native@0.8.15
## 1.0.9
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-expo@0.14.18
- Updated dependencies [36273b3]
- jazz-tools@0.8.14
- jazz-react-native@0.8.14
## 1.0.8
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-expo@0.14.17
- Updated dependencies [fd011d7]
- jazz-tools@0.8.13
- jazz-react-native@0.8.13
## 1.0.7
### Patch Changes
- jazz-expo@0.14.16
- jazz-tools@0.14.16
- jazz-react-native@0.8.12
- jazz-tools@0.8.12
## 1.0.6
### Patch Changes
- jazz-expo@0.14.15
- jazz-tools@0.14.15
- jazz-react-native@0.8.11
- jazz-tools@0.8.11
## 1.0.5
### Patch Changes
- Updated dependencies [e32a1f7]
- jazz-tools@0.14.14
- jazz-expo@0.14.14
- b7639cf: feat(react-native): replaced react-native-mmkv with expo-secure-store and initialize it by default as kvStore in createJazzRNApp() (BREAKING)
- Updated dependencies [b7639cf]
- jazz-react-native@0.8.8
## 1.0.4
### Patch Changes
- jazz-expo@0.14.13
- Updated dependencies [32b05b6]
- jazz-react-native@0.8.7
## 1.0.3
### Patch Changes
- jazz-expo@0.14.12
- jazz-react-native@0.8.6
## 1.0.2
### Patch Changes
- Updated dependencies [98d697f]
- jazz-expo@0.14.11
- Updated dependencies [c3f4e6b]
- Updated dependencies [d9152ed]
- jazz-react-native@0.8.5
- jazz-tools@0.8.5
## 1.0.1
### Patch Changes
- Updated dependencies [dc746a2]
- Updated dependencies [f869d9a]
- Updated dependencies [3fe6832]
- jazz-tools@0.14.10
- jazz-expo@0.14.10
- Updated dependencies
- jazz-react-native@0.8.3
- jazz-tools@0.8.3

View File

@@ -0,0 +1,24 @@
# 🎷 Jazz + Expo + `react-navigation` + Demo Auth
## 🚀 How to Run
### 1. Inside the Workspace Root
First, install dependencies and build the project:
```bash
pnpm i
pnpm run build
```
### 2. Inside the `examples/chat-rn-expo` Directory
Next, navigate to the specific example project and run the following commands:
```bash
pnpm expo prebuild
pnpx pod-install
pnpm expo run:ios
```
This will set up and launch the app on iOS. For Android, you can replace the last command with `pnpm expo run:android`.

View File

@@ -0,0 +1,55 @@
const { withBuildProperties } = require("expo-build-properties");
const { withDangerousMod } = require("@expo/config-plugins");
const fs = require("fs/promises");
const path = require("path");
/**
* https://github.com/mrousavy/nitro/issues/422#issuecomment-2545988256
*/
function withCustomIosMod(config) {
// Use expo-build-properties to bump iOS deployment target
config = withBuildProperties(config, { ios: { deploymentTarget: "16.0" } });
// Patch the generated Podfile fallback to ensure platform is always 16.0
config = withDangerousMod(config, [
"ios",
async (modConfig) => {
const podfilePath = path.join(
modConfig.modRequest.platformProjectRoot,
"Podfile",
);
let contents = await fs.readFile(podfilePath, "utf-8");
// Check if the IPHONEOS_DEPLOYMENT_TARGET setting is already present
// We search for the key being assigned, e.g., config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] =
const deploymentTargetSettingExists =
/\.build_settings\s*\[\s*['"]IPHONEOS_DEPLOYMENT_TARGET['"]\s*\]\s*=/.test(
contents,
);
if (!deploymentTargetSettingExists) {
// IPHONEOS_DEPLOYMENT_TARGET setting not found, proceed to add it.
contents = contents.replace(
/(post_install\s+do\s+\|installer\|[\s\S]*?)(\r?\n\s end\s*)$/m,
`$1
# Expo Build Properties: force deployment target
# https://github.com/mrousavy/nitro/issues/422#issuecomment-2545988256
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'
end
end
$2`,
);
}
await fs.writeFile(podfilePath, contents);
return modConfig;
},
]);
return config;
}
module.exports = ({ config }) => {
return withCustomIosMod(config);
};

View File

@@ -1,32 +1,39 @@
{
"expo": {
"name": "chat-rn-expo",
"slug": "chat-rn-expo",
"name": "jazz-chat-rn-expo",
"scheme": "jazz-chat-rn-expo",
"slug": "jazz-chat-rn-expo",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"newArchEnabled": true,
"splash": {
"image": "./assets/splash-icon.png",
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"ios": {
"supportsTablet": true,
"bundleIdentifier": "tools.jazz.chatrnexpo"
"bundleIdentifier": "com.jazz.chatrn"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"edgeToEdgeEnabled": true,
"package": "tools.jazz.chatrnexpo"
"package": "com.jazz.chatrn"
},
"web": {
"favicon": "./assets/favicon.png"
"plugins": [
"expo-secure-store",
"expo-sqlite",
"expo-build-properties",
"expo-web-browser"
],
"extra": {
"eas": {
"projectId": "e0e61872-1906-4c84-b9d8-9be77355cad0"
}
},
"plugins": ["expo-secure-store", "expo-sqlite"]
"owner": "paxx"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -0,0 +1,81 @@
// Custom Babel plugin to transform Zod's dynamic class generation
// This makes it more compatible with Hermes
module.exports = function (babel) {
const { types: t } = babel;
return {
name: "transform-zod-multi-fixes",
visitor: {
FunctionDeclaration(path) {
// Part 1: Target Zod's $constructor function
if (path.node.id?.name === "$constructor") {
path.traverse({
CallExpression(callPath) {
const { node } = callPath;
const callee = node.callee;
if (
t.isMemberExpression(callee) &&
t.isIdentifier(callee.object, { name: "Object" }) &&
t.isIdentifier(callee.property, { name: "defineProperty" }) &&
node.arguments.length >= 3 &&
t.isIdentifier(node.arguments[0]) &&
node.arguments[0].name === "_" &&
t.isStringLiteral(node.arguments[1], { value: "name" })
) {
callPath.remove();
}
},
ClassDeclaration(classPath) {
// Ensure we're targeting the class '_' inside $constructor
if (classPath.node.id?.name === "_") {
classPath.traverse({
ClassMethod(methodPath) {
const { node: methodNode } = methodPath; // Renamed to avoid conflict with outer 'node'
if (
methodNode.static &&
methodNode.computed &&
t.isMemberExpression(methodNode.key) &&
t.isIdentifier(methodNode.key.object, {
name: "Symbol",
}) &&
t.isIdentifier(methodNode.key.property, {
name: "hasInstance",
})
) {
methodPath.remove();
}
},
});
}
},
});
}
// Part 2: Target Zod's setFunctionName utility (Temporarily Disabled)
/* if (path.node.id?.name === 'setFunctionName') {
const fnParam = path.node.params[0]; // First parameter, typically 'fn'
if (fnParam && t.isIdentifier(fnParam)) {
const fnParamName = fnParam.name;
path.traverse({
CallExpression(callPath) {
const { node } = callPath;
const callee = node.callee;
if (
t.isMemberExpression(callee) &&
t.isIdentifier(callee.object, { name: 'Object' }) &&
t.isIdentifier(callee.property, { name: 'defineProperty' }) &&
node.arguments.length >= 3 &&
t.isIdentifier(node.arguments[0], { name: fnParamName }) && // Target is the 'fn' param
t.isStringLiteral(node.arguments[1], { value: 'name' })
) {
callPath.remove();
}
}
});
}
} */
},
},
};
};

View File

@@ -0,0 +1,20 @@
module.exports = function (api) {
api.cache(true);
return {
presets: [
[
"babel-preset-expo",
{
"@babel/plugin-transform-classes": {
loose: false,
},
},
],
],
plugins: [
// Custom Zod transformer
"./babel-plugin-transform-zod.js",
],
};
};

View File

@@ -0,0 +1,27 @@
{
"cli": {
"version": ">= 12.5.1",
"appVersionSource": "remote"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"ios-simulator": {
"extends": "development",
"ios": {
"simulator": true
}
},
"preview": {
"distribution": "internal"
},
"production": {
"autoIncrement": true
}
},
"submit": {
"production": {}
}
}

View File

@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

View File

@@ -0,0 +1,20 @@
// // --- Zod Test Block ---
// import { z } from "zod/v4";
// try {
// console.log("Attempting Zod operation in index.js...");
// const schema = z.string();
// const result = schema.parse("test");
// console.log("Zod operation in index.js successful:", result);
// } catch (e) {
// console.error("Zod operation in index.js FAILED:");
// console.error(e.stack || e);
// // Optionally, re-throw to ensure it's visible if it doesn't crash already
// // throw e;
// }
// // --- End Zod Test Block ---
import "./polyfills";
import { registerRootComponent } from "expo";
import App from "./src/App";
registerRootComponent(App);

View File

@@ -1,9 +0,0 @@
import { registerRootComponent } from "expo";
import "./polyfills";
import App from "./src/App";
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
// It also ensures that whether you load the app in Expo Go or in a native build,
// the environment is set up appropriately
registerRootComponent(App);

View File

@@ -0,0 +1,57 @@
// Learn more https://docs.expo.dev/guides/monorepos
const { getDefaultConfig } = require("expo/metro-config");
const { withNativeWind } = require("nativewind/metro");
const { FileStore } = require("metro-cache");
const path = require("path");
// eslint-disable-next-line no-undef
const projectRoot = __dirname;
const workspaceRoot = path.resolve(projectRoot, "../..");
const config = getDefaultConfig(projectRoot, { isCSSEnabled: true });
// Since we are using pnpm, we have to setup the monorepo manually for Metro
// #1 - Watch all files in the monorepo
config.watchFolders = [workspaceRoot];
// #2 - Try resolving with project modules first, then workspace modules
config.resolver.nodeModulesPaths = [
path.resolve(projectRoot, "node_modules"),
path.resolve(workspaceRoot, "node_modules"),
];
config.resolver.sourceExts = ["mjs", "js", "json", "ts", "tsx"];
// even though this is true by default, it seems to help zod
// TODO: revisit if we find a smoking gun, and remove if we can
config.resolver.unstable_enablePackageExports = true;
config.resolver.requireCycleIgnorePatterns = [
/(^|\/|\\)node_modules($|\/|\\)/,
/(^|\/|\\)packages($|\/|\\)/,
];
// --- START: Added/Modified section to transpile Zod ---
// Ensure Zod is transformed by Babel along with other necessary React Native packages.
// The pattern below is a common one, with 'zod' added to the list of packages
// that SHOULD be transformed (i.e., not ignored by the transformer).
config.transformer = {
...config.transformer, // Preserve existing transformer settings if any from getDefaultConfig
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true, // Recommended for React Native for performance
},
}),
// This pattern tells Metro to transform Zod and other common RN/Expo packages.
transformIgnorePatterns: [
"node_modules/(?!(react-native|@react-native|@react-native-community|expo|@expo|zod)/)",
],
};
// --- END: Added/Modified section to transpile Zod ---
// Use turborepo to restore the cache when possible
config.cacheStores = [
new FileStore({
root: path.join(projectRoot, "node_modules", ".cache", "metro"),
}),
];
module.exports = withNativeWind(config, { input: "./global.css" });

View File

@@ -0,0 +1 @@
/// <reference types="nativewind/types" />

View File

@@ -1,35 +1,54 @@
{
"name": "chat-rn-expo",
"version": "1.0.12",
"main": "index.ts",
"version": "1.0.112",
"main": "index.js",
"scripts": {
"build": "expo prebuild",
"build": "tsc --noEmit && expo export -p ios",
"start": "expo start",
"format-and-lint": "biome check .",
"format-and-lint:fix": "biome check . --write",
"android": "expo run:android",
"ios": "expo run:ios",
"ios": "expo prebuild && pnpx pod-install && expo run:ios",
"web": "expo start --web"
},
"dependencies": {
"@azure/core-asynciterator-polyfill": "^1.0.2",
"@bacons/text-decoder": "^0.0.0",
"@craftzdog/react-native-buffer": "^6.0.5",
"@bacons/text-decoder": "0.0.0",
"@craftzdog/react-native-buffer": "6.0.5",
"@react-native-community/netinfo": "11.4.1",
"expo": "~53.0.9",
"expo-clipboard": "^7.1.4",
"@react-navigation/native": "7.0.19",
"@react-navigation/native-stack": "7.2.1",
"clsx": "^2.0.0",
"expo": "53.0.8",
"expo-build-properties": "~0.14.6",
"expo-clipboard": "~7.1.4",
"expo-constants": "~17.1.6",
"expo-dev-client": "~5.1.8",
"expo-linking": "~7.1.4",
"expo-secure-store": "~14.2.3",
"expo-sqlite": "~15.2.10",
"expo-sqlite": "15.2.9",
"expo-status-bar": "~2.2.3",
"expo-web-browser": "~14.1.6",
"jazz-expo": "workspace:*",
"jazz-tools": "workspace:*",
"nativewind": "^4.1.21",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-native": "0.79.2",
"react-native-get-random-values": "^1.11.0",
"readable-stream": "^4.7.0"
"react-native-nitro-modules": "0.25.2",
"react-native-quick-crypto": "1.0.0-beta.15",
"react-native-safe-area-context": "5.4.0",
"react-native-screens": "4.10.0",
"react-native-url-polyfill": "^2.0.0",
"readable-stream": "4.7.0"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@types/react": "~19.0.10",
"typescript": "~5.8.3"
"@babel/plugin-transform-runtime": "^7.27.1",
"@types/react": "~19.0.14",
"tailwindcss": "^3.4.17",
"typescript": "5.8.3"
},
"private": true
}

View File

@@ -1,18 +1,74 @@
import "../global.css";
import {
NavigationContainer,
useNavigationContainerRef,
} from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import * as Linking from "expo-linking";
import { RNQuickCrypto } from "jazz-expo/crypto";
import React, { StrictMode, useEffect, useState } from "react";
import HandleInviteScreen from "./invite";
import { JazzProvider } from "jazz-expo";
import React, { StrictMode } from "react";
import { apiKey } from "./apiKey";
import ChatScreen from "./chat";
export default function App() {
const Stack = createNativeStackNavigator();
const prefix = Linking.createURL("/");
const linking = {
prefixes: [prefix],
config: {
screens: {
HandleInviteScreen: {
path: "router/invite/:valueHint?/:valueID/:inviteSecret",
},
},
},
};
function App() {
const [initialRoute, setInitialRoute] = useState<
"ChatScreen" | "HandleInviteScreen"
>("ChatScreen");
const navigationRef = useNavigationContainerRef();
useEffect(() => {
Linking.getInitialURL().then((url) => {
if (url) {
if (url && url.includes("invite")) {
setInitialRoute("HandleInviteScreen");
}
}
});
}, []);
return (
<StrictMode>
<JazzProvider
CryptoProvider={RNQuickCrypto}
sync={{
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
}}
>
<ChatScreen />
<NavigationContainer linking={linking} ref={navigationRef}>
<Stack.Navigator initialRouteName={initialRoute}>
<Stack.Screen
options={{ title: "Jazz Chat" }}
name="ChatScreen"
// @ts-ignore
component={ChatScreen}
/>
<Stack.Screen
name="HandleInviteScreen"
component={HandleInviteScreen}
/>
</Stack.Navigator>
</NavigationContainer>
</JazzProvider>
</StrictMode>
);
}
export default App;

View File

@@ -1,6 +1,7 @@
import clsx from "clsx";
import * as Clipboard from "expo-clipboard";
import { Account, Group } from "jazz-tools";
import { useState } from "react";
import { Group, ID, Loaded, Profile } from "jazz-tools";
import { useEffect, useState } from "react";
import React, {
Button,
FlatList,
@@ -11,38 +12,54 @@ import React, {
TouchableOpacity,
View,
Alert,
StyleSheet,
} from "react-native";
import { useAccount, useCoState } from "jazz-expo";
import { Chat, Message } from "./schema";
export default function ChatScreen() {
const { me, logOut } = useAccount(Account, { resolve: { profile: true } });
export default function ChatScreen({ navigation }: { navigation: any }) {
const { me, logOut } = useAccount();
const [chatId, setChatId] = useState<string>();
const [chatIdInput, setChatIdInput] = useState<string>();
const loadedChat = useCoState(Chat, chatId, { resolve: { $each: true } });
const [message, setMessage] = useState("");
const profile = useCoState(Profile, me._refs.profile?.id, {});
function handleLogOut() {
setChatId(undefined);
logOut();
}
useEffect(() => {
navigation.setOptions({
headerRight: () => <Button onPress={handleLogOut} title="Logout" />,
headerLeft: () =>
loadedChat ? (
<Button
onPress={() => {
if (loadedChat?.id) {
Clipboard.setStringAsync(
`https://chat.jazz.tools/#/chat/${loadedChat.id}`,
);
Alert.alert("Copied to clipboard", `Chat ID: ${loadedChat.id}`);
}
}}
title="Share"
/>
) : null,
});
}, [navigation, loadedChat]);
const createChat = () => {
const group = Group.create();
const group = Group.create({ owner: me });
group.addMember("everyone", "writer");
const chat = Chat.create([], group);
const chat = Chat.create([], { owner: group });
setChatId(chat.id);
};
const joinChat = () => {
if (chatIdInput) {
if (chatIdInput.startsWith("https://chat.jazz.tools/#/chat/")) {
setChatId(chatIdInput.split("/").pop());
} else {
setChatId(chatIdInput);
}
setChatId(chatIdInput);
} else {
Alert.alert("Error", "Chat ID cannot be empty.");
}
@@ -58,28 +75,41 @@ export default function ChatScreen() {
}
};
const renderMessageItem = ({ item }: { item: Message }) => {
const renderMessageItem = ({ item }: { item: Loaded<typeof Message> }) => {
const isMe = item._edits?.text?.by?.isMe;
return (
<View
style={[
styles.messageContainer,
isMe ? styles.myMessage : styles.otherMessage,
]}
className={clsx(
`rounded-lg p-1 px-1.5 max-w-[80%] `,
isMe ? `bg-gray-200 self-end text-right` : `bg-gray-300 self-start `,
)}
>
{!isMe ? (
<Text
style={[
styles.messageSender,
{ textAlign: isMe ? "right" : "left" },
]}
className={clsx(
`text-xs text-gray-500`,
isMe ? "text-right" : "text-left",
)}
>
{item?._edits?.text?.by?.profile?.name}
</Text>
) : null}
<View style={styles.messageContent}>
<Text style={styles.messageText}>{item.text}</Text>
<Text style={[styles.messageTime, { marginTop: !isMe ? 8 : 4 }]}>
<View
className={clsx(
"flex relative items-end justify-between",
isMe ? "flex-row" : "flex-row",
)}
>
<Text className={clsx(`text-black text-md max-w-[85%]`)}>
{item.text}
</Text>
<Text
className={clsx(
"text-[10px] text-gray-500 text-right ml-2",
!isMe ? "mt-2" : "mt-1",
)}
>
{item?._edits?.text?.madeAt?.getHours().toString().padStart(2, "0")}
:
{item?._edits?.text?.madeAt
@@ -93,28 +123,31 @@ export default function ChatScreen() {
};
return (
<View style={styles.container}>
<View className="flex flex-col h-full">
{!loadedChat ? (
<View style={styles.welcomeContainer}>
<Text style={styles.usernameTitle}>Username</Text>
<View className="flex flex-col h-full items-center justify-center">
<Text className="text-m font-bold mb-6">Username</Text>
<TextInput
style={styles.usernameInput}
value={me?.profile.name ?? ""}
className="rounded h-12 p-2 mb-12 w-40 border border-gray-200 block"
value={profile?.name ?? ""}
onChangeText={(value) => {
if (me?.profile) {
me.profile.name = value;
if (profile) {
profile.name = value;
}
}}
textAlignVertical="center"
onSubmitEditing={sendMessage}
testID="username-input"
/>
<TouchableOpacity onPress={createChat} style={styles.newChatButton}>
<Text style={styles.newChatButtonText}>Start new chat</Text>
<TouchableOpacity
onPress={createChat}
className="bg-blue-500 p-4 rounded-md"
>
<Text className="text-white font-semibold">Start new chat</Text>
</TouchableOpacity>
<Text style={styles.joinChatTitle}>Join existing chat</Text>
<Text className="text-m font-bold mt-6">Join existing chat</Text>
<TextInput
style={styles.chatIdInput}
className="rounded h-12 p-2 m-2 mt-4 w-80 border border-gray-200 block"
placeholder="Chat ID"
value={chatIdInput ?? ""}
onChangeText={(value) => {
@@ -128,38 +161,22 @@ export default function ChatScreen() {
}}
testID="chat-id-input"
/>
<TouchableOpacity onPress={joinChat} style={styles.joinChatButton}>
<Text style={styles.newChatButtonText}>Join chat</Text>
<TouchableOpacity
onPress={joinChat}
className="bg-green-500 p-4 rounded-md"
>
<Text className="text-white font-semibold">Join chat</Text>
</TouchableOpacity>
</View>
) : (
<>
<View style={styles.chatHeader}>
<Button
onPress={() => {
if (loadedChat?.id) {
Clipboard.setStringAsync(
`https://chat.jazz.tools/#/chat/${loadedChat.id}`,
);
Alert.alert(
"Copied to clipboard",
`Chat ID: ${loadedChat.id}`,
);
}
}}
title="Share"
/>
<Text style={{ fontWeight: "bold", fontSize: 18 }}>Jazz chat</Text>
<Button onPress={handleLogOut} title="Logout" />
</View>
<FlatList
contentContainerStyle={{
flexGrow: 1,
gap: 6,
padding: 8,
justifyContent: "flex-end",
}}
style={styles.messageList}
className="flex"
data={loadedChat}
keyExtractor={(item) => item.id}
renderItem={renderMessageItem}
@@ -168,11 +185,11 @@ export default function ChatScreen() {
<KeyboardAvoidingView
keyboardVerticalOffset={110}
behavior="padding"
style={styles.inputContainer}
className="p-3 bg-white border-t border-gray-300"
>
<SafeAreaView style={styles.inputRow}>
<SafeAreaView className="flex flex-row items-center gap-2">
<TextInput
style={styles.messageInput}
className="rounded-full h-8 py-0 px-2 border border-gray-200 block flex-1"
value={message}
onChangeText={setMessage}
placeholder="Type a message..."
@@ -182,7 +199,7 @@ export default function ChatScreen() {
/>
<TouchableOpacity
onPress={sendMessage}
style={styles.sendButton}
className="bg-gray-300 text-white rounded-full h-8 w-8 items-center justify-center"
testID="send-button"
>
<Text></Text>
@@ -194,133 +211,3 @@ export default function ChatScreen() {
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: "column",
height: "100%",
},
chatHeader: {
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
padding: 8,
paddingTop: 48,
backgroundColor: "#f0f0f0",
},
welcomeContainer: {
flex: 1,
flexDirection: "column",
height: "100%",
alignItems: "center",
justifyContent: "center",
},
usernameTitle: {
fontSize: 16,
fontWeight: "bold",
marginBottom: 24,
},
usernameInput: {
borderRadius: 4,
height: 48,
padding: 8,
marginBottom: 48,
width: 160,
borderWidth: 1,
borderColor: "#e5e5e5",
},
newChatButton: {
backgroundColor: "#3b82f6",
padding: 16,
borderRadius: 6,
},
newChatButtonText: {
color: "white",
fontWeight: "600",
},
joinChatTitle: {
fontSize: 16,
fontWeight: "bold",
marginTop: 24,
},
chatIdInput: {
borderRadius: 4,
height: 48,
padding: 8,
margin: 8,
marginTop: 16,
width: 320,
borderWidth: 1,
borderColor: "#e5e5e5",
},
joinChatButton: {
backgroundColor: "#22c55e",
padding: 16,
borderRadius: 6,
},
messageList: {
display: "flex",
},
messageContainer: {
borderRadius: 8,
padding: 4,
paddingHorizontal: 6,
maxWidth: "80%",
},
myMessage: {
backgroundColor: "#e5e5e5",
alignSelf: "flex-end",
},
otherMessage: {
backgroundColor: "#d4d4d4",
alignSelf: "flex-start",
},
messageSender: {
fontSize: 12,
color: "#6b7280",
},
messageContent: {
flexDirection: "row",
alignItems: "flex-end",
justifyContent: "space-between",
},
messageText: {
color: "black",
fontSize: 16,
maxWidth: "85%",
},
messageTime: {
fontSize: 10,
color: "#6b7280",
marginLeft: 8,
},
inputContainer: {
padding: 12,
backgroundColor: "white",
borderTopWidth: 1,
borderTopColor: "#d4d4d4",
},
inputRow: {
flexDirection: "row",
alignItems: "center",
gap: 8,
},
messageInput: {
borderRadius: 9999,
height: 32,
paddingVertical: 0,
paddingHorizontal: 8,
borderWidth: 1,
borderColor: "#e5e5e5",
flex: 1,
},
sendButton: {
backgroundColor: "#d4d4d4",
borderRadius: 9999,
height: 32,
width: 32,
alignItems: "center",
justifyContent: "center",
},
});

View File

@@ -0,0 +1,18 @@
import { useAcceptInvite } from "jazz-expo";
import React, { Text } from "react-native";
import { Chat } from "./schema";
export default function HandleInviteScreen({
navigation,
}: {
navigation: any;
}) {
useAcceptInvite({
invitedObjectSchema: Chat,
onAccept: async (chatId) => {
navigation.navigate("ChatScreen", { chatId });
},
});
return <Text>Accepting invite...</Text>;
}

View File

@@ -3,7 +3,5 @@ import { co, z } from "jazz-tools";
export const Message = co.map({
text: z.string(),
});
export type Message = co.loaded<typeof Message>;
export const Chat = co.list(Message);
export type Chat = co.loaded<typeof Chat>;

View File

@@ -0,0 +1,14 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
// NOTE: Update this to include the paths to all of your component files.
content: [
"./app/**/*.{js,jsx,ts,tsx}",
"./components/**/*.{js,jsx,ts,tsx}",
"./src/**/*.{js,jsx,ts,tsx}",
],
presets: [require("nativewind/preset")],
theme: {
extend: {},
},
plugins: [],
};

View File

@@ -2,7 +2,7 @@
# fully erased. The tap into the input field hits the middle, and clears all
# text to the left. If there's more to the right, it slides left, and thus we
# repeat this step. https://maestro.mobile.dev/api-reference/commands/erasetext
appId: tools.jazz.chatrnexpo
appId: com.jazz.chatrn
---
- copyTextFrom:
id: ${id}

View File

@@ -1,4 +1,4 @@
appId: tools.jazz.chatrnexpo
appId: com.jazz.chatrn
---
- launchApp
@@ -8,7 +8,10 @@ appId: tools.jazz.chatrnexpo
# - assertVisible: "Reload"
# - tapOn: "Reload"
- assertVisible: "Username"
# login
- assertVisible: "Logout"
- tapOn: "Logout"
- assertVisible: "Anonymous user"
- runFlow:
label: "Erase existing username"
file: erase_text.yml
@@ -40,13 +43,12 @@ appId: tools.jazz.chatrnexpo
# logout
- tapOn: "Logout"
- assertVisible: "Username"
- assertVisible: "Anonymous user"
# join chat
# - tapOn:
# id: "chat-id-input"
# - inputText: "co_zFs6KFyhxPw4xtw83tcEMzeHUNv" # Use a static id because maestro doesn't have access to the system clipboard
# - tapOn: "Join chat"
# - assertVisible: "boorad"
# - assertVisible: "bro, low key, it do be like that tho"
- tapOn:
id: "chat-id-input"
- inputText: "co_zFs6KFyhxPw4xtw83tcEMzeHUNv" # Use a static id because maestro doesn't have access to the system clipboard
- tapOn: "Join chat"
- assertVisible: "boorad"
- assertVisible: "bro, low key, it do be like that tho"

View File

@@ -5,15 +5,11 @@
set -e
OUTPUT_FILE=~/output/android-install.log
mkdir -p ~/output
touch $OUTPUT_FILE
# build and install the app
echo "Building and installing Android app."
echo "If it fails, its output will be in artifact: android-install.log..."
cd ./android/
./gradlew installRelease >> $OUTPUT_FILE 2>&1
./gradlew installRelease >> ~/output/android-install.log 2>&1
cd ..
# run the e2e tests

View File

@@ -1,6 +1,8 @@
{
"extends": "expo/tsconfig.base",
"compilerOptions": {
"strict": true
}
"strict": true,
"moduleResolution": "bundler"
},
"exclude": ["src/tests"]
}

View File

@@ -1,177 +1,5 @@
# chat-rn
## 1.0.139
### Patch Changes
- Updated dependencies [e7e505e]
- Updated dependencies [c3d8779]
- Updated dependencies [13b57aa]
- Updated dependencies [5662faa]
- Updated dependencies [2116a59]
- jazz-tools@0.14.21
- cojson@0.14.21
- jazz-react-native@0.14.21
- cojson-transport-ws@0.14.21
## 1.0.138
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-react-native@0.14.20
- cojson@0.14.20
- cojson-transport-ws@0.14.20
## 1.0.137
### Patch Changes
- Updated dependencies [061ec99]
- jazz-react-native@0.14.19
- cojson@0.14.19
- cojson-transport-ws@0.14.19
- jazz-tools@0.14.19
## 1.0.136
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [0d5ee3e]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- cojson@0.14.18
- jazz-react-native@0.14.18
- cojson-transport-ws@0.14.18
## 1.0.135
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-react-native@0.14.17
## 1.0.134
### Patch Changes
- Updated dependencies [5e253cc]
- cojson@0.14.16
- cojson-transport-ws@0.14.16
- jazz-react-native@0.14.16
- jazz-tools@0.14.16
## 1.0.133
### Patch Changes
- Updated dependencies [23daa7c]
- cojson@0.14.15
- jazz-react-native@0.14.15
- cojson-transport-ws@0.14.15
- jazz-tools@0.14.15
## 1.0.132
### Patch Changes
- Updated dependencies [e32a1f7]
- jazz-tools@0.14.14
- jazz-react-native@0.14.14
## 1.0.131
### Patch Changes
- jazz-react-native@0.14.13
## 1.0.130
### Patch Changes
- jazz-react-native@0.14.12
## 1.0.129
### Patch Changes
- Updated dependencies [98d697f]
- jazz-react-native@0.14.11
## 1.0.128
### Patch Changes
- Updated dependencies [dc746a2]
- Updated dependencies [f869d9a]
- Updated dependencies [3fe6832]
- jazz-react-native@0.14.10
- jazz-tools@0.14.10
## 1.0.127
### Patch Changes
- Updated dependencies [22c2600]
- jazz-tools@0.14.9
- jazz-react-native@0.14.9
## 1.0.126
### Patch Changes
- Updated dependencies [637ae13]
- jazz-tools@0.14.8
- jazz-react-native@0.14.8
## 1.0.125
### Patch Changes
- Updated dependencies [365b0ea]
- jazz-tools@0.14.7
- jazz-react-native@0.14.7
## 1.0.124
### Patch Changes
- Updated dependencies [9d6d9fe]
- Updated dependencies [9d6d9fe]
- jazz-tools@0.14.6
- jazz-react-native@0.14.6
## 1.0.123
### Patch Changes
- Updated dependencies [91cbb2f]
- Updated dependencies [20b3d88]
- jazz-tools@0.14.5
- jazz-react-native@0.14.5
## 1.0.122
### Patch Changes
- Updated dependencies [011af55]
- jazz-tools@0.14.4
- jazz-react-native@0.14.4
## 1.0.121
### Patch Changes
- Updated dependencies [3d1027f]
- Updated dependencies [c240eed]
- jazz-tools@0.14.2
- jazz-react-native@0.14.2
## 1.0.120
### Patch Changes

View File

@@ -26,7 +26,7 @@ This will set up and launch the app on iOS. For Android, you can skip `pnpm pods
This was created using the following command:
```bash
pnpx @react-native-community/cli init chat-rn --version 0.76.9 --install-pods true --skip-git-init true --package-name com.chatrn --directory chat-rn
pnpx @react-native-community/cli init chat-rn --version 0.76.7 --install-pods true --skip-git-init true --package-name com.chatrn --directory chat-rn
```
Then change package name in `package.json`, and begin build instructions above.

View File

@@ -2,9 +2,9 @@
"name": "ChatRN",
"displayName": "ChatRN",
"android": {
"package": "tools.jazz.chatrn"
"package": "com.anonymous.ChatRN"
},
"ios": {
"bundleIdentifier": "tools.jazz.chatrn"
"bundleIdentifier": "com.anonymous.ChatRN"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -26,7 +26,7 @@ module.exports = makeMetroConfig({
resolveRequest: MetroSymlinksResolver(),
extraNodeModules,
nodeModulesPaths,
sourceExts: ["mjs", "js", "json", "ts", "tsx"],
},
sourceExts: ["mjs", "js", "json", "ts", "tsx"],
watchFolders,
});

View File

@@ -1,6 +1,6 @@
{
"name": "chat-rn",
"version": "1.0.139",
"version": "1.0.120",
"main": "index.js",
"scripts": {
"android": "react-native run-android",
@@ -23,7 +23,7 @@
"cojson-transport-ws": "workspace:*",
"jazz-react-native": "workspace:*",
"jazz-tools": "workspace:*",
"react": "19.0.0",
"react": "18.3.1",
"react-native": "0.79.2",
"react-native-get-random-values": "^1.11.0",
"react-native-mmkv": "^3.2.0",
@@ -40,10 +40,10 @@
"@react-native-community/cli": "15.0.1",
"@react-native-community/cli-platform-android": "15.0.1",
"@react-native-community/cli-platform-ios": "15.0.1",
"@react-native/babel-preset": "0.76.9",
"@react-native/eslint-config": "0.76.9",
"@react-native/metro-config": "0.76.9",
"@react-native/typescript-config": "0.76.9",
"@react-native/babel-preset": "0.76.7",
"@react-native/eslint-config": "0.76.7",
"@react-native/metro-config": "0.76.7",
"@react-native/typescript-config": "0.76.7",
"@rnx-kit/metro-config": "^2.0.1",
"@rnx-kit/metro-resolver-symlinks": "^0.2.1",
"@types/react": "^18.3.12",

View File

@@ -3,6 +3,7 @@ import { useAccount, useCoState } from "jazz-react-native";
import { CoPlainText, Group, ID, Loaded, Profile } from "jazz-tools";
import { useEffect, useState } from "react";
import {
Alert,
Button,
FlatList,
KeyboardAvoidingView,
@@ -18,7 +19,6 @@ import { Chat, Message } from "./schema";
export function ChatScreen({ navigation }: { navigation: any }) {
const { me, logOut } = useAccount();
const [chatId, setChatId] = useState<string>();
const [chatIdInput, setChatIdInput] = useState<string>();
const loadedChat = useCoState(Chat, chatId, { resolve: { $each: true } });
const [message, setMessage] = useState("");
const profile = useCoState(Profile, me._refs.profile?.id, {});
@@ -36,8 +36,10 @@ export function ChatScreen({ navigation }: { navigation: any }) {
<Button
onPress={() => {
if (loadedChat?.id) {
Clipboard.setString(loadedChat.id);
console.log("Copied to clipboard", `Chat ID: ${loadedChat.id}`);
Clipboard.setString(
`https://chat.jazz.tools/#/chat/${loadedChat.id}`,
);
Alert.alert("Copied to clipboard", `Chat ID: ${loadedChat.id}`);
}
}}
title="Share"
@@ -54,11 +56,27 @@ export function ChatScreen({ navigation }: { navigation: any }) {
};
const joinChat = () => {
if (chatIdInput) {
setChatId(chatIdInput as ID<Chat>);
} else {
console.warn("Error: Chat ID cannot be empty.");
}
Alert.prompt(
"Join Chat",
"Enter the Chat ID (example: co_zBGEHYvRfGuT2YSBraY3njGjnde)",
[
{
text: "Cancel",
style: "cancel",
},
{
text: "Join",
onPress: (chatId) => {
if (chatId) {
setChatId(chatId);
} else {
Alert.alert("Error", "Chat ID cannot be empty.");
}
},
},
],
"plain-text",
);
};
const sendMessage = () => {
@@ -135,16 +153,6 @@ export function ChatScreen({ navigation }: { navigation: any }) {
<TouchableOpacity onPress={createChat} style={styles.newChatButton}>
<Text style={styles.buttonText}>Start new chat</Text>
</TouchableOpacity>
<Text style={styles.usernameLabel}>Join existing chat</Text>
<TextInput
style={styles.chatIdInput}
placeholder="Chat ID"
value={chatIdInput ?? ""}
onChangeText={setChatIdInput}
textAlignVertical="center"
onSubmitEditing={joinChat}
testID="chat-id-input"
/>
<TouchableOpacity onPress={joinChat} style={styles.joinChatButton}>
<Text style={styles.buttonText}>Join chat</Text>
</TouchableOpacity>
@@ -197,91 +205,27 @@ export function ChatScreen({ navigation }: { navigation: any }) {
const styles = StyleSheet.create({
container: {
flex: 1,
},
welcomeContainer: {
flex: 1,
alignItems: "center",
justifyContent: "center",
padding: 16,
},
usernameLabel: {
fontSize: 16,
fontWeight: "bold",
marginBottom: 16,
},
usernameInput: {
width: 160,
height: 48,
borderWidth: 1,
borderColor: "#ddd",
borderRadius: 8,
paddingHorizontal: 8,
marginBottom: 24,
},
chatIdInput: {
width: 320,
height: 48,
borderWidth: 1,
borderColor: "#ddd",
borderRadius: 8,
paddingHorizontal: 8,
marginBottom: 24,
marginTop: 8,
},
newChatButton: {
backgroundColor: "#3B82F6",
padding: 16,
borderRadius: 8,
marginBottom: 24,
},
joinChatButton: {
backgroundColor: "#10B981",
padding: 16,
borderRadius: 8,
},
buttonText: {
color: "white",
fontSize: 16,
fontWeight: "bold",
textAlign: "center",
},
messageList: {
flex: 1,
},
inputContainer: {
padding: 12,
},
inputWrapper: {
flexDirection: "row",
alignItems: "center",
borderWidth: 1,
borderColor: "#ddd",
borderRadius: 8,
paddingHorizontal: 12,
},
messageInput: {
flex: 1,
height: 32,
paddingHorizontal: 8,
},
sendButton: {
paddingHorizontal: 16,
flexDirection: "column",
height: "100%",
},
messageContainer: {
flexDirection: "column",
alignItems: "flex-start",
marginBottom: 8,
borderRadius: 8,
paddingVertical: 4,
paddingHorizontal: 6,
maxWidth: "80%",
},
myMessage: {
backgroundColor: "#e5e7eb", // gray-200
alignSelf: "flex-end",
textAlign: "right",
},
otherMessage: {
backgroundColor: "#d1d5db", // gray-300
alignSelf: "flex-start",
},
senderName: {
fontSize: 12,
color: "#666",
marginBottom: 4,
color: "#6b7280", // gray-500
},
textRight: {
textAlign: "right",
@@ -290,27 +234,92 @@ const styles = StyleSheet.create({
textAlign: "left",
},
messageContent: {
backgroundColor: "#f0f0f0",
borderRadius: 8,
padding: 8,
position: "relative",
flexDirection: "row",
alignItems: "flex-end",
justifyContent: "space-between",
},
messageText: {
color: "#000000",
fontSize: 16,
maxWidth: "85%",
},
timestamp: {
fontSize: 10,
color: "#666",
marginTop: 4,
color: "#6b7280", // gray-500
textAlign: "right",
marginLeft: 8,
},
timestampOther: {
textAlign: "left",
marginTop: 8,
},
timestampMy: {
textAlign: "right",
marginTop: 4,
},
avatar: {
welcomeContainer: {
flex: 1,
flexDirection: "column",
height: "100%",
alignItems: "center",
justifyContent: "center",
},
usernameLabel: {
fontSize: 16,
fontWeight: "bold",
marginBottom: 24,
},
usernameInput: {
borderRadius: 4,
height: 48,
padding: 8,
marginBottom: 48,
width: 160,
borderWidth: 1,
borderColor: "#e5e7eb", // gray-200
},
newChatButton: {
backgroundColor: "#3b82f6", // blue-500
padding: 16,
borderRadius: 6,
},
joinChatButton: {
backgroundColor: "#10b981", // green-500
padding: 16,
borderRadius: 6,
marginTop: 16,
},
buttonText: {
color: "white",
fontWeight: "600",
},
messageList: {
flex: 1,
},
inputContainer: {
paddingVertical: 16,
paddingHorizontal: 10,
backgroundColor: "white",
borderTopWidth: 1,
borderTopColor: "#d1d5db", // gray-300
},
inputWrapper: {
flex: 1,
flexDirection: "row",
alignItems: "center",
margin: 5,
},
messageInput: {
borderRadius: 20,
height: 32,
paddingVertical: 0,
paddingHorizontal: 8,
borderWidth: 1,
borderColor: "#e5e7eb", // gray-200
flex: 1,
},
sendButton: {
marginLeft: 10,
backgroundColor: "#d1d5db", // gray-300
borderRadius: 16,
height: 32,
width: 32,

View File

@@ -1,157 +1,5 @@
# chat-vue
## 0.0.119
### Patch Changes
- Updated dependencies [e7e505e]
- Updated dependencies [13b57aa]
- Updated dependencies [5662faa]
- Updated dependencies [2116a59]
- jazz-tools@0.14.21
- jazz-browser@0.14.21
- jazz-vue@0.14.21
## 0.0.118
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-browser@0.14.20
- jazz-vue@0.14.20
## 0.0.117
### Patch Changes
- jazz-browser@0.14.19
- jazz-tools@0.14.19
- jazz-vue@0.14.19
## 0.0.116
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-browser@0.14.18
- jazz-vue@0.14.18
## 0.0.115
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-browser@0.14.17
- jazz-vue@0.14.17
## 0.0.114
### Patch Changes
- jazz-browser@0.14.16
- jazz-tools@0.14.16
- jazz-vue@0.14.16
## 0.0.113
### Patch Changes
- jazz-browser@0.14.15
- jazz-tools@0.14.15
- jazz-vue@0.14.15
## 0.0.112
### Patch Changes
- Updated dependencies [e32a1f7]
- jazz-tools@0.14.14
- jazz-browser@0.14.14
- jazz-vue@0.14.14
## 0.0.111
### Patch Changes
- Updated dependencies [dc746a2]
- Updated dependencies [f869d9a]
- Updated dependencies [3fe6832]
- jazz-tools@0.14.10
- jazz-browser@0.14.10
- jazz-vue@0.14.10
## 0.0.110
### Patch Changes
- Updated dependencies [22c2600]
- jazz-tools@0.14.9
- jazz-browser@0.14.9
- jazz-vue@0.14.9
## 0.0.109
### Patch Changes
- Updated dependencies [637ae13]
- jazz-tools@0.14.8
- jazz-browser@0.14.8
- jazz-vue@0.14.8
## 0.0.108
### Patch Changes
- Updated dependencies [365b0ea]
- jazz-tools@0.14.7
- jazz-browser@0.14.7
- jazz-vue@0.14.7
## 0.0.107
### Patch Changes
- Updated dependencies [9d6d9fe]
- Updated dependencies [9d6d9fe]
- jazz-tools@0.14.6
- jazz-browser@0.14.6
- jazz-vue@0.14.6
## 0.0.106
### Patch Changes
- Updated dependencies [91cbb2f]
- Updated dependencies [20b3d88]
- jazz-tools@0.14.5
- jazz-browser@0.14.5
- jazz-vue@0.14.5
## 0.0.105
### Patch Changes
- Updated dependencies [011af55]
- jazz-tools@0.14.4
- jazz-browser@0.14.4
- jazz-vue@0.14.4
## 0.0.104
### Patch Changes
- Updated dependencies [3d1027f]
- Updated dependencies [c240eed]
- jazz-tools@0.14.2
- jazz-browser@0.14.2
- jazz-vue@0.14.2
## 0.0.103
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "chat-vue",
"version": "0.0.119",
"version": "0.0.103",
"private": true,
"type": "module",
"scripts": {
@@ -32,7 +32,7 @@
"postcss": "^8.4.27",
"tailwindcss": "^3.4.17",
"typescript": "5.6.2",
"vite": "6.3.5",
"vite": "6.0.11",
"vite-plugin-vue-devtools": "^7.4.6",
"vue-tsc": "^2.1.6"
}

View File

@@ -1,173 +1,5 @@
# jazz-example-chat
## 0.0.219
### Patch Changes
- Updated dependencies [e7e505e]
- Updated dependencies [13b57aa]
- Updated dependencies [5662faa]
- Updated dependencies [2116a59]
- jazz-tools@0.14.21
- jazz-inspector@0.14.21
- jazz-react@0.14.21
## 0.0.218
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-inspector@0.14.20
- jazz-react@0.14.20
## 0.0.217
### Patch Changes
- jazz-inspector@0.14.19
- jazz-react@0.14.19
- jazz-tools@0.14.19
## 0.0.216
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-inspector@0.14.18
- jazz-react@0.14.18
## 0.0.215
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-inspector@0.14.17
- jazz-react@0.14.17
## 0.0.214
### Patch Changes
- jazz-inspector@0.14.16
- jazz-react@0.14.16
- jazz-tools@0.14.16
## 0.0.213
### Patch Changes
- Updated dependencies [f9590f9]
- jazz-react@0.14.15
- jazz-inspector@0.14.15
- jazz-tools@0.14.15
## 0.0.212
### Patch Changes
- Updated dependencies [e32a1f7]
- jazz-tools@0.14.14
- jazz-inspector@0.14.14
- jazz-react@0.14.14
## 0.0.211
### Patch Changes
- jazz-inspector@0.14.13
- jazz-react@0.14.13
## 0.0.210
### Patch Changes
- jazz-inspector@0.14.12
- jazz-react@0.14.12
## 0.0.209
### Patch Changes
- Updated dependencies [dc746a2]
- Updated dependencies [f869d9a]
- Updated dependencies [3fe6832]
- jazz-inspector@0.14.10
- hash-slash@0.2.3
- jazz-react@0.14.10
- jazz-tools@0.14.10
## 0.0.208
### Patch Changes
- Updated dependencies [22c2600]
- jazz-tools@0.14.9
- jazz-inspector@0.14.9
- jazz-react@0.14.9
## 0.0.207
### Patch Changes
- Updated dependencies [637ae13]
- jazz-tools@0.14.8
- jazz-inspector@0.14.8
- jazz-react@0.14.8
## 0.0.206
### Patch Changes
- Updated dependencies [365b0ea]
- jazz-tools@0.14.7
- jazz-inspector@0.14.7
- jazz-react@0.14.7
## 0.0.205
### Patch Changes
- Updated dependencies [9d6d9fe]
- Updated dependencies [9d6d9fe]
- jazz-tools@0.14.6
- jazz-inspector@0.14.6
- jazz-react@0.14.6
## 0.0.204
### Patch Changes
- Updated dependencies [91cbb2f]
- Updated dependencies [20b3d88]
- jazz-tools@0.14.5
- jazz-inspector@0.14.5
- jazz-react@0.14.5
## 0.0.203
### Patch Changes
- Updated dependencies [011af55]
- jazz-tools@0.14.4
- jazz-inspector@0.14.4
- jazz-react@0.14.4
## 0.0.202
### Patch Changes
- Updated dependencies [3d1027f]
- Updated dependencies [c240eed]
- jazz-tools@0.14.2
- jazz-inspector@0.14.2
- jazz-react@0.14.2
## 0.0.201
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-chat",
"private": true,
"version": "0.0.219",
"version": "0.0.201",
"type": "module",
"scripts": {
"dev": "vite",
@@ -19,20 +19,20 @@
"jazz-react": "workspace:*",
"jazz-tools": "workspace:*",
"lucide-react": "^0.274.0",
"react": "19.0.0",
"react-dom": "19.0.0",
"zod": "3.25.28"
"react": "^18.3.1",
"react-dom": "^18.3.1",
"zod": "4.0.0-beta.20250505T012514"
},
"devDependencies": {
"@playwright/test": "^1.50.1",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react-swc": "^3.10.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react-swc": "^3.3.2",
"autoprefixer": "^10.4.20",
"is-ci": "^3.0.1",
"postcss": "^8.4.27",
"tailwindcss": "^3.4.17",
"typescript": "5.6.2",
"vite": "6.3.5"
"vite": "6.0.11"
}
}

View File

@@ -18,7 +18,7 @@ export function App() {
const createChat = () => {
if (!me) return;
const group = Group.create();
group.makePublic("writer");
group.addMember("everyone", "writer");
const chat = Chat.create([], group);
router.navigate("/#/chat/" + chat.id);

View File

@@ -1,5 +1,5 @@
import { createImage, useAccount, useCoState } from "jazz-react";
import { Account, co } from "jazz-tools";
import { Account, Loaded, co } from "jazz-tools";
import { useState } from "react";
import { Chat, Message } from "./schema.ts";
import {
@@ -91,7 +91,7 @@ export function ChatScreen(props: { chatID: string }) {
function ChatBubble(props: {
me: Account;
msg: co.loaded<typeof Message, { text: true }>;
msg: Loaded<typeof Message, { text: true }>;
}) {
if (!props.me.canRead(props.msg) || !props.msg.text?.toString()) {
return (

View File

@@ -4,7 +4,5 @@ export const Message = co.map({
text: co.plainText(),
image: z.optional(co.image()),
});
export type Message = co.loaded<typeof Message>;
export const Chat = co.list(Message);
export type Chat = co.loaded<typeof Chat>;

View File

@@ -1,6 +1,6 @@
import clsx from "clsx";
import { ProgressiveImg } from "jazz-react";
import { CoPlainText, ImageDefinition } from "jazz-tools";
import { CoPlainText, ImageDefinition, Loaded } from "jazz-tools";
import { ImageIcon } from "lucide-react";
import { useId, useRef } from "react";
@@ -81,7 +81,7 @@ export function BubbleText(props: {
);
}
export function BubbleImage(props: { image: ImageDefinition }) {
export function BubbleImage(props: { image: Loaded<typeof ImageDefinition> }) {
return (
<ProgressiveImg image={props.image}>
{({ src }) => (

View File

@@ -2,8 +2,8 @@
// This is NOT needed to make the chat work
import { Chat } from "@/schema.ts";
export function onChatLoad(chat: Chat) {
import { Loaded } from "jazz-tools";
export function onChatLoad(chat: Loaded<typeof Chat>) {
if (window.parent) {
chat.waitForSync().then(() => {
window.parent.postMessage(

View File

@@ -1,172 +1,5 @@
# minimal-auth-clerk
## 0.0.118
### Patch Changes
- Updated dependencies [e7e505e]
- Updated dependencies [13b57aa]
- Updated dependencies [5662faa]
- Updated dependencies [2116a59]
- jazz-tools@0.14.21
- jazz-react@0.14.21
- jazz-react-auth-clerk@0.14.21
## 0.0.117
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-react@0.14.20
- jazz-react-auth-clerk@0.14.20
## 0.0.116
### Patch Changes
- jazz-react@0.14.19
- jazz-react-auth-clerk@0.14.19
- jazz-tools@0.14.19
## 0.0.115
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-react@0.14.18
- jazz-react-auth-clerk@0.14.18
## 0.0.114
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-react@0.14.17
- jazz-react-auth-clerk@0.14.17
## 0.0.113
### Patch Changes
- jazz-react@0.14.16
- jazz-react-auth-clerk@0.14.16
- jazz-tools@0.14.16
## 0.0.112
### Patch Changes
- Updated dependencies [f9590f9]
- jazz-react@0.14.15
- jazz-react-auth-clerk@0.14.15
- jazz-tools@0.14.15
## 0.0.111
### Patch Changes
- Updated dependencies [e32a1f7]
- jazz-tools@0.14.14
- jazz-react@0.14.14
- jazz-react-auth-clerk@0.14.14
## 0.0.110
### Patch Changes
- jazz-react@0.14.13
- jazz-react-auth-clerk@0.14.13
## 0.0.109
### Patch Changes
- jazz-react@0.14.12
- jazz-react-auth-clerk@0.14.12
## 0.0.108
### Patch Changes
- Updated dependencies [dc746a2]
- Updated dependencies [f869d9a]
- Updated dependencies [3fe6832]
- jazz-react-auth-clerk@0.14.10
- jazz-react@0.14.10
- jazz-tools@0.14.10
## 0.0.107
### Patch Changes
- Updated dependencies [22c2600]
- jazz-tools@0.14.9
- jazz-react@0.14.9
- jazz-react-auth-clerk@0.14.9
## 0.0.106
### Patch Changes
- Updated dependencies [637ae13]
- jazz-tools@0.14.8
- jazz-react@0.14.8
- jazz-react-auth-clerk@0.14.8
## 0.0.105
### Patch Changes
- Updated dependencies [365b0ea]
- jazz-tools@0.14.7
- jazz-react@0.14.7
- jazz-react-auth-clerk@0.14.7
## 0.0.104
### Patch Changes
- Updated dependencies [9d6d9fe]
- Updated dependencies [9d6d9fe]
- jazz-tools@0.14.6
- jazz-react@0.14.6
- jazz-react-auth-clerk@0.14.6
## 0.0.103
### Patch Changes
- Updated dependencies [91cbb2f]
- Updated dependencies [20b3d88]
- jazz-tools@0.14.5
- jazz-react@0.14.5
- jazz-react-auth-clerk@0.14.5
## 0.0.102
### Patch Changes
- Updated dependencies [011af55]
- jazz-tools@0.14.4
- jazz-react@0.14.4
- jazz-react-auth-clerk@0.14.4
## 0.0.101
### Patch Changes
- Updated dependencies [3d1027f]
- Updated dependencies [c240eed]
- jazz-tools@0.14.2
- jazz-react@0.14.2
- jazz-react-auth-clerk@0.14.2
## 0.0.100
### Patch Changes

View File

@@ -2,7 +2,7 @@
This is an example of how to use clerk authentication with Jazz.
Live version: [https://clerk-demo.jazz.tools](https://clerk-demo.jazz.tools)
Live version: https://clerk-demo.jazz.tools
## Getting started

View File

@@ -1,7 +1,7 @@
{
"name": "clerk",
"private": true,
"version": "0.0.118",
"version": "0.0.100",
"type": "module",
"scripts": {
"dev": "vite",
@@ -17,17 +17,17 @@
"jazz-react": "workspace:*",
"jazz-react-auth-clerk": "workspace:*",
"jazz-tools": "workspace:*",
"react": "19.0.0",
"react-dom": "19.0.0"
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@playwright/test": "^1.50.1",
"@biomejs/biome": "1.9.4",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.5.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.3",
"globals": "^15.11.0",
"typescript": "5.6.2",
"vite": "6.3.5"
"vite": "6.0.11"
}
}

View File

@@ -4,7 +4,6 @@ import { createRoot } from "react-dom/client";
import App from "./App.tsx";
import "./index.css";
import { JazzProviderWithClerk } from "jazz-react-auth-clerk";
import { ReactNode } from "react";
import { apiKey } from "./apiKey";
// Import your publishable key
@@ -14,7 +13,7 @@ if (!PUBLISHABLE_KEY) {
throw new Error("Add your Clerk publishable key to the .env.local file");
}
function JazzProvider({ children }: { children: ReactNode }) {
function JazzProvider({ children }: { children: React.ReactNode }) {
const clerk = useClerk();
return (

View File

@@ -1,177 +1,5 @@
# file-share-svelte
## 0.0.103
### Patch Changes
- Updated dependencies [e7e505e]
- Updated dependencies [d14a069]
- Updated dependencies [13b57aa]
- Updated dependencies [5662faa]
- Updated dependencies [2116a59]
- jazz-tools@0.14.21
- jazz-svelte@0.14.21
- jazz-inspector-element@0.14.21
## 0.0.102
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-inspector-element@0.14.20
- jazz-svelte@0.14.20
## 0.0.101
### Patch Changes
- jazz-inspector-element@0.14.19
- jazz-svelte@0.14.19
- jazz-tools@0.14.19
## 0.0.100
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-inspector-element@0.14.18
- jazz-svelte@0.14.18
## 0.0.99
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-inspector-element@0.14.17
- jazz-svelte@0.14.17
## 0.0.98
### Patch Changes
- jazz-svelte@0.14.16
- jazz-tools@0.14.16
- jazz-inspector-element@0.14.16
## 0.0.97
### Patch Changes
- jazz-svelte@0.14.15
- jazz-tools@0.14.15
- jazz-inspector-element@0.14.15
## 0.0.96
### Patch Changes
- Updated dependencies [e32a1f7]
- jazz-tools@0.14.14
- jazz-inspector-element@0.14.14
- jazz-svelte@0.14.14
## 0.0.95
### Patch Changes
- jazz-inspector-element@0.14.13
## 0.0.94
### Patch Changes
- jazz-inspector-element@0.14.12
## 0.0.93
### Patch Changes
- Updated dependencies [dc746a2]
- Updated dependencies [f869d9a]
- Updated dependencies [3fe6832]
- jazz-tools@0.14.10
- jazz-inspector-element@0.14.10
- jazz-svelte@0.14.10
## 0.0.92
### Patch Changes
- Updated dependencies [22c2600]
- jazz-tools@0.14.9
- jazz-inspector-element@0.14.9
- jazz-svelte@0.14.9
## 0.0.91
### Patch Changes
- Updated dependencies [637ae13]
- jazz-tools@0.14.8
- jazz-inspector-element@0.14.8
- jazz-svelte@0.14.8
## 0.0.90
### Patch Changes
- Updated dependencies [365b0ea]
- jazz-tools@0.14.7
- jazz-inspector-element@0.14.7
- jazz-svelte@0.14.7
## 0.0.89
### Patch Changes
- Updated dependencies [9d6d9fe]
- Updated dependencies [9d6d9fe]
- jazz-tools@0.14.6
- jazz-inspector-element@0.14.6
- jazz-svelte@0.14.6
## 0.0.88
### Patch Changes
- Updated dependencies [91cbb2f]
- Updated dependencies [20b3d88]
- jazz-tools@0.14.5
- jazz-inspector-element@0.14.5
- jazz-svelte@0.14.5
## 0.0.87
### Patch Changes
- Updated dependencies [011af55]
- jazz-tools@0.14.4
- jazz-inspector-element@0.14.4
- jazz-svelte@0.14.4
## 0.0.86
### Patch Changes
- Updated dependencies [b2ee306]
- jazz-svelte@0.14.3
## 0.0.85
### Patch Changes
- Updated dependencies [3d1027f]
- Updated dependencies [c240eed]
- jazz-tools@0.14.2
- jazz-inspector-element@0.14.2
- jazz-svelte@0.14.2
## 0.0.84
### Patch Changes

View File

@@ -1,11 +1,11 @@
{
"name": "file-share-svelte",
"version": "0.0.103",
"version": "0.0.84",
"private": true,
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "pnpm run check && vite build",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
@@ -30,12 +30,12 @@
"prettier": "^3.3.2",
"prettier-plugin-svelte": "^3.2.6",
"prettier-plugin-tailwindcss": "^0.6.5",
"svelte": "^5.33.0",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tailwindcss": "^3.4.17",
"typescript": "5.6.2",
"typescript-eslint": "^8.0.0",
"vite": "6.3.5"
"vite": "6.0.11"
},
"dependencies": {
"@tailwindcss/typography": "^0.5.15",

View File

@@ -1,7 +1,7 @@
<script lang="ts">
import { slide } from 'svelte/transition';
import { type SharedFile } from '$lib/schema';
import { FileStream, type Loaded } from 'jazz-tools';
import { SharedFile } from '$lib/schema';
import { FileStream } from 'jazz-tools';
import { File, FileDown, Trash2, Link2 } from 'lucide-svelte';
import { toast } from 'svelte-sonner';
import { downloadFileBlob, formatFileSize } from '$lib/utils';
@@ -11,9 +11,9 @@
loading = false,
onDelete
}: {
file: Loaded<SharedFile>;
file: SharedFile;
loading?: boolean;
onDelete: (file: Loaded<SharedFile>) => void;
onDelete: (file: SharedFile) => void;
} = $props();
const isAdmin = $derived(file._owner?.myRole() === 'admin');
@@ -55,7 +55,7 @@
class="flex items-center justify-between rounded-lg border border-gray-200 bg-white p-4"
transition:slide={{ duration: 200 }}
>
<div class="flex flex-grow items-center space-x-4">
<div class="flex items-center space-x-4 flex-grow">
<div class="flex h-10 w-10 items-center justify-center rounded-lg bg-blue-100 text-blue-600">
<File class="h-6 w-6" />
</div>
@@ -64,12 +64,7 @@
<label class="sr-only" for={`file-name-${file.id}`}>File name</label>
<!-- Jazz values are reactive, but they are not recognized as reactive by Svelte -->
<!-- svelte-ignore binding_property_non_reactive -->
<input
class="w-full py-1 font-medium text-gray-900"
type="text"
bind:value={file.name}
id={`file-name-${file.id}`}
/>
<input class="font-medium text-gray-900 w-full py-1" type="text" bind:value={file.name} id={`file-name-${file.id}`} />
{:else}
<h3 class="font-medium text-gray-900">{file.name}</h3>
{/if}

View File

@@ -1,31 +1,46 @@
import { Group, co, z } from 'jazz-tools';
import { Account, CoList, CoMap, FileStream, Profile, coField, Group } from 'jazz-tools';
export const SharedFile = co.map({
name: z.string(),
file: co.fileStream(),
createdAt: z.date(),
uploadedAt: z.date(),
size: z.number(),
});
export class SharedFile extends CoMap {
name = coField.string;
file = coField.ref(FileStream);
createdAt = coField.Date;
uploadedAt = coField.Date;
size = coField.number;
}
export type SharedFile = typeof SharedFile;
export class FileShareProfile extends Profile {
name = coField.string;
}
export const FileShareAccountRoot = co.map({
type: z.literal('file-share-account'),
sharedFiles: co.list(SharedFile),
})
export class ListOfSharedFiles extends CoList.Of(coField.ref(SharedFile)) {}
export const FileShareAccount = co.account({
profile: co.profile(),
root: FileShareAccountRoot,
}).withMigration((account) => {
if (account.root === undefined) {
const publicGroup = Group.create({ owner: account });
publicGroup.addMember('everyone', 'reader');
export class FileShareAccountRoot extends CoMap {
type = coField.literal('file-share-account');
sharedFiles = coField.ref(ListOfSharedFiles);
}
account.root = FileShareAccountRoot.create({
type: 'file-share-account',
sharedFiles: co.list(SharedFile).create([], publicGroup),
}, publicGroup);
export class FileShareAccount extends Account {
profile = coField.ref(FileShareProfile);
root = coField.ref(FileShareAccountRoot);
/** The account migration is run on account creation and on every log-in.
* You can use it to set up the account root and any other initial CoValues you need.
*/
async migrate() {
await this._refs.root?.load();
// Initialize root if it doesn't exist
if (this.root === undefined || this.root?.type !== 'file-share-account') {
// Create a group that will own all shared files
const publicGroup = Group.create({ owner: this });
publicGroup.addMember('everyone', 'reader');
this.root = FileShareAccountRoot.create(
{
type: 'file-share-account',
sharedFiles: ListOfSharedFiles.create([], { owner: publicGroup }),
},
);
}
}
});
}

View File

@@ -1,7 +1,7 @@
<script lang="ts" module>
declare module 'jazz-svelte' {
interface Register {
Account: typeof FileShareAccount;
Account: FileShareAccount;
}
}
</script>

View File

@@ -1,23 +1,21 @@
<script lang="ts">
import { AccountCoState } from 'jazz-svelte';
import { SharedFile, FileShareAccount } from '$lib/schema';
import { FileStream, type Loaded } from 'jazz-tools';
import { SharedFile } from '$lib/schema';
import { FileStream } from 'jazz-tools';
import FileItem from '$lib/components/FileItem.svelte';
import { CloudUpload } from 'lucide-svelte';
const me = new AccountCoState(FileShareAccount, {
const me = new AccountCoState({
resolve: {
profile: true,
root: {
sharedFiles: {
$each: true
}
},
}
}
});
$inspect(me);
const sharedFiles = $derived(me.current?.root.sharedFiles);
let fileInput: HTMLInputElement;
@@ -55,7 +53,7 @@
}
}
async function deleteFile(file: Loaded<typeof SharedFile>) {
async function deleteFile(file: SharedFile) {
if (!sharedFiles) return;
const index = sharedFiles.indexOf(file);
@@ -109,7 +107,10 @@
{#if sharedFiles.length}
{#each sharedFiles as file}
{#if file}
<FileItem {file} onDelete={deleteFile} />
<FileItem
{file}
onDelete={deleteFile}
/>
{/if}
{/each}
{:else}

View File

@@ -1,18 +1,19 @@
<script lang="ts">
import { page } from '$app/stores';
import { CoState } from 'jazz-svelte';
import { CoState } from 'jazz-svelte';
import { SharedFile } from '$lib/schema';
import { File, FileDown, Link2 } from 'lucide-svelte';
import type { ID } from 'jazz-tools';
import { FileStream } from 'jazz-tools';
import { toast } from 'svelte-sonner';
import { downloadFileBlob } from '$lib/utils';
const fileId = $page.params.fileId;
const file = $derived(new CoState(SharedFile, fileId));
const file = $derived(new CoState(SharedFile, fileId as ID<SharedFile>));
const isAdmin = $derived(file.current?._owner?.myRole() === 'admin');
const fileStreamId = $derived(file.current?._refs?.file?.id);
const fileStreamId = $derived(file.current?._refs.file?.id);
async function downloadFile() {
if (!fileStreamId || !file.current) {

View File

@@ -1,172 +1,5 @@
# jazz-tailwind-demo-auth-starter
## 0.0.58
### Patch Changes
- Updated dependencies [e7e505e]
- Updated dependencies [13b57aa]
- Updated dependencies [5662faa]
- Updated dependencies [2116a59]
- jazz-tools@0.14.21
- jazz-inspector@0.14.21
- jazz-react@0.14.21
## 0.0.57
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-inspector@0.14.20
- jazz-react@0.14.20
## 0.0.56
### Patch Changes
- jazz-inspector@0.14.19
- jazz-react@0.14.19
- jazz-tools@0.14.19
## 0.0.55
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-inspector@0.14.18
- jazz-react@0.14.18
## 0.0.54
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-inspector@0.14.17
- jazz-react@0.14.17
## 0.0.53
### Patch Changes
- jazz-inspector@0.14.16
- jazz-react@0.14.16
- jazz-tools@0.14.16
## 0.0.52
### Patch Changes
- Updated dependencies [f9590f9]
- jazz-react@0.14.15
- jazz-inspector@0.14.15
- jazz-tools@0.14.15
## 0.0.51
### Patch Changes
- Updated dependencies [e32a1f7]
- jazz-tools@0.14.14
- jazz-inspector@0.14.14
- jazz-react@0.14.14
## 0.0.50
### Patch Changes
- jazz-inspector@0.14.13
- jazz-react@0.14.13
## 0.0.49
### Patch Changes
- jazz-inspector@0.14.12
- jazz-react@0.14.12
## 0.0.48
### Patch Changes
- Updated dependencies [dc746a2]
- Updated dependencies [f869d9a]
- Updated dependencies [3fe6832]
- jazz-inspector@0.14.10
- jazz-react@0.14.10
- jazz-tools@0.14.10
## 0.0.47
### Patch Changes
- Updated dependencies [22c2600]
- jazz-tools@0.14.9
- jazz-inspector@0.14.9
- jazz-react@0.14.9
## 0.0.46
### Patch Changes
- Updated dependencies [637ae13]
- jazz-tools@0.14.8
- jazz-inspector@0.14.8
- jazz-react@0.14.8
## 0.0.45
### Patch Changes
- Updated dependencies [365b0ea]
- jazz-tools@0.14.7
- jazz-inspector@0.14.7
- jazz-react@0.14.7
## 0.0.44
### Patch Changes
- Updated dependencies [9d6d9fe]
- Updated dependencies [9d6d9fe]
- jazz-tools@0.14.6
- jazz-inspector@0.14.6
- jazz-react@0.14.6
## 0.0.43
### Patch Changes
- Updated dependencies [91cbb2f]
- Updated dependencies [20b3d88]
- jazz-tools@0.14.5
- jazz-inspector@0.14.5
- jazz-react@0.14.5
## 0.0.42
### Patch Changes
- Updated dependencies [011af55]
- jazz-tools@0.14.4
- jazz-inspector@0.14.4
- jazz-react@0.14.4
## 0.0.41
### Patch Changes
- Updated dependencies [3d1027f]
- Updated dependencies [c240eed]
- jazz-tools@0.14.2
- jazz-inspector@0.14.2
- jazz-react@0.14.2
## 0.0.40
### Patch Changes

View File

@@ -2,7 +2,7 @@
This is an example of how to upload and render images with Jazz.
Live version: [https://file-upload-demo.jazz.tools](https://file-upload-demo.jazz.tools)
Live version: https://file-upload-demo.jazz.tools
## Getting started

View File

@@ -1,7 +1,7 @@
{
"name": "filestream",
"private": true,
"version": "0.0.58",
"version": "0.0.40",
"type": "module",
"scripts": {
"dev": "vite",
@@ -14,20 +14,20 @@
"jazz-react": "workspace:*",
"jazz-tools": "workspace:*",
"jazz-inspector": "workspace:*",
"react": "19.0.0",
"react-dom": "19.0.0"
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.5.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.3",
"autoprefixer": "^10.4.20",
"globals": "^15.11.0",
"is-ci": "^3.0.1",
"postcss": "^8.5.3",
"tailwindcss": "^3.4.17",
"typescript": "5.6.2",
"vite": "6.3.5"
"vite": "6.0.11"
}
}

View File

@@ -1,6 +1,6 @@
"use client";
import { useAccount } from "jazz-react";
import { co } from "jazz-tools";
import { FileStream, co } from "jazz-tools";
import { useRef, useState } from "react";
import { JazzAccount } from "./schema";
@@ -125,7 +125,7 @@ export function FileWidget() {
try {
setIsUploading(true);
me.profile.file = await co.fileStream().createFromBlob(file, {
me.profile.file = await FileStream.createFromBlob(file, {
onProgress: (p) => setProgress(Math.round(p * 100)),
});
} catch (error) {

View File

@@ -1,155 +1,5 @@
# form
## 0.1.59
### Patch Changes
- Updated dependencies [e7e505e]
- Updated dependencies [13b57aa]
- Updated dependencies [5662faa]
- Updated dependencies [2116a59]
- jazz-tools@0.14.21
- jazz-react@0.14.21
## 0.1.58
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-react@0.14.20
## 0.1.57
### Patch Changes
- jazz-react@0.14.19
- jazz-tools@0.14.19
## 0.1.56
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-react@0.14.18
## 0.1.55
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-react@0.14.17
## 0.1.54
### Patch Changes
- jazz-react@0.14.16
- jazz-tools@0.14.16
## 0.1.53
### Patch Changes
- Updated dependencies [f9590f9]
- jazz-react@0.14.15
- jazz-tools@0.14.15
## 0.1.52
### Patch Changes
- Updated dependencies [e32a1f7]
- jazz-tools@0.14.14
- jazz-react@0.14.14
## 0.1.51
### Patch Changes
- jazz-react@0.14.13
## 0.1.50
### Patch Changes
- jazz-react@0.14.12
## 0.1.49
### Patch Changes
- Updated dependencies [dc746a2]
- Updated dependencies [f869d9a]
- Updated dependencies [3fe6832]
- hash-slash@0.2.3
- jazz-react@0.14.10
- jazz-tools@0.14.10
## 0.1.48
### Patch Changes
- Updated dependencies [22c2600]
- jazz-tools@0.14.9
- jazz-react@0.14.9
## 0.1.47
### Patch Changes
- Updated dependencies [637ae13]
- jazz-tools@0.14.8
- jazz-react@0.14.8
## 0.1.46
### Patch Changes
- Updated dependencies [365b0ea]
- jazz-tools@0.14.7
- jazz-react@0.14.7
## 0.1.45
### Patch Changes
- Updated dependencies [9d6d9fe]
- Updated dependencies [9d6d9fe]
- jazz-tools@0.14.6
- jazz-react@0.14.6
## 0.1.44
### Patch Changes
- Updated dependencies [91cbb2f]
- Updated dependencies [20b3d88]
- jazz-tools@0.14.5
- jazz-react@0.14.5
## 0.1.43
### Patch Changes
- Updated dependencies [011af55]
- jazz-tools@0.14.4
- jazz-react@0.14.4
## 0.1.42
### Patch Changes
- Updated dependencies [3d1027f]
- Updated dependencies [c240eed]
- jazz-tools@0.14.2
- jazz-react@0.14.2
## 0.1.41
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "form",
"private": true,
"version": "0.1.59",
"version": "0.1.41",
"type": "module",
"scripts": {
"dev": "vite",
@@ -14,22 +14,22 @@
"hash-slash": "workspace:*",
"jazz-react": "workspace:*",
"jazz-tools": "workspace:*",
"react": "19.0.0",
"react-dom": "19.0.0"
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@playwright/test": "^1.50.1",
"@tailwindcss/forms": "^0.5.9",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.5.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.3",
"autoprefixer": "^10.4.20",
"globals": "^15.11.0",
"is-ci": "^3.0.1",
"postcss": "^8.4.27",
"tailwindcss": "^3.4.17",
"typescript": "5.6.2",
"vite": "6.3.5"
"vite": "6.0.11"
}
}

View File

@@ -1,154 +1,5 @@
# image-upload
## 0.0.115
### Patch Changes
- Updated dependencies [e7e505e]
- Updated dependencies [13b57aa]
- Updated dependencies [5662faa]
- Updated dependencies [2116a59]
- jazz-tools@0.14.21
- jazz-react@0.14.21
## 0.0.114
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-react@0.14.20
## 0.0.113
### Patch Changes
- jazz-react@0.14.19
- jazz-tools@0.14.19
## 0.0.112
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-react@0.14.18
## 0.0.111
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-react@0.14.17
## 0.0.110
### Patch Changes
- jazz-react@0.14.16
- jazz-tools@0.14.16
## 0.0.109
### Patch Changes
- Updated dependencies [f9590f9]
- jazz-react@0.14.15
- jazz-tools@0.14.15
## 0.0.108
### Patch Changes
- Updated dependencies [e32a1f7]
- jazz-tools@0.14.14
- jazz-react@0.14.14
## 0.0.107
### Patch Changes
- jazz-react@0.14.13
## 0.0.106
### Patch Changes
- jazz-react@0.14.12
## 0.0.105
### Patch Changes
- Updated dependencies [dc746a2]
- Updated dependencies [f869d9a]
- Updated dependencies [3fe6832]
- jazz-react@0.14.10
- jazz-tools@0.14.10
## 0.0.104
### Patch Changes
- Updated dependencies [22c2600]
- jazz-tools@0.14.9
- jazz-react@0.14.9
## 0.0.103
### Patch Changes
- Updated dependencies [637ae13]
- jazz-tools@0.14.8
- jazz-react@0.14.8
## 0.0.102
### Patch Changes
- Updated dependencies [365b0ea]
- jazz-tools@0.14.7
- jazz-react@0.14.7
## 0.0.101
### Patch Changes
- Updated dependencies [9d6d9fe]
- Updated dependencies [9d6d9fe]
- jazz-tools@0.14.6
- jazz-react@0.14.6
## 0.0.100
### Patch Changes
- Updated dependencies [91cbb2f]
- Updated dependencies [20b3d88]
- jazz-tools@0.14.5
- jazz-react@0.14.5
## 0.0.99
### Patch Changes
- Updated dependencies [011af55]
- jazz-tools@0.14.4
- jazz-react@0.14.4
## 0.0.98
### Patch Changes
- Updated dependencies [3d1027f]
- Updated dependencies [c240eed]
- jazz-tools@0.14.2
- jazz-react@0.14.2
## 0.0.97
### Patch Changes

View File

@@ -2,7 +2,7 @@
This is an example of how to upload and render images with Jazz.
Live version: [https://image-upload-demo.jazz.tools](https://image-upload-demo.jazz.tools)
Live version: https://image-upload-demo.jazz.tools
## Getting started

View File

@@ -1,7 +1,7 @@
{
"name": "image-upload",
"private": true,
"version": "0.0.115",
"version": "0.0.97",
"type": "module",
"scripts": {
"dev": "vite",
@@ -13,17 +13,17 @@
"dependencies": {
"jazz-react": "workspace:*",
"jazz-tools": "workspace:*",
"react": "19.0.0",
"react-dom": "19.0.0"
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.5.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.3",
"globals": "^15.11.0",
"typescript": "5.6.2",
"vite": "6.3.5",
"vite": "6.0.11",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.27",
"tailwindcss": "^3.4.17"

View File

@@ -1,131 +1,5 @@
# jazz-example-inspector
## 0.0.168
### Patch Changes
- Updated dependencies [c3d8779]
- cojson@0.14.21
- jazz-inspector@0.14.21
- cojson-transport-ws@0.14.21
## 0.0.167
### Patch Changes
- jazz-inspector@0.14.20
- cojson@0.14.20
- cojson-transport-ws@0.14.20
## 0.0.166
### Patch Changes
- cojson@0.14.19
- cojson-transport-ws@0.14.19
- jazz-inspector@0.14.19
## 0.0.165
### Patch Changes
- Updated dependencies [0d5ee3e]
- cojson@0.14.18
- jazz-inspector@0.14.18
- cojson-transport-ws@0.14.18
## 0.0.164
### Patch Changes
- jazz-inspector@0.14.17
## 0.0.163
### Patch Changes
- Updated dependencies [5e253cc]
- cojson@0.14.16
- cojson-transport-ws@0.14.16
- jazz-inspector@0.14.16
## 0.0.162
### Patch Changes
- Updated dependencies [23daa7c]
- cojson@0.14.15
- cojson-transport-ws@0.14.15
- jazz-inspector@0.14.15
## 0.0.161
### Patch Changes
- jazz-inspector@0.14.14
## 0.0.160
### Patch Changes
- jazz-inspector@0.14.13
## 0.0.159
### Patch Changes
- jazz-inspector@0.14.12
## 0.0.158
### Patch Changes
- Updated dependencies [dc746a2]
- jazz-inspector@0.14.10
- hash-slash@0.2.3
## 0.0.157
### Patch Changes
- jazz-inspector@0.14.9
## 0.0.156
### Patch Changes
- jazz-inspector@0.14.8
## 0.0.155
### Patch Changes
- jazz-inspector@0.14.7
## 0.0.154
### Patch Changes
- jazz-inspector@0.14.6
## 0.0.153
### Patch Changes
- jazz-inspector@0.14.5
## 0.0.152
### Patch Changes
- jazz-inspector@0.14.4
## 0.0.151
### Patch Changes
- jazz-inspector@0.14.2
## 0.0.150
### Patch Changes

View File

@@ -1,6 +1,6 @@
# Jazz Inspector
Live address: [https://inspector.jazz.tools](https://inspector.jazz.tools)
Live address: https://inspector.jazz.tools
Use this to visually inspect a Jazz account or other CoValue.

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-inspector-app",
"private": true,
"version": "0.0.168",
"version": "0.0.150",
"type": "module",
"scripts": {
"dev": "vite",
@@ -17,20 +17,20 @@
"cojson-transport-ws": "workspace:*",
"hash-slash": "workspace:*",
"lucide-react": "^0.274.0",
"react": "19.0.0",
"react-dom": "19.0.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router": "^6.16.0",
"react-router-dom": "^6.16.0",
"react-use": "^17.4.0"
},
"devDependencies": {
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react-swc": "^3.10.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react-swc": "^3.3.2",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.27",
"tailwindcss": "^3.4.17",
"typescript": "5.6.2",
"vite": "6.3.5"
"vite": "6.0.11"
}
}

View File

@@ -1,41 +0,0 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# env files (can opt-in for committing if needed)
.env*
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts

View File

@@ -1,69 +0,0 @@
# jazz-nextjs
## 0.1.8
### Patch Changes
- Updated dependencies [e7e505e]
- Updated dependencies [13b57aa]
- Updated dependencies [5662faa]
- Updated dependencies [2116a59]
- jazz-tools@0.14.21
- jazz-react@0.14.21
## 0.1.7
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-react@0.14.20
## 0.1.6
### Patch Changes
- jazz-react@0.14.19
- jazz-tools@0.14.19
## 0.1.5
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-react@0.14.18
## 0.1.4
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-react@0.14.17
## 0.1.3
### Patch Changes
- jazz-react@0.14.16
- jazz-tools@0.14.16
## 0.1.2
### Patch Changes
- Updated dependencies [f9590f9]
- jazz-react@0.14.15
- jazz-tools@0.14.15
## 0.1.1
### Patch Changes
- Updated dependencies [e32a1f7]
- jazz-tools@0.14.14
- jazz-react@0.14.14

View File

@@ -1,36 +0,0 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
## Getting Started
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/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
## 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/app/building-your-application/deploying) for more details.

View File

@@ -1,7 +0,0 @@
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here */
};
export default nextConfig;

View File

@@ -1,26 +0,0 @@
{
"name": "jazz-nextjs",
"version": "0.1.8",
"private": true,
"scripts": {
"dev": "next dev --turbopack",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"react": "^19.0.0",
"react-dom": "^19.0.0",
"next": "15.3.2",
"jazz-react": "workspace:*",
"jazz-tools": "workspace:*"
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"@tailwindcss/postcss": "^4",
"tailwindcss": "^4"
}
}

View File

@@ -1,5 +0,0 @@
const config = {
plugins: ["@tailwindcss/postcss"],
};
export default config;

View File

@@ -1,26 +0,0 @@
@import "tailwindcss";
:root {
--background: #ffffff;
--foreground: #171717;
}
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: var(--font-geist-sans);
--font-mono: var(--font-geist-mono);
}
@media (prefers-color-scheme: dark) {
:root {
--background: #0a0a0a;
--foreground: #ededed;
}
}
body {
background: var(--background);
color: var(--foreground);
font-family: Arial, Helvetica, sans-serif;
}

View File

@@ -1,35 +0,0 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { Jazz } from "../jazz";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
};
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
<Jazz>{children}</Jazz>
</body>
</html>
);
}

View File

@@ -1,46 +0,0 @@
"use client";
import { useAccount } from "jazz-react";
import { Account } from "jazz-tools";
import Link from "next/link";
export default function Home() {
const { me } = useAccount(Account, {
resolve: {
profile: true,
},
});
return (
<div className="flex flex-col items-center justify-center h-screen gap-4">
<h1 className="text-2xl font-bold">SSR rendering example with Jazz</h1>
<div className="text-sm text-gray-500 w-1/2 text-center">
Data is still loaded only on the client, the components are rendered on
the server with all the CoValues as null
</div>
<label>
<div className="text-sm">
Your profile name{" "}
<span className="text-xs">(only loaded on the client)</span>
</div>
<input
className="border-2 border-gray-300 rounded-md p-2 w-full"
value={me?.profile.name ?? ""}
onChange={(e) => {
if (!me) {
return;
}
me.profile.name = e.target.value;
}}
/>
</label>
<Link
href={`/profile/${me?.profile.id}`}
className="bg-blue-500 text-white px-4 py-2 rounded-md"
>
Your profile name in a Server Component
</Link>
</div>
);
}

View File

@@ -1,23 +0,0 @@
import { jazzSSR } from "@/jazzSSR";
import { Profile } from "jazz-tools";
export default async function ServerSidePage(props: {
params: Promise<{ profileId: string }>;
}) {
const { profileId } = await props.params;
const profile = await Profile.load(profileId, {
loadAs: jazzSSR,
});
return (
<div className="flex flex-col items-center justify-center h-screen gap-4">
<h1 className="text-2xl font-bold">SSR rendering example with Jazz</h1>
<div className="text-sm text-gray-500 w-1/2 text-center">
This is a server component!
</div>
<label>
<div className="text-sm">Your profile name "{profile?.name}"</div>
</label>
</div>
);
}

View File

@@ -1,16 +0,0 @@
"use client";
import { JazzProvider } from "jazz-react";
export function Jazz({ children }: { children: React.ReactNode }) {
return (
<JazzProvider
experimental_enableSSR
sync={{
peer: `wss://cloud.jazz.tools/`,
}}
>
{children}
</JazzProvider>
);
}

View File

@@ -1,5 +0,0 @@
import { createSSRJazzAgent } from "jazz-react/ssr";
export const jazzSSR = createSSRJazzAgent({
peer: "wss://cloud.jazz.tools/",
});

View File

@@ -1,27 +0,0 @@
{
"compilerOptions": {
"target": "ES2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}

View File

@@ -27,20 +27,20 @@
"jazz-react": "workspace:*",
"jazz-tools": "workspace:*",
"lucide-react": "^0.485.0",
"react": "19.0.0",
"react-dom": "19.0.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"tailwind-merge": "^3.0.2",
"tailwindcss": "^4.0.17",
"tw-animate-css": "^1.2.5"
},
"devDependencies": {
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.4",
"jazz-run": "workspace:*",
"npm-run-all": "^4.1.5",
"tsx": "^4.19.3",
"typescript": "~5.6.2",
"vite": "6.3.5"
"vite": "6.0.11"
}
}

View File

@@ -10,7 +10,7 @@ import { Input } from "@/components/ui/input";
import { WORKER_ID } from "@/constants";
import { JoinGameRequest, WaitingRoom } from "@/schema";
import { createFileRoute, redirect } from "@tanstack/react-router";
import { Group, InboxSender } from "jazz-tools";
import { Group, InboxSender, type Loaded } from "jazz-tools";
import { ClipboardCopyIcon, Loader2Icon } from "lucide-react";
import { useEffect, useState } from "react";
@@ -29,7 +29,10 @@ export const Route = createFileRoute(
throw redirect({ to: "/" });
}
if (!waitingRoom?.account1?.isMe) {
const sender = await InboxSender.load<JoinGameRequest, WaitingRoom>(
const sender = await InboxSender.load<
Loaded<typeof JoinGameRequest>,
Loaded<typeof WaitingRoom>
>(
WORKER_ID,
me,
// { account1: {}, account2: {}, me, game: {} },

View File

@@ -4,7 +4,6 @@ export const Player = co.map({
account: co.account(),
playSelection: z.optional(z.literal(["rock", "paper", "scissors"])),
});
export type Player = co.loaded<typeof Player>;
export const Game = co.map({
player1: Player,
@@ -13,14 +12,12 @@ export const Game = co.map({
player1Score: z.number(),
player2Score: z.number(),
});
export type Game = co.loaded<typeof Game>;
export const WaitingRoom = co.map({
account1: co.account(),
account2: z.optional(co.account()),
game: z.optional(Game),
});
export type WaitingRoom = co.loaded<typeof WaitingRoom>;
export const PlayIntent = co.map({
type: z.literal("play"),
@@ -28,29 +25,24 @@ export const PlayIntent = co.map({
player: z.literal(["player1", "player2"]),
playSelection: z.literal(["rock", "paper", "scissors"]),
});
export type PlayIntent = co.loaded<typeof PlayIntent>;
export const NewGameIntent = co.map({
type: z.literal("newGame"),
gameId: z.string(),
});
export type NewGameIntent = co.loaded<typeof NewGameIntent>;
export const CreateGameRequest = co.map({
type: z.literal("createGame"),
});
export type CreateGameRequest = co.loaded<typeof CreateGameRequest>;
export const JoinGameRequest = co.map({
type: z.literal("joinGame"),
waitingRoom: WaitingRoom,
});
export type JoinGameRequest = co.loaded<typeof JoinGameRequest>;
export const InboxMessage = z.discriminatedUnion("type", [
export const InboxMessage = z.discriminatedUnion([
PlayIntent,
NewGameIntent,
CreateGameRequest,
JoinGameRequest,
]);
export type InboxMessage = co.loaded<typeof InboxMessage>;

View File

@@ -7,7 +7,7 @@ import {
WaitingRoom,
} from "@/schema";
import { startWorker } from "jazz-nodejs";
import { Account, Group, co } from "jazz-tools";
import { Account, Group, type Loaded, co } from "jazz-tools";
import { determineWinner } from "./lib/utils";
if (!process.env.VITE_JAZZ_WORKER_ACCOUNT || !process.env.JAZZ_WORKER_SECRET) {
@@ -124,7 +124,10 @@ function createPlayer({ account }: CreatePlayerParams) {
return player;
}
async function handleNewGameIntent(_: string, message: NewGameIntent) {
async function handleNewGameIntent(
_: string,
message: Loaded<typeof NewGameIntent>,
) {
const gameId = message.gameId;
const game = await Game.load(gameId, {
@@ -149,7 +152,7 @@ async function handleNewGameIntent(_: string, message: NewGameIntent) {
}
}
async function handlePlayIntent(_: string, message: PlayIntent) {
async function handlePlayIntent(_: string, message: Loaded<typeof PlayIntent>) {
// determine current player, update game with outcome
const gameId = message.gameId;
if (!gameId) {

View File

@@ -1,154 +1,5 @@
# multi-cursors
## 0.0.111
### Patch Changes
- Updated dependencies [e7e505e]
- Updated dependencies [13b57aa]
- Updated dependencies [5662faa]
- Updated dependencies [2116a59]
- jazz-tools@0.14.21
- jazz-react@0.14.21
## 0.0.110
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-react@0.14.20
## 0.0.109
### Patch Changes
- jazz-react@0.14.19
- jazz-tools@0.14.19
## 0.0.108
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-react@0.14.18
## 0.0.107
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-react@0.14.17
## 0.0.106
### Patch Changes
- jazz-react@0.14.16
- jazz-tools@0.14.16
## 0.0.105
### Patch Changes
- Updated dependencies [f9590f9]
- jazz-react@0.14.15
- jazz-tools@0.14.15
## 0.0.104
### Patch Changes
- Updated dependencies [e32a1f7]
- jazz-tools@0.14.14
- jazz-react@0.14.14
## 0.0.103
### Patch Changes
- jazz-react@0.14.13
## 0.0.102
### Patch Changes
- jazz-react@0.14.12
## 0.0.101
### Patch Changes
- Updated dependencies [dc746a2]
- Updated dependencies [f869d9a]
- Updated dependencies [3fe6832]
- jazz-react@0.14.10
- jazz-tools@0.14.10
## 0.0.100
### Patch Changes
- Updated dependencies [22c2600]
- jazz-tools@0.14.9
- jazz-react@0.14.9
## 0.0.99
### Patch Changes
- Updated dependencies [637ae13]
- jazz-tools@0.14.8
- jazz-react@0.14.8
## 0.0.98
### Patch Changes
- Updated dependencies [365b0ea]
- jazz-tools@0.14.7
- jazz-react@0.14.7
## 0.0.97
### Patch Changes
- Updated dependencies [9d6d9fe]
- Updated dependencies [9d6d9fe]
- jazz-tools@0.14.6
- jazz-react@0.14.6
## 0.0.96
### Patch Changes
- Updated dependencies [91cbb2f]
- Updated dependencies [20b3d88]
- jazz-tools@0.14.5
- jazz-react@0.14.5
## 0.0.95
### Patch Changes
- Updated dependencies [011af55]
- jazz-tools@0.14.4
- jazz-react@0.14.4
## 0.0.94
### Patch Changes
- Updated dependencies [3d1027f]
- Updated dependencies [c240eed]
- jazz-tools@0.14.2
- jazz-react@0.14.2
## 0.0.93
### Patch Changes

View File

@@ -1,7 +1,6 @@
# Jazz Multi-Cursors Example
Track user presence on a canvas with multiple cursors and out of bounds indicators.
Live version: [https://multi-cursors-demo.jazz.tools/](https://multi-cursors-demo.jazz.tools/)
## Getting started

View File

@@ -1,7 +1,7 @@
{
"name": "multi-cursors",
"private": true,
"version": "0.0.111",
"version": "0.0.93",
"type": "module",
"scripts": {
"dev": "vite",
@@ -15,22 +15,21 @@
"@react-spring/web": "^9.7.5",
"jazz-react": "workspace:*",
"jazz-tools": "workspace:*",
"react": "19.0.0",
"react-dom": "19.0.0",
"zod": "3.25.28"
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.5.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.3",
"autoprefixer": "^10.4.20",
"globals": "^15.11.0",
"is-ci": "^3.0.1",
"postcss": "^8.4.27",
"tailwindcss": "^3.4.17",
"typescript": "5.6.2",
"vite": "6.3.5",
"vite": "6.0.11",
"vitest": "3.1.1"
}
}

View File

@@ -78,7 +78,6 @@ export function Cursor({
return (
<>
{/* @ts-expect-error - TODO: invalid after the React 19 upgrade */}
<animated.g
transform={to(
[springs.x, springs.y],
@@ -114,7 +113,6 @@ export function Cursor({
isOutOfBounds={isStrictlyOutOfBounds}
/>
{isStrictlyOutOfBounds ? (
// @ts-expect-error - TODO: invalid after the React 19 upgrade
<animated.g
transform={to(
[intersectionSprings.x, intersectionSprings.y],

View File

@@ -52,7 +52,6 @@ export function CursorLabel({
return (
<>
{/* @ts-expect-error - TODO: invalid after the React 19 upgrade */}
<animated.text
ref={textRef}
x={to([labelSprings.x], (x) => x)}

View File

@@ -36,7 +36,7 @@ export const CursorAccount = co
if (account.profile === undefined) {
const group = Group.create();
group.makePublic(); // The profile info is visible to everyone
group.addMember("everyone", "reader"); // The profile info is visible to everyone
account.profile = CursorProfile.create(
{

View File

@@ -1,172 +1,5 @@
# multiauth
## 0.0.59
### Patch Changes
- Updated dependencies [e7e505e]
- Updated dependencies [13b57aa]
- Updated dependencies [5662faa]
- Updated dependencies [2116a59]
- jazz-tools@0.14.21
- jazz-react@0.14.21
- jazz-react-auth-clerk@0.14.21
## 0.0.58
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-react@0.14.20
- jazz-react-auth-clerk@0.14.20
## 0.0.57
### Patch Changes
- jazz-react@0.14.19
- jazz-react-auth-clerk@0.14.19
- jazz-tools@0.14.19
## 0.0.56
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-react@0.14.18
- jazz-react-auth-clerk@0.14.18
## 0.0.55
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-react@0.14.17
- jazz-react-auth-clerk@0.14.17
## 0.0.54
### Patch Changes
- jazz-react@0.14.16
- jazz-react-auth-clerk@0.14.16
- jazz-tools@0.14.16
## 0.0.53
### Patch Changes
- Updated dependencies [f9590f9]
- jazz-react@0.14.15
- jazz-react-auth-clerk@0.14.15
- jazz-tools@0.14.15
## 0.0.52
### Patch Changes
- Updated dependencies [e32a1f7]
- jazz-tools@0.14.14
- jazz-react@0.14.14
- jazz-react-auth-clerk@0.14.14
## 0.0.51
### Patch Changes
- jazz-react@0.14.13
- jazz-react-auth-clerk@0.14.13
## 0.0.50
### Patch Changes
- jazz-react@0.14.12
- jazz-react-auth-clerk@0.14.12
## 0.0.49
### Patch Changes
- Updated dependencies [dc746a2]
- Updated dependencies [f869d9a]
- Updated dependencies [3fe6832]
- jazz-react-auth-clerk@0.14.10
- jazz-react@0.14.10
- jazz-tools@0.14.10
## 0.0.48
### Patch Changes
- Updated dependencies [22c2600]
- jazz-tools@0.14.9
- jazz-react@0.14.9
- jazz-react-auth-clerk@0.14.9
## 0.0.47
### Patch Changes
- Updated dependencies [637ae13]
- jazz-tools@0.14.8
- jazz-react@0.14.8
- jazz-react-auth-clerk@0.14.8
## 0.0.46
### Patch Changes
- Updated dependencies [365b0ea]
- jazz-tools@0.14.7
- jazz-react@0.14.7
- jazz-react-auth-clerk@0.14.7
## 0.0.45
### Patch Changes
- Updated dependencies [9d6d9fe]
- Updated dependencies [9d6d9fe]
- jazz-tools@0.14.6
- jazz-react@0.14.6
- jazz-react-auth-clerk@0.14.6
## 0.0.44
### Patch Changes
- Updated dependencies [91cbb2f]
- Updated dependencies [20b3d88]
- jazz-tools@0.14.5
- jazz-react@0.14.5
- jazz-react-auth-clerk@0.14.5
## 0.0.43
### Patch Changes
- Updated dependencies [011af55]
- jazz-tools@0.14.4
- jazz-react@0.14.4
- jazz-react-auth-clerk@0.14.4
## 0.0.42
### Patch Changes
- Updated dependencies [3d1027f]
- Updated dependencies [c240eed]
- jazz-tools@0.14.2
- jazz-react@0.14.2
- jazz-react-auth-clerk@0.14.2
## 0.0.41
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "multiauth",
"private": true,
"version": "0.0.59",
"version": "0.0.41",
"type": "module",
"scripts": {
"dev": "vite",
@@ -15,16 +15,16 @@
"jazz-react": "workspace:*",
"jazz-react-auth-clerk": "workspace:*",
"jazz-tools": "workspace:*",
"react": "19.0.0",
"react-dom": "19.0.0"
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.5.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.3",
"globals": "^15.11.0",
"typescript": "5.6.2",
"vite": "6.3.5"
"vite": "6.0.11"
}
}

View File

@@ -1,172 +1,5 @@
# jazz-example-musicplayer
## 0.0.140
### Patch Changes
- Updated dependencies [e7e505e]
- Updated dependencies [13b57aa]
- Updated dependencies [5662faa]
- Updated dependencies [2116a59]
- jazz-tools@0.14.21
- jazz-inspector@0.14.21
- jazz-react@0.14.21
## 0.0.139
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-inspector@0.14.20
- jazz-react@0.14.20
## 0.0.138
### Patch Changes
- jazz-inspector@0.14.19
- jazz-react@0.14.19
- jazz-tools@0.14.19
## 0.0.137
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-inspector@0.14.18
- jazz-react@0.14.18
## 0.0.136
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-inspector@0.14.17
- jazz-react@0.14.17
## 0.0.135
### Patch Changes
- jazz-inspector@0.14.16
- jazz-react@0.14.16
- jazz-tools@0.14.16
## 0.0.134
### Patch Changes
- Updated dependencies [f9590f9]
- jazz-react@0.14.15
- jazz-inspector@0.14.15
- jazz-tools@0.14.15
## 0.0.133
### Patch Changes
- Updated dependencies [e32a1f7]
- jazz-tools@0.14.14
- jazz-inspector@0.14.14
- jazz-react@0.14.14
## 0.0.132
### Patch Changes
- jazz-inspector@0.14.13
- jazz-react@0.14.13
## 0.0.131
### Patch Changes
- jazz-inspector@0.14.12
- jazz-react@0.14.12
## 0.0.130
### Patch Changes
- Updated dependencies [dc746a2]
- Updated dependencies [f869d9a]
- Updated dependencies [3fe6832]
- jazz-inspector@0.14.10
- jazz-react@0.14.10
- jazz-tools@0.14.10
## 0.0.129
### Patch Changes
- Updated dependencies [22c2600]
- jazz-tools@0.14.9
- jazz-inspector@0.14.9
- jazz-react@0.14.9
## 0.0.128
### Patch Changes
- Updated dependencies [637ae13]
- jazz-tools@0.14.8
- jazz-inspector@0.14.8
- jazz-react@0.14.8
## 0.0.127
### Patch Changes
- Updated dependencies [365b0ea]
- jazz-tools@0.14.7
- jazz-inspector@0.14.7
- jazz-react@0.14.7
## 0.0.126
### Patch Changes
- Updated dependencies [9d6d9fe]
- Updated dependencies [9d6d9fe]
- jazz-tools@0.14.6
- jazz-inspector@0.14.6
- jazz-react@0.14.6
## 0.0.125
### Patch Changes
- Updated dependencies [91cbb2f]
- Updated dependencies [20b3d88]
- jazz-tools@0.14.5
- jazz-inspector@0.14.5
- jazz-react@0.14.5
## 0.0.124
### Patch Changes
- Updated dependencies [011af55]
- jazz-tools@0.14.4
- jazz-inspector@0.14.4
- jazz-react@0.14.4
## 0.0.123
### Patch Changes
- Updated dependencies [3d1027f]
- Updated dependencies [c240eed]
- jazz-tools@0.14.2
- jazz-inspector@0.14.2
- jazz-react@0.14.2
## 0.0.122
### Patch Changes

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