Compare commits

...

802 Commits

Author SHA1 Message Date
pax-k
f7f461db31 chore: changeset 2025-01-14 12:04:47 +02:00
pax-k
653d09c337 fix: explicitly use useContext() instead of React.useContext() 2025-01-14 12:03:53 +02:00
pax-k
3fa5ac30ff chore: cleanup 2025-01-14 11:39:59 +02:00
Guido D'Orsi
4095041da9 Merge pull request #1179 from garden-co/jazz-640-api-make-the-current-active-account-the-default-in
Without me
2025-01-14 10:11:40 +01:00
Guido D'Orsi
c1c2f39cb5 test: fix failing test 2025-01-14 09:33:33 +01:00
Guido D'Orsi
f7f1a0aff0 fix: use groups as defult owner 2025-01-13 20:24:51 +01:00
Guido D'Orsi
3bc82dc382 Update homepage/homepage/app/docs/[framework]/[...slug]/guide/react.mdx
Co-authored-by: Anselm Eickhoff <anselm.eickhoff@gmail.com>
2025-01-13 19:36:14 +01:00
Guido D'Orsi
99bac77ae7 Update homepage/homepage/app/docs/[framework]/[...slug]/guide/react.mdx
Co-authored-by: Anselm Eickhoff <anselm.eickhoff@gmail.com>
2025-01-13 19:36:03 +01:00
Guido D'Orsi
5705ebdcad Update packages/jazz-tools/src/implementation/activeAccountContext.ts
Co-authored-by: Anselm Eickhoff <anselm.eickhoff@gmail.com>
2025-01-13 19:35:54 +01:00
pax
f3fb445c9e Merge pull request #1197 from garden-co/JAZZ-638/set-specific-package-version-on-create-jazz-app
create-jazz-app gets the latest semver package version for jazz-* dependencies from NPM via HTTP
2025-01-13 18:19:08 +02:00
pax-k
c60fe8aae2 chore: cleanup 2025-01-13 18:15:43 +02:00
pax-k
d2a882e531 fix: actually throw an error if getLatestPackageVersions() fails, without falling back to "latest" 2025-01-13 18:11:37 +02:00
pax-k
036fa1f43b chore: changeset 2025-01-13 18:06:41 +02:00
pax-k
839b4af45c fix: fetching latest semver jazz-* package versions from NPM when using create-jazz-app, instead of using "latest" 2025-01-13 18:04:07 +02:00
Guido D'Orsi
5d9405ccc3 Merge pull request #1196 from garden-co/changeset-release/main
Version Packages
2025-01-13 12:09:46 +01:00
github-actions[bot]
d54db4358c Version Packages 2025-01-13 11:06:47 +00:00
Guido D'Orsi
a172f61494 fix: types for the WebSocket peer 2025-01-13 12:05:22 +01:00
Guido D'Orsi
225280d37a fix: fix type error and tsconfig 2025-01-12 23:45:40 +01:00
Guido D'Orsi
c735ab6b95 Merge pull request #1195 from garden-co/changeset-release/main
Version Packages
2025-01-12 23:37:50 +01:00
github-actions[bot]
d47e59783f Version Packages 2025-01-12 22:32:21 +00:00
Guido D'Orsi
8a390d255d fix: fix account type registration using the sources for the TS definitions 2025-01-12 23:31:15 +01:00
Guido D'Orsi
03540b22c1 fix: fix prepublish script on jazz-react-native-auth-clerk 2025-01-12 22:58:26 +01:00
Guido D'Orsi
fad96fe4f4 Merge pull request #1194 from garden-co/changeset-release/main
Version Packages
2025-01-12 22:54:05 +01:00
github-actions[bot]
19b706d125 Version Packages 2025-01-12 21:53:34 +00:00
Guido D'Orsi
c871912188 feat(rn): add clearUserCredentials API to programmatically delete the current user stored credentials 2025-01-12 22:52:05 +01:00
Guido D'Orsi
7124bd05c8 Merge pull request #1192 from garden-co/changeset-release/main
Version Packages
2025-01-12 20:13:38 +01:00
github-actions[bot]
783f444cff Version Packages 2025-01-12 15:44:47 +00:00
Guido D'Orsi
0f57687d81 Update .changeset 2025-01-12 16:42:24 +01:00
Guido D'Orsi
235bf1f4e4 Merge pull request #1190 from tobiaslins/fix-react-core-type-error
[jazz-react-core] Fix type error from `useRef`
2025-01-12 16:41:31 +01:00
Tobias Lins
90f36db63a Fix type error 2025-01-12 15:23:03 +01:00
Guido D'Orsi
83513b624e Merge pull request #1187 from garden-co/changeset-release/main
Version Packages
2025-01-12 12:41:54 +01:00
github-actions[bot]
6042250940 Version Packages 2025-01-12 09:54:11 +00:00
Guido D'Orsi
f78c234780 fix(rn): add unstable_enablePackageExports to the metro config 2025-01-12 10:53:03 +01:00
Guido D'Orsi
21efae9276 Merge pull request #1185 from garden-co/changeset-release/main
Version Packages
2025-01-11 16:35:54 +01:00
github-actions[bot]
1e58606ae7 Version Packages 2025-01-11 14:44:01 +00:00
Guido D'Orsi
4a11682316 Merge pull request #1186 from tobiaslins/fix-priority-rn-sqlite
[React Native] Change priority of sqlite to `100`
2025-01-11 15:42:46 +01:00
Tobias Lins
3e92680b08 Update README.md 2025-01-11 15:12:37 +01:00
Tobias Lins
2be47d688b Change priority of sqlite to 100 2025-01-11 15:11:37 +01:00
Guido D'Orsi
2ddccdbca5 Update dull-walls-crash.md 2025-01-11 14:00:02 +01:00
Guido D'Orsi
ab05897cd6 Merge pull request #1183 from tobiaslins/improve-expo-secure-storage
[react native] don't require faceid for every KV operation
2025-01-11 13:56:16 +01:00
Tobias Lins
7cd691f5f0 Create dull-walls-crash.md 2025-01-11 13:48:08 +01:00
Tobias Lins
24a13af657 Improve initialization when using custom kv storage 2025-01-11 13:41:12 +01:00
Tobias Lins
b13530e84b don't require faceid for every get/set 2025-01-11 11:09:56 +01:00
Guido D'Orsi
3911b72f87 docs: fix version number on the rn upgrade docs 2025-01-11 00:23:32 +01:00
Guido D'Orsi
ec278cfcd8 Merge pull request #1182 from garden-co/changeset-release/main
Version Packages
2025-01-11 00:22:19 +01:00
github-actions[bot]
912730378e Version Packages 2025-01-10 21:59:07 +00:00
Guido D'Orsi
ac35f19f01 Merge pull request #1130 from tobiaslins/rn-storage-sqlite
feat: sqlite react native storage
2025-01-10 22:58:03 +01:00
Guido D'Orsi
c25a1af96e feat: update test and add active account management to testing utils 2025-01-10 17:20:47 +01:00
Guido D'Orsi
70667d06a1 fix: cover FileStream and createImage 2025-01-10 17:02:07 +01:00
Guido D'Orsi
31fd994d83 Merge pull request #1180 from garden-co/jazz-636-add-test-for-react-starter-app
Fix and test react starter app
2025-01-10 16:53:42 +01:00
Guido D'Orsi
fc934157f6 fix: remove unused import 2025-01-10 16:52:07 +01:00
Guido D'Orsi
0bbded1772 docs: update examples with the new simplified API 2025-01-10 16:50:51 +01:00
Trisha Lim
a6eea34c74 Run starter test 2025-01-10 15:35:16 +00:00
Trisha Lim
3605b746a9 Highlight new lines on upgrade guide 2025-01-10 15:32:02 +00:00
Trisha Lim
4b29a9aaa6 Test react starter app 2025-01-10 15:30:15 +00:00
Trisha Lim
e60a9f4a74 Fix react starter app 2025-01-10 15:26:56 +00:00
Guido D'Orsi
d1d773bc9c feat: make possible to call the load/subscribe/create API without passing me 2025-01-10 16:19:41 +01:00
Guido D'Orsi
55e8a269c0 fix: fix homepage type error 2025-01-10 12:45:42 +01:00
Guido D'Orsi
0db0aadd45 fix: fix homepage type error 2025-01-10 12:38:12 +01:00
Guido D'Orsi
83f3873e03 feat: make the persistence disabled by default 2025-01-10 12:26:14 +01:00
Guido D'Orsi
80fd3e9697 chore: changeset 2025-01-10 12:16:04 +01:00
Guido D'Orsi
bae8268b29 feat: add upgrade docs and option to disable storage 2025-01-10 12:14:16 +01:00
Guido D'Orsi
3e9b7e829c Merge pull request #1175 from garden-co/jazz-639-fix-passkey-svelte
Fix imports for passkey-svelte
2025-01-09 15:51:05 +01:00
Benjamin S. Leveritt
530720f2b9 Fix imports 2025-01-09 14:47:23 +00:00
Benjamin S. Leveritt
a5d6d364db Merge pull request #877 from garden-co/benjamin-jazz-534
Bring CoPlainText up to current
2025-01-09 13:05:56 +00:00
Benjamin S. Leveritt
cb7e580942 Simplify Segmenter comment
Co-authored-by: Guido D'Orsi <guido@float.com>
2025-01-09 12:02:51 +00:00
Benjamin S. Leveritt
8653fc7eb1 Improve thrown error for envs missing Segmenter 2025-01-09 12:02:51 +00:00
Benjamin S. Leveritt
d077702250 Move segmenter into constructor
Chore: Fix formatting
2025-01-09 12:02:51 +00:00
Benjamin S. Leveritt
472b15d940 Move segmenter into class 2025-01-09 10:58:19 +00:00
Benjamin S. Leveritt
f71176b362 Chore: Fix formatting 2025-01-09 10:58:19 +00:00
Benjamin S. Leveritt
aa5f988776 Fix imports 2025-01-09 10:58:19 +00:00
Benjamin S. Leveritt
328311e781 Moves Document into component 2025-01-09 10:58:19 +00:00
Benjamin S. Leveritt
f2875de83d Add comments 2025-01-09 10:58:19 +00:00
Benjamin S. Leveritt
2108f918b4 Chore: Format source 2025-01-09 10:58:19 +00:00
Benjamin S. Leveritt
32441bdcd6 Fix export types 2025-01-09 10:58:19 +00:00
Benjamin S. Leveritt
b80b9c08db Fix exports for rich-text example 2025-01-09 10:58:19 +00:00
Benjamin S. Leveritt
4f09c94098 Fix libs for coPlainText 2025-01-09 10:58:15 +00:00
pax
5e47f2fb52 Merge pull request #1168 from garden-co/changeset-release/main
Version Packages
2025-01-09 12:22:38 +02:00
github-actions[bot]
47f2f62b4f Version Packages 2025-01-09 10:19:41 +00:00
pax
61642b2536 Merge pull request #1170 from garden-co/feat/anonymous-auth
feat: add Onboarding auth to handle users onboarding without an auth screen
2025-01-09 12:18:12 +02:00
pax-k
20d12c5aa1 chore: formatting 2025-01-09 12:16:56 +02:00
pax-k
dd9ac6e4f8 fix: migrate DemoAuth old localStorage key to new one 2025-01-09 12:16:23 +02:00
Guido D'Orsi
1b7196938f feat: add Onboarding auth to handle users onboarding without an auth screen 2025-01-09 11:11:06 +01:00
pax-k
5d9818914c chore: changeset 2025-01-09 12:08:40 +02:00
pax-k
f33ec81f19 fix: DemoAuth localStorage key name 2025-01-09 12:01:08 +02:00
Guido D'Orsi
a9dbcc29d0 fix: migrate starter to jazz 0.9 2025-01-09 09:35:08 +01:00
Anselm Eickhoff
f30f92d1b6 Merge pull request #1167 from garden-co/fix/set-fixed-version-starter-app
Set fixed version for packages in starter apps (temporary fix)
2025-01-08 22:52:37 +00:00
Trisha Lim
33d250d0e1 Add changeset 2025-01-08 22:27:33 +00:00
Trisha Lim
f025ffa7b1 Set fixed version for packages in starter apps 2025-01-08 22:20:00 +00:00
Guido D'Orsi
6467bb89b3 docs: fix ensureLoaded migrate example 2025-01-08 21:58:00 +01:00
Trisha Lim
7fc9195068 Fix face id icon 2025-01-08 18:30:28 +00:00
Guido D'Orsi
2e7e276abf Merge pull request #1158 from garden-co/homepage-doc-improvements
Homepage doc improvements
2025-01-08 19:17:31 +01:00
Guido D'Orsi
cc249d3e8b docs: update the migration docs and comment the TODO 2025-01-08 19:17:21 +01:00
Guido D'Orsi
2db8b35cf7 feat: simplify storage setup and update docs 2025-01-08 18:12:22 +01:00
Anselm
f098002da5 Add todos 2025-01-08 17:03:19 +00:00
Anselm
0b47d279c0 Accounts and migrations docs sketch 2025-01-08 17:03:03 +00:00
Guido D'Orsi
a3234f3912 Merge remote-tracking branch 'origin/main' into pr-rn-storage-sqlite 2025-01-08 16:38:35 +01:00
Guido D'Orsi
2a6f2bbb4b Merge pull request #1144 from garden-co/changeset-release/main
Version Packages
2025-01-08 14:28:34 +01:00
github-actions[bot]
fcdad5d80d Version Packages 2025-01-08 12:05:19 +00:00
Guido D'Orsi
dfa15c1e0f Merge pull request #1128 from garden-co/next
Jazz 0.9.0 - Top level imports for hooks and simplified app setup
2025-01-08 13:04:05 +01:00
Guido D'Orsi
bead3462e7 Merge pull request #1151 from garden-co/react-0.9.0-migration-docs
feat(svelte): syncronously resolve local values in useCoState
2025-01-08 12:57:00 +01:00
Guido D'Orsi
246f91937c feat(svelte): syncronously resolve local values in useCoState 2025-01-08 12:49:41 +01:00
Guido D'Orsi
468de3d3af Merge pull request #1150 from garden-co/react-0.9.0-migration-docs
docs: migration docs for rn, vue and svelte
2025-01-08 12:49:15 +01:00
Guido D'Orsi
ee292b8855 docs: migration docs for rn, vue and svelte 2025-01-08 12:40:26 +01:00
Guido D'Orsi
38a6361aed Merge remote-tracking branch 'origin/main' into next 2025-01-08 12:28:01 +01:00
Guido D'Orsi
0231650b6b Merge pull request #1148 from garden-co/styling/code-snippet
Styling improvements for code snippets
2025-01-08 12:26:36 +01:00
Guido D'Orsi
35e4af88d0 Merge pull request #1139 from garden-co/top-level-imports-vue
feat(jazz-vue): simplify app setup and make composables available as top-level imports
2025-01-08 12:01:29 +01:00
Guido D'Orsi
a44a1496ca Merge pull request #1145 from garden-co/react-0.9.0-migration-docs
docs: migration docs for jazz-react 0.9.0
2025-01-08 11:26:15 +01:00
Tobias Lins
7ebc77c95f Update chat.tsx 2025-01-08 09:54:55 +01:00
Tobias Lins
de20b17989 Update App.tsx 2025-01-08 09:53:37 +01:00
Tobias Lins
cae4b244e8 Update polyfills.js 2025-01-08 09:52:53 +01:00
Tobias Lins
eed5aec08d Cleanup 2025-01-08 09:51:29 +01:00
Tobias Lins
90fa0e0588 Merge remote-tracking branch 'upstream/main' into rn-storage-sqlite 2025-01-08 09:26:44 +01:00
Trisha Lim
9b1361a009 Styling improvements for code snippets 2025-01-07 20:50:14 +00:00
Giordano Ricci
ad8b962255 Merge pull request #1146 from garden-co/gio/status-page
Feat: add status page to homepage
2025-01-07 18:31:17 +00:00
Guido D'Orsi
2269bd4d8f docs: improvements 2025-01-07 19:28:27 +01:00
Giordano Ricci
ce977cdb46 update queries & color map 2025-01-07 18:26:55 +00:00
Giordano Ricci
8065c8515c add fallback 2025-01-07 18:05:32 +00:00
Giordano Ricci
4e292e0253 remove unstable cache 2025-01-07 17:57:26 +00:00
Guido D'Orsi
b3bd55f969 chore: add comment 2025-01-07 18:51:06 +01:00
Guido D'Orsi
dd91354eb4 docs: migration docs for jazz-react 0.9.0 2025-01-07 18:51:05 +01:00
Guido D'Orsi
27c294166b Merge remote-tracking branch 'origin/main' into next 2025-01-07 18:50:47 +01:00
Giordano Ricci
c8e783fa33 make slogan optional, remove it from status page 2025-01-07 17:47:02 +00:00
Giordano Ricci
90325c18eb remove apex styling 2025-01-07 17:46:29 +00:00
Giordano Ricci
b5ae832fe7 add GRAFANA_SERVICE_ACCOUNT to turbo 2025-01-07 17:43:39 +00:00
Giordano Ricci
03897e0a5f remove apexchart, cache 2025-01-07 17:31:58 +00:00
Guido D'Orsi
0cdf004902 Merge pull request #1129 from garden-co/jazz-621-add-upgrade-guides-section-to-document-breaking-changes
Add upgrade guides section to docs
2025-01-07 17:10:23 +01:00
Guido D'Orsi
9dd8d9510b feat: simplify app setup and make hooks available as top-level imports 2025-01-07 16:08:31 +01:00
Giordano Ricci
f56663c4cf fix queries/data 2025-01-07 13:55:08 +00:00
Guido D'Orsi
6de44dd8d1 feat: move the common test API to jazz-tools 2025-01-07 14:36:12 +01:00
Trisha Lim
e8dc5eb07c Status page styling (#1136) 2025-01-07 13:24:35 +00:00
Guido D'Orsi
5669e346f8 test: remove flaky tests 2025-01-07 14:05:45 +01:00
Guido D'Orsi
41e88b82b7 Merge pull request #1117 from garden-co/react-native-top-level-hooks
feat: top-level imports for react native hooks
2025-01-07 14:04:23 +01:00
Guido D'Orsi
97e7c7ce13 Merge pull request #1077 from garden-co/perf-bulk-operations
feat: add the assign method to RawCoMap to create bulk transactions and optimize RawCoMap init
2025-01-07 14:03:52 +01:00
Guido D'Orsi
7fea37b0a3 Merge pull request #1081 from garden-co/coList-appendItems
feat: add the appendItems method to CoList to add many items in a single transaction
2025-01-07 14:03:37 +01:00
Guido D'Orsi
b97a0954b2 Merge pull request #1143 from garden-co/fix/rn-key-username
fix(DemoAuth): fix username key serialization
2025-01-07 13:33:12 +01:00
pax-k
afe73c05fe chore: cleanup 2025-01-07 14:31:44 +02:00
github-actions[bot]
459eafccd0 Version Packages 2025-01-07 12:21:13 +00:00
Guido D'Orsi
816333a4a8 fix: handle re-login after an auth failure 2025-01-07 13:20:56 +01:00
Guido D'Orsi
b6345ac469 fix: Fix the double context creation in React development mode 2025-01-07 13:12:39 +01:00
Guido D'Orsi
9f01d9c73a fix: improve error management when loading existing accounts 2025-01-07 13:08:52 +01:00
Guido D'Orsi
1da4d558b1 fix(DemoAuth): fix username key serialization 2025-01-07 12:56:21 +01:00
Anselm Eickhoff
559e3360a4 Merge pull request #1141 from garden-co/jazz-626-move-book-shelf-example-into-personal-repo
Remove book shelf app
2025-01-07 11:48:07 +00:00
Guido D'Orsi
be922788f6 Merge pull request #1140 from garden-co/fix/react-starter
Fix: missing dependencies in react starter
2025-01-07 12:36:44 +01:00
Trisha Lim
09d32ee5f2 Add changeset 2025-01-07 11:17:12 +00:00
Trisha Lim
0547ea823d Remove book shelf app 2025-01-07 11:16:53 +00:00
Trisha Lim
a7aa70bd8f Fix: missing dependencies in react starter 2025-01-07 11:04:37 +00:00
Guido D'Orsi
ee9f868bb4 chore: use pnpm to run the prepublishOnly hook 2025-01-07 11:59:07 +01:00
Guido D'Orsi
133abd5d8f Merge pull request #1125 from garden-co/changeset-release/main
Version Packages
2025-01-07 11:47:02 +01:00
github-actions[bot]
1a789717f0 Version Packages 2025-01-07 10:15:13 +00:00
Trisha Lim
d4d98c4b48 Create react starter app for create-jazz-app (#1112) 2025-01-07 10:14:02 +00:00
Anselm Eickhoff
f4fc60707f More progress 2025-01-07 07:51:07 +00:00
Anselm Eickhoff
8527c3fef9 More plaintext progress 2025-01-07 07:50:26 +00:00
Anselm Eickhoff
c279174465 Rich text progress 2025-01-07 07:50:26 +00:00
Anselm
49fa18825b Progress on text 2025-01-07 07:50:26 +00:00
Anselm
32d7dca15b More implementation 2025-01-07 07:50:25 +00:00
Anselm
8ba2d47e48 Implement RawCoPlainText 2025-01-07 07:40:30 +00:00
Giordano Ricci
290ea0f234 wip: status page first commit 2025-01-06 11:46:11 +00:00
Tobias Lins
c4d5cad2d4 Fixes 2025-01-05 10:53:59 +01:00
Tobias Lins
718543cf83 fix tx support 2025-01-04 16:52:05 +01:00
Tobias Lins
ca8f21358e Move to other library 2025-01-04 12:42:22 +01:00
Guido D'Orsi
d56fc0874c Merge pull request #1118 from garden-co/svelte-top-level-hooks
feat: top-level imports for svelte hooks
2025-01-04 12:23:20 +01:00
Tobias Lins
d09584fa88 WIP sqlite react native storage 2025-01-04 11:24:13 +01:00
Guido D'Orsi
ade4890ede chore: changeset 2025-01-03 18:45:36 +01:00
Guido D'Orsi
b734c66a90 fix(testing): mock crypto functions incompatible with jsDom 2025-01-03 18:44:00 +01:00
Trisha Lim
bc979ba26e Hide/show content based on framework 2025-01-03 17:20:14 +00:00
Guido D'Orsi
906acaf417 fix: handle kvStore init inside RNDemoAuth 2025-01-03 18:11:28 +01:00
Trisha Lim
432724f63e Render example guide 2025-01-03 17:09:42 +00:00
Guido D'Orsi
51d8fb7e77 Merge pull request #1127 from tobiaslins/fix-chat-rn-example
[react native] Fix permissions of messages and fix chat loading
2025-01-03 18:03:16 +01:00
Guido D'Orsi
1e5e3a1599 feat: top-level imports for react native hooks 2025-01-03 17:45:45 +01:00
Guido D'Orsi
37699c1831 test: update svelte tests 2025-01-03 17:45:14 +01:00
Guido D'Orsi
6c6da24281 feat: top-level imports for svelte hooks 2025-01-03 17:45:13 +01:00
Guido D'Orsi
2d85476433 chore: update the version history example 2025-01-03 17:39:14 +01:00
Trisha Lim
cdc8a6b568 Add example guides 2025-01-03 15:22:01 +00:00
Trisha Lim
1b539483d1 Add page in docs for upgrade guides 2025-01-03 14:37:20 +00:00
Guido D'Orsi
25eab61cd0 Merge pull request #1104 from garden-co/jazz-361-make-jazz-react-hooks-global
feat: top-level imports for Jazz react hooks
2025-01-03 15:16:37 +01:00
Guido D'Orsi
43a782937f chore: update docs 2025-01-03 15:16:10 +01:00
Guido D'Orsi
de1a3ee84a Update homepage/homepage/app/docs/[framework]/[...slug]/project-setup/react.mdx
Co-authored-by: Anselm Eickhoff <anselm.eickhoff@gmail.com>
2025-01-03 15:14:33 +01:00
Tobias Lins
315a00bcb5 Update chat.tsx 2025-01-03 14:42:17 +01:00
Tobias Lins
ed4ee686b5 Fix permissions of messages and fix chat loading 2025-01-03 14:38:44 +01:00
Anselm Eickhoff
b4dc466526 Merge pull request #1120 from garden-co/jazz-608-add-version-history-example-app
Add version history example app
2025-01-03 11:27:10 +00:00
Trisha Lim
af9ea3dc4b Change key type to string 2025-01-03 11:21:44 +00:00
Guido D'Orsi
67abc0e437 Merge pull request #1103 from garden-co/jazz-616-simplify-the-create-calls-by-accepting-account-group-as
feat: simplify the .create calls by accepting Account | Group as second param
2025-01-03 11:54:07 +01:00
Guido D'Orsi
b12eb407cb Merge remote-tracking branch 'origin/main' into jazz-361-make-jazz-react-hooks-global 2025-01-03 11:10:11 +01:00
Guido D'Orsi
2034ef2dcb Merge pull request #1123 from garden-co/changeset-release/main
Version Packages
2025-01-02 22:31:49 +01:00
github-actions[bot]
343b4c0c80 Version Packages 2025-01-02 21:30:25 +00:00
Guido D'Orsi
41e4083f97 Merge pull request #1124 from garden-co/fix-range-error-flatMap
fix: handle circular references in group inheritance
2025-01-02 22:29:16 +01:00
Guido D'Orsi
15f81e889f fix: handle circular references in group inheritance 2025-01-02 22:18:12 +01:00
Guido D'Orsi
8d7fb18a08 Merge pull request #1122 from garden-co/fix-range-error-flatMap
fix(permissions): fix group self-extension
2025-01-02 21:24:40 +01:00
Guido D'Orsi
43378ef2b7 fix(permissions): fix group self-extension 2025-01-02 21:20:35 +01:00
Trisha Lim
1ca1d15639 Update readme 2025-01-02 18:04:34 +00:00
Trisha Lim
bdd67ef34d Add version history example to examples page 2025-01-02 17:55:10 +00:00
Trisha Lim
dc62b9569b Add changeset 2025-01-02 17:55:10 +00:00
Trisha Lim
6fd920face Add verstion history example app 2025-01-02 17:55:10 +00:00
Guido D'Orsi
0689ed3767 Merge pull request #1121 from garden-co/changeset-release/main
Version Packages
2025-01-02 18:35:58 +01:00
github-actions[bot]
a4e1aa7f56 Version Packages 2025-01-02 17:35:18 +00:00
Guido D'Orsi
ca5d7cb2ee Merge pull request #1119 from garden-co/fix-range-error-flatMap
fix(permissions): fixes the transactions collection to avoid RangeError issues
2025-01-02 18:34:10 +01:00
Guido D'Orsi
25dfd90c5a fix(permissions): fixes the transactions collection to avoid RangeError issues 2025-01-02 18:25:53 +01:00
Guido D'Orsi
90096d65e9 chore: remove unused import 2025-01-02 17:22:03 +01:00
Guido D'Orsi
0e7f1aa44a chore: move platform agnostic code in jazz-react-core 2025-01-02 16:52:24 +01:00
Guido D'Orsi
66badc061e Merge pull request #1099 from garden-co/changeset-release/main
Version Packages
2025-01-02 16:31:02 +01:00
github-actions[bot]
eecdd5215e Version Packages 2025-01-02 13:48:31 +00:00
Guido D'Orsi
99b9605579 Merge pull request #1094 from garden-co/jazz-612-give-the-ability-to-reader-writer-and-writeonly-roles-to-set
feat: give the ability to extend a group to users that have any access to the parent
2025-01-02 14:47:13 +01:00
Guido D'Orsi
830f0c00ca Merge pull request #1116 from garden-co/fix/load-with-empty-schema
fix(CoMap): fix loading of CoMaps with an empty schema
2025-01-02 14:17:41 +01:00
Guido D'Orsi
635e824eb0 fix(CoMap): fix loading of CoMaps with an empty schema 2025-01-02 14:14:25 +01:00
Trisha Lim
c2a55c09e0 Fix indention 2025-01-02 12:59:50 +00:00
Trisha Lim
33b64743ed Make preview interactive in react guide 2025-01-02 12:59:50 +00:00
Trisha Lim
74a419e2df Add comment 2025-01-02 12:59:12 +00:00
Trisha Lim
170e135c79 Remove render-code-samples from turbo.json 2025-01-02 12:59:12 +00:00
Trisha Lim
305917236e Exclude h1 from table of contents 2025-01-02 12:59:12 +00:00
Guido D'Orsi
68932ee4ce feat(react): hard deprecate the previous way of creating React Jazz apps 2025-01-02 13:38:17 +01:00
Guido D'Orsi
71e881afcb Merge pull request #1109 from garden-co/fix/missing-titles
Add titles to doc pages
2025-01-02 10:44:17 +01:00
Trisha Lim
f32af158f0 Add titles to doc pages 2024-12-31 15:13:47 +00:00
Guido D'Orsi
cf22cfcc88 fix: fix typescript errors 2024-12-30 19:15:04 +01:00
Guido D'Orsi
c5b5eacba5 docs(guide): fix the snippets indentation 2024-12-30 18:34:53 +01:00
Guido D'Orsi
380bcb2d14 chore: simplfy comment about the AccountSchema registration 2024-12-30 18:21:32 +01:00
Guido D'Orsi
956a4d1b5e chore: migrate to use top-level hook imports 2024-12-30 18:16:06 +01:00
Guido D'Orsi
b7fb4b4b0b docs: update React docs to use the top-level imports 2024-12-30 18:15:09 +01:00
Guido D'Orsi
4433745cff feat: simplify App creation and make the hooks available as top-level imports 2024-12-30 18:14:57 +01:00
Guido D'Orsi
8eda79227b perf(subscribe): add an option to resolve locally available CoValues syncronously 2024-12-30 18:11:19 +01:00
Guido D'Orsi
1a3ec55e6e feat: makes possible to directly import the crypto module 2024-12-30 17:53:35 +01:00
Anselm Eickhoff
e0d9bb3db3 Merge pull request #1105 from garden-co/jazz-615-remove-demo-and-code-from-examples 2024-12-30 15:24:22 +00:00
Guido D'Orsi
93f73b3b86 Merge pull request #1069 from garden-co/jazz-598-add-form-design-pattern-to-docs
Add form design pattern to docs
2024-12-30 16:10:59 +01:00
Guido D'Orsi
7e96af0602 Merge pull request #1106 from garden-co/jazz-613-add-docs-for-create-jazz-app
Mention create-jazz-app in docs
2024-12-30 16:10:11 +01:00
Trisha Lim
3a5d8d1ff4 Remove example demos 2024-12-30 14:55:19 +00:00
Trisha Lim
d558c085e6 Mention create-jazz-app in docs 2024-12-30 14:53:14 +00:00
Trisha Lim
07e52f50b3 Remove sentence about list of orders 2024-12-30 14:40:19 +00:00
Trisha Lim
9a775c67d5 Link to docs from example readme 2024-12-30 14:35:25 +00:00
Trisha Lim
a64d05f9a5 Simplify form design pattern docs 2024-12-30 14:30:10 +00:00
Trisha Lim
e43a6d4418 Address feedback 2024-12-30 11:56:34 +00:00
Trisha Lim
70182c5b28 Add form design pattern to docs 2024-12-30 11:56:34 +00:00
Guido D'Orsi
1de26f8be9 feat: simplify the .create calls by accepting Account | Group as second param 2024-12-30 12:11:51 +01:00
Anselm Eickhoff
af6c0878c3 Merge pull request #1101 from garden-co/gcmp-hp-fixes
More blog fixes
2024-12-30 11:01:45 +00:00
Anselm
579384a6df Update socials 2024-12-30 10:50:08 +00:00
Anselm
3376a02fde Fix OG pictures 2024-12-30 10:09:33 +00:00
Anselm Eickhoff
8440699193 Merge pull request #1091 from garden-co/jazz-611-missing-inbox-error 2024-12-29 15:12:04 +00:00
Anselm Eickhoff
d7f4ba5b9e Merge pull request #1098 from garden-co/docs/collapse-auth-items 2024-12-29 12:38:03 +00:00
Anselm Eickhoff
58a785db40 Merge pull request #1097 from garden-co/explode-docs-nav 2024-12-29 12:37:51 +00:00
Trisha Lim
7546e8bffc Docs side nav: move examples higher, collapse auth items 2024-12-29 11:03:41 +00:00
Trisha Lim
ad57ac21e0 Fix mock button alignment 2024-12-29 10:54:02 +00:00
Trisha Lim
f8b9854286 Move examples and api nav items to top level 2024-12-29 10:53:27 +00:00
Guido D'Orsi
10ea7332e6 feat: give the ability to extend a group to users that have any access to the parent 2024-12-27 21:16:50 +01:00
Guido D'Orsi
0a859821bc feat(Account): remove the requirement of calling super.migrate when defining the account migration 2024-12-27 11:35:14 +01:00
Anselm
b9408c6119 Fix OG some more 2024-12-26 16:25:10 +00:00
Anselm
c6c26b0ad1 Fix metadata 2024-12-26 16:23:31 +00:00
Anselm Eickhoff
9527c8a019 Merge pull request #1090 from garden-co/gcmp-hp-fixes
Soft-launch first blog post
2024-12-26 16:18:51 +00:00
Anselm
69bdcc0273 Fix type errors 2024-12-26 16:15:33 +00:00
Anselm
62cfd3bce4 Soft-launch first blog post 2024-12-26 16:09:22 +00:00
Guido D'Orsi
edf6328905 Merge pull request #1085 from garden-co/jazz-602-theme-doesnt-update-when-system-theme-changes
Fix: Theme doesn't update when system theme changes
2024-12-24 21:12:05 +01:00
Guido D'Orsi
1d2b8d92d7 Merge pull request #1088 from garden-co/changeset-release/main
Version Packages
2024-12-24 20:33:14 +01:00
github-actions[bot]
697dd370ee Version Packages 2024-12-24 17:52:12 +00:00
Guido D'Orsi
33ef9c43d0 chore: changeset 2024-12-24 18:51:02 +01:00
Guido D'Orsi
f74134164b Merge pull request #1087 from boorad/feat/demo-auth-byo-store
feat: Bring Your Own Store to demo auth
2024-12-24 18:49:12 +01:00
Brad Anderson
50939729e5 feat: Bring Your Own Store to demo auth 2024-12-24 09:56:15 -05:00
Trisha Lim
dcf945b514 Fix: Theme doesn't update when system theme changes 2024-12-24 14:54:25 +01:00
Anselm
0b8425d9b4 Blog prep 2024-12-24 09:31:10 +00:00
Guido D'Orsi
986805dcba Merge pull request #1079 from garden-co/jazz-606-chat-demo-dark-mode-doesnt-enable
Fix chat app dark mode
2024-12-24 10:17:48 +01:00
Trisha Lim
89dae1d889 Fix dark bg color 2024-12-24 09:49:58 +01:00
Trisha Lim
c3418f6bed Fix tailwind styles in chat app 2024-12-24 09:41:20 +01:00
Trisha Lim
f5a63d13c1 Remove unused packages 2024-12-24 09:39:47 +01:00
Trisha Lim
e9778cc4ca Remove commas 2024-12-24 09:36:46 +01:00
Trisha Lim
7d955d053e Fix chat app dark mode 2024-12-24 09:36:46 +01:00
Guido D'Orsi
ae6d2c6daf Merge pull request #1084 from garden-co/changeset-release/main
Version Packages
2024-12-24 00:48:08 +01:00
github-actions[bot]
44aa86978f Version Packages 2024-12-23 23:44:15 +00:00
Guido D'Orsi
eedb208e4c Merge pull request #1056 from garden-co/changeset-release/main
Version Packages
2024-12-24 00:42:41 +01:00
github-actions[bot]
454fbbfc17 Version Packages 2024-12-23 23:41:44 +00:00
Guido D'Orsi
686e3e998c Merge pull request #1070 from garden-co/fix/move-account-data-to-root
Form example: move account data to root
2024-12-24 00:41:30 +01:00
Guido D'Orsi
7a2f249614 Merge pull request #1078 from garden-co/fix-rn-demo-auth-ke
fix(demo-auth): fix the user credentials storage when the username contains non aplhanumeric characters
2024-12-24 00:41:01 +01:00
Guido D'Orsi
59a0c86dd1 Merge pull request #1083 from garden-co/quick-crypto-as-opt-in
fix: restore PureJSCrypto as default and make RNQuickCrypto an opt-in import
2024-12-24 00:40:44 +01:00
Guido D'Orsi
7701307ab7 fix: restore PureJSCrypto as default and make RNQuickCrypto an opt-in import 2024-12-24 00:40:03 +01:00
Guido D'Orsi
1e7dadd31b Merge pull request #917 from boorad/feat/quick-crypto
feat: add `react-native-quick-crypto` for `ed25519`
2024-12-23 23:34:27 +01:00
Brad Anderson
b57bb88328 feat: add react-native-quick-crypto for ed25519 2024-12-23 17:28:17 -05:00
Guido D'Orsi
afd25d766f chore: remove comment 2024-12-23 19:12:21 +01:00
Guido D'Orsi
222f8c5063 test(chat): uncomment test code 2024-12-23 19:11:58 +01:00
Guido D'Orsi
857e0d5c48 Merge pull request #1045 from garden-co/jazz-596-add-organization-design-pattern-to-docs
Add Organization example app
2024-12-23 19:05:22 +01:00
Guido D'Orsi
be903ede57 Merge remote-tracking branch 'origin/main' into jazz-596-add-organization-design-pattern-to-docs 2024-12-23 19:02:11 +01:00
Guido D'Orsi
9b654ad1fb Merge pull request #1010 from garden-co/jazz-93-inbox-abstraction
feat: Inbox, a new experimental API to simplfy the communication with Workers
2024-12-23 18:59:18 +01:00
Guido D'Orsi
a7bc15fdf2 fix(DemoAuth): serialize username with base64 and handle key migrations 2024-12-23 18:55:57 +01:00
Guido D'Orsi
0489d4a894 feat: add the appendItems method to CoList to add many items in a single transaction 2024-12-23 12:35:55 +01:00
Guido D'Orsi
1ef3226ed8 feat: add the assign method to RawCoMap to create bulk transactions and optimize RawCoMap init 2024-12-23 11:09:23 +01:00
Guido D'Orsi
e14a2c0a5d Merge pull request #1071 from garden-co/fix/create-invite-from-account
fix: throw an error if an invite is create from an account owned CoValue
2024-12-23 11:04:54 +01:00
Guido D'Orsi
6a7ef2ba60 Merge pull request #1076 from garden-co/skipverify
perf: skip verify step when creating a new local transaction
2024-12-23 11:04:11 +01:00
Anselm
94d95ceeb6 Fix garden logo, planned dates 2024-12-23 08:55:17 +00:00
Guido D'Orsi
ab4ffbd130 fix(demo-auth): slugify the username when creating a storage key 2024-12-21 01:54:04 +01:00
Guido D'Orsi
e322e6034b fix: fix e2e rn login 2024-12-21 01:49:27 +01:00
Guido D'Orsi
bbf49ae7cd fix: fix chat-rn styles 2024-12-21 01:37:52 +01:00
Guido D'Orsi
04bcf94ae4 fix: fix chat-rn build 2024-12-21 01:21:01 +01:00
Guido D'Orsi
22ad297e4b Merge pull request #1067 from garden-co/fix/update-deps
fix: update lockfile to fix RN build
2024-12-21 01:16:17 +01:00
Guido D'Orsi
2ee58780a5 chore: remove console.log from tests 2024-12-21 01:14:13 +01:00
Guido D'Orsi
fca6a0bfc2 perf: skip verify step when creating a new local transaction 2024-12-21 00:19:24 +01:00
Guido D'Orsi
6f0bd7f5ea fix: throw an error if an invite is create from an account owned CoValue 2024-12-20 17:52:16 +01:00
Trisha Lim
4dea285879 Form example: move account data to root 2024-12-20 16:30:00 +00:00
Guido D'Orsi
0c68349a27 feat: added RPC style response management 2024-12-20 17:06:34 +01:00
Guido D'Orsi
e761a8e5d5 fix lockfile 2024-12-20 14:55:26 +01:00
Guido D'Orsi
45c1e113ea fix: update lockfile to fix RN build 2024-12-20 13:50:41 +01:00
Guido D'Orsi
88d7d9add0 feat: Inbox, a new experimental API to simplfy the initial handshake between accounts 2024-12-20 11:41:20 +01:00
Guido D'Orsi
36d3be25a1 Merge pull request #1061 from garden-co/fix/jazz-run-json
fix: fix --json option on the account create command
2024-12-19 18:23:53 +01:00
Guido D'Orsi
99e731d6f8 fix: fix --json option on the account create command 2024-12-19 18:22:37 +01:00
pax-k
0027bc73b5 fix: create-jazz-app correctly sets metro.config.js for expo starter 2024-12-19 18:41:01 +02:00
Anselm Eickhoff
2304412c20 Merge pull request #1057 from garden-co/docs/invite-link
Add docs for generating invite links and public sharing
2024-12-19 16:10:26 +00:00
Trisha Lim
b697b91f1d Address feedback 2024-12-19 16:03:33 +00:00
Trisha Lim
6694dbc53f Address feedback 2024-12-19 15:49:21 +00:00
Trisha Lim
af9eb02d46 Add docs for generating invite links and public sharing 2024-12-19 15:16:43 +00:00
Guido D'Orsi
4e8c70f8d9 Merge pull request #1055 from garden-co/fix/circular-deps
fix(jazz-tools): add a bundle step to fix the circular deps issue
2024-12-19 15:46:08 +01:00
Guido D'Orsi
fa41f8eec2 fix(jazz-tools): add a bundle step to not expose the circular deps to users 2024-12-19 15:42:02 +01:00
Guido D'Orsi
60e35eab71 fix(jazz-tools): reduce the amount of circular deps 2024-12-19 15:29:45 +01:00
Guido D'Orsi
80f563e4f0 Merge pull request #1053 from garden-co/changeset-release/main
Version Packages
2024-12-19 13:13:34 +01:00
github-actions[bot]
c321d99ec6 Version Packages 2024-12-19 12:13:04 +00:00
Guido D'Orsi
135fa2d164 Merge pull request #1052 from garden-co/fix/logging
feat: Add an internal API to disable the permission errors logs
2024-12-19 13:11:50 +01:00
Guido D'Orsi
5d20c81ed5 feat: Add an API to disable the permission errors logs 2024-12-19 13:08:03 +01:00
Trisha Lim
8ee6db5102 Add organization example to docs 2024-12-19 11:58:24 +00:00
Trisha Lim
a8e7f52700 Move css out of .css file 2024-12-19 11:17:01 +00:00
Trisha Lim
1e6f6fce53 Clean up 2024-12-19 11:17:01 +00:00
Trisha Lim
025dfaedc4 Reset url on logout 2024-12-19 11:17:01 +00:00
Trisha Lim
d681aa242a Set title 2024-12-19 11:17:01 +00:00
Trisha Lim
a4f0a0737e Home page UI improvements 2024-12-19 11:17:01 +00:00
Trisha Lim
4583401502 Dark mode 2024-12-19 11:17:00 +00:00
Trisha Lim
99a614038d Form styling 2024-12-19 11:17:00 +00:00
Trisha Lim
762d1fac23 Remove AddMember 2024-12-19 11:17:00 +00:00
Trisha Lim
9d7fabb1cf Remove draft project 2024-12-19 11:17:00 +00:00
Trisha Lim
7c9a872f50 Fix project permissions 2024-12-19 11:17:00 +00:00
Trisha Lim
9ed8dd509b UI improvements 2024-12-19 11:17:00 +00:00
Trisha Lim
0d771b9acc UI improvements 2024-12-19 11:17:00 +00:00
Trisha Lim
3e191685e4 UI improvements 2024-12-19 11:17:00 +00:00
Trisha Lim
7b2fd31a75 Organize directory structure 2024-12-19 11:17:00 +00:00
Trisha Lim
dda7c243d7 Add new org to list after invite accept 2024-12-19 11:17:00 +00:00
Trisha Lim
cce6a2f243 Invite org members through link 2024-12-19 11:17:00 +00:00
Trisha Lim
63001da65a Fix ownership bugs
modified:   src/schema.ts
2024-12-19 11:17:00 +00:00
Trisha Lim
b094605109 Adding members to org 2024-12-19 11:16:59 +00:00
Trisha Lim
e4bc39ed21 Change ownership to group 2024-12-19 11:16:59 +00:00
Trisha Lim
67d4f538ec Revert 2024-12-19 11:16:59 +00:00
Trisha Lim
f5b527886f Add "create org" dropdown option 2024-12-19 11:16:59 +00:00
Trisha Lim
dba767ae7b Change layout 2024-12-19 11:16:59 +00:00
Trisha Lim
bb39c0b7fa Add projects under an organization 2024-12-19 11:16:59 +00:00
Trisha Lim
57c846a904 Routing for organization page 2024-12-19 11:16:59 +00:00
Trisha Lim
4390d4b266 use react router 2024-12-19 11:16:59 +00:00
Trisha Lim
1427f071d4 Form for creating an org 2024-12-19 11:16:59 +00:00
Trisha Lim
2d31e8edce Create schema 2024-12-19 11:16:59 +00:00
Trisha Lim
09cad40565 Add project for organization example app 2024-12-19 11:16:58 +00:00
pax-k
3accbc06e2 chore: add build step to release workflow (debug) 2024-12-18 21:58:25 +02:00
pax-k
39ae4fc8c1 chore: enable tmate debugging on gh workflow failure 2024-12-18 21:13:01 +02:00
Guido D'Orsi
ae60eb0d01 Merge pull request #1050 from garden-co/fix/remove-local-server-e2e
test(e2e): run tests against our cloud
2024-12-18 17:09:29 +01:00
Guido D'Orsi
05eb330173 Merge pull request #1019 from garden-co/form-example-test
Add test for form example
2024-12-18 16:36:03 +01:00
Guido D'Orsi
5d1e192245 test(e2e): run tests against our cloud 2024-12-18 16:34:59 +01:00
Anselm Eickhoff
c5e059b3a9 Merge pull request #1048 from garden-co/docs/org-design-pattern
Add organization design pattern to docs
2024-12-18 15:24:37 +00:00
Trisha Lim
d1785c0178 Address feedback 2024-12-18 15:14:12 +00:00
pax
9b95c32edb Merge pull request #1049 from garden-co/changeset-release/main
Version Packages
2024-12-18 17:08:52 +02:00
github-actions[bot]
d87781d33f Version Packages 2024-12-18 15:04:52 +00:00
pax
ad50ec2d9d Merge pull request #1047 from garden-co/create-jazz-app
create-jazz-app
2024-12-18 17:03:50 +02:00
Trisha Lim
fef055b9fb Add organization design pattern to docs 2024-12-18 14:20:10 +00:00
pax-k
cdc7f9f841 chore: changeset 2024-12-18 14:56:28 +02:00
pax-k
ff6940de56 chore: bumped jazz-react-native-auth-clerk 2024-12-18 14:52:44 +02:00
pax-k
cad54e4018 chore: upgraded nativewind to 4.x 2024-12-18 14:52:31 +02:00
pax-k
c657880a22 chore: small adjustments 2024-12-18 14:51:54 +02:00
pax-k
79b02dee3c chore: added readme for create-jazz-app 2024-12-18 14:51:35 +02:00
pax-k
ee29cb300c chore: changeset 2024-12-18 13:38:20 +02:00
pax-k
36f0ab7571 Merge branch 'main' into create-jazz-app 2024-12-18 13:00:53 +02:00
pax-k
829be3cafa chore: cleanup 2024-12-18 13:00:32 +02:00
Guido D'Orsi
7c322796aa fix: exclude tests from build 2024-12-18 12:00:18 +01:00
pax-k
36d50d96dd feat: create-jazz-app command 2024-12-18 12:59:58 +02:00
Guido D'Orsi
1fd26b9d05 Merge pull request #1038 from garden-co/changeset-release/main
Version Packages
2024-12-18 11:54:35 +01:00
github-actions[bot]
40f161d4d0 Version Packages 2024-12-18 10:52:20 +00:00
Anselm Eickhoff
655a601a8e Merge pull request #991 from garden-co/jazz-91-writer-only-permission-kind
feat: add writeOnly role on groups
2024-12-18 10:50:04 +00:00
Anselm Eickhoff
c7a28e5003 Merge pull request #1029 from garden-co/feat/icon-component
Create Icon component for consistent icons
2024-12-18 10:49:28 +00:00
Anselm Eickhoff
ae429d0a1c Merge pull request #1034 from garden-co/feat/incremental-transactions
perf: incremental computation on transactions
2024-12-18 10:46:51 +00:00
Guido D'Orsi
26c390be66 fix(rn-e2e): fix app name 2024-12-18 11:40:46 +01:00
pax
a0a0962f28 Merge pull request #1044 from garden-co/ignore-homepage-build
Skip unnecessary Vercel builds if only docs are changed
2024-12-17 16:14:38 +02:00
Guido D'Orsi
32834ef9e3 chore: improve doc comment
Co-authored-by: Anselm Eickhoff <anselm.eickhoff@gmail.com>
2024-12-17 12:06:04 +01:00
Trisha Lim
13be2a3235 Use Icon component in onboarding example thumbnail 2024-12-17 09:39:42 +00:00
Trisha Lim
7fa6e4333d Create Icon component for consistent icon sizes 2024-12-17 09:35:44 +00:00
pax-k
093f08b5e0 chore: renamed vercel build checking script 2024-12-16 22:00:50 +02:00
pax-k
f374545692 chore: rename script 2024-12-16 21:58:54 +02:00
pax-k
9a8f2747fe chore: added vercel.json for example apps 2024-12-16 21:49:30 +02:00
pax-k
84b7c9ab89 chore: test script 2024-12-16 21:10:59 +02:00
pax-k
3863d834ce fix: added vercel.json for homepage 2024-12-16 21:09:56 +02:00
pax-k
4c860075ee fix: tweaked ignore-build.js 2024-12-16 21:01:57 +02:00
pax-k
79480ddf0c chore: moved ignore-build.js to root 2024-12-16 20:47:14 +02:00
pax-k
8d447b8725 chore: test ignore build script 2024-12-16 20:18:02 +02:00
pax-k
238fd47089 fix: use ES modules instead of CommonJS 2024-12-16 20:13:36 +02:00
pax-k
29ac1fbe88 feat: ignore homepage build if "docs" not found in branch name 2024-12-16 20:11:26 +02:00
Anselm
95fd27d3e3 Fix doc typo 2024-12-16 17:22:07 +00:00
Anselm Eickhoff
533d7684c9 Merge pull request #1042 from garden-co/docs-getting-group-of-covalues
Document Getting the Group of an existing CoValue
2024-12-16 17:14:14 +00:00
Anselm
798403a57d Document Getting the Group of an existing CoValue 2024-12-16 17:07:48 +00:00
Anselm
ddf060e64c Improve docs: talk about casting to ID<Account> 2024-12-16 16:58:38 +00:00
Anselm Eickhoff
51515f629c Merge pull request #1041 from garden-co/docs-adding-group-members-by-id
Document how to add Group members by ID
2024-12-16 16:43:13 +00:00
Anselm
65e012f401 Document how to add Group members by ID 2024-12-16 16:38:43 +00:00
Trisha Lim
a1ba29fd47 Add onboarding to examples page 2024-12-16 15:34:19 +00:00
Trisha Lim
b6b76ab2b9 Fix: form does not submit on Enter key press 2024-12-16 15:34:19 +00:00
Guido D'Orsi
77dbd4e205 fix: keep the cachedContent if processNewTransactions is supported 2024-12-16 12:50:03 +01:00
Guido D'Orsi
baa8aff33f Merge pull request #1037 from garden-co/gio/chore/otel-peer-dep
chore(cojson): add @opentlementry/api as a dependency
2024-12-16 10:57:24 +01:00
Giordano Ricci
63703489ab chore(cojson): add @opentlementry/api as a dependency 2024-12-16 09:48:10 +00:00
Guido D'Orsi
325250272b chore: changeset 2024-12-16 10:09:10 +01:00
Guido D'Orsi
219ba975a5 pref(CoMap): lazy computation of the values when doing time travel 2024-12-14 22:52:24 +01:00
Guido D'Orsi
f5a3394d40 perf: improve incemental computation 2024-12-14 21:25:55 +01:00
Guido D'Orsi
4a5209237f perf(coStream): process transactions incrementally 2024-12-14 21:25:55 +01:00
Guido D'Orsi
d7eb50abc1 perf(coMap): process transactions incrementally 2024-12-14 21:25:55 +01:00
Anselm Eickhoff
4908d7cfd3 Merge pull request #1033 from garden-co/changeset-release/main
Version Packages
2024-12-14 17:26:15 +00:00
github-actions[bot]
38b19ab980 Version Packages 2024-12-14 17:22:26 +00:00
Anselm Eickhoff
9e2486c332 Merge pull request #1032 from garden-co/jazz-594-send-content-from-storage-peers-in-one-message-instead-of
Send content from storage peers in one message instead of streaming it
2024-12-14 17:20:46 +00:00
Anselm
e905c84a34 Send content from storage peers in one message instead of streaming it 2024-12-14 17:14:04 +00:00
Trisha Lim
b097c38617 Test draft indicator 2024-12-13 18:20:59 +00:00
Trisha Lim
385dfc89ff Add test to CI 2024-12-13 18:08:31 +00:00
Trisha Lim
d89e4c3412 Test order editing 2024-12-13 18:05:12 +00:00
Trisha Lim
bbeee086ce Test order creation 2024-12-13 17:59:05 +00:00
Trisha Lim
718e9418e2 Set up playwright on form example 2024-12-13 17:34:48 +00:00
Guido D'Orsi
507a00fe6a Merge pull request #1016 from garden-co/fix-depencencies
fix: run sherif to align all the packages/examples dependencies
2024-12-13 15:13:09 +01:00
Guido D'Orsi
8e940130d2 fix: run sherif to aling all the packages/examples dependencies 2024-12-13 15:05:23 +01:00
Guido D'Orsi
ac216b9f2e chore: changeset 2024-12-13 13:19:24 +01:00
Guido D'Orsi
93230df2cb test: add some tests for the writeOnly role and the inheritance 2024-12-13 13:19:24 +01:00
Guido D'Orsi
c13daa140b chore: add comments 2024-12-13 13:19:24 +01:00
Guido D'Orsi
3c9439d0cc chore: rename getCurrentKeyReadId into getCurrentReadKeyId 2024-12-13 13:19:24 +01:00
Guido D'Orsi
d38d4928c7 test: add e2e tests for the writeOnly role 2024-12-13 13:19:24 +01:00
Guido D'Orsi
596901cba6 fix: add writeOnly to createInvite types 2024-12-13 13:19:24 +01:00
Guido D'Orsi
2a1fda3758 feat: add writeOnly role on groups 2024-12-13 13:19:24 +01:00
Trisha Lim
f3581d1086 Fix form example build 2024-12-13 12:17:25 +00:00
Guido D'Orsi
4ac2b75194 Merge pull request #1014 from garden-co/migrate-taiwind-config
fix: migrate tailwind configs to typescript
2024-12-13 13:17:15 +01:00
Guido D'Orsi
cfa78ed628 fix(form): restore palette and add ts-ignore to the vite config 2024-12-13 13:12:49 +01:00
Guido D'Orsi
94095aff28 fix(ci): build only packages on the unit test workflow 2024-12-13 13:09:57 +01:00
Guido D'Orsi
a70f7a4c49 fix: migrate tailwind configs to typescript 2024-12-13 13:09:20 +01:00
Trisha Lim
2270ae113e Fix link typo 2024-12-13 11:54:32 +00:00
Benjamin S. Leveritt
92b64e05ca Add comment about public visibility on profile content 2024-12-13 11:54:32 +00:00
Benjamin S. Leveritt
cb6b9af57d Improve guide 2024-12-13 11:54:32 +00:00
Benjamin S. Leveritt
fc00369d87 Add initial project guide 2024-12-13 11:54:32 +00:00
Anselm Eickhoff
0b260f339d Merge pull request #993 from garden-co/jazz-549-add-forms-example
Add form example for creating and updating
2024-12-13 11:54:11 +00:00
Trisha Lim
8f50dd48f6 Show errors on page 2024-12-13 11:50:43 +00:00
Anselm Eickhoff
d3af4fecd1 Merge pull request #1012 from garden-co/jazz-582-officially-support-svelte
Officially support svelte
2024-12-13 11:32:07 +00:00
Guido D'Orsi
4ec13a9515 Merge pull request #999 from garden-co/changeset-release/main
Version Packages
2024-12-13 12:22:40 +01:00
Trisha Lim
79262351fa Icon stroke width 2024-12-13 11:05:43 +00:00
Trisha Lim
01292230e8 Add validation 2024-12-13 10:49:26 +00:00
github-actions[bot]
9b31d3241d Version Packages 2024-12-12 17:37:39 +00:00
Anselm Eickhoff
77dfd4f883 Merge pull request #1011 from garden-co/fix/import-extensions-linting
fix: enable linting for import extensions on packages
2024-12-12 17:36:16 +00:00
Trisha Lim
9150c238e4 Add feature tags to file share example 2024-12-12 17:33:35 +00:00
Trisha Lim
67bd5ab07f Update file share icon 2024-12-12 17:25:04 +00:00
Trisha Lim
2678c83a99 Add Svelte passkey example app to examples page 2024-12-12 17:22:03 +00:00
Trisha Lim
4c1364a5cb Add Svelte file share example app to examples page 2024-12-12 17:20:16 +00:00
Trisha Lim
f546811a23 Add Svelte under supported environments 2024-12-12 17:10:32 +00:00
Guido D'Orsi
eb9164633c fix: enable linting for import extensions on packages 2024-12-12 18:02:02 +01:00
Trisha Lim
db5e5d8392 Add form example to examples page 2024-12-12 16:26:56 +00:00
Trisha Lim
a18d870faa Update lock file 2024-12-12 15:16:02 +00:00
Trisha Lim
d434b23a34 Layout fix 2024-12-12 15:14:18 +00:00
Trisha Lim
dd363d613f Add readme description 2024-12-12 15:14:18 +00:00
Trisha Lim
9d41f7a16a Orders empty screen 2024-12-12 15:14:18 +00:00
Trisha Lim
dfddc3603a Set default values 2024-12-12 15:14:18 +00:00
Trisha Lim
5c09f0f41a Style strong tag 2024-12-12 15:12:59 +00:00
Trisha Lim
139fcbe172 Add draft indicator 2024-12-12 15:12:59 +00:00
Trisha Lim
507b3b890a Form styling 2024-12-12 15:11:08 +00:00
Trisha Lim
06ad39c418 Order thumbnail styling 2024-12-12 15:10:59 +00:00
Trisha Lim
7077a41c2d Make addons checkbox work 2024-12-12 15:10:59 +00:00
Trisha Lim
9572729cc9 Remove unused 2024-12-12 15:10:59 +00:00
Trisha Lim
9f08ca8cd8 Save draft as an order 2024-12-12 15:10:59 +00:00
Trisha Lim
8e0bf8a8d8 Replace drafts array with a single draft 2024-12-12 15:10:59 +00:00
Trisha Lim
5b72d1f89b Show drafts in home 2024-12-12 15:10:59 +00:00
Trisha Lim
e10d09e6ab Add order draft to schema 2024-12-12 15:10:59 +00:00
Trisha Lim
2007815745 Do not use react-hook-form 2024-12-12 15:10:59 +00:00
Trisha Lim
1f826734d4 Create Order form using react-form-hook 2024-12-12 15:10:59 +00:00
Trisha Lim
80383dac3b Create form example project 2024-12-12 15:09:20 +00:00
Guido D'Orsi
b9ed9e3f13 Merge pull request #994 from garden-co/jazz-493-wait-for-stuff-to-sync-in-ephemeral-contexts-before-quitting
fix(jazz-nodejs): wait for sync before closing and fix the reconnection
2024-12-12 14:52:19 +01:00
Guido D'Orsi
96f844af5e chore: changeset 2024-12-12 11:07:32 +01:00
Guido D'Orsi
994fbf3524 test: add tests on startWorker 2024-12-12 11:04:28 +01:00
Guido D'Orsi
6eba301599 fix: wait for all coValues in sync before closing the Workers node 2024-12-12 10:16:50 +01:00
Guido D'Orsi
322438f361 fix(jazz-nodejs): fix the reconnection system 2024-12-12 10:16:50 +01:00
Guido D'Orsi
f2f3481773 Merge pull request #935 from garden-co/jazz-550-match-account-load-depth-fallback
Add depth fallback
2024-12-12 10:15:12 +01:00
Guido D'Orsi
b96bab59d0 Merge pull request #955 from garden-co/jzi-29-track-the-amount-of-connected-peers-in-cojson-syncmanager
chore: add an up-down counter to track the amount of connected peers
2024-12-12 10:13:34 +01:00
Benjamin S. Leveritt
aa21072ceb Chore: Add changeset 2024-12-11 23:32:39 +00:00
Benjamin S. Leveritt
01442948d0 Exclude Svelte 5 from coverage instrumentation (not supported) 2024-12-11 23:23:43 +00:00
Benjamin S. Leveritt
6c26902a73 Fix coverage picking up wrong files in Jazz-Svelte 2024-12-11 22:53:24 +00:00
Benjamin S. Leveritt
b12f9dc675 Fix downgrade vitest syntax 2024-12-11 22:28:19 +00:00
Benjamin S. Leveritt
bb6d9791dc Lower vitest version 2024-12-11 22:28:19 +00:00
Benjamin S. Leveritt
024b24f5fa Add tests for jazz.svelte 2024-12-11 22:28:19 +00:00
Benjamin S. Leveritt
facfc51e84 Add tests for passkey auth 2024-12-11 22:28:19 +00:00
Benjamin S. Leveritt
6e4a7411dd Add config 2024-12-11 22:28:19 +00:00
Benjamin S. Leveritt
a02b53cbe3 Add vitest coverage 2024-12-11 22:28:19 +00:00
Benjamin S. Leveritt
a0548ecb25 Add vitest 2024-12-11 22:28:19 +00:00
Benjamin S. Leveritt
970414c8c3 Add depth fallback 2024-12-11 22:27:28 +00:00
Anselm Eickhoff
d62a5c74f9 Merge pull request #1004 from garden-co/jazz-579-external-links-to-expo-are-broken
Fix broken links in docs
2024-12-11 18:20:12 +00:00
Guido D'Orsi
5d35469b91 fix: fix jazz-browser-media-images dependency on chat example 2024-12-11 18:49:04 +01:00
Trisha Lim
6cd79a0631 Fix broken links in docs 2024-12-11 16:52:13 +00:00
Trisha Lim
5122cd027b Fix external links in docs 2024-12-11 16:50:06 +00:00
Giordano Ricci
9d9bb97da3 add tests 2024-12-11 11:59:24 +00:00
Giordano Ricci
9db3f2120b add test metric reader utilities 2024-12-11 11:58:50 +00:00
Giordano Ricci
cb4ccd5d33 chore: add .direnv to ignore file 2024-12-11 11:54:27 +00:00
Giordano Ricci
3121551e8a chore: add an up-down counter to track the amount of connected peers 2024-12-11 11:54:27 +00:00
Anselm Eickhoff
1a65ffd913 Merge pull request #950 from garden-co/jazz-188-add-method-to-wait-until-a-covalue-is-synced
feat: add the APIs to wait for a sync state
2024-12-11 10:42:59 +00:00
Guido D'Orsi
80301e51bb Merge pull request #979 from garden-co/jazz-530-send-images-in-chat-example
Send image in chat example
2024-12-11 11:18:54 +01:00
Guido D'Orsi
5686db9b89 Merge pull request #996 from garden-co/jazz-576-fix-homepage-build
Move to use turbo build
2024-12-11 11:18:26 +01:00
Guido D'Orsi
21a56fc96b Merge remote-tracking branch 'origin/main' into jazz-530-send-images-in-chat-example 2024-12-11 11:17:02 +01:00
Guido D'Orsi
eb22a24f17 Merge pull request #990 from garden-co/jazz-574-bump-repo-to-node-22
Chore: Bump node version to 22
2024-12-11 10:56:02 +01:00
Guido D'Orsi
4f3de09154 Merge remote-tracking branch 'origin/main' into jazz-574-bump-repo-to-node-22 2024-12-11 10:53:39 +01:00
Guido D'Orsi
f2f865da50 Merge pull request #920 from garden-co/add-file-share-example-app
Add file share example app
2024-12-11 10:52:30 +01:00
Guido D'Orsi
c0d12dba26 Merge remote-tracking branch 'origin/main' into add-file-share-example-app 2024-12-11 10:51:26 +01:00
Guido D'Orsi
cd0717f35d Merge pull request #983 from garden-co/jazz-571-bug-the-ws-connection-isnt-restored-when-dropped-by-the
fix(react-native): reconnect automatically when the WebSocket is closed by the server
2024-12-11 10:49:23 +01:00
Guido D'Orsi
4515395bb9 Merge pull request #980 from garden-co/jazz-558-set-up-cryptography-tests-for-react-native
feat(react-native): setup a basic environment to test the crypto
2024-12-11 10:49:05 +01:00
Guido D'Orsi
7cee49f2b2 chore: fix typo 2024-12-11 10:32:18 +01:00
Guido D'Orsi
9414fbfb23 fix: fix e2e tests and initial account migration 2024-12-11 10:25:11 +01:00
Guido D'Orsi
9c6ea58ef5 feat(file-share-svelter): add the e2e test to the CI 2024-12-11 09:44:50 +01:00
Guido D'Orsi
0685436b0c Merge pull request #842 from garden-co/JAZZ-238/very-quick-way-to-open-up-inspector-as-current-user-in-an-app
feat: pressing cmd+j in a jazz app exports the jazz account to inspector
2024-12-11 09:33:48 +01:00
Guido D'Orsi
daa11aa915 chore: remove console.log 2024-12-11 09:33:05 +01:00
Benjamin S. Leveritt
bbdb1ef429 Improve build instructions in readme 2024-12-10 23:37:07 +00:00
Benjamin S. Leveritt
508537928f Update cloud key 2024-12-10 23:30:59 +00:00
Benjamin S. Leveritt
eaeeedc3a4 Update readmes 2024-12-10 23:30:59 +00:00
Benjamin S. Leveritt
15cdfd406c Add svelte output to turbo for better caching 2024-12-10 23:30:59 +00:00
Benjamin S. Leveritt
76262c1a03 Replace svelte auto adapter with vercel 2024-12-10 23:30:59 +00:00
Benjamin S. Leveritt
fc43a2384b Remove the special example exception 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
d1698eed6f Add Readmes 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
6d68dc1bbf Rename file-share app 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
1fb49b266a Remove ownerId from url
As it's not used
2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
49f0ab1545 Exclude file-share from biome checking for now 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
641bbddd64 Add file name to page title 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
7e22f53718 Chore: fix formatting 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
4c44468129 Fix Ownership to be determined by admin role 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
b0c5ecd7b6 Add guest access to files 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
5bf9d69e9f Add loading check 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
3ecf11ded9 Replace messages with toasts 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
709d60b365 Add download error handler 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
f135babcb8 Add page title 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
36a85d4313 Add file detail page for sharing 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
7316379247 Add lucide icons 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
0cf59b6549 Tweak UI layout 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
bcaff2f24a Improve layout of uploader 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
d2a5087e65 Animate uploading files 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
8627d47afc Show uploading files 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
47f625cbd4 Add file size 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
34b65ef67a Add shared files page 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
51209d5314 Fix root re-initialising on reload 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
309dffcc67 Wrap auth and provider around app 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
716b87da0a Initialise Jazz app 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
3c58879a10 Add schema 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
ed16031f12 Add jazz deps 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
90d9e1ca91 Format files 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
95828596f8 Add sv created file share app 2024-12-10 23:28:56 +00:00
Benjamin S. Leveritt
d794a555dc Merge pull request #942 from garden-co/jazz-560-fix-linting-in-cojson-storage-indexeddb
Add linting to cojson-storage-indexeddb
2024-12-10 23:27:15 +00:00
Benjamin S. Leveritt
a6c143f33f Add build instructions 2024-12-10 23:02:06 +00:00
Benjamin S. Leveritt
1db615d1b1 Formatting 2024-12-10 21:28:44 +00:00
Benjamin S. Leveritt
9b45c44b29 Move to use turbo build 2024-12-10 21:27:42 +00:00
Benjamin S. Leveritt
ecc7c9672d Chore: Add changeset 2024-12-10 20:24:59 +00:00
Benjamin S. Leveritt
d645970cb0 Bump dockerfile node version 2024-12-10 20:24:59 +00:00
Benjamin S. Leveritt
e9864cda9d Chore: Bump better-sqlite3 version 2024-12-10 20:24:59 +00:00
Benjamin S. Leveritt
d4e9afc4e2 Chore: Bump node version to 22 2024-12-10 20:21:36 +00:00
pax
4fc4f029a2 Merge pull request #977 from garden-co/changeset-release/main
Version Packages
2024-12-10 20:39:58 +02:00
Guido D'Orsi
fb06319dae chore: simplify createAccount relying on waitForAllCoValuesSync 2024-12-10 18:29:54 +01:00
Guido D'Orsi
a4886fede8 test: fix test after merge 2024-12-10 18:16:30 +01:00
Trisha Lim
b2ca4ec52e Change owner of image 2024-12-10 16:59:56 +00:00
Trisha Lim
b2c8a1a27d Add hover styling to Upload Image button 2024-12-10 16:58:29 +00:00
github-actions[bot]
5469c1f347 Version Packages 2024-12-10 14:55:06 +00:00
Anselm Eickhoff
d36e7cd55a Merge pull request #987 from garden-co/jazz-573-improve-turbo-caching-on-homepage
Adds caching to homepage
2024-12-10 14:53:43 +00:00
Giordano Ricci
03ccdb93af Merge pull request #988 from garden-co/gio/add-queue-metrics-tests
chore: adds message queue size metrics tests
2024-12-10 13:36:00 +00:00
Giordano Ricci
eb8bd20931 teardown meter provider 2024-12-10 13:28:29 +00:00
Giordano Ricci
9819811c91 chore: adds message queue size metrics tests 2024-12-10 12:35:24 +00:00
Benjamin S. Leveritt
350e59b187 Adds caching to homepage 2024-12-10 11:42:57 +00:00
Guido D'Orsi
c2cad4b68c Merge remote-tracking branch 'origin/main' into jazz-188-add-method-to-wait-until-a-covalue-is-synced 2024-12-10 11:23:29 +01:00
Guido D'Orsi
0c6b0f37ed fix(react-native): reconnect automatically when the WebSocket is closed by the server 2024-12-10 11:17:56 +01:00
Anselm Eickhoff
a3541f24ee Merge pull request #975 from garden-co/jzi-28-track-the-message-queue-size-of-each-peerstate-on-cojson
chore: Add message queue size metric
2024-12-10 09:59:17 +00:00
Anselm Eickhoff
f8be4e8bc0 Merge pull request #978 from garden-co/fix/sqlite-scheduling
fix(sqlite): improve the work scheduling when under pressure
2024-12-10 09:52:40 +00:00
Guido D'Orsi
c8015ddee1 feat(react-native): setup a basic environment to test the crypto 2024-12-10 10:24:30 +01:00
Guido D'Orsi
44227bd6e8 Merge pull request #970 from garden-co/fix/sync-server-console
fix(jazz-run): fix console output to log the server address when running the local sync
2024-12-10 10:02:10 +01:00
Trisha Lim
d582429488 Set file size limit to 5MB 2024-12-09 18:45:00 +00:00
Trisha Lim
3db0639636 Update demo section copy 2024-12-09 18:29:10 +00:00
Trisha Lim
c75cd9da37 Send image in chat example 2024-12-09 16:12:05 +00:00
Guido D'Orsi
da13ecac5c fix(sqlite): improve the work scheduling when under pressure 2024-12-09 16:44:34 +01:00
Giordano Ricci
c4af72e1ca mark @opentelemetry/api as a peer dependency 2024-12-09 14:48:10 +00:00
Trisha Lim
e43ca2bc98 Fix broken links 2024-12-09 11:46:28 +00:00
Trisha Lim
bcdd8e9125 Change "updating" to "writing" 2024-12-09 11:46:28 +00:00
Trisha Lim
2d6352a2dc Match side nav links with content links 2024-12-09 11:46:28 +00:00
Trisha Lim
749350cb59 Docs: return coming soon page on routes with no content 2024-12-09 11:46:28 +00:00
Trisha Lim
07e9a73c52 Fix clerk example readme title 2024-12-09 11:28:47 +00:00
Anselm Eickhoff
1ef9998b23 Merge pull request #973 from garden-co/fix/parent-group-role-resolution
fix(role): apply time traveling when resolving role from parents
2024-12-09 11:12:12 +00:00
Guido D'Orsi
b00ee914c3 fix(role): apply time traveling when resolving role from parents 2024-12-09 12:03:18 +01:00
Giordano Ricci
f488c09545 add changeset 2024-12-09 10:17:31 +00:00
Giordano Ricci
0d6ea25e56 chore: Add message queue size metric 2024-12-09 10:09:20 +00:00
Guido D'Orsi
9ffe6d0c63 test(e2e): use waitForSync to improve the test stability 2024-12-08 12:53:23 +01:00
Guido D'Orsi
249eecb68f chore: changeset 2024-12-08 12:46:05 +01:00
Guido D'Orsi
cdbde2970d fix(PeerState): keep optimistic and knownState the same when the role is storage 2024-12-08 12:46:05 +01:00
Guido D'Orsi
24a1b045d3 test(e2e): move synced check up 2024-12-08 12:46:05 +01:00
Guido D'Orsi
a21c3068cd feat(waitForSync): add API docs and some more tests 2024-12-08 12:46:05 +01:00
Guido D'Orsi
55ab4844d6 feat: add the APIs to wait for a sync state 2024-12-08 12:46:05 +01:00
Guido D'Orsi
6e131eb0dc Merge pull request #971 from garden-co/fix/e2e-test-sharing
test(e2e): use the local server to reduce the flakyiness
2024-12-08 11:47:00 +01:00
Guido D'Orsi
8a0cb69c72 test(e2e): fix flakyiness on the Sharing test suit 2024-12-08 11:40:56 +01:00
Guido D'Orsi
d01286b723 test(e2e): use the local server to reduce the flakyiness 2024-12-08 11:32:49 +01:00
Guido D'Orsi
0b636d26f3 Merge pull request #968 from garden-co/playwright-cache
chore(ci): optimize playwright browsers install
2024-12-08 11:22:25 +01:00
Guido D'Orsi
f41a1b0d1d Merge pull request #969 from garden-co/upgrade-pnpm-changeset
chore: update pnpm and changeset to fix release
2024-12-08 11:18:03 +01:00
Guido D'Orsi
28930ee1d5 fix(jazz-run): fix console output 2024-12-08 11:09:53 +01:00
Guido D'Orsi
0a8753dfe0 chore: align pnpm-lock with main 2024-12-08 11:06:39 +01:00
Guido D'Orsi
3ca8b13f6c fix: fix type error on test file 2024-12-08 11:01:40 +01:00
Guido D'Orsi
e06c18150a chore(ci): remove --with-deps 2024-12-08 10:57:35 +01:00
Guido D'Orsi
4c4499ce86 Merge remote-tracking branch 'origin/main' into upgrade-pnpm-changeset 2024-12-08 10:56:11 +01:00
Guido D'Orsi
afa4c825ca chore: update pnpm and changeset to fix release 2024-12-08 10:53:04 +01:00
Guido D'Orsi
60e04cb193 chore(ci): cache playwright browsers 2024-12-08 10:51:30 +01:00
Guido D'Orsi
843a012f33 Merge pull request #967 from garden-co/update-changeset-config
fix(changeset): update config
2024-12-08 10:39:17 +01:00
Guido D'Orsi
bd510a13ce fix(changeset): update config 2024-12-08 10:38:36 +01:00
Benjamin S. Leveritt
0d6853bbdd Fix imports 2024-12-08 07:36:35 +00:00
Benjamin S. Leveritt
a238dde78a Fix test 2024-12-08 07:36:35 +00:00
Benjamin S. Leveritt
59997fbf71 Add linting 2024-12-08 07:36:35 +00:00
Anselm
b56d7e3e7c Make passkey-svelte example private on npm 2024-12-07 19:17:06 +00:00
Anselm Eickhoff
2f5bd74206 Merge pull request #966 from garden-co/changeset-release/main
Version Packages
2024-12-07 19:09:20 +00:00
github-actions[bot]
a4864d93d2 Version Packages 2024-12-07 19:04:33 +00:00
Anselm Eickhoff
19376e6abd Merge pull request #965 from garden-co/perf/coMapAtTime
perf(CoMap): optimize the atTime processing
2024-12-07 19:02:56 +00:00
Guido D'Orsi
22f6db8141 test: cover CoMap public methods with tests 2024-12-07 19:40:44 +01:00
Guido D'Orsi
3d9f12e9ea chore: changeset 2024-12-07 19:28:12 +01:00
Guido D'Orsi
68620a3df9 perf(CoMap): optimize the atTime processing 2024-12-07 19:07:52 +01:00
Anselm Eickhoff
1767f024d9 Merge pull request #964 from garden-co/jazz-567-speed-up-latency-map-rendering
Fix caching for latency map
2024-12-07 14:06:46 +00:00
Anselm
c55924a04a Fix caching 2024-12-07 13:56:48 +00:00
Anselm Eickhoff
31e00a96ae Merge pull request #963 from garden-co/jazz-567-speed-up-latency-map-rendering
Speed up latency map rendering
2024-12-07 12:59:44 +00:00
Anselm
7bb834f399 Lint & format 2024-12-07 12:54:37 +00:00
pax
667f36e1cf Merge pull request #957 from garden-co/rn-examples-new-arch
fix: upgraded RN examples to Expo SDK 52 with new arch
2024-12-07 14:50:50 +02:00
pax-k
07669923ad Merge branch 'main' into rn-examples-new-arch 2024-12-07 14:48:28 +02:00
Anselm
9082a099ee Merge branch 'main' into jazz-567-speed-up-latency-map-rendering 2024-12-07 12:31:58 +00:00
Anselm
aba059db28 Try strongarming vercel into using the right pnpm version 2024-12-07 12:23:15 +00:00
Anselm
ae6b9c8dd2 Speed up latency map rendering 2024-12-06 18:59:21 +00:00
pax-k
7b9f96bf1a chore: pnpm lock 2024-12-06 18:52:25 +02:00
pax-k
8df49546fe Merge branch 'main' into rn-examples-new-arch 2024-12-06 18:52:08 +02:00
pax-k
bb4460f422 fix: upgraded RN examples to Expo SDK 52 with new arch 2024-12-06 18:51:35 +02:00
Anselm Eickhoff
2099099afc Merge pull request #956 from nikitavoloboev/patch-1
fix 404 urls in docs
2024-12-06 16:47:19 +00:00
Nikita
06b0758d7c fix urls 2024-12-06 17:43:06 +01:00
Nikita
6135250e57 fix 404 url 2024-12-06 17:38:32 +01:00
Anselm Eickhoff
aacd03bbdd Merge pull request #945 from garden-co/changeset-release/main
Version Packages
2024-12-06 15:39:02 +00:00
github-actions[bot]
ca7f250d47 Version Packages 2024-12-06 14:46:52 +00:00
pax
83ad506b94 Merge pull request #954 from garden-co/jazz-react-native-auth-clerk
jazz-react-native-auth-clerk package
2024-12-06 16:45:42 +02:00
pax-k
e9751f5b69 Merge branch 'main' into jazz-react-native-auth-clerk 2024-12-06 16:36:14 +02:00
pax-k
c84764acd5 chore: changeset 2024-12-06 16:30:35 +02:00
pax-k
c2a805bffa chore: added expo-font 2024-12-06 16:27:27 +02:00
pax-k
8728dde42b feat: added package jazz-react-native-auth-clerk 2024-12-06 15:13:45 +02:00
Benjamin S. Leveritt
9dd9366734 Merge pull request #949 from garden-co/jazz-518-write-initial-defining-schemas-docs
Write initial defining schemas docs
2024-12-05 20:23:03 +00:00
Anselm Eickhoff
48dd00f453 Merge pull request #946 from garden-co/jazz-563-fix-github-url
Replaces github url with new one
2024-12-05 18:25:57 +00:00
Anselm Eickhoff
cc361aefe5 Merge pull request #919 from garden-co/jazz-544-refactor-sqlite-storage-the-same-way-as-the-idbs-done
Refactor SQLite storage
2024-12-05 17:12:54 +00:00
Anselm
9e4438cb54 Write initial defining schemas docs 2024-12-05 17:09:01 +00:00
Benjamin S. Leveritt
08706d557a Update general web urls 2024-12-05 16:55:44 +00:00
Benjamin S. Leveritt
02c1ec63cc Change cloud keys and peer addresses 2024-12-05 16:54:33 +00:00
Benjamin S. Leveritt
df797dedcd Change email addresses 2024-12-05 16:53:01 +00:00
Benjamin S. Leveritt
74cb08e7d4 Replaces github url with new one 2024-12-05 16:48:44 +00:00
Anselm Eickhoff
73720a8cc4 Merge pull request #907 from garden-co/latency-map
Add a latency map to cloud page
2024-12-05 16:36:39 +00:00
Anselm Eickhoff
50c77fa788 Merge pull request #916 from garden-co/docs/examples-demo
Show demo and code for minimal examples
2024-12-05 16:35:04 +00:00
Benjamin S. Leveritt
9977a4ee85 Use jsxEmit value rather than string 2024-12-05 16:06:46 +00:00
Guido D'Orsi
441fe27802 chore: changeset 2024-12-05 15:53:19 +01:00
Marina Orlova
1afbd2c7cc Add changeset 2024-12-05 15:43:12 +01:00
Marina Orlova
4955e39af5 Create cojson-storage 2024-12-05 15:43:12 +01:00
Marina Orlova
ace151696c Copy syncUtils code into sqlite package 2024-12-05 15:43:12 +01:00
Marina Orlova
db9560ebc5 Fix ERR_MODULE_NOT_FOUND 2024-12-05 15:43:12 +01:00
Marina Orlova
80b572710e Fix tests 2024-12-05 15:43:12 +01:00
Marina Orlova
bbb9d45969 Unify IDB and SQLite storage code 2024-12-05 15:43:12 +01:00
Marina Orlova
83e9a3eaa8 Normalise sqlite code against indexedb 2024-12-05 15:43:12 +01:00
Marina Orlova
9ff7e68f7d Split sqlite storage 2024-12-05 15:43:12 +01:00
Anselm Eickhoff
06740e840a Merge pull request #927 from garden-co/jazz-551-optimise-large-record-like-comaps-for-access-of-latest-value
Optimise large record-like CoMaps for access of latest value
2024-12-05 10:28:19 +00:00
Guido D'Orsi
b0e2c4fd4b fix: revert the incremental processing optimization as it doesn't take into account that older transactions might be synced after the new ones 2024-12-05 11:11:49 +01:00
Guido D'Orsi
4c1922c10e perf(coMap): process only the new transactions on update 2024-12-05 11:03:35 +01:00
Anselm Eickhoff
76bad9b5c3 Merge pull request #922 from garden-co/jazz-547-explicitly-reference-homepage-dependencies
Explicitly reference homepage dependencies
2024-12-05 09:46:55 +00:00
Trisha Lim
7f16f2705e Attempt fix build 2024-12-04 21:54:08 +00:00
Guido D'Orsi
d12594e521 fix: fix timing issues and invalidate on update 2024-12-04 21:13:43 +01:00
Guido D'Orsi
cf96350b01 Merge remote-tracking branch 'origin/main' into jazz-551-optimise-large-record-like-comaps-for-access-of-latest-value 2024-12-04 20:21:53 +01:00
Anselm
947030433f Merge branch 'main' into latency-map 2024-12-04 18:27:34 +00:00
Anselm
b4cebd732e Merge branch 'main' into docs/examples-demo 2024-12-04 18:26:40 +00:00
Anselm
d0d95e6d5d Merge branch 'main' into jazz-547-explicitly-reference-homepage-dependencies 2024-12-04 18:23:47 +00:00
Trisha Lim
a75383ac6a Fix build 2024-12-04 18:15:44 +00:00
Anselm Eickhoff
073d8992f5 Merge pull request #914 from garden-co/changeset-release/main
Version Packages
2024-12-04 18:14:55 +00:00
github-actions[bot]
7b400835a2 Version Packages 2024-12-04 18:09:10 +00:00
Trisha Lim
de503b6120 Formatting fixes 2024-12-04 18:07:59 +00:00
Trisha Lim
bf287d0709 Examples: add id to headings 2024-12-04 18:07:27 +00:00
Trisha Lim
f7ae41254f Merge branch 'main' into docs/examples-demo 2024-12-04 18:06:09 +00:00
Trisha Lim
8f348b28c6 Improve code example styling 2024-12-04 18:05:53 +00:00
Anselm Eickhoff
b0072e63e3 Merge pull request #934 from garden-co/jazz-555-use-vercel-adapter
Use Vercel adapter for Svelte
2024-12-04 17:34:56 +00:00
Anselm Eickhoff
a479ece032 Merge pull request #601 from garden-co/aeplay-jazz-12
Group Inheritance
2024-12-04 17:27:58 +00:00
Benjamin S. Leveritt
e0dbe46d64 Use Vercel adapter for Svelte 2024-12-04 17:09:02 +00:00
Guido D'Orsi
1f1fc56720 test(sharing): cover the out-of-sync children 2024-12-04 18:04:10 +01:00
Trisha Lim
3b185b4cd3 Merge branch 'main' into latency-map 2024-12-04 16:54:50 +00:00
Guido D'Orsi
64fa74a6d9 chore: update tests 2024-12-04 17:52:09 +01:00
Anselm
df5dc513bf Don't reverse iterate over valid transactions for now 2024-12-04 16:51:11 +00:00
Benjamin S. Leveritt
8e6783ad88 Link dependant jazz packages for api docs generation 2024-12-04 16:48:59 +00:00
Benjamin S. Leveritt
79bf6f478f Add Turbo build config to homepage workspace 2024-12-04 16:48:59 +00:00
Trisha Lim
7fd93a5a61 Move Examples page before API Ref nav link 2024-12-04 16:48:39 +00:00
Trisha Lim
8f9687323f Reorder examples 2024-12-04 16:48:39 +00:00
Trisha Lim
47ee25786f Spacing 2024-12-04 16:48:39 +00:00
Trisha Lim
0009aa19b2 Example demo header design 2024-12-04 16:48:39 +00:00
Trisha Lim
741b9cbada Move components out of page.tsx 2024-12-04 16:48:39 +00:00
Trisha Lim
259ade3099 Consistent layout and styling in demo apps 2024-12-04 16:48:39 +00:00
Trisha Lim
b6f2da2221 Move demos to separate section 2024-12-04 16:48:39 +00:00
Trisha Lim
44157945a0 Show code samples 2024-12-04 16:48:39 +00:00
Trisha Lim
4ff7bb500a Show iframe for examples 2024-12-04 16:48:39 +00:00
Anselm Eickhoff
66538fdcf5 Merge pull request #931 from garden-co/jazz-554-pin-typesws5810
Pin @types/ws to 8.5.10
2024-12-04 16:47:36 +00:00
Benjamin S. Leveritt
543f91277d Remove e2e workspace from package 2024-12-04 16:43:46 +00:00
Benjamin S. Leveritt
42112ec46c Pin @types/ws 2024-12-04 16:36:27 +00:00
Anselm
db5ea54338 Fix jazz-tools use of _raw.ops 2024-12-04 16:26:19 +00:00
Anselm
7c7880a9b2 Optimise large record-like CoMaps for access of latest value 2024-12-04 16:21:01 +00:00
Guido D'Orsi
f4170eb879 fix: fix parent key revelation when the key used isn't the current one 2024-12-04 17:15:54 +01:00
Guido D'Orsi
8278055e33 fix: correctly rotate keys on child groups 2024-12-04 16:31:20 +01:00
Guido D'Orsi
65c236571e test: cover role inheritance in the transactions checks 2024-12-04 15:07:47 +01:00
Guido D'Orsi
b53cc9930e fix(group-extend): resolve member state from parents when checking permissions 2024-12-04 12:40:35 +01:00
Guido D'Orsi
9c5b34d91c test(Sharing): improve the test and cover more logic 2024-12-04 12:40:01 +01:00
Trisha Lim
49082a5aad Merge branch 'main' into latency-map 2024-12-04 10:41:18 +00:00
pax-k
ab7c899a9e Merge branch 'main' into JAZZ-238/very-quick-way-to-open-up-inspector-as-current-user-in-an-app 2024-12-04 12:18:36 +02:00
Guido D'Orsi
a6c119b98d fix: load all the child groups before starting to revoke access 2024-12-03 19:00:33 +01:00
Guido D'Orsi
6e3565d20f Merge remote-tracking branch 'origin/main' into aeplay-jazz-12 2024-12-03 16:57:28 +01:00
Guido D'Orsi
e5e21718f9 Merge pull request #918 from garden-co/create-obs-value-test
chore: merge subscribe and createCoValueObservable suites
2024-12-03 16:57:10 +01:00
Trisha Lim
b6653555f5 Fix build 2024-12-03 15:45:24 +00:00
Guido D'Orsi
1b49bd8be4 chore: merge subscribe and createCoValueObservable suites 2024-12-03 16:45:04 +01:00
Trisha Lim
c9fd16ce21 Desktop view 2024-12-03 14:46:14 +00:00
Guido D'Orsi
70a93ab093 fix(group-extend): a user should be an admin in both groups to extend 2024-12-03 15:38:58 +01:00
Trisha Lim
e60f34d9e6 Mobile view 2024-12-03 14:28:24 +00:00
Guido D'Orsi
dacaa02a01 chore(types): create the ParentGroupReference and ChildGroupReference type 2024-12-03 14:54:04 +01:00
Guido D'Orsi
55cc248d91 Merge remote-tracking branch 'origin/main' into aeplay-jazz-12 2024-12-03 14:45:48 +01:00
Guido D'Orsi
534fce6796 test(e2e): cover Group extension with a e2e test 2024-12-03 14:42:40 +01:00
Anselm Eickhoff
a223a3a5ab Merge pull request #915 from garden-co/fix/sync-covalue-addpeer
fix(sync): send new content when a storage/server peer is re-added
2024-12-03 13:37:53 +00:00
Trisha Lim
a04c7dca7a Install next-themes 2024-12-03 12:37:00 +00:00
Trisha Lim
e067c29d81 Map positioning 2024-12-03 12:36:14 +00:00
pax-k
81c470e9fa fix: comment out createCoValueObservable.test.ts until cirular imports are fixed 2024-12-03 14:31:50 +02:00
pax-k
52d5a14fdf fix: comment out createCoValueObservable.test.ts until cirular imports are fixed 2024-12-03 14:24:49 +02:00
Trisha Lim
1357306d1b Switch latency map colors according to theme 2024-12-03 12:10:22 +00:00
pax-k
fca6be8da0 Merge branch 'main' into JAZZ-238/very-quick-way-to-open-up-inspector-as-current-user-in-an-app 2024-12-03 14:07:17 +02:00
pax
b0df041a24 Merge pull request #890 from garden-co/JAZZ-537/hide-stale-state-in-usecostate-when-the-top-level-id-parameter-changes
fix: reset observable value when unsubscribed
2024-12-03 14:06:07 +02:00
Trisha Lim
3c6d9b20c1 Move theme controls to gcmp/jazz, and out of design system 2024-12-03 12:03:22 +00:00
Guido D'Orsi
357698f4fb chore: refactor parent/child keys extraction 2024-12-03 12:58:33 +01:00
pax-k
a6e5a72b97 chore: re-arranged imports 2024-12-03 13:58:33 +02:00
pax-k
e386f2ba8d chore: changeset 2024-12-03 13:56:41 +02:00
pax-k
c2d292effc chore: moved export-account-inspector.ts to jazz-browser 2024-12-03 13:52:09 +02:00
pax-k
b4dd2add45 chore: changeset 2024-12-03 13:34:14 +02:00
pax-k
f3824dfb76 chore: cleanup 2024-12-03 13:32:00 +02:00
pax-k
ac7b388ca5 Merge branch 'main' into JAZZ-537/hide-stale-state-in-usecostate-when-the-top-level-id-parameter-changes 2024-12-03 13:21:22 +02:00
pax-k
ad3641861b fix: implement createCoValueObservable tests 2024-12-03 13:20:28 +02:00
pax-k
3d601deaa0 fix: refactor createCoValueObservable to return undefined if there are no subscribers 2024-12-03 13:20:15 +02:00
pax-k
7824e6b36a fix: rollback useCoState changes related to stale data 2024-12-03 13:19:43 +02:00
Trisha Lim
f597316267 Remove console logs 2024-12-03 11:18:50 +00:00
Guido D'Orsi
9b80278b71 Merge remote-tracking branch 'origin/main' into aeplay-jazz-12 2024-12-03 11:32:18 +01:00
Guido D'Orsi
46f2ab801d chore: changeset 2024-12-03 11:16:53 +01:00
Guido D'Orsi
a6b6ccf814 chore: changeset 2024-12-03 11:12:52 +01:00
Guido D'Orsi
8928e9e10d Merge pull request #873 from garden-co/fuzzyobject-jazz-529
Refactor IDB to have a better control over the flow and reduce amount of messages
2024-12-03 11:06:59 +01:00
Marina Orlova
0e1c38f2d1 Fix empty content message not being sent 2024-12-02 23:47:06 +01:00
Marina Orlova
08ad01d6b5 Changes requested 2024-12-02 23:47:06 +01:00
Marina Orlova
e9eec78ce5 Incoming content msg tests 2024-12-02 23:47:06 +01:00
Marina Orlova
5bab5091c3 Tweaks to idbClient 2024-12-02 23:47:06 +01:00
Marina Orlova
1663b4aa59 Move make response to idbClient 2024-12-02 23:47:06 +01:00
Marina Orlova
7f6637e235 Add test for dependencies recursion 2024-12-02 23:47:06 +01:00
Marina Orlova
f320e6821a IDB handleLoad tests added 2024-12-02 23:47:06 +01:00
Marina Orlova
b491a3c638 tweaks 2024-12-02 23:47:06 +01:00
Marina Orlova
35d03f2f2c IDB refactor sending content and dependencies 2024-12-02 23:47:06 +01:00
Marina Orlova
43c19307cd Take out sending logic to sendStateMessage method 2024-12-02 23:47:06 +01:00
Marina Orlova
1e642d4454 take out send message to local node logic 2024-12-02 23:47:06 +01:00
Marina Orlova
2c931dd57e Refactor indexeddb - remove promise hell - rest 2024-12-02 23:47:06 +01:00
Marina Orlova
8eec42814a Refactor indexeddb - remove promise hell 2024-12-02 23:47:06 +01:00
Anselm Eickhoff
0e0590d25b Merge pull request #912 from garden-co/benjamin-jazz-545 2024-12-02 21:09:42 +00:00
Trisha Lim
17f8bc25c3 Update colors for dark mode 2024-12-02 20:21:29 +00:00
Trisha Lim
c1d652cf7f Update colors for light mode 2024-12-02 20:05:38 +00:00
Guido D'Orsi
58a3ad2951 test: cover the offline editing with some tests 2024-12-02 18:58:50 +01:00
Trisha Lim
10f3e4aabd Update colors for light mode 2024-12-02 17:24:42 +00:00
Guido D'Orsi
9f834eba97 test(retry): increase the timeout to trigger more retries 2024-12-02 18:07:22 +01:00
Guido D'Orsi
4a02dbed28 fix(sync): send new content when a storage/server peer is re-added 2024-12-02 18:04:52 +01:00
Anselm Eickhoff
ad920158d6 Merge pull request #900 from garden-co/content-deadlock-fix
Content deadlock fix with client <-> edge <-> core setup
2024-12-02 16:34:27 +00:00
Anselm
63f5574003 Improve map 2024-12-02 16:26:38 +00:00
Benjamin S. Leveritt
26b54bf81b Add format-and-lint script 2024-12-02 16:22:00 +00:00
Benjamin S. Leveritt
151c9c923d Move jazz integration to lib 2024-12-02 16:18:19 +00:00
Benjamin S. Leveritt
7f9c125074 Updates passkey to new Provider src 2024-12-02 15:55:38 +00:00
Benjamin S. Leveritt
0e59e65430 Add changeset 2024-12-02 15:55:38 +00:00
Benjamin S. Leveritt
24fc4dd75d Rename Provider component 2024-12-02 15:55:38 +00:00
Benjamin S. Leveritt
943283db76 Return Provider from createJazzApp
Unexports `'<JazzProvider />'
2024-12-02 15:55:38 +00:00
Anselm Eickhoff
19ffeb8505 Merge pull request #906 from garden-co/docs/reactions-exampl
Add reactions example app
2024-12-02 13:15:45 +00:00
Trisha Lim
efe9855a9e Simplify code 2024-12-02 12:57:35 +00:00
Trisha Lim
f93d6ae64e Fix button color 2024-12-02 12:24:17 +00:00
Trisha Lim
4b194b218a Add reactions example to examples page 2024-12-02 12:24:17 +00:00
Trisha Lim
b62a37229c Fix build 2024-12-02 12:24:16 +00:00
Trisha Lim
d9c9231304 Remove tailwind from reactions example 2024-12-02 12:24:16 +00:00
Trisha Lim
74631f25a9 Add reactions example app 2024-12-02 12:24:14 +00:00
Trisha Lim
b39a9f4921 Simplify installation instructions for example apps 2024-12-02 12:23:29 +00:00
Guido D'Orsi
0aeabf2480 Merge pull request #908 from garden-co/refactor-e2e-test-dir
chore: merge the e2e test projects into one
2024-12-02 11:05:10 +01:00
Guido D'Orsi
57d6e7c590 chore: merge the e2e test projects into one 2024-12-02 10:30:20 +01:00
Anselm
9bb5c4ca5f Add a latency map to cloud page 2024-12-01 16:03:38 +00:00
Anselm Eickhoff
80afb04f26 Merge pull request #905 from garden-co/docs/add-svelte-to-dropdown
Add Svelte to docs framework selector
2024-11-29 12:04:10 +00:00
Anselm Eickhoff
692b3e207a Merge pull request #878 from garden-co/fix/button-errors
Fix console errors on Button component
2024-11-29 11:41:29 +00:00
Anselm
3f15a23219 Add changset 2024-11-28 19:08:58 +00:00
Anselm
1b60fc7095 Add comment 2024-11-28 18:51:31 +00:00
Anselm
9db577def9 Fix deadlock on incoming content with upstream servers present 2024-11-28 18:48:36 +00:00
pax-k
641483f40b chore: cleanup 2024-11-27 17:15:45 +02:00
pax-k
9212ab89ec chore: changeset 2024-11-27 17:02:21 +02:00
pax-k
915fa5ea4e fix: useCoState() now returns undefined, if id changes, instead of stale data 2024-11-27 16:59:47 +02:00
Trisha Lim
50e122d299 Fix console errors on Button component 2024-11-26 10:57:59 +00:00
pax-k
a107e17c44 fix: cmd+j now registered only if allowJazzInspector is found in window.location.href 2024-11-25 17:28:46 +02:00
pax
d2d2801537 Update packages/jazz-tools/src/utils/export-account-inspector.ts
Co-authored-by: Anselm Eickhoff <anselm.eickhoff@gmail.com>
2024-11-25 17:04:45 +02:00
pax-k
d5af8df158 feat: pressing cmd+j in a jazz app exports the jazz account to inspector 2024-11-21 17:30:50 +02:00
Guido D'Orsi
6b4cb357ce Merge pull request #751 from gardencmp/music-player-with-group-inheritance
feat(music-player): use group inheritance for the Playlist sharing
2024-11-15 11:43:43 +01:00
Guido D'Orsi
d6638742b0 feat(music-player): use group inheritance for the Playlist sharing 2024-11-13 18:13:37 +01:00
Anselm
ddb158d5fa Pre-release 2024-11-13 13:53:00 +00:00
Anselm
8b87117e0f Changeset (pre-release) 2024-11-13 13:45:44 +00:00
Anselm
e5000c2b6b Ensure storage implementations send parent group content first 2024-11-13 13:43:29 +00:00
Anselm
0347e52118 Remove unused imports 2024-11-13 11:48:36 +00:00
Anselm
bb9ba33e73 Formatting 2024-11-13 11:47:43 +00:00
Anselm
92c63d94b9 Treat extended groups (parents) as depended on CoValues for syncing 2024-11-13 11:46:24 +00:00
Anselm
75339c0939 Merge branch 'main' into aeplay-jazz-12 2024-11-12 15:27:29 +00:00
Anselm
22102deabc Merge branch 'main' into aeplay-jazz-12 2024-11-08 17:21:06 +00:00
Anselm
043e2acae4 Format 2024-11-06 16:03:58 +00:00
Anselm
1b7ef1c2c0 Merge branch 'main' into aeplay-jazz-12 2024-11-06 16:03:48 +00:00
Anselm
996092c26f Failing high-level test 2024-11-04 17:37:46 +00:00
Anselm
3c794bba0a Test for extending more than one level deep 2024-11-04 17:35:52 +00:00
Anselm
2d3d53d144 Test key rotation more than one level deep 2024-11-04 17:31:56 +00:00
Anselm
69d05c8c15 More high-level tests 2024-11-04 17:00:26 +00:00
Anselm
d11aeee083 Test revocation in high-level test 2024-11-04 15:54:56 +00:00
Anselm
4d5848161d Failing high-level test 2024-11-01 16:53:08 +00:00
Anselm
8ee456d4e4 Implement and test extend() 2024-11-01 16:44:50 +00:00
Anselm
7b2c2e6084 Rotate child keys on parent group key rotation 2024-11-01 16:38:26 +00:00
Anselm
133f75d34e Reveal new child read keys to parent read key 2024-11-01 16:08:57 +00:00
Anselm
68c9114896 Merge branch 'main' into aeplay-jazz-12 2024-11-01 15:42:27 +00:00
Anselm
57ff9e2d1f Implement and test lookup/revelation of parent read keys 2024-10-18 14:18:33 +01:00
Anselm
1cac820ec6 Add test for grand-parent inheritance 2024-10-18 13:16:43 +01:00
Anselm
eb4646beca Role inheritance (one level) 2024-10-18 12:05:43 +01:00
Anselm
5447d6f10b Start accepting parent and child extension transactions 2024-10-18 11:49:39 +01:00
Anselm
dbb040eb07 Prepare role getter that will traverse parent groups 2024-10-18 11:18:22 +01:00
Anselm
9960320645 Small refactors for valid transactions 2024-10-18 11:10:34 +01:00
790 changed files with 64606 additions and 16223 deletions

View File

@@ -6,18 +6,23 @@
"linked": [
[
"cojson",
"jazz-tools",
"jazz-browser",
"jazz-browser-media-images",
"jazz-browser-auth-clerk",
"jazz-react-auth-clerk",
"jazz-react",
"jazz-react-native",
"jazz-nodejs",
"jazz-run",
"cojson-transport-ws",
"cojson-storage",
"cojson-storage-indexeddb",
"cojson-storage-sqlite"
"cojson-storage-sqlite",
"cojson-transport-ws",
"jazz-browser",
"jazz-browser-auth-clerk",
"jazz-browser-media-images",
"jazz-nodejs",
"jazz-react",
"jazz-react-auth-clerk",
"jazz-react-native",
"jazz-react-native-auth-clerk",
"jazz-react-native-media-images",
"jazz-run",
"jazz-svelte",
"jazz-tools",
"jazz-vue"
]
],
"access": "public",

View File

@@ -0,0 +1,5 @@
---
"create-jazz-app": patch
---
Fix fetching latest semver jazz-\* package versions from NPM when using create-jazz-app, instead of using "latest"

View File

@@ -0,0 +1,5 @@
---
"jazz-react-core": patch
---
Explicitly use useContext() instead of React.useContext()

View File

@@ -0,0 +1,5 @@
---
"jazz-tools": patch
---
Make possible to call the load/subscribe/create API without passing me

View File

@@ -17,6 +17,7 @@ jobs:
"music-player",
"password-manager",
"pets",
"reactions",
"todo",
"onboarding",
]

52
.github/workflows/build-starters.yaml vendored Normal file
View File

@@ -0,0 +1,52 @@
name: Build Starters
on:
push:
branches: [ "main" ]
jobs:
build-starters:
runs-on: ubuntu-latest
strategy:
matrix:
starter: [
"react-demo-auth-tailwind",
]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Enable corepack
run: corepack enable
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'pnpm'
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Pnpm Build
run: |
pnpm install
pnpm turbo build;
working-directory: ./starters/${{ matrix.starter }}

View File

@@ -13,7 +13,7 @@ jobs:
continue-on-error: true
strategy:
matrix:
project: ["e2e/BinaryCoStream", "e2e/CoValues", "examples/chat", "examples/music-player", "examples/pets", "examples/onboarding"]
project: ["tests/e2e", "examples/chat", "examples/file-share-svelte", "examples/form", "examples/music-player", "examples/pets", "examples/onboarding", "starters/react-demo-auth-tailwind"]
steps:
- uses: actions/checkout@v3
@@ -41,20 +41,16 @@ jobs:
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Pnpm Build
run: pnpm turbo build
working-directory: ./${{ matrix.project }}
- name: Build jazz-run
run: pnpm exec turbo build && chmod +x dist/index.js;
working-directory: ./packages/jazz-run
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
run: pnpm exec playwright install
working-directory: ./${{ matrix.project }}
- name: Run Playwright tests

View File

@@ -4,6 +4,13 @@ on:
push:
branches:
- main
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: "Run tmate session for debugging"
required: false
default: false
concurrency: ${{ github.workflow }}-${{ github.ref }}
@@ -48,4 +55,11 @@ jobs:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# Enable tmate debugging only if the workflow is manually triggered, debug_enabled is true, and the workflow failed
- name: Setup tmate session for debugging
if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
uses: mxschmitt/action-tmate@v3
with:
timeout-minutes: 15

View File

@@ -41,7 +41,7 @@ jobs:
run: pnpm install --frozen-lockfile
- name: Pnpm Build
run: pnpm turbo build
run: pnpm turbo build --filter="./packages/*"
- name: Unit Tests
run: pnpm test:ci

1
.gitignore vendored
View File

@@ -5,6 +5,7 @@ docsTmp
.DS_Store
.turbo
coverage
.direnv
# Next.js
**/.next

View File

@@ -1 +1 @@
20
22

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
22

View File

@@ -59,7 +59,7 @@ representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to [the community leaders responsible for enforcement](mailto:hello@gcmp.io).
reported to [the community leaders responsible for enforcement](mailto:hello@garden.co).
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the

View File

@@ -6,7 +6,7 @@ Thank you for considering contributing to Jazz! Jazz is an open-source framework
### 1. Reporting Bugs
If you find a bug, please [open an issue with as much detail as possible](https://github.com/gardencmp/jazz/issues). Include:
If you find a bug, please [open an issue with as much detail as possible](https://github.com/garden-co/jazz/issues). Include:
- A clear and descriptive title.
- Steps to reproduce the issue.
@@ -40,7 +40,7 @@ You'll need Node.js 20.x or 22.x installed (we're working on support for 23.x),
1. **Clone the repository**:
```bash
git clone https://github.com/gardencmp/jazz.git
git clone https://github.com/garden-co/jazz.git
```
2. **Install dependencies**:

View File

@@ -15,6 +15,6 @@ For community and support, please join our [Discord](https://discord.gg/utDMjHYg
- Homepage: [jazz.tools](https://jazz.tools)
- Docs: [jazz.tools/docs](https://jazz.tools/docs)
- Community & support: [Discord](https://discord.gg/utDMjHYg42)
- Updates: [X](https://x.com/jazz_tools) & [Email](https://gcmp.io/news)
- Updates: [X](https://x.com/jazz_tools) & [Email](https://garden.co/news)
Copyright 2024 &mdash; Garden Computing, Inc.

View File

@@ -25,7 +25,53 @@
"linter": {
"enabled": false,
"rules": {
"recommended": true
"recommended": true,
"correctness": {
"useImportExtensions": {
"level": "error",
"options": {
"suggestedExtensions": {
"ts": {
"module": "js",
"component": "jsx"
}
}
}
}
}
}
}
},
"overrides": [
{
"include": ["packages/**/src/**"],
"linter": {
"enabled": true,
"rules": {
"recommended": false
}
}
},
{
"include": ["packages/**/src/tests/**", "packages/**/src/test/**"],
"linter": {
"rules": {
"correctness": {
"useImportExtensions": "off"
}
}
}
},
{
"include": ["packages/cojson-storage-indexeddb/**"],
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noExplicitAny": "info"
}
}
}
}
]
}

View File

@@ -1,260 +0,0 @@
# @jazz-e2e/binarycostream
## 0.0.111
### Patch Changes
- Updated dependencies [e4f110f]
- cojson@0.8.34
- jazz-react@0.8.34
- jazz-tools@0.8.34
## 0.0.110
### Patch Changes
- jazz-react@0.8.33
## 0.0.109
### Patch Changes
- Updated dependencies [df42b2b]
- Updated dependencies [df42b2b]
- cojson@0.8.32
- jazz-tools@0.8.32
- jazz-react@0.8.32
## 0.0.108
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
- jazz-react@0.8.31
- jazz-tools@0.8.31
## 0.0.107
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
- jazz-react@0.8.30
- jazz-tools@0.8.30
## 0.0.106
### Patch Changes
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson@0.8.29
- jazz-react@0.8.29
- jazz-tools@0.8.29
## 0.0.105
### Patch Changes
- Updated dependencies [605734c]
- cojson@0.8.28
- jazz-react@0.8.28
- jazz-tools@0.8.28
## 0.0.104
### Patch Changes
- Updated dependencies [75fdff4]
- cojson@0.8.27
- jazz-react@0.8.27
- jazz-tools@0.8.27
## 0.0.103
### Patch Changes
- Updated dependencies [59d37df]
- jazz-react@0.8.26
## 0.0.102
### Patch Changes
- jazz-react@0.8.24
## 0.0.101
### Patch Changes
- Updated dependencies [6f745be]
- Updated dependencies [d348c2d]
- Updated dependencies [124bf67]
- Updated dependencies [6902b5b]
- Updated dependencies [1a0cd3d]
- cojson@0.8.23
- jazz-tools@0.8.23
- jazz-react@0.8.23
## 0.0.100
### Patch Changes
- Updated dependencies [59cc64d]
- jazz-react@0.8.22
## 0.0.99
### Patch Changes
- Updated dependencies [0f30eea]
- Updated dependencies [149ca97]
- cojson@0.8.21
- jazz-tools@0.8.21
- jazz-react@0.8.21
## 0.0.98
### Patch Changes
- Updated dependencies [dd9b13f]
- Updated dependencies [a69ed0b]
- Updated dependencies [3ef3ff3]
- Updated dependencies [c6931b8]
- jazz-react@0.8.20
## 0.0.97
### Patch Changes
- Updated dependencies [9c2aadb]
- cojson@0.8.19
- jazz-react@0.8.19
- jazz-tools@0.8.19
## 0.0.96
### Patch Changes
- Updated dependencies [d4319d8]
- cojson@0.8.18
- jazz-react@0.8.18
- jazz-tools@0.8.18
## 0.0.95
### Patch Changes
- Updated dependencies [d433cf4]
- cojson@0.8.17
- jazz-react@0.8.17
- jazz-tools@0.8.17
## 0.0.94
### Patch Changes
- Updated dependencies [2af107c]
- Updated dependencies [b934fab]
- jazz-react@0.8.16
- cojson@0.8.16
- jazz-tools@0.8.16
## 0.0.93
### Patch Changes
- Updated dependencies [cce679b]
- jazz-tools@0.8.15
- jazz-react@0.8.15
## 0.0.92
### Patch Changes
- Updated dependencies [36273b3]
- jazz-tools@0.8.14
- jazz-react@0.8.14
## 0.0.91
### Patch Changes
- Updated dependencies [fd011d7]
- jazz-tools@0.8.13
- jazz-react@0.8.13
## 0.0.90
### Patch Changes
- Updated dependencies [6ed75eb]
- Updated dependencies [3cc6aee]
- cojson@0.8.12
- jazz-react@0.8.12
- jazz-tools@0.8.12
## 0.0.89
### Patch Changes
- Updated dependencies [1ed4ab5]
- cojson@0.8.11
- jazz-react@0.8.11
- jazz-tools@0.8.11
## 0.0.88
### Patch Changes
- jazz-react@0.8.7
## 0.0.87
### Patch Changes
- jazz-react@0.8.6
## 0.0.86
### Patch Changes
- Updated dependencies [c3f4e6b]
- Updated dependencies [d9152ed]
- jazz-tools@0.8.5
- cojson@0.8.5
- jazz-react@0.8.5
## 0.0.85
### Patch Changes
- Updated dependencies
- hash-slash@0.2.1
## 0.0.84
### Patch Changes
- Updated dependencies
- cojson@0.8.3
- jazz-react@0.8.3
- jazz-tools@0.8.3
## 0.0.83
### Patch Changes
- Updated dependencies [a075f90]
- jazz-tools@0.8.2
- jazz-react@0.8.2
## 0.0.82
### Patch Changes
- Updated dependencies
- jazz-tools@0.8.1
- jazz-react@0.8.1

View File

@@ -1,33 +0,0 @@
{
"name": "@jazz-e2e/filestream",
"private": true,
"version": "0.0.111",
"type": "module",
"scripts": {
"dev": "vite",
"format-and-lint": "biome check .",
"format-and-lint:fix": "biome check . --write",
"build": "tsc && vite build",
"preview": "vite preview",
"test": "playwright test",
"test:ui": "playwright test --ui"
},
"dependencies": {
"cojson": "workspace:0.8.34",
"hash-slash": "workspace:0.2.1",
"is-ci": "^3.0.1",
"jazz-react": "workspace:0.8.34",
"jazz-tools": "workspace:0.8.34",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@playwright/test": "^1.46.1",
"@types/node": "^22.5.1",
"@types/react": "^18.2.19",
"@types/react-dom": "^18.2.7",
"@vitejs/plugin-react-swc": "^3.3.2",
"typescript": "^5.3.3",
"vite": "^5.0.10"
}
}

View File

@@ -1,43 +0,0 @@
import { Account, FileStream, ID } from "jazz-tools";
import { useEffect } from "react";
import { useAccount, useCoState } from "./jazz";
import { UploadedFile } from "./schema";
async function getUploadedFile(me: Account, uploadedFileId: ID<UploadedFile>) {
const uploadedFile = await UploadedFile.load(uploadedFileId, me, {});
if (!uploadedFile) {
throw new Error("Uploaded file not found");
}
uploadedFile.coMapDownloaded = true;
await FileStream.loadAsBlob(uploadedFile._refs.file.id, me);
return uploadedFile;
}
export function DownloaderPeer(props: { testCoMapId: ID<UploadedFile> }) {
const account = useAccount();
const testCoMap = useCoState(UploadedFile, props.testCoMapId, {});
useEffect(() => {
getUploadedFile(account.me, props.testCoMapId).then((value) => {
value.syncCompleted = true;
});
}, []);
return (
<>
<h1>Downloader Peer</h1>
<div>Fetching: {props.testCoMapId}</div>
<div data-testid="result">
Covalue: {Boolean(testCoMap?.id) ? "Downloaded" : "Not Downloaded"}
</div>
<div data-testid="result">
File:{" "}
{Boolean(testCoMap?.syncCompleted) ? "Downloaded" : "Not Downloaded"}
</div>
</>
);
}

View File

@@ -1,24 +0,0 @@
import React from "react";
import ReactDOM from "react-dom/client";
import { DownloaderPeer } from "./DownloaderPeer";
import { UploaderPeer } from "./UploaderPeer";
import { AuthAndJazz } from "./jazz";
import { getValueId } from "./lib/searchParams";
function Main() {
const valueId = getValueId();
if (valueId) {
return <DownloaderPeer testCoMapId={valueId} />;
}
return <UploaderPeer />;
}
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<AuthAndJazz>
<Main />
</AuthAndJazz>
</React.StrictMode>,
);

View File

@@ -1,39 +0,0 @@
import { createJazzReactApp, useDemoAuth } from "jazz-react";
import { useEffect, useRef } from "react";
import { getValueId } from "./lib/searchParams";
const key = getValueId()
? `downloader-e2e@jazz.tools`
: `uploader-e2e@jazz.tools`;
const localSync = new URLSearchParams(location.search).has("localSync");
const Jazz = createJazzReactApp();
export const { useAccount, useCoState } = Jazz;
export function AuthAndJazz({ children }: { children: React.ReactNode }) {
const [auth, state] = useDemoAuth();
const signedUp = useRef(false);
useEffect(() => {
if (state.state === "ready" && !signedUp.current) {
state.signUp("Mister X");
signedUp.current = true;
}
}, [state.state]);
return (
<Jazz.Provider
auth={auth}
peer={
localSync
? `ws://localhost:4200?key=${key}`
: `wss://cloud.jazz.tools/?key=${key}`
}
>
{children}
</Jazz.Provider>
);
}

