Compare commits

...

1062 Commits

Author SHA1 Message Date
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
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
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
Trisha Lim
0e521ed8df Add Svelte to docs framework selector 2024-11-29 11:43:00 +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
Trisha Lim
3102523cb1 Set /docs to /docs/react redirect to temporary 2024-11-29 11:33:38 +00:00
Trisha Lim
a939a9b7f7 Fix auth pages 2024-11-29 11:33:38 +00:00
Trisha Lim
33aee5f79f Fix links per framework 2024-11-29 11:33:38 +00:00
Trisha Lim
c80086c33e Remove react section in intro for other frameworks 2024-11-29 11:33:38 +00:00
Trisha Lim
36900c6462 Modify generateStaticParams 2024-11-29 11:33:38 +00:00
Trisha Lim
b02f439db9 Add framework to routes when missing 2024-11-29 11:33:38 +00:00
Trisha Lim
833fe2dac4 Fix links in react project setup page 2024-11-29 11:33:38 +00:00
Trisha Lim
c11d7d0103 Move nextjs project setup to react 2024-11-29 11:33:38 +00:00
Trisha Lim
d92413a4ef Fix links in intro page 2024-11-29 11:33:38 +00:00
Trisha Lim
b51c519187 /docs/react/project-setup/react should not exist 2024-11-29 11:33:38 +00:00
Trisha Lim
4f048b4b6e Add framework to coming-soon routes 2024-11-29 11:33:38 +00:00
Trisha Lim
6a8bc02a60 Add framework selector to mobile nav 2024-11-29 11:33:38 +00:00
Trisha Lim
687e7aca2c Use pathname instead of params to retrieve framework; fixes mobile nav 2024-11-29 11:33:38 +00:00
Trisha Lim
d00f57c2a7 Fix types 2024-11-29 11:33:38 +00:00
Trisha Lim
58f2713218 Redirect /docs to /docs/react 2024-11-29 11:33:38 +00:00
Trisha Lim
b3a0fbb5cd Handle different "done" status per framework 2024-11-29 11:33:38 +00:00
Trisha Lim
696347881b Store selected framework in FrameworkContext 2024-11-29 11:33:38 +00:00
Trisha Lim
4a0299a73f Add component for conditionally rendering md content based on selected framework 2024-11-29 11:33:38 +00:00
Trisha Lim
6883c5212f Add pages for RN and vue guides 2024-11-29 11:33:38 +00:00
Trisha Lim
22d1402b71 Switch frameworks using dropdown 2024-11-29 11:33:38 +00:00
Trisha Lim
6e92baa365 Link /project-setup to respective framework installation guide 2024-11-29 11:33:38 +00:00
Trisha Lim
03541d856f Add framework to route 2024-11-29 11:33:38 +00:00
Trisha Lim
27829e96e8 Set url param for framework 2024-11-29 11:33:38 +00:00
Trisha Lim
65b7930b1b Add framework selector on side nav 2024-11-29 11:33:38 +00:00
Trisha Lim
b909e48532 Revert "Add readme to examples"
This reverts commit feb472742b.
2024-11-29 10:20:39 +00:00
Trisha Lim
1f13002663 Fix package version 2024-11-29 10:20:39 +00:00
Trisha Lim
de1469a22f Add image upload example to examples page 2024-11-29 10:20:39 +00:00
Trisha Lim
ef240c207b Add readme to examples 2024-11-29 10:20:39 +00:00
Trisha Lim
202b32a35a Clean up code on Clerk example 2024-11-29 10:20:39 +00:00
Trisha Lim
f13b305644 Clean up code on passkey example 2024-11-29 10:20:39 +00:00
Trisha Lim
bc3c79ea5d Implement simple image upload 2024-11-29 10:20:39 +00:00
Trisha Lim
55333cf910 Create example app with Demo Auth 2024-11-29 10:20:39 +00:00
Anselm Eickhoff
25c4e234d6 Merge pull request #899 from garden-co/trishalim-jazz-505
Add vue examples to examples page
2024-11-28 19:28:55 +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
Trisha Lim
ab0760f11b Add vue to supported environments section 2024-11-28 17:52:09 +00:00
Trisha Lim
7e75be6941 Add vue examples to examples page 2024-11-28 17:50:39 +00:00
Anselm Eickhoff
67d106e02a Merge pull request #851 from garden-co/benjamin-jazz-523
Add Svelte lib package
2024-11-28 17:34:47 +00:00
Benjamin S. Leveritt
c255dffe0c Remove dependency on svelte-toolbelt 2024-11-28 17:25:42 +00:00
Benjamin S. Leveritt
158f95289e Exclude any svelte example 2024-11-28 16:59:06 +00:00
Benjamin S. Leveritt
a0e560eae6 Add display name 2024-11-28 16:57:00 +00:00
Benjamin S. Leveritt
10e71ad840 Chore: Update lock file 2024-11-28 16:56:23 +00:00
Benjamin S. Leveritt
eeb7d41219 Rename to match chat-vue 2024-11-28 16:54:03 +00:00
Benjamin S. Leveritt
1f475e568f Chore: Update lock file 2024-11-28 16:52:41 +00:00
Benjamin S. Leveritt
f6a9c33809 Fix formatting 2024-11-28 16:50:44 +00:00
Benjamin S. Leveritt
8dfe64b3d7 Rename to Svelte-passkey 2024-11-28 16:49:50 +00:00
Benjamin S. Leveritt
9b834aa8f8 Add experimental warnings to readme 2024-11-28 16:45:37 +00:00
Benjamin S. Leveritt
554e9e5d73 Tweak styles 2024-11-28 16:45:22 +00:00
Benjamin S. Leveritt
dd43df6bd3 Move PasskeyAuthBasicUI into lib 2024-11-28 16:15:42 +00:00
Benjamin S. Leveritt
b4876ff82b Exclude Svelte projects from biome
Biome doesn't support them yet
2024-11-28 16:14:53 +00:00
Benjamin S. Leveritt
fb48171b22 Resets state on logout 2024-11-28 15:51:56 +00:00
Benjamin S. Leveritt
c4202fd21a Add minimal passkey example for svelte 2024-11-28 15:26:54 +00:00
Benjamin S. Leveritt
db73a765e4 Add check for context 2024-11-28 15:26:54 +00:00
Benjamin S. Leveritt
6ae9df74bc Update readme 2024-11-28 15:26:54 +00:00
Benjamin S. Leveritt
786d185b24 Fix imports and formatting 2024-11-28 15:26:54 +00:00
Benjamin S. Leveritt
4c48722e65 Ports Svelte library package from legowhales/jazz-svelte 2024-11-28 15:26:54 +00:00
Anselm Eickhoff
676f2195ab Merge pull request #898 from garden-co/chore/example-projects-ci
Rename chat-clerk to clerk in yaml file
2024-11-28 15:15:52 +00:00
Trisha Lim
45ba926cff Rename chat-clerk to clerk in yaml file 2024-11-28 14:40:21 +00:00
Anselm Eickhoff
a909f2212f Merge pull request #895 from garden-co/changeset-release/main
Version Packages
2024-11-28 12:51:04 +00:00
github-actions[bot]
d55f944238 Version Packages 2024-11-28 12:45:00 +00:00
Anselm Eickhoff
7b557f188b Merge pull request #894 from garden-co/fix/known-message-errors
fix: removed a no more valid error on the known state message sync
2024-11-28 12:43:23 +00:00
Trisha Lim
9ca25d1cdf Add changeset 2024-11-28 10:09:56 +00:00
Trisha Lim
4339e485e2 Update lock file 2024-11-28 10:09:56 +00:00
Trisha Lim
e6dcec2317 Change thumbnail for password manager example 2024-11-28 10:09:56 +00:00
Trisha Lim
057286a8df Add passkey example to examples page 2024-11-28 10:09:56 +00:00
Trisha Lim
b0fa35e11e Replace chat-clerk example with minimal clerk example 2024-11-28 10:09:56 +00:00
Anselm Eickhoff
ae6f3a39c7 Merge pull request #888 from garden-co/changeset-release/main 2024-11-28 07:00:44 +00:00
Guido D'Orsi
e4f110fa9f fix: Removed a no more valid error on the known state message sync 2024-11-28 01:23:24 +01: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
github-actions[bot]
5d72d0a5a0 Version Packages 2024-11-27 14:25:17 +00:00
Anselm Eickhoff
bb874490c5 Write initial "Defining Schemas" docs (#826)
* Document most of CoValue schemas

* Fix typo and broken links

---------

Co-authored-by: Trisha Lim <hello@trishalim.com>
2024-11-27 14:24:05 +00:00
Anselm Eickhoff
a2c6d0cb16 Merge pull request #883 from garden-co/trishalim-jazz-441
Redesign footer
2024-11-27 14:06:46 +00:00
Trisha Lim
fe6648b3a5 Remove github stars iframe 2024-11-27 13:37:20 +00:00
Anselm Eickhoff
c1ab97d976 Merge pull request #886 from bradstdev/patch-1 2024-11-27 09:05:03 +00:00
Benjamin S. Leveritt
3cb27e11dd Chore: Add changeset 2024-11-27 08:14:38 +00:00
bradstdev
50f94c2b81 Make passkeys discoverable
Reference: https://web.dev/articles/webauthn-discoverable-credentials

"To ensure your credentials are created as passkeys (discoverable credentials), specify residentKey and requireResidentKey when the credential is created."

Bitwarden (and possibly other password managers) won't find passkeys created on other devices unless they are discoverable.
2024-11-27 06:32:26 +10:00
Anselm Eickhoff
3937781246 Merge pull request #885 from garden-co/benjamin-jazz-536
Fix comment regarding localStorage
2024-11-26 19:42:54 +00:00
Benjamin S. Leveritt
44bcf6e411 Fix comment regarding localStorage 2024-11-26 19:25:31 +00:00
Trisha Lim
b66206f1a6 Change footer links for jazz 2024-11-26 13:56:13 +00:00
Trisha Lim
973824795e Redesign footer 2024-11-26 13:53:42 +00:00
Trisha Lim
f4974e5975 Fix inconsistent social icons size 2024-11-26 13:29:43 +00:00
Trisha Lim
9099bbf75f Fix grid layout on mobile 2024-11-26 11:41:52 +00:00
Anselm Eickhoff
e1a40b41eb Merge pull request #879 from sventies/patch-1
Check for clerk.user before rendering the app
2024-11-26 11:29:36 +00:00
sventies
9683e24237 Check for clerk.user
Check if we're actually authed before navigating to the app. (as per the code in the docs as well: https://jazz.tools/docs/authentication/auth-methods#clerk)
2024-11-26 12:12:58 +01:00
Trisha Lim
50e122d299 Fix console errors on Button component 2024-11-26 10:57:59 +00:00
Anselm Eickhoff
0ff381b8d5 Merge pull request #872 from garden-co/changeset-release/main 2024-11-25 21:46:23 +00:00
github-actions[bot]
ef7931761a Version Packages 2024-11-25 21:08:25 +00:00
Anselm Eickhoff
da30641856 Merge pull request #829 from garden-co/benjamin-jazz-514 2024-11-25 21:05:46 +00:00
Anselm Eickhoff
01435dc20b Merge pull request #843 from garden-co/benjamin-jazz-494 2024-11-25 21:05:04 +00:00
Anselm Eickhoff
506256e291 Merge pull request #868 from garden-co/jazz-run/json 2024-11-25 21:03:50 +00:00
Anselm Eickhoff
6bb0d38b26 Merge pull request #860 from garden-co/trishalim-jazz-509 2024-11-25 21:03:30 +00:00
Anselm Eickhoff
397ff9ce09 Merge pull request #874 from garden-co/aeplay-jazz-532 2024-11-25 21:02:38 +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
Anselm
df42b2b295 Add changesets 2024-11-25 14:43:37 +00:00
Anselm
aae280b7da Implement and test getting all CoMap edits 2024-11-25 14:41:40 +00:00
Anselm Eickhoff
d1e4ee0fe4 Merge pull request #840 from garden-co/benjamin-jazz-524
Fix `jazz-*-auth-clerk` readmes
2024-11-25 13:35:35 +00:00
Benjamin S. Leveritt
7cfd47b7f3 Add minimal example links 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
c34ce695ea Improves navigation links 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
7666dc6da2 Add documentation for authentication hooks 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
be3ac8aa63 Fix formatting 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
b759668022 Improve browser auth typedocs 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
1ada04f6f4 Add Passphrase section to Auth Methods 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
f3455bc691 Add stub typedocs to browser auth 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
044f61e3d7 Add authentication method page stub 2024-11-25 12:37:47 +00:00
Trisha Lim
6d63f4cf2e Reuse FeatureCard on Coming Soon section 2024-11-25 12:34:23 +00:00
Trisha Lim
b828f41cf0 Renamed LabelledFeatureIcon to FeatureCard 2024-11-25 12:34:23 +00:00
Trisha Lim
14d24888e1 Make coming soon section 4-col 2024-11-25 12:34:23 +00:00
Trisha Lim
29bdb0a120 Add cols prop to GappedGrid component 2024-11-25 12:34:23 +00:00
Trisha Lim
c7ec6baba8 Create card component 2024-11-25 12:34:23 +00:00
Anselm Eickhoff
f8cf198a27 Merge pull request #709 from garden-co/benjamin-jazz-438 2024-11-25 12:32:59 +00:00
Benjamin S. Leveritt
720435e2f2 Add examples to access coFeed 2024-11-25 12:29:57 +00:00
Benjamin S. Leveritt
2dcf6925b4 Add explanation and example for coFeed.push 2024-11-25 12:29:57 +00:00
Benjamin S. Leveritt
55d49a3435 Update CoFeed ensureLoaded
To clarify depth and undefined states
2024-11-25 12:29:57 +00:00
Benjamin S. Leveritt
33d1c11909 Update packages/jazz-tools/src/coValues/coStream.ts
Co-authored-by: Anselm Eickhoff <anselm.eickhoff@gmail.com>
2024-11-25 12:29:57 +00:00
Benjamin S. Leveritt
02ee69672d Update packages/jazz-tools/src/coValues/interfaces.ts
Co-authored-by: Anselm Eickhoff <anselm.eickhoff@gmail.com>
2024-11-25 12:29:57 +00:00
Benjamin S. Leveritt
743f7d068b Tweak CoList docs 2024-11-25 11:51:01 +00:00
Benjamin S. Leveritt
c0a1bb272e Add docs for type ID 2024-11-25 11:49:49 +00:00
Benjamin S. Leveritt
a9f08ebbbe Add a few more notes for coMaps 2024-11-25 11:49:49 +00:00
Benjamin S. Leveritt
0d86b132ea Add more docs to BinaryCoStream docs 2024-11-25 11:49:46 +00:00
Benjamin S. Leveritt
5114bbec88 Add FileStream docs 2024-11-25 11:46:38 +00:00
Benjamin S. Leveritt
29deedb163 Add coStream docs 2024-11-25 11:39:05 +00:00
Benjamin S. Leveritt
a322a0e3b5 Add more coStream docs 2024-11-25 11:35:19 +00:00
Benjamin S. Leveritt
4fea86141f Fix description 2024-11-25 11:34:47 +00:00
Benjamin S. Leveritt
d923d45a82 Add some initial coStream docs 2024-11-25 11:34:11 +00:00
Trisha Lim
ff52fb3275 Add loading state to button 2024-11-25 10:42:16 +00:00
Anselm
c65a8806f6 Test current CoMap _edits behavior 2024-11-25 10:16:00 +00:00
Trisha Lim
8c8a5b242a Add Gio to team page 2024-11-25 10:03:25 +00:00
Benjamin S. Leveritt
d020ee2825 Merge pull request #856 from garden-co/trishalim-jazz-522
API Reference: typography and spacing adjustments
2024-11-23 07:26:36 +00:00
Guido D'Orsi
2e2a13f22d feat(account): add --json option to output the account info as json 2024-11-22 22:49:05 +01:00
Trisha Lim
b1056c2ed3 Add env var names to turbo.json 2024-11-22 19:31:37 +00:00
Guido D'Orsi
e00489d8ee Merge pull request #865 from garden-co/fix/less-reads-on-known-state
chore(SyncStateSubscriptionManager): improve the internal API
2024-11-22 18:21:39 +01:00
Anselm Eickhoff
1e08581049 Merge pull request #864 from garden-co/changeset-release/main
Version Packages
2024-11-22 17:20:42 +00:00
Guido D'Orsi
5a5f886bdf chore: formatting 2024-11-22 18:20:41 +01:00
Guido D'Orsi
e5c575ec10 chore(SyncStateSubscriptionManager): improve the internal API 2024-11-22 18:18:44 +01:00
github-actions[bot]
68c2b2598e Version Packages 2024-11-22 17:17:04 +00:00
Anselm Eickhoff
c0ba15cca8 Merge pull request #863 from garden-co/fix/less-reads-on-known-state
perf(SyncStateSubscriptionManager): make the isUploaded computation lazy
2024-11-22 17:15:49 +00:00
Trisha Lim
3e0493f88f Create social links component 2024-11-22 17:07:17 +00:00
Guido D'Orsi
e511d6d56a chore: changeset 2024-11-22 18:03:10 +01:00
Guido D'Orsi
53f4b23c0a perf(SyncStateSubscriptionManager): make the isUploaded computation lazy 2024-11-22 18:02:07 +01:00
Anselm Eickhoff
749a424cf1 Merge pull request #862 from garden-co/changeset-release/main
Version Packages
2024-11-22 16:54:32 +00:00
github-actions[bot]
33c4ef902d Version Packages 2024-11-22 16:52:40 +00:00
Anselm Eickhoff
e2e3751172 Merge pull request #858 from garden-co/fix/improve-peers-close
fix: reduce noise on Peer close and increase load timeout
2024-11-22 16:50:30 +00:00
Anselm Eickhoff
6c62f4be5d Merge pull request #861 from garden-co/optimize-known-state
Optimize known state
2024-11-22 16:50:16 +00:00
Anselm
0a2fae3830 Add changeset 2024-11-22 16:44:16 +00:00
Anselm
4ab533af6b More optimised way to get knownState 2024-11-22 16:44:03 +00:00
Trisha Lim
0fa017d148 Add newsletter subscription form to jazz footer 2024-11-22 16:42:31 +00:00
Guido D'Orsi
99cda2f33d fix: reduce noise on Peer close and increase load timeout 2024-11-22 17:23:31 +01:00
Trisha Lim
7c4f519ca1 Move NewsletterForm component to design system 2024-11-22 16:18:42 +00:00
Anselm Eickhoff
e4fcafd576 Merge pull request #857 from garden-co/changeset-release/main
Version Packages
2024-11-22 15:46:42 +00:00
github-actions[bot]
a9cff03bcb Version Packages 2024-11-22 15:35:56 +00:00
Anselm Eickhoff
26324d4b1e Merge pull request #853 from garden-co/fix/improve-peers-close
fix: clean the queues on peers close
2024-11-22 15:32:43 +00:00
Anselm Eickhoff
bd022ffd5e Merge pull request #854 from garden-co/fix/offline-support-and-faster-load
fix: restore offline support and faster load when storage is active
2024-11-22 15:32:31 +00:00
Trisha Lim
94e3922efc Adjust scroll margin in API Reference pages; fixes #830 2024-11-22 15:00:50 +00:00
Guido D'Orsi
dcc9c2e376 chore: changeset 2024-11-22 15:53:14 +01:00
Guido D'Orsi
48edcaff37 fix: clean the queues on peers close 2024-11-22 15:49:42 +01:00
Trisha Lim
a18ed077ca API Ref: make headings more prominent 2024-11-22 14:48:16 +00:00
Guido D'Orsi
7780346208 fix(jazz-browser): fix unitialized variable when loading offline 2024-11-22 15:36:02 +01:00
Guido D'Orsi
699553fe9f chore: changeset 2024-11-22 10:11:30 +01:00
Guido D'Orsi
bdd5ad7eb1 fix: restore offline support and faster load when storage is active 2024-11-22 10:09:56 +01:00
Benjamin S. Leveritt
28fea37446 Fix comment block for rendering with TypeDoc 2024-11-21 20:23:24 +00:00
Benjamin S. Leveritt
61915fe3ed Split doc-generation scripts into separate commands
Easier to run individually
2024-11-21 20:23:24 +00:00
Guido D'Orsi
a6942030d4 Merge pull request #848 from garden-co/benjamin-jazz-528
Chore: Bump turbo to v2
2024-11-21 18:21:05 +01:00
Benjamin S. Leveritt
905c6b312b Chore: Bump turbo to v2 2024-11-21 17:00:10 +00: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
Benjamin S. Leveritt
1a4bda09ca Chore: Add changesets to bump Npm 2024-11-21 08:24:18 +00:00
Benjamin S. Leveritt
815f54fafb Fix readmes 2024-11-21 08:20:49 +00:00
Trisha Lim
fc845cc930 Fix url for sharing in chat demo 2024-11-20 21:39:26 +00:00
Trisha Lim
0e6ea3f762 Fix chat demo opens 2 different chat rooms 2024-11-20 21:20:09 +00:00
Anselm Eickhoff
f0060e0355 Merge pull request #836 from garden-co/changeset-release/main
Version Packages
2024-11-20 18:42:06 +00:00
github-actions[bot]
9e9788395c Version Packages 2024-11-20 18:41:39 +00:00
Anselm Eickhoff
6371c7689f Merge pull request #835 from garden-co/covalue-state-fix
Send empty known state on all states except available
2024-11-20 18:40:16 +00:00
Anselm
605734c71c Add changeset 2024-11-20 18:39:40 +00:00
Anselm
db5227b463 Send empty known state on all states except available 2024-11-20 18:39:28 +00:00
Anselm Eickhoff
7ed748a0f6 Merge pull request #828 from garden-co/changeset-release/main
Version Packages
2024-11-20 15:55:22 +00:00
github-actions[bot]
8492dd9501 Version Packages 2024-11-20 15:54:55 +00:00
Anselm Eickhoff
b957085e02 Merge pull request #827 from garden-co/gudorsi-jazz-519
fix(coValueState): once a coValue is loaded send the known state to the rest of the peers
2024-11-20 15:53:43 +00:00
Guido D'Orsi
75fdff431a chore: changeset 2024-11-20 16:40:17 +01:00
Guido D'Orsi
a5559529ae fix(coValueState): once a coValue is loaded send the known state to the rest of the peers 2024-11-20 16:39:16 +01:00
Anselm Eickhoff
2c74fdaa71 Merge pull request #824 from garden-co/changeset-release/main
Version Packages
2024-11-20 15:03:53 +00:00
github-actions[bot]
2b16a97f7a Version Packages 2024-11-20 14:10:12 +00:00
Anselm Eickhoff
e5f135b82a Merge pull request #748 from garden-co/trishalim-jazz-193
Show two chat demos side by side
2024-11-20 14:09:00 +00:00
Anselm Eickhoff
0fa0cb2338 Merge pull request #822 from garden-co/changeset-release/main
Version Packages
2024-11-20 14:01:40 +00:00
github-actions[bot]
7e7b6b981a Version Packages 2024-11-20 13:59:34 +00:00
Anselm Eickhoff
f762afd361 Merge pull request #821 from garden-co/fix-sqlite-new-piece
fix(sqlite): reference piece.new instead of piece
2024-11-20 13:58:27 +00:00
pax-k
63d46c985c chore: changeset 2024-11-20 15:57:43 +02:00
pax-k
e5b89e2f96 fix(sqlite): reference piece.new instead of piece 2024-11-20 15:52:45 +02:00
Trisha Lim
eae724a9f3 Build fix 2024-11-20 12:48:59 +00:00
Trisha Lim
b14eb2106a Add chat url with copy button 2024-11-20 12:33:37 +00:00
Trisha Lim
379e56efe9 Fix missing key 2024-11-20 12:33:19 +00:00
Trisha Lim
caf682fecd Move testimonial out of chat demo section 2024-11-20 12:33:19 +00:00
Anselm
2f6d3ac8e6 Better approach to hide logout button in demo 2024-11-20 12:33:19 +00:00
Trisha Lim
ed80b52ad3 Cover log out button with a div 2024-11-20 12:33:19 +00:00
Trisha Lim
a64690e5f3 dont hide logout 2024-11-20 12:33:19 +00:00
Trisha Lim
3bcacecbad Revert "return username to DemoAuthState"
This reverts commit 71a49763b0c4ad4209ce224822d31960fbbaa8df.
2024-11-20 12:33:19 +00:00
Trisha Lim
01e3e8a954 Revert "DemoAuth: logout if logged in user doesnt match user param"
This reverts commit 3966d58197557aa3834da7caafb6e63cf792e078.
2024-11-20 12:33:19 +00:00
Trisha Lim
9adcfc2cd9 DemoAuth: logout if logged in user doesnt match user param 2024-11-20 12:33:19 +00:00
Trisha Lim
738bf3a1bb return username to DemoAuthState 2024-11-20 12:33:19 +00:00
Trisha Lim
59d37df8a2 add changeset 2024-11-20 12:33:19 +00:00
Trisha Lim
8b63994048 hide demo-specific logic in chat example 2024-11-20 12:33:18 +00:00
Trisha Lim
f1a7478331 increase font size in chat app 2024-11-20 12:33:18 +00:00
Trisha Lim
a713d4ad51 Move retrieving of user from url into DemoAuthBasicUI 2024-11-20 12:33:18 +00:00
Trisha Lim
f33aa5c28a Hide log out button 2024-11-20 12:33:18 +00:00
Trisha Lim
2ec7e5f287 Set different color on message bubble for sender 2024-11-20 12:33:18 +00:00
Trisha Lim
e7d96c9c76 Name chat users Alice and Bob 2024-11-20 12:33:18 +00:00
Trisha Lim
c1e49fe727 Remove renderCodeSamples.mjs 2024-11-20 12:33:18 +00:00
Trisha Lim
812b13ecbd Clean up 2024-11-20 12:33:18 +00:00
Trisha Lim
0e6eb7a592 Rename component 2024-11-20 12:33:18 +00:00
Trisha Lim
9f8506fe76 Styling for chat demo section 2024-11-20 12:33:18 +00:00
Guido D'Orsi
f62f227e14 fix: remove async 2024-11-20 12:33:18 +00:00
Guido D'Orsi
3e17c0e221 fix: improve chat loading 2024-11-20 12:33:18 +00:00
Trisha Lim
1af61c8895 add logs 2024-11-20 12:33:18 +00:00
Trisha Lim
0c781d28f7 fix window is undefined 2024-11-20 12:33:18 +00:00
Trisha Lim
a93db84530 rename component 2024-11-20 12:33:18 +00:00
Guido D'Orsi
b529ae3c55 fix: hack a solution for the chat rooms sync 2024-11-20 12:33:18 +00:00
Trisha Lim
a6780401b5 pass user 2024-11-20 12:33:18 +00:00
Trisha Lim
b7ef6db1f6 simplify 2024-11-20 12:33:18 +00:00
Trisha Lim
9d089ab94f remove listener 2024-11-20 12:33:18 +00:00
Anselm Eickhoff
3b7a5c0e9d Merge pull request #820 from garden-co/changeset-release/main
Version Packages
2024-11-20 12:28:37 +00:00
github-actions[bot]
7dc2a2828e Version Packages 2024-11-20 12:15:10 +00:00
Anselm Eickhoff
ea93cacd45 Merge pull request #819 from garden-co/fuzzyobject-jazz-501
fix: 'ErrorLoadingCoValueCore',  IndexedDB peer doesn't deliver dependencies
2024-11-20 12:13:48 +00:00
Anselm Eickhoff
162da453ca Update .changeset/cool-readers-share.md 2024-11-20 12:13:35 +00:00
Marina Orlova
e17e959307 Add changeset 2024-11-20 13:08:39 +01:00
Marina Orlova
0d43b2edbc Fix Error - 'ErrorLoadingCoValueCore' 2024-11-20 12:44:19 +01:00
pax-k
9b220b17de fix(docs): updated docs for SchemaUnion 2024-11-20 13:43:10 +02:00
Anselm Eickhoff
d4a1aab5d5 Merge pull request #797 from garden-co/benjamin-jazz-503
Add minimal PasskeyAuth example
2024-11-20 11:28:50 +00:00
Benjamin S. Leveritt
32b258a966 Remove MinimalAccount for ultra-minimalism 2024-11-20 11:19:08 +00:00
Benjamin S. Leveritt
6846f74bc5 Chore: Update pnpm lock 2024-11-20 11:11:19 +00:00
Benjamin S. Leveritt
5fc3e7b700 Add biome formatter 2024-11-20 11:08:42 +00:00
Benjamin S. Leveritt
6a799b0d65 Update readme 2024-11-20 11:08:42 +00:00
Benjamin S. Leveritt
0a88aeb5a9 Finish really minimal example 2024-11-20 11:08:42 +00:00
Benjamin S. Leveritt
28ae36391b Add new minimal passkey auth example 2024-11-20 11:08:42 +00:00
Anselm Eickhoff
cf5c636fdd Merge pull request #795 from garden-co/changeset-release/main
Version Packages
2024-11-20 10:56:19 +00:00
github-actions[bot]
3f04b75418 Version Packages 2024-11-20 10:55:28 +00:00
Anselm Eickhoff
6a7047f862 Merge pull request #814 from garden-co/benjamin-jazz-506
Add minimal Clerk example
2024-11-20 10:54:29 +00:00
Benjamin S. Leveritt
640559c56f Chore: update pnpm lock 2024-11-20 10:35:22 +00:00
Anselm Eickhoff
9ef6264ff3 Merge pull request #798 from garden-co/JAZZ-498-schema-union-of
SchemaUnion.Of() implementation
2024-11-20 10:31:06 +00:00
Benjamin S. Leveritt
2ac09180a5 Add formatter/linter 2024-11-20 10:07:49 +00:00
Benjamin S. Leveritt
588129b311 Update readme 2024-11-20 09:19:13 +00:00
Benjamin S. Leveritt
0c95d4af0b Add clerk integration 2024-11-20 09:17:20 +00:00
Benjamin S. Leveritt
807846ae79 Add initial minimal app 2024-11-20 08:09:51 +00:00
Anselm
b92b17340e Export SchemaUnion from package 2024-11-19 14:48:11 +00:00
Anselm Eickhoff
0f3d239500 Merge pull request #804 from gardencmp/trishalim-jazz-453
Use sentence case for headings
2024-11-19 12:33:03 +00:00
pax-k
eec30fbcdf fix: SchemaUnion docs 2024-11-19 13:49:27 +02:00
Anselm Eickhoff
f382656d77 Merge pull request #780 from gardencmp/fix/peer-state-delete-on-close
fix(SyncManager): add flag to delete peers on close
2024-11-19 11:45:35 +00:00
Anselm Eickhoff
4d8a6400e0 Merge pull request #759 from gardencmp/gudorsi-jazz-418
feat: retry unavailable coValues
2024-11-19 11:43:12 +00:00
pax
cf5bd53dbb Update .changeset/warm-readers-invite.md
Co-authored-by: Guido D'Orsi <gu.dorsi@gmail.com>
2024-11-19 13:05:19 +02:00
Anselm Eickhoff
66a30e8041 Merge pull request #801 from gardencmp/fuzzyobject-jazz-504
Rename BinaryCoStream to FileStream
2024-11-19 11:02:32 +00:00
Anselm Eickhoff
a4d2f2dd26 Merge pull request #800 from gardencmp/trishalim-jazz-490
Move API reference to top level menu
2024-11-19 10:59:52 +00:00
Guido D'Orsi
5724735a95 chore(sync): improve comment on the unavailable logic 2024-11-19 10:30:07 +01:00
Trisha Lim
5f9c018106 Use sentence case in Jazz Cloud 2024-11-18 20:07:21 +00:00
Trisha Lim
24c018f1f2 Use sentence case in docs 2024-11-18 20:02:38 +00:00
Guido D'Orsi
6f745be39a chore: changeset 2024-11-18 20:53:58 +01:00
Guido D'Orsi
29703797cf chore(retry): remove the retryUnavailableCoValues flag 2024-11-18 20:53:00 +01:00
Marina Orlova
2241ad4089 rename folder back to e2e/BinaryCoStream 2024-11-18 20:07:39 +01:00
Trisha Lim
aed769f7b3 Update Marina's links 2024-11-18 18:47:51 +00:00
Marina Orlova
d348c2d021 Add changeset 2024-11-18 19:05:57 +01:00
Marina Orlova
e5f68904ed Rename BinaryCoStream to FileStream 2024-11-18 19:03:42 +01:00
Trisha Lim
0aebbdc2fc Fix placement of sticky bar 2024-11-18 17:07:58 +00:00
Trisha Lim
665a099013 Fix TOC placement 2024-11-18 17:07:58 +00:00
Trisha Lim
c70131aece Change references to api reference route 2024-11-18 17:07:56 +00:00
Trisha Lim
d78f590712 Reuse docs layout 2024-11-18 17:07:39 +00:00
Trisha Lim
7033ae968f Move API reference to top level menu 2024-11-18 17:07:39 +00:00
Guido D'Orsi
124bf670a2 chore: changeset 2024-11-18 17:52:15 +01:00
pax-k
f4acb91d51 fix: ignore type error 2024-11-18 18:52:05 +02:00
pax-k
47a5047ec8 chore: pnpm lock 2024-11-18 18:51:51 +02:00
pax-k
877596f389 chore: added typedoc for SchemaUnion 2024-11-18 18:44:34 +02:00
Marina Orlova
6902b5bb91 Add changeset for Rename CoStream to CoFeed 2024-11-18 17:38:17 +01:00
pax-k
e914f11d9e fix: export schemaUnion 2024-11-18 18:37:54 +02:00
pax-k
1a0cd3df7f chore: changeset 2024-11-18 18:33:58 +02:00
pax-k
d9a78739a5 feat: implemented SchemaUnion.Of() 2024-11-18 18:33:29 +02:00
Anselm Eickhoff
756528e18e Merge pull request #790 from gardencmp/trishalim-jazz-474
Fix: page reloads when clicking a link inside mdx
2024-11-18 15:12:11 +00:00
Anselm Eickhoff
466e587fba Merge pull request #794 from gardencmp/benjamin-jazz-502
PassphraseAuth - Move saving credentials into `saveCredentials`
2024-11-18 15:11:35 +00:00
Anselm Eickhoff
22caae870d Merge pull request #789 from gardencmp/docs/getting-started
Rewrite docs introduction
2024-11-18 15:10:59 +00:00
Anselm Eickhoff
435fc0c917 Merge pull request #768 from gardencmp/fuzzyobject-jazz-491
Enhance onboarding test - add page context
2024-11-18 15:05:52 +00:00
Anselm Eickhoff
3dfce294d4 Merge pull request #777 from gardencmp/benjamin-jazz-481
Fix readme for jazz-react-auth-clerk
2024-11-18 15:05:18 +00:00
Anselm Eickhoff
90be185094 Merge pull request #784 from gardencmp/vscode-settings
chore: remove .vscode/settings.json and add it to .gitignore
2024-11-18 15:04:46 +00:00
Anselm Eickhoff
9eac8633b5 Merge pull request #792 from gardencmp/benjamin-jazz-495
Fix PasskeyAuth forgetting authentication on reload
2024-11-18 15:04:30 +00:00
Anselm Eickhoff
007c462362 Merge pull request #783 from gardencmp/benjamin-jazz-497
Tweak 'Docs coming soon' copy
2024-11-18 15:03:41 +00:00
Benjamin S. Leveritt
e442bb820b Add changeset 2024-11-18 14:35:58 +00:00
Benjamin S. Leveritt
3f7235c6f7 Moves saving credentials into saveCredentials
To match other implementations
2024-11-18 14:21:43 +00:00
Benjamin S. Leveritt
56d94bd8cd Add saveCredentials on successful login 2024-11-18 13:55:29 +00:00
Anselm Eickhoff
cb937c4335 Merge pull request #757 from gardencmp/fuzzyobject-jazz-460
Rename CoStream to CoFeed
2024-11-18 13:45:14 +00:00
Trisha Lim
b4e31657a0 Fix typo 2024-11-18 12:36:39 +00:00
Trisha Lim
f6bf75890a fix: page reloads when clicking a link inside mdx 2024-11-18 12:16:37 +00:00
Trisha Lim
5bb1ad4c42 Move vue up the nav 2024-11-18 12:05:45 +00:00
Trisha Lim
3ed74b6b1d Write intro in react guide 2024-11-18 12:00:34 +00:00
Trisha Lim
823a343fe1 Rewrite docs intro page 2024-11-18 11:56:29 +00:00
Guido D'Orsi
5b3c3fff7b chore: remove .vscode/settings.json and add it to .gitignore 2024-11-18 11:46:43 +01:00
Benjamin S. Leveritt
e3f1c49fdd Tweak copy 2024-11-18 10:10:50 +00:00
Guido D'Orsi
42765020e5 fix(SyncManager): add flag to delete peers on close 2024-11-18 10:35:38 +01:00
Benjamin S. Leveritt
6cc7a905f8 Fix readme 2024-11-18 09:06:42 +00:00
Guido D'Orsi
75753f1d37 chore(CoValueState): simplify the dispatch action 2024-11-18 01:22:46 +01:00
Guido D'Orsi
6c113e7bf0 chore(CoValueState): improve comments 2024-11-18 01:12:22 +01:00
Guido D'Orsi
53a74e1b7d Merge pull request #775 from gardencmp/feature/-co-value-store
chore(LocalNode): move the coValues states management in a CoValueStore
2024-11-18 00:35:26 +01:00
Guido D'Orsi
c63b538251 chore(LocalNode): move the coValues states management in a CoValueStore 2024-11-18 00:34:44 +01:00
Guido D'Orsi
f8c3b495e0 chore(CoValueState): improve the internal state transition management 2024-11-18 00:19:31 +01:00
Guido D'Orsi
a05d90dc6b chore(CoValueState): remove resolution property because unused 2024-11-18 00:02:13 +01:00
Guido D'Orsi
307e7fcd3c fix(coValueState): keep the value consistent with the current state 2024-11-17 23:57:40 +01:00
Guido D'Orsi
d0ff589447 fix(found-in-peer): always set the state to available 2024-11-17 16:01:20 +01:00
Guido D'Orsi
f6cb4f1225 chore(sync): improve the noElegiblePeers handling in handleKnownState 2024-11-17 15:28:18 +01:00
Guido D'Orsi
1141a23a37 chore(CoValueState): move all the state updates in the dispatch function 2024-11-17 15:01:17 +01:00
Guido D'Orsi
05497d5f77 perf(loadFromPeers): exit early if the value is resolved in between retries 2024-11-16 20:43:28 +01:00
Guido D'Orsi
bb126009c8 fix(coValueState): check if the coValue has become available in between of the retries 2024-11-16 19:28:57 +01:00
Guido D'Orsi
cee7beb02a chore(sync): add a comment on the not-found logic 2024-11-16 15:11:16 +01:00
Guido D'Orsi
5f12e31a80 test(onboarding): increase the waiting to 3s 2024-11-16 14:52:38 +01:00
Guido D'Orsi
5f96a6fef2 choe(onboarding): remove the local sync logic from the playwright config and support peer override in the app 2024-11-16 14:39:52 +01:00
Guido D'Orsi
08db39ef2f test(onboarding): move the timeout waiting before the invite navigation 2024-11-16 14:38:53 +01:00
Guido D'Orsi
67029e00c7 test: add the unavailable retry e2e test 2024-11-16 13:19:06 +01:00
Marina Orlova
2b520e938e Take out acceptInvite 2024-11-16 13:16:31 +01:00
Marina Orlova
63568273db Take out acceptInvite 2024-11-16 13:12:29 +01:00
Marina Orlova
16702702c8 fix onboarding test - add context 2024-11-16 13:12:29 +01:00
Guido D'Orsi
cab4f1f89c chore: remove the waitForCoValue workaround from the example apps 2024-11-16 12:51:05 +01:00
Guido D'Orsi
45df82ed16 feat: retry unavailable coValues 2024-11-16 12:46:40 +01:00
Guido D'Orsi
6610aea708 Merge pull request #761 from gardencmp/changeset-release/main
Version Packages
2024-11-15 20:30:51 +01:00
github-actions[bot]
f6b6c01852 Version Packages 2024-11-15 18:40:37 +00:00
Trisha Lim
63f9aa6b97 fix: active route styling on docs 2024-11-15 18:39:20 +00:00
pax-k
822eb22da6 fix(docs): fix github URL reference 2024-11-15 20:22:46 +02:00
Anselm Eickhoff
fdf3c6e93d Merge pull request #742 from gardencmp/vue-docs
Vue docs
2024-11-15 18:06:41 +00:00
Guido D'Orsi
de38161023 Merge pull request #770 from gardencmp/gudorsi-jazz-492
fix(useAcceptInvite): trigger the onAccept callback on hashchange
2024-11-15 18:50:15 +01:00
Guido D'Orsi
59cc64d697 fix(useAcceptInvite): trigger the onAccept callback on hashchange 2024-11-15 18:33:27 +01:00
pax-k
55c249834a chore(docs): cleanup 2024-11-15 19:26:16 +02:00
pax-k
dd189abd4a chore: pnpm lock 2024-11-15 19:16:32 +02:00
pax-k
df1a8e9c99 feat: vue docs 2024-11-15 19:13:19 +02:00
pax-k
259467ac3f Merge branch 'main' into vue-docs 2024-11-15 19:09:34 +02:00
Anselm Eickhoff
9a93ab2476 Merge pull request #767 from gardencmp/aeplay-jazz-447
Implement dynamic tables of content
2024-11-15 17:02:39 +00:00
Anselm
337272bbdc Merge branch 'main' into aeplay-jazz-447 2024-11-15 16:56:36 +00:00
pax-k
464ef7d9c3 chore: cleanup 2024-11-15 18:50:27 +02:00
pax-k
8727089654 Merge branch 'aeplay-jazz-447' of https://github.com/gardencmp/jazz into aeplay-jazz-447 2024-11-15 18:45:57 +02:00
pax-k
753bceddb3 fix: SSG for docs 2024-11-15 18:44:47 +02:00
Trisha Lim
8202996108 fix: TOC grows too wide if text is long 2024-11-15 16:31:21 +00:00
Trisha Lim
1385c8a66f Remove custom IDs on headings in mdx files 2024-11-15 15:48:02 +00:00
Anselm
2a72942f8e Implement dynamic ToCs 2024-11-15 15:34:35 +00:00
Anselm Eickhoff
e16836becc Merge pull request #765 from gardencmp/trishalim-jazz-480
Move examples page outside of docs
2024-11-15 15:21:06 +00:00
Trisha Lim
134a101a52 Center align book app thumbnail 2024-11-15 14:11:12 +00:00
Trisha Lim
3fc6030776 Update music player thumbnail 2024-11-15 14:08:40 +00:00
Anselm Eickhoff
8aebe61bf9 Merge pull request #762 from gardencmp/trishalim-jazz-440
Put social icons back to nav
2024-11-15 13:58:08 +00:00
Trisha Lim
8c9e807c19 Move examples page outside of docs 2024-11-15 12:07:42 +00:00
Trisha Lim
e25e4080c7 Reduce large prose font size 2024-11-15 12:04:17 +00:00
Trisha Lim
70a8353fe6 Remove roadmap link from footer 2024-11-15 11:53:54 +00:00
Trisha Lim
185b0d866a Replace Twitter with X 2024-11-15 11:53:41 +00:00
Trisha Lim
717667ac4c Fix color of garden logo 2024-11-15 11:51:24 +00:00
Trisha Lim
a0151caf02 Put social icons back to nav 2024-11-15 11:48:19 +00:00
Guido D'Orsi
c259331f57 Merge pull request #752 from gardencmp/reuse-crypto
fix: reuse the crypto instance when creating the browser context
2024-11-15 12:33:35 +01:00
Guido D'Orsi
f6bc8afa06 chore: changeset 2024-11-15 12:21:47 +01:00
Anselm Eickhoff
cee0aea5e6 Merge pull request #713 from gardencmp/trishalim-jazz-440
Redesign main nav on desktop
2024-11-15 11:20:28 +00:00
Anselm Eickhoff
c0e11f543d Merge pull request #741 from gardencmp/marina-onboarding-example
Onboarding example
2024-11-15 10:57:51 +00: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
Marina Orlova
b38f902d70 Add backward-compatible aliases for CoFeed* 2024-11-14 22:30:58 +01:00
Marina Orlova
a6085094a7 Rename CoStream -> CoFeed in jazz-tools 2024-11-14 18:57:44 +01:00
pax
df359ab6dd Update selfish-wolves-shout.md 2024-11-14 17:01:28 +02:00
Anselm Eickhoff
d89da07d42 Merge pull request #753 from gardencmp/bensleveritt-patch-1
Fix mesh reference
2024-11-14 11:37:46 +00:00
pax
94098c1f1f Merge pull request #755 from gardencmp/JAZZ-485-docs-pin-react-native-deps
Updated react-native docs and removed babel config section
2024-11-14 12:07:25 +02:00
pax-k
e71e83a217 Merge branch 'main' into JAZZ-485-docs-pin-react-native-deps 2024-11-14 11:58:30 +02:00
pax-k
df0b21caed chore: pnpm lock 2024-11-14 11:58:06 +02:00
Anselm Eickhoff
6921e621d7 Merge pull request #749 from gardencmp/changeset-release/main
Version Packages
2024-11-14 09:41:28 +00:00
pax-k
ec9e03c266 fix: updated react-native docs and removed babel config section 2024-11-14 11:40:27 +02:00
github-actions[bot]
1b0ef401fb Version Packages 2024-11-14 09:29:38 +00:00
pax
1833983b8d Merge pull request #754 from gardencmp/jazz-tools-ts-target
Change jazz-tools TS target to ES2021
2024-11-14 11:28:21 +02:00
pax-k
149ca97c48 chore: changeset 2024-11-14 11:15:25 +02:00
pax-k
f01a7621b0 fix: change jazz-tools TS target to ES2021 2024-11-14 11:13:13 +02:00
Benjamin S. Leveritt
e6a1e2f169 Fix mesh reference 2024-11-14 06:32:10 +00:00
Guido D'Orsi
6413059709 fix: assign a unique name to the IndexedDB storage peer 2024-11-13 20:14:22 +01:00
Guido D'Orsi
3c6fd37aba fix: reuse the crypto instance when creating the browser context 2024-11-13 18:39:49 +01:00
Marina Orlova
8dc90a3554 Fixed Jazz workspace versions 2024-11-13 18:26:15 +01:00
Guido D'Orsi
d6638742b0 feat(music-player): use group inheritance for the Playlist sharing 2024-11-13 18:13:37 +01:00
Marina Orlova
51b1818de6 Fix group creation 2024-11-13 16:19:48 +01:00
Anselm Eickhoff
ec7c416097 Merge pull request #744 from gardencmp/better-known-state
fix: dispatch more updates to knownState
2024-11-13 14:16:50 +00:00
Guido D'Orsi
0f30eeaec6 chore: changeset 2024-11-13 15:12:18 +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
Guido D'Orsi
5a3cf04ba7 fix: dispatch more updates to knownState 2024-11-13 12:32:24 +01:00
pax-k
1fe74be8af fix(jazz-vue): useCoState accepts id as either a ref or a plain value 2024-11-13 12:47:05 +02:00
pax-k
376032f54c chore: cleanup 2024-11-13 11:39:23 +02:00
Anselm Eickhoff
d6e744d948 Merge pull request #738 from gardencmp/changeset-release/main 2024-11-12 22:11:31 +00:00
github-actions[bot]
23b3acb58c Version Packages 2024-11-12 22:10:32 +00:00
Anselm Eickhoff
f32d0c1fad Merge pull request #743 from gardencmp/fix/react-provider-multiple-storage
fix: fixes the react provider intialization when multiple storage options are provided
2024-11-12 22:09:16 +00:00
Guido D'Orsi
a69ed0b7cd chore: changeset 2024-11-12 22:43:19 +01:00
Guido D'Orsi
b4d7024b98 fix: fixes the react provider intialization when multiple storage options are provided 2024-11-12 22:42:27 +01:00
Marina Orlova
222a2ce2e6 Fixed test 2024-11-12 20:41:26 +01:00
Marina Orlova
34a50a9173 Adds the app into Playwright Tests job 2024-11-12 20:28:15 +01:00
Marina Orlova
72c6198ef7 Adds tests 2024-11-12 20:28:15 +01:00
Marina Orlova
e4df1048c8 pnpm-lock 2024-11-12 20:28:15 +01:00
Marina Orlova
e8abd06406 Fix schema 2024-11-12 20:28:15 +01:00
Marina Orlova
968c2bd699 Onboarding app: Make tests run 2024-11-12 20:28:15 +01:00
Marina Orlova
12b6a3b291 Add path alias 2024-11-12 20:28:15 +01:00
Marina Orlova
c9f89e9c32 Adds onboarding example 2024-11-12 20:28:15 +01:00
pax-k
d27cff5c67 feat(docs): added VueJS docs 2024-11-12 20:41:53 +02:00
pax-k
a734530cc3 chore: added changeset 2024-11-12 19:55:58 +02:00
pax-k
cc51926d14 chore: biome fix 2024-11-12 19:53:52 +02:00
Guido D'Orsi
c0395dd0a3 Merge pull request #723 from gardencmp/feature/typescript-as-dev
fix: set up typescript as dev dependency
2024-11-12 18:48:28 +01:00
Guido D'Orsi
51d7ca09d9 Merge remote-tracking branch 'origin/main' into feature/typescript-as-dev 2024-11-12 18:41:56 +01:00
pax-k
fce808cc48 fix(chat-vue): pass computed(id) to useCoState 2024-11-12 19:37:49 +02:00
pax-k
4a9217eb25 fix(jazz-vue): useCoState reactive to id 2024-11-12 19:36:46 +02:00
pax-k
69df98f4fa feat(todo-vue): implemented a Todo demo app for jazz-vue 2024-11-12 19:35:59 +02:00
Anselm
75339c0939 Merge branch 'main' into aeplay-jazz-12 2024-11-12 15:27:29 +00:00
Anselm Eickhoff
cf0a38d6bf Merge pull request #739 from gardencmp/fix/autologin
Move auto login check to useEffect
2024-11-12 10:56:35 +00:00
Trisha Lim
dd9b13fbaa Add changeset 2024-11-11 20:37:22 +00:00
Trisha Lim
6a982a29cb Move auto login check to useEffect 2024-11-11 20:35:41 +00:00
Anselm Eickhoff
ebc1b03158 Merge pull request #737 from gardencmp/feat/demo-auth-user-prop 2024-11-11 19:41:24 +00:00
Trisha Lim
adaf01f7fa Add bg blur effect on popover 2024-11-11 19:37:41 +00:00
Trisha Lim
c048f4eda9 Increase spacing in popover 2024-11-11 19:37:41 +00:00
Trisha Lim
b06272ff17 Layout fix 2024-11-11 19:37:40 +00:00
Trisha Lim
ac37bfab2d Close popover on click of link 2024-11-11 19:37:40 +00:00
Trisha Lim
d8e50824cb Add description and icon to mega menu items 2024-11-11 19:37:40 +00:00
Trisha Lim
29b27291a3 Links placement in desktop nav 2024-11-11 19:37:40 +00:00
Trisha Lim
efa1b60585 Add mobile nav 2024-11-11 19:37:39 +00:00
Trisha Lim
9d0b39c5cb Add popover menu to main nav using headless 2024-11-11 19:37:18 +00:00
Trisha Lim
2a02a5b212 Remove unused shadcn configs 2024-11-11 19:37:18 +00:00
Trisha Lim
c6931b82a0 Add changeset 2024-11-11 18:58:22 +00:00
Anselm Eickhoff
279e2202ba Merge pull request #710 from gardencmp/trishalim-jazz-455 2024-11-11 18:40:32 +00:00
Anselm Eickhoff
ec2324519e Merge pull request #735 from gardencmp/feat/demo-auth-user-prop 2024-11-11 18:38:46 +00:00
Anselm Eickhoff
5932f50c68 Merge pull request #699 from gardencmp/trishalim-jazz-458 2024-11-11 18:36:30 +00:00
Anselm Eickhoff
00906e5d08 Merge pull request #732 from gardencmp/fix/todo-demo-link 2024-11-11 18:35:59 +00:00
Trisha Lim
7bc5fca440 Add user prop to demo auth to skip login on demos 2024-11-11 16:35:55 +00:00
Trisha Lim
e30eb224ae Update demo links 2024-11-11 16:20:09 +00:00
Trisha Lim
983ea7cf03 Fix link to demo for pets example 2024-11-11 16:15:12 +00:00
Trisha Lim
ad2d453e33 Thumbnail fixes for mobile/tablet 2024-11-11 16:13:40 +00:00
Trisha Lim
15d711f6de Formatting fixes 2024-11-11 16:13:40 +00:00
Trisha Lim
7441a7d3d8 Formatting fixes 2024-11-11 16:13:40 +00:00
Trisha Lim
0d756209e9 Layout for mobile 2024-11-11 16:13:40 +00:00
Trisha Lim
b20c2ca173 Add images, description to examples 2024-11-11 16:13:40 +00:00
Trisha Lim
987a186db3 Add tech and features to example apps 2024-11-11 16:13:40 +00:00
Trisha Lim
f4e0b59fa1 Indicate active page on side nav 2024-11-11 16:13:31 +00:00
Trisha Lim
0d2112d8d0 Fix link to demo for todo example 2024-11-11 12:40:31 +00:00
Anselm Eickhoff
6fdab780a9 Merge pull request #730 from gardencmp/changeset-release/main
Version Packages
2024-11-10 13:17:22 +00:00
github-actions[bot]
159e2eb7f6 Version Packages 2024-11-10 13:16:08 +00:00
Anselm Eickhoff
9daa50dd7d Merge pull request #729 from gardencmp/aeplay-jazz-479
Set a CoValue as errored per peer after first error
2024-11-10 13:14:49 +00:00
Anselm
9c2aadb7d5 Add changeset 2024-11-10 13:09:57 +00:00
Anselm
7d0d81b16e Set a CoValue as errored per peer after first error 2024-11-10 13:09:36 +00:00
Anselm
22102deabc Merge branch 'main' into aeplay-jazz-12 2024-11-08 17:21:06 +00:00
Guido D'Orsi
760a1c10c5 chore(sync): add a comment about syncing after sending an ack 2024-11-08 16:46:29 +00:00
Anselm Eickhoff
fac73f0e44 Merge pull request #726 from gardencmp/changeset-release/main
Version Packages
2024-11-08 16:42:11 +00:00
github-actions[bot]
80b04e78c9 Version Packages 2024-11-08 16:39:19 +00:00
Anselm Eickhoff
b23c0d75fe Merge pull request #725 from gardencmp/aeplay-jazz-477
Immediately ack new content before syncing it upstream
2024-11-08 16:38:03 +00:00
Anselm
d4319d8a0e Add changeset 2024-11-08 16:32:29 +00:00
Anselm
52cd4a9a0f Immediately ack new content before syncing it upstream 2024-11-08 16:31:52 +00:00
Guido D'Orsi
3ef3ff3db9 chore: changeset 2024-11-08 12:22:34 +00:00
Guido D'Orsi
549ec2047f fix: set up typescript as dev dependency 2024-11-08 12:21:50 +00:00
Anselm Eickhoff
ac241981f6 Merge pull request #722 from gardencmp/changeset-release/main
Version Packages
2024-11-08 12:09:49 +00:00
github-actions[bot]
b3504dce9c Version Packages 2024-11-08 12:07:47 +00:00
Anselm Eickhoff
f859d9f1c5 Merge pull request #711 from gardencmp/feature/non-optimistic-sync-state
feat: add a sync state subscription manager
2024-11-08 12:06:34 +00:00
Guido D'Orsi
d433cf473f chore: changeset 2024-11-08 12:03:25 +00:00
Guido D'Orsi
c6cd6cba20 Merge remote-tracking branch 'origin/main' into feature/non-optimistic-sync-state 2024-11-08 12:01:05 +00:00
Guido D'Orsi
9c7333d4f0 fix(createWorkerAccount): use the new sync wait API 2024-11-08 12:00:55 +00:00
Anselm Eickhoff
970f870245 Merge pull request #720 from gardencmp/aeplay-jazz-475
Less noisy logs if clients send empty WebSocket messages
2024-11-08 11:42:30 +00:00
Anselm
a2dbaf86d2 Fix unused var 2024-11-08 11:38:24 +00:00
Anselm
b6162f0fc4 Add changeset 2024-11-08 11:34:52 +00:00
Anselm
91cfa6aa8f Less noisy logs if clients send empty WebSocket messages 2024-11-08 11:34:28 +00:00
Anselm Eickhoff
cd152b83ae Merge pull request #697 from gardencmp/changeset-release/main
Version Packages
2024-11-08 10:36:27 +00:00
github-actions[bot]
bac3ddddf5 Version Packages 2024-11-08 10:30:47 +00:00
Anselm
b934fab89e Add changeset 2024-11-08 10:29:18 +00:00
Anselm
dc4ea86819 More graceful handling of potentially multiple agents 2024-11-08 10:28:43 +00:00
Guido D'Orsi
4fd6bbd41d Merge remote-tracking branch 'origin/main' into feature/non-optimistic-sync-state 2024-11-08 09:57:46 +00:00
Anselm Eickhoff
e4c1f0eefd Merge pull request #717 from gardencmp/feature/git-hooks-and-build-optimizations 2024-11-08 07:49:00 +00:00
Guido D'Orsi
e8a509e41c Merge remote-tracking branch 'origin/main' into feature/git-hooks-and-build-optimizations 2024-11-07 23:14:56 +00:00
Guido D'Orsi
53560b7ce1 Merge pull request #718 from gardencmp/feature/improve-jazz-run-tests
fix: add a timeout on the create account command
2024-11-07 23:10:03 +00:00
Guido D'Orsi
2aa2304d4d chore: removed console.log 2024-11-07 23:09:31 +00:00
Guido D'Orsi
d4c8443c4a chore: changeset 2024-11-07 23:08:18 +00:00
Guido D'Orsi
f9faf719d4 chore: improve the createWorkerAccount tests to let them fail earlier when the cloud is stuck 2024-11-07 22:36:16 +00:00
Guido D'Orsi
1a32e0c73f chore: add git hooks for formatting and linting fixes 2024-11-07 22:24:26 +00:00
Guido D'Orsi
0ea3ef31ac chore(PeerState): explain the difference between knownState and optimisticKnownState 2024-11-07 10:11:32 +00:00
Guido D'Orsi
d02613e2ec chore: add jazz-tools.json to the biome ignore 2024-11-07 09:21:42 +00:00
Guido D'Orsi
8ff036e5ff test: cover the content acknowledgment flow 2024-11-07 09:15:09 +00:00
Guido D'Orsi
d0733e2a3b chore: revert jazz-run changes 2024-11-07 00:25:31 +00:00
Guido D'Orsi
ad4f1b74f6 chore: fix type error 2024-11-07 00:20:26 +00:00
Guido D'Orsi
04d97e4a2d chore: format 2024-11-07 00:17:03 +00:00
Guido D'Orsi
3f9e749122 Merge remote-tracking branch 'origin/main' into feature/non-optimistic-sync-state 2024-11-07 00:12:56 +00:00
Guido D'Orsi
aa1dd3e10a feat: add a sync state subscription manager 2024-11-07 00:06:30 +00:00
Anselm Eickhoff
9f0deeb31c Merge pull request #701 from gardencmp/home/e2e-styling
Make background more visible in e2e section on mobile
2024-11-06 16:46:49 +00:00
Anselm Eickhoff
4f21ba9a5f Merge pull request #708 from gardencmp/docs/small-copy-changes
Docs: minor copy changes
2024-11-06 16:46:29 +00:00
Anselm Eickhoff
bdc541e35f Merge pull request #707 from gardencmp/benjamin-jazz-438
Fix coList header docs
2024-11-06 16:45:50 +00:00
Trisha Lim
7350915006 Docs: minor copy changes 2024-11-06 16:44:01 +00:00
Benjamin S. Leveritt
d678ddbe11 Fix coList header docs 2024-11-06 16:39:34 +00:00
Anselm Eickhoff
7e92f85117 Merge pull request #704 from gardencmp/benjamin-jazz-461
Nix dev environment + Node version spec
2024-11-06 16:29:39 +00:00
Anselm
ffbeb0af43 Merge branch 'main' into benjamin-jazz-461 2024-11-06 16:29:08 +00:00
Anselm Eickhoff
1eba2a66af Merge pull request #706 from gardencmp/benjamin-jazz-470
Add folders to git ignore (and Biome)
2024-11-06 16:27:42 +00:00
Benjamin S. Leveritt
854ade8c06 Add folders to git ignore (and Biome)
- .next/
- dist/
- test-results/

Resolves #705
2024-11-06 16:25:51 +00:00
Anselm Eickhoff
ccb060262f Fix vue changeset 2024-11-06 16:16:49 +00:00
Trisha Lim
981ad88fa1 Make background more visible in e2e section on mobile 2024-11-06 16:09:32 +00:00
Anselm Eickhoff
8caaca1267 Merge pull request #698 from tobiaslins/implement-multi-storage-forwarding-react
Allow to define multiple storage options
2024-11-06 16:07:49 +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
2af107c676 Add changeset 2024-11-06 15:52:12 +00:00
Anselm
751a7394ff Apply formatting 2024-11-06 15:51:48 +00:00
Anselm
b1c0937bd2 Merge branch 'main' into implement-multi-storage-forwarding-react 2024-11-06 15:50:29 +00:00
Anselm Eickhoff
d5f9c57ed3 Merge pull request #694 from gardencmp/benjamin-jazz-405
Enforce coding standards
2024-11-06 15:40:49 +00:00
Benjamin S. Leveritt
f689a5871b Update readme tagline 2024-11-06 11:14:00 +00:00
Benjamin S. Leveritt
092359f37f Update readme with contribution guide link
Resolves #360
2024-11-06 10:33:38 +00:00
Benjamin S. Leveritt
0fb71c1938 Add tool versions to contribution guide 2024-11-06 10:26:14 +00:00
Benjamin S. Leveritt
60d150c8d0 Add nix flake for dev env
Resolves #684
2024-11-06 10:20:00 +00:00
Benjamin S. Leveritt
2dbfaf3ee0 Add git-blame-ignore 2024-11-06 09:43:03 +00:00
Benjamin S. Leveritt
a48f357928 Remove root format script 2024-11-06 09:36:56 +00:00
Benjamin S. Leveritt
a6e264d37b Remove monorepo-linting github action 2024-11-06 09:36:56 +00:00
Benjamin S. Leveritt
be0a09a222 Format workspace
Fix formatting on packages/jazz-run

Fix formatting on packages/jazz-react-native-media-images

Fix formatting on packages/jazz-react-native

Fix formatting on packages/jazz-react-auth-clerk

Fix formatting on packages/jazz-react

Fix formatting on packages/jazz-node

Fix formatting on packages/jazz-browser-media-images

Fix formatting on packages/jazz-browser-auth-clerk

Fix formatting on packages/jazz-browser

Fix formatting on packages/hash-slash

Fix formatting on packages/cojson-transport-ws

Fix formatting on packages/cojson-storage-sqlite

Fix formatting on packages/cojson-storage-indexeddb

Fix formatting on packages/cojson

Fix formatting on e2e/CoValues

Fix formatting in e2e/BinaryCoStream

Fix imports across workspace

Exclude homepage from formatting for now

Chore: Update pnpm lock

Fix formatting on workspace root files

Format examples

Fix formatting on examples/chat

Fix formatting on examples/chat-clerk

Fix formatting on examples/chat-rn

Fix formatting on examples/chat-rn-clerk

Fix formatting on examples/inspector

Fix formatting on examples/music-player

Fix formatting on examples/password-manager

Fix formatting on examples/pets

Fix formatting on examples/todo

Remove prettier from workspace deps

Include examples in formatting

Fix formatting in homepage/design-system

Fix formatting in homepage/gcmp

Fix formatting in homepage/homepage

Organise imports across workspace

Fix formatting for examples/chat-vue

Fix formatting for jazz-vue

Include homepage/* for formatting checks

Fix build script for jazz-vue
2024-11-06 09:36:56 +00:00
Benjamin S. Leveritt
4230cbf957 Rename github action 2024-11-06 09:32:09 +00:00
Tobias Lins
12ae46d10a Pull out logic into function and add tests 2024-11-05 21:11:37 +01:00
Tobias Lins
4e6a65de9d Allow to define multiple storage options 2024-11-05 19:51:33 +01:00
Anselm Eickhoff
4006544d11 Merge pull request #578 from gardencmp/jazz-vue
Support for Vue
2024-11-05 14:41:06 +00:00
pax-k
67c311b458 Merge branch 'main' into jazz-vue 2024-11-05 14:06:56 +02:00
pax-k
e796a6f2ba fix(vue): fixed logout and context re-creation 2024-11-05 14:06:10 +02:00
Benjamin S. Leveritt
f6cecfaaf9 Disable import sorting and linting for now 2024-11-05 11:47:44 +00:00
Benjamin S. Leveritt
572007139b Add github action for enforcing biome
Excluding examples for now
2024-11-05 11:26:06 +00:00
Benjamin S. Leveritt
47f3b72977 Fixed turbo commands for Biome 2024-11-05 11:08:51 +00:00
Benjamin S. Leveritt
d9036bc47b Add editorconfig 2024-11-05 09:11:34 +00:00
Benjamin S. Leveritt
4f61da553e Add root biome config 2024-11-05 09:02:35 +00:00
Benjamin S. Leveritt
ae11cbfded Add Biome dep 2024-11-05 15:19:22 +00:00
pax-k
ef83947eb5 Merge branch 'main' into jazz-vue 2024-11-04 21:30:40 +02:00
pax-k
750cfa1b82 chore: cleanup 2024-11-04 21:29:43 +02:00
pax-k
244e5ee582 chore: changeset 2024-11-04 20:48:44 +02: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
pax-k
4968e194dc chore: sherif deps 2024-11-04 16:54:36 +02:00
pax-k
36e53ee462 chore: pnpm lock 2024-11-04 16:49:15 +02:00
pax-k
7e2e89be6d fix(vue): toRaw 2024-11-04 16:48:45 +02:00
pax-k
232801efdc fix(vue): Progressive image + DemoAuth UI 2024-11-04 16:47:21 +02: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
pax-k
82d81975d3 Merge branch 'main' into jazz-vue 2024-11-01 12:27:31 +02: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
pax-k
d998fdf6f6 fix: lint 2024-10-16 15:33:23 +03:00
pax-k
6cdedd63d9 fix(vue): reactivity 2024-10-16 15:30:58 +03:00
pax-k
73630b4d94 Merge branch 'main' into jazz-vue 2024-10-16 13:22:08 +03:00
pax-k
cb8dfcadbc feat: jazz-vue and chat-vue implementation (wip) 2024-10-16 13:21:36 +03:00
1120 changed files with 108214 additions and 57953 deletions

View File

@@ -1,30 +1,35 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"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-indexeddb",
"cojson-storage-sqlite"
]
],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [
[
"cojson",
"cojson-storage",
"cojson-storage-indexeddb",
"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",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
}

11
.editorconfig Normal file
View File

@@ -0,0 +1,11 @@
# EditorConfig is awesome: https://editorconfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

2
.git-blame-ignore-revs Normal file
View File

@@ -0,0 +1,2 @@
# Formatted workspace with biome
be0a09a22295cd5d2ee3ef323e2d999da8a14110

View File

@@ -11,12 +11,15 @@ jobs:
matrix:
example: [
"chat",
"chat-clerk",
"clerk",
"passkey",
"inspector",
"music-player",
"password-manager",
"pets",
"reactions",
"todo",
"onboarding",
]
steps:
@@ -55,4 +58,4 @@ jobs:
run: |
pnpm install
pnpm turbo build;
working-directory: ./examples/${{ matrix.example }}
working-directory: ./examples/${{ matrix.example }}

18
.github/workflows/code-quality.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: Code quality
on:
push:
pull_request:
jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: latest
- name: Run Biome
run: biome ci .

View File

@@ -9,7 +9,7 @@ on:
jobs:
test:
runs-on: ubuntu-latest
continue-on-error: true
timeout-minutes: 5
steps:
- uses: actions/checkout@v3

View File

@@ -1,21 +0,0 @@
name: Monorepo linting
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
monorepo-linting:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
- name: Run sherif
run: npx sherif@1.0.0

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"]
project: ["tests/e2e", "examples/chat", "examples/file-share-svelte", "examples/form", "examples/music-player", "examples/pets", "examples/onboarding"]
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

16
.gitignore vendored
View File

@@ -4,4 +4,18 @@ lerna-debug.log
docsTmp
.DS_Store
.turbo
coverage
coverage
.direnv
# Next.js
**/.next
# Vite output
**/dist
# Playwright
test-results
.husky
.vscode/settings.json

View File

@@ -1 +1 @@
20
22

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
22

View File

@@ -1,9 +0,0 @@
/** @type {import("prettier").Config} */
const config = {
trailingComma: "all",
tabWidth: 4,
semi: true,
singleQuote: false,
};
export default config;

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.
@@ -36,9 +36,11 @@ We welcome all ideas! If you have suggestions, feel free to open an issue marked
### 5. Local Setup
You'll need Node.js 20.x or 22.x installed (we're working on support for 23.x), and pnpm 9.x installed. If you're using nix, run `nix develop` to get a shell with the correct versions of everything installed.
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**:
@@ -53,7 +55,13 @@ We welcome all ideas! If you have suggestions, feel free to open an issue marked
### 6. Testing
Please write tests for any new features or bug fixes. We use Vitest for unit tests. Make sure all tests pass before submitting a pull request.
Please write tests for any new features or bug fixes. We use Vitest for unit tests, and Playwright for e2e tests. Make sure all tests pass before submitting a pull request.
```bash
pnpm test
```
NB: You'll need to run `pnpm exec playwright install` to install the Playwright browsers before first run.
### 7. Communication

