Compare commits

..

223 Commits

Author SHA1 Message Date
Guido D'Orsi
a383c7e984 Merge pull request #2432 from garden-co/changeset-release/main
Version Packages
2025-06-05 13:11:13 +02:00
github-actions[bot]
8ca283147d Version Packages 2025-06-05 11:04:14 +00:00
Guido D'Orsi
c3d87796ed chore: update changeset 2025-06-05 13:00:37 +02:00
Guido D'Orsi
cb88caced9 fix(comap): return a valid value on _createdAt even when setting a custom uniqueness value 2025-06-05 12:58:26 +02:00
Guido D'Orsi
6313ead62d Revert "fix: use creation time from CoValue header"
This reverts commit cc0479afe0.
2025-06-05 12:38:23 +02:00
Guido D'Orsi
f674910aa9 Merge pull request #2426 from garden-co/emil/comap-time-getters
feat: `_createdAt` and `_lastUpdatedAt`
2025-06-05 12:23:23 +02:00
Guido D'Orsi
37fc25f5a6 Merge pull request #2434 from garden-co/fix/svelte-costate
Fix id reactivity on CoState for Svelte 5.33 (second try)
2025-06-05 12:22:19 +02:00
Guido D'Orsi
5e9c338c27 Merge pull request #2436 from garden-co/feat/react-19-updates
fix(react-19): optimize re-renders when the values are already in memory
2025-06-05 12:21:55 +02:00
Guido D'Orsi
4b61f7c7a5 chore: format 2025-06-05 12:20:58 +02:00
Guido D'Orsi
1c8472ffbd Merge pull request #2441 from garden-co/fix/union-schema-conversion
Fix union schemas in anySchemaToCoSchema
2025-06-05 12:19:33 +02:00
Benjamin S. Leveritt
9dba68ac36 Remove migration script
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-06-05 11:18:29 +01:00
Anselm
13b57aa576 Add changeset 2025-06-05 11:10:05 +01:00
Anselm
aedf0f3ac5 Fix union schemas in anySchemaToCoSchema 2025-06-05 11:09:06 +01:00
Benjamin S. Leveritt
7fa61644b0 Revert turbo.json to original state 2025-06-05 10:19:22 +01:00
Benjamin S. Leveritt
12389c82f9 Add migration script to update all projects to enhanced ignore script 2025-06-05 10:05:16 +01:00
Benjamin S. Leveritt
4c03a17d3a Optimize turbo.json for better caching and build performance 2025-06-05 10:04:51 +01:00
Benjamin S. Leveritt
5d1ea45a9c Add enhanced Vercel build ignore script with change detection 2025-06-05 10:04:34 +01:00
Emil Sayahi
cc0479afe0 fix: use creation time from CoValue header 2025-06-04 15:45:59 -07:00
Emil Sayahi
cfb6786468 feat(jazz-expo): API for clearing local DB (#2427)
* feat(jazz-expo): API for clearing local DB

todo:
- tests
- changeset

* Revert "feat(jazz-expo): API for clearing local DB"

This reverts commit 459e1d04ea.

* feat(jazz-expo): API for clearing local DB

* chore: changeset

* Update .changeset/plenty-ways-smash.md

Co-authored-by: Guido D'Orsi <guido@garden.co>

---------

Co-authored-by: Guido D'Orsi <guido@garden.co>
2025-06-04 12:35:04 -07:00
Emil Sayahi
5662faa9c0 chore: changeset 2025-06-04 12:10:15 -07:00
Emil Sayahi
3e7d9cb585 feat: tests 2025-06-04 12:08:56 -07:00
Guido D'Orsi
2116a598ae fix(react-19): optimize re-renders when the values are already in memory 2025-06-04 19:34:12 +02:00
Guido D'Orsi
d14a069a12 Fix id reactivity on CoState for Svelte 5.33 (second try) 2025-06-04 16:11:14 +02:00
Anselm Eickhoff
aacef80994 Merge pull request #2433 from garden-co/fix/team-page
update team page, adding me and making all socials the same order
2025-06-04 14:46:10 +01:00
Sammii
2a237e5d32 amending file .ext 2025-06-04 14:39:27 +01:00
Sammii
0fe30eca0b update team page, adding me and making all socials the same order 2025-06-04 14:23:40 +01:00
Guido D'Orsi
dea7a8dfd9 Merge pull request #2282 from Wizzel1/Add-missing-discriminator
Add missing discriminator
2025-06-04 15:21:29 +02:00
Guido D'Orsi
ab7191bed0 Merge remote-tracking branch 'origin/main' into Add-missing-discriminator 2025-06-04 15:12:14 +02:00
Guido D'Orsi
901b7c0a51 Merge pull request #2377 from garden-co/2376-groupmakepublic-as-an-alias
Add makePublic to group
2025-06-04 15:02:05 +02:00
Benjamin S. Leveritt
17bea5975c Merge pull request #2430 from garden-co/test-create-jazz-app
Test `create-jazz-app`
2025-06-04 12:54:56 +01:00
Benjamin S. Leveritt
e005ecd0a1 Add changeset 2025-06-04 12:08:27 +01:00
Benjamin S. Leveritt
e7e505e5f3 Add changeset 2025-06-04 12:03:58 +01:00
Benjamin S. Leveritt
d6ffe03d3c Add makePublic to docs 2025-06-04 12:02:18 +01:00
Benjamin S. Leveritt
1120747a24 Add makePublic alias to some example apps 2025-06-04 11:50:24 +01:00
Benjamin S. Leveritt
1e2d7d1c4e Add makePublic to group 2025-06-04 11:44:06 +01:00
Benjamin S. Leveritt
e26f110acd Merge pull request #2428 from garden-co/feature/co-map-migrations
Tweak CoMap migration copy and examples
2025-06-04 11:37:21 +01:00
Benjamin S. Leveritt
28f84a4ee6 Update lock 2025-06-04 11:31:36 +01:00
Benjamin S. Leveritt
cffe4abb84 Handle SIGINT gracefully 2025-06-04 11:21:00 +01:00
Benjamin S. Leveritt
2e0b7cee8c Refactor package manager detection into utils 2025-06-04 11:21:00 +01:00
Benjamin S. Leveritt
d3b47f59e8 Add automatic tests 2025-06-04 11:21:00 +01:00
Benjamin S. Leveritt
aea3287965 Merge pull request #2373 from lukahartwig/main
Set default package manager based on command runner
2025-06-04 11:17:25 +01:00
Benjamin S. Leveritt
6525f8a12e Merge pull request #2325 from garden-co/2324-turbo-dev-doesnt-need-to-build-the-local-package
Turbo just builds deps now
2025-06-04 09:11:16 +01:00
Benjamin S. Leveritt
fe4c934a4b Tweak copy and examples in the docs 2025-06-04 08:26:05 +01:00
Emil Sayahi
60261c8dba feat: _createdAt and _lastUpdatedAt 2025-06-03 13:34:55 -07:00
Guido D'Orsi
7411049faa Merge pull request #2423 from garden-co/changeset-release/main
Version Packages
2025-06-03 19:48:03 +02:00
github-actions[bot]
356b06559b Version Packages 2025-06-03 17:45:08 +00:00
Guido D'Orsi
193738cfe2 Merge pull request #2405 from garden-co/feature/co-map-migrations
feat: add support for coMap migrations
2025-06-03 19:40:53 +02:00
Guido D'Orsi
ddb74fa167 docs: remove unused import 2025-06-03 19:35:31 +02:00
Guido D'Orsi
aca5642671 Merge pull request #2422 from garden-co/changeset-release/main
Version Packages
2025-06-03 19:27:45 +02:00
github-actions[bot]
a5bed20c4a Version Packages 2025-06-03 17:25:46 +00:00
Guido D'Orsi
09bf53a8d3 Merge pull request #2421 from garden-co/fix/react-native-account-schema
fix: fix the AccountSchema prop type to accept co.account schemas
2025-06-03 19:22:11 +02:00
Guido D'Orsi
061ec996b1 fix: F=fix the AccountSchema prop type to accept co.account schemas 2025-06-03 19:17:19 +02:00
Guido D'Orsi
a7ee0465b5 docs: small fix 2025-06-03 18:35:04 +02:00
Guido D'Orsi
e995d8a1fe chore: fix type issue in todo example 2025-06-03 17:50:17 +02:00
Guido D'Orsi
5ccb48446e docs: cover CoMap migrations 2025-06-03 17:46:12 +02:00
Guido D'Orsi
04b20c2e42 fix: fix castAs for Zod schemas and make the CoMap migrations stable 2025-06-03 17:14:59 +02:00
Benjamin S. Leveritt
7aae2441a1 Merge pull request #2231 from garden-co/2223-history-and-time-travel-doc
2223-history-and-time-travel-doc
2025-06-03 14:35:30 +01:00
Benjamin S. Leveritt
650e95a528 Merge pull request #2414 from garden-co/2412-fix-jazz-vue-builds-following-014
Add typecheck to jazz-vue before build
2025-06-03 14:34:53 +01:00
Benjamin S. Leveritt
3d80ab11d9 Minor tweak for efficiency 2025-06-03 14:32:59 +01:00
Benjamin S. Leveritt
85e6489a3e Add note about finding from field.all and chronological order 2025-06-03 14:30:03 +01:00
Benjamin S. Leveritt
45b6c87ade Fix chronological order notes 2025-06-03 14:16:39 +01:00
Guido D'Orsi
edadc4b986 Merge pull request #2411 from garden-co/fix/id-reactivity
fix: fix id reactivity in CoState for svelte > 5.33
2025-06-03 15:06:56 +02:00
Benjamin S. Leveritt
455b722357 Add typecheck before build 2025-06-03 13:25:53 +01:00
Benjamin S. Leveritt
ad2e1d1e98 Suppress the supressions
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-06-03 13:17:37 +01:00
Benjamin S. Leveritt
7c94b70c31 Add biome linting 2025-06-03 12:53:00 +01:00
Benjamin S. Leveritt
74bcf1752e Update Provider types 2025-06-03 12:16:42 +01:00
Guido D'Orsi
97a54b3911 fix: revert changes on src/lib/jazz.class.svelte.ts 2025-06-03 13:07:23 +02:00
Benjamin S. Leveritt
c393c8880f Fix import 2025-06-03 11:41:20 +01:00
Guido D'Orsi
359157fa70 chore: add comment 2025-06-03 12:40:02 +02:00
Guido D'Orsi
62d9680449 chore: update vite to the latest version 2025-06-03 12:38:45 +02:00
Trisha Lim
db6067439d fix missing date 2025-06-03 11:26:51 +01:00
Guido D'Orsi
5051d6a410 fix: fix id reactivity in CoState for svelte > 5.33 2025-06-03 12:23:18 +02:00
Trisha Lim
25efaf30f5 add docs for storing createdAt manually 2025-06-03 11:18:37 +01:00
Trisha Lim
98aadd9842 Show date created on version history example 2025-06-03 11:17:54 +01:00
Trisha Lim
d555b18c11 test homepage routes (#2399)
* test homepage routes

* add playwright.yml to homepage dir

* Revert "add playwright.yml to homepage dir"

This reverts commit f0507ee4f7dd29d25db56d3227937c901f9225a0.

* Add turbo dep to homepage

* Split homepage playwright script out

* remove playwright from test command

* install homepage deps

* update lock file

---------

Co-authored-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-06-03 09:25:28 +01:00
Benjamin S. Leveritt
550111f8a1 Merge pull request #2408 from garden-co/2407-remove-api-reference-from-build
Remove api references from build
2025-06-02 21:05:16 +01:00
Trisha Lim
3d4a00a19d Merge pull request #2409 from garden-co/fix/expo-dark-logo
fix: expo logo color on dark mode
2025-06-02 21:03:41 +01:00
Benjamin S. Leveritt
d06c6677dc Purge typedoc dep 2025-06-02 20:45:31 +01:00
Trisha Lim
ce30f3c4ff fix: expo logo color on dark mode 2025-06-02 20:32:23 +01:00
Benjamin S. Leveritt
1072b9c2fe Remove api ref docs from llms.txt 2025-06-02 20:28:24 +01:00
Benjamin S. Leveritt
5ea41c69ef Remove all the references to API refs 2025-06-02 20:18:11 +01:00
Guido D'Orsi
2d8eed3b69 chore: remove unused var 2025-06-02 21:13:59 +02:00
Benjamin S. Leveritt
45c9c8558f Remove build script 2025-06-02 20:08:19 +01:00
Guido D'Orsi
dccb80edf0 fix: quick fix layout overflows and restore automatic next song 2025-06-02 21:07:58 +02:00
Guido D'Orsi
6f72419b6e feat: add support for coMap migrations 2025-06-02 20:23:52 +02:00
Guido D'Orsi
fc55e5c8e8 Merge pull request #2384 from garden-co/changeset-release/main
Version Packages
2025-06-02 18:29:42 +02:00
github-actions[bot]
4a74ccf399 Version Packages 2025-06-02 16:23:15 +00:00
Guido D'Orsi
a442315995 Merge pull request #2266 from garden-co/feat/encrypt-decrypt-rnqc
feat: enable RNQC for encrypt/decrypt
2025-06-02 18:18:41 +02:00
Brad Anderson
0d5ee3ed07 feat: enable RNQC for encrypt/decrypt 2025-06-02 12:16:31 -04:00
Guido D'Orsi
4e32cae8a7 feat: make the packages versions fixed 2025-06-02 16:19:28 +02:00
Guido D'Orsi
49d721a29b fix: add prosemirror and tiptap to the linked changeset 2025-06-02 16:18:44 +02:00
Guido D'Orsi
2c6d27598d Merge pull request #2397 from garden-co/fix/recursive-profile-discriminated-union
fix: make checks on the discriminator field on z.discriminatedUnion more specific and less strict
2025-06-02 16:16:25 +02:00
Guido D'Orsi
e637cb0700 fix: restore implicit discriminators support 2025-06-02 14:37:55 +02:00
Trisha Lim
c42848ece9 Merge pull request #2275 from garden-co/improvement/supported-env
homepage: supported env section, take svelte out of experimental
2025-06-02 13:36:23 +01:00
Benjamin S. Leveritt
841a818dff Merge pull request #2330 from garden-co/2323-update-docs-with-coloaded
Replace `Account` and `Loaded` with `co.account` and `co.loaded` (respectively)
2025-06-02 12:07:26 +01:00
Benjamin S. Leveritt
f74881a3fe Remove me 2025-06-02 12:05:35 +01:00
Guido D'Orsi
c559054378 fix: add support for optional dates 2025-06-02 12:55:33 +02:00
Guido D'Orsi
d6d9c0adcb fix: make checks on the discriminator field on z.discriminatedUnion more specific and less strict 2025-06-02 12:31:05 +02:00
Guido D'Orsi
cdf9b5a71c Merge pull request #2391 from garden-co/fix/recursive-profile-discriminated-union
fix: support for recursive props on co.profile and for co.image inside z.discriminatedUnion
2025-06-02 12:00:37 +02:00
Guido D'Orsi
4b950bce14 fix: support for recursive props on co.profile and for co.image inside z.discriminatedUnion 2025-06-02 11:48:54 +02:00
Benjamin S. Leveritt
8343d8f0fe Formats co.texts with backticks 2025-06-02 10:45:40 +01:00
Benjamin S. Leveritt
eeb280f17b Replace Account with co.account 2025-06-02 10:45:39 +01:00
Benjamin S. Leveritt
a927334b40 Replaces Loaded with co.loaded 2025-06-02 10:45:39 +01:00
Benjamin S. Leveritt
be0c1bcda5 Merge pull request #2367 from joeinnes/patch-2
Remove unnecessary console.log
2025-06-02 10:30:58 +01:00
Trisha Lim
b861daca60 Merge pull request #2386 from garden-co/tobiaslins-patch-1
[website] Use `/next` import for analytics
2025-06-01 18:45:18 +01:00
Benjamin S. Leveritt
b4cd307eba Merge pull request #2383 from garden-co/update-team
update team page
2025-05-31 16:44:50 +01:00
Tobias Lins
1d0e83d3fa Update layout.tsx 2025-05-31 17:05:18 +02:00
Guido D'Orsi
be7c4c29a1 chore: changeset 2025-05-30 14:42:32 +02:00
Trisha Lim
ffa4db0b61 update team page 2025-05-29 21:09:15 +02:00
Trisha Lim
7daf992c51 Merge pull request #2382 from garden-co/fix/sync-link
fix link to self-host docs
2025-05-29 20:57:19 +02:00
Trisha Lim
333c583265 fix link to self-host docs 2025-05-29 20:43:32 +02:00
Luka Hartwig
fa2227716f Remove return type 2025-05-27 23:08:56 +02:00
Guido D'Orsi
bfa5e14112 Merge pull request #1992 from boorad/feat/rn-sqlite-sync
refactor: RN sqlite adapters
2025-05-27 20:44:55 +02:00
Luka Hartwig
38dabd4602 Set default package manager based on command runner 2025-05-27 16:34:40 +02:00
Brad Anderson
dcdf89bba7 fix: re-enable android build in e2e run script 2025-05-26 11:50:36 -04:00
Brad Anderson
a6e6939015 chore: sync app namespace & e2e tests 2025-05-26 11:50:36 -04:00
Brad Anderson
71aa24054d chore: lock file after rebase 2025-05-26 11:50:36 -04:00
Guido D'Orsi
4c88421440 chore: await for WAL 2025-05-26 11:50:36 -04:00
Guido D'Orsi
64bad01d9a fix: fix expo-sqlite run 2025-05-26 11:50:36 -04:00
Brad Anderson
4dfa809a77 fix: update chat-rn landing page, invite clipboard values 2025-05-26 11:50:36 -04:00
Guido D'Orsi
726df167f8 chore: add get function 2025-05-26 11:50:36 -04:00
Guido D'Orsi
2f62cbde13 test: cover the sqlite async with tests 2025-05-26 11:50:36 -04:00
Guido D'Orsi
93ef74219d feat: add sqlite async managers 2025-05-26 11:50:36 -04:00
Guido D'Orsi
495aa81335 feat: configure the max blocking time on RN storage to 30ms 2025-05-26 11:50:36 -04:00
Guido D'Orsi
99caaba328 chore: remove unused import 2025-05-26 11:50:36 -04:00
Guido D'Orsi
4bfcc787a1 chore(sqlite): move the migration logic in SQLiteNodeBase 2025-05-26 11:50:36 -04:00
Guido D'Orsi
7e96eb12dd feat: unify sqlite storage clients 2025-05-26 11:50:35 -04:00
Brad Anderson
a71eba2eb5 chore: bump RN version for ios sim 18.4 bug 2025-05-26 11:50:35 -04:00
Brad Anderson
b129cf9328 fix: rebase main, sync only 2025-05-26 11:50:35 -04:00
Brad Anderson
a6e31c41b7 feat: expo sqlite uses WAL, all sqlite defaults to sync 2025-05-26 11:50:35 -04:00
Brad Anderson
47746ff9ba fix: sourceExts belongs in resolver 2025-05-26 11:50:35 -04:00
Brad Anderson
4e4319a546 fix: rawDBExecute (expo) needs return rows 2025-05-26 11:50:35 -04:00
Brad Anderson
d1de8baf1d fix: initialize must use raw db calls 2025-05-26 11:50:35 -04:00
Brad Anderson
d427a2a13c feat: add sync mode to sqlite client 2025-05-26 11:50:35 -04:00
Brad Anderson
1fa6c3987a refactor: RN sqlite adapters 2025-05-26 11:50:35 -04:00
Joe Innes
ddf49e532f Remove unnecessary console.log 2025-05-26 17:38:14 +02:00
Guido D'Orsi
a0c4ef72ef Merge pull request #2366 from garden-co/changeset-release/main
Version Packages
2025-05-26 14:46:53 +02:00
github-actions[bot]
99009a9054 Version Packages 2025-05-26 12:44:40 +00:00
Guido D'Orsi
e512df4eff fix: move to the latest stable version of Zod 2025-05-26 14:42:08 +02:00
pax-k
da3ede8b54 fix(cursor-docs): improved jazz general help rule 2025-05-26 13:29:01 +02:00
pax-k
56ed6d3271 fix(cursor-docs): improved jazz schema generation rule 2025-05-26 13:22:14 +02:00
pax-k
78112bb19a fix(cursor-docs): added jazz schema template 2025-05-26 13:04:39 +02:00
pax-k
ac6b0c6561 Merge branch 'main' of https://github.com/gardencmp/jazz 2025-05-26 12:51:20 +02:00
pax-k
632365a4fb fix(cursor-docs): added llms-full docs and updated the jazz schema generation rule 2025-05-26 12:51:12 +02:00
Guido D'Orsi
14f52dbc4e Merge pull request #2365 from garden-co/changeset-release/main
Version Packages
2025-05-26 12:48:04 +02:00
github-actions[bot]
82e4256e26 Version Packages 2025-05-26 10:07:42 +00:00
Guido D'Orsi
5e253cc717 chore: version bump 2025-05-26 11:12:59 +02:00
Guido D'Orsi
0c1663505c Merge pull request #2363 from garden-co/changeset-release/main
Version Packages
2025-05-26 11:07:20 +02:00
github-actions[bot]
ad85703373 Version Packages 2025-05-25 15:01:21 +00:00
Guido D'Orsi
3a6ec3791c Merge pull request #2364 from garden-co/fix/storage-group-deps
feat(react): API for SSR and Server Components
2025-05-25 16:58:34 +02:00
Guido D'Orsi
f9590f9120 feat(react): API for SSR and Server Components 2025-05-25 16:54:29 +02:00
Guido D'Orsi
706ebf87da Merge pull request #2357 from balazshevesi/main
Fix docs
2025-05-25 16:24:47 +02:00
Guido D'Orsi
00dd317a5d Merge pull request #2362 from garden-co/fix/storage-group-deps
fix(storage): align groups dependencies calculation to LocalNode
2025-05-25 16:24:04 +02:00
Guido D'Orsi
5ced45fb90 test: cover the group dependency loading with a test (temporary) 2025-05-25 15:35:00 +02:00
Guido D'Orsi
23daa7cdde fix(storage): align groups dependencies calculation to LocalNode 2025-05-25 14:34:50 +02:00
Guido D'Orsi
c018752c0c Merge pull request #2361 from garden-co/changeset-release/main
Version Packages
2025-05-24 22:54:04 +02:00
github-actions[bot]
ba3bdcc268 Version Packages 2025-05-24 20:31:26 +00:00
Guido D'Orsi
4177f6f92c Merge pull request #2360 from garden-co/feat/ssr
feat(react): add experimental_enableSSR
2025-05-24 22:28:20 +02:00
Guido D'Orsi
e32a1f7392 feat(react): add experimental_enableSSR 2025-05-24 19:11:23 +02:00
Guido D'Orsi
7c43fd37ae Merge pull request #2358 from garden-co/feat/improve-music-player-mobile
feat(music-player): make the ui usable on mobile
2025-05-24 18:37:59 +02:00
Guido D'Orsi
48168d619b feat(music-player): make the ui usable on mobile 2025-05-24 18:37:15 +02:00
Balazs Hevesi
1b9b9273e5 Update 0-14-0.mdx 2025-05-23 22:18:05 +02:00
Guido D'Orsi
2f4eada56c Merge pull request #2356 from garden-co/changeset-release/main
Version Packages
2025-05-23 21:37:52 +02:00
github-actions[bot]
709b3432d7 Version Packages 2025-05-23 19:33:52 +00:00
Guido D'Orsi
78a7672401 fix: update lockfile 2025-05-23 21:31:34 +02:00
Guido D'Orsi
bb214f0e8b fix: remove react-dom from the peerDependencies 2025-05-23 21:22:22 +02:00
Guido D'Orsi
8706398f74 Merge pull request #2355 from garden-co/changeset-release/main
Version Packages
2025-05-23 20:31:09 +02:00
github-actions[bot]
1502a6b421 Version Packages 2025-05-23 18:15:41 +00:00
Guido D'Orsi
f167112d99 fix: remove react and react-dom dev dependencies due to npm install issues 2025-05-23 20:12:58 +02:00
Guido D'Orsi
d4d6cb3307 Merge pull request #2354 from garden-co/changeset-release/main
Version Packages
2025-05-23 20:01:42 +02:00
github-actions[bot]
9565cdf323 Version Packages 2025-05-23 18:01:27 +00:00
Guido D'Orsi
dfb21ff0f2 fix: add missing deps for sqlite and secure storage 2025-05-23 19:59:08 +02:00
Guido D'Orsi
98d697fafb fix: remove react and react-native dev dependencies 2025-05-23 19:50:54 +02:00
Guido D'Orsi
9150d53f90 Merge pull request #2353 from garden-co/changeset-release/main
Version Packages
2025-05-23 19:46:39 +02:00
github-actions[bot]
ac7ecc278c Version Packages 2025-05-23 17:46:11 +00:00
Guido D'Orsi
99595bc7e3 fix: remove React Native specific steps only for chat-rn-expo 2025-05-23 19:42:45 +02:00
Guido D'Orsi
f5bae09679 fix: remove React Native specific steps as not required anymore 2025-05-23 19:40:51 +02:00
Guido D'Orsi
a7b9ae0b76 Merge pull request #2350 from garden-co/changeset-release/main
Version Packages
2025-05-23 19:24:34 +02:00
github-actions[bot]
196efcf48e Version Packages 2025-05-23 17:23:15 +00:00
Guido D'Orsi
153aa972b3 Merge pull request #2351 from garden-co/fix/chat-rn-expo
fix: fix chat-rn-expo example app
2025-05-23 19:20:25 +02:00
Guido D'Orsi
4508524f77 feat: rename demo to minimal, change React Native template to minimal auth 2025-05-23 19:20:05 +02:00
Guido D'Orsi
e7e9062dff test: disable the chat navigation step on RN expo 2025-05-23 18:44:03 +02:00
Guido D'Orsi
65e8d135c1 fix: React 19 upgrade type fixes 2025-05-23 18:36:54 +02:00
Meg Culotta
0b8e84e22d Merge pull request #2352 from garden-co/feat/2345-add-example-links-to-readmes
Add URL's to live demos in all readme files in examples
2025-05-23 11:15:46 -05:00
Margaret Culotta
7b51e38cf6 Add all other examples 2025-05-23 11:11:57 -05:00
Margaret Culotta
fcc2cbdc93 Add URL's to live demos in all readme files in examples 2025-05-23 11:09:00 -05:00
Guido D'Orsi
5aa13b5afc feat: upgrade to React 19 2025-05-23 17:53:49 +02:00
Guido D'Orsi
dc746a2fc9 chore: changeset 2025-05-23 17:36:38 +02:00
Guido D'Orsi
ca39bae001 fix: fix chat-rn-expo when used as template 2025-05-23 17:35:49 +02:00
Guido D'Orsi
020b12fa32 fix: correct definition of react in peerDependencies 2025-05-23 17:33:26 +02:00
Guido D'Orsi
bfea02c229 Merge pull request #2348 from garden-co/feat/deprecate-with-helpers
fix: deprecate withHelpers
2025-05-23 14:45:01 +02:00
Guido D'Orsi
74e6495beb Merge pull request #2349 from garden-co/feat/default-catch
feat: add shallow support for default/catch
2025-05-23 14:40:01 +02:00
Guido D'Orsi
3fe683206a feat: add shallow support for default/catch 2025-05-23 14:37:15 +02:00
Guido D'Orsi
f869d9a4dd fix: deprecate withHelpers 2025-05-23 14:30:52 +02:00
Guido D'Orsi
0724cfb95e Merge pull request #2344 from garden-co/changeset-release/main
Version Packages
2025-05-23 09:54:27 +02:00
github-actions[bot]
3b7fd14976 Version Packages 2025-05-23 07:54:03 +00:00
Guido D'Orsi
55fbe8a0a8 Merge pull request #2343 from garden-co/feat/back-to-zod
fix: move back to zod and clean up zod re-export
2025-05-23 09:50:45 +02:00
Guido D'Orsi
22c2600ef1 fix: move back to zod and clean up zod re-export 2025-05-23 09:46:36 +02:00
Benjamin S. Leveritt
156167e6d7 Update nav items
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-05-23 07:56:06 +01:00
Guido D'Orsi
d41feafebe Merge pull request #2342 from garden-co/changeset-release/main
Version Packages
2025-05-22 23:33:33 +02:00
github-actions[bot]
05e3e30451 Version Packages 2025-05-22 21:29:40 +00:00
Guido D'Orsi
637ae13131 chore: changeset 2025-05-22 23:26:46 +02:00
Guido D'Orsi
4a601a6441 Merge pull request #2340 from garden-co/fix/zod-fork
fix: switch to our zod fork with RN fixes
2025-05-22 23:24:29 +02:00
Benjamin S. Leveritt
aef84cf2ef Tweak History title
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-05-22 21:15:50 +01:00
Benjamin S. Leveritt
275a26e2c1 Splits history patterns out of history doc
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-05-22 21:12:14 +01:00
Guido D'Orsi
15b422f711 fix: switch to our zod fork with RN fixes 2025-05-22 19:48:58 +02:00
Benjamin S. Leveritt
946ae63070 Fix codeblocks for 0.14
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-05-22 16:38:05 +01:00
Trisha Lim
2e42825971 Merge pull request #2332 from garden-co/fix/passkey-svelte
fix(passkey-svelte): use AccountCoState instead of useAccount
2025-05-22 14:07:22 +01:00
Trisha Lim
089cdb2031 fix(passkey-svelte): use AccountCoState instead of useAccount 2025-05-22 13:55:06 +01:00
Benjamin S. Leveritt
5cfe47ebbe Add history to nav 2025-05-22 13:33:52 +01:00
Benjamin S. Leveritt
6ee0ec755e Minor tweaks 2025-05-22 13:33:52 +01:00
Benjamin S. Leveritt
8ffca202bd Adds type checking plus tweaks 2025-05-22 13:33:51 +01:00
Benjamin S. Leveritt
6d2bcc7490 Rename history doc 2025-05-22 13:30:54 +01:00
Benjamin S. Leveritt
69709c2cf2 Turbo just builds deps now
What a smol change?
2025-05-22 10:29:42 +01:00
Trisha Lim
e7733a5428 take svelte out of experimental 2025-05-21 14:45:12 +01:00
Wizzel1
e88252bee4 Fix formatting 2025-05-19 20:20:52 +02:00
Wizzel1
a6b7857f6f Fix markdown formatting 2025-05-19 20:06:28 +02:00
Wizzel1
265c30158e Fix markdown formatting 2025-05-19 19:59:56 +02:00
Wizzel1
505e132f1e Run format script 2025-05-19 19:53:12 +02:00
Wizzel1
c6d5195cb5 Update tests 2025-05-19 19:48:22 +02:00
Wizzel1
8af543e7d6 Update docs 2025-05-19 19:48:17 +02:00
Wizzel1
016b2098a7 Update example 2025-05-19 19:48:11 +02:00
Trisha Lim
4683cc7ada homepage: redesign supported env section 2025-05-19 16:29:43 +01:00
404 changed files with 30051 additions and 15442 deletions

View File

@@ -2,8 +2,8 @@
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [
"linked": [],
"fixed": [
[
"cojson",
"cojson-storage",
@@ -27,6 +27,8 @@
"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,7 +38,6 @@ 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

@@ -0,0 +1,46 @@
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,6 +20,9 @@ __screenshots__
# Playwright
test-results
# Java
.java-version
.husky
.vscode/*

View File

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

View File

@@ -1,5 +1,159 @@
# 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

View File

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

View File

@@ -1,5 +1,130 @@
# 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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -1,24 +0,0 @@
# 🎷 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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -1,9 +0,0 @@
module.exports = function (api) {
api.cache(true);
return {
presets: [
["babel-preset-expo", { jsxImportSource: "nativewind" }],
"nativewind/babel",
],
};
};

View File

@@ -1,27 +0,0 @@
{
"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

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

View File

@@ -1,4 +0,0 @@
import "./polyfills";
import { registerRootComponent } from "expo";
import App from "./src/App";
registerRootComponent(App);

View File

@@ -0,0 +1,9 @@
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

@@ -1,35 +0,0 @@
// 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"];
config.resolver.requireCycleIgnorePatterns = [
/(^|\/|\\)node_modules($|\/|\\)/,
/(^|\/|\\)packages($|\/|\\)/,
];
// Use turborepo to restore the cache when possible
config.cacheStores = [
new FileStore({
root: path.join(projectRoot, "node_modules", ".cache", "metro"),
}),
];
// module.exports = config;
module.exports = withNativeWind(config, { input: "./global.css" });

View File

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

View File

@@ -1,53 +1,35 @@
{
"name": "chat-rn-expo",
"version": "1.0.117",
"main": "index.js",
"version": "1.0.12",
"main": "index.ts",
"scripts": {
"build": "tsc --noEmit && expo export -p ios",
"build": "expo prebuild",
"start": "expo start",
"format-and-lint": "biome check .",
"format-and-lint:fix": "biome check . --write",
"android": "expo run:android",
"ios": "expo prebuild && pnpx pod-install && expo run:ios",
"ios": "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",
"@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": "~53.0.9",
"expo-clipboard": "^7.1.4",
"expo-secure-store": "~14.2.3",
"expo-sqlite": "15.2.9",
"expo-sqlite": "~15.2.10",
"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",
"react-native-safe-area-context": "5.4.0",
"react-native-screens": "4.10.0",
"react-native-nitro-modules": "0.25.2",
"react-native-quick-crypto": "1.0.0-beta.15",
"react-native-url-polyfill": "^2.0.0",
"readable-stream": "4.7.0"
"readable-stream": "^4.7.0"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@types/react": "~19.0.14",
"tailwindcss": "^3.4.17",
"typescript": "5.8.3"
"@types/react": "~19.0.10",
"typescript": "~5.8.3"
},
"private": true
}

View File

@@ -1,74 +1,18 @@
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";
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");
}
}
});
}, []);
export default function App() {
return (
<StrictMode>
<JazzProvider
CryptoProvider={RNQuickCrypto}
sync={{
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
}}
>
<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>
<ChatScreen />
</JazzProvider>
</StrictMode>
);
}
export default App;

View File

@@ -1,7 +1,6 @@
import clsx from "clsx";
import * as Clipboard from "expo-clipboard";
import { Group, ID, Loaded, Profile } from "jazz-tools";
import { useEffect, useState } from "react";
import { Account, Group } from "jazz-tools";
import { useState } from "react";
import React, {
Button,
FlatList,
@@ -12,54 +11,38 @@ import React, {
TouchableOpacity,
View,
Alert,
StyleSheet,
} from "react-native";
import { useAccount, useCoState } from "jazz-expo";
import { Chat, Message } from "./schema";
export default function ChatScreen({ navigation }: { navigation: any }) {
const { me, logOut } = useAccount();
export default function ChatScreen() {
const { me, logOut } = useAccount(Account, { resolve: { profile: true } });
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({ owner: me });
const group = Group.create();
group.addMember("everyone", "writer");
const chat = Chat.create([], { owner: group });
const chat = Chat.create([], group);
setChatId(chat.id);
};
const joinChat = () => {
if (chatIdInput) {
setChatId(chatIdInput);
if (chatIdInput.startsWith("https://chat.jazz.tools/#/chat/")) {
setChatId(chatIdInput.split("/").pop());
} else {
setChatId(chatIdInput);
}
} else {
Alert.alert("Error", "Chat ID cannot be empty.");
}
@@ -75,41 +58,28 @@ export default function ChatScreen({ navigation }: { navigation: any }) {
}
};
const renderMessageItem = ({ item }: { item: Loaded<typeof Message> }) => {
const renderMessageItem = ({ item }: { item: Message }) => {
const isMe = item._edits?.text?.by?.isMe;
return (
<View
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 `,
)}
style={[
styles.messageContainer,
isMe ? styles.myMessage : styles.otherMessage,
]}
>
{!isMe ? (
<Text
className={clsx(
`text-xs text-gray-500`,
isMe ? "text-right" : "text-left",
)}
style={[
styles.messageSender,
{ textAlign: isMe ? "right" : "left" },
]}
>
{item?._edits?.text?.by?.profile?.name}
</Text>
) : null}
<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",
)}
>
<View style={styles.messageContent}>
<Text style={styles.messageText}>{item.text}</Text>
<Text style={[styles.messageTime, { marginTop: !isMe ? 8 : 4 }]}>
{item?._edits?.text?.madeAt?.getHours().toString().padStart(2, "0")}
:
{item?._edits?.text?.madeAt
@@ -123,31 +93,28 @@ export default function ChatScreen({ navigation }: { navigation: any }) {
};
return (
<View className="flex flex-col h-full">
<View style={styles.container}>
{!loadedChat ? (
<View className="flex flex-col h-full items-center justify-center">
<Text className="text-m font-bold mb-6">Username</Text>
<View style={styles.welcomeContainer}>
<Text style={styles.usernameTitle}>Username</Text>
<TextInput
className="rounded h-12 p-2 mb-12 w-40 border border-gray-200 block"
value={profile?.name ?? ""}
style={styles.usernameInput}
value={me?.profile.name ?? ""}
onChangeText={(value) => {
if (profile) {
profile.name = value;
if (me?.profile) {
me.profile.name = value;
}
}}
textAlignVertical="center"
onSubmitEditing={sendMessage}
testID="username-input"
/>
<TouchableOpacity
onPress={createChat}
className="bg-blue-500 p-4 rounded-md"
>
<Text className="text-white font-semibold">Start new chat</Text>
<TouchableOpacity onPress={createChat} style={styles.newChatButton}>
<Text style={styles.newChatButtonText}>Start new chat</Text>
</TouchableOpacity>
<Text className="text-m font-bold mt-6">Join existing chat</Text>
<Text style={styles.joinChatTitle}>Join existing chat</Text>
<TextInput
className="rounded h-12 p-2 m-2 mt-4 w-80 border border-gray-200 block"
style={styles.chatIdInput}
placeholder="Chat ID"
value={chatIdInput ?? ""}
onChangeText={(value) => {
@@ -161,22 +128,38 @@ export default function ChatScreen({ navigation }: { navigation: any }) {
}}
testID="chat-id-input"
/>
<TouchableOpacity
onPress={joinChat}
className="bg-green-500 p-4 rounded-md"
>
<Text className="text-white font-semibold">Join chat</Text>
<TouchableOpacity onPress={joinChat} style={styles.joinChatButton}>
<Text style={styles.newChatButtonText}>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",
}}
className="flex"
style={styles.messageList}
data={loadedChat}
keyExtractor={(item) => item.id}
renderItem={renderMessageItem}
@@ -185,11 +168,11 @@ export default function ChatScreen({ navigation }: { navigation: any }) {
<KeyboardAvoidingView
keyboardVerticalOffset={110}
behavior="padding"
className="p-3 bg-white border-t border-gray-300"
style={styles.inputContainer}
>
<SafeAreaView className="flex flex-row items-center gap-2">
<SafeAreaView style={styles.inputRow}>
<TextInput
className="rounded-full h-8 py-0 px-2 border border-gray-200 block flex-1"
style={styles.messageInput}
value={message}
onChangeText={setMessage}
placeholder="Type a message..."
@@ -199,7 +182,7 @@ export default function ChatScreen({ navigation }: { navigation: any }) {
/>
<TouchableOpacity
onPress={sendMessage}
className="bg-gray-300 text-white rounded-full h-8 w-8 items-center justify-center"
style={styles.sendButton}
testID="send-button"
>
<Text></Text>
@@ -211,3 +194,133 @@ export default function ChatScreen({ navigation }: { navigation: any }) {
</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

@@ -1,18 +0,0 @@
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,5 +3,7 @@ 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

@@ -1,14 +0,0 @@
/** @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: com.jazz.chatrn
appId: tools.jazz.chatrnexpo
---
- copyTextFrom:
id: ${id}

View File

@@ -1,4 +1,4 @@
appId: com.jazz.chatrn
appId: tools.jazz.chatrnexpo
---
- launchApp
@@ -8,10 +8,7 @@ appId: com.jazz.chatrn
# - assertVisible: "Reload"
# - tapOn: "Reload"
# login
- assertVisible: "Logout"
- tapOn: "Logout"
- assertVisible: "Anonymous user"
- assertVisible: "Username"
- runFlow:
label: "Erase existing username"
file: erase_text.yml
@@ -43,12 +40,13 @@ appId: com.jazz.chatrn
# 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,11 +5,15 @@
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/android-install.log 2>&1
./gradlew installRelease >> $OUTPUT_FILE 2>&1
cd ..
# run the e2e tests

View File

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

View File

@@ -1,5 +1,134 @@
# 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

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.7 --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.9 --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": "com.anonymous.ChatRN"
"package": "tools.jazz.chatrn"
},
"ios": {
"bundleIdentifier": "com.anonymous.ChatRN"
"bundleIdentifier": "tools.jazz.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.125",
"version": "1.0.139",
"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": "18.3.1",
"react": "19.0.0",
"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.7",
"@react-native/eslint-config": "0.76.7",
"@react-native/metro-config": "0.76.7",
"@react-native/typescript-config": "0.76.7",
"@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",
"@rnx-kit/metro-config": "^2.0.1",
"@rnx-kit/metro-resolver-symlinks": "^0.2.1",
"@types/react": "^18.3.12",

View File

@@ -3,7 +3,6 @@ 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,
@@ -19,6 +18,7 @@ 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,10 +36,8 @@ export function ChatScreen({ navigation }: { navigation: any }) {
<Button
onPress={() => {
if (loadedChat?.id) {
Clipboard.setString(
`https://chat.jazz.tools/#/chat/${loadedChat.id}`,
);
Alert.alert("Copied to clipboard", `Chat ID: ${loadedChat.id}`);
Clipboard.setString(loadedChat.id);
console.log("Copied to clipboard", `Chat ID: ${loadedChat.id}`);
}
}}
title="Share"
@@ -56,27 +54,11 @@ export function ChatScreen({ navigation }: { navigation: any }) {
};
const joinChat = () => {
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",
);
if (chatIdInput) {
setChatId(chatIdInput as ID<Chat>);
} else {
console.warn("Error: Chat ID cannot be empty.");
}
};
const sendMessage = () => {
@@ -153,6 +135,16 @@ 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>
@@ -205,27 +197,91 @@ export function ChatScreen({ navigation }: { navigation: any }) {
const styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: "column",
height: "100%",
},
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,
},
messageContainer: {
borderRadius: 8,
paddingVertical: 4,
paddingHorizontal: 6,
maxWidth: "80%",
flexDirection: "column",
alignItems: "flex-start",
marginBottom: 8,
},
myMessage: {
backgroundColor: "#e5e7eb", // gray-200
alignSelf: "flex-end",
textAlign: "right",
},
otherMessage: {
backgroundColor: "#d1d5db", // gray-300
alignSelf: "flex-start",
},
senderName: {
fontSize: 12,
color: "#6b7280", // gray-500
color: "#666",
marginBottom: 4,
},
textRight: {
textAlign: "right",
@@ -234,92 +290,27 @@ const styles = StyleSheet.create({
textAlign: "left",
},
messageContent: {
position: "relative",
flexDirection: "row",
alignItems: "flex-end",
justifyContent: "space-between",
backgroundColor: "#f0f0f0",
borderRadius: 8,
padding: 8,
},
messageText: {
color: "#000000",
fontSize: 16,
maxWidth: "85%",
},
timestamp: {
fontSize: 10,
color: "#6b7280", // gray-500
textAlign: "right",
marginLeft: 8,
color: "#666",
marginTop: 4,
},
timestampOther: {
textAlign: "left",
marginTop: 8,
},
timestampMy: {
textAlign: "right",
marginTop: 4,
},
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
avatar: {
borderRadius: 16,
height: 32,
width: 32,

View File

@@ -1,5 +1,109 @@
# 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

View File

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

View File

@@ -1,5 +1,125 @@
# 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

View File

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

View File

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

View File

@@ -1,5 +1,124 @@
# 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

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
Live version: [https://clerk-demo.jazz.tools](https://clerk-demo.jazz.tools)
## Getting started

View File

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

View File

@@ -4,6 +4,7 @@ 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
@@ -13,7 +14,7 @@ if (!PUBLISHABLE_KEY) {
throw new Error("Add your Clerk publishable key to the .env.local file");
}
function JazzProvider({ children }: { children: React.ReactNode }) {
function JazzProvider({ children }: { children: ReactNode }) {
const clerk = useClerk();
return (

View File

@@ -1,5 +1,122 @@
# 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

View File

@@ -1,6 +1,6 @@
{
"name": "file-share-svelte",
"version": "0.0.90",
"version": "0.0.103",
"private": true,
"type": "module",
"scripts": {
@@ -30,12 +30,12 @@
"prettier": "^3.3.2",
"prettier-plugin-svelte": "^3.2.6",
"prettier-plugin-tailwindcss": "^0.6.5",
"svelte": "^5.0.0",
"svelte": "^5.33.0",
"svelte-check": "^4.0.0",
"tailwindcss": "^3.4.17",
"typescript": "5.6.2",
"typescript-eslint": "^8.0.0",
"vite": "6.0.11"
"vite": "6.3.5"
},
"dependencies": {
"@tailwindcss/typography": "^0.5.15",

View File

@@ -1,5 +1,124 @@
# 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

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
Live version: [https://file-upload-demo.jazz.tools](https://file-upload-demo.jazz.tools)
## Getting started

View File

@@ -1,7 +1,7 @@
{
"name": "filestream",
"private": true,
"version": "0.0.45",
"version": "0.0.58",
"type": "module",
"scripts": {
"dev": "vite",
@@ -14,20 +14,20 @@
"jazz-react": "workspace:*",
"jazz-tools": "workspace:*",
"jazz-inspector": "workspace:*",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "19.0.0",
"react-dom": "19.0.0"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.3",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.5.1",
"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.0.11"
"vite": "6.3.5"
}
}

View File

@@ -1,5 +1,112 @@
# 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

View File

@@ -1,7 +1,7 @@
{
"name": "form",
"private": true,
"version": "0.1.46",
"version": "0.1.59",
"type": "module",
"scripts": {
"dev": "vite",
@@ -14,22 +14,22 @@
"hash-slash": "workspace:*",
"jazz-react": "workspace:*",
"jazz-tools": "workspace:*",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "19.0.0",
"react-dom": "19.0.0"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@playwright/test": "^1.50.1",
"@tailwindcss/forms": "^0.5.9",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.3",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.5.1",
"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.0.11"
"vite": "6.3.5"
}
}

View File

@@ -1,5 +1,111 @@
# 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

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
Live version: [https://image-upload-demo.jazz.tools](https://image-upload-demo.jazz.tools)
## Getting started

View File

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

View File

@@ -1,5 +1,101 @@
# 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

View File

@@ -1,6 +1,6 @@
# Jazz Inspector
Live address: https://inspector.jazz.tools
Live address: [https://inspector.jazz.tools](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.155",
"version": "0.0.168",
"type": "module",
"scripts": {
"dev": "vite",
@@ -17,20 +17,20 @@
"cojson-transport-ws": "workspace:*",
"hash-slash": "workspace:*",
"lucide-react": "^0.274.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-router": "^6.16.0",
"react-router-dom": "^6.16.0",
"react-use": "^17.4.0"
},
"devDependencies": {
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react-swc": "^3.3.2",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react-swc": "^3.10.1",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.27",
"tailwindcss": "^3.4.17",
"typescript": "5.6.2",
"vite": "6.0.11"
"vite": "6.3.5"
}
}

41
examples/jazz-nextjs/.gitignore vendored Normal file
View File

@@ -0,0 +1,41 @@
# 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

@@ -0,0 +1,69 @@
# 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

@@ -0,0 +1,36 @@
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

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

View File

@@ -0,0 +1,26 @@
{
"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

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

View File

@@ -0,0 +1,26 @@
@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

@@ -0,0 +1,35 @@
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

@@ -0,0 +1,46 @@
"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

@@ -0,0 +1,23 @@
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

@@ -0,0 +1,16 @@
"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

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

View File

@@ -0,0 +1,27 @@
{
"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": "^18.3.1",
"react-dom": "^18.3.1",
"react": "19.0.0",
"react-dom": "19.0.0",
"tailwind-merge": "^3.0.2",
"tailwindcss": "^4.0.17",
"tw-animate-css": "^1.2.5"
},
"devDependencies": {
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@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.0.11"
"vite": "6.3.5"
}
}

View File

@@ -47,7 +47,7 @@ export const JoinGameRequest = co.map({
});
export type JoinGameRequest = co.loaded<typeof JoinGameRequest>;
export const InboxMessage = z.discriminatedUnion([
export const InboxMessage = z.discriminatedUnion("type", [
PlayIntent,
NewGameIntent,
CreateGameRequest,

View File

@@ -1,5 +1,111 @@
# 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

View File

@@ -1,6 +1,7 @@
# 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.98",
"version": "0.0.111",
"type": "module",
"scripts": {
"dev": "vite",
@@ -15,22 +15,22 @@
"@react-spring/web": "^9.7.5",
"jazz-react": "workspace:*",
"jazz-tools": "workspace:*",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"zod": "3.25.0-beta.20250518T002810"
"react": "19.0.0",
"react-dom": "19.0.0",
"zod": "3.25.28"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.3",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.5.1",
"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.0.11",
"vite": "6.3.5",
"vitest": "3.1.1"
}
}

View File

@@ -78,6 +78,7 @@ export function Cursor({
return (
<>
{/* @ts-expect-error - TODO: invalid after the React 19 upgrade */}
<animated.g
transform={to(
[springs.x, springs.y],
@@ -113,6 +114,7 @@ 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,6 +52,7 @@ 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.addMember("everyone", "reader"); // The profile info is visible to everyone
group.makePublic(); // The profile info is visible to everyone
account.profile = CursorProfile.create(
{

View File

@@ -1,4 +1,4 @@
import { z } from "zod/v4";
import { z } from "jazz-tools";
export const Vec2 = z.object({
x: z.number(),

View File

@@ -1,5 +1,124 @@
# 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

View File

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

View File

@@ -1,5 +1,124 @@
# 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

View File

@@ -1,6 +1,6 @@
# Music player example with Jazz and React
Live version: https://music-demo.jazz.tools
Live version: [https://music-demo.jazz.tools](https://music-demo.jazz.tools)
## Getting started

View File

@@ -4,7 +4,7 @@
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"config": "tailwind.config.ts",
"css": "src/index.css",
"baseColor": "stone",
"cssVariables": true

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-music-player",
"private": true,
"version": "0.0.127",
"version": "0.0.140",
"type": "module",
"scripts": {
"dev": "vite",
@@ -16,17 +16,18 @@
"@radix-ui/react-dialog": "^1.1.4",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-label": "^2.1.1",
"@radix-ui/react-separator": "^1.1.2",
"@radix-ui/react-slot": "^1.1.1",
"@radix-ui/react-toast": "^1.1.4",
"@radix-ui/react-tooltip": "^1.1.6",
"class-variance-authority": "^0.7.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.0.0",
"jazz-inspector": "workspace:*",
"jazz-react": "workspace:*",
"jazz-tools": "workspace:*",
"lucide-react": "^0.274.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-router": "^6.16.0",
"react-router-dom": "^6.16.0",
"tailwind-merge": "^1.14.0",
@@ -34,13 +35,13 @@
},
"devDependencies": {
"@playwright/test": "^1.50.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react-swc": "^3.3.2",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react-swc": "^3.10.1",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.27",
"tailwindcss": "^3.4.17",
"typescript": "5.6.2",
"vite": "6.0.11"
"vite": "6.3.5"
}
}

View File

@@ -41,8 +41,8 @@ export const MusicTrack = co.map({
/**
* You can use getters for recusrive relations
*/
get sourceTrack(): z.ZodOptional<typeof MusicTrack> {
return z.optional(MusicTrack);
get sourceTrack() {
return MusicTrack.optional();
},
});
export type MusicTrack = co.loaded<typeof MusicTrack>;

View File

@@ -7,13 +7,14 @@ import { RouterProvider, createHashRouter } from "react-router-dom";
import { HomePage } from "./3_HomePage";
import { useMediaPlayer } from "./5_useMediaPlayer";
import { InvitePage } from "./6_InvitePage";
import { PlayerControls } from "./components/PlayerControls";
import "./index.css";
import { MusicaAccount } from "@/1_schema";
import { apiKey } from "@/apiKey.ts";
import { SidebarProvider } from "@/components/ui/sidebar";
import { JazzProvider } from "jazz-react";
import { onAnonymousAccountDiscarded } from "./4_actions";
import { KeyboardListener } from "./components/PlayerControls";
import { useUploadExampleData } from "./lib/useUploadExampleData";
/**
@@ -50,7 +51,7 @@ function Main() {
return (
<>
<RouterProvider router={router} />
<PlayerControls mediaPlayer={mediaPlayer} />
<KeyboardListener mediaPlayer={mediaPlayer} />
<Toaster />
</>
);
@@ -72,8 +73,10 @@ ReactDOM.createRoot(document.getElementById("root")!).render(
defaultProfileName="Anonymous unicorn"
onAnonymousAccountDiscarded={onAnonymousAccountDiscarded}
>
<Main />
<JazzInspector />
<SidebarProvider>
<Main />
<JazzInspector />
</SidebarProvider>
</JazzProvider>
</React.StrictMode>,
);

View File

@@ -5,16 +5,16 @@ import {
useCoState,
useIsAuthenticated,
} from "jazz-react";
import { useNavigate, useParams } from "react-router";
import { useParams } from "react-router";
import { MusicaAccount, Playlist } from "./1_schema";
import { createNewPlaylist, uploadMusicTracks } from "./4_actions";
import { uploadMusicTracks } from "./4_actions";
import { MediaPlayer } from "./5_useMediaPlayer";
import { AuthButton } from "./components/AuthButton";
import { FileUploadButton } from "./components/FileUploadButton";
import { MusicTrackRow } from "./components/MusicTrackRow";
import { PlaylistTitleInput } from "./components/PlaylistTitleInput";
import { SidePanel } from "./components/SidePanel";
import { Button } from "./components/ui/button";
import { SidebarInset, SidebarTrigger } from "./components/ui/sidebar";
import { usePlayState } from "./lib/audio/usePlayState";
export function HomePage({ mediaPlayer }: { mediaPlayer: MediaPlayer }) {
@@ -26,7 +26,6 @@ export function HomePage({ mediaPlayer }: { mediaPlayer: MediaPlayer }) {
resolve: { root: { rootPlaylist: true, playlists: true } },
});
const navigate = useNavigate();
const playState = usePlayState();
const isPlaying = playState.value === "play";
const { toast } = useToast();
@@ -39,12 +38,6 @@ export function HomePage({ mediaPlayer }: { mediaPlayer: MediaPlayer }) {
await uploadMusicTracks(files);
}
async function handleCreatePlaylist() {
const playlist = await createNewPlaylist();
navigate(`/playlist/${playlist.id}`);
}
const params = useParams<{ playlistId: string }>();
const playlistId = params.playlistId ?? me?.root._refs.rootPlaylist.id;
@@ -71,10 +64,11 @@ export function HomePage({ mediaPlayer }: { mediaPlayer: MediaPlayer }) {
const isAuthenticated = useIsAuthenticated();
return (
<div className="flex flex-col h-screen text-gray-800 bg-blue-50">
<SidebarInset className="flex flex-col h-screen text-gray-800 bg-blue-50">
<div className="flex flex-1 overflow-hidden">
<SidePanel />
<main className="flex-1 p-6 overflow-y-auto">
<SidePanel mediaPlayer={mediaPlayer} />
<main className="flex-1 p-6 overflow-y-auto overflow-x-hidden">
<SidebarTrigger />
<div className="flex items-center justify-between mb-6">
{isRootPlaylist ? (
<h1 className="text-2xl font-bold text-blue-800">All tracks</h1>
@@ -87,7 +81,6 @@ export function HomePage({ mediaPlayer }: { mediaPlayer: MediaPlayer }) {
<FileUploadButton onFileLoad={handleFileLoad}>
Add file
</FileUploadButton>
<Button onClick={handleCreatePlaylist}>New playlist</Button>
</>
)}
{!isRootPlaylist && isAuthenticated && (
@@ -95,10 +88,9 @@ export function HomePage({ mediaPlayer }: { mediaPlayer: MediaPlayer }) {
Share playlist
</Button>
)}
<AuthButton />
</div>
</div>
<ul className="flex flex-col">
<ul className="flex flex-col max-w-full">
{playlist?.tracks?.map(
(track) =>
track && (
@@ -121,6 +113,6 @@ export function HomePage({ mediaPlayer }: { mediaPlayer: MediaPlayer }) {
</ul>
</main>
</div>
</div>
</SidebarInset>
);
}

View File

@@ -20,7 +20,7 @@ export function AuthButton() {
if (isAuthenticated) {
return (
<Button variant="outline" onClick={handleSignOut}>
<Button variant="ghost" onClick={handleSignOut}>
Sign out
</Button>
);
@@ -28,10 +28,7 @@ export function AuthButton() {
return (
<>
<Button
onClick={() => setOpen(true)}
className="bg-white text-black hover:bg-gray-100"
>
<Button onClick={() => setOpen(true)} variant="ghost">
Sign up
</Button>
<AuthModal open={open} onOpenChange={setOpen} />

View File

@@ -62,9 +62,7 @@ export function MusicTrackRow({
return (
<li
className={
"flex gap-1 hover:bg-slate-200 group py-2 px-2 cursor-pointer"
}
className={"flex gap-1 hover:bg-slate-200 group py-2 px-2 cursor-pointer"}
onClick={handleTrackClick}
>
<button

View File

@@ -31,7 +31,7 @@ export function MusicTrackTitleInput({
return (
<div
className="relative flex-grow"
className="relative flex-grow max-w-64"
onClick={(evt) => evt.stopPropagation()}
>
<input

View File

@@ -15,13 +15,6 @@ export function PlayerControls({ mediaPlayer }: { mediaPlayer: MediaPlayer }) {
resolve: { root: { activePlaylist: true } },
}).me?.root.activePlaylist;
useMediaEndListener(mediaPlayer.playNextTrack);
useKeyboardListener("Space", () => {
if (document.activeElement !== document.body) return;
playState.toggle();
});
const activeTrack = useCoState(MusicTrack, mediaPlayer.activeTrackId, {
resolve: { waveform: true },
});
@@ -73,3 +66,18 @@ export function PlayerControls({ mediaPlayer }: { mediaPlayer: MediaPlayer }) {
</footer>
);
}
export function KeyboardListener({
mediaPlayer,
}: { mediaPlayer: MediaPlayer }) {
const playState = usePlayState();
useMediaEndListener(mediaPlayer.playNextTrack);
useKeyboardListener("Space", () => {
if (document.activeElement !== document.body) return;
playState.toggle();
});
return null;
}

View File

@@ -1,27 +1,40 @@
import { MusicaAccount } from "@/1_schema";
import { deletePlaylist } from "@/4_actions";
import { useAccount } from "jazz-react";
import { Trash2 } from "lucide-react";
import { MusicTrack, MusicaAccount } from "@/1_schema";
import { createNewPlaylist, deletePlaylist } from "@/4_actions";
import { MediaPlayer } from "@/5_useMediaPlayer";
import {
Sidebar,
SidebarContent,
SidebarFooter,
SidebarGroup,
SidebarGroupContent,
SidebarGroupLabel,
SidebarHeader,
SidebarMenu,
SidebarMenuAction,
SidebarMenuButton,
SidebarMenuItem,
} from "@/components/ui/sidebar";
import { usePlayState } from "@/lib/audio/usePlayState";
import { useAccount, useCoState } from "jazz-react";
import { Home, Music, Pause, Play, Plus, Trash2 } from "lucide-react";
import { useNavigate, useParams } from "react-router";
import { LocalOnlyTag } from "./LocalOnlyTag";
import { AuthButton } from "./AuthButton";
export function SidePanel() {
export function SidePanel({ mediaPlayer }: { mediaPlayer: MediaPlayer }) {
const { playlistId } = useParams();
const navigate = useNavigate();
const { me } = useAccount(MusicaAccount, {
resolve: { root: { playlists: { $each: true } } },
});
function handleAllTracksClick(evt: React.MouseEvent<HTMLAnchorElement>) {
evt.preventDefault();
const playState = usePlayState();
const isPlaying = playState.value === "play";
function handleAllTracksClick() {
navigate(`/`);
}
function handlePlaylistClick(
evt: React.MouseEvent<HTMLAnchorElement>,
playlistId: string,
) {
evt.preventDefault();
function handlePlaylistClick(playlistId: string) {
navigate(`/playlist/${playlistId}`);
}
@@ -32,73 +45,121 @@ export function SidePanel() {
}
}
async function handleCreatePlaylist() {
const playlist = await createNewPlaylist();
navigate(`/playlist/${playlist.id}`);
}
const activeTrack = useCoState(MusicTrack, mediaPlayer.activeTrackId, {
resolve: { waveform: true },
});
const activeTrackTitle = activeTrack?.title;
return (
<aside className="w-64 p-6 bg-white overflow-y-auto">
<div className="flex items-center mb-1">
<svg
className="w-8 h-8 mr-2"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M9 18V5l12-2v13"
stroke="#3b82f6"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M6 15H3c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zM18 13h-3c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2z"
fill="#3b82f6"
/>
</svg>
<span className="text-xl font-bold text-blue-600">Music Player</span>
</div>
<div className="mb-6">
<LocalOnlyTag />
</div>
<nav>
<h2 className="mb-2 text-sm font-semibold text-gray-600">Playlists</h2>
<ul className="space-y-1">
<li>
<a
href="#"
className={`block px-2 py-1 text-sm rounded ${
!playlistId ? "bg-blue-100 text-blue-600" : "hover:bg-blue-100"
}`}
onClick={handleAllTracksClick}
>
All tracks
</a>
</li>
{me?.root.playlists.map((playlist, index) => (
<li
key={index}
className={`px-2 py-1 flex transition-all duration-300 rounded items-center justify-between ${
playlist.id === playlistId ? "bg-blue-100" : ""
}`}
>
<a
href="#"
className={`w-full text-sm`}
onClick={(evt) => handlePlaylistClick(evt, playlist.id)}
<Sidebar>
<SidebarHeader>
<SidebarMenu>
<SidebarMenuItem className="flex items-center gap-2">
<div className="flex aspect-square size-8 items-center justify-center rounded-lg bg-blue-600 text-white">
<svg
className="size-4"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
{playlist.title}
</a>
{playlist.id === playlistId && (
<button
onClick={() => handleDeletePlaylist(playlist.id)}
className="ml-2 text-red-600 hover:text-red-800 animate-in fade-in scale-in duration-200"
aria-label={`Delete ${playlist.title}`}
>
<Trash2 size={16} />
</button>
)}
</li>
))}
</ul>
</nav>
</aside>
<path
d="M9 18V5l12-2v13"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M6 15H3c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zM18 13h-3c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2z"
fill="currentColor"
/>
</svg>
</div>
<div className="grid flex-1 text-left text-sm leading-tight">
<span className="truncate font-semibold">Music Player</span>
</div>
<AuthButton />
</SidebarMenuItem>
</SidebarMenu>
</SidebarHeader>
<SidebarContent>
<SidebarGroup>
<SidebarGroupContent>
<SidebarMenu>
<SidebarMenuItem>
<SidebarMenuButton onClick={handleAllTracksClick}>
<Home className="size-4" />
<span>Go to all tracks</span>
</SidebarMenuButton>
</SidebarMenuItem>
</SidebarMenu>
</SidebarGroupContent>
</SidebarGroup>
<SidebarGroup>
<SidebarGroupLabel>Playlists</SidebarGroupLabel>
<SidebarGroupContent>
<SidebarMenu>
<SidebarMenuItem>
<SidebarMenuButton onClick={handleCreatePlaylist}>
<Plus className="size-4" />
<span>Add a new playlist</span>
</SidebarMenuButton>
</SidebarMenuItem>
{me?.root.playlists.map((playlist) => (
<SidebarMenuItem key={playlist.id}>
<SidebarMenuButton
onClick={() => handlePlaylistClick(playlist.id)}
isActive={playlist.id === playlistId}
>
<div className="flex items-center gap-2">
<Music className="size-4" />
<span>{playlist.title}</span>
</div>
</SidebarMenuButton>
{playlist.id === playlistId && (
<SidebarMenuAction
onClick={() => handleDeletePlaylist(playlist.id)}
className="text-red-600 hover:text-red-800"
>
<Trash2 className="size-4" />
<span className="sr-only">Delete {playlist.title}</span>
</SidebarMenuAction>
)}
</SidebarMenuItem>
))}
</SidebarMenu>
</SidebarGroupContent>
</SidebarGroup>
</SidebarContent>
{activeTrack && (
<SidebarFooter>
<SidebarMenu>
<SidebarMenuItem className="flex justify-end">
<SidebarMenuButton
onClick={playState.toggle}
aria-label={
isPlaying ? "Pause active track" : "Play active track"
}
>
<div className="w-[28px] h-[28px] flex items-center justify-center bg-blue-600 rounded-full text-white hover:bg-blue-700">
{isPlaying ? (
<Pause size={16} fill="currentColor" />
) : (
<Play size={16} fill="currentColor" />
)}
</div>
<span>{activeTrackTitle}</span>
</SidebarMenuButton>
</SidebarMenuItem>
</SidebarMenu>
</SidebarFooter>
)}
</Sidebar>
);
}

View File

@@ -5,7 +5,7 @@ import * as React from "react";
import { cn } from "@/lib/utils";
const buttonVariants = cva(
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
{
variants: {
variant: {
@@ -53,5 +53,4 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
);
Button.displayName = "Button";
// eslint-disable-next-line react-refresh/only-export-components
export { Button, buttonVariants };

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