View File

@@ -1,34 +0,0 @@
import React from "react";
import ReactDOM from "react-dom/client";
import { RouterProvider, createBrowserRouter } from "react-router-dom";
import { AuthAndJazz } from "./jazz";
import { ResumeSyncState } from "./pages/ResumeSyncState";
import { RetryUnavailable } from "./pages/RetryUnavailable";
import { TestInput } from "./pages/TestInput";
const router = createBrowserRouter([
{
path: "/test-input",
element: <TestInput />,
},
{
path: "/resume-sync",
element: <ResumeSyncState />,
},
{
path: "/retry-unavailable",
element: <RetryUnavailable />,
},
{
path: "/",
element: <TestInput />,
},
]);
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<AuthAndJazz>
<RouterProvider router={router} />
</AuthAndJazz>
</React.StrictMode>,
);

View File

@@ -1,43 +0,0 @@
import { createJazzReactApp, useDemoAuth } from "jazz-react";
import { useEffect, useRef } from "react";
const key = `test-comap@jazz.tools`;
const url = new URL(window.location.href);
const peer =
(url.searchParams.get("peer") as `ws://${string}`) ??
`wss://cloud.jazz.tools/`;
const Jazz = createJazzReactApp();
export const { useAccount, useCoState } = Jazz;
function getUserInfo() {
return url.searchParams.get("userName") ?? "Mister X";
}
export function AuthAndJazz({ children }: { children: React.ReactNode }) {
const [auth, state] = useDemoAuth();
const signedUp = useRef(false);
useEffect(() => {
if (state.state === "ready" && !signedUp.current) {
const userName = getUserInfo();
if (state.existingUsers.includes(userName)) {
state.logInAs(userName);
} else {
state.signUp(userName);
}
signedUp.current = true;
}
}, [state.state]);
return (
<Jazz.Provider auth={auth} peer={`${peer}?key=${key}`}>
{children}
</Jazz.Provider>
);
}