View File

@@ -1,12 +1,20 @@
# Jazz - Instant sync
# Jazz - Build local-first apps
**Jazz is an open-source toolkit for building apps with *distributed state.***
## Getting started
We recommend reading the [homepage](https://jazz.tools) and [docs](https://jazz.tools/docs) to get an overview of what Jazz is and how it works.
If you're interested in contributing, please read [CONTRIBUTING.md](./CONTRIBUTING.md).
For community and support, please join our [Discord](https://discord.gg/utDMjHYg42).
---
- Homepage: [jazz.tools](https://jazz.tools)
- Docs: [jazz.tools/docs](https://jazz.tools/docs)
- Community & support: [Discord](https://discord.gg/utDMjHYg42)
- Updates: [Twitter](https://twitter.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.
Copyright 2024 &mdash; Garden Computing, Inc.

77
biome.json Normal file
View File

@@ -0,0 +1,77 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false,
"ignore": [
"jazz-tools.json",
"**/ios/**",
"**/android/**",
"packages/jazz-svelte/**",
"examples/*svelte*/**"
]
},
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": false,
"rules": {
"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,98 +0,0 @@
# @jazz-e2e/binarycostream
## 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,14 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/jazz-logo.png" />
<link rel="stylesheet" href="/src/index.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Jazz BinaryCoStream Tests</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/app.tsx"></script>
</body>
</html>

View File

@@ -1,34 +0,0 @@
{
"name": "@jazz-e2e/binarycostream",
"private": true,
"version": "0.0.93",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"test": "playwright test",
"test:ui": "playwright test --ui"
},
"lint-staged": {
"*.{js,jsx,mdx,json}": "prettier --write"
},
"dependencies": {
"cojson": "workspace:0.8.12",
"hash-slash": "workspace:0.2.1",
"is-ci": "^3.0.1",
"jazz-react": "workspace:0.8.15",
"jazz-tools": "workspace:0.8.15",
"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,53 +0,0 @@
import { defineConfig, devices } from "@playwright/test";
import isCI from "is-ci";
/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// import dotenv from 'dotenv';
// dotenv.config({ path: path.resolve(__dirname, '.env') });
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: "./tests",
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: isCI,
/* Retry on CI only */
retries: isCI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: isCI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: "html",
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: "http://localhost:5173/",
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: "on-first-retry",
permissions: ["clipboard-read", "clipboard-write"],
},
/* Configure projects for major browsers */
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
],
/* Run your local dev server before starting the tests */
webServer: [
{
command: "pnpm preview --port 5173",
url: "http://localhost:5173/",
reuseExistingServer: !isCI,
},
],
});

View File

@@ -1,42 +0,0 @@
import { Account, BinaryCoStream, ID } from "jazz-tools";
import { useEffect } from "react";
import { useAccount, useCoState } from "./jazz";
import { UploadedFile } from "./schema";
import { waitForCoValue } from "./lib/waitForCoValue";
async function getUploadedFile(
me: Account,
uploadedFileId: ID<UploadedFile>) {
const uploadedFile = await waitForCoValue(UploadedFile, uploadedFileId, me, Boolean, {})
uploadedFile.coMapDownloaded = true;
await BinaryCoStream.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 { getValueId } from "./lib/searchParams";
import { AuthAndJazz } from "./jazz";
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,36 +0,0 @@
import { createJazzReactApp, useDemoAuth } from "jazz-react";
import { getValueId } from "./lib/searchParams";
import { useEffect, useRef } from "react";
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,14 +0,0 @@
import { ID } from "jazz-tools";
import { UploadedFile } from "../schema";
export function getValueId() {
return new URLSearchParams(location.search).get("valueId") as ID<UploadedFile> | undefined ?? undefined;
}
export function getIsAutoUpload() {
return new URLSearchParams(location.search).has("auto");
}
export function getDefaultFileSize() {
return parseInt(new URLSearchParams(location.search).get("fileSize") ?? 1e3.toString());
}

View File

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

View File

@@ -1,90 +0,0 @@
# @jazz-e2e/covalues
## 0.0.92
### Patch Changes
- Updated dependencies [cce679b]
- jazz-tools@0.8.15
- jazz-react@0.8.15
## 0.0.91
### Patch Changes
- Updated dependencies [36273b3]
- jazz-tools@0.8.14
- jazz-react@0.8.14
## 0.0.90
### Patch Changes
- Updated dependencies [fd011d7]
- jazz-tools@0.8.13
- jazz-react@0.8.13
## 0.0.89
### Patch Changes
- Updated dependencies [6ed75eb]
- Updated dependencies [3cc6aee]
- cojson@0.8.12
- jazz-react@0.8.12
- jazz-tools@0.8.12
## 0.0.88
### Patch Changes
- Updated dependencies [1ed4ab5]
- cojson@0.8.11
- jazz-react@0.8.11
- jazz-tools@0.8.11
## 0.0.87
### Patch Changes
- jazz-react@0.8.7
## 0.0.86
### Patch Changes
- jazz-react@0.8.6
## 0.0.85
### Patch Changes
- Updated dependencies [c3f4e6b]
- Updated dependencies [d9152ed]
- jazz-tools@0.8.5
- cojson@0.8.5
- jazz-react@0.8.5
## 0.0.84
### Patch Changes
- Updated dependencies
- hash-slash@0.2.1
## 0.0.83
### Patch Changes
- Updated dependencies
- cojson@0.8.3
- jazz-react@0.8.3
- jazz-tools@0.8.3
## 0.0.82
### Patch Changes
- Updated dependencies [a075f90]
- jazz-tools@0.8.2
- jazz-react@0.8.2

View File

@@ -1,53 +0,0 @@
import { defineConfig, devices } from "@playwright/test";
import isCI from "is-ci";
/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// import dotenv from 'dotenv';
// dotenv.config({ path: path.resolve(__dirname, '.env') });
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: "./tests",
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: isCI,
/* Retry on CI only */
retries: isCI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: isCI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: "html",
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: "http://localhost:5173/",
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: "on-first-retry",
permissions: ["clipboard-read", "clipboard-write"],
},
/* Configure projects for major browsers */
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
],
/* Run your local dev server before starting the tests */
webServer: [
{
command: "pnpm preview --port 5173",
url: "http://localhost:5173/",
reuseExistingServer: !isCI,
},
],
});

