Compare commits
638 Commits
fix/button
...
explode-do
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad57ac21e0 | ||
|
|
f8b9854286 | ||
|
|
9527c8a019 | ||
|
|
69bdcc0273 | ||
|
|
62cfd3bce4 | ||
|
|
edf6328905 | ||
|
|
1d2b8d92d7 | ||
|
|
697dd370ee | ||
|
|
33ef9c43d0 | ||
|
|
f74134164b | ||
|
|
50939729e5 | ||
|
|
dcf945b514 | ||
|
|
0b8425d9b4 | ||
|
|
986805dcba | ||
|
|
89dae1d889 | ||
|
|
c3418f6bed | ||
|
|
f5a63d13c1 | ||
|
|
e9778cc4ca | ||
|
|
7d955d053e | ||
|
|
ae6d2c6daf | ||
|
|
44aa86978f | ||
|
|
eedb208e4c | ||
|
|
454fbbfc17 | ||
|
|
686e3e998c | ||
|
|
7a2f249614 | ||
|
|
59a0c86dd1 | ||
|
|
7701307ab7 | ||
|
|
1e7dadd31b | ||
|
|
b57bb88328 | ||
|
|
afd25d766f | ||
|
|
222f8c5063 | ||
|
|
857e0d5c48 | ||
|
|
be903ede57 | ||
|
|
9b654ad1fb | ||
|
|
a7bc15fdf2 | ||
|
|
e14a2c0a5d | ||
|
|
6a7ef2ba60 | ||
|
|
94d95ceeb6 | ||
|
|
ab4ffbd130 | ||
|
|
e322e6034b | ||
|
|
bbf49ae7cd | ||
|
|
04bcf94ae4 | ||
|
|
22ad297e4b | ||
|
|
2ee58780a5 | ||
|
|
fca6a0bfc2 | ||
|
|
6f0bd7f5ea | ||
|
|
4dea285879 | ||
|
|
0c68349a27 | ||
|
|
e761a8e5d5 | ||
|
|
45c1e113ea | ||
|
|
88d7d9add0 | ||
|
|
36d3be25a1 | ||
|
|
99e731d6f8 | ||
|
|
0027bc73b5 | ||
|
|
2304412c20 | ||
|
|
b697b91f1d | ||
|
|
6694dbc53f | ||
|
|
af9eb02d46 | ||
|
|
4e8c70f8d9 | ||
|
|
fa41f8eec2 | ||
|
|
60e35eab71 | ||
|
|
80f563e4f0 | ||
|
|
c321d99ec6 | ||
|
|
135fa2d164 | ||
|
|
5d20c81ed5 | ||
|
|
8ee6db5102 | ||
|
|
a8e7f52700 | ||
|
|
1e6f6fce53 | ||
|
|
025dfaedc4 | ||
|
|
d681aa242a | ||
|
|
a4f0a0737e | ||
|
|
4583401502 | ||
|
|
99a614038d | ||
|
|
762d1fac23 | ||
|
|
9d7fabb1cf | ||
|
|
7c9a872f50 | ||
|
|
9ed8dd509b | ||
|
|
0d771b9acc | ||
|
|
3e191685e4 | ||
|
|
7b2fd31a75 | ||
|
|
dda7c243d7 | ||
|
|
cce6a2f243 | ||
|
|
63001da65a | ||
|
|
b094605109 | ||
|
|
e4bc39ed21 | ||
|
|
67d4f538ec | ||
|
|
f5b527886f | ||
|
|
dba767ae7b | ||
|
|
bb39c0b7fa | ||
|
|
57c846a904 | ||
|
|
4390d4b266 | ||
|
|
1427f071d4 | ||
|
|
2d31e8edce | ||
|
|
09cad40565 | ||
|
|
3accbc06e2 | ||
|
|
39ae4fc8c1 | ||
|
|
ae60eb0d01 | ||
|
|
05eb330173 | ||
|
|
5d1e192245 | ||
|
|
c5e059b3a9 | ||
|
|
d1785c0178 | ||
|
|
9b95c32edb | ||
|
|
d87781d33f | ||
|
|
ad50ec2d9d | ||
|
|
fef055b9fb | ||
|
|
cdc7f9f841 | ||
|
|
ff6940de56 | ||
|
|
cad54e4018 | ||
|
|
c657880a22 | ||
|
|
79b02dee3c | ||
|
|
ee29cb300c | ||
|
|
36f0ab7571 | ||
|
|
829be3cafa | ||
|
|
7c322796aa | ||
|
|
36d50d96dd | ||
|
|
1fd26b9d05 | ||
|
|
40f161d4d0 | ||
|
|
655a601a8e | ||
|
|
c7a28e5003 | ||
|
|
ae429d0a1c | ||
|
|
26c390be66 | ||
|
|
a0a0962f28 | ||
|
|
32834ef9e3 | ||
|
|
13be2a3235 | ||
|
|
7fa6e4333d | ||
|
|
093f08b5e0 | ||
|
|
f374545692 | ||
|
|
9a8f2747fe | ||
|
|
84b7c9ab89 | ||
|
|
3863d834ce | ||
|
|
4c860075ee | ||
|
|
79480ddf0c | ||
|
|
8d447b8725 | ||
|
|
238fd47089 | ||
|
|
29ac1fbe88 | ||
|
|
95fd27d3e3 | ||
|
|
533d7684c9 | ||
|
|
798403a57d | ||
|
|
ddf060e64c | ||
|
|
51515f629c | ||
|
|
65e012f401 | ||
|
|
a1ba29fd47 | ||
|
|
b6b76ab2b9 | ||
|
|
77dbd4e205 | ||
|
|
baa8aff33f | ||
|
|
63703489ab | ||
|
|
325250272b | ||
|
|
219ba975a5 | ||
|
|
f5a3394d40 | ||
|
|
4a5209237f | ||
|
|
d7eb50abc1 | ||
|
|
4908d7cfd3 | ||
|
|
38b19ab980 | ||
|
|
9e2486c332 | ||
|
|
e905c84a34 | ||
|
|
b097c38617 | ||
|
|
385dfc89ff | ||
|
|
d89e4c3412 | ||
|
|
bbeee086ce | ||
|
|
718e9418e2 | ||
|
|
507a00fe6a | ||
|
|
8e940130d2 | ||
|
|
ac216b9f2e | ||
|
|
93230df2cb | ||
|
|
c13daa140b | ||
|
|
3c9439d0cc | ||
|
|
d38d4928c7 | ||
|
|
596901cba6 | ||
|
|
2a1fda3758 | ||
|
|
f3581d1086 | ||
|
|
4ac2b75194 | ||
|
|
cfa78ed628 | ||
|
|
94095aff28 | ||
|
|
a70f7a4c49 | ||
|
|
2270ae113e | ||
|
|
92b64e05ca | ||
|
|
cb6b9af57d | ||
|
|
fc00369d87 | ||
|
|
0b260f339d | ||
|
|
8f50dd48f6 | ||
|
|
d3af4fecd1 | ||
|
|
4ec13a9515 | ||
|
|
79262351fa | ||
|
|
01292230e8 | ||
|
|
9b31d3241d | ||
|
|
77dfd4f883 | ||
|
|
9150c238e4 | ||
|
|
67bd5ab07f | ||
|
|
2678c83a99 | ||
|
|
4c1364a5cb | ||
|
|
f546811a23 | ||
|
|
eb9164633c | ||
|
|
db5e5d8392 | ||
|
|
a18d870faa | ||
|
|
d434b23a34 | ||
|
|
dd363d613f | ||
|
|
9d41f7a16a | ||
|
|
dfddc3603a | ||
|
|
5c09f0f41a | ||
|
|
139fcbe172 | ||
|
|
507b3b890a | ||
|
|
06ad39c418 | ||
|
|
7077a41c2d | ||
|
|
9572729cc9 | ||
|
|
9f08ca8cd8 | ||
|
|
8e0bf8a8d8 | ||
|
|
5b72d1f89b | ||
|
|
e10d09e6ab | ||
|
|
2007815745 | ||
|
|
1f826734d4 | ||
|
|
80383dac3b | ||
|
|
b9ed9e3f13 | ||
|
|
96f844af5e | ||
|
|
994fbf3524 | ||
|
|
6eba301599 | ||
|
|
322438f361 | ||
|
|
f2f3481773 | ||
|
|
b96bab59d0 | ||
|
|
aa21072ceb | ||
|
|
01442948d0 | ||
|
|
6c26902a73 | ||
|
|
b12f9dc675 | ||
|
|
bb6d9791dc | ||
|
|
024b24f5fa | ||
|
|
facfc51e84 | ||
|
|
6e4a7411dd | ||
|
|
a02b53cbe3 | ||
|
|
a0548ecb25 | ||
|
|
970414c8c3 | ||
|
|
d62a5c74f9 | ||
|
|
5d35469b91 | ||
|
|
6cd79a0631 | ||
|
|
5122cd027b | ||
|
|
9d9bb97da3 | ||
|
|
9db3f2120b | ||
|
|
cb4ccd5d33 | ||
|
|
3121551e8a | ||
|
|
1a65ffd913 | ||
|
|
80301e51bb | ||
|
|
5686db9b89 | ||
|
|
21a56fc96b | ||
|
|
eb22a24f17 | ||
|
|
4f3de09154 | ||
|
|
f2f865da50 | ||
|
|
c0d12dba26 | ||
|
|
cd0717f35d | ||
|
|
4515395bb9 | ||
|
|
7cee49f2b2 | ||
|
|
9414fbfb23 | ||
|
|
9c6ea58ef5 | ||
|
|
0685436b0c | ||
|
|
daa11aa915 | ||
|
|
bbdb1ef429 | ||
|
|
508537928f | ||
|
|
eaeeedc3a4 | ||
|
|
15cdfd406c | ||
|
|
76262c1a03 | ||
|
|
fc43a2384b | ||
|
|
d1698eed6f | ||
|
|
6d68dc1bbf | ||
|
|
1fb49b266a | ||
|
|
49f0ab1545 | ||
|
|
641bbddd64 | ||
|
|
7e22f53718 | ||
|
|
4c44468129 | ||
|
|
b0c5ecd7b6 | ||
|
|
5bf9d69e9f | ||
|
|
3ecf11ded9 | ||
|
|
709d60b365 | ||
|
|
f135babcb8 | ||
|
|
36a85d4313 | ||
|
|
7316379247 | ||
|
|
0cf59b6549 | ||
|
|
bcaff2f24a | ||
|
|
d2a5087e65 | ||
|
|
8627d47afc | ||
|
|
47f625cbd4 | ||
|
|
34b65ef67a | ||
|
|
51209d5314 | ||
|
|
309dffcc67 | ||
|
|
716b87da0a | ||
|
|
3c58879a10 | ||
|
|
ed16031f12 | ||
|
|
90d9e1ca91 | ||
|
|
95828596f8 | ||
|
|
d794a555dc | ||
|
|
a6c143f33f | ||
|
|
1db615d1b1 | ||
|
|
9b45c44b29 | ||
|
|
ecc7c9672d | ||
|
|
d645970cb0 | ||
|
|
e9864cda9d | ||
|
|
d4e9afc4e2 | ||
|
|
4fc4f029a2 | ||
|
|
fb06319dae | ||
|
|
a4886fede8 | ||
|
|
b2ca4ec52e | ||
|
|
b2c8a1a27d | ||
|
|
5469c1f347 | ||
|
|
d36e7cd55a | ||
|
|
03ccdb93af | ||
|
|
eb8bd20931 | ||
|
|
9819811c91 | ||
|
|
350e59b187 | ||
|
|
c2cad4b68c | ||
|
|
0c6b0f37ed | ||
|
|
a3541f24ee | ||
|
|
f8be4e8bc0 | ||
|
|
c8015ddee1 | ||
|
|
44227bd6e8 | ||
|
|
d582429488 | ||
|
|
3db0639636 | ||
|
|
c75cd9da37 | ||
|
|
da13ecac5c | ||
|
|
c4af72e1ca | ||
|
|
e43ca2bc98 | ||
|
|
bcdd8e9125 | ||
|
|
2d6352a2dc | ||
|
|
749350cb59 | ||
|
|
07e9a73c52 | ||
|
|
1ef9998b23 | ||
|
|
b00ee914c3 | ||
|
|
f488c09545 | ||
|
|
0d6ea25e56 | ||
|
|
9ffe6d0c63 | ||
|
|
249eecb68f | ||
|
|
cdbde2970d | ||
|
|
24a1b045d3 | ||
|
|
a21c3068cd | ||
|
|
55ab4844d6 | ||
|
|
6e131eb0dc | ||
|
|
8a0cb69c72 | ||
|
|
d01286b723 | ||
|
|
0b636d26f3 | ||
|
|
f41a1b0d1d | ||
|
|
28930ee1d5 | ||
|
|
0a8753dfe0 | ||
|
|
3ca8b13f6c | ||
|
|
e06c18150a | ||
|
|
4c4499ce86 | ||
|
|
afa4c825ca | ||
|
|
60e04cb193 | ||
|
|
843a012f33 | ||
|
|
bd510a13ce | ||
|
|
0d6853bbdd | ||
|
|
a238dde78a | ||
|
|
59997fbf71 | ||
|
|
b56d7e3e7c | ||
|
|
2f5bd74206 | ||
|
|
a4864d93d2 | ||
|
|
19376e6abd | ||
|
|
22f6db8141 | ||
|
|
3d9f12e9ea | ||
|
|
68620a3df9 | ||
|
|
1767f024d9 | ||
|
|
c55924a04a | ||
|
|
31e00a96ae | ||
|
|
7bb834f399 | ||
|
|
667f36e1cf | ||
|
|
07669923ad | ||
|
|
9082a099ee | ||
|
|
aba059db28 | ||
|
|
ae6b9c8dd2 | ||
|
|
7b9f96bf1a | ||
|
|
8df49546fe | ||
|
|
bb4460f422 | ||
|
|
2099099afc | ||
|
|
06b0758d7c | ||
|
|
6135250e57 | ||
|
|
aacd03bbdd | ||
|
|
ca7f250d47 | ||
|
|
83ad506b94 | ||
|
|
e9751f5b69 | ||
|
|
c84764acd5 | ||
|
|
c2a805bffa | ||
|
|
8728dde42b | ||
|
|
9dd9366734 | ||
|
|
48dd00f453 | ||
|
|
cc361aefe5 | ||
|
|
9e4438cb54 | ||
|
|
08706d557a | ||
|
|
02c1ec63cc | ||
|
|
df797dedcd | ||
|
|
74cb08e7d4 | ||
|
|
73720a8cc4 | ||
|
|
50c77fa788 | ||
|
|
9977a4ee85 | ||
|
|
441fe27802 | ||
|
|
1afbd2c7cc | ||
|
|
4955e39af5 | ||
|
|
ace151696c | ||
|
|
db9560ebc5 | ||
|
|
80b572710e | ||
|
|
bbb9d45969 | ||
|
|
83e9a3eaa8 | ||
|
|
9ff7e68f7d | ||
|
|
06740e840a | ||
|
|
b0e2c4fd4b | ||
|
|
4c1922c10e | ||
|
|
76bad9b5c3 | ||
|
|
7f16f2705e | ||
|
|
d12594e521 | ||
|
|
cf96350b01 | ||
|
|
947030433f | ||
|
|
b4cebd732e | ||
|
|
d0d95e6d5d | ||
|
|
a75383ac6a | ||
|
|
073d8992f5 | ||
|
|
7b400835a2 | ||
|
|
de503b6120 | ||
|
|
bf287d0709 | ||
|
|
f7ae41254f | ||
|
|
8f348b28c6 | ||
|
|
b0072e63e3 | ||
|
|
a479ece032 | ||
|
|
e0dbe46d64 | ||
|
|
1f1fc56720 | ||
|
|
3b185b4cd3 | ||
|
|
64fa74a6d9 | ||
|
|
df5dc513bf | ||
|
|
8e6783ad88 | ||
|
|
79bf6f478f | ||
|
|
7fd93a5a61 | ||
|
|
8f9687323f | ||
|
|
47ee25786f | ||
|
|
0009aa19b2 | ||
|
|
741b9cbada | ||
|
|
259ade3099 | ||
|
|
b6f2da2221 | ||
|
|
44157945a0 | ||
|
|
4ff7bb500a | ||
|
|
66538fdcf5 | ||
|
|
543f91277d | ||
|
|
42112ec46c | ||
|
|
db5ea54338 | ||
|
|
7c7880a9b2 | ||
|
|
f4170eb879 | ||
|
|
8278055e33 | ||
|
|
65c236571e | ||
|
|
b53cc9930e | ||
|
|
9c5b34d91c | ||
|
|
49082a5aad | ||
|
|
ab7c899a9e | ||
|
|
a6c119b98d | ||
|
|
6e3565d20f | ||
|
|
e5e21718f9 | ||
|
|
b6653555f5 | ||
|
|
1b49bd8be4 | ||
|
|
c9fd16ce21 | ||
|
|
70a93ab093 | ||
|
|
e60f34d9e6 | ||
|
|
dacaa02a01 | ||
|
|
55cc248d91 | ||
|
|
534fce6796 | ||
|
|
a223a3a5ab | ||
|
|
a04c7dca7a | ||
|
|
e067c29d81 | ||
|
|
81c470e9fa | ||
|
|
52d5a14fdf | ||
|
|
1357306d1b | ||
|
|
fca6be8da0 | ||
|
|
b0df041a24 | ||
|
|
3c6d9b20c1 | ||
|
|
357698f4fb | ||
|
|
a6e5a72b97 | ||
|
|
e386f2ba8d | ||
|
|
c2d292effc | ||
|
|
b4dd2add45 | ||
|
|
f3824dfb76 | ||
|
|
ac7b388ca5 | ||
|
|
ad3641861b | ||
|
|
3d601deaa0 | ||
|
|
7824e6b36a | ||
|
|
f597316267 | ||
|
|
9b80278b71 | ||
|
|
46f2ab801d | ||
|
|
a6b6ccf814 | ||
|
|
8928e9e10d | ||
|
|
0e1c38f2d1 | ||
|
|
08ad01d6b5 | ||
|
|
e9eec78ce5 | ||
|
|
5bab5091c3 | ||
|
|
1663b4aa59 | ||
|
|
7f6637e235 | ||
|
|
f320e6821a | ||
|
|
b491a3c638 | ||
|
|
35d03f2f2c | ||
|
|
43c19307cd | ||
|
|
1e642d4454 | ||
|
|
2c931dd57e | ||
|
|
8eec42814a | ||
|
|
0e0590d25b | ||
|
|
17f8bc25c3 | ||
|
|
c1d652cf7f | ||
|
|
58a3ad2951 | ||
|
|
10f3e4aabd | ||
|
|
9f834eba97 | ||
|
|
4a02dbed28 | ||
|
|
ad920158d6 | ||
|
|
63f5574003 | ||
|
|
26b54bf81b | ||
|
|
151c9c923d | ||
|
|
7f9c125074 | ||
|
|
0e59e65430 | ||
|
|
24fc4dd75d | ||
|
|
943283db76 | ||
|
|
19ffeb8505 | ||
|
|
efe9855a9e | ||
|
|
f93d6ae64e | ||
|
|
4b194b218a | ||
|
|
b62a37229c | ||
|
|
d9c9231304 | ||
|
|
74631f25a9 | ||
|
|
b39a9f4921 | ||
|
|
0aeabf2480 | ||
|
|
57d6e7c590 | ||
|
|
9bb5c4ca5f | ||
|
|
80afb04f26 | ||
|
|
0e521ed8df | ||
|
|
692b3e207a | ||
|
|
3102523cb1 | ||
|
|
a939a9b7f7 | ||
|
|
33aee5f79f | ||
|
|
c80086c33e | ||
|
|
36900c6462 | ||
|
|
b02f439db9 | ||
|
|
833fe2dac4 | ||
|
|
c11d7d0103 | ||
|
|
d92413a4ef | ||
|
|
b51c519187 | ||
|
|
4f048b4b6e | ||
|
|
6a8bc02a60 | ||
|
|
687e7aca2c | ||
|
|
d00f57c2a7 | ||
|
|
58f2713218 | ||
|
|
b3a0fbb5cd | ||
|
|
696347881b | ||
|
|
4a0299a73f | ||
|
|
6883c5212f | ||
|
|
22d1402b71 | ||
|
|
6e92baa365 | ||
|
|
03541d856f | ||
|
|
27829e96e8 | ||
|
|
65b7930b1b | ||
|
|
b909e48532 | ||
|
|
1f13002663 | ||
|
|
de1469a22f | ||
|
|
ef240c207b | ||
|
|
202b32a35a | ||
|
|
f13b305644 | ||
|
|
bc3c79ea5d | ||
|
|
55333cf910 | ||
|
|
25c4e234d6 | ||
|
|
3f15a23219 | ||
|
|
1b60fc7095 | ||
|
|
9db577def9 | ||
|
|
ab0760f11b | ||
|
|
7e75be6941 | ||
|
|
67d106e02a | ||
|
|
c255dffe0c | ||
|
|
158f95289e | ||
|
|
a0e560eae6 | ||
|
|
10e71ad840 | ||
|
|
eeb7d41219 | ||
|
|
1f475e568f | ||
|
|
f6a9c33809 | ||
|
|
8dfe64b3d7 | ||
|
|
9b834aa8f8 | ||
|
|
554e9e5d73 | ||
|
|
dd43df6bd3 | ||
|
|
b4876ff82b | ||
|
|
fb48171b22 | ||
|
|
c4202fd21a | ||
|
|
db73a765e4 | ||
|
|
6ae9df74bc | ||
|
|
786d185b24 | ||
|
|
4c48722e65 | ||
|
|
676f2195ab | ||
|
|
45ba926cff | ||
|
|
a909f2212f | ||
|
|
d55f944238 | ||
|
|
7b557f188b | ||
|
|
9ca25d1cdf | ||
|
|
4339e485e2 | ||
|
|
e6dcec2317 | ||
|
|
057286a8df | ||
|
|
b0fa35e11e | ||
|
|
ae6f3a39c7 | ||
|
|
e4f110fa9f | ||
|
|
641483f40b | ||
|
|
9212ab89ec | ||
|
|
915fa5ea4e | ||
|
|
5d72d0a5a0 | ||
|
|
bb874490c5 | ||
|
|
a2c6d0cb16 | ||
|
|
fe6648b3a5 | ||
|
|
c1ab97d976 | ||
|
|
3cb27e11dd | ||
|
|
50f94c2b81 | ||
|
|
3937781246 | ||
|
|
44bcf6e411 | ||
|
|
b66206f1a6 | ||
|
|
973824795e | ||
|
|
f4974e5975 | ||
|
|
9099bbf75f | ||
|
|
e1a40b41eb | ||
|
|
9683e24237 | ||
|
|
a107e17c44 | ||
|
|
d2d2801537 | ||
|
|
d5af8df158 | ||
|
|
6b4cb357ce | ||
|
|
d6638742b0 | ||
|
|
ddb158d5fa | ||
|
|
8b87117e0f | ||
|
|
e5000c2b6b | ||
|
|
0347e52118 | ||
|
|
bb9ba33e73 | ||
|
|
92c63d94b9 | ||
|
|
75339c0939 | ||
|
|
22102deabc | ||
|
|
043e2acae4 | ||
|
|
1b7ef1c2c0 | ||
|
|
996092c26f | ||
|
|
3c794bba0a | ||
|
|
2d3d53d144 | ||
|
|
69d05c8c15 | ||
|
|
d11aeee083 | ||
|
|
4d5848161d | ||
|
|
8ee456d4e4 | ||
|
|
7b2c2e6084 | ||
|
|
133f75d34e | ||
|
|
68c9114896 | ||
|
|
57ff9e2d1f | ||
|
|
1cac820ec6 | ||
|
|
eb4646beca | ||
|
|
5447d6f10b | ||
|
|
dbb040eb07 | ||
|
|
9960320645 |
@@ -6,18 +6,23 @@
|
||||
"linked": [
|
||||
[
|
||||
"cojson",
|
||||
"jazz-tools",
|
||||
"jazz-browser",
|
||||
"jazz-browser-media-images",
|
||||
"jazz-browser-auth-clerk",
|
||||
"jazz-react-auth-clerk",
|
||||
"jazz-react",
|
||||
"jazz-react-native",
|
||||
"jazz-nodejs",
|
||||
"jazz-run",
|
||||
"cojson-transport-ws",
|
||||
"cojson-storage",
|
||||
"cojson-storage-indexeddb",
|
||||
"cojson-storage-sqlite"
|
||||
"cojson-storage-sqlite",
|
||||
"cojson-transport-ws",
|
||||
"jazz-browser",
|
||||
"jazz-browser-auth-clerk",
|
||||
"jazz-browser-media-images",
|
||||
"jazz-nodejs",
|
||||
"jazz-react",
|
||||
"jazz-react-auth-clerk",
|
||||
"jazz-react-native",
|
||||
"jazz-react-native-auth-clerk",
|
||||
"jazz-react-native-media-images",
|
||||
"jazz-run",
|
||||
"jazz-svelte",
|
||||
"jazz-tools",
|
||||
"jazz-vue"
|
||||
]
|
||||
],
|
||||
"access": "public",
|
||||
|
||||
4
.github/workflows/build-examples.yaml
vendored
4
.github/workflows/build-examples.yaml
vendored
@@ -11,11 +11,13 @@ jobs:
|
||||
matrix:
|
||||
example: [
|
||||
"chat",
|
||||
"chat-clerk",
|
||||
"clerk",
|
||||
"passkey",
|
||||
"inspector",
|
||||
"music-player",
|
||||
"password-manager",
|
||||
"pets",
|
||||
"reactions",
|
||||
"todo",
|
||||
"onboarding",
|
||||
]
|
||||
|
||||
10
.github/workflows/playwright.yml
vendored
10
.github/workflows/playwright.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
project: ["e2e/BinaryCoStream", "e2e/CoValues", "examples/chat", "examples/music-player", "examples/pets", "examples/onboarding"]
|
||||
project: ["tests/e2e", "examples/chat", "examples/file-share-svelte", "examples/form", "examples/music-player", "examples/pets", "examples/onboarding"]
|
||||
|
||||
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
|
||||
|
||||
16
.github/workflows/release.yml
vendored
16
.github/workflows/release.yml
vendored
@@ -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
|
||||
|
||||
2
.github/workflows/unit-test.yml
vendored
2
.github/workflows/unit-test.yml
vendored
@@ -41,7 +41,7 @@ jobs:
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Pnpm Build
|
||||
run: pnpm turbo build
|
||||
run: pnpm turbo build --filter="./packages/*"
|
||||
|
||||
- name: Unit Tests
|
||||
run: pnpm test:ci
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,6 +5,7 @@ docsTmp
|
||||
.DS_Store
|
||||
.turbo
|
||||
coverage
|
||||
.direnv
|
||||
|
||||
# Next.js
|
||||
**/.next
|
||||
|
||||
@@ -1 +1 @@
|
||||
20
|
||||
22
|
||||
@@ -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
|
||||
|
||||
@@ -6,7 +6,7 @@ Thank you for considering contributing to Jazz! Jazz is an open-source framework
|
||||
|
||||
### 1. Reporting Bugs
|
||||
|
||||
If you find a bug, please [open an issue with as much detail as possible](https://github.com/gardencmp/jazz/issues). Include:
|
||||
If you find a bug, please [open an issue with as much detail as possible](https://github.com/garden-co/jazz/issues). Include:
|
||||
|
||||
- A clear and descriptive title.
|
||||
- Steps to reproduce the issue.
|
||||
@@ -40,7 +40,7 @@ You'll need Node.js 20.x or 22.x installed (we're working on support for 23.x),
|
||||
|
||||
1. **Clone the repository**:
|
||||
```bash
|
||||
git clone https://github.com/gardencmp/jazz.git
|
||||
git clone https://github.com/garden-co/jazz.git
|
||||
```
|
||||
|
||||
2. **Install dependencies**:
|
||||
|
||||
@@ -15,6 +15,6 @@ For community and support, please join our [Discord](https://discord.gg/utDMjHYg
|
||||
- Homepage: [jazz.tools](https://jazz.tools)
|
||||
- Docs: [jazz.tools/docs](https://jazz.tools/docs)
|
||||
- Community & support: [Discord](https://discord.gg/utDMjHYg42)
|
||||
- Updates: [X](https://x.com/jazz_tools) & [Email](https://gcmp.io/news)
|
||||
- Updates: [X](https://x.com/jazz_tools) & [Email](https://garden.co/news)
|
||||
|
||||
Copyright 2024 — Garden Computing, Inc.
|
||||
|
||||
58
biome.json
58
biome.json
@@ -7,7 +7,13 @@
|
||||
},
|
||||
"files": {
|
||||
"ignoreUnknown": false,
|
||||
"ignore": ["jazz-tools.json", "**/ios/**", "**/android/**"]
|
||||
"ignore": [
|
||||
"jazz-tools.json",
|
||||
"**/ios/**",
|
||||
"**/android/**",
|
||||
"packages/jazz-svelte/**",
|
||||
"examples/*svelte*/**"
|
||||
]
|
||||
},
|
||||
"formatter": {
|
||||
"enabled": true,
|
||||
@@ -19,7 +25,53 @@
|
||||
"linter": {
|
||||
"enabled": false,
|
||||
"rules": {
|
||||
"recommended": true
|
||||
"recommended": true,
|
||||
"correctness": {
|
||||
"useImportExtensions": {
|
||||
"level": "error",
|
||||
"options": {
|
||||
"suggestedExtensions": {
|
||||
"ts": {
|
||||
"module": "js",
|
||||
"component": "jsx"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"include": ["packages/**/src/**"],
|
||||
"linter": {
|
||||
"enabled": true,
|
||||
"rules": {
|
||||
"recommended": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": ["packages/**/src/tests/**", "packages/**/src/test/**"],
|
||||
"linter": {
|
||||
"rules": {
|
||||
"correctness": {
|
||||
"useImportExtensions": "off"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": ["packages/cojson-storage-indexeddb/**"],
|
||||
"linter": {
|
||||
"enabled": true,
|
||||
"rules": {
|
||||
"recommended": true,
|
||||
"suspicious": {
|
||||
"noExplicitAny": "info"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
{
|
||||
"name": "@jazz-e2e/filestream",
|
||||
"private": true,
|
||||
"version": "0.0.109",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"format-and-lint": "biome check .",
|
||||
"format-and-lint:fix": "biome check . --write",
|
||||
"build": "tsc && vite build",
|
||||
"preview": "vite preview",
|
||||
"test": "playwright test",
|
||||
"test:ui": "playwright test --ui"
|
||||
},
|
||||
"dependencies": {
|
||||
"cojson": "workspace:0.8.32",
|
||||
"hash-slash": "workspace:0.2.1",
|
||||
"is-ci": "^3.0.1",
|
||||
"jazz-react": "workspace:0.8.32",
|
||||
"jazz-tools": "workspace:0.8.32",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
import { Account, FileStream, ID } from "jazz-tools";
|
||||
import { useEffect } from "react";
|
||||
import { useAccount, useCoState } from "./jazz";
|
||||
import { UploadedFile } from "./schema";
|
||||
|
||||
async function getUploadedFile(me: Account, uploadedFileId: ID<UploadedFile>) {
|
||||
const uploadedFile = await UploadedFile.load(uploadedFileId, me, {});
|
||||
|
||||
if (!uploadedFile) {
|
||||
throw new Error("Uploaded file not found");
|
||||
}
|
||||
|
||||
uploadedFile.coMapDownloaded = true;
|
||||
|
||||
await FileStream.loadAsBlob(uploadedFile._refs.file.id, me);
|
||||
|
||||
return uploadedFile;
|
||||
}
|
||||
|
||||
export function DownloaderPeer(props: { testCoMapId: ID<UploadedFile> }) {
|
||||
const account = useAccount();
|
||||
const testCoMap = useCoState(UploadedFile, props.testCoMapId, {});
|
||||
|
||||
useEffect(() => {
|
||||
getUploadedFile(account.me, props.testCoMapId).then((value) => {
|
||||
value.syncCompleted = true;
|
||||
});
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<h1>Downloader Peer</h1>
|
||||
<div>Fetching: {props.testCoMapId}</div>
|
||||
<div data-testid="result">
|
||||
Covalue: {Boolean(testCoMap?.id) ? "Downloaded" : "Not Downloaded"}
|
||||
</div>
|
||||
<div data-testid="result">
|
||||
File:{" "}
|
||||
{Boolean(testCoMap?.syncCompleted) ? "Downloaded" : "Not Downloaded"}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import { DownloaderPeer } from "./DownloaderPeer";
|
||||
import { UploaderPeer } from "./UploaderPeer";
|
||||
import { AuthAndJazz } from "./jazz";
|
||||
import { getValueId } from "./lib/searchParams";
|
||||
|
||||
function Main() {
|
||||
const valueId = getValueId();
|
||||
|
||||
if (valueId) {
|
||||
return <DownloaderPeer testCoMapId={valueId} />;
|
||||
}
|
||||
|
||||
return <UploaderPeer />;
|
||||
}
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root")!).render(
|
||||
<React.StrictMode>
|
||||
<AuthAndJazz>
|
||||
<Main />
|
||||
</AuthAndJazz>
|
||||
</React.StrictMode>,
|
||||
);
|
||||
@@ -1,39 +0,0 @@
|
||||
import { createJazzReactApp, useDemoAuth } from "jazz-react";
|
||||
import { useEffect, useRef } from "react";
|
||||
import { getValueId } from "./lib/searchParams";
|
||||
|
||||
const key = getValueId()
|
||||
? `downloader-e2e@jazz.tools`
|
||||
: `uploader-e2e@jazz.tools`;
|
||||
|
||||
const localSync = new URLSearchParams(location.search).has("localSync");
|
||||
|
||||
const Jazz = createJazzReactApp();
|
||||
|
||||
export const { useAccount, useCoState } = Jazz;
|
||||
|
||||
export function AuthAndJazz({ children }: { children: React.ReactNode }) {
|
||||
const [auth, state] = useDemoAuth();
|
||||
|
||||
const signedUp = useRef(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (state.state === "ready" && !signedUp.current) {
|
||||
state.signUp("Mister X");
|
||||
signedUp.current = true;
|
||||
}
|
||||
}, [state.state]);
|
||||
|
||||
return (
|
||||
<Jazz.Provider
|
||||
auth={auth}
|
||||
peer={
|
||||
localSync
|
||||
? `ws://localhost:4200?key=${key}`
|
||||
: `wss://cloud.jazz.tools/?key=${key}`
|
||||
}
|
||||
>
|
||||
{children}
|
||||
</Jazz.Provider>
|
||||
);
|
||||
}
|
||||
@@ -1,237 +0,0 @@
|
||||
# @jazz-e2e/covalues
|
||||
|
||||
## 0.0.108
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [df42b2b]
|
||||
- Updated dependencies [df42b2b]
|
||||
- cojson@0.8.32
|
||||
- jazz-tools@0.8.32
|
||||
- jazz-react@0.8.32
|
||||
|
||||
## 0.0.107
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [e511d6d]
|
||||
- cojson@0.8.31
|
||||
- jazz-react@0.8.31
|
||||
- jazz-tools@0.8.31
|
||||
|
||||
## 0.0.106
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0a2fae3]
|
||||
- Updated dependencies [99cda2f]
|
||||
- cojson@0.8.30
|
||||
- jazz-react@0.8.30
|
||||
- jazz-tools@0.8.30
|
||||
|
||||
## 0.0.105
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [dcc9c2e]
|
||||
- Updated dependencies [699553f]
|
||||
- cojson@0.8.29
|
||||
- jazz-react@0.8.29
|
||||
- jazz-tools@0.8.29
|
||||
|
||||
## 0.0.104
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [605734c]
|
||||
- cojson@0.8.28
|
||||
- jazz-react@0.8.28
|
||||
- jazz-tools@0.8.28
|
||||
|
||||
## 0.0.103
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [75fdff4]
|
||||
- cojson@0.8.27
|
||||
- jazz-react@0.8.27
|
||||
- jazz-tools@0.8.27
|
||||
|
||||
## 0.0.102
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [59d37df]
|
||||
- jazz-react@0.8.26
|
||||
|
||||
## 0.0.101
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.24
|
||||
|
||||
## 0.0.100
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6f745be]
|
||||
- Updated dependencies [d348c2d]
|
||||
- Updated dependencies [124bf67]
|
||||
- Updated dependencies [6902b5b]
|
||||
- Updated dependencies [1a0cd3d]
|
||||
- cojson@0.8.23
|
||||
- jazz-tools@0.8.23
|
||||
- jazz-react@0.8.23
|
||||
|
||||
## 0.0.99
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [59cc64d]
|
||||
- jazz-react@0.8.22
|
||||
|
||||
## 0.0.98
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0f30eea]
|
||||
- Updated dependencies [149ca97]
|
||||
- cojson@0.8.21
|
||||
- jazz-tools@0.8.21
|
||||
- jazz-react@0.8.21
|
||||
|
||||
## 0.0.97
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [dd9b13f]
|
||||
- Updated dependencies [a69ed0b]
|
||||
- Updated dependencies [3ef3ff3]
|
||||
- Updated dependencies [c6931b8]
|
||||
- jazz-react@0.8.20
|
||||
|
||||
## 0.0.96
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [9c2aadb]
|
||||
- cojson@0.8.19
|
||||
- jazz-react@0.8.19
|
||||
- jazz-tools@0.8.19
|
||||
|
||||
## 0.0.95
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d4319d8]
|
||||
- cojson@0.8.18
|
||||
- jazz-react@0.8.18
|
||||
- jazz-tools@0.8.18
|
||||
|
||||
## 0.0.94
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d433cf4]
|
||||
- cojson@0.8.17
|
||||
- jazz-react@0.8.17
|
||||
- jazz-tools@0.8.17
|
||||
|
||||
## 0.0.93
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2af107c]
|
||||
- Updated dependencies [b934fab]
|
||||
- jazz-react@0.8.16
|
||||
- cojson@0.8.16
|
||||
- jazz-tools@0.8.16
|
||||
|
||||
## 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
|
||||
@@ -1,34 +0,0 @@
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import { RouterProvider, createBrowserRouter } from "react-router-dom";
|
||||
import { AuthAndJazz } from "./jazz";
|
||||
import { ResumeSyncState } from "./pages/ResumeSyncState";
|
||||
import { RetryUnavailable } from "./pages/RetryUnavailable";
|
||||
import { TestInput } from "./pages/TestInput";
|
||||
|
||||
const router = createBrowserRouter([
|
||||
{
|
||||
path: "/test-input",
|
||||
element: <TestInput />,
|
||||
},
|
||||
{
|
||||
path: "/resume-sync",
|
||||
element: <ResumeSyncState />,
|
||||
},
|
||||
{
|
||||
path: "/retry-unavailable",
|
||||
element: <RetryUnavailable />,
|
||||
},
|
||||
{
|
||||
path: "/",
|
||||
element: <TestInput />,
|
||||
},
|
||||
]);
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root")!).render(
|
||||
<React.StrictMode>
|
||||
<AuthAndJazz>
|
||||
<RouterProvider router={router} />
|
||||
</AuthAndJazz>
|
||||
</React.StrictMode>,
|
||||
);
|
||||
@@ -1,10 +0,0 @@
|
||||
import react from "@vitejs/plugin-react-swc";
|
||||
import { defineConfig } from "vite";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
build: {
|
||||
minify: false,
|
||||
},
|
||||
});
|
||||
@@ -1,5 +1,98 @@
|
||||
# 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
|
||||
|
||||
@@ -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/
|
||||
@@ -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).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jazz-example-book-shelf",
|
||||
"version": "0.1.24",
|
||||
"version": "0.1.35",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
@@ -11,19 +11,19 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"clsx": "^2.0.0",
|
||||
"jazz-browser-media-images": "workspace:0.8.32",
|
||||
"jazz-react": "workspace:0.8.32",
|
||||
"jazz-tools": "workspace:0.8.32",
|
||||
"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",
|
||||
"@types/react": "^18.3.12",
|
||||
"@types/react-dom": "^18.3.1",
|
||||
"postcss": "^8.4.27",
|
||||
"tailwindcss": "3.3.2",
|
||||
"typescript": "^5.3.3"
|
||||
"tailwindcss": "^3.4.15",
|
||||
"typescript": "~5.6.2"
|
||||
}
|
||||
}
|
||||
|
||||
8
examples/book-shelf/vercel.json
Normal file
8
examples/book-shelf/vercel.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"build": {
|
||||
"env": {
|
||||
"APP_NAME": "books-demo"
|
||||
}
|
||||
},
|
||||
"ignoreCommand": "node ../../ignore-vercel-build.js"
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +0,0 @@
|
||||
FROM caddy:2.7.3-alpine
|
||||
LABEL org.opencontainers.image.source="https://github.com/gardencmp/jazz"
|
||||
|
||||
COPY ./dist /usr/share/caddy/
|
||||
@@ -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
|
||||
@@ -1,47 +0,0 @@
|
||||
{
|
||||
"name": "jazz-example-chat-clerk",
|
||||
"private": true,
|
||||
"version": "0.0.108",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc && vite build",
|
||||
"format-and-lint": "biome check .",
|
||||
"format-and-lint:fix": "biome check . --write",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"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.32",
|
||||
"hash-slash": "workspace:0.2.1",
|
||||
"jazz-react": "workspace:0.8.32",
|
||||
"jazz-react-auth-clerk": "workspace:0.8.32",
|
||||
"jazz-tools": "workspace:0.8.32",
|
||||
"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",
|
||||
"@vitejs/plugin-react-swc": "^3.3.2",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"postcss": "^8.4.27",
|
||||
"tailwindcss": "3.3.2",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^5.0.10"
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
import { useIframeHashRouter } from "hash-slash";
|
||||
import { Group, ID } from "jazz-tools";
|
||||
import { ChatScreen } from "./chatScreen.tsx";
|
||||
import { useAccount } from "./main.tsx";
|
||||
import { Chat } from "./schema.ts";
|
||||
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>
|
||||
);
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
import { ID } from "jazz-tools";
|
||||
import { useCoState } from "./main.tsx";
|
||||
import { Chat, Message } from "./schema.ts";
|
||||
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>
|
||||
);
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
import { createJazzReactApp } from "jazz-react";
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import { App } from "./app.tsx";
|
||||
|
||||
import { ClerkProvider, SignInButton, useClerk } from "@clerk/clerk-react";
|
||||
import { useJazzClerkAuth } from "jazz-react-auth-clerk";
|
||||
|
||||
const Jazz = createJazzReactApp();
|
||||
export const { useAccount, useCoState } = Jazz;
|
||||
|
||||
function JazzAndAuth({ children }: { children: React.ReactNode }) {
|
||||
const clerk = useClerk();
|
||||
const [auth, state] = useJazzClerkAuth(clerk);
|
||||
|
||||
return (
|
||||
<>
|
||||
{state.errors.map((error) => (
|
||||
<div key={error}>{error}</div>
|
||||
))}
|
||||
{auth ? (
|
||||
<Jazz.Provider
|
||||
auth={auth}
|
||||
peer="wss://cloud.jazz.tools/?key=chat-example-jazz-clerk@gcmp.io"
|
||||
>
|
||||
{children}
|
||||
</Jazz.Provider>
|
||||
) : (
|
||||
<SignInButton />
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
createRoot(document.getElementById("root")!).render(
|
||||
<StrictMode>
|
||||
<ClerkProvider
|
||||
publishableKey={import.meta.env.VITE_CLERK_PUBLISHABLE_KEY}
|
||||
afterSignOutUrl="/"
|
||||
>
|
||||
<JazzAndAuth>
|
||||
<App />
|
||||
</JazzAndAuth>
|
||||
</ClerkProvider>
|
||||
</StrictMode>,
|
||||
);
|
||||
@@ -1,7 +0,0 @@
|
||||
import { CoList, CoMap, co } from "jazz-tools";
|
||||
|
||||
export class Message extends CoMap {
|
||||
text = co.string;
|
||||
}
|
||||
|
||||
export class Chat extends CoList.Of(co.ref(Message)) {}
|
||||
@@ -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 = "";
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: [
|
||||
"./pages/**/*.{ts,tsx}",
|
||||
"./components/**/*.{ts,tsx}",
|
||||
"./app/**/*.{ts,tsx}",
|
||||
"./src/**/*.{ts,tsx}",
|
||||
],
|
||||
theme: {
|
||||
container: {
|
||||
center: true,
|
||||
padding: "2rem",
|
||||
screens: {
|
||||
"2xl": "1400px",
|
||||
},
|
||||
},
|
||||
extend: {
|
||||
colors: {
|
||||
border: "hsl(var(--border))",
|
||||
input: "hsl(var(--input))",
|
||||
ring: "hsl(var(--ring))",
|
||||
background: "hsl(var(--background))",
|
||||
foreground: "hsl(var(--foreground))",
|
||||
primary: {
|
||||
DEFAULT: "hsl(var(--primary))",
|
||||
foreground: "hsl(var(--primary-foreground))",
|
||||
},
|
||||
secondary: {
|
||||
DEFAULT: "hsl(var(--secondary))",
|
||||
foreground: "hsl(var(--secondary-foreground))",
|
||||
},
|
||||
destructive: {
|
||||
DEFAULT: "hsl(var(--destructive))",
|
||||
foreground: "hsl(var(--destructive-foreground))",
|
||||
},
|
||||
muted: {
|
||||
DEFAULT: "hsl(var(--muted))",
|
||||
foreground: "hsl(var(--muted-foreground))",
|
||||
},
|
||||
accent: {
|
||||
DEFAULT: "hsl(var(--accent))",
|
||||
foreground: "hsl(var(--accent-foreground))",
|
||||
},
|
||||
popover: {
|
||||
DEFAULT: "hsl(var(--popover))",
|
||||
foreground: "hsl(var(--popover-foreground))",
|
||||
},
|
||||
card: {
|
||||
DEFAULT: "hsl(var(--card))",
|
||||
foreground: "hsl(var(--card-foreground))",
|
||||
},
|
||||
},
|
||||
borderRadius: {
|
||||
lg: "var(--radius)",
|
||||
md: "calc(var(--radius) - 2px)",
|
||||
sm: "calc(var(--radius) - 4px)",
|
||||
},
|
||||
keyframes: {
|
||||
"accordion-down": {
|
||||
from: { height: 0 },
|
||||
to: { height: "var(--radix-accordion-content-height)" },
|
||||
},
|
||||
"accordion-up": {
|
||||
from: { height: "var(--radix-accordion-content-height)" },
|
||||
to: { height: 0 },
|
||||
},
|
||||
},
|
||||
animation: {
|
||||
"accordion-down": "accordion-down 0.2s ease-out",
|
||||
"accordion-up": "accordion-up 0.2s ease-out",
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [require("tailwindcss-animate")],
|
||||
};
|
||||
@@ -1,16 +0,0 @@
|
||||
import path from "path";
|
||||
import react from "@vitejs/plugin-react-swc";
|
||||
import { defineConfig } from "vite";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "./src"),
|
||||
},
|
||||
},
|
||||
build: {
|
||||
minify: false,
|
||||
},
|
||||
});
|
||||
@@ -1 +1 @@
|
||||
EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_ZXZpZGVudC1kYW5lLTg5LmNsZXJrLmFjY291bnRzLmRldiQ
|
||||
EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_ZXZpZGVudC1kYW5lLTg5LmNsZXJrLmFjY291bnRzLmRldiQ
|
||||
|
||||
@@ -1,5 +1,127 @@
|
||||
# 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
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"expo-secure-store"
|
||||
"expo-secure-store",
|
||||
"expo-font",
|
||||
"expo-router"
|
||||
],
|
||||
"extra": {
|
||||
"eas": {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import "../global.css";
|
||||
import { ClerkLoaded, ClerkProvider } from "@clerk/clerk-expo";
|
||||
import { useFonts } from "expo-font";
|
||||
import { Slot } from "expo-router";
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
module.exports = function (api) {
|
||||
api.cache(true);
|
||||
return {
|
||||
presets: ["babel-preset-expo"],
|
||||
plugins: ["nativewind/babel"],
|
||||
presets: [
|
||||
["babel-preset-expo", { jsxImportSource: "nativewind" }],
|
||||
"nativewind/babel",
|
||||
],
|
||||
};
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Platform } from "react-native";
|
||||
export interface TokenCache {
|
||||
getToken: (key: string) => Promise<string | undefined | null>;
|
||||
saveToken: (key: string, token: string) => Promise<void>;
|
||||
clearToken?: (key: string) => void;
|
||||
clearToken: (key: string) => void;
|
||||
}
|
||||
|
||||
const createTokenCache = (): TokenCache => {
|
||||
@@ -27,6 +27,9 @@ const createTokenCache = (): TokenCache => {
|
||||
saveToken: (key: string, token: string) => {
|
||||
return SecureStore.setItemAsync(key, token);
|
||||
},
|
||||
clearToken: (key: string) => {
|
||||
return SecureStore.deleteItemAsync(key);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
3
examples/chat-rn-clerk/global.css
Normal file
3
examples/chat-rn-clerk/global.css
Normal file
@@ -0,0 +1,3 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
@@ -1,5 +1,6 @@
|
||||
// Learn more https://docs.expo.dev/guides/monorepos
|
||||
const { getDefaultConfig } = require("expo/metro-config");
|
||||
const { withNativeWind } = require("nativewind/metro");
|
||||
const { FileStore } = require("metro-cache");
|
||||
const path = require("path");
|
||||
|
||||
@@ -19,7 +20,10 @@ config.resolver.nodeModulesPaths = [
|
||||
];
|
||||
config.resolver.sourceExts = ["mjs", "js", "json", "ts", "tsx"];
|
||||
config.resolver.unstable_enablePackageExports = true;
|
||||
config.resolver.requireCycleIgnorePatterns = [/(^|\/|\\)node_modules($|\/|\\)/];
|
||||
config.resolver.requireCycleIgnorePatterns = [
|
||||
/(^|\/|\\)node_modules($|\/|\\)/,
|
||||
/(^|\/|\\)packages($|\/|\\)/,
|
||||
];
|
||||
|
||||
// Use turborepo to restore the cache when possible
|
||||
config.cacheStores = [
|
||||
@@ -28,4 +32,5 @@ config.cacheStores = [
|
||||
}),
|
||||
];
|
||||
|
||||
module.exports = config;
|
||||
// module.exports = config;
|
||||
module.exports = withNativeWind(config, { input: "./global.css" });
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "chat-rn-clerk",
|
||||
"main": "index.js",
|
||||
"version": "1.0.24",
|
||||
"version": "1.0.37",
|
||||
"scripts": {
|
||||
"build": "expo export -p ios",
|
||||
"start": "expo start",
|
||||
@@ -17,62 +17,61 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@azure/core-asynciterator-polyfill": "^1.0.2",
|
||||
"@bam.tech/react-native-image-resizer": "^3.0.10",
|
||||
"@bam.tech/react-native-image-resizer": "^3.0.11",
|
||||
"@clerk/clerk-expo": "^2.2.21",
|
||||
"@expo/vector-icons": "^14.0.2",
|
||||
"@react-native-community/netinfo": "^11.3.1",
|
||||
"@react-navigation/native": "^6.1.18",
|
||||
"@react-navigation/native-stack": "^6.11.0",
|
||||
"@react-native-community/netinfo": "^11.4.1",
|
||||
"@react-navigation/native": "^7.0.13",
|
||||
"@react-navigation/native-stack": "^7.1.14",
|
||||
"base-64": "^1.0.0",
|
||||
"buffer": "^6.0.3",
|
||||
"clsx": "^2.0.0",
|
||||
"expo": "~51.0.37",
|
||||
"expo-build-properties": "~0.12.5",
|
||||
"expo-clipboard": "~6.0.3",
|
||||
"expo-constants": "~16.0.2",
|
||||
"expo-crypto": "~13.0.2",
|
||||
"expo-dev-client": "~4.0.28",
|
||||
"expo-file-system": "^17.0.1",
|
||||
"expo-font": "~12.0.4",
|
||||
"expo-linking": "~6.3.1",
|
||||
"expo-router": "~3.5.23",
|
||||
"expo-secure-store": "~13.0.2",
|
||||
"expo-splash-screen": "~0.27.5",
|
||||
"expo-status-bar": "~1.12.1",
|
||||
"expo-system-ui": "~3.0.7",
|
||||
"expo-web-browser": "~13.0.3",
|
||||
"jazz-react-auth-clerk": "workspace:*",
|
||||
"expo": "^52.0.0",
|
||||
"expo-build-properties": "~0.13.1",
|
||||
"expo-clipboard": "~7.0.0",
|
||||
"expo-constants": "~17.0.3",
|
||||
"expo-crypto": "~14.0.1",
|
||||
"expo-dev-client": "~5.0.5",
|
||||
"expo-file-system": "^18.0.4",
|
||||
"expo-font": "~13.0.1",
|
||||
"expo-linking": "~7.0.3",
|
||||
"expo-router": "~4.0.11",
|
||||
"expo-secure-store": "~14.0.0",
|
||||
"expo-splash-screen": "~0.29.16",
|
||||
"expo-status-bar": "~2.0.0",
|
||||
"expo-system-ui": "~4.0.5",
|
||||
"expo-web-browser": "~14.0.1",
|
||||
"jazz-react-native": "workspace:*",
|
||||
"jazz-react-native-auth-clerk": "workspace:*",
|
||||
"jazz-react-native-media-images": "workspace:*",
|
||||
"jazz-tools": "workspace:*",
|
||||
"nativewind": "^2.0.11",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-native": "~0.74.5",
|
||||
"nativewind": "^4.1.21",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-native": "~0.76.3",
|
||||
"react-native-fetch-api": "^3.0.0",
|
||||
"react-native-gesture-handler": "~2.16.1",
|
||||
"react-native-gesture-handler": "~2.20.2",
|
||||
"react-native-get-random-values": "^1.11.0",
|
||||
"react-native-mmkv": "3.0.1",
|
||||
"react-native-polyfill-globals": "^3.1.0",
|
||||
"react-native-quick-base64": "^2.1.2",
|
||||
"react-native-reanimated": "~3.10.1",
|
||||
"react-native-safe-area-context": "4.10.5",
|
||||
"react-native-screens": "3.31.1",
|
||||
"react-native-reanimated": "~3.16.3",
|
||||
"react-native-safe-area-context": "4.12.0",
|
||||
"react-native-screens": "4.1.0",
|
||||
"react-native-url-polyfill": "^2.0.0",
|
||||
"react-native-web": "~0.19.10",
|
||||
"react-native-web": "~0.19.13",
|
||||
"text-encoding": "^0.7.0",
|
||||
"web-streams-polyfill": "^3.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.20.0",
|
||||
"@types/jest": "^29.5.3",
|
||||
"@types/react": "^18.2.19",
|
||||
"@types/react": "^18.3.12",
|
||||
"@types/react-test-renderer": "^18.0.7",
|
||||
"jest": "^29.2.1",
|
||||
"jest-expo": "~51.0.3",
|
||||
"jest-expo": "~52.0.2",
|
||||
"react-test-renderer": "18.2.0",
|
||||
"tailwindcss": "3.3.2",
|
||||
"typescript": "^5.3.3"
|
||||
"tailwindcss": "^3.4.15",
|
||||
"typescript": "~5.6.2"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { useClerk, useUser } from "@clerk/clerk-expo";
|
||||
import { useJazzClerkAuth } from "jazz-react-auth-clerk";
|
||||
import { useJazzClerkAuth } from "jazz-react-native-auth-clerk";
|
||||
import React, {
|
||||
useContext,
|
||||
createContext,
|
||||
PropsWithChildren,
|
||||
useContext,
|
||||
useEffect,
|
||||
useState,
|
||||
PropsWithChildren,
|
||||
} from "react";
|
||||
import { Text, View } from "react-native";
|
||||
import { Jazz } from "./jazz";
|
||||
import { Jazz, kvStore } from "./jazz";
|
||||
|
||||
const AuthContext = createContext<{
|
||||
isAuthenticated: boolean;
|
||||
@@ -25,7 +25,7 @@ export function useAuth() {
|
||||
export function JazzAndAuth({ children }: PropsWithChildren) {
|
||||
const { isSignedIn, isLoaded: isClerkLoaded } = useUser();
|
||||
const clerk = useClerk();
|
||||
const [auth, state] = useJazzClerkAuth(clerk);
|
||||
const [auth, state] = useJazzClerkAuth(clerk, kvStore);
|
||||
const [isAuthenticated, setIsAuthenticated] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -46,10 +46,10 @@ export function JazzAndAuth({ children }: PropsWithChildren) {
|
||||
<Text style={{ color: "red" }}>{error}</Text>
|
||||
</View>
|
||||
))}
|
||||
{auth ? (
|
||||
{auth && clerk.user ? (
|
||||
<Jazz.Provider
|
||||
auth={auth}
|
||||
peer="wss://cloud.jazz.tools/?key=chat-rn-clerk-example-jazz@gcmp.io"
|
||||
peer="wss://cloud.jazz.tools/?key=chat-rn-clerk-example-jazz@garden.co"
|
||||
storage={undefined}
|
||||
>
|
||||
{children}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
// NOTE: Update this to include the paths to all of your component files.
|
||||
content: [
|
||||
"./app/**/*.{js,jsx,ts,tsx}",
|
||||
"./components/**/*.{js,jsx,ts,tsx}",
|
||||
"./src/**/*.{js,jsx,ts,tsx}",
|
||||
],
|
||||
presets: [require("nativewind/preset")],
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
"@/*": ["./*"]
|
||||
}
|
||||
},
|
||||
"include": ["**/*.ts", "**/*.tsx"]
|
||||
"include": ["**/*.ts", "**/*.tsx", "nativewind-env.d.ts"]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,91 @@
|
||||
# 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
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
module.exports = function (api) {
|
||||
api.cache(true);
|
||||
return {
|
||||
presets: ["babel-preset-expo"],
|
||||
plugins: ["nativewind/babel"],
|
||||
presets: [
|
||||
["babel-preset-expo", { jsxImportSource: "nativewind" }],
|
||||
"nativewind/babel",
|
||||
],
|
||||
};
|
||||
};
|
||||
|
||||
3
examples/chat-rn/global.css
Normal file
3
examples/chat-rn/global.css
Normal file
@@ -0,0 +1,3 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
@@ -1,5 +1,6 @@
|
||||
// Learn more https://docs.expo.dev/guides/monorepos
|
||||
const { getDefaultConfig } = require("expo/metro-config");
|
||||
const { withNativeWind } = require("nativewind/metro");
|
||||
const { FileStore } = require("metro-cache");
|
||||
const path = require("path");
|
||||
|
||||
@@ -7,7 +8,7 @@ const path = require("path");
|
||||
const projectRoot = __dirname;
|
||||
const workspaceRoot = path.resolve(projectRoot, "../..");
|
||||
|
||||
const config = getDefaultConfig(projectRoot);
|
||||
const config = getDefaultConfig(projectRoot, { isCSSEnabled: true });
|
||||
|
||||
// Since we are using pnpm, we have to setup the monorepo manually for Metro
|
||||
// #1 - Watch all files in the monorepo
|
||||
@@ -19,7 +20,10 @@ config.resolver.nodeModulesPaths = [
|
||||
];
|
||||
config.resolver.sourceExts = ["mjs", "js", "json", "ts", "tsx"];
|
||||
config.resolver.unstable_enablePackageExports = true;
|
||||
config.resolver.requireCycleIgnorePatterns = [/(^|\/|\\)node_modules($|\/|\\)/];
|
||||
config.resolver.requireCycleIgnorePatterns = [
|
||||
/(^|\/|\\)node_modules($|\/|\\)/,
|
||||
/(^|\/|\\)packages($|\/|\\)/,
|
||||
];
|
||||
|
||||
// Use turborepo to restore the cache when possible
|
||||
config.cacheStores = [
|
||||
@@ -28,4 +32,5 @@ config.cacheStores = [
|
||||
}),
|
||||
];
|
||||
|
||||
module.exports = config;
|
||||
// module.exports = config;
|
||||
module.exports = withNativeWind(config, { input: "./global.css" });
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "chat-rn",
|
||||
"version": "1.0.23",
|
||||
"version": "1.0.34",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "expo export -p ios",
|
||||
@@ -13,41 +13,40 @@
|
||||
},
|
||||
"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",
|
||||
"@react-native-community/netinfo": "^11.4.1",
|
||||
"@react-navigation/native": "^7.0.13",
|
||||
"@react-navigation/native-stack": "^7.1.14",
|
||||
"base-64": "^1.0.0",
|
||||
"clsx": "^2.0.0",
|
||||
"expo": "~51.0.37",
|
||||
"expo-build-properties": "~0.12.5",
|
||||
"expo-clipboard": "~6.0.3",
|
||||
"expo-constants": "~16.0.2",
|
||||
"expo-crypto": "~13.0.2",
|
||||
"expo-dev-client": "~4.0.28",
|
||||
"expo-linking": "~6.3.1",
|
||||
"expo-secure-store": "~13.0.2",
|
||||
"expo-status-bar": "~1.12.1",
|
||||
"expo-web-browser": "~13.0.3",
|
||||
"expo": "^52.0.0",
|
||||
"expo-build-properties": "~0.13.1",
|
||||
"expo-clipboard": "~7.0.0",
|
||||
"expo-constants": "~17.0.3",
|
||||
"expo-crypto": "~14.0.1",
|
||||
"expo-dev-client": "~5.0.5",
|
||||
"expo-linking": "~7.0.3",
|
||||
"expo-secure-store": "~14.0.0",
|
||||
"expo-status-bar": "~2.0.0",
|
||||
"expo-web-browser": "~14.0.1",
|
||||
"jazz-react-native": "workspace:*",
|
||||
"jazz-tools": "workspace:*",
|
||||
"nativewind": "^2.0.11",
|
||||
"react": "^18.2.0",
|
||||
"react-native": "~0.74.5",
|
||||
"nativewind": "^4.1.21",
|
||||
"react": "^18.3.1",
|
||||
"react-native": "~0.76.3",
|
||||
"react-native-fetch-api": "^3.0.0",
|
||||
"react-native-get-random-values": "^1.11.0",
|
||||
"react-native-mmkv": "3.0.1",
|
||||
"react-native-polyfill-globals": "^3.1.0",
|
||||
"react-native-safe-area-context": "4.10.5",
|
||||
"react-native-screens": "3.31.1",
|
||||
"react-native-safe-area-context": "4.12.0",
|
||||
"react-native-screens": "4.1.0",
|
||||
"react-native-url-polyfill": "^2.0.0",
|
||||
"text-encoding": "^0.7.0",
|
||||
"web-streams-polyfill": "^3.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.20.0",
|
||||
"@types/react": "^18.2.19",
|
||||
"tailwindcss": "3.3.2",
|
||||
"typescript": "^5.3.3"
|
||||
"@types/react": "^18.3.12",
|
||||
"tailwindcss": "^3.4.15",
|
||||
"typescript": "~5.6.2"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import "../global.css";
|
||||
|
||||
import {
|
||||
NavigationContainer,
|
||||
useNavigationContainerRef,
|
||||
@@ -51,7 +53,7 @@ function App() {
|
||||
<StrictMode>
|
||||
<Jazz.Provider
|
||||
auth={auth}
|
||||
peer="wss://cloud.jazz.tools/?key=chat-rn-example-jazz@gcmp.io"
|
||||
peer="wss://cloud.jazz.tools/?key=chat-rn-example-jazz@garden.co"
|
||||
storage={undefined}
|
||||
>
|
||||
<NavigationContainer linking={linking} ref={navigationRef}>
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
// NOTE: Update this to include the paths to all of your component files.
|
||||
content: [
|
||||
"./app/**/*.{js,jsx,ts,tsx}",
|
||||
"./components/**/*.{js,jsx,ts,tsx}",
|
||||
"./src/**/*.{js,jsx,ts,tsx}",
|
||||
],
|
||||
presets: [require("nativewind/preset")],
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
|
||||
@@ -1,5 +1,101 @@
|
||||
# chat-vue
|
||||
|
||||
## 0.0.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6f0bd7f]
|
||||
- Updated dependencies [fa41f8e]
|
||||
- Updated dependencies [88d7d9a]
|
||||
- Updated dependencies [60e35ea]
|
||||
- jazz-browser@0.8.45
|
||||
- jazz-tools@0.8.45
|
||||
- jazz-vue@0.8.45
|
||||
|
||||
## 0.0.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.8.44
|
||||
- jazz-tools@0.8.44
|
||||
- jazz-vue@0.8.44
|
||||
|
||||
## 0.0.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [ac216b9]
|
||||
- jazz-browser@0.8.41
|
||||
- jazz-tools@0.8.41
|
||||
- jazz-vue@0.8.41
|
||||
|
||||
## 0.0.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.8.40
|
||||
- jazz-vue@0.8.40
|
||||
|
||||
## 0.0.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [e386f2b]
|
||||
- Updated dependencies [249eecb]
|
||||
- jazz-browser@0.8.39
|
||||
- jazz-tools@0.8.39
|
||||
- jazz-vue@0.8.39
|
||||
|
||||
## 0.0.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.8.38
|
||||
- jazz-tools@0.8.38
|
||||
- jazz-vue@0.8.38
|
||||
|
||||
## 0.0.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.8.37
|
||||
- jazz-tools@0.8.37
|
||||
- jazz-vue@0.8.25
|
||||
|
||||
## 0.0.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [441fe27]
|
||||
- jazz-tools@0.8.36
|
||||
- jazz-browser@0.8.36
|
||||
- jazz-vue@0.8.24
|
||||
|
||||
## 0.0.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8b87117]
|
||||
- jazz-tools@0.8.35
|
||||
- jazz-browser@0.8.35
|
||||
- jazz-vue@0.8.23
|
||||
|
||||
## 0.0.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.8.34
|
||||
- jazz-tools@0.8.34
|
||||
- jazz-vue@0.8.22
|
||||
|
||||
## 0.0.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3cb27e1]
|
||||
- jazz-browser@0.8.33
|
||||
- jazz-vue@0.8.21
|
||||
|
||||
## 0.0.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,39 +1,35 @@
|
||||
# chat-vue
|
||||
# Chat example with Jazz and Vue
|
||||
|
||||
This template should help get you started developing with Vue 3 in Vite.
|
||||
## Installing & running the example locally
|
||||
|
||||
## Recommended IDE Setup
|
||||
(This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
|
||||
|
||||
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
|
||||
|
||||
## Type Support for `.vue` Imports in TS
|
||||
|
||||
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
|
||||
|
||||
## Customize configuration
|
||||
|
||||
See [Vite Configuration Reference](https://vite.dev/config/).
|
||||
|
||||
## Project Setup
|
||||
|
||||
```sh
|
||||
pnpm install
|
||||
Start by downloading the [jazz repository](https://github.com/garden-co/jazz):
|
||||
```bash
|
||||
npx degit gardencmp/jazz jazz
|
||||
```
|
||||
|
||||
### Compile and Hot-Reload for Development
|
||||
Go to the todo-vue example directory:
|
||||
```bash
|
||||
cd jazz/examples/chat-vue
|
||||
```
|
||||
|
||||
```sh
|
||||
Install and build dependencies:
|
||||
```bash
|
||||
pnpm i && npx turbo build
|
||||
```
|
||||
|
||||
Start the dev server:
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
### Type-Check, Compile and Minify for Production
|
||||
## Questions / problems / feedback
|
||||
|
||||
```sh
|
||||
pnpm build
|
||||
```
|
||||
If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or open an issue or PR to fix something that seems wrong.
|
||||
|
||||
### Lint with [ESLint](https://eslint.org/)
|
||||
## Configuration: sync server
|
||||
|
||||
```sh
|
||||
pnpm lint
|
||||
```
|
||||
By default, the example app uses [Jazz Cloud](https://jazz.tools/cloud) (`wss://cloud.jazz.tools`) - so cross-device use, invites and collaboration should just work.
|
||||
|
||||
You can also run a local sync server by running `npx jazz-run sync` and adding the query param `?sync=ws://localhost:4200` to the URL of the example app (for example: `http://localhost:5173/?peer=ws://localhost:4200`), or by setting the `sync` parameter of `JazzProvider` in [./src/main.ts](./src/main.ts).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "chat-vue",
|
||||
"version": "0.0.15",
|
||||
"version": "0.0.26",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
@@ -25,14 +25,14 @@
|
||||
"@vitejs/plugin-vue": "^5.1.4",
|
||||
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
||||
"@vue/tsconfig": "^0.5.1",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"eslint": "^8.46.0",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"eslint": "^9.7.0",
|
||||
"eslint-plugin-vue": "^9.28.0",
|
||||
"npm-run-all2": "^6.2.3",
|
||||
"postcss": "^8.4.27",
|
||||
"tailwindcss": "3.3.2",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^5.0.10",
|
||||
"tailwindcss": "^3.4.15",
|
||||
"typescript": "~5.6.2",
|
||||
"vite": "^5.4.10",
|
||||
"vite-plugin-vue-devtools": "^7.4.6",
|
||||
"vue-tsc": "^2.1.6"
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import "./index.css";
|
||||
import { DemoAuthBasicUI, createJazzVueApp, useDemoAuth } from "jazz-vue";
|
||||
import { createApp, defineComponent, h } from "vue";
|
||||
import App from "./App.vue";
|
||||
import "./index.css";
|
||||
import router from "./router";
|
||||
|
||||
const Jazz = createJazzVueApp();
|
||||
@@ -18,7 +18,7 @@ const RootComponent = defineComponent({
|
||||
JazzProvider,
|
||||
{
|
||||
auth: authMethod.value,
|
||||
peer: "wss://mesh.jazz.tools/?key=chat-example-jazz@gcmp.io",
|
||||
peer: "wss://cloud.jazz.tools/?key=chat-example-jazz@garden.co",
|
||||
},
|
||||
{
|
||||
default: () => h(App),
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
export default {
|
||||
purge: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"],
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
};
|
||||
11
examples/chat-vue/tailwind.config.ts
Normal file
11
examples/chat-vue/tailwind.config.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import type { Config } from "tailwindcss";
|
||||
|
||||
const config: Config = {
|
||||
content: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"],
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
};
|
||||
|
||||
export default config;
|
||||
@@ -1,5 +1,115 @@
|
||||
# jazz-example-chat
|
||||
|
||||
## 0.0.121
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6f0bd7f]
|
||||
- Updated dependencies [fca6a0b]
|
||||
- Updated dependencies [fa41f8e]
|
||||
- Updated dependencies [88d7d9a]
|
||||
- Updated dependencies [60e35ea]
|
||||
- cojson@0.8.45
|
||||
- jazz-tools@0.8.45
|
||||
- jazz-react@0.8.45
|
||||
- jazz-browser-media-images@0.8.45
|
||||
|
||||
## 0.0.120
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5d20c81]
|
||||
- cojson@0.8.44
|
||||
- jazz-react@0.8.44
|
||||
- jazz-tools@0.8.44
|
||||
- jazz-browser-media-images@0.8.44
|
||||
|
||||
## 0.0.119
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3252502]
|
||||
- Updated dependencies [6370348]
|
||||
- Updated dependencies [ac216b9]
|
||||
- cojson@0.8.41
|
||||
- jazz-react@0.8.41
|
||||
- jazz-tools@0.8.41
|
||||
- jazz-browser-media-images@0.8.41
|
||||
|
||||
## 0.0.118
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser-media-images@0.8.40
|
||||
- jazz-react@0.8.40
|
||||
|
||||
## 0.0.117
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [249eecb]
|
||||
- Updated dependencies [3121551]
|
||||
- jazz-tools@0.8.39
|
||||
- cojson@0.8.39
|
||||
- jazz-browser-media-images@0.8.39
|
||||
- jazz-react@0.8.39
|
||||
|
||||
## 0.0.116
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b00ee91]
|
||||
- Updated dependencies [f488c09]
|
||||
- cojson@0.8.38
|
||||
- jazz-react@0.8.38
|
||||
- jazz-tools@0.8.38
|
||||
|
||||
## 0.0.115
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3d9f12e]
|
||||
- cojson@0.8.37
|
||||
- jazz-react@0.8.37
|
||||
- jazz-tools@0.8.37
|
||||
|
||||
## 0.0.114
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [441fe27]
|
||||
- cojson@0.8.36
|
||||
- jazz-tools@0.8.36
|
||||
- jazz-react@0.8.36
|
||||
|
||||
## 0.0.113
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3f15a23]
|
||||
- Updated dependencies [9212ab8]
|
||||
- Updated dependencies [46f2ab8]
|
||||
- Updated dependencies [8b87117]
|
||||
- Updated dependencies [a6b6ccf]
|
||||
- cojson@0.8.35
|
||||
- jazz-react@0.8.35
|
||||
- jazz-tools@0.8.35
|
||||
|
||||
## 0.0.112
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [e4f110f]
|
||||
- cojson@0.8.34
|
||||
- jazz-react@0.8.34
|
||||
- jazz-tools@0.8.34
|
||||
|
||||
## 0.0.111
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.33
|
||||
|
||||
## 0.0.110
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -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/
|
||||
@@ -1,32 +1,27 @@
|
||||
# Jazz Chat Example
|
||||
# Chat example with Jazz and React
|
||||
|
||||
Live version: [https://chat.jazz.tools](https://chat.jazz.tools)
|
||||
|
||||
## Installing & running the example locally
|
||||
|
||||
(this requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
|
||||
|
||||
Start by checking out `jazz`
|
||||
(This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
|
||||
|
||||
Start by downloading the [jazz repository](https://github.com/garden-co/jazz):
|
||||
```bash
|
||||
git clone https://github.com/gardencmp/jazz.git
|
||||
cd jazz/examples/chat
|
||||
pnpm pack --pack-destination /tmp
|
||||
mkdir -p ~/jazz-examples/chat # or any other directory
|
||||
tar -xf /tmp/jazz-example-chat-* --strip-components 1 -C ~/jazz-examples/chat
|
||||
cd ~/jazz-examples/chat
|
||||
npx degit gardencmp/jazz jazz
|
||||
```
|
||||
|
||||
This ensures that you have the example app without git history and independent of the Jazz multi-package monorepo.
|
||||
|
||||
Install dependencies:
|
||||
|
||||
Go to the chat example directory:
|
||||
```bash
|
||||
pnpm install
|
||||
cd jazz/examples/chat
|
||||
```
|
||||
|
||||
Install and build dependencies:
|
||||
```bash
|
||||
pnpm i && npx turbo build
|
||||
```
|
||||
|
||||
Start the dev server:
|
||||
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
@@ -39,4 +34,4 @@ If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or
|
||||
|
||||
By default, the example app uses [Jazz Cloud](https://jazz.tools/cloud) (`wss://cloud.jazz.tools`) - so cross-device use, invites and collaboration should just work.
|
||||
|
||||
You can also run a local sync server by running `npx jazz-run sync` and adding the query param `?sync=ws://localhost:4200` to the URL of the example app (for example: `http://localhost:5173/?peer=ws://localhost:4200`), or by setting the `sync` parameter of the `<Jazz.Provider>` provider component in [./src/2_main.tsx](./src/2_main.tsx).
|
||||
You can also run a local sync server by running `npx jazz-run sync` and adding the query param `?sync=ws://localhost:4200` to the URL of the example app (for example: `http://localhost:5173/?peer=ws://localhost:4200`), or by setting the `sync` parameter of the `<Jazz.Provider>` provider component in [./src/main.tsx](./src/main.tsx).
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Jazz Chat Example</title>
|
||||
</head>
|
||||
<body class="h-full">
|
||||
<body class="h-full bg-white text-stone-700 dark:text-stone-400 dark:bg-stone-925">
|
||||
<div id="root" class="h-full"></div>
|
||||
<script type="module" src="/src/app.tsx"></script>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-chat",
|
||||
"private": true,
|
||||
"version": "0.0.110",
|
||||
"version": "0.0.121",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -13,37 +13,25 @@
|
||||
"test:ui": "playwright test --ui"
|
||||
},
|
||||
"dependencies": {
|
||||
"@radix-ui/react-checkbox": "^1.0.4",
|
||||
"@radix-ui/react-slot": "^1.0.2",
|
||||
"@radix-ui/react-toast": "^1.1.4",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.0.0",
|
||||
"cojson": "workspace:0.8.32",
|
||||
"hash-slash": "workspace:0.2.1",
|
||||
"jazz-react": "workspace:0.8.32",
|
||||
"jazz-tools": "workspace:0.8.32",
|
||||
"hash-slash": "workspace:*",
|
||||
"jazz-browser-media-images": "workspace:*",
|
||||
"jazz-react": "workspace:*",
|
||||
"jazz-tools": "workspace:*",
|
||||
"lucide-react": "^0.274.0",
|
||||
"qrcode": "^1.5.3",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-router": "^6.16.0",
|
||||
"react-router-dom": "^6.16.0",
|
||||
"react-use": "^17.4.0",
|
||||
"tailwind-merge": "^1.14.0",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"uniqolor": "^1.1.0"
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.46.1",
|
||||
"@types/qrcode": "^1.5.1",
|
||||
"@types/react": "^18.2.19",
|
||||
"@types/react-dom": "^18.2.7",
|
||||
"@types/react": "^18.3.12",
|
||||
"@types/react-dom": "^18.3.1",
|
||||
"@vitejs/plugin-react-swc": "^3.3.2",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"is-ci": "^3.0.1",
|
||||
"postcss": "^8.4.27",
|
||||
"tailwindcss": "3.3.2",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^5.0.10"
|
||||
"tailwindcss": "^3.4.15",
|
||||
"typescript": "~5.6.2",
|
||||
"vite": "^5.4.10"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ export function App() {
|
||||
router.navigate("/#/chat/" + chat.id);
|
||||
|
||||
// for https://jazz.tools marketing site demo only
|
||||
onChatLoad(chat, me);
|
||||
onChatLoad(chat);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,21 +1,54 @@
|
||||
import { createImage } from "jazz-browser-media-images";
|
||||
import { ID } from "jazz-tools";
|
||||
import { useState } from "react";
|
||||
import { useCoState } from "./main.tsx";
|
||||
import { useAccount, useCoState } from "./main.tsx";
|
||||
import { Chat, Message } from "./schema.ts";
|
||||
import {
|
||||
BubbleBody,
|
||||
BubbleContainer,
|
||||
BubbleImage,
|
||||
BubbleInfo,
|
||||
BubbleText,
|
||||
ChatBody,
|
||||
ChatInput,
|
||||
EmptyChatMessage,
|
||||
ImageInput,
|
||||
InputBar,
|
||||
TextInput,
|
||||
} from "./ui.tsx";
|
||||
|
||||
export function ChatScreen(props: { chatID: ID<Chat> }) {
|
||||
const chat = useCoState(Chat, props.chatID, [{}]);
|
||||
const { me } = useAccount();
|
||||
const [showNLastMessages, setShowNLastMessages] = useState(30);
|
||||
|
||||
return chat ? (
|
||||
if (!chat)
|
||||
return (
|
||||
<div className="flex-1 flex justify-center items-center">Loading...</div>
|
||||
);
|
||||
|
||||
const sendImage = (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||
if (!me?.profile) return;
|
||||
|
||||
const file = event.currentTarget.files?.[0];
|
||||
|
||||
if (!file) return;
|
||||
|
||||
if (file.size > 5000000) {
|
||||
alert("Please upload an image less than 5MB.");
|
||||
return;
|
||||
}
|
||||
|
||||
createImage(file, { owner: chat._owner }).then((image) => {
|
||||
chat.push(
|
||||
Message.create(
|
||||
{ text: file.name, image: image },
|
||||
{ owner: chat._owner },
|
||||
),
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<ChatBody>
|
||||
{chat.length > 0 ? (
|
||||
@@ -35,24 +68,31 @@ export function ChatScreen(props: { chatID: ID<Chat> }) {
|
||||
</button>
|
||||
)}
|
||||
</ChatBody>
|
||||
<ChatInput
|
||||
onSubmit={(text) => {
|
||||
chat.push(Message.create({ text }, { owner: chat._owner }));
|
||||
}}
|
||||
/>
|
||||
|
||||
<InputBar>
|
||||
<ImageInput onImageChange={sendImage} />
|
||||
|
||||
<TextInput
|
||||
onSubmit={(text) => {
|
||||
chat.push(Message.create({ text }, { owner: chat._owner }));
|
||||
}}
|
||||
/>
|
||||
</InputBar>
|
||||
</>
|
||||
) : (
|
||||
<div className="flex-1 flex justify-center items-center">Loading...</div>
|
||||
);
|
||||
}
|
||||
|
||||
function ChatBubble(props: { msg: Message }) {
|
||||
const lastEdit = props.msg._edits.text;
|
||||
const fromMe = lastEdit.by?.isMe;
|
||||
const { text, image } = props.msg;
|
||||
|
||||
return (
|
||||
<BubbleContainer fromMe={fromMe}>
|
||||
<BubbleBody fromMe={fromMe}>{props.msg.text}</BubbleBody>
|
||||
<BubbleBody fromMe={fromMe}>
|
||||
{image && <BubbleImage image={image} />}
|
||||
<BubbleText text={text} />
|
||||
</BubbleBody>
|
||||
<BubbleInfo by={lastEdit.by?.profile?.name} madeAt={lastEdit.madeAt} />
|
||||
</BubbleContainer>
|
||||
);
|
||||
|
||||
@@ -1,78 +1,3 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
@layer base {
|
||||
:root {
|
||||
--background: 0 0% 100%;
|
||||
--foreground: 20 14.3% 4.1%;
|
||||
|
||||
--card: 0 0% 100%;
|
||||
--card-foreground: 20 14.3% 4.1%;
|
||||
|
||||
--popover: 0 0% 100%;
|
||||
--popover-foreground: 20 14.3% 4.1%;
|
||||
|
||||
--primary: 24 9.8% 10%;
|
||||
--primary-foreground: 60 9.1% 97.8%;
|
||||
|
||||
--secondary: 60 4.8% 95.9%;
|
||||
--secondary-foreground: 24 9.8% 10%;
|
||||
|
||||
--muted: 60 4.8% 95.9%;
|
||||
--muted-foreground: 25 5.3% 44.7%;
|
||||
|
||||
--accent: 60 4.8% 95.9%;
|
||||
--accent-foreground: 24 9.8% 10%;
|
||||
|
||||
--destructive: 0 84.2% 60.2%;
|
||||
--destructive-foreground: 60 9.1% 97.8%;
|
||||
|
||||
--border: 20 5.9% 90%;
|
||||
--input: 20 5.9% 90%;
|
||||
--ring: 20 14.3% 4.1%;
|
||||
|
||||
--radius: 0.5rem;
|
||||
}
|
||||
|
||||
.dark {
|
||||
--background: 20 14.3% 4.1%;
|
||||
--foreground: 60 9.1% 97.8%;
|
||||
|
||||
--card: 20 14.3% 4.1%;
|
||||
--card-foreground: 60 9.1% 97.8%;
|
||||
|
||||
--popover: 20 14.3% 4.1%;
|
||||
--popover-foreground: 60 9.1% 97.8%;
|
||||
|
||||
--primary: 60 9.1% 97.8%;
|
||||
--primary-foreground: 24 9.8% 10%;
|
||||
|
||||
--secondary: 12 6.5% 15.1%;
|
||||
--secondary-foreground: 60 9.1% 97.8%;
|
||||
|
||||
--muted: 12 6.5% 15.1%;
|
||||
--muted-foreground: 24 5.4% 63.9%;
|
||||
|
||||
--accent: 12 6.5% 15.1%;
|
||||
--accent-foreground: 60 9.1% 97.8%;
|
||||
|
||||
--destructive: 0 62.8% 30.6%;
|
||||
--destructive-foreground: 60 9.1% 97.8%;
|
||||
|
||||
--border: 12 6.5% 15.1%;
|
||||
--input: 12 6.5% 15.1%;
|
||||
--ring: 24 5.7% 82.9%;
|
||||
}
|
||||
}
|
||||
|
||||
@layer base {
|
||||
* {
|
||||
@apply border-border;
|
||||
}
|
||||
body {
|
||||
@apply bg-background text-foreground;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { ThemeProvider } from "@/themeProvider.tsx";
|
||||
import { DemoAuthBasicUI, createJazzReactApp, useDemoAuth } from "jazz-react";
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
@@ -13,7 +14,7 @@ function JazzAndAuth({ children }: { children: React.ReactNode }) {
|
||||
<>
|
||||
<Jazz.Provider
|
||||
auth={auth}
|
||||
peer="wss://cloud.jazz.tools/?key=chat-example-jazz@gcmp.io"
|
||||
peer="wss://cloud.jazz.tools/?key=chat-example-jazz@garden.co"
|
||||
>
|
||||
{children}
|
||||
</Jazz.Provider>
|
||||
@@ -25,9 +26,11 @@ function JazzAndAuth({ children }: { children: React.ReactNode }) {
|
||||
}
|
||||
|
||||
createRoot(document.getElementById("root")!).render(
|
||||
<StrictMode>
|
||||
<JazzAndAuth>
|
||||
<App />
|
||||
</JazzAndAuth>
|
||||
</StrictMode>,
|
||||
<ThemeProvider>
|
||||
<StrictMode>
|
||||
<JazzAndAuth>
|
||||
<App />
|
||||
</JazzAndAuth>
|
||||
</StrictMode>
|
||||
</ThemeProvider>,
|
||||
);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { CoList, CoMap, co } from "jazz-tools";
|
||||
import { CoList, CoMap, ImageDefinition, co } from "jazz-tools";
|
||||
|
||||
export class Message extends CoMap {
|
||||
text = co.string;
|
||||
image = co.optional.ref(ImageDefinition);
|
||||
}
|
||||
|
||||
export class Chat extends CoList.Of(co.ref(Message)) {}
|
||||
|
||||
72
examples/chat/src/themeProvider.tsx
Normal file
72
examples/chat/src/themeProvider.tsx
Normal file
@@ -0,0 +1,72 @@
|
||||
import { createContext, useContext, useEffect, useState } from "react";
|
||||
|
||||
type ThemeProviderProps = {
|
||||
children: React.ReactNode;
|
||||
defaultTheme?: string;
|
||||
storageKey?: string;
|
||||
};
|
||||
|
||||
type ThemeProviderState = {
|
||||
theme: string;
|
||||
setTheme: (theme: string) => void;
|
||||
};
|
||||
|
||||
const initialState = {
|
||||
theme: "system",
|
||||
setTheme: () => null,
|
||||
};
|
||||
|
||||
const ThemeProviderContext = createContext<ThemeProviderState>(initialState);
|
||||
|
||||
export function ThemeProvider({
|
||||
children,
|
||||
defaultTheme = "system",
|
||||
storageKey = "vite-ui-theme",
|
||||
...props
|
||||
}: ThemeProviderProps) {
|
||||
const [theme, setTheme] = useState(
|
||||
() => localStorage.getItem(storageKey) || defaultTheme,
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
const root = window.document.documentElement;
|
||||
|
||||
root.classList.remove("light", "dark");
|
||||
|
||||
if (theme === "system") {
|
||||
const systemTheme = window.matchMedia("(prefers-color-scheme: dark)")
|
||||
.matches
|
||||
? "dark"
|
||||
: "light";
|
||||
|
||||
root.classList.add(systemTheme);
|
||||
return;
|
||||
}
|
||||
|
||||
root.classList.add(theme);
|
||||
}, [theme]);
|
||||
|
||||
const value = {
|
||||
theme,
|
||||
setTheme: (theme: string) => {
|
||||
localStorage.setItem(storageKey, theme);
|
||||
setTheme(theme);
|
||||
},
|
||||
};
|
||||
|
||||
return (
|
||||
<ThemeProviderContext.Provider {...props} value={value}>
|
||||
{children}
|
||||
</ThemeProviderContext.Provider>
|
||||
);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line react-refresh/only-export-components
|
||||
export const useTheme = () => {
|
||||
const context = useContext(ThemeProviderContext);
|
||||
|
||||
if (context === undefined)
|
||||
throw new Error("useTheme must be used within a ThemeProvider");
|
||||
|
||||
return context;
|
||||
};
|
||||
@@ -1,5 +1,8 @@
|
||||
import clsx from "clsx";
|
||||
import { useId } from "react";
|
||||
import { ProgressiveImg } from "jazz-react";
|
||||
import { ImageDefinition } from "jazz-tools";
|
||||
import { ImageIcon } from "lucide-react";
|
||||
import { useId, useRef } from "react";
|
||||
|
||||
export function AppContainer(props: { children: React.ReactNode }) {
|
||||
return (
|
||||
@@ -56,7 +59,7 @@ export function BubbleBody(props: {
|
||||
<div
|
||||
className={clsx(
|
||||
"line-clamp-10 text-ellipsis whitespace-pre-wrap",
|
||||
"rounded-2xl max-w-full py-1 px-3 shadow-sm",
|
||||
"rounded-2xl overflow-hidden max-w-[calc(100%-5rem)] shadow-sm p-1",
|
||||
props.fromMe
|
||||
? "bg-white dark:bg-stone-700 dark:text-white"
|
||||
: "bg-blue text-white",
|
||||
@@ -67,6 +70,23 @@ export function BubbleBody(props: {
|
||||
);
|
||||
}
|
||||
|
||||
export function BubbleText(props: { text: string }) {
|
||||
return <p className="px-2 leading-relaxed">{props.text}</p>;
|
||||
}
|
||||
|
||||
export function BubbleImage(props: { image: ImageDefinition }) {
|
||||
return (
|
||||
<ProgressiveImg image={props.image}>
|
||||
{({ src }) => (
|
||||
<img
|
||||
className="h-auto max-h-[20rem] max-w-full rounded-t-xl mb-1"
|
||||
src={src}
|
||||
/>
|
||||
)}
|
||||
</ProgressiveImg>
|
||||
);
|
||||
}
|
||||
|
||||
export function BubbleInfo(props: { by: string | undefined; madeAt: Date }) {
|
||||
return (
|
||||
<div className="text-xs text-neutral-500 mt-1.5">
|
||||
@@ -75,17 +95,59 @@ export function BubbleInfo(props: { by: string | undefined; madeAt: Date }) {
|
||||
);
|
||||
}
|
||||
|
||||
export function ChatInput(props: { onSubmit: (text: string) => void }) {
|
||||
export function InputBar(props: { children: React.ReactNode }) {
|
||||
return (
|
||||
<div className="p-3 bg-white border-t shadow-2xl mt-auto flex gap-1 dark:bg-transparent dark:border-stone-800">
|
||||
{props.children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function ImageInput({
|
||||
onImageChange,
|
||||
}: { onImageChange?: (event: React.ChangeEvent<HTMLInputElement>) => void }) {
|
||||
const inputRef = useRef<HTMLInputElement>(null);
|
||||
|
||||
const onUploadClick = () => {
|
||||
inputRef.current?.click();
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<button
|
||||
type="button"
|
||||
aria-label="Send image"
|
||||
title="Send image"
|
||||
onClick={onUploadClick}
|
||||
className="text-stone-500 p-1.5 rounded-full hover:bg-stone-100 hover:text-stone-800 dark:hover:bg-stone-800 dark:hover:text-stone-200 transition-colors"
|
||||
>
|
||||
<ImageIcon size={24} strokeWidth={1.5} />
|
||||
</button>
|
||||
|
||||
<label className="sr-only">
|
||||
Image
|
||||
<input
|
||||
ref={inputRef}
|
||||
type="file"
|
||||
accept="image/png, image/jpeg, image/gif"
|
||||
onChange={onImageChange}
|
||||
/>
|
||||
</label>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export function TextInput(props: { onSubmit: (text: string) => void }) {
|
||||
const inputId = useId();
|
||||
|
||||
return (
|
||||
<div className="p-3 bg-white border-t shadow-2xl mt-auto dark:bg-transparent dark:border-stone-800">
|
||||
<div className="flex-1">
|
||||
<label className="sr-only" htmlFor={inputId}>
|
||||
Type a message and press Enter
|
||||
</label>
|
||||
<input
|
||||
id={inputId}
|
||||
className="rounded-full py-2 px-4 border block w-full dark:bg-black dark:text-white dark:border-stone-700"
|
||||
className="rounded-full py-1 px-3 border block w-full placeholder:text-stone-500 dark:bg-black dark:text-white dark:border-stone-700"
|
||||
placeholder="Type a message and press Enter"
|
||||
maxLength={2048}
|
||||
onKeyDown={({ key, currentTarget: input }) => {
|
||||
|
||||
@@ -2,20 +2,10 @@
|
||||
// This is NOT needed to make the chat work
|
||||
|
||||
import { Chat } from "@/schema.ts";
|
||||
import { Account, CoValue, ID } from "jazz-tools";
|
||||
|
||||
export function waitForUpload(id: ID<CoValue>, me: Account) {
|
||||
const syncManager = me._raw.core.node.syncManager;
|
||||
const peers = syncManager.getPeers();
|
||||
|
||||
return Promise.all(
|
||||
peers.map((peer) => syncManager.waitForUploadIntoPeer(peer.id, id)),
|
||||
);
|
||||
}
|
||||
|
||||
export function onChatLoad(chat: Chat, me: Account) {
|
||||
export function onChatLoad(chat: Chat) {
|
||||
if (window.parent) {
|
||||
waitForUpload(chat.id, me).then(() => {
|
||||
chat.waitForSync().then(() => {
|
||||
window.parent.postMessage(
|
||||
{ type: "chat-load", id: "/chat/" + chat.id },
|
||||
"*",
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: [
|
||||
"./pages/**/*.{ts,tsx}",
|
||||
"./components/**/*.{ts,tsx}",
|
||||
"./app/**/*.{ts,tsx}",
|
||||
"./src/**/*.{ts,tsx}",
|
||||
],
|
||||
theme: {
|
||||
container: {
|
||||
center: true,
|
||||
padding: "2rem",
|
||||
screens: {
|
||||
"2xl": "1400px",
|
||||
},
|
||||
},
|
||||
extend: {
|
||||
colors: {
|
||||
blue: {
|
||||
700: "#3313F7",
|
||||
DEFAULT: "#3313F7",
|
||||
},
|
||||
border: "hsl(var(--border))",
|
||||
input: "hsl(var(--input))",
|
||||
ring: "hsl(var(--ring))",
|
||||
background: "hsl(var(--background))",
|
||||
foreground: "hsl(var(--foreground))",
|
||||
primary: {
|
||||
DEFAULT: "hsl(var(--primary))",
|
||||
foreground: "hsl(var(--primary-foreground))",
|
||||
},
|
||||
secondary: {
|
||||
DEFAULT: "hsl(var(--secondary))",
|
||||
foreground: "hsl(var(--secondary-foreground))",
|
||||
},
|
||||
destructive: {
|
||||
DEFAULT: "hsl(var(--destructive))",
|
||||
foreground: "hsl(var(--destructive-foreground))",
|
||||
},
|
||||
muted: {
|
||||
DEFAULT: "hsl(var(--muted))",
|
||||
foreground: "hsl(var(--muted-foreground))",
|
||||
},
|
||||
accent: {
|
||||
DEFAULT: "hsl(var(--accent))",
|
||||
foreground: "hsl(var(--accent-foreground))",
|
||||
},
|
||||
popover: {
|
||||
DEFAULT: "hsl(var(--popover))",
|
||||
foreground: "hsl(var(--popover-foreground))",
|
||||
},
|
||||
card: {
|
||||
DEFAULT: "hsl(var(--card))",
|
||||
foreground: "hsl(var(--card-foreground))",
|
||||
},
|
||||
},
|
||||
borderRadius: {
|
||||
lg: "var(--radius)",
|
||||
md: "calc(var(--radius) - 2px)",
|
||||
sm: "calc(var(--radius) - 4px)",
|
||||
},
|
||||
keyframes: {
|
||||
"accordion-down": {
|
||||
from: { height: 0 },
|
||||
to: { height: "var(--radix-accordion-content-height)" },
|
||||
},
|
||||
"accordion-up": {
|
||||
from: { height: "var(--radix-accordion-content-height)" },
|
||||
to: { height: 0 },
|
||||
},
|
||||
},
|
||||
animation: {
|
||||
"accordion-down": "accordion-down 0.2s ease-out",
|
||||
"accordion-up": "accordion-up 0.2s ease-out",
|
||||
},
|
||||
lineClamp: {
|
||||
10: "10",
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [require("tailwindcss-animate")],
|
||||
};
|
||||
79
examples/chat/tailwind.config.ts
Normal file
79
examples/chat/tailwind.config.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
import type { Config } from "tailwindcss";
|
||||
import plugin from "tailwindcss/plugin";
|
||||
const colors = require("tailwindcss/colors");
|
||||
|
||||
const stonePalette = {
|
||||
50: "oklch(0.988281 0.002 75)",
|
||||
75: "oklch(0.980563 0.002 75)",
|
||||
100: "oklch(0.964844 0.002 75)",
|
||||
200: "oklch(0.917969 0.002 75)",
|
||||
300: "oklch(0.853516 0.002 75)",
|
||||
400: "oklch(0.789063 0.002 75)",
|
||||
500: "oklch(0.726563 0.002 75)",
|
||||
600: "oklch(0.613281 0.002 75)",
|
||||
700: "oklch(0.523438 0.002 75)",
|
||||
800: "oklch(0.412109 0.002 75)",
|
||||
900: "oklch(0.302734 0.002 75)",
|
||||
925: "oklch(0.220000 0.002 75)",
|
||||
950: "oklch(0.193359 0.002 75)",
|
||||
} as const;
|
||||
|
||||
const stonePaletteWithAlpha = { ...stonePalette };
|
||||
|
||||
Object.keys(stonePalette).forEach((key) => {
|
||||
stonePaletteWithAlpha[key] = stonePaletteWithAlpha[key].replace(
|
||||
")",
|
||||
"/ <alpha-value>)",
|
||||
);
|
||||
});
|
||||
|
||||
const config: Config = {
|
||||
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
stone: stonePaletteWithAlpha,
|
||||
blue: {
|
||||
...colors.indigo,
|
||||
500: "#5870F1",
|
||||
DEFAULT: "#3313F7",
|
||||
},
|
||||
},
|
||||
container: {
|
||||
center: true,
|
||||
padding: {
|
||||
DEFAULT: "0.75rem",
|
||||
sm: "1rem",
|
||||
},
|
||||
screens: {
|
||||
md: "500px",
|
||||
lg: "500px",
|
||||
xl: "500px",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
plugin(({ addBase }) =>
|
||||
addBase({
|
||||
":root": {
|
||||
"--gcmp-border-color": stonePalette[200],
|
||||
"--gcmp-invert-border-color": stonePalette[900],
|
||||
},
|
||||
"*": {
|
||||
borderColor: "var(--gcmp-border-color)",
|
||||
},
|
||||
"@media (prefers-color-scheme: dark)": {
|
||||
"*": {
|
||||
borderColor: "var(--gcmp-invert-border-color)",
|
||||
},
|
||||
},
|
||||
"*:focus": {
|
||||
outline: "none",
|
||||
},
|
||||
}),
|
||||
),
|
||||
],
|
||||
} as const;
|
||||
|
||||
export default config;
|
||||
@@ -38,14 +38,11 @@ test("chat between two users", async ({ page }) => {
|
||||
await chatPage.sendMessage(message2ByLuigi);
|
||||
await chatPage.expectMessageRow(message2ByLuigi);
|
||||
|
||||
// This breaks with (Error: Error reading from peer storage, handling msg)
|
||||
// await chatPage.logout();
|
||||
// await loginPage.loginAs(mario);
|
||||
await chatPage.logout();
|
||||
await loginPage.loginAs(mario);
|
||||
|
||||
// await chatPage.expectLoaded();
|
||||
await page.goto(roomURL);
|
||||
|
||||
// await page.goto(roomURL);
|
||||
|
||||
// await chatPage.expectMessageRow(message1ByMario);
|
||||
// await chatPage.expectMessageRow(message2ByLuigi);
|
||||
await chatPage.expectMessageRow(message1ByMario);
|
||||
await chatPage.expectMessageRow(message2ByLuigi);
|
||||
});
|
||||
|
||||
@@ -25,7 +25,7 @@ export class LoginPage {
|
||||
async loginAs(value: string) {
|
||||
await this.page
|
||||
.getByRole("button", {
|
||||
name: `Log in as "${value}"`,
|
||||
name: value,
|
||||
})
|
||||
.click();
|
||||
}
|
||||
|
||||
8
examples/chat/vercel.json
Normal file
8
examples/chat/vercel.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"build": {
|
||||
"env": {
|
||||
"APP_NAME": "jazz-chat"
|
||||
}
|
||||
},
|
||||
"ignoreCommand": "node ../../ignore-vercel-build.js"
|
||||
}
|
||||
172
examples/clerk/CHANGELOG.md
Normal file
172
examples/clerk/CHANGELOG.md
Normal file
@@ -0,0 +1,172 @@
|
||||
# minimal-auth-clerk
|
||||
|
||||
## 0.0.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [fa41f8e]
|
||||
- Updated dependencies [88d7d9a]
|
||||
- Updated dependencies [60e35ea]
|
||||
- jazz-tools@0.8.45
|
||||
- jazz-react@0.8.45
|
||||
- jazz-react-auth-clerk@0.8.45
|
||||
|
||||
## 0.0.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.44
|
||||
- jazz-react-auth-clerk@0.8.44
|
||||
- jazz-tools@0.8.44
|
||||
|
||||
## 0.0.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.41
|
||||
- jazz-react-auth-clerk@0.8.41
|
||||
- jazz-tools@0.8.41
|
||||
|
||||
## 0.0.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.40
|
||||
- jazz-react-auth-clerk@0.8.40
|
||||
|
||||
## 0.0.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [249eecb]
|
||||
- jazz-tools@0.8.39
|
||||
- jazz-react@0.8.39
|
||||
- jazz-react-auth-clerk@0.8.39
|
||||
|
||||
## 0.0.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.38
|
||||
- jazz-react-auth-clerk@0.8.38
|
||||
- jazz-tools@0.8.38
|
||||
|
||||
## 0.0.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.37
|
||||
- jazz-react-auth-clerk@0.8.37
|
||||
- jazz-tools@0.8.37
|
||||
|
||||
## 0.0.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [441fe27]
|
||||
- jazz-tools@0.8.36
|
||||
- jazz-react@0.8.36
|
||||
- jazz-react-auth-clerk@0.8.36
|
||||
|
||||
## 0.0.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [9212ab8]
|
||||
- Updated dependencies [8b87117]
|
||||
- jazz-react@0.8.35
|
||||
- jazz-tools@0.8.35
|
||||
- jazz-react-auth-clerk@0.8.35
|
||||
|
||||
## 0.0.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 9ca25d1: Rename passkey and clerk examples
|
||||
- Updated dependencies [9ca25d1]
|
||||
- jazz-react-auth-clerk@0.8.34
|
||||
- jazz-react@0.8.34
|
||||
- jazz-tools@0.8.34
|
||||
|
||||
## 0.0.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.33
|
||||
- jazz-react-auth-clerk@0.8.33
|
||||
|
||||
## 0.0.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1a4bda0]
|
||||
- Updated dependencies [df42b2b]
|
||||
- jazz-react-auth-clerk@0.8.32
|
||||
- jazz-tools@0.8.32
|
||||
- jazz-react@0.8.32
|
||||
|
||||
## 0.0.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.31
|
||||
- jazz-react-auth-clerk@0.8.31
|
||||
- jazz-tools@0.8.31
|
||||
|
||||
## 0.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.30
|
||||
- jazz-react-auth-clerk@0.8.30
|
||||
- jazz-tools@0.8.30
|
||||
|
||||
## 0.0.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.29
|
||||
- jazz-react-auth-clerk@0.8.29
|
||||
- jazz-tools@0.8.29
|
||||
|
||||
## 0.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.28
|
||||
- jazz-react-auth-clerk@0.8.28
|
||||
- jazz-tools@0.8.28
|
||||
|
||||
## 0.0.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.27
|
||||
- jazz-react-auth-clerk@0.8.27
|
||||
- jazz-tools@0.8.27
|
||||
|
||||
## 0.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [59d37df]
|
||||
- jazz-react@0.8.26
|
||||
- jazz-react-auth-clerk@0.8.26
|
||||
|
||||
## 0.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.24
|
||||
- jazz-react-auth-clerk@0.8.24
|
||||
|
||||
## 0.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d348c2d]
|
||||
- Updated dependencies [6902b5b]
|
||||
- Updated dependencies [1a0cd3d]
|
||||
- jazz-tools@0.8.23
|
||||
- jazz-react@0.8.23
|
||||
- jazz-react-auth-clerk@0.8.23
|
||||
34
examples/clerk/README.md
Normal file
34
examples/clerk/README.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# Clerk authentication example with Jazz and React
|
||||
|
||||
This is an example of how to use clerk authentication with Jazz.
|
||||
|
||||
Live version: https://clerk-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 downloading the [jazz repository](https://github.com/garden-co/jazz):
|
||||
```bash
|
||||
npx degit gardencmp/jazz jazz
|
||||
```
|
||||
|
||||
Go to the clerk example directory:
|
||||
```bash
|
||||
cd jazz/examples/clerk
|
||||
```
|
||||
|
||||
Install and build dependencies:
|
||||
```bash
|
||||
pnpm i && npx turbo build
|
||||
```
|
||||
|
||||
Start the dev server:
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
## Questions / problems / feedback
|
||||
|
||||
If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or open an issue or PR to fix something that seems wrong.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "minimal-auth-clerk",
|
||||
"name": "clerk",
|
||||
"private": true,
|
||||
"version": "0.0.9",
|
||||
"version": "0.0.20",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -12,9 +12,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@clerk/clerk-react": "^5.4.1",
|
||||
"jazz-tools": "workspace:*",
|
||||
"jazz-react": "workspace:*",
|
||||
"jazz-react-auth-clerk": "workspace:0.8.32",
|
||||
"jazz-react-auth-clerk": "workspace:0.8.45",
|
||||
"jazz-tools": "workspace:*",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1"
|
||||
},
|
||||
@@ -1,15 +1,14 @@
|
||||
import "./App.css";
|
||||
import { useAccount } from "./main";
|
||||
|
||||
function App() {
|
||||
const { me, logOut } = useAccount();
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="container">
|
||||
<h1>You're logged in</h1>
|
||||
<p>Welcome back, {me?.profile?.name}</p>
|
||||
<button onClick={() => logOut()}>Logout</button>
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -30,6 +30,10 @@ body {
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
#root {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 3.2em;
|
||||
line-height: 1.1;
|
||||
@@ -37,21 +41,11 @@ h1 {
|
||||
|
||||
button {
|
||||
border-radius: 8px;
|
||||
border: 1px solid transparent;
|
||||
border: 0;
|
||||
padding: 0.6em 1.2em;
|
||||
font-size: 1em;
|
||||
font-weight: 500;
|
||||
font-family: inherit;
|
||||
background-color: #1a1a1a;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.25s;
|
||||
}
|
||||
button:hover {
|
||||
border-color: #646cff;
|
||||
}
|
||||
button:focus,
|
||||
button:focus-visible {
|
||||
outline: 4px auto -webkit-focus-ring-color;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
@@ -66,3 +60,13 @@ button:focus-visible {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 200px;
|
||||
margin: 0 auto;
|
||||
padding: 0 1rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
}
|
||||
@@ -21,21 +21,21 @@ function JazzAndAuth({ children }: { children: React.ReactNode }) {
|
||||
const [auth, state] = useJazzClerkAuth(clerk);
|
||||
|
||||
return (
|
||||
<>
|
||||
<main className="container">
|
||||
{state?.errors?.map((error) => (
|
||||
<div key={error}>{error}</div>
|
||||
))}
|
||||
{clerk.user && auth ? (
|
||||
<Jazz.Provider
|
||||
auth={auth}
|
||||
peer="wss://cloud.jazz.tools/?key=minimal-auth-clerk-example@gcmp.io"
|
||||
peer="wss://cloud.jazz.tools/?key=minimal-auth-clerk-example@garden.co"
|
||||
>
|
||||
{children}
|
||||
</Jazz.Provider>
|
||||
) : (
|
||||
<SignInButton />
|
||||
)}
|
||||
</>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
8
examples/clerk/vercel.json
Normal file
8
examples/clerk/vercel.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"build": {
|
||||
"env": {
|
||||
"APP_NAME": "clerk-demo"
|
||||
}
|
||||
},
|
||||
"ignoreCommand": "node ../../ignore-vercel-build.js"
|
||||
}
|
||||
23
examples/file-share-svelte/.gitignore
vendored
Normal file
23
examples/file-share-svelte/.gitignore
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
node_modules
|
||||
|
||||
# Output
|
||||
.output
|
||||
.vercel
|
||||
/.svelte-kit
|
||||
/build
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Env
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
!.env.test
|
||||
|
||||
# Vite
|
||||
vite.config.js.timestamp-*
|
||||
vite.config.ts.timestamp-*
|
||||
|
||||
playwright-report
|
||||
1
examples/file-share-svelte/.npmrc
Normal file
1
examples/file-share-svelte/.npmrc
Normal file
@@ -0,0 +1 @@
|
||||
engine-strict=true
|
||||
4
examples/file-share-svelte/.prettierignore
Normal file
4
examples/file-share-svelte/.prettierignore
Normal file
@@ -0,0 +1,4 @@
|
||||
# Package Managers
|
||||
package-lock.json
|
||||
pnpm-lock.yaml
|
||||
yarn.lock
|
||||
16
examples/file-share-svelte/.prettierrc
Normal file
16
examples/file-share-svelte/.prettierrc
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"useTabs": false,
|
||||
"tabWidth": 2,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "none",
|
||||
"printWidth": 100,
|
||||
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": "*.svelte",
|
||||
"options": {
|
||||
"parser": "svelte"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
40
examples/file-share-svelte/CHANGELOG.md
Normal file
40
examples/file-share-svelte/CHANGELOG.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# file-share-svelte
|
||||
|
||||
## 0.0.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [fa41f8e]
|
||||
- Updated dependencies [88d7d9a]
|
||||
- Updated dependencies [60e35ea]
|
||||
- jazz-tools@0.8.45
|
||||
- jazz-svelte@0.8.45
|
||||
|
||||
## 0.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-tools@0.8.44
|
||||
- jazz-svelte@0.8.44
|
||||
|
||||
## 0.0.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-tools@0.8.41
|
||||
- jazz-svelte@0.8.41
|
||||
|
||||
## 0.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.8.40
|
||||
|
||||
## 0.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [249eecb]
|
||||
- Updated dependencies [aa21072]
|
||||
- jazz-tools@0.8.39
|
||||
- jazz-svelte@0.8.39
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user