View File

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

View File

@@ -1,36 +0,0 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# local env files
.env*.local
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts

View File

@@ -1,219 +0,0 @@
# jazz-example-book-shelf
## 0.1.26
### Patch Changes
- jazz-react@0.8.34
- jazz-tools@0.8.34
- jazz-browser-media-images@0.8.34
## 0.1.25
### Patch Changes
- jazz-browser-media-images@0.8.33
- jazz-react@0.8.33
## 0.1.24
### Patch Changes
- Updated dependencies [df42b2b]
- jazz-tools@0.8.32
- jazz-react@0.8.32
- jazz-browser-media-images@0.8.32
## 0.1.23
### Patch Changes
- jazz-react@0.8.31
- jazz-tools@0.8.31
- jazz-browser-media-images@0.8.31
## 0.1.22
### Patch Changes
- jazz-react@0.8.30
- jazz-tools@0.8.30
- jazz-browser-media-images@0.8.30
## 0.1.21
### Patch Changes
- jazz-react@0.8.29
- jazz-tools@0.8.29
- jazz-browser-media-images@0.8.29
## 0.1.20
### Patch Changes
- jazz-react@0.8.28
- jazz-tools@0.8.28
- jazz-browser-media-images@0.8.28
## 0.1.19
### Patch Changes
- jazz-react@0.8.27
- jazz-tools@0.8.27
- jazz-browser-media-images@0.8.27
## 0.1.18
### Patch Changes
- Updated dependencies [59d37df]
- jazz-react@0.8.26
## 0.1.17
### Patch Changes
- jazz-browser-media-images@0.8.24
- jazz-react@0.8.24
## 0.1.16
### Patch Changes
- Updated dependencies [d348c2d]
- Updated dependencies [6902b5b]
- Updated dependencies [1a0cd3d]
- jazz-tools@0.8.23
- jazz-react@0.8.23
- jazz-browser-media-images@0.8.23
## 0.1.15
### Patch Changes
- Updated dependencies [59cc64d]
- jazz-react@0.8.22
- jazz-browser-media-images@0.8.22
## 0.1.14
### Patch Changes
- Updated dependencies [149ca97]
- jazz-tools@0.8.21
- jazz-react@0.8.21
- jazz-browser-media-images@0.8.21
## 0.1.13
### Patch Changes
- Updated dependencies [dd9b13f]
- Updated dependencies [a69ed0b]
- Updated dependencies [3ef3ff3]
- Updated dependencies [c6931b8]
- jazz-react@0.8.20
- jazz-browser-media-images@0.8.20
## 0.1.12
### Patch Changes
- jazz-react@0.8.19
- jazz-tools@0.8.19
- jazz-browser-media-images@0.8.19
## 0.1.11
### Patch Changes
- jazz-react@0.8.18
- jazz-tools@0.8.18
- jazz-browser-media-images@0.8.18
## 0.1.10
### Patch Changes
- jazz-react@0.8.17
- jazz-tools@0.8.17
- jazz-browser-media-images@0.8.17
## 0.1.9
### Patch Changes
- Updated dependencies [2af107c]
- jazz-react@0.8.16
- jazz-browser-media-images@0.8.16
- jazz-tools@0.8.16
## 0.1.8
### Patch Changes
- Updated dependencies [cce679b]
- jazz-tools@0.8.15
- jazz-browser-media-images@0.8.15
- jazz-react@0.8.15
## 0.1.7
### Patch Changes
- Updated dependencies [36273b3]
- jazz-tools@0.8.14
- jazz-browser-media-images@0.8.14
- jazz-react@0.8.14
## 0.1.6
### Patch Changes
- Updated dependencies [fd011d7]
- jazz-tools@0.8.13
- jazz-browser-media-images@0.8.13
- jazz-react@0.8.13
## 0.1.5
### Patch Changes
- Updated dependencies [3cc6aee]
- jazz-react@0.8.12
- jazz-tools@0.8.12
- jazz-browser-media-images@0.8.12
## 0.1.4
### Patch Changes
- jazz-react@0.8.11
- jazz-tools@0.8.11
- jazz-browser-media-images@0.8.11
## 0.1.3
### Patch Changes
- jazz-browser-media-images@0.8.7
- jazz-react@0.8.7
## 0.1.2
### Patch Changes
- jazz-browser-media-images@0.8.6
- jazz-react@0.8.6
## 0.1.1
### Patch Changes
- Updated dependencies [c3f4e6b]
- Updated dependencies [d9152ed]
- jazz-tools@0.8.5
- jazz-browser-media-images@0.8.5
- jazz-react@0.8.5

