Compare commits

..

711 Commits

Author SHA1 Message Date
Guido D'Orsi
1e6da19d5e fix: The .load function now returns null on error 2025-03-27 11:48:12 +01:00
Guido D'Orsi
10de4b6fc9 docs: document loading errors 2025-03-26 11:01:35 +01:00
Guido D'Orsi
2433344778 test: fix autoload test 2025-03-26 10:56:34 +01:00
Guido D'Orsi
4c01459942 fix(vue): fix types compilation for useAccount 2025-03-26 10:38:57 +01:00
Guido D'Orsi
8dacdd6e2f Merge pull request #1681 from garden-co/1656-document-loading-and-subscription
1656 Document loading and subscriptions
2025-03-25 19:16:39 +01:00
Guido D'Orsi
5b0580bfda docs: fix a broken vanilla example 2025-03-25 19:05:07 +01:00
Guido D'Orsi
2bed7e845d docs: complete the migration of the loading docs to twoslash 2025-03-25 18:55:25 +01:00
Anselm
76976026b7 Remove incorredct / unhelpful sections 2025-03-25 18:32:48 +01:00
Anselm
10ea8fbf88 Typecheck more of the subscribe and load docs, remove history docs again for now 2025-03-25 18:32:48 +01:00
Anselm
bd86b159b9 Fully type upgrade guide 2025-03-25 18:32:48 +01:00
Anselm
c4f5241818 More typechecking in upgrade guide 2025-03-25 18:32:48 +01:00
Anselm
181f433477 Fix Highlight component 2025-03-25 18:32:48 +01:00
Anselm
3897a7e137 Fix darkmode diff colours 2025-03-25 18:32:48 +01:00
Anselm
5082ecef3f Reintroduce Jazz colors 2025-03-25 18:32:47 +01:00
Anselm
268e433870 Typing in docs working 2025-03-25 18:32:47 +01:00
Anselm
6c185160c5 First attempt to make twoslash work 2025-03-25 18:32:47 +01:00
Anselm
d18323b74a Upgrade shiki and use built-in transformers for diffs 2025-03-25 18:32:47 +01:00
Anselm
edd91791c9 More details in deep loading 2025-03-25 18:32:47 +01:00
Anselm
958b13c050 Divide upgrade guide into breaking / new features 2025-03-25 18:32:47 +01:00
Anselm
bbe140f7be Remove incorrect stuff 2025-03-25 18:32:47 +01:00
Anselm
1625f82ab7 Clean up manual subscription & hooks 2025-03-25 18:32:47 +01:00
Anselm
843f729a62 Include current version of history & time travel 2025-03-25 18:32:47 +01:00
Anselm
cc4631bb42 "loading depth" -> "resolve query" 2025-03-25 18:32:47 +01:00
Anselm
3665ef0088 Container-like -> collections 2025-03-25 18:32:47 +01:00
Trisha Lim
e13039818e fix coming soon TOC 2025-03-25 18:32:44 +01:00
Benjamin S. Leveritt
2e79487982 Change to markdown + format
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-03-25 18:32:10 +01:00
Benjamin S. Leveritt
fc2c045a8d Fix ‘for example’
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-03-25 18:31:58 +01:00
Anselm
69bb94be06 Missing green line 2025-03-25 18:31:58 +01:00
Anselm
228c8fa796 Upgrade guide improvments 2025-03-25 18:31:58 +01:00
Benjamin S. Leveritt
a34b850824 Update CoMap.Record resolve example
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-03-25 18:31:45 +01:00
Benjamin S. Leveritt
96d518bb97 Remove auto-loading section
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-03-25 18:31:45 +01:00
Benjamin S. Leveritt
8355f5674d Add Vanilla examples
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-03-25 18:31:44 +01:00
Benjamin S. Leveritt
5c1d04ee88 Tweak copy
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-03-25 18:31:44 +01:00
Benjamin S. Leveritt
2ef98d01b0 Fix permissions in lists comment
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-03-25 18:31:44 +01:00
Benjamin S. Leveritt
15a86a3014 Move Framework detail to just under the fold
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-03-25 18:31:44 +01:00
Benjamin S. Leveritt
9c49704cf9 Update Subs and Loading docs
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-03-25 18:31:44 +01:00
Benjamin S. Leveritt
44f0d8d5c7 Update subs doc
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-03-25 18:31:44 +01:00
Benjamin S. Leveritt
d7af97d63f Fix version and date
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-03-25 18:31:41 +01:00
Guido D'Orsi
3b189e4def Merge pull request #1725 from garden-co/feat/increase-depth-limit
feat: increase depth limit to 10
2025-03-25 12:13:48 +01:00
Guido D'Orsi
7fe50922cc docs: update the version on the 0.12 upgrade guide 2025-03-25 11:05:09 +01:00
Guido D'Orsi
b04e2be665 feat: increase depth limit to 10 2025-03-25 11:03:23 +01:00
Guido D'Orsi
80b1535cdf Merge remote-tracking branch 'origin/main' into 0-12-0 2025-03-24 18:36:48 +01:00
Guido D'Orsi
dda9672dcb Merge pull request #1680 from garden-co/changeset-release/main
Version Packages
2025-03-24 13:54:19 +01:00
github-actions[bot]
a86cd0e74e Version Packages 2025-03-24 12:45:13 +00:00
Guido D'Orsi
95e84a2ca7 Merge pull request #1720 from garden-co/image-targetWidth
feat: add targetWidth option to ProgressiveImage
2025-03-24 13:42:19 +01:00
Guido D'Orsi
e7c85b7575 feat: add targetWidth option to ProgressiveImage 2025-03-24 13:13:45 +01:00
Guido D'Orsi
8ad57f9d50 Merge pull request #1471 from garden-co/jazz-739-handle-reloading-page-while-image-upload-is-in-progress
jazz-739-handle-reloading-page-while-image-upload-is-in-progress
2025-03-24 12:30:47 +01:00
Benjamin S. Leveritt
4a0f70692f Update healthy-peas-kick.md 2025-03-24 11:29:34 +00:00
Guido D'Orsi
51db96e8d0 chore: align the lockfile with main 2025-03-24 12:20:18 +01:00
Guido D'Orsi
4b0b27bde7 Merge remote-tracking branch 'origin/main' into jazz-739-handle-reloading-page-while-image-upload-is-in-progress 2025-03-24 12:19:50 +01:00
Guido D'Orsi
29a177224d test: add a test for createImage 2025-03-24 12:19:12 +01:00
Guido D'Orsi
63ccdaa3b2 chore: remove vitest file 2025-03-24 11:58:26 +01:00
Guido D'Orsi
8ed144e857 chore: changeset 2025-03-24 11:01:54 +01:00
Guido D'Orsi
c9e2ab69bf feat: mark the package as async and remove the setTimeout 2025-03-24 11:00:03 +01:00
Anselm Eickhoff
4263c30753 Merge pull request #1710 from garden-co/feat/hend-showcase
add Hend to showcase
2025-03-21 13:39:35 +00:00
Anselm Eickhoff
416dd79b50 Merge pull request #1712 from garden-co/chore/inspector-changset
add changeset
2025-03-21 13:39:17 +00:00
Trisha Lim
11da4d1366 add changeset 2025-03-21 20:34:24 +07:00
Trisha Lim
6e794c3fed isolate class name hashing to jazz-inspector
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2025-03-21 20:31:59 +07:00
Trisha Lim
080a718c4d add Hend to showcase 2025-03-21 18:19:40 +07:00
Anselm Eickhoff
e5891f77ca Merge pull request #1703 from garden-co/improvement/docs-nav
Docs nav improvements
2025-03-20 11:20:39 +00:00
Trisha Lim
e141c8779b move AI tools and Inspector in its own section 2025-03-20 18:06:56 +07:00
Trisha Lim
868c49d096 reduce spacing between docs nav items 2025-03-20 18:04:24 +07:00
Trisha Lim
bdc78c55fc remove "coming soon" legend on docs nav 2025-03-20 17:41:46 +07:00
Benjamin S. Leveritt
2dbe990c22 Merge pull request #1688 from garden-co/feat/inspector-json
inspector: collapse JSON field, show content of JSON arrays, UI improvements
2025-03-19 20:29:05 +00:00
James Vickery
60b8dbc33c Merge pull request #1698 from garden-co/jmsv/rss-fix-url
Set canonical URL and fix RSS URLs
2025-03-19 17:31:08 +00:00
James Vickery
5337edf717 fix lint 2025-03-19 17:27:28 +00:00
James Vickery
fe60a88de9 Merge branch 'main' of github.com:garden-co/jazz into jmsv/rss-fix-url 2025-03-19 17:25:57 +00:00
James Vickery
939e1d7a3c fix rss urls and set canonical url 2025-03-19 17:24:20 +00:00
James Vickery
19871690e4 Merge pull request #1696 from garden-co/jmsv/rss
RSS
2025-03-19 16:59:20 +00:00
James Vickery
064900d5f9 rss 2025-03-19 16:49:48 +00:00
Trisha Lim
8e44caaebc install lucide-react on jazz-inspector 2025-03-19 13:56:07 +07:00
Trisha Lim
c95f344c41 remove covalue inspector form from dom if not shown 2025-03-19 13:44:59 +07:00
Trisha Lim
7320adc58d set input length 2025-03-19 13:18:55 +07:00
Trisha Lim
57a92f4aa0 missing key 2025-03-19 13:06:29 +07:00
Trisha Lim
c9b2b01928 move ui components to separate dir 2025-03-19 13:03:01 +07:00
Trisha Lim
5b97ac3b92 account selector UI improvement 2025-03-19 12:53:11 +07:00
Trisha Lim
09f0a98eef add changeset 2025-03-19 12:35:19 +07:00
Trisha Lim
3d8babdbb6 "add account" form improvement 2025-03-19 12:31:50 +07:00
Trisha Lim
f10004c6bc UI fixes 2025-03-19 12:20:39 +07:00
Trisha Lim
33ecca3d10 spacing and typography improvements 2025-03-19 12:00:47 +07:00
Trisha Lim
bc601d809b show array contents in a co.json 2025-03-19 11:13:35 +07:00
Anselm Eickhoff
cc8462f071 Merge pull request #1687 from garden-co/copy/meta-tags
update meta tags to align with new copy
2025-03-18 15:46:49 +00:00
Trisha Lim
790d5dde40 update meta tags to align with new copy 2025-03-18 21:54:30 +07:00
Anselm Eickhoff
7326a19373 Merge pull request #1670 from garden-co/copy/homepage-hero
update homepage copy
2025-03-18 14:31:06 +00:00
Anselm Eickhoff
f39c87b181 bring back zero-config magic 2025-03-18 14:30:22 +00:00
Anselm Eickhoff
e19681a4a7 more down-to-earth hero section 2025-03-18 14:21:35 +00:00
Anselm Eickhoff
c5a3b29c61 Merge pull request #1683 from garden-co/gio/fix-status-page-2
fix: reduces bar width on small screen to avoid horizontal scroll
2025-03-18 13:31:50 +00:00
Giordano Ricci
79513379c8 fix bar width on small screen to avoid horizontal scroll 2025-03-18 13:25:49 +00:00
Anselm Eickhoff
1271a6f753 Merge pull request #1682 from garden-co/gio/fix-status-page
Fix status page
2025-03-18 13:23:53 +00:00
Giordano Ricci
77f58ddcad fill missing data on the left 2025-03-18 12:20:00 +00:00
Trisha Lim
7e945b5eac create-jazz-app: replace project name param with directory name (#1612) 2025-03-18 19:14:25 +07:00
Giordano Ricci
deea2222cb Fix status latency query, adjust probes 2025-03-18 12:14:14 +00:00
Anselm Eickhoff
ff4a839dca Merge pull request #1652 from garden-co/fix/update-starter-profile-migration
fix: align the profile migration in the passkey starter with the last best pratice
2025-03-18 11:19:04 +00:00
Anselm Eickhoff
fb053a0dd5 Comment grammar fix 2025-03-18 11:18:21 +00:00
Anselm Eickhoff
253b775bff Merge pull request #1673 from garden-co/fix-1667-remove-sync-when-signedup
Removed when="singedUp" from examples apps' Jazz providers
2025-03-18 09:39:32 +00:00
Trisha Lim
831fce6d55 set inspector widget height 2025-03-18 16:39:00 +07:00
Trisha Lim
e3f85f997c fix button exports 2025-03-18 16:39:00 +07:00
Trisha Lim
44043991fb clean up 2025-03-18 16:39:00 +07:00
Trisha Lim
60af229bcc fit more data onscreen 2025-03-18 16:39:00 +07:00
Trisha Lim
be6dafc36a set default cursor 2025-03-18 16:39:00 +07:00
Trisha Lim
cdf3ed898f use Input component for all inputs 2025-03-18 16:39:00 +07:00
Trisha Lim
d2379eacd7 use Button element for all buttons 2025-03-18 16:39:00 +07:00
Trisha Lim
0525d5c056 remove unused packages and css 2025-03-18 16:20:17 +07:00
Trisha Lim
7803a7a85e fix missing types when running dev 2025-03-18 16:20:17 +07:00
Trisha Lim
e9d131cc9c fix account export to inspector app 2025-03-18 16:20:17 +07:00
Trisha Lim
4f2730fa00 reuse jazz-inspector components in inspector app 2025-03-18 16:20:17 +07:00
Trisha Lim
b416136b12 reuse jazz-inspector components in inspector app 2025-03-18 16:20:17 +07:00
Anselm Eickhoff
56869c3593 Merge pull request #1674 from garden-co/docs-filestream-link-fix
Fix filestreams link
2025-03-17 17:45:02 +00:00
Benjamin S. Leveritt
bce7dade72 Update filestreams.mdx 2025-03-17 17:39:51 +00:00
Benjamin S. Leveritt
2c00f93141 Merge pull request #1585 from garden-co/1572-filestream-docs
1572-filestream-docs
2025-03-17 14:44:21 +00:00
pax-k
1bfa9bb1de chore: changeset 2025-03-17 14:07:52 +02:00
pax-k
9106881d19 fix(examples): removed when="singedUp" from examples apps' Jazz providers 2025-03-17 14:00:59 +02:00
Anselm Eickhoff
75319a6eaf Merge pull request #1672 from garden-co/fix/node-env-prod
hide jazz-inspector if not dev
2025-03-17 10:37:18 +00:00
Trisha Lim
01e54ddf4e hide jazz-inspector if not dev 2025-03-17 17:20:00 +07:00
Trisha Lim
8f6e16a899 update homepage copy 2025-03-17 16:48:47 +07:00
Benjamin S. Leveritt
a4e342a59b Adds CreateImg config, annotates other methods 2025-03-17 09:32:38 +00:00
Benjamin S. Leveritt
73b71df524 Adds React Native docs 2025-03-17 09:32:38 +00:00
Benjamin S. Leveritt
fcaa5dddda Add Creating Images section to vanilla 2025-03-17 09:32:37 +00:00
Benjamin S. Leveritt
c27fadc4e0 Adds comment about knowness 2025-03-17 09:32:37 +00:00
Benjamin S. Leveritt
56af3c7412 Reword to synced 2025-03-17 09:32:37 +00:00
Benjamin S. Leveritt
5e5ef10675 Tweak presentation of FileStream 2025-03-17 09:32:37 +00:00
Benjamin S. Leveritt
2efc55f9bf Switches sections 2025-03-17 09:32:37 +00:00
Benjamin S. Leveritt
7101f10573 Add link to Writing to FileStreams 2025-03-17 09:32:37 +00:00
Benjamin S. Leveritt
3849392272 Add links to Vanilla docs 2025-03-17 09:32:37 +00:00
Benjamin S. Leveritt
ce1fc720c1 Add React docs 2025-03-17 09:32:36 +00:00
Benjamin S. Leveritt
4eb634175d Adds revokeObjectURL references and best practices 2025-03-17 09:32:36 +00:00
Benjamin S. Leveritt
adc6343531 Fix note section 2025-03-17 09:32:36 +00:00
Benjamin S. Leveritt
c745e099fe Adds example for fallback behaviour 2025-03-17 09:32:36 +00:00
Benjamin S. Leveritt
970c9f5c6c Adds imageDef docs 2025-03-17 09:32:36 +00:00
Benjamin S. Leveritt
4e3986ae98 Removes mentions of images, pointing to ImageDef 2025-03-17 09:32:36 +00:00
Benjamin S. Leveritt
6c691bf641 Adds tests for imageDef 2025-03-17 09:32:36 +00:00
Benjamin S. Leveritt
d03ba7fdd0 Adds CodeGroups 2025-03-17 09:32:35 +00:00
Benjamin S. Leveritt
35cb7d8988 Add FileStream progress test 2025-03-17 09:32:35 +00:00
Benjamin S. Leveritt
0e40a9daab Adds FileStream doc draft 2025-03-17 09:32:35 +00:00
Trisha Lim
bd1996c458 make dev generate app.js instead of jazz-inspector.js 2025-03-17 10:25:19 +07:00
Trisha Lim
373ebec04c add basic json viewer 2025-03-17 10:25:19 +07:00
Trisha Lim
7fedbeb8e4 add covalue search to nav 2025-03-17 10:25:19 +07:00
Trisha Lim
4bfc23091c bare minimum dark styles 2025-03-17 10:25:19 +07:00
Trisha Lim
6e5ea6f19c add inspector to chat app 2025-03-17 10:25:19 +07:00
Trisha Lim
bcd67cb23f replace indigo with blue 2025-03-17 10:25:19 +07:00
Trisha Lim
27781ed778 remove javascript hover styles 2025-03-17 10:25:19 +07:00
Trisha Lim
eb097ecdb1 match colors to jazz brand 2025-03-17 10:25:19 +07:00
Trisha Lim
cdae2603ba add button label 2025-03-17 10:25:19 +07:00
Trisha Lim
2b3490cce2 rewrite styles to tailwind 2025-03-17 10:25:19 +07:00
Trisha Lim
4baba65cdd install twind 2025-03-17 10:25:19 +07:00
Guido D'Orsi
c6ef96d642 Merge pull request #1523 from garden-co/jazz-744-maintain-docs-side-nav-scroll-state-on-navigation
Maintain docs side nav scroll state on navigation
2025-03-14 17:16:11 +01:00
Guido D'Orsi
385ce9ba37 Merge pull request #1664 from garden-co/changeset-release/main
Version Packages
2025-03-14 16:10:23 +01:00
github-actions[bot]
d128490da5 Version Packages 2025-03-14 15:09:56 +00:00
Guido D'Orsi
60f5b3ffeb fix: downgrade the WasmCrypto initialization error logging to a warning 2025-03-14 16:06:55 +01:00
Guido D'Orsi
7d496b03e4 Merge pull request #1638 from garden-co/changeset-release/main
Version Packages
2025-03-14 15:41:18 +01:00
github-actions[bot]
261c9aa51d Version Packages 2025-03-14 14:31:36 +00:00
Guido D'Orsi
5ac5d732a9 Merge pull request #1650 from garden-co/purejs-fallback
fix: use PureJSCrypto as fallback when WasmCrypto fails to initialize
2025-03-14 15:29:23 +01:00
Guido D'Orsi
3d882f0442 fix: update resolve in the new music player action 2025-03-14 15:25:23 +01:00
Guido D'Orsi
f2e9bc9f92 Merge pull request #1660 from garden-co/feat/inspector-position
add changeset
2025-03-14 15:21:44 +01:00
Guido D'Orsi
f61d568c9d Merge remote-tracking branch 'origin/main' into 0-12-0 2025-03-14 15:21:09 +01:00
Guido D'Orsi
6d4b8ecfde Merge pull request #1655 from garden-co/fix/e2e-rn-test
test: fix the mobile e2e tests
2025-03-14 15:20:09 +01:00
Guido D'Orsi
2da366e1cd fix: comment out the re-login stuff 2025-03-14 10:17:57 +01:00
Trisha Lim
e902405c93 add changeset 2025-03-14 11:17:02 +07:00
Trisha Lim
ecbf6d0248 add inspector to version history example 2025-03-14 11:15:27 +07:00
Benjamin S. Leveritt
02fe68d207 Adds equality check to sessionID comparison 2025-03-13 14:29:42 +00:00
Benjamin S. Leveritt
0f87cfbbb0 Fixes sort order fallback when madeAt is identical 2025-03-13 13:41:44 +00:00
Guido D'Orsi
f44a4fa7a2 Merge pull request #1654 from garden-co/feat/inspector-position
Custom positioning of inspector widget button
2025-03-13 14:34:46 +01:00
Guido D'Orsi
b72d478ba1 Merge pull request #1625 from garden-co/music-player-ux
Music player: Allow deleting tracks and playlists
2025-03-13 13:08:18 +01:00
Guido D'Orsi
d0fd66df00 test: fix the mobile e2e tests 2025-03-13 11:05:01 +01:00
Guido D'Orsi
3615b4871b fix: align the profile migration in the passkey starter with the last best pratice 2025-03-13 10:53:42 +01:00
Guido D'Orsi
cc1eb6da90 Merge pull request #1506 from garden-co/image-upload-ux
Image upload example UX improvement
2025-03-13 08:34:15 +00:00
Benjamin S. Leveritt
f7b91b7ce1 Adds unload notification while uploading 2025-03-13 08:34:15 +00:00
Benjamin S. Leveritt
e2b1247969 Return promise while processing image 2025-03-13 08:34:15 +00:00
Benjamin S. Leveritt
b2bdfc702e Merge pull request #1645 from garden-co/feat/filestream-example-to-examples-page
add filestream example to examples page
2025-03-13 08:13:56 +00:00
Trisha Lim
dc3d6a28f6 add docs for inspector button position 2025-03-13 12:05:40 +07:00
Trisha Lim
43e339a4bc Custom positioning of inspector widget button 2025-03-13 11:35:29 +07:00
Guido D'Orsi
e1a66fd76b Merge pull request #1651 from garden-co/fix-message-not-readable
fix(chat-example): render "message not readable" if a message is not readable
2025-03-12 22:31:06 +01:00
pax-k
2074e45158 chore: changeset 2025-03-12 19:10:42 +02:00
pax-k
b06dac36a5 fix(chat-example): render "message not readable" if a message is not readable #1646 2025-03-12 19:08:11 +02:00
Guido D'Orsi
7f036c170e fix: use PureJSCrypto as fallback when WasmCrypto fails to initialize 2025-03-12 16:21:21 +01:00
Guido D'Orsi
ce612394dc chore: move the cloudflare test to use WASM 2025-03-12 16:19:17 +01:00
Benjamin S. Leveritt
b3b12a020e Merge pull request #1648 from garden-co/1643-add-colistapplydiff-tests
Fixes CoList.splice to support insertions at start
2025-03-12 14:13:24 +00:00
Benjamin S. Leveritt
a91f343d6d Adds changeset 2025-03-12 14:12:58 +00:00
Benjamin S. Leveritt
59a7ae94b4 Add comment 2025-03-12 14:03:48 +00:00
Benjamin S. Leveritt
c74f1aea8d Fixes CoList.splice to support insertions at start 2025-03-12 13:59:09 +00:00
Trisha Lim
debdb6dccc update readme of filestream example 2025-03-12 20:54:14 +07:00
Trisha Lim
11a952d45b add filestream example to examples page 2025-03-12 20:51:33 +07:00
Guido D'Orsi
3df07327f1 Merge pull request #1641 from garden-co/ref-assign-validation
fix: throw an error when assigning invalid values to ref fields
2025-03-12 14:49:01 +01:00
Guido D'Orsi
c66a3fb8e9 Merge pull request #1640 from garden-co/jmsv/1632/colist-sort-tests
CoList sort tests
2025-03-11 17:26:36 +01:00
Guido D'Orsi
6dd02d289c chore: fix a type error in the tests 2025-03-11 17:22:26 +01:00
Guido D'Orsi
33a4944ba3 Merge remote-tracking branch 'origin/jazz-581-add-docs' into 0-12-0 2025-03-11 17:17:26 +01:00
Guido D'Orsi
e367b6056d Merge remote-tracking branch 'origin/main' into jazz-581-rfc-new-deep-loading-api 2025-03-11 17:14:38 +01:00
Guido D'Orsi
57a3dbe2b4 fix: throw an error when assigning invalid values to ref fields 2025-03-11 17:08:11 +01:00
James Vickery
3f1cbcdaee add another push + sort + expect 2025-03-11 15:50:37 +00:00
James Vickery
bd1bf3fd2c colist sort tests 2025-03-11 15:46:13 +00:00
Anselm Eickhoff
065e84fc7d Merge pull request #1608 from garden-co/even-simpler-pricing 2025-03-11 15:43:58 +00:00
Anselm
341b056e09 Track fake sign ups and slight layout change 2025-03-11 14:41:40 +00:00
Anselm Eickhoff
75bf523b6a Merge pull request #1639 from garden-co/fix/missing-shadow-hero
fix(home): missing shadow on create-jazz-app section
2025-03-11 14:19:49 +00:00
Trisha Lim
2ad11eff11 fix(home): missing shadow on create-jazz-app section 2025-03-11 21:08:47 +07:00
Anselm Eickhoff
2bfab83df6 Merge pull request #1615 from garden-co/deemphasize-local-first
De-emphasise local-first on homepage
2025-03-11 13:42:34 +00:00
Benjamin S. Leveritt
9526674a95 Addressses feedback, adds backticks 2025-03-11 20:33:12 +07:00
Benjamin S. Leveritt
4f2424f5e8 Updates CoList docs to call out Deleting Items
Fixes #1602
2025-03-11 20:33:12 +07:00
Anselm
58c7305e47 More explanation improvements 2025-03-11 13:33:09 +00:00
Anselm
c05dd58c7d Slight wording changes 2025-03-11 13:25:25 +00:00
Anselm
cc3d31fc3b Address PR comments 2025-03-11 13:14:24 +00:00
James Vickery
83433fcfe2 Merge pull request #1637 from garden-co/jmsv/1635/registered-account-types
Use RegisteredAccount type
2025-03-11 12:33:35 +00:00
Anselm Eickhoff
7cdfc62593 Merge pull request #1634 from garden-co/chore/jazz-inspector-changeset
add changeset for #1591
2025-03-11 12:33:27 +00:00
James Vickery
a717754bb4 patch 2025-03-11 12:30:33 +00:00
James Vickery
1617940ce2 RegisteredAccount type for by props 2025-03-11 12:15:17 +00:00
Guido D'Orsi
d8508c260e Merge pull request #1636 from garden-co/show-account-registration-in-more-places
Show Account registration in more places in docs
2025-03-11 11:13:52 +01:00
Anselm Eickhoff
7e754cae9d Show Account registration in more places 2025-03-11 09:57:39 +00:00
Benjamin S. Leveritt
5e7b59293d Merge pull request #1595 from garden-co/817-add-minimal-filestream-example
adds filestream example
2025-03-11 08:53:56 +00:00
Trisha Lim
d133d4724d add changeset 2025-03-11 10:52:49 +07:00
3f765d5e-ac23-4170-97a5-68b8feee155b
e6ef9b6819 Update page.tsx 2025-03-11 10:51:13 +07:00
Benjamin S. Leveritt
91f9ea1823 Prioritise specific framework pages over vanilla 2025-03-11 10:39:55 +07:00
Benjamin S. Leveritt
3404fa99bf Bail on typing item.done 2025-03-11 10:39:55 +07:00
Benjamin S. Leveritt
4bdf0b064b Add fallback for frameworks we have yet to provide 2025-03-11 10:39:55 +07:00
Benjamin S. Leveritt
1e1372bb71 Adds VanillaJS to the Framework selector 2025-03-11 10:39:55 +07:00
Anselm
b1be0bbdf3 Fix more NextJS issues 2025-03-10 13:36:54 +00:00
Anselm
d4f2f6fd99 Fix NextJS issues 2025-03-10 13:32:48 +00:00
Anselm
f901c4628d More improvements and fixes 2025-03-10 13:27:12 +00:00
Nikita
c970eec586 allow deleting tracks and playlists 2025-03-10 14:08:50 +01:00
Guido D'Orsi
eab128d8e8 Merge pull request #1617 from garden-co/changeset-release/main
Version Packages
2025-03-10 13:04:18 +01:00
github-actions[bot]
8793c218e7 Version Packages 2025-03-10 11:50:03 +00:00
Guido D'Orsi
57858a7cf0 Merge pull request #1624 from garden-co/better-error-logging
feat: improve error logging
2025-03-10 12:46:31 +01:00
Guido D'Orsi
68b0242793 feat: improve error logging 2025-03-10 12:40:55 +01:00
Anselm Eickhoff
9d9a067df5 Merge pull request #1621 from garden-co/fix/react-guide-optional-field
fix(react guide): update syntax for optional field
2025-03-10 10:30:11 +00:00
Trisha Lim
99779b522b fix(react guide): update syntax for optional field 2025-03-10 17:24:30 +07:00
Guido D'Orsi
80b80b5d71 Merge pull request #1610 from garden-co/changeset-release/main
Version Packages
2025-03-07 17:47:20 +01:00
Guido D'Orsi
d777b78ce4 Merge pull request #1614 from garden-co/fix/missing-apikey-ts
Move api key of react starter into apiKey.ts
2025-03-07 17:46:56 +01:00
Anselm
ca909a09a5 First pass 2025-03-07 11:00:37 +00:00
Trisha Lim
c0a77b99bb Move api key of react starter into apiKey.ts 2025-03-07 17:47:48 +07:00
github-actions[bot]
24516116f3 Version Packages 2025-03-07 08:42:35 +00:00
Guido D'Orsi
ed0e15144c fix: reset the useCoState value when the id becomes undefined 2025-03-07 09:40:06 +01:00
Trisha Lim
ad9afc14ba use equal col widths 2025-03-07 14:26:13 +07:00
Benjamin S. Leveritt
f51cf1b9ff Merge pull request #1563 from garden-co/jazz-773-add-tone-and-voice-document
jazz-773-add-tone-and-voice-document
2025-03-06 19:13:05 +00:00
Benjamin S. Leveritt
31beb0a3b4 Removes key takeaways 2025-03-06 19:11:15 +00:00
Benjamin S. Leveritt
d1b2c50801 Replaces teammate > friend 2025-03-06 19:11:15 +00:00
Benjamin S. Leveritt
0261fb5031 Adds note about docs 2025-03-06 19:10:54 +00:00
Benjamin S. Leveritt
e421af1147 Adds a tone and voice doc 2025-03-06 19:10:54 +00:00
Benjamin S. Leveritt
05df8e3b61 Merge pull request #1609 from garden-co/1606-port-applydiff-to-colist-from-corichtext
Adds `applyDiff` to `CoList`
2025-03-06 19:09:45 +00:00
Benjamin S. Leveritt
6892dc6a87 Adds changeset 2025-03-06 19:08:37 +00:00
Nikos Papadopoulos
846a22fb87 moves the apikey into src/apiKey.ts 2025-03-06 18:16:21 +00:00
Benjamin S. Leveritt
84badaa18b Adds applyDiff to CoList
Closes #1606
2025-03-06 17:49:50 +00:00
Nikos Papadopoulos
50133de036 updates vercel configuration 2025-03-06 17:26:26 +00:00
Nikos Papadopoulos
8eff068bdf adds drag and drop upload feature 2025-03-06 17:26:26 +00:00
Nikos Papadopoulos
77383b20c6 switches sync peer from localhost to cloud 2025-03-06 17:26:26 +00:00
Nikos Papadopoulos
4965807ce9 adds filestream example 2025-03-06 17:26:12 +00:00
Anselm
b424ff04fb Remove add-ons 2025-03-06 17:16:48 +00:00
Anselm
0f4bf6ab77 Merge branch 'main' into even-simpler-pricing 2025-03-06 17:10:25 +00:00
Trisha Lim
23059ec701 change copy icon 2025-03-06 21:06:13 +07:00
Trisha Lim
52a2533b9e cleanup 2025-03-06 21:06:13 +07:00
Trisha Lim
5df7aaf742 mobile view 2025-03-06 21:06:13 +07:00
Trisha Lim
1a818f88b2 add create-jazz-app command to hero 2025-03-06 21:06:13 +07:00
Guido D'Orsi
f3f56b9be0 docs: clarifications 2025-03-06 14:42:30 +01:00
Guido D'Orsi
4cae6bad34 Merge 2025-03-06 14:38:01 +01:00
Guido D'Orsi
17f2ef57de docs: bump the upgrade version 2025-03-06 14:37:19 +01:00
Guido D'Orsi
2e12ec55ac Merge pull request #1551 from garden-co/example-counter
feat(examples): multi-auth example
2025-03-06 14:35:28 +01:00
Guido D'Orsi
3a4d111a37 Merge remote-tracking branch 'origin/main' into jazz-581-rfc-new-deep-loading-api 2025-03-06 14:33:18 +01:00
Guido D'Orsi
6c94c2cd3d Merge pull request #1605 from garden-co/changeset-release/main
Version Packages
2025-03-06 13:54:08 +01:00
github-actions[bot]
98c4221340 Version Packages 2025-03-06 12:46:19 +00:00
Guido D'Orsi
7b00a8155f fix: align packages versions to 0.11 2025-03-06 13:44:06 +01:00
Guido D'Orsi
cc5aea708a fix: remove the prepublish hook 2025-03-06 13:35:35 +01:00
Guido D'Orsi
87c7306632 fix(release): build packages with turbo before publishing 2025-03-06 13:30:59 +01:00
Guido D'Orsi
a65219ba52 Merge pull request #1578 from garden-co/changeset-release/main
Version Packages
2025-03-06 13:23:02 +01:00
github-actions[bot]
689595fd0a Version Packages 2025-03-06 12:21:42 +00:00
Guido D'Orsi
efbf2b65a8 Merge pull request #1492 from garden-co/0-11-0
Jazz 0.11.0 - Better permissions checks and members API
2025-03-06 13:19:38 +01:00
Guido D'Orsi
912232192f docs: release notes final touches 2025-03-06 13:18:24 +01:00
Guido D'Orsi
11b5d77064 fix: check auth state when accepting an invite 2025-03-06 13:04:07 +01:00
Guido D'Orsi
63b88b591d test(music-player): uncomment remove track test 2025-03-06 13:02:21 +01:00
Guido D'Orsi
87d0544d98 chore: fix type errors 2025-03-05 18:55:37 +01:00
Guido D'Orsi
d43dcc2c94 Merge pull request #1592 from garden-co/revert-1557-1556-update-homepage-typedoc-to-027
Revert "1556-update-homepage-typedoc-to-027"
2025-03-05 18:55:09 +01:00
Guido D'Orsi
093a166db1 Revert "1556-update-homepage-typedoc-to-027" 2025-03-05 18:54:57 +01:00
Guido D'Orsi
593f3ed83e Revert "Fix typing"
This reverts commit 6a2a176361.
2025-03-05 18:48:55 +01:00
Guido D'Orsi
6c6c89e068 Revert "Bumps typedoc and typescript versions"
This reverts commit 824bbc8bab.
2025-03-05 18:45:30 +01:00
Guido D'Orsi
c1646f6bbb Merge pull request #1570 from garden-co/trisha/1224-add-status-to-footer
Add status to footer, remove releases
2025-03-05 18:03:51 +01:00
Guido D'Orsi
b7deb3c937 chore: changeset 2025-03-05 17:59:56 +01:00
Guido D'Orsi
9b425701e4 Merge pull request #1589 from 3f765d5e-ac23-4170-97a5-68b8feee155b/3f765d5e-ac23-4170-97a5-68b8feee155b-patch-3
Add React 19 to peer deps
2025-03-05 17:58:51 +01:00
Guido D'Orsi
07dcf54aca chore: fix type errors 2025-03-05 17:52:50 +01:00
Guido D'Orsi
8ed33c18ca Merge remote-tracking branch 'origin/main' into 0-11-0 2025-03-05 17:48:33 +01:00
Guido D'Orsi
6a96d8b53b feat: add getParentGroups API to Group and Account 2025-03-05 17:27:28 +01:00
Nikos Papadopoulos
a1bcbda72e Merge pull request #1522 from garden-co/jazz-758-allow-optional-fields-in-types-passed-to-cojson-see
Fix and test cases for reported issue with optional fields
2025-03-05 16:03:25 +00:00
Nikos Papadopoulos
0f67e0a988 adds changeset 2025-03-05 15:54:29 +00:00
3f765d5e-ac23-4170-97a5-68b8feee155b
6c7a3ebf82 Add React 19 to peer deps
Hope that's enough to make the peer dep warning go away. Been running inspector with react 19 and no problems so far
2025-03-05 16:46:31 +01:00
Guido D'Orsi
27ce186152 fix(co.json): accept null values and improve the function check 2025-03-05 15:51:17 +01:00
Nikos Papadopoulos
77ae2cc186 Revert "fixes CoJsonValue type"
This reverts commit d6d9218b3e.
2025-03-05 10:53:56 +00:00
Guido D'Orsi
66600c0c27 Merge pull request #1584 from garden-co/clarification-profile-changes
docs: clarify better the situation on profile migrations
2025-03-05 11:06:42 +01:00
Guido D'Orsi
81d5261f4d docs: clarify better the situation on profile migrations 2025-03-05 11:01:02 +01:00
Guido D'Orsi
d748dea90f test: cover invalid actions on revokeExtend 2025-03-05 10:24:03 +01:00
Guido D'Orsi
707e544b83 docs: add the 0.11.0 group APIs 2025-03-05 10:17:00 +01:00
Guido D'Orsi
f3cbaee890 Merge pull request #1500 from garden-co/jazz-760-jazz-0110-upgrade-guide
jazz 0.11.0 upgrade guide
2025-03-05 10:03:04 +01:00
Trisha Lim
60ce483db7 add changeset 2025-03-05 15:51:33 +07:00
Trisha Lim
c08a41398d Make initial commit on create-jazz-app apps 2025-03-05 15:51:33 +07:00
Nikos Papadopoulos
d6d9218b3e fixes CoJsonValue type 2025-03-04 19:20:08 +00:00
Anselm
667e301f12 Simplify JSON related types and test for more cases 2025-03-04 17:33:02 +00:00
Guido D'Orsi
b15f904347 chore: fix a type error 2025-03-04 18:02:48 +01:00
Nikos Papadopoulos
0c150a4c74 fix attempt 0 2025-03-04 16:50:01 +00:00
Guido D'Orsi
66de2dacb6 docs: whats new 2025-03-04 17:13:57 +01:00
Guido D'Orsi
ae1425db8a Merge remote-tracking branch 'origin/main' into 0-11-0 2025-03-04 17:08:49 +01:00
Guido D'Orsi
a164b102f5 docs: add revokeExtend to the migration docs 2025-03-04 16:49:25 +01:00
Guido D'Orsi
a6db9a438e Merge remote-tracking branch 'origin/0-11-0' into jazz-760-jazz-0110-upgrade-guide 2025-03-04 16:38:49 +01:00
Nikita
a35249a831 Fix CoMap.toJSON() with encoded fields (#1577)
* encode -> encoded

* add test and changeset

* patch
2025-03-04 15:56:08 +01:00
Guido D'Orsi
36e246be79 docs: add the this type to the migration examples 2025-03-04 15:37:29 +01:00
Trisha Lim
b894455c9e Remove unnecessary owner argument in react examples 2025-03-04 19:28:16 +07:00
Guido D'Orsi
11f7277675 Merge pull request #1566 from garden-co/changeset-release/main
Version Packages
2025-03-04 13:19:34 +01:00
github-actions[bot]
d992f5c552 Version Packages 2025-03-04 12:18:11 +00:00
Guido D'Orsi
a5ec31f079 Merge pull request #1573 from garden-co/fix-race-conditions-ctx-creation
fix(ContextManager): avoid race conditions on context creation
2025-03-04 13:15:59 +01:00
Guido D'Orsi
2f99de0976 fix(ContextManager): avoid race conditions on context creation 2025-03-04 13:10:29 +01:00
Anselm Eickhoff
d5503b4581 Merge pull request #1555 from garden-co/1554-start-a-faq-document
Adds an FAQ
2025-03-04 11:32:13 +00:00
Trisha Lim
a462254199 Add status to footer, remove releases 2025-03-04 17:21:22 +07:00
Guido D'Orsi
f86e278b00 fix: change the log level of permission errors to debug 2025-03-03 23:43:49 +01:00
Emil Sayahi
34cbdc3e4c feat!(Groups): API to unextend group (#1512)
* feat!(Groups): API to unextend group

See: #1504

* feat!(Groups): API to unextend group

See: #1504

* test(groupsAndAccounts): revoking group extensions

* test(cojson): group, permissions test for unextend

* chore: add changeset

* test(permissions): unextend reading & grandparents

* feat!(Groups): API to unextend group

See: #1504

* test(groupsAndAccounts): revoking group extensions

* test(cojson): group, permissions test for unextend

* chore: add changeset

* test(permissions): unextend reading & grandparents

* feat(music-player): removing tracks from playlists

* fix(music-player): remove unused import
2025-03-03 14:13:35 -05:00
Emil Sayahi
c563c3675f fix(multiauth): update lockfile 2025-03-03 13:09:39 -05:00
Emil Sayahi
05372df4be Merge branch 'main' into example-counter 2025-03-03 13:03:33 -05:00
Emil Sayahi
c32c405bfd feat(examples): empty multi-auth example 2025-03-03 13:00:27 -05:00
Benjamin S. Leveritt
09e2090939 Tweaks heading 2025-03-03 14:07:45 +00:00
Benjamin S. Leveritt
2ffe10cc79 Rework order, update from suggestions 2025-03-03 12:08:13 +00:00
Benjamin S. Leveritt
9a4cef30cf Update homepage/homepage/app/(docs)/docs/[framework]/[...slug]/faq.mdx
Co-authored-by: Anselm Eickhoff <anselm.eickhoff@gmail.com>
2025-03-03 12:03:19 +00:00
Anselm Eickhoff
3c0b2cb689 Merge pull request #1557 from garden-co/1556-update-homepage-typedoc-to-027
1556-update-homepage-typedoc-to-027
2025-03-03 11:49:54 +00:00
Benjamin S. Leveritt
6a2a176361 Fix typing 2025-03-03 11:35:37 +00:00
Benjamin S. Leveritt
824bbc8bab Bumps typedoc and typescript versions 2025-03-03 11:35:15 +00:00
Benjamin S. Leveritt
71b9517eda Adds an FAQ
Fixes #1554
2025-03-03 10:34:09 +00:00
Emil Sayahi
e7ae6d95ba feat(examples): multi-auth counter example 2025-02-28 14:55:45 -05:00
Guido D'Orsi
8bdf6908b8 Merge pull request #1529 from garden-co/changeset-release/main
Version Packages
2025-02-28 20:18:53 +01:00
github-actions[bot]
12bc4fb2d3 Version Packages 2025-02-28 19:08:19 +00:00
Guido D'Orsi
75211e3c82 fix: fixes invalid authentication state when logging out after signUp (#1549) 2025-02-28 14:06:18 -05:00
Guido D'Orsi
029c32d86c chore: fix type errors 2025-02-28 18:44:16 +01:00
Guido D'Orsi
1e18c7f5fc Merge remote-tracking branch 'origin/0-11-0' into jazz-581-rfc-new-deep-loading-api 2025-02-28 14:58:32 +01:00
Benjamin S. Leveritt
3185a20777 Merge pull request #1447 from garden-co/jazz-496-draft-using-coValue-docs
jazz-496-draft-using-coValue-docs
2025-02-28 13:42:26 +00:00
Benjamin S. Leveritt
0c3905f93f Add example, fix copy 2025-02-28 13:40:38 +00:00
Guido D'Orsi
45bed3ea80 Merge remote-tracking branch 'origin/main' into 0-11-0 2025-02-28 14:12:02 +01:00
Guido D'Orsi
8a31f56770 Merge pull request #1542 from garden-co/jazz-731-prevent-duplicate-accounts-on-inspector
Prevent duplicate accounts from being added in inspector
2025-02-28 14:10:21 +01:00
Guido D'Orsi
43fa1ecba4 chore: correctly rename the interface 2025-02-28 11:20:47 +01:00
Guido D'Orsi
4373e290fe Merge pull request #1543 from garden-co/typecheck-tests
fix: include tests in the typescript validation on cojson and jazz-tools
2025-02-28 11:19:18 +01:00
Guido D'Orsi
037ed4d59d fix: include tests in the typescript validation on cojson and jazz-tools 2025-02-28 11:01:57 +01:00
Benjamin S. Leveritt
c030128b28 Fix comment 2025-02-28 09:53:15 +00:00
Nikita
34946c18bc prevent duplicate accounts from being added in inspector 2025-02-28 10:52:21 +01:00
Benjamin S. Leveritt
fcca08655a Update nav for new organisation 2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
adcd08c95a Copy tweaks from feedback 2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
937e20b248 Add back-references to example 2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
a759d9a7aa Partially hide unused pages
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
38af5b8dc8 Tweak copy
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
b9473da159 Adds CoFeeds doc
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
cb1126ac15 Updates CoList examples
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
989211f02f Removes performance section
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
49a1a9d6f0 Adds CoLists doc
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
2f32599987 Improve ComputedProject example
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
9ede39c229 Rework into CoMaps doc
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
ca3eb9dbd8 Adds Subscription docs
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
12273cf35b Typo
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
b3d4944608 Removes error handling section
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
2068aaff13 Removes owners
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
9dfad43433 Fix link
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
db4986059e Updates metadata for latest copy
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
ed5369e99b Updates the metadata copy and examples
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
2671fca1dc Adds reviewed copy for Reading + examples
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
c81a2dcd0b Updates Writing examples and copy
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
b7a19c0693 Updates creation examples
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
2678bdbcca Updates examples
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
ee7823b33e Fix Account and Group casing
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
46683235ba Removes transactions content 2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
8ce7bb808c Improves accuracy of examples 2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
3a69928ebc Adds CodeGroups, improves copy 2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
00790a1535 Adds drafts to nav 2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
56ccf5ea65 Adds metadata and writing drafts 2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
4814595724 Adds Reading draft 2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
706357ac4f Adds Creation draft 2025-02-28 09:46:13 +00:00
Benjamin S. Leveritt
4fcc8edc70 Merge pull request #1539 from garden-co/1538-fix-linting-for-cojson-transport-ws
1538-fix-linting-for-cojson-transport-ws
2025-02-28 08:24:47 +00:00
Nikos Papadopoulos
141ea11bf1 Rename interface 2025-02-27 19:08:52 +00:00
Benjamin S. Leveritt
0f8ba9966b Fix resolve returning void (which biome doesn't like)
Closes #1538
2025-02-27 17:18:57 +00:00
Benjamin S. Leveritt
91fa2e092a Add comment about using any 2025-02-27 17:08:06 +00:00
Benjamin S. Leveritt
ff52d6df3e Adds linting to cojson-transport-ws
Fixes #1538
2025-02-27 17:08:06 +00:00
Benjamin S. Leveritt
a539b9e26b Merge pull request #1536 from garden-co/1533-fix-linting-for-cojson-storage-packages
Closes #1533
2025-02-27 17:05:44 +00:00
Benjamin S. Leveritt
f3129a7914 Fix return on transaction 2025-02-27 16:40:25 +00:00
Guido D'Orsi
d349b794e1 Merge pull request #1534 from boorad/feat/clerk-expo-offline
feat: Clerk and Expo offline support
2025-02-27 17:24:20 +01:00
Guido D'Orsi
273b478381 Merge pull request #1535 from garden-co/test/group-members-sync
test(groupAndAccounts): enable sync and add members test
2025-02-27 17:24:01 +01:00
Benjamin S. Leveritt
fad14dcff6 Fix imports in jazz-nodejs 2025-02-27 16:21:54 +00:00
Benjamin S. Leveritt
b99f13c948 Adds a few more tweaks to the linter, and fixes 2025-02-27 16:21:54 +00:00
Benjamin S. Leveritt
e7cb337a24 Fix linting issues in cojson-storage-rn-sqlite 2025-02-27 16:21:54 +00:00
Benjamin S. Leveritt
85c9a432c3 Adds linting checks and fixes to cojson-storage 2025-02-27 16:21:54 +00:00
Guido D'Orsi
1d29f74df6 test(groupAndAccounts): enable sync and add members test 2025-02-27 17:16:27 +01:00
Brad Anderson
c28d1c331c feat: Clerk and Expo offline support 2025-02-27 10:01:46 -05:00
Guido D'Orsi
474ea89b81 Merge pull request #1532 from juliusv/patch-2
Fix missing useAccount import + incorrect "old" marker in React guide
2025-02-27 15:10:48 +01:00
Julius Volz
4772309fb6 Fix missing useAccount import + incorrect "old" marker in React guide 2025-02-27 13:43:20 +01:00
Guido D'Orsi
393d066b25 docs: add the Group.members schema and everyone changes 2025-02-27 11:45:51 +01:00
Guido D'Orsi
45bff625c4 Merge branch '0-11-0' into jazz-760-jazz-0110-upgrade-guide 2025-02-27 11:40:42 +01:00
Guido D'Orsi
a8fca7b5f7 Merge pull request #1459 from garden-co/declaration-files-migration
feat: migrate to declaration files
2025-02-27 11:28:21 +01:00
Guido D'Orsi
658a0602ea Merge pull request #1528 from garden-co/fix/group-members-type
feat(Group.members): use the global AccountSchema and remove everyone from the returned values
2025-02-27 11:28:04 +01:00
Guido D'Orsi
f039e8f097 feat(Group.members): use the global AccountSchema and remove everyone from the returned values 2025-02-27 11:20:57 +01:00
pax
1501510cfc Merge pull request #1493 from garden-co/cursor-rules-with-create-jazz-app
Cursor rules with create-jazz-app
2025-02-27 12:09:01 +02:00
Guido D'Orsi
eda1588907 Merge pull request #1527 from garden-co/changeset-release/main
Version Packages
2025-02-27 09:56:16 +01:00
Guido D'Orsi
dc9da28bf9 Merge remote-tracking branch 'origin/0-11-0' into declaration-files-migration 2025-02-27 09:55:15 +01:00
github-actions[bot]
b14e0bfe24 Version Packages 2025-02-26 17:58:41 +00:00
Guido D'Orsi
87aa43b46b Merge pull request #1507 from garden-co/jazz-747-passphrase-auth-restore-support-for-rerolling-the-passphrase
feat(PasskeyAuth): support random passphrase generation
2025-02-26 18:54:42 +01:00
Guido D'Orsi
b93ce9fb7e chore: rever to use property initializers 2025-02-26 18:54:32 +01:00
Guido D'Orsi
e6db8f2a02 test(permissions): rewrite flaky tests 2025-02-26 18:53:32 +01:00
Guido D'Orsi
8c7a6b27ed docs: refine the examples and align the feature descripted with the implementation 2025-02-26 18:23:02 +01:00
Guido D'Orsi
91f96e1188 Merge branch 'jazz-581-rfc-new-deep-loading-api' into jazz-581-add-docs 2025-02-26 18:12:56 +01:00
Guido D'Orsi
f0c8f7b3eb Merge pull request #1526 from garden-co/upgrade-guide-permissions-docs
docs: update the 0.11 upgrade guide with the new permissions APIs
2025-02-26 17:46:09 +01:00
Guido D'Orsi
a7d83e1c10 feat(passphrase-example): inline the UI and implement the passphrase reroll flow 2025-02-26 16:29:05 +01:00
Guido D'Orsi
76a693da15 Update packages/jazz-tools/src/tests/PassphraseAuth.test.ts
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2025-02-26 16:23:02 +01:00
Guido D'Orsi
945163b7bc docs: fix typos in the upgrade guide 2025-02-26 15:34:20 +01:00
Guido D'Orsi
3142e503ae docs: update the 0.11 upgrade guide with the new permissions APIs 2025-02-26 15:33:00 +01:00
pax
df2f021cfd Merge pull request #1509 from garden-co/changeset-release/main
Version Packages
2025-02-26 16:25:01 +02:00
Trisha Lim
65b2947c18 clean up 2025-02-26 21:14:59 +07:00
Trisha Lim
f9147dae85 TOC fixes 2025-02-26 21:12:56 +07:00
Guido D'Orsi
28dac10723 Merge pull request #1517 from garden-co/fix/optional-fields-acl
feat(deepLoading): return undefined when an optional field is not accessible
2025-02-26 14:58:27 +01:00
Guido D'Orsi
932a21e62a Merge pull request #1521 from garden-co/permission-checks-simplified
feat: add shortcut methods to account to check permissions on covalues
2025-02-26 14:45:33 +01:00
Guido D'Orsi
628a33eb12 feat: add shortcut methods to account to check permissions on covalues 2025-02-26 14:45:22 +01:00
github-actions[bot]
50b15d2d1d Version Packages 2025-02-26 13:43:02 +00:00
pax
48bf7cb188 Merge pull request #1519 from garden-co/create-jazz-app-dev-deps-handling
fix(create-jazz-app): handle workspace devDependencies
2025-02-26 15:40:53 +02:00
Nikos Papadopoulos
20eef64b47 Added a new test case to validate a reported issue with optional fields 2025-02-26 13:16:05 +00:00
pax-k
e2e0af34b5 chore: changeset 2025-02-26 15:04:57 +02:00
Trisha Lim
6a5bcd3063 Fix missing og meta tags 2025-02-26 19:34:15 +07:00
Giordano Ricci
c64f38b6c9 docs for usePassKeyAuth changes 2025-02-26 12:02:39 +00:00
Giordano Ricci
e5e047660b nicer alert 2025-02-26 11:57:20 +00:00
Guido D'Orsi
9cb11e38dd feat(deepLoading): return undefined when an optional field is not accessible 2025-02-26 12:56:06 +01:00
Giordano Ricci
a65d6bed73 reorganize sections 2025-02-26 11:17:48 +00:00
Trisha Lim
21309953ee fix coming soon TOC 2025-02-26 18:03:27 +07:00
Trisha Lim
bc2f37df37 set TOC items in context 2025-02-26 17:59:52 +07:00
Trisha Lim
57ffac4432 move docs layout 2025-02-26 17:43:38 +07:00
pax-k
bf7e62ec76 fix(create-jazz-app): handle workspace devDependencies 2025-02-26 11:58:44 +02:00
Guido D'Orsi
71dda6b10b docs(contributing): fix the build step 2025-02-25 21:33:35 +01:00
Guido D'Orsi
f3e4bacb33 Merge remote-tracking branch 'origin/main' into jazz-581-rfc-new-deep-loading-api 2025-02-25 17:46:22 +01:00
Giordano Ricci
d4f7891890 add more docs 2025-02-25 16:39:37 +00:00
Emil Sayahi
4612e0545e fix: type inference on useCoState (#1489)
* fix: type inference on `useCoState`

The `id` parameter should be `ID<CoValue>` so the type inference picks up the CoValue type only from the `Schema` parameter.

See: #1476

* fix: type inference on loading & subscribing API

* test: add type inference `useCoState` tests

* chore: changeset
2025-02-25 10:35:53 -05:00
Guido D'Orsi
07feedd641 feat(PasskeyAuth): support random passphrase generation 2025-02-25 15:35:48 +01:00
Guido D'Orsi
edbd567f11 Merge pull request #1491 from garden-co/remove-neverthrow-from-agent
chore: remove neverthrow from the agent/sealer id getters
2025-02-25 15:22:07 +01:00
Giordano Ricci
6eef92b602 jazz 0.11.0 upgrade guide 2025-02-25 13:01:16 +00:00
Guido D'Orsi
dfbb4b8c69 Merge pull request #1478 from garden-co/jazz-749-migrations-make-migrations-work-with-profiles
fix: allow profile migrations, enforce profile ownership
2025-02-25 13:58:59 +01:00
Giordano Ricci
5f2d8e143c remove profile.name forced write 2025-02-25 12:35:39 +00:00
Guido D'Orsi
4d8bb9cdb8 Merge pull request #1495 from garden-co/changeset-release/main
Version Packages
2025-02-25 12:37:27 +01:00
github-actions[bot]
1971448f5d Version Packages 2025-02-25 11:31:50 +00:00
Guido D'Orsi
240f071951 Merge pull request #1502 from garden-co/jazz-730-passkeyauth-update-the-profile-name-only-if-the-value-on
Jazz 730 passkeyauth update the profile name only if the value on
2025-02-25 12:30:43 +01:00
Guido D'Orsi
0e861e7df8 Merge pull request #1501 from garden-co/revert-1487-jazz-730-passkeyauth-update-the-profile-name-only-if-the-value-on
Revert "fix(PasskeyAuth): set name iff username given"
2025-02-25 12:30:04 +01:00
Guido D'Orsi
6e3f1efcd0 Revert "fix(PasskeyAuth): set name iff username given (#1487)"
This reverts commit d469d68771.
2025-02-25 12:29:28 +01:00
Giordano Ricci
d560b4ddfb fixpermission resolution chain 2025-02-25 11:19:34 +00:00
Guido D'Orsi
eb87d10783 Merge pull request #1498 from garden-co/remove-quick-crypto
fix: don't export RNQuickCrypto to avoid install errors
2025-02-25 12:14:22 +01:00
Guido D'Orsi
5a54e4aa50 fix: don't export RNQuickCrypto to avoid install errors 2025-02-25 11:51:57 +01:00
Guido D'Orsi
73d6fd1a85 tests: add more permissions tests on inheritance 2025-02-25 11:42:58 +01:00
Guido D'Orsi
16b0a22ded chore: remove RNQuickCrypto from the chat example 2025-02-25 10:42:16 +01:00
pax-k
6a8ce1e32d chore(create-jazz-app): only copy .cursor dir 2025-02-24 23:58:32 +02:00
pax-k
10a4b0e888 Merge branch 'main' into cursor-rules-with-create-jazz-app 2025-02-24 23:44:06 +02:00
pax-k
3c973c84ce fix(create-jazz-app): git init inside new project 2025-02-24 23:40:50 +02:00
Emil Sayahi
d469d68771 fix(PasskeyAuth): set name iff username given (#1487)
* fix(PasskeyAuth): set name iff username given

If an empty username is passed to `signUp`, the `profile.name` of the user is not updated.

See: #1433

* chore: changeset

* docs(changeset): mention PasskeyAuth

Co-authored-by: Guido D'Orsi <gu.dorsi@gmail.com>

---------

Co-authored-by: Guido D'Orsi <gu.dorsi@gmail.com>
2025-02-24 16:23:09 -05:00
pax
c068d7a369 Merge pull request #1494 from garden-co/update-cursor-docs
fix: cursor docs structure
2025-02-24 22:31:15 +02:00
pax-k
25088ed5db fix: cursor docs structure 2025-02-24 22:29:04 +02:00
Guido D'Orsi
46f5133510 test: revoking access on a child group doesn't block access to that group if a more permissive role is inheritable 2025-02-24 20:17:58 +01:00
Giordano Ricci
b3f2e67d9d restore correct behavior in test 2025-02-24 19:17:30 +00:00
Giordano Ricci
f689cd20fc add tests 2025-02-24 19:05:34 +00:00
pax-k
21e74998e8 fix(cursor-docs): markdown references to examples 2025-02-24 20:53:17 +02:00
pax-k
a2e9ae4731 chore: refactored cursor rule name 2025-02-24 20:47:39 +02:00
Giordano Ricci
e22de9ff4c add changeset 2025-02-24 18:45:37 +00:00
Giordano Ricci
735bd41242 fix permsissions checks 2025-02-24 18:41:23 +00:00
Giordano Ricci
71998bde62 throw a meaningful error when trying to access an inbox with inusfficient permissions 2025-02-24 18:40:44 +00:00
Giordano Ricci
f01b714e29 remove profile visibility requirements 2025-02-24 18:40:44 +00:00
Giordano Ricci
028eca9f81 throw error is profile has an account owner 2025-02-24 18:40:44 +00:00
Giordano Ricci
d3d4118b86 fix tests 2025-02-24 18:40:43 +00:00
Giordano Ricci
45f1fe19ac fix: allow profile migrations, enforce profile ownership 2025-02-24 18:40:43 +00:00
pax-k
0514a7e64b chore: run pre-publish workflow when PR labels change 2025-02-24 20:35:40 +02:00
Emil Sayahi
ad2db5e6cb docs(changeset): mention PasskeyAuth
Co-authored-by: Guido D'Orsi <gu.dorsi@gmail.com>
2025-02-24 12:57:16 -05:00
pax-k
b063cccdfc chore: changeset 2025-02-24 19:16:37 +02:00
pax-k
d89d2978ff feat: added cursor-docs to create-jazz-app 2025-02-24 19:16:00 +02:00
Guido D'Orsi
221ca30790 chore: remove neverthrow from the agent/sealer id getters 2025-02-24 18:11:06 +01:00
Guido D'Orsi
480890d2e9 Merge pull request #1467 from garden-co/feat/return-inherited-members
feat: return inherited members and add getRoleOf and hasPermissions methods to Group
2025-02-24 17:49:18 +01:00
Emil Sayahi
18428eaaa1 chore: changeset 2025-02-24 11:47:41 -05:00
pax
caa6c147c8 Merge pull request #1490 from garden-co/changeset-release/main
Version Packages
2025-02-24 18:40:15 +02:00
github-actions[bot]
4da51e8f9c Version Packages 2025-02-24 16:37:25 +00:00
pax
a2076b179b Merge pull request #1488 from garden-co/cursor-docs
Cursor docs
2025-02-24 18:35:06 +02:00
pax-k
3fa276c18d chore: changeset 2025-02-24 18:18:33 +02:00
pax-k
1928519d39 feat: added cursor docs 2025-02-24 18:16:39 +02:00
Emil Sayahi
5ed31f2678 fix(PasskeyAuth): set name iff username given
If an empty username is passed to `signUp`, the `profile.name` of the user is not updated.

See: #1433
2025-02-24 11:11:57 -05:00
Guido D'Orsi
b9d194a80e feat: return inherited members and add getRoleOf and hasPermissions methods to Group 2025-02-24 12:55:14 +01:00
Anselm Eickhoff
f4fa80b782 Merge pull request #1469 from garden-co/changeset-release/main 2025-02-23 10:13:07 +00:00
github-actions[bot]
782df5d4b8 Version Packages 2025-02-23 10:12:42 +00:00
Anselm Eickhoff
9db20ad630 Merge pull request #1468 from Schniz/schniz/fix-rn-kv-persistence 2025-02-23 10:11:09 +00:00
Gal Schlezinger
3405d8f275 Add changeset 2025-02-23 12:09:48 +02:00
Gal Schlezinger
0a64dca0cd [jazz-react-native] override Context#getKvStore to actually use the declared kvStore in the provider 2025-02-23 11:42:46 +02:00
Guido D'Orsi
4d0b9b1bf1 Merge pull request #1466 from garden-co/changeset-release/main
Version Packages
2025-02-22 17:59:46 +01:00
github-actions[bot]
403d61c8e8 Version Packages 2025-02-22 16:58:53 +00:00
Guido D'Orsi
0685c1cd5f Merge pull request #1465 from garden-co/passkey-attachment
fix: remove the attachment setting to restore the faceid login
2025-02-22 17:57:16 +01:00
Guido D'Orsi
834203f270 fix: remove the attachment setting to restore the faceid login 2025-02-22 17:54:02 +01:00
Guido D'Orsi
2359e85ebd feat: enable the declarationMap option 2025-02-21 18:55:20 +01:00
Guido D'Orsi
626d43f07b Merge remote-tracking branch 'origin/main' into jazz-581-rfc-new-deep-loading-api 2025-02-21 18:27:14 +01:00
Guido D'Orsi
a4713df30c feat: migrate to declaration files 2025-02-21 16:07:51 +01:00
Guido D'Orsi
f01bc19257 test: remove .only 2025-02-21 16:07:33 +01:00
Guido D'Orsi
6405a77aa2 chore: fix tsconfig module value on the root 2025-02-21 11:30:43 +01:00
Guido D'Orsi
ace6486075 test: add deepLoading tests on CoMap.Record 2025-02-21 11:29:51 +01:00
Guido D'Orsi
23c3e5a125 Merge pull request #1456 from garden-co/changeset-release/main
Version Packages
2025-02-21 11:08:01 +01:00
github-actions[bot]
e3d75e5c97 Version Packages 2025-02-21 10:05:16 +00:00
Guido D'Orsi
7838075bd6 Merge pull request #1446 from garden-co/yubikey-asskey-support
feat: support external authenticators on passkey authentication
2025-02-21 11:02:04 +01:00
Guido D'Orsi
dd792bf0ca Merge pull request #1450 from garden-co/fix-missing-or-undefined-values
fix: improve subscribe behavoir on missing required and undeclared fields
2025-02-21 11:01:46 +01:00
Guido D'Orsi
233aae1deb fix: throw when a requested field on CoMap.Record is missing 2025-02-21 10:41:53 +01:00
Guido D'Orsi
153dc996a5 fix: catch errors on CoValueCore subscribers to avoid effects on the sync 2025-02-21 10:35:07 +01:00
Anselm Eickhoff
2b548c1758 Merge pull request #1442 from garden-co/jazz-734-add-docs-about-inspector
Add jazz inspector docs
2025-02-21 09:10:14 +00:00
Anselm Eickhoff
167b588553 Merge pull request #1455 from garden-co/jazz-738-table-of-contents-not-showing-in-upgrade-guides
Fix missing table of contents on upgrade guides
2025-02-21 09:09:18 +00:00
Anselm Eickhoff
424930d06d Merge pull request #1454 from garden-co/jazz-737-font-mono-doesnt-look-right-in-safari
Fix monospace font in safari
2025-02-21 09:08:07 +00:00
Giordano Ricci
d624a676d8 Merge pull request #1449 from garden-co/gio/docs/anchors-headings
add anchor to headings in mdx components
2025-02-21 10:05:05 +01:00
Trisha Lim
06f2af465d Fix missing table of contents on upgrade guides 2025-02-21 13:33:54 +07:00
Trisha Lim
c7332f84b9 Fix monospace font in safari 2025-02-21 11:39:22 +07:00
Trisha Lim
68fdbfbe94 Clean up 2025-02-21 11:22:32 +07:00
Trisha Lim
e98d0e0c7f Match # size with heading text 2025-02-21 11:19:45 +07:00
Trisha Lim
7efe89df31 Spacing and sizing adjustments 2025-02-21 10:56:51 +07:00
Guido D'Orsi
2fb6428ea1 fix: improve subscribe behavoir on missing required and undeclared fields 2025-02-20 20:05:36 +01:00
Giordano Ricci
5a8f5d8bc2 add anchor to headings in mdx components 2025-02-20 17:46:53 +00:00
Guido D'Orsi
2cc9daab37 test: add unsubscribe test 2025-02-20 18:02:03 +01:00
Guido D'Orsi
e0276f42ee Merge pull request #1448 from garden-co/revert-1445-gio/docs/add-profile-migration-example
Revert "docs: enrich migration example with profile"
2025-02-20 17:17:49 +01:00
Guido D'Orsi
363be52022 Revert "docs: enrich migration example with profile" 2025-02-20 17:17:35 +01:00
Guido D'Orsi
1e87fc7772 feat: support external authenticators on passkey authentication 2025-02-20 17:01:03 +01:00
Giordano Ricci
03ec5d3ec8 Merge pull request #1445 from garden-co/gio/docs/add-profile-migration-example
docs: enrich migration example with profile
2025-02-20 16:43:27 +01:00
Giordano Ricci
5f272ff6ba docs: enrich migration example with profile 2025-02-20 15:15:25 +00:00
Guido D'Orsi
12392424dd feat(llms-txt): add the music player example code 2025-02-20 21:14:57 +07:00
Guido D'Orsi
58eb3c0a98 test: fix the cloudflare test code 2025-02-20 14:55:05 +01:00
Guido D'Orsi
adf965d53d test: increase the timeout to 10s on the cloudflare integration test 2025-02-20 14:48:10 +01:00
Guido D'Orsi
3baa951bb9 Merge pull request #1424 from garden-co/changeset-release/main
Version Packages
2025-02-20 14:46:21 +01:00
github-actions[bot]
b726e31669 Version Packages 2025-02-20 13:44:04 +00:00
Guido D'Orsi
63bb31e0ad Merge pull request #1431 from garden-co/auth-state-sync
fix: isAuthenticated out-of-sync with the account state
2025-02-20 14:42:07 +01:00
Guido D'Orsi
d059460abd Merge pull request #1414 from garden-co/fix/examples-auth
Remove log out button in form and image upload example
2025-02-20 14:32:12 +01:00
Guido D'Orsi
ba81951331 test: fix the mobile e2e tests 2025-02-20 14:22:21 +01:00
Guido D'Orsi
bd132bb9ad Merge pull request #1437 from garden-co/feat/enable-cmd-j-default
enable Cmd+J by default to launch inspector on dev
2025-02-20 14:10:31 +01:00
Benjamin S. Leveritt
1ee435ad95 Merge pull request #1439 from garden-co/feat/big-llms-txt
Make llms.txt more complete
2025-02-20 12:51:42 +00:00
Trisha Lim
07273f7ab8 Add jazz inspector docs 2025-02-20 19:17:06 +07:00
Guido D'Orsi
646ad330ae Merge pull request #1430 from garden-co/tests/cloudflare
test: add a cloudflare workers integration test
2025-02-20 13:06:58 +01:00
Guido D'Orsi
af8e6e3f82 chore: inline callbacks
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2025-02-20 13:05:05 +01:00
Guido D'Orsi
f247525dfe test: fix cloudflare tests on CI 2025-02-20 13:01:42 +01:00
Guido D'Orsi
012022db2b chore: changeset 2025-02-20 12:46:58 +01:00
Guido D'Orsi
da92891498 test: add cloudflare integration tests 2025-02-20 12:46:24 +01:00
Guido D'Orsi
b0c55720f8 feat: crypto option to provide PureJSCrypto on the runtimes where wasm is not supported 2025-02-20 12:45:59 +01:00
Trisha Lim
a3d825fc6f make llms.txt more complete 2025-02-20 18:34:01 +07:00
Guido D'Orsi
29ca2e6f65 update lockfile again 2025-02-20 12:07:29 +01:00
Guido D'Orsi
07a683c13d chore: remove cloudflare tests for compat issues with Vitest 3 2025-02-20 12:07:28 +01:00
Guido D'Orsi
e53f02d6d7 chore: update lockfile and format vitest config 2025-02-20 12:07:28 +01:00
Guido D'Orsi
4915bfa26d test: add a cloudflare workers integration test 2025-02-20 12:07:27 +01:00
Guido D'Orsi
af45aac5f2 feat: improve error logging on sync errors 2025-02-20 12:07:27 +01:00
Guido D'Orsi
1136d9b744 chore: changeset 2025-02-20 12:01:35 +01:00
Guido D'Orsi
92e78dc262 chore: clean up debug code 2025-02-20 11:54:57 +01:00
Trisha Lim
bf76d798c4 add changeset 2025-02-20 17:54:21 +07:00
Benjamin S. Leveritt
627f8c4c28 Merge pull request #1413 from garden-co/jazz-720-fix-jazz-crypto-rs-imports-for-nextjs
Bumps crypto version
2025-02-20 10:52:41 +00:00
Trisha Lim
a1e0410863 enable Cmd+J to launch inspector on dev 2025-02-20 17:52:41 +07:00
Guido D'Orsi
03897a2689 fix: clean up AuthSecretStorage notification management and fix the tests 2025-02-20 11:45:25 +01:00
Guido D'Orsi
823f546028 test: cover the logOut and authenticate updates with tests 2025-02-20 11:45:24 +01:00
Guido D'Orsi
9bc54d1939 chore: clean up the useCoState code 2025-02-20 11:45:24 +01:00
Guido D'Orsi
30780c05f0 fix: initial fix for logIn/logOut state sync 2025-02-20 11:45:24 +01:00
Guido D'Orsi
118b6294ac Merge pull request #1435 from garden-co/jazz-725-react-starter-profile-name-is-lost-on-signup
Fix wrong name field on form in starter app
2025-02-20 11:45:08 +01:00
Trisha Lim
6dc9b9d2ec Improve llms.txt documentation (#1436)
* Make download link to llms-full.txt more prominent

* add separate section for llms.txt convention
2025-02-20 17:41:38 +07:00
Benjamin S. Leveritt
ccbcee5102 Bumps crypto version 2025-02-20 10:41:31 +00:00
Giordano Ricci
0ae2067c3c Merge pull request #1403 from garden-co/gio/auth-fixes
fix: fixes clerk auth flow
2025-02-20 11:33:17 +01:00
Trisha Lim
2137938ead Fix wrong name field on form in starter app 2025-02-20 16:31:08 +07:00
Benjamin S. Leveritt
d14bb57ff5 Tweaks LLMs docs copy (#1423) 2025-02-20 11:17:19 +07:00
Giordano Ricci
3f42a4ddf9 add test 2025-02-19 15:25:02 +00:00
Giordano Ricci
0eed228170 add changeset 2025-02-19 14:32:48 +00:00
Giordano Ricci
a519537701 remove unused import 2025-02-19 13:52:14 +00:00
Giordano Ricci
43c79cac2a add simple test 2025-02-19 13:46:37 +00:00
Giordano Ricci
44dbaa00d4 revert wrong change 2025-02-19 12:12:01 +00:00
Giordano Ricci
a0df32e81a add types test 2025-02-19 12:08:42 +00:00
Giordano Ricci
236d8226d8 remove prevContext promise 2025-02-19 10:39:32 +00:00
Giordano Ricci
1220fa5d97 remove reset 2025-02-19 10:37:33 +00:00
Benjamin S. Leveritt
f3a5f83f25 Initializes the wasm module on creation 2025-02-19 10:36:29 +00:00
Benjamin S. Leveritt
a1bd6fc79b Bumps crypto version 2025-02-19 10:36:29 +00:00
Benjamin S. Leveritt
0f83320222 Chore: changeset 2025-02-19 10:36:29 +00:00
Benjamin S. Leveritt
a3c4067de3 Bumps crypto version 2025-02-19 10:36:29 +00:00
Benjamin S. Leveritt
3042627748 Merge pull request #1419 from garden-co/docs/llms
Add LLM page to docs
2025-02-19 10:18:44 +00:00
Guido D'Orsi
8cea1e96cf Merge pull request #1418 from garden-co/fix/idb-transactions
fix: improve the rollback on failure when handling new content in storage
2025-02-19 11:12:25 +01:00
Trisha Lim
64bb9ba90e Fix typo 2025-02-19 10:04:26 +00:00
Trisha Lim
f136dfe39b Update docs intro LLM section 2025-02-19 10:04:26 +00:00
Trisha Lim
b32ae6240c Use llms-full.txt, add chatgpt screenshot 2025-02-19 10:04:26 +00:00
Trisha Lim
fc4a89f77f Add llms section to docs 2025-02-19 10:04:26 +00:00
Guido D'Orsi
7a6f8db509 Merge pull request #1420 from garden-co/mini-inspector-improvements
[inspector] Add global search and json viewer
2025-02-19 10:42:28 +01:00
Guido D'Orsi
086b9af565 Merge pull request #1422 from garden-co/jazz-723-docs-intro-broken-links
Fix missing framework param in docs links
2025-02-19 08:56:12 +01:00
Trisha Lim
5e95d8b76e Refactor useFramework 2025-02-19 14:25:11 +07:00
Trisha Lim
47e0b68c2e Fix missing framework param in docs links 2025-02-19 14:22:04 +07:00
Giordano Ricci
5cc58c8e02 whoopsie 2025-02-18 22:40:01 +00:00
Giordano Ricci
9df644c578 fix 2025-02-18 22:35:35 +00:00
Tobias Lins
a20e430e7f Add global search and json viewer 2025-02-18 22:15:54 +01:00
Guido D'Orsi
1e625f3c12 chore: changeset 2025-02-18 18:14:39 +01:00
Guido D'Orsi
8b3686c7ce feat: use the uniqueSessions index to get the single coValue session 2025-02-18 18:12:47 +01:00
Guido D'Orsi
bce04ee06d chore: restore the transactions autobatching 2025-02-18 18:05:53 +01:00
Guido D'Orsi
f2e9115f4c fix: improve transactions management on IDB 2025-02-18 17:51:32 +01:00
Giordano Ricci
6854f9930c wip: fix clerk auth flow 2025-02-18 16:47:49 +00:00
Guido D'Orsi
ee0897d9a8 fix: improve the rollback on failure when handling new content in storage 2025-02-18 14:42:29 +01:00
Trisha Lim
243ab074eb Remove non-functional nav from image upload example 2025-02-18 20:21:55 +07:00
Trisha Lim
385659b243 Link to garden from footer 2025-02-18 18:32:43 +07:00
Trisha Lim
938f9256db Remove non-functional nav from form example 2025-02-18 15:31:53 +07:00
Anselm
88521721bf unpizzazz 😔 2025-02-17 20:35:01 +00:00
Guido D'Orsi
2701630582 Merge pull request #1385 from boorad/fix/rn-polyfills
fix: reduce RN polyfills
2025-02-17 18:50:22 +01:00
Guido D'Orsi
07ce619fa2 Merge pull request #1411 from garden-co/jazz-719-exclued-tsbuildinfo-files
Removes tsbuildinfo files from repo
2025-02-17 18:44:22 +01:00
Guido D'Orsi
895de1a470 Merge pull request #1372 from garden-co/jazz-705-rename-e2e-test-scripts
Jazz 705 rename e2e test scripts
2025-02-17 18:43:59 +01:00
Benjamin S. Leveritt
4450761a7b Removes tsbuildinfo files from repo 2025-02-17 17:14:02 +00:00
Benjamin S. Leveritt
08b3d65c0b Removes onboarding app 2025-02-17 17:08:28 +00:00
Benjamin S. Leveritt
5dac731f26 Gitignore test failure screenshots 2025-02-17 17:06:56 +00:00
Benjamin S. Leveritt
e99308cda2 Revert vite test workspace
...for now...
2025-02-17 17:05:10 +00:00
Guido D'Orsi
88e314d980 Merge pull request #1400 from garden-co/changeset-release/main
Version Packages
2025-02-17 18:00:56 +01:00
github-actions[bot]
62e0e5d721 Version Packages 2025-02-17 16:35:06 +00:00
Guido D'Orsi
aa16ad9c1c Merge pull request #1408 from garden-co/fix/clerk-auth-migration
fix: fixes the clerk credentials migration
2025-02-17 17:33:15 +01:00
Guido D'Orsi
ada802bff8 fix: fixes the clerk credentials migration 2025-02-17 17:16:19 +01:00
Benjamin S. Leveritt
44e1d140ca Builds dependencies for tests (rather than the package; read: faster) 2025-02-17 15:39:05 +00:00
Benjamin S. Leveritt
e0ef3fc1de Removes browser-integration from vite workspace
Vite treats it as a src package, and that breaks turbo's test task resolution (running tests at the root level). Vitest doesn't need it to be there to run the tests.
2025-02-17 15:39:05 +00:00
Benjamin S. Leveritt
a31ac66213 Fixes headless run of browser-integration tests 2025-02-17 15:39:05 +00:00
Benjamin S. Leveritt
b444b2e96a Renames e2e tests to separate from test task 2025-02-17 15:39:05 +00:00
Benjamin S. Leveritt
8fcc4b5e50 Runs turbo tests as in CI (ie. no watching) 2025-02-17 15:39:05 +00:00
Benjamin S. Leveritt
33bfbee9cf Removes unused test command 2025-02-17 15:39:05 +00:00
Benjamin S. Leveritt
d08e4e263b Fixes project jazz-auth-clerk name for tests 2025-02-17 15:39:05 +00:00
Benjamin S. Leveritt
471b8c6a15 Merge pull request #1405 from garden-co/jazz-716-fix-turbo-caching-of-llm-content
Adds llms.txt to turbo build output cache
2025-02-17 15:18:11 +00:00
Benjamin S. Leveritt
7dd080d907 Merge pull request #1401 from garden-co/jazz-714-add-turbo-to-nix-dev-environment
Updates flake, adds turbo dep
2025-02-17 15:07:44 +00:00
Benjamin S. Leveritt
69c81a3e90 Adds llms.txt to turbo build output cache 2025-02-17 15:06:53 +00:00
Benjamin S. Leveritt
d8ed987461 Merge pull request #1406 from garden-co/fix/missing-icon
Fix missing icon
2025-02-17 15:06:39 +00:00
Trisha Lim
beb45c2656 Fix missing icon 2025-02-17 15:06:11 +00:00
Brad Anderson
e6241dfb5a fix: reduce RN polyfills 2025-02-17 09:39:01 -05:00
Guido D'Orsi
1d71ca1511 feat: add React 19 to the peerDependencies 2025-02-17 15:32:04 +01:00
Benjamin S. Leveritt
65941c7f87 Updates flake, adds turbo dep 2025-02-17 12:07:23 +00:00
Guido D'Orsi
a37dc1c22f test: cover another case on existing account migrations 2025-02-17 13:01:59 +01:00
Benjamin S. Leveritt
774f232390 Merge pull request #1307 from garden-co/jazz-679-create-crypto-rust-crate
Jazz 679 Use jazz-crypto-rs
2025-02-17 12:00:46 +00:00
Benjamin S. Leveritt
12c19fc940 Merge pull request #1396 from garden-co/jazz-713-fix-llms-fulltxt-content
Fixes llms-full.txt, adds sanity tests
2025-02-17 11:56:29 +00:00
Guido D'Orsi
f0ae3ace13 Merge pull request #1398 from garden-co/changeset-release/main
Version Packages
2025-02-17 12:45:07 +01:00
github-actions[bot]
cc973137b7 Version Packages 2025-02-17 11:43:44 +00:00
Guido D'Orsi
7fff0e0b36 Merge pull request #1397 from garden-co/fix/existing-account-migration
fix: correct the account migration execution on existing accounts
2025-02-17 12:42:14 +01:00
Guido D'Orsi
6909357f64 test: cover existing account migration with a test on jazz-tools 2025-02-17 12:41:58 +01:00
Guido D'Orsi
59ff77e0dc fix: correct the account migration execution on existing accounts 2025-02-17 12:27:05 +01:00
Benjamin S. Leveritt
338f5421f4 Adds test task 2025-02-17 11:26:38 +00:00
Benjamin S. Leveritt
a7590d14d6 Merge pull request #1392 from garden-co/jazz-712-delete-hr-onboarding-example
Delete HR Onboarding example
2025-02-17 11:12:52 +00:00
Benjamin S. Leveritt
e0daca300b Fixes llms-full.txt, adds sanity tests 2025-02-17 11:07:16 +00:00
Guido D'Orsi
a5347b613b Merge pull request #1358 from garden-co/fix/dropdown-alignment
Alignment fixes
2025-02-17 10:51:45 +01:00
Guido D'Orsi
9de58bb098 Merge pull request #1387 from garden-co/jazz-510-indicate-activevisible-items-on-table-of-contents
Highlight table of contents active item, styling for side nav active item
2025-02-17 10:49:53 +01:00
Trisha Lim
de1be9ac18 Delete HR Onboarding example 2025-02-17 15:05:58 +07:00
Trisha Lim
43df7f2b48 Fix chat demo section alignment 2025-02-17 11:30:50 +07:00
Trisha Lim
5f4f70d06d Fix side nav error 2025-02-17 11:26:29 +07:00
Trisha Lim
a9aa61c2c0 Set max width on docs body 2025-02-17 11:13:47 +07:00
Trisha Lim
bc0d2fcd23 Use code group in jazz-run command code snippet 2025-02-17 11:06:46 +07:00
Trisha Lim
f5675c49a2 Fix horizontal overflow in docs on mobile 2025-02-17 11:03:01 +07:00
Trisha Lim
da13e9cf7c Dropdown adjustments 2025-02-17 11:02:46 +07:00
Trisha Lim
ab2546ca71 Fix copy button alignment 2025-02-17 11:02:46 +07:00
Trisha Lim
43c36a8c20 Fix dropdown alignment 2025-02-17 11:02:46 +07:00
Trisha Lim
24ad5f42b5 Indicate that examples is outside docs 2025-02-17 10:46:52 +07:00
Trisha Lim
c620d9c87c Make active nav item styling more prominent 2025-02-17 10:38:13 +07:00
Trisha Lim
59121a1f52 Styling for active item on docs side nav 2025-02-17 10:32:51 +07:00
Trisha Lim
f766de8d9e Indicate active/visible items on table of contents 2025-02-17 09:55:52 +07:00
Trisha Lim
eb8621550a Increase space between content and main nav 2025-02-17 09:53:09 +07:00
Trisha Lim
5d28413648 Increase space between side bars and content 2025-02-17 09:53:09 +07:00
Trisha Lim
d0ed7177a3 Reduce font size on headings 2025-02-17 09:53:09 +07:00
Guido D'Orsi
091d753ab4 Merge pull request #1362 from garden-co/fix/missing-focus-styles
Add global focus styles
2025-02-16 11:32:22 +01:00
Guido D'Orsi
87f917d297 Merge pull request #1386 from antoniel/tony/fix-contributing-md
tony/fix-contributing-md
2025-02-16 06:30:17 +01:00
Guido D'Orsi
88acea362a Merge pull request #1382 from boorad/fix/crypto-provider
fix: Add back ability to use different crypto providers for RN
2025-02-16 06:28:38 +01:00
antoniel
0107f4939d docs: update CONTRIBUTING.md with homepage and build steps 2025-02-15 15:49:15 -03:00
Brad Anderson
f468b89994 fix: Add back ability to use different crypto providers for RN 2025-02-15 10:55:55 -05:00
Benjamin S. Leveritt
1f5d073035 Update homepage/homepage/app/(docs)/docs/[framework]/[...slug]/upgrade/0-11-0.mdx
Co-authored-by: Guido D'Orsi <guido@float.com>
2025-02-13 17:34:20 +00:00
Benjamin S. Leveritt
a3b607e799 Update homepage/homepage/app/(docs)/docs/[framework]/[...slug]/upgrade/0-11-0.mdx
Co-authored-by: Guido D'Orsi <guido@float.com>
2025-02-13 17:34:06 +00:00
Benjamin S. Leveritt
8fb93502af Update homepage/homepage/app/(docs)/docs/[framework]/[...slug]/upgrade/0-11-0.mdx
Co-authored-by: Guido D'Orsi <guido@float.com>
2025-02-13 17:33:49 +00:00
Benjamin S. Leveritt
36774122e0 Updates react guide for new resolve API
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-13 16:08:52 +00:00
Benjamin S. Leveritt
a6923128c1 Adds upgrade guide
Signed-off-by: Benjamin S. Leveritt <benjamin@leveritt.co.uk>
2025-02-13 15:56:11 +00:00
Guido D'Orsi
706ca62feb Merge pull request #1363 from garden-co/unauthorized-deep-loading
fix: check CoValue permissions when loading/subscribing
2025-02-13 09:55:16 +01:00
Guido D'Orsi
01523dcca3 fix: check CoValue permissions when loading/subscribing 2025-02-13 09:19:19 +01:00
Guido D'Orsi
77f039b561 Merge remote-tracking branch 'origin/main' into jazz-581-rfc-new-deep-loading-api 2025-02-13 09:18:47 +01:00
Benjamin S. Leveritt
5c76e37f14 Adds changeset 2025-02-12 21:35:05 +00:00
Benjamin S. Leveritt
0117d0c9b9 Bumps jazz-crypto version 2025-02-12 21:21:34 +00:00
Benjamin S. Leveritt
b90c766c05 Cleans up WasmCrypto.create 2025-02-12 21:21:13 +00:00
Benjamin S. Leveritt
262a36e456 Bumps dep 2025-02-12 20:20:27 +00:00
Benjamin S. Leveritt
cb1df65beb Refactors to use stateful Blake3Hasher 2025-02-12 20:20:26 +00:00
Benjamin S. Leveritt
ea91e63ff2 Bumps jazz-crypto-rs version 2025-02-12 20:20:26 +00:00
Benjamin S. Leveritt
8eae2eb31e Fixes test 2025-02-12 20:20:26 +00:00
Benjamin S. Leveritt
c9044f5123 Adds npm dep 2025-02-12 20:20:26 +00:00
Benjamin S. Leveritt
24340173fa Picks up that can
#riseandshinemrfreeman
2025-02-12 20:19:48 +00:00
Benjamin S. Leveritt
53e88993a0 Moves jazz-crypto-rs into own repo 2025-02-12 20:18:47 +00:00
Benjamin S. Leveritt
ece168878b Use external dep 2025-02-12 20:18:47 +00:00
Benjamin S. Leveritt
cad84db52b Adds comments 2025-02-12 20:18:47 +00:00
Benjamin S. Leveritt
342a385111 Simplifies build process 2025-02-12 20:18:47 +00:00
Benjamin S. Leveritt
f87ba7d927 Fixes seal port 2025-02-12 20:18:47 +00:00
Benjamin S. Leveritt
7c7f55b85c Ports high-level encrypt and decrypt fns 2025-02-12 20:18:46 +00:00
Benjamin S. Leveritt
0e5b9f5292 Fixes unused lint 2025-02-12 20:18:46 +00:00
Benjamin S. Leveritt
2f5af3dece Ports get_sealer_id 2025-02-12 20:18:46 +00:00
Benjamin S. Leveritt
2c35e2ba85 Ports signing fns 2025-02-12 20:18:46 +00:00
Benjamin S. Leveritt
0a4f79d5a4 Adds wasm-pack via pnpm 2025-02-12 20:18:46 +00:00
Benjamin S. Leveritt
43cb7abba7 Exclude target output from formatter 2025-02-12 20:18:46 +00:00
Benjamin S. Leveritt
25f76f6b02 Updates README 2025-02-12 20:18:46 +00:00
Benjamin S. Leveritt
6a56561c98 Refactor into modules 2025-02-12 20:18:45 +00:00
Benjamin S. Leveritt
2ac31e7c51 Removes unused berith dep 2025-02-12 20:18:45 +00:00
Benjamin S. Leveritt
1bbefab5a9 Ports final ed25519 fns 2025-02-12 20:18:45 +00:00
Benjamin S. Leveritt
1143b32cf3 Remove generateNonce from crypto, as only used by PureJS class 2025-02-12 20:18:45 +00:00
Benjamin S. Leveritt
51ada27810 Refactors to pass nonceMaterial to reduce wasm boundary crossing 2025-02-12 20:18:45 +00:00
Benjamin S. Leveritt
954ecb3984 Ports xsalsa20 encrypt/decrypt fns to Rust 2025-02-12 20:18:45 +00:00
Benjamin S. Leveritt
05089270d9 Refactors to pass nonceMaterial, rather than nonces 2025-02-12 20:18:45 +00:00
Benjamin S. Leveritt
fecc81111a Ports seal/unseal to rs lib 2025-02-12 20:18:45 +00:00
Benjamin S. Leveritt
4d3e7dbcd5 Adds X25519 fns 2025-02-12 20:18:44 +00:00
Benjamin S. Leveritt
ee65f18fd9 Add note about rust-analyzer 2025-02-12 20:18:44 +00:00
Benjamin S. Leveritt
bcbc4636ed Moves randomBytes up into crypto class to remove duplication 2025-02-12 20:18:44 +00:00
Benjamin S. Leveritt
8c323c4513 Fixes type 2025-02-12 20:18:44 +00:00
Benjamin S. Leveritt
4103ea0c88 Removes hash-wasm dep 2025-02-12 20:18:44 +00:00
Benjamin S. Leveritt
733ebec902 Ports more Blake3 functions 2025-02-12 19:50:23 +00:00
Benjamin S. Leveritt
10a3834668 Ports blake3_hash with context 2025-02-12 19:50:23 +00:00
Benjamin S. Leveritt
593c3aeb6e Port blake3_hash_once 2025-02-12 19:50:23 +00:00
Benjamin S. Leveritt
a55d71c28d Fixes exported fn for node 2025-02-12 19:49:53 +00:00
Benjamin S. Leveritt
c030c7a57e Adds isomorphic generate_nonce function to rs lib 2025-02-12 19:49:53 +00:00
Benjamin S. Leveritt
e5b4c0448a Refactor into nonceGeneration 2025-02-12 19:49:53 +00:00
Benjamin S. Leveritt
0d516a3c6a Adds a test for unsealed error 2025-02-12 19:49:53 +00:00
Benjamin S. Leveritt
271ff3eb40 Adds comments to crypto libs 2025-02-12 19:49:53 +00:00
Benjamin S. Leveritt
dcc836ff98 Imports jazz-crypto-rs into cojson 2025-02-12 19:49:53 +00:00
Benjamin S. Leveritt
22da4ea136 Add jazz-crypto-rs lib 2025-02-12 18:27:21 +00:00
Benjamin S. Leveritt
80e86c92b2 Add rust tools to nix dev environment 2025-02-12 18:27:21 +00:00
Trisha Lim
302a1e6660 Add global focus styles 2025-02-12 20:23:56 +07:00
Guido D'Orsi
d661ba77be chore: improve pre-release comment output 2025-02-12 11:32:05 +01:00
Guido D'Orsi
f8fbc59b6f Merge remote-tracking branch 'origin/main' into jazz-581-rfc-new-deep-loading-api 2025-02-11 16:26:12 +01:00
Guido D'Orsi
cce0d22007 fix: update resolve property 2025-02-11 15:15:44 +01:00
Guido D'Orsi
e3ff76e9cb Merge remote-tracking branch 'origin/authv2' into jazz-581-rfc-new-deep-loading-api 2025-02-11 15:12:51 +01:00
Guido D'Orsi
4cbf71bff7 Merge pull request #1338 from garden-co/new-deep-loading-extra-props-fix
fix: disallow extra props in the resolve type
2025-02-11 14:38:43 +01:00
Guido D'Orsi
ceb060243a fix: disallow extra props in the resolve type 2025-02-10 20:04:32 +01:00
Anselm
a70bebb96a Clean up new deep-loading API 2025-01-29 14:39:16 +00:00
Anselm
b3b2507c35 Merge branch 'main' into jazz-581-rfc-new-deep-loading-api 2025-01-27 11:36:08 +00:00
Anselm
65336464fc Simplified 2025-01-07 14:22:22 +00:00
Anselm
a628f5cc97 Even simpler pricing 2025-01-06 16:23:05 +00:00
Anselm
6a8fa16b49 Fix form and chat-rn-clerk examples 2024-12-16 15:56:48 +00:00
Anselm
1f08807701 Merge branch 'main' into jazz-581-rfc-new-deep-loading-api 2024-12-16 15:37:39 +00:00
Anselm
ba4a7f6170 Remove temp vite config 2024-12-16 15:35:06 +00:00
Anselm
a2854e3602 Upgrade to minor version change 2024-12-16 11:25:00 +00:00
Anselm
4ea87dc494 Add changeset 2024-12-16 10:55:51 +00:00
Anselm
d8c87c5314 Use $each instead of each 2024-12-16 10:54:25 +00:00
Anselm
46f624a12e Replace 'items' with 'each' 2024-12-13 16:28:40 +00:00
Anselm
86ce770f38 Implement clearer syntax for deep loading 2024-12-13 15:12:42 +00:00
623 changed files with 29041 additions and 8982 deletions

View File

@@ -0,0 +1,6 @@
---
"jazz-tools": minor
"cojson": minor
---
Check CoValue access permissions when loading

View File

@@ -9,12 +9,15 @@
"cojson-storage",
"cojson-storage-indexeddb",
"cojson-storage-sqlite",
"cojson-storage-rn-sqlite",
"cojson-transport-ws",
"jazz-browser",
"jazz-auth-clerk",
"jazz-browser-media-images",
"jazz-inspector",
"jazz-nodejs",
"jazz-react",
"jazz-react-core",
"jazz-react-auth-clerk",
"jazz-react-native",
"jazz-react-native-auth-clerk",

View File

@@ -0,0 +1,5 @@
---
"jazz-tools": minor
---
Implement new API for deep loading

View File

@@ -0,0 +1,5 @@
---
"jazz-tools": minor
---
The .load function now returns `null` on error

View File

@@ -0,0 +1,5 @@
---
"cojson": minor
---
Return the EVERYONE role if the account is not direct a member of the group

View File

@@ -0,0 +1,5 @@
---
"jazz-vue": patch
---
Fix types compilation for useAccount

View File

@@ -19,7 +19,6 @@ jobs:
"pets",
"reactions",
"todo",
"onboarding",
]
steps:

View File

@@ -13,7 +13,7 @@ jobs:
continue-on-error: true
strategy:
matrix:
project: ["tests/e2e", "examples/chat", "examples/file-share-svelte", "examples/form", "examples/music-player", "examples/pets", "examples/onboarding", "starters/react-passkey-auth"]
project: ["tests/e2e", "examples/chat", "examples/file-share-svelte", "examples/form", "examples/music-player", "examples/pets", "starters/react-passkey-auth"]
steps:
- uses: actions/checkout@v4

View File

@@ -1,7 +1,7 @@
name: Pre-Publish tagged Pull Requests
on:
pull_request:
types: [opened, synchronize, reopened]
types: [opened, synchronize, reopened, labeled]
jobs:
pre-release:
@@ -99,4 +99,4 @@ jobs:
);
await logPublishInfo();
}
}
}

View File

@@ -25,6 +25,9 @@ jobs:
- name: Setup Source Code
uses: ./.github/actions/source-code/
- name: Build packages
run: pnpm exec turbo run build --filter='./packages/*'
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1

4
.gitignore vendored
View File

@@ -7,11 +7,15 @@ docsTmp
coverage
.direnv
# Typescript
**/*.tsbuildinfo
# Next.js
**/.next
# Vite output
**/dist
__screenshots__
# Playwright
test-results

View File

@@ -36,7 +36,7 @@ We welcome all ideas! If you have suggestions, feel free to open an issue marked
### 5. Local Setup
You'll need Node.js 20.x or 22.x installed (we're working on support for 23.x), and pnpm 9.x installed. If you're using nix, run `nix develop` to get a shell with the correct versions of everything installed.
You'll need Node.js 22.x installed (we're working on support for 23.x), and pnpm 9.x installed. If you're using nix, run `nix develop` to get a shell with the correct versions of everything installed.
1. **Clone the repository**:
```bash
@@ -48,7 +48,25 @@ You'll need Node.js 20.x or 22.x installed (we're working on support for 23.x),
pnpm install
```
3. **Run tests** to verify everything is working:
3. **Install homepage dependencies**:
```bash
cd homepage && pnpm install
```
4. **Go back to the project root**:
```bash
cd ..
```
4. **Build the packages**:
```bash
pnpm build
```
5. **Run tests** to verify everything is working:
```bash
pnpm test
```

View File

@@ -12,7 +12,9 @@
"**/ios/**",
"**/android/**",
"packages/jazz-svelte/**",
"examples/*svelte*/**"
"examples/*svelte*/**",
"homepage/homepage/**",
"**/package.json"
]
},
"formatter": {
@@ -42,15 +44,6 @@
}
},
"overrides": [
{
"include": ["**/package.json"],
"linter": {
"enabled": false
},
"formatter": {
"enabled": false
}
},
{
"include": ["packages/**/src/**"],
"linter": {
@@ -61,21 +54,24 @@
}
},
{
"include": ["packages/**/src/tests/**", "packages/**/src/test/**"],
"include": ["packages/cojson-storage*/**", "cojson-transport-ws/**"],
"linter": {
"enabled": true,
"rules": {
"correctness": {
"useImportExtensions": "off"
}
"recommended": true
}
}
},
{
"include": ["packages/cojson-storage-indexeddb/**"],
"include": ["packages/**/src/tests/**"],
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"useImportExtensions": "off"
},
"style": {
"noNonNullAssertion": "off"
},
"suspicious": {
"noExplicitAny": "info"
}

View File

@@ -1,5 +1,182 @@
# chat-rn-clerk
## 1.0.87
### Patch Changes
- 1bfa9bb: Removed when="singedUp" from examples apps' Jazz providers. This is a really niche use-case option and can lead to broken-feeling experiences when anonymous users try to load something.
- Updated dependencies [e7c85b7]
- jazz-react-native@0.11.6
- jazz-tools@0.11.6
- jazz-react-native-auth-clerk@0.11.6
- jazz-react-native-media-images@0.11.6
## 1.0.86
### Patch Changes
- jazz-react-native@0.11.5
- jazz-react-native-auth-clerk@0.11.5
- jazz-tools@0.11.5
- jazz-react-native-media-images@0.11.5
## 1.0.85
### Patch Changes
- Updated dependencies [57a3dbe]
- Updated dependencies [a717754]
- Updated dependencies [a91f343]
- jazz-tools@0.11.4
- jazz-react-native@0.11.4
- jazz-react-native-auth-clerk@0.11.4
- jazz-react-native-media-images@0.11.4
## 1.0.84
### Patch Changes
- jazz-react-native@0.11.3
- jazz-react-native-auth-clerk@0.11.3
- jazz-tools@0.11.3
- jazz-react-native-media-images@0.11.3
## 1.0.83
### Patch Changes
- Updated dependencies [6892dc6]
- jazz-tools@0.11.2
- jazz-react-native@0.11.2
- jazz-react-native-auth-clerk@0.11.2
- jazz-react-native-media-images@0.11.2
## 1.0.82
### Patch Changes
- jazz-react-native@0.11.1
- jazz-react-native-auth-clerk@0.11.1
## 1.0.81
### Patch Changes
- Updated dependencies [6a96d8b]
- Updated dependencies [a35249a]
- Updated dependencies [b9d194a]
- Updated dependencies [a4713df]
- Updated dependencies [34cbdc3]
- Updated dependencies [f039e8f]
- Updated dependencies [e22de9f]
- jazz-tools@0.11.0
- jazz-react-native-media-images@0.11.0
- jazz-react-native-auth-clerk@0.11.0
- jazz-react-native@0.11.0
## 1.0.80
### Patch Changes
- Updated dependencies [2f99de0]
- jazz-tools@0.10.15
- jazz-react-native@0.10.15
- jazz-react-native-auth-clerk@0.10.15
- jazz-react-native-media-images@0.10.15
## 1.0.79
### Patch Changes
- Updated dependencies [75211e3]
- jazz-tools@0.10.14
- jazz-react-native@0.10.14
- jazz-react-native-auth-clerk@0.10.14
- jazz-react-native-media-images@0.10.14
## 1.0.78
### Patch Changes
- Updated dependencies [07feedd]
- jazz-tools@0.10.13
- jazz-react-native@0.10.13
- jazz-react-native-auth-clerk@0.10.13
- jazz-react-native-media-images@0.10.13
## 1.0.77
### Patch Changes
- Updated dependencies [4612e05]
- jazz-tools@0.10.12
- jazz-react-native@0.10.12
- jazz-react-native-auth-clerk@0.10.12
- jazz-react-native-media-images@0.10.12
## 1.0.76
### Patch Changes
- Updated dependencies [5a54e4a]
- jazz-react-native@0.10.11
- jazz-react-native-auth-clerk@0.10.11
## 1.0.75
### Patch Changes
- Updated dependencies [3405d8f]
- jazz-react-native@0.10.10
- jazz-react-native-auth-clerk@0.10.10
## 1.0.74
### Patch Changes
- jazz-react-native-auth-clerk@0.10.9
## 1.0.73
### Patch Changes
- Updated dependencies [2fb6428]
- jazz-tools@0.10.8
- jazz-react-native@0.10.8
- jazz-react-native-auth-clerk@0.10.8
- jazz-react-native-media-images@0.10.8
## 1.0.72
### Patch Changes
- Updated dependencies [1136d9b]
- Updated dependencies [0eed228]
- jazz-react-native@0.10.7
- jazz-tools@0.10.7
- jazz-react-native-auth-clerk@0.10.7
- jazz-react-native-media-images@0.10.7
## 1.0.71
### Patch Changes
- Updated dependencies [ada802b]
- jazz-tools@0.10.6
- jazz-react-native@0.10.6
- jazz-react-native-auth-clerk@0.10.6
- jazz-react-native-media-images@0.10.6
## 1.0.70
### Patch Changes
- Updated dependencies [59ff77e]
- jazz-tools@0.10.5
- jazz-react-native@0.10.5
- jazz-react-native-auth-clerk@0.10.5
- jazz-react-native-media-images@0.10.5
## 1.0.69
### Patch Changes

View File

@@ -1,5 +1,6 @@
import "../global.css";
import { ClerkLoaded, ClerkProvider } from "@clerk/clerk-expo";
import { secureStore } from "@clerk/clerk-expo/secure-store";
import { useFonts } from "expo-font";
import { Slot } from "expo-router";
import * as SplashScreen from "expo-splash-screen";
@@ -33,7 +34,11 @@ export default function RootLayout() {
}
return (
<ClerkProvider tokenCache={tokenCache} publishableKey={publishableKey}>
<ClerkProvider
tokenCache={tokenCache}
publishableKey={publishableKey}
__experimental_resourceCache={secureStore}
>
<ClerkLoaded>
<JazzAndAuth>
<Slot />

View File

@@ -28,7 +28,7 @@ export default function Conversation() {
const { me } = useAccount();
const [chat, setChat] = useState<Chat>();
const [message, setMessage] = useState("");
const loadedChat = useCoState(Chat, chat?.id, [{}]);
const loadedChat = useCoState(Chat, chat?.id, { resolve: { $each: true } });
const navigation = useNavigation();
const [isUploading, setIsUploading] = useState(false);
@@ -71,7 +71,7 @@ export default function Conversation() {
const loadChat = async (chatId: ID<Chat>) => {
try {
const chat = await Chat.load(chatId, me, []);
const chat = await Chat.load(chatId, me);
setChat(chat);
} catch (error) {
console.log("Error loading chat", error);

View File

@@ -1,7 +1,7 @@
{
"name": "chat-rn-clerk",
"main": "index.js",
"version": "1.0.69",
"version": "1.0.87",
"scripts": {
"build": "expo export -p ios",
"start": "expo start",
@@ -9,23 +9,22 @@
"format-and-lint:fix": "biome check . --write",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"test": "jest --watchAll"
"web": "expo start --web"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@azure/core-asynciterator-polyfill": "^1.0.2",
"@bacons/text-decoder": "0.0.0",
"@bam.tech/react-native-image-resizer": "^3.0.11",
"@craftzdog/react-native-buffer": "6.0.5",
"@clerk/clerk-expo": "^2.2.21",
"@expo/vector-icons": "^14.0.2",
"@op-engineering/op-sqlite": "^11.2.12",
"@react-native-community/netinfo": "^11.4.1",
"@react-navigation/native": "^7.0.13",
"@react-navigation/native-stack": "^7.1.14",
"base-64": "^1.0.0",
"buffer": "^6.0.3",
"clsx": "^2.0.0",
"expo": "^52.0.0",
"expo-build-properties": "~0.13.1",
@@ -51,18 +50,14 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-native": "~0.76.3",
"react-native-fetch-api": "^3.0.0",
"react-native-gesture-handler": "~2.20.2",
"react-native-get-random-values": "^1.11.0",
"react-native-polyfill-globals": "^3.1.0",
"react-native-quick-base64": "^2.1.2",
"react-native-reanimated": "~3.16.3",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "4.1.0",
"react-native-url-polyfill": "^2.0.0",
"react-native-web": "~0.19.13",
"text-encoding": "^0.7.0",
"web-streams-polyfill": "^3.2.1"
"readable-stream": "4.7.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",

View File

@@ -1,8 +1,17 @@
import "react-native-polyfill-globals/auto";
import "@azure/core-asynciterator-polyfill";
import { Buffer } from "buffer";
import { polyfillGlobal } from "react-native/Libraries/Utilities/PolyfillFunctions";
import { ReadableStream } from "web-streams-polyfill/ponyfill/es6";
/* eslint-disable import/order */
// @ts-expect-error - @types/react-native doesn't cover this file
import { polyfillGlobal } from "react-native/Libraries/Utilities/PolyfillFunctions";
import { Buffer } from "@craftzdog/react-native-buffer";
polyfillGlobal("Buffer", () => Buffer);
// @ts-expect-error - @types/readable-stream doesn't have ReadableStream type
import { ReadableStream } from "readable-stream";
polyfillGlobal("ReadableStream", () => ReadableStream);
import "@azure/core-asynciterator-polyfill";
import "@bacons/text-decoder/install";
import "react-native-get-random-values";

View File

@@ -12,7 +12,6 @@ export function JazzAndAuth({ children }: PropsWithChildren) {
storage="sqlite"
sync={{
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
when: "signedUp", // This makes the app work in local mode when the user is not authenticated
}}
>
{children}

View File

@@ -1,5 +1,144 @@
# chat-rn
## 1.0.83
### Patch Changes
- Updated dependencies [e7c85b7]
- jazz-react-native@0.11.6
- jazz-tools@0.11.6
## 1.0.82
### Patch Changes
- jazz-react-native@0.11.5
- jazz-tools@0.11.5
## 1.0.81
### Patch Changes
- Updated dependencies [57a3dbe]
- Updated dependencies [a717754]
- Updated dependencies [a91f343]
- jazz-tools@0.11.4
- jazz-react-native@0.11.4
## 1.0.80
### Patch Changes
- jazz-react-native@0.11.3
- jazz-tools@0.11.3
## 1.0.79
### Patch Changes
- Updated dependencies [6892dc6]
- jazz-tools@0.11.2
- jazz-react-native@0.11.2
## 1.0.78
### Patch Changes
- jazz-react-native@0.11.1
## 1.0.77
### Patch Changes
- Updated dependencies [6a96d8b]
- Updated dependencies [a35249a]
- Updated dependencies [b9d194a]
- Updated dependencies [a4713df]
- Updated dependencies [34cbdc3]
- Updated dependencies [f039e8f]
- Updated dependencies [e22de9f]
- jazz-tools@0.11.0
- jazz-react-native@0.11.0
## 1.0.76
### Patch Changes
- Updated dependencies [2f99de0]
- jazz-tools@0.10.15
- jazz-react-native@0.10.15
## 1.0.75
### Patch Changes
- Updated dependencies [75211e3]
- jazz-tools@0.10.14
- jazz-react-native@0.10.14
## 1.0.74
### Patch Changes
- Updated dependencies [07feedd]
- jazz-tools@0.10.13
- jazz-react-native@0.10.13
## 1.0.73
### Patch Changes
- Updated dependencies [4612e05]
- jazz-tools@0.10.12
- jazz-react-native@0.10.12
## 1.0.72
### Patch Changes
- Updated dependencies [5a54e4a]
- jazz-react-native@0.10.11
## 1.0.71
### Patch Changes
- Updated dependencies [3405d8f]
- jazz-react-native@0.10.10
## 1.0.70
### Patch Changes
- Updated dependencies [2fb6428]
- jazz-tools@0.10.8
- jazz-react-native@0.10.8
## 1.0.69
### Patch Changes
- Updated dependencies [1136d9b]
- Updated dependencies [0eed228]
- jazz-react-native@0.10.7
- jazz-tools@0.10.7
## 1.0.68
### Patch Changes
- Updated dependencies [ada802b]
- jazz-tools@0.10.6
- jazz-react-native@0.10.6
## 1.0.67
### Patch Changes
- Updated dependencies [59ff77e]
- jazz-tools@0.10.5
- jazz-react-native@0.10.5
## 1.0.66
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "chat-rn",
"version": "1.0.66",
"version": "1.0.83",
"main": "index.js",
"scripts": {
"build": "expo export -p ios",
@@ -13,17 +13,17 @@
},
"dependencies": {
"@azure/core-asynciterator-polyfill": "^1.0.2",
"@bacons/text-decoder": "0.0.0",
"@craftzdog/react-native-buffer": "6.0.5",
"@op-engineering/op-sqlite": "^11.2.12",
"@react-native-community/netinfo": "^11.4.1",
"@react-navigation/native": "^7.0.13",
"@react-navigation/native-stack": "^7.1.14",
"base-64": "^1.0.0",
"clsx": "^2.0.0",
"expo": "^52.0.0",
"expo-build-properties": "~0.13.1",
"expo-clipboard": "~7.0.0",
"expo-constants": "~17.0.3",
"expo-crypto": "~14.0.1",
"expo-dev-client": "~5.0.5",
"expo-linking": "~7.0.3",
"expo-secure-store": "~14.0.0",
@@ -34,14 +34,11 @@
"nativewind": "^4.1.21",
"react": "^18.3.1",
"react-native": "~0.76.3",
"react-native-fetch-api": "^3.0.0",
"react-native-get-random-values": "^1.11.0",
"react-native-polyfill-globals": "^3.1.0",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "4.1.0",
"react-native-url-polyfill": "^2.0.0",
"text-encoding": "^0.7.0",
"web-streams-polyfill": "^3.2.1"
"readable-stream": "4.7.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",

View File

@@ -1,6 +1,17 @@
import "react-native-polyfill-globals/auto";
import "@azure/core-asynciterator-polyfill";
import { polyfillGlobal } from "react-native/Libraries/Utilities/PolyfillFunctions";
import { ReadableStream } from "web-streams-polyfill/ponyfill/es6";
/* eslint-disable import/order */
// @ts-expect-error - @types/react-native doesn't cover this file
import { polyfillGlobal } from "react-native/Libraries/Utilities/PolyfillFunctions";
import { Buffer } from "@craftzdog/react-native-buffer";
polyfillGlobal("Buffer", () => Buffer);
// @ts-expect-error - @types/readable-stream doesn't have ReadableStream type
import { ReadableStream } from "readable-stream";
polyfillGlobal("ReadableStream", () => ReadableStream);
import "@azure/core-asynciterator-polyfill";
import "@bacons/text-decoder/install";
import "react-native-get-random-values";

View File

@@ -20,7 +20,7 @@ import { Chat, Message } from "./schema";
export default function ChatScreen({ navigation }: { navigation: any }) {
const { me, logOut } = useAccount();
const [chatId, setChatId] = useState<ID<Chat>>();
const loadedChat = useCoState(Chat, chatId, [{}]);
const loadedChat = useCoState(Chat, chatId, { resolve: { $each: true } });
const [message, setMessage] = useState("");
const profile = useCoState(Profile, me._refs.profile?.id, {});

View File

@@ -25,11 +25,8 @@ appId: com.jazz.chatrn
- assertVisible: "Logout"
# send a message
- runFlow:
label: "Erase existing message"
file: erase_text.yml
env:
id: "message-input"
- tapOn:
id: "message-input"
- inputText: "bro, low key, it do be like that tho"
- tapOn:
id: "send-button"
@@ -45,3 +42,9 @@ appId: com.jazz.chatrn
# logout
- tapOn: "Logout"
- assertVisible: "Anonymous user"
# This doesn't work on CI, maybe because Android has a different alert dialog
# - tapOn: "Join chat"
# - inputText: "co_zFs6KFyhxPw4xtw83tcEMzeHUNv" # Use a static id because maestro doesn't have access to the system clipboard
# - pressKey: "enter"
# - assertVisible: "boorad"
# - assertVisible: "bro, low key, it do be like that tho"

View File

@@ -6,8 +6,10 @@
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
./gradlew installRelease >> ~/output/android-install.log 2>&1
cd ..
# run the e2e tests

View File

@@ -1,5 +1,149 @@
# chat-vue
## 0.0.68
### Patch Changes
- Updated dependencies [e7c85b7]
- jazz-tools@0.11.6
- jazz-vue@0.11.6
- jazz-browser@0.11.6
## 0.0.67
### Patch Changes
- jazz-browser@0.11.5
- jazz-tools@0.11.5
- jazz-vue@0.11.5
## 0.0.66
### Patch Changes
- Updated dependencies [57a3dbe]
- Updated dependencies [a717754]
- Updated dependencies [a91f343]
- jazz-tools@0.11.4
- jazz-browser@0.11.4
- jazz-vue@0.11.4
## 0.0.65
### Patch Changes
- jazz-browser@0.11.3
- jazz-tools@0.11.3
- jazz-vue@0.11.3
## 0.0.64
### Patch Changes
- Updated dependencies [6892dc6]
- jazz-tools@0.11.2
- jazz-browser@0.11.2
- jazz-vue@0.11.2
## 0.0.63
### Patch Changes
- Updated dependencies [6a96d8b]
- Updated dependencies [a35249a]
- Updated dependencies [b9d194a]
- Updated dependencies [a4713df]
- Updated dependencies [34cbdc3]
- Updated dependencies [18428ea]
- Updated dependencies [f039e8f]
- Updated dependencies [e22de9f]
- jazz-tools@0.11.0
- jazz-browser@0.11.0
- jazz-vue@0.11.0
## 0.0.62
### Patch Changes
- Updated dependencies [2f99de0]
- jazz-tools@0.10.15
- jazz-browser@0.10.15
- jazz-vue@0.10.15
## 0.0.61
### Patch Changes
- Updated dependencies [75211e3]
- jazz-tools@0.10.14
- jazz-browser@0.10.14
- jazz-vue@0.10.14
## 0.0.60
### Patch Changes
- Updated dependencies [07feedd]
- jazz-tools@0.10.13
- jazz-browser@0.10.13
- jazz-vue@0.10.13
## 0.0.59
### Patch Changes
- Updated dependencies [4612e05]
- jazz-tools@0.10.12
- jazz-vue@0.10.12
- jazz-browser@0.10.12
## 0.0.58
### Patch Changes
- Updated dependencies [834203f]
- jazz-browser@0.10.9
- jazz-vue@0.10.9
## 0.0.57
### Patch Changes
- Updated dependencies [1e87fc7]
- Updated dependencies [2fb6428]
- jazz-browser@0.10.8
- jazz-tools@0.10.8
- jazz-vue@0.10.8
## 0.0.56
### Patch Changes
- Updated dependencies [1136d9b]
- Updated dependencies [bf76d79]
- Updated dependencies [0eed228]
- jazz-browser@0.10.7
- jazz-tools@0.10.7
- jazz-vue@0.10.7
## 0.0.55
### Patch Changes
- Updated dependencies [ada802b]
- jazz-tools@0.10.6
- jazz-browser@0.10.6
- jazz-vue@0.10.6
## 0.0.54
### Patch Changes
- Updated dependencies [59ff77e]
- jazz-tools@0.10.5
- jazz-browser@0.10.5
- jazz-vue@0.10.5
## 0.0.53
### Patch Changes

View File

@@ -11,12 +11,12 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npx create-jazz-app@latest --example chat-vue --project-name chat-vue
npx create-jazz-app@latest chat-vue-app --example chat-vue
```
Go to the new project directory.
```bash
cd chat-vue
cd chat-vue-app
```
Run the dev server.

View File

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

View File

@@ -49,7 +49,7 @@ export default defineComponent({
},
},
setup(props) {
const chat = useCoState(Chat, props.chatId, [{}]);
const chat = useCoState(Chat, props.chatId, { resolve: { $each: true } });
const showNLastMessages = ref(30);
const displayedMessages = computed(() => {

View File

@@ -1,5 +1,158 @@
# jazz-example-chat
## 0.0.165
### Patch Changes
- Updated dependencies [e7c85b7]
- Updated dependencies [09f0a98]
- Updated dependencies [11da4d1]
- Updated dependencies [8ed144e]
- jazz-react@0.11.6
- jazz-tools@0.11.6
- jazz-inspector@0.11.6
- jazz-browser-media-images@0.11.6
## 0.0.164
### Patch Changes
- jazz-react@0.11.5
- jazz-tools@0.11.5
- jazz-browser-media-images@0.11.5
## 0.0.163
### Patch Changes
- 2074e45: In the chat app example, show a "Message not readable" placeholder, if messages from a chat list are not readable by the user.
- Updated dependencies [57a3dbe]
- Updated dependencies [a717754]
- Updated dependencies [a91f343]
- jazz-tools@0.11.4
- jazz-browser-media-images@0.11.4
- jazz-react@0.11.4
## 0.0.162
### Patch Changes
- jazz-react@0.11.3
- jazz-tools@0.11.3
- jazz-browser-media-images@0.11.3
## 0.0.161
### Patch Changes
- Updated dependencies [6892dc6]
- jazz-tools@0.11.2
- jazz-react@0.11.2
- jazz-browser-media-images@0.11.2
## 0.0.160
### Patch Changes
- jazz-react@0.11.1
## 0.0.159
### Patch Changes
- Updated dependencies [6a96d8b]
- Updated dependencies [a35249a]
- Updated dependencies [b9d194a]
- Updated dependencies [a4713df]
- Updated dependencies [34cbdc3]
- Updated dependencies [f039e8f]
- Updated dependencies [e22de9f]
- jazz-tools@0.11.0
- jazz-browser-media-images@0.11.0
- jazz-react@0.11.0
## 0.0.158
### Patch Changes
- Updated dependencies [2f99de0]
- jazz-tools@0.10.15
- jazz-browser-media-images@0.10.15
- jazz-react@0.10.15
## 0.0.157
### Patch Changes
- Updated dependencies [75211e3]
- jazz-tools@0.10.14
- jazz-react@0.10.14
- jazz-browser-media-images@0.10.14
## 0.0.156
### Patch Changes
- Updated dependencies [07feedd]
- jazz-tools@0.10.13
- jazz-browser-media-images@0.10.13
- jazz-react@0.10.13
## 0.0.155
### Patch Changes
- Updated dependencies [4612e05]
- jazz-tools@0.10.12
- jazz-react@0.10.12
- jazz-browser-media-images@0.10.12
## 0.0.154
### Patch Changes
- jazz-browser-media-images@0.10.9
- jazz-react@0.10.9
## 0.0.153
### Patch Changes
- Updated dependencies [2fb6428]
- jazz-tools@0.10.8
- jazz-react@0.10.8
- jazz-browser-media-images@0.10.8
## 0.0.152
### Patch Changes
- Updated dependencies [1136d9b]
- Updated dependencies [0eed228]
- jazz-react@0.10.7
- jazz-tools@0.10.7
- jazz-browser-media-images@0.10.7
## 0.0.151
### Patch Changes
- Updated dependencies [1d71ca1]
- Updated dependencies [ada802b]
- hash-slash@0.2.2
- jazz-react@0.10.6
- jazz-tools@0.10.6
- jazz-browser-media-images@0.10.6
## 0.0.150
### Patch Changes
- Updated dependencies [59ff77e]
- jazz-tools@0.10.5
- jazz-browser-media-images@0.10.5
- jazz-react@0.10.5
## 0.0.149
### Patch Changes

View File

@@ -13,12 +13,12 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npx create-jazz-app@latest --example chat --project-name chat
npx create-jazz-app@latest chat-app --example chat
```
Go to the new project directory.
```bash
cd chat
cd chat-app
```
Run the dev server.

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-chat",
"private": true,
"version": "0.0.149",
"version": "0.0.165",
"type": "module",
"scripts": {
"dev": "vite",
@@ -9,13 +9,14 @@
"format-and-lint": "biome check .",
"format-and-lint:fix": "biome check . --write",
"preview": "vite preview",
"test": "playwright test",
"test:ui": "playwright test --ui"
"test:e2e": "playwright test",
"test:e2e:ui": "playwright test --ui"
},
"dependencies": {
"clsx": "^2.0.0",
"hash-slash": "workspace:*",
"jazz-browser-media-images": "workspace:*",
"jazz-inspector": "workspace:*",
"jazz-react": "workspace:*",
"jazz-tools": "workspace:*",
"lucide-react": "^0.274.0",

View File

@@ -1,6 +1,7 @@
import { apiKey } from "@/apiKey.ts";
import { getRandomUsername, inIframe, onChatLoad } from "@/util.ts";
import { useIframeHashRouter } from "hash-slash";
import { JazzInspector } from "jazz-inspector";
import { JazzProvider, useAccount } from "jazz-react";
import { Group, ID } from "jazz-tools";
import { StrictMode } from "react";
@@ -61,6 +62,7 @@ createRoot(document.getElementById("root")!).render(
defaultProfileName={defaultProfileName}
>
<App />
<JazzInspector />
</JazzProvider>
</StrictMode>
</ThemeProvider>,

View File

@@ -1,6 +1,6 @@
import { createImage } from "jazz-browser-media-images";
import { useCoState } from "jazz-react";
import { ID } from "jazz-tools";
import { useAccount, useCoState } from "jazz-react";
import { Account, ID } from "jazz-tools";
import { useState } from "react";
import { Chat, Message } from "./schema.ts";
import {
@@ -17,7 +17,8 @@ import {
} from "./ui.tsx";
export function ChatScreen(props: { chatID: ID<Chat> }) {
const chat = useCoState(Chat, props.chatID, [{}]);
const chat = useCoState(Chat, props.chatID, { resolve: { $each: true } });
const account = useAccount();
const [showNLastMessages, setShowNLastMessages] = useState(30);
if (!chat)
@@ -47,7 +48,7 @@ export function ChatScreen(props: { chatID: ID<Chat> }) {
chat
.slice(-showNLastMessages)
.reverse() // this plus flex-col-reverse on ChatBody gives us scroll-to-bottom behavior
.map((msg) => <ChatBubble msg={msg} key={msg.id} />)
.map((msg) => <ChatBubble me={account.me} msg={msg} key={msg.id} />)
) : (
<EmptyChatMessage />
)}
@@ -74,7 +75,20 @@ export function ChatScreen(props: { chatID: ID<Chat> }) {
);
}
function ChatBubble(props: { msg: Message }) {
function ChatBubble(props: { me: Account; msg: Message }) {
if (!props.me.canRead(props.msg)) {
return (
<BubbleContainer fromMe={false}>
<BubbleBody fromMe={false}>
<BubbleText
text="Message not readable"
className="text-gray-500 italic"
/>
</BubbleBody>
</BubbleContainer>
);
}
const lastEdit = props.msg._edits.text;
const fromMe = lastEdit.by?.isMe;
const { text, image } = props.msg;

View File

@@ -70,8 +70,12 @@ export function BubbleBody(props: {
);
}
export function BubbleText(props: { text: string }) {
return <p className="px-2 leading-relaxed">{props.text}</p>;
export function BubbleText(props: { text: string; className?: string }) {
return (
<p className={clsx("px-2 leading-relaxed", props.className)}>
{props.text}
</p>
);
}
export function BubbleImage(props: { image: ImageDefinition }) {

View File

@@ -1,5 +1,154 @@
# minimal-auth-clerk
## 0.0.64
### Patch Changes
- 1bfa9bb: Removed when="singedUp" from examples apps' Jazz providers. This is a really niche use-case option and can lead to broken-feeling experiences when anonymous users try to load something.
- Updated dependencies [e7c85b7]
- jazz-react@0.11.6
- jazz-tools@0.11.6
- jazz-react-auth-clerk@0.11.6
## 0.0.63
### Patch Changes
- jazz-react@0.11.5
- jazz-react-auth-clerk@0.11.5
- jazz-tools@0.11.5
## 0.0.62
### Patch Changes
- Updated dependencies [57a3dbe]
- Updated dependencies [a717754]
- Updated dependencies [a91f343]
- jazz-tools@0.11.4
- jazz-react@0.11.4
- jazz-react-auth-clerk@0.11.4
## 0.0.61
### Patch Changes
- jazz-react@0.11.3
- jazz-react-auth-clerk@0.11.3
- jazz-tools@0.11.3
## 0.0.60
### Patch Changes
- Updated dependencies [6892dc6]
- jazz-tools@0.11.2
- jazz-react@0.11.2
- jazz-react-auth-clerk@0.11.2
## 0.0.59
### Patch Changes
- jazz-react@0.11.1
- jazz-react-auth-clerk@0.11.1
## 0.0.58
### Patch Changes
- Updated dependencies [6a96d8b]
- Updated dependencies [a35249a]
- Updated dependencies [b9d194a]
- Updated dependencies [a4713df]
- Updated dependencies [34cbdc3]
- Updated dependencies [f039e8f]
- Updated dependencies [e22de9f]
- jazz-tools@0.11.0
- jazz-react-auth-clerk@0.11.0
- jazz-react@0.11.0
## 0.0.57
### Patch Changes
- Updated dependencies [2f99de0]
- jazz-tools@0.10.15
- jazz-react@0.10.15
- jazz-react-auth-clerk@0.10.15
## 0.0.56
### Patch Changes
- Updated dependencies [75211e3]
- jazz-tools@0.10.14
- jazz-react@0.10.14
- jazz-react-auth-clerk@0.10.14
## 0.0.55
### Patch Changes
- Updated dependencies [07feedd]
- jazz-tools@0.10.13
- jazz-react@0.10.13
- jazz-react-auth-clerk@0.10.13
## 0.0.54
### Patch Changes
- Updated dependencies [4612e05]
- jazz-tools@0.10.12
- jazz-react@0.10.12
- jazz-react-auth-clerk@0.10.12
## 0.0.53
### Patch Changes
- jazz-react@0.10.9
- jazz-react-auth-clerk@0.10.9
## 0.0.52
### Patch Changes
- Updated dependencies [2fb6428]
- jazz-tools@0.10.8
- jazz-react@0.10.8
- jazz-react-auth-clerk@0.10.8
## 0.0.51
### Patch Changes
- Updated dependencies [1136d9b]
- Updated dependencies [0eed228]
- jazz-react-auth-clerk@0.10.7
- jazz-react@0.10.7
- jazz-tools@0.10.7
## 0.0.50
### Patch Changes
- Updated dependencies [1d71ca1]
- Updated dependencies [ada802b]
- jazz-react-auth-clerk@0.10.6
- jazz-react@0.10.6
- jazz-tools@0.10.6
## 0.0.49
### Patch Changes
- Updated dependencies [59ff77e]
- jazz-tools@0.10.5
- jazz-react@0.10.5
- jazz-react-auth-clerk@0.10.5
## 0.0.48
### Patch Changes

View File

@@ -15,12 +15,12 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npx create-jazz-app@latest --example clerk --project-name clerk
npx create-jazz-app@latest clerk-app --example clerk
```
Go to the new project directory.
```bash
cd clerk
cd clerk-app
```
Run the dev server.

View File

@@ -1,7 +1,7 @@
{
"name": "clerk",
"private": true,
"version": "0.0.48",
"version": "0.0.64",
"type": "module",
"scripts": {
"dev": "vite",
@@ -13,7 +13,7 @@
"dependencies": {
"@clerk/clerk-react": "^5.4.1",
"jazz-react": "workspace:*",
"jazz-react-auth-clerk": "workspace:0.10.4",
"jazz-react-auth-clerk": "workspace:0.11.6",
"jazz-tools": "workspace:*",
"react": "^18.3.1",
"react-dom": "^18.3.1"

View File

@@ -21,7 +21,6 @@ function JazzProvider({ children }: { children: React.ReactNode }) {
clerk={clerk}
sync={{
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
when: "signedUp", // This makes the app work in local mode when the user is not authenticated
}}
>
{children}

View File

@@ -1,5 +1,131 @@
# file-share-svelte
## 0.0.48
### Patch Changes
- 1bfa9bb: Removed when="singedUp" from examples apps' Jazz providers. This is a really niche use-case option and can lead to broken-feeling experiences when anonymous users try to load something.
- Updated dependencies [e7c85b7]
- jazz-tools@0.11.6
- jazz-svelte@0.11.6
## 0.0.47
### Patch Changes
- jazz-svelte@0.11.5
- jazz-tools@0.11.5
## 0.0.46
### Patch Changes
- Updated dependencies [57a3dbe]
- Updated dependencies [a717754]
- Updated dependencies [a91f343]
- jazz-tools@0.11.4
- jazz-svelte@0.11.4
## 0.0.45
### Patch Changes
- jazz-svelte@0.11.3
- jazz-tools@0.11.3
## 0.0.44
### Patch Changes
- Updated dependencies [6892dc6]
- jazz-tools@0.11.2
- jazz-svelte@0.11.2
## 0.0.43
### Patch Changes
- Updated dependencies [6a96d8b]
- Updated dependencies [a35249a]
- Updated dependencies [b9d194a]
- Updated dependencies [a4713df]
- Updated dependencies [34cbdc3]
- Updated dependencies [f039e8f]
- Updated dependencies [e22de9f]
- jazz-tools@0.11.0
- jazz-svelte@0.11.0
## 0.0.42
### Patch Changes
- Updated dependencies [2f99de0]
- jazz-tools@0.10.15
- jazz-svelte@0.10.15
## 0.0.41
### Patch Changes
- Updated dependencies [75211e3]
- jazz-tools@0.10.14
- jazz-svelte@0.10.14
## 0.0.40
### Patch Changes
- Updated dependencies [07feedd]
- jazz-tools@0.10.13
- jazz-svelte@0.10.13
## 0.0.39
### Patch Changes
- Updated dependencies [4612e05]
- jazz-svelte@0.10.12
- jazz-tools@0.10.12
## 0.0.38
### Patch Changes
- jazz-svelte@0.10.9
## 0.0.37
### Patch Changes
- Updated dependencies [2fb6428]
- jazz-tools@0.10.8
- jazz-svelte@0.10.8
## 0.0.36
### Patch Changes
- Updated dependencies [1136d9b]
- Updated dependencies [0eed228]
- jazz-svelte@0.10.7
- jazz-tools@0.10.7
## 0.0.35
### Patch Changes
- Updated dependencies [ada802b]
- jazz-tools@0.10.6
- jazz-svelte@0.10.6
## 0.0.34
### Patch Changes
- Updated dependencies [59ff77e]
- jazz-tools@0.10.5
- jazz-svelte@0.10.5
## 0.0.33
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "file-share-svelte",
"version": "0.0.33",
"version": "0.0.48",
"private": true,
"type": "module",
"scripts": {
@@ -13,8 +13,8 @@
"lint": "prettier --check . && eslint .",
"format-and-lint": "pnpm run format && pnpm run lint",
"format-and-lint:fix": "pnpm run format --write && pnpm run lint --fix",
"test": "playwright test",
"test:ui": "playwright test --ui"
"test:e2e": "playwright test",
"test:e2e:ui": "playwright test --ui"
},
"devDependencies": {
"@sveltejs/adapter-vercel": "^5.5.0",

View File

@@ -27,7 +27,6 @@
AccountSchema={FileShareAccount}
sync={{
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
when: "signedUp",
}}
>
<PasskeyAuthBasicUI appName="File Share">

28
examples/filestream/.gitignore vendored Normal file
View File

@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
/test-results/
/playwright-report/
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
playwright-report

View File

@@ -0,0 +1,292 @@
# jazz-tailwind-demo-auth-starter
## 0.0.4
### Patch Changes
- Updated dependencies [e7c85b7]
- jazz-react@0.11.6
- jazz-tools@0.11.6
## 0.0.3
### Patch Changes
- jazz-react@0.11.5
- jazz-tools@0.11.5
## 0.0.2
### Patch Changes
- Updated dependencies [57a3dbe]
- Updated dependencies [a717754]
- Updated dependencies [a91f343]
- jazz-tools@0.11.4
- jazz-react@0.11.4
## 0.0.52
### Patch Changes
- Updated dependencies [2f99de0]
- jazz-tools@0.10.15
- jazz-react@0.10.15
## 0.0.51
### Patch Changes
- Updated dependencies [75211e3]
- jazz-tools@0.10.14
- jazz-react@0.10.14
## 0.0.50
### Patch Changes
- Updated dependencies [07feedd]
- jazz-tools@0.10.13
- jazz-react@0.10.13
## 0.0.49
### Patch Changes
- Updated dependencies [4612e05]
- jazz-tools@0.10.12
- jazz-react@0.10.12
## 0.0.48
### Patch Changes
- jazz-react@0.10.9
## 0.0.47
### Patch Changes
- Updated dependencies [2fb6428]
- jazz-tools@0.10.8
- jazz-react@0.10.8
## 0.0.46
### Patch Changes
- Updated dependencies [1136d9b]
- Updated dependencies [0eed228]
- jazz-react@0.10.7
- jazz-tools@0.10.7
## 0.0.45
### Patch Changes
- Updated dependencies [1d71ca1]
- Updated dependencies [ada802b]
- jazz-react@0.10.6
- jazz-tools@0.10.6
## 0.0.44
### Patch Changes
- Updated dependencies [59ff77e]
- jazz-tools@0.10.5
- jazz-react@0.10.5
## 0.0.43
### Patch Changes
- jazz-react@0.10.4
- jazz-tools@0.10.4
## 0.0.42
### Patch Changes
- Updated dependencies [d8582fc]
- jazz-tools@0.10.3
- jazz-react@0.10.3
## 0.0.41
### Patch Changes
- jazz-react@0.10.2
- jazz-tools@0.10.2
## 0.0.40
### Patch Changes
- Updated dependencies [5a63cba]
- jazz-tools@0.10.1
- jazz-react@0.10.1
## 0.0.39
### Patch Changes
- Updated dependencies [498954f]
- Updated dependencies [d42c2aa]
- Updated dependencies [dd03464]
- Updated dependencies [b426342]
- jazz-react@0.10.0
- jazz-tools@0.10.0
## 0.0.38
### Patch Changes
- jazz-react@0.9.23
- jazz-tools@0.9.23
## 0.0.37
### Patch Changes
- jazz-react@0.9.22
## 0.0.36
### Patch Changes
- Updated dependencies [1be017d]
- jazz-tools@0.9.21
- jazz-react@0.9.21
## 0.0.35
### Patch Changes
- Updated dependencies [b01cc1f]
- jazz-tools@0.9.20
- jazz-react@0.9.20
## 0.0.34
### Patch Changes
- jazz-react@0.9.19
- jazz-tools@0.9.19
## 0.0.33
### Patch Changes
- jazz-react@0.9.18
- jazz-tools@0.9.18
## 0.0.32
### Patch Changes
- Updated dependencies [c2ca1fe]
- Updated dependencies [1227047]
- jazz-tools@0.9.17
- jazz-react@0.9.17
## 0.0.31
### Patch Changes
- Updated dependencies [24b3b6a]
- jazz-tools@0.9.16
- jazz-react@0.9.16
## 0.0.30
### Patch Changes
- Updated dependencies [7491711]
- jazz-tools@0.9.15
- jazz-react@0.9.15
## 0.0.29
### Patch Changes
- Updated dependencies [3df93cc]
- jazz-tools@0.9.14
- jazz-react@0.9.14
## 0.0.28
### Patch Changes
- jazz-react@0.9.13
- jazz-tools@0.9.13
## 0.0.27
### Patch Changes
- jazz-react@0.9.12
- jazz-tools@0.9.12
## 0.0.26
### Patch Changes
- jazz-react@0.9.11
- jazz-tools@0.9.11
## 0.0.25
### Patch Changes
- Updated dependencies [5e83864]
- jazz-react@0.9.10
- jazz-tools@0.9.10
## 0.0.24
### Patch Changes
- Updated dependencies [8eb9247]
- jazz-tools@0.9.9
- jazz-react@0.9.9
## 0.0.23
### Patch Changes
- Updated dependencies [d1d773b]
- jazz-tools@0.9.8
- jazz-react@0.9.8
## 0.0.22
### Patch Changes
- jazz-react@0.9.4
## 0.0.21
### Patch Changes
- Updated dependencies [1b71969]
- jazz-react@0.9.1
- jazz-tools@0.9.1
## 0.0.20
### Patch Changes
- Updated dependencies [956a4d1]
- Updated dependencies [8eda792]
- jazz-react@0.9.0
- jazz-tools@0.9.0
## 0.0.19
### Patch Changes
- Updated dependencies [dc62b95]
- Updated dependencies [1de26f8]
- jazz-tools@0.8.51
- jazz-react@0.8.51

View File

@@ -1,4 +1,8 @@
# Onboarding example with Jazz and React
# File upload example with Jazz and React
This is an example of how to upload and render images with Jazz.
Live version: https://file-upload-demo.jazz.tools
## Getting started
@@ -11,12 +15,12 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npx create-jazz-app@latest --example onboarding --project-name onboarding
npx create-jazz-app@latest --example file-upload --project-name file-upload
```
Go to the new project directory.
```bash
cd onboarding
cd file-upload
```
Run the dev server.
@@ -40,7 +44,7 @@ pnpm i && npx turbo build
Go to the example directory.
```bash
cd jazz/examples/onboarding/
cd jazz/examples/file-upload/
```
Start the dev server.
@@ -49,12 +53,14 @@ pnpm dev
```
Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.
## Questions / problems / feedback
If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or open an issue or PR to fix something that seems wrong.
## Configuration: sync server
By default, the example app uses [Jazz Cloud](https://jazz.tools/cloud) (`wss://cloud.jazz.tools`) - so cross-device use, invites and collaboration should just work.
You can also run a local sync server by running `npx cojson-simple-sync` and adding the query param `?sync=ws://localhost:4200` to the URL of the example app (for example: `http://localhost:5173/?peer=ws://localhost:4200`), or by setting the `sync` parameter of the `<JazzProvider>` provider component in [./src/main.tsx](./src/main.tsx).
You can also run a local sync server by running `npx jazz-run sync` and adding the query param `?sync=ws://localhost:4200` to the URL of the example app (for example: `http://localhost:5173/?peer=ws://localhost:4200`), or by setting the `sync` parameter of `JazzProvider` component in [./src/main.tsx](./src/main.tsx).

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en" class="h-full">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Jazz | React + Demo Auth + Tailwind</title>
</head>
<body class="h-full flex flex-col">
<div id="root" class="align-self-center flex-1"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>

View File

@@ -1,34 +1,30 @@
{
"name": "jazz-example-onboarding",
"name": "filestream",
"private": true,
"version": "0.0.50",
"version": "0.0.4",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"format-and-lint": "biome check .",
"format-and-lint:fix": "biome check . --write",
"build": "tsc -b && vite build",
"preview": "vite preview",
"test": "playwright test",
"test:ui": "playwright test --ui",
"sync": "jazz-run sync"
"format-and-lint": "biome check .",
"format-and-lint:fix": "biome check . --write"
},
"dependencies": {
"jazz-browser-media-images": "workspace:*",
"jazz-react": "workspace:*",
"jazz-tools": "workspace:*",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"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",
"autoprefixer": "^10.4.20",
"globals": "^15.11.0",
"is-ci": "^3.0.1",
"jazz-run": "workspace:*",
"postcss": "^8.4.27",
"postcss": "^8.5.3",
"tailwindcss": "^3.4.17",
"typescript": "~5.6.2",
"vite": "^6.0.11"

View File

@@ -0,0 +1,37 @@
import { FileWidget } from "./FileWidget.js";
import { Logo } from "./Logo.tsx";
function App() {
return (
<>
<main className="container mt-16 flex flex-col gap-8">
<Logo />
<FileWidget />
<p className="text-center">
Edit the form above,{" "}
<button
type="button"
onClick={() => window.location.reload()}
className="font-semibold underline"
>
refresh
</button>{" "}
this page, and see your changes persist.
</p>
<p className="text-center my-16">
Go to{" "}
<a
className="font-semibold underline"
href="https://jazz.tools/docs/react/guide"
>
jazz.tools/docs/react/guide
</a>{" "}
for a full tutorial.
</p>
</main>
</>
);
}
export default App;

View File

@@ -0,0 +1,269 @@
"use client";
import { useAccount } from "jazz-react";
import { FileStream } from "jazz-tools";
import { useRef, useState } from "react";
export function FileWidget() {
const inputRef = useRef<HTMLInputElement>(null);
const dragAndDropElementRef = useRef<HTMLDivElement>(null);
const [isUploading, setIsUploading] = useState(false);
const [progress, setProgress] = useState(0);
const [error, setError] = useState<string | null>(null);
const { me } = useAccount();
async function handleUpload(event: React.FormEvent) {
event.preventDefault();
setError(null);
if (!me?.profile) {
setError("User profile not found");
return;
}
setProgress(0);
const file = inputRef.current?.files?.[0];
if (!file) {
setError("Please select a file");
return;
}
try {
setIsUploading(true);
me.profile.file = await FileStream.createFromBlob(file, {
onProgress: (p) => setProgress(Math.round(p * 100)),
});
} catch (error) {
setError(
error instanceof Error ? error.message : "Failed to upload file",
);
console.error("Error uploading file:", error);
} finally {
setIsUploading(false);
}
}
function handleDelete() {
if (!me?.profile) return;
delete me.profile?.file;
}
async function handleDownload() {
if (!me?.profile) return;
const file = me.profile.file;
if (!file) return;
try {
const blob = file.toBlob();
const url = URL.createObjectURL(blob || new Blob());
const a = document.createElement("a");
a.href = url;
a.download = file.id || "download";
a.click();
URL.revokeObjectURL(url);
} catch (error) {
console.error("Error downloading file:", error);
}
}
function formatFileSize(bytes?: number): string {
if (!bytes) return "0 Bytes";
const k = 1024;
const sizes = ["Bytes", "KB", "MB", "GB"];
const i = Math.floor(Math.log(bytes) / Math.log(k));
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(2))} ${sizes[i]}`;
}
const onDragEnter = (e: React.DragEvent<HTMLDivElement>) => {
e.preventDefault();
e.stopPropagation();
dragAndDropElementRef?.current?.classList.replace(
"border-stone-400",
"border-blue-700",
);
};
const onDragOver = (e: React.DragEvent<HTMLDivElement>) => {
e.preventDefault();
e.stopPropagation();
dragAndDropElementRef?.current?.classList.replace(
"border-stone-400",
"border-blue-700",
);
};
const onDragLeave = (e: React.DragEvent<HTMLDivElement>) => {
e.preventDefault();
e.stopPropagation();
dragAndDropElementRef?.current?.classList.replace(
"border-blue-700",
"border-stone-400",
);
};
const onDrop = async (e: React.DragEvent<HTMLDivElement>) => {
e.preventDefault();
e.stopPropagation();
dragAndDropElementRef?.current?.classList.replace(
"border-blue-700",
"border-stone-400",
);
if (!me?.profile) {
setError("User profile not found");
return;
}
const droppedFiles = e.dataTransfer.files;
if (!droppedFiles || droppedFiles.length === 0) {
return;
}
const file = droppedFiles[0];
setProgress(0);
try {
setIsUploading(true);
me.profile.file = await FileStream.createFromBlob(file, {
onProgress: (p) => setProgress(Math.round(p * 100)),
});
} catch (error) {
setError(
error instanceof Error ? error.message : "Failed to upload file",
);
console.error("Error uploading file:", error);
} finally {
setIsUploading(false);
}
};
if (me?.profile?.file == null) {
return (
<div className="flex flex-col gap-4">
<div
className="flex flex-col border-2 border-dashed border-stone-400 h-48 items-center justify-center bg-stone-100 m-5 rounded-md"
ref={dragAndDropElementRef}
onDragEnter={onDragEnter}
onDragOver={onDragOver}
onDragLeave={onDragLeave}
onDrop={onDrop}
>
<p>Drag & drop your file here</p>
</div>
<form onSubmit={handleUpload} className="flex gap-2">
<input
className="bg-stone-100 py-1.5 px-2 text-sm rounded-md w-4/5"
ref={inputRef}
type="file"
accept="file"
onChange={() => setError(null)}
disabled={isUploading}
/>
<button
type="submit"
className="bg-stone-100 py-1.5 px-3 text-sm rounded-md disabled:opacity-50"
disabled={isUploading}
>
{isUploading ? `Uploading...` : "Upload file"}
</button>
</form>
{error && (
<div className="text-red-800 text-sm pl-4" role="alert">
{error}
</div>
)}
{isUploading && (
<div className="flex gap-2 items-center">
<div className="py-1.5 px-3 text-sm">Progress: {progress}%</div>
<div className="h-2 bg-stone-200 rounded-full flex-1">
<div
className="h-full bg-blue-500 rounded-full transition-all duration-300"
style={{ width: `${progress}%` }}
/>
</div>
</div>
)}
</div>
);
}
const fileData = me?.profile?.file?.getChunks();
const mimeType = fileData?.mimeType || "unknown";
return (
<div className="gap-2">
<div className="p-4">
<div className="space-y-2">
<div className="flex justify-between">
<span className="font-bold">File name</span>
<span>{fileData?.fileName}</span>
</div>
<div className="flex justify-between">
<span className="font-bold">Type</span>
<span>{mimeType}</span>
</div>
<div className="flex justify-between">
<span className="font-bold">Size</span>
<span>{formatFileSize(fileData?.totalSizeBytes)}</span>
</div>
</div>
</div>
<div className="flex gap-2 justify-end">
<button
className="bg-stone-100 py-1.5 px-3 text-sm rounded-md"
onClick={handleDelete}
>
Delete file
</button>
<button
className="bg-stone-100 py-1.5 px-3 text-sm rounded-md"
onClick={handleDownload}
>
Download file
</button>
</div>
<div className="w-full justify-center pt-8">
{fileData?.mimeType?.startsWith("image/") && (
<div className="flex justify-center">
<img
src={URL.createObjectURL(
me?.profile?.file?.toBlob() || new Blob(),
)}
alt="File preview"
className="max-w-xs mb-4"
/>
</div>
)}
{fileData?.mimeType?.startsWith("audio/") && (
<div className="flex justify-center">
<audio
src={URL.createObjectURL(
me?.profile?.file?.toBlob() || new Blob(),
)}
controls
className="w-full mb-4"
/>
</div>
)}
{fileData?.mimeType?.startsWith("video/") && (
<div className="flex justify-center">
<video
src={URL.createObjectURL(
me?.profile?.file?.toBlob() || new Blob(),
)}
controls
className="w-full mb-4"
/>
</div>
)}
</div>
</div>
);
}

View File

@@ -0,0 +1,21 @@
export function Logo() {
return (
<svg
viewBox="0 0 386 146"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="text-black w-48 mx-auto"
>
<path
d="M176.725 33.865H188.275V22.7H176.725V33.865ZM164.9 129.4H172.875C182.72 129.4 188.275 123.9 188.275 114.22V43.6H176.725V109.545C176.725 115.65 173.975 118.51 167.925 118.51H164.9V129.4ZM245.298 53.28C241.613 45.47 233.363 41.95 222.748 41.95C208.998 41.95 200.748 48.44 197.888 58.615L208.613 61.915C210.648 55.315 216.368 52.565 222.638 52.565C231.933 52.565 235.673 56.415 236.058 64.61C226.433 65.93 216.643 67.195 209.768 69.23C200.583 72.145 195.743 77.865 195.743 86.83C195.743 96.51 202.673 104.65 215.818 104.65C225.443 104.65 232.318 101.35 237.213 94.365V103H247.388V66.425C247.388 61.475 247.168 57.185 245.298 53.28ZM217.853 95.245C210.483 95.245 207.128 91.34 207.128 86.72C207.128 82.045 210.593 79.515 215.323 77.92C220.328 76.435 226.983 75.5 235.948 74.18C235.893 76.93 235.673 80.725 234.738 83.475C233.418 89.25 227.643 95.245 217.853 95.245ZM251.22 103H301.545V92.715H269.535L303.195 45.47V43.6H254.3V53.885H284.935L251.22 101.185V103ZM304.815 103H355.14V92.715H323.13L356.79 45.47V43.6H307.895V53.885H338.53L304.815 101.185V103Z"
fill="currentColor"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M136.179 44.8277C136.179 44.8277 136.179 44.8277 136.179 44.8276V21.168C117.931 28.5527 97.9854 32.6192 77.0897 32.6192C65.1466 32.6192 53.5138 31.2908 42.331 28.7737V51.4076C42.331 51.4076 42.331 51.4076 42.331 51.4076V81.1508C41.2955 80.4385 40.1568 79.8458 38.9405 79.3915C36.1732 78.358 33.128 78.0876 30.1902 78.6145C27.2524 79.1414 24.5539 80.4419 22.4358 82.3516C20.3178 84.2613 18.8754 86.6944 18.291 89.3433C17.7066 91.9921 18.0066 94.7377 19.1528 97.2329C20.2991 99.728 22.2403 101.861 24.7308 103.361C27.2214 104.862 30.1495 105.662 33.1448 105.662H33.1455C33.6061 105.662 33.8365 105.662 34.0314 105.659C44.5583 105.449 53.042 96.9656 53.2513 86.4386C53.2534 86.3306 53.2544 86.2116 53.2548 86.0486H53.2552V85.7149L53.2552 85.5521V82.0762L53.2552 53.1993C61.0533 54.2324 69.0092 54.7656 77.0897 54.7656C77.6696 54.7656 78.2489 54.7629 78.8276 54.7574V110.696C77.792 109.983 76.6533 109.391 75.437 108.936C72.6697 107.903 69.6246 107.632 66.6867 108.159C63.7489 108.686 61.0504 109.987 58.9323 111.896C56.8143 113.806 55.3719 116.239 54.7875 118.888C54.2032 121.537 54.5031 124.283 55.6494 126.778C56.7956 129.273 58.7368 131.405 61.2273 132.906C63.7179 134.406 66.646 135.207 69.6414 135.207C70.1024 135.207 70.3329 135.207 70.5279 135.203C81.0548 134.994 89.5385 126.51 89.7478 115.983C89.7517 115.788 89.7517 115.558 89.7517 115.097V111.621L89.7517 54.3266C101.962 53.4768 113.837 51.4075 125.255 48.2397V80.9017C124.219 80.1894 123.081 79.5966 121.864 79.1424C119.097 78.1089 116.052 77.8384 113.114 78.3653C110.176 78.8922 107.478 80.1927 105.36 82.1025C103.242 84.0122 101.799 86.4453 101.215 89.0941C100.631 91.743 100.931 94.4886 102.077 96.9837C103.223 99.4789 105.164 101.612 107.655 103.112C110.145 104.612 113.073 105.413 116.069 105.413C116.53 105.413 116.76 105.413 116.955 105.409C127.482 105.2 135.966 96.7164 136.175 86.1895C136.179 85.9945 136.179 85.764 136.179 85.3029V81.8271L136.179 44.8277Z"
fill="#3313F7"
/>
</svg>
);
}

View File

@@ -0,0 +1 @@
export const apiKey = "filestream-example-jazz@garden.co";

View File

@@ -0,0 +1,29 @@
import { JazzProvider } from "jazz-react";
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import App from "./App.tsx";
import { apiKey } from "./apiKey.ts";
import "./index.css";
import { JazzAccount } from "./schema.ts";
// We use this to identify the app in the passkey auth
export const APPLICATION_NAME = "Jazz File Stream Example";
declare module "jazz-react" {
export interface Register {
Account: JazzAccount;
}
}
createRoot(document.getElementById("root")!).render(
<StrictMode>
<JazzProvider
sync={{
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
}}
AccountSchema={JazzAccount}
>
<App />
</JazzProvider>
</StrictMode>,
);

View File

@@ -0,0 +1,14 @@
import { Account, FileStream, Profile, co } from "jazz-tools";
export class JazzProfile extends Profile {
file = co.ref(FileStream, { optional: true });
}
export class JazzAccount extends Account {
profile = co.ref(JazzProfile);
/** The account migration is run on account creation and on every log-in.
* You can use it to set up the account root and any other initial CoValues you need.
*/
migrate(this: JazzAccount) {}
}

View File

@@ -0,0 +1,23 @@
import type { Config } from "tailwindcss";
const config: Config = {
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
theme: {
extend: {
container: {
center: true,
padding: {
DEFAULT: "0.75rem",
sm: "1rem",
},
screens: {
lg: "600px",
xl: "600px",
},
},
},
},
plugins: [],
} as const;
export default config;

View File

@@ -0,0 +1,9 @@
import { expect, test } from "@playwright/test";
test("home page loads", async ({ page }) => {
await page.goto("/");
await expect(page.getByText("Welcome!")).toBeVisible();
await page.getByLabel("Name").fill("Bob");
await expect(page.getByText("Welcome, Bob!")).toBeVisible();
});

View File

@@ -1,15 +1,16 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2023", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",
@@ -17,11 +18,7 @@
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"baseUrl": "./",
"paths": {
"@/*": ["./src/*"]
}
"noUncheckedSideEffectImports": true
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
"include": ["src"]
}

View File

@@ -0,0 +1,7 @@
{
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
]
}

View File

@@ -0,0 +1,22 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"target": "ES2022",
"lib": ["ES2023"],
"module": "ESNext",
"skipLibCheck": true,
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["vite.config.ts"]
}

View File

@@ -0,0 +1,8 @@
{
"build": {
"env": {
"APP_NAME": "filestream"
}
},
"ignoreCommand": "node ../../ignore-vercel-build.js"
}

View File

@@ -0,0 +1,7 @@
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
});

View File

@@ -1,5 +1,158 @@
# form
## 0.1.6
### Patch Changes
- Updated dependencies [e7c85b7]
- Updated dependencies [8ed144e]
- jazz-react@0.11.6
- jazz-tools@0.11.6
- jazz-browser-media-images@0.11.6
## 0.1.5
### Patch Changes
- jazz-react@0.11.5
- jazz-tools@0.11.5
- jazz-browser-media-images@0.11.5
## 0.1.4
### Patch Changes
- Updated dependencies [57a3dbe]
- Updated dependencies [a717754]
- Updated dependencies [a91f343]
- jazz-tools@0.11.4
- jazz-browser-media-images@0.11.4
- jazz-react@0.11.4
## 0.1.3
### Patch Changes
- jazz-react@0.11.3
- jazz-tools@0.11.3
- jazz-browser-media-images@0.11.3
## 0.1.2
### Patch Changes
- Updated dependencies [6892dc6]
- jazz-tools@0.11.2
- jazz-react@0.11.2
- jazz-browser-media-images@0.11.2
## 0.1.1
### Patch Changes
- jazz-react@0.11.1
## 0.1.0
### Minor Changes
- 18428ea: PasskeyAuth: Sets `profile.name` only if a non-empty username is passed to `signUp`
### Patch Changes
- Updated dependencies [6a96d8b]
- Updated dependencies [a35249a]
- Updated dependencies [b9d194a]
- Updated dependencies [a4713df]
- Updated dependencies [34cbdc3]
- Updated dependencies [f039e8f]
- Updated dependencies [e22de9f]
- jazz-tools@0.11.0
- jazz-browser-media-images@0.11.0
- jazz-react@0.11.0
## 0.0.53
### Patch Changes
- Updated dependencies [2f99de0]
- jazz-tools@0.10.15
- jazz-browser-media-images@0.10.15
- jazz-react@0.10.15
## 0.0.52
### Patch Changes
- Updated dependencies [75211e3]
- jazz-tools@0.10.14
- jazz-react@0.10.14
- jazz-browser-media-images@0.10.14
## 0.0.51
### Patch Changes
- Updated dependencies [07feedd]
- jazz-tools@0.10.13
- jazz-browser-media-images@0.10.13
- jazz-react@0.10.13
## 0.0.50
### Patch Changes
- Updated dependencies [4612e05]
- jazz-tools@0.10.12
- jazz-react@0.10.12
- jazz-browser-media-images@0.10.12
## 0.0.49
### Patch Changes
- jazz-browser-media-images@0.10.9
- jazz-react@0.10.9
## 0.0.48
### Patch Changes
- Updated dependencies [2fb6428]
- jazz-tools@0.10.8
- jazz-react@0.10.8
- jazz-browser-media-images@0.10.8
## 0.0.47
### Patch Changes
- Updated dependencies [1136d9b]
- Updated dependencies [0eed228]
- jazz-react@0.10.7
- jazz-tools@0.10.7
- jazz-browser-media-images@0.10.7
## 0.0.46
### Patch Changes
- Updated dependencies [1d71ca1]
- Updated dependencies [ada802b]
- hash-slash@0.2.2
- jazz-react@0.10.6
- jazz-tools@0.10.6
- jazz-browser-media-images@0.10.6
## 0.0.45
### Patch Changes
- Updated dependencies [59ff77e]
- jazz-tools@0.10.5
- jazz-browser-media-images@0.10.5
- jazz-react@0.10.5
## 0.0.44
### Patch Changes

View File

@@ -28,12 +28,12 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npx create-jazz-app@latest --example form --project-name form
npx create-jazz-app@latest form-app --example form
```
Go to the new project directory.
```bash
cd form
cd form-app
```
Run the dev server.

View File

@@ -1,7 +1,7 @@
{
"name": "form",
"private": true,
"version": "0.0.44",
"version": "0.1.6",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,4 @@
import { useIframeHashRouter } from "hash-slash";
import { useAccount } from "jazz-react";
import { ID } from "jazz-tools";
import { CreateOrder } from "./CreateOrder.tsx";
import { EditOrder } from "./EditOrder.tsx";
@@ -7,25 +6,10 @@ import { Orders } from "./Orders.tsx";
import { BubbleTeaOrder } from "./schema.ts";
function App() {
const { me, logOut } = useAccount();
const router = useIframeHashRouter();
return (
<>
<header>
<nav className="container py-2 border-b flex items-center justify-between">
<span>
You're logged in as <strong>{me?.profile?.name}</strong>
</span>
<button
className="bg-stone-100 py-1.5 px-3 text-sm rounded-md dark:bg-stone-900 dark:text-white"
onClick={() => logOut()}
>
Log out
</button>
</nav>
</header>
<main className="container py-8 space-y-8">
{router.route({
"/": () => <Orders />,

View File

@@ -12,7 +12,9 @@ import {
} from "./schema.ts";
export function CreateOrder() {
const { me } = useAccount({ root: { draft: {}, orders: [] } });
const { me } = useAccount({
resolve: { root: { draft: true, orders: true } },
});
const router = useIframeHashRouter();
const [errors, setErrors] = useState<string[]>([]);
@@ -60,7 +62,7 @@ function CreateOrderForm({
onSave: (draft: DraftBubbleTeaOrder) => void;
}) {
const draft = useCoState(DraftBubbleTeaOrder, id, {
addOns: [],
resolve: { addOns: true },
});
if (!draft) return;

View File

@@ -2,7 +2,7 @@ import { useAccount } from "jazz-react";
export function DraftIndicator() {
const { me } = useAccount({
root: { draft: {} },
resolve: { root: { draft: true } },
});
if (me?.root.draft?.hasChanges) {

View File

@@ -6,7 +6,7 @@ import { OrderThumbnail } from "./OrderThumbnail.tsx";
import { BubbleTeaOrder } from "./schema.ts";
export function EditOrder(props: { id: ID<BubbleTeaOrder> }) {
const order = useCoState(BubbleTeaOrder, props.id, []);
const order = useCoState(BubbleTeaOrder, props.id);
if (!order) return;

View File

@@ -4,7 +4,7 @@ import { OrderThumbnail } from "./OrderThumbnail.tsx";
export function Orders() {
const { me } = useAccount({
root: { orders: [] },
resolve: { root: { orders: true } },
});
return (

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
{"root":["./src/app.tsx","./src/createorder.tsx","./src/draftindicator.tsx","./src/editorder.tsx","./src/errors.tsx","./src/linktohome.tsx","./src/orderform.tsx","./src/orderthumbnail.tsx","./src/orders.tsx","./src/main.tsx","./src/schema.ts","./src/vite-env.d.ts"],"version":"5.6.3"}

View File

@@ -1,5 +1,153 @@
# image-upload
## 0.0.62
### Patch Changes
- Updated dependencies [e7c85b7]
- Updated dependencies [8ed144e]
- jazz-react@0.11.6
- jazz-tools@0.11.6
- jazz-browser-media-images@0.11.6
## 0.0.61
### Patch Changes
- jazz-react@0.11.5
- jazz-tools@0.11.5
- jazz-browser-media-images@0.11.5
## 0.0.60
### Patch Changes
- Updated dependencies [57a3dbe]
- Updated dependencies [a717754]
- Updated dependencies [a91f343]
- jazz-tools@0.11.4
- jazz-browser-media-images@0.11.4
- jazz-react@0.11.4
## 0.0.59
### Patch Changes
- jazz-react@0.11.3
- jazz-tools@0.11.3
- jazz-browser-media-images@0.11.3
## 0.0.58
### Patch Changes
- Updated dependencies [6892dc6]
- jazz-tools@0.11.2
- jazz-react@0.11.2
- jazz-browser-media-images@0.11.2
## 0.0.57
### Patch Changes
- jazz-react@0.11.1
## 0.0.56
### Patch Changes
- Updated dependencies [6a96d8b]
- Updated dependencies [a35249a]
- Updated dependencies [b9d194a]
- Updated dependencies [a4713df]
- Updated dependencies [34cbdc3]
- Updated dependencies [f039e8f]
- Updated dependencies [e22de9f]
- jazz-tools@0.11.0
- jazz-browser-media-images@0.11.0
- jazz-react@0.11.0
## 0.0.55
### Patch Changes
- Updated dependencies [2f99de0]
- jazz-tools@0.10.15
- jazz-browser-media-images@0.10.15
- jazz-react@0.10.15
## 0.0.54
### Patch Changes
- Updated dependencies [75211e3]
- jazz-tools@0.10.14
- jazz-react@0.10.14
- jazz-browser-media-images@0.10.14
## 0.0.53
### Patch Changes
- Updated dependencies [07feedd]
- jazz-tools@0.10.13
- jazz-browser-media-images@0.10.13
- jazz-react@0.10.13
## 0.0.52
### Patch Changes
- Updated dependencies [4612e05]
- jazz-tools@0.10.12
- jazz-react@0.10.12
- jazz-browser-media-images@0.10.12
## 0.0.51
### Patch Changes
- jazz-browser-media-images@0.10.9
- jazz-react@0.10.9
## 0.0.50
### Patch Changes
- Updated dependencies [2fb6428]
- jazz-tools@0.10.8
- jazz-react@0.10.8
- jazz-browser-media-images@0.10.8
## 0.0.49
### Patch Changes
- Updated dependencies [1136d9b]
- Updated dependencies [0eed228]
- jazz-react@0.10.7
- jazz-tools@0.10.7
- jazz-browser-media-images@0.10.7
## 0.0.48
### Patch Changes
- Updated dependencies [1d71ca1]
- Updated dependencies [ada802b]
- jazz-react@0.10.6
- jazz-tools@0.10.6
- jazz-browser-media-images@0.10.6
## 0.0.47
### Patch Changes
- Updated dependencies [59ff77e]
- jazz-tools@0.10.5
- jazz-browser-media-images@0.10.5
- jazz-react@0.10.5
## 0.0.46
### Patch Changes

View File

@@ -15,12 +15,12 @@ You can either
Create a new Jazz project, and use this example as a template.
```bash
npx create-jazz-app@latest --example image-upload --project-name image-upload
npx create-jazz-app@latest image-upload-app --example image-upload
```
Go to the new project directory.
```bash
cd image-upload
cd image-upload-app
```
Run the dev server.

View File

@@ -1,7 +1,7 @@
{
"name": "image-upload",
"private": true,
"version": "0.0.46",
"version": "0.0.62",
"type": "module",
"scripts": {
"dev": "vite",
@@ -24,6 +24,9 @@
"@vitejs/plugin-react": "^4.3.3",
"globals": "^15.11.0",
"typescript": "~5.6.2",
"vite": "^6.0.11"
"vite": "^6.0.11",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.27",
"tailwindcss": "^3.4.17"
}
}

View File

@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};

View File

@@ -1,20 +1,9 @@
import { useAccount } from "jazz-react";
import ImageUpload from "./ImageUpload.tsx";
function App() {
const { me, logOut } = useAccount();
return (
<>
<header>
<nav className="container">
<span>
You're logged in as <strong>{me?.profile?.name}</strong>
</span>
<button onClick={() => logOut()}>Log out</button>
</nav>
</header>
<main className="container">
<main className="container py-16">
<ImageUpload />
</main>
</>

View File

@@ -1,55 +1,97 @@
import { createImage } from "jazz-browser-media-images";
import { ProgressiveImg, useAccount } from "jazz-react";
import { ImageDefinition } from "jazz-tools";
import { ChangeEvent, useRef } from "react";
function Image({ image }: { image: ImageDefinition }) {
return (
<ProgressiveImg image={image}>
{({ src }) => <img src={src} />}
</ProgressiveImg>
);
}
import { ChangeEvent, useEffect, useRef, useState } from "react";
export default function ImageUpload() {
const { me } = useAccount();
const [imagePreviewUrl, setImagePreviewUrl] = useState<string | null>(null);
const inputRef = useRef<HTMLInputElement>(null);
useEffect(() => {
const handleBeforeUnload = (e: BeforeUnloadEvent) => {
if (imagePreviewUrl) {
e.preventDefault();
return "Upload in progress. Are you sure you want to leave?";
}
};
window.addEventListener("beforeunload", handleBeforeUnload);
return () => {
window.removeEventListener("beforeunload", handleBeforeUnload);
if (imagePreviewUrl) {
URL.revokeObjectURL(imagePreviewUrl);
}
};
}, [imagePreviewUrl]);
const onImageChange = async (event: ChangeEvent<HTMLInputElement>) => {
if (!me?.profile) return;
const file = event.currentTarget.files?.[0];
if (file) {
me.profile.image = await createImage(file, {
owner: me.profile._owner,
});
const objectUrl = URL.createObjectURL(file);
setImagePreviewUrl(objectUrl);
try {
me.profile.image = await createImage(file, {
owner: me.profile._owner,
});
} catch (error) {
console.error("Error uploading image:", error);
} finally {
URL.revokeObjectURL(objectUrl);
setImagePreviewUrl(null);
}
}
};
const deleteImage = () => {
if (!me?.profile) return;
me.profile.image = null;
};
return (
<>
<div>{me?.profile?.image && <Image image={me.profile.image} />}</div>
if (me?.profile?.image) {
return (
<>
<ProgressiveImg image={me.profile.image}>
{({ src }) => <img alt="" src={src} className="w-full h-auto" />}
</ProgressiveImg>
<div>
{me?.profile?.image ? (
<button type="button" onClick={deleteImage}>
Delete image
</button>
) : (
<div>
<label>Upload image</label>
<input ref={inputRef} type="file" onChange={onImageChange} />
</div>
)}
<button type="button" onClick={deleteImage} className="mt-5">
Delete image
</button>
</>
);
}
if (imagePreviewUrl) {
return (
<div className="relative">
<p className="z-10 absolute font-semibold text-gray-900 inset-0 flex items-center justify-center">
Uploading image...
</p>
<img
src={imagePreviewUrl}
alt="Preview"
className="opacity-50 w-full h-auto"
/>
</div>
</>
);
}
return (
<div className="flex flex-col gap-3">
<label htmlFor="image">Image</label>
<input
id="image"
name="image"
ref={inputRef}
type="file"
accept="image/png, image/jpeg, image/gif, image/bmp"
onChange={onImageChange}
/>
</div>
);
}

View File

@@ -1,83 +1,3 @@
:root {
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;
color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
--border-color: #2f2e2d;
}
html,
body,
#root {
height: 100%;
}
body {
margin: 0;
}
button {
border-radius: 8px;
border: 0;
padding: 0.6em 1.2em;
font-weight: 500;
background-color: #1a1a1a;
cursor: pointer;
}
@media (prefers-color-scheme: light) {
:root {
--border-color: #e5e5e5;
color: #213547;
background-color: #ffffff;
}
a:hover {
color: #747bff;
}
button {
background-color: #f9f9f9;
}
}
* {
border-color: var(--border-color);
}
header,
main {
padding: 0.5rem 0;
}
header {
border-bottom: 1px solid var(--border-color);
margin-bottom: 2rem;
}
nav {
display: flex;
align-items: center;
justify-content: space-between;
}
.container {
margin-right: auto;
margin-left: auto;
padding-right: 0.75rem;
padding-left: 0.75rem;
max-width: 800px;
}
label {
display: block;
margin-bottom: 0.25rem;
}
@tailwind base;
@tailwind components;
@tailwind utilities;

View File

@@ -3,9 +3,16 @@ import type { Config } from "tailwindcss";
const config: Config = {
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
theme: {
extend: {},
extend: {
container: {
center: true,
padding: {
DEFAULT: "0.75rem",
sm: "1rem",
},
},
},
},
plugins: [],
};
} as const;
export default config;

View File

@@ -1,5 +1,89 @@
# jazz-example-inspector
## 0.0.115
### Patch Changes
- 09f0a98: UI and JSON display improvements
- 11da4d1: isolate class name hashing on inspector
- Updated dependencies [09f0a98]
- Updated dependencies [11da4d1]
- Updated dependencies [8ed144e]
- jazz-inspector@0.11.6
- cojson@0.11.6
- cojson-transport-ws@0.11.6
## 0.0.114
### Patch Changes
- Updated dependencies [60f5b3f]
- cojson@0.11.5
- cojson-transport-ws@0.11.5
## 0.0.113
### Patch Changes
- Updated dependencies [7f036c1]
- cojson@0.11.4
- cojson-transport-ws@0.11.4
## 0.0.112
### Patch Changes
- Updated dependencies [68b0242]
- cojson-transport-ws@0.11.3
- cojson@0.11.3
## 0.0.111
### Patch Changes
- Updated dependencies [b9d194a]
- Updated dependencies [a4713df]
- Updated dependencies [e22de9f]
- Updated dependencies [34cbdc3]
- Updated dependencies [0f67e0a]
- cojson@0.11.0
- cojson-transport-ws@0.11.0
## 0.0.110
### Patch Changes
- Updated dependencies [f86e278]
- cojson@0.10.15
- cojson-transport-ws@0.10.15
## 0.0.109
### Patch Changes
- Updated dependencies [153dc99]
- cojson@0.10.8
- cojson-transport-ws@0.10.8
## 0.0.108
### Patch Changes
- Updated dependencies [0f83320]
- Updated dependencies [012022d]
- cojson@0.10.7
- cojson-transport-ws@0.10.7
## 0.0.107
### Patch Changes
- Updated dependencies [1d71ca1]
- Updated dependencies [5c76e37]
- hash-slash@0.2.2
- cojson@0.10.6
- cojson-transport-ws@0.10.6
## 0.0.106
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-inspector-app",
"private": true,
"version": "0.0.106",
"version": "0.0.115",
"type": "module",
"scripts": {
"dev": "vite",
@@ -11,27 +11,19 @@
"preview": "vite preview"
},
"dependencies": {
"@radix-ui/react-checkbox": "^1.0.4",
"@radix-ui/react-slot": "^1.1.1",
"@radix-ui/react-toast": "^1.1.4",
"class-variance-authority": "^0.7.0",
"jazz-inspector": "workspace:*",
"clsx": "^2.0.0",
"cojson": "workspace:0.10.4",
"cojson-transport-ws": "workspace:0.10.4",
"hash-slash": "workspace:0.2.1",
"cojson": "workspace:0.11.6",
"cojson-transport-ws": "workspace:0.11.6",
"hash-slash": "workspace:0.2.2",
"lucide-react": "^0.274.0",
"qrcode": "^1.5.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router": "^6.16.0",
"react-router-dom": "^6.16.0",
"react-use": "^17.4.0",
"tailwind-merge": "^1.14.0",
"tailwindcss-animate": "^1.0.7",
"uniqolor": "^1.1.0"
"react-use": "^17.4.0"
},
"devDependencies": {
"@types/qrcode": "^1.5.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react-swc": "^3.3.2",

View File

@@ -1,92 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 20 14.3% 4.1%;
--card: 0 0% 100%;
--card-foreground: 20 14.3% 4.1%;
--popover: 0 0% 100%;
--popover-foreground: 20 14.3% 4.1%;
--primary: 24 9.8% 10%;
--primary-foreground: 60 9.1% 97.8%;
--secondary: 60 4.8% 95.9%;
--secondary-foreground: 24 9.8% 10%;
--muted: 60 4.8% 95.9%;
--muted-foreground: 25 5.3% 44.7%;
--accent: 60 4.8% 95.9%;
--accent-foreground: 24 9.8% 10%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 60 9.1% 97.8%;
--border: 20 5.9% 90%;
--input: 20 5.9% 90%;
--ring: 20 14.3% 4.1%;
--radius: 0.5rem;
}
.dark {
--background: 20 14.3% 4.1%;
--foreground: 60 9.1% 97.8%;
--card: 20 14.3% 4.1%;
--card-foreground: 60 9.1% 97.8%;
--popover: 20 14.3% 4.1%;
--popover-foreground: 60 9.1% 97.8%;
--primary: 60 9.1% 97.8%;
--primary-foreground: 24 9.8% 10%;
--secondary: 12 6.5% 15.1%;
--secondary-foreground: 60 9.1% 97.8%;
--muted: 12 6.5% 15.1%;
--muted-foreground: 24 5.4% 63.9%;
--accent: 12 6.5% 15.1%;
--accent-foreground: 60 9.1% 97.8%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 60 9.1% 97.8%;
--border: 12 6.5% 15.1%;
--input: 12 6.5% 15.1%;
--ring: 24 5.7% 82.9%;
}
}
@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
margin: 0;
padding: 0;
}
}
.animate-in {
animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
from {
transform: translateZ(400px) translateY(30px) scale(1.05);
opacity: 0.4;
}
to {
transform: translateZ(0) scale(1);
opacity: 1;
}
}

View File

@@ -1,18 +0,0 @@
export function LinkIcon() {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.5}
stroke="currentColor"
className="w-3 h-3"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"
/>
</svg>
);
}

View File

@@ -1,39 +0,0 @@
import React from "react";
import { PageInfo } from "./types";
interface BreadcrumbsProps {
path: PageInfo[];
onBreadcrumbClick: (index: number) => void;
}
export const Breadcrumbs: React.FC<BreadcrumbsProps> = ({
path,
onBreadcrumbClick,
}) => {
return (
<div className="z-20 relative bg-indigo-400/10 backdrop-blur-sm rounded-lg inline-flex px-2 py-1 whitespace-pre transition-all items-center space-x-1 min-h-10">
<button
onClick={() => onBreadcrumbClick(-1)}
className="flex items-center justify-center p-1 rounded-sm hover:bg-indigo-500/10 transition-colors"
aria-label="Go to home"
>
<img src="jazz-logo.png" alt="Jazz Logo" className="size-5" />
</button>
{path.map((page, index) => {
return (
<span key={index} className="inline-block first:pl-1 last:pr-1">
{index === 0 ? null : (
<span className="text-indigo-500/30">{" / "}</span>
)}
<button
onClick={() => onBreadcrumbClick(index)}
className="text-indigo-700 hover:underline"
>
{index === 0 ? page.name || "Root" : page.name}
</button>
</span>
);
})}
</div>
);
};

View File

@@ -1,344 +0,0 @@
import {
CoID,
LocalNode,
RawBinaryCoStream,
RawCoStream,
RawCoValue,
} from "cojson";
import { base64URLtoBytes } from "cojson";
import { BinaryStreamItem, BinaryStreamStart, CoStreamItem } from "cojson";
import { JsonObject, JsonValue } from "cojson";
import { ArrowDownToLine } from "lucide-react";
import { useEffect, useState } from "react";
import { PageInfo } from "./types";
import { AccountOrGroupPreview } from "./value-renderer";
// typeguard for BinaryStreamStart
function isBinaryStreamStart(item: unknown): item is BinaryStreamStart {
return (
typeof item === "object" &&
item !== null &&
"type" in item &&
item.type === "start"
);
}
function detectCoStreamType(value: RawCoStream | RawBinaryCoStream) {
const firstKey = Object.keys(value.items)[0];
if (!firstKey)
return {
type: "unknown",
};
const items = value.items[firstKey as never]?.map((v) => v.value);
if (!items)
return {
type: "unknown",
};
const firstItem = items[0];
if (!firstItem)
return {
type: "unknown",
};
// This is a binary stream
if (isBinaryStreamStart(firstItem)) {
return {
type: "binary",
items: items as BinaryStreamItem[],
};
} else {
return {
type: "coStream",
};
}
}
async function getBlobFromCoStream({
items,
onlyFirstChunk = false,
}: {
items: BinaryStreamItem[];
onlyFirstChunk?: boolean;
}) {
if (onlyFirstChunk && items.length > 1) {
items = items.slice(0, 2);
}
const chunks: Uint8Array[] = [];
const binary_U_prefixLength = 8;
let lastProgressUpdate = Date.now();
for (const item of items.slice(1)) {
if (item.type === "end") {
break;
}
if (item.type !== "chunk") {
console.error("Invalid binary stream chunk", item);
return undefined;
}
const chunk = base64URLtoBytes(item.chunk.slice(binary_U_prefixLength));
// totalLength += chunk.length;
chunks.push(chunk);
if (Date.now() - lastProgressUpdate > 100) {
lastProgressUpdate = Date.now();
}
}
const defaultMime = "mimeType" in items[0] ? items[0].mimeType : null;
const blob = new Blob(chunks, defaultMime ? { type: defaultMime } : {});
const mimeType =
defaultMime === "" ? await detectPDFMimeType(blob) : defaultMime;
return {
blob,
mimeType: mimeType as string,
unfinishedChunks: items.length > 1,
totalSize:
"totalSizeBytes" in items[0]
? (items[0].totalSizeBytes as number)
: undefined,
};
}
const detectPDFMimeType = async (blob: Blob): Promise<string> => {
const arrayBuffer = await blob.slice(0, 4).arrayBuffer();
const uint8Array = new Uint8Array(arrayBuffer);
const header = uint8Array.reduce(
(acc, byte) => acc + String.fromCharCode(byte),
"",
);
if (header === "%PDF") {
return "application/pdf";
}
return "application/octet-stream";
};
const BinaryDownloadButton = ({
pdfBlob,
fileName = "document",
label,
mimeType,
}: {
pdfBlob: Blob;
mimeType?: string;
fileName?: string;
label: string;
}) => {
const downloadFile = () => {
const url = URL.createObjectURL(
new Blob([pdfBlob], mimeType ? { type: mimeType } : {}),
);
const link = document.createElement("a");
link.href = url;
link.download =
mimeType === "application/pdf" ? `${fileName}.pdf` : fileName;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
URL.revokeObjectURL(url);
};
return (
<button
className="flex items-center gap-2 px-2 py-1 text-gray-900 border border-gray-900/10 bg-clip-border shadow-sm transition-colors rounded bg-gray-50 text-sm"
onClick={downloadFile}
>
<ArrowDownToLine size={16} />
{label}
{/* Download {mimeType === "application/pdf" ? "PDF" : "File"} */}
</button>
);
};
const LabelContentPair = ({
label,
content,
}: {
label: string;
content: React.ReactNode;
}) => {
return (
<div className="flex flex-col gap-1.5 ">
<span className="uppercase text-xs font-medium text-gray-600 tracking-wide">
{label}
</span>
<span>{content}</span>
</div>
);
};
function RenderCoBinaryStream({
value,
items,
}: {
items: BinaryStreamItem[];
value: RawBinaryCoStream;
}) {
const [file, setFile] = useState<
| {
blob: Blob;
mimeType: string;
unfinishedChunks: boolean;
totalSize: number | undefined;
}
| undefined
| null
>(null);
const [isLoading, setIsLoading] = useState(true);
useEffect(() => {
// load only the first chunk to get the mime type and size
getBlobFromCoStream({
items,
onlyFirstChunk: true,
})
.then((v) => {
if (v) {
setFile(v);
if (v.mimeType.includes("image")) {
// If it's an image, load the full blob
getBlobFromCoStream({
items,
}).then((s) => {
if (s) setFile(s);
});
}
}
})
.finally(() => setIsLoading(false));
}, [items]);
if (!isLoading && !file) return <div>No blob</div>;
if (isLoading) return <div>Loading...</div>;
if (!file) return <div>No blob</div>;
const { blob, mimeType } = file;
const sizeInKB = (file.totalSize || 0) / 1024;
return (
<div className="space-y-8 mt-4">
<div className="grid grid-cols-3 gap-2 max-w-3xl">
<LabelContentPair
label="Mime Type"
content={
<span className="font-mono bg-gray-100 rounded px-2 py-1 text-sm">
{mimeType || "No mime type"}
</span>
}
/>
<LabelContentPair
label="Size"
content={<span>{sizeInKB.toFixed(2)} KB</span>}
/>
<LabelContentPair
label="Download"
content={
<BinaryDownloadButton
fileName={value.id.toString()}
pdfBlob={blob}
mimeType={mimeType}
label={
mimeType === "application/pdf"
? "Download PDF"
: "Download File"
}
/>
}
/>
</div>
{mimeType === "image/png" || mimeType === "image/jpeg" ? (
<LabelContentPair
label="Preview"
content={
<div className="bg-gray-50 p-3 rounded-sm">
<RenderBlobImage blob={blob} />
</div>
}
/>
) : null}
</div>
);
}
function RenderCoStream({
value,
node,
}: {
value: RawCoStream;
node: LocalNode;
}) {
const streamPerUser = Object.keys(value.items);
const userCoIds = streamPerUser.map((stream) => stream.split("_session")[0]);
return (
<div className="grid grid-cols-3 gap-2">
{userCoIds.map((id, idx) => (
<div
className="bg-gray-100 p-3 rounded-lg transition-colors overflow-hidden bg-white border hover:bg-gray-100/5 cursor-pointer shadow-sm"
key={id}
>
<AccountOrGroupPreview coId={id as CoID<RawCoValue>} node={node} />
{/* @ts-expect-error - TODO: fix types */}
{value.items[streamPerUser[idx]]?.map(
(item: CoStreamItem<JsonValue>) => (
<div>
{new Date(item.madeAt).toLocaleString()}{" "}
{JSON.stringify(item.value)}
</div>
),
)}
</div>
))}
</div>
);
}
export function CoStreamView({
value,
node,
}: {
data: JsonObject;
onNavigate: (pages: PageInfo[]) => void;
node: LocalNode;
value: RawCoStream;
}) {
// if (!value) return <div>No value</div>;
const streamType = detectCoStreamType(value);
if (streamType.type === "binary") {
if (streamType.items === undefined) {
return <div>No binary stream</div>;
}
return (
<RenderCoBinaryStream
value={value as RawBinaryCoStream}
items={streamType.items}
/>
);
}
if (streamType.type === "coStream") {
return <RenderCoStream value={value} node={node} />;
}
if (streamType.type === "unknown") return <div>Unknown stream type</div>;
return <div>Unknown stream type</div>;
}
function RenderBlobImage({ blob }: { blob: Blob }) {
const urlCreator = window.URL || window.webkitURL;
return <img src={urlCreator.createObjectURL(blob)} />;
}

View File

@@ -1,65 +0,0 @@
import clsx from "clsx";
import { CoID, LocalNode, RawCoValue } from "cojson";
import { JsonObject } from "cojson";
import { ResolveIcon } from "./type-icon";
import { PageInfo, isCoId } from "./types";
import { CoMapPreview, ValueRenderer } from "./value-renderer";
export function GridView({
data,
onNavigate,
node,
}: {
data: JsonObject;
onNavigate: (pages: PageInfo[]) => void;
node: LocalNode;
}) {
const entries = Object.entries(data);
return (
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 p-2">
{entries.map(([key, child], childIndex) => (
<div
key={childIndex}
className={clsx(
"bg-gray-100 p-3 rounded-lg transition-colors overflow-hidden",
isCoId(child)
? "bg-white border hover:bg-gray-100/5 cursor-pointer shadow-sm"
: "bg-gray-50",
)}
onClick={() =>
isCoId(child) &&
onNavigate([{ coId: child as CoID<RawCoValue>, name: key }])
}
>
<h3 className="truncate">
{isCoId(child) ? (
<span className="font-medium flex justify-between">
{key}
<div className="px-2 py-1 text-xs bg-gray-100 rounded">
<ResolveIcon coId={child as CoID<RawCoValue>} node={node} />
</div>
</span>
) : (
<span>{key}</span>
)}
</h3>
<div className="mt-2 text-sm">
{isCoId(child) ? (
<CoMapPreview coId={child as CoID<RawCoValue>} node={node} />
) : (
<ValueRenderer
json={child}
onCoIDClick={(coId) => {
onNavigate([{ coId, name: key }]);
}}
compact
/>
)}
</div>
</div>
))}
</div>
);
}

View File

@@ -1,7 +1,6 @@
import { LocalNode } from "cojson";
import { Breadcrumbs } from "./breadcrumbs";
import { PageStack } from "./page-stack";
import { PageInfo } from "./types";
import { Breadcrumbs, PageStack } from "jazz-inspector";
import type { PageInfo } from "jazz-inspector";
import { usePagePath } from "./use-page-path";
export default function CoJsonViewer({

View File

@@ -9,10 +9,15 @@ import {
} from "cojson";
import { createWebSocketPeer } from "cojson-transport-ws";
import { WasmCrypto } from "cojson/crypto/WasmCrypto";
import { Trash2 } from "lucide-react";
import {
Breadcrumbs,
Button,
Icon,
Input,
PageStack,
Select,
} from "jazz-inspector";
import React, { useState, useEffect } from "react";
import { Breadcrumbs } from "./breadcrumbs";
import { PageStack } from "./page-stack";
import { usePagePath } from "./use-page-path";
import { resolveCoValue, useResolvedCoValue } from "./use-resolve-covalue";
@@ -83,7 +88,10 @@ export default function CoJsonViewerApp() {
const addAccount = (id: RawAccountID, secret: AgentSecret) => {
const newAccount = { id, secret };
setAccounts([...accounts, newAccount]);
const accountExists = accounts.some((account) => account.id === id);
if (!accountExists) {
setAccounts([...accounts, newAccount]);
}
setCurrentAccount(newAccount);
};
@@ -102,6 +110,7 @@ export default function CoJsonViewerApp() {
if (coValueId) {
setPage(coValueId);
}
setCoValueId("");
};
if (
@@ -117,9 +126,31 @@ export default function CoJsonViewerApp() {
}
return (
<div className="w-full h-screen bg-gray-100 p-4 overflow-hidden flex flex-col">
<div className="flex justify-between items-center mb-4">
<div
className={clsx(
"h-screen overflow-hidden flex flex-col",
" text-stone-700 bg-white",
"dark:text-stone-300 dark:bg-stone-950",
)}
>
<header className="flex items-center gap-4 p-3">
<Breadcrumbs path={path} onBreadcrumbClick={goToIndex} />
<div className="flex-1">
<form onSubmit={handleCoValueIdSubmit}>
{path.length !== 0 && (
<Input
className="min-w-[21rem] font-mono"
placeholder="co_z1234567890abcdef123456789"
label="CoValue ID"
hideLabel
value={coValueId}
onChange={(e) =>
setCoValueId(e.target.value as CoID<RawCoValue>)
}
/>
)}
</form>
</div>
<AccountSwitcher
accounts={accounts}
currentAccount={currentAccount}
@@ -127,7 +158,7 @@ export default function CoJsonViewerApp() {
deleteCurrentAccount={deleteCurrentAccount}
localNode={localNode}
/>
</div>
</header>
<PageStack
path={path}
@@ -135,50 +166,39 @@ export default function CoJsonViewerApp() {
goBack={goBack}
addPages={addPages}
>
{!currentAccount ? (
<AddAccountForm addAccount={addAccount} />
) : (
{!currentAccount && <AddAccountForm addAccount={addAccount} />}
{currentAccount && path.length <= 0 && (
<form
onSubmit={handleCoValueIdSubmit}
aria-hidden={path.length !== 0}
className={clsx(
"flex flex-col justify-center items-center gap-2 h-full w-full mb-20 ",
"transition-all duration-150",
path.length > 0
? "opacity-0 -translate-y-2 scale-95"
: "opacity-100",
)}
className="flex flex-col relative -top-6 justify-center gap-2 h-full w-full max-w-sm mx-auto"
>
<fieldset className="flex flex-col gap-2 text-sm">
<h2 className="text-3xl font-medium text-gray-950 text-center mb-4">
Jazz CoValue Inspector
</h2>
<input
className="border p-4 rounded-lg min-w-[21rem] font-mono"
placeholder="co_z1234567890abcdef123456789"
value={coValueId}
onChange={(e) =>
setCoValueId(e.target.value as CoID<RawCoValue>)
}
/>
<button
type="submit"
className="bg-indigo-500 hover:bg-indigo-500/80 text-white px-4 py-2 rounded-md"
>
Inspect
</button>
<hr />
<button
type="button"
className="border inline-block px-2 py-1.5 text-black rounded"
onClick={() => {
setCoValueId(currentAccount.id);
setPage(currentAccount.id);
}}
>
Inspect My Account
</button>
</fieldset>
<h1 className="text-lg text-center font-medium mb-4 text-stone-900 dark:text-white">
Jazz CoValue Inspector
</h1>
<Input
label="CoValue ID"
className="font-mono"
hideLabel
placeholder="co_z1234567890abcdef123456789"
value={coValueId}
onChange={(e) => setCoValueId(e.target.value as CoID<RawCoValue>)}
/>
<Button type="submit" variant="primary">
Inspect CoValue
</Button>
<p className="text-center">or</p>
<Button
variant="secondary"
onClick={() => {
setPage(currentAccount.id);
}}
>
Inspect my account
</Button>
</form>
)}
</PageStack>
@@ -200,8 +220,11 @@ function AccountSwitcher({
localNode: LocalNode | null;
}) {
return (
<div className="relative flex items-center gap-1">
<select
<div className="relative flex items-stretch gap-1">
<Select
label="Account to inspect"
hideLabel
className="label:sr-only max-w-96"
value={currentAccount?.id || "add-account"}
onChange={(e) => {
if (e.target.value === "add-account") {
@@ -211,7 +234,6 @@ function AccountSwitcher({
setCurrentAccount(account || null);
}
}}
className="p-2 px-4 bg-gray-100/50 border border-indigo-500/10 backdrop-blur-sm rounded-md text-indigo-700 appearance-none"
>
{accounts.map((account) => (
<option key={account.id} value={account.id}>
@@ -223,15 +245,16 @@ function AccountSwitcher({
</option>
))}
<option value="add-account">Add account</option>
</select>
</Select>
{currentAccount && (
<button
<Button
variant="secondary"
onClick={deleteCurrentAccount}
className="p-3 rounded hover:bg-gray-200 transition-colors"
title="Delete Account"
className="rounded-md p-2 ml-1"
aria-label="Remove account"
>
<Trash2 size={16} className="text-gray-500" />
</button>
<Icon name="delete" className="text-gray-500" />
</Button>
)}
</div>
);
@@ -255,30 +278,34 @@ function AddAccountForm({
return (
<form
onSubmit={handleSubmit}
className="flex flex-col gap-2 max-w-md mx-auto h-full justify-center"
className="flex flex-col gap-3 max-w-md mx-auto h-full justify-center"
>
<h2 className="text-2xl font-medium text-gray-900 mb-3">
Add an Account to Inspect
<h2 className="text-2xl font-medium text-gray-900 dark:text-white">
Add an account to inspect
</h2>
<input
className="border py-2 px-3 rounded-md"
placeholder="Account ID"
<p className="leading-relaxed mb-5">
Use the{" "}
<code className="whitespace-nowrap text-stone-900 dark:text-white font-semibold">
jazz-logged-in-secret
</code>{" "}
local storage key from within your Jazz app for your account
credentials.
</p>
<Input
label="Account ID"
value={id}
placeholder="co_z1234567890abcdef123456789"
onChange={(e) => setId(e.target.value)}
/>
<input
<Input
label="Account secret"
type="password"
className="border py-2 px-3 rounded-md"
placeholder="Account Secret"
value={secret}
onChange={(e) => setSecret(e.target.value)}
/>
<button
type="submit"
className="bg-indigo-500 text-white px-4 py-2 rounded-md"
>
Add Account
</button>
<Button className="mt-3" type="submit">
Add account
</Button>
</form>
);
}

View File

@@ -1,53 +0,0 @@
import { CoID, LocalNode, RawCoValue } from "cojson";
import { Page } from "./page"; // Assuming you have a Page component
// Define the structure of a page in the path
interface PageInfo {
coId: CoID<RawCoValue>;
name?: string;
}
// Props for the PageStack component
interface PageStackProps {
path: PageInfo[];
node?: LocalNode | null;
goBack: () => void;
addPages: (pages: PageInfo[]) => void;
children?: React.ReactNode;
}
export function PageStack({
path,
node,
goBack,
addPages,
children,
}: PageStackProps) {
return (
<div className="relative mt-4 h-[calc(100vh-6rem)]">
{children && <div className="absolute inset-0 pb-20">{children}</div>}
{node &&
path.map((page, index) => (
<Page
key={`${page.coId}-${index}`}
coId={page.coId}
node={node}
name={page.name || page.coId}
onHeaderClick={goBack}
onNavigate={addPages}
isTopLevel={index === path.length - 1}
style={{
transform: `translateZ(${(index - path.length + 1) * 200}px) scale(${
1 - (path.length - index - 1) * 0.05
}) translateY(${-(index - path.length + 1) * -4}%)`,
opacity: 1 - (path.length - index - 1) * 0.05,
zIndex: index,
transitionProperty: "transform, opacity",
transitionDuration: "0.3s",
transitionTimingFunction: "ease-out",
}}
/>
))}
</div>
);
}

View File

@@ -1,138 +0,0 @@
import clsx from "clsx";
import { CoID, LocalNode, RawCoStream, RawCoValue } from "cojson";
import { useEffect, useState } from "react";
import { CoStreamView } from "./co-stream-view";
import { GridView } from "./grid-view";
import { TableView } from "./table-viewer";
import { TypeIcon } from "./type-icon";
import { PageInfo } from "./types";
import { useResolvedCoValue } from "./use-resolve-covalue";
import { AccountOrGroupPreview } from "./value-renderer";
type PageProps = {
coId: CoID<RawCoValue>;
node: LocalNode;
name: string;
onNavigate: (newPages: PageInfo[]) => void;
onHeaderClick?: () => void;
isTopLevel?: boolean;
style: React.CSSProperties;
};
export function Page({
coId,
node,
name,
onNavigate,
onHeaderClick,
style,
isTopLevel,
}: PageProps) {
const { value, snapshot, type, extendedType } = useResolvedCoValue(
coId,
node,
);
const [viewMode, setViewMode] = useState<"grid" | "table">("grid");
const supportsTableView = type === "colist" || extendedType === "record";
// Automatically switch to table view if the page is a CoMap record
useEffect(() => {
if (supportsTableView) {
setViewMode("table");
}
}, [supportsTableView]);
if (snapshot === "unavailable") {
return <div style={style}>Data unavailable</div>;
}
if (!snapshot) {
return <div style={style}></div>;
}
return (
<div
style={style}
className={clsx(
"absolute inset-0 border border-gray-900/5 bg-clip-padding bg-white rounded-xl shadow-lg p-6 animate-in",
)}
>
{!isTopLevel && (
<div
className="absolute inset-x-0 top-0 h-10"
aria-label="Back"
onClick={() => {
onHeaderClick?.();
}}
aria-hidden="true"
></div>
)}
<div className="flex justify-between items-center mb-4">
<div className="flex flex-col gap-2">
<h2 className="text-2xl font-bold flex items-start flex-col gap-1">
<span>
{name}
{typeof snapshot === "object" && "name" in snapshot ? (
<span className="text-gray-600 font-medium">
{" "}
{
(
snapshot as {
name: string;
}
).name
}
</span>
) : null}
</span>
</h2>
<div className="flex items-center gap-2">
<span className="text-xs text-gray-700 font-medium py-0.5 px-1 -ml-0.5 rounded bg-gray-700/5 inline-block font-mono">
{type && <TypeIcon type={type} extendedType={extendedType} />}
</span>
<span className="text-xs text-gray-700 font-medium py-0.5 px-1 -ml-0.5 rounded bg-gray-700/5 inline-block font-mono">
{coId}
</span>
</div>
</div>
{/* {supportsTableView && (
<button
onClick={toggleViewMode}
className="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 transition-colors"
>
{viewMode === "grid" ? "Table View" : "Grid View"}
</button>
)} */}
</div>
<div className="overflow-auto max-h-[calc(100%-4rem)]">
{type === "costream" ? (
<CoStreamView
data={snapshot}
onNavigate={onNavigate}
node={node}
value={value as RawCoStream}
/>
) : viewMode === "grid" ? (
<GridView data={snapshot} onNavigate={onNavigate} node={node} />
) : (
<TableView data={snapshot} node={node} onNavigate={onNavigate} />
)}
{/* --- */}
{extendedType !== "account" && extendedType !== "group" && (
<div className="text-xs text-gray-500 mt-4">
Owned by{" "}
<AccountOrGroupPreview
coId={value.group.id}
node={node}
showId
onClick={() => {
onNavigate([{ coId: value.group.id, name: "owner" }]);
}}
/>
</div>
)}
</div>
</div>
);
}

View File

@@ -1,133 +0,0 @@
import { CoID, LocalNode, RawCoValue } from "cojson";
import { JsonObject } from "cojson";
import { useMemo, useState } from "react";
import { LinkIcon } from "../link-icon";
import { PageInfo } from "./types";
import { useResolvedCoValues } from "./use-resolve-covalue";
import { ValueRenderer } from "./value-renderer";
export function TableView({
data,
node,
onNavigate,
}: {
data: JsonObject;
node: LocalNode;
onNavigate: (pages: PageInfo[]) => void;
}) {
const [visibleRowsCount, setVisibleRowsCount] = useState(10);
const [coIdArray, visibleRows] = useMemo(() => {
const coIdArray = Array.isArray(data)
? data
: Object.values(data).every(
(k) => typeof k === "string" && k.startsWith("co_"),
)
? Object.values(data).map((k) => k as CoID<RawCoValue>)
: [];
const visibleRows = coIdArray.slice(0, visibleRowsCount);
return [coIdArray, visibleRows];
}, [data, visibleRowsCount]);
const resolvedRows = useResolvedCoValues(visibleRows, node);
const hasMore = visibleRowsCount < coIdArray.length;
if (!coIdArray.length) {
return <div>No data to display</div>;
}
if (resolvedRows.length === 0) {
return <div>Loading...</div>;
}
const keys = Array.from(
new Set(resolvedRows.flatMap((item) => Object.keys(item.snapshot || {}))),
);
const loadMore = () => {
setVisibleRowsCount((prevVisibleRows) => prevVisibleRows + 10);
};
return (
<div>
<table className="min-w-full divide-y divide-gray-200">
<thead className="sticky top-0 border-b">
<tr>
{["", ...keys].map((key) => (
<th
key={key}
className="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 rounded"
>
{key}
</th>
))}
</tr>
</thead>
<tbody className="bg-white divide-y divide-gray-200">
{resolvedRows.slice(0, visibleRowsCount).map((item, index) => (
<tr key={index}>
<td className="px-1 py-0">
<button
onClick={() =>
onNavigate([
{
coId: item.value!.id,
name: index.toString(),
},
])
}
className="px-4 py-4 whitespace-nowrap text-sm text-gray-500 hover:text-blue-500 hover:bg-gray-100 rounded"
>
<LinkIcon />
</button>
</td>
{keys.map((key) => (
<td
key={key}
className="px-4 py-4 whitespace-nowrap text-sm text-gray-500"
>
<ValueRenderer
json={(item.snapshot as JsonObject)[key]}
onCoIDClick={(coId) => {
async function handleClick() {
onNavigate([
{
coId: item.value!.id,
name: index.toString(),
},
{
coId: coId,
name: key,
},
]);
}
handleClick();
}}
/>
</td>
))}
</tr>
))}
</tbody>
</table>
<div className="py-4 text-gray-500 flex items-center justify-between gap-2">
<span>
Showing {Math.min(visibleRowsCount, coIdArray.length)} of{" "}
{coIdArray.length}
</span>
{hasMore && (
<div className="text-center">
<button
onClick={loadMore}
className="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600"
>
Load More
</button>
</div>
)}
</div>
</div>
);
}

View File

@@ -1,47 +0,0 @@
import { CoID, LocalNode, RawCoValue } from "cojson";
import {
CoJsonType,
ExtendedCoJsonType,
useResolvedCoValue,
} from "./use-resolve-covalue";
export const TypeIcon = ({
type,
extendedType,
}: {
type: CoJsonType;
extendedType?: ExtendedCoJsonType;
}) => {
const iconMap: Record<ExtendedCoJsonType | CoJsonType, string> = {
record: "{} Record",
image: "🖼️ Image",
comap: "{} CoMap",
costream: "≋ CoStream",
colist: "☰ CoList",
account: "👤 Account",
group: "👥 Group",
};
const iconKey = extendedType || type;
const icon = iconMap[iconKey as keyof typeof iconMap];
return icon ? <span className="font-mono">{icon}</span> : null;
};
export const ResolveIcon = ({
coId,
node,
}: {
coId: CoID<RawCoValue>;
node: LocalNode;
}) => {
const { type, extendedType, snapshot } = useResolvedCoValue(coId, node);
if (snapshot === "unavailable" && !type) {
return <div className="text-gray-600 font-medium">Unavailable</div>;
}
if (!type) return <div className="whitespace-pre w-14 font-mono"> </div>;
return <TypeIcon type={type} extendedType={extendedType} />;
};

View File

@@ -1,9 +0,0 @@
import { CoID, RawCoValue } from "cojson";
export type PageInfo = {
coId: CoID<RawCoValue>;
name?: string;
};
export const isCoId = (coId: unknown): coId is CoID<RawCoValue> =>
typeof coId === "string" && coId.startsWith("co_");

View File

@@ -1,6 +1,6 @@
import { CoID, RawCoValue } from "cojson";
import { PageInfo } from "jazz-inspector";
import { useCallback, useEffect, useState } from "react";
import { PageInfo } from "./types";
export function usePagePath(defaultPath?: PageInfo[]) {
const [path, setPath] = useState<PageInfo[]>(() => {

View File

@@ -1,242 +0,0 @@
import clsx from "clsx";
import { CoID, JsonValue, LocalNode, RawCoValue } from "cojson";
import React, { useEffect, useState } from "react";
import { LinkIcon } from "../link-icon";
import {
isBrowserImage,
resolveCoValue,
useResolvedCoValue,
} from "./use-resolve-covalue";
// Is there a chance we can pass the actual CoValue here?
export function ValueRenderer({
json,
compact,
onCoIDClick,
}: {
json: JsonValue | undefined;
compact?: boolean;
onCoIDClick?: (childNode: CoID<RawCoValue>) => void;
}) {
if (typeof json === "undefined" || json === undefined) {
return <span className="text-gray-400">undefined</span>;
}
if (json === null) {
return <span className="text-gray-400">null</span>;
}
if (typeof json === "string" && json.startsWith("co_")) {
return (
<span
className={clsx(
"inline-flex gap-1 items-center",
onCoIDClick && "text-blue-500 cursor-pointer hover:underline",
)}
onClick={() => {
onCoIDClick?.(json as CoID<RawCoValue>);
}}
>
{json}
{onCoIDClick && <LinkIcon />}
</span>
);
}
if (typeof json === "string") {
return (
<span className="text-green-900 font-mono">
{/* <span className="select-none opacity-70">{'"'}</span> */}
{json}
{/* <span className="select-none opacity-70">{'"'}</span> */}
</span>
);
}
if (typeof json === "number") {
return <span className="text-purple-500">{json}</span>;
}
if (typeof json === "boolean") {
return (
<span
className={clsx(
json
? "text-green-700 bg-green-700/5"
: "text-amber-700 bg-amber-500/5",
"font-mono",
"inline-block px-1 py-0.5 rounded",
)}
>
{json.toString()}
</span>
);
}
if (Array.isArray(json)) {
return (
<span title={JSON.stringify(json)}>
Array <span className="text-gray-500">({json.length})</span>
</span>
);
}
if (typeof json === "object") {
return (
<span
title={JSON.stringify(json, null, 2)}
className="inline-block max-w-64 truncate"
>
{compact ? (
<span>
Object{" "}
<span className="text-gray-500">({Object.keys(json).length})</span>
</span>
) : (
JSON.stringify(json, null, 2)
)}
</span>
);
}
return <span>{String(json)}</span>;
}
export const CoMapPreview = ({
coId,
node,
limit = 6,
}: {
coId: CoID<RawCoValue>;
node: LocalNode;
limit?: number;
}) => {
const { value, snapshot, type, extendedType } = useResolvedCoValue(
coId,
node,
);
if (!snapshot) {
return (
<div className="rounded bg-gray-100 animate-pulse whitespace-pre w-24">
{" "}
</div>
);
}
if (snapshot === "unavailable" && !value) {
return <div className="text-gray-500">Unavailable</div>;
}
if (extendedType === "image" && isBrowserImage(snapshot)) {
return (
<div>
<img
src={snapshot.placeholderDataURL}
className="size-8 border-2 border-white drop-shadow-md my-2"
/>
<span className="text-gray-500 text-sm">
{snapshot.originalSize[0]} x {snapshot.originalSize[1]}
</span>
{/* <CoMapPreview coId={value[]} node={node} /> */}
{/* <ProgressiveImg image={value}>
{({ src }) => <img src={src} className={clsx("w-full")} />}
</ProgressiveImg> */}
</div>
);
}
if (extendedType === "record") {
return (
<div>
Record{" "}
<span className="text-gray-500">({Object.keys(snapshot).length})</span>
</div>
);
}
if (type === "colist") {
return (
<div>
List{" "}
<span className="text-gray-500">
({(snapshot as unknown as []).length})
</span>
</div>
);
}
return (
<div className="text-sm flex flex-col gap-2 items-start">
<div className="grid grid-cols-[auto_1fr] gap-2">
{Object.entries(snapshot)
.slice(0, limit)
.map(([key, value]) => (
<React.Fragment key={key}>
<span className="font-medium">{key}: </span>
<span>
<ValueRenderer json={value} />
</span>
</React.Fragment>
))}
</div>
{Object.entries(snapshot).length > limit && (
<div className="text-left text-xs text-gray-500 mt-2">
{Object.entries(snapshot).length - limit} more
</div>
)}
</div>
);
};
export function AccountOrGroupPreview({
coId,
node,
showId = false,
onClick,
}: {
coId: CoID<RawCoValue>;
node: LocalNode;
showId?: boolean;
onClick?: (name?: string) => void;
}) {
const { snapshot, extendedType } = useResolvedCoValue(coId, node);
const [name, setName] = useState<string | null>(null);
useEffect(() => {
if (extendedType === "account") {
resolveCoValue(
(snapshot as unknown as { profile: CoID<RawCoValue> }).profile,
node,
).then(({ snapshot }) => {
if (
typeof snapshot === "object" &&
"name" in snapshot &&
typeof snapshot.name === "string"
) {
setName(snapshot.name);
}
});
}
}, [snapshot, node, extendedType]);
if (!snapshot) return <span>Loading...</span>;
if (extendedType !== "account" && extendedType !== "group") {
return <span>CoID is not an account or group</span>;
}
const displayName = extendedType === "account" ? name || "Account" : "Group";
const displayText = showId ? `${displayName} (${coId})` : displayName;
const props = onClick
? {
onClick: () => onClick(displayName),
className: "text-blue-500 cursor-pointer hover:underline",
}
: {
className: "text-gray-500",
};
return <span {...props}>{displayText}</span>;
}

View File

@@ -1,5 +1,30 @@
import type { Config } from "tailwindcss";
import animate from "tailwindcss-animate";
import plugin from "tailwindcss/plugin";
const stonePalette = {
50: "oklch(0.988281 0.002 75)",
100: "oklch(0.980563 0.002 75)",
200: "oklch(0.917969 0.002 75)",
300: "oklch(0.853516 0.002 75)",
400: "oklch(0.789063 0.002 75)",
500: "oklch(0.726563 0.002 75)",
600: "oklch(0.613281 0.002 75)",
700: "oklch(0.523438 0.002 75)",
800: "oklch(0.412109 0.002 75)",
900: "oklch(0.302734 0.002 75)",
925: "oklch(0.220000 0.002 75)",
950: "oklch(0.193359 0.002 75)",
};
const stonePaletteWithAlpha = { ...stonePalette };
Object.keys(stonePalette).forEach((key) => {
// @ts-ignore
stonePaletteWithAlpha[key] = stonePaletteWithAlpha[key].replace(
")",
"/ <alpha-value>)",
);
});
const config: Config = {
content: [
@@ -18,62 +43,26 @@ const config: Config = {
},
extend: {
colors: {
border: "hsl(var(--border))",
input: "hsl(var(--input))",
ring: "hsl(var(--ring))",
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
primary: {
DEFAULT: "hsl(var(--primary))",
foreground: "hsl(var(--primary-foreground))",
stone: stonePaletteWithAlpha,
gray: stonePaletteWithAlpha,
blue: {
50: "#f5f7ff",
100: "#ebf0fe",
200: "#d6e0fd",
300: "#b3c7fc",
400: "#8aa6f9",
500: "#5870F1",
600: "#3651E7",
700: "#3313F7",
800: "#2A12BE",
900: "#12046A",
950: "#1e1b4b",
DEFAULT: "#3313F7",
},
secondary: {
DEFAULT: "hsl(var(--secondary))",
foreground: "hsl(var(--secondary-foreground))",
},
destructive: {
DEFAULT: "hsl(var(--destructive))",
foreground: "hsl(var(--destructive-foreground))",
},
muted: {
DEFAULT: "hsl(var(--muted))",
foreground: "hsl(var(--muted-foreground))",
},
accent: {
DEFAULT: "hsl(var(--accent))",
foreground: "hsl(var(--accent-foreground))",
},
popover: {
DEFAULT: "hsl(var(--popover))",
foreground: "hsl(var(--popover-foreground))",
},
card: {
DEFAULT: "hsl(var(--card))",
foreground: "hsl(var(--card-foreground))",
},
},
borderRadius: {
lg: "var(--radius)",
md: "calc(var(--radius) - 2px)",
sm: "calc(var(--radius) - 4px)",
},
keyframes: {
"accordion-down": {
from: { height: "0" },
to: { height: "var(--radix-accordion-content-height)" },
},
"accordion-up": {
from: { height: "var(--radix-accordion-content-height)" },
to: { height: "0" },
},
},
animation: {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
},
},
},
plugins: [animate],
plugins: [plugin(({ addVariant }) => addVariant("label", "& :is(label)"))],
};
export default config;

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