Compare commits

..

120 Commits

Author SHA1 Message Date
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
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
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
Balazs Hevesi
1b9b9273e5 Update 0-14-0.mdx 2025-05-23 22:18:05 +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
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
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
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
Trisha Lim
e7733a5428 take svelte out of experimental 2025-05-21 14:45:12 +01:00
Trisha Lim
4683cc7ada homepage: redesign supported env section 2025-05-19 16:29:43 +01:00
295 changed files with 21991 additions and 11535 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,78 @@
# betterauth
## 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

View File

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

View File

@@ -1,5 +1,60 @@
# chat-rn-expo-clerk
## 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

View File

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

View File

@@ -1,5 +1,54 @@
# chat-rn-expo
## 1.0.11
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-expo@0.14.20
## 1.0.10
### Patch Changes
- Updated dependencies [061ec99]
- jazz-expo@0.14.19
- jazz-tools@0.14.19
## 1.0.9
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-expo@0.14.18
## 1.0.8
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-expo@0.14.17
## 1.0.7
### Patch Changes
- jazz-expo@0.14.16
- jazz-tools@0.14.16
## 1.0.6
### Patch Changes
- jazz-expo@0.14.15
- jazz-tools@0.14.15
## 1.0.5
### Patch Changes

View File

@@ -14,7 +14,7 @@
},
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.anonymous.chatrnexpo"
"bundleIdentifier": "tools.jazz.chatrnexpo"
},
"android": {
"adaptiveIcon": {
@@ -22,7 +22,7 @@
"backgroundColor": "#ffffff"
},
"edgeToEdgeEnabled": true,
"package": "com.anonymous.chatrnexpo"
"package": "tools.jazz.chatrnexpo"
},
"web": {
"favicon": "./assets/favicon.png"

View File

@@ -1,6 +1,6 @@
{
"name": "chat-rn-expo",
"version": "1.0.5",
"version": "1.0.11",
"main": "index.ts",
"scripts": {
"build": "expo prebuild",

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

View File

@@ -3,14 +3,18 @@
# This script is necessary, because unlike ios, the android emulator action
# accepts a script, runs it as your tests, then terminates.
# set -e
set -e
# # 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
# cd ..
OUTPUT_FILE=~/output/android-install.log
mkdir -p ~/output
touch $OUTPUT_FILE
# build and install the app
echo "Building and installing Android app."
echo "If it fails, its output will be in artifact: android-install.log..."
cd ./android/
./gradlew installRelease >> $OUTPUT_FILE 2>&1
cd ..
# run the e2e tests
export PATH="$PATH":"$HOME/.maestro/bin"

View File

@@ -1,5 +1,67 @@
# chat-rn
## 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

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.132",
"version": "1.0.138",
"main": "index.js",
"scripts": {
"android": "react-native run-android",
@@ -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,59 @@
# chat-vue
## 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

View File

@@ -1,6 +1,6 @@
{
"name": "chat-vue",
"version": "0.0.112",
"version": "0.0.118",
"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,60 @@
# jazz-example-chat
## 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

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-chat",
"private": true,
"version": "0.0.212",
"version": "0.0.218",
"type": "module",
"scripts": {
"dev": "vite",
@@ -21,18 +21,18 @@
"lucide-react": "^0.274.0",
"react": "19.0.0",
"react-dom": "19.0.0",
"zod": "4.0.0-beta.20250505T012514"
"zod": "3.25.28"
},
"devDependencies": {
"@playwright/test": "^1.50.1",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react-swc": "^3.3.2",
"@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

@@ -1,5 +1,60 @@
# minimal-auth-clerk
## 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

View File

@@ -1,7 +1,7 @@
{
"name": "clerk",
"private": true,
"version": "0.0.111",
"version": "0.0.117",
"type": "module",
"scripts": {
"dev": "vite",
@@ -25,9 +25,9 @@
"@biomejs/biome": "1.9.4",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"@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,59 @@
# file-share-svelte
## 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

View File

@@ -1,6 +1,6 @@
{
"name": "file-share-svelte",
"version": "0.0.96",
"version": "0.0.102",
"private": true,
"type": "module",
"scripts": {
@@ -35,7 +35,7 @@
"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,60 @@
# jazz-tailwind-demo-auth-starter
## 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

View File

@@ -1,7 +1,7 @@
{
"name": "filestream",
"private": true,
"version": "0.0.51",
"version": "0.0.57",
"type": "module",
"scripts": {
"dev": "vite",
@@ -21,13 +21,13 @@
"@biomejs/biome": "1.9.4",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"@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,54 @@
# form
## 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

View File

@@ -1,7 +1,7 @@
{
"name": "form",
"private": true,
"version": "0.1.52",
"version": "0.1.58",
"type": "module",
"scripts": {
"dev": "vite",
@@ -23,13 +23,13 @@
"@tailwindcss/forms": "^0.5.9",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"@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,54 @@
# image-upload
## 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

View File

@@ -1,7 +1,7 @@
{
"name": "image-upload",
"private": true,
"version": "0.0.108",
"version": "0.0.114",
"type": "module",
"scripts": {
"dev": "vite",
@@ -20,10 +20,10 @@
"@biomejs/biome": "1.9.4",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"@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,54 @@
# jazz-example-inspector
## 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

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-inspector-app",
"private": true,
"version": "0.0.161",
"version": "0.0.167",
"type": "module",
"scripts": {
"dev": "vite",
@@ -26,11 +26,11 @@
"devDependencies": {
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react-swc": "^3.3.2",
"@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

@@ -1,5 +1,54 @@
# jazz-nextjs
## 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

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-nextjs",
"version": "0.1.1",
"version": "0.1.7",
"private": true,
"scripts": {
"dev": "next dev --turbopack",

View File

@@ -1,7 +1,7 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { Jazz } from "./jazz";
import { Jazz } from "../jazz";
const geistSans = Geist({
variable: "--font-geist-sans",

View File

@@ -2,6 +2,7 @@
import { useAccount } from "jazz-react";
import { Account } from "jazz-tools";
import Link from "next/link";
export default function Home() {
const { me } = useAccount(Account, {
@@ -34,6 +35,12 @@ export default function Home() {
}}
/>
</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,5 @@
import { createSSRJazzAgent } from "jazz-react/ssr";
export const jazzSSR = createSSRJazzAgent({
peer: "wss://cloud.jazz.tools/",
});

View File

@@ -41,6 +41,6 @@
"npm-run-all": "^4.1.5",
"tsx": "^4.19.3",
"typescript": "~5.6.2",
"vite": "6.0.11"
"vite": "6.3.5"
}
}

View File

@@ -1,5 +1,54 @@
# multi-cursors
## 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

View File

@@ -1,7 +1,7 @@
{
"name": "multi-cursors",
"private": true,
"version": "0.0.104",
"version": "0.0.110",
"type": "module",
"scripts": {
"dev": "vite",
@@ -17,20 +17,20 @@
"jazz-tools": "workspace:*",
"react": "19.0.0",
"react-dom": "19.0.0",
"zod": "3.25.0-beta.20250518T002810"
"zod": "3.25.28"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"@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

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

View File

@@ -1,7 +1,7 @@
{
"name": "multiauth",
"private": true,
"version": "0.0.52",
"version": "0.0.58",
"type": "module",
"scripts": {
"dev": "vite",
@@ -22,9 +22,9 @@
"@biomejs/biome": "1.9.4",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"@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,60 @@
# jazz-example-musicplayer
## 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

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-music-player",
"private": true,
"version": "0.0.133",
"version": "0.0.139",
"type": "module",
"scripts": {
"dev": "vite",
@@ -37,11 +37,11 @@
"@playwright/test": "^1.50.1",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react-swc": "^3.3.2",
"@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

@@ -14,6 +14,7 @@ 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 />
</>
);

View File

@@ -67,7 +67,7 @@ export function HomePage({ mediaPlayer }: { mediaPlayer: MediaPlayer }) {
<SidebarInset className="flex flex-col h-screen text-gray-800 bg-blue-50">
<div className="flex flex-1 overflow-hidden">
<SidePanel mediaPlayer={mediaPlayer} />
<main className="flex-1 p-6 overflow-y-auto">
<main className="flex-1 p-6 overflow-y-auto overflow-x-hidden">
<SidebarTrigger />
<div className="flex items-center justify-between mb-6">
{isRootPlaylist ? (
@@ -90,7 +90,7 @@ export function HomePage({ mediaPlayer }: { mediaPlayer: MediaPlayer }) {
)}
</div>
</div>
<ul className="flex flex-col">
<ul className="flex flex-col max-w-full">
{playlist?.tracks?.map(
(track) =>
track && (

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

View File

@@ -1,7 +1,7 @@
{
"name": "organization",
"private": true,
"version": "0.0.104",
"version": "0.0.110",
"type": "module",
"scripts": {
"dev": "vite",
@@ -27,12 +27,12 @@
"@tailwindcss/forms": "^0.5.9",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"@vitejs/plugin-react": "^4.5.1",
"autoprefixer": "^10.4.20",
"globals": "^15.11.0",
"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,53 @@
# passkey-svelte
## 0.0.104
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-svelte@0.14.20
## 0.0.103
### Patch Changes
- jazz-svelte@0.14.19
- jazz-tools@0.14.19
## 0.0.102
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-svelte@0.14.18
## 0.0.101
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-svelte@0.14.17
## 0.0.100
### Patch Changes
- jazz-svelte@0.14.16
- jazz-tools@0.14.16
## 0.0.99
### Patch Changes
- jazz-svelte@0.14.15
- jazz-tools@0.14.15
## 0.0.98
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "passkey-svelte",
"version": "0.0.98",
"version": "0.0.104",
"type": "module",
"private": true,
"scripts": {
@@ -29,7 +29,7 @@
"svelte-check": "^4.0.0",
"typescript": "5.6.2",
"typescript-eslint": "^8.0.0",
"vite": "6.0.11"
"vite": "6.3.5"
},
"dependencies": {
"jazz-svelte": "workspace:*",

View File

@@ -1,5 +1,54 @@
# minimal-auth-passkey
## 0.0.115
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-react@0.14.20
## 0.0.114
### Patch Changes
- jazz-react@0.14.19
- jazz-tools@0.14.19
## 0.0.113
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-react@0.14.18
## 0.0.112
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-react@0.14.17
## 0.0.111
### Patch Changes
- jazz-react@0.14.16
- jazz-tools@0.14.16
## 0.0.110
### Patch Changes
- Updated dependencies [f9590f9]
- jazz-react@0.14.15
- jazz-tools@0.14.15
## 0.0.109
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "passkey",
"private": true,
"version": "0.0.109",
"version": "0.0.115",
"type": "module",
"scripts": {
"dev": "vite",
@@ -20,9 +20,9 @@
"@biomejs/biome": "1.9.4",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"@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,54 @@
# passphrase
## 0.0.112
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-react@0.14.20
## 0.0.111
### Patch Changes
- jazz-react@0.14.19
- jazz-tools@0.14.19
## 0.0.110
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-react@0.14.18
## 0.0.109
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-react@0.14.17
## 0.0.108
### Patch Changes
- jazz-react@0.14.16
- jazz-tools@0.14.16
## 0.0.107
### Patch Changes
- Updated dependencies [f9590f9]
- jazz-react@0.14.15
- jazz-tools@0.14.15
## 0.0.106
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "passphrase",
"private": true,
"version": "0.0.106",
"version": "0.0.112",
"type": "module",
"scripts": {
"dev": "vite",
@@ -20,9 +20,9 @@
"@biomejs/biome": "1.9.4",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"@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,54 @@
# jazz-password-manager
## 0.0.136
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-react@0.14.20
## 0.0.135
### Patch Changes
- jazz-react@0.14.19
- jazz-tools@0.14.19
## 0.0.134
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-react@0.14.18
## 0.0.133
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-react@0.14.17
## 0.0.132
### Patch Changes
- jazz-react@0.14.16
- jazz-tools@0.14.16
## 0.0.131
### Patch Changes
- Updated dependencies [f9590f9]
- jazz-react@0.14.15
- jazz-tools@0.14.15
## 0.0.130
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-password-manager",
"private": true,
"version": "0.0.130",
"version": "0.0.136",
"type": "module",
"scripts": {
"dev": "vite",
@@ -22,12 +22,12 @@
"devDependencies": {
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"@vitejs/plugin-react-swc": "^3.3.2",
"@vitejs/plugin-react": "^4.5.1",
"@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

@@ -1,5 +1,54 @@
# jazz-example-pets
## 0.0.234
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-react@0.14.20
## 0.0.233
### Patch Changes
- jazz-react@0.14.19
- jazz-tools@0.14.19
## 0.0.232
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-react@0.14.18
## 0.0.231
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-react@0.14.17
## 0.0.230
### Patch Changes
- jazz-react@0.14.16
- jazz-tools@0.14.16
## 0.0.229
### Patch Changes
- Updated dependencies [f9590f9]
- jazz-react@0.14.15
- jazz-tools@0.14.15
## 0.0.228
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-pets",
"private": true,
"version": "0.0.228",
"version": "0.0.234",
"type": "module",
"scripts": {
"dev": "vite",
@@ -37,14 +37,14 @@
"@types/qrcode": "^1.5.1",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react-swc": "^3.3.2",
"@vitejs/plugin-react-swc": "^3.10.1",
"autoprefixer": "^10.4.20",
"is-ci": "^3.0.1",
"jazz-run": "workspace:*",
"postcss": "^8.4.27",
"tailwindcss": "^3.4.17",
"typescript": "5.6.2",
"vite": "6.0.11",
"vite": "6.3.5",
"vite-plugin-top-level-await": "^1.4.4"
}
}

View File

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

View File

@@ -1,7 +1,7 @@
{
"name": "reactions",
"private": true,
"version": "0.0.108",
"version": "0.0.114",
"type": "module",
"scripts": {
"dev": "vite",
@@ -21,9 +21,9 @@
"@biomejs/biome": "1.9.4",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"@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,60 @@
# richtext-tiptap
## 0.1.27
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-react@0.14.20
- jazz-richtext-tiptap@0.14.20
## 0.1.26
### Patch Changes
- jazz-react@0.14.19
- jazz-richtext-tiptap@0.14.19
- jazz-tools@0.14.19
## 0.1.25
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-react@0.14.18
- jazz-richtext-tiptap@0.14.18
## 0.1.24
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-react@0.14.17
- jazz-richtext-tiptap@0.1.22
## 0.1.23
### Patch Changes
- jazz-react@0.14.16
- jazz-tools@0.14.16
- jazz-richtext-tiptap@0.1.21
## 0.1.22
### Patch Changes
- Updated dependencies [f9590f9]
- jazz-react@0.14.15
- jazz-tools@0.14.15
- jazz-richtext-tiptap@0.1.20
## 0.1.21
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "richtext-tiptap",
"private": true,
"version": "0.1.21",
"version": "0.1.27",
"type": "module",
"scripts": {
"dev": "vite",
@@ -33,13 +33,13 @@
"@playwright/test": "^1.50.1",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"@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,60 @@
# richtext
## 0.0.104
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-react@0.14.20
- jazz-richtext-prosemirror@0.14.20
## 0.0.103
### Patch Changes
- jazz-react@0.14.19
- jazz-richtext-prosemirror@0.14.19
- jazz-tools@0.14.19
## 0.0.102
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-react@0.14.18
- jazz-richtext-prosemirror@0.14.18
## 0.0.101
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-react@0.14.17
- jazz-richtext-prosemirror@0.1.33
## 0.0.100
### Patch Changes
- jazz-react@0.14.16
- jazz-tools@0.14.16
- jazz-richtext-prosemirror@0.1.32
## 0.0.99
### Patch Changes
- Updated dependencies [f9590f9]
- jazz-react@0.14.15
- jazz-tools@0.14.15
- jazz-richtext-prosemirror@0.1.31
## 0.0.98
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "richtext",
"private": true,
"version": "0.0.98",
"version": "0.0.104",
"type": "module",
"scripts": {
"dev": "vite",
@@ -30,13 +30,13 @@
"@playwright/test": "^1.50.1",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"@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,59 @@
# todo-vue
## 0.0.116
### 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.115
### Patch Changes
- jazz-browser@0.14.19
- jazz-tools@0.14.19
- jazz-vue@0.14.19
## 0.0.114
### 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.113
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-browser@0.14.17
- jazz-vue@0.14.17
## 0.0.112
### Patch Changes
- jazz-browser@0.14.16
- jazz-tools@0.14.16
- jazz-vue@0.14.16
## 0.0.111
### Patch Changes
- jazz-browser@0.14.15
- jazz-tools@0.14.15
- jazz-vue@0.14.15
## 0.0.110
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "todo-vue",
"version": "0.0.110",
"version": "0.0.116",
"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,54 @@
# jazz-example-todo
## 0.0.233
### Patch Changes
- Updated dependencies [6f72419]
- Updated dependencies [04b20c2]
- jazz-tools@0.14.20
- jazz-react@0.14.20
## 0.0.232
### Patch Changes
- jazz-react@0.14.19
- jazz-tools@0.14.19
## 0.0.231
### Patch Changes
- Updated dependencies [4b950bc]
- Updated dependencies [d6d9c0a]
- Updated dependencies [c559054]
- jazz-tools@0.14.18
- jazz-react@0.14.18
## 0.0.230
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-react@0.14.17
## 0.0.229
### Patch Changes
- jazz-react@0.14.16
- jazz-tools@0.14.16
## 0.0.228
### Patch Changes
- Updated dependencies [f9590f9]
- jazz-react@0.14.15
- jazz-tools@0.14.15
## 0.0.227
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-todo",
"private": true,
"version": "0.0.227",
"version": "0.0.233",
"type": "module",
"scripts": {
"dev": "vite",
@@ -33,11 +33,11 @@
"@types/qrcode": "^1.5.1",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react-swc": "^3.3.2",
"@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

@@ -1,4 +1,4 @@
import { co, z } from "jazz-tools";
import { CoPlainText, co, z } from "jazz-tools";
/** Walkthrough: Defining the data model with CoJSON
*
@@ -11,9 +11,30 @@ import { co, z } from "jazz-tools";
**/
/** An individual task which collaborators can tick or rename */
export const Task = co.map({
export const Task = co
.map({
done: z.boolean(),
text: co.plainText(),
version: z.literal(1),
})
.withMigration((task) => {
if (!task.version) {
// Cast to the v1 version
const task_v1 = task.castAs(Task_V1);
// Check if the task text field is a string or an id
// if it's a string migrate to plaintext
// We need to do this check because some tasks with plainText have been created before we added the version field
if (!task_v1.text.startsWith("co_z")) {
task.text = CoPlainText.create(task_v1.text, task._owner);
}
task.version = 1;
}
});
const Task_V1 = co.map({
done: z.boolean(),
text: co.plainText(),
text: z.string(),
});
/** Our top level object: a project with a title, referencing a list of tasks */

View File

@@ -51,6 +51,7 @@ export function ProjectTodoTable() {
{
done: false,
text: CoPlainText.create(text, project._owner),
version: 1,
},
project._owner,
);

View File

@@ -19,6 +19,7 @@ export function generateRandomProject(
faker.lorem.sentence({ min: 3, max: 8 }),
tasks._owner,
),
version: 1,
});
tasks.push(task);
}

View File

@@ -1,5 +1,60 @@
# version-history
## 0.0.112
### 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.111
### Patch Changes
- jazz-inspector@0.14.19
- jazz-react@0.14.19
- jazz-tools@0.14.19
## 0.0.110
### 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.109
### Patch Changes
- Updated dependencies [e512df4]
- jazz-tools@0.14.17
- jazz-inspector@0.14.17
- jazz-react@0.14.17
## 0.0.108
### Patch Changes
- jazz-inspector@0.14.16
- jazz-react@0.14.16
- jazz-tools@0.14.16
## 0.0.107
### Patch Changes
- Updated dependencies [f9590f9]
- jazz-react@0.14.15
- jazz-inspector@0.14.15
- jazz-tools@0.14.15
## 0.0.106
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "version-history",
"private": true,
"version": "0.0.106",
"version": "0.0.112",
"type": "module",
"scripts": {
"dev": "vite",
@@ -23,9 +23,9 @@
"@biomejs/biome": "1.9.4",
"@types/react": "19.0.0",
"@types/react-dom": "19.0.0",
"@vitejs/plugin-react": "^4.3.3",
"@vitejs/plugin-react": "^4.5.1",
"globals": "^15.11.0",
"typescript": "5.6.2",
"vite": "6.0.11"
"vite": "6.3.5"
}
}

View File

@@ -27,6 +27,7 @@ function App() {
),
estimate: 5,
status: "backlog",
createdAt: new Date(),
},
group,
);

View File

@@ -74,6 +74,8 @@ export function IssueVersionHistory({ id }: { id: string }) {
].sort((a, b) => (a.madeAt < b.madeAt ? -1 : a.madeAt > b.madeAt ? 1 : 0));
}, [issue?._edits]);
if (!issue) return;
return (
<>
<div className="flex flex-col text-sm gap-2">
@@ -98,6 +100,12 @@ export function IssueVersionHistory({ id }: { id: string }) {
<hr />
<DescriptionVersionHistory id={id} />
<hr />
<div>
<p>This issue was created at {issue.createdAt.toLocaleString()}</p>
</div>
</>
);
}

View File

@@ -22,6 +22,7 @@ export function ProjectComponent({ projectID }: { projectID: string }) {
description: CoPlainText.create("", project._owner),
estimate: 0,
status: "backlog",
createdAt: new Date(),
},
project._owner,
),

View File

@@ -10,6 +10,7 @@ export const Issue = co.map({
description: co.plainText(),
estimate: z.number(),
status: z.literal(["backlog", "in progress", "done"]),
createdAt: z.date(),
});
export const Project = co.map({

View File

@@ -34,5 +34,4 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts
typedoc
codeSamples

View File

@@ -72,7 +72,7 @@ export const team: Array<TeamMember> = [
{
name: "Emil Sayahi",
titles: ["Full-Stack Dev", "Support Dev"],
location: "Oxford, Ohio, US",
location: "San Francisco, California, US",
github: "emmyoh",
linkedin: "emil-sayahi",
bluesky: "sayahi.bsky.social",

View File

@@ -44,7 +44,6 @@
"autoprefixer": "^10",
"postcss": "^8",
"tailwindcss": "^3",
"typedoc": "^0.25.13",
"typescript": "^5.3.3"
}
}

View File

@@ -34,7 +34,6 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts
typedoc
codeSamples
# Turborepo
.turbo

View File

@@ -1,29 +0,0 @@
import { PackageDocs } from "@/components/docs/packageDocs";
import { packages } from "@/content/packages";
import { notFound } from "next/navigation";
interface Props {
params: Promise<{ package: string }>;
}
export default async function Page({ params }: Props) {
const packageName = (await params).package;
if (!packages.map((p) => p.name).includes(packageName)) {
return notFound();
}
return <PackageDocs package={packageName} />;
}
export async function generateMetadata({ params }: Props) {
const packageName = (await params).package;
return {
title: `${packageName} - jazz`,
description: `API reference for ${packageName}.`,
};
}
export async function generateStaticParams() {
// TODO: ideally we check which files exist in ../../typedoc
return packages.map((pkg) => ({ package: pkg.name }));
}

View File

@@ -1,37 +0,0 @@
import { SideNavLayout } from "@/components/SideNavLayout";
import { ApiNav } from "@/components/docs/ApiNav";
import { JazzMobileNav } from "@/components/nav";
import { Prose } from "@garden-co/design-system/src/components/molecules/Prose";
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<SideNavLayout
sideNav={<ApiNav />}
floatingNavSections={[
{
name: "API Ref",
content: <ApiNav />,
icon: "package",
},
]}
>
<Prose className="overflow-x-hidden lg:flex-1 pb-10 pt-[calc(61px+2.5rem)] md:pt-10">
{children}
</Prose>
<JazzMobileNav
sections={[
{
name: "API Ref",
content: <ApiNav />,
icon: "package",
},
]}
/>
</SideNavLayout>
);
}

View File

@@ -1,107 +0,0 @@
import { packages } from "@/content/packages";
import { Icon } from "@garden-co/design-system/src/components/atoms/Icon";
import { clsx } from "clsx";
import type { Metadata } from "next";
import Link from "next/link";
export const metadata: Metadata = {
title: "API reference",
openGraph: {
title: "API reference",
},
};
const CardHeading = ({
children,
className,
}: {
children: React.ReactNode;
className?: string;
}) => {
return (
<h2
className={clsx(
className,
"font-medium text-stone-950 dark:text-white text-lg transition-colors",
)}
>
{children}
</h2>
);
};
const CardBody = ({
children,
className,
}: {
children: React.ReactNode;
className?: string;
}) => {
return <p className={clsx(className, "text-sm")}>{children}</p>;
};
const Card = ({
children,
className,
}: {
children: React.ReactNode;
className?: string;
}) => {
return (
<div
className={clsx(
className,
"not-prose p-4 h-full rounded-xl flex flex-col gap-1.5 group lg:p-5",
)}
>
{children}
</div>
);
};
export default function Page() {
return (
<>
<h1>API Reference</h1>
<div className="grid sm:grid-cols-2 lg:grid-cols-3 gap-4">
{packages.map(({ name, description }) => (
<Link
className="not-prose block"
href={`/api-reference/${name}`}
key={name}
>
<Card className="border shadow-sm">
<Icon name="package" className="text-stone-500" />
<CardHeading className="group-hover:text-primary dark:group-hover:text-blue-600">
{name}
</CardHeading>
<CardBody>{description}</CardBody>
</Card>
</Link>
))}
<Card className="bg-stone-50 dark:bg-stone-925">
<Icon name="help" size="md" className="text-stone-500 " />
<CardHeading>
Can&apos;t find what you&apos;re looking for?
</CardHeading>
<CardBody>
Get help from our{" "}
<Link href="https://discord.gg/utDMjHYg42" className="underline">
Discord
</Link>
, or open an issue on{" "}
<Link
href="https://github.com/garden-co/jazz"
className="underline"
>
GitHub
</Link>
.
</CardBody>
</Card>
</div>
</>
);
}

View File

@@ -17,6 +17,7 @@ export default function Home() {
<HeroSection />
<div className="container flex flex-col gap-12 mt-12 lg:gap-20 lg:mt-20">
<SupportedEnvironmentsSection />
<HowJazzWorksSection />
<Testimonial name="Spreadsheet app (stealth)" role="CTO">
@@ -51,8 +52,6 @@ export default function Home() {
<FeaturesSection />
<SupportedEnvironmentsSection />
<ComingSoonSection />
<EarlyAdopterSection />

View File

@@ -3,7 +3,7 @@ import { ThemeProvider } from "@/components/ThemeProvider";
import { JazzFooter } from "@/components/footer";
import { marketingCopy } from "@/content/marketingCopy";
import { fontClasses } from "@garden-co/design-system/src/fonts";
import { Analytics } from "@vercel/analytics/react";
import { Analytics } from "@vercel/analytics/next";
import { SpeedInsights } from "@vercel/speed-insights/next";
import type { Metadata } from "next";

View File

@@ -1,78 +0,0 @@
import { SideNav, SideNavBody, SideNavHeader } from "@/components/SideNav";
import { SideNavItem } from "@/components/SideNavItem";
import { packages } from "@/content/packages";
import { Icon } from "@garden-co/design-system/src/components/atoms/Icon";
import Link from "next/link";
import { requestProject } from "./requestProject";
export function ApiNav({ className }: { className?: string }) {
return (
<SideNav className={className}>
<SideNavBody>
<SideNavHeader className="mb-5" href="/api-reference">
API Reference
</SideNavHeader>
<ul className="space-y-5">
{packages.map(({ name }) => (
<li key={name}>
<PackageNavItem package={name} />
</li>
))}
</ul>
</SideNavBody>
</SideNav>
);
}
export async function PackageNavItem({
package: packageName,
}: {
package: string;
}) {
let project = await requestProject(packageName as any);
return (
<>
<SideNavItem
className="mb-1 flex gap-2 items-center"
href={`/api-reference/${packageName}`}
>
<Icon name="package" size="xs" />
{packageName}
</SideNavItem>
{project.categories?.map((category) => {
return (
<details
key={category.title}
open={category.title !== "Other"}
className="group ml-1.5 border-l"
>
<summary className="pl-[13px] py-1 cursor-pointer flex gap-2 items-center justify-between hover:text-stone-800 dark:hover:text-stone-200 [&::-webkit-details-marker]:hidden">
{category.title}
<Icon
name="chevronRight"
size="sm"
className="text-stone-300 group-open:rotate-90 transition-transform dark:text-stone-800"
/>
</summary>
<div className="pl-6">
{category.children.map(
(child, i, children) =>
(i == 0 || child.name !== children[i - 1]!.name) && (
<Link
key={child.id}
className="block py-0.5 text-ellipsis overflow-hidden font-mono hover:text-stone-800 dark:hover:text-stone-200"
href={`/api-reference/${packageName}#${child.name}`}
>
{child.name}
</Link>
),
)}
</div>
</details>
);
})}
</>
);
}

View File

@@ -1,425 +0,0 @@
import { Icon } from "@garden-co/design-system/src/components/atoms/Icon";
import { Fragment } from "react";
import {
CommentDisplayPart,
DeclarationReflection,
ReflectionKind,
SignatureReflection,
SomeType,
TypeContext,
TypeParameterReflection,
} from "typedoc";
import { requestProject } from "./requestProject";
import {
ClassOrInterface,
DocComment,
FnDecl,
Highlight,
PropCategory,
PropDecl,
} from "./tags";
export async function PackageDocs({
package: packageName,
}: {
package: string;
}) {
let project = await requestProject(packageName as any);
// console.dir(project, {depth: 10});
return (
<>
<h2 className="flex items-center gap-2">
<code>{packageName}</code> <Icon name="package" size="md" />
</h2>
{project.categories?.map((category) => {
return (
<section key={category.title}>
<h2>{category.title}</h2>
{category.children.map(
(child) =>
// Ability to link external documents has been added. Turning it off for now
// https://typedoc.org/documents/External_Documents.html
child.variant !== "document" && (
<RenderPackageChild
child={child}
key={child.id}
inPackage={packageName}
/>
),
)}
</section>
);
})}
</>
);
}
function RenderPackageChild({
child,
inPackage,
}: {
child: DeclarationReflection;
inPackage: string;
}) {
if (
child.kind === ReflectionKind.Class ||
child.kind === ReflectionKind.Interface
) {
return (
<RenderClassOrInterface classOrInterface={child} inPackage={inPackage} />
);
} else if (child.kind === ReflectionKind.TypeAlias) {
return <RenderTypeAlias inPackage={inPackage} child={child} />;
} else if (child.kind === ReflectionKind.Function) {
return child.getAllSignatures().map((signature, i) => {
const paramTypes = printParamsWithTypes(signature);
return (
<div
key={i}
id={child.name}
className="not-prose mt-4 p-3 rounded bg-stone-50 dark:bg-stone-925"
>
{
<Highlight hide={[0, 2]}>
{`function \n${printSimpleSignature(child, signature) + ":"}\n {}`}
</Highlight>
}{" "}
<span className="opacity-75 text-xs pl-1">
<Highlight>{printType(signature.type)}</Highlight>
</span>
<div className="ml-4 mt-0 text-xs opacity-75 flex">
{paramTypes.length > 0 && (
<div>
<Highlight
hide={[0, 1 + paramTypes.length]}
>{`function fn(...args: [\n${paramTypes.join(
",\n",
)}\n]) {}`}</Highlight>
</div>
)}
</div>
</div>
);
});
} else {
return (
<h3 id={child.name}>
{child.name} {child.type?.type}
</h3>
);
}
}
function RenderTypeAlias({
inPackage,
child,
}: {
inPackage: string;
child: DeclarationReflection;
}) {
const typeParameters = child.typeParameters?.map(
(tParam) =>
tParam.name + (tParam.type ? ` extends ${printType(tParam.type)}` : ""),
);
return (
<div className="mt-4">
<h3 className="not-prose" id={child.name}>
<Highlight>{`type ${child.name}`}</Highlight>
</h3>
<p className="not-prose text-sm ml-4">
<Highlight>{`type ${child.name}${typeParameters?.length && `<${typeParameters?.join(", ")}>`} = ${printType(
child.type,
)}`}</Highlight>
</p>
<div className="ml-4 mt-2 flex-[3]">
<DocComment>
{child.comment
? renderSummary(child.comment.summary)
: "⚠️ undocumented"}
</DocComment>
</div>
</div>
);
}
function RenderClassOrInterface({
inPackage,
classOrInterface: classOrInterface,
}: {
inPackage: string;
classOrInterface: DeclarationReflection;
}) {
const commentSummary = classOrInterface.comment?.summary;
const typeParamsWithConstraints = printTypeParamsWithConstraints(
classOrInterface.typeParameters,
);
return (
<ClassOrInterface
inPackage={inPackage}
name={classOrInterface.name}
doc={renderSummary(commentSummary)}
isInterface={classOrInterface.kind === ReflectionKind.Interface}
typeParameters={
classOrInterface.typeParameters?.length
? "<" +
classOrInterface.typeParameters
.map((tParam) => tParam.name)
.join(", ") +
">"
: ""
}
>
{typeParamsWithConstraints.length > 0 && (
<div className="text-sm -mt-4">
<Highlight
hide={[0, 1 + typeParamsWithConstraints.length]}
>{`class Thing<\n${typeParamsWithConstraints.join(
",\n",
)}\n]> {}`}</Highlight>
</div>
)}
{classOrInterface.categories?.map((category) => (
<div className="flex flex-col mt-6 first:mt-0" key={category.title}>
<PropCategory
name={category.title}
description={renderSummary(
category.description?.filter(
(p) => p.kind !== "code" || !p.text.startsWith("```"),
),
)}
example={renderSummary(
category.description?.filter(
(p) => p.kind === "code" && p.text.startsWith("```"),
),
)}
/>
{category.children.map(
(prop) =>
prop.variant !== "document" && (
<RenderProp
prop={prop}
klass={classOrInterface}
key={prop.id}
/>
),
)}
</div>
))}
</ClassOrInterface>
);
}
function renderSummary(commentSummary: CommentDisplayPart[] | undefined) {
return commentSummary?.map((part, idx) =>
part.kind === "text" ? (
<span key={idx}>
{part.text.split("\n").map((line, i, lines) => (
<Fragment key={i}>
{line}
{i !== lines.length - 1 && <br />}
</Fragment>
))}
</span>
) : part.kind === "inline-tag" ? (
<code key={idx}>
{part.tag} {part.text}
</code>
) : part.text.startsWith("```") ? (
<pre key={idx} className="text-xs sm:text-sm">
<Highlight>{part.text.split("\n").slice(1, -1).join("\n")}</Highlight>
</pre>
) : (
<Highlight className="whitespace-nowrap" key={idx}>
{part.text.slice(1, -1)}
</Highlight>
),
);
}
function RenderProp({
prop,
klass,
}: {
prop: DeclarationReflection;
klass: DeclarationReflection;
}) {
const propOrGetSig = prop.getSignature ? prop.getSignature : prop;
return prop.kind & ReflectionKind.FunctionOrMethod ? (
prop
.getAllSignatures()
.map((signature) => (
<FnDecl
key={signature.id}
signature={printSimplePropSignature(prop, klass, signature)}
typeParams={printTypeParamsWithConstraints(signature.typeParameters)}
paramTypes={printParamsWithTypes(signature)}
returnType={printType(signature.type)}
doc={renderSummary(signature.comment?.summary)}
example={renderSummary(
signature.comment?.getTag("@example")?.content,
)}
/>
))
) : (
<PropDecl
name={
(prop.flags.isStatic ? klass.name : "") +
(prop.name.startsWith("[") ? "" : ".") +
prop.name
}
type={printType(propOrGetSig.type)}
doc={propOrGetSig.comment && renderSummary(propOrGetSig.comment.summary)}
example={renderSummary(propOrGetSig.comment?.getTag("@example")?.content)}
/>
);
}
function printSimplePropSignature(
prop: DeclarationReflection,
klass: DeclarationReflection,
signature: SignatureReflection,
): string {
return (
`${prop.flags.isStatic ? klass.name : ""}.` +
printSimpleSignature(prop, signature)
);
}
function printSimpleSignature(
item: DeclarationReflection,
signature: SignatureReflection,
) {
return `${item.name}${
signature.typeParameters?.length
? "<" +
signature.typeParameters.map((tParam) => tParam.name).join(", ") +
">"
: ""
}(${printParams(signature)?.join(", ")})`;
}
function printParams(signature: SignatureReflection) {
return (
signature.parameters?.flatMap((param) =>
param.name === "this"
? []
: [
param.name === "__namedParameters" &&
param.type?.type === "reflection"
? "{ " +
param.type.declaration.children
?.map(
(child) => child.name + (child.flags.isOptional ? "?" : ""),
)
.join(", ") +
" }"
: param.name + (param.defaultValue ? "?" : ""),
],
) || []
);
}
function printParamsWithTypes(signature: SignatureReflection) {
return (
signature.parameters?.map(
(param) =>
(param.name === "__namedParameters"
? ""
: param.name + (param.defaultValue ? "?" : "") + ": ") +
printType(param.type),
) || []
);
}
function printTypeParamsWithConstraints(
typeParams: TypeParameterReflection[] | undefined,
): string[] {
return (
typeParams?.flatMap((tParam) =>
tParam.type ? [`${tParam.name} extends ${printType(tParam.type)}`] : [],
) || []
);
}
function printType(type: SomeType | undefined): string {
if (!type) return "NO TYPE";
if (type.type === "reflection") {
if (type.declaration.kind === ReflectionKind.TypeLiteral) {
if (type.declaration.signatures?.length) {
return (
type.declaration.signatures
?.map(
(sig) =>
`(${printParamsWithTypes(sig).join(
", ",
)}) => ${printType(sig.type)}`,
)
.join(" | ") || ""
);
} else {
return (
"{ " +
type.declaration.children
?.map((child) => `${child.name}: ${printType(child.type)}`)
.join(", ") +
" }"
);
}
}
return "TODO reflection type " + type.declaration.kind;
} else if (type.type === "reference") {
return (
type.name +
(type.typeArguments?.length
? "<" + type.typeArguments.map(printType).join(", ") + ">"
: "")
);
} else if (type.type === "intersection") {
return (
type.types
?.map((part) =>
part.needsParenthesis(TypeContext["intersectionElement"])
? `(${printType(part)})`
: printType(part),
)
.join(" & ") || "NO TYPES"
);
} else if (type.type === "union") {
return (
type.types
.sort((a, b) => (a.type === "intrinsic" ? 1 : -1))
?.map((part) =>
part.needsParenthesis(TypeContext["unionElement"])
? `(${printType(part)})`
: printType(part),
)
.join(" | ") || "NO TYPES"
);
} else if (type.type === "tuple") {
return `[${type.elements.map(printType).join(", ")}]`;
} else if (type.type === "array") {
if (type.needsParenthesis()) {
return `(${printType(type.elementType)})[]`;
} else {
return printType(type.elementType) + "[]";
}
} else if (type.type === "mapped") {
return `{[${type.parameter} in ${printType(
type.parameterType,
)}]: ${printType(type.templateType)}}`;
} else if (type.type === "indexedAccess") {
return `${printType(type.objectType)}[${printType(type.indexType)}]`;
} else if (type.type === "intrinsic") {
return type.name;
} else if (type.type === "predicate") {
return `${type.name} is ${printType(type.targetType)}`;
} else if (type.type === "query") {
return printType(type.queryType);
} else if (type.type === "literal") {
return JSON.stringify(type.value);
} else {
return "TODO type " + type.type;
}
}

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