View File

@@ -1,4 +0,0 @@
FROM caddy:2.7.3-alpine
LABEL org.opencontainers.image.source="https://github.com/gardencmp/jazz"
COPY ./dist /usr/share/caddy/

View File

@@ -1,56 +0,0 @@
job "example-bookShelf$BRANCH_SUFFIX" {
region = "global"
datacenters = ["*"]
group "static" {
count = 4
network {
port "http" {
to = 80
}
}
constraint {
attribute = "${node.class}"
operator = "="
value = "cloud"
}
spread {
attribute = "${node.datacenter}"
weight = 100
}
constraint {
distinct_hosts = true
}
task "server" {
driver = "docker"
config {
image = "$DOCKER_TAG"
ports = ["http"]
auth = {
username = "$DOCKER_USER"
password = "$DOCKER_PASSWORD"
}
}
service {
tags = ["public"]
name = "example-bookShelf$BRANCH_SUFFIX"
port = "http"
provider = "consul"
}
resources {
cpu = 50 # MHz
memory = 50 # MB
}
}
}
}
# deploy bump 4

View File

@@ -1,5 +0,0 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.

View File

@@ -1,4 +0,0 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
export default nextConfig;

View File

@@ -1,29 +0,0 @@
{
"name": "jazz-example-book-shelf",
"version": "0.1.26",
"private": true,
"scripts": {
"dev": "next dev",
"format-and-lint": "biome check .",
"format-and-lint:fix": "biome check . --write",
"build": "next build",
"start": "next start"
},
"dependencies": {
"clsx": "^2.0.0",
"jazz-browser-media-images": "workspace:0.8.34",
"jazz-react": "workspace:0.8.34",
"jazz-tools": "workspace:0.8.34",
"next": "14.2.5",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/node": "^22.5.1",
"@types/react": "^18.2.19",
"@types/react-dom": "^18.2.7",
"postcss": "^8.4.27",
"tailwindcss": "3.3.2",
"typescript": "^5.3.3"
}
}

