Compare commits
190 Commits
jazz-react
...
jazz-react
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbbd773c3f | ||
|
|
7d5f4e5881 | ||
|
|
29c44538dc | ||
|
|
198f995b21 | ||
|
|
1be017d69d | ||
|
|
5574be699b | ||
|
|
b3142cb8ed | ||
|
|
cb08d9d1a3 | ||
|
|
4d01cbae03 | ||
|
|
13f6389559 | ||
|
|
f6ea9bcc50 | ||
|
|
f6f2766eac | ||
|
|
f8f63bface | ||
|
|
5ec561fec4 | ||
|
|
277787cbd2 | ||
|
|
dda4336721 | ||
|
|
064d19b48c | ||
|
|
3ea269f4d8 | ||
|
|
c4b8befe27 | ||
|
|
06f667ef2a | ||
|
|
bac3cc7bf8 | ||
|
|
6ad0a9f886 | ||
|
|
9b12932b66 | ||
|
|
82bb0d51d9 | ||
|
|
39dede92e8 | ||
|
|
84f4e6e48d | ||
|
|
e629dea585 | ||
|
|
2faf22ffff | ||
|
|
2273505a13 | ||
|
|
19eb29d831 | ||
|
|
738c4c2bd7 | ||
|
|
64e2273475 | ||
|
|
5a85c89154 | ||
|
|
8898b10e89 | ||
|
|
dc2d4e25f7 | ||
|
|
9275c4f6c0 | ||
|
|
ac3c2df474 | ||
|
|
681f973d4b | ||
|
|
338be7622f | ||
|
|
1227047b03 | ||
|
|
9afde8d0be | ||
|
|
c2ca1feba0 | ||
|
|
98c265304a | ||
|
|
675e3e8046 | ||
|
|
4acba8c990 | ||
|
|
a93adeb1fe | ||
|
|
cf8773f3de | ||
|
|
3be94ae1e7 | ||
|
|
6a8aa06d18 | ||
|
|
dc17889209 | ||
|
|
4dab70eea3 | ||
|
|
55f9d8e120 | ||
|
|
15b9457ed8 | ||
|
|
898297e95c | ||
|
|
0fc4f24cd5 | ||
|
|
63b5ad9edf | ||
|
|
873c3264ca | ||
|
|
34f89e48aa | ||
|
|
b01cc1fe9d | ||
|
|
68e9c85d8f | ||
|
|
1b124ff5c7 | ||
|
|
ab2645765d | ||
|
|
2dec852ce2 | ||
|
|
8cb09379f4 | ||
|
|
9fb2e61e01 | ||
|
|
24b3b6afc1 | ||
|
|
c2eed7e2c4 | ||
|
|
f97ef696e3 | ||
|
|
ad65cb8ab5 | ||
|
|
8d8131410a | ||
|
|
7491711b72 | ||
|
|
5933aa59c1 | ||
|
|
da96bec465 | ||
|
|
483422c0e9 | ||
|
|
3df93cc147 | ||
|
|
d686edfa6c | ||
|
|
497b0ade1f | ||
|
|
794927cac3 | ||
|
|
86acbcd0d6 | ||
|
|
9111c85445 | ||
|
|
1d87879787 | ||
|
|
7c777f2bdf | ||
|
|
aa8067b8d0 | ||
|
|
bd66cdeb78 | ||
|
|
8d29e50669 | ||
|
|
5a7398d242 | ||
|
|
74b984fbe6 | ||
|
|
f8e00204b4 | ||
|
|
76543df765 | ||
|
|
15d4b2a5f7 | ||
|
|
2e67f91fe0 | ||
|
|
0eb21a3471 | ||
|
|
99e88d3497 | ||
|
|
f09ce70d3c | ||
|
|
7d62e2735f | ||
|
|
5863badbb0 | ||
|
|
56d26222e7 | ||
|
|
bd34084104 | ||
|
|
f5e6fe927d | ||
|
|
93c49639c2 | ||
|
|
aabe7bef34 | ||
|
|
909165d813 | ||
|
|
6bee742b65 | ||
|
|
23486d01b9 | ||
|
|
b761d5a730 | ||
|
|
9181e74fc8 | ||
|
|
5e83864f41 | ||
|
|
789cf66de2 | ||
|
|
de5f2d6d5b | ||
|
|
4aa377dea7 | ||
|
|
efbf3d84ac | ||
|
|
b90393b43e | ||
|
|
31ae73fe0e | ||
|
|
7a5adfc4dc | ||
|
|
850e264912 | ||
|
|
aa81779ad8 | ||
|
|
72c97c0835 | ||
|
|
12809a6733 | ||
|
|
c55aeff98e | ||
|
|
16b76e401c | ||
|
|
d2470efd6f | ||
|
|
1a97b1b77c | ||
|
|
adde5b78f3 | ||
|
|
06fd3a3686 | ||
|
|
d231b6ae2a | ||
|
|
f76274c19a | ||
|
|
e471fc5d23 | ||
|
|
cb1b602255 | ||
|
|
a728dbf632 | ||
|
|
84d06d180a | ||
|
|
342e4d9f5e | ||
|
|
8eb92471ae | ||
|
|
0cfc32f591 | ||
|
|
e8b1e07625 | ||
|
|
f97946bd21 | ||
|
|
f7f461db31 | ||
|
|
653d09c337 | ||
|
|
3fa5ac30ff | ||
|
|
4095041da9 | ||
|
|
c1c2f39cb5 | ||
|
|
e5b93871f7 | ||
|
|
896aeb571d | ||
|
|
f7f1a0aff0 | ||
|
|
3bc82dc382 | ||
|
|
99bac77ae7 | ||
|
|
5705ebdcad | ||
|
|
f3fb445c9e | ||
|
|
c60fe8aae2 | ||
|
|
d2a882e531 | ||
|
|
036fa1f43b | ||
|
|
839b4af45c | ||
|
|
3a9797ce75 | ||
|
|
b2f14c0339 | ||
|
|
5d9405ccc3 | ||
|
|
d54db4358c | ||
|
|
a172f61494 | ||
|
|
2d7b4b6c82 | ||
|
|
68369c16da | ||
|
|
f002110c28 | ||
|
|
c25a1af96e | ||
|
|
70667d06a1 | ||
|
|
fc934157f6 | ||
|
|
0bbded1772 | ||
|
|
d1d773bc9c | ||
|
|
466c5f695a | ||
|
|
b6a70228ea | ||
|
|
ac32c432da | ||
|
|
066ac6bf98 | ||
|
|
ccfa7d9943 | ||
|
|
90c76a01a6 | ||
|
|
807b52cccf | ||
|
|
fb7c6c6bbf | ||
|
|
12e619b990 | ||
|
|
aba2f8110c | ||
|
|
862e3fc7ed | ||
|
|
51fc92759a | ||
|
|
c8fac3381d | ||
|
|
9723090f91 | ||
|
|
4783e08c69 | ||
|
|
34959ff0ec | ||
|
|
bec9be84d5 | ||
|
|
277ee9d7e4 | ||
|
|
314518a87f | ||
|
|
c280fa11c3 | ||
|
|
929f5785a8 | ||
|
|
9ae92c19ab | ||
|
|
599bb7355e | ||
|
|
ad76a2f44f | ||
|
|
3a3ad44f13 | ||
|
|
db01bfb0a8 |
@@ -1,5 +1,143 @@
|
||||
# chat-rn-clerk
|
||||
|
||||
## 1.0.62
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1be017d]
|
||||
- jazz-tools@0.9.21
|
||||
- jazz-react-native@0.9.21
|
||||
- jazz-react-native-auth-clerk@0.9.21
|
||||
- jazz-react-native-media-images@0.9.21
|
||||
|
||||
## 1.0.61
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b01cc1f]
|
||||
- jazz-tools@0.9.20
|
||||
- jazz-react-native@0.9.20
|
||||
- jazz-react-native-auth-clerk@0.9.20
|
||||
- jazz-react-native-media-images@0.9.20
|
||||
|
||||
## 1.0.60
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.9.19
|
||||
- jazz-react-native-auth-clerk@0.9.19
|
||||
- jazz-tools@0.9.19
|
||||
- jazz-react-native-media-images@0.9.19
|
||||
|
||||
## 1.0.59
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.9.18
|
||||
- jazz-react-native-auth-clerk@0.9.18
|
||||
- jazz-tools@0.9.18
|
||||
- jazz-react-native-media-images@0.9.18
|
||||
|
||||
## 1.0.58
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2ca1fe]
|
||||
- Updated dependencies [1227047]
|
||||
- jazz-tools@0.9.17
|
||||
- jazz-react-native@0.9.17
|
||||
- jazz-react-native-auth-clerk@0.9.17
|
||||
- jazz-react-native-media-images@0.9.17
|
||||
|
||||
## 1.0.57
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [24b3b6a]
|
||||
- jazz-react-native-auth-clerk@0.9.16
|
||||
- jazz-tools@0.9.16
|
||||
- jazz-react-native@0.9.16
|
||||
- jazz-react-native-media-images@0.9.16
|
||||
|
||||
## 1.0.56
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7491711]
|
||||
- jazz-tools@0.9.15
|
||||
- jazz-react-native@0.9.15
|
||||
- jazz-react-native-auth-clerk@0.9.15
|
||||
- jazz-react-native-media-images@0.9.15
|
||||
|
||||
## 1.0.55
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3df93cc]
|
||||
- jazz-tools@0.9.14
|
||||
- jazz-react-native@0.9.14
|
||||
- jazz-react-native-auth-clerk@0.9.14
|
||||
- jazz-react-native-media-images@0.9.14
|
||||
|
||||
## 1.0.54
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.9.13
|
||||
- jazz-react-native-auth-clerk@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
- jazz-react-native-media-images@0.9.13
|
||||
|
||||
## 1.0.53
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.9.12
|
||||
- jazz-react-native-auth-clerk@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
- jazz-react-native-media-images@0.9.12
|
||||
|
||||
## 1.0.52
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.9.11
|
||||
- jazz-react-native-auth-clerk@0.9.11
|
||||
- jazz-tools@0.9.11
|
||||
- jazz-react-native-media-images@0.9.11
|
||||
|
||||
## 1.0.51
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- f76274c: Fix image handling in react-native
|
||||
- Updated dependencies [f76274c]
|
||||
- Updated dependencies [5e83864]
|
||||
- jazz-react-native@0.9.10
|
||||
- jazz-tools@0.9.10
|
||||
- jazz-react-native-auth-clerk@0.9.10
|
||||
- jazz-react-native-media-images@0.9.10
|
||||
|
||||
## 1.0.50
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- jazz-tools@0.9.9
|
||||
- jazz-react-native@0.9.9
|
||||
- jazz-react-native-auth-clerk@0.9.9
|
||||
- jazz-react-native-media-images@0.9.9
|
||||
|
||||
## 1.0.49
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d1d773b]
|
||||
- jazz-tools@0.9.8
|
||||
- jazz-react-native@0.9.8
|
||||
- jazz-react-native-auth-clerk@0.9.8
|
||||
- jazz-react-native-media-images@0.9.8
|
||||
|
||||
## 1.0.48
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -37,7 +37,13 @@
|
||||
],
|
||||
"expo-secure-store",
|
||||
"expo-font",
|
||||
"expo-router"
|
||||
"expo-router",
|
||||
[
|
||||
"expo-image-picker",
|
||||
{
|
||||
"photosPermission": "The app accesses your photos to let you share them with your friends."
|
||||
}
|
||||
]
|
||||
],
|
||||
"extra": {
|
||||
"eas": {
|
||||
|
||||
@@ -2,8 +2,11 @@ import { Chat, Message } from "@/src/schema";
|
||||
import { useNavigation } from "@react-navigation/native";
|
||||
import clsx from "clsx";
|
||||
import * as Clipboard from "expo-clipboard";
|
||||
import * as ImagePicker from "expo-image-picker";
|
||||
import { useLocalSearchParams } from "expo-router";
|
||||
import { useAccount, useCoState } from "jazz-react-native";
|
||||
import { ProgressiveImg } from "jazz-react-native";
|
||||
import { createImage } from "jazz-react-native-media-images";
|
||||
import { Group, ID } from "jazz-tools";
|
||||
import { useEffect, useLayoutEffect, useState } from "react";
|
||||
import React, {
|
||||
@@ -16,6 +19,8 @@ import React, {
|
||||
KeyboardAvoidingView,
|
||||
TextInput,
|
||||
Button,
|
||||
Image,
|
||||
ActivityIndicator,
|
||||
} from "react-native";
|
||||
|
||||
export default function Conversation() {
|
||||
@@ -25,6 +30,7 @@ export default function Conversation() {
|
||||
const [message, setMessage] = useState("");
|
||||
const loadedChat = useCoState(Chat, chat?.id, [{}]);
|
||||
const navigation = useNavigation();
|
||||
const [isUploading, setIsUploading] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (chat) return;
|
||||
@@ -81,6 +87,32 @@ export default function Conversation() {
|
||||
}
|
||||
};
|
||||
|
||||
const handleImageUpload = async () => {
|
||||
try {
|
||||
const result = await ImagePicker.launchImageLibraryAsync({
|
||||
mediaTypes: ImagePicker.MediaTypeOptions.Images,
|
||||
base64: true,
|
||||
quality: 0.7,
|
||||
});
|
||||
|
||||
if (!result.canceled && result.assets[0].base64 && chat) {
|
||||
setIsUploading(true);
|
||||
const base64Uri = `data:image/jpeg;base64,${result.assets[0].base64}`;
|
||||
|
||||
const image = await createImage(base64Uri, {
|
||||
owner: chat._owner,
|
||||
maxSize: 2048,
|
||||
});
|
||||
|
||||
chat.push(Message.create({ text: "", image }, { owner: chat._owner }));
|
||||
}
|
||||
} catch (error) {
|
||||
Alert.alert("Error", "Failed to upload image");
|
||||
} finally {
|
||||
setIsUploading(false);
|
||||
}
|
||||
};
|
||||
|
||||
const renderMessageItem = ({ item }: { item: Message }) => {
|
||||
const isMe = item._edits.text.by?.isMe;
|
||||
return (
|
||||
@@ -106,14 +138,27 @@ export default function Conversation() {
|
||||
isMe ? "flex-row" : "flex-row",
|
||||
)}
|
||||
>
|
||||
<Text
|
||||
className={clsx(
|
||||
!isMe ? "text-black" : "text-gray-200",
|
||||
`text-md max-w-[85%]`,
|
||||
)}
|
||||
>
|
||||
{item.text}
|
||||
</Text>
|
||||
{item.image && (
|
||||
<ProgressiveImg image={item.image} maxWidth={1024}>
|
||||
{({ src, res, originalSize }) => (
|
||||
<Image
|
||||
source={{ uri: src }}
|
||||
className="w-48 h-48 rounded-lg mb-2"
|
||||
resizeMode="cover"
|
||||
/>
|
||||
)}
|
||||
</ProgressiveImg>
|
||||
)}
|
||||
{item.text && (
|
||||
<Text
|
||||
className={clsx(
|
||||
!isMe ? "text-black" : "text-gray-200",
|
||||
`text-md max-w-[85%]`,
|
||||
)}
|
||||
>
|
||||
{item.text}
|
||||
</Text>
|
||||
)}
|
||||
<Text
|
||||
className={clsx(
|
||||
"text-[10px] text-right ml-2",
|
||||
@@ -147,6 +192,17 @@ export default function Conversation() {
|
||||
className="p-3 bg-white border-t border-gray-300"
|
||||
>
|
||||
<SafeAreaView className="flex-row items-center gap-2">
|
||||
<TouchableOpacity
|
||||
onPress={handleImageUpload}
|
||||
disabled={isUploading}
|
||||
className="h-10 w-10 items-center justify-center"
|
||||
>
|
||||
{isUploading ? (
|
||||
<ActivityIndicator size="small" color="#0000ff" />
|
||||
) : (
|
||||
<Text className="text-2xl">🖼️</Text>
|
||||
)}
|
||||
</TouchableOpacity>
|
||||
<TextInput
|
||||
className="flex-1 rounded-full h-10 px-4 bg-gray-100 border border-gray-300 focus:border-blue-500 focus:bg-white"
|
||||
value={message}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "chat-rn-clerk",
|
||||
"main": "index.js",
|
||||
"version": "1.0.48",
|
||||
"version": "1.0.62",
|
||||
"scripts": {
|
||||
"build": "expo export -p ios",
|
||||
"start": "expo start",
|
||||
@@ -35,6 +35,7 @@
|
||||
"expo-dev-client": "~5.0.5",
|
||||
"expo-file-system": "^18.0.4",
|
||||
"expo-font": "~13.0.1",
|
||||
"expo-image-picker": "~16.0.4",
|
||||
"expo-linking": "~7.0.3",
|
||||
"expo-router": "~4.0.11",
|
||||
"expo-secure-store": "~14.0.0",
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
import { useClerk, useUser } from "@clerk/clerk-expo";
|
||||
import { JazzProvider, setupKvStore } from "jazz-react-native";
|
||||
import { useJazzClerkAuth } from "jazz-react-native-auth-clerk";
|
||||
import React, {
|
||||
createContext,
|
||||
PropsWithChildren,
|
||||
useContext,
|
||||
useEffect,
|
||||
useState,
|
||||
} from "react";
|
||||
import React, { createContext, PropsWithChildren, useContext } from "react";
|
||||
import { Text, View } from "react-native";
|
||||
const AuthContext = createContext<{
|
||||
isAuthenticated: boolean;
|
||||
@@ -27,15 +21,7 @@ export function JazzAndAuth({ children }: PropsWithChildren) {
|
||||
const { isSignedIn, isLoaded: isClerkLoaded } = useUser();
|
||||
const clerk = useClerk();
|
||||
const [auth, state] = useJazzClerkAuth(clerk, kvStore);
|
||||
const [isAuthenticated, setIsAuthenticated] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (isSignedIn && isClerkLoaded && auth) {
|
||||
setIsAuthenticated(true);
|
||||
} else {
|
||||
setIsAuthenticated(false);
|
||||
}
|
||||
}, [isSignedIn, isClerkLoaded, auth]);
|
||||
const isAuthenticated = Boolean(isSignedIn && isClerkLoaded && auth);
|
||||
|
||||
return (
|
||||
<AuthContext.Provider
|
||||
|
||||
@@ -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)) {}
|
||||
|
||||
@@ -1,5 +1,114 @@
|
||||
# chat-rn
|
||||
|
||||
## 1.0.59
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1be017d]
|
||||
- jazz-tools@0.9.21
|
||||
- jazz-react-native@0.9.21
|
||||
|
||||
## 1.0.58
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b01cc1f]
|
||||
- jazz-tools@0.9.20
|
||||
- jazz-react-native@0.9.20
|
||||
|
||||
## 1.0.57
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.9.19
|
||||
- jazz-tools@0.9.19
|
||||
|
||||
## 1.0.56
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.9.18
|
||||
- jazz-tools@0.9.18
|
||||
|
||||
## 1.0.55
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2ca1fe]
|
||||
- Updated dependencies [1227047]
|
||||
- jazz-tools@0.9.17
|
||||
- jazz-react-native@0.9.17
|
||||
|
||||
## 1.0.54
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [24b3b6a]
|
||||
- jazz-tools@0.9.16
|
||||
- jazz-react-native@0.9.16
|
||||
|
||||
## 1.0.53
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7491711]
|
||||
- jazz-tools@0.9.15
|
||||
- jazz-react-native@0.9.15
|
||||
|
||||
## 1.0.52
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3df93cc]
|
||||
- jazz-tools@0.9.14
|
||||
- jazz-react-native@0.9.14
|
||||
|
||||
## 1.0.51
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 1.0.50
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 1.0.49
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.9.11
|
||||
- jazz-tools@0.9.11
|
||||
|
||||
## 1.0.48
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [f76274c]
|
||||
- Updated dependencies [5e83864]
|
||||
- jazz-react-native@0.9.10
|
||||
- jazz-tools@0.9.10
|
||||
|
||||
## 1.0.47
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- jazz-tools@0.9.9
|
||||
- jazz-react-native@0.9.9
|
||||
|
||||
## 1.0.46
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d1d773b]
|
||||
- jazz-tools@0.9.8
|
||||
- jazz-react-native@0.9.8
|
||||
|
||||
## 1.0.45
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "chat-rn",
|
||||
"version": "1.0.45",
|
||||
"version": "1.0.59",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "expo export -p ios",
|
||||
|
||||
@@ -1,5 +1,127 @@
|
||||
# chat-vue
|
||||
|
||||
## 0.0.46
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1be017d]
|
||||
- jazz-tools@0.9.21
|
||||
- jazz-browser@0.9.21
|
||||
- jazz-vue@0.9.21
|
||||
|
||||
## 0.0.45
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b01cc1f]
|
||||
- jazz-tools@0.9.20
|
||||
- jazz-browser@0.9.20
|
||||
- jazz-vue@0.9.20
|
||||
|
||||
## 0.0.44
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.9.19
|
||||
- jazz-tools@0.9.19
|
||||
- jazz-vue@0.9.19
|
||||
|
||||
## 0.0.43
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.9.18
|
||||
- jazz-tools@0.9.18
|
||||
- jazz-vue@0.9.18
|
||||
|
||||
## 0.0.42
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2ca1fe]
|
||||
- Updated dependencies [1227047]
|
||||
- jazz-tools@0.9.17
|
||||
- jazz-browser@0.9.17
|
||||
- jazz-vue@0.9.17
|
||||
|
||||
## 0.0.41
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [24b3b6a]
|
||||
- jazz-tools@0.9.16
|
||||
- jazz-browser@0.9.16
|
||||
- jazz-vue@0.9.16
|
||||
|
||||
## 0.0.40
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7491711]
|
||||
- jazz-tools@0.9.15
|
||||
- jazz-browser@0.9.15
|
||||
- jazz-vue@0.9.15
|
||||
|
||||
## 0.0.39
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3df93cc]
|
||||
- jazz-tools@0.9.14
|
||||
- jazz-browser@0.9.14
|
||||
- jazz-vue@0.9.14
|
||||
|
||||
## 0.0.38
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
- jazz-vue@0.9.13
|
||||
|
||||
## 0.0.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
- jazz-vue@0.9.12
|
||||
|
||||
## 0.0.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.9.11
|
||||
- jazz-tools@0.9.11
|
||||
- jazz-vue@0.9.11
|
||||
|
||||
## 0.0.35
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5e83864]
|
||||
- jazz-tools@0.9.10
|
||||
- jazz-browser@0.9.10
|
||||
- jazz-vue@0.9.10
|
||||
|
||||
## 0.0.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- jazz-tools@0.9.9
|
||||
- jazz-browser@0.9.9
|
||||
- jazz-vue@0.9.9
|
||||
|
||||
## 0.0.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d1d773b]
|
||||
- jazz-tools@0.9.8
|
||||
- jazz-browser@0.9.8
|
||||
- jazz-vue@0.9.8
|
||||
|
||||
## 0.0.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,29 +1,55 @@
|
||||
# Chat example with Jazz and Vue
|
||||
|
||||
## Installing & running the example locally
|
||||
## Getting started
|
||||
|
||||
(This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
|
||||
You can either
|
||||
1. Clone the jazz repository, and run the app within the monorepo.
|
||||
2. Or create a new Jazz project using this example as a template.
|
||||
|
||||
Start by downloading the [jazz repository](https://github.com/garden-co/jazz):
|
||||
|
||||
### Using the example as a template
|
||||
|
||||
Create a new Jazz project, and use this example as a template.
|
||||
```bash
|
||||
npx degit gardencmp/jazz jazz
|
||||
npx create-jazz-app@latest --example chat-vue --project-name chat-vue
|
||||
```
|
||||
|
||||
Go to the todo-vue example directory:
|
||||
Go to the new project directory.
|
||||
```bash
|
||||
cd jazz/examples/chat-vue
|
||||
cd chat-vue
|
||||
```
|
||||
|
||||
Install and build dependencies:
|
||||
Run the dev server.
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Using the monorepo
|
||||
|
||||
This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation).
|
||||
|
||||
Clone the jazz repository.
|
||||
```bash
|
||||
git clone https://github.com/garden-co/jazz.git
|
||||
```
|
||||
|
||||
Install and build dependencies.
|
||||
```bash
|
||||
pnpm i && npx turbo build
|
||||
```
|
||||
|
||||
Start the dev server:
|
||||
Go to the example directory.
|
||||
```bash
|
||||
cd jazz/examples/chat-vue/
|
||||
```
|
||||
|
||||
Start the dev server.
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.
|
||||
|
||||
## Questions / problems / feedback
|
||||
|
||||
If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or open an issue or PR to fix something that seems wrong.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "chat-vue",
|
||||
"version": "0.0.32",
|
||||
"version": "0.0.46",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,128 @@
|
||||
# jazz-example-chat
|
||||
|
||||
## 0.0.142
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1be017d]
|
||||
- jazz-tools@0.9.21
|
||||
- jazz-browser-media-images@0.9.21
|
||||
- jazz-react@0.9.21
|
||||
|
||||
## 0.0.141
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b01cc1f]
|
||||
- jazz-tools@0.9.20
|
||||
- jazz-browser-media-images@0.9.20
|
||||
- jazz-react@0.9.20
|
||||
|
||||
## 0.0.140
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.19
|
||||
- jazz-tools@0.9.19
|
||||
- jazz-browser-media-images@0.9.19
|
||||
|
||||
## 0.0.139
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.18
|
||||
- jazz-tools@0.9.18
|
||||
- jazz-browser-media-images@0.9.18
|
||||
|
||||
## 0.0.138
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2ca1fe]
|
||||
- Updated dependencies [1227047]
|
||||
- jazz-tools@0.9.17
|
||||
- jazz-browser-media-images@0.9.17
|
||||
- jazz-react@0.9.17
|
||||
|
||||
## 0.0.137
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [24b3b6a]
|
||||
- jazz-tools@0.9.16
|
||||
- jazz-browser-media-images@0.9.16
|
||||
- jazz-react@0.9.16
|
||||
|
||||
## 0.0.136
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7491711]
|
||||
- jazz-tools@0.9.15
|
||||
- jazz-browser-media-images@0.9.15
|
||||
- jazz-react@0.9.15
|
||||
|
||||
## 0.0.135
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3df93cc]
|
||||
- jazz-tools@0.9.14
|
||||
- jazz-browser-media-images@0.9.14
|
||||
- jazz-react@0.9.14
|
||||
|
||||
## 0.0.134
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
- jazz-browser-media-images@0.9.13
|
||||
|
||||
## 0.0.133
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
- jazz-browser-media-images@0.9.12
|
||||
|
||||
## 0.0.132
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.11
|
||||
- jazz-tools@0.9.11
|
||||
- jazz-browser-media-images@0.9.11
|
||||
|
||||
## 0.0.131
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- f76274c: Fix image handling in react-native
|
||||
- Updated dependencies [5e83864]
|
||||
- jazz-react@0.9.10
|
||||
- jazz-tools@0.9.10
|
||||
- jazz-browser-media-images@0.9.10
|
||||
|
||||
## 0.0.130
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- jazz-tools@0.9.9
|
||||
- jazz-browser-media-images@0.9.9
|
||||
- jazz-react@0.9.9
|
||||
|
||||
## 0.0.129
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d1d773b]
|
||||
- jazz-tools@0.9.8
|
||||
- jazz-react@0.9.8
|
||||
- jazz-browser-media-images@0.9.8
|
||||
|
||||
## 0.0.128
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -2,30 +2,56 @@
|
||||
|
||||
Live version: [https://chat.jazz.tools](https://chat.jazz.tools)
|
||||
|
||||
## Installing & running the example locally
|
||||
## Getting started
|
||||
|
||||
(This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
|
||||
You can either
|
||||
1. Clone the jazz repository, and run the app within the monorepo.
|
||||
2. Or create a new Jazz project using this example as a template.
|
||||
|
||||
Start by downloading the [jazz repository](https://github.com/garden-co/jazz):
|
||||
|
||||
### Using the example as a template
|
||||
|
||||
Create a new Jazz project, and use this example as a template.
|
||||
```bash
|
||||
npx degit gardencmp/jazz jazz
|
||||
npx create-jazz-app@latest --example chat --project-name chat
|
||||
```
|
||||
|
||||
Go to the chat example directory:
|
||||
Go to the new project directory.
|
||||
```bash
|
||||
cd jazz/examples/chat
|
||||
cd chat
|
||||
```
|
||||
|
||||
Install and build dependencies:
|
||||
Run the dev server.
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Using the monorepo
|
||||
|
||||
This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation).
|
||||
|
||||
Clone the jazz repository.
|
||||
```bash
|
||||
git clone https://github.com/garden-co/jazz.git
|
||||
```
|
||||
|
||||
Install and build dependencies.
|
||||
```bash
|
||||
pnpm i && npx turbo build
|
||||
```
|
||||
|
||||
Start the dev server:
|
||||
Go to the example directory.
|
||||
```bash
|
||||
cd jazz/examples/chat/
|
||||
```
|
||||
|
||||
Start the dev server.
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.
|
||||
|
||||
## Questions / problems / feedback
|
||||
|
||||
If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or open an issue or PR to fix something that seems wrong.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-chat",
|
||||
"private": true,
|
||||
"version": "0.0.128",
|
||||
"version": "0.0.142",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -16,9 +16,9 @@ export function App() {
|
||||
|
||||
const createChat = () => {
|
||||
if (!me) return;
|
||||
const group = Group.create({ owner: me });
|
||||
const group = Group.create();
|
||||
group.addMember("everyone", "writer");
|
||||
const chat = Chat.create([], { owner: group });
|
||||
const chat = Chat.create([], group);
|
||||
router.navigate("/#/chat/" + chat.id);
|
||||
|
||||
// for https://jazz.tools marketing site demo only
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createImage } from "jazz-browser-media-images";
|
||||
import { useAccount, useCoState } from "jazz-react";
|
||||
import { useCoState } from "jazz-react";
|
||||
import { ID } from "jazz-tools";
|
||||
import { useState } from "react";
|
||||
import { Chat, Message } from "./schema.ts";
|
||||
@@ -18,7 +18,6 @@ import {
|
||||
|
||||
export function ChatScreen(props: { chatID: ID<Chat> }) {
|
||||
const chat = useCoState(Chat, props.chatID, [{}]);
|
||||
const { me } = useAccount();
|
||||
const [showNLastMessages, setShowNLastMessages] = useState(30);
|
||||
|
||||
if (!chat)
|
||||
@@ -27,8 +26,6 @@ export function ChatScreen(props: { chatID: ID<Chat> }) {
|
||||
);
|
||||
|
||||
const sendImage = (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||
if (!me?.profile) return;
|
||||
|
||||
const file = event.currentTarget.files?.[0];
|
||||
|
||||
if (!file) return;
|
||||
@@ -39,12 +36,7 @@ export function ChatScreen(props: { chatID: ID<Chat> }) {
|
||||
}
|
||||
|
||||
createImage(file, { owner: chat._owner }).then((image) => {
|
||||
chat.push(
|
||||
Message.create(
|
||||
{ text: file.name, image: image },
|
||||
{ owner: chat._owner },
|
||||
),
|
||||
);
|
||||
chat.push(Message.create({ text: file.name, image: image }, chat._owner));
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,127 @@
|
||||
# minimal-auth-clerk
|
||||
|
||||
## 0.0.41
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1be017d]
|
||||
- jazz-tools@0.9.21
|
||||
- jazz-react@0.9.21
|
||||
- jazz-react-auth-clerk@0.9.21
|
||||
|
||||
## 0.0.40
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b01cc1f]
|
||||
- jazz-tools@0.9.20
|
||||
- jazz-react@0.9.20
|
||||
- jazz-react-auth-clerk@0.9.20
|
||||
|
||||
## 0.0.39
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.19
|
||||
- jazz-react-auth-clerk@0.9.19
|
||||
- jazz-tools@0.9.19
|
||||
|
||||
## 0.0.38
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.18
|
||||
- jazz-react-auth-clerk@0.9.18
|
||||
- jazz-tools@0.9.18
|
||||
|
||||
## 0.0.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2ca1fe]
|
||||
- Updated dependencies [1227047]
|
||||
- jazz-tools@0.9.17
|
||||
- jazz-react@0.9.17
|
||||
- jazz-react-auth-clerk@0.9.17
|
||||
|
||||
## 0.0.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [24b3b6a]
|
||||
- jazz-react-auth-clerk@0.9.16
|
||||
- jazz-tools@0.9.16
|
||||
- jazz-react@0.9.16
|
||||
|
||||
## 0.0.35
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7491711]
|
||||
- jazz-tools@0.9.15
|
||||
- jazz-react@0.9.15
|
||||
- jazz-react-auth-clerk@0.9.15
|
||||
|
||||
## 0.0.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3df93cc]
|
||||
- jazz-tools@0.9.14
|
||||
- jazz-react@0.9.14
|
||||
- jazz-react-auth-clerk@0.9.14
|
||||
|
||||
## 0.0.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-react-auth-clerk@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.0.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-react-auth-clerk@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.0.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.11
|
||||
- jazz-react-auth-clerk@0.9.11
|
||||
- jazz-tools@0.9.11
|
||||
|
||||
## 0.0.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5e83864]
|
||||
- jazz-react@0.9.10
|
||||
- jazz-tools@0.9.10
|
||||
- jazz-react-auth-clerk@0.9.10
|
||||
|
||||
## 0.0.29
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- jazz-tools@0.9.9
|
||||
- jazz-react@0.9.9
|
||||
- jazz-react-auth-clerk@0.9.9
|
||||
|
||||
## 0.0.28
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d1d773b]
|
||||
- jazz-tools@0.9.8
|
||||
- jazz-react@0.9.8
|
||||
- jazz-react-auth-clerk@0.9.8
|
||||
|
||||
## 0.0.27
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -4,30 +4,56 @@ This is an example of how to use clerk authentication with Jazz.
|
||||
|
||||
Live version: https://clerk-demo.jazz.tools
|
||||
|
||||
## Installing & running the example locally
|
||||
## Getting started
|
||||
|
||||
(This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
|
||||
You can either
|
||||
1. Clone the jazz repository, and run the app within the monorepo.
|
||||
2. Or create a new Jazz project using this example as a template.
|
||||
|
||||
Start by downloading the [jazz repository](https://github.com/garden-co/jazz):
|
||||
|
||||
### Using the example as a template
|
||||
|
||||
Create a new Jazz project, and use this example as a template.
|
||||
```bash
|
||||
npx degit gardencmp/jazz jazz
|
||||
npx create-jazz-app@latest --example clerk --project-name clerk
|
||||
```
|
||||
|
||||
Go to the clerk example directory:
|
||||
Go to the new project directory.
|
||||
```bash
|
||||
cd jazz/examples/clerk
|
||||
cd clerk
|
||||
```
|
||||
|
||||
Install and build dependencies:
|
||||
Run the dev server.
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Using the monorepo
|
||||
|
||||
This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation).
|
||||
|
||||
Clone the jazz repository.
|
||||
```bash
|
||||
git clone https://github.com/garden-co/jazz.git
|
||||
```
|
||||
|
||||
Install and build dependencies.
|
||||
```bash
|
||||
pnpm i && npx turbo build
|
||||
```
|
||||
|
||||
Start the dev server:
|
||||
Go to the example directory.
|
||||
```bash
|
||||
cd jazz/examples/clerk/
|
||||
```
|
||||
|
||||
Start the dev server.
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.
|
||||
|
||||
## Questions / problems / feedback
|
||||
|
||||
If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or open an issue or PR to fix something that seems wrong.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "clerk",
|
||||
"private": true,
|
||||
"version": "0.0.27",
|
||||
"version": "0.0.41",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -13,7 +13,7 @@
|
||||
"dependencies": {
|
||||
"@clerk/clerk-react": "^5.4.1",
|
||||
"jazz-react": "workspace:*",
|
||||
"jazz-react-auth-clerk": "workspace:0.9.4",
|
||||
"jazz-react-auth-clerk": "workspace:0.9.21",
|
||||
"jazz-tools": "workspace:*",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1"
|
||||
|
||||
@@ -1,5 +1,113 @@
|
||||
# file-share-svelte
|
||||
|
||||
## 0.0.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1be017d]
|
||||
- jazz-tools@0.9.21
|
||||
- jazz-svelte@0.9.21
|
||||
|
||||
## 0.0.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b01cc1f]
|
||||
- jazz-tools@0.9.20
|
||||
- jazz-svelte@0.9.20
|
||||
|
||||
## 0.0.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.19
|
||||
- jazz-tools@0.9.19
|
||||
|
||||
## 0.0.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.18
|
||||
- jazz-tools@0.9.18
|
||||
|
||||
## 0.0.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2ca1fe]
|
||||
- Updated dependencies [1227047]
|
||||
- jazz-tools@0.9.17
|
||||
- jazz-svelte@0.9.17
|
||||
|
||||
## 0.0.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [24b3b6a]
|
||||
- jazz-tools@0.9.16
|
||||
- jazz-svelte@0.9.16
|
||||
|
||||
## 0.0.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7491711]
|
||||
- jazz-tools@0.9.15
|
||||
- jazz-svelte@0.9.15
|
||||
|
||||
## 0.0.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3df93cc]
|
||||
- jazz-tools@0.9.14
|
||||
- jazz-svelte@0.9.14
|
||||
|
||||
## 0.0.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.0.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.0.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.11
|
||||
- jazz-tools@0.9.11
|
||||
|
||||
## 0.0.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5e83864]
|
||||
- jazz-tools@0.9.10
|
||||
- jazz-svelte@0.9.10
|
||||
|
||||
## 0.0.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- jazz-tools@0.9.9
|
||||
- jazz-svelte@0.9.9
|
||||
|
||||
## 0.0.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d1d773b]
|
||||
- jazz-tools@0.9.8
|
||||
- jazz-svelte@0.9.8
|
||||
|
||||
## 0.0.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "file-share-svelte",
|
||||
"version": "0.0.12",
|
||||
"version": "0.0.26",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,127 @@
|
||||
# form
|
||||
|
||||
## 0.0.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1be017d]
|
||||
- jazz-tools@0.9.21
|
||||
- jazz-browser-media-images@0.9.21
|
||||
- jazz-react@0.9.21
|
||||
|
||||
## 0.0.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b01cc1f]
|
||||
- jazz-tools@0.9.20
|
||||
- jazz-browser-media-images@0.9.20
|
||||
- jazz-react@0.9.20
|
||||
|
||||
## 0.0.35
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.19
|
||||
- jazz-tools@0.9.19
|
||||
- jazz-browser-media-images@0.9.19
|
||||
|
||||
## 0.0.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.18
|
||||
- jazz-tools@0.9.18
|
||||
- jazz-browser-media-images@0.9.18
|
||||
|
||||
## 0.0.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2ca1fe]
|
||||
- Updated dependencies [1227047]
|
||||
- jazz-tools@0.9.17
|
||||
- jazz-browser-media-images@0.9.17
|
||||
- jazz-react@0.9.17
|
||||
|
||||
## 0.0.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [24b3b6a]
|
||||
- jazz-tools@0.9.16
|
||||
- jazz-browser-media-images@0.9.16
|
||||
- jazz-react@0.9.16
|
||||
|
||||
## 0.0.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7491711]
|
||||
- jazz-tools@0.9.15
|
||||
- jazz-browser-media-images@0.9.15
|
||||
- jazz-react@0.9.15
|
||||
|
||||
## 0.0.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3df93cc]
|
||||
- jazz-tools@0.9.14
|
||||
- jazz-browser-media-images@0.9.14
|
||||
- jazz-react@0.9.14
|
||||
|
||||
## 0.0.29
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
- jazz-browser-media-images@0.9.13
|
||||
|
||||
## 0.0.28
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
- jazz-browser-media-images@0.9.12
|
||||
|
||||
## 0.0.27
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.11
|
||||
- jazz-tools@0.9.11
|
||||
- jazz-browser-media-images@0.9.11
|
||||
|
||||
## 0.0.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5e83864]
|
||||
- jazz-react@0.9.10
|
||||
- jazz-tools@0.9.10
|
||||
- jazz-browser-media-images@0.9.10
|
||||
|
||||
## 0.0.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- jazz-tools@0.9.9
|
||||
- jazz-browser-media-images@0.9.9
|
||||
- jazz-react@0.9.9
|
||||
|
||||
## 0.0.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d1d773b]
|
||||
- jazz-tools@0.9.8
|
||||
- jazz-react@0.9.8
|
||||
- jazz-browser-media-images@0.9.8
|
||||
|
||||
## 0.0.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -17,30 +17,56 @@ converting it into a `BubbleTeaOrder`.
|
||||
|
||||
[See the full guide here.](https://jazz.tools/docs/react/design-patterns/form)
|
||||
|
||||
## Installing & running the example locally
|
||||
## Getting started
|
||||
|
||||
(This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
|
||||
You can either
|
||||
1. Clone the jazz repository, and run the app within the monorepo.
|
||||
2. Or create a new Jazz project using this example as a template.
|
||||
|
||||
Start by downloading the [jazz repository](https://github.com/garden-co/jazz):
|
||||
|
||||
### Using the example as a template
|
||||
|
||||
Create a new Jazz project, and use this example as a template.
|
||||
```bash
|
||||
npx degit gardencmp/jazz jazz
|
||||
npx create-jazz-app@latest --example form --project-name form
|
||||
```
|
||||
|
||||
Go to the form example directory:
|
||||
Go to the new project directory.
|
||||
```bash
|
||||
cd jazz/examples/form
|
||||
cd form
|
||||
```
|
||||
|
||||
Install and build dependencies:
|
||||
Run the dev server.
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Using the monorepo
|
||||
|
||||
This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation).
|
||||
|
||||
Clone the jazz repository.
|
||||
```bash
|
||||
git clone https://github.com/garden-co/jazz.git
|
||||
```
|
||||
|
||||
Install and build dependencies.
|
||||
```bash
|
||||
pnpm i && npx turbo build
|
||||
```
|
||||
|
||||
Start the dev server:
|
||||
Go to the example directory.
|
||||
```bash
|
||||
cd jazz/examples/form/
|
||||
```
|
||||
|
||||
Start the dev server.
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.
|
||||
|
||||
## Questions / problems / feedback
|
||||
|
||||
If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or open an issue or PR to fix something that seems wrong.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "form",
|
||||
"private": true,
|
||||
"version": "0.0.23",
|
||||
"version": "0.0.37",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -30,12 +30,9 @@ export function CreateOrder() {
|
||||
me.root.orders.push(draft as BubbleTeaOrder);
|
||||
|
||||
// reset the draft
|
||||
me.root.draft = DraftBubbleTeaOrder.create(
|
||||
{
|
||||
addOns: ListOfBubbleTeaAddOns.create([], me),
|
||||
},
|
||||
me,
|
||||
);
|
||||
me.root.draft = DraftBubbleTeaOrder.create({
|
||||
addOns: ListOfBubbleTeaAddOns.create([]),
|
||||
});
|
||||
|
||||
router.navigate("/");
|
||||
};
|
||||
|
||||
@@ -1,5 +1,127 @@
|
||||
# image-upload
|
||||
|
||||
## 0.0.39
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1be017d]
|
||||
- jazz-tools@0.9.21
|
||||
- jazz-browser-media-images@0.9.21
|
||||
- jazz-react@0.9.21
|
||||
|
||||
## 0.0.38
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b01cc1f]
|
||||
- jazz-tools@0.9.20
|
||||
- jazz-browser-media-images@0.9.20
|
||||
- jazz-react@0.9.20
|
||||
|
||||
## 0.0.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.19
|
||||
- jazz-tools@0.9.19
|
||||
- jazz-browser-media-images@0.9.19
|
||||
|
||||
## 0.0.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.18
|
||||
- jazz-tools@0.9.18
|
||||
- jazz-browser-media-images@0.9.18
|
||||
|
||||
## 0.0.35
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2ca1fe]
|
||||
- Updated dependencies [1227047]
|
||||
- jazz-tools@0.9.17
|
||||
- jazz-browser-media-images@0.9.17
|
||||
- jazz-react@0.9.17
|
||||
|
||||
## 0.0.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [24b3b6a]
|
||||
- jazz-tools@0.9.16
|
||||
- jazz-browser-media-images@0.9.16
|
||||
- jazz-react@0.9.16
|
||||
|
||||
## 0.0.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7491711]
|
||||
- jazz-tools@0.9.15
|
||||
- jazz-browser-media-images@0.9.15
|
||||
- jazz-react@0.9.15
|
||||
|
||||
## 0.0.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3df93cc]
|
||||
- jazz-tools@0.9.14
|
||||
- jazz-browser-media-images@0.9.14
|
||||
- jazz-react@0.9.14
|
||||
|
||||
## 0.0.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
- jazz-browser-media-images@0.9.13
|
||||
|
||||
## 0.0.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
- jazz-browser-media-images@0.9.12
|
||||
|
||||
## 0.0.29
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.11
|
||||
- jazz-tools@0.9.11
|
||||
- jazz-browser-media-images@0.9.11
|
||||
|
||||
## 0.0.28
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5e83864]
|
||||
- jazz-react@0.9.10
|
||||
- jazz-tools@0.9.10
|
||||
- jazz-browser-media-images@0.9.10
|
||||
|
||||
## 0.0.27
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- jazz-tools@0.9.9
|
||||
- jazz-browser-media-images@0.9.9
|
||||
- jazz-react@0.9.9
|
||||
|
||||
## 0.0.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d1d773b]
|
||||
- jazz-tools@0.9.8
|
||||
- jazz-react@0.9.8
|
||||
- jazz-browser-media-images@0.9.8
|
||||
|
||||
## 0.0.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -4,30 +4,56 @@ This is an example of how to upload and render images with Jazz.
|
||||
|
||||
Live version: https://image-upload-demo.jazz.tools
|
||||
|
||||
## Installing & running the example locally
|
||||
## Getting started
|
||||
|
||||
(This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
|
||||
You can either
|
||||
1. Clone the jazz repository, and run the app within the monorepo.
|
||||
2. Or create a new Jazz project using this example as a template.
|
||||
|
||||
Start by downloading the [jazz repository](https://github.com/garden-co/jazz):
|
||||
|
||||
### Using the example as a template
|
||||
|
||||
Create a new Jazz project, and use this example as a template.
|
||||
```bash
|
||||
npx degit gardencmp/jazz jazz
|
||||
npx create-jazz-app@latest --example image-upload --project-name image-upload
|
||||
```
|
||||
|
||||
Go to the image-upload example directory:
|
||||
Go to the new project directory.
|
||||
```bash
|
||||
cd jazz/examples/image-upload
|
||||
cd image-upload
|
||||
```
|
||||
|
||||
Install and build dependencies:
|
||||
Run the dev server.
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Using the monorepo
|
||||
|
||||
This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation).
|
||||
|
||||
Clone the jazz repository.
|
||||
```bash
|
||||
git clone https://github.com/garden-co/jazz.git
|
||||
```
|
||||
|
||||
Install and build dependencies.
|
||||
```bash
|
||||
pnpm i && npx turbo build
|
||||
```
|
||||
|
||||
Start the dev server:
|
||||
Go to the example directory.
|
||||
```bash
|
||||
cd jazz/examples/image-upload/
|
||||
```
|
||||
|
||||
Start the dev server.
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.
|
||||
|
||||
## Questions / problems / feedback
|
||||
|
||||
If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or open an issue or PR to fix something that seems wrong.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "image-upload",
|
||||
"private": true,
|
||||
"version": "0.0.25",
|
||||
"version": "0.0.39",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,62 @@
|
||||
# jazz-example-inspector
|
||||
|
||||
## 0.0.100
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6ad0a9f]
|
||||
- cojson@0.9.19
|
||||
- cojson-transport-ws@0.9.19
|
||||
|
||||
## 0.0.99
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8898b10]
|
||||
- cojson@0.9.18
|
||||
- cojson-transport-ws@0.9.18
|
||||
|
||||
## 0.0.98
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8d29e50]
|
||||
- cojson-transport-ws@0.9.13
|
||||
- cojson@0.9.13
|
||||
|
||||
## 0.0.97
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [15d4b2a]
|
||||
- cojson-transport-ws@0.9.12
|
||||
- cojson@0.9.12
|
||||
|
||||
## 0.0.96
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [efbf3d8]
|
||||
- Updated dependencies [5863bad]
|
||||
- cojson@0.9.11
|
||||
- cojson-transport-ws@0.9.11
|
||||
|
||||
## 0.0.95
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [4aa377d]
|
||||
- cojson@0.9.10
|
||||
- cojson-transport-ws@0.9.10
|
||||
|
||||
## 0.0.94
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- cojson@0.9.9
|
||||
- cojson-transport-ws@0.9.9
|
||||
|
||||
## 0.0.93
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-inspector",
|
||||
"name": "jazz-inspector-app",
|
||||
"private": true,
|
||||
"version": "0.0.93",
|
||||
"version": "0.0.100",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -16,8 +16,8 @@
|
||||
"@radix-ui/react-toast": "^1.1.4",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.0.0",
|
||||
"cojson": "workspace:0.9.0",
|
||||
"cojson-transport-ws": "workspace:0.9.0",
|
||||
"cojson": "workspace:0.9.19",
|
||||
"cojson-transport-ws": "workspace:0.9.19",
|
||||
"hash-slash": "workspace:0.2.1",
|
||||
"lucide-react": "^0.274.0",
|
||||
"qrcode": "^1.5.3",
|
||||
|
||||
@@ -1,5 +1,131 @@
|
||||
# jazz-example-musicplayer
|
||||
|
||||
## 0.0.63
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1be017d]
|
||||
- jazz-tools@0.9.21
|
||||
- jazz-inspector@0.9.22
|
||||
- jazz-react@0.9.21
|
||||
|
||||
## 0.0.62
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b01cc1f]
|
||||
- jazz-tools@0.9.20
|
||||
- jazz-inspector@0.9.21
|
||||
- jazz-react@0.9.20
|
||||
|
||||
## 0.0.61
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-inspector@0.9.20
|
||||
- jazz-react@0.9.19
|
||||
- jazz-tools@0.9.19
|
||||
|
||||
## 0.0.60
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2faf22f]
|
||||
- jazz-inspector@0.9.19
|
||||
|
||||
## 0.0.59
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-inspector@0.9.18
|
||||
- jazz-react@0.9.18
|
||||
- jazz-tools@0.9.18
|
||||
|
||||
## 0.0.58
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2ca1fe]
|
||||
- Updated dependencies [1227047]
|
||||
- jazz-tools@0.9.17
|
||||
- jazz-inspector@0.9.17
|
||||
- jazz-react@0.9.17
|
||||
|
||||
## 0.0.57
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [24b3b6a]
|
||||
- jazz-tools@0.9.16
|
||||
- jazz-inspector@0.9.16
|
||||
- jazz-react@0.9.16
|
||||
|
||||
## 0.0.56
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7491711]
|
||||
- jazz-tools@0.9.15
|
||||
- jazz-inspector@0.9.15
|
||||
- jazz-react@0.9.15
|
||||
|
||||
## 0.0.55
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3df93cc]
|
||||
- jazz-tools@0.9.14
|
||||
- jazz-inspector@0.9.14
|
||||
- jazz-react@0.9.14
|
||||
|
||||
## 0.0.54
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-inspector@0.9.13
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.0.53
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-inspector@0.9.12
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.0.52
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-inspector@0.9.11
|
||||
- jazz-react@0.9.11
|
||||
- jazz-tools@0.9.11
|
||||
|
||||
## 0.0.51
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5e83864]
|
||||
- jazz-react@0.9.10
|
||||
- jazz-tools@0.9.10
|
||||
|
||||
## 0.0.50
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- jazz-tools@0.9.9
|
||||
- jazz-react@0.9.9
|
||||
|
||||
## 0.0.49
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d1d773b]
|
||||
- jazz-tools@0.9.8
|
||||
- jazz-react@0.9.8
|
||||
|
||||
## 0.0.48
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -2,30 +2,56 @@
|
||||
|
||||
Live version: https://music-demo.jazz.tools
|
||||
|
||||
## Installing & running the example locally
|
||||
## Getting started
|
||||
|
||||
(This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
|
||||
You can either
|
||||
1. Clone the jazz repository, and run the app within the monorepo.
|
||||
2. Or create a new Jazz project using this example as a template.
|
||||
|
||||
Start by downloading the [jazz repository](https://github.com/garden-co/jazz):
|
||||
|
||||
### Using the example as a template
|
||||
|
||||
Create a new Jazz project, and use this example as a template.
|
||||
```bash
|
||||
npx degit gardencmp/jazz jazz
|
||||
npx create-jazz-app@latest --example music-player --project-name music-player
|
||||
```
|
||||
|
||||
Go to the music-player example directory:
|
||||
Go to the new project directory.
|
||||
```bash
|
||||
cd jazz/examples/music-player
|
||||
cd music-player
|
||||
```
|
||||
|
||||
Install and build dependencies:
|
||||
Run the dev server.
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Using the monorepo
|
||||
|
||||
This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation).
|
||||
|
||||
Clone the jazz repository.
|
||||
```bash
|
||||
git clone https://github.com/garden-co/jazz.git
|
||||
```
|
||||
|
||||
Install and build dependencies.
|
||||
```bash
|
||||
pnpm i && npx turbo build
|
||||
```
|
||||
|
||||
Start the dev server:
|
||||
Go to the example directory.
|
||||
```bash
|
||||
cd jazz/examples/music-player/
|
||||
```
|
||||
|
||||
Start the dev server.
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.
|
||||
|
||||
## Questions / problems / feedback
|
||||
|
||||
If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or open an issue or PR to fix something that seems wrong.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-music-player",
|
||||
"private": true,
|
||||
"version": "0.0.48",
|
||||
"version": "0.0.63",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -18,8 +18,9 @@
|
||||
"@radix-ui/react-toast": "^1.1.4",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.0.0",
|
||||
"jazz-react": "workspace:0.9.4",
|
||||
"jazz-tools": "workspace:0.9.1",
|
||||
"jazz-react": "workspace:0.9.21",
|
||||
"jazz-tools": "workspace:0.9.21",
|
||||
"jazz-inspector": "workspace:*",
|
||||
"lucide-react": "^0.274.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Toaster } from "@/components/ui/toaster";
|
||||
import { JazzInspector } from "jazz-inspector";
|
||||
/* eslint-disable react-refresh/only-export-components */
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
@@ -65,12 +66,13 @@ function JazzAndAuth({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<>
|
||||
<JazzProvider
|
||||
storage={["singleTabOPFS", "indexedDB"]}
|
||||
storage="indexedDB"
|
||||
auth={auth}
|
||||
peer={peer}
|
||||
AccountSchema={MusicaAccount}
|
||||
>
|
||||
{children}
|
||||
<JazzInspector />
|
||||
</JazzProvider>
|
||||
<DemoAuthBasicUI appName="Jazz Music Player" state={state} />
|
||||
</>
|
||||
|
||||
@@ -31,19 +31,15 @@ export function HomePage({ mediaPlayer }: { mediaPlayer: MediaPlayer }) {
|
||||
const { toast } = useToast();
|
||||
|
||||
async function handleFileLoad(files: FileList) {
|
||||
if (!me) return;
|
||||
|
||||
/**
|
||||
* Follow this function definition to see how we update
|
||||
* values in Jazz and manage files!
|
||||
*/
|
||||
await uploadMusicTracks(me, files);
|
||||
await uploadMusicTracks(files);
|
||||
}
|
||||
|
||||
async function handleCreatePlaylist() {
|
||||
if (!me) return;
|
||||
|
||||
const playlist = await createNewPlaylist(me);
|
||||
const playlist = await createNewPlaylist();
|
||||
|
||||
navigate(`/playlist/${playlist.id}`);
|
||||
}
|
||||
|
||||
@@ -22,14 +22,22 @@ import {
|
||||
* pattern that best fits your app.
|
||||
*/
|
||||
|
||||
export async function uploadMusicTracks(
|
||||
account: MusicaAccount,
|
||||
files: Iterable<File>,
|
||||
) {
|
||||
export async function uploadMusicTracks(files: Iterable<File>) {
|
||||
const me = await MusicaAccount.getMe().ensureLoaded({
|
||||
root: {
|
||||
rootPlaylist: {
|
||||
tracks: [],
|
||||
},
|
||||
playlists: [],
|
||||
},
|
||||
});
|
||||
|
||||
if (!me) return;
|
||||
|
||||
for (const file of files) {
|
||||
// The ownership object defines the user that owns the created coValues
|
||||
// We are creating a group for each CoValue in order to be able to share them via Playlist
|
||||
const group = Group.create(account);
|
||||
const group = Group.create();
|
||||
|
||||
const data = await getAudioFileData(file);
|
||||
|
||||
@@ -50,15 +58,23 @@ export async function uploadMusicTracks(
|
||||
|
||||
// The newly created musicTrack can be associated to the
|
||||
// user track list using a simple push call
|
||||
account.root?.rootPlaylist?.tracks?.push(musicTrack);
|
||||
me.root.rootPlaylist.tracks.push(musicTrack);
|
||||
}
|
||||
}
|
||||
|
||||
export async function createNewPlaylist(account: MusicaAccount) {
|
||||
export async function createNewPlaylist() {
|
||||
const me = await MusicaAccount.getMe().ensureLoaded({
|
||||
root: {
|
||||
playlists: [],
|
||||
},
|
||||
});
|
||||
|
||||
if (!me) throw new Error("Current playlist not resolved");
|
||||
|
||||
// Since playlists are meant to be shared we associate them
|
||||
// to a group which will contain the keys required to get
|
||||
// access to the "owned" values
|
||||
const playlistGroup = Group.create(account);
|
||||
const playlistGroup = Group.create();
|
||||
|
||||
const playlist = Playlist.create(
|
||||
{
|
||||
@@ -70,7 +86,7 @@ export async function createNewPlaylist(account: MusicaAccount) {
|
||||
|
||||
// Again, we associate the new playlist to the
|
||||
// user by pushing it into the playlists CoList
|
||||
account.root?.playlists?.push(playlist);
|
||||
me.root.playlists.push(playlist);
|
||||
|
||||
return playlist;
|
||||
}
|
||||
@@ -78,10 +94,7 @@ export async function createNewPlaylist(account: MusicaAccount) {
|
||||
export async function addTrackToPlaylist(
|
||||
playlist: Playlist,
|
||||
track: MusicTrack,
|
||||
account: MusicaAccount | undefined,
|
||||
) {
|
||||
if (!account) return;
|
||||
|
||||
const alreadyAdded = playlist.tracks?.some(
|
||||
(t) => t?.id === track.id || t?._refs.sourceTrack?.id === track.id,
|
||||
);
|
||||
@@ -108,12 +121,8 @@ export async function addTrackToPlaylist(
|
||||
*
|
||||
* Doing this for backwards compatibility for when the Group inheritance wasn't possible
|
||||
*/
|
||||
const blob = await FileStream.loadAsBlob(track._refs.file.id, account);
|
||||
const waveform = await MusicTrackWaveform.load(
|
||||
track._refs.waveform.id,
|
||||
account,
|
||||
{},
|
||||
);
|
||||
const blob = await FileStream.loadAsBlob(track._refs.file.id);
|
||||
const waveform = await MusicTrackWaveform.load(track._refs.waveform.id, {});
|
||||
|
||||
if (!blob || !waveform) return;
|
||||
|
||||
@@ -142,13 +151,25 @@ export async function updateMusicTrackTitle(track: MusicTrack, title: string) {
|
||||
track.title = title;
|
||||
}
|
||||
|
||||
export async function updateActivePlaylist(
|
||||
playlist: Playlist,
|
||||
me: MusicaAccount,
|
||||
) {
|
||||
me.root!.activePlaylist = playlist ?? me.root!.rootPlaylist;
|
||||
export async function updateActivePlaylist(playlist?: Playlist) {
|
||||
const me = await MusicaAccount.getMe().ensureLoaded({
|
||||
root: {
|
||||
activePlaylist: {},
|
||||
rootPlaylist: {},
|
||||
},
|
||||
});
|
||||
|
||||
if (!me) return;
|
||||
|
||||
me.root.activePlaylist = playlist ?? me.root.rootPlaylist;
|
||||
}
|
||||
|
||||
export async function updateActiveTrack(track: MusicTrack, me: MusicaAccount) {
|
||||
me.root!.activeTrack = track;
|
||||
export async function updateActiveTrack(track: MusicTrack) {
|
||||
const me = await MusicaAccount.getMe().ensureLoaded({
|
||||
root: {},
|
||||
});
|
||||
|
||||
if (!me) return;
|
||||
|
||||
me.root.activeTrack = track;
|
||||
}
|
||||
|
||||
@@ -8,26 +8,26 @@ import { updateActivePlaylist, updateActiveTrack } from "./4_actions";
|
||||
import { getNextTrack, getPrevTrack } from "./lib/getters";
|
||||
|
||||
export function useMediaPlayer() {
|
||||
const { me } = useAccount();
|
||||
const { me } = useAccount({
|
||||
root: {},
|
||||
});
|
||||
|
||||
const playState = usePlayState();
|
||||
const playMedia = usePlayMedia();
|
||||
|
||||
const [loading, setLoading] = useState<ID<MusicTrack> | null>(null);
|
||||
|
||||
const activeTrackId = me?.root?._refs.activeTrack?.id;
|
||||
const activeTrackId = me?.root._refs.activeTrack?.id;
|
||||
|
||||
// Reference used to avoid out-of-order track loads
|
||||
const lastLoadedTrackId = useRef<ID<MusicTrack> | null>(null);
|
||||
|
||||
async function loadTrack(track: MusicTrack) {
|
||||
if (!me.root) return;
|
||||
|
||||
lastLoadedTrackId.current = track.id;
|
||||
|
||||
setLoading(track.id);
|
||||
|
||||
const file = await FileStream.loadAsBlob(track._refs.file.id, me);
|
||||
const file = await FileStream.loadAsBlob(track._refs.file.id);
|
||||
|
||||
if (!file) {
|
||||
setLoading(null);
|
||||
@@ -40,7 +40,7 @@ export function useMediaPlayer() {
|
||||
return;
|
||||
}
|
||||
|
||||
updateActiveTrack(track, me);
|
||||
updateActiveTrack(track);
|
||||
|
||||
await playMedia(file);
|
||||
|
||||
@@ -48,20 +48,16 @@ export function useMediaPlayer() {
|
||||
}
|
||||
|
||||
async function playNextTrack() {
|
||||
if (!me?.root) return;
|
||||
|
||||
const track = await getNextTrack(me);
|
||||
const track = await getNextTrack();
|
||||
|
||||
if (track) {
|
||||
updateActiveTrack(track, me);
|
||||
updateActiveTrack(track);
|
||||
await loadTrack(track);
|
||||
}
|
||||
}
|
||||
|
||||
async function playPrevTrack() {
|
||||
if (!me?.root) return;
|
||||
|
||||
const track = await getPrevTrack(me);
|
||||
const track = await getPrevTrack();
|
||||
|
||||
if (track) {
|
||||
await loadTrack(track);
|
||||
@@ -69,14 +65,12 @@ export function useMediaPlayer() {
|
||||
}
|
||||
|
||||
async function setActiveTrack(track: MusicTrack, playlist?: Playlist) {
|
||||
if (!me?.root) return;
|
||||
|
||||
if (activeTrackId === track.id && lastLoadedTrackId.current !== null) {
|
||||
playState.toggle();
|
||||
return;
|
||||
}
|
||||
|
||||
updateActivePlaylist(playlist!, me);
|
||||
updateActivePlaylist(playlist);
|
||||
|
||||
await loadTrack(track);
|
||||
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
import { useAcceptInvite, useAccount } from "jazz-react";
|
||||
import { useAcceptInvite } from "jazz-react";
|
||||
import { ID } from "jazz-tools";
|
||||
import { useCallback } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { Playlist } from "./1_schema";
|
||||
import { MusicaAccount, Playlist } from "./1_schema";
|
||||
|
||||
export function InvitePage() {
|
||||
const navigate = useNavigate();
|
||||
|
||||
const { me } = useAccount({
|
||||
root: {
|
||||
playlists: [],
|
||||
},
|
||||
});
|
||||
|
||||
useAcceptInvite({
|
||||
invitedObjectSchema: Playlist,
|
||||
onAccept: useCallback(
|
||||
async (playlistId: ID<Playlist>) => {
|
||||
if (!me) return;
|
||||
const playlist = await Playlist.load(playlistId, {});
|
||||
|
||||
const playlist = await Playlist.load(playlistId, me, {});
|
||||
const me = await MusicaAccount.getMe().ensureLoaded({
|
||||
root: {
|
||||
playlists: [],
|
||||
},
|
||||
});
|
||||
|
||||
if (!me) return;
|
||||
|
||||
if (
|
||||
playlist &&
|
||||
@@ -30,7 +30,7 @@ export function InvitePage() {
|
||||
|
||||
navigate("/playlist/" + playlistId);
|
||||
},
|
||||
[navigate, me],
|
||||
[navigate],
|
||||
),
|
||||
});
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ export function MusicTrackRow({
|
||||
|
||||
function handleAddToPlaylist(playlist: Playlist) {
|
||||
if (!track) return;
|
||||
addTrackToPlaylist(playlist, track, me);
|
||||
addTrackToPlaylist(playlist, track);
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
import { MusicaAccount } from "../1_schema";
|
||||
|
||||
export async function getNextTrack(account: MusicaAccount) {
|
||||
if (!account.root?.activePlaylist?.tracks) return;
|
||||
export async function getNextTrack() {
|
||||
const me = await MusicaAccount.getMe().ensureLoaded({
|
||||
root: {
|
||||
activePlaylist: {
|
||||
tracks: [],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const tracks = account.root.activePlaylist.tracks;
|
||||
const activeTrack = account.root._refs.activeTrack;
|
||||
if (!me) return;
|
||||
|
||||
const tracks = me.root.activePlaylist.tracks;
|
||||
const activeTrack = me.root._refs.activeTrack;
|
||||
|
||||
const currentIndex = tracks.findIndex((item) => item?.id === activeTrack.id);
|
||||
|
||||
@@ -13,11 +21,19 @@ export async function getNextTrack(account: MusicaAccount) {
|
||||
return tracks[nextIndex];
|
||||
}
|
||||
|
||||
export async function getPrevTrack(account: MusicaAccount) {
|
||||
if (!account.root?.activePlaylist?.tracks) return;
|
||||
export async function getPrevTrack() {
|
||||
const me = await MusicaAccount.getMe().ensureLoaded({
|
||||
root: {
|
||||
activePlaylist: {
|
||||
tracks: [],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const tracks = account.root.activePlaylist.tracks;
|
||||
const activeTrack = account.root._refs.activeTrack;
|
||||
if (!me) return;
|
||||
|
||||
const tracks = me.root.activePlaylist.tracks;
|
||||
const activeTrack = me.root._refs.activeTrack;
|
||||
|
||||
const currentIndex = tracks.findIndex((item) => item?.id === activeTrack.id);
|
||||
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
import { useAccount } from "jazz-react";
|
||||
// eslint-disable-next-line react-compiler/react-compiler
|
||||
/* eslint-disable react-hooks/exhaustive-deps */
|
||||
import { MusicaAccount } from "@/1_schema";
|
||||
import { useEffect } from "react";
|
||||
import { MusicaAccount } from "../1_schema";
|
||||
import { uploadMusicTracks } from "../4_actions";
|
||||
|
||||
export function useUploadExampleData() {
|
||||
const { me } = useAccount({
|
||||
useEffect(() => {
|
||||
uploadOnboardingData();
|
||||
}, []);
|
||||
}
|
||||
|
||||
async function uploadOnboardingData() {
|
||||
const me = await MusicaAccount.getMe().ensureLoaded({
|
||||
root: {},
|
||||
});
|
||||
|
||||
const shouldUploadOnboardingData = me?.root?.exampleDataLoaded === false;
|
||||
if (!me) throw new Error("Me not resolved");
|
||||
|
||||
useEffect(() => {
|
||||
if (me?.root && shouldUploadOnboardingData) {
|
||||
me.root.exampleDataLoaded = true;
|
||||
if (me.root.exampleDataLoaded) return;
|
||||
|
||||
uploadOnboardingData(me).then(() => {
|
||||
me.root.exampleDataLoaded = true;
|
||||
});
|
||||
}
|
||||
}, [shouldUploadOnboardingData]);
|
||||
}
|
||||
|
||||
async function uploadOnboardingData(me: MusicaAccount) {
|
||||
const trackFile = await (await fetch("/example.mp3")).blob();
|
||||
|
||||
return uploadMusicTracks(me, [new File([trackFile], "Example song")]);
|
||||
me.root.exampleDataLoaded = true;
|
||||
|
||||
try {
|
||||
const trackFile = await (await fetch("/example.mp3")).blob();
|
||||
|
||||
await uploadMusicTracks([new File([trackFile], "Example song")]);
|
||||
} catch (error) {
|
||||
me.root.exampleDataLoaded = false;
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,127 @@
|
||||
# jazz-example-onboarding
|
||||
|
||||
## 0.0.43
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1be017d]
|
||||
- jazz-tools@0.9.21
|
||||
- jazz-browser-media-images@0.9.21
|
||||
- jazz-react@0.9.21
|
||||
|
||||
## 0.0.42
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b01cc1f]
|
||||
- jazz-tools@0.9.20
|
||||
- jazz-browser-media-images@0.9.20
|
||||
- jazz-react@0.9.20
|
||||
|
||||
## 0.0.41
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.19
|
||||
- jazz-tools@0.9.19
|
||||
- jazz-browser-media-images@0.9.19
|
||||
|
||||
## 0.0.40
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.18
|
||||
- jazz-tools@0.9.18
|
||||
- jazz-browser-media-images@0.9.18
|
||||
|
||||
## 0.0.39
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2ca1fe]
|
||||
- Updated dependencies [1227047]
|
||||
- jazz-tools@0.9.17
|
||||
- jazz-browser-media-images@0.9.17
|
||||
- jazz-react@0.9.17
|
||||
|
||||
## 0.0.38
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [24b3b6a]
|
||||
- jazz-tools@0.9.16
|
||||
- jazz-browser-media-images@0.9.16
|
||||
- jazz-react@0.9.16
|
||||
|
||||
## 0.0.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7491711]
|
||||
- jazz-tools@0.9.15
|
||||
- jazz-browser-media-images@0.9.15
|
||||
- jazz-react@0.9.15
|
||||
|
||||
## 0.0.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3df93cc]
|
||||
- jazz-tools@0.9.14
|
||||
- jazz-browser-media-images@0.9.14
|
||||
- jazz-react@0.9.14
|
||||
|
||||
## 0.0.35
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
- jazz-browser-media-images@0.9.13
|
||||
|
||||
## 0.0.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
- jazz-browser-media-images@0.9.12
|
||||
|
||||
## 0.0.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.11
|
||||
- jazz-tools@0.9.11
|
||||
- jazz-browser-media-images@0.9.11
|
||||
|
||||
## 0.0.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5e83864]
|
||||
- jazz-react@0.9.10
|
||||
- jazz-tools@0.9.10
|
||||
- jazz-browser-media-images@0.9.10
|
||||
|
||||
## 0.0.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- jazz-tools@0.9.9
|
||||
- jazz-browser-media-images@0.9.9
|
||||
- jazz-react@0.9.9
|
||||
|
||||
## 0.0.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d1d773b]
|
||||
- jazz-tools@0.9.8
|
||||
- jazz-react@0.9.8
|
||||
- jazz-browser-media-images@0.9.8
|
||||
|
||||
## 0.0.29
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,29 +1,54 @@
|
||||
# Onboarding example with Jazz and React
|
||||
|
||||
## Installing & running the example locally
|
||||
## Getting started
|
||||
|
||||
(This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
|
||||
You can either
|
||||
1. Clone the jazz repository, and run the app within the monorepo.
|
||||
2. Or create a new Jazz project using this example as a template.
|
||||
|
||||
Start by downloading the [jazz repository](https://github.com/garden-co/jazz):
|
||||
|
||||
### Using the example as a template
|
||||
|
||||
Create a new Jazz project, and use this example as a template.
|
||||
```bash
|
||||
npx degit gardencmp/jazz jazz
|
||||
npx create-jazz-app@latest --example onboarding --project-name onboarding
|
||||
```
|
||||
|
||||
Go to the onboarding example directory:
|
||||
Go to the new project directory.
|
||||
```bash
|
||||
cd jazz/examples/onboarding
|
||||
cd onboarding
|
||||
```
|
||||
|
||||
Install and build dependencies:
|
||||
Run the dev server.
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Using the monorepo
|
||||
|
||||
This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation).
|
||||
|
||||
Clone the jazz repository.
|
||||
```bash
|
||||
git clone https://github.com/garden-co/jazz.git
|
||||
```
|
||||
|
||||
Install and build dependencies.
|
||||
```bash
|
||||
pnpm i && npx turbo build
|
||||
```
|
||||
|
||||
Start the dev server:
|
||||
Go to the example directory.
|
||||
```bash
|
||||
cd jazz/examples/onboarding/
|
||||
```
|
||||
|
||||
Start the dev server.
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.
|
||||
## Questions / problems / feedback
|
||||
|
||||
If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or open an issue or PR to fix something that seems wrong.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-onboarding",
|
||||
"private": true,
|
||||
"version": "0.0.29",
|
||||
"version": "0.0.43",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,113 @@
|
||||
# organization
|
||||
|
||||
## 0.0.35
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1be017d]
|
||||
- jazz-tools@0.9.21
|
||||
- jazz-react@0.9.21
|
||||
|
||||
## 0.0.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b01cc1f]
|
||||
- jazz-tools@0.9.20
|
||||
- jazz-react@0.9.20
|
||||
|
||||
## 0.0.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.19
|
||||
- jazz-tools@0.9.19
|
||||
|
||||
## 0.0.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.18
|
||||
- jazz-tools@0.9.18
|
||||
|
||||
## 0.0.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2ca1fe]
|
||||
- Updated dependencies [1227047]
|
||||
- jazz-tools@0.9.17
|
||||
- jazz-react@0.9.17
|
||||
|
||||
## 0.0.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [24b3b6a]
|
||||
- jazz-tools@0.9.16
|
||||
- jazz-react@0.9.16
|
||||
|
||||
## 0.0.29
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7491711]
|
||||
- jazz-tools@0.9.15
|
||||
- jazz-react@0.9.15
|
||||
|
||||
## 0.0.28
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3df93cc]
|
||||
- jazz-tools@0.9.14
|
||||
- jazz-react@0.9.14
|
||||
|
||||
## 0.0.27
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.0.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.0.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.11
|
||||
- jazz-tools@0.9.11
|
||||
|
||||
## 0.0.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5e83864]
|
||||
- jazz-react@0.9.10
|
||||
- jazz-tools@0.9.10
|
||||
|
||||
## 0.0.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- jazz-tools@0.9.9
|
||||
- jazz-react@0.9.9
|
||||
|
||||
## 0.0.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d1d773b]
|
||||
- jazz-tools@0.9.8
|
||||
- jazz-react@0.9.8
|
||||
|
||||
## 0.0.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -5,30 +5,56 @@ Different apps have different names for this concept, such as "teams" or "worksp
|
||||
|
||||
Refer to the [documentation](https://jazz.tools/docs/react/design-patterns/organization) for more information.
|
||||
|
||||
## Installing & running the example locally
|
||||
## Getting started
|
||||
|
||||
(This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
|
||||
You can either
|
||||
1. Clone the jazz repository, and run the app within the monorepo.
|
||||
2. Or create a new Jazz project using this example as a template.
|
||||
|
||||
Start by downloading the [jazz repository](https://github.com/garden-co/jazz):
|
||||
|
||||
### Using the example as a template
|
||||
|
||||
Create a new Jazz project, and use this example as a template.
|
||||
```bash
|
||||
npx degit gardencmp/jazz jazz
|
||||
npx create-jazz-app@latest --example organization --project-name organization
|
||||
```
|
||||
|
||||
Go to the organization example directory:
|
||||
Go to the new project directory.
|
||||
```bash
|
||||
cd jazz/examples/organization
|
||||
cd organization
|
||||
```
|
||||
|
||||
Install and build dependencies:
|
||||
Run the dev server.
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Using the monorepo
|
||||
|
||||
This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation).
|
||||
|
||||
Clone the jazz repository.
|
||||
```bash
|
||||
git clone https://github.com/garden-co/jazz.git
|
||||
```
|
||||
|
||||
Install and build dependencies.
|
||||
```bash
|
||||
pnpm i && npx turbo build
|
||||
```
|
||||
|
||||
Start the dev server:
|
||||
Go to the example directory.
|
||||
```bash
|
||||
cd jazz/examples/organization/
|
||||
```
|
||||
|
||||
Start the dev server.
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.
|
||||
|
||||
## Questions / problems / feedback
|
||||
|
||||
If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or open an issue or PR to fix something that seems wrong.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "organization",
|
||||
"private": true,
|
||||
"version": "0.0.21",
|
||||
"version": "0.0.35",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,89 @@
|
||||
# passkey-svelte
|
||||
|
||||
## 0.0.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.21
|
||||
|
||||
## 0.0.29
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.20
|
||||
|
||||
## 0.0.28
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.19
|
||||
|
||||
## 0.0.27
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.18
|
||||
|
||||
## 0.0.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.17
|
||||
|
||||
## 0.0.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.16
|
||||
|
||||
## 0.0.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.15
|
||||
|
||||
## 0.0.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.14
|
||||
|
||||
## 0.0.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.13
|
||||
|
||||
## 0.0.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.12
|
||||
|
||||
## 0.0.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.11
|
||||
|
||||
## 0.0.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.10
|
||||
|
||||
## 0.0.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.9
|
||||
|
||||
## 0.0.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.8
|
||||
|
||||
## 0.0.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -10,34 +10,55 @@ This example showcases how to:
|
||||
- Manage authentication state
|
||||
- Implement secure login/logout flows
|
||||
|
||||
## Getting Started
|
||||
## Getting started
|
||||
|
||||
1. Clone the repository:
|
||||
You can either
|
||||
1. Clone the jazz repository, and run the app within the monorepo.
|
||||
2. Or create a new Jazz project using this example as a template.
|
||||
|
||||
```sh
|
||||
|
||||
### Using the example as a template
|
||||
|
||||
Create a new Jazz project, and use this example as a template.
|
||||
```bash
|
||||
npx create-jazz-app@latest --example passkey-svelte --project-name passkey-svelte
|
||||
```
|
||||
|
||||
Go to the new project directory.
|
||||
```bash
|
||||
cd passkey-svelte
|
||||
```
|
||||
|
||||
Run the dev server.
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Using the monorepo
|
||||
|
||||
This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation).
|
||||
|
||||
Clone the jazz repository.
|
||||
```bash
|
||||
git clone https://github.com/garden-co/jazz.git
|
||||
```
|
||||
|
||||
2. Navigate to the example directory:
|
||||
|
||||
```sh
|
||||
cd examples/passkey-svelte
|
||||
Install and build dependencies.
|
||||
```bash
|
||||
pnpm i && npx turbo build
|
||||
```
|
||||
|
||||
3. Install dependencies:
|
||||
|
||||
```sh
|
||||
pnpm install
|
||||
Go to the example directory.
|
||||
```bash
|
||||
cd jazz/examples/passkey-svelte/
|
||||
```
|
||||
|
||||
4. Start the development server:
|
||||
|
||||
```sh
|
||||
Start the dev server.
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
5. Open your browser and visit [http://localhost:5173](http://localhost:5173)
|
||||
|
||||
Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.
|
||||
|
||||
## Learn More
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "passkey-svelte",
|
||||
"version": "0.0.16",
|
||||
"version": "0.0.30",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,113 @@
|
||||
# minimal-auth-passkey
|
||||
|
||||
## 0.0.40
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1be017d]
|
||||
- jazz-tools@0.9.21
|
||||
- jazz-react@0.9.21
|
||||
|
||||
## 0.0.39
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b01cc1f]
|
||||
- jazz-tools@0.9.20
|
||||
- jazz-react@0.9.20
|
||||
|
||||
## 0.0.38
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.19
|
||||
- jazz-tools@0.9.19
|
||||
|
||||
## 0.0.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.18
|
||||
- jazz-tools@0.9.18
|
||||
|
||||
## 0.0.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2ca1fe]
|
||||
- Updated dependencies [1227047]
|
||||
- jazz-tools@0.9.17
|
||||
- jazz-react@0.9.17
|
||||
|
||||
## 0.0.35
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [24b3b6a]
|
||||
- jazz-tools@0.9.16
|
||||
- jazz-react@0.9.16
|
||||
|
||||
## 0.0.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7491711]
|
||||
- jazz-tools@0.9.15
|
||||
- jazz-react@0.9.15
|
||||
|
||||
## 0.0.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3df93cc]
|
||||
- jazz-tools@0.9.14
|
||||
- jazz-react@0.9.14
|
||||
|
||||
## 0.0.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.0.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.0.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.11
|
||||
- jazz-tools@0.9.11
|
||||
|
||||
## 0.0.29
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5e83864]
|
||||
- jazz-react@0.9.10
|
||||
- jazz-tools@0.9.10
|
||||
|
||||
## 0.0.28
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- jazz-tools@0.9.9
|
||||
- jazz-react@0.9.9
|
||||
|
||||
## 0.0.27
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d1d773b]
|
||||
- jazz-tools@0.9.8
|
||||
- jazz-react@0.9.8
|
||||
|
||||
## 0.0.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -4,30 +4,55 @@ This is an example of how to use passkey authentication with Jazz.
|
||||
|
||||
Live version: https://passkey-demo.jazz.tools
|
||||
|
||||
## Installing & running the example locally
|
||||
## Getting started
|
||||
|
||||
(This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
|
||||
You can either
|
||||
1. Clone the jazz repository, and run the app within the monorepo.
|
||||
2. Or create a new Jazz project using this example as a template.
|
||||
|
||||
Start by downloading the [jazz repository](https://github.com/garden-co/jazz):
|
||||
|
||||
### Using the example as a template
|
||||
|
||||
Create a new Jazz project, and use this example as a template.
|
||||
```bash
|
||||
npx degit gardencmp/jazz jazz
|
||||
npx create-jazz-app@latest --example passkey --project-name passkey
|
||||
```
|
||||
|
||||
Go to the passkey example directory:
|
||||
Go to the new project directory.
|
||||
```bash
|
||||
cd jazz/examples/passkey
|
||||
cd passkey
|
||||
```
|
||||
|
||||
Install and build dependencies:
|
||||
Run the dev server.
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Using the monorepo
|
||||
|
||||
This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation).
|
||||
|
||||
Clone the jazz repository.
|
||||
```bash
|
||||
git clone https://github.com/garden-co/jazz.git
|
||||
```
|
||||
|
||||
Install and build dependencies.
|
||||
```bash
|
||||
pnpm i && npx turbo build
|
||||
```
|
||||
|
||||
Start the dev server:
|
||||
Go to the example directory.
|
||||
```bash
|
||||
cd jazz/examples/passkey/
|
||||
```
|
||||
|
||||
Start the dev server.
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.
|
||||
## Questions / problems / feedback
|
||||
|
||||
If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or open an issue or PR to fix something that seems wrong.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "passkey",
|
||||
"private": true,
|
||||
"version": "0.0.26",
|
||||
"version": "0.0.40",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,113 @@
|
||||
# jazz-password-manager
|
||||
|
||||
## 0.0.61
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1be017d]
|
||||
- jazz-tools@0.9.21
|
||||
- jazz-react@0.9.21
|
||||
|
||||
## 0.0.60
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b01cc1f]
|
||||
- jazz-tools@0.9.20
|
||||
- jazz-react@0.9.20
|
||||
|
||||
## 0.0.59
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.19
|
||||
- jazz-tools@0.9.19
|
||||
|
||||
## 0.0.58
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.18
|
||||
- jazz-tools@0.9.18
|
||||
|
||||
## 0.0.57
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2ca1fe]
|
||||
- Updated dependencies [1227047]
|
||||
- jazz-tools@0.9.17
|
||||
- jazz-react@0.9.17
|
||||
|
||||
## 0.0.56
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [24b3b6a]
|
||||
- jazz-tools@0.9.16
|
||||
- jazz-react@0.9.16
|
||||
|
||||
## 0.0.55
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7491711]
|
||||
- jazz-tools@0.9.15
|
||||
- jazz-react@0.9.15
|
||||
|
||||
## 0.0.54
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3df93cc]
|
||||
- jazz-tools@0.9.14
|
||||
- jazz-react@0.9.14
|
||||
|
||||
## 0.0.53
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.0.52
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.0.51
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.11
|
||||
- jazz-tools@0.9.11
|
||||
|
||||
## 0.0.50
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5e83864]
|
||||
- jazz-react@0.9.10
|
||||
- jazz-tools@0.9.10
|
||||
|
||||
## 0.0.49
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- jazz-tools@0.9.9
|
||||
- jazz-react@0.9.9
|
||||
|
||||
## 0.0.48
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d1d773b]
|
||||
- jazz-tools@0.9.8
|
||||
- jazz-react@0.9.8
|
||||
|
||||
## 0.0.47
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -4,30 +4,56 @@ Live version: https://passwords-demo.jazz.tools
|
||||
|
||||

|
||||
|
||||
## Installing & running the example locally
|
||||
## Getting started
|
||||
|
||||
(This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
|
||||
You can either
|
||||
1. Clone the jazz repository, and run the app within the monorepo.
|
||||
2. Or create a new Jazz project using this example as a template.
|
||||
|
||||
Start by downloading the [jazz repository](https://github.com/garden-co/jazz):
|
||||
|
||||
### Using the example as a template
|
||||
|
||||
Create a new Jazz project, and use this example as a template.
|
||||
```bash
|
||||
npx degit gardencmp/jazz jazz
|
||||
npx create-jazz-app@latest --example password-manager --project-name password-manager
|
||||
```
|
||||
|
||||
Go to the password-manager example directory:
|
||||
Go to the new project directory.
|
||||
```bash
|
||||
cd jazz/examples/password-manager
|
||||
cd password-manager
|
||||
```
|
||||
|
||||
Install and build dependencies:
|
||||
Run the dev server.
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Using the monorepo
|
||||
|
||||
This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation).
|
||||
|
||||
Clone the jazz repository.
|
||||
```bash
|
||||
git clone https://github.com/garden-co/jazz.git
|
||||
```
|
||||
|
||||
Install and build dependencies.
|
||||
```bash
|
||||
pnpm i && npx turbo build
|
||||
```
|
||||
|
||||
Start the dev server:
|
||||
Go to the example directory.
|
||||
```bash
|
||||
cd jazz/examples/password-manager/
|
||||
```
|
||||
|
||||
Start the dev server.
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.
|
||||
|
||||
## Structure
|
||||
|
||||
- [`src/components`](./src/components/): UI components
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-password-manager",
|
||||
"private": true,
|
||||
"version": "0.0.47",
|
||||
"version": "0.0.61",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -12,8 +12,8 @@
|
||||
"clean-install": "rm -rf node_modules pnpm-lock.yaml && pnpm install"
|
||||
},
|
||||
"dependencies": {
|
||||
"jazz-react": "workspace:0.9.4",
|
||||
"jazz-tools": "workspace:0.9.1",
|
||||
"jazz-react": "workspace:0.9.21",
|
||||
"jazz-tools": "workspace:0.9.21",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-hook-form": "^7.41.5",
|
||||
|
||||
@@ -1,5 +1,127 @@
|
||||
# jazz-example-pets
|
||||
|
||||
## 0.0.159
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1be017d]
|
||||
- jazz-tools@0.9.21
|
||||
- jazz-browser-media-images@0.9.21
|
||||
- jazz-react@0.9.21
|
||||
|
||||
## 0.0.158
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b01cc1f]
|
||||
- jazz-tools@0.9.20
|
||||
- jazz-browser-media-images@0.9.20
|
||||
- jazz-react@0.9.20
|
||||
|
||||
## 0.0.157
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.19
|
||||
- jazz-tools@0.9.19
|
||||
- jazz-browser-media-images@0.9.19
|
||||
|
||||
## 0.0.156
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.18
|
||||
- jazz-tools@0.9.18
|
||||
- jazz-browser-media-images@0.9.18
|
||||
|
||||
## 0.0.155
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2ca1fe]
|
||||
- Updated dependencies [1227047]
|
||||
- jazz-tools@0.9.17
|
||||
- jazz-browser-media-images@0.9.17
|
||||
- jazz-react@0.9.17
|
||||
|
||||
## 0.0.154
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [24b3b6a]
|
||||
- jazz-tools@0.9.16
|
||||
- jazz-browser-media-images@0.9.16
|
||||
- jazz-react@0.9.16
|
||||
|
||||
## 0.0.153
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7491711]
|
||||
- jazz-tools@0.9.15
|
||||
- jazz-browser-media-images@0.9.15
|
||||
- jazz-react@0.9.15
|
||||
|
||||
## 0.0.152
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3df93cc]
|
||||
- jazz-tools@0.9.14
|
||||
- jazz-browser-media-images@0.9.14
|
||||
- jazz-react@0.9.14
|
||||
|
||||
## 0.0.151
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
- jazz-browser-media-images@0.9.13
|
||||
|
||||
## 0.0.150
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
- jazz-browser-media-images@0.9.12
|
||||
|
||||
## 0.0.149
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.11
|
||||
- jazz-tools@0.9.11
|
||||
- jazz-browser-media-images@0.9.11
|
||||
|
||||
## 0.0.148
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5e83864]
|
||||
- jazz-react@0.9.10
|
||||
- jazz-tools@0.9.10
|
||||
- jazz-browser-media-images@0.9.10
|
||||
|
||||
## 0.0.147
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- jazz-tools@0.9.9
|
||||
- jazz-browser-media-images@0.9.9
|
||||
- jazz-react@0.9.9
|
||||
|
||||
## 0.0.146
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d1d773b]
|
||||
- jazz-tools@0.9.8
|
||||
- jazz-react@0.9.8
|
||||
- jazz-browser-media-images@0.9.8
|
||||
|
||||
## 0.0.145
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -2,30 +2,55 @@
|
||||
|
||||
Live version: https://pets-demo.jazz.tools/
|
||||
|
||||
## Installing & running the example locally
|
||||
## Getting started
|
||||
|
||||
(This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
|
||||
You can either
|
||||
1. Clone the jazz repository, and run the app within the monorepo.
|
||||
2. Or create a new Jazz project using this example as a template.
|
||||
|
||||
Start by downloading the [jazz repository](https://github.com/garden-co/jazz):
|
||||
|
||||
### Using the example as a template
|
||||
|
||||
Create a new Jazz project, and use this example as a template.
|
||||
```bash
|
||||
npx degit gardencmp/jazz jazz
|
||||
npx create-jazz-app@latest --example pets --project-name pets
|
||||
```
|
||||
|
||||
Go to the pets example directory:
|
||||
Go to the new project directory.
|
||||
```bash
|
||||
cd jazz/examples/pets
|
||||
cd pets
|
||||
```
|
||||
|
||||
Install and build dependencies:
|
||||
Run the dev server.
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Using the monorepo
|
||||
|
||||
This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation).
|
||||
|
||||
Clone the jazz repository.
|
||||
```bash
|
||||
git clone https://github.com/garden-co/jazz.git
|
||||
```
|
||||
|
||||
Install and build dependencies.
|
||||
```bash
|
||||
pnpm i && npx turbo build
|
||||
```
|
||||
|
||||
Start the dev server:
|
||||
Go to the example directory.
|
||||
```bash
|
||||
cd jazz/examples/pets/
|
||||
```
|
||||
|
||||
Start the dev server.
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.
|
||||
|
||||
## Questions / problems / feedback
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-pets",
|
||||
"private": true,
|
||||
"version": "0.0.145",
|
||||
"version": "0.0.159",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -19,9 +19,9 @@
|
||||
"@radix-ui/react-toast": "^1.1.4",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.0.0",
|
||||
"jazz-browser-media-images": "workspace:0.9.1",
|
||||
"jazz-react": "workspace:0.9.4",
|
||||
"jazz-tools": "workspace:0.9.1",
|
||||
"jazz-browser-media-images": "workspace:0.9.21",
|
||||
"jazz-react": "workspace:0.9.21",
|
||||
"jazz-tools": "workspace:0.9.21",
|
||||
"lucide-react": "^0.274.0",
|
||||
"qrcode": "^1.5.3",
|
||||
"react": "^18.3.1",
|
||||
@@ -41,7 +41,7 @@
|
||||
"@vitejs/plugin-react-swc": "^3.3.2",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"is-ci": "^3.0.1",
|
||||
"jazz-run": "workspace:0.9.1",
|
||||
"jazz-run": "workspace:0.9.21",
|
||||
"postcss": "^8.4.27",
|
||||
"tailwindcss": "^3.4.15",
|
||||
"typescript": "~5.6.2",
|
||||
|
||||
@@ -1,5 +1,127 @@
|
||||
# reactions
|
||||
|
||||
## 0.0.39
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1be017d]
|
||||
- jazz-tools@0.9.21
|
||||
- jazz-browser-media-images@0.9.21
|
||||
- jazz-react@0.9.21
|
||||
|
||||
## 0.0.38
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b01cc1f]
|
||||
- jazz-tools@0.9.20
|
||||
- jazz-browser-media-images@0.9.20
|
||||
- jazz-react@0.9.20
|
||||
|
||||
## 0.0.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.19
|
||||
- jazz-tools@0.9.19
|
||||
- jazz-browser-media-images@0.9.19
|
||||
|
||||
## 0.0.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.18
|
||||
- jazz-tools@0.9.18
|
||||
- jazz-browser-media-images@0.9.18
|
||||
|
||||
## 0.0.35
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2ca1fe]
|
||||
- Updated dependencies [1227047]
|
||||
- jazz-tools@0.9.17
|
||||
- jazz-browser-media-images@0.9.17
|
||||
- jazz-react@0.9.17
|
||||
|
||||
## 0.0.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [24b3b6a]
|
||||
- jazz-tools@0.9.16
|
||||
- jazz-browser-media-images@0.9.16
|
||||
- jazz-react@0.9.16
|
||||
|
||||
## 0.0.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7491711]
|
||||
- jazz-tools@0.9.15
|
||||
- jazz-browser-media-images@0.9.15
|
||||
- jazz-react@0.9.15
|
||||
|
||||
## 0.0.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3df93cc]
|
||||
- jazz-tools@0.9.14
|
||||
- jazz-browser-media-images@0.9.14
|
||||
- jazz-react@0.9.14
|
||||
|
||||
## 0.0.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
- jazz-browser-media-images@0.9.13
|
||||
|
||||
## 0.0.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
- jazz-browser-media-images@0.9.12
|
||||
|
||||
## 0.0.29
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.11
|
||||
- jazz-tools@0.9.11
|
||||
- jazz-browser-media-images@0.9.11
|
||||
|
||||
## 0.0.28
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5e83864]
|
||||
- jazz-react@0.9.10
|
||||
- jazz-tools@0.9.10
|
||||
- jazz-browser-media-images@0.9.10
|
||||
|
||||
## 0.0.27
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- jazz-tools@0.9.9
|
||||
- jazz-browser-media-images@0.9.9
|
||||
- jazz-react@0.9.9
|
||||
|
||||
## 0.0.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d1d773b]
|
||||
- jazz-tools@0.9.8
|
||||
- jazz-react@0.9.8
|
||||
- jazz-browser-media-images@0.9.8
|
||||
|
||||
## 0.0.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -2,30 +2,56 @@
|
||||
|
||||
Live version: [https://reactions-demo.jazz.tools](https://reactions-demo.jazz.tools)
|
||||
|
||||
## Installing & running the example locally
|
||||
## Getting started
|
||||
|
||||
(This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
|
||||
You can either
|
||||
1. Clone the jazz repository, and run the app within the monorepo.
|
||||
2. Or create a new Jazz project using this example as a template.
|
||||
|
||||
Start by downloading the [jazz repository](https://github.com/garden-co/jazz):
|
||||
|
||||
### Using the example as a template
|
||||
|
||||
Create a new Jazz project, and use this example as a template.
|
||||
```bash
|
||||
npx degit gardencmp/jazz jazz
|
||||
npx create-jazz-app@latest --example reactions --project-name reactions
|
||||
```
|
||||
|
||||
Go to the reactions example directory:
|
||||
Go to the new project directory.
|
||||
```bash
|
||||
cd jazz/examples/reactions
|
||||
cd reactions
|
||||
```
|
||||
|
||||
Install and build dependencies:
|
||||
Run the dev server.
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Using the monorepo
|
||||
|
||||
This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation).
|
||||
|
||||
Clone the jazz repository.
|
||||
```bash
|
||||
git clone https://github.com/garden-co/jazz.git
|
||||
```
|
||||
|
||||
Install and build dependencies.
|
||||
```bash
|
||||
pnpm i && npx turbo build
|
||||
```
|
||||
|
||||
Start the dev server:
|
||||
Go to the example directory.
|
||||
```bash
|
||||
cd jazz/examples/reactions/
|
||||
```
|
||||
|
||||
Start the dev server.
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.
|
||||
|
||||
## Questions / problems / feedback
|
||||
|
||||
If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or open an issue or PR to fix something that seems wrong.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "reactions",
|
||||
"private": true,
|
||||
"version": "0.0.25",
|
||||
"version": "0.0.39",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,127 @@
|
||||
# todo-vue
|
||||
|
||||
## 0.0.44
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1be017d]
|
||||
- jazz-tools@0.9.21
|
||||
- jazz-browser@0.9.21
|
||||
- jazz-vue@0.9.21
|
||||
|
||||
## 0.0.43
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b01cc1f]
|
||||
- jazz-tools@0.9.20
|
||||
- jazz-browser@0.9.20
|
||||
- jazz-vue@0.9.20
|
||||
|
||||
## 0.0.42
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.9.19
|
||||
- jazz-tools@0.9.19
|
||||
- jazz-vue@0.9.19
|
||||
|
||||
## 0.0.41
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.9.18
|
||||
- jazz-tools@0.9.18
|
||||
- jazz-vue@0.9.18
|
||||
|
||||
## 0.0.40
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2ca1fe]
|
||||
- Updated dependencies [1227047]
|
||||
- jazz-tools@0.9.17
|
||||
- jazz-browser@0.9.17
|
||||
- jazz-vue@0.9.17
|
||||
|
||||
## 0.0.39
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [24b3b6a]
|
||||
- jazz-tools@0.9.16
|
||||
- jazz-browser@0.9.16
|
||||
- jazz-vue@0.9.16
|
||||
|
||||
## 0.0.38
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7491711]
|
||||
- jazz-tools@0.9.15
|
||||
- jazz-browser@0.9.15
|
||||
- jazz-vue@0.9.15
|
||||
|
||||
## 0.0.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3df93cc]
|
||||
- jazz-tools@0.9.14
|
||||
- jazz-browser@0.9.14
|
||||
- jazz-vue@0.9.14
|
||||
|
||||
## 0.0.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
- jazz-vue@0.9.13
|
||||
|
||||
## 0.0.35
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
- jazz-vue@0.9.12
|
||||
|
||||
## 0.0.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.9.11
|
||||
- jazz-tools@0.9.11
|
||||
- jazz-vue@0.9.11
|
||||
|
||||
## 0.0.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5e83864]
|
||||
- jazz-tools@0.9.10
|
||||
- jazz-browser@0.9.10
|
||||
- jazz-vue@0.9.10
|
||||
|
||||
## 0.0.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- jazz-tools@0.9.9
|
||||
- jazz-browser@0.9.9
|
||||
- jazz-vue@0.9.9
|
||||
|
||||
## 0.0.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d1d773b]
|
||||
- jazz-tools@0.9.8
|
||||
- jazz-browser@0.9.8
|
||||
- jazz-vue@0.9.8
|
||||
|
||||
## 0.0.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,29 +1,55 @@
|
||||
# Todo list example with Jazz and Vue
|
||||
|
||||
## Installing & running the example locally
|
||||
## Getting started
|
||||
|
||||
(This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
|
||||
You can either
|
||||
1. Clone the jazz repository, and run the app within the monorepo.
|
||||
2. Or create a new Jazz project using this example as a template.
|
||||
|
||||
Start by downloading the [jazz repository](https://github.com/garden-co/jazz):
|
||||
|
||||
### Using the example as a template
|
||||
|
||||
Create a new Jazz project, and use this example as a template.
|
||||
```bash
|
||||
npx degit gardencmp/jazz jazz
|
||||
npx create-jazz-app@latest --example todo-vue --project-name todo-vue
|
||||
```
|
||||
|
||||
Go to the todo-vue example directory:
|
||||
Go to the new project directory.
|
||||
```bash
|
||||
cd jazz/examples/todo-vue
|
||||
cd todo-vue
|
||||
```
|
||||
|
||||
Install and build dependencies:
|
||||
Run the dev server.
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Using the monorepo
|
||||
|
||||
This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation).
|
||||
|
||||
Clone the jazz repository.
|
||||
```bash
|
||||
git clone https://github.com/garden-co/jazz.git
|
||||
```
|
||||
|
||||
Install and build dependencies.
|
||||
```bash
|
||||
pnpm i && npx turbo build
|
||||
```
|
||||
|
||||
Start the dev server:
|
||||
Go to the example directory.
|
||||
```bash
|
||||
cd jazz/examples/todo-vue/
|
||||
```
|
||||
|
||||
Start the dev server.
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.
|
||||
|
||||
## Questions / problems / feedback
|
||||
|
||||
If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or open an issue or PR to fix something that seems wrong.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "todo-vue",
|
||||
"version": "0.0.30",
|
||||
"version": "0.0.44",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,113 @@
|
||||
# jazz-example-todo
|
||||
|
||||
## 0.0.158
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1be017d]
|
||||
- jazz-tools@0.9.21
|
||||
- jazz-react@0.9.21
|
||||
|
||||
## 0.0.157
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b01cc1f]
|
||||
- jazz-tools@0.9.20
|
||||
- jazz-react@0.9.20
|
||||
|
||||
## 0.0.156
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.19
|
||||
- jazz-tools@0.9.19
|
||||
|
||||
## 0.0.155
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.18
|
||||
- jazz-tools@0.9.18
|
||||
|
||||
## 0.0.154
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2ca1fe]
|
||||
- Updated dependencies [1227047]
|
||||
- jazz-tools@0.9.17
|
||||
- jazz-react@0.9.17
|
||||
|
||||
## 0.0.153
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [24b3b6a]
|
||||
- jazz-tools@0.9.16
|
||||
- jazz-react@0.9.16
|
||||
|
||||
## 0.0.152
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7491711]
|
||||
- jazz-tools@0.9.15
|
||||
- jazz-react@0.9.15
|
||||
|
||||
## 0.0.151
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3df93cc]
|
||||
- jazz-tools@0.9.14
|
||||
- jazz-react@0.9.14
|
||||
|
||||
## 0.0.150
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.0.149
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.0.148
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.11
|
||||
- jazz-tools@0.9.11
|
||||
|
||||
## 0.0.147
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5e83864]
|
||||
- jazz-react@0.9.10
|
||||
- jazz-tools@0.9.10
|
||||
|
||||
## 0.0.146
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- jazz-tools@0.9.9
|
||||
- jazz-react@0.9.9
|
||||
|
||||
## 0.0.145
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d1d773b]
|
||||
- jazz-tools@0.9.8
|
||||
- jazz-react@0.9.8
|
||||
|
||||
## 0.0.144
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -2,30 +2,56 @@
|
||||
|
||||
Live version: https://todo-demo.jazz.tools/
|
||||
|
||||
## Installing & running the example locally
|
||||
## Getting started
|
||||
|
||||
(This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
|
||||
You can either
|
||||
1. Clone the jazz repository, and run the app within the monorepo.
|
||||
2. Or create a new Jazz project using this example as a template.
|
||||
|
||||
Start by downloading the [jazz repository](https://github.com/garden-co/jazz):
|
||||
|
||||
### Using the example as a template
|
||||
|
||||
Create a new Jazz project, and use this example as a template.
|
||||
```bash
|
||||
npx degit gardencmp/jazz jazz
|
||||
npx create-jazz-app@latest --example todo --project-name todo
|
||||
```
|
||||
|
||||
Go to the todo example directory:
|
||||
Go to the new project directory.
|
||||
```bash
|
||||
cd jazz/examples/todo
|
||||
cd todo
|
||||
```
|
||||
|
||||
Install and build dependencies:
|
||||
Run the dev server.
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Using the monorepo
|
||||
|
||||
This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation).
|
||||
|
||||
Clone the jazz repository.
|
||||
```bash
|
||||
git clone https://github.com/garden-co/jazz.git
|
||||
```
|
||||
|
||||
Install and build dependencies.
|
||||
```bash
|
||||
pnpm i && npx turbo build
|
||||
```
|
||||
|
||||
Start the dev server:
|
||||
Go to the example directory.
|
||||
```bash
|
||||
cd jazz/examples/todo/
|
||||
```
|
||||
|
||||
Start the dev server.
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.
|
||||
|
||||
## Structure
|
||||
|
||||
- [`src/basicComponents`](./src/basicComponents): simple components to build the UI, unrelated to Jazz (uses [shadcn/ui](https://ui.shadcn.com))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-todo",
|
||||
"private": true,
|
||||
"version": "0.0.144",
|
||||
"version": "0.0.158",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -16,8 +16,8 @@
|
||||
"@radix-ui/react-toast": "^1.1.4",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.0.0",
|
||||
"jazz-react": "workspace:0.9.4",
|
||||
"jazz-tools": "workspace:0.9.1",
|
||||
"jazz-react": "workspace:0.9.21",
|
||||
"jazz-tools": "workspace:0.9.21",
|
||||
"lucide-react": "^0.274.0",
|
||||
"qrcode": "^1.5.3",
|
||||
"react": "^18.3.1",
|
||||
|
||||
@@ -70,7 +70,6 @@ ReactDOM.createRoot(document.getElementById("root")!).render(
|
||||
</JazzAndAuth>
|
||||
</div>
|
||||
</ThemeProvider>
|
||||
,
|
||||
</React.StrictMode>,
|
||||
);
|
||||
|
||||
|
||||
@@ -1,5 +1,113 @@
|
||||
# version-history
|
||||
|
||||
## 0.0.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1be017d]
|
||||
- jazz-tools@0.9.21
|
||||
- jazz-react@0.9.21
|
||||
|
||||
## 0.0.35
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b01cc1f]
|
||||
- jazz-tools@0.9.20
|
||||
- jazz-react@0.9.20
|
||||
|
||||
## 0.0.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.19
|
||||
- jazz-tools@0.9.19
|
||||
|
||||
## 0.0.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.18
|
||||
- jazz-tools@0.9.18
|
||||
|
||||
## 0.0.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2ca1fe]
|
||||
- Updated dependencies [1227047]
|
||||
- jazz-tools@0.9.17
|
||||
- jazz-react@0.9.17
|
||||
|
||||
## 0.0.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [24b3b6a]
|
||||
- jazz-tools@0.9.16
|
||||
- jazz-react@0.9.16
|
||||
|
||||
## 0.0.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7491711]
|
||||
- jazz-tools@0.9.15
|
||||
- jazz-react@0.9.15
|
||||
|
||||
## 0.0.29
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3df93cc]
|
||||
- jazz-tools@0.9.14
|
||||
- jazz-react@0.9.14
|
||||
|
||||
## 0.0.28
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
|
||||
## 0.0.27
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
|
||||
## 0.0.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.11
|
||||
- jazz-tools@0.9.11
|
||||
|
||||
## 0.0.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5e83864]
|
||||
- jazz-react@0.9.10
|
||||
- jazz-tools@0.9.10
|
||||
|
||||
## 0.0.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- jazz-tools@0.9.9
|
||||
- jazz-react@0.9.9
|
||||
|
||||
## 0.0.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d1d773b]
|
||||
- jazz-tools@0.9.8
|
||||
- jazz-react@0.9.8
|
||||
|
||||
## 0.0.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -2,30 +2,56 @@
|
||||
|
||||
A minimal example showing how to use Jazz's built-in version history to show and restore changes.
|
||||
|
||||
## Installing & running the example locally
|
||||
## Getting started
|
||||
|
||||
(This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
|
||||
You can either
|
||||
1. Clone the jazz repository, and run the app within the monorepo.
|
||||
2. Or create a new Jazz project using this example as a template.
|
||||
|
||||
Start by downloading the [jazz repository](https://github.com/garden-co/jazz):
|
||||
|
||||
### Using the example as a template
|
||||
|
||||
Create a new Jazz project, and use this example as a template.
|
||||
```bash
|
||||
npx degit gardencmp/jazz jazz
|
||||
npx create-jazz-app@latest --example version-history --project-name version-history
|
||||
```
|
||||
|
||||
Go to the version-history example directory:
|
||||
Go to the new project directory.
|
||||
```bash
|
||||
cd jazz/examples/version-history
|
||||
cd version-history
|
||||
```
|
||||
|
||||
Install and build dependencies:
|
||||
Run the dev server.
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Using the monorepo
|
||||
|
||||
This requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation).
|
||||
|
||||
Clone the jazz repository.
|
||||
```bash
|
||||
git clone https://github.com/garden-co/jazz.git
|
||||
```
|
||||
|
||||
Install and build dependencies.
|
||||
```bash
|
||||
pnpm i && npx turbo build
|
||||
```
|
||||
|
||||
Start the dev server:
|
||||
Go to the example directory.
|
||||
```bash
|
||||
cd jazz/examples/version-history/
|
||||
```
|
||||
|
||||
Start the dev server.
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open [http://localhost:5173](http://localhost:5173) with your browser to see the result.
|
||||
|
||||
## Questions / problems / feedback
|
||||
|
||||
If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or open an issue or PR to fix something that seems wrong.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "version-history",
|
||||
"private": true,
|
||||
"version": "0.0.22",
|
||||
"version": "0.0.36",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
12
flake.lock
generated
12
flake.lock
generated
@@ -5,11 +5,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726560853,
|
||||
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -20,11 +20,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1730785428,
|
||||
"narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=",
|
||||
"lastModified": 1737885589,
|
||||
"narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7",
|
||||
"rev": "852ff1d9e153d8875a83602e03fdef8a63f0ecf8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -18,12 +18,15 @@
|
||||
buildInputs = with pkgs; [
|
||||
nodejs_22
|
||||
nodePackages.pnpm
|
||||
git
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
echo ""
|
||||
echo "Welcome to the Jazz development environment!"
|
||||
echo "Run 'pnpm install' to install the dependencies."
|
||||
echo ""
|
||||
'';
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,14 +61,6 @@ const team: Array<TeamMember> = [
|
||||
location: "Portsmouth, UK ",
|
||||
github: "bensleveritt",
|
||||
},
|
||||
{
|
||||
name: "Marina Orlova",
|
||||
titles: ["Full-Stack Dev"],
|
||||
location: "Tarragona, Spain ",
|
||||
linkedin: "marina-orlova-52a34394",
|
||||
github: "marinoska",
|
||||
image: "marina.jpeg",
|
||||
},
|
||||
{
|
||||
name: "Giordano Ricci",
|
||||
titles: ["Full-Stack Dev", "DevOps"],
|
||||
|
||||
3
homepage/homepage/.gitignore
vendored
3
homepage/homepage/.gitignore
vendored
@@ -40,3 +40,6 @@ codeSamples
|
||||
.turbo
|
||||
|
||||
.env
|
||||
|
||||
# LLM docs
|
||||
public/llms*.txt
|
||||
|
||||
@@ -125,7 +125,7 @@ export function CreateOrder() {
|
||||
const [draft, setDraft] = useState<DraftBubbleTeaOrder>();
|
||||
|
||||
useEffect(() => {
|
||||
setDraft(DraftBubbleTeaOrder.create({}, { owner: me }));
|
||||
setDraft(DraftBubbleTeaOrder.create({}));
|
||||
}, [me?.id]);
|
||||
|
||||
const onSave = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
@@ -179,7 +179,7 @@ export function CreateOrder() { // old
|
||||
const [draft, setDraft] = useState<DraftBubbleTeaOrder>(); // old
|
||||
|
||||
useEffect(() => { // old
|
||||
setDraft(DraftBubbleTeaOrder.create({}, { owner: me })); // old
|
||||
setDraft(DraftBubbleTeaOrder.create({})); // old
|
||||
}, [me?.id]); // old
|
||||
|
||||
const onSave = (e: React.FormEvent<HTMLFormElement>) => { // old
|
||||
@@ -229,14 +229,10 @@ export class JazzAccount extends Account {
|
||||
root = co.ref(AccountRoot);
|
||||
|
||||
migrate(this: JazzAccount, creationProps?: { name: string }) {
|
||||
super.migrate(creationProps);
|
||||
if (this.root === undefined) {
|
||||
const draft = DraftBubbleTeaOrder.create({});
|
||||
|
||||
if (!this._refs.root) {
|
||||
const ownership = { owner: this };
|
||||
|
||||
const draft = DraftBubbleTeaOrder.create({}, ownership);
|
||||
|
||||
this.root = AccountRoot.create({ draft }, ownership);
|
||||
this.root = AccountRoot.create({ draft });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -303,11 +299,11 @@ export function CreateOrder() {// old
|
||||
|
||||
// create a new empty draft
|
||||
me.root.draft = DraftBubbleTeaOrder.create(
|
||||
{}, { owner: me },
|
||||
{},
|
||||
);
|
||||
};// old
|
||||
|
||||
return <CreateOrderForm id={me?.root?.draft.id} onSave={onSave} />
|
||||
return <CreateOrderForm id={me.root.draft.id} onSave={onSave} />
|
||||
} // old
|
||||
|
||||
function CreateOrderForm({
|
||||
|
||||
@@ -54,11 +54,9 @@ export class JazzAccount extends Account {
|
||||
root = co.ref(JazzAccountRoot);
|
||||
|
||||
async migrate() {
|
||||
if (!this._refs.root) {
|
||||
if (this.root === undefined) {
|
||||
// Using a Group as an owner allows you to give access to other users
|
||||
const initialOrganizationOwnership = {
|
||||
owner: Group.create({ owner: this }),
|
||||
};
|
||||
const organizationGroup = Group.create();
|
||||
|
||||
const organizations = ListOfOrganizations.create(
|
||||
[
|
||||
@@ -66,17 +64,15 @@ export class JazzAccount extends Account {
|
||||
Organization.create(
|
||||
{
|
||||
name: "My organization",
|
||||
projects: ListOfProjects.create([], initialOrganizationOwnership),
|
||||
projects: ListOfProjects.create([], organizationGroup),
|
||||
},
|
||||
initialOrganizationOwnership,
|
||||
organizationGroup,
|
||||
),
|
||||
],
|
||||
{ owner: this },
|
||||
);
|
||||
|
||||
this.root = JazzAccountRoot.create(
|
||||
{ organizations },
|
||||
{ owner: this },
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -101,22 +97,27 @@ When the user accepts the invite, add the `Organization` to the user's `organiza
|
||||
|
||||
<CodeGroup>
|
||||
```ts
|
||||
const onAccept = (organizationId: ID<Organization>) => {
|
||||
if (me?.root?.organizations) {
|
||||
Organization.load(organizationId, me, []).then((organization) => {
|
||||
if (organization) {
|
||||
// Avoid duplicates
|
||||
const ids = me.root.organizations.map(
|
||||
(organization) => organization?.id,
|
||||
);
|
||||
const onAccept = async (organizationId: ID<Organization>) => {
|
||||
const me = await MusicaAccount.getMe().ensureLoaded({
|
||||
root: {
|
||||
organizations: [],
|
||||
},
|
||||
});
|
||||
|
||||
if (ids.includes(organizationId)) return;
|
||||
if (!me) throw new Error("Failed to load account data");
|
||||
|
||||
me.root.organizations.push(organization);
|
||||
navigate("/organizations/" + organizationId);
|
||||
}
|
||||
});
|
||||
}
|
||||
const organization = await Organization.load(organizationId, []);
|
||||
|
||||
if (!organization) throw new Error("Failed to load organization data");
|
||||
|
||||
const ids = me.root.organizations.map(
|
||||
(organization) => organization?.id,
|
||||
);
|
||||
|
||||
if (ids.includes(organizationId)) return;
|
||||
|
||||
me.root.organizations.push(organization);
|
||||
navigate("/organizations/" + organizationId);
|
||||
};
|
||||
|
||||
useAcceptInvite({
|
||||
|
||||
@@ -36,9 +36,9 @@ You can add group members by ID by using `Account.load` and `Group.addMember`.
|
||||
```tsx
|
||||
import { Group, Account } from "jazz-tools";
|
||||
|
||||
const group = Group.create({ owner: me });
|
||||
const group = Group.create();
|
||||
|
||||
const bob = await Account.load(bobsID, me, []);
|
||||
const bob = await Account.load(bobsID, []);
|
||||
group.addMember(bob, "writer");
|
||||
```
|
||||
</CodeGroup>
|
||||
@@ -49,7 +49,7 @@ Note: if the account ID is of type `string`, because it comes from a URL paramet
|
||||
```tsx
|
||||
import { Group, Account, ID } from "jazz-tools";
|
||||
|
||||
const bob = await Account.load(bobsID as ID<Account>, me, []);
|
||||
const bob = await Account.load(bobsID as ID<Account>, []);
|
||||
group.addMember(bob, "writer");
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
@@ -13,7 +13,7 @@ access to "everyone".
|
||||
|
||||
<CodeGroup>
|
||||
```ts
|
||||
const group = Group.create({ owner: me });
|
||||
const group = Group.create();
|
||||
group.addMember("everyone", "writer"); // *highlight*
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
@@ -186,10 +186,8 @@ Now, finally, let's implement creating an issue:
|
||||
import { useState } from "react"; // old
|
||||
import { Issue } from "./schema"; // old
|
||||
import { IssueComponent } from "./components/Issue.tsx"; // old
|
||||
import { useAccount } from "jazz-react";
|
||||
// old
|
||||
function App() {// old
|
||||
const { me } = useAccount();
|
||||
const [issue, setIssue] = useState<Issue>(); // old
|
||||
// old
|
||||
const createIssue = () => {
|
||||
@@ -200,7 +198,6 @@ function App() {// old
|
||||
estimate: 5,
|
||||
status: "backlog",
|
||||
},
|
||||
{ owner: me },
|
||||
);
|
||||
setIssue(newIssue);
|
||||
};
|
||||
@@ -234,7 +231,7 @@ We'll already notice one interesting thing here:
|
||||
|
||||
- We have to create every CoValue with an `owner`!
|
||||
- this will determine access rights on the CoValue, which we'll learn about in "Groups & Permissions"
|
||||
- here we set `owner` to the current user `me`, which we get from the Jazz context / `useAccount`
|
||||
- here the `owner` is set automatically to a group managed by the current user because we have not declared any
|
||||
|
||||
**Behind the scenes, Jazz not only creates the Issue in memory but also automatically syncs an encrypted version to the cloud and persists it locally. The Issue also has a globally unique ID.**
|
||||
|
||||
@@ -260,11 +257,10 @@ Let's modify `src/App.tsx`:
|
||||
import { useState } from "react"; // old
|
||||
import { Issue } from "./schema"; // old
|
||||
import { IssueComponent } from "./components/Issue.tsx"; // old
|
||||
import { useAccount, useCoState } from "jazz-react";
|
||||
import { useCoState } from "jazz-react";
|
||||
import { ID } from "jazz-tools"
|
||||
// old
|
||||
function App() { // old
|
||||
const { me } = useAccount(); // old
|
||||
const [issueID, setIssueID] = useState<ID<Issue>>();
|
||||
// old
|
||||
const issue = useCoState(Issue, issueID);
|
||||
@@ -277,7 +273,6 @@ function App() { // old
|
||||
estimate: 5, // old
|
||||
status: "backlog", // old
|
||||
}, // old
|
||||
{ owner: me }, // old
|
||||
); // old
|
||||
setIssueID(newIssue.id);
|
||||
}; // old
|
||||
@@ -381,10 +376,9 @@ This works because CoValues
|
||||
<CodeGroup size="sm">
|
||||
```ts
|
||||
function useCoState<V extends CoValue>(Schema: CoValueClass<V>, id?: ID<V>): V | undefined {
|
||||
const { me } = useAccount();
|
||||
const [value, setValue] = useState<V>();
|
||||
|
||||
useEffect(() => Schema.subscribe(id, me, [], setValue), [id]);
|
||||
useEffect(() => Schema.subscribe(id, [], setValue), [id]);
|
||||
|
||||
return value;
|
||||
}
|
||||
@@ -409,11 +403,10 @@ So let's store the ID in the browser's URL and make sure our useState is in sync
|
||||
import { useState } from "react"; // old
|
||||
import { Issue } from "./schema"; // old
|
||||
import { IssueComponent } from "./components/Issue.tsx"; // old
|
||||
import { useAccount, useCoState } from "jazz-react"; // old
|
||||
import { useCoState } from "jazz-react"; // old
|
||||
import { ID } from "jazz-tools" // old
|
||||
// old
|
||||
function App() { // old
|
||||
const { me } = useAccount(); // old
|
||||
const [issueID, setIssueID] = useState<ID<Issue> | undefined>(
|
||||
(window.location.search?.replace("?issue=", "") || undefined) as ID<Issue> | undefined,
|
||||
);
|
||||
@@ -428,7 +421,6 @@ function App() { // old
|
||||
estimate: 5, // old
|
||||
status: "backlog", // old
|
||||
}, // old
|
||||
{ owner: me }, // old
|
||||
); // old
|
||||
setIssueID(newIssue.id); // old
|
||||
window.history.pushState({}, "", `?issue=${newIssue.id}`);
|
||||
@@ -470,7 +462,7 @@ All we have to do is create a new group to own each new issue and add "everyone"
|
||||
import { useState } from "react"; // old
|
||||
import { Issue } from "./schema"; // old
|
||||
import { IssueComponent } from "./components/Issue.tsx"; // old
|
||||
import { useAccount, useCoState } from "jazz-react"; // old
|
||||
import { useCoState } from "jazz-react"; // old
|
||||
import { ID, Group } from "jazz-tools"
|
||||
// old
|
||||
function App() { // old
|
||||
@@ -564,11 +556,9 @@ First, we'll change `App.tsx` to create and render `Project`s instead of `Issue`
|
||||
import { useState } from "react"; // old
|
||||
import { Project, ListOfIssues } from "./schema";
|
||||
import { ProjectComponent } from "./components/Project.tsx";
|
||||
import { useAccount } from "jazz-react";
|
||||
import { ID, Group } from "jazz-tools"
|
||||
// old
|
||||
function App() { // old
|
||||
const { me } = useAccount(); // old
|
||||
const [projectID, setProjectID] = useState<ID<Project> | undefined>(
|
||||
(window.location.search?.replace("?project=", "") || undefined) as ID<Project> | undefined
|
||||
);
|
||||
@@ -576,7 +566,7 @@ function App() { // old
|
||||
const issue = useCoState(Issue, issueID); // *bin*
|
||||
// old
|
||||
const createProject = () => {
|
||||
const group = Group.create({ owner: me });
|
||||
const group = Group.create();
|
||||
group.addMember("everyone", "writer");
|
||||
|
||||
const newProject = Project.create(
|
||||
@@ -584,7 +574,7 @@ function App() { // old
|
||||
name: "New Project",
|
||||
issues: ListOfIssues.create([], { owner: group })
|
||||
},
|
||||
{ owner: group },
|
||||
group,
|
||||
);
|
||||
setProjectID(newProject.id);
|
||||
window.history.pushState({}, "", `?project=${newProject.id}`);
|
||||
@@ -622,7 +612,7 @@ export function ProjectComponent({ projectID }: { projectID: ID<Project> }) {
|
||||
description: "",
|
||||
estimate: 0,
|
||||
status: "backlog",
|
||||
}, { owner: project._owner }));
|
||||
}, project._owner));
|
||||
};
|
||||
|
||||
return project ? (
|
||||
@@ -673,7 +663,7 @@ export function ProjectComponent({ projectID }: { projectID: ID<Project> }) {//
|
||||
description: "",// old
|
||||
estimate: 0,// old
|
||||
status: "backlog",// old
|
||||
}, { owner: project._owner }));// old
|
||||
}, project._owner));// old
|
||||
};// old
|
||||
// old
|
||||
return project ? (// old
|
||||
@@ -731,17 +721,15 @@ Turns out, we're already mostly there! First, let's remove making the Project pu
|
||||
import { useState } from "react"; // old
|
||||
import { Project, ListOfIssues } from "./schema"; // old
|
||||
import { ProjectComponent } from "./components/Project.tsx"; // old
|
||||
import { useAccount } from "jazz-react"; // old
|
||||
import { ID, Group } from "jazz-tools" // old
|
||||
// old
|
||||
function App() { // old
|
||||
const { me } = useAccount(); // old
|
||||
const [projectID, setProjectID] = useState<ID<Project> | undefined>( // old
|
||||
(window.location.search?.replace("?project=", "") || undefined) as ID<Project> | undefined, // old
|
||||
); // old
|
||||
// old
|
||||
const createProject = () => { // old
|
||||
const group = Group.create({ owner: me }); // old
|
||||
const group = Group.create(); // old
|
||||
group.addMember("everyone", "writer"); // *bin*
|
||||
// old
|
||||
const newProject = Project.create( // old
|
||||
@@ -749,7 +737,7 @@ function App() { // old
|
||||
name: "New Project", // old
|
||||
issues: ListOfIssues.create([], { owner: group }) // old
|
||||
}, // old
|
||||
{ owner: group }, // old
|
||||
group, // old
|
||||
); // old
|
||||
setProjectID(newProject.id); // old
|
||||
window.history.pushState({}, "", `?project=${newProject.id}`); // old
|
||||
@@ -792,7 +780,7 @@ export function ProjectComponent({ projectID }: { projectID: ID<Project> }) {//
|
||||
description: "",// old
|
||||
estimate: 0,// old
|
||||
status: "backlog",// old
|
||||
}, { owner: project._owner }));// old
|
||||
}, project._owner));// old
|
||||
};// old
|
||||
// old
|
||||
return project ? (// old
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import DocsLayout from "@/app/docs/[framework]/(others)/layout";
|
||||
import { TableOfContents } from "@/components/docs/TableOfContents";
|
||||
import ComingSoonPage from "@/components/docs/coming-soon.mdx";
|
||||
import { docNavigationItems } from "@/lib/docNavigationItems";
|
||||
import { docNavigationItems } from "@/lib/docNavigationItems.js";
|
||||
import { Framework, frameworks } from "@/lib/framework";
|
||||
import type { Toc } from "@stefanprobst/rehype-extract-toc";
|
||||
import { Prose } from "gcmp-design-system/src/app/components/molecules/Prose";
|
||||
|
||||
@@ -186,19 +186,40 @@ Lastly, ensure that the `"main"` field in your `package.json` points to `index.j
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
## Using Jazz
|
||||
## Setting up the provider
|
||||
|
||||
### `createJazzRNApp()`
|
||||
|
||||
Create a file `jazz.tsx` with the following contents:
|
||||
Wrap your app components with the `JazzProvider:
|
||||
|
||||
<CodeGroup>
|
||||
```tsx
|
||||
import { createJazzRNApp } from "jazz-react-native";
|
||||
```tsx
|
||||
import { JazzProvider, useDemoAuth, DemoAuthBasicUI } from "jazz-react-native";
|
||||
import { MyAppAccount } from "./schema";
|
||||
|
||||
export const Jazz = createJazzRNApp();
|
||||
export const { useAccount, useCoState, useAcceptInvite } = Jazz;
|
||||
```
|
||||
|
||||
export function JazzAndAuth({ children }: { children: React.ReactNode }) {
|
||||
const [auth, state] = useDemoAuth();
|
||||
|
||||
return (
|
||||
<>
|
||||
<JazzProvider
|
||||
auth={auth}
|
||||
peer="wss://cloud.jazz.tools/?key=you@example.com"
|
||||
AccountSchema={MyAppAccount}
|
||||
>
|
||||
{children}
|
||||
</JazzProvider>
|
||||
<DemoAuthBasicUI appName="My App" state={state} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
// Register the Account schema so `useAccount` returns our custom `MyAppAccount`
|
||||
declare module "jazz-react-native" {
|
||||
interface Register {
|
||||
Account: MyAppAccount;
|
||||
}
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
You can optionally pass a custom `kvStore` and `AccountSchema` to `createJazzRNApp()`, otherwise, it defaults to `ExpoSecureStoreAdapter` and `Account`.
|
||||
@@ -219,24 +240,77 @@ In the demos, you'll find details on:
|
||||
|
||||
### Working with Images
|
||||
|
||||
To work with images in Jazz, import the `createImage` function from [`jazz-react-native-media-images`](https://github.com/garden-co/jazz/tree/main/packages/jazz-react-native-media-images).
|
||||
Jazz provides a complete solution for handling images in React Native, including uploading, processing, and displaying them. Here's how to work with images:
|
||||
|
||||
#### Uploading Images
|
||||
|
||||
To upload images, use the `createImage` function from `jazz-react-native-media-images`. This function handles image processing and creates an `ImageDefinition` that can be stored in your Jazz covalues:
|
||||
|
||||
<CodeGroup>
|
||||
```tsx
|
||||
import { createImage } from "jazz-react-native-media-images";
|
||||
import * as ImagePicker from 'expo-image-picker';
|
||||
|
||||
const base64ImageDataURI = "data:image/png;base64,...";
|
||||
// Example: Image upload from device library
|
||||
const handleImageUpload = async () => {
|
||||
try {
|
||||
const result = await ImagePicker.launchImageLibraryAsync({
|
||||
mediaTypes: ImagePicker.MediaTypeOptions.Images,
|
||||
base64: true, // Important: We need base64 data
|
||||
quality: 0.7,
|
||||
});
|
||||
|
||||
const image = await createImage(base64ImageDataURI, {
|
||||
owner: newPetPost._owner,
|
||||
maxSize: 2048, // optional: specify maximum image size
|
||||
});
|
||||
if (!result.canceled && result.assets[0].base64) {
|
||||
const base64Uri = `data:image/jpeg;base64,${result.assets[0].base64}`;
|
||||
|
||||
someCovalue.image = image;
|
||||
const image = await createImage(base64Uri, {
|
||||
owner: someCovalue._owner, // Set appropriate owner
|
||||
maxSize: 2048, // Optional: limit maximum image size
|
||||
});
|
||||
|
||||
// Store the image in your covalue
|
||||
someCovalue.image = image;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to upload image:', error);
|
||||
}
|
||||
};
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
For a complete implementation, please refer to [this](https://github.com/garden-co/jazz/blob/main/examples/pets/src/3_NewPetPostForm.tsx) demo.
|
||||
#### Displaying Images
|
||||
|
||||
To display images, use the `ProgressiveImg` component from `jazz-react-native`. This component handles both images uploaded from React Native and desktop browsers:
|
||||
|
||||
<CodeGroup>
|
||||
```tsx
|
||||
import { ProgressiveImg } from "jazz-react-native";
|
||||
import { Image } from "react-native";
|
||||
|
||||
// Inside your render function:
|
||||
<ProgressiveImg image={someCovalue.image} maxWidth={1024}>
|
||||
{({ src, res, originalSize }) => (
|
||||
<Image
|
||||
source={{ uri: src }}
|
||||
style={{
|
||||
width: 300, // Adjust size as needed
|
||||
height: 300,
|
||||
borderRadius: 8,
|
||||
}}
|
||||
resizeMode="cover"
|
||||
/>
|
||||
)}
|
||||
</ProgressiveImg>
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
The `ProgressiveImg` component:
|
||||
- Automatically handles different image formats
|
||||
- Provides progressive loading with placeholder images
|
||||
- Supports different resolutions based on the `maxWidth` prop
|
||||
- Works seamlessly with React Native's `Image` component
|
||||
|
||||
For a complete implementation example, see the [Chat Example](https://github.com/garden-co/jazz/blob/main/examples/chat-rn-clerk/app/chat/[chatId].tsx).
|
||||
|
||||
### Running your app
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ As you develop your app, you'll likely want to
|
||||
- initialise data in a user's `root` and `profile`
|
||||
- add more data to your `root` and `profile` schemas
|
||||
|
||||
You can achieve both by overriding the static `migrate()` method on your `Account` schema class.
|
||||
You can achieve both by overriding the `migrate()` method on your `Account` schema class.
|
||||
|
||||
### When migrations run
|
||||
|
||||
@@ -148,18 +148,16 @@ export class MyAppAccount extends Account {
|
||||
root = co.ref(MyAppRoot);
|
||||
|
||||
async migrate() {
|
||||
const me = this;
|
||||
|
||||
// we specifically need to check for undefined,
|
||||
// because the root might simply be not loaded (`null`) yet
|
||||
if (me.root === undefined) {
|
||||
me.root = MyAppRoot.create({
|
||||
if (this.root === undefined) {
|
||||
this.root = MyAppRoot.create({
|
||||
// Using a group to set the owner is always a good idea.
|
||||
// This way if in the future we want to share
|
||||
// this coValue we can do so easily.
|
||||
myChats: ListOfChats.create([], Group.create(me)),
|
||||
myContacts: ListOfAccounts.create([], Group.create(me))
|
||||
}, Group.create(me));
|
||||
myChats: ListOfChats.create([], Group.create()),
|
||||
myContacts: ListOfAccounts.create([], Group.create())
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -182,17 +180,15 @@ export class MyAppAccount extends Account {
|
||||
root = co.ref(MyAppRoot);// old
|
||||
|
||||
async migrate() { // old
|
||||
const me = this; // old
|
||||
|
||||
if (me.root === undefined) { // old
|
||||
me.root = MyAppRoot.create({ // old
|
||||
myChats: ListOfChats.create([], Group.create(me)), // old
|
||||
myContacts: ListOfAccounts.create([], Group.create(me)) // old
|
||||
}, Group.create(me)); // old
|
||||
if (this.root === undefined) { // old
|
||||
this.root = MyAppRoot.create({ // old
|
||||
myChats: ListOfChats.create([], Group.create()), // old
|
||||
myContacts: ListOfAccounts.create([], Group.create()) // old
|
||||
}); // old
|
||||
} // old
|
||||
|
||||
// We need to load the root field to check for the myContacts field
|
||||
const result = await me.ensureLoaded({
|
||||
const result = await this.ensureLoaded({
|
||||
root: {},
|
||||
});
|
||||
|
||||
@@ -203,7 +199,7 @@ export class MyAppAccount extends Account {
|
||||
// we specifically need to check for undefined,
|
||||
// because myBookmarks might simply be not loaded (`null`) yet
|
||||
if (root.myBookmarks === undefined) {
|
||||
root.myBookmarks = ListOfBookmarks.create([], Group.create(me));
|
||||
root.myBookmarks = ListOfBookmarks.create([], Group.create());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,9 +52,9 @@ import { TodoProject, ListOfTasks } from "./schema";
|
||||
const project: TodoProject = TodoProject.create(
|
||||
{
|
||||
title: "New Project",
|
||||
tasks: ListOfTasks.create([], { owner: me }),
|
||||
tasks: ListOfTasks.create([], Group.create()),
|
||||
},
|
||||
{ owner: me }
|
||||
Group.create()
|
||||
);
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
import { ContentByFramework, CodeGroup } from '@/components/forMdx'
|
||||
|
||||
export const metadata = { title: "Upgrade to Jazz 0.9.0" };
|
||||
|
||||
# Jazz 0.9.8 - Without me!
|
||||
|
||||
<h2 className="not-prose text-sm text-stone-600 dark:text-stone-400 mb-5 pb-2 border-b">
|
||||
14 January 2025
|
||||
</h2>
|
||||
|
||||
<div>
|
||||
We have simplified the API to make the "me" value always optional!
|
||||
|
||||
This removes the need of using `useAccount` like the 90% of the time!
|
||||
</div>
|
||||
|
||||
<CodeGroup>
|
||||
{/* prettier-ignore */}
|
||||
```ts
|
||||
import { useState } from "react";
|
||||
import { Issue } from "./schema";
|
||||
import { IssueComponent } from "./components/Issue.tsx";
|
||||
function App() {
|
||||
const [issue, setIssue] = useState<Issue>();
|
||||
|
||||
const createIssue = () => {
|
||||
setIssue(Issue.create(
|
||||
{
|
||||
title: "Buy terrarium",
|
||||
description: "Make sure it's big enough for 10 snails.",
|
||||
estimate: 5,
|
||||
status: "backlog",
|
||||
}, // The owner defaults now to a group managed by the current user!
|
||||
));
|
||||
};
|
||||
|
||||
if (issue) {
|
||||
return <IssueComponent issue={issue} />;
|
||||
} else {
|
||||
return <button onClick={createIssue}>Create Issue</button>;
|
||||
}
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
<div>
|
||||
This also applies to the load API:
|
||||
</div>
|
||||
|
||||
<CodeGroup>
|
||||
{/* prettier-ignore */}
|
||||
```ts
|
||||
const issue = Issue.load(issueId, {})
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
<div>
|
||||
And `Group.create`:
|
||||
</div>
|
||||
|
||||
<CodeGroup>
|
||||
{/* prettier-ignore */}
|
||||
```tsx
|
||||
const group = Group.create()
|
||||
const sharedIssue = Issue.create(payload, group)
|
||||
group.addMember('everyone', 'reader')
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
<div>
|
||||
Everything is backward compatible, so no upgrade steps are required.
|
||||
|
||||
With this Jazz API becomes way more lean and more is coming!
|
||||
</div>
|
||||
@@ -7,9 +7,10 @@ The Jazz docs are currently heavily work in progress, sorry about that!
|
||||
## Quickstart
|
||||
|
||||
Run the following command to create a new Jazz project from one of our example apps:
|
||||
|
||||
<CodeGroup>
|
||||
```sh
|
||||
npx create-jazz-app
|
||||
npx create-jazz-app@latest
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
@@ -38,7 +39,20 @@ Sync and persist your data by setting up a [sync and storage infrastructure](/do
|
||||
|
||||
Learn how to structure your data using [collaborative values](/docs/schemas/covalues).
|
||||
|
||||
## API Reference
|
||||
|
||||
Many of the packages provided are documented in the [API Reference](/api-reference).
|
||||
|
||||
## LLM Docs
|
||||
|
||||
We support the [llms.txt](https://llmstxt.org/) convention for making documentation available to large language models and the applications that make use of them.
|
||||
|
||||
We currently have:
|
||||
|
||||
- [/llms.txt](/llms.txt) - A overview listing of the available packages and their documentation
|
||||
- [/llms-full.txt](/llms-full.txt) - Full documentation for our packages
|
||||
|
||||
## Get support
|
||||
|
||||
If you have any questions or need assistance, please don't hesitate to reach out to us on [Discord](https://discord.gg/utDMjHYg42).
|
||||
We would love to help you get started.
|
||||
We would love to help you get started.
|
||||
@@ -3,7 +3,7 @@
|
||||
import { SideNav } from "@/components/SideNav";
|
||||
import { SideNavHeader } from "@/components/SideNavHeader";
|
||||
import { FrameworkSelect } from "@/components/docs/FrameworkSelect";
|
||||
import { docNavigationItems } from "@/lib/docNavigationItems";
|
||||
import { docNavigationItems } from "@/lib/docNavigationItems.js";
|
||||
import { useFramework } from "@/lib/use-framework";
|
||||
import { clsx } from "clsx";
|
||||
|
||||
@@ -13,7 +13,9 @@ export function DocNav({ className }: { className?: string }) {
|
||||
return {
|
||||
...headerItem,
|
||||
items: headerItem.items
|
||||
.filter((item) => !item.framework || item.framework === framework)
|
||||
.filter(
|
||||
(item) => !("framework" in item) || item.framework === framework,
|
||||
)
|
||||
.map((item) => {
|
||||
if (!item.href?.startsWith("/docs")) return item;
|
||||
|
||||
|
||||
@@ -156,8 +156,14 @@ export function FnDecl({
|
||||
doc: ReactNode;
|
||||
example: ReactNode;
|
||||
}) {
|
||||
// Extract the method name from the signature (everything before the first parenthesis or type parameter)
|
||||
const methodName = signature.match(/^[^(<]+/)?.[0];
|
||||
|
||||
return (
|
||||
<div className="text-sm flex flex-col gap-3 my-2 p-3 rounded bg-stone-50 dark:bg-stone-925">
|
||||
<div
|
||||
id={methodName}
|
||||
className="text-sm flex flex-col gap-3 my-2 p-3 rounded bg-stone-50 dark:bg-stone-925"
|
||||
>
|
||||
<div className="flex flex-col gap-2">
|
||||
<div>
|
||||
{<Highlight>{signature + ":"}</Highlight>}{" "}
|
||||
|
||||
511
homepage/homepage/generate-docs/llms-full.mjs
Normal file
511
homepage/homepage/generate-docs/llms-full.mjs
Normal file
@@ -0,0 +1,511 @@
|
||||
import { promises as fs } from "fs";
|
||||
import path from "path";
|
||||
import { Deserializer, ReflectionKind } from "typedoc";
|
||||
import { DOC_SECTIONS, PACKAGES } from "./utils/config.mjs";
|
||||
import {
|
||||
getPackageDescription,
|
||||
loadTypedocFiles,
|
||||
writeDocsFile,
|
||||
} from "./utils/index.mjs";
|
||||
|
||||
function formatType(type) {
|
||||
if (!type) return "unknown";
|
||||
|
||||
// Handle type aliases and references
|
||||
if (type.type === "reference") {
|
||||
const name = type.package ? `${type.package}.${type.name}` : type.name;
|
||||
return (
|
||||
name +
|
||||
(type.typeArguments
|
||||
? `<${type.typeArguments.map(formatType).join(", ")}>`
|
||||
: "")
|
||||
);
|
||||
}
|
||||
|
||||
// Handle union types
|
||||
if (type.type === "union") {
|
||||
return type.types.map(formatType).join(" | ");
|
||||
}
|
||||
|
||||
// Handle array types
|
||||
if (type.type === "array") {
|
||||
return `${formatType(type.elementType)}[]`;
|
||||
}
|
||||
|
||||
// Handle basic types
|
||||
if (type.type === "intrinsic" || type.type === "literal") {
|
||||
return typeof type.value !== "undefined"
|
||||
? JSON.stringify(type.value)
|
||||
: type.name;
|
||||
}
|
||||
|
||||
// Handle tuple types
|
||||
if (type.type === "tuple") {
|
||||
return `[${type.elements.map(formatType).join(", ")}]`;
|
||||
}
|
||||
|
||||
// Handle intersection types
|
||||
if (type.type === "intersection") {
|
||||
return type.types.map(formatType).join(" & ");
|
||||
}
|
||||
|
||||
// Handle template literal types
|
||||
if (type.type === "template-literal") {
|
||||
return `\`${type.head}${type.tail.map((t) => `\${${formatType(t[0])}}${t[1]}`).join("")}\``;
|
||||
}
|
||||
|
||||
// Handle reflection types (object types and function types)
|
||||
if (type.type === "reflection") {
|
||||
if (type.declaration.signatures) {
|
||||
const sig = type.declaration.signatures[0];
|
||||
const params =
|
||||
sig.parameters
|
||||
?.map(
|
||||
(p) =>
|
||||
`${p.name}${p.flags?.isOptional ? "?" : ""}: ${formatType(p.type)}`,
|
||||
)
|
||||
.join(", ") || "";
|
||||
return `(${params}) => ${formatType(sig.type)}`;
|
||||
}
|
||||
|
||||
if (type.declaration.children) {
|
||||
return (
|
||||
"{ " +
|
||||
type.declaration.children
|
||||
.map((child) => {
|
||||
const optional = child.flags?.isOptional ? "?" : "";
|
||||
return `${child.name}${optional}: ${formatType(child.type)}`;
|
||||
})
|
||||
.join("; ") +
|
||||
" }"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Handle query types
|
||||
if (type.type === "query") {
|
||||
return `typeof ${formatType(type.queryType)}`;
|
||||
}
|
||||
|
||||
// Handle conditional types
|
||||
if (type.type === "conditional") {
|
||||
return `${formatType(type.checkType)} extends ${formatType(type.extendsType)} ? ${formatType(type.trueType)} : ${formatType(type.falseType)}`;
|
||||
}
|
||||
|
||||
// Handle index access types
|
||||
if (type.type === "indexedAccess") {
|
||||
return `${formatType(type.objectType)}[${formatType(type.indexType)}]`;
|
||||
}
|
||||
|
||||
// Handle mapped types
|
||||
if (type.type === "mapped") {
|
||||
const readonly = type.readonlyModifier === "+" ? "readonly " : "";
|
||||
const optional = type.optionalModifier === "+" ? "?" : "";
|
||||
return `{ ${readonly}[${type.parameter} in ${formatType(type.parameterType)}]${optional}: ${formatType(type.templateType)} }`;
|
||||
}
|
||||
|
||||
// Handle type operators
|
||||
if (type.type === "typeOperator") {
|
||||
return `${type.operator} ${formatType(type.target)}`;
|
||||
}
|
||||
|
||||
// Handle predicate types
|
||||
if (type.type === "predicate") {
|
||||
return `${type.name} is ${formatType(type.targetType)}`;
|
||||
}
|
||||
|
||||
// Handle inferred types
|
||||
if (type.type === "inferred") {
|
||||
return `infer ${type.name}`;
|
||||
}
|
||||
|
||||
// Handle rest types
|
||||
if (type.type === "rest") {
|
||||
return `...${formatType(type.elementType)}`;
|
||||
}
|
||||
|
||||
// Handle unknown types with more detail
|
||||
if (type.toString) {
|
||||
return type.toString();
|
||||
}
|
||||
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
function formatComment(comment) {
|
||||
if (!comment) return "";
|
||||
|
||||
let text =
|
||||
comment.summary
|
||||
?.map((part) => part.text)
|
||||
.join("")
|
||||
.trim() || "";
|
||||
|
||||
// Add parameter descriptions if available
|
||||
if (comment.blockTags) {
|
||||
const params = comment.blockTags
|
||||
.filter((tag) => tag.tag === "@param")
|
||||
.map((tag) => {
|
||||
const paramName = tag.param;
|
||||
let description = "";
|
||||
let codeExample = "";
|
||||
|
||||
tag.content.forEach((part) => {
|
||||
if (part.kind === "code") {
|
||||
// Don't wrap in code blocks since examples are already wrapped
|
||||
codeExample += "\n" + part.text + "\n";
|
||||
} else {
|
||||
description += part.text;
|
||||
}
|
||||
});
|
||||
|
||||
return `- ${paramName}: ${description.trim()}${codeExample}`;
|
||||
});
|
||||
|
||||
if (params.length > 0) {
|
||||
text += "\n\nParameters:\n" + params.join("\n");
|
||||
}
|
||||
|
||||
// Add remarks if available
|
||||
const remarks = comment.blockTags
|
||||
.filter((tag) => tag.tag === "@remarks")
|
||||
.map((tag) =>
|
||||
tag.content
|
||||
.map((part) => part.text)
|
||||
.join("")
|
||||
.trim(),
|
||||
);
|
||||
|
||||
if (remarks.length > 0) {
|
||||
text += "\n\nRemarks:\n" + remarks.join("\n");
|
||||
}
|
||||
|
||||
// Add examples
|
||||
const examples = comment.blockTags
|
||||
.filter((tag) => tag.tag === "@example")
|
||||
.map((tag) =>
|
||||
tag.content
|
||||
.map((part) => {
|
||||
if (part.kind === "code") {
|
||||
// Don't wrap in code blocks since examples are already wrapped
|
||||
return "\n" + part.text + "\n";
|
||||
}
|
||||
return part.text;
|
||||
})
|
||||
.join("")
|
||||
.trim(),
|
||||
);
|
||||
|
||||
if (examples.length > 0) {
|
||||
text += "\n\nExamples:\n" + examples.join("\n");
|
||||
}
|
||||
}
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
async function readMdxContent(url) {
|
||||
try {
|
||||
// Special case for the introduction
|
||||
if (url === "/docs") {
|
||||
const introPath = path.join(
|
||||
process.cwd(),
|
||||
"components/docs/docs-intro.mdx",
|
||||
);
|
||||
try {
|
||||
const content = await fs.readFile(introPath, "utf8");
|
||||
// Remove imports and exports
|
||||
return content
|
||||
.replace(/^import[^\n]*\n/gm, "")
|
||||
.replace(/export const metadata[^;]*;/, "")
|
||||
.trim();
|
||||
} catch (err) {
|
||||
if (err.code !== "ENOENT") throw err;
|
||||
}
|
||||
}
|
||||
|
||||
// Convert URL to file path
|
||||
// Remove leading slash and 'docs' from URL
|
||||
const relativePath = url.replace(/^\/docs\/?/, "");
|
||||
|
||||
// Base directory for docs
|
||||
const baseDir = path.join(process.cwd(), "app/docs/[framework]/[...slug]");
|
||||
|
||||
// If it's a directory, try to read all framework variants
|
||||
const fullPath = path.join(baseDir, relativePath);
|
||||
try {
|
||||
const stats = await fs.stat(fullPath);
|
||||
if (stats.isDirectory()) {
|
||||
// Read all MDX files in the directory
|
||||
const files = await fs.readdir(fullPath);
|
||||
const mdxFiles = files.filter((f) => f.endsWith(".mdx"));
|
||||
|
||||
if (mdxFiles.length === 0) return null;
|
||||
|
||||
// Combine content from all framework variants
|
||||
const contents = await Promise.all(
|
||||
mdxFiles.map(async (file) => {
|
||||
const content = await fs.readFile(
|
||||
path.join(fullPath, file),
|
||||
"utf8",
|
||||
);
|
||||
// Remove imports and exports
|
||||
const cleanContent = content
|
||||
.replace(/^import[^\n]*\n/gm, "")
|
||||
.replace(/export const metadata[^;]*;/, "")
|
||||
.trim();
|
||||
return `### ${path.basename(file, ".mdx")} Implementation\n\n${cleanContent}`;
|
||||
}),
|
||||
);
|
||||
|
||||
return contents.join("\n\n---\n\n");
|
||||
}
|
||||
} catch (err) {
|
||||
if (err.code !== "ENOENT") throw err;
|
||||
}
|
||||
|
||||
// Try as a single MDX file
|
||||
const mdxPath = fullPath + ".mdx";
|
||||
try {
|
||||
const content = await fs.readFile(mdxPath, "utf8");
|
||||
// Remove imports and exports
|
||||
return content
|
||||
.replace(/^import[^\n]*\n/gm, "")
|
||||
.replace(/export const metadata[^;]*;/, "")
|
||||
.trim();
|
||||
} catch (err) {
|
||||
if (err.code !== "ENOENT") throw err;
|
||||
}
|
||||
|
||||
console.warn(`Could not find MDX content for ${url} at ${fullPath}`);
|
||||
return null;
|
||||
} catch (error) {
|
||||
console.warn(`Error reading MDX content for ${url}:`, error);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
async function generateDetailedDocs(docs) {
|
||||
const output = [];
|
||||
const deserializer = new Deserializer();
|
||||
|
||||
// Project title
|
||||
output.push("# Jazz\n");
|
||||
|
||||
// Documentation sections with full content
|
||||
output.push("## Documentation\n");
|
||||
for (const section of DOC_SECTIONS) {
|
||||
output.push(`### ${section.title}\n`);
|
||||
|
||||
for (const page of section.pages) {
|
||||
output.push(`#### ${page.title}\n`);
|
||||
const content = await readMdxContent(page.url);
|
||||
console.log(content);
|
||||
if (content) {
|
||||
// If the content contains framework-specific implementations, they're already properly formatted
|
||||
// Otherwise, just add the content directly
|
||||
output.push(content + "\n");
|
||||
}
|
||||
output.push("\n");
|
||||
}
|
||||
}
|
||||
|
||||
// API Reference by package
|
||||
output.push("## API Reference\n\n");
|
||||
// for (const [packageName, packageDocs] of Object.entries(docs)) {
|
||||
// const project = deserializer.reviveProject(packageDocs, packageName);
|
||||
|
||||
// // Add package heading with description
|
||||
// output.push(`### ${packageName}\n`);
|
||||
// output.push(`${getPackageDescription(packageName)}\n\n`);
|
||||
// output.push(
|
||||
// `[API Reference](https://jazz.tools/api-reference/${packageName})\n\n`,
|
||||
// );
|
||||
|
||||
// // Process each category
|
||||
// project.categories?.forEach((category) => {
|
||||
// output.push(`#### ${category.title}\n`);
|
||||
|
||||
// category.children.forEach((child) => {
|
||||
// // Add name, kind, and API reference link
|
||||
// const apiLink = `[API Reference](https://jazz.tools/api-reference/${packageName}#${child.name})`;
|
||||
// output.push(
|
||||
// `##### ${child.name} (${ReflectionKind[child.kind]}) ${apiLink}\n`,
|
||||
// );
|
||||
|
||||
// // Add description if available
|
||||
// const description = formatComment(child.comment);
|
||||
// if (description) {
|
||||
// output.push(`${description}\n`);
|
||||
// }
|
||||
|
||||
// output.push("\n");
|
||||
|
||||
// // Add properties for classes/interfaces
|
||||
// if (child.children) {
|
||||
// output.push("Properties:\n");
|
||||
|
||||
// // Group overloaded methods by name
|
||||
// const methodGroups = new Map();
|
||||
// child.children.forEach((prop) => {
|
||||
// if (prop.signatures?.length > 0) {
|
||||
// const existing = methodGroups.get(prop.name) || [];
|
||||
// methodGroups.set(prop.name, [...existing, prop]);
|
||||
// }
|
||||
// });
|
||||
|
||||
// child.children.forEach((prop) => {
|
||||
// // Skip if this is an overloaded method that we'll handle later
|
||||
// if (
|
||||
// prop.signatures?.length > 0 &&
|
||||
// methodGroups.get(prop.name)?.length > 1
|
||||
// ) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// const type = formatType(prop.type);
|
||||
// const description = formatComment(prop.comment);
|
||||
|
||||
// // Output the property name and type, but skip the type for methods since we'll show signatures
|
||||
// if (prop.signatures?.length > 0) {
|
||||
// output.push(
|
||||
// `- ${prop.name}${description ? ` - ${description}` : ""}\n`,
|
||||
// );
|
||||
// } else {
|
||||
// output.push(
|
||||
// `- ${prop.name}: ${type}${description ? ` - ${description}` : ""}\n`,
|
||||
// );
|
||||
// }
|
||||
|
||||
// // Handle method signatures with proper indentation
|
||||
// if (prop.signatures) {
|
||||
// prop.signatures.forEach((sig) => {
|
||||
// const params = sig.parameters
|
||||
// ?.map((p) => {
|
||||
// const paramType = formatType(p.type);
|
||||
// return `${p.name}: ${paramType}`;
|
||||
// })
|
||||
// .join(", ");
|
||||
|
||||
// output.push(
|
||||
// ` Method signature: \`(${params || ""}) => ${formatType(sig.type)}\`\n`,
|
||||
// );
|
||||
|
||||
// // Add API reference URL for the method
|
||||
// output.push(
|
||||
// ` [API Reference](https://jazz.tools/api-reference/${packageName}#${child.name}.${prop.name})\n`,
|
||||
// );
|
||||
|
||||
// const methodDesc = formatComment(sig.comment);
|
||||
// if (methodDesc) {
|
||||
// // Indent each line of the description
|
||||
// const indentedDesc = methodDesc
|
||||
// .split("\n")
|
||||
// .map((line) => ` ${line}`)
|
||||
// .join("\n");
|
||||
// output.push(`${indentedDesc}\n`);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
|
||||
// // Handle overloaded methods
|
||||
// methodGroups.forEach((props, name) => {
|
||||
// if (props.length <= 1) return;
|
||||
|
||||
// const firstProp = props[0];
|
||||
// const description = formatComment(firstProp.comment);
|
||||
|
||||
// output.push(`- ${name}${description ? ` - ${description}` : ""}\n`);
|
||||
|
||||
// // Combine all signatures with proper indentation
|
||||
// const allSignatures = props.flatMap((p) => p.signatures || []);
|
||||
// allSignatures.forEach((sig) => {
|
||||
// const params = sig.parameters
|
||||
// ?.map((p) => {
|
||||
// const paramType = formatType(p.type);
|
||||
// return `${p.name}: ${paramType}`;
|
||||
// })
|
||||
// .join(", ");
|
||||
|
||||
// output.push(
|
||||
// ` Method signature: \`(${params || ""}) => ${formatType(sig.type)}\`\n`,
|
||||
// );
|
||||
|
||||
// // Add API reference URL for the overloaded method
|
||||
// output.push(
|
||||
// ` [API Reference](https://jazz.tools/api-reference/${packageName}#${child.name}.${name})\n`,
|
||||
// );
|
||||
|
||||
// const methodDesc = formatComment(sig.comment);
|
||||
// if (methodDesc) {
|
||||
// // Indent each line of the description
|
||||
// const indentedDesc = methodDesc
|
||||
// .split("\n")
|
||||
// .map((line) => ` ${line}`)
|
||||
// .join("\n");
|
||||
// output.push(`${indentedDesc}\n`);
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
|
||||
// // Add signatures for functions/methods
|
||||
// if (child.signatures) {
|
||||
// child.signatures.forEach((sig) => {
|
||||
// const params = sig.parameters
|
||||
// ?.map((p) => {
|
||||
// const type = formatType(p.type);
|
||||
// const desc = formatComment(p.comment);
|
||||
// return `${p.name}: ${type}${desc ? ` - ${desc}` : ""}`;
|
||||
// })
|
||||
// .join(", ");
|
||||
|
||||
// output.push(`Signature: ${child.name}(${params || ""})`);
|
||||
|
||||
// if (sig.type) {
|
||||
// output.push(`Returns: ${formatType(sig.type)}`);
|
||||
// if (sig.comment?.returns) {
|
||||
// output.push(
|
||||
// `Return description: ${sig.comment.returns
|
||||
// .map((part) => part.text)
|
||||
// .join("")
|
||||
// .trim()}`,
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
// const sigComment = formatComment(sig.comment);
|
||||
// if (sigComment) {
|
||||
// output.push(`\n${sigComment}`);
|
||||
// }
|
||||
|
||||
// output.push("\n");
|
||||
// });
|
||||
// }
|
||||
|
||||
// output.push("\n");
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
|
||||
// Optional section for additional resources
|
||||
output.push("## Resources\n\n");
|
||||
output.push(
|
||||
"- [Documentation](https://jazz.tools/docs): Detailed documentation about Jazz\n",
|
||||
);
|
||||
output.push(
|
||||
"- [Examples](https://jazz.tools/examples): Code examples and tutorials\n",
|
||||
);
|
||||
|
||||
await writeDocsFile("llms-full.txt", output.join("\n"));
|
||||
}
|
||||
|
||||
// Main execution
|
||||
async function main() {
|
||||
console.log("Generating detailed LLM docs...");
|
||||
const docs = await loadTypedocFiles();
|
||||
await generateDetailedDocs(docs);
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
||||
80
homepage/homepage/generate-docs/llms.mjs
Normal file
80
homepage/homepage/generate-docs/llms.mjs
Normal file
@@ -0,0 +1,80 @@
|
||||
import { Deserializer } from "typedoc";
|
||||
import { DOC_SECTIONS, PACKAGES } from "./utils/config.mjs";
|
||||
import {
|
||||
cleanDescription,
|
||||
loadTypedocFiles,
|
||||
writeDocsFile,
|
||||
} from "./utils/index.mjs";
|
||||
|
||||
async function generateConciseDocs(docs) {
|
||||
const output = [];
|
||||
const deserializer = new Deserializer();
|
||||
|
||||
// Project title
|
||||
output.push("# Jazz\n");
|
||||
|
||||
// Documentation sections
|
||||
output.push("## Documentation\n");
|
||||
DOC_SECTIONS.forEach((section) => {
|
||||
output.push(`### ${section.title}\n`);
|
||||
section.pages.forEach((page) => {
|
||||
output.push(`- [${page.title}](https://jazz.tools${page.url})\n`);
|
||||
});
|
||||
output.push("\n");
|
||||
});
|
||||
|
||||
// API Reference by package
|
||||
for (const [packageName, packageDocs] of Object.entries(docs)) {
|
||||
const project = deserializer.reviveProject(packageDocs, packageName);
|
||||
|
||||
// Add package heading
|
||||
output.push(`## ${packageName}\n`);
|
||||
|
||||
// Process each category and its exports with direct links
|
||||
if (project.categories) {
|
||||
const seen = new Set(); // Track seen names to avoid duplicates
|
||||
project.categories.forEach((category) => {
|
||||
category.children.forEach((child) => {
|
||||
if (seen.has(child.name)) return;
|
||||
seen.add(child.name);
|
||||
|
||||
// Get and clean up description
|
||||
let description = child.comment?.summary
|
||||
? cleanDescription(child.comment.summary)
|
||||
: "";
|
||||
|
||||
// Truncate description if it's too long
|
||||
if (description && description.length > 150) {
|
||||
description = description.substring(0, 147) + "...";
|
||||
}
|
||||
|
||||
// Create the line without wrapping
|
||||
output.push(
|
||||
`- [${child.name}](https://jazz.tools/api-reference/${packageName}#${child.name})${description ? `: ${description}` : ""}\n`,
|
||||
);
|
||||
});
|
||||
});
|
||||
output.push("\n");
|
||||
}
|
||||
}
|
||||
|
||||
// Optional section for additional resources
|
||||
output.push("## Optional\n");
|
||||
output.push(
|
||||
"- [Documentation](https://jazz.tools/docs): Detailed documentation about Jazz\n",
|
||||
);
|
||||
output.push(
|
||||
"- [Examples](https://jazz.tools/examples): Code examples and tutorials\n",
|
||||
);
|
||||
|
||||
await writeDocsFile("llms.txt", output.join(""));
|
||||
}
|
||||
|
||||
// Main execution
|
||||
async function main() {
|
||||
console.log("Generating concise LLM docs...");
|
||||
const docs = await loadTypedocFiles();
|
||||
await generateConciseDocs(docs);
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
||||
@@ -1,22 +1,7 @@
|
||||
import { Application } from "typedoc";
|
||||
import { PACKAGES } from "./utils/config.mjs";
|
||||
|
||||
for (const { packageName, entryPoint, tsconfig, typedocOptions } of [
|
||||
{
|
||||
packageName: "jazz-tools",
|
||||
entryPoint: "index.web.ts",
|
||||
tsconfig: "tsconfig.web.json",
|
||||
},
|
||||
{
|
||||
packageName: "jazz-react",
|
||||
entryPoint: "index.tsx",
|
||||
typedocOptions: {
|
||||
skipErrorChecking: true, // TODO: remove this. Temporary workaround
|
||||
},
|
||||
},
|
||||
{ packageName: "jazz-browser" },
|
||||
{ packageName: "jazz-browser-media-images" },
|
||||
{ packageName: "jazz-nodejs" },
|
||||
]) {
|
||||
for (const { packageName, entryPoint, tsconfig, typedocOptions } of PACKAGES) {
|
||||
const app = await Application.bootstrapWithPlugins({
|
||||
entryPoints: [
|
||||
`../../packages/${packageName}/src/${entryPoint || "index.ts"}`,
|
||||
47
homepage/homepage/generate-docs/utils/config.mjs
Normal file
47
homepage/homepage/generate-docs/utils/config.mjs
Normal file
@@ -0,0 +1,47 @@
|
||||
import { docNavigationItems } from "../../lib/docNavigationItems.js";
|
||||
|
||||
// Transform docNavigationItems into the format we need
|
||||
function transformNavItems() {
|
||||
return docNavigationItems
|
||||
.map((section) => ({
|
||||
title: section.name,
|
||||
pages: section.items
|
||||
.filter((item) => item.done !== 0) // Skip not-yet-written docs
|
||||
.map((item) => ({
|
||||
title: item.name,
|
||||
url: item.href,
|
||||
})),
|
||||
}))
|
||||
.filter((section) => section.pages.length > 0); // Only include sections with pages
|
||||
}
|
||||
|
||||
export const DOC_SECTIONS = transformNavItems();
|
||||
|
||||
export const PACKAGES = [
|
||||
{
|
||||
packageName: "jazz-tools",
|
||||
entryPoint: "exports.ts",
|
||||
description:
|
||||
"The base implementation for Jazz, a framework for distributed state. Provides a high-level API around the CoJSON protocol.",
|
||||
},
|
||||
{
|
||||
packageName: "jazz-react",
|
||||
entryPoint: "index.ts",
|
||||
description: "React bindings for Jazz, a framework for distributed state.",
|
||||
typedocOptions: {
|
||||
skipErrorChecking: true, // TODO: remove this. Temporary workaround
|
||||
},
|
||||
},
|
||||
{
|
||||
packageName: "jazz-browser",
|
||||
description: "Browser (Vanilla JavaScript) bindings for Jazz",
|
||||
},
|
||||
{
|
||||
packageName: "jazz-browser-media-images",
|
||||
description: "Image handling utilities for Jazz in the browser",
|
||||
},
|
||||
{
|
||||
packageName: "jazz-nodejs",
|
||||
description: "NodeJS/Bun server worker bindings for Jazz",
|
||||
},
|
||||
];
|
||||
58
homepage/homepage/generate-docs/utils/index.mjs
Normal file
58
homepage/homepage/generate-docs/utils/index.mjs
Normal file
@@ -0,0 +1,58 @@
|
||||
import path from "path";
|
||||
import fs from "fs/promises";
|
||||
import { PACKAGES } from "./config.mjs";
|
||||
|
||||
// Common configuration
|
||||
export const PACKAGE_DESCRIPTIONS = {
|
||||
"jazz-tools":
|
||||
"The base implementation for Jazz, a framework for distributed state. Provides a high-level API around the CoJSON protocol.",
|
||||
"jazz-react": "React bindings for Jazz, a framework for distributed state.",
|
||||
"jazz-browser": "Browser (Vanilla JavaScript) bindings for Jazz",
|
||||
"jazz-browser-media-images":
|
||||
"Image handling utilities for Jazz in the browser",
|
||||
"jazz-nodejs": "NodeJS/Bun server worker bindings for Jazz",
|
||||
};
|
||||
|
||||
// Helper functions
|
||||
export async function loadTypedocFiles() {
|
||||
const docs = {};
|
||||
for (const { packageName } of PACKAGES) {
|
||||
docs[packageName] = JSON.parse(
|
||||
await fs.readFile(
|
||||
path.join(process.cwd(), "typedoc", packageName + ".json"),
|
||||
"utf-8",
|
||||
),
|
||||
);
|
||||
}
|
||||
return docs;
|
||||
}
|
||||
|
||||
export function getPackageDescription(packageName) {
|
||||
const pkg = PACKAGES.find((p) => p.packageName === packageName);
|
||||
return pkg?.description || "";
|
||||
}
|
||||
|
||||
export function cleanDescription(description) {
|
||||
if (!description) return "";
|
||||
return (
|
||||
description
|
||||
.map((part) => part.text)
|
||||
.join(" ")
|
||||
.trim()
|
||||
// Remove code blocks
|
||||
.replace(/```[\s\S]*?```/g, "")
|
||||
// Remove line breaks and extra spaces
|
||||
.replace(/\s+/g, " ")
|
||||
// Clean up backticks
|
||||
.replace(/\`/g, "'")
|
||||
);
|
||||
}
|
||||
|
||||
export async function writeDocsFile(filename, content) {
|
||||
await fs.writeFile(
|
||||
path.join(process.cwd(), "public", filename),
|
||||
content,
|
||||
"utf8",
|
||||
);
|
||||
console.log(`Documentation generated at 'public/${filename}'`);
|
||||
}
|
||||
@@ -50,16 +50,27 @@ export const docNavigationItems = [
|
||||
href: "/docs/project-setup/server-side",
|
||||
done: 80,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Updates",
|
||||
items: [
|
||||
{
|
||||
// upgrade guides
|
||||
name: "Enable local persistence",
|
||||
name: "Jazz 0.9.8 - Without me!",
|
||||
href: "/docs/upgrade/0-9-8",
|
||||
done: 100,
|
||||
},
|
||||
{
|
||||
// upgrade guides
|
||||
name: "Jazz 0.9.2 - Local persistence on React Native",
|
||||
href: "/docs/upgrade/react-native-local-persistence",
|
||||
done: 100,
|
||||
framework: "react-native",
|
||||
},
|
||||
{
|
||||
// upgrade guides
|
||||
name: "Upgrade to Jazz 0.9.0",
|
||||
name: "Jazz 0.9.0 - Upgrade guide",
|
||||
href: "/docs/upgrade/0-9-0",
|
||||
done: 100,
|
||||
},
|
||||
@@ -5,11 +5,15 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "NODE_OPTIONS=--max-old-space-size=8192 next dev",
|
||||
"build:generate-docs": "node genDocs.mjs --build",
|
||||
"build:generate-docs": "pnpm run generate:docs && pnpm run generate:llm-docs:all",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"format-and-lint": "biome check .",
|
||||
"format-and-lint:fix": "biome check . --write"
|
||||
"format-and-lint:fix": "biome check . --write",
|
||||
"generate:docs": "node generate-docs/typedocs.mjs --build",
|
||||
"generate:llm-docs:all": "pnpm run generate:llm-docs:concise && pnpm run generate:llm-docs:full",
|
||||
"generate:llm-docs:concise": "node generate-docs/llms.mjs",
|
||||
"generate:llm-docs:full": "node generate-docs/llms-full.mjs"
|
||||
},
|
||||
"packageManager": "pnpm@9.14.0",
|
||||
"dependencies": {
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
".next/types/**/*.ts",
|
||||
"mdx.d.ts"
|
||||
"mdx.d.ts",
|
||||
"lib/docNavigationItems.js"
|
||||
],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,62 @@
|
||||
# cojson-storage-indexeddb
|
||||
|
||||
## 0.9.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6ad0a9f]
|
||||
- cojson@0.9.19
|
||||
- cojson-storage@0.9.19
|
||||
|
||||
## 0.9.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8898b10]
|
||||
- cojson@0.9.18
|
||||
- cojson-storage@0.9.18
|
||||
|
||||
## 0.9.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8d29e50]
|
||||
- cojson-storage@0.9.13
|
||||
- cojson@0.9.13
|
||||
|
||||
## 0.9.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [15d4b2a]
|
||||
- cojson-storage@0.9.12
|
||||
- cojson@0.9.12
|
||||
|
||||
## 0.9.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [efbf3d8]
|
||||
- Updated dependencies [5863bad]
|
||||
- cojson@0.9.11
|
||||
- cojson-storage@0.9.11
|
||||
|
||||
## 0.9.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [4aa377d]
|
||||
- cojson@0.9.10
|
||||
- cojson-storage@0.9.10
|
||||
|
||||
## 0.9.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- cojson@0.9.9
|
||||
- cojson-storage@0.9.9
|
||||
|
||||
## 0.9.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cojson-storage-indexeddb",
|
||||
"version": "0.9.0",
|
||||
"version": "0.9.19",
|
||||
"main": "dist/index.js",
|
||||
"type": "module",
|
||||
"types": "src/index.ts",
|
||||
|
||||
@@ -1,5 +1,62 @@
|
||||
# cojson-storage-sqlite
|
||||
|
||||
## 0.8.58
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6ad0a9f]
|
||||
- cojson@0.9.19
|
||||
- cojson-storage@0.9.19
|
||||
|
||||
## 0.8.57
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8898b10]
|
||||
- cojson@0.9.18
|
||||
- cojson-storage@0.9.18
|
||||
|
||||
## 0.8.56
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8d29e50]
|
||||
- cojson-storage@0.9.13
|
||||
- cojson@0.9.13
|
||||
|
||||
## 0.8.55
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [15d4b2a]
|
||||
- cojson-storage@0.9.12
|
||||
- cojson@0.9.12
|
||||
|
||||
## 0.8.54
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [efbf3d8]
|
||||
- Updated dependencies [5863bad]
|
||||
- cojson@0.9.11
|
||||
- cojson-storage@0.9.11
|
||||
|
||||
## 0.8.53
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [4aa377d]
|
||||
- cojson@0.9.10
|
||||
- cojson-storage@0.9.10
|
||||
|
||||
## 0.8.52
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- cojson@0.9.9
|
||||
- cojson-storage@0.9.9
|
||||
|
||||
## 0.8.51
|
||||
|
||||
### Patch Changes
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user