View File

@@ -1,30 +0,0 @@
import React from "react";
import ReactDOM from "react-dom/client";
import { AuthAndJazz } from "./jazz";
import { TestInput } from "./pages/TestInput";
import { ResumeSyncState } from "./pages/ResumeSyncState";
import { RouterProvider, createBrowserRouter } from "react-router-dom";
const router = createBrowserRouter([
{
path: "/test-input",
element: <TestInput />,
},
{
path: "/resume-sync",
element: <ResumeSyncState />,
},
{
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,53 +0,0 @@
import { co, CoMap, Group, ID } from "jazz-tools";
import { useAccount, useCoState } from "../jazz";
import { useEffect, useState } from "react";
export class ResumeSyncCoMap extends CoMap {
value = co.string;
}
function getIdParam() {
const url = new URL(window.location.href);
return (url.searchParams.get("id") as ID<ResumeSyncCoMap>) ?? undefined;
}
export function ResumeSyncState() {
const [id, setId] = useState(getIdParam);
const coMap = useCoState(ResumeSyncCoMap, id);
const { me } = useAccount();
useEffect(() => {
if (id) {
const url = new URL(window.location.href);
url.searchParams.set("id", id);
history.pushState({}, "", url.toString());
}
}, [id])
useEffect(() => {
if (!me || id) return;
const group = Group.create({ owner: me });
group.addMember("everyone", "writer");
setId(ResumeSyncCoMap.create({ value: "" }, { owner: group }).id);
}, [me]);
if (!coMap) return null;
return (
<div>
<h1>Resume Sync State</h1>
<p data-testid="id">{coMap.id}</p>
<label htmlFor="value">Value</label>
<input
id="value"
value={coMap.value ?? ""}
onChange={(e) => {
coMap.value = e.target.value;
}}
/>
</div>
);
}

View File

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

View File

@@ -1,11 +0,0 @@
{
"extends": [
"next/core-web-vitals",
"prettier",
"plugin:prettier/recommended"
],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": ["error"]
}
}

View File

@@ -1,11 +0,0 @@
{
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"trailingComma": "es5",
"bracketSpacing": true,
"arrowParens": "avoid",
"printWidth": 80,
"plugins": ["prettier-plugin-tailwindcss"]
}

View File

@@ -1,5 +1,233 @@
# jazz-example-book-shelf
## 0.1.35
### Patch Changes
- Updated dependencies [fa41f8e]
- Updated dependencies [88d7d9a]
- Updated dependencies [60e35ea]
- jazz-tools@0.8.45
- jazz-react@0.8.45
- jazz-browser-media-images@0.8.45
## 0.1.34
### Patch Changes
- jazz-react@0.8.44
- jazz-tools@0.8.44
- jazz-browser-media-images@0.8.44
## 0.1.33
### Patch Changes
- jazz-react@0.8.41
- jazz-tools@0.8.41
- jazz-browser-media-images@0.8.41
## 0.1.32
### Patch Changes
- jazz-browser-media-images@0.8.40
- jazz-react@0.8.40
## 0.1.31
### Patch Changes
- Updated dependencies [249eecb]
- jazz-tools@0.8.39
- jazz-browser-media-images@0.8.39
- jazz-react@0.8.39
## 0.1.30
### Patch Changes
- jazz-react@0.8.38
- jazz-tools@0.8.38
- jazz-browser-media-images@0.8.38
## 0.1.29
### Patch Changes
- jazz-react@0.8.37
- jazz-tools@0.8.37
- jazz-browser-media-images@0.8.37
## 0.1.28
### Patch Changes
- Updated dependencies [441fe27]
- jazz-tools@0.8.36
- jazz-react@0.8.36
- jazz-browser-media-images@0.8.36
## 0.1.27
### Patch Changes
- Updated dependencies [9212ab8]
- Updated dependencies [8b87117]
- jazz-react@0.8.35
- jazz-tools@0.8.35
- jazz-browser-media-images@0.8.35
## 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

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,33 +1,30 @@
# Jazz Book Shelf Example
# Book shelf example with Jazz and Next.js
Live version: [https://books-demo.jazz.tools](https://books-demo.jazz.tools)
This is an example of a book shelf where you can add and review books.
It shows you how to create and edit data, upload images, and share data publicly.
Live version: https://books-demo.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`
Install dependencies:
(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
pnpm install
npx degit gardencmp/jazz jazz
```
Go to the `examples/book-shelf` directory.
Go to the book-shelf example directory:
```bash
cd examples/book-shelf
cd jazz/examples/book-shelf
```
Install dependencies:
Install and build dependencies:
```bash
pnpm install
pnpm i && npx turbo build
```
Start the dev server:
```bash
pnpm dev
```
@@ -36,8 +33,9 @@ pnpm dev
If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or open an issue or PR to fix something that seems wrong.
## Configuration: sync server
By default, the example app uses [Jazz Cloud](https://jazz.tools/cloud) (`wss://cloud.jazz.tools`) - so cross-device use, invites and collaboration should just work.
You can also run a local sync server by running `npx 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/components/JazzAndAuth.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 `<Jazz.Provider>` provider component in [./src/components/JazzAndAuth.tsx](./src/components/JazzAndAuth.tsx).

View File

@@ -1,35 +1,29 @@
{
"name": "jazz-example-book-shelf",
"version": "0.1.8",
"version": "0.1.35",
"private": true,
"scripts": {
"dev": "next dev",
"format-and-lint": "biome check .",
"format-and-lint:fix": "biome check . --write",
"build": "next build",
"start": "next start",
"lint": "next lint",
"format": "prettier --write ."
"start": "next start"
},
"dependencies": {
"clsx": "^2.0.0",
"jazz-browser-media-images": "workspace:0.8.15",
"jazz-react": "workspace:0.8.15",
"jazz-tools": "workspace:0.8.15",
"jazz-browser-media-images": "workspace:0.8.45",
"jazz-react": "workspace:0.8.45",
"jazz-tools": "workspace:0.8.45",
"next": "14.2.5",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/node": "^22.5.1",
"@types/react": "^18.2.19",
"@types/react-dom": "^18.2.7",
"eslint": "^8.46.0",
"eslint-config-next": "14.2.5",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"postcss": "^8.4.27",
"prettier": "^3.1.1",
"prettier-plugin-tailwindcss": "^0.6.5",
"tailwindcss": "3.3.2",
"typescript": "^5.3.3"
"tailwindcss": "^3.4.15",
"typescript": "~5.6.2"
}
}

View File

@@ -1,14 +1,14 @@
"use client";
import { ChangeEvent, useState } from "react";
import { BookReview, ListOfBookReviews } from "@/schema";
import { Button } from "@/components/Button";
import { Container } from "@/components/Container";
import { useAccount } from "@/components/JazzAndAuth";
import { useRouter } from "next/navigation";
import RatingInput from "@/components/RatingInput";
import { BookReview, ListOfBookReviews } from "@/schema";
import { createImage } from "jazz-browser-media-images";
import { Group, ImageDefinition } from "jazz-tools";
import { Container } from "@/components/Container";
import { Button } from "@/components/Button";
import { useRouter } from "next/navigation";
import { ChangeEvent, useState } from "react";
export default function AddBookReview() {
const { me } = useAccount();
@@ -18,7 +18,7 @@ export default function AddBookReview() {
const [review, setReview] = useState("");
const [rating, setRating] = useState(0);
const [dateRead, setDateRead] = useState(
new Date().toISOString().split("T")[0]
new Date().toISOString().split("T")[0],
);
const [coverImage, setCoverImage] = useState<ImageDefinition | undefined>();
@@ -37,7 +37,7 @@ export default function AddBookReview() {
group.addMember("everyone", "reader");
if (file) {
createImage(file, { owner: group }).then(image => {
createImage(file, { owner: group }).then((image) => {
setCoverImage(image);
});
}
@@ -59,7 +59,7 @@ export default function AddBookReview() {
},
{
owner: me.profile._owner,
}
},
);
if (!me.profile.bookReviews) {
@@ -88,7 +88,7 @@ export default function AddBookReview() {
type="text"
value={title}
required
onChange={e => setTitle(e.target.value)}
onChange={(e) => setTitle(e.target.value)}
></input>
</label>
@@ -99,7 +99,7 @@ export default function AddBookReview() {
type="text"
value={author}
required
onChange={e => setAuthor(e.target.value)}
onChange={(e) => setAuthor(e.target.value)}
></input>
</label>
@@ -116,7 +116,10 @@ export default function AddBookReview() {
<div className="grid gap-1 text-sm text-gray-600">
Rating
<RatingInput value={rating} onChange={rating => setRating(rating)} />
<RatingInput
value={rating}
onChange={(rating) => setRating(rating)}
/>
</div>
<label className="grid gap-1 text-sm text-gray-600">
@@ -124,7 +127,7 @@ export default function AddBookReview() {
<textarea
className="rounded border border-gray-300 px-2 py-1 shadow-sm"
value={review}
onChange={e => setReview(e.target.value)}
onChange={(e) => setReview(e.target.value)}
></textarea>
</label>
<Button variant="primary" type="submit">

View File

@@ -1,13 +1,13 @@
"use client";
import { useCoState } from "@/components/JazzAndAuth";
import { BookReview } from "@/schema";
import { Group, ID } from "jazz-tools";
import { BookCover } from "@/components/BookCover";
import clsx from "clsx";
import RatingInput from "@/components/RatingInput";
import Rating from "@/components/Rating";
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,
@@ -28,9 +28,9 @@ const BookReviewTitle = ({
placeholder="Book title"
className={clsx(
className,
"w-full rounded border border-transparent px-2 py-1 hover:border-gray-300 hover:shadow-sm"
"w-full rounded border border-transparent px-2 py-1 hover:border-gray-300 hover:shadow-sm",
)}
onChange={e => (bookReview.title = e.target.value)}
onChange={(e) => (bookReview.title = e.target.value)}
></input>
);
};
@@ -54,9 +54,9 @@ const BookReviewAuthor = ({
placeholder="Author"
className={clsx(
className,
"w-full rounded border border-transparent px-2 py-1 hover:border-gray-300 hover:shadow-sm"
"w-full rounded border border-transparent px-2 py-1 hover:border-gray-300 hover:shadow-sm",
)}
onChange={e => (bookReview.author = e.target.value)}
onChange={(e) => (bookReview.author = e.target.value)}
></input>
);
};
@@ -85,9 +85,9 @@ const BookReviewDateRead = ({
placeholder="Date read"
className={clsx(
className,
"w-full rounded border border-transparent px-2 py-1 hover:border-gray-300 hover:shadow-sm"
"w-full rounded border border-transparent px-2 py-1 hover:border-gray-300 hover:shadow-sm",
)}
onChange={e => {
onChange={(e) => {
const date = new Date(e.target.value);
bookReview.dateRead = date;
}}
@@ -116,9 +116,9 @@ const BookReviewReview = ({
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"
"w-full rounded border border-transparent px-2 py-1 hover:border-gray-300 hover:shadow-sm",
)}
onChange={e => (bookReview.review = e.target.value)}
onChange={(e) => (bookReview.review = e.target.value)}
></textarea>
);
};
@@ -139,7 +139,7 @@ const BookReviewRating = ({
return (
<RatingInput
className={clsx(className, "p-2")}
onChange={rating => (bookReview.rating = rating)}
onChange={(rating) => (bookReview.rating = rating)}
value={bookReview.rating}
/>
);

View File

@@ -3,8 +3,8 @@ import { Inter } from "next/font/google";
import "./globals.css";
import { JazzAndAuth } from "@/components/JazzAndAuth";
import { Nav } from "@/components/Nav";
import { Fraunces } from "next/font/google";
import clsx from "clsx";
import { Fraunces } from "next/font/google";
const fraunces = Fraunces({
subsets: ["latin"],

View File

@@ -1,10 +1,10 @@
"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";
import { Container } from "@/components/Container";
export default function Home() {
const { me } = useAccount();

View File

@@ -1,7 +1,7 @@
import { Container } from "@/components/Container";
import UserProfile from "@/components/UserProfile";
import { JazzAccount } from "@/schema";
import { ID } from "jazz-tools";
import { Container } from "@/components/Container";
export default function Page({ params }: { params: { slug: string } }) {
const { slug } = params;

View File

@@ -1,12 +1,12 @@
import { ProgressiveImg } from "jazz-react";
import { BookReview } from "@/schema";
import { ChangeEvent, useRef, useState } from "react";
import { Group, ImageDefinition } from "jazz-tools";
import { createImage } from "jazz-browser-media-images";
import { useAccount } from "@/components/JazzAndAuth";
import clsx from "clsx";
import PlusIcon from "@/components/icons/PlusIcon";
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,
@@ -68,7 +68,7 @@ export function BookCoverInput({ bookReview }: { bookReview: BookReview }) {
const file = event.currentTarget.files?.[0];
if (file) {
createImage(file, { owner: me.profile._owner }).then(image => {
createImage(file, { owner: me.profile._owner }).then((image) => {
bookReview.cover = image;
});
}

View File

@@ -1,8 +1,8 @@
import { BookReview } from "@/schema";
import Rating from "@/components/Rating";
import { Group } from "jazz-tools";
import RatingInput from "@/components/RatingInput";
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;
@@ -19,7 +19,7 @@ export function BookReviewHeader({ bookReview }: { bookReview: BookReview }) {
{bookReview._owner.castAs(Group).myRole() === "admin" ? (
<RatingInput
onChange={rating => (bookReview.rating = rating)}
onChange={(rating) => (bookReview.rating = rating)}
value={rating}
/>
) : (

View File

@@ -1,11 +1,11 @@
"use client";
import { BookReview } from "../schema";
import { ID } from "jazz-tools";
import { useCoState } from "@/components/JazzAndAuth";
import Link from "next/link";
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);

View File

@@ -1,6 +1,6 @@
import clsx from "clsx";
import Link from "next/link";
import type { ComponentProps } from "react";
import clsx from "clsx";
interface Props {
variant?: "primary" | "secondary" | "tertiary";
@@ -43,7 +43,7 @@ export function Button(props: AnchorProps | ButtonProps) {
customClassName,
variantClassNames.base,
variantClassNames[variant],
sizeClassNames[size]
sizeClassNames[size],
);
if (!!(props as AnchorProps).href) {

View File

@@ -1,7 +1,7 @@
"use client";
import { createJazzReactApp, useDemoAuth, DemoAuthBasicUI } from "jazz-react";
import { JazzAccount } from "@/schema";
import { DemoAuthBasicUI, createJazzReactApp, useDemoAuth } from "jazz-react";
const Jazz = createJazzReactApp({
AccountSchema: JazzAccount,

View File

@@ -1,9 +1,9 @@
"use client";
import { Button } from "@/components/Button";
import { Container } from "@/components/Container";
import { useAccount } from "@/components/JazzAndAuth";
import Link from "next/link";
import { Container } from "@/components/Container";
import { Button } from "@/components/Button";
export function Nav() {
const { me, logOut } = useAccount();

View File

@@ -1,7 +1,7 @@
"use client";
import StarOutlineIcon from "@/components/icons/StarOutlineIcon";
import StarIcon from "@/components/icons/StarIcon";
import StarOutlineIcon from "@/components/icons/StarOutlineIcon";
import clsx from "clsx";
interface RatingInputProps {

View File

@@ -1,10 +1,10 @@
"use client";
import { useCoState } from "@/components/JazzAndAuth";
import { Group, ID } from "jazz-tools";
import { JazzAccount, JazzProfile, ListOfBookReviews } from "@/schema";
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);
@@ -13,7 +13,7 @@ export default function UserProfile({ id }: { id: ID<JazzAccount> }) {
const bookReviews = useCoState(
ListOfBookReviews,
user?.profile?._refs.bookReviews?.id,
[{}]
[{}],
);
return (
@@ -30,7 +30,7 @@ export default function UserProfile({ id }: { id: ID<JazzAccount> }) {
</div>
<div className="grid gap-4 md:grid-cols-4">
{bookReviews?.map(bookReview => (
{bookReviews?.map((bookReview) => (
<BookReviewThumbnail key={bookReview.id} id={bookReview.id} />
))}
</div>

View File

@@ -1,11 +1,11 @@
import {
CoMap,
co,
CoList,
Account,
Profile,
ImageDefinition,
CoList,
CoMap,
Encoders,
ImageDefinition,
Profile,
co,
} from "jazz-tools";
export class BookReview extends CoMap {

View File

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

View File

@@ -1,13 +0,0 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
],
ignorePatterns: ["dist", ".eslintrc.cjs"],
parser: "@typescript-eslint/parser",
plugins: ["react-refresh"],
rules: {},
};

View File

@@ -1,10 +0,0 @@
{
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"trailingComma": "es5",
"bracketSpacing": true,
"arrowParens": "avoid",
"printWidth": 80
}

View File

@@ -1,986 +0,0 @@
# jazz-example-chat
## 0.0.92
### Patch Changes
- Updated dependencies [cce679b]
- Updated dependencies [221c58f]
- jazz-tools@0.8.15
- jazz-react-auth-clerk@0.8.15
- jazz-react@0.8.15
## 0.0.91
### Patch Changes
- Updated dependencies [36273b3]
- jazz-tools@0.8.14
- jazz-react@0.8.14
- jazz-react-auth-clerk@0.8.14
## 0.0.90
### Patch Changes
- Updated dependencies [fd011d7]
- jazz-tools@0.8.13
- jazz-react@0.8.13
- jazz-react-auth-clerk@0.8.13
## 0.0.89
### Patch Changes
- Updated dependencies [6ed75eb]
- Updated dependencies [3cc6aee]
- cojson@0.8.12
- jazz-react@0.8.12
- jazz-react-auth-clerk@0.8.12
- jazz-tools@0.8.12
## 0.0.88
### Patch Changes
- Updated dependencies [1ed4ab5]
- cojson@0.8.11
- jazz-react@0.8.11
- jazz-react-auth-clerk@0.8.11
- jazz-tools@0.8.11
## 0.0.87
### Patch Changes
- jazz-react@0.8.7
- jazz-react-auth-clerk@0.8.7
## 0.0.86
### Patch Changes
- jazz-react@0.8.6
- jazz-react-auth-clerk@0.8.6
## 0.0.85
### Patch Changes
- Updated dependencies [c3f4e6b]
- Updated dependencies [d9152ed]
- jazz-tools@0.8.5
- cojson@0.8.5
- jazz-react@0.8.5
- jazz-react-auth-clerk@0.8.5
## 0.0.84
### Patch Changes
- Updated dependencies
- hash-slash@0.2.1
## 0.0.83
### Patch Changes
- Updated dependencies
- cojson@0.8.3
- jazz-react@0.8.3
- jazz-react-auth-clerk@0.8.3
- jazz-tools@0.8.3
## 0.0.82
### Patch Changes
- Updated dependencies [a075f90]
- jazz-tools@0.8.2
- jazz-react@0.8.2
- jazz-react-auth-clerk@0.8.2
## 0.0.81
### Patch Changes
- Updated dependencies
- jazz-tools@0.8.1
- jazz-react@0.8.1
- jazz-react-auth-clerk@0.8.1
## 0.0.82
### Patch Changes
- Updated dependencies [6a147c2]
- Updated dependencies [ad40b88]
- Updated dependencies [23369dc]
- Updated dependencies [c2b62a0]
- Updated dependencies [1a979b6]
- Updated dependencies [bcec3be]
- Updated dependencies [6ce2051]
- cojson@0.8.0
- jazz-tools@0.8.0
- jazz-react@0.8.0
## 0.0.82-guest-auth.6
### Patch Changes
- Updated dependencies
- jazz-react@0.7.35-guest-auth.6
- jazz-tools@0.7.35-guest-auth.6
## 0.0.82
### Patch Changes
- Updated dependencies [49a8b54]
- Updated dependencies [35bbcd9]
- Updated dependencies [6f80282]
- Updated dependencies [35bbcd9]
- Updated dependencies [cac2ec9]
- Updated dependencies [f350e90]
- jazz-tools@0.7.35
- cojson@0.7.35
- jazz-react@0.7.35
## 0.0.81
### Patch Changes
- Updated dependencies [5d91f9f]
- Updated dependencies [5094e6d]
- Updated dependencies [b09589b]
- Updated dependencies [2c3a40c]
- Updated dependencies [4e16575]
- Updated dependencies [ea882ab]
- cojson@0.7.34
- jazz-react@0.7.34
- jazz-tools@0.7.34
## 0.0.81-neverthrow.6
### Patch Changes
- Updated dependencies
- cojson@0.7.34-neverthrow.8
- jazz-react@0.7.34-neverthrow.8
- jazz-tools@0.7.34-neverthrow.8
## 0.0.81-neverthrow.5
### Patch Changes
- Updated dependencies
- cojson@0.7.34-neverthrow.7
- jazz-react@0.7.34-neverthrow.7
- jazz-tools@0.7.34-neverthrow.7
## 0.0.81-neverthrow.4
### Patch Changes
- Updated dependencies
- cojson@0.7.34-neverthrow.4
- jazz-react@0.7.34-neverthrow.4
- jazz-tools@0.7.34-neverthrow.4
## 0.0.81-neverthrow.3
### Patch Changes
- Updated dependencies
- cojson@0.7.34-neverthrow.3
- jazz-react@0.7.34-neverthrow.3
- jazz-tools@0.7.34-neverthrow.3
## 0.0.81-neverthrow.2
### Patch Changes
- jazz-react@0.7.34-neverthrow.2
## 0.0.81-neverthrow.1
### Patch Changes
- Updated dependencies
- cojson@0.7.34-neverthrow.1
- jazz-react@0.7.34-neverthrow.1
- jazz-tools@0.7.34-neverthrow.1
## 0.0.81-neverthrow.0
### Patch Changes
- Updated dependencies
- cojson@0.7.34-neverthrow.0
- jazz-react@0.7.34-neverthrow.0
- jazz-tools@0.7.34-neverthrow.0
## 0.0.80
### Patch Changes
- Updated dependencies [b297c93]
- Updated dependencies [3bf5127]
- Updated dependencies [a8b74ff]
- Updated dependencies [db53161]
- cojson@0.7.33
- jazz-react@0.7.33
- jazz-tools@0.7.33
## 0.0.80-hotfixes.5
### Patch Changes
- Updated dependencies
- cojson@0.7.33-hotfixes.5
- jazz-react@0.7.33-hotfixes.5
- jazz-tools@0.7.33-hotfixes.5
## 0.0.80-hotfixes.4
### Patch Changes
- Updated dependencies
- cojson@0.7.33-hotfixes.4
- jazz-react@0.7.33-hotfixes.4
- jazz-tools@0.7.33-hotfixes.4
## 0.0.80-hotfixes.3
### Patch Changes
- Updated dependencies
- cojson@0.7.33-hotfixes.3
- jazz-react@0.7.33-hotfixes.3
- jazz-tools@0.7.33-hotfixes.3
## 0.0.80-hotfixes.2
### Patch Changes
- jazz-react@0.7.33-hotfixes.2
## 0.0.80-hotfixes.1
### Patch Changes
- jazz-react@0.7.33-hotfixes.1
## 0.0.80-hotfixes.0
### Patch Changes
- Updated dependencies
- cojson@0.7.33-hotfixes.0
- jazz-react@0.7.33-hotfixes.0
- jazz-tools@0.7.33-hotfixes.0
## 0.0.79
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.32
- jazz-react@0.7.32
## 0.0.78
### Patch Changes
- Updated dependencies
- cojson@0.7.31
- jazz-react@0.7.31
- jazz-tools@0.7.31
## 0.0.77
### Patch Changes
- jazz-react@0.7.30
## 0.0.76
### Patch Changes
- Updated dependencies
- cojson@0.7.29
- jazz-react@0.7.29
- jazz-tools@0.7.29
## 0.0.75
### Patch Changes
- Updated dependencies
- cojson@0.7.28
- jazz-react@0.7.28
- jazz-tools@0.7.28
## 0.0.74
### Patch Changes
- jazz-react@0.7.27
## 0.0.73
### Patch Changes
- Updated dependencies
- cojson@0.7.26
- jazz-react@0.7.26
- jazz-tools@0.7.26
## 0.0.72
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.25
- jazz-react@0.7.25
## 0.0.71
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.24
- jazz-react@0.7.24
## 0.0.70
### Patch Changes
- Updated dependencies
- cojson@0.7.23
- jazz-react@0.7.23
- jazz-tools@0.7.23
## 0.0.69
### Patch Changes
- jazz-react@0.7.22
## 0.0.68
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.21
- jazz-react@0.7.21
## 0.0.67
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.20
- jazz-react@0.7.20
## 0.0.66
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.19
- jazz-react@0.7.19
## 0.0.65
### Patch Changes
- Updated dependencies
- cojson@0.7.18
- jazz-react@0.7.18
- jazz-tools@0.7.18
## 0.0.64
### Patch Changes
- Updated dependencies
- cojson@0.7.17
- jazz-react@0.7.17
- jazz-tools@0.7.17
## 0.0.63
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.16
- jazz-react@0.7.16
## 0.0.62
### Patch Changes
- Updated dependencies
- jazz-react@0.7.15
## 0.0.61
### Patch Changes
- Updated dependencies
- cojson@0.7.14
- jazz-tools@0.7.14
- jazz-react@0.7.14
## 0.0.60
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.13
- jazz-react@0.7.13
## 0.0.59
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.12
- jazz-react@0.7.12
## 0.0.58
### Patch Changes
- Updated dependencies
- cojson@0.7.11
- jazz-react@0.7.11
- jazz-tools@0.7.11
## 0.0.57
### Patch Changes
- Updated dependencies
- cojson@0.7.10
- jazz-react@0.7.10
- jazz-tools@0.7.10
## 0.0.56
### Patch Changes
- Updated dependencies
- cojson@0.7.9
- jazz-react@0.7.9
- jazz-tools@0.7.9
## 0.0.55
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.8
- jazz-react@0.7.8
## 0.0.54
### Patch Changes
- Updated dependencies [9fdc91c]
- jazz-react@0.7.7
## 0.0.53
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.6
- jazz-react@0.7.6
## 0.0.52
### Patch Changes
- Updated dependencies
- jazz-react@0.7.5
## 0.0.51
### Patch Changes
- Updated dependencies
- jazz-react@0.7.4
## 0.0.50
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.3
- jazz-react@0.7.3
## 0.0.49
### Patch Changes
- Updated dependencies
- jazz-react@0.7.2
## 0.0.48
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.1
- jazz-react@0.7.1
## 0.0.47
### Patch Changes
- Updated dependencies [8636319]
- Updated dependencies [1a35307]
- Updated dependencies [8636319]
- Updated dependencies [1a35307]
- Updated dependencies [96c494f]
- Updated dependencies [59c18c3]
- Updated dependencies [19f52b7]
- Updated dependencies [8636319]
- Updated dependencies [1a35307]
- Updated dependencies [d8fe2b1]
- Updated dependencies [19004b4]
- Updated dependencies [a78f168]
- Updated dependencies [1200aae]
- Updated dependencies [60d5ca2]
- Updated dependencies [52675c9]
- Updated dependencies [129e2c1]
- Updated dependencies [6d49e9b]
- Updated dependencies [1cfa279]
- Updated dependencies [704af7d]
- Updated dependencies [e97f730]
- Updated dependencies [1a35307]
- Updated dependencies [460478f]
- Updated dependencies [6b0418f]
- Updated dependencies [e299c3e]
- Updated dependencies [ed5643a]
- Updated dependencies [bde684f]
- Updated dependencies [bf0f8ec]
- Updated dependencies [c4151fc]
- Updated dependencies [63374cc]
- Updated dependencies [8636319]
- Updated dependencies [01ac646]
- Updated dependencies [a5e68a4]
- Updated dependencies [8636319]
- Updated dependencies [952982e]
- Updated dependencies [1a35307]
- Updated dependencies [5fa277c]
- Updated dependencies [60d5ca2]
- Updated dependencies [21771c4]
- Updated dependencies [77c2b56]
- Updated dependencies [63374cc]
- Updated dependencies [d2e03ff]
- Updated dependencies [354bdcd]
- Updated dependencies [ece35b3]
- Updated dependencies [60d5ca2]
- Updated dependencies [69ac514]
- Updated dependencies [f8a5c46]
- Updated dependencies [f0f6f1b]
- Updated dependencies [e5eed5b]
- Updated dependencies [1a44f87]
- Updated dependencies [627d895]
- Updated dependencies [1200aae]
- Updated dependencies [63374cc]
- Updated dependencies [ece35b3]
- Updated dependencies [38d4410]
- Updated dependencies [85d2b62]
- Updated dependencies [fd86c11]
- Updated dependencies [52675c9]
- jazz-tools@0.7.0
- cojson@0.7.0
- jazz-react@0.7.0
- hash-slash@0.2.0
## 0.0.47-alpha.42
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.0-alpha.42
- cojson@0.7.0-alpha.42
- jazz-react@0.7.0-alpha.42
## 0.0.47-alpha.41
### Patch Changes
- jazz-tools@0.7.0-alpha.41
- jazz-react@0.7.0-alpha.41
## 0.0.47-alpha.40
### Patch Changes
- Updated dependencies
- jazz-react@0.7.0-alpha.40
## 0.0.47-alpha.39
### Patch Changes
- Updated dependencies
- cojson@0.7.0-alpha.39
- jazz-react@0.7.0-alpha.39
- jazz-tools@0.7.0-alpha.39
## 0.0.47-alpha.38
### Patch Changes
- Updated dependencies
- Updated dependencies
- Updated dependencies
- Updated dependencies
- Updated dependencies
- jazz-tools@0.7.0-alpha.38
- jazz-react@0.7.0-alpha.38
- cojson@0.7.0-alpha.38
## 0.0.47-alpha.37
### Patch Changes
- Updated dependencies
- jazz-react@0.7.0-alpha.37
- cojson@0.7.0-alpha.37
- jazz-tools@0.7.0-alpha.37
## 0.0.47-alpha.36
### Patch Changes
- Updated dependencies [1a35307]
- Updated dependencies [1a35307]
- Updated dependencies [1a35307]
- Updated dependencies [1a35307]
- Updated dependencies [6b0418f]
- Updated dependencies [1a35307]
- cojson@0.7.0-alpha.36
- jazz-tools@0.7.0-alpha.36
- jazz-react@0.7.0-alpha.36
## 0.0.47-alpha.35
### Patch Changes
- Updated dependencies
- Updated dependencies
- cojson@0.7.0-alpha.35
- jazz-tools@0.7.0-alpha.35
- jazz-react@0.7.0-alpha.35
## 0.0.47-alpha.34
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.0-alpha.34
- jazz-react@0.7.0-alpha.34
## 0.0.47-alpha.33
### Patch Changes
- Updated dependencies
- jazz-react@0.7.0-alpha.33
## 0.0.47-alpha.32
### Patch Changes
- Updated dependencies
- Updated dependencies
- Updated dependencies
- hash-slash@0.2.0-alpha.3
- jazz-tools@0.7.0-alpha.32
- jazz-react@0.7.0-alpha.32
## 0.0.47-alpha.31
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.0-alpha.31
- jazz-react@0.7.0-alpha.31
## 0.0.47-alpha.30
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.0-alpha.30
- jazz-react@0.7.0-alpha.30
## 0.0.47-alpha.29
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.0-alpha.29
- cojson@0.7.0-alpha.29
- jazz-react@0.7.0-alpha.29
## 0.0.47-alpha.28
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.0-alpha.28
- cojson@0.7.0-alpha.28
- jazz-react@0.7.0-alpha.28
## 0.0.47-alpha.27
### Patch Changes
- Updated dependencies
- Updated dependencies
- jazz-tools@0.7.0-alpha.27
- cojson@0.7.0-alpha.27
- jazz-react@0.7.0-alpha.27
## 0.0.47-alpha.26
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.0-alpha.26
- jazz-react@0.7.0-alpha.26
## 0.0.47-alpha.25
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.0-alpha.25
- jazz-react@0.7.0-alpha.25
## 0.0.47-alpha.24
### Patch Changes
- Updated dependencies
- Updated dependencies
- Updated dependencies
- jazz-tools@0.7.0-alpha.24
- cojson@0.7.0-alpha.24
- jazz-react@0.7.0-alpha.24
## 0.0.47-alpha.23
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.0-alpha.23
- jazz-react@0.7.0-alpha.23
## 0.0.47-alpha.22
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.0-alpha.22
- jazz-react@0.7.0-alpha.22
## 0.0.47-alpha.21
### Patch Changes
- Updated dependencies
- jazz-react@0.7.0-alpha.21
- jazz-tools@0.7.0-alpha.21
## 0.0.47-alpha.20
### Patch Changes
- Updated dependencies
- Updated dependencies
- jazz-react@0.7.0-alpha.20
- jazz-tools@0.7.0-alpha.20
## 0.0.47-alpha.19
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.0-alpha.19
- jazz-react@0.7.0-alpha.19
## 0.0.47-alpha.18
### Patch Changes
- jazz-react@0.7.0-alpha.18
## 0.0.47-alpha.17
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.0-alpha.17
- jazz-react@0.7.0-alpha.17
## 0.0.47-alpha.16
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.0-alpha.16
- jazz-react@0.7.0-alpha.16
## 0.0.47-alpha.15
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.0-alpha.15
- jazz-react@0.7.0-alpha.15
## 0.0.47-alpha.14
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.0-alpha.14
- jazz-react@0.7.0-alpha.14
## 0.0.47-alpha.13
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.0-alpha.13
- jazz-react@0.7.0-alpha.13
## 0.0.47-alpha.12
### Patch Changes
- Updated dependencies
- jazz-react@0.7.0-alpha.12
- jazz-tools@0.7.0-alpha.12
## 0.0.47-alpha.11
### Patch Changes
- Updated dependencies
- jazz-react@0.7.0-alpha.11
- jazz-tools@0.7.0-alpha.11
- cojson@0.7.0-alpha.11
## 0.0.47-alpha.10
### Patch Changes
- Updated dependencies
- jazz-react@0.7.0-alpha.10
- jazz-tools@0.7.0-alpha.10
- cojson@0.7.0-alpha.10
## 0.0.47-alpha.9
### Patch Changes
- Updated dependencies
- jazz-react@0.7.0-alpha.9
- jazz-tools@0.7.0-alpha.9
## 0.0.47-alpha.8
### Patch Changes
- Updated dependencies
- jazz-react@0.7.0-alpha.8
- jazz-tools@0.7.0-alpha.8
## 0.0.47-alpha.7
### Patch Changes
- Updated dependencies
- jazz-react@0.7.0-alpha.7
- jazz-tools@0.7.0-alpha.7
- cojson@0.7.0-alpha.7
## 0.0.47-alpha.6
### Patch Changes
- Updated dependencies
- jazz-react@0.7.0-alpha.6
- jazz-tools@0.7.0-alpha.6
## 0.0.47-alpha.5
### Patch Changes
- Updated dependencies
- jazz-react@0.7.0-alpha.5
- jazz-tools@0.7.0-alpha.5
- cojson@0.7.0-alpha.5
## 0.0.47-alpha.4
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.0-alpha.4
- jazz-react@0.7.0-alpha.4
## 0.0.47-alpha.3
### Patch Changes
- Updated dependencies
- jazz-tools@0.7.0-alpha.3
- jazz-react@0.7.0-alpha.3
## 0.0.47-alpha.2
### Patch Changes
- Updated dependencies
- hash-slash@0.2.0-alpha.2
- jazz-react@0.7.0-alpha.2
- jazz-tools@0.7.0-alpha.2
## 0.0.47-alpha.1
### Patch Changes
- Updated dependencies
- hash-slash@0.2.0-alpha.1
- jazz-react@0.7.0-alpha.1
- jazz-tools@0.7.0-alpha.1
- cojson@0.7.0-alpha.1
## 0.0.47-alpha.0
### Patch Changes
- Updated dependencies
- hash-slash@0.2.0-alpha.0
- jazz-react@0.7.0-alpha.0
- jazz-tools@0.7.0-alpha.0
- cojson@0.7.0-alpha.0
## 0.0.46
### Patch Changes
- Updated dependencies
- jazz-react@0.5.0
- jazz-react-auth-local@0.4.16

View File

@@ -1,56 +0,0 @@
job "chat$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 = "chat$BRANCH_SUFFIX"
port = "http"
provider = "consul"
}
resources {
cpu = 50 # MHz
memory = 50 # MB
}
}
}
}
# deploy bump 4

View File

@@ -1,56 +0,0 @@
{
"name": "jazz-example-chat-clerk",
"private": true,
"version": "0.0.92",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"format": "echo 'chat example is codegolfed'",
"preview": "vite preview"
},
"lint-staged": {
"*.{ts,tsx}": "eslint --fix",
"*.{js,jsx,mdx,json}": "prettier --write"
},
"dependencies": {
"@clerk/clerk-react": "^5.4.1",
"@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.12",
"hash-slash": "workspace:0.2.1",
"jazz-react": "workspace:0.8.15",
"jazz-react-auth-clerk": "workspace:0.8.15",
"jazz-tools": "workspace:0.8.15",
"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"
},
"devDependencies": {
"@types/qrcode": "^1.5.1",
"@types/react": "^18.2.19",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"@vitejs/plugin-react-swc": "^3.3.2",
"autoprefixer": "^10.4.14",
"eslint": "^8.46.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"postcss": "^8.4.27",
"tailwindcss": "3.3.2",
"typescript": "^5.3.3",
"vite": "^5.0.10"
}
}

View File

@@ -1,31 +0,0 @@
import { Group, ID } from "jazz-tools";
import { useIframeHashRouter } from "hash-slash";
import { useAccount } from "./main.tsx";
import { Chat } from "./schema.ts";
import { ChatScreen } from "./chatScreen.tsx";
import { AppContainer, TopBar } from "./ui.tsx";
export function App() {
const { me, logOut } = useAccount();
const router = useIframeHashRouter();
const createChat = () => {
if (!me) return;
const group = Group.create({ owner: me });
group.addMember("everyone", "writer");
const chat = Chat.create([], { owner: group });
router.navigate("/#/chat/" + chat.id);
};
return (
<AppContainer>
<TopBar>
{me?.profile?.name} · <button onClick={logOut}>Log out</button>
</TopBar>
{router.route({
"/": () => createChat() as never,
"/chat/:id": id => <ChatScreen chatID={id as ID<Chat>} />,
})}
</AppContainer>
);
}

View File

@@ -1,43 +0,0 @@
import { ID } from "jazz-tools";
import { Chat, Message } from "./schema.ts";
import { useCoState } from "./main.tsx";
import {
BubbleBody,
BubbleContainer,
BubbleInfo,
ChatContainer,
ChatInput,
EmptyChatMessage,
} from "./ui.tsx";
export function ChatScreen(props: { chatID: ID<Chat> }) {
const chat = useCoState(Chat, props.chatID, [{}]);
return chat ? (
<ChatContainer>
{chat.length > 0 ? (
chat.map(msg => <ChatBubble msg={msg} key={msg.id} />)
) : (
<EmptyChatMessage />
)}
<ChatInput
onSubmit={text => {
chat.push(Message.create({ text }, { owner: chat._owner }));
}}
/>
</ChatContainer>
) : (
<div>Loading...</div>
);
}
function ChatBubble(props: { msg: Message }) {
const lastEdit = props.msg._edits.text;
return (
<BubbleContainer fromMe={lastEdit.by?.isMe}>
<BubbleBody>{props.msg.text}</BubbleBody>
<BubbleInfo by={lastEdit.by?.profile?.name} madeAt={lastEdit.madeAt} />
</BubbleContainer>
);
}

View File

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

@@ -1,63 +0,0 @@
export function AppContainer(props: { children: React.ReactNode }) {
return (
<div className="flex flex-col items-center justify-between w-screen h-screen p-2 dark:bg-black dark:text-white">
{props.children}
</div>
);
}
export function TopBar(props: { children: React.ReactNode }) {
return (
<div className="mb-5 px-2 py-1 text-sm self-end">{props.children}</div>
);
}
export function ChatContainer(props: { children: React.ReactNode }) {
return (
<div className="w-full max-w-xl h-full flex flex-col items-stretch">
{props.children}
</div>
);
}
export function EmptyChatMessage() {
return <div className="m-auto text-sm">(Empty chat)</div>;
}
export function BubbleContainer(props: {
children: React.ReactNode;
fromMe: boolean | undefined;
}) {
const align = props.fromMe ? "items-end" : "items-start";
return <div className={`${align} flex flex-col`}>{props.children}</div>;
}
export function BubbleBody(props: { children: React.ReactNode }) {
return (
<div className="rounded-xl bg-stone-100 dark:bg-stone-700 dark:text-white py-2 px-4 mt-2 min-w-[5rem]">
{props.children}
</div>
);
}
export function BubbleInfo(props: { by: string | undefined; madeAt: Date }) {
return (
<div className="text-xs text-neutral-500 ml-2">
{props.by} {props.madeAt.toLocaleTimeString()}
</div>
);
}
export function ChatInput(props: { onSubmit: (text: string) => void }) {
return (
<input
className="rounded p-2 border mt-auto dark:bg-black dark:text-white border-stone-300 dark:border-stone-700"
placeholder="Type a message and press Enter"
onKeyDown={({ key, currentTarget: input }) => {
if (key !== "Enter" || !input.value) return;
props.onSubmit(input.value);
input.value = "";
}}
/>
);
}

View File

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

View File

@@ -1,4 +0,0 @@
// https://docs.expo.dev/guides/using-eslint/
module.exports = {
extends: 'expo',
};

View File

@@ -1,74 +1,337 @@
# chat-rn-clerk
## 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
- Updated dependencies [9ca25d1]
- jazz-react-auth-clerk@0.8.34
- jazz-react-native@0.8.34
- jazz-tools@0.8.34
- jazz-react-native-media-images@0.8.25
## 1.0.25
### Patch Changes
- jazz-react-auth-clerk@0.8.33
## 1.0.24
### Patch Changes
- Updated dependencies [1a4bda0]
- Updated dependencies [df42b2b]
- jazz-react-auth-clerk@0.8.32
- jazz-tools@0.8.32
- jazz-react-native@0.8.32
- jazz-react-native-media-images@0.8.24
## 1.0.23
### Patch Changes
- jazz-react-auth-clerk@0.8.31
- jazz-react-native@0.8.31
- jazz-tools@0.8.31
- jazz-react-native-media-images@0.8.23
## 1.0.22
### Patch Changes
- jazz-react-auth-clerk@0.8.30
- jazz-react-native@0.8.30
- jazz-tools@0.8.30
- jazz-react-native-media-images@0.8.22
## 1.0.21
### Patch Changes
- jazz-react-native@0.8.29
- jazz-react-auth-clerk@0.8.29
- jazz-tools@0.8.29
- jazz-react-native-media-images@0.8.21
## 1.0.20
### Patch Changes
- jazz-react-auth-clerk@0.8.28
- jazz-react-native@0.8.28
- jazz-tools@0.8.28
- jazz-react-native-media-images@0.8.20
## 1.0.19
### Patch Changes
- jazz-react-auth-clerk@0.8.27
- jazz-react-native@0.8.27
- jazz-tools@0.8.27
- jazz-react-native-media-images@0.8.19
## 1.0.18
### Patch Changes
- jazz-react-auth-clerk@0.8.26
## 1.0.17
### Patch Changes
- jazz-react-auth-clerk@0.8.24
## 1.0.16
### Patch Changes
- Updated dependencies [d348c2d]
- Updated dependencies [6902b5b]
- Updated dependencies [1a0cd3d]
- jazz-tools@0.8.23
- jazz-react-auth-clerk@0.8.23
- jazz-react-native@0.8.23
- jazz-react-native-media-images@0.8.18
## 1.0.15
### Patch Changes
- jazz-react-auth-clerk@0.8.22
## 1.0.14
### Patch Changes
- Updated dependencies [149ca97]
- jazz-tools@0.8.21
- jazz-react-auth-clerk@0.8.21
- jazz-react-native@0.8.21
- jazz-react-native-media-images@0.8.17
## 1.0.13
### Patch Changes
- Updated dependencies [3ef3ff3]
- jazz-react-native-media-images@0.8.16
- jazz-react-native@0.8.20
- jazz-react-auth-clerk@0.8.20
## 1.0.12
### Patch Changes
- jazz-react-auth-clerk@0.8.19
- jazz-react-native@0.8.19
- jazz-tools@0.8.19
- jazz-react-native-media-images@0.8.15
## 1.0.11
### Patch Changes
- jazz-react-auth-clerk@0.8.18
- jazz-react-native@0.8.18
- jazz-tools@0.8.18
- jazz-react-native-media-images@0.8.14
## 1.0.10
### Patch Changes
- jazz-react-auth-clerk@0.8.17
- jazz-react-native@0.8.17
- jazz-tools@0.8.17
- jazz-react-native-media-images@0.8.13
## 1.0.9
### Patch Changes
- jazz-react-auth-clerk@0.8.16
- jazz-react-native@0.8.16
- jazz-tools@0.8.16
- jazz-react-native-media-images@0.8.12
## 1.0.8
### Patch Changes
- Updated dependencies [cce679b]
- Updated dependencies [221c58f]
- jazz-tools@0.8.15
- jazz-react-auth-clerk@0.8.15
- jazz-react-native@0.8.15
- jazz-react-native-media-images@0.8.11
- Updated dependencies [cce679b]
- Updated dependencies [221c58f]
- jazz-tools@0.8.15
- jazz-react-auth-clerk@0.8.15
- jazz-react-native@0.8.15
- jazz-react-native-media-images@0.8.11
## 1.0.7
### Patch Changes
- Updated dependencies [36273b3]
- jazz-tools@0.8.14
- jazz-react-auth-clerk@0.8.14
- jazz-react-native@0.8.14
- jazz-react-native-media-images@0.8.10
- Updated dependencies [36273b3]
- jazz-tools@0.8.14
- jazz-react-auth-clerk@0.8.14
- jazz-react-native@0.8.14
- jazz-react-native-media-images@0.8.10
## 1.0.6
### Patch Changes
- Updated dependencies [fd011d7]
- jazz-tools@0.8.13
- jazz-react-auth-clerk@0.8.13
- jazz-react-native@0.8.13
- jazz-react-native-media-images@0.8.9
- Updated dependencies [fd011d7]
- jazz-tools@0.8.13
- jazz-react-auth-clerk@0.8.13
- jazz-react-native@0.8.13
- jazz-react-native-media-images@0.8.9
## 1.0.5
### Patch Changes
- jazz-react-auth-clerk@0.8.12
- jazz-react-native@0.8.12
- jazz-tools@0.8.12
- jazz-react-native-media-images@0.8.8
- jazz-react-auth-clerk@0.8.12
- jazz-react-native@0.8.12
- jazz-tools@0.8.12
- jazz-react-native-media-images@0.8.8
## 1.0.4
### Patch Changes
- jazz-react-auth-clerk@0.8.11
- jazz-react-native@0.8.11
- jazz-tools@0.8.11
- jazz-react-native-media-images@0.8.7
- jazz-react-auth-clerk@0.8.11
- jazz-react-native@0.8.11
- jazz-tools@0.8.11
- jazz-react-native-media-images@0.8.7
## 1.0.3
### Patch Changes
- b7639cf: feat(react-native): replaced react-native-mmkv with expo-secure-store and initialize it by default as kvStore in createJazzRNApp() (BREAKING)
- Updated dependencies [b7639cf]
- jazz-react-native@0.8.8
- b7639cf: feat(react-native): replaced react-native-mmkv with expo-secure-store and initialize it by default as kvStore in createJazzRNApp() (BREAKING)
- Updated dependencies [b7639cf]
- jazz-react-native@0.8.8
## 1.0.2
### Patch Changes
- Updated dependencies [32b05b6]
- jazz-react-native-media-images@0.8.6
- jazz-react-native@0.8.7
- jazz-react-auth-clerk@0.8.7
- Updated dependencies [32b05b6]
- jazz-react-native-media-images@0.8.6
- jazz-react-native@0.8.7
- jazz-react-auth-clerk@0.8.7
## 1.0.1
### Patch Changes
- jazz-react-native@0.8.6
- jazz-react-auth-clerk@0.8.6
- jazz-react-native@0.8.6
- jazz-react-auth-clerk@0.8.6

View File

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

View File

@@ -1,17 +1,15 @@
import { Redirect, Stack } from "expo-router";
import React from "react";
import { useAuth } from "../../src/auth-context";
import { Redirect, Stack } from "expo-router";
export default function HomeLayout() {
const { isAuthenticated } = useAuth();
const { isAuthenticated } = useAuth();
if (isAuthenticated) {
return <Redirect href={"/chat"} />;
}
if (isAuthenticated) {
return <Redirect href={"/chat"} />;
}
return (
<Stack
screenOptions={{ headerShown: false, headerBackVisible: true }}
/>
);
return (
<Stack screenOptions={{ headerShown: false, headerBackVisible: true }} />
);
}

View File

@@ -1,33 +1,33 @@
import React from "react";
import { SignedOut } from "@clerk/clerk-expo";
import { Link } from "expo-router";
import React from "react";
import { Text, View } from "react-native";
export default function HomePage() {
return (
<View className="flex-1 justify-center items-center bg-gray-100 p-6">
<SignedOut>
<View className="bg-white p-6 rounded-lg shadow-lg w-11/12 max-w-md">
<Text className="text-2xl font-bold text-center text-gray-900 mb-4">
Jazz 🤝 Clerk 🤝 Expo
</Text>
<Link href="/sign-in" className="mb-4">
<Text className="text-center text-blue-600 underline text-lg">
Sign In
</Text>
</Link>
<Link href="/sign-in-oauth" className="mb-4">
<Text className="text-center text-blue-600 underline text-lg">
Sign In OAuth
</Text>
</Link>
<Link href="/sign-up">
<Text className="text-center text-blue-600 underline text-lg">
Sign Up
</Text>
</Link>
</View>
</SignedOut>
return (
<View className="flex-1 justify-center items-center bg-gray-100 p-6">
<SignedOut>
<View className="bg-white p-6 rounded-lg shadow-lg w-11/12 max-w-md">
<Text className="text-2xl font-bold text-center text-gray-900 mb-4">
Jazz 🤝 Clerk 🤝 Expo
</Text>
<Link href="/sign-in" className="mb-4">
<Text className="text-center text-blue-600 underline text-lg">
Sign In
</Text>
</Link>
<Link href="/sign-in-oauth" className="mb-4">
<Text className="text-center text-blue-600 underline text-lg">
Sign In OAuth
</Text>
</Link>
<Link href="/sign-up">
<Text className="text-center text-blue-600 underline text-lg">
Sign Up
</Text>
</Link>
</View>
);
</SignedOut>
</View>
);
}

View File

@@ -2,19 +2,19 @@ import { Redirect, Stack } from "expo-router";
import { useAuth } from "../../src/auth-context";
export default function UnAuthenticatedLayout() {
const { isAuthenticated } = useAuth();
const { isAuthenticated } = useAuth();
if (isAuthenticated) {
return <Redirect href={"/chat"} />;
}
if (isAuthenticated) {
return <Redirect href={"/chat"} />;
}
return (
<Stack
screenOptions={{
headerShown: true,
headerBackVisible: true,
headerTitle: "",
}}
/>
);
return (
<Stack
screenOptions={{
headerShown: true,
headerBackVisible: true,
headerTitle: "",
}}
/>
);
}

View File

@@ -1,65 +1,65 @@
import React from "react";
import * as WebBrowser from "expo-web-browser";
import { Text, View, TouchableOpacity } from "react-native";
import { Link } from "expo-router";
import { useOAuth } from "@clerk/clerk-expo";
import * as Linking from "expo-linking";
import { Link } from "expo-router";
import * as WebBrowser from "expo-web-browser";
import React from "react";
import { Text, TouchableOpacity, View } from "react-native";
export const useWarmUpBrowser = () => {
React.useEffect(() => {
// Warm up the android browser to improve UX
// https://docs.expo.dev/guides/authentication/#improving-user-experience
void WebBrowser.warmUpAsync();
return () => {
void WebBrowser.coolDownAsync();
};
}, []);
React.useEffect(() => {
// Warm up the android browser to improve UX
// https://docs.expo.dev/guides/authentication/#improving-user-experience
void WebBrowser.warmUpAsync();
return () => {
void WebBrowser.coolDownAsync();
};
}, []);
};
WebBrowser.maybeCompleteAuthSession();
const SignInWithOAuth = () => {
useWarmUpBrowser();
useWarmUpBrowser();
const { startOAuthFlow } = useOAuth({ strategy: "oauth_google" });
const { startOAuthFlow } = useOAuth({ strategy: "oauth_google" });
const onPress = React.useCallback(async () => {
try {
const { createdSessionId, signIn, signUp, setActive } =
await startOAuthFlow({
redirectUrl: Linking.createURL("/", {
scheme: "jazz-chat-rn-clerk",
}),
});
const onPress = React.useCallback(async () => {
try {
const { createdSessionId, signIn, signUp, setActive } =
await startOAuthFlow({
redirectUrl: Linking.createURL("/", {
scheme: "jazz-chat-rn-clerk",
}),
});
if (createdSessionId) {
setActive!({ session: createdSessionId });
} else {
// Use signIn or signUp for next steps such as MFA
}
} catch (err) {
console.error("OAuth error", err);
}
}, []);
if (createdSessionId) {
setActive!({ session: createdSessionId });
} else {
// Use signIn or signUp for next steps such as MFA
}
} catch (err) {
console.error("OAuth error", err);
}
}, []);
return (
<View className="flex-1 justify-center items-center bg-gray-50 p-6">
<View className="bg-white w-11/12 max-w-md p-8 rounded-lg shadow-lg items-center">
<TouchableOpacity
onPress={onPress}
className="w-full bg-red-500 py-3 rounded-lg flex items-center justify-center"
>
<Text className="text-white text-lg font-semibold">
Sign in with Google
</Text>
</TouchableOpacity>
<Link href="/" className="mt-4">
<Text className="text-blue-600 text-lg font-semibold underline mb-6">
Back to Home
</Text>
</Link>
</View>
</View>
);
return (
<View className="flex-1 justify-center items-center bg-gray-50 p-6">
<View className="bg-white w-11/12 max-w-md p-8 rounded-lg shadow-lg items-center">
<TouchableOpacity
onPress={onPress}
className="w-full bg-red-500 py-3 rounded-lg flex items-center justify-center"
>
<Text className="text-white text-lg font-semibold">
Sign in with Google
</Text>
</TouchableOpacity>
<Link href="/" className="mt-4">
<Text className="text-blue-600 text-lg font-semibold underline mb-6">
Back to Home
</Text>
</Link>
</View>
</View>
);
};
export default SignInWithOAuth;

View File

@@ -1,91 +1,79 @@
import { useSignIn } from "@clerk/clerk-expo";
import { Text, TextInput, View, TouchableOpacity } from "react-native";
import React from "react";
import { Link } from "expo-router";
import React from "react";
import { Text, TextInput, TouchableOpacity, View } from "react-native";
export default function SignInPage() {
const { signIn, setActive, isLoaded } = useSignIn();
const [emailAddress, setEmailAddress] = React.useState("");
const [password, setPassword] = React.useState("");
const [errorMessage, setErrorMessage] = React.useState("");
const { signIn, setActive, isLoaded } = useSignIn();
const [emailAddress, setEmailAddress] = React.useState("");
const [password, setPassword] = React.useState("");
const [errorMessage, setErrorMessage] = React.useState("");
const onSignInPress = React.useCallback(async () => {
if (!isLoaded) {
return;
}
const onSignInPress = React.useCallback(async () => {
if (!isLoaded) {
return;
}
setErrorMessage("");
setErrorMessage("");
try {
const signInAttempt = await signIn.create({
identifier: emailAddress,
password,
});
try {
const signInAttempt = await signIn.create({
identifier: emailAddress,
password,
});
if (signInAttempt.status === "complete") {
await setActive({ session: signInAttempt.createdSessionId });
} else {
console.error(JSON.stringify(signInAttempt, null, 2));
setErrorMessage("Invalid credentials. Please try again.");
}
} catch (err: any) {
console.error(JSON.stringify(err, null, 2));
if (err.errors && err.errors[0]?.message) {
setErrorMessage(err.errors[0].message);
} else {
setErrorMessage(
"An unexpected error occurred. Please try again.",
);
}
}
}, [isLoaded, emailAddress, password]);
if (signInAttempt.status === "complete") {
await setActive({ session: signInAttempt.createdSessionId });
} else {
console.error(JSON.stringify(signInAttempt, null, 2));
setErrorMessage("Invalid credentials. Please try again.");
}
} catch (err: any) {
console.error(JSON.stringify(err, null, 2));
if (err.errors && err.errors[0]?.message) {
setErrorMessage(err.errors[0].message);
} else {
setErrorMessage("An unexpected error occurred. Please try again.");
}
}
}, [isLoaded, emailAddress, password]);
return (
<View className="flex-1 justify-center items-center bg-gray-50 p-6">
<View className="bg-white w-11/12 max-w-md p-8 rounded-lg shadow-md">
<Text className="text-3xl font-bold text-center text-gray-800 mb-6">
Sign In
</Text>
{errorMessage ? (
<Text className="text-red-500 text-center mb-4">
{errorMessage}
</Text>
) : null}
<TextInput
autoCapitalize="none"
value={emailAddress}
placeholder="Email..."
onChangeText={(emailAddress) =>
setEmailAddress(emailAddress)
}
className="w-full h-12 mb-4 px-4 bg-gray-100 border border-gray-300 rounded-lg focus:border-blue-500 focus:outline-none"
/>
<TextInput
value={password}
placeholder="Password..."
secureTextEntry={true}
onChangeText={(password) => setPassword(password)}
className="w-full h-12 mb-6 px-4 bg-gray-100 border border-gray-300 rounded-lg focus:border-blue-500 focus:outline-none"
/>
<TouchableOpacity
onPress={onSignInPress}
className="w-full h-12 bg-blue-600 rounded-lg flex items-center justify-center"
>
<Text className="text-white text-lg font-semibold">
Sign In
</Text>
</TouchableOpacity>
<View className="flex-row items-center justify-center mt-4">
<Text className="text-gray-600">
Don't have an account?
</Text>
<Link href="/sign-up">
<Text className="text-blue-500 ml-2 font-semibold">
Sign up
</Text>
</Link>
</View>
</View>
return (
<View className="flex-1 justify-center items-center bg-gray-50 p-6">
<View className="bg-white w-11/12 max-w-md p-8 rounded-lg shadow-md">
<Text className="text-3xl font-bold text-center text-gray-800 mb-6">
Sign In
</Text>
{errorMessage ? (
<Text className="text-red-500 text-center mb-4">{errorMessage}</Text>
) : null}
<TextInput
autoCapitalize="none"
value={emailAddress}
placeholder="Email..."
onChangeText={(emailAddress) => setEmailAddress(emailAddress)}
className="w-full h-12 mb-4 px-4 bg-gray-100 border border-gray-300 rounded-lg focus:border-blue-500 focus:outline-none"
/>
<TextInput
value={password}
placeholder="Password..."
secureTextEntry={true}
onChangeText={(password) => setPassword(password)}
className="w-full h-12 mb-6 px-4 bg-gray-100 border border-gray-300 rounded-lg focus:border-blue-500 focus:outline-none"
/>
<TouchableOpacity
onPress={onSignInPress}
className="w-full h-12 bg-blue-600 rounded-lg flex items-center justify-center"
>
<Text className="text-white text-lg font-semibold">Sign In</Text>
</TouchableOpacity>
<View className="flex-row items-center justify-center mt-4">
<Text className="text-gray-600">Don't have an account?</Text>
<Link href="/sign-up">
<Text className="text-blue-500 ml-2 font-semibold">Sign up</Text>
</Link>
</View>
);
</View>
</View>
);
}

View File

@@ -1,128 +1,120 @@
import * as React from "react";
import { TextInput, View, Text, TouchableOpacity } from "react-native";
import { useSignUp } from "@clerk/clerk-expo";
import { useNavigation } from "@react-navigation/native";
import * as React from "react";
import { Text, TextInput, TouchableOpacity, View } from "react-native";
export default function SignUpPage() {
const { isLoaded, signUp, setActive } = useSignUp();
const { isLoaded, signUp, setActive } = useSignUp();
const [emailAddress, setEmailAddress] = React.useState("");
const [password, setPassword] = React.useState("");
const [pendingVerification, setPendingVerification] = React.useState(false);
const [code, setCode] = React.useState("");
const [errorMessage, setErrorMessage] = React.useState("");
const navigation = useNavigation();
const [emailAddress, setEmailAddress] = React.useState("");
const [password, setPassword] = React.useState("");
const [pendingVerification, setPendingVerification] = React.useState(false);
const [code, setCode] = React.useState("");
const [errorMessage, setErrorMessage] = React.useState("");
const navigation = useNavigation();
const onSignUpPress = async () => {
if (!isLoaded) return;
const onSignUpPress = async () => {
if (!isLoaded) return;
setErrorMessage("");
setErrorMessage("");
try {
await signUp.create({
emailAddress,
password,
});
try {
await signUp.create({
emailAddress,
password,
});
await signUp.prepareEmailAddressVerification({
strategy: "email_code",
});
await signUp.prepareEmailAddressVerification({
strategy: "email_code",
});
setPendingVerification(true);
} catch (err: any) {
console.error(JSON.stringify(err, null, 2));
if (err.errors && err.errors[0]?.message) {
setErrorMessage(err.errors[0].message);
} else {
setErrorMessage(
"An unexpected error occurred. Please try again.",
);
}
}
};
setPendingVerification(true);
} catch (err: any) {
console.error(JSON.stringify(err, null, 2));
if (err.errors && err.errors[0]?.message) {
setErrorMessage(err.errors[0].message);
} else {
setErrorMessage("An unexpected error occurred. Please try again.");
}
}
};
const onPressVerify = async () => {
if (!isLoaded) return;
const onPressVerify = async () => {
if (!isLoaded) return;
setErrorMessage("");
setErrorMessage("");
try {
const completeSignUp = await signUp.attemptEmailAddressVerification(
{
code,
},
);
try {
const completeSignUp = await signUp.attemptEmailAddressVerification({
code,
});
if (completeSignUp.status === "complete") {
await setActive({ session: completeSignUp.createdSessionId });
} else {
console.error(JSON.stringify(completeSignUp, null, 2));
setErrorMessage("Failed to verify. Please check your code.");
}
} catch (err: any) {
console.error(JSON.stringify(err, null, 2));
setErrorMessage("Invalid verification code. Please try again.");
}
};
if (completeSignUp.status === "complete") {
await setActive({ session: completeSignUp.createdSessionId });
} else {
console.error(JSON.stringify(completeSignUp, null, 2));
setErrorMessage("Failed to verify. Please check your code.");
}
} catch (err: any) {
console.error(JSON.stringify(err, null, 2));
setErrorMessage("Invalid verification code. Please try again.");
}
};
return (
<View className="flex-1 justify-center items-center bg-gray-50 p-6">
<View className="bg-white w-11/12 max-w-md p-8 rounded-lg shadow-lg">
<Text className="text-3xl font-bold text-center text-gray-800 mb-6">
{pendingVerification ? "Verify Email" : "Sign Up"}
</Text>
{errorMessage ? (
<Text className="text-red-500 text-center mb-4">
{errorMessage}
</Text>
) : null}
return (
<View className="flex-1 justify-center items-center bg-gray-50 p-6">
<View className="bg-white w-11/12 max-w-md p-8 rounded-lg shadow-lg">
<Text className="text-3xl font-bold text-center text-gray-800 mb-6">
{pendingVerification ? "Verify Email" : "Sign Up"}
</Text>
{errorMessage ? (
<Text className="text-red-500 text-center mb-4">{errorMessage}</Text>
) : null}
{!pendingVerification && (
<>
<TextInput
autoCapitalize="none"
value={emailAddress}
placeholder="Email..."
onChangeText={(email) => setEmailAddress(email)}
className="w-full h-12 mb-4 px-4 bg-gray-100 border border-gray-300 rounded-lg focus:border-blue-500 focus:outline-none"
/>
<TextInput
value={password}
placeholder="Password..."
secureTextEntry={true}
onChangeText={(password) => setPassword(password)}
className="w-full h-12 mb-6 px-4 bg-gray-100 border border-gray-300 rounded-lg focus:border-blue-500 focus:outline-none"
/>
<TouchableOpacity
onPress={onSignUpPress}
className="w-full h-12 bg-blue-600 rounded-lg flex justify-center items-center mb-4"
>
<Text className="text-white text-lg font-semibold">
Sign Up
</Text>
</TouchableOpacity>
</>
)}
{!pendingVerification && (
<>
<TextInput
autoCapitalize="none"
value={emailAddress}
placeholder="Email..."
onChangeText={(email) => setEmailAddress(email)}
className="w-full h-12 mb-4 px-4 bg-gray-100 border border-gray-300 rounded-lg focus:border-blue-500 focus:outline-none"
/>
<TextInput
value={password}
placeholder="Password..."
secureTextEntry={true}
onChangeText={(password) => setPassword(password)}
className="w-full h-12 mb-6 px-4 bg-gray-100 border border-gray-300 rounded-lg focus:border-blue-500 focus:outline-none"
/>
<TouchableOpacity
onPress={onSignUpPress}
className="w-full h-12 bg-blue-600 rounded-lg flex justify-center items-center mb-4"
>
<Text className="text-white text-lg font-semibold">Sign Up</Text>
</TouchableOpacity>
</>
)}
{pendingVerification && (
<>
<TextInput
value={code}
placeholder="Verification Code..."
onChangeText={(code) => setCode(code)}
className="w-full h-12 mb-4 px-4 bg-gray-100 border border-gray-300 rounded-lg focus:border-blue-500 focus:outline-none"
/>
<TouchableOpacity
onPress={onPressVerify}
className="w-full h-12 bg-green-600 rounded-lg flex justify-center items-center mb-4"
>
<Text className="text-white text-lg font-semibold">
Verify Email
</Text>
</TouchableOpacity>
</>
)}
</View>
</View>
);
{pendingVerification && (
<>
<TextInput
value={code}
placeholder="Verification Code..."
onChangeText={(code) => setCode(code)}
className="w-full h-12 mb-4 px-4 bg-gray-100 border border-gray-300 rounded-lg focus:border-blue-500 focus:outline-none"
/>
<TouchableOpacity
onPress={onPressVerify}
className="w-full h-12 bg-green-600 rounded-lg flex justify-center items-center mb-4"
>
<Text className="text-white text-lg font-semibold">
Verify Email
</Text>
</TouchableOpacity>
</>
)}
</View>
</View>
);
}

View File

@@ -6,31 +6,29 @@ import { type PropsWithChildren } from "react";
* The contents of this function only run in Node.js environments and do not have access to the DOM or browser APIs.
*/
export default function Root({ children }: PropsWithChildren) {
return (
<html lang="en">
<head>
<meta charSet="utf-8" />
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
return (
<html lang="en">
<head>
<meta charSet="utf-8" />
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
{/*
{/*
Disable body scrolling on web. This makes ScrollView components work closer to how they do on native.
However, body scrolling is often nice to have for mobile web. If you want to enable it, remove this line.
*/}
<ScrollViewStyleReset />
<ScrollViewStyleReset />
{/* Using raw CSS styles as an escape-hatch to ensure the background color never flickers in dark-mode. */}
<style
dangerouslySetInnerHTML={{ __html: responsiveBackground }}
/>
{/* Add any additional <head> elements that you want globally available on web... */}
</head>
<body>{children}</body>
</html>
);
{/* Using raw CSS styles as an escape-hatch to ensure the background color never flickers in dark-mode. */}
<style dangerouslySetInnerHTML={{ __html: responsiveBackground }} />
{/* Add any additional <head> elements that you want globally available on web... */}
</head>
<body>{children}</body>
</html>
);
}
const responsiveBackground = `

View File

@@ -1,5 +1,5 @@
import { Link, Stack } from "expo-router";
import { StyleSheet, View, Text } from "react-native";
import { StyleSheet, Text, View } from "react-native";
export default function NotFoundScreen() {
return (

View File

@@ -1,43 +1,44 @@
import { useFonts } from "expo-font";
import "../global.css";
import { ClerkLoaded, ClerkProvider } from "@clerk/clerk-expo";
import { useFonts } from "expo-font";
import { Slot } from "expo-router";
import * as SplashScreen from "expo-splash-screen";
import React, { useEffect } from "react";
import { Slot } from "expo-router";
import { tokenCache } from "../cache";
import { JazzAndAuth } from "../src/auth-context";
SplashScreen.preventAutoHideAsync();
export default function RootLayout() {
const [loaded] = useFonts({
SpaceMono: require("../assets/fonts/SpaceMono-Regular.ttf"),
});
const [loaded] = useFonts({
SpaceMono: require("../assets/fonts/SpaceMono-Regular.ttf"),
});
useEffect(() => {
if (loaded) {
SplashScreen.hideAsync();
}
}, [loaded]);
if (!loaded) {
return null;
useEffect(() => {
if (loaded) {
SplashScreen.hideAsync();
}
}, [loaded]);
const publishableKey = process.env.EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY;
if (!loaded) {
return null;
}
if (!publishableKey) {
throw new Error(
"Missing Publishable Key. Please set EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY in your .env",
);
}
const publishableKey = process.env.EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY;
return (
<ClerkProvider tokenCache={tokenCache} publishableKey={publishableKey}>
<ClerkLoaded>
<JazzAndAuth>
<Slot />
</JazzAndAuth>
</ClerkLoaded>
</ClerkProvider>
if (!publishableKey) {
throw new Error(
"Missing Publishable Key. Please set EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY in your .env",
);
}
return (
<ClerkProvider tokenCache={tokenCache} publishableKey={publishableKey}>
<ClerkLoaded>
<JazzAndAuth>
<Slot />
</JazzAndAuth>
</ClerkLoaded>
</ClerkProvider>
);
}

View File

@@ -1,173 +1,168 @@
import React, {
SafeAreaView,
View,
Text,
Alert,
TouchableOpacity,
FlatList,
KeyboardAvoidingView,
TextInput,
Button,
} from "react-native";
import { useLocalSearchParams } from "expo-router";
import { useState, useEffect, useLayoutEffect } from "react";
import { useAccount, useCoState } from "@/src/jazz";
import { Chat, Message } from "@/src/schema";
import { Group, ID } from "jazz-tools";
import { useFocusEffect, useNavigation } from "@react-navigation/native";
import clsx from "clsx";
import { useNavigation, useFocusEffect } from "@react-navigation/native";
import * as Clipboard from "expo-clipboard";
import { useLocalSearchParams } from "expo-router";
import { Group, ID } from "jazz-tools";
import { useEffect, useLayoutEffect, useState } from "react";
import React, {
SafeAreaView,
View,
Text,
Alert,
TouchableOpacity,
FlatList,
KeyboardAvoidingView,
TextInput,
Button,
} from "react-native";
export default function Conversation() {
const { chatId } = useLocalSearchParams();
const { me } = useAccount();
const [chat, setChat] = useState<Chat>();
const [message, setMessage] = useState("");
const loadedChat = useCoState(Chat, chat?.id, [{}]);
const navigation = useNavigation();
const { chatId } = useLocalSearchParams();
const { me } = useAccount();
const [chat, setChat] = useState<Chat>();
const [message, setMessage] = useState("");
const loadedChat = useCoState(Chat, chat?.id, [{}]);
const navigation = useNavigation();
useEffect(() => {
if (chat) return;
if (chatId === "new") {
createChat();
} else {
loadChat(chatId as ID<Chat>);
}
}, [chat]);
useEffect(() => {
if (chat) return;
if (chatId === "new") {
createChat();
} else {
loadChat(chatId as ID<Chat>);
}
}, [chat]);
// Effect to dynamically set header options
useLayoutEffect(() => {
navigation.setOptions({
headerTitle: "Chat",
headerRight: () =>
chat ? (
<Button
onPress={() => {
if (chat?.id) {
Clipboard.setStringAsync(
`https://chat.jazz.tools/#/chat/${chat.id}`,
);
Alert.alert(
"Copied to clipboard",
`Chat ID: ${chat.id}`,
);
}
}}
title="Share"
/>
) : null,
});
}, [navigation, chat]);
// Effect to dynamically set header options
useLayoutEffect(() => {
navigation.setOptions({
headerTitle: "Chat",
headerRight: () =>
chat ? (
<Button
onPress={() => {
if (chat?.id) {
Clipboard.setStringAsync(
`https://chat.jazz.tools/#/chat/${chat.id}`,
);
Alert.alert("Copied to clipboard", `Chat ID: ${chat.id}`);
}
}}
title="Share"
/>
) : null,
});
}, [navigation, chat]);
const createChat = () => {
const group = Group.create({ owner: me });
group.addMember("everyone", "writer");
const chat = Chat.create([], { owner: group });
setChat(chat);
};
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}`);
}
};
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}`);
}
};
const sendMessage = () => {
if (!chat) return;
if (message.trim()) {
chat.push(
Message.create({ text: message }, { owner: chat._owner }),
);
setMessage("");
}
};
const renderMessageItem = ({ item }: { item: Message }) => {
const isMe = item._edits.text.by?.isMe;
return (
<View
className={clsx(
`rounded-xl px-3 py-2 max-w-[75%] my-1`,
isMe ? `bg-blue-500 self-end` : `bg-gray-200 self-start`,
)}
>
{!isMe ? (
<Text
className={clsx(
`text-xs text-gray-500 mb-1`,
isMe ? "text-right" : "text-left",
)}
>
{item._edits.text.by?.profile?.name}
</Text>
) : null}
<View
className={clsx(
"flex relative items-end justify-between",
isMe ? "flex-row" : "flex-row",
)}
>
<Text
className={clsx(
!isMe ? "text-black" : "text-gray-200",
`text-md max-w-[85%]`,
)}
>
{item.text}
</Text>
<Text
className={clsx(
"text-[10px] text-right ml-2",
!isMe ? "mt-2 text-gray-500" : "mt-1 text-gray-200",
)}
>
{item._edits.text.madeAt.getHours()}:
{item._edits.text.madeAt.getMinutes()}
</Text>
</View>
</View>
);
};
const sendMessage = () => {
if (!chat) return;
if (message.trim()) {
chat.push(Message.create({ text: message }, { owner: chat._owner }));
setMessage("");
}
};
const renderMessageItem = ({ item }: { item: Message }) => {
const isMe = item._edits.text.by?.isMe;
return (
<View className="flex-1 bg-gray-50">
<FlatList
contentContainerStyle={{
flexGrow: 1,
paddingVertical: 10,
paddingHorizontal: 8,
}}
className="flex"
data={loadedChat}
keyExtractor={(item) => item.id}
renderItem={renderMessageItem}
/>
<KeyboardAvoidingView
keyboardVerticalOffset={110}
behavior="padding"
className="p-3 bg-white border-t border-gray-300"
>
<SafeAreaView className="flex-row items-center gap-2">
<TextInput
className="flex-1 rounded-full h-10 px-4 bg-gray-100 border border-gray-300 focus:border-blue-500 focus:bg-white"
value={message}
onChangeText={setMessage}
placeholder="Type a message..."
textAlignVertical="center"
onSubmitEditing={sendMessage}
/>
<TouchableOpacity
onPress={sendMessage}
className="bg-blue-500 rounded-full h-10 w-10 items-center justify-center"
>
<Text className="text-white text-xl"></Text>
</TouchableOpacity>
</SafeAreaView>
</KeyboardAvoidingView>
<View
className={clsx(
`rounded-xl px-3 py-2 max-w-[75%] my-1`,
isMe ? `bg-blue-500 self-end` : `bg-gray-200 self-start`,
)}
>
{!isMe ? (
<Text
className={clsx(
`text-xs text-gray-500 mb-1`,
isMe ? "text-right" : "text-left",
)}
>
{item._edits.text.by?.profile?.name}
</Text>
) : null}
<View
className={clsx(
"flex relative items-end justify-between",
isMe ? "flex-row" : "flex-row",
)}
>
<Text
className={clsx(
!isMe ? "text-black" : "text-gray-200",
`text-md max-w-[85%]`,
)}
>
{item.text}
</Text>
<Text
className={clsx(
"text-[10px] text-right ml-2",
!isMe ? "mt-2 text-gray-500" : "mt-1 text-gray-200",
)}
>
{item._edits.text.madeAt.getHours()}:
{item._edits.text.madeAt.getMinutes()}
</Text>
</View>
</View>
);
};
return (
<View className="flex-1 bg-gray-50">
<FlatList
contentContainerStyle={{
flexGrow: 1,
paddingVertical: 10,
paddingHorizontal: 8,
}}
className="flex"
data={loadedChat}
keyExtractor={(item) => item.id}
renderItem={renderMessageItem}
/>
<KeyboardAvoidingView
keyboardVerticalOffset={110}
behavior="padding"
className="p-3 bg-white border-t border-gray-300"
>
<SafeAreaView className="flex-row items-center gap-2">
<TextInput
className="flex-1 rounded-full h-10 px-4 bg-gray-100 border border-gray-300 focus:border-blue-500 focus:bg-white"
value={message}
onChangeText={setMessage}
placeholder="Type a message..."
textAlignVertical="center"
onSubmitEditing={sendMessage}
/>
<TouchableOpacity
onPress={sendMessage}
className="bg-blue-500 rounded-full h-10 w-10 items-center justify-center"
>
<Text className="text-white text-xl"></Text>
</TouchableOpacity>
</SafeAreaView>
</KeyboardAvoidingView>
</View>
);
}

View File

@@ -1,14 +1,14 @@
import React from "react";
import { Stack } from "expo-router";
import React from "react";
export default function ChatLayout() {
return (
<Stack
screenOptions={{
headerShown: true,
headerBackVisible: true,
headerTitle: "",
}}
/>
);
return (
<Stack
screenOptions={{
headerShown: true,
headerBackVisible: true,
headerTitle: "",
}}
/>
);
}

View File

@@ -1,85 +1,85 @@
import { useNavigation } from "@react-navigation/native";
import { useRouter } from "expo-router";
import { ID } from "jazz-tools";
import { useLayoutEffect } from "react";
import React, {
Button,
Text,
TouchableOpacity,
View,
Alert,
Button,
Text,
TouchableOpacity,
View,
Alert,
} from "react-native";
import { ID } from "jazz-tools";
import { useRouter } from "expo-router";
import { useNavigation } from "@react-navigation/native";
import { Chat } from "../../src/schema";
import { useAccount } from "../../src/jazz";
import { useUser } from "@clerk/clerk-expo";
import { useAccount } from "../../src/jazz";
import { Chat } from "../../src/schema";
export default function ChatScreen() {
const { logOut } = useAccount();
const router = useRouter();
const navigation = useNavigation();
const { user } = useUser();
const { logOut } = useAccount();
const router = useRouter();
const navigation = useNavigation();
const { user } = useUser();
useLayoutEffect(() => {
navigation.setOptions({
headerTitle: "Chat",
headerRight: () => <Button onPress={logOut} title="Logout" />,
});
}, [navigation]);
useLayoutEffect(() => {
navigation.setOptions({
headerTitle: "Chat",
headerRight: () => <Button onPress={logOut} title="Logout" />,
});
}, [navigation]);
const loadChat = async (chatId: ID<Chat> | "new") => {
router.navigate(`/chat/${chatId}`);
};
const loadChat = async (chatId: ID<Chat> | "new") => {
router.navigate(`/chat/${chatId}`);
};
const joinChat = () => {
Alert.prompt(
"Join Chat",
"Enter the Chat ID (example: co_zBGEHYvRfGuT2YSBraY3njGjnde)",
[
{
text: "Cancel",
style: "cancel",
},
{
text: "Join",
onPress: (chatId) => {
if (chatId) {
loadChat(chatId as ID<Chat>);
} else {
Alert.alert("Error", "Chat ID cannot be empty.");
}
},
},
],
"plain-text",
);
};
return (
<View className="flex-1 bg-gray-50">
<View className="flex-1 justify-center items-center px-6">
<View className="w-full max-w-sm bg-white p-8 rounded-lg shadow-lg">
<Text className="text-xl font-semibold text-gray-800">
Welcome, {user?.emailAddresses[0].emailAddress}
</Text>
<TouchableOpacity
onPress={() => loadChat("new")}
className="w-full bg-blue-600 py-4 rounded-md mb-4 mt-4"
>
<Text className="text-white text-lg font-semibold text-center">
Start New Chat
</Text>
</TouchableOpacity>
<TouchableOpacity
onPress={joinChat}
className="w-full bg-green-500 py-4 rounded-md"
>
<Text className="text-white text-lg font-semibold text-center">
Join Chat
</Text>
</TouchableOpacity>
</View>
</View>
</View>
const joinChat = () => {
Alert.prompt(
"Join Chat",
"Enter the Chat ID (example: co_zBGEHYvRfGuT2YSBraY3njGjnde)",
[
{
text: "Cancel",
style: "cancel",
},
{
text: "Join",
onPress: (chatId) => {
if (chatId) {
loadChat(chatId as ID<Chat>);
} else {
Alert.alert("Error", "Chat ID cannot be empty.");
}
},
},
],
"plain-text",
);
};
return (
<View className="flex-1 bg-gray-50">
<View className="flex-1 justify-center items-center px-6">
<View className="w-full max-w-sm bg-white p-8 rounded-lg shadow-lg">
<Text className="text-xl font-semibold text-gray-800">
Welcome, {user?.emailAddresses[0].emailAddress}
</Text>
<TouchableOpacity
onPress={() => loadChat("new")}
className="w-full bg-blue-600 py-4 rounded-md mb-4 mt-4"
>
<Text className="text-white text-lg font-semibold text-center">
Start New Chat
</Text>
</TouchableOpacity>
<TouchableOpacity
onPress={joinChat}
className="w-full bg-green-500 py-4 rounded-md"
>
<Text className="text-white text-lg font-semibold text-center">
Join Chat
</Text>
</TouchableOpacity>
</View>
</View>
</View>
);
}

View File

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

View File

@@ -2,35 +2,38 @@ import * as SecureStore from "expo-secure-store";
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;
getToken: (key: string) => Promise<string | undefined | null>;
saveToken: (key: string, token: string) => Promise<void>;
clearToken: (key: string) => void;
}
const createTokenCache = (): TokenCache => {
return {
getToken: async (key: string) => {
try {
const item = await SecureStore.getItemAsync(key);
if (item) {
console.log(`${key} was used 🔐 \n`);
} else {
console.log("No values stored under key: " + key);
}
return item;
} catch (error) {
console.error("secure store get item error: ", error);
await SecureStore.deleteItemAsync(key);
return null;
}
},
saveToken: (key: string, token: string) => {
return SecureStore.setItemAsync(key, token);
},
};
return {
getToken: async (key: string) => {
try {
const item = await SecureStore.getItemAsync(key);
if (item) {
console.log(`${key} was used 🔐 \n`);
} else {
console.log("No values stored under key: " + key);
}
return item;
} catch (error) {
console.error("secure store get item error: ", error);
await SecureStore.deleteItemAsync(key);
return null;
}
},
saveToken: (key: string, token: string) => {
return SecureStore.setItemAsync(key, token);
},
clearToken: (key: string) => {
return SecureStore.deleteItemAsync(key);
},
};
};
// SecureStore is not supported on the web
// https://github.com/expo/expo/issues/7744#issuecomment-611093485
export const tokenCache =
Platform.OS !== "web" ? createTokenCache() : undefined;
Platform.OS !== "web" ? createTokenCache() : undefined;

View File

@@ -1,27 +1,27 @@
{
"cli": {
"version": ">= 12.5.1",
"appVersionSource": "remote"
"cli": {
"version": ">= 12.5.1",
"appVersionSource": "remote"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"ios-simulator": {
"extends": "development",
"ios": {
"simulator": true
}
},
"preview": {
"distribution": "internal"
},
"production": {
"autoIncrement": true
}
"ios-simulator": {
"extends": "development",
"ios": {
"simulator": true
}
},
"submit": {
"production": {}
"preview": {
"distribution": "internal"
},
"production": {
"autoIncrement": true
}
},
"submit": {
"production": {}
}
}

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");
@@ -14,18 +15,22 @@ const config = getDefaultConfig(projectRoot);
config.watchFolders = [workspaceRoot];
// #2 - Try resolving with project modules first, then workspace modules
config.resolver.nodeModulesPaths = [
path.resolve(projectRoot, "node_modules"),
path.resolve(workspaceRoot, "node_modules"),
path.resolve(projectRoot, "node_modules"),
path.resolve(workspaceRoot, "node_modules"),
];
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 = [
new FileStore({
root: path.join(projectRoot, "node_modules", ".cache", "metro"),
}),
new FileStore({
root: path.join(projectRoot, "node_modules", ".cache", "metro"),
}),
];
module.exports = config;
// module.exports = config;
module.exports = withNativeWind(config, { input: "./global.css" });

View File

@@ -1,80 +1,77 @@
{
"name": "chat-rn-clerk",
"main": "index.js",
"version": "1.0.8",
"scripts": {
"build": "expo export -p ios",
"start": "expo start",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"test": "jest --watchAll",
"lint": "expo lint"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@azure/core-asynciterator-polyfill": "^1.0.2",
"@bam.tech/react-native-image-resizer": "^3.0.10",
"@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",
"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:*",
"jazz-react-native": "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",
"react-native-fetch-api": "^3.0.0",
"react-native-gesture-handler": "~2.16.1",
"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-url-polyfill": "^2.0.0",
"react-native-web": "~0.19.10",
"text-encoding": "^0.7.0",
"web-streams-polyfill": "^3.2.1"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/plugin-transform-class-static-block": "^7.24.7",
"@types/jest": "^29.5.3",
"@types/react": "^18.2.19",
"@types/react-test-renderer": "^18.0.7",
"eslint": "^8.46.0",
"eslint-config-expo": "^7.1.2",
"jest": "^29.2.1",
"jest-expo": "~51.0.3",
"react-test-renderer": "18.2.0",
"tailwindcss": "3.3.2",
"typescript": "^5.3.3"
},
"private": true
"name": "chat-rn-clerk",
"main": "index.js",
"version": "1.0.37",
"scripts": {
"build": "expo export -p ios",
"start": "expo start",
"format-and-lint": "biome check .",
"format-and-lint:fix": "biome check . --write",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"test": "jest --watchAll"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@azure/core-asynciterator-polyfill": "^1.0.2",
"@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.4.1",
"@react-navigation/native": "^7.0.13",
"@react-navigation/native-stack": "^7.1.14",
"base-64": "^1.0.0",
"buffer": "^6.0.3",
"clsx": "^2.0.0",
"expo": "^52.0.0",
"expo-build-properties": "~0.13.1",
"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": "^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.20.2",
"react-native-get-random-values": "^1.11.0",
"react-native-polyfill-globals": "^3.1.0",
"react-native-quick-base64": "^2.1.2",
"react-native-reanimated": "~3.16.3",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "4.1.0",
"react-native-url-polyfill": "^2.0.0",
"react-native-web": "~0.19.13",
"text-encoding": "^0.7.0",
"web-streams-polyfill": "^3.2.1"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@types/jest": "^29.5.3",
"@types/react": "^18.3.12",
"@types/react-test-renderer": "^18.0.7",
"jest": "^29.2.1",
"jest-expo": "~52.0.2",
"react-test-renderer": "18.2.0",
"tailwindcss": "^3.4.15",
"typescript": "~5.6.2"
},
"private": true
}

View File

@@ -1,8 +1,8 @@
import "react-native-polyfill-globals/auto";
import "@azure/core-asynciterator-polyfill";
import { ReadableStream } from "web-streams-polyfill/ponyfill/es6";
import { polyfillGlobal } from "react-native/Libraries/Utilities/PolyfillFunctions";
import { Buffer } from "buffer";
import { polyfillGlobal } from "react-native/Libraries/Utilities/PolyfillFunctions";
import { ReadableStream } from "web-streams-polyfill/ponyfill/es6";
polyfillGlobal("Buffer", () => Buffer);
polyfillGlobal("ReadableStream", () => ReadableStream);

View File

@@ -1,62 +1,62 @@
import React, {
useContext,
createContext,
useEffect,
useState,
PropsWithChildren,
} from "react";
import { useClerk, useUser } from "@clerk/clerk-expo";
import { useJazzClerkAuth } from "jazz-react-auth-clerk";
import { Jazz } from "./jazz";
import { useJazzClerkAuth } from "jazz-react-native-auth-clerk";
import React, {
createContext,
PropsWithChildren,
useContext,
useEffect,
useState,
} from "react";
import { Text, View } from "react-native";
import { Jazz, kvStore } from "./jazz";
const AuthContext = createContext<{
isAuthenticated: boolean;
isLoading: boolean;
isAuthenticated: boolean;
isLoading: boolean;
}>({
isAuthenticated: false,
isLoading: true,
isAuthenticated: false,
isLoading: true,
});
export function useAuth() {
return useContext(AuthContext);
return useContext(AuthContext);
}
export function JazzAndAuth({ children }: PropsWithChildren) {
const { isSignedIn, isLoaded: isClerkLoaded } = useUser();
const clerk = useClerk();
const [auth, state] = useJazzClerkAuth(clerk);
const [isAuthenticated, setIsAuthenticated] = useState(false);
const { isSignedIn, isLoaded: isClerkLoaded } = useUser();
const clerk = useClerk();
const [auth, state] = useJazzClerkAuth(clerk, kvStore);
const [isAuthenticated, setIsAuthenticated] = useState(false);
useEffect(() => {
if (isSignedIn && isClerkLoaded && auth) {
setIsAuthenticated(true);
} else {
setIsAuthenticated(false);
}
}, [isSignedIn, isClerkLoaded, auth]);
useEffect(() => {
if (isSignedIn && isClerkLoaded && auth) {
setIsAuthenticated(true);
} else {
setIsAuthenticated(false);
}
}, [isSignedIn, isClerkLoaded, auth]);
return (
<AuthContext.Provider
value={{ isAuthenticated, isLoading: !isClerkLoaded || !auth }}
return (
<AuthContext.Provider
value={{ isAuthenticated, isLoading: !isClerkLoaded || !auth }}
>
{state?.errors?.length > 0 &&
state.errors.map((error) => (
<View key={error}>
<Text style={{ color: "red" }}>{error}</Text>
</View>
))}
{auth && clerk.user ? (
<Jazz.Provider
auth={auth}
peer="wss://cloud.jazz.tools/?key=chat-rn-clerk-example-jazz@garden.co"
storage={undefined}
>
{state?.errors?.length > 0 &&
state.errors.map((error) => (
<View key={error}>
<Text style={{ color: "red" }}>{error}</Text>
</View>
))}
{auth ? (
<Jazz.Provider
auth={auth}
peer="wss://cloud.jazz.tools/?key=chat-rn-clerk-example-jazz@gcmp.io"
storage={undefined}
>
{children}
</Jazz.Provider>
) : (
children
)}
</AuthContext.Provider>
);
{children}
</Jazz.Provider>
) : (
children
)}
</AuthContext.Provider>
);
}

View File

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

View File

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

View File

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

View File

@@ -4,13 +4,8 @@
"strict": true,
"moduleResolution": "bundler",
"paths": {
"@/*": [
"./*"
]
"@/*": ["./*"]
}
},
"include": [
"**/*.ts",
"**/*.tsx"
]
"include": ["**/*.ts", "**/*.tsx", "nativewind-env.d.ts"]
}

View File

@@ -1,77 +1,259 @@
# chat-rn
## 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
- jazz-react-native@0.8.34
- jazz-tools@0.8.34
## 1.0.23
### Patch Changes
- Updated dependencies [df42b2b]
- jazz-tools@0.8.32
- jazz-react-native@0.8.32
## 1.0.22
### Patch Changes
- jazz-react-native@0.8.31
- jazz-tools@0.8.31
## 1.0.21
### Patch Changes
- jazz-react-native@0.8.30
- jazz-tools@0.8.30
## 1.0.20
### Patch Changes
- jazz-react-native@0.8.29
- jazz-tools@0.8.29
## 1.0.19
### Patch Changes
- jazz-react-native@0.8.28
- jazz-tools@0.8.28
## 1.0.18
### Patch Changes
- jazz-react-native@0.8.27
- jazz-tools@0.8.27
## 1.0.17
### Patch Changes
- Updated dependencies [d348c2d]
- Updated dependencies [6902b5b]
- Updated dependencies [1a0cd3d]
- jazz-tools@0.8.23
- jazz-react-native@0.8.23
## 1.0.16
### Patch Changes
- Updated dependencies [149ca97]
- jazz-tools@0.8.21
- jazz-react-native@0.8.21
## 1.0.15
### Patch Changes
- Updated dependencies [3ef3ff3]
- jazz-react-native@0.8.20
## 1.0.14
### Patch Changes
- jazz-react-native@0.8.19
- jazz-tools@0.8.19
## 1.0.13
### Patch Changes
- jazz-react-native@0.8.18
- jazz-tools@0.8.18
## 1.0.12
### Patch Changes
- jazz-react-native@0.8.17
- jazz-tools@0.8.17
## 1.0.11
### Patch Changes
- jazz-react-native@0.8.16
- jazz-tools@0.8.16
## 1.0.10
### Patch Changes
- Updated dependencies [cce679b]
- jazz-tools@0.8.15
- jazz-react-native@0.8.15
- Updated dependencies [cce679b]
- jazz-tools@0.8.15
- jazz-react-native@0.8.15
## 1.0.9
### Patch Changes
- Updated dependencies [36273b3]
- jazz-tools@0.8.14
- jazz-react-native@0.8.14
- Updated dependencies [36273b3]
- jazz-tools@0.8.14
- jazz-react-native@0.8.14
## 1.0.8
### Patch Changes
- Updated dependencies [fd011d7]
- jazz-tools@0.8.13
- jazz-react-native@0.8.13
- Updated dependencies [fd011d7]
- jazz-tools@0.8.13
- jazz-react-native@0.8.13
## 1.0.7
### Patch Changes
- jazz-react-native@0.8.12
- jazz-tools@0.8.12
- jazz-react-native@0.8.12
- jazz-tools@0.8.12
## 1.0.6
### Patch Changes
- jazz-react-native@0.8.11
- jazz-tools@0.8.11
- jazz-react-native@0.8.11
- jazz-tools@0.8.11
## 1.0.5
### Patch Changes
- b7639cf: feat(react-native): replaced react-native-mmkv with expo-secure-store and initialize it by default as kvStore in createJazzRNApp() (BREAKING)
- Updated dependencies [b7639cf]
- jazz-react-native@0.8.8
- b7639cf: feat(react-native): replaced react-native-mmkv with expo-secure-store and initialize it by default as kvStore in createJazzRNApp() (BREAKING)
- Updated dependencies [b7639cf]
- jazz-react-native@0.8.8
## 1.0.4
### Patch Changes
- Updated dependencies [32b05b6]
- jazz-react-native@0.8.7
- Updated dependencies [32b05b6]
- jazz-react-native@0.8.7
## 1.0.3
### Patch Changes
- jazz-react-native@0.8.6
- jazz-react-native@0.8.6
## 1.0.2
### Patch Changes
- Updated dependencies [c3f4e6b]
- Updated dependencies [d9152ed]
- jazz-react-native@0.8.5
- jazz-tools@0.8.5
- Updated dependencies [c3f4e6b]
- Updated dependencies [d9152ed]
- jazz-react-native@0.8.5
- jazz-tools@0.8.5
## 1.0.1
### Patch Changes
- Updated dependencies
- jazz-react-native@0.8.3
- jazz-tools@0.8.3
- Updated dependencies
- jazz-react-native@0.8.3
- jazz-tools@0.8.3

View File

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

View File

@@ -1,27 +1,27 @@
{
"cli": {
"version": ">= 12.5.1",
"appVersionSource": "remote"
"cli": {
"version": ">= 12.5.1",
"appVersionSource": "remote"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"ios-simulator": {
"extends": "development",
"ios": {
"simulator": true
}
},
"preview": {
"distribution": "internal"
},
"production": {
"autoIncrement": true
}
"ios-simulator": {
"extends": "development",
"ios": {
"simulator": true
}
},
"submit": {
"production": {}
"preview": {
"distribution": "internal"
},
"production": {
"autoIncrement": true
}
},
"submit": {
"production": {}
}
}

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,25 +8,29 @@ 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
config.watchFolders = [workspaceRoot];
// #2 - Try resolving with project modules first, then workspace modules
config.resolver.nodeModulesPaths = [
path.resolve(projectRoot, "node_modules"),
path.resolve(workspaceRoot, "node_modules"),
path.resolve(projectRoot, "node_modules"),
path.resolve(workspaceRoot, "node_modules"),
];
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 = [
new FileStore({
root: path.join(projectRoot, "node_modules", ".cache", "metro"),
}),
new FileStore({
root: path.join(projectRoot, "node_modules", ".cache", "metro"),
}),
];
module.exports = config;
// module.exports = config;
module.exports = withNativeWind(config, { input: "./global.css" });

View File

@@ -1,52 +1,52 @@
{
"name": "chat-rn",
"version": "1.0.10",
"main": "index.js",
"scripts": {
"build": "expo export -p ios",
"start": "expo start",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web"
},
"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",
"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",
"jazz-react-native": "workspace:*",
"jazz-tools": "workspace:*",
"nativewind": "^2.0.11",
"react": "^18.2.0",
"react-native": "~0.74.5",
"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-url-polyfill": "^2.0.0",
"text-encoding": "^0.7.0",
"web-streams-polyfill": "^3.2.1"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/plugin-transform-class-static-block": "^7.24.7",
"@types/react": "^18.2.19",
"tailwindcss": "3.3.2",
"typescript": "^5.3.3"
},
"private": true
"name": "chat-rn",
"version": "1.0.34",
"main": "index.js",
"scripts": {
"build": "expo export -p ios",
"start": "expo start",
"format-and-lint": "biome check .",
"format-and-lint:fix": "biome check . --write",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web"
},
"dependencies": {
"@azure/core-asynciterator-polyfill": "^1.0.2",
"@react-native-community/netinfo": "^11.4.1",
"@react-navigation/native": "^7.0.13",
"@react-navigation/native-stack": "^7.1.14",
"base-64": "^1.0.0",
"clsx": "^2.0.0",
"expo": "^52.0.0",
"expo-build-properties": "~0.13.1",
"expo-clipboard": "~7.0.0",
"expo-constants": "~17.0.3",
"expo-crypto": "~14.0.1",
"expo-dev-client": "~5.0.5",
"expo-linking": "~7.0.3",
"expo-secure-store": "~14.0.0",
"expo-status-bar": "~2.0.0",
"expo-web-browser": "~14.0.1",
"jazz-react-native": "workspace:*",
"jazz-tools": "workspace:*",
"nativewind": "^4.1.21",
"react": "^18.3.1",
"react-native": "~0.76.3",
"react-native-fetch-api": "^3.0.0",
"react-native-get-random-values": "^1.11.0",
"react-native-polyfill-globals": "^3.1.0",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "4.1.0",
"react-native-url-polyfill": "^2.0.0",
"text-encoding": "^0.7.0",
"web-streams-polyfill": "^3.2.1"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@types/react": "^18.3.12",
"tailwindcss": "^3.4.15",
"typescript": "~5.6.2"
},
"private": true
}

View File

@@ -1,6 +1,6 @@
import "react-native-polyfill-globals/auto";
import "@azure/core-asynciterator-polyfill";
import { ReadableStream } from "web-streams-polyfill/ponyfill/es6";
import { polyfillGlobal } from "react-native/Libraries/Utilities/PolyfillFunctions";
import { ReadableStream } from "web-streams-polyfill/ponyfill/es6";
polyfillGlobal("ReadableStream", () => ReadableStream);

View File

@@ -1,13 +1,15 @@
import React, { StrictMode, useEffect, useState } from "react";
import "../global.css";
import {
NavigationContainer,
useNavigationContainerRef,
NavigationContainer,
useNavigationContainerRef,
} from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import * as Linking from "expo-linking";
import React, { StrictMode, useEffect, useState } from "react";
import HandleInviteScreen from "./invite";
import { useDemoAuth, DemoAuthBasicUI } from "jazz-react-native";
import { DemoAuthBasicUI, useDemoAuth } from "jazz-react-native";
import ChatScreen from "./chat";
import { Jazz } from "./jazz";
@@ -16,64 +18,64 @@ const Stack = createNativeStackNavigator();
const prefix = Linking.createURL("/");
const linking = {
prefixes: [prefix],
config: {
screens: {
HandleInviteScreen: {
path: "router/invite/:valueHint?/:valueID/:inviteSecret",
},
},
prefixes: [prefix],
config: {
screens: {
HandleInviteScreen: {
path: "router/invite/:valueHint?/:valueID/:inviteSecret",
},
},
},
};
function App() {
const [auth, state] = useDemoAuth();
const [initialRoute, setInitialRoute] = useState<
"ChatScreen" | "HandleInviteScreen"
>("ChatScreen");
const navigationRef = useNavigationContainerRef();
const [auth, state] = useDemoAuth();
const [initialRoute, setInitialRoute] = useState<
"ChatScreen" | "HandleInviteScreen"
>("ChatScreen");
const navigationRef = useNavigationContainerRef();
useEffect(() => {
Linking.getInitialURL().then((url) => {
if (url) {
if (url && url.includes("invite")) {
setInitialRoute("HandleInviteScreen");
}
}
});
}, []);
useEffect(() => {
Linking.getInitialURL().then((url) => {
if (url) {
if (url && url.includes("invite")) {
setInitialRoute("HandleInviteScreen");
}
}
});
}, []);
if (!auth) {
return null;
}
if (!auth) {
return null;
}
return (
<StrictMode>
<Jazz.Provider
auth={auth}
peer="wss://cloud.jazz.tools/?key=chat-rn-example-jazz@gcmp.io"
storage={undefined}
>
<NavigationContainer linking={linking} ref={navigationRef}>
<Stack.Navigator initialRouteName={initialRoute}>
<Stack.Screen
options={{ title: "Jazz Chat" }}
name="ChatScreen"
// @ts-ignore
component={ChatScreen}
/>
<Stack.Screen
name="HandleInviteScreen"
component={HandleInviteScreen}
/>
</Stack.Navigator>
</NavigationContainer>
</Jazz.Provider>
{state.state !== "signedIn" ? (
<DemoAuthBasicUI appName="Jazz Chat" state={state} />
) : null}
</StrictMode>
);
return (
<StrictMode>
<Jazz.Provider
auth={auth}
peer="wss://cloud.jazz.tools/?key=chat-rn-example-jazz@garden.co"
storage={undefined}
>
<NavigationContainer linking={linking} ref={navigationRef}>
<Stack.Navigator initialRouteName={initialRoute}>
<Stack.Screen
options={{ title: "Jazz Chat" }}
name="ChatScreen"
// @ts-ignore
component={ChatScreen}
/>
<Stack.Screen
name="HandleInviteScreen"
component={HandleInviteScreen}
/>
</Stack.Navigator>
</NavigationContainer>
</Jazz.Provider>
{state.state !== "signedIn" ? (
<DemoAuthBasicUI appName="Jazz Chat" state={state} />
) : null}
</StrictMode>
);
}
export default App;

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