View File

@@ -1,8 +0,0 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
};
export default config;

View File

@@ -1,139 +0,0 @@
"use client";
import { Button } from "@/components/Button";
import { Container } from "@/components/Container";
import { useAccount } from "@/components/JazzAndAuth";
import RatingInput from "@/components/RatingInput";
import { BookReview, ListOfBookReviews } from "@/schema";
import { createImage } from "jazz-browser-media-images";
import { Group, ImageDefinition } from "jazz-tools";
import { useRouter } from "next/navigation";
import { ChangeEvent, useState } from "react";
export default function AddBookReview() {
const { me } = useAccount();
const [title, setTitle] = useState("");
const [author, setAuthor] = useState("");
const [review, setReview] = useState("");
const [rating, setRating] = useState(0);
const [dateRead, setDateRead] = useState(
new Date().toISOString().split("T")[0],
);
const [coverImage, setCoverImage] = useState<ImageDefinition | undefined>();
const router = useRouter();
const onDateChange = (event: ChangeEvent<HTMLInputElement>) => {
const date = new Date(event.currentTarget.value)
.toISOString()
.split("T")[0];
setDateRead(date);
};
const onImageChange = (event: ChangeEvent<HTMLInputElement>) => {
const file = event.currentTarget.files?.[0];
const group = Group.create({ owner: me });
group.addMember("everyone", "reader");
if (file) {
createImage(file, { owner: group }).then((image) => {
setCoverImage(image);
});
}
};
const onSubmit = (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault();
if (!me?.profile) return;
const bookReview = BookReview.create(
{
title,
author,
review,
rating,
dateRead: new Date(dateRead),
cover: coverImage,
},
{
owner: me.profile._owner,
},
);
if (!me.profile.bookReviews) {
me.profile.bookReviews = ListOfBookReviews.create([], {
owner: me.profile._owner,
});
}
me.profile.bookReviews.push(bookReview);
router.push("/");
};
return (
<Container className="grid max-w-lg gap-8 py-8">
<h1 className="text-lg font-semibold text-black">Add book review</h1>
<form action="" className="grid gap-4" onSubmit={onSubmit}>
<label className="grid gap-1 text-sm text-gray-600">
Cover
<input type="file" onChange={onImageChange} />
</label>
<label className="grid gap-1 text-sm text-gray-600">
Title
<input
className="rounded border border-gray-300 px-2 py-1 shadow-sm"
type="text"
value={title}
required
onChange={(e) => setTitle(e.target.value)}
></input>
</label>
<label className="grid gap-1 text-sm text-gray-600">
Author
<input
className="rounded border border-gray-300 px-2 py-1 shadow-sm"
type="text"
value={author}
required
onChange={(e) => setAuthor(e.target.value)}
></input>
</label>
<label className="grid gap-1 text-sm text-gray-600">
Date read
<input
className="rounded border border-gray-300 px-2 py-1 shadow-sm"
type="date"
value={dateRead}
required
onChange={onDateChange}
/>
</label>
<div className="grid gap-1 text-sm text-gray-600">
Rating
<RatingInput
value={rating}
onChange={(rating) => setRating(rating)}
/>
</div>
<label className="grid gap-1 text-sm text-gray-600">
Review
<textarea
className="rounded border border-gray-300 px-2 py-1 shadow-sm"
value={review}
onChange={(e) => setReview(e.target.value)}
></textarea>
</label>
<Button variant="primary" type="submit">
Add
</Button>
</form>
</Container>
);
}

