Compare commits

..

443 Commits

Author SHA1 Message Date
Guido D'Orsi
1e6581cd68 Merge pull request #2206 from garden-co/changeset-release/main
Version Packages
2025-05-13 17:48:05 +02:00
github-actions[bot]
aaacaf0130 Version Packages 2025-05-13 15:35:24 +00:00
Guido D'Orsi
7dcca057e7 Merge pull request #2205 from garden-co/feat/self-revoke
feat: allow accounts to self-remove from groups
2025-05-13 17:32:57 +02:00
Guido D'Orsi
63570520a3 feat: allow accounts to self-remove from groups 2025-05-13 17:27:51 +02:00
Trisha Lim
aeed9595ae Merge pull request #2203 from garden-co/docs/server-workers-example 2025-05-13 13:40:23 +01:00
Trisha Lim
6755e28d0f docs: link to server workers example 2025-05-13 12:28:18 +01:00
Guido D'Orsi
23521e6468 Merge pull request #2197 from garden-co/changeset-release/main
Version Packages
2025-05-12 20:06:14 +02:00
github-actions[bot]
1627eb7652 Version Packages 2025-05-12 18:05:04 +00:00
Guido D'Orsi
ff846d9095 fix: loading RawAccount with the new subscription engine 2025-05-12 20:02:57 +02:00
Guido D'Orsi
8d7d62d64f Merge pull request #2194 from garden-co/changeset-release/main
Version Packages
2025-05-12 19:09:18 +02:00
github-actions[bot]
65a8227b2b Version Packages 2025-05-12 14:58:57 +00:00
Guido D'Orsi
a846e0730e fix: block load of invalid ids on a lower level and do not break sync when getting invalid ids 2025-05-12 16:56:32 +02:00
Trisha Lim
e9c0e65170 Merge pull request #2190 from garden-co/improvement/homepage-cta
homepage: improve CTA, move problem section down
2025-05-12 15:53:55 +01:00
Trisha Lim
14636606bd homepage: improve CTA, move problem section down 2025-05-12 14:59:31 +01:00
Guido D'Orsi
5118ff6585 chore: remove unused typecheck clause 2025-05-12 14:34:45 +02:00
Guido D'Orsi
51a0f86b99 test: add tests on the load API for unavailable retry 2025-05-12 14:34:45 +02:00
Guido D'Orsi
fa61ab4eb5 chore: make the retries use CO_VALUE_LOADING_CONFIG 2025-05-12 14:34:45 +02:00
Trisha Lim
d4cdd43cf7 Merge pull request #2173 from garden-co/docs/change-role
add docs for changing roles and removing members in a Group
2025-05-12 10:05:48 +01:00
Anselm Eickhoff
c5d5fb25f7 Merge pull request #2183 from garden-co/jmsv/jazz-tiptap
jazz-richtext-tiptap
2025-05-10 12:27:18 +01:00
James Vickery
38f2276fdd version example app 2025-05-10 12:19:48 +01:00
James Vickery
b92bfce041 jazz-richtext-tiptap 2025-05-10 12:18:27 +01:00
Benjamin S. Leveritt
e3fd7bf6e3 Merge pull request #2154 from garden-co/1816-update-examples-to-coplaintext
Update examples to CoPlainText
2025-05-09 20:18:30 +01:00
Benjamin S. Leveritt
7526e444d6 Merge origin/main into 1816-update-examples-to-coplaintext 2025-05-09 20:00:59 +01:00
Benjamin S. Leveritt
28522bd062 Merge origin/main into 1816-update-examples-to-coplaintext 2025-05-09 20:00:38 +01:00
Benjamin S. Leveritt
824be82f94 Adds a note for React use of CoText 2025-05-09 20:00:38 +01:00
Benjamin S. Leveritt
8a9ef8ac78 Update chat-rn-expo-clerk with shorthands 2025-05-09 20:00:38 +01:00
Benjamin S. Leveritt
5fb2f959f1 Fix comment 2025-05-09 20:00:38 +01:00
Benjamin S. Leveritt
7a900d43f3 Fix formatting 2025-05-09 20:00:38 +01:00
Benjamin S. Leveritt
c8624d56d2 Updates richtext with shorthands 2025-05-09 20:00:38 +01:00
Benjamin S. Leveritt
8ed7c3947d Updates version-history with shorthands 2025-05-09 20:00:38 +01:00
Benjamin S. Leveritt
ec0e61a442 Updates todo with shorthands 2025-05-09 20:00:38 +01:00
Benjamin S. Leveritt
824d417d4e Updates form with shorthands 2025-05-09 20:00:38 +01:00
Benjamin S. Leveritt
9f1ce81e09 Updates chat-vue with shorthands 2025-05-09 20:00:38 +01:00
Benjamin S. Leveritt
48b32b6a72 Updates chat-rn with shorthands 2025-05-09 20:00:38 +01:00
Benjamin S. Leveritt
03fec5f1b3 Updates chat with new CoPlainText shorthands 2025-05-09 20:00:38 +01:00
Benjamin S. Leveritt
cdd7ac98cc Update examples/form/src/OrderForm.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-09 20:00:38 +01:00
Benjamin S. Leveritt
8218a272ee Update chat-rn-expo-clerk to CoPlainText 2025-05-09 20:00:38 +01:00
Benjamin S. Leveritt
25d146ead8 Update chat-vue to CoPlainText 2025-05-09 20:00:38 +01:00
Benjamin S. Leveritt
3f4d493286 Update chat-rn to CoPlainText 2025-05-09 20:00:38 +01:00
Benjamin S. Leveritt
d476b06d0e Update version-history to CoPlainText 2025-05-09 20:00:38 +01:00
Benjamin S. Leveritt
22baf1f547 Update todo to CoPlainText
Replace text with CoPlainText in todo
2025-05-09 20:00:38 +01:00
Benjamin S. Leveritt
d6ec873b1e Update form to CoPlainText 2025-05-09 20:00:38 +01:00
Benjamin S. Leveritt
160b30406b Update chat to CoPlainText 2025-05-09 20:00:38 +01:00
Guido D'Orsi
3e473eff50 chore: skip flaky test 2025-05-09 18:44:36 +02:00
Guido D'Orsi
47ad35085e Merge pull request #2179 from garden-co/changeset-release/main
Version Packages
2025-05-09 18:42:53 +02:00
github-actions[bot]
0b0d06ea44 Version Packages 2025-05-09 16:40:20 +00:00
Guido D'Orsi
ec546b4cd6 fix(svelte): fix return type of the id callback to accept undefined values 2025-05-09 18:38:24 +02:00
Guido D'Orsi
cadc5ef913 Merge pull request #2177 from garden-co/changeset-release/main
Version Packages
2025-05-09 18:14:32 +02:00
github-actions[bot]
f961dedbd0 Version Packages 2025-05-09 16:11:48 +00:00
Guido D'Orsi
c7b27e902b Merge pull request #2110 from garden-co/filestream-metadata
feat(FileStream): add getMetadata to easily get file metadata without having to process all the file chunks
2025-05-09 18:07:15 +02:00
Guido D'Orsi
b1cbc9283a Merge pull request #2174 from garden-co/feat/svelte-classes
feat(svelte):  new CoState and AccountCoState APIs
2025-05-09 18:05:02 +02:00
Guido D'Orsi
f2c7c20a75 Merge pull request #2176 from garden-co/changeset-release/main
Version Packages
2025-05-09 17:58:47 +02:00
Guido D'Orsi
53705d0ac1 test: fix file-share-svelte e2e test 2025-05-09 17:47:35 +02:00
github-actions[bot]
4031b7532f Version Packages 2025-05-09 15:41:11 +00:00
Guido D'Orsi
5ac43c300d Merge pull request #2123 from garden-co/repro-rnquickcrypto-chat-signature-issue
Fix the InvalidSignature issues on RNQuickCrypto
2025-05-09 17:39:16 +02:00
Guido D'Orsi
064174501e Merge remote-tracking branch 'origin/main' into repro-rnquickcrypto-chat-signature-issue 2025-05-09 17:21:32 +02:00
Guido D'Orsi
b0c2a5a53f changeset 2025-05-09 17:20:09 +02:00
Guido D'Orsi
24d9a6b7e1 chore: cleanup 2025-05-09 17:16:24 +02:00
Guido D'Orsi
e270295387 chore: add comments to ignore binding_property_non_reactive 2025-05-09 17:13:13 +02:00
Guido D'Orsi
67fa7be0d4 feat(svelte): react to id changes b accepting an id callback, remove the version state 2025-05-09 16:40:17 +02:00
Guido D'Orsi
3431076350 feat: add CoState and AccountCoState class APIs to subscribe CoValues for better integration with Svelte runes 2025-05-09 15:51:35 +02:00
Guido D'Orsi
e8092141e8 Merge pull request #2175 from garden-co/improvement/inspector-in-starter
embed inspector component in react starter app
2025-05-09 15:29:25 +02:00
Guido D'Orsi
a2aac6791d Merge pull request #2171 from garden-co/docs/vanilla-inspector
update inspector docs to include vanilla, vue, svelte
2025-05-09 15:29:14 +02:00
Trisha Lim
aebd1519c3 embed inspector component in react starter app 2025-05-09 14:00:29 +01:00
Trisha Lim
a9cf6da27a add docs for changing roles and removing members in a Group 2025-05-09 13:47:00 +01:00
Guido D'Orsi
2e0378639c fix env access 2025-05-09 14:42:19 +02:00
Trisha Lim
5ba76eeab5 update inspector docs to include vanilla, vue, svelte 2025-05-09 13:31:04 +01:00
Guido D'Orsi
279fc1c390 test: skip flaky test on CI 2025-05-08 21:32:44 +02:00
Brad Anderson
865b0e81a7 chore: remove debug stuffs 2025-05-08 15:32:07 -04:00
Guido D'Orsi
829ab08873 Merge pull request #2165 from garden-co/changeset-release/main
Version Packages
2025-05-08 21:28:50 +02:00
github-actions[bot]
2c9b08a080 Version Packages 2025-05-08 19:27:22 +00:00
Guido D'Orsi
48bda8854f Merge pull request #2163 from garden-co/vanilla-inspector
feat: package jazz-inspector as custom element
2025-05-08 21:24:59 +02:00
Brad Anderson
2858db7419 fix: bump RNQC to version with verify fix 2025-05-08 15:18:40 -04:00
Guido D'Orsi
96ed9adf59 Merge pull request #2142 from garden-co/feat/simplify-accept-invite
feat: simplified the acceptInvite method and cleaned the coValue transfer methods
2025-05-08 18:21:03 +02:00
Guido D'Orsi
5e4905ca99 test: add sync invite tests 2025-05-08 18:18:03 +02:00
Guido D'Orsi
1d4949b70c Merge remote-tracking branch 'origin/main' into feat/simplify-accept-invite 2025-05-08 18:08:02 +02:00
Guido D'Orsi
7dacfd03f9 Merge remote-tracking branch 'origin/main' into vanilla-inspector 2025-05-08 18:05:55 +02:00
Guido D'Orsi
bd4191520e Merge pull request #2164 from garden-co/fix/sync-browser-flaky-test
test: fix the flakiness on a browser integration test
2025-05-08 18:05:19 +02:00
Guido D'Orsi
e3dfb1b06e test: fix the flakiness on a browser integration test 2025-05-08 18:05:06 +02:00
Guido D'Orsi
7de210f225 feat: package jazz-inspector as custom element 2025-05-08 17:48:49 +02:00
Brad Anderson
d456a8c124 fix: regex to stop dupes (for realz) 2025-05-08 10:58:51 -04:00
Guido D'Orsi
1676ff852a fix: remove a broken JSON.stringify from expectCoValueLoaded error 2025-05-08 16:14:24 +02:00
Guido D'Orsi
2217e12ba6 clearUserCredentials 2025-05-08 10:08:27 -04:00
Guido D'Orsi
a8af6efe1a Merge pull request #2162 from garden-co/changeset-release/main
Version Packages
2025-05-08 16:06:25 +02:00
Guido D'Orsi
519eda0ac2 fix: skip profileID check 2025-05-08 09:59:30 -04:00
Brad Anderson
a8725abfb4 fix: XCode 16.3 bug fix, RNQuickCrypto remove dead code 2025-05-08 09:40:19 -04:00
Guido D'Orsi
2229e5a64f Create a repro for the InvalidSignature issues on RNQuickCrypto 2025-05-08 09:40:18 -04:00
github-actions[bot]
ee11b30d3a Version Packages 2025-05-08 13:38:09 +00:00
Guido D'Orsi
ef78d58729 Merge pull request #2155 from garden-co/feat/missing-profile
fix(auth): removed throw error when the profile is unavailable after a login
2025-05-08 15:36:09 +02:00
Guido D'Orsi
40e2dd0ece Merge pull request #2159 from garden-co/feat/storage-sync
fix: wait for storage sync before resolving the new account creation
2025-05-08 15:35:41 +02:00
Benjamin S. Leveritt
b60c7c1ce0 Merge pull request #2156 from garden-co/play-selection-co-literal-jazz-paper-scissors
Changes to co.literal for playSelection
2025-05-08 14:22:01 +01:00
Benjamin S. Leveritt
69cd362114 Merge pull request #2160 from garden-co/coplaintext-shorthands
CoPlainText shorthands
2025-05-08 14:19:31 +01:00
Benjamin S. Leveritt
526bf0a3cf Adds better output for Number(CoPlainText) 2025-05-08 13:57:59 +01:00
Benjamin S. Leveritt
439f0fe57e Add changeset 2025-05-08 13:30:07 +01:00
Benjamin S. Leveritt
686433f42e Adds reading as string shorthand
Dropping need for `.toString()` in situations where a string is expected
2025-05-08 13:29:54 +01:00
Benjamin S. Leveritt
3ba258e181 Adds owner shorthand to create and constructor 2025-05-08 13:27:55 +01:00
Guido D'Orsi
d6e143e4d5 fix: wait for storage sync before resolving the new account creation 2025-05-08 14:24:11 +02:00
Guido D'Orsi
3e6229da4d feat(waitForSync): skip closed peers and not subscribed client peers 2025-05-08 14:22:55 +02:00
Guido D'Orsi
adfc9a6032 feat: make waitForSync work on storage peers by handling optimistic/known state 2025-05-08 14:19:07 +02:00
Benjamin S. Leveritt
1a6879b1c2 Fix selection in worker 2025-05-08 10:10:45 +01:00
Benjamin S. Leveritt
172fec56f6 Changes to co.literal for playSelection 2025-05-08 10:06:32 +01:00
Guido D'Orsi
13892071f5 fix(auth): removed throw error when the profile is unavailable after a login 2025-05-08 10:45:23 +02:00
Guido D'Orsi
b62d75b847 Merge pull request #2149 from garden-co/changeset-release/main
Version Packages
2025-05-07 18:31:36 +02:00
github-actions[bot]
beafbd3088 Version Packages 2025-05-07 16:29:39 +00:00
Guido D'Orsi
653d8ba69f Merge pull request #2140 from garden-co/guido/rn-e2e-test
test: cover join chat in the rn e2e tests
2025-05-07 18:27:56 +02:00
Guido D'Orsi
6c23dab790 Merge pull request #2148 from garden-co/fix/autoload
fix(subscribe): fix error management and autoload on $each
2025-05-07 18:27:42 +02:00
Guido D'Orsi
80530a4065 fix(subscribe): fix error management and autoload on 2025-05-07 18:24:01 +02:00
Guido D'Orsi
e14e61f7d9 feat: simplified the acceptInvite method and cleaned the coValue transfer methods 2025-05-07 16:23:57 +02:00
Guido D'Orsi
2ba5ea684e Merge pull request #2089 from garden-co/changeset-release/main
Version Packages
2025-05-07 14:37:04 +02:00
Guido D'Orsi
a8466946d3 test: cover join chat in the rn e2e tests 2025-05-07 14:25:56 +02:00
github-actions[bot]
105b240076 Version Packages 2025-05-07 11:36:04 +00:00
Guido D'Orsi
097dd8a646 Update large-rings-help.md 2025-05-07 13:34:23 +02:00
Guido D'Orsi
138dd7ee8b Merge pull request #2139 from garden-co/feat/simplify-localnode-auth
feat: simplify LocalNode account creation flow
2025-05-07 13:30:25 +02:00
Guido D'Orsi
5b17085b30 test(e2e-rn): add an initial cleanup step 2025-05-07 13:19:32 +02:00
Guido D'Orsi
cb7bdffabe test(cloudflare): wait for the account to be uploaded before starting the worker 2025-05-07 12:54:48 +02:00
Guido D'Orsi
90892523da feat: simplify LocalNode account creation flow 2025-05-07 11:04:52 +02:00
Guido D'Orsi
693a058890 chore: fix type error in sqlite test 2025-05-06 23:19:48 +02:00
Guido D'Orsi
4d20f1bcfc Merge pull request #2114 from garden-co/perf/storage
Perf: optimize dependency load from storage and skip self sync on storage peers
2025-05-06 22:57:51 +02:00
Guido D'Orsi
36bf3924ff Merge pull request #2015 from garden-co/feat/new-subscription
A new subscription engine for jazz-tools
2025-05-06 22:57:37 +02:00
Guido D'Orsi
6b6fc8b31a chore: remove a console.log 2025-05-06 22:56:22 +02:00
Anselm
1649f06667 Allow immediately unsubscribing from CoValueCore changes (and use that) 2025-05-06 17:37:38 +01:00
Anselm
e9bd290dec Merge branch 'main' into feat/new-subscription 2025-05-06 17:35:17 +01:00
Guido D'Orsi
9d76292db5 Merge pull request #2125 from garden-co/fix/expect-covalue-loaded
fix(sync): avoid triggering fatal errors when syncing without all the deps loaded
2025-05-06 17:47:21 +02:00
Guido D'Orsi
66373bade3 fix(sync): avoid triggering fatal errors when syncing without all the deps loaded 2025-05-06 17:42:34 +02:00
Guido D'Orsi
40118a0b2c chore: remove console.log 2025-05-06 17:32:28 +02:00
Anselm Eickhoff
86b57415b8 Merge pull request #2074 from garden-co/refactor/combine-covalue-core-and-state
Combine CoValueCore and CoValueState Part 1 & 2
2025-05-06 15:55:02 +01:00
Guido D'Orsi
cdbc37a144 fix: add dist/crypto to the exports 2025-05-06 16:16:44 +02:00
Benjamin S. Leveritt
e996c71e83 Merge pull request #2121 from garden-co/2120-fix-covalues-crud-links
2120-fix-covalues-crud-links
2025-05-06 15:01:16 +01:00
Anselm Eickhoff
0f704a2330 Merge pull request #2108 from garden-co/refactor/simplify-localnode-bootstrap-and-more
Simplify LocalNode bootstrap and more
2025-05-06 14:38:52 +01:00
Guido D'Orsi
2f206e7613 chore: clean up changes from cojson 2025-05-06 15:18:37 +02:00
Guido D'Orsi
761759c893 chore: changeset 2025-05-06 15:02:40 +02:00
Guido D'Orsi
15c57e24ad test: cover subscribe updates on permissions change 2025-05-06 14:59:39 +02:00
Benjamin S. Leveritt
580e2577c9 Fix SchemaUnions 2025-05-06 13:45:55 +01:00
Guido D'Orsi
3804198c02 test: cover CoMap.Record and unsubscribe on refs change 2025-05-06 14:42:23 +02:00
Guido D'Orsi
537d56a30e chore: code cleanup 2025-05-06 14:41:33 +02:00
Benjamin S. Leveritt
5524d3e0cb Unneeded error squash 2025-05-06 13:18:03 +01:00
Anselm Eickhoff
3d2682e3a7 Merge pull request #2109 from garden-co/refactor/combine-covalue-core-and-state-2
Combine CoValueCore and CoValueState Part Part 2
2025-05-06 13:15:38 +01:00
Benjamin S. Leveritt
0c131f3af4 Last bits 2025-05-06 13:07:11 +01:00
Benjamin S. Leveritt
fada6b0eb5 Fix FileStreams section 2025-05-06 13:00:22 +01:00
Benjamin S. Leveritt
c8b94475cd Fix CoFeeds section 2025-05-06 12:58:13 +01:00
Benjamin S. Leveritt
162a024345 Fix CoLists section 2025-05-06 12:54:53 +01:00
Benjamin S. Leveritt
7cd195b3a4 Fix CoMaps section 2025-05-06 12:52:38 +01:00
Benjamin S. Leveritt
ccad5a3c70 Merge pull request #2042 from garden-co/2041-react-installation-docs
Adds React installation doc
2025-05-06 12:28:10 +01:00
Benjamin S. Leveritt
4268d189cb Adds link to useCoState 2025-05-06 12:27:37 +01:00
Anselm
d48712986f Merge branch 'refactor/simplify-localnode-bootstrap-and-more' into refactor/combine-covalue-core-and-state-2 2025-05-06 12:08:42 +01:00
Anselm
ba2fda5de1 Use ephemeral nodes again instead of switching control 2025-05-06 12:00:45 +01:00
Guido D'Orsi
b1d26f23d6 test: cover push on deeply loaded lists 2025-05-06 12:56:57 +02:00
Sammii
e7766746d9 Merge pull request #2118 from garden-co/fix/og-image-2-font-api-route
switching out local font for google fonts font
2025-05-06 11:40:48 +01:00
Anselm
7c64d104a6 Merge branch 'refactor/combine-covalue-core-and-state' into refactor/simplify-localnode-bootstrap-and-more 2025-05-06 11:39:42 +01:00
Anselm
1870a1268a Explain CoValueCore.verified 2025-05-06 11:31:50 +01:00
Anselm
a8222368d0 Faster implementation of VerifiedState.clone() 2025-05-06 11:20:07 +01:00
Sammii
72d11ce003 switching out local font for google fonts font 2025-05-06 11:18:35 +01:00
Guido D'Orsi
5fbf9770d2 test: cover more logic on coList and coMap 2025-05-06 11:42:10 +02:00
Trisha Lim
707dedb33e Merge pull request #2115 from garden-co/fix/toc-headings
fix: hidden headings are showing in TOC
2025-05-06 10:33:29 +01:00
Guido D'Orsi
86d42d9e49 chore: add comments 2025-05-06 10:31:56 +02:00
Guido D'Orsi
64f01915f4 Revert "fix(useCoState): defer updates to avoid getting the invalid mutation error when doing autoload"
This reverts commit c75a3042ce.
2025-05-06 10:26:00 +02:00
Guido D'Orsi
9a8fd2ce47 perf: do not trigger updates when autoloading available refs 2025-05-06 10:25:24 +02:00
Guido D'Orsi
4dc7cdb4e6 fix: coFeed account autoload 2025-05-06 10:11:15 +02:00
Guido D'Orsi
84b993944d chore: clanup 2025-05-05 18:46:11 +02:00
Guido D'Orsi
fa064443a0 chore: clanup 2025-05-05 18:45:39 +02:00
Trisha Lim
32e9678394 fix: hidden headings are showing in TOC 2025-05-05 17:10:08 +01:00
Guido D'Orsi
b1850efd7f chore: rename CoValueResolutionNode into SubscriptionScope 2025-05-05 18:05:10 +02:00
Guido D'Orsi
922e3c8244 chore: revert processedChangesId 2025-05-05 18:00:54 +02:00
Guido D'Orsi
1c063455d1 chore: revert timeout on click 2025-05-05 17:58:41 +02:00
Guido D'Orsi
35abeba323 Merge branch 'main' into feat/new-subscription 2025-05-05 17:58:12 +02:00
Guido D'Orsi
84f623097f chore: add hidden project generation page 2025-05-05 17:56:43 +02:00
Guido D'Orsi
73015a3438 fix: remove singleTabOPFS from the storage types 2025-05-05 17:55:20 +02:00
Guido D'Orsi
7c3bf78fef chore: split subscribe module 2025-05-05 17:33:53 +02:00
Guido D'Orsi
68cb6064a5 chore: simplify autoload code 2025-05-05 17:15:44 +02:00
Guido D'Orsi
992d5e572e feat: polish code and fix the typescript errors 2025-05-05 16:41:55 +02:00
Guido D'Orsi
c75a3042ce fix(useCoState): defer updates to avoid getting the invalid mutation error when doing autoload 2025-05-05 16:41:11 +02:00
Guido D'Orsi
fa8b20899d test(upload): increase the timeout on the share file button 2025-05-05 16:15:58 +02:00
Guido D'Orsi
f24cad1909 perf(sync): skip self-sync when getting content from storage peers 2025-05-05 16:06:34 +02:00
Guido D'Orsi
8b2df0e5e2 perf(storage): optimized the dependency push from storage to send a given dependency only once 2025-05-05 16:05:05 +02:00
Guido D'Orsi
f93222079f fix(coList): correctly copy state when calling rebuildFromCore 2025-05-05 15:44:50 +02:00
Guido D'Orsi
514f4c9a72 test(permissions): skip tests on invite roles group key revelation 2025-05-05 15:26:42 +02:00
Guido D'Orsi
02a240ce75 feat(FileStream): add getMetadata to easily get file metadata 2025-05-05 11:20:10 +02:00
Guido D'Orsi
6b781cf4a6 feat(RawBinaryCoStreamView): add getBinaryStreamInfo to retrieve file info without processing all the chunks 2025-05-05 11:18:42 +02:00
Anselm
d5daf060c9 Merge CoValueStore into LocalNode and more cleanup 2025-05-04 15:13:01 +01:00
Anselm
604cd4e3a9 Merge CoValueState into CoValueCore 2025-05-04 14:33:27 +01:00
Anselm
3446b38f69 Provide core instead of content to CoValueCore listeners 2025-05-04 11:54:31 +01:00
Anselm
de12b03d3f use nodeWithRandomAgentAndSessionID in more tests 2025-05-04 11:49:41 +01:00
Anselm
c3db5cf0b5 Get rid of permission/key tracing and debug logs 2025-05-04 11:44:30 +01:00
Anselm
e7f2521b41 Fix recursion issues and all tests but one 2025-05-04 11:37:57 +01:00
Anselm
0c6cd571c9 Fix types in packages depending on cojson 2025-05-04 09:44:15 +01:00
Anselm
e1d56a45f7 Simplify LocalNode bootstrap and more 2025-05-03 16:41:50 +01:00
Anselm
e40e01fce0 Make core.verified nullable instead of core itself 2025-05-03 13:50:30 +01:00
Guido D'Orsi
d70343d864 chore(subscribe): code cleanup 2025-05-02 23:32:25 +02:00
Guido D'Orsi
160ab768e9 feat(storage): deduplicate dependency load 2025-05-02 23:31:48 +02:00
Guido D'Orsi
4ff03f67d9 feat: skip self-sync on new content for storage peers 2025-05-02 23:31:14 +02:00
Guido D'Orsi
5a81adffec feat: make the unavailable state transitive 2025-05-02 22:39:39 +02:00
Guido D'Orsi
f4fdb3c14e Merge pull request #2073 from garden-co/fix/inspector-docs
fix(docs): hide inspector widget docs for non-react
2025-05-02 18:59:37 +02:00
Guido D'Orsi
d001144a87 fix: update value when raw changes 2025-05-02 15:58:52 +02:00
Trisha Lim
ded473b75e Merge pull request #2087 from garden-co/fix/code-snippet-overflow
prevent horizontal scroll on code sample in landing page
2025-05-02 14:58:51 +01:00
Trisha Lim
602c34b0f2 Merge pull request #2080 from garden-co/fix/docs-content-overflow
fix(docs): body wider than page container
2025-05-02 14:58:19 +01:00
Guido D'Orsi
77cf06945a Merge remote-tracking branch 'origin/main' into feat/new-subscription 2025-05-02 14:25:56 +02:00
Guido D'Orsi
61f39bb56f Merge pull request #2061 from garden-co/fix/redundant-messages
fix(sync): remove redundant content messages when loading a coValue from multiple peers
2025-05-02 14:25:01 +02:00
Trisha Lim
7cc51b77f3 prevent horizontal scroll on code sample in landing page 2025-05-02 12:18:30 +01:00
Trisha Lim
bf303d58e3 fix(docs): body wider than page container 2025-05-02 11:57:22 +01:00
Sammii
def5c474e6 Merge pull request #2054 from garden-co/add-docs-og-image 2025-05-02 11:37:59 +01:00
Sammii
c81dca23ad catching empty toc 2025-05-02 10:55:35 +01:00
Guido D'Orsi
b470f63f86 chore: changeset 2025-05-02 11:54:47 +02:00
Anselm
5c7072bf6e Merge remote-tracking branch 'origin/fix/redundant-messages' into refactor/combine-covalue-core-and-state 2025-05-02 10:39:47 +01:00
Guido D'Orsi
bd62b1342a feat: add loadRequestSent to more surgically avoid to send a load request twice on the same peer in the sync protocol 2025-05-02 11:38:57 +02:00
Trisha Lim
af314e8584 hide inspector widget docs for non-react 2025-05-02 10:28:16 +01:00
Anselm
8ad1878f86 Fix biomes trailing comma 2025-05-02 10:26:47 +01:00
Anselm
2fe5cd1326 Split verified state logic out of CoValueCore 2025-05-02 10:23:29 +01:00
pax
2ae0b8df0d Merge pull request #2055 from garden-co/changeset-release/main
Version Packages
2025-05-01 16:23:16 +03:00
github-actions[bot]
77dc51d466 Version Packages 2025-05-01 13:19:08 +00:00
pax
bd645db4cc Merge pull request #2071 from garden-co/create-jazz-app-git-flag
create-jazz-app --git flag
2025-05-01 16:17:01 +03:00
pax-k
af46c68a4a chore: changest 2025-05-01 16:15:06 +03:00
pax-k
fb58cb9299 feat(create-jazz-app): option to pass git init boolean flag 2025-05-01 16:11:32 +03:00
Anselm
b3605c0c22 Create folder for coValueCore before breaking it into pieces 2025-05-01 12:41:45 +01:00
James Vickery
63fb80e50d Merge pull request #2069 from garden-co/jmsv/jazz-richtext-prosemirror-custom-schema
createJazzPlugin support custom ProseMirror schema
2025-05-01 11:56:35 +01:00
James Vickery
133b8abcbe createJazzPlugin support custom ProseMirror schema 2025-05-01 10:35:16 +01:00
Guido D'Orsi
e272849026 chore: add comment 2025-04-30 23:37:27 +02:00
Guido D'Orsi
c4fdfeaa48 fix(peer): disable crashOnClose while doing the gracefulShutdown 2025-04-30 23:33:21 +02:00
Guido D'Orsi
3f0859c3f2 fix(sync): remove redundant content messages when loading a coValue from multiple peers 2025-04-30 23:16:30 +02:00
Sammii
6e286bac7e creating styled open graph images for docs topics and subtopics 2025-04-30 18:00:02 +01:00
Benjamin S. Leveritt
235aab15b6 Adds a bit more context 2025-04-30 15:41:12 +01:00
Benjamin S. Leveritt
a440121ac9 Tweaks copy 2025-04-30 15:31:42 +01:00
Guido D'Orsi
6209bd2285 Merge pull request #2057 from garden-co/feat/resolve-load-earlier
feat: resolve load earlier and move the retry in LocalNode
2025-04-30 16:25:53 +02:00
Benjamin S. Leveritt
8ad9fc57cc Simplifies sections 2025-04-30 15:14:50 +01:00
Benjamin S. Leveritt
a763b947b8 Remove the Introduction header 2025-04-30 15:14:50 +01:00
Benjamin S. Leveritt
026a26da3c Adds React installation doc 2025-04-30 15:14:50 +01:00
Benjamin S. Leveritt
d8d1addf2b Merge pull request #2056 from garden-co/2049-show-how-to-supply-owner-in-filestream-docs
2049-show-how-to-supply-owner-in-filestream-docs
2025-04-30 15:13:49 +01:00
Guido D'Orsi
937a34c76e test(prosemirror): skip failing test 2025-04-30 16:13:42 +02:00
Guido D'Orsi
c6142a1f64 chore: cleanup 2025-04-30 16:06:36 +02:00
Guido D'Orsi
f3fb2dee52 Merge branch 'feat/resolve-load-earlier' into feat/new-subscription 2025-04-30 16:00:02 +02:00
Guido D'Orsi
15996ced64 Merge remote-tracking branch 'origin/main' into feat/resolve-load-earlier 2025-04-30 15:57:38 +02:00
Guido D'Orsi
9fb98e2114 feat: resolve load earlier and move the retry in LocalNode 2025-04-30 15:45:52 +02:00
Benjamin S. Leveritt
f55f779ea1 Adds owner to FileStream examples
Adds twoslash too
2025-04-30 14:36:26 +01:00
Benjamin S. Leveritt
18c98fc3f5 Merge pull request #2053 from garden-co/2052-match-filestreamsubscribe-signatures-with-other-covalues
Update FileStream.subscribe signature to allow omitting options
2025-04-30 14:05:57 +01:00
Guido D'Orsi
41b286b672 Merge pull request #2051 from garden-co/feat/incremental-processing
feat(colist): re-introduce incremental processing
2025-04-30 14:51:25 +02:00
Sammii
3c97e8e7f2 Merge branch 'main' into add-docs-og-image 2025-04-30 13:33:07 +01:00
Sammii
7996a2aa9c og image docs 2025-04-30 13:30:30 +01:00
Benjamin S. Leveritt
ba944c20ed Update subscribe signature + tests 2025-04-30 13:28:07 +01:00
Guido D'Orsi
0b89fadfdd feat(colist): re-introduce incremental processing 2025-04-30 13:12:43 +02:00
Guido D'Orsi
1e50cebf55 test(coList): add failing tests on the append operation 2025-04-30 11:33:52 +02:00
Trisha Lim
ca8c5c0b02 Merge pull request #2010 from garden-co/docs/update-examples-page
update examples page
2025-04-30 09:33:15 +01:00
Benjamin S. Leveritt
a0aa261cab Merge pull request #1998 from garden-co/1962-add-cotext-docs
Adds CoText doc
2025-04-30 08:16:11 +01:00
Benjamin S. Leveritt
5d3d11e87c Merge pull request #2016 from garden-co/1862-react-provider-doc
1862-react-provider-doc
2025-04-30 07:01:09 +01:00
Benjamin S. Leveritt
4a9ed21ea2 Fix links 2025-04-29 20:11:22 +01:00
Guido D'Orsi
2ddfc9d92b Merge pull request #2017 from garden-co/changeset-release/main
Version Packages
2025-04-29 18:43:06 +02:00
github-actions[bot]
a032fda936 Version Packages 2025-04-29 16:34:56 +00:00
Guido D'Orsi
c6fb8dc845 fix: handle null values on msg.id 2025-04-29 18:32:08 +02:00
Guido D'Orsi
bf399d72c1 feat(subscribe): improve error logging, spec compliance 2025-04-29 18:31:14 +02:00
Guido D'Orsi
60fefe8158 Merge remote-tracking branch 'origin/main' into feat/new-subscription 2025-04-29 16:24:53 +02:00
Guido D'Orsi
9be66e196c feat(subscribe): improve error logging, spec compliance 2025-04-29 16:24:43 +02:00
Guido D'Orsi
04d96e52e0 fix: handle null values on msg.id 2025-04-29 16:24:43 +02:00
Guido D'Orsi
5b483dac6f feat: optimize the resolution of the loading states 2025-04-29 16:24:43 +02:00
Guido D'Orsi
fadb4bf76e feat(RawCoList): incremental processing 2025-04-29 16:17:37 +02:00
Guido D'Orsi
98a25b1fd6 feat(todo-example): add a page to generate random projects with many tasks 2025-04-29 16:04:10 +02:00
Trisha Lim
69499e3965 lint 2025-04-29 11:56:01 +01:00
Trisha Lim
d67ced14c4 Merge pull request #1988 from garden-co/tobiaslins-patch-1
[expo] Fix CSS import when using `create-jazz-app`
2025-04-29 11:01:16 +01:00
Trisha Lim
95ae69ead2 add coplaintext to rich text example card 2025-04-29 10:07:44 +01:00
Trisha Lim
4170f13858 jazz-paper-scissors: move api key, add lint, change demo url 2025-04-29 10:07:44 +01:00
Trisha Lim
45e4a77afb lint fix 2025-04-29 10:07:44 +01:00
Trisha Lim
603538e255 add jazz-paper-scissors to examples page 2025-04-29 10:07:44 +01:00
Trisha Lim
afb49f3666 update richtext readme 2025-04-29 10:07:44 +01:00
Trisha Lim
c6de2ce8b8 add richtext example to examples page 2025-04-29 10:07:44 +01:00
Benjamin S. Leveritt
cdc4229df7 Add example app 2025-04-28 22:36:09 +01:00
Benjamin S. Leveritt
fa19f7471f Fix component name 2025-04-28 21:54:18 +01:00
Benjamin S. Leveritt
75f3af2cc1 Adds more config options 2025-04-28 21:48:32 +01:00
Benjamin S. Leveritt
5ae77ee57e Adds React Provider doc 2025-04-28 17:39:35 +01:00
Guido D'Orsi
6df5d72dfd fix: Account deep loading 2025-04-28 18:23:49 +02:00
Guido D'Orsi
b91b33e9be feat: pass the subscribe.test.ts 2025-04-28 18:06:00 +02:00
Guido D'Orsi
fd7226585b Merge remote-tracking branch 'origin/main' into feat/new-subscription 2025-04-28 17:17:08 +02:00
Guido D'Orsi
712b67b782 fix: improve permission checks 2025-04-28 14:29:25 +02:00
Guido D'Orsi
88ea30a6f8 Merge pull request #2013 from garden-co/changeset-release/main
Version Packages
2025-04-28 14:12:53 +02:00
github-actions[bot]
f4cbe395d5 Version Packages 2025-04-28 12:09:21 +00:00
Guido D'Orsi
c59fb5dc1f fix: complete the incremental view revert 2025-04-28 14:07:15 +02:00
Guido D'Orsi
c712ef28e8 fix(coList): revert incremental processing 2025-04-28 13:20:09 +02:00
Guido D'Orsi
c62a4a1c69 Revert "perf(colist): process the content incrementally"
This reverts commit e05dff9c32.
2025-04-28 13:15:56 +02:00
Benjamin S. Leveritt
87a7cf202f Tweak copy 2025-04-28 11:39:27 +01:00
Benjamin S. Leveritt
9a9b424ff2 Add note about co.strings 2025-04-28 11:39:27 +01:00
Benjamin S. Leveritt
dfe6146aa3 Add Vue example 2025-04-28 11:39:27 +01:00
Benjamin S. Leveritt
8b26728914 Refinements 2025-04-28 11:39:27 +01:00
Benjamin S. Leveritt
f5003ac8ec Add more examples 2025-04-28 11:39:26 +01:00
Benjamin S. Leveritt
ee71ba99e2 Adds CoText doc
Closes #1962
2025-04-28 11:39:26 +01:00
Guido D'Orsi
56c7a2dda2 feat: initial commit of the new subscribe 2025-04-26 11:10:04 +02:00
Guido D'Orsi
d28ce598e2 Merge pull request #2003 from garden-co/changeset-release/main
Version Packages
2025-04-26 10:24:45 +02:00
Guido D'Orsi
e050f17945 Merge remote-tracking branch 'origin/main' into feat/new-subscription 2025-04-25 16:09:19 +02:00
github-actions[bot]
14475991c8 Version Packages 2025-04-25 12:39:39 +00:00
Guido D'Orsi
15d9ec4b38 chore: small cleanup on startPeerReconciliation 2025-04-25 14:37:34 +02:00
Guido D'Orsi
f911545ae3 Merge pull request #2006 from garden-co/chore/simplify-coValue-sync
chore: clean up syncCoValue code and remove the peer role
2025-04-25 13:55:00 +02:00
Guido D'Orsi
ad71530cc0 Merge pull request #2005 from garden-co/feat/no-sync-promises
feat(sync): make the incoming messages handling in the sync manager syncronous
2025-04-25 13:54:35 +02:00
Guido D'Orsi
c33c02691f chore: clean up syncCoValue code and remove the peer role 2025-04-25 13:22:02 +02:00
Guido D'Orsi
51c19770a8 feat: remove unused promises in PeerState outgoing queue 2025-04-25 13:08:20 +02:00
Guido D'Orsi
5c2c7d4188 feat(sync): make the incoming messages handling in the sync manager syncronous 2025-04-25 12:36:31 +02:00
Benjamin S. Leveritt
334d27d53d Merge pull request #2002 from garden-co/2001-fix-unused-vars-in-jazz-paper-scissors
Removes unused vars
2025-04-25 08:19:17 +01:00
Benjamin S. Leveritt
a5396a42ce Merge pull request #1989 from garden-co/fix-rn-metro-docs
docs(metro): fix RN docs for metro config
2025-04-24 15:31:12 +01:00
Guido D'Orsi
8a60897086 chore: remove ACCESS_FROM debug code 2025-04-24 16:09:49 +02:00
Benjamin S. Leveritt
5cfe38d547 Removes unused vars 2025-04-24 13:43:25 +01:00
Benjamin S. Leveritt
3f7aa34726 Merge pull request #1996 from garden-co/1995-add-ownership-sections-to-all-the-covalue-docs
Add Ownership sections to CoValue docs
2025-04-24 13:11:52 +01:00
Trisha Lim
008750d401 Merge pull request #1997 from garden-co/docs/framework-component
add Framework component to show framework name
2025-04-24 12:27:54 +01:00
Trisha Lim
72708f82ea add Framework component to show framework name 2025-04-24 12:18:24 +01:00
Benjamin S. Leveritt
30f65f1c91 Add Ownership sections to CoValue docs 2025-04-24 12:06:52 +01:00
Meg Culotta
67d55ce0ee update styles to handle mobile devices (#1944)
* update styles to handle mobile devices

* handle twoslash overflow

---------

Co-authored-by: Margaret Culotta <mculotta@Margarets-MacBook-Air.local>
Co-authored-by: Trisha Lim <hello@trishalim.com>
2025-04-24 09:11:36 +01:00
Trisha Lim
e887f37713 Merge pull request #1994 from garden-co/fix/code-copy
fix(docs): exclude twoslash popovers from getting copied
2025-04-24 09:08:55 +01:00
Trisha Lim
82a515d493 fix(docs): exclude twoslash popovers from getting copied 2025-04-24 08:57:00 +01:00
pax-k
bd94012507 chore: changeset 2025-04-23 23:00:22 +03:00
pax-k
e1dbab1517 chore: changeset 2025-04-23 22:58:11 +03:00
Guido D'Orsi
b675249960 Merge pull request #1990 from garden-co/changeset-release/main
Version Packages
2025-04-23 21:49:44 +02:00
github-actions[bot]
05198e4181 Version Packages 2025-04-23 19:48:47 +00:00
Guido D'Orsi
ec9cb40fa4 fix: remove .every() call on iterator to fix compat issues with React Native 2025-04-23 21:46:27 +02:00
pax-k
dafea6039b docs(metro): fix RN docs for metro config 2025-04-23 22:31:50 +03:00
Tobias Lins
ccc5f89ed7 Fix css path 2025-04-23 21:18:22 +02:00
Guido D'Orsi
fae9b521b8 Merge pull request #1984 from garden-co/changeset-release/main
Version Packages
2025-04-23 19:47:23 +02:00
github-actions[bot]
ec1e2e4539 Version Packages 2025-04-23 17:46:34 +00:00
Guido D'Orsi
9550dcd6e7 Merge pull request #1987 from garden-co/fix/handle-unknown-keys-comap-toJSON
fix: skip non-schema related keys when calling CoMap.toJSON
2025-04-23 19:44:20 +02:00
Guido D'Orsi
4547525579 fix: skip non-schema related keys when calling CoMap.toJSON 2025-04-23 19:31:41 +02:00
Guido D'Orsi
856ba0c1fa Merge pull request #1943 from garden-co/refactor/simplify-covalue-state-anselm
feat: simplify the CoValue loading state management
2025-04-23 18:45:26 +02:00
Guido D'Orsi
aaf217c61b Merge pull request #1980 from garden-co/changeset-release/main
Version Packages
2025-04-23 16:49:26 +02:00
Guido D'Orsi
29e05c4ad4 chore: changeset 2025-04-23 16:48:04 +02:00
Guido D'Orsi
65719f21a3 chore: changeset 2025-04-23 16:46:23 +02:00
Guido D'Orsi
05ff90c3c4 feat: mark not found when the peer closes 2025-04-23 16:42:05 +02:00
Guido D'Orsi
07408970bd fix: return unavailable when loading from 0 peers 2025-04-23 16:40:31 +02:00
github-actions[bot]
ebd5ae2985 Version Packages 2025-04-23 14:29:42 +00:00
Guido D'Orsi
b0270e72d2 Merge pull request #1970 from garden-co/perf/colist-incremental-view
perf(colist): process the content incrementally
2025-04-23 16:27:12 +02:00
Guido D'Orsi
95c3001a7f Merge pull request #1969 from garden-co/fix/colist-max-recursion
fix(colist): fix max recursion error happening on large lists
2025-04-23 16:19:40 +02:00
Guido D'Orsi
4ba3ea6b4e Merge remote-tracking branch 'origin/main' into refactor/simplify-covalue-state-anselm 2025-04-23 16:18:23 +02:00
Anselm
fc6eab7efe Fix linked list -> stack comment 2025-04-23 15:15:16 +01:00
Guido D'Orsi
c30fb098fe Merge remote-tracking branch 'origin/main' into refactor/simplify-covalue-state-anselm 2025-04-23 16:15:13 +02:00
Guido D'Orsi
2ff226cf9a Merge pull request #1983 from garden-co/simplify-handle-new-content
feat: simplify missing content management in handleNewContent
2025-04-23 16:12:05 +02:00
Anselm
08bd887ab7 Use array inverse stack instead of LinkedList 2025-04-23 15:11:05 +01:00
Guido D'Orsi
3396ed4b72 feat: simplify missing content management in handleNewContent 2025-04-23 16:05:17 +02:00
Guido D'Orsi
a703bc3102 Merge pull request #1982 from garden-co/refactor/remove-fs-storage
Remove half-baked filesystem storage
2025-04-23 15:48:23 +02:00
Anselm
18dc96c7b1 Merge branch 'main' into refactor/simplify-covalue-state-anselm 2025-04-23 14:42:09 +01:00
Guido D'Orsi
f8d9e9f5c8 Merge pull request #1920 from garden-co/simplify-known-peer-state-updates
Clarify peer known state
2025-04-23 15:35:52 +02:00
Anselm
e9e7f45e02 Remove filesystem storage 2025-04-23 14:34:48 +01:00
Anselm Eickhoff
3b96af8686 Merge pull request #1952 from garden-co/publish-design-system 2025-04-23 13:35:28 +01:00
Anselm
49fb6311ad Fix errors in jazz-tools 2025-04-23 12:37:29 +01:00
Benjamin S. Leveritt
bce150c391 Merge pull request #1849 from garden-co/dumb-richtext
Prosemirror <-> RichText integration
2025-04-23 12:29:57 +01:00
Benjamin S. Leveritt
f8f07941fa Pnpm uber alles 2025-04-23 11:53:06 +01:00
Benjamin S. Leveritt
6a1b01417b Update favicon 2025-04-23 11:31:01 +01:00
Benjamin S. Leveritt
db60152b73 Fix vercel app name 2025-04-23 11:30:35 +01:00
Benjamin S. Leveritt
ebf082c145 Fix for typescript error on missing navigator 2025-04-23 11:27:29 +01:00
Benjamin S. Leveritt
f8b98ee3e1 Empty the changelog 2025-04-23 11:18:17 +01:00
Benjamin S. Leveritt
01ef60bf04 Update Richtext Readme 2025-04-23 11:18:17 +01:00
Benjamin S. Leveritt
17273a60e7 Add changesets 2025-04-23 11:18:17 +01:00
Benjamin S. Leveritt
0439f4c404 Update Richtext example app readme 2025-04-23 11:18:16 +01:00
Benjamin S. Leveritt
e47fe35b15 Rename Form to Editor 2025-04-23 11:18:16 +01:00
Benjamin S. Leveritt
f9e4520d64 Puts decoration display behind option 2025-04-23 11:18:16 +01:00
Benjamin S. Leveritt
91f23ee555 Improve rich text example title 2025-04-23 11:18:16 +01:00
Benjamin S. Leveritt
d06df65bd9 Add comment 2025-04-23 11:18:16 +01:00
Benjamin S. Leveritt
e9b9b85695 Fix length 2025-04-23 11:18:16 +01:00
Benjamin S. Leveritt
6a97cfd53d Bins the selection stuff 2025-04-23 11:18:16 +01:00
Benjamin S. Leveritt
3497beea9e Add a text selection test 2025-04-23 11:18:16 +01:00
Benjamin S. Leveritt
7ecd643719 Persist selection on CoRichText update 2025-04-23 11:18:15 +01:00
Benjamin S. Leveritt
4c26d43e2e Adds selection functions 2025-04-23 11:18:15 +01:00
Benjamin S. Leveritt
b089f0bb5d Add caret and selection decoration 2025-04-23 11:18:15 +01:00
Benjamin S. Leveritt
d6c99a3ab9 Show empty selections? 2025-04-23 11:18:15 +01:00
Benjamin S. Leveritt
fb41802011 Basic visualise selection/caret 2025-04-23 11:18:15 +01:00
Benjamin S. Leveritt
e4313d94ed Correct Document type 2025-04-23 11:18:15 +01:00
Benjamin S. Leveritt
30bc01a4fd Lays out Form to see more content 2025-04-23 11:18:15 +01:00
Benjamin S. Leveritt
de6eccd197 Adds non-catalog deps 2025-04-23 11:18:15 +01:00
Benjamin S. Leveritt
ca6e98359c Adds docs 2025-04-23 11:18:14 +01:00
Benjamin S. Leveritt
092fed118a Refactor into parts 2025-04-23 11:18:14 +01:00
Benjamin S. Leveritt
3bb702d520 Adds compliment of tests 2025-04-23 11:18:14 +01:00
Benjamin S. Leveritt
5f1979a61a Add initialising test 2025-04-23 11:18:14 +01:00
Benjamin S. Leveritt
1861867708 Add a test 2025-04-23 11:18:14 +01:00
Benjamin S. Leveritt
9ef32e0039 Update packages with catalog 2025-04-23 11:18:14 +01:00
Benjamin S. Leveritt
375db82ad4 Merge origin/main into dumb-richtext 2025-04-23 11:18:14 +01:00
Benjamin S. Leveritt
1d2ed44548 Fix cojson tests, adds comments 2025-04-23 11:18:14 +01:00
Benjamin S. Leveritt
e0dd4b678a Fix plain text tests 2025-04-23 11:18:13 +01:00
Benjamin S. Leveritt
db113ba816 Moves initialisation to plugin 2025-04-23 11:18:13 +01:00
Benjamin S. Leveritt
6f58c43b48 Merge origin/main into dumb-richtext 2025-04-23 11:18:13 +01:00
Benjamin S. Leveritt
0ff0710226 Keeps that persistent view 2025-04-23 11:16:39 +01:00
Benjamin S. Leveritt
ce5c5a1558 Breaks up subscription 2025-04-23 11:16:38 +01:00
Benjamin S. Leveritt
500fc29a9e Moves integration to plugin 2025-04-23 11:16:38 +01:00
Benjamin S. Leveritt
b7976929d0 Add plugin 2025-04-23 11:16:38 +01:00
Benjamin S. Leveritt
6db4e8837c Add jazz-richtext-prosemirror package 2025-04-23 11:16:38 +01:00
Anselm
588a9aff0b rename back to richtext 2025-04-23 11:15:52 +01:00
Anselm
399057b262 get rid of subproject 2025-04-23 11:15:52 +01:00
Anselm
12daa15ef7 First iteration of dumb richtext 2025-04-23 11:15:52 +01:00
Guido D'Orsi
9356ffbd4e Merge pull request #1975 from garden-co/changeset-release/main
Version Packages
2025-04-23 10:17:41 +02:00
Anselm
866d1b310a Merge branch 'main' into publish-design-system 2025-04-23 09:16:27 +01:00
Anselm
225103b095 Move some things around and make design system pure TS dep 2025-04-23 09:13:17 +01:00
github-actions[bot]
328227316c Version Packages 2025-04-23 08:06:44 +00:00
Guido D'Orsi
dd5fe12dfe Merge pull request #1972 from garden-co/fix/fatal-error-coValue-creation
fix: do not crash when loading a CoValue core without the group in the sync server
2025-04-23 10:04:38 +02:00
Guido D'Orsi
f837cfe994 fix: do not crash when loading a CoValue core without the group in the sync server 2025-04-23 01:48:38 +02:00
Guido D'Orsi
f80bef8fef fix: replace rebuildFromCore with processNewTransactions 2025-04-22 22:49:54 +02:00
Guido D'Orsi
1bba26081b Merge branch 'fix/colist-max-recursion' into perf/colist-incremental-view 2025-04-22 22:42:25 +02:00
Guido D'Orsi
9efb2e2dd8 chore: simplify code 2025-04-22 22:41:38 +02:00
Guido D'Orsi
4b12b051e3 chore: restore comment 2025-04-22 22:39:54 +02:00
Guido D'Orsi
6bf2ddb7a8 Merge remote-tracking branch 'origin/main' into fix/colist-max-recursion 2025-04-22 22:38:06 +02:00
Guido D'Orsi
978c30a7ca Merge pull request #1971 from garden-co/biome-ignore-package-json
fix(biome): ignore package.json files
2025-04-22 22:37:24 +02:00
Guido D'Orsi
e2c02824e7 fix(biome): ignore package.json files 2025-04-22 22:36:09 +02:00
Guido D'Orsi
e05dff9c32 perf(colist): process the content incrementally 2025-04-22 22:28:47 +02:00
Guido D'Orsi
267ea4cf46 fix(colist): fix max recursion error happening on large lists 2025-04-22 22:26:10 +02:00
Guido D'Orsi
6dac7c7ce5 Merge pull request #1968 from garden-co/changeset-release/main
Version Packages
2025-04-22 20:09:29 +02:00
github-actions[bot]
d0724a2c13 Version Packages 2025-04-22 18:04:57 +00:00
Guido D'Orsi
4c632e14a4 Merge pull request #1967 from garden-co/fix/colist-null-values
fix(coList): handle null values when using $each: true
2025-04-22 20:02:58 +02:00
Guido D'Orsi
d7238267d9 fix(passkey-svelte): add jazz-tools as dependency 2025-04-22 20:00:59 +02:00
Guido D'Orsi
a6cf01f867 fix(coList): handle null values when using : true 2025-04-22 19:52:34 +02:00
Guido D'Orsi
17d148b1d2 Merge pull request #1803 from garden-co/jazz-paper-scissors
feat: Jazz paper scissors example
2025-04-22 18:44:52 +02:00
Guido D'Orsi
2544782988 feat(dx): simplify dev setup using npm-run-all 2025-04-22 18:44:12 +02:00
Margaret Culotta
8f42c7a749 merge main, handle conflict in pnpm-lock 2025-04-22 18:40:31 +02:00
Anselm
53b2cd93eb Better emit settings for design system 2025-04-19 13:25:52 +01:00
Anselm
95cee57379 Move components folder out of app 2025-04-19 12:01:42 +01:00
Anselm
a5df996d67 Export font setup from design system 2025-04-19 10:38:50 +01:00
Anselm
a518e8b667 Publish design system 2025-04-19 10:13:32 +01:00
Anselm
673197cf8e Make design system deps direct 2025-04-19 10:12:54 +01:00
Anselm
9a9aa1e811 Rename design-system and make publishable 2025-04-19 09:53:43 +01:00
Margaret Culotta
49784a7e65 remove additional icons from manifest.json 2025-04-18 08:44:57 -05:00
Guido D'Orsi
935cd745ba chore: align deps 2025-04-18 13:46:47 +02:00
Guido D'Orsi
608d06d46f chore: throw an error when the .env is missing 2025-04-18 13:43:26 +02:00
Guido D'Orsi
7690e19014 docs: update readme 2025-04-18 13:41:22 +02:00
Guido D'Orsi
4626c79c46 chore: clean lockfile 2025-04-18 13:34:48 +02:00
Guido D'Orsi
aad0bd60f4 fix: remove postinstall 2025-04-18 13:29:34 +02:00
Guido D'Orsi
1fbe8d9651 Merge remote-tracking branch 'origin/main' into jazz-paper-scissors 2025-04-18 13:25:45 +02:00
Anselm
cdc5cbd6d6 Don't retry coValue if it's available 2025-04-17 16:00:15 +01:00
Anselm
f55097c480 Fix broken test 2025-04-17 15:41:01 +01:00
Anselm
e9695fa2eb Interpret closed peers as "unavailable", clear up other edge cases 2025-04-17 15:33:15 +01:00
Anselm
0c11110567 Go back to string-y highLevelState and implement counters 2025-04-17 14:44:15 +01:00
Anselm
f2db858221 Distinguish between "available" and "received from peer" 2025-04-17 14:26:40 +01:00
Anselm
a362cbba51 Fix most retry-related tests 2025-04-17 13:03:55 +01:00
Anselm
39c2586d3b Wait in between peers, improve message test printing 2025-04-17 12:15:59 +01:00
Anselm
e5eed7bd35 Merge branch 'fix/peer-reconciliation' into refactor/simplify-covalue-state 2025-04-16 16:17:01 +01:00
Anselm
39ae497153 Use covalue state getters 2025-04-16 16:05:18 +01:00
Anselm
e0b5df7f9e Merge branch 'simplify-known-peer-state-updates' into refactor/simplify-covalue-state 2025-04-16 12:12:58 +01:00
Anselm
264c1c1fa5 Merge branch 'fix/peer-reconciliation' into simplify-known-peer-state-updates 2025-04-16 12:11:36 +01:00
Anselm
54b2907f08 WIP 2025-04-16 12:06:23 +01:00
Margaret Culotta
6e28ac946b update readme 2025-04-15 21:19:22 -05:00
Margaret Culotta
cfce22fc63 Merge branch 'main' into jazz-paper-scissors 2025-04-15 15:40:14 -05:00
Anselm
f3e0b1ed74 Remove dispatch pattern 2025-04-15 15:42:11 +01:00
Anselm
ca9162476c Merge branch 'fix/peer-reconciliation' into simplify-known-peer-state-updates 2025-04-15 15:20:50 +01:00
Anselm
f98f6f1a7a Simplify setting empty state 2025-04-15 15:19:08 +01:00
Anselm
2624d037f3 Clarify infallible assumption and prevent external updates 2025-04-15 15:15:45 +01:00
Anselm
2d7917b169 Replace peer known state dispatch pattern with direct methods 2025-04-15 14:06:36 +01:00
Guido D'Orsi
ecfc883419 feat: fix build and add new game button 2025-04-11 13:57:39 +02:00
Guido D'Orsi
4aded04223 Merge remote-tracking branch 'origin/main' into jazz-paper-scissors 2025-04-11 12:18:27 +02:00
Anselm
06db1dd423 Add opengraph images for docs and move where H1s get filtered out of toc 2025-04-11 10:30:59 +01:00
Guido D'Orsi
3167ff16cd Merge remote-tracking branch 'origin/main' into jazz-paper-scissors 2025-04-07 11:22:52 +02:00
Margaret Culotta
2e70b2b295 remove unnecessary file, adjust prettierignore 2025-04-04 13:41:20 -05:00
Margaret Culotta
9a5e6eed16 clean up console.logs and unused types 2025-04-04 11:48:11 -05:00
Guido D'Orsi
28d74d73f8 fix: add resolve 2025-04-04 16:40:38 +02:00
Margaret Culotta
6c9d90449a clean up styles, simplify 2025-04-03 22:05:43 -05:00
Margaret Culotta
5398978d74 game play is working. Timing issue with waiting room adding game? 2025-04-03 16:15:35 -05:00
Margaret Culotta
53148db482 clean up 2025-04-03 11:28:12 -05:00
Margaret Culotta
44a0b54026 add game page for first and second player 2025-04-03 08:30:45 -05:00
Giordano Ricci
c877d377d2 first commit 2025-03-31 15:40:04 +01:00
525 changed files with 27055 additions and 10011 deletions

View File

@@ -15,6 +15,7 @@
"jazz-browser-media-images",
"jazz-expo",
"jazz-inspector",
"jazz-inspector-element",
"jazz-nodejs",
"jazz-react",
"jazz-react-core",

View File

@@ -13,7 +13,9 @@
"**/android/**",
"packages/jazz-svelte/**",
"examples/*svelte*/**",
"homepage/homepage/**"
"examples/jazz-paper-scissors/src/routeTree.gen.ts",
"homepage/homepage/**",
"**/package.json"
]
},
"formatter": {

View File

@@ -1,5 +1,156 @@
# chat-rn-expo-clerk
## 1.0.118
### Patch Changes
- jazz-expo@0.13.27
- jazz-tools@0.13.27
- jazz-react-native-media-images@0.13.27
## 1.0.117
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-expo@0.13.26
- jazz-react-native-media-images@0.13.26
## 1.0.116
### Patch Changes
- jazz-expo@0.13.25
- jazz-tools@0.13.25
- jazz-react-native-media-images@0.13.25
## 1.0.115
### Patch Changes
- Updated dependencies [02a240c]
- jazz-tools@0.13.23
- jazz-expo@0.13.23
- jazz-react-native-media-images@0.13.23
## 1.0.114
### Patch Changes
- jazz-expo@0.13.22
## 1.0.113
### Patch Changes
- jazz-expo@0.13.21
- jazz-tools@0.13.21
- jazz-react-native-media-images@0.13.21
## 1.0.112
### Patch Changes
- Updated dependencies [439f0fe]
- jazz-tools@0.13.20
- jazz-expo@0.13.20
- jazz-react-native-media-images@0.13.20
## 1.0.111
### Patch Changes
- Updated dependencies [80530a4]
- jazz-tools@0.13.19
- jazz-expo@0.13.19
- jazz-react-native-media-images@0.13.19
## 1.0.110
### Patch Changes
- Updated dependencies [761759c]
- jazz-tools@0.13.18
- jazz-expo@0.13.18
- jazz-react-native-media-images@0.13.18
## 1.0.109
### Patch Changes
- jazz-expo@0.13.17
- jazz-tools@0.13.17
- jazz-react-native-media-images@0.13.17
## 1.0.108
### Patch Changes
- jazz-expo@0.13.16
- jazz-tools@0.13.16
- jazz-react-native-media-images@0.13.16
## 1.0.107
### Patch Changes
- jazz-expo@0.13.15
- jazz-tools@0.13.15
- jazz-react-native-media-images@0.13.15
## 1.0.106
### Patch Changes
- Updated dependencies [bd94012]
- jazz-expo@0.13.14
- jazz-tools@0.13.14
- jazz-react-native-media-images@0.13.14
## 1.0.105
### Patch Changes
- jazz-expo@0.13.13
- jazz-tools@0.13.13
- jazz-react-native-media-images@0.13.13
## 1.0.104
### Patch Changes
- Updated dependencies [4547525]
- jazz-tools@0.13.12
- jazz-expo@0.13.12
- jazz-react-native-media-images@0.13.12
## 1.0.103
### Patch Changes
- Updated dependencies [17273a6]
- jazz-tools@0.13.11
- jazz-expo@0.13.11
- jazz-react-native-media-images@0.13.11
## 1.0.102
### Patch Changes
- jazz-expo@0.13.10
- jazz-tools@0.13.10
- jazz-react-native-media-images@0.13.10
## 1.0.101
### Patch Changes
- Updated dependencies [a6cf01f]
- jazz-tools@0.13.9
- jazz-expo@0.13.9
- jazz-react-native-media-images@0.13.9
## 1.0.100
### Patch Changes

View File

@@ -7,7 +7,7 @@ import { useLocalSearchParams } from "expo-router";
import { useAccount, useCoState } from "jazz-expo";
import { ProgressiveImg } from "jazz-expo";
import { createImage } from "jazz-react-native-media-images";
import { Group, ID } from "jazz-tools";
import { CoPlainText, Group, ID } from "jazz-tools";
import { useEffect, useLayoutEffect, useState } from "react";
import React, {
SafeAreaView,
@@ -71,8 +71,8 @@ export default function Conversation() {
const loadChat = async (chatId: ID<Chat>) => {
try {
const chat = await Chat.load(chatId, me);
setChat(chat);
const chat = await Chat.load(chatId);
if (chat) setChat(chat);
} catch (error) {
console.log("Error loading chat", error);
Alert.alert("Error", `Error loading chat: ${error}`);
@@ -82,7 +82,12 @@ export default function Conversation() {
const sendMessage = () => {
if (!chat) return;
if (message.trim()) {
chat.push(Message.create({ text: message }, { owner: chat._owner }));
chat.push(
Message.create(
{ text: CoPlainText.create(message, chat._owner) },
chat._owner,
),
);
setMessage("");
}
};
@@ -104,7 +109,12 @@ export default function Conversation() {
maxSize: 2048,
});
chat.push(Message.create({ text: "", image }, { owner: chat._owner }));
chat.push(
Message.create(
{ text: CoPlainText.create("", chat._owner), image },
chat._owner,
),
);
}
} catch (error) {
Alert.alert("Error", "Failed to upload image");

View File

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

View File

@@ -1,7 +1,7 @@
import { CoList, CoMap, ImageDefinition, co } from "jazz-tools";
import { CoList, CoMap, CoPlainText, ImageDefinition, co } from "jazz-tools";
export class Message extends CoMap {
text = co.string;
text = co.ref(CoPlainText);
image = co.optional.ref(ImageDefinition);
}

View File

@@ -1,5 +1,139 @@
# chat-rn-expo
## 1.0.105
### Patch Changes
- jazz-expo@0.13.27
- jazz-tools@0.13.27
## 1.0.104
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-expo@0.13.26
## 1.0.103
### Patch Changes
- jazz-expo@0.13.25
- jazz-tools@0.13.25
## 1.0.102
### Patch Changes
- Updated dependencies [02a240c]
- jazz-tools@0.13.23
- jazz-expo@0.13.23
## 1.0.101
### Patch Changes
- jazz-expo@0.13.22
## 1.0.100
### Patch Changes
- jazz-expo@0.13.21
- jazz-tools@0.13.21
## 1.0.99
### Patch Changes
- Updated dependencies [439f0fe]
- jazz-tools@0.13.20
- jazz-expo@0.13.20
## 1.0.98
### Patch Changes
- Updated dependencies [80530a4]
- jazz-tools@0.13.19
- jazz-expo@0.13.19
## 1.0.97
### Patch Changes
- Updated dependencies [761759c]
- jazz-tools@0.13.18
- jazz-expo@0.13.18
## 1.0.96
### Patch Changes
- jazz-expo@0.13.17
- jazz-tools@0.13.17
## 1.0.95
### Patch Changes
- jazz-expo@0.13.16
- jazz-tools@0.13.16
## 1.0.94
### Patch Changes
- jazz-expo@0.13.15
- jazz-tools@0.13.15
## 1.0.93
### Patch Changes
- Updated dependencies [bd94012]
- jazz-expo@0.13.14
- jazz-tools@0.13.14
## 1.0.92
### Patch Changes
- jazz-expo@0.13.13
- jazz-tools@0.13.13
## 1.0.91
### Patch Changes
- Updated dependencies [4547525]
- jazz-tools@0.13.12
- jazz-expo@0.13.12
## 1.0.90
### Patch Changes
- Updated dependencies [17273a6]
- jazz-tools@0.13.11
- jazz-expo@0.13.11
## 1.0.89
### Patch Changes
- jazz-expo@0.13.10
- jazz-tools@0.13.10
## 1.0.88
### Patch Changes
- Updated dependencies [a6cf01f]
- jazz-tools@0.13.9
- jazz-expo@0.13.9
## 1.0.87
### Patch Changes

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "chat-rn-expo",
"version": "1.0.87",
"version": "1.0.105",
"main": "index.js",
"scripts": {
"build": "expo export -p ios",
@@ -36,6 +36,8 @@
"react-dom": "18.3.1",
"react-native": "0.76.7",
"react-native-get-random-values": "^1.11.0",
"react-native-nitro-modules": "0.25.2",
"react-native-quick-crypto": "1.0.0-beta.15",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "4.4.0",
"react-native-url-polyfill": "^2.0.0",

View File

@@ -6,6 +6,7 @@ import {
} from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import * as Linking from "expo-linking";
import { RNQuickCrypto } from "jazz-expo/crypto";
import React, { StrictMode, useEffect, useState } from "react";
import HandleInviteScreen from "./invite";
@@ -46,6 +47,7 @@ function App() {
return (
<StrictMode>
<JazzProvider
CryptoProvider={RNQuickCrypto}
sync={{
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
}}

View File

@@ -20,6 +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 [chatIdInput, setChatIdInput] = useState<string>();
const loadedChat = useCoState(Chat, chatId, { resolve: { $each: true } });
const [message, setMessage] = useState("");
const profile = useCoState(Profile, me._refs.profile?.id, {});
@@ -57,27 +58,11 @@ export default function ChatScreen({ navigation }: { navigation: any }) {
};
const joinChat = () => {
Alert.prompt(
"Join Chat",
"Enter the Chat ID (example: co_zBGEHYvRfGuT2YSBraY3njGjnde)",
[
{
text: "Cancel",
style: "cancel",
},
{
text: "Join",
onPress: (chatId) => {
if (chatId) {
setChatId(chatId as ID<Chat>);
} else {
Alert.alert("Error", "Chat ID cannot be empty.");
}
},
},
],
"plain-text",
);
if (chatIdInput) {
setChatId(chatIdInput as ID<Chat>);
} else {
Alert.alert("Error", "Chat ID cannot be empty.");
}
};
const sendMessage = () => {
@@ -160,9 +145,25 @@ export default function ChatScreen({ navigation }: { navigation: any }) {
>
<Text className="text-white font-semibold">Start new chat</Text>
</TouchableOpacity>
<Text className="text-m font-bold mt-6">Join existing chat</Text>
<TextInput
className="rounded h-12 p-2 m-2 mt-4 w-80 border border-gray-200 block"
placeholder="Chat ID"
value={chatIdInput ?? ""}
onChangeText={(value) => {
setChatIdInput(value);
}}
textAlignVertical="center"
onSubmitEditing={() => {
if (chatIdInput) {
setChatId(chatIdInput as ID<Chat>);
}
}}
testID="chat-id-input"
/>
<TouchableOpacity
onPress={joinChat}
className="bg-green-500 p-4 rounded-md mt-4"
className="bg-green-500 p-4 rounded-md"
>
<Text className="text-white font-semibold">Join chat</Text>
</TouchableOpacity>
@@ -172,7 +173,6 @@ export default function ChatScreen({ navigation }: { navigation: any }) {
<FlatList
contentContainerStyle={{
flexGrow: 1,
flex: 1,
gap: 6,
padding: 8,
}}

View File

@@ -9,6 +9,8 @@ appId: com.jazz.chatrn
# - tapOn: "Reload"
# login
- assertVisible: "Logout"
- tapOn: "Logout"
- assertVisible: "Anonymous user"
- runFlow:
label: "Erase existing username"
@@ -42,9 +44,11 @@ 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"
# join chat
- tapOn:
id: "chat-id-input"
- inputText: "co_zFs6KFyhxPw4xtw83tcEMzeHUNv" # Use a static id because maestro doesn't have access to the system clipboard
- tapOn: "Join chat"
- assertVisible: "boorad"
- assertVisible: "bro, low key, it do be like that tho"

View File

@@ -1,5 +1,189 @@
# chat-rn
## 1.0.113
### Patch Changes
- Updated dependencies [6357052]
- cojson@0.13.27
- cojson-transport-ws@0.13.27
- jazz-react-native@0.13.27
- jazz-tools@0.13.27
## 1.0.112
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react-native@0.13.26
## 1.0.111
### Patch Changes
- Updated dependencies [a846e07]
- cojson@0.13.25
- cojson-transport-ws@0.13.25
- jazz-react-native@0.13.25
- jazz-tools@0.13.25
## 1.0.110
### Patch Changes
- Updated dependencies [6b781cf]
- Updated dependencies [02a240c]
- cojson@0.13.23
- jazz-tools@0.13.23
- cojson-transport-ws@0.13.23
- jazz-react-native@0.13.23
## 1.0.109
### Patch Changes
- jazz-react-native@0.13.22
## 1.0.108
### Patch Changes
- Updated dependencies [e14e61f]
- cojson@0.13.21
- cojson-transport-ws@0.13.21
- jazz-react-native@0.13.21
- jazz-tools@0.13.21
## 1.0.107
### Patch Changes
- Updated dependencies [adfc9a6]
- Updated dependencies [1389207]
- Updated dependencies [d6e143e]
- Updated dependencies [439f0fe]
- Updated dependencies [3e6229d]
- cojson@0.13.20
- jazz-tools@0.13.20
- jazz-react-native@0.13.20
- cojson-transport-ws@0.13.20
## 1.0.106
### Patch Changes
- Updated dependencies [80530a4]
- jazz-tools@0.13.19
- jazz-react-native@0.13.19
## 1.0.105
### Patch Changes
- Updated dependencies [9089252]
- Updated dependencies [b470f63]
- Updated dependencies [761759c]
- Updated dependencies [66373ba]
- Updated dependencies [f24cad1]
- cojson@0.13.18
- jazz-tools@0.13.18
- cojson-transport-ws@0.13.18
- jazz-react-native@0.13.18
## 1.0.104
### Patch Changes
- Updated dependencies [9fb98e2]
- Updated dependencies [0b89fad]
- cojson@0.13.17
- cojson-transport-ws@0.13.17
- jazz-react-native@0.13.17
- jazz-tools@0.13.17
## 1.0.103
### Patch Changes
- Updated dependencies [c6fb8dc]
- cojson@0.13.16
- cojson-transport-ws@0.13.16
- jazz-react-native@0.13.16
- jazz-tools@0.13.16
## 1.0.102
### Patch Changes
- Updated dependencies [c712ef2]
- cojson@0.13.15
- cojson-transport-ws@0.13.15
- jazz-react-native@0.13.15
- jazz-tools@0.13.15
## 1.0.101
### Patch Changes
- Updated dependencies [5c2c7d4]
- cojson@0.13.14
- cojson-transport-ws@0.13.14
- jazz-react-native@0.13.14
- jazz-tools@0.13.14
## 1.0.100
### Patch Changes
- Updated dependencies [ec9cb40]
- cojson@0.13.13
- cojson-transport-ws@0.13.13
- jazz-react-native@0.13.13
- jazz-tools@0.13.13
## 1.0.99
### Patch Changes
- Updated dependencies [4547525]
- Updated dependencies [65719f2]
- jazz-tools@0.13.12
- cojson@0.13.12
- jazz-react-native@0.13.12
- cojson-transport-ws@0.13.12
## 1.0.98
### Patch Changes
- Updated dependencies [17273a6]
- Updated dependencies [3396ed4]
- Updated dependencies [17273a6]
- Updated dependencies [267ea4c]
- cojson@0.13.11
- jazz-tools@0.13.11
- cojson-transport-ws@0.13.11
- jazz-react-native@0.13.11
## 1.0.97
### Patch Changes
- Updated dependencies [f837cfe]
- cojson@0.13.10
- cojson-transport-ws@0.13.10
- jazz-react-native@0.13.10
- jazz-tools@0.13.10
## 1.0.96
### Patch Changes
- Updated dependencies [a6cf01f]
- jazz-tools@0.13.9
- jazz-react-native@0.13.9
## 1.0.95
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "chat-rn",
"version": "1.0.95",
"version": "1.0.113",
"main": "index.js",
"scripts": {
"android": "react-native run-android",

View File

@@ -1,6 +1,6 @@
import Clipboard from "@react-native-clipboard/clipboard";
import { useAccount, useCoState } from "jazz-react-native";
import { Group, ID, Profile } from "jazz-tools";
import { CoPlainText, Group, ID, Profile } from "jazz-tools";
import { useEffect, useState } from "react";
import {
Alert,
@@ -83,7 +83,10 @@ export function ChatScreen({ navigation }: { navigation: any }) {
if (!loadedChat) return;
if (message.trim()) {
loadedChat.push(
Message.create({ text: message }, { owner: loadedChat?._owner }),
Message.create(
{ text: CoPlainText.create(message, loadedChat?._owner) },
loadedChat?._owner,
),
);
setMessage("");
}

View File

@@ -1,7 +1,7 @@
import { CoList, CoMap, co } from "jazz-tools";
import { CoList, CoMap, CoPlainText, co } from "jazz-tools";
export class Message extends CoMap {
text = co.string;
text = co.ref(CoPlainText);
}
export class Chat extends CoList.Of(co.ref(Message)) {}

View File

@@ -1,5 +1,150 @@
# chat-vue
## 0.0.96
### Patch Changes
- jazz-browser@0.13.27
- jazz-tools@0.13.27
- jazz-vue@0.13.27
## 0.0.95
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-browser@0.13.26
- jazz-vue@0.13.26
## 0.0.94
### Patch Changes
- jazz-browser@0.13.25
- jazz-tools@0.13.25
- jazz-vue@0.13.25
## 0.0.93
### Patch Changes
- Updated dependencies [02a240c]
- jazz-tools@0.13.23
- jazz-browser@0.13.23
- jazz-vue@0.13.23
## 0.0.92
### Patch Changes
- jazz-browser@0.13.21
- jazz-tools@0.13.21
- jazz-vue@0.13.21
## 0.0.91
### Patch Changes
- Updated dependencies [439f0fe]
- jazz-tools@0.13.20
- jazz-browser@0.13.20
- jazz-vue@0.13.20
## 0.0.90
### Patch Changes
- Updated dependencies [80530a4]
- jazz-tools@0.13.19
- jazz-browser@0.13.19
- jazz-vue@0.13.19
## 0.0.89
### Patch Changes
- Updated dependencies [761759c]
- jazz-tools@0.13.18
- jazz-browser@0.13.18
- jazz-vue@0.13.18
## 0.0.88
### Patch Changes
- jazz-browser@0.13.17
- jazz-tools@0.13.17
- jazz-vue@0.13.17
## 0.0.87
### Patch Changes
- jazz-browser@0.13.16
- jazz-tools@0.13.16
- jazz-vue@0.13.16
## 0.0.86
### Patch Changes
- jazz-browser@0.13.15
- jazz-tools@0.13.15
- jazz-vue@0.13.15
## 0.0.85
### Patch Changes
- jazz-browser@0.13.14
- jazz-tools@0.13.14
- jazz-vue@0.13.14
## 0.0.84
### Patch Changes
- jazz-browser@0.13.13
- jazz-tools@0.13.13
- jazz-vue@0.13.13
## 0.0.83
### Patch Changes
- Updated dependencies [4547525]
- Updated dependencies [29e05c4]
- jazz-tools@0.13.12
- jazz-browser@0.13.12
- jazz-vue@0.13.12
## 0.0.82
### Patch Changes
- Updated dependencies [17273a6]
- jazz-tools@0.13.11
- jazz-browser@0.13.11
- jazz-vue@0.13.11
## 0.0.81
### Patch Changes
- jazz-browser@0.13.10
- jazz-tools@0.13.10
- jazz-vue@0.13.10
## 0.0.80
### Patch Changes
- Updated dependencies [a6cf01f]
- jazz-tools@0.13.9
- jazz-browser@0.13.9
- jazz-vue@0.13.9
## 0.0.79
### Patch Changes

View File

@@ -1,11 +1,11 @@
{
"name": "chat-vue",
"version": "0.0.79",
"version": "0.0.96",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build-type-check": "run-p type-check \"build-only {@}\" --",
"build-type-check": "run-p type-check \"build {@}\" --",
"preview": "vite preview",
"build": "vite build",
"type-check": "vue-tsc --build --force",

View File

@@ -1,9 +1,9 @@
<template>
<BubbleContainer :fromMe="lastEdit.by?.isMe">
<BubbleBody>{{ msg.text }}</BubbleBody>
<BubbleInfo :by="lastEdit.by?.profile?.name" :madeAt="lastEdit.madeAt" />
</BubbleContainer>
</template>
<BubbleContainer :fromMe="lastEdit.by?.isMe">
<BubbleBody>{{ msg.text }}</BubbleBody>
<BubbleInfo :by="lastEdit.by?.profile?.name" :madeAt="lastEdit.madeAt" />
</BubbleContainer>
</template>
<script lang="ts">
import { computed, defineComponent } from "vue";

View File

@@ -1,7 +1,7 @@
import { CoList, CoMap, co } from "jazz-tools";
import { CoList, CoMap, CoPlainText, co } from "jazz-tools";
export class Message extends CoMap {
text = co.string;
text = co.ref(CoPlainText);
}
export class Chat extends CoList.Of(co.ref(Message)) {}

View File

@@ -25,7 +25,7 @@
</template>
<script lang="ts">
import type { ID } from "jazz-tools";
import { CoPlainText, type ID } from "jazz-tools";
import { useCoState } from "jazz-vue";
import { type PropType, computed, defineComponent, ref } from "vue";
import ChatBody from "../components/ChatBody.vue";
@@ -61,7 +61,12 @@ export default defineComponent({
}
function handleSubmit(text: string) {
chat?.value?.push(Message.create({ text }, { owner: chat.value._owner }));
chat?.value?.push(
Message.create(
{ text: CoPlainText.create(text, chat.value._owner) },
chat.value._owner,
),
);
}
return {

View File

@@ -1,5 +1,150 @@
# jazz-example-chat
## 0.0.194
### Patch Changes
- jazz-inspector@0.13.27
- jazz-react@0.13.27
- jazz-tools@0.13.27
## 0.0.193
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-inspector@0.13.26
- jazz-react@0.13.26
## 0.0.192
### Patch Changes
- jazz-inspector@0.13.25
- jazz-react@0.13.25
- jazz-tools@0.13.25
## 0.0.191
### Patch Changes
- Updated dependencies [02a240c]
- jazz-tools@0.13.23
- jazz-inspector@0.13.23
- jazz-react@0.13.23
## 0.0.190
### Patch Changes
- Updated dependencies [7de210f]
- jazz-inspector@0.13.21
- jazz-react@0.13.21
- jazz-tools@0.13.21
## 0.0.189
### Patch Changes
- Updated dependencies [439f0fe]
- jazz-tools@0.13.20
- jazz-inspector@0.13.20
- jazz-react@0.13.20
## 0.0.188
### Patch Changes
- Updated dependencies [80530a4]
- jazz-tools@0.13.19
- jazz-inspector@0.13.19
- jazz-react@0.13.19
## 0.0.187
### Patch Changes
- Updated dependencies [761759c]
- jazz-tools@0.13.18
- jazz-inspector@0.13.18
- jazz-react@0.13.18
## 0.0.186
### Patch Changes
- jazz-inspector@0.13.17
- jazz-react@0.13.17
- jazz-tools@0.13.17
## 0.0.185
### Patch Changes
- jazz-inspector@0.13.16
- jazz-react@0.13.16
- jazz-tools@0.13.16
## 0.0.184
### Patch Changes
- jazz-inspector@0.13.15
- jazz-react@0.13.15
- jazz-tools@0.13.15
## 0.0.183
### Patch Changes
- jazz-inspector@0.13.14
- jazz-react@0.13.14
- jazz-tools@0.13.14
## 0.0.182
### Patch Changes
- jazz-inspector@0.13.13
- jazz-react@0.13.13
- jazz-tools@0.13.13
## 0.0.181
### Patch Changes
- Updated dependencies [4547525]
- jazz-tools@0.13.12
- jazz-inspector@0.13.12
- jazz-react@0.13.12
## 0.0.180
### Patch Changes
- Updated dependencies [17273a6]
- jazz-tools@0.13.11
- jazz-inspector@0.13.11
- jazz-react@0.13.11
## 0.0.179
### Patch Changes
- jazz-inspector@0.13.10
- jazz-react@0.13.10
- jazz-tools@0.13.10
## 0.0.178
### Patch Changes
- Updated dependencies [a6cf01f]
- jazz-tools@0.13.9
- jazz-inspector@0.13.9
- jazz-react@0.13.9
## 0.0.177
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-chat",
"private": true,
"version": "0.0.177",
"version": "0.0.194",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,5 @@
import { createImage, useAccount, useCoState } from "jazz-react";
import { Account, ID } from "jazz-tools";
import { Account, CoPlainText, ID } from "jazz-tools";
import { useState } from "react";
import { Chat, Message } from "./schema.ts";
import {
@@ -36,7 +36,15 @@ export function ChatScreen(props: { chatID: ID<Chat> }) {
}
createImage(file, { owner: chat._owner }).then((image) => {
chat.push(Message.create({ text: file.name, image: image }, chat._owner));
chat.push(
Message.create(
{
text: CoPlainText.create(file.name, chat._owner),
image: image,
},
chat._owner,
),
);
});
};
@@ -66,7 +74,12 @@ export function ChatScreen(props: { chatID: ID<Chat> }) {
<TextInput
onSubmit={(text) => {
chat.push(Message.create({ text }, { owner: chat._owner }));
chat.push(
Message.create(
{ text: CoPlainText.create(text, chat._owner) },
chat._owner,
),
);
}}
/>
</InputBar>
@@ -75,7 +88,7 @@ export function ChatScreen(props: { chatID: ID<Chat> }) {
}
function ChatBubble(props: { me: Account; msg: Message }) {
if (!props.me.canRead(props.msg)) {
if (!props.me.canRead(props.msg) || !props.msg.text?.toString()) {
return (
<BubbleContainer fromMe={false}>
<BubbleBody fromMe={false}>

View File

@@ -1,7 +1,7 @@
import { CoList, CoMap, ImageDefinition, co } from "jazz-tools";
import { CoList, CoMap, CoPlainText, ImageDefinition, co } from "jazz-tools";
export class Message extends CoMap {
text = co.string;
text = co.ref(CoPlainText);
image = co.optional.ref(ImageDefinition);
}

View File

@@ -1,6 +1,6 @@
import clsx from "clsx";
import { ProgressiveImg } from "jazz-react";
import { ImageDefinition } from "jazz-tools";
import { CoPlainText, ImageDefinition } from "jazz-tools";
import { ImageIcon } from "lucide-react";
import { useId, useRef } from "react";
@@ -70,7 +70,10 @@ export function BubbleBody(props: {
);
}
export function BubbleText(props: { text: string; className?: string }) {
export function BubbleText(props: {
text: CoPlainText | string;
className?: string;
}) {
return (
<p className={clsx("px-2 leading-relaxed", props.className)}>
{props.text}

View File

@@ -1,5 +1,149 @@
# minimal-auth-clerk
## 0.0.93
### Patch Changes
- jazz-react@0.13.27
- jazz-react-auth-clerk@0.13.27
- jazz-tools@0.13.27
## 0.0.92
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
- jazz-react-auth-clerk@0.13.26
## 0.0.91
### Patch Changes
- jazz-react@0.13.25
- jazz-react-auth-clerk@0.13.25
- jazz-tools@0.13.25
## 0.0.90
### Patch Changes
- Updated dependencies [02a240c]
- jazz-tools@0.13.23
- jazz-react@0.13.23
- jazz-react-auth-clerk@0.13.23
## 0.0.89
### Patch Changes
- jazz-react@0.13.21
- jazz-react-auth-clerk@0.13.21
- jazz-tools@0.13.21
## 0.0.88
### Patch Changes
- Updated dependencies [439f0fe]
- jazz-tools@0.13.20
- jazz-react@0.13.20
- jazz-react-auth-clerk@0.13.20
## 0.0.87
### Patch Changes
- Updated dependencies [80530a4]
- jazz-tools@0.13.19
- jazz-react@0.13.19
- jazz-react-auth-clerk@0.13.19
## 0.0.86
### Patch Changes
- Updated dependencies [761759c]
- jazz-tools@0.13.18
- jazz-react@0.13.18
- jazz-react-auth-clerk@0.13.18
## 0.0.85
### Patch Changes
- jazz-react@0.13.17
- jazz-react-auth-clerk@0.13.17
- jazz-tools@0.13.17
## 0.0.84
### Patch Changes
- jazz-react@0.13.16
- jazz-react-auth-clerk@0.13.16
- jazz-tools@0.13.16
## 0.0.83
### Patch Changes
- jazz-react@0.13.15
- jazz-react-auth-clerk@0.13.15
- jazz-tools@0.13.15
## 0.0.82
### Patch Changes
- jazz-react@0.13.14
- jazz-react-auth-clerk@0.13.14
- jazz-tools@0.13.14
## 0.0.81
### Patch Changes
- jazz-react@0.13.13
- jazz-react-auth-clerk@0.13.13
- jazz-tools@0.13.13
## 0.0.80
### Patch Changes
- Updated dependencies [4547525]
- jazz-tools@0.13.12
- jazz-react@0.13.12
- jazz-react-auth-clerk@0.13.12
## 0.0.79
### Patch Changes
- Updated dependencies [17273a6]
- jazz-tools@0.13.11
- jazz-react@0.13.11
- jazz-react-auth-clerk@0.13.11
## 0.0.78
### Patch Changes
- jazz-react@0.13.10
- jazz-react-auth-clerk@0.13.10
- jazz-tools@0.13.10
## 0.0.77
### Patch Changes
- Updated dependencies [a6cf01f]
- jazz-tools@0.13.9
- jazz-react@0.13.9
- jazz-react-auth-clerk@0.13.9
## 0.0.76
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "clerk",
"private": true,
"version": "0.0.76",
"version": "0.0.93",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,145 @@
# file-share-svelte
## 0.0.77
### Patch Changes
- jazz-svelte@0.13.27
- jazz-tools@0.13.27
- jazz-inspector-element@0.13.27
## 0.0.76
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-inspector-element@0.13.26
- jazz-svelte@0.13.26
## 0.0.75
### Patch Changes
- jazz-svelte@0.13.25
- jazz-tools@0.13.25
- jazz-inspector-element@0.13.25
## 0.0.74
### Patch Changes
- Updated dependencies [ec546b4]
- jazz-svelte@0.13.24
## 0.0.73
### Patch Changes
- Updated dependencies [3431076]
- Updated dependencies [02a240c]
- jazz-svelte@0.13.23
- jazz-tools@0.13.23
- jazz-inspector-element@0.13.23
## 0.0.72
### Patch Changes
- jazz-inspector-element@0.13.21
- jazz-svelte@0.13.21
- jazz-tools@0.13.21
## 0.0.71
### Patch Changes
- Updated dependencies [439f0fe]
- jazz-tools@0.13.20
- jazz-svelte@0.13.20
## 0.0.70
### Patch Changes
- Updated dependencies [80530a4]
- jazz-tools@0.13.19
- jazz-svelte@0.13.19
## 0.0.69
### Patch Changes
- Updated dependencies [761759c]
- jazz-tools@0.13.18
- jazz-svelte@0.13.18
## 0.0.68
### Patch Changes
- jazz-svelte@0.13.17
- jazz-tools@0.13.17
## 0.0.67
### Patch Changes
- jazz-svelte@0.13.16
- jazz-tools@0.13.16
## 0.0.66
### Patch Changes
- jazz-svelte@0.13.15
- jazz-tools@0.13.15
## 0.0.65
### Patch Changes
- jazz-svelte@0.13.14
- jazz-tools@0.13.14
## 0.0.64
### Patch Changes
- jazz-svelte@0.13.13
- jazz-tools@0.13.13
## 0.0.63
### Patch Changes
- Updated dependencies [4547525]
- jazz-tools@0.13.12
- jazz-svelte@0.13.12
## 0.0.62
### Patch Changes
- Updated dependencies [17273a6]
- jazz-tools@0.13.11
- jazz-svelte@0.13.11
## 0.0.61
### Patch Changes
- jazz-svelte@0.13.10
- jazz-tools@0.13.10
## 0.0.60
### Patch Changes
- Updated dependencies [a6cf01f]
- jazz-tools@0.13.9
- jazz-svelte@0.13.9
## 0.0.59
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "file-share-svelte",
"version": "0.0.59",
"version": "0.0.77",
"private": true,
"type": "module",
"scripts": {
@@ -39,6 +39,7 @@
},
"dependencies": {
"@tailwindcss/typography": "^0.5.15",
"jazz-inspector-element": "workspace:*",
"jazz-svelte": "workspace:*",
"jazz-tools": "workspace:*",
"lucide-svelte": "^0.463.0",

View File

@@ -3,9 +3,8 @@
import { SharedFile } from '$lib/schema';
import { FileStream } from 'jazz-tools';
import { File, FileDown, Trash2, Link2 } from 'lucide-svelte';
import { useAccount } from 'jazz-svelte';
import { toast } from 'svelte-sonner';
import { formatFileSize } from '$lib/utils';
import { downloadFileBlob, formatFileSize } from '$lib/utils';
const {
file,
@@ -17,32 +16,22 @@
onDelete: (file: SharedFile) => void;
} = $props();
const { me } = useAccount();
const isAdmin = $derived(me && file._owner?.myRole() === 'admin');
const isAdmin = $derived(file._owner?.myRole() === 'admin');
const fileStreamId = $derived(file._refs.file?.id);
async function downloadFile() {
if (!file._refs.file?.id || !me) {
if (!fileStreamId) {
toast.error('Failed to download file');
return;
}
try {
const fileId = file._refs.file.id;
// Load the file as a blob, can take a while
const blob = await FileStream.loadAsBlob(fileId, me, {});
const blob = await FileStream.loadAsBlob(fileStreamId);
if (!blob) {
toast.error('Failed to download file');
return;
}
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = file.name;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
URL.revokeObjectURL(url);
downloadFileBlob(blob, file.name);
toast.success('File downloaded successfully');
} catch (error) {
console.error('Error downloading file:', error);
@@ -66,14 +55,19 @@
class="flex items-center justify-between rounded-lg border border-gray-200 bg-white p-4"
transition:slide={{ duration: 200 }}
>
<div class="flex items-center space-x-4">
<div class="flex items-center space-x-4 flex-grow">
<div class="flex h-10 w-10 items-center justify-center rounded-lg bg-blue-100 text-blue-600">
<File class="h-6 w-6" />
</div>
<div>
<a href="/file/{file.id}" class="hover:text-blue-600 hover:underline">
<div class="flex-grow">
{#if isAdmin}
<label class="sr-only" for={`file-name-${file.id}`}>File name</label>
<!-- Jazz values are reactive, but they are not recognized as reactive by Svelte -->
<!-- svelte-ignore binding_property_non_reactive -->
<input class="font-medium text-gray-900 w-full py-1" type="text" bind:value={file.name} id={`file-name-${file.id}`} />
{:else}
<h3 class="font-medium text-gray-900">{file.name}</h3>
</a>
{/if}
<p class="text-sm text-gray-500">
{isAdmin ? 'Owned by you' : ''} • Uploaded {new Date(
file.createdAt || 0

View File

@@ -15,9 +15,8 @@ export class FileShareProfile extends Profile {
export class ListOfSharedFiles extends CoList.Of(co.ref(SharedFile)) {}
export class FileShareAccountRoot extends CoMap {
type = co.string;
type = co.literal('file-share-account');
sharedFiles = co.ref(ListOfSharedFiles);
publicGroup = co.ref(Group);
}
export class FileShareAccount extends Account {
@@ -31,7 +30,7 @@ export class FileShareAccount extends Account {
await this._refs.root?.load();
// Initialize root if it doesn't exist
if (!this.root || this.root.type !== 'file-share-account') {
if (this.root === undefined || this.root?.type !== 'file-share-account') {
// Create a group that will own all shared files
const publicGroup = Group.create({ owner: this });
publicGroup.addMember('everyone', 'reader');
@@ -40,9 +39,7 @@ export class FileShareAccount extends Account {
{
type: 'file-share-account',
sharedFiles: ListOfSharedFiles.create([], { owner: publicGroup }),
publicGroup
},
{ owner: this }
);
}
}

View File

@@ -20,3 +20,13 @@ export function formatFileSize(bytes: number): string {
export function generateTempFileId(fileName: string | undefined, createdAt: Date | undefined): string {
return `file-${fileName ?? 'unknown'}-${createdAt?.getTime() ?? 0}`;
}
export function downloadFileBlob(blob: Blob, fileName: string) {
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = fileName;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
}

View File

@@ -8,7 +8,8 @@
<script lang="ts">
import { JazzProvider } from 'jazz-svelte';
import { PasskeyAuthBasicUI, usePasskeyAuth } from 'jazz-svelte';
import "jazz-inspector-element"
import { PasskeyAuthBasicUI } from 'jazz-svelte';
import { Toaster } from 'svelte-sonner';
import '../app.css';
import { FileShareAccount } from '$lib/schema';
@@ -29,6 +30,7 @@
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
}}
>
<jazz-inspector></jazz-inspector>
<PasskeyAuthBasicUI appName="File Share">
<div class="min-h-screen bg-gray-100">
{@render children()}

View File

@@ -1,54 +1,38 @@
<script lang="ts">
import { useAccount, useCoState } from 'jazz-svelte';
import { SharedFile, ListOfSharedFiles } from '$lib/schema';
import { createInviteLink } from 'jazz-svelte';
import { AccountCoState } from 'jazz-svelte';
import { SharedFile } from '$lib/schema';
import { FileStream } from 'jazz-tools';
import FileItem from '$lib/components/FileItem.svelte';
import { SvelteMap } from 'svelte/reactivity';
import { generateTempFileId } from '$lib/utils';
import { CloudUpload } from 'lucide-svelte';
const { me, logOut } = useAccount();
const me = new AccountCoState({
resolve: {
profile: true,
root: {
sharedFiles: {
$each: true
},
}
}
});
const mySharedFilesId = me?.root?._refs.sharedFiles.id;
const sharedFiles = $derived(useCoState(ListOfSharedFiles, mySharedFilesId, [{}]));
const sharedFiles = $derived(me.current?.root.sharedFiles);
let fileInput: HTMLInputElement;
type PendingSharedFile = {
name: string;
id: string;
createdAt: Date;
};
// Track files that are currently uploading
const uploadingFiles = new SvelteMap<string, PendingSharedFile>();
async function handleFileUpload(event: Event) {
const input = event.target as HTMLInputElement;
const files = input.files;
if (!files || !files.length || !me.root?.sharedFiles || !me.root.publicGroup) return;
if (!files?.length || !sharedFiles) return;
const file = files[0];
const fileName = file.name;
const createdAt = new Date();
const fileId = generateTempFileId(fileName, createdAt);
const tempFile: PendingSharedFile = {
name: fileName,
id: fileId,
createdAt
};
// Add to uploading files
uploadingFiles.set(fileId, tempFile);
try {
const ownership = { owner: me.root.publicGroup };
// Create a FileStream from the uploaded file
const fileStream = await FileStream.createFromBlob(file, ownership);
const fileStream = await FileStream.createFromBlob(file, sharedFiles._owner);
// Create the shared file entry
const sharedFile = SharedFile.create(
@@ -59,29 +43,22 @@
uploadedAt: new Date(),
size: file.size
},
ownership
sharedFiles._owner
);
// Add the file to the user's files list
me.root.sharedFiles.push(sharedFile);
sharedFiles.push(sharedFile);
} finally {
uploadingFiles.delete(fileId);
fileInput.value = ''; // reset input
}
}
async function shareFile(file: SharedFile) {
const inviteLink = createInviteLink(file, 'reader');
await navigator.clipboard.writeText(inviteLink);
alert('Share link copied to clipboard!');
}
async function deleteFile(file: SharedFile) {
if (!me?.root?.sharedFiles || !sharedFiles.current) return;
if (!sharedFiles) return;
const index = sharedFiles.current.indexOf(file);
const index = sharedFiles.indexOf(file);
if (index > -1) {
me.root.sharedFiles.splice(index, 1);
sharedFiles.splice(index, 1);
}
}
</script>
@@ -91,11 +68,11 @@
<div class="mb-12 flex items-center justify-between">
<div>
<h1 class="mb-2 text-4xl font-bold text-gray-900">File Share</h1>
<h2 class="text-xl text-gray-600">Welcome back, {me?.profile?.name}</h2>
<h2 class="text-xl text-gray-600">Welcome back, {me.current?.profile.name}</h2>
</div>
<button
onclick={logOut}
onclick={me.logOut}
class="rounded-lg bg-red-500 px-6 py-2.5 text-sm font-medium text-white transition-colors hover:bg-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2"
>
Log Out
@@ -126,14 +103,12 @@
<!-- Files List -->
<div class="space-y-4">
{#if sharedFiles.current}
{#if !(sharedFiles.current.length === 0 && uploadingFiles.size === 0)}
{#each [...sharedFiles.current, ...uploadingFiles.values()] as file (generateTempFileId(file?.name, file?.createdAt))}
{#if sharedFiles}
{#if sharedFiles.length}
{#each sharedFiles as file}
{#if file}
<FileItem
{file}
loading={uploadingFiles.has(generateTempFileId(file?.name, file?.createdAt))}
onShare={shareFile}
onDelete={deleteFile}
/>
{/if}

View File

@@ -1,39 +1,33 @@
<script lang="ts">
import { page } from '$app/stores';
import { useAccount, useCoState } from 'jazz-svelte';
import { CoState } from 'jazz-svelte';
import { SharedFile } from '$lib/schema';
import { File, FileDown, Link2 } from 'lucide-svelte';
import type { ID } from 'jazz-tools';
import { FileStream } from 'jazz-tools';
import { toast } from 'svelte-sonner';
import { downloadFileBlob } from '$lib/utils';
const { me } = useAccount();
const fileId = $page.params.fileId;
const file = $state(useCoState(SharedFile, fileId as ID<SharedFile>, {}));
const isAdmin = $derived(me && file.current?._owner?.myRole() === 'admin');
const file = $derived(new CoState(SharedFile, fileId as ID<SharedFile>));
const isAdmin = $derived(file.current?._owner?.myRole() === 'admin');
const fileStreamId = $derived(file.current?._refs.file?.id);
async function downloadFile() {
if (!file.current?._refs.file?.id || !me) {
if (!fileStreamId || !file.current) {
toast.error('Failed to download file');
return;
}
try {
const fileId = file.current._refs.file.id;
const blob = await FileStream.loadAsBlob(fileId, me, {});
const blob = await FileStream.loadAsBlob(fileStreamId);
if (!blob) {
toast.error('Failed to download file');
return;
}
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = file.current.name;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
URL.revokeObjectURL(url);
downloadFileBlob(blob, file.current.name);
toast.success('File downloaded successfully');
} catch (error) {
console.error('Error downloading file:', error);

View File

@@ -59,7 +59,7 @@ test('can login with passkey and upload file', async ({ page, browser }) => {
await fileChooser.setFiles(filePath);
// Verify the uploaded file appears in the list
await expect(page.getByText('test-file.txt')).toBeVisible();
await expect(page.getByRole("textbox", { name: "File name" })).toHaveValue("test-file.txt");
await page.getByRole('button', { name: 'Share file' }).click();
const inviteLink = await page.evaluate(() => navigator.clipboard.readText());

View File

@@ -1,5 +1,150 @@
# jazz-tailwind-demo-auth-starter
## 0.0.33
### Patch Changes
- jazz-inspector@0.13.27
- jazz-react@0.13.27
- jazz-tools@0.13.27
## 0.0.32
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-inspector@0.13.26
- jazz-react@0.13.26
## 0.0.31
### Patch Changes
- jazz-inspector@0.13.25
- jazz-react@0.13.25
- jazz-tools@0.13.25
## 0.0.30
### Patch Changes
- Updated dependencies [02a240c]
- jazz-tools@0.13.23
- jazz-inspector@0.13.23
- jazz-react@0.13.23
## 0.0.29
### Patch Changes
- Updated dependencies [7de210f]
- jazz-inspector@0.13.21
- jazz-react@0.13.21
- jazz-tools@0.13.21
## 0.0.28
### Patch Changes
- Updated dependencies [439f0fe]
- jazz-tools@0.13.20
- jazz-inspector@0.13.20
- jazz-react@0.13.20
## 0.0.27
### Patch Changes
- Updated dependencies [80530a4]
- jazz-tools@0.13.19
- jazz-inspector@0.13.19
- jazz-react@0.13.19
## 0.0.26
### Patch Changes
- Updated dependencies [761759c]
- jazz-tools@0.13.18
- jazz-inspector@0.13.18
- jazz-react@0.13.18
## 0.0.25
### Patch Changes
- jazz-inspector@0.13.17
- jazz-react@0.13.17
- jazz-tools@0.13.17
## 0.0.24
### Patch Changes
- jazz-inspector@0.13.16
- jazz-react@0.13.16
- jazz-tools@0.13.16
## 0.0.23
### Patch Changes
- jazz-inspector@0.13.15
- jazz-react@0.13.15
- jazz-tools@0.13.15
## 0.0.22
### Patch Changes
- jazz-inspector@0.13.14
- jazz-react@0.13.14
- jazz-tools@0.13.14
## 0.0.21
### Patch Changes
- jazz-inspector@0.13.13
- jazz-react@0.13.13
- jazz-tools@0.13.13
## 0.0.20
### Patch Changes
- Updated dependencies [4547525]
- jazz-tools@0.13.12
- jazz-inspector@0.13.12
- jazz-react@0.13.12
## 0.0.19
### Patch Changes
- Updated dependencies [17273a6]
- jazz-tools@0.13.11
- jazz-inspector@0.13.11
- jazz-react@0.13.11
## 0.0.18
### Patch Changes
- jazz-inspector@0.13.10
- jazz-react@0.13.10
- jazz-tools@0.13.10
## 0.0.17
### Patch Changes
- Updated dependencies [a6cf01f]
- jazz-tools@0.13.9
- jazz-inspector@0.13.9
- jazz-react@0.13.9
## 0.0.16
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "filestream",
"private": true,
"version": "0.0.16",
"version": "0.0.33",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -189,7 +189,7 @@ export function FileWidget() {
);
}
const fileData = me?.profile?.file?.getChunks();
const fileData = me?.profile?.file?.getMetadata();
const mimeType = fileData?.mimeType || "unknown";
return (

View File

@@ -1,5 +1,132 @@
# form
## 0.1.34
### Patch Changes
- jazz-react@0.13.27
- jazz-tools@0.13.27
## 0.1.33
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
## 0.1.32
### Patch Changes
- jazz-react@0.13.25
- jazz-tools@0.13.25
## 0.1.31
### Patch Changes
- Updated dependencies [02a240c]
- jazz-tools@0.13.23
- jazz-react@0.13.23
## 0.1.30
### Patch Changes
- jazz-react@0.13.21
- jazz-tools@0.13.21
## 0.1.29
### Patch Changes
- Updated dependencies [439f0fe]
- jazz-tools@0.13.20
- jazz-react@0.13.20
## 0.1.28
### Patch Changes
- Updated dependencies [80530a4]
- jazz-tools@0.13.19
- jazz-react@0.13.19
## 0.1.27
### Patch Changes
- Updated dependencies [761759c]
- jazz-tools@0.13.18
- jazz-react@0.13.18
## 0.1.26
### Patch Changes
- jazz-react@0.13.17
- jazz-tools@0.13.17
## 0.1.25
### Patch Changes
- jazz-react@0.13.16
- jazz-tools@0.13.16
## 0.1.24
### Patch Changes
- jazz-react@0.13.15
- jazz-tools@0.13.15
## 0.1.23
### Patch Changes
- jazz-react@0.13.14
- jazz-tools@0.13.14
## 0.1.22
### Patch Changes
- jazz-react@0.13.13
- jazz-tools@0.13.13
## 0.1.21
### Patch Changes
- Updated dependencies [4547525]
- jazz-tools@0.13.12
- jazz-react@0.13.12
## 0.1.20
### Patch Changes
- Updated dependencies [17273a6]
- jazz-tools@0.13.11
- jazz-react@0.13.11
## 0.1.19
### Patch Changes
- jazz-react@0.13.10
- jazz-tools@0.13.10
## 0.1.18
### Patch Changes
- Updated dependencies [a6cf01f]
- jazz-tools@0.13.9
- jazz-react@0.13.9
## 0.1.17
### Patch Changes

View File

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

View File

@@ -62,7 +62,7 @@ function CreateOrderForm({
onSave: (draft: DraftBubbleTeaOrder) => void;
}) {
const draft = useCoState(DraftBubbleTeaOrder, id, {
resolve: { addOns: true },
resolve: { addOns: true, instructions: true },
});
if (!draft) return;

View File

@@ -1,3 +1,4 @@
import { CoPlainText } from "jazz-tools";
import {
BubbleTeaAddOnTypes,
BubbleTeaBaseTeaTypes,
@@ -12,6 +13,18 @@ export function OrderForm({
order: BubbleTeaOrder | DraftBubbleTeaOrder;
onSave?: (e: React.FormEvent<HTMLFormElement>) => void;
}) {
// Handles updates to the instructions field of the order.
// If instructions already exist, applyDiff updates them incrementally.
// Otherwise, creates a new CoPlainText instance for the instructions.
const handleInstructionsChange = (
e: React.ChangeEvent<HTMLTextAreaElement>,
) => {
if (order.instructions) {
return order.instructions.applyDiff(e.target.value);
}
order.instructions = CoPlainText.create(e.target.value, order._owner);
};
return (
<form onSubmit={onSave} className="grid gap-5">
<div className="flex flex-col gap-2">
@@ -88,9 +101,9 @@ export function OrderForm({
<textarea
name="instructions"
id="instructions"
value={order.instructions}
value={`${order.instructions}`}
className="dark:bg-transparent"
onChange={(e) => (order.instructions = e.target.value)}
onChange={handleInstructionsChange}
></textarea>
</div>

View File

@@ -1,4 +1,4 @@
import { Account, CoList, CoMap, co } from "jazz-tools";
import { Account, CoList, CoMap, CoPlainText, co } from "jazz-tools";
export const BubbleTeaAddOnTypes = [
"Pearl",
@@ -28,7 +28,7 @@ export class BubbleTeaOrder extends CoMap {
addOns = co.ref(ListOfBubbleTeaAddOns);
deliveryDate = co.Date;
withMilk = co.boolean;
instructions = co.optional.string;
instructions = co.optional.ref(CoPlainText);
}
export class DraftBubbleTeaOrder extends CoMap {
@@ -36,7 +36,7 @@ export class DraftBubbleTeaOrder extends CoMap {
addOns = co.optional.ref(ListOfBubbleTeaAddOns);
deliveryDate = co.optional.Date;
withMilk = co.optional.boolean;
instructions = co.optional.string;
instructions = co.optional.ref(CoPlainText);
get hasChanges() {
return Object.keys(this._edits).length > 1 || this.addOns?.hasChanges;

View File

@@ -1,5 +1,132 @@
# image-upload
## 0.0.90
### Patch Changes
- jazz-react@0.13.27
- jazz-tools@0.13.27
## 0.0.89
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
## 0.0.88
### Patch Changes
- jazz-react@0.13.25
- jazz-tools@0.13.25
## 0.0.87
### Patch Changes
- Updated dependencies [02a240c]
- jazz-tools@0.13.23
- jazz-react@0.13.23
## 0.0.86
### Patch Changes
- jazz-react@0.13.21
- jazz-tools@0.13.21
## 0.0.85
### Patch Changes
- Updated dependencies [439f0fe]
- jazz-tools@0.13.20
- jazz-react@0.13.20
## 0.0.84
### Patch Changes
- Updated dependencies [80530a4]
- jazz-tools@0.13.19
- jazz-react@0.13.19
## 0.0.83
### Patch Changes
- Updated dependencies [761759c]
- jazz-tools@0.13.18
- jazz-react@0.13.18
## 0.0.82
### Patch Changes
- jazz-react@0.13.17
- jazz-tools@0.13.17
## 0.0.81
### Patch Changes
- jazz-react@0.13.16
- jazz-tools@0.13.16
## 0.0.80
### Patch Changes
- jazz-react@0.13.15
- jazz-tools@0.13.15
## 0.0.79
### Patch Changes
- jazz-react@0.13.14
- jazz-tools@0.13.14
## 0.0.78
### Patch Changes
- jazz-react@0.13.13
- jazz-tools@0.13.13
## 0.0.77
### Patch Changes
- Updated dependencies [4547525]
- jazz-tools@0.13.12
- jazz-react@0.13.12
## 0.0.76
### Patch Changes
- Updated dependencies [17273a6]
- jazz-tools@0.13.11
- jazz-react@0.13.11
## 0.0.75
### Patch Changes
- jazz-react@0.13.10
- jazz-tools@0.13.10
## 0.0.74
### Patch Changes
- Updated dependencies [a6cf01f]
- jazz-tools@0.13.9
- jazz-react@0.13.9
## 0.0.73
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "image-upload",
"private": true,
"version": "0.0.73",
"version": "0.0.90",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,159 @@
# jazz-example-inspector
## 0.0.144
### Patch Changes
- Updated dependencies [6357052]
- cojson@0.13.27
- cojson-transport-ws@0.13.27
- jazz-inspector@0.13.27
## 0.0.143
### Patch Changes
- jazz-inspector@0.13.26
## 0.0.142
### Patch Changes
- Updated dependencies [a846e07]
- cojson@0.13.25
- cojson-transport-ws@0.13.25
- jazz-inspector@0.13.25
## 0.0.141
### Patch Changes
- Updated dependencies [6b781cf]
- cojson@0.13.23
- cojson-transport-ws@0.13.23
- jazz-inspector@0.13.23
## 0.0.140
### Patch Changes
- Updated dependencies [7de210f]
- Updated dependencies [e14e61f]
- jazz-inspector@0.13.21
- cojson@0.13.21
- cojson-transport-ws@0.13.21
## 0.0.139
### Patch Changes
- Updated dependencies [adfc9a6]
- Updated dependencies [1389207]
- Updated dependencies [d6e143e]
- Updated dependencies [3e6229d]
- cojson@0.13.20
- cojson-transport-ws@0.13.20
- jazz-inspector@0.13.20
## 0.0.138
### Patch Changes
- jazz-inspector@0.13.19
## 0.0.137
### Patch Changes
- Updated dependencies [9089252]
- Updated dependencies [b470f63]
- Updated dependencies [66373ba]
- Updated dependencies [f24cad1]
- cojson@0.13.18
- cojson-transport-ws@0.13.18
- jazz-inspector@0.13.18
## 0.0.136
### Patch Changes
- Updated dependencies [9fb98e2]
- Updated dependencies [0b89fad]
- cojson@0.13.17
- cojson-transport-ws@0.13.17
- jazz-inspector@0.13.17
## 0.0.135
### Patch Changes
- Updated dependencies [c6fb8dc]
- cojson@0.13.16
- cojson-transport-ws@0.13.16
- jazz-inspector@0.13.16
## 0.0.134
### Patch Changes
- Updated dependencies [c712ef2]
- cojson@0.13.15
- cojson-transport-ws@0.13.15
- jazz-inspector@0.13.15
## 0.0.133
### Patch Changes
- Updated dependencies [5c2c7d4]
- cojson@0.13.14
- cojson-transport-ws@0.13.14
- jazz-inspector@0.13.14
## 0.0.132
### Patch Changes
- Updated dependencies [ec9cb40]
- cojson@0.13.13
- cojson-transport-ws@0.13.13
- jazz-inspector@0.13.13
## 0.0.131
### Patch Changes
- Updated dependencies [65719f2]
- cojson@0.13.12
- jazz-inspector@0.13.12
- cojson-transport-ws@0.13.12
## 0.0.130
### Patch Changes
- Updated dependencies [17273a6]
- Updated dependencies [3396ed4]
- Updated dependencies [267ea4c]
- cojson@0.13.11
- cojson-transport-ws@0.13.11
- jazz-inspector@0.13.11
## 0.0.129
### Patch Changes
- Updated dependencies [f837cfe]
- cojson@0.13.10
- cojson-transport-ws@0.13.10
- jazz-inspector@0.13.10
## 0.0.128
### Patch Changes
- jazz-inspector@0.13.9
## 0.0.127
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-inspector-app",
"private": true,
"version": "0.0.127",
"version": "0.0.144",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -0,0 +1,2 @@
VITE_JAZZ_WORKER_ACCOUNT=
JAZZ_WORKER_SECRET=

View File

@@ -0,0 +1,3 @@
dist
.env

View File

@@ -0,0 +1,8 @@
# Ignore artifacts:
build
coverage
**/.git
**/.svn
**/.hg
**/node_modules

View File

@@ -0,0 +1,24 @@
# Jazz Paper Scissors
## Setup
First of we need to create a new account for the dealer:
```bash
pnpm generate-env
```
This will generate a .env file like this one
```
VITE_JAZZ_WORKER_ACCOUNT=co_zn95yzQd1z24DJCgayN53ShyuMR
JAZZ_WORKER_SECRET=sealerSecret_z3Tcq41gtELJRHk3SzQutR2DhkpvEScQQP8DG8yeSh7zJ/signerSecret_zDsLhoNRSxjXrX6oSGzGH3XQQHDyp8QS292p28RToANYq
```
This should be enough the setup everything
Then run pnpm dev to start both the local build and the worker
```bash
pnpm dev
```

View File

@@ -0,0 +1,21 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "",
"css": "src/index.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"iconLibrary": "lucide"
}

View File

@@ -0,0 +1,21 @@
import * as fs from "fs";
import { createWorkerAccount } from "jazz-run/createWorkerAccount";
if (fs.existsSync(".env")) {
process.exit(0);
}
const account = await createWorkerAccount({
name: "jazz-paper-scissors-worker",
peer: "wss://cloud.jazz.tools/?key=jazz-paper-scissors@garden.co",
});
fs.writeFileSync(
".env",
`
VITE_JAZZ_WORKER_ACCOUNT=${account.accountID}
JAZZ_WORKER_SECRET=${account.agentSecret}
`,
);
process.exit(0);

View File

@@ -0,0 +1,20 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="/favicon.ico" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-tsrouter-app"
/>
<link rel="apple-touch-icon" href="/logo192.png" />
<link rel="manifest" href="/manifest.json" />
<title>Jazz example - Jazz Paper Scissors</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>

View File

@@ -0,0 +1,46 @@
{
"name": "jazz-paper-scissors",
"private": true,
"type": "module",
"scripts": {
"dev": "npm-run-all --parallel dev:web dev:worker",
"dev:web": "vite",
"dev:worker": "tsx --watch --env-file=.env ./src/worker.ts",
"build": "vite build && tsc",
"serve": "vite preview",
"generate-env": "tsx generate-env.ts",
"format-and-lint": "biome check .",
"format-and-lint:fix": "biome check . --write"
},
"dependencies": {
"@radix-ui/react-label": "^2.1.2",
"@radix-ui/react-separator": "^1.1.2",
"@radix-ui/react-slot": "^1.1.2",
"@tailwindcss/vite": "^4.0.17",
"@tanstack/react-router": "^1.115.0",
"@tanstack/react-router-devtools": "^1.114.29",
"@tanstack/router-plugin": "^1.114.30",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"jazz-inspector": "workspace:*",
"jazz-nodejs": "workspace:*",
"jazz-react": "workspace:*",
"jazz-tools": "workspace:*",
"lucide-react": "^0.485.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"tailwind-merge": "^3.0.2",
"tailwindcss": "^4.0.17",
"tw-animate-css": "^1.2.5"
},
"devDependencies": {
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.4",
"jazz-run": "workspace:*",
"npm-run-all": "^4.1.5",
"tsx": "^4.19.3",
"typescript": "~5.6.2",
"vite": "6.0.11"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,15 @@
{
"short_name": "TanStack App",
"name": "Create TanStack App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}

View File

@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:

View File

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

View File

@@ -0,0 +1,33 @@
import { RouterProvider, createRouter } from "@tanstack/react-router";
import { useAccount } from "jazz-react";
import { routeTree } from "./routeTree.gen";
// Create a new router instance
const router = createRouter({
routeTree,
context: {
// @ts-expect-error - just a placeholder - me is set in the App component down below
me: undefined,
},
defaultPreload: "intent",
scrollRestoration: true,
defaultStructuralSharing: true,
defaultPreloadStaleTime: 0,
});
// Register the router instance for type safety
declare module "@tanstack/react-router" {
interface Register {
router: typeof router;
}
}
export function App() {
const { me } = useAccount();
if (!me) {
return <div>Loading...</div>;
}
return <RouterProvider router={router} context={{ me }} />;
}

View File

@@ -0,0 +1,79 @@
import { Slot } from "@radix-ui/react-slot";
import { type VariantProps, cva } from "class-variance-authority";
import type * as React from "react";
import { cn } from "@/lib/utils";
import { Loader2Icon } from "lucide-react";
const buttonVariants = cva(
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
{
variants: {
variant: {
default:
"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
destructive:
"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
outline:
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
secondary:
"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
ghost:
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
link: "text-primary underline-offset-4 hover:underline",
},
size: {
default: "h-9 px-4 py-2 has-[>svg]:px-3",
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
icon: "size-9",
},
},
defaultVariants: {
variant: "default",
size: "default",
},
},
);
interface Props
extends React.ComponentProps<"button">,
VariantProps<typeof buttonVariants> {
asChild?: boolean;
loading?: boolean;
loadingText?: string;
}
function Button({
className,
variant,
size,
asChild = false,
loading = false,
disabled,
loadingText = "Loading...",
children,
...props
}: Props) {
const Comp = asChild ? Slot : "button";
return (
<Comp
data-slot="button"
className={cn(buttonVariants({ variant, size, className }))}
disabled={loading || disabled}
{...props}
>
{loading ? (
<>
<Loader2Icon className="mr-2 h-4 w-4 animate-spin" />
{loadingText}
</>
) : (
children
)}
</Comp>
);
}
export { Button, buttonVariants };

View File

@@ -0,0 +1,109 @@
import type * as React from "react";
import { cn } from "@/lib/utils";
function Card({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card"
className={cn(
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
className,
)}
{...props}
/>
);
}
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-header"
className={cn(
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
className,
)}
{...props}
/>
);
}
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-title"
className={cn("leading-none font-semibold", className)}
{...props}
/>
);
}
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-description"
className={cn("text-muted-foreground text-sm", className)}
{...props}
/>
);
}
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-action"
className={cn(
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
className,
)}
{...props}
/>
);
}
function CardSmall({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-small"
className={cn(
"sm-card grid grid-flow-col justify-items-center gap-6 rounded-xl border py-6 shadow-sm m-4",
className,
)}
{...props}
/>
);
}
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-content"
className={cn("px-6", className)}
{...props}
/>
);
}
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="card-footer"
className={cn(
"flex items-center px-6 [.border-t]:pt-6 border-t",
className,
)}
{...props}
/>
);
}
export {
Card,
CardHeader,
CardFooter,
CardTitle,
CardAction,
CardDescription,
CardContent,
CardSmall,
};

View File

@@ -0,0 +1,21 @@
import * as React from "react";
import { cn } from "@/lib/utils";
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
return (
<input
type={type}
data-slot="input"
className={cn(
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
className,
)}
{...props}
/>
);
}
export { Input };

View File

@@ -0,0 +1,13 @@
import { JazzProvider } from "jazz-react";
export function JazzAndAuth({ children }: { children: React.ReactNode }) {
return (
<JazzProvider
sync={{
peer: "wss://cloud.jazz.tools/?key=jazz-paper-scissors@garden.co",
}}
>
{children}
</JazzProvider>
);
}

View File

@@ -0,0 +1,22 @@
import * as LabelPrimitive from "@radix-ui/react-label";
import * as React from "react";
import { cn } from "@/lib/utils";
function Label({
className,
...props
}: React.ComponentProps<typeof LabelPrimitive.Root>) {
return (
<LabelPrimitive.Root
data-slot="label"
className={cn(
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
className,
)}
{...props}
/>
);
}
export { Label };

View File

@@ -0,0 +1,28 @@
"use client";
import * as SeparatorPrimitive from "@radix-ui/react-separator";
import * as React from "react";
import { cn } from "@/lib/utils";
function Separator({
className,
orientation = "horizontal",
decorative = true,
...props
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
return (
<SeparatorPrimitive.Root
data-slot="separator-root"
decorative={decorative}
orientation={orientation}
className={cn(
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
className,
)}
{...props}
/>
);
}
export { Separator };

View File

@@ -0,0 +1,5 @@
if (!import.meta.env.VITE_JAZZ_WORKER_ACCOUNT) {
throw new Error(".env missing, run `pnpm generate-env`");
}
export const WORKER_ID = import.meta.env.VITE_JAZZ_WORKER_ACCOUNT;

View File

@@ -0,0 +1,120 @@
@import "tailwindcss";
@import "tw-animate-css";
@custom-variant dark (&:is(.dark *));
:root {
--radius: 0.625rem;
--background: oklch(1 0 0);
--foreground: oklch(0.145 0 0);
--card: oklch(1 0 0);
--card-foreground: oklch(0.145 0 0);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.145 0 0);
--primary: oklch(0.205 0 0);
--primary-foreground: oklch(0.985 0 0);
--secondary: oklch(0.97 0 0);
--secondary-foreground: oklch(0.205 0 0);
--muted: oklch(0.97 0 0);
--muted-foreground: oklch(0.556 0 0);
--accent: oklch(0.97 0 0);
--accent-foreground: oklch(0.205 0 0);
--destructive: oklch(0.577 0.245 27.325);
--border: oklch(0.922 0 0);
--input: oklch(0.922 0 0);
--ring: oklch(0.708 0 0);
--chart-1: oklch(0.646 0.222 41.116);
--chart-2: oklch(0.6 0.118 184.704);
--chart-3: oklch(0.398 0.07 227.392);
--chart-4: oklch(0.828 0.189 84.429);
--chart-5: oklch(0.769 0.188 70.08);
--sidebar: oklch(0.985 0 0);
--sidebar-foreground: oklch(0.145 0 0);
--sidebar-primary: oklch(0.205 0 0);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.97 0 0);
--sidebar-accent-foreground: oklch(0.205 0 0);
--sidebar-border: oklch(0.922 0 0);
--sidebar-ring: oklch(0.708 0 0);
}
.dark {
--background: oklch(0.145 0 0);
--foreground: oklch(0.985 0 0);
--card: oklch(0.205 0 0);
--card-foreground: oklch(0.985 0 0);
--popover: oklch(0.205 0 0);
--popover-foreground: oklch(0.985 0 0);
--primary: oklch(0.922 0 0);
--primary-foreground: oklch(0.205 0 0);
--secondary: oklch(0.269 0 0);
--secondary-foreground: oklch(0.985 0 0);
--muted: oklch(0.269 0 0);
--muted-foreground: oklch(0.708 0 0);
--accent: oklch(0.269 0 0);
--accent-foreground: oklch(0.985 0 0);
--destructive: oklch(0.704 0.191 22.216);
--border: oklch(1 0 0 / 10%);
--input: oklch(1 0 0 / 15%);
--ring: oklch(0.556 0 0);
--chart-1: oklch(0.488 0.243 264.376);
--chart-2: oklch(0.696 0.17 162.48);
--chart-3: oklch(0.769 0.188 70.08);
--chart-4: oklch(0.627 0.265 303.9);
--chart-5: oklch(0.645 0.246 16.439);
--sidebar: oklch(0.205 0 0);
--sidebar-foreground: oklch(0.985 0 0);
--sidebar-primary: oklch(0.488 0.243 264.376);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.269 0 0);
--sidebar-accent-foreground: oklch(0.985 0 0);
--sidebar-border: oklch(1 0 0 / 10%);
--sidebar-ring: oklch(0.556 0 0);
}
@theme inline {
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) + 4px);
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-card: var(--card);
--color-card-foreground: var(--card-foreground);
--color-popover: var(--popover);
--color-popover-foreground: var(--popover-foreground);
--color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground);
--color-secondary: var(--secondary);
--color-secondary-foreground: var(--secondary-foreground);
--color-muted: var(--muted);
--color-muted-foreground: var(--muted-foreground);
--color-accent: var(--accent);
--color-accent-foreground: var(--accent-foreground);
--color-destructive: var(--destructive);
--color-border: var(--border);
--color-input: var(--input);
--color-ring: var(--ring);
--color-chart-1: var(--chart-1);
--color-chart-2: var(--chart-2);
--color-chart-3: var(--chart-3);
--color-chart-4: var(--chart-4);
--color-chart-5: var(--chart-5);
--color-sidebar: var(--sidebar);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-ring: var(--sidebar-ring);
}
@layer base {
* {
@apply border-border outline-ring/50;
}
body {
@apply bg-background text-foreground;
}
}

View File

@@ -0,0 +1,26 @@
import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
/**
* Given a player selections, returns the winner of the current game.
*/
export function determineWinner(
player1Choice: "rock" | "paper" | "scissors",
player2Choice: "rock" | "paper" | "scissors",
) {
if (player1Choice === player2Choice) {
return "draw";
} else if (
(player1Choice === "rock" && player2Choice === "scissors") ||
(player1Choice === "paper" && player2Choice === "rock") ||
(player1Choice === "scissors" && player2Choice === "paper")
) {
return "player1";
} else {
return "player2";
}
}

View File

@@ -0,0 +1,25 @@
import { JazzInspector } from "jazz-inspector";
import { StrictMode } from "react";
import ReactDOM from "react-dom/client";
import "./index.css";
import { apiKey } from "@/apiKey.ts";
import { JazzProvider } from "jazz-react";
import { App } from "./app";
const rootElement = document.getElementById("app");
if (rootElement && !rootElement.innerHTML) {
const root = ReactDOM.createRoot(rootElement);
root.render(
<StrictMode>
<JazzProvider
sync={{
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
}}
>
<JazzInspector />
<App />
</JazzProvider>
</StrictMode>,
);
}

View File

@@ -0,0 +1,177 @@
/* eslint-disable */
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// This file was automatically generated by TanStack Router.
// You should NOT make any changes in this file as it will be overwritten.
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
// Import Routes
import { Route as rootRoute } from './routes/__root'
import { Route as AuthenticatedImport } from './routes/_authenticated'
import { Route as IndexImport } from './routes/index'
import { Route as AuthenticatedWaitingRoomWaitingRoomIdImport } from './routes/_authenticated/waiting-room.$waitingRoomId'
import { Route as AuthenticatedGameGameIdImport } from './routes/_authenticated/game.$gameId'
// Create/Update Routes
const AuthenticatedRoute = AuthenticatedImport.update({
id: '/_authenticated',
getParentRoute: () => rootRoute,
} as any)
const IndexRoute = IndexImport.update({
id: '/',
path: '/',
getParentRoute: () => rootRoute,
} as any)
const AuthenticatedWaitingRoomWaitingRoomIdRoute =
AuthenticatedWaitingRoomWaitingRoomIdImport.update({
id: '/waiting-room/$waitingRoomId',
path: '/waiting-room/$waitingRoomId',
getParentRoute: () => AuthenticatedRoute,
} as any)
const AuthenticatedGameGameIdRoute = AuthenticatedGameGameIdImport.update({
id: '/game/$gameId',
path: '/game/$gameId',
getParentRoute: () => AuthenticatedRoute,
} as any)
// Populate the FileRoutesByPath interface
declare module '@tanstack/react-router' {
interface FileRoutesByPath {
'/': {
id: '/'
path: '/'
fullPath: '/'
preLoaderRoute: typeof IndexImport
parentRoute: typeof rootRoute
}
'/_authenticated': {
id: '/_authenticated'
path: ''
fullPath: ''
preLoaderRoute: typeof AuthenticatedImport
parentRoute: typeof rootRoute
}
'/_authenticated/game/$gameId': {
id: '/_authenticated/game/$gameId'
path: '/game/$gameId'
fullPath: '/game/$gameId'
preLoaderRoute: typeof AuthenticatedGameGameIdImport
parentRoute: typeof AuthenticatedImport
}
'/_authenticated/waiting-room/$waitingRoomId': {
id: '/_authenticated/waiting-room/$waitingRoomId'
path: '/waiting-room/$waitingRoomId'
fullPath: '/waiting-room/$waitingRoomId'
preLoaderRoute: typeof AuthenticatedWaitingRoomWaitingRoomIdImport
parentRoute: typeof AuthenticatedImport
}
}
}
// Create and export the route tree
interface AuthenticatedRouteChildren {
AuthenticatedGameGameIdRoute: typeof AuthenticatedGameGameIdRoute
AuthenticatedWaitingRoomWaitingRoomIdRoute: typeof AuthenticatedWaitingRoomWaitingRoomIdRoute
}
const AuthenticatedRouteChildren: AuthenticatedRouteChildren = {
AuthenticatedGameGameIdRoute: AuthenticatedGameGameIdRoute,
AuthenticatedWaitingRoomWaitingRoomIdRoute:
AuthenticatedWaitingRoomWaitingRoomIdRoute,
}
const AuthenticatedRouteWithChildren = AuthenticatedRoute._addFileChildren(
AuthenticatedRouteChildren,
)
export interface FileRoutesByFullPath {
'/': typeof IndexRoute
'': typeof AuthenticatedRouteWithChildren
'/game/$gameId': typeof AuthenticatedGameGameIdRoute
'/waiting-room/$waitingRoomId': typeof AuthenticatedWaitingRoomWaitingRoomIdRoute
}
export interface FileRoutesByTo {
'/': typeof IndexRoute
'': typeof AuthenticatedRouteWithChildren
'/game/$gameId': typeof AuthenticatedGameGameIdRoute
'/waiting-room/$waitingRoomId': typeof AuthenticatedWaitingRoomWaitingRoomIdRoute
}
export interface FileRoutesById {
__root__: typeof rootRoute
'/': typeof IndexRoute
'/_authenticated': typeof AuthenticatedRouteWithChildren
'/_authenticated/game/$gameId': typeof AuthenticatedGameGameIdRoute
'/_authenticated/waiting-room/$waitingRoomId': typeof AuthenticatedWaitingRoomWaitingRoomIdRoute
}
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
fullPaths: '/' | '' | '/game/$gameId' | '/waiting-room/$waitingRoomId'
fileRoutesByTo: FileRoutesByTo
to: '/' | '' | '/game/$gameId' | '/waiting-room/$waitingRoomId'
id:
| '__root__'
| '/'
| '/_authenticated'
| '/_authenticated/game/$gameId'
| '/_authenticated/waiting-room/$waitingRoomId'
fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
IndexRoute: typeof IndexRoute
AuthenticatedRoute: typeof AuthenticatedRouteWithChildren
}
const rootRouteChildren: RootRouteChildren = {
IndexRoute: IndexRoute,
AuthenticatedRoute: AuthenticatedRouteWithChildren,
}
export const routeTree = rootRoute
._addFileChildren(rootRouteChildren)
._addFileTypes<FileRouteTypes>()
/* ROUTE_MANIFEST_START
{
"routes": {
"__root__": {
"filePath": "__root.tsx",
"children": [
"/",
"/_authenticated"
]
},
"/": {
"filePath": "index.tsx"
},
"/_authenticated": {
"filePath": "_authenticated.tsx",
"children": [
"/_authenticated/game/$gameId",
"/_authenticated/waiting-room/$waitingRoomId"
]
},
"/_authenticated/game/$gameId": {
"filePath": "_authenticated/game.$gameId.tsx",
"parent": "/_authenticated"
},
"/_authenticated/waiting-room/$waitingRoomId": {
"filePath": "_authenticated/waiting-room.$waitingRoomId.tsx",
"parent": "/_authenticated"
}
}
}
ROUTE_MANIFEST_END */

View File

@@ -0,0 +1,19 @@
import { Outlet, createRootRouteWithContext } from "@tanstack/react-router";
import { TanStackRouterDevtools } from "@tanstack/react-router-devtools";
import type { Account } from "jazz-tools";
import { JazzAndAuth } from "../components/ui/jazz-and-auth";
interface RouterContext {
me: Account;
}
export const Route = createRootRouteWithContext<RouterContext>()({
component: () => (
<>
<JazzAndAuth>
<Outlet />
<TanStackRouterDevtools />
</JazzAndAuth>
</>
),
});

View File

@@ -0,0 +1,12 @@
import { Outlet, createFileRoute } from "@tanstack/react-router";
export const Route = createFileRoute("/_authenticated")({
component: RouteComponent,
beforeLoad: ({ context }) => {
return context;
},
});
function RouteComponent() {
return <Outlet />;
}

View File

@@ -0,0 +1,172 @@
import { Button } from "@/components/ui/button";
import {
Card,
CardContent,
CardHeader,
CardSmall,
CardTitle,
} from "@/components/ui/card";
import { WORKER_ID } from "@/constants";
import { Game, NewGameIntent, PlayIntent } from "@/schema";
import { createFileRoute, redirect } from "@tanstack/react-router";
import { experimental_useInboxSender, useCoState } from "jazz-react";
import { type ID } from "jazz-tools";
import { Badge, CircleHelp, Scissors, ScrollText } from "lucide-react";
import { useEffect, useState } from "react";
const playIcon = (selection: "rock" | "paper" | "scissors" | undefined) => {
switch (selection) {
case "rock":
return <Badge className="w-5 h-5" />;
case "paper":
return <ScrollText className="w-5 h-5" />;
case "scissors":
return <Scissors className="w-5 h-5" />;
default:
return <CircleHelp className="w-5 h-5" />;
}
};
export const Route = createFileRoute("/_authenticated/game/$gameId")({
component: RouteComponent,
loader: async ({ context: { me }, params: { gameId } }) => {
const game = await Game.load(gameId as ID<Game>, {
resolve: {
player1: true,
player2: true,
},
});
if (!game) {
throw redirect({ to: "/" });
}
return { gameId, me, loaderGame: game };
},
});
function RouteComponent() {
const { gameId, loaderGame } = Route.useLoaderData();
const isPlayer1 = loaderGame.player1?.account?.isMe;
const player = isPlayer1 ? "player1" : "player2";
const [playSelection, setPlaySelection] = useState<
"rock" | "paper" | "scissors" | undefined
>(loaderGame[player]?.playSelection);
const sendInboxMessage = experimental_useInboxSender(WORKER_ID);
const game = useCoState(Game, gameId as ID<Game>);
useEffect(() => {
let gameCompleted = Boolean(loaderGame.outcome);
return loaderGame.subscribe((game) => {
if (gameCompleted && !game.outcome) {
setPlaySelection(undefined); // Reset play selection when one player clicks on "Start a new game"
}
gameCompleted = Boolean(game.outcome);
});
}, []);
if (!game) {
return null;
}
const gameComplete = game.outcome !== undefined;
const opponent = isPlayer1 ? "player2" : "player1";
const currentPlayer = game[player];
const opponentPlayer = game[opponent];
const opponentSelection = opponentPlayer?.playSelection;
const onSubmit = async (
playSelection: "rock" | "paper" | "scissors" | undefined,
) => {
if (!playSelection) return;
sendInboxMessage(
PlayIntent.create({ type: "play", gameId, player, playSelection }),
);
};
const onNewGame = async () => {
sendInboxMessage(NewGameIntent.create({ type: "newGame", gameId }));
};
return (
<Card className="mx-auto max-w-5xl">
<div className="mx-auto text-center">
<CardHeader>
<CardTitle>Jazz, Paper, Scissors!</CardTitle>
<span>Welcome {isPlayer1 ? "Player 1" : "Player 2"}</span>
<span>
{game?.player1Score ?? 0} - {game?.player2Score ?? 0}
</span>
</CardHeader>
{gameComplete ? (
<>
<div className="border">
Game Over,{" "}
{game?.outcome === player
? "You Win!"
: game?.outcome === "draw"
? "It's a Draw!"
: "You Lose!"}
</div>
<Button onClick={onNewGame}>Start a new game</Button>
</>
) : null}
<CardContent>
<div>
{playSelection === undefined
? "Make Your Selection"
: "Your Selection: "}
</div>
<CardSmall>{playIcon(playSelection)}</CardSmall>
{gameComplete ? null : (
<>
<dl className="grid grid-cols-3 gap-x-8 gap-y-16 text-center">
<Button
variant={"outline"}
size={"icon"}
onClick={() => setPlaySelection("rock")}
>
<Badge className="w-5 h-5" />
</Button>
<Button
variant={"outline"}
size={"icon"}
onClick={() => setPlaySelection("paper")}
>
<ScrollText className="w-5 h-5" />
</Button>
<Button
variant={"outline"}
size={"icon"}
onClick={() => setPlaySelection("scissors")}
>
<Scissors className="w-5 h-5" />
</Button>
</dl>
<div className="m-4">
<Button
disabled={
playSelection === undefined ||
Boolean(currentPlayer?.playSelection)
}
onClick={() => onSubmit(playSelection)}
>
Go!
</Button>
</div>
</>
)}
<div>Your Opponent Selected:</div>
<CardSmall>{playIcon(opponentSelection)}</CardSmall>
</CardContent>
</div>
</Card>
);
}

View File

@@ -0,0 +1,120 @@
import { Button } from "@/components/ui/button";
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { WORKER_ID } from "@/constants";
import { JoinGameRequest, WaitingRoom } from "@/schema";
import { createFileRoute, redirect } from "@tanstack/react-router";
import { Group, type ID, InboxSender } from "jazz-tools";
import { ClipboardCopyIcon, Loader2Icon } from "lucide-react";
import { useEffect, useState } from "react";
export const Route = createFileRoute(
"/_authenticated/waiting-room/$waitingRoomId",
)({
component: RouteComponent,
loader: async ({ context: { me }, params: { waitingRoomId } }) => {
const waitingRoom = await WaitingRoom.load(
waitingRoomId as ID<WaitingRoom>,
{
resolve: {
game: true,
},
},
);
if (!waitingRoom) {
throw redirect({ to: "/" });
}
if (!waitingRoom?.account1?.isMe) {
const sender = await InboxSender.load<JoinGameRequest, WaitingRoom>(
WORKER_ID,
me,
// { account1: {}, account2: {}, me, game: {} },
);
sender.sendMessage(
JoinGameRequest.create(
{ type: "joinGame", waitingRoom },
{ owner: Group.create({ owner: me }) },
),
);
// If the waiting room already has a game, redirect to the game
if (waitingRoom?.game) {
throw redirect({ to: `/game/${waitingRoom.game.id}` as string });
}
}
return { waitingRoom };
},
});
function RouteComponent() {
const { waitingRoom } = Route.useLoaderData();
const navigate = Route.useNavigate();
const [copied, setCopied] = useState(false);
useEffect(() => {
if (!waitingRoom) {
return;
}
return waitingRoom.subscribe(
{
resolve: {
game: true,
},
},
async () => {
if (waitingRoom.game) {
navigate({ to: `/game/${waitingRoom.game.id}` });
}
},
);
}, [waitingRoom]);
const onCopyClick = () => {
navigator.clipboard.writeText(window.location.toString());
setCopied(true);
};
return (
<div className="h-screen flex flex-col w-full place-items-center justify-center p-2">
<Card className="w-[500px]">
<CardHeader>
<CardTitle className="flex items-center">
<Loader2Icon className="animate-spin inline h-8 w-8 mr-2" />
Waiting for opponent to join the game
</CardTitle>
<CardDescription>
Share this link with your friend to join the game. The game will
automatically start once they join.
</CardDescription>
</CardHeader>
<CardContent>
<div className="flex">
<Input
className="w-full border bg-muted rounded-e-none"
readOnly
value={`${window.location}`}
/>
<Button onClick={onCopyClick} className="rounded-s-none w-25">
{copied ? (
"Copied!"
) : (
<>
<ClipboardCopyIcon className="w-5 h-5" />
Copy
</>
)}
</Button>
</div>
</CardContent>
</Card>
</div>
);
}

View File

@@ -0,0 +1,54 @@
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { WORKER_ID } from "@/constants";
import { CreateGameRequest } from "@/schema";
import { createFileRoute, useNavigate } from "@tanstack/react-router";
import { experimental_useInboxSender as useInboxSender } from "jazz-react";
import { useState } from "react";
export const Route = createFileRoute("/")({
component: HomeComponent,
});
function HomeComponent() {
const createGame = useInboxSender(WORKER_ID);
const navigate = useNavigate({ from: "/" });
const [isLoading, setIsLoading] = useState(false);
const onNewGameClick = async () => {
setIsLoading(true);
const waitingRoomId = await createGame(
CreateGameRequest.create({
type: "createGame",
}),
);
if (!waitingRoomId) {
setIsLoading(false);
return;
}
navigate({ to: `/waiting-room/$waitingRoomId`, params: { waitingRoomId } });
};
return (
<div className="h-screen flex flex-col w-full place-items-center justify-center p-2">
<Card className="w-[500px]">
<CardHeader>
<CardTitle>Welcome to Jazz, Paper, Scissors!</CardTitle>
</CardHeader>
<CardContent className="p-0">
<div className="flex items-center p-4">
<Button
onClick={onNewGameClick}
loading={isLoading}
loadingText="Creating game..."
className="w-full"
>
New Game
</Button>
</div>
</CardContent>
</Card>
</div>
);
}

View File

@@ -0,0 +1,65 @@
import { Account, CoMap, co } from "jazz-tools";
export class Game extends CoMap {
player1 = co.ref(Player);
player2? = co.ref(Player);
outcome? = co.literal("player1", "player2", "draw");
player1Score = co.number;
player2Score = co.number;
/**
* Given a player, returns the opponent in the current game.
*/
getOpponent(player: Player) {
// TODO: player may be unrelated to this game
const opponent =
player.account?.id === this.player1?.account?.id
? this.player2
: this.player1;
if (!opponent) {
throw new Error("Opponent not found");
}
return opponent.ensureLoaded({
// account: {},
resolve: {},
});
}
}
export class Player extends CoMap {
account = co.ref(Account);
playSelection? = co.literal("rock", "paper", "scissors");
}
export class WaitingRoom extends CoMap {
account1 = co.ref(Account);
account2 = co.optional.ref(Account);
game = co.optional.ref(Game);
}
export class InboxMessage extends CoMap {
type = co.literal("play", "createGame", "joinGame", "newGame");
}
export class PlayIntent extends InboxMessage {
type = co.literal("play");
gameId = co.string;
player = co.literal("player1", "player2");
playSelection = co.literal("rock", "paper", "scissors");
}
export class NewGameIntent extends InboxMessage {
type = co.literal("newGame");
gameId = co.string;
}
export class CreateGameRequest extends InboxMessage {
type = co.literal("createGame");
}
export class JoinGameRequest extends InboxMessage {
type = co.literal("joinGame");
waitingRoom = co.ref(WaitingRoom);
}

View File

@@ -0,0 +1,201 @@
import {
Game,
InboxMessage,
JoinGameRequest,
NewGameIntent,
PlayIntent,
Player,
WaitingRoom,
} from "@/schema";
import { startWorker } from "jazz-nodejs";
import { Account, Group, type ID } from "jazz-tools";
import { determineWinner } from "./lib/utils";
if (!process.env.VITE_JAZZ_WORKER_ACCOUNT || !process.env.JAZZ_WORKER_SECRET) {
throw new Error(".env missing, run `pnpm generate-env`");
}
const {
worker,
experimental: { inbox },
} = await startWorker({
accountID: process.env.VITE_JAZZ_WORKER_ACCOUNT,
syncServer: "wss://cloud.jazz.tools/?key=jazz-paper-scissors@garden.co ",
});
inbox.subscribe(
InboxMessage,
async (message, senderID) => {
const playerAccount = await Account.load(senderID, { loadAs: worker });
if (!playerAccount) {
return;
}
switch (message.type) {
case "play":
handlePlayIntent(senderID, message.castAs(PlayIntent));
break;
case "newGame":
handleNewGameIntent(senderID, message.castAs(NewGameIntent));
break;
case "createGame":
const waitingRoomGroup = Group.create({ owner: worker });
waitingRoomGroup.addMember("everyone", "reader");
const waitingRoom = WaitingRoom.create(
{ account1: playerAccount },
{ owner: waitingRoomGroup },
);
console.log("waiting room created with id:", waitingRoom.id);
return waitingRoom;
case "joinGame":
const joinGameRequest = message.castAs(JoinGameRequest);
if (
!joinGameRequest.waitingRoom ||
!joinGameRequest.waitingRoom.account1
) {
console.error("No waiting room in join game request");
return;
}
joinGameRequest.waitingRoom.account2 = playerAccount;
const game = await createGame({
account1: joinGameRequest.waitingRoom.account1,
account2: joinGameRequest.waitingRoom.account2,
});
console.log("game created with id:", game.id);
joinGameRequest.waitingRoom.game = game;
return joinGameRequest.waitingRoom.game;
}
},
{ retries: 3 },
);
console.log("worker", worker.id, "started");
interface CreateGameParams {
account1: Account;
account2: Account;
}
async function createGame({ account1, account2 }: CreateGameParams) {
const publicReadOnly = Group.create({ owner: worker });
publicReadOnly.addMember(account1, "reader");
publicReadOnly.addMember(account2, "reader");
const player1 = createPlayer({ account: account1 });
const player2 = createPlayer({ account: account2 });
const game = Game.create(
{
player1: player1,
player2: player2,
player1Score: 0,
player2Score: 0,
},
{ owner: publicReadOnly },
);
await game.waitForSync();
return game;
}
interface CreatePlayerParams {
account: Account;
}
function createPlayer({ account }: CreatePlayerParams) {
const publicRead = Group.create({ owner: worker });
publicRead.addMember("everyone", "reader");
const player = Player.create(
{
account,
},
{ owner: publicRead },
);
return player;
}
async function handleNewGameIntent(_: ID<Account>, message: NewGameIntent) {
const gameId = message.gameId;
const game = await Game.load(gameId as ID<Game>, {
loadAs: worker,
resolve: {
player1: true,
player2: true,
},
});
if (!game) {
throw new Error("Game not found");
}
if (game.outcome) {
game.outcome = undefined;
game.player1.playSelection = undefined;
if (game.player2) {
game.player2.playSelection = undefined;
}
}
}
async function handlePlayIntent(_: ID<Account>, message: PlayIntent) {
// determine current player, update game with outcome
const gameId = message.gameId;
if (!gameId) {
console.error("Game not found");
return;
}
const game = await Game.load(gameId as ID<Game>, {
loadAs: worker,
resolve: {
player1: true,
player2: true,
},
});
if (!game) {
throw new Error("Game not found");
}
const currentPlayer = game[message.player as "player1" | "player2"];
if (!currentPlayer) {
throw new Error("Player not found");
}
if (currentPlayer.playSelection) {
throw new Error("Player already made a selection");
}
currentPlayer.playSelection = message.playSelection;
const player1Selection = game?.player1.playSelection;
const player2Selection = game?.player2?.playSelection;
// once both players have a selection, determine the winner
if (
!!player1Selection &&
player1Selection !== undefined &&
!!player2Selection &&
player2Selection !== undefined
) {
const outcome = determineWinner(player1Selection, player2Selection);
game.outcome = outcome;
if (outcome === "player1") {
game.player1Score += 1;
} else if (outcome === "player2") {
game.player2Score += 1;
}
}
}

View File

@@ -0,0 +1,28 @@
{
"include": ["**/*.ts", "**/*.tsx"],
"compilerOptions": {
"target": "ES2022",
"jsx": "react-jsx",
"module": "ESNext",
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"types": ["vite/client"],
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,
/* Linting */
"skipLibCheck": true,
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}

View File

@@ -0,0 +1,18 @@
import { resolve } from "node:path";
import tailwindcss from "@tailwindcss/vite";
import { TanStackRouterVite } from "@tanstack/router-plugin/vite";
import viteReact from "@vitejs/plugin-react";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [
TanStackRouterVite({ autoCodeSplitting: true }),
viteReact(),
tailwindcss(),
],
resolve: {
alias: {
"@": resolve(__dirname, "./src"),
},
},
});

View File

@@ -1,5 +1,132 @@
# multi-cursors
## 0.0.86
### Patch Changes
- jazz-react@0.13.27
- jazz-tools@0.13.27
## 0.0.85
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
## 0.0.84
### Patch Changes
- jazz-react@0.13.25
- jazz-tools@0.13.25
## 0.0.83
### Patch Changes
- Updated dependencies [02a240c]
- jazz-tools@0.13.23
- jazz-react@0.13.23
## 0.0.82
### Patch Changes
- jazz-react@0.13.21
- jazz-tools@0.13.21
## 0.0.81
### Patch Changes
- Updated dependencies [439f0fe]
- jazz-tools@0.13.20
- jazz-react@0.13.20
## 0.0.80
### Patch Changes
- Updated dependencies [80530a4]
- jazz-tools@0.13.19
- jazz-react@0.13.19
## 0.0.79
### Patch Changes
- Updated dependencies [761759c]
- jazz-tools@0.13.18
- jazz-react@0.13.18
## 0.0.78
### Patch Changes
- jazz-react@0.13.17
- jazz-tools@0.13.17
## 0.0.77
### Patch Changes
- jazz-react@0.13.16
- jazz-tools@0.13.16
## 0.0.76
### Patch Changes
- jazz-react@0.13.15
- jazz-tools@0.13.15
## 0.0.75
### Patch Changes
- jazz-react@0.13.14
- jazz-tools@0.13.14
## 0.0.74
### Patch Changes
- jazz-react@0.13.13
- jazz-tools@0.13.13
## 0.0.73
### Patch Changes
- Updated dependencies [4547525]
- jazz-tools@0.13.12
- jazz-react@0.13.12
## 0.0.72
### Patch Changes
- Updated dependencies [17273a6]
- jazz-tools@0.13.11
- jazz-react@0.13.11
## 0.0.71
### Patch Changes
- jazz-react@0.13.10
- jazz-tools@0.13.10
## 0.0.70
### Patch Changes
- Updated dependencies [a6cf01f]
- jazz-tools@0.13.9
- jazz-react@0.13.9
## 0.0.69
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "multi-cursors",
"private": true,
"version": "0.0.69",
"version": "0.0.86",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,149 @@
# multiauth
## 0.0.34
### Patch Changes
- jazz-react@0.13.27
- jazz-react-auth-clerk@0.13.27
- jazz-tools@0.13.27
## 0.0.33
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
- jazz-react-auth-clerk@0.13.26
## 0.0.32
### Patch Changes
- jazz-react@0.13.25
- jazz-react-auth-clerk@0.13.25
- jazz-tools@0.13.25
## 0.0.31
### Patch Changes
- Updated dependencies [02a240c]
- jazz-tools@0.13.23
- jazz-react@0.13.23
- jazz-react-auth-clerk@0.13.23
## 0.0.30
### Patch Changes
- jazz-react@0.13.21
- jazz-react-auth-clerk@0.13.21
- jazz-tools@0.13.21
## 0.0.29
### Patch Changes
- Updated dependencies [439f0fe]
- jazz-tools@0.13.20
- jazz-react@0.13.20
- jazz-react-auth-clerk@0.13.20
## 0.0.28
### Patch Changes
- Updated dependencies [80530a4]
- jazz-tools@0.13.19
- jazz-react@0.13.19
- jazz-react-auth-clerk@0.13.19
## 0.0.27
### Patch Changes
- Updated dependencies [761759c]
- jazz-tools@0.13.18
- jazz-react@0.13.18
- jazz-react-auth-clerk@0.13.18
## 0.0.26
### Patch Changes
- jazz-react@0.13.17
- jazz-react-auth-clerk@0.13.17
- jazz-tools@0.13.17
## 0.0.25
### Patch Changes
- jazz-react@0.13.16
- jazz-react-auth-clerk@0.13.16
- jazz-tools@0.13.16
## 0.0.24
### Patch Changes
- jazz-react@0.13.15
- jazz-react-auth-clerk@0.13.15
- jazz-tools@0.13.15
## 0.0.23
### Patch Changes
- jazz-react@0.13.14
- jazz-react-auth-clerk@0.13.14
- jazz-tools@0.13.14
## 0.0.22
### Patch Changes
- jazz-react@0.13.13
- jazz-react-auth-clerk@0.13.13
- jazz-tools@0.13.13
## 0.0.21
### Patch Changes
- Updated dependencies [4547525]
- jazz-tools@0.13.12
- jazz-react@0.13.12
- jazz-react-auth-clerk@0.13.12
## 0.0.20
### Patch Changes
- Updated dependencies [17273a6]
- jazz-tools@0.13.11
- jazz-react@0.13.11
- jazz-react-auth-clerk@0.13.11
## 0.0.19
### Patch Changes
- jazz-react@0.13.10
- jazz-react-auth-clerk@0.13.10
- jazz-tools@0.13.10
## 0.0.18
### Patch Changes
- Updated dependencies [a6cf01f]
- jazz-tools@0.13.9
- jazz-react@0.13.9
- jazz-react-auth-clerk@0.13.9
## 0.0.17
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "multiauth",
"private": true,
"version": "0.0.17",
"version": "0.0.34",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,150 @@
# jazz-example-musicplayer
## 0.0.115
### Patch Changes
- jazz-inspector@0.13.27
- jazz-react@0.13.27
- jazz-tools@0.13.27
## 0.0.114
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-inspector@0.13.26
- jazz-react@0.13.26
## 0.0.113
### Patch Changes
- jazz-inspector@0.13.25
- jazz-react@0.13.25
- jazz-tools@0.13.25
## 0.0.112
### Patch Changes
- Updated dependencies [02a240c]
- jazz-tools@0.13.23
- jazz-inspector@0.13.23
- jazz-react@0.13.23
## 0.0.111
### Patch Changes
- Updated dependencies [7de210f]
- jazz-inspector@0.13.21
- jazz-react@0.13.21
- jazz-tools@0.13.21
## 0.0.110
### Patch Changes
- Updated dependencies [439f0fe]
- jazz-tools@0.13.20
- jazz-inspector@0.13.20
- jazz-react@0.13.20
## 0.0.109
### Patch Changes
- Updated dependencies [80530a4]
- jazz-tools@0.13.19
- jazz-inspector@0.13.19
- jazz-react@0.13.19
## 0.0.108
### Patch Changes
- Updated dependencies [761759c]
- jazz-tools@0.13.18
- jazz-inspector@0.13.18
- jazz-react@0.13.18
## 0.0.107
### Patch Changes
- jazz-inspector@0.13.17
- jazz-react@0.13.17
- jazz-tools@0.13.17
## 0.0.106
### Patch Changes
- jazz-inspector@0.13.16
- jazz-react@0.13.16
- jazz-tools@0.13.16
## 0.0.105
### Patch Changes
- jazz-inspector@0.13.15
- jazz-react@0.13.15
- jazz-tools@0.13.15
## 0.0.104
### Patch Changes
- jazz-inspector@0.13.14
- jazz-react@0.13.14
- jazz-tools@0.13.14
## 0.0.103
### Patch Changes
- jazz-inspector@0.13.13
- jazz-react@0.13.13
- jazz-tools@0.13.13
## 0.0.102
### Patch Changes
- Updated dependencies [4547525]
- jazz-tools@0.13.12
- jazz-inspector@0.13.12
- jazz-react@0.13.12
## 0.0.101
### Patch Changes
- Updated dependencies [17273a6]
- jazz-tools@0.13.11
- jazz-inspector@0.13.11
- jazz-react@0.13.11
## 0.0.100
### Patch Changes
- jazz-inspector@0.13.10
- jazz-react@0.13.10
- jazz-tools@0.13.10
## 0.0.99
### Patch Changes
- Updated dependencies [a6cf01f]
- jazz-tools@0.13.9
- jazz-inspector@0.13.9
- jazz-react@0.13.9
## 0.0.98
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-music-player",
"private": true,
"version": "0.0.98",
"version": "0.0.115",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,132 @@
# organization
## 0.0.86
### Patch Changes
- jazz-react@0.13.27
- jazz-tools@0.13.27
## 0.0.85
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
## 0.0.84
### Patch Changes
- jazz-react@0.13.25
- jazz-tools@0.13.25
## 0.0.83
### Patch Changes
- Updated dependencies [02a240c]
- jazz-tools@0.13.23
- jazz-react@0.13.23
## 0.0.82
### Patch Changes
- jazz-react@0.13.21
- jazz-tools@0.13.21
## 0.0.81
### Patch Changes
- Updated dependencies [439f0fe]
- jazz-tools@0.13.20
- jazz-react@0.13.20
## 0.0.80
### Patch Changes
- Updated dependencies [80530a4]
- jazz-tools@0.13.19
- jazz-react@0.13.19
## 0.0.79
### Patch Changes
- Updated dependencies [761759c]
- jazz-tools@0.13.18
- jazz-react@0.13.18
## 0.0.78
### Patch Changes
- jazz-react@0.13.17
- jazz-tools@0.13.17
## 0.0.77
### Patch Changes
- jazz-react@0.13.16
- jazz-tools@0.13.16
## 0.0.76
### Patch Changes
- jazz-react@0.13.15
- jazz-tools@0.13.15
## 0.0.75
### Patch Changes
- jazz-react@0.13.14
- jazz-tools@0.13.14
## 0.0.74
### Patch Changes
- jazz-react@0.13.13
- jazz-tools@0.13.13
## 0.0.73
### Patch Changes
- Updated dependencies [4547525]
- jazz-tools@0.13.12
- jazz-react@0.13.12
## 0.0.72
### Patch Changes
- Updated dependencies [17273a6]
- jazz-tools@0.13.11
- jazz-react@0.13.11
## 0.0.71
### Patch Changes
- jazz-react@0.13.10
- jazz-tools@0.13.10
## 0.0.70
### Patch Changes
- Updated dependencies [a6cf01f]
- jazz-tools@0.13.9
- jazz-react@0.13.9
## 0.0.69
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "organization",
"private": true,
"version": "0.0.69",
"version": "0.0.86",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,140 @@
# passkey-svelte
## 0.0.81
### Patch Changes
- jazz-svelte@0.13.27
- jazz-tools@0.13.27
## 0.0.80
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-svelte@0.13.26
## 0.0.79
### Patch Changes
- jazz-svelte@0.13.25
- jazz-tools@0.13.25
## 0.0.78
### Patch Changes
- Updated dependencies [ec546b4]
- jazz-svelte@0.13.24
## 0.0.77
### Patch Changes
- Updated dependencies [3431076]
- Updated dependencies [02a240c]
- jazz-svelte@0.13.23
- jazz-tools@0.13.23
## 0.0.76
### Patch Changes
- jazz-svelte@0.13.21
- jazz-tools@0.13.21
## 0.0.75
### Patch Changes
- Updated dependencies [439f0fe]
- jazz-tools@0.13.20
- jazz-svelte@0.13.20
## 0.0.74
### Patch Changes
- Updated dependencies [80530a4]
- jazz-tools@0.13.19
- jazz-svelte@0.13.19
## 0.0.73
### Patch Changes
- Updated dependencies [761759c]
- jazz-tools@0.13.18
- jazz-svelte@0.13.18
## 0.0.72
### Patch Changes
- jazz-svelte@0.13.17
- jazz-tools@0.13.17
## 0.0.71
### Patch Changes
- jazz-svelte@0.13.16
- jazz-tools@0.13.16
## 0.0.70
### Patch Changes
- jazz-svelte@0.13.15
- jazz-tools@0.13.15
## 0.0.69
### Patch Changes
- jazz-svelte@0.13.14
- jazz-tools@0.13.14
## 0.0.68
### Patch Changes
- jazz-svelte@0.13.13
- jazz-tools@0.13.13
## 0.0.67
### Patch Changes
- Updated dependencies [4547525]
- jazz-tools@0.13.12
- jazz-svelte@0.13.12
## 0.0.66
### Patch Changes
- Updated dependencies [17273a6]
- jazz-tools@0.13.11
- jazz-svelte@0.13.11
## 0.0.65
### Patch Changes
- jazz-svelte@0.13.10
- jazz-tools@0.13.10
## 0.0.64
### Patch Changes
- Updated dependencies [a6cf01f]
- jazz-tools@0.13.9
- jazz-svelte@0.13.9
## 0.0.63
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "passkey-svelte",
"version": "0.0.63",
"version": "0.0.81",
"type": "module",
"private": true,
"scripts": {
@@ -32,6 +32,7 @@
"vite": "6.0.11"
},
"dependencies": {
"jazz-svelte": "workspace:*"
"jazz-svelte": "workspace:*",
"jazz-tools": "workspace:*"
}
}

View File

@@ -1,5 +1,132 @@
# minimal-auth-passkey
## 0.0.91
### Patch Changes
- jazz-react@0.13.27
- jazz-tools@0.13.27
## 0.0.90
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
## 0.0.89
### Patch Changes
- jazz-react@0.13.25
- jazz-tools@0.13.25
## 0.0.88
### Patch Changes
- Updated dependencies [02a240c]
- jazz-tools@0.13.23
- jazz-react@0.13.23
## 0.0.87
### Patch Changes
- jazz-react@0.13.21
- jazz-tools@0.13.21
## 0.0.86
### Patch Changes
- Updated dependencies [439f0fe]
- jazz-tools@0.13.20
- jazz-react@0.13.20
## 0.0.85
### Patch Changes
- Updated dependencies [80530a4]
- jazz-tools@0.13.19
- jazz-react@0.13.19
## 0.0.84
### Patch Changes
- Updated dependencies [761759c]
- jazz-tools@0.13.18
- jazz-react@0.13.18
## 0.0.83
### Patch Changes
- jazz-react@0.13.17
- jazz-tools@0.13.17
## 0.0.82
### Patch Changes
- jazz-react@0.13.16
- jazz-tools@0.13.16
## 0.0.81
### Patch Changes
- jazz-react@0.13.15
- jazz-tools@0.13.15
## 0.0.80
### Patch Changes
- jazz-react@0.13.14
- jazz-tools@0.13.14
## 0.0.79
### Patch Changes
- jazz-react@0.13.13
- jazz-tools@0.13.13
## 0.0.78
### Patch Changes
- Updated dependencies [4547525]
- jazz-tools@0.13.12
- jazz-react@0.13.12
## 0.0.77
### Patch Changes
- Updated dependencies [17273a6]
- jazz-tools@0.13.11
- jazz-react@0.13.11
## 0.0.76
### Patch Changes
- jazz-react@0.13.10
- jazz-tools@0.13.10
## 0.0.75
### Patch Changes
- Updated dependencies [a6cf01f]
- jazz-tools@0.13.9
- jazz-react@0.13.9
## 0.0.74
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "passkey",
"private": true,
"version": "0.0.74",
"version": "0.0.91",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,132 @@
# passphrase
## 0.0.88
### Patch Changes
- jazz-react@0.13.27
- jazz-tools@0.13.27
## 0.0.87
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
## 0.0.86
### Patch Changes
- jazz-react@0.13.25
- jazz-tools@0.13.25
## 0.0.85
### Patch Changes
- Updated dependencies [02a240c]
- jazz-tools@0.13.23
- jazz-react@0.13.23
## 0.0.84
### Patch Changes
- jazz-react@0.13.21
- jazz-tools@0.13.21
## 0.0.83
### Patch Changes
- Updated dependencies [439f0fe]
- jazz-tools@0.13.20
- jazz-react@0.13.20
## 0.0.82
### Patch Changes
- Updated dependencies [80530a4]
- jazz-tools@0.13.19
- jazz-react@0.13.19
## 0.0.81
### Patch Changes
- Updated dependencies [761759c]
- jazz-tools@0.13.18
- jazz-react@0.13.18
## 0.0.80
### Patch Changes
- jazz-react@0.13.17
- jazz-tools@0.13.17
## 0.0.79
### Patch Changes
- jazz-react@0.13.16
- jazz-tools@0.13.16
## 0.0.78
### Patch Changes
- jazz-react@0.13.15
- jazz-tools@0.13.15
## 0.0.77
### Patch Changes
- jazz-react@0.13.14
- jazz-tools@0.13.14
## 0.0.76
### Patch Changes
- jazz-react@0.13.13
- jazz-tools@0.13.13
## 0.0.75
### Patch Changes
- Updated dependencies [4547525]
- jazz-tools@0.13.12
- jazz-react@0.13.12
## 0.0.74
### Patch Changes
- Updated dependencies [17273a6]
- jazz-tools@0.13.11
- jazz-react@0.13.11
## 0.0.73
### Patch Changes
- jazz-react@0.13.10
- jazz-tools@0.13.10
## 0.0.72
### Patch Changes
- Updated dependencies [a6cf01f]
- jazz-tools@0.13.9
- jazz-react@0.13.9
## 0.0.71
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "passphrase",
"private": true,
"version": "0.0.71",
"version": "0.0.88",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,132 @@
# jazz-password-manager
## 0.0.112
### Patch Changes
- jazz-react@0.13.27
- jazz-tools@0.13.27
## 0.0.111
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
## 0.0.110
### Patch Changes
- jazz-react@0.13.25
- jazz-tools@0.13.25
## 0.0.109
### Patch Changes
- Updated dependencies [02a240c]
- jazz-tools@0.13.23
- jazz-react@0.13.23
## 0.0.108
### Patch Changes
- jazz-react@0.13.21
- jazz-tools@0.13.21
## 0.0.107
### Patch Changes
- Updated dependencies [439f0fe]
- jazz-tools@0.13.20
- jazz-react@0.13.20
## 0.0.106
### Patch Changes
- Updated dependencies [80530a4]
- jazz-tools@0.13.19
- jazz-react@0.13.19
## 0.0.105
### Patch Changes
- Updated dependencies [761759c]
- jazz-tools@0.13.18
- jazz-react@0.13.18
## 0.0.104
### Patch Changes
- jazz-react@0.13.17
- jazz-tools@0.13.17
## 0.0.103
### Patch Changes
- jazz-react@0.13.16
- jazz-tools@0.13.16
## 0.0.102
### Patch Changes
- jazz-react@0.13.15
- jazz-tools@0.13.15
## 0.0.101
### Patch Changes
- jazz-react@0.13.14
- jazz-tools@0.13.14
## 0.0.100
### Patch Changes
- jazz-react@0.13.13
- jazz-tools@0.13.13
## 0.0.99
### Patch Changes
- Updated dependencies [4547525]
- jazz-tools@0.13.12
- jazz-react@0.13.12
## 0.0.98
### Patch Changes
- Updated dependencies [17273a6]
- jazz-tools@0.13.11
- jazz-react@0.13.11
## 0.0.97
### Patch Changes
- jazz-react@0.13.10
- jazz-tools@0.13.10
## 0.0.96
### Patch Changes
- Updated dependencies [a6cf01f]
- jazz-tools@0.13.9
- jazz-react@0.13.9
## 0.0.95
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-password-manager",
"private": true,
"version": "0.0.95",
"version": "0.0.112",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,132 @@
# jazz-example-pets
## 0.0.210
### Patch Changes
- jazz-react@0.13.27
- jazz-tools@0.13.27
## 0.0.209
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
## 0.0.208
### Patch Changes
- jazz-react@0.13.25
- jazz-tools@0.13.25
## 0.0.207
### Patch Changes
- Updated dependencies [02a240c]
- jazz-tools@0.13.23
- jazz-react@0.13.23
## 0.0.206
### Patch Changes
- jazz-react@0.13.21
- jazz-tools@0.13.21
## 0.0.205
### Patch Changes
- Updated dependencies [439f0fe]
- jazz-tools@0.13.20
- jazz-react@0.13.20
## 0.0.204
### Patch Changes
- Updated dependencies [80530a4]
- jazz-tools@0.13.19
- jazz-react@0.13.19
## 0.0.203
### Patch Changes
- Updated dependencies [761759c]
- jazz-tools@0.13.18
- jazz-react@0.13.18
## 0.0.202
### Patch Changes
- jazz-react@0.13.17
- jazz-tools@0.13.17
## 0.0.201
### Patch Changes
- jazz-react@0.13.16
- jazz-tools@0.13.16
## 0.0.200
### Patch Changes
- jazz-react@0.13.15
- jazz-tools@0.13.15
## 0.0.199
### Patch Changes
- jazz-react@0.13.14
- jazz-tools@0.13.14
## 0.0.198
### Patch Changes
- jazz-react@0.13.13
- jazz-tools@0.13.13
## 0.0.197
### Patch Changes
- Updated dependencies [4547525]
- jazz-tools@0.13.12
- jazz-react@0.13.12
## 0.0.196
### Patch Changes
- Updated dependencies [17273a6]
- jazz-tools@0.13.11
- jazz-react@0.13.11
## 0.0.195
### Patch Changes
- jazz-react@0.13.10
- jazz-tools@0.13.10
## 0.0.194
### Patch Changes
- Updated dependencies [a6cf01f]
- jazz-tools@0.13.9
- jazz-react@0.13.9
## 0.0.193
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-pets",
"private": true,
"version": "0.0.193",
"version": "0.0.210",
"type": "module",
"scripts": {
"dev": "vite",

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