View File

@@ -1,172 +0,0 @@
"use client";
import { BookCover } from "@/components/BookCover";
import { Container } from "@/components/Container";
import { useCoState } from "@/components/JazzAndAuth";
import Rating from "@/components/Rating";
import RatingInput from "@/components/RatingInput";
import { BookReview } from "@/schema";
import clsx from "clsx";
import { Group, ID } from "jazz-tools";
const BookReviewTitle = ({
bookReview,
readOnly,
}: {
bookReview: BookReview;
readOnly: boolean;
}) => {
const className = "font-serif text-2xl font-bold lg:text-4xl";
if (readOnly) {
return <h1 className={className}>{bookReview.title}</h1>;
}
return (
<input
value={bookReview.title}
placeholder="Book title"
className={clsx(
className,
"w-full rounded border border-transparent px-2 py-1 hover:border-gray-300 hover:shadow-sm",
)}
onChange={(e) => (bookReview.title = e.target.value)}
></input>
);
};
const BookReviewAuthor = ({
bookReview,
readOnly,
}: {
bookReview: BookReview;
readOnly: boolean;
}) => {
const className = "text-gray-700";
if (readOnly) {
return <p className={className}>by {bookReview.author}</p>;
}
return (
<input
value={bookReview.author}
placeholder="Author"
className={clsx(
className,
"w-full rounded border border-transparent px-2 py-1 hover:border-gray-300 hover:shadow-sm",
)}
onChange={(e) => (bookReview.author = e.target.value)}
></input>
);
};
const BookReviewDateRead = ({
bookReview,
readOnly,
}: {
bookReview: BookReview;
readOnly: boolean;
}) => {
const className = "text-gray-700 max-w-[10rem]";
if (readOnly) {
return (
bookReview.dateRead && (
<p className={className}>{bookReview.dateRead.toLocaleDateString()}</p>
)
);
}
return (
<input
type="date"
value={bookReview.dateRead?.toISOString().split("T")[0]}
placeholder="Date read"
className={clsx(
className,
"w-full rounded border border-transparent px-2 py-1 hover:border-gray-300 hover:shadow-sm",
)}
onChange={(e) => {
const date = new Date(e.target.value);
bookReview.dateRead = date;
}}
></input>
);
};
const BookReviewReview = ({
bookReview,
readOnly,
}: {
bookReview: BookReview;
readOnly: boolean;
}) => {
const className = "text-sm leading-relaxed text-gray-600";
if (readOnly) {
if (bookReview.review) {
return <p className={className}>{bookReview.review}</p>;
}
}
return (
<textarea
value={bookReview.review}
placeholder="Write your review here..."
className={clsx(
className,
"w-full rounded border border-transparent px-2 py-1 hover:border-gray-300 hover:shadow-sm",
)}
onChange={(e) => (bookReview.review = e.target.value)}
></textarea>
);
};
const BookReviewRating = ({
bookReview,
readOnly,
}: {
bookReview: BookReview;
readOnly: boolean;
}) => {
const className = "text-2xl sm:mx-0";
if (readOnly) {
return <Rating className={className} rating={bookReview.rating} />;
}
return (
<RatingInput
className={clsx(className, "p-2")}
onChange={(rating) => (bookReview.rating = rating)}
value={bookReview.rating}
/>
);
};
export default function Page({ params }: { params: { slug: string } }) {
const bookReview = useCoState(BookReview, params.slug as ID<BookReview>);
if (!bookReview) return <></>;
const readOnly = !(bookReview._owner.castAs(Group).myRole() === "admin");
return (
<Container className="grid gap-12 py-8">
<div className="flex flex-col gap-6 sm:flex-row md:gap-10">
<div className="w-[180px]">
<BookCover bookReview={bookReview} readOnly={readOnly} />
</div>
<div className="-mx-2 grid max-w-lg flex-1 gap-3 sm:mx-0">
<BookReviewTitle bookReview={bookReview} readOnly={readOnly} />
<BookReviewAuthor bookReview={bookReview} readOnly={readOnly} />
<BookReviewDateRead bookReview={bookReview} readOnly={readOnly} />
<BookReviewRating bookReview={bookReview} readOnly={readOnly} />
<BookReviewReview bookReview={bookReview} readOnly={readOnly} />
</div>
</div>
</Container>
);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -1,13 +0,0 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:focus {
@apply outline-none;
}
:focus-visible {
@apply ring-2 ring-purple-600/75 dark:ring-2 dark:ring-white/75;
}
}

View File

@@ -1,39 +0,0 @@
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import { JazzAndAuth } from "@/components/JazzAndAuth";
import { Nav } from "@/components/Nav";
import clsx from "clsx";
import { Fraunces } from "next/font/google";
const fraunces = Fraunces({
subsets: ["latin"],
display: "swap",
variable: "--font-fraunces",
});
const inter = Inter({ subsets: ["latin"] });
export const metadata: Metadata = {
title: "Jazz Book Shelf",
description: "Jazz Book Shelf",
};
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body className={clsx(inter.className, fraunces.variable)}>
<JazzAndAuth>
<header>
<Nav />
</header>
<main>{children}</main>
</JazzAndAuth>
</body>
</html>
);
}

View File

@@ -1,27 +0,0 @@
"use client";
import { Container } from "@/components/Container";
import { useAccount } from "@/components/JazzAndAuth";
import UserProfile from "@/components/UserProfile";
import { JazzAccount } from "@/schema";
import { ID } from "jazz-tools";
export default function Home() {
const { me } = useAccount();
return (
<Container className="grid gap-12 py-8">
<UserProfile id={me?.id as ID<JazzAccount>} />
<label className="flex flex-wrap items-center gap-3">
Share your profile:
<input
type="text"
className="w-full rounded border p-1"
value={`${window.location.origin}/user/${me?.id}`}
readOnly
/>
</label>
</Container>
);
}

View File

@@ -1,14 +0,0 @@
import { Container } from "@/components/Container";
import UserProfile from "@/components/UserProfile";
import { JazzAccount } from "@/schema";
import { ID } from "jazz-tools";
export default function Page({ params }: { params: { slug: string } }) {
const { slug } = params;
return (
<Container className="py-8">
<UserProfile id={slug as ID<JazzAccount>} />
</Container>
);
}

View File

@@ -1,134 +0,0 @@
import { Button } from "@/components/Button";
import { useAccount } from "@/components/JazzAndAuth";
import PlusIcon from "@/components/icons/PlusIcon";
import { BookReview } from "@/schema";
import clsx from "clsx";
import { createImage } from "jazz-browser-media-images";
import { ProgressiveImg } from "jazz-react";
import { Group, ImageDefinition } from "jazz-tools";
import { ChangeEvent, useRef, useState } from "react";
const BookCoverContainer = ({
children,
className = "",
}: {
children: React.ReactNode;
className?: string;
}) => {
return (
<div className={clsx("h-[240px] lg:h-[260px]", className)}>{children}</div>
);
};
const MockCover = ({ bookReview }: { bookReview: BookReview }) => {
return (
<div className="flex h-full flex-col items-center justify-center gap-3 rounded-l-sm rounded-r-md bg-gray-100 px-3 text-center shadow-lg">
<p className="font-medium">{bookReview.title}</p>
<p className="text-xs">{bookReview.author}</p>
</div>
);
};
export function BookCoverReadOnly({
bookReview,
className,
}: {
bookReview: BookReview;
className?: string;
}) {
if (bookReview.cover) {
return (
<BookCoverContainer className={className}>
<ProgressiveImg image={bookReview.cover}>
{({ src }) => (
<img
className="max-h-full max-w-full rounded-l-sm rounded-r-md shadow-lg"
src={src}
/>
)}
</ProgressiveImg>
</BookCoverContainer>
);
}
return (
<BookCoverContainer className={className}>
<MockCover bookReview={bookReview} />
</BookCoverContainer>
);
}
export function BookCoverInput({ bookReview }: { bookReview: BookReview }) {
const { me } = useAccount();
const inputRef = useRef<HTMLInputElement>(null);
const onImageChange = (event: ChangeEvent<HTMLInputElement>) => {
if (!me?.profile) return;
const file = event.currentTarget.files?.[0];
if (file) {
createImage(file, { owner: me.profile._owner }).then((image) => {
bookReview.cover = image;
});
}
};
const onUploadClick = () => {
inputRef.current?.click();
};
const remove = () => {
bookReview.cover = null;
};
if (bookReview.cover) {
return (
<div className="group relative inline-block">
<BookCoverReadOnly
className="transition-opacity group-hover:opacity-40"
bookReview={bookReview}
/>
<div className="absolute left-0 top-0 hidden h-full w-full items-center justify-center rounded-l-sm rounded-r-md group-hover:flex">
<Button
variant="tertiary"
type="button"
className="shadow"
onClick={remove}
>
Remove
</Button>
</div>
</div>
);
}
return (
<BookCoverContainer className="flex w-[180px] flex-col justify-center rounded-l-sm rounded-r-md bg-gray-100 p-3 shadow-lg">
<button
className="flex h-full w-full flex-col items-center justify-center gap-3 text-gray-500 transition-colors hover:text-gray-600"
type="button"
onClick={onUploadClick}
>
<PlusIcon className="h-10 w-10" />
Upload book cover
</button>
<label className="sr-only">
Cover
<input ref={inputRef} type="file" onChange={onImageChange} />
</label>
</BookCoverContainer>
);
}
export function BookCover({
bookReview,
readOnly,
}: {
bookReview: BookReview;
readOnly?: boolean;
}) {
if (readOnly) return <BookCoverReadOnly bookReview={bookReview} />;
return <BookCoverInput bookReview={bookReview} />;
}

View File

@@ -1,30 +0,0 @@
import { BookCover } from "@/components/BookCover";
import Rating from "@/components/Rating";
import RatingInput from "@/components/RatingInput";
import { BookReview } from "@/schema";
import { Group } from "jazz-tools";
export function BookReviewHeader({ bookReview }: { bookReview: BookReview }) {
const { title, author, rating, review, dateRead } = bookReview;
return (
<div className="grid gap-5">
<div>
<h1 className="mb-1 font-serif text-2xl font-bold md:mb-3 lg:text-4xl">
{title}
</h1>
<p className="text-gray-500">by {author}</p>
</div>
{bookReview._owner.castAs(Group).myRole() === "admin" ? (
<RatingInput
onChange={(rating) => (bookReview.rating = rating)}
value={rating}
/>
) : (
<Rating className="mx-auto text-2xl sm:mx-0" rating={rating} />
)}
</div>
);
}

View File

@@ -1,35 +0,0 @@
"use client";
import { BookCover, BookCoverReadOnly } from "@/components/BookCover";
import { useCoState } from "@/components/JazzAndAuth";
import StarIcon from "@/components/icons/StarIcon";
import { ID } from "jazz-tools";
import Link from "next/link";
import { BookReview } from "../schema";
export function BookReviewThumbnail({ id }: { id: ID<BookReview> }) {
const bookReview = useCoState(BookReview, id);
if (!bookReview) return <></>;
return (
<div className="inline-flex shrink-0 gap-4 rounded border p-4 sm:block sm:space-y-6 sm:border-0 sm:p-0 md:w-[200px]">
<Link href={`/book/${bookReview.id}`} className="sm:block sm:flex-1">
<BookCoverReadOnly bookReview={bookReview} />
</Link>
<div className="flex-1">
<Link href={`/book/${bookReview.id}`}>
<h2 className="mb-1 text-sm font-medium">{bookReview.title}</h2>
</Link>
<div className="mb-2 flex flex-col gap-2 text-sm text-gray-500 sm:flex-row sm:items-center">
<p>{bookReview.author}</p>
<div className="flex items-center gap-0.5 text-xs font-semibold leading-none">
<StarIcon className="-mt-px text-base text-yellow-400" />
{bookReview.rating}
</div>
</div>
</div>
</div>
);
}

View File

@@ -1,65 +0,0 @@
import clsx from "clsx";
import Link from "next/link";
import type { ComponentProps } from "react";
interface Props {
variant?: "primary" | "secondary" | "tertiary";
className?: string;
size?: "sm" | "md" | "lg";
}
interface AnchorProps
extends Props,
React.AnchorHTMLAttributes<HTMLAnchorElement> {
href: string;
}
type ButtonProps = ComponentProps<"button"> & Props;
export function Button(props: AnchorProps | ButtonProps) {
const {
className: customClassName = "",
variant = "primary",
children,
size = "md",
} = props;
const variantClassNames = {
base: "inline-flex gap-2 items-center justify-center rounded-full overflow-hidden transition-colors",
primary:
"bg-purple-300 font-medium text-purple-950 px-4 py-2 rounded-full hover:bg-purple-200",
secondary:
"rounded-full bg-slate-100 font-medium text-slate-600 hover:bg-slate-200",
tertiary: "rounded-full bg-white text-purple-950 font-medium",
};
const sizeClassNames = {
sm: "py-1.5 px-3 text-sm",
md: "py-2 px-5",
lg: "py-2 md:py-2.5 px-6 md:text-lg",
};
const className = clsx(
customClassName,
variantClassNames.base,
variantClassNames[variant],
sizeClassNames[size],
);
if (!!(props as AnchorProps).href) {
const anchorProps = props as AnchorProps;
return (
<Link href={anchorProps.href} className={className}>
{children}
</Link>
);
}
const buttonProps = props as ButtonProps;
return (
<button {...buttonProps} className={className}>
{children}
</button>
);
}

View File

@@ -1,13 +0,0 @@
import clsx from "clsx";
export function Container({
children,
className,
}: {
children: React.ReactNode;
className?: string;
}) {
return (
<div className={clsx("mx-auto max-w-4xl px-4", className)}>{children}</div>
);
}

View File

@@ -1,29 +0,0 @@
"use client";
import { JazzAccount } from "@/schema";
import { DemoAuthBasicUI, createJazzReactApp, useDemoAuth } from "jazz-react";
const Jazz = createJazzReactApp({
AccountSchema: JazzAccount,
});
export const { useAccount, useCoState } = Jazz;
export function JazzAndAuth({ children }: { children: React.ReactNode }) {
const [auth, authState] = useDemoAuth();
return (
<>
<Jazz.Provider
auth={auth}
// replace `you@example.com` with your email as a temporary API key
peer="wss://cloud.jazz.tools/?key=you@example.com"
>
{children}
</Jazz.Provider>
{authState.state !== "signedIn" && (
<DemoAuthBasicUI appName="Jazz Book Shelf" state={authState} />
)}
</>
);
}

View File

@@ -1,26 +0,0 @@
"use client";
import { Button } from "@/components/Button";
import { Container } from "@/components/Container";
import { useAccount } from "@/components/JazzAndAuth";
import Link from "next/link";
export function Nav() {
const { me, logOut } = useAccount();
return (
<nav className="border-b py-3">
<Container className="flex items-center justify-between gap-12 text-sm">
<Link href="/" className="font-serif text-lg font-semibold">
Jazz Book Shelf
</Link>
<div className="flex items-center gap-4 text-sm">
<p>{me?.profile?.name}</p>
<Button variant="secondary" onClick={logOut}>
Log out
</Button>
</div>
</Container>
</nav>
);
}

View File

@@ -1,21 +0,0 @@
import StarIcon from "@/components/icons/StarIcon";
import StarOutlineIcon from "@/components/icons/StarOutlineIcon";
export default function Rating({
rating,
className = "",
}: {
rating?: number;
className?: string;
}) {
const max = 5;
const outline = max - (rating || 0);
return (
<div className={`inline-flex gap-0.5 text-yellow-400 ${className}`}>
{rating ? [...Array(rating)].map((x, i) => <StarIcon key={i} />) : <></>}
{[...Array(outline)].map((x, i) => (
<StarOutlineIcon key={i} />
))}
</div>
);
}

View File

@@ -1,47 +0,0 @@
"use client";
import StarIcon from "@/components/icons/StarIcon";
import StarOutlineIcon from "@/components/icons/StarOutlineIcon";
import clsx from "clsx";
interface RatingInputProps {
value?: number;
onChange: (value: number) => void;
className?: string;
}
export default function RatingInput({
value = 0,
onChange,
className,
}: RatingInputProps) {
const handleChange = (newRating: number) => {
onChange(newRating > 5 ? 5 : newRating);
};
return (
<div className={clsx(className, "flex gap-0.5 text-2xl text-yellow-400")}>
{[...Array(5)].map((_, i) => {
return i < value ? (
<button
type="button"
className="focus:outline-none"
onClick={() => handleChange(i + 1)}
key={i}
>
<StarIcon />
</button>
) : (
<button
type="button"
className="focus:outline-none"
onClick={() => handleChange(i + 1)}
key={i}
>
<StarOutlineIcon />
</button>
);
})}
</div>
);
}

View File

@@ -1,39 +0,0 @@
"use client";
import { BookReviewThumbnail } from "@/components/BookReviewThumbnail";
import { Button } from "@/components/Button";
import { useCoState } from "@/components/JazzAndAuth";
import { JazzAccount, JazzProfile, ListOfBookReviews } from "@/schema";
import { Group, ID } from "jazz-tools";
export default function UserProfile({ id }: { id: ID<JazzAccount> }) {
const user = useCoState(JazzAccount, id);
const profile = useCoState(JazzProfile, user?.profile?.id);
const bookReviews = useCoState(
ListOfBookReviews,
user?.profile?._refs.bookReviews?.id,
[{}],
);
return (
<div className="grid gap-4">
<div className="flex items-center justify-between">
<h1 className="font-serif text-lg font-medium sm:text-2xl">
{profile?.name}&apos;s book shelf
</h1>
{profile?._owner.castAs(Group).myRole() === "admin" && (
<Button href="/add" variant="primary">
Add book
</Button>
)}
</div>
<div className="grid gap-4 md:grid-cols-4">
{bookReviews?.map((bookReview) => (
<BookReviewThumbnail key={bookReview.id} id={bookReview.id} />
))}
</div>
</div>
);
}

View File

@@ -1,20 +0,0 @@
export default function PlusIcon({ className }: { className?: string }) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.5}
stroke="currentColor"
className={className}
width="1em"
height="1em"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M12 4.5v15m7.5-7.5h-15"
/>
</svg>
);
}

View File

@@ -1,18 +0,0 @@
export default function StarIcon({ className }: { className?: string }) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="currentColor"
className={className}
width="1em"
height="1em"
>
<path
fillRule="evenodd"
d="M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.006 5.404.434c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.434 2.082-5.005Z"
clipRule="evenodd"
/>
</svg>
);
}

View File

@@ -1,20 +0,0 @@
export default function StarOutlineIcon({ className }: { className?: string }) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.5}
stroke="currentColor"
className={className}
width="1em"
height="1em"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z"
/>
</svg>
);
}

View File

@@ -1,37 +0,0 @@
import {
Account,
CoList,
CoMap,
Encoders,
ImageDefinition,
Profile,
co,
} from "jazz-tools";
export class BookReview extends CoMap {
title = co.string;
author = co.string;
rating = co.number;
dateRead? = co.encoded(Encoders.Date);
review? = co.string;
cover? = co.ref(ImageDefinition, { optional: true });
}
export class ListOfBookReviews extends CoList.Of(co.ref(BookReview)) {}
/** The profile is an app-specific per-user public `CoMap`
* where you can store top-level objects for that user */
export class JazzProfile extends Profile {
bookReviews = co.ref(ListOfBookReviews);
}
export class JazzAccount extends Account {
profile = co.ref(JazzProfile);
/** The account migration is run on account creation and on every log-in.
* You can use it to set up the account root and any other initial CoValues you need.
*/
migrate(this: JazzAccount, creationProps?: { name: string }) {
super.migrate(creationProps);
}
}

View File

@@ -1,25 +0,0 @@
import type { Config } from "tailwindcss";
const colors = require("tailwindcss/colors");
const config: Config = {
content: [
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
extend: {
fontFamily: {
serif: ["var(--font-fraunces)"],
},
colors: {
purple: {
...colors.purple,
950: "#211f5a",
},
},
},
},
plugins: [],
};
export default config;

View File

@@ -1 +1 @@
EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_ZXZpZGVudC1kYW5lLTg5LmNsZXJrLmFjY291bnRzLmRldiQ
EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_ZXZpZGVudC1kYW5lLTg5LmNsZXJrLmFjY291bnRzLmRldiQ

View File

@@ -1,5 +1,212 @@
# chat-rn-clerk
## 1.0.48
### Patch Changes
- Updated dependencies [8a390d2]
- jazz-react-native@0.9.6
- jazz-react-native-auth-clerk@0.9.6
## 1.0.47
### Patch Changes
- Updated dependencies [c871912]
- jazz-react-native@0.9.5
- jazz-react-native-auth-clerk@0.9.5
## 1.0.46
### Patch Changes
- jazz-react-native@0.9.4
- jazz-react-native-auth-clerk@0.9.4
## 1.0.45
### Patch Changes
- Updated dependencies [7cd691f]
- jazz-react-native@0.9.3
- jazz-react-native-auth-clerk@0.9.3
## 1.0.44
### Patch Changes
- Updated dependencies [80fd3e9]
- jazz-react-native@0.9.2
- jazz-react-native-auth-clerk@0.9.2
## 1.0.43
### Patch Changes
- Updated dependencies [1b71969]
- jazz-tools@0.9.1
- jazz-react-native@0.9.1
- jazz-react-native-auth-clerk@0.9.1
- jazz-react-native-media-images@0.9.1
## 1.0.42
### Patch Changes
- Updated dependencies [1da4d55]
- Updated dependencies [8eda792]
- Updated dependencies [1e5e3a1]
- jazz-react-native@0.9.0
- jazz-tools@0.9.0
- jazz-react-native-auth-clerk@0.9.0
- jazz-react-native-media-images@0.9.0
## 1.0.41
### Patch Changes
- Updated dependencies [dc62b95]
- Updated dependencies [1de26f8]
- jazz-tools@0.8.51
- jazz-react-native@0.8.51
- jazz-react-native-auth-clerk@0.8.51
- jazz-react-native-media-images@0.8.51
## 1.0.40
### Patch Changes
- jazz-react-native@0.8.50
- jazz-react-native-auth-clerk@0.8.50
- jazz-tools@0.8.50
- jazz-react-native-media-images@0.8.50
## 1.0.39
### Patch Changes
- jazz-react-native@0.8.49
- jazz-react-native-auth-clerk@0.8.49
- jazz-tools@0.8.49
- jazz-react-native-media-images@0.8.49
## 1.0.38
### Patch Changes
- Updated dependencies [635e824]
- Updated dependencies [0a85982]
- jazz-tools@0.8.48
- jazz-react-native@0.8.48
- jazz-react-native-auth-clerk@0.8.48
- jazz-react-native-media-images@0.8.48
## 1.0.37
### Patch Changes
- Updated dependencies [33ef9c4]
- jazz-react-native@0.8.47
- jazz-react-native-auth-clerk@0.8.47
## 1.0.36
### Patch Changes
- Updated dependencies [ab4ffbd]
- jazz-react-native@0.8.46
- jazz-react-native-auth-clerk@0.8.46
## 1.0.35
### Patch Changes
- Updated dependencies [7701307]
- Updated dependencies [fa41f8e]
- Updated dependencies [88d7d9a]
- Updated dependencies [60e35ea]
- jazz-react-native@0.8.45
- jazz-tools@0.8.45
- jazz-react-native-auth-clerk@0.8.45
- jazz-react-native-media-images@0.8.45
## 1.0.34
### Patch Changes
- jazz-react-native@0.8.44
- jazz-react-native-auth-clerk@0.8.44
- jazz-tools@0.8.44
- jazz-react-native-media-images@0.8.44
## 1.0.33
### Patch Changes
- cdc7f9f: Fixing react-native examples
- Updated dependencies [cdc7f9f]
- jazz-react-native-auth-clerk@0.8.43
## 1.0.32
### Patch Changes
- jazz-react-native@0.8.41
- jazz-react-native-auth-clerk@0.8.41
- jazz-tools@0.8.41
- jazz-react-native-media-images@0.8.41
## 1.0.31
### Patch Changes
- Updated dependencies [0c6b0f3]
- Updated dependencies [249eecb]
- jazz-react-native@0.8.39
- jazz-tools@0.8.39
- jazz-react-native-auth-clerk@0.8.39
- jazz-react-native-media-images@0.8.39
## 1.0.30
### Patch Changes
- jazz-react-native@0.8.38
- jazz-react-native-auth-clerk@0.8.38
- jazz-tools@0.8.38
- jazz-react-native-media-images@0.8.38
## 1.0.29
### Patch Changes
- jazz-react-native@0.8.37
- jazz-react-native-auth-clerk@0.8.37
- jazz-tools@0.8.37
- jazz-react-native-media-images@0.8.28
## 1.0.28
### Patch Changes
- c84764a: feat: added jazz-react-native-auth-clerk package
- Updated dependencies [c84764a]
- Updated dependencies [441fe27]
- jazz-react-native-auth-clerk@0.8.36
- jazz-react-native@0.8.36
- jazz-tools@0.8.36
- jazz-react-native-media-images@0.8.27
## 1.0.27
### Patch Changes
- Updated dependencies [8b87117]
- jazz-tools@0.8.35
- jazz-react-auth-clerk@0.8.35
- jazz-react-native@0.8.35
- jazz-react-native-media-images@0.8.26
## 1.0.26
### Patch Changes

View File

@@ -35,7 +35,9 @@
}
}
],
"expo-secure-store"
"expo-secure-store",
"expo-font",
"expo-router"
],
"extra": {
"eas": {

View File

@@ -1,3 +1,4 @@
import "../global.css";
import { ClerkLoaded, ClerkProvider } from "@clerk/clerk-expo";
import { useFonts } from "expo-font";
import { Slot } from "expo-router";

View File

@@ -1,9 +1,9 @@
import { useAccount, useCoState } from "@/src/jazz";
import { Chat, Message } from "@/src/schema";
import { useFocusEffect, useNavigation } from "@react-navigation/native";
import { useNavigation } from "@react-navigation/native";
import clsx from "clsx";
import * as Clipboard from "expo-clipboard";
import { useLocalSearchParams } from "expo-router";
import { useAccount, useCoState } from "jazz-react-native";
import { Group, ID } from "jazz-tools";
import { useEffect, useLayoutEffect, useState } from "react";
import React, {

View File

@@ -11,7 +11,7 @@ import React, {
} from "react-native";
import { useUser } from "@clerk/clerk-expo";
import { useAccount } from "../../src/jazz";
import { useAccount } from "jazz-react-native";
import { Chat } from "../../src/schema";
export default function ChatScreen() {

View File

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

View File

@@ -4,7 +4,7 @@ import { Platform } from "react-native";
export interface TokenCache {
getToken: (key: string) => Promise<string | undefined | null>;
saveToken: (key: string, token: string) => Promise<void>;
clearToken?: (key: string) => void;
clearToken: (key: string) => void;
}
const createTokenCache = (): TokenCache => {
@@ -27,6 +27,9 @@ const createTokenCache = (): TokenCache => {
saveToken: (key: string, token: string) => {
return SecureStore.setItemAsync(key, token);
},
clearToken: (key: string) => {
return SecureStore.deleteItemAsync(key);
},
};
};

View File

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

View File

@@ -1,5 +1,6 @@
// Learn more https://docs.expo.dev/guides/monorepos
const { getDefaultConfig } = require("expo/metro-config");
const { withNativeWind } = require("nativewind/metro");
const { FileStore } = require("metro-cache");
const path = require("path");
@@ -19,7 +20,10 @@ config.resolver.nodeModulesPaths = [
];
config.resolver.sourceExts = ["mjs", "js", "json", "ts", "tsx"];
config.resolver.unstable_enablePackageExports = true;
config.resolver.requireCycleIgnorePatterns = [/(^|\/|\\)node_modules($|\/|\\)/];
config.resolver.requireCycleIgnorePatterns = [
/(^|\/|\\)node_modules($|\/|\\)/,
/(^|\/|\\)packages($|\/|\\)/,
];
// Use turborepo to restore the cache when possible
config.cacheStores = [
@@ -28,4 +32,5 @@ config.cacheStores = [
}),
];
module.exports = config;
// module.exports = config;
module.exports = withNativeWind(config, { input: "./global.css" });

View File

@@ -1,7 +1,7 @@
{
"name": "chat-rn-clerk",
"main": "index.js",
"version": "1.0.26",
"version": "1.0.48",
"scripts": {
"build": "expo export -p ios",
"start": "expo start",
@@ -17,62 +17,62 @@
},
"dependencies": {
"@azure/core-asynciterator-polyfill": "^1.0.2",
"@bam.tech/react-native-image-resizer": "^3.0.10",
"@bam.tech/react-native-image-resizer": "^3.0.11",
"@clerk/clerk-expo": "^2.2.21",
"@expo/vector-icons": "^14.0.2",
"@react-native-community/netinfo": "^11.3.1",
"@react-navigation/native": "^6.1.18",
"@react-navigation/native-stack": "^6.11.0",
"@op-engineering/op-sqlite": "^11.2.12",
"@react-native-community/netinfo": "^11.4.1",
"@react-navigation/native": "^7.0.13",
"@react-navigation/native-stack": "^7.1.14",
"base-64": "^1.0.0",
"buffer": "^6.0.3",
"clsx": "^2.0.0",
"expo": "~51.0.37",
"expo-build-properties": "~0.12.5",
"expo-clipboard": "~6.0.3",
"expo-constants": "~16.0.2",
"expo-crypto": "~13.0.2",
"expo-dev-client": "~4.0.28",
"expo-file-system": "^17.0.1",
"expo-font": "~12.0.4",
"expo-linking": "~6.3.1",
"expo-router": "~3.5.23",
"expo-secure-store": "~13.0.2",
"expo-splash-screen": "~0.27.5",
"expo-status-bar": "~1.12.1",
"expo-system-ui": "~3.0.7",
"expo-web-browser": "~13.0.3",
"jazz-react-auth-clerk": "workspace:*",
"expo": "^52.0.0",
"expo-build-properties": "~0.13.1",
"expo-clipboard": "~7.0.0",
"expo-constants": "~17.0.3",
"expo-crypto": "~14.0.1",
"expo-dev-client": "~5.0.5",
"expo-file-system": "^18.0.4",
"expo-font": "~13.0.1",
"expo-linking": "~7.0.3",
"expo-router": "~4.0.11",
"expo-secure-store": "~14.0.0",
"expo-splash-screen": "~0.29.16",
"expo-status-bar": "~2.0.0",
"expo-system-ui": "~4.0.5",
"expo-web-browser": "~14.0.1",
"jazz-react-native": "workspace:*",
"jazz-react-native-auth-clerk": "workspace:*",
"jazz-react-native-media-images": "workspace:*",
"jazz-tools": "workspace:*",
"nativewind": "^2.0.11",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-native": "~0.74.5",
"nativewind": "^4.1.21",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-native": "~0.76.3",
"react-native-fetch-api": "^3.0.0",
"react-native-gesture-handler": "~2.16.1",
"react-native-gesture-handler": "~2.20.2",
"react-native-get-random-values": "^1.11.0",
"react-native-mmkv": "3.0.1",
"react-native-polyfill-globals": "^3.1.0",
"react-native-quick-base64": "^2.1.2",
"react-native-reanimated": "~3.10.1",
"react-native-safe-area-context": "4.10.5",
"react-native-screens": "3.31.1",
"react-native-reanimated": "~3.16.3",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "4.1.0",
"react-native-url-polyfill": "^2.0.0",
"react-native-web": "~0.19.10",
"react-native-web": "~0.19.13",
"text-encoding": "^0.7.0",
"web-streams-polyfill": "^3.2.1"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@types/jest": "^29.5.3",
"@types/react": "^18.2.19",
"@types/react": "^18.3.12",
"@types/react-test-renderer": "^18.0.7",
"jest": "^29.2.1",
"jest-expo": "~51.0.3",
"jest-expo": "~52.0.2",
"react-test-renderer": "18.2.0",
"tailwindcss": "3.3.2",
"typescript": "^5.3.3"
"tailwindcss": "^3.4.15",
"typescript": "~5.6.2"
},
"private": true
}

View File

@@ -1,15 +1,14 @@
import { useClerk, useUser } from "@clerk/clerk-expo";
import { useJazzClerkAuth } from "jazz-react-auth-clerk";
import { JazzProvider, setupKvStore } from "jazz-react-native";
import { useJazzClerkAuth } from "jazz-react-native-auth-clerk";
import React, {
useContext,
createContext,
PropsWithChildren,
useContext,
useEffect,
useState,
PropsWithChildren,
} from "react";
import { Text, View } from "react-native";
import { Jazz } from "./jazz";
const AuthContext = createContext<{
isAuthenticated: boolean;
isLoading: boolean;
@@ -22,10 +21,12 @@ export function useAuth() {
return useContext(AuthContext);
}
const kvStore = setupKvStore();
export function JazzAndAuth({ children }: PropsWithChildren) {
const { isSignedIn, isLoaded: isClerkLoaded } = useUser();
const clerk = useClerk();
const [auth, state] = useJazzClerkAuth(clerk);
const [auth, state] = useJazzClerkAuth(clerk, kvStore);
const [isAuthenticated, setIsAuthenticated] = useState(false);
useEffect(() => {
@@ -46,14 +47,14 @@ export function JazzAndAuth({ children }: PropsWithChildren) {
<Text style={{ color: "red" }}>{error}</Text>
</View>
))}
{auth ? (
<Jazz.Provider
{auth && clerk.user ? (
<JazzProvider
auth={auth}
peer="wss://cloud.jazz.tools/?key=chat-rn-clerk-example-jazz@gcmp.io"
storage={undefined}
storage="sqlite"
peer="wss://cloud.jazz.tools/?key=chat-rn-clerk-example-jazz@garden.co"
>
{children}
</Jazz.Provider>
</JazzProvider>
) : (
children
)}

View File

@@ -1,4 +0,0 @@
import { createJazzRNApp } from "jazz-react-native";
export const Jazz = createJazzRNApp();
export const { useAccount, useCoState, useAcceptInvite } = Jazz;

View File

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

View File

@@ -7,5 +7,5 @@
"@/*": ["./*"]
}
},
"include": ["**/*.ts", "**/*.tsx"]
"include": ["**/*.ts", "**/*.tsx", "nativewind-env.d.ts"]
}

View File

@@ -1,5 +1,168 @@
# chat-rn
## 1.0.45
### Patch Changes
- Updated dependencies [8a390d2]
- jazz-react-native@0.9.6
## 1.0.44
### Patch Changes
- Updated dependencies [c871912]
- jazz-react-native@0.9.5
## 1.0.43
### Patch Changes
- jazz-react-native@0.9.4
## 1.0.42
### Patch Changes
- Updated dependencies [7cd691f]
- jazz-react-native@0.9.3
## 1.0.41
### Patch Changes
- Updated dependencies [80fd3e9]
- jazz-react-native@0.9.2
## 1.0.40
### Patch Changes
- Updated dependencies [1b71969]
- jazz-tools@0.9.1
- jazz-react-native@0.9.1
## 1.0.39
### Patch Changes
- Updated dependencies [1da4d55]
- Updated dependencies [8eda792]
- Updated dependencies [1e5e3a1]
- jazz-react-native@0.9.0
- jazz-tools@0.9.0
## 1.0.38
### Patch Changes
- Updated dependencies [dc62b95]
- Updated dependencies [1de26f8]
- jazz-tools@0.8.51
- jazz-react-native@0.8.51
## 1.0.37
### Patch Changes
- jazz-react-native@0.8.50
- jazz-tools@0.8.50
## 1.0.36
### Patch Changes
- jazz-react-native@0.8.49
- jazz-tools@0.8.49
## 1.0.35
### Patch Changes
- Updated dependencies [635e824]
- Updated dependencies [0a85982]
- jazz-tools@0.8.48
- jazz-react-native@0.8.48
## 1.0.34
### Patch Changes
- Updated dependencies [33ef9c4]
- jazz-react-native@0.8.47
## 1.0.33
### Patch Changes
- Updated dependencies [ab4ffbd]
- jazz-react-native@0.8.46
## 1.0.32
### Patch Changes
- Updated dependencies [7701307]
- Updated dependencies [fa41f8e]
- Updated dependencies [88d7d9a]
- Updated dependencies [60e35ea]
- jazz-react-native@0.8.45
- jazz-tools@0.8.45
## 1.0.31
### Patch Changes
- jazz-react-native@0.8.44
- jazz-tools@0.8.44
## 1.0.30
### Patch Changes
- jazz-react-native@0.8.41
- jazz-tools@0.8.41
## 1.0.29
### Patch Changes
- Updated dependencies [0c6b0f3]
- Updated dependencies [249eecb]
- jazz-react-native@0.8.39
- jazz-tools@0.8.39
## 1.0.28
### Patch Changes
- jazz-react-native@0.8.38
- jazz-tools@0.8.38
## 1.0.27
### Patch Changes
- jazz-react-native@0.8.37
- jazz-tools@0.8.37
## 1.0.26
### Patch Changes
- Updated dependencies [c84764a]
- Updated dependencies [441fe27]
- jazz-react-native@0.8.36
- jazz-tools@0.8.36
## 1.0.25
### Patch Changes
- Updated dependencies [8b87117]
- jazz-tools@0.8.35
- jazz-react-native@0.8.35
## 1.0.24
### Patch Changes

View File

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

View File

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

View File

@@ -1,5 +1,6 @@
// Learn more https://docs.expo.dev/guides/monorepos
const { getDefaultConfig } = require("expo/metro-config");
const { withNativeWind } = require("nativewind/metro");
const { FileStore } = require("metro-cache");
const path = require("path");
@@ -7,7 +8,7 @@ const path = require("path");
const projectRoot = __dirname;
const workspaceRoot = path.resolve(projectRoot, "../..");
const config = getDefaultConfig(projectRoot);
const config = getDefaultConfig(projectRoot, { isCSSEnabled: true });
// Since we are using pnpm, we have to setup the monorepo manually for Metro
// #1 - Watch all files in the monorepo
@@ -19,7 +20,10 @@ config.resolver.nodeModulesPaths = [
];
config.resolver.sourceExts = ["mjs", "js", "json", "ts", "tsx"];
config.resolver.unstable_enablePackageExports = true;
config.resolver.requireCycleIgnorePatterns = [/(^|\/|\\)node_modules($|\/|\\)/];
config.resolver.requireCycleIgnorePatterns = [
/(^|\/|\\)node_modules($|\/|\\)/,
/(^|\/|\\)packages($|\/|\\)/,
];
// Use turborepo to restore the cache when possible
config.cacheStores = [
@@ -28,4 +32,5 @@ config.cacheStores = [
}),
];
module.exports = config;
// module.exports = config;
module.exports = withNativeWind(config, { input: "./global.css" });

View File

@@ -1,6 +1,6 @@
{
"name": "chat-rn",
"version": "1.0.24",
"version": "1.0.45",
"main": "index.js",
"scripts": {
"build": "expo export -p ios",
@@ -13,41 +13,41 @@
},
"dependencies": {
"@azure/core-asynciterator-polyfill": "^1.0.2",
"@react-native-community/netinfo": "^11.3.1",
"@react-navigation/native": "^6.1.18",
"@react-navigation/native-stack": "^6.11.0",
"@op-engineering/op-sqlite": "^11.2.12",
"@react-native-community/netinfo": "^11.4.1",
"@react-navigation/native": "^7.0.13",
"@react-navigation/native-stack": "^7.1.14",
"base-64": "^1.0.0",
"clsx": "^2.0.0",
"expo": "~51.0.37",
"expo-build-properties": "~0.12.5",
"expo-clipboard": "~6.0.3",
"expo-constants": "~16.0.2",
"expo-crypto": "~13.0.2",
"expo-dev-client": "~4.0.28",
"expo-linking": "~6.3.1",
"expo-secure-store": "~13.0.2",
"expo-status-bar": "~1.12.1",
"expo-web-browser": "~13.0.3",
"expo": "^52.0.0",
"expo-build-properties": "~0.13.1",
"expo-clipboard": "~7.0.0",
"expo-constants": "~17.0.3",
"expo-crypto": "~14.0.1",
"expo-dev-client": "~5.0.5",
"expo-linking": "~7.0.3",
"expo-secure-store": "~14.0.0",
"expo-status-bar": "~2.0.0",
"expo-web-browser": "~14.0.1",
"jazz-react-native": "workspace:*",
"jazz-tools": "workspace:*",
"nativewind": "^2.0.11",
"react": "^18.2.0",
"react-native": "~0.74.5",
"nativewind": "^4.1.21",
"react": "^18.3.1",
"react-native": "~0.76.3",
"react-native-fetch-api": "^3.0.0",
"react-native-get-random-values": "^1.11.0",
"react-native-mmkv": "3.0.1",
"react-native-polyfill-globals": "^3.1.0",
"react-native-safe-area-context": "4.10.5",
"react-native-screens": "3.31.1",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "4.1.0",
"react-native-url-polyfill": "^2.0.0",
"text-encoding": "^0.7.0",
"web-streams-polyfill": "^3.2.1"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@types/react": "^18.2.19",
"tailwindcss": "3.3.2",
"typescript": "^5.3.3"
"@types/react": "^18.3.12",
"tailwindcss": "^3.4.15",
"typescript": "~5.6.2"
},
"private": true
}

View File

@@ -1,3 +1,5 @@
import "../global.css";
import {
NavigationContainer,
useNavigationContainerRef,
@@ -7,9 +9,8 @@ import * as Linking from "expo-linking";
import React, { StrictMode, useEffect, useState } from "react";
import HandleInviteScreen from "./invite";
import { DemoAuthBasicUI, useDemoAuth } from "jazz-react-native";
import { DemoAuthBasicUI, JazzProvider, useDemoAuth } from "jazz-react-native";
import ChatScreen from "./chat";
import { Jazz } from "./jazz";
const Stack = createNativeStackNavigator();
@@ -32,7 +33,6 @@ function App() {
"ChatScreen" | "HandleInviteScreen"
>("ChatScreen");
const navigationRef = useNavigationContainerRef();
useEffect(() => {
Linking.getInitialURL().then((url) => {
if (url) {
@@ -49,10 +49,10 @@ function App() {
return (
<StrictMode>
<Jazz.Provider
<JazzProvider
auth={auth}
peer="wss://cloud.jazz.tools/?key=chat-rn-example-jazz@gcmp.io"
storage={undefined}
storage="sqlite"
peer="wss://cloud.jazz.tools/?key=chat-rn-example-jazz@garden.co"
>
<NavigationContainer linking={linking} ref={navigationRef}>
<Stack.Navigator initialRouteName={initialRoute}>
@@ -68,7 +68,7 @@ function App() {
/>
</Stack.Navigator>
</NavigationContainer>
</Jazz.Provider>
</JazzProvider>
{state.state !== "signedIn" ? (
<DemoAuthBasicUI appName="Jazz Chat" state={state} />
) : null}

View File

@@ -14,50 +14,40 @@ import React, {
Alert,
} from "react-native";
import { useAccount, useCoState } from "./jazz";
import { useAccount, useCoState } from "jazz-react-native";
import { Chat, Message } from "./schema";
export default function ChatScreen({ navigation }: { navigation: any }) {
const { me, logOut } = useAccount();
const [chat, setChat] = useState<Chat>();
const [chatId, setChatId] = useState<ID<Chat>>();
const loadedChat = useCoState(Chat, chatId, [{}]);
const [message, setMessage] = useState("");
const loadedChat = useCoState(Chat, chat?.id, [{}]);
useEffect(() => {
navigation.setOptions({
headerRight: () => <Button onPress={logOut} title="Logout" />,
headerLeft: () =>
chat ? (
loadedChat ? (
<Button
onPress={() => {
if (chat?.id) {
if (loadedChat?.id) {
Clipboard.setStringAsync(
`https://chat.jazz.tools/#/chat/${chat.id}`,
`https://chat.jazz.tools/#/chat/${loadedChat.id}`,
);
Alert.alert("Copied to clipboard", `Chat ID: ${chat.id}`);
Alert.alert("Copied to clipboard", `Chat ID: ${loadedChat.id}`);
}
}}
title="Share"
/>
) : null,
});
}, [navigation, chat]);
}, [navigation, loadedChat]);
const createChat = () => {
const group = Group.create({ owner: me });
group.addMember("everyone", "writer");
const chat = Chat.create([], { owner: group });
setChat(chat);
};
const loadChat = async (chatId: ID<Chat>) => {
try {
const chat = await Chat.load(chatId, me, []);
setChat(chat);
} catch (error) {
console.log("Error loading chat", error);
Alert.alert("Error", `Error loading chat: ${error}`);
}
setChatId(chat.id);
};
const joinChat = () => {
@@ -73,7 +63,7 @@ export default function ChatScreen({ navigation }: { navigation: any }) {
text: "Join",
onPress: (chatId) => {
if (chatId) {
loadChat(chatId as ID<Chat>);
setChatId(chatId as ID<Chat>);
} else {
Alert.alert("Error", "Chat ID cannot be empty.");
}
@@ -85,9 +75,11 @@ export default function ChatScreen({ navigation }: { navigation: any }) {
};
const sendMessage = () => {
if (!chat) return;
if (!loadedChat) return;
if (message.trim()) {
chat.push(Message.create({ text: message }, { owner: chat._owner }));
loadedChat.push(
Message.create({ text: message }, { owner: loadedChat?._owner }),
);
setMessage("");
}
};
@@ -137,7 +129,7 @@ export default function ChatScreen({ navigation }: { navigation: any }) {
return (
<View className="flex flex-col h-full">
{!chat ? (
{!loadedChat ? (
<View className="flex flex-col h-full items-center justify-center">
<TouchableOpacity
onPress={createChat}

View File

@@ -1,13 +1,7 @@
import { useAcceptInvite } from "jazz-react-native";
import React, { Text } from "react-native";
import { useAcceptInvite } from "./jazz";
import { Chat } from "./schema";
type ChatScreenParams = {
valueHint?: string;
valueID?: string;
inviteSecret?: string;
};
export default function HandleInviteScreen({
navigation,
}: {

View File

@@ -1,4 +0,0 @@
import { createJazzRNApp } from "jazz-react-native";
export const Jazz = createJazzRNApp();
export const { useAccount, useCoState, useAcceptInvite } = Jazz;

View File

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

View File

@@ -1,5 +1,141 @@
# chat-vue
## 0.0.32
### Patch Changes
- Updated dependencies [1b71969]
- Updated dependencies [5d98189]
- jazz-browser@0.9.1
- jazz-tools@0.9.1
- jazz-vue@0.9.1
## 0.0.31
### Patch Changes
- Updated dependencies [9dd8d95]
- Updated dependencies [8eda792]
- jazz-vue@0.9.0
- jazz-tools@0.9.0
- jazz-browser@0.9.0
## 0.0.30
### Patch Changes
- Updated dependencies [dc62b95]
- Updated dependencies [1de26f8]
- jazz-tools@0.8.51
- jazz-browser@0.8.51
- jazz-vue@0.8.51
## 0.0.29
### Patch Changes
- jazz-browser@0.8.50
- jazz-tools@0.8.50
- jazz-vue@0.8.50
## 0.0.28
### Patch Changes
- jazz-browser@0.8.49
- jazz-tools@0.8.49
- jazz-vue@0.8.49
## 0.0.27
### Patch Changes
- Updated dependencies [635e824]
- Updated dependencies [0a85982]
- jazz-tools@0.8.48
- jazz-browser@0.8.48
- jazz-vue@0.8.48
## 0.0.26
### Patch Changes
- Updated dependencies [6f0bd7f]
- Updated dependencies [fa41f8e]
- Updated dependencies [88d7d9a]
- Updated dependencies [60e35ea]
- jazz-browser@0.8.45
- jazz-tools@0.8.45
- jazz-vue@0.8.45
## 0.0.25
### Patch Changes
- jazz-browser@0.8.44
- jazz-tools@0.8.44
- jazz-vue@0.8.44
## 0.0.24
### Patch Changes
- Updated dependencies [ac216b9]
- jazz-browser@0.8.41
- jazz-tools@0.8.41
- jazz-vue@0.8.41
## 0.0.23
### Patch Changes
- jazz-browser@0.8.40
- jazz-vue@0.8.40
## 0.0.22
### Patch Changes
- Updated dependencies [e386f2b]
- Updated dependencies [249eecb]
- jazz-browser@0.8.39
- jazz-tools@0.8.39
- jazz-vue@0.8.39
## 0.0.21
### Patch Changes
- jazz-browser@0.8.38
- jazz-tools@0.8.38
- jazz-vue@0.8.38
## 0.0.20
### Patch Changes
- jazz-browser@0.8.37
- jazz-tools@0.8.37
- jazz-vue@0.8.25
## 0.0.19
### Patch Changes
- Updated dependencies [441fe27]
- jazz-tools@0.8.36
- jazz-browser@0.8.36
- jazz-vue@0.8.24
## 0.0.18
### Patch Changes
- Updated dependencies [8b87117]
- jazz-tools@0.8.35
- jazz-browser@0.8.35
- jazz-vue@0.8.23
## 0.0.17
### Patch Changes

View File

@@ -1,39 +1,35 @@
# chat-vue
# Chat example with Jazz and Vue
This template should help get you started developing with Vue 3 in Vite.
## Installing & running the example locally
## Recommended IDE Setup
(This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
## Type Support for `.vue` Imports in TS
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
## Customize configuration
See [Vite Configuration Reference](https://vite.dev/config/).
## Project Setup
```sh
pnpm install
Start by downloading the [jazz repository](https://github.com/garden-co/jazz):
```bash
npx degit gardencmp/jazz jazz
```
### Compile and Hot-Reload for Development
Go to the todo-vue example directory:
```bash
cd jazz/examples/chat-vue
```
```sh
Install and build dependencies:
```bash
pnpm i && npx turbo build
```
Start the dev server:
```bash
pnpm dev
```
### Type-Check, Compile and Minify for Production
## Questions / problems / feedback
```sh
pnpm build
```
If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or open an issue or PR to fix something that seems wrong.
### Lint with [ESLint](https://eslint.org/)
## Configuration: sync server
```sh
pnpm lint
```
By default, the example app uses [Jazz Cloud](https://jazz.tools/cloud) (`wss://cloud.jazz.tools`) - so cross-device use, invites and collaboration should just work.
You can also run a local sync server by running `npx jazz-run sync` and adding the query param `?sync=ws://localhost:4200` to the URL of the example app (for example: `http://localhost:5173/?peer=ws://localhost:4200`), or by setting the `sync` parameter of `JazzProvider` in [./src/main.ts](./src/main.ts).

View File

@@ -1,6 +1,6 @@
{
"name": "chat-vue",
"version": "0.0.17",
"version": "0.0.32",
"private": true,
"type": "module",
"scripts": {
@@ -25,14 +25,14 @@
"@vitejs/plugin-vue": "^5.1.4",
"@vitejs/plugin-vue-jsx": "^4.0.1",
"@vue/tsconfig": "^0.5.1",
"autoprefixer": "^10.4.14",
"eslint": "^8.46.0",
"autoprefixer": "^10.4.20",
"eslint": "^9.7.0",
"eslint-plugin-vue": "^9.28.0",
"npm-run-all2": "^6.2.3",
"postcss": "^8.4.27",
"tailwindcss": "3.3.2",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"tailwindcss": "^3.4.15",
"typescript": "~5.6.2",
"vite": "^5.4.10",
"vite-plugin-vue-devtools": "^7.4.6",
"vue-tsc": "^2.1.6"
}

View File

@@ -9,9 +9,9 @@
</template>
<script setup lang="ts">
import { useAccount } from "jazz-vue";
import AppContainer from "./components/AppContainer.vue";
import TopBar from "./components/TopBar.vue";
import { useAccount } from "./main";
const { me, logOut } = useAccount();
</script>

View File

@@ -1,13 +1,9 @@
import "./index.css";
import { DemoAuthBasicUI, createJazzVueApp, useDemoAuth } from "jazz-vue";
import { DemoAuthBasicUI, JazzProvider, useDemoAuth } from "jazz-vue";
import { createApp, defineComponent, h } from "vue";
import App from "./App.vue";
import "./index.css";
import router from "./router";
const Jazz = createJazzVueApp();
export const { useAccount, useCoState } = Jazz;
const { JazzProvider } = Jazz;
const RootComponent = defineComponent({
name: "RootComponent",
setup() {
@@ -18,7 +14,7 @@ const RootComponent = defineComponent({
JazzProvider,
{
auth: authMethod.value,
peer: "wss://mesh.jazz.tools/?key=chat-example-jazz@gcmp.io",
peer: "wss://cloud.jazz.tools/?key=chat-example-jazz@garden.co",
},
{
default: () => h(App),

View File

@@ -26,12 +26,12 @@
<script lang="ts">
import type { ID } from "jazz-tools";
import { useCoState } from "jazz-vue";
import { type PropType, computed, defineComponent, ref } from "vue";
import ChatBody from "../components/ChatBody.vue";
import ChatBubble from "../components/ChatBubble.vue";
import ChatInput from "../components/ChatInput.vue";
import EmptyChatMessage from "../components/EmptyChatMessage.vue";
import { useCoState } from "../main";
import { Chat, Message } from "../schema";
export default defineComponent({

View File

@@ -4,8 +4,8 @@
<script setup lang="ts">
import { Group } from "jazz-tools";
import { useAccount } from "jazz-vue";
import { useRouter } from "vue-router";
import { useAccount } from "../main";
import { Chat } from "../schema";
const router = useRouter();

View File

@@ -1,8 +0,0 @@
/** @type {import('tailwindcss').Config} */
export default {
purge: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"],
theme: {
extend: {},
},
plugins: [],
};

View File

@@ -0,0 +1,11 @@
import type { Config } from "tailwindcss";
const config: Config = {
content: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"],
theme: {
extend: {},
},
plugins: [],
};
export default config;

View File

@@ -1,5 +1,161 @@
# jazz-example-chat
## 0.0.128
### Patch Changes
- jazz-react@0.9.4
## 0.0.127
### Patch Changes
- Updated dependencies [1b71969]
- jazz-react@0.9.1
- jazz-tools@0.9.1
- jazz-browser-media-images@0.9.1
## 0.0.126
### Patch Changes
- Updated dependencies [956a4d1]
- Updated dependencies [8eda792]
- jazz-react@0.9.0
- jazz-tools@0.9.0
- jazz-browser-media-images@0.9.0
## 0.0.125
### Patch Changes
- Updated dependencies [dc62b95]
- Updated dependencies [1de26f8]
- jazz-tools@0.8.51
- jazz-browser-media-images@0.8.51
- jazz-react@0.8.51
## 0.0.124
### Patch Changes
- jazz-react@0.8.50
- jazz-tools@0.8.50
- jazz-browser-media-images@0.8.50
## 0.0.123
### Patch Changes
- jazz-react@0.8.49
- jazz-tools@0.8.49
- jazz-browser-media-images@0.8.49
## 0.0.122
### Patch Changes
- Updated dependencies [635e824]
- Updated dependencies [0a85982]
- jazz-tools@0.8.48
- jazz-browser-media-images@0.8.48
- jazz-react@0.8.48
## 0.0.121
### Patch Changes
- Updated dependencies [6f0bd7f]
- Updated dependencies [fca6a0b]
- Updated dependencies [fa41f8e]
- Updated dependencies [88d7d9a]
- Updated dependencies [60e35ea]
- cojson@0.8.45
- jazz-tools@0.8.45
- jazz-react@0.8.45
- jazz-browser-media-images@0.8.45
## 0.0.120
### Patch Changes
- Updated dependencies [5d20c81]
- cojson@0.8.44
- jazz-react@0.8.44
- jazz-tools@0.8.44
- jazz-browser-media-images@0.8.44
## 0.0.119
### Patch Changes
- Updated dependencies [3252502]
- Updated dependencies [6370348]
- Updated dependencies [ac216b9]
- cojson@0.8.41
- jazz-react@0.8.41
- jazz-tools@0.8.41
- jazz-browser-media-images@0.8.41
## 0.0.118
### Patch Changes
- jazz-browser-media-images@0.8.40
- jazz-react@0.8.40
## 0.0.117
### Patch Changes
- Updated dependencies [249eecb]
- Updated dependencies [3121551]
- jazz-tools@0.8.39
- cojson@0.8.39
- jazz-browser-media-images@0.8.39
- jazz-react@0.8.39
## 0.0.116
### Patch Changes
- Updated dependencies [b00ee91]
- Updated dependencies [f488c09]
- cojson@0.8.38
- jazz-react@0.8.38
- jazz-tools@0.8.38
## 0.0.115
### Patch Changes
- Updated dependencies [3d9f12e]
- cojson@0.8.37
- jazz-react@0.8.37
- jazz-tools@0.8.37
## 0.0.114
### Patch Changes
- Updated dependencies [441fe27]
- cojson@0.8.36
- jazz-tools@0.8.36
- jazz-react@0.8.36
## 0.0.113
### Patch Changes
- Updated dependencies [3f15a23]
- Updated dependencies [9212ab8]
- Updated dependencies [46f2ab8]
- Updated dependencies [8b87117]
- Updated dependencies [a6b6ccf]
- cojson@0.8.35
- jazz-react@0.8.35
- jazz-tools@0.8.35
## 0.0.112
### Patch Changes

View File

@@ -1,4 +1,4 @@
FROM caddy:2.7.3-alpine
LABEL org.opencontainers.image.source="https://github.com/gardencmp/jazz"
LABEL org.opencontainers.image.source="https://github.com/garden-co/jazz"
COPY ./dist /usr/share/caddy/

View File

@@ -1,32 +1,27 @@
# Jazz Chat Example
# Chat example with Jazz and React
Live version: [https://chat.jazz.tools](https://chat.jazz.tools)
## Installing & running the example locally
(this requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
Start by checking out `jazz`
(This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
Start by downloading the [jazz repository](https://github.com/garden-co/jazz):
```bash
git clone https://github.com/gardencmp/jazz.git
cd jazz/examples/chat
pnpm pack --pack-destination /tmp
mkdir -p ~/jazz-examples/chat # or any other directory
tar -xf /tmp/jazz-example-chat-* --strip-components 1 -C ~/jazz-examples/chat
cd ~/jazz-examples/chat
npx degit gardencmp/jazz jazz
```
This ensures that you have the example app without git history and independent of the Jazz multi-package monorepo.
Install dependencies:
Go to the chat example directory:
```bash
pnpm install
cd jazz/examples/chat
```
Install and build dependencies:
```bash
pnpm i && npx turbo build
```
Start the dev server:
```bash
pnpm dev
```
@@ -39,4 +34,4 @@ If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or
By default, the example app uses [Jazz Cloud](https://jazz.tools/cloud) (`wss://cloud.jazz.tools`) - so cross-device use, invites and collaboration should just work.
You can also run a local sync server by running `npx jazz-run sync` and adding the query param `?sync=ws://localhost:4200` to the URL of the example app (for example: `http://localhost:5173/?peer=ws://localhost:4200`), or by setting the `sync` parameter of the `<Jazz.Provider>` provider component in [./src/2_main.tsx](./src/2_main.tsx).
You can also run a local sync server by running `npx jazz-run sync` and adding the query param `?sync=ws://localhost:4200` to the URL of the example app (for example: `http://localhost:5173/?peer=ws://localhost:4200`), or by setting the `sync` parameter of the `<JazzProvider>` provider component in [./src/main.tsx](./src/main.tsx).

View File

@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Jazz Chat Example</title>
</head>
<body class="h-full">
<body class="h-full bg-white text-stone-700 dark:text-stone-400 dark:bg-stone-925">
<div id="root" class="h-full"></div>
<script type="module" src="/src/app.tsx"></script>
</body>

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-chat",
"private": true,
"version": "0.0.112",
"version": "0.0.128",
"type": "module",
"scripts": {
"dev": "vite",
@@ -13,37 +13,25 @@
"test:ui": "playwright test --ui"
},
"dependencies": {
"@radix-ui/react-checkbox": "^1.0.4",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-toast": "^1.1.4",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"cojson": "workspace:0.8.34",
"hash-slash": "workspace:0.2.1",
"jazz-react": "workspace:0.8.34",
"jazz-tools": "workspace:0.8.34",
"hash-slash": "workspace:*",
"jazz-browser-media-images": "workspace:*",
"jazz-react": "workspace:*",
"jazz-tools": "workspace:*",
"lucide-react": "^0.274.0",
"qrcode": "^1.5.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router": "^6.16.0",
"react-router-dom": "^6.16.0",
"react-use": "^17.4.0",
"tailwind-merge": "^1.14.0",
"tailwindcss-animate": "^1.0.7",
"uniqolor": "^1.1.0"
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@playwright/test": "^1.46.1",
"@types/qrcode": "^1.5.1",
"@types/react": "^18.2.19",
"@types/react-dom": "^18.2.7",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react-swc": "^3.3.2",
"autoprefixer": "^10.4.14",
"autoprefixer": "^10.4.20",
"is-ci": "^3.0.1",
"postcss": "^8.4.27",
"tailwindcss": "3.3.2",
"typescript": "^5.3.3",
"vite": "^5.0.10"
"tailwindcss": "^3.4.15",
"typescript": "~5.6.2",
"vite": "^5.4.10"
}
}

View File

@@ -1,9 +1,13 @@
import { inIframe, onChatLoad } from "@/util.ts";
import { useIframeHashRouter } from "hash-slash";
import { useAccount } from "jazz-react";
import { Group, ID } from "jazz-tools";
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { ChatScreen } from "./chatScreen.tsx";
import { useAccount } from "./main.tsx";
import { JazzAndAuth } from "./jazz.tsx";
import { Chat } from "./schema.ts";
import { ThemeProvider } from "./themeProvider.tsx";
import { AppContainer, TopBar } from "./ui.tsx";
export function App() {
@@ -12,13 +16,13 @@ export function App() {
const createChat = () => {
if (!me) return;
const group = Group.create({ owner: me });
const group = Group.create();
group.addMember("everyone", "writer");
const chat = Chat.create([], { owner: group });
const chat = Chat.create([], group);
router.navigate("/#/chat/" + chat.id);
// for https://jazz.tools marketing site demo only
onChatLoad(chat, me);
onChatLoad(chat);
};
return (
@@ -34,3 +38,13 @@ export function App() {
</AppContainer>
);
}
createRoot(document.getElementById("root")!).render(
<ThemeProvider>
<StrictMode>
<JazzAndAuth>
<App />
</JazzAndAuth>
</StrictMode>
</ThemeProvider>,
);

View File

@@ -1,21 +1,46 @@
import { createImage } from "jazz-browser-media-images";
import { useCoState } from "jazz-react";
import { ID } from "jazz-tools";
import { useState } from "react";
import { useCoState } from "./main.tsx";
import { Chat, Message } from "./schema.ts";
import {
BubbleBody,
BubbleContainer,
BubbleImage,
BubbleInfo,
BubbleText,
ChatBody,
ChatInput,
EmptyChatMessage,
ImageInput,
InputBar,
TextInput,
} from "./ui.tsx";
export function ChatScreen(props: { chatID: ID<Chat> }) {
const chat = useCoState(Chat, props.chatID, [{}]);
const [showNLastMessages, setShowNLastMessages] = useState(30);
return chat ? (
if (!chat)
return (
<div className="flex-1 flex justify-center items-center">Loading...</div>
);
const sendImage = (event: React.ChangeEvent<HTMLInputElement>) => {
const file = event.currentTarget.files?.[0];
if (!file) return;
if (file.size > 5000000) {
alert("Please upload an image less than 5MB.");
return;
}
createImage(file).then((image) => {
chat.push(Message.create({ text: file.name, image: image }, chat._owner));
});
};
return (
<>
<ChatBody>
{chat.length > 0 ? (
@@ -35,24 +60,31 @@ export function ChatScreen(props: { chatID: ID<Chat> }) {
</button>
)}
</ChatBody>
<ChatInput
onSubmit={(text) => {
chat.push(Message.create({ text }, { owner: chat._owner }));
}}
/>
<InputBar>
<ImageInput onImageChange={sendImage} />
<TextInput
onSubmit={(text) => {
chat.push(Message.create({ text }, { owner: chat._owner }));
}}
/>
</InputBar>
</>
) : (
<div className="flex-1 flex justify-center items-center">Loading...</div>
);
}
function ChatBubble(props: { msg: Message }) {
const lastEdit = props.msg._edits.text;
const fromMe = lastEdit.by?.isMe;
const { text, image } = props.msg;
return (
<BubbleContainer fromMe={fromMe}>
<BubbleBody fromMe={fromMe}>{props.msg.text}</BubbleBody>
<BubbleBody fromMe={fromMe}>
{image && <BubbleImage image={image} />}
<BubbleText text={text} />
</BubbleBody>
<BubbleInfo by={lastEdit.by?.profile?.name} madeAt={lastEdit.madeAt} />
</BubbleContainer>
);

View File

@@ -1,78 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 20 14.3% 4.1%;
--card: 0 0% 100%;
--card-foreground: 20 14.3% 4.1%;
--popover: 0 0% 100%;
--popover-foreground: 20 14.3% 4.1%;
--primary: 24 9.8% 10%;
--primary-foreground: 60 9.1% 97.8%;
--secondary: 60 4.8% 95.9%;
--secondary-foreground: 24 9.8% 10%;
--muted: 60 4.8% 95.9%;
--muted-foreground: 25 5.3% 44.7%;
--accent: 60 4.8% 95.9%;
--accent-foreground: 24 9.8% 10%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 60 9.1% 97.8%;
--border: 20 5.9% 90%;
--input: 20 5.9% 90%;
--ring: 20 14.3% 4.1%;
--radius: 0.5rem;
}
.dark {
--background: 20 14.3% 4.1%;
--foreground: 60 9.1% 97.8%;
--card: 20 14.3% 4.1%;
--card-foreground: 60 9.1% 97.8%;
--popover: 20 14.3% 4.1%;
--popover-foreground: 60 9.1% 97.8%;
--primary: 60 9.1% 97.8%;
--primary-foreground: 24 9.8% 10%;
--secondary: 12 6.5% 15.1%;
--secondary-foreground: 60 9.1% 97.8%;
--muted: 12 6.5% 15.1%;
--muted-foreground: 24 5.4% 63.9%;
--accent: 12 6.5% 15.1%;
--accent-foreground: 60 9.1% 97.8%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 60 9.1% 97.8%;
--border: 12 6.5% 15.1%;
--input: 12 6.5% 15.1%;
--ring: 24 5.7% 82.9%;
}
}
@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
margin: 0;
padding: 0;
}
}

View File

@@ -0,0 +1,19 @@
import { DemoAuthBasicUI, JazzProvider, useDemoAuth } from "jazz-react";
export function JazzAndAuth({ children }: { children: React.ReactNode }) {
const [auth, state] = useDemoAuth();
return (
<>
<JazzProvider
auth={auth}
peer="wss://cloud.jazz.tools/?key=chat-example-jazz@garden.co"
>
{children}
</JazzProvider>
{state.state !== "signedIn" && (
<DemoAuthBasicUI appName="Jazz Chat" state={state} />
)}
</>
);
}

View File

@@ -1,33 +0,0 @@
import { DemoAuthBasicUI, createJazzReactApp, useDemoAuth } from "jazz-react";
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { App } from "./app.tsx";
const Jazz = createJazzReactApp();
export const { useAccount, useCoState } = Jazz;
function JazzAndAuth({ children }: { children: React.ReactNode }) {
const [auth, state] = useDemoAuth();
return (
<>
<Jazz.Provider
auth={auth}
peer="wss://cloud.jazz.tools/?key=chat-example-jazz@gcmp.io"
>
{children}
</Jazz.Provider>
{state.state !== "signedIn" && (
<DemoAuthBasicUI appName="Jazz Chat" state={state} />
)}
</>
);
}
createRoot(document.getElementById("root")!).render(
<StrictMode>
<JazzAndAuth>
<App />
</JazzAndAuth>
</StrictMode>,
);

View File

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

View File

@@ -0,0 +1,72 @@
import { createContext, useContext, useEffect, useState } from "react";
type ThemeProviderProps = {
children: React.ReactNode;
defaultTheme?: string;
storageKey?: string;
};
type ThemeProviderState = {
theme: string;
setTheme: (theme: string) => void;
};
const initialState = {
theme: "system",
setTheme: () => null,
};
const ThemeProviderContext = createContext<ThemeProviderState>(initialState);
export function ThemeProvider({
children,
defaultTheme = "system",
storageKey = "vite-ui-theme",
...props
}: ThemeProviderProps) {
const [theme, setTheme] = useState(
() => localStorage.getItem(storageKey) || defaultTheme,
);
useEffect(() => {
const root = window.document.documentElement;
root.classList.remove("light", "dark");
if (theme === "system") {
const systemTheme = window.matchMedia("(prefers-color-scheme: dark)")
.matches
? "dark"
: "light";
root.classList.add(systemTheme);
return;
}
root.classList.add(theme);
}, [theme]);
const value = {
theme,
setTheme: (theme: string) => {
localStorage.setItem(storageKey, theme);
setTheme(theme);
},
};
return (
<ThemeProviderContext.Provider {...props} value={value}>
{children}
</ThemeProviderContext.Provider>
);
}
// eslint-disable-next-line react-refresh/only-export-components
export const useTheme = () => {
const context = useContext(ThemeProviderContext);
if (context === undefined)
throw new Error("useTheme must be used within a ThemeProvider");
return context;
};

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