Compare commits
128 Commits
jazz-svelt
...
jazz-react
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80b80b5d71 | ||
|
|
d777b78ce4 | ||
|
|
c0a77b99bb | ||
|
|
24516116f3 | ||
|
|
ed0e15144c | ||
|
|
f51cf1b9ff | ||
|
|
31beb0a3b4 | ||
|
|
d1b2c50801 | ||
|
|
0261fb5031 | ||
|
|
e421af1147 | ||
|
|
05df8e3b61 | ||
|
|
6892dc6a87 | ||
|
|
84badaa18b | ||
|
|
23059ec701 | ||
|
|
52a2533b9e | ||
|
|
5df7aaf742 | ||
|
|
1a818f88b2 | ||
|
|
2e12ec55ac | ||
|
|
6c94c2cd3d | ||
|
|
98c4221340 | ||
|
|
7b00a8155f | ||
|
|
cc5aea708a | ||
|
|
87c7306632 | ||
|
|
a65219ba52 | ||
|
|
689595fd0a | ||
|
|
efbf2b65a8 | ||
|
|
912232192f | ||
|
|
11b5d77064 | ||
|
|
63b88b591d | ||
|
|
87d0544d98 | ||
|
|
d43dcc2c94 | ||
|
|
093a166db1 | ||
|
|
593f3ed83e | ||
|
|
6c6c89e068 | ||
|
|
c1646f6bbb | ||
|
|
b7deb3c937 | ||
|
|
9b425701e4 | ||
|
|
07dcf54aca | ||
|
|
8ed33c18ca | ||
|
|
6a96d8b53b | ||
|
|
a1bcbda72e | ||
|
|
0f67e0a988 | ||
|
|
6c7a3ebf82 | ||
|
|
27ce186152 | ||
|
|
77ae2cc186 | ||
|
|
66600c0c27 | ||
|
|
81d5261f4d | ||
|
|
d748dea90f | ||
|
|
707e544b83 | ||
|
|
f3cbaee890 | ||
|
|
60ce483db7 | ||
|
|
c08a41398d | ||
|
|
d6d9218b3e | ||
|
|
667e301f12 | ||
|
|
b15f904347 | ||
|
|
0c150a4c74 | ||
|
|
66de2dacb6 | ||
|
|
ae1425db8a | ||
|
|
a164b102f5 | ||
|
|
a6db9a438e | ||
|
|
a35249a831 | ||
|
|
36e246be79 | ||
|
|
b894455c9e | ||
|
|
11f7277675 | ||
|
|
d992f5c552 | ||
|
|
a5ec31f079 | ||
|
|
2f99de0976 | ||
|
|
d5503b4581 | ||
|
|
a462254199 | ||
|
|
f86e278b00 | ||
|
|
34cbdc3e4c | ||
|
|
c563c3675f | ||
|
|
05372df4be | ||
|
|
c32c405bfd | ||
|
|
09e2090939 | ||
|
|
2ffe10cc79 | ||
|
|
9a4cef30cf | ||
|
|
3c0b2cb689 | ||
|
|
6a2a176361 | ||
|
|
824bbc8bab | ||
|
|
71b9517eda | ||
|
|
e7ae6d95ba | ||
|
|
029c32d86c | ||
|
|
45bed3ea80 | ||
|
|
43fa1ecba4 | ||
|
|
141ea11bf1 | ||
|
|
273b478381 | ||
|
|
1d29f74df6 | ||
|
|
393d066b25 | ||
|
|
45bff625c4 | ||
|
|
a8fca7b5f7 | ||
|
|
658a0602ea | ||
|
|
f039e8f097 | ||
|
|
dc9da28bf9 | ||
|
|
e6db8f2a02 | ||
|
|
f0c8f7b3eb | ||
|
|
945163b7bc | ||
|
|
3142e503ae | ||
|
|
932a21e62a | ||
|
|
628a33eb12 | ||
|
|
20eef64b47 | ||
|
|
c64f38b6c9 | ||
|
|
e5e047660b | ||
|
|
a65d6bed73 | ||
|
|
d4f7891890 | ||
|
|
6eef92b602 | ||
|
|
dfbb4b8c69 | ||
|
|
5f2d8e143c | ||
|
|
240f071951 | ||
|
|
d560b4ddfb | ||
|
|
73d6fd1a85 | ||
|
|
46f5133510 | ||
|
|
b3f2e67d9d | ||
|
|
f689cd20fc | ||
|
|
e22de9ff4c | ||
|
|
735bd41242 | ||
|
|
71998bde62 | ||
|
|
f01b714e29 | ||
|
|
028eca9f81 | ||
|
|
d3d4118b86 | ||
|
|
45f1fe19ac | ||
|
|
ad2db5e6cb | ||
|
|
480890d2e9 | ||
|
|
18428eaaa1 | ||
|
|
5ed31f2678 | ||
|
|
b9d194a80e | ||
|
|
2359e85ebd | ||
|
|
a4713df30c |
@@ -9,12 +9,15 @@
|
||||
"cojson-storage",
|
||||
"cojson-storage-indexeddb",
|
||||
"cojson-storage-sqlite",
|
||||
"cojson-storage-rn-sqlite",
|
||||
"cojson-transport-ws",
|
||||
"jazz-browser",
|
||||
"jazz-auth-clerk",
|
||||
"jazz-browser-media-images",
|
||||
"jazz-inspector",
|
||||
"jazz-nodejs",
|
||||
"jazz-react",
|
||||
"jazz-react-core",
|
||||
"jazz-react-auth-clerk",
|
||||
"jazz-react-native",
|
||||
"jazz-react-native-auth-clerk",
|
||||
|
||||
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@@ -25,6 +25,9 @@ jobs:
|
||||
- name: Setup Source Code
|
||||
uses: ./.github/actions/source-code/
|
||||
|
||||
- name: Build packages
|
||||
run: pnpm exec turbo run build --filter='./packages/*'
|
||||
|
||||
- name: Create Release Pull Request or Publish to npm
|
||||
id: changesets
|
||||
uses: changesets/action@v1
|
||||
|
||||
@@ -1,5 +1,48 @@
|
||||
# chat-rn-clerk
|
||||
|
||||
## 1.0.83
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6892dc6]
|
||||
- jazz-tools@0.11.2
|
||||
- jazz-react-native@0.11.2
|
||||
- jazz-react-native-auth-clerk@0.11.2
|
||||
- jazz-react-native-media-images@0.11.2
|
||||
|
||||
## 1.0.82
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.11.1
|
||||
- jazz-react-native-auth-clerk@0.11.1
|
||||
|
||||
## 1.0.81
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6a96d8b]
|
||||
- Updated dependencies [a35249a]
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [f039e8f]
|
||||
- Updated dependencies [e22de9f]
|
||||
- jazz-tools@0.11.0
|
||||
- jazz-react-native-media-images@0.11.0
|
||||
- jazz-react-native-auth-clerk@0.11.0
|
||||
- jazz-react-native@0.11.0
|
||||
|
||||
## 1.0.80
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2f99de0]
|
||||
- jazz-tools@0.10.15
|
||||
- jazz-react-native@0.10.15
|
||||
- jazz-react-native-auth-clerk@0.10.15
|
||||
- jazz-react-native-media-images@0.10.15
|
||||
|
||||
## 1.0.79
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "chat-rn-clerk",
|
||||
"main": "index.js",
|
||||
"version": "1.0.79",
|
||||
"version": "1.0.83",
|
||||
"scripts": {
|
||||
"build": "expo export -p ios",
|
||||
"start": "expo start",
|
||||
|
||||
@@ -1,5 +1,41 @@
|
||||
# chat-rn
|
||||
|
||||
## 1.0.79
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6892dc6]
|
||||
- jazz-tools@0.11.2
|
||||
- jazz-react-native@0.11.2
|
||||
|
||||
## 1.0.78
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.11.1
|
||||
|
||||
## 1.0.77
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6a96d8b]
|
||||
- Updated dependencies [a35249a]
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [f039e8f]
|
||||
- Updated dependencies [e22de9f]
|
||||
- jazz-tools@0.11.0
|
||||
- jazz-react-native@0.11.0
|
||||
|
||||
## 1.0.76
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2f99de0]
|
||||
- jazz-tools@0.10.15
|
||||
- jazz-react-native@0.10.15
|
||||
|
||||
## 1.0.75
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "chat-rn",
|
||||
"version": "1.0.75",
|
||||
"version": "1.0.79",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "expo export -p ios",
|
||||
|
||||
@@ -1,5 +1,39 @@
|
||||
# chat-vue
|
||||
|
||||
## 0.0.64
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6892dc6]
|
||||
- jazz-tools@0.11.2
|
||||
- jazz-browser@0.11.2
|
||||
- jazz-vue@0.11.2
|
||||
|
||||
## 0.0.63
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6a96d8b]
|
||||
- Updated dependencies [a35249a]
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [18428ea]
|
||||
- Updated dependencies [f039e8f]
|
||||
- Updated dependencies [e22de9f]
|
||||
- jazz-tools@0.11.0
|
||||
- jazz-browser@0.11.0
|
||||
- jazz-vue@0.11.0
|
||||
|
||||
## 0.0.62
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2f99de0]
|
||||
- jazz-tools@0.10.15
|
||||
- jazz-browser@0.10.15
|
||||
- jazz-vue@0.10.15
|
||||
|
||||
## 0.0.61
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "chat-vue",
|
||||
"version": "0.0.61",
|
||||
"version": "0.0.64",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,44 @@
|
||||
# jazz-example-chat
|
||||
|
||||
## 0.0.161
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6892dc6]
|
||||
- jazz-tools@0.11.2
|
||||
- jazz-react@0.11.2
|
||||
- jazz-browser-media-images@0.11.2
|
||||
|
||||
## 0.0.160
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.11.1
|
||||
|
||||
## 0.0.159
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6a96d8b]
|
||||
- Updated dependencies [a35249a]
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [f039e8f]
|
||||
- Updated dependencies [e22de9f]
|
||||
- jazz-tools@0.11.0
|
||||
- jazz-browser-media-images@0.11.0
|
||||
- jazz-react@0.11.0
|
||||
|
||||
## 0.0.158
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2f99de0]
|
||||
- jazz-tools@0.10.15
|
||||
- jazz-browser-media-images@0.10.15
|
||||
- jazz-react@0.10.15
|
||||
|
||||
## 0.0.157
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-chat",
|
||||
"private": true,
|
||||
"version": "0.0.157",
|
||||
"version": "0.0.161",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,45 @@
|
||||
# minimal-auth-clerk
|
||||
|
||||
## 0.0.60
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6892dc6]
|
||||
- jazz-tools@0.11.2
|
||||
- jazz-react@0.11.2
|
||||
- jazz-react-auth-clerk@0.11.2
|
||||
|
||||
## 0.0.59
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.11.1
|
||||
- jazz-react-auth-clerk@0.11.1
|
||||
|
||||
## 0.0.58
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6a96d8b]
|
||||
- Updated dependencies [a35249a]
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [f039e8f]
|
||||
- Updated dependencies [e22de9f]
|
||||
- jazz-tools@0.11.0
|
||||
- jazz-react-auth-clerk@0.11.0
|
||||
- jazz-react@0.11.0
|
||||
|
||||
## 0.0.57
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2f99de0]
|
||||
- jazz-tools@0.10.15
|
||||
- jazz-react@0.10.15
|
||||
- jazz-react-auth-clerk@0.10.15
|
||||
|
||||
## 0.0.56
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "clerk",
|
||||
"private": true,
|
||||
"version": "0.0.56",
|
||||
"version": "0.0.60",
|
||||
"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.10.14",
|
||||
"jazz-react-auth-clerk": "workspace:0.11.2",
|
||||
"jazz-tools": "workspace:*",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1"
|
||||
|
||||
@@ -1,5 +1,35 @@
|
||||
# file-share-svelte
|
||||
|
||||
## 0.0.44
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6892dc6]
|
||||
- jazz-tools@0.11.2
|
||||
- jazz-svelte@0.11.2
|
||||
|
||||
## 0.0.43
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6a96d8b]
|
||||
- Updated dependencies [a35249a]
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [f039e8f]
|
||||
- Updated dependencies [e22de9f]
|
||||
- jazz-tools@0.11.0
|
||||
- jazz-svelte@0.11.0
|
||||
|
||||
## 0.0.42
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2f99de0]
|
||||
- jazz-tools@0.10.15
|
||||
- jazz-svelte@0.10.15
|
||||
|
||||
## 0.0.41
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "file-share-svelte",
|
||||
"version": "0.0.41",
|
||||
"version": "0.0.44",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,48 @@
|
||||
# form
|
||||
|
||||
## 0.1.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6892dc6]
|
||||
- jazz-tools@0.11.2
|
||||
- jazz-react@0.11.2
|
||||
- jazz-browser-media-images@0.11.2
|
||||
|
||||
## 0.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.11.1
|
||||
|
||||
## 0.1.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 18428ea: PasskeyAuth: Sets `profile.name` only if a non-empty username is passed to `signUp`
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6a96d8b]
|
||||
- Updated dependencies [a35249a]
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [f039e8f]
|
||||
- Updated dependencies [e22de9f]
|
||||
- jazz-tools@0.11.0
|
||||
- jazz-browser-media-images@0.11.0
|
||||
- jazz-react@0.11.0
|
||||
|
||||
## 0.0.53
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2f99de0]
|
||||
- jazz-tools@0.10.15
|
||||
- jazz-browser-media-images@0.10.15
|
||||
- jazz-react@0.10.15
|
||||
|
||||
## 0.0.52
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "form",
|
||||
"private": true,
|
||||
"version": "0.0.52",
|
||||
"version": "0.1.2",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,44 @@
|
||||
# image-upload
|
||||
|
||||
## 0.0.58
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6892dc6]
|
||||
- jazz-tools@0.11.2
|
||||
- jazz-react@0.11.2
|
||||
- jazz-browser-media-images@0.11.2
|
||||
|
||||
## 0.0.57
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.11.1
|
||||
|
||||
## 0.0.56
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6a96d8b]
|
||||
- Updated dependencies [a35249a]
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [f039e8f]
|
||||
- Updated dependencies [e22de9f]
|
||||
- jazz-tools@0.11.0
|
||||
- jazz-browser-media-images@0.11.0
|
||||
- jazz-react@0.11.0
|
||||
|
||||
## 0.0.55
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2f99de0]
|
||||
- jazz-tools@0.10.15
|
||||
- jazz-browser-media-images@0.10.15
|
||||
- jazz-react@0.10.15
|
||||
|
||||
## 0.0.54
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "image-upload",
|
||||
"private": true,
|
||||
"version": "0.0.54",
|
||||
"version": "0.0.58",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
# jazz-example-inspector
|
||||
|
||||
## 0.0.111
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [e22de9f]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [0f67e0a]
|
||||
- cojson@0.11.0
|
||||
- cojson-transport-ws@0.11.0
|
||||
|
||||
## 0.0.110
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [f86e278]
|
||||
- cojson@0.10.15
|
||||
- cojson-transport-ws@0.10.15
|
||||
|
||||
## 0.0.109
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-inspector-app",
|
||||
"private": true,
|
||||
"version": "0.0.109",
|
||||
"version": "0.0.111",
|
||||
"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.10.8",
|
||||
"cojson-transport-ws": "workspace:0.10.8",
|
||||
"cojson": "workspace:0.11.0",
|
||||
"cojson-transport-ws": "workspace:0.11.0",
|
||||
"hash-slash": "workspace:0.2.2",
|
||||
"lucide-react": "^0.274.0",
|
||||
"qrcode": "^1.5.3",
|
||||
|
||||
1
examples/multiauth/.env
Normal file
1
examples/multiauth/.env
Normal file
@@ -0,0 +1 @@
|
||||
VITE_CLERK_PUBLISHABLE_KEY=pk_test_ZXZpZGVudC1kYW5lLTg5LmNsZXJrLmFjY291bnRzLmRldiQ
|
||||
24
examples/multiauth/.gitignore
vendored
Normal file
24
examples/multiauth/.gitignore
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
10
examples/multiauth/CHANGELOG.md
Normal file
10
examples/multiauth/CHANGELOG.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# multiauth
|
||||
|
||||
## 0.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6892dc6]
|
||||
- jazz-tools@0.11.2
|
||||
- jazz-react@0.11.2
|
||||
- jazz-react-auth-clerk@0.11.2
|
||||
43
examples/multiauth/README.md
Normal file
43
examples/multiauth/README.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# Multi-auth example with Jazz and React
|
||||
|
||||
This example demonstrates using Jazz with multiple authentication methods; in this case, Clerk and passphrases are able to be used.
|
||||
|
||||
## Getting started
|
||||
|
||||
To run this example, you may either:
|
||||
* Clone the Jazz monorepo and run this example from within.
|
||||
* Create a new Jazz project using this example as a template, and run that new project.
|
||||
|
||||
|
||||
### Using this example as a template
|
||||
|
||||
1. Create a new Jazz project, and use this example as a template.
|
||||
```bash
|
||||
npx create-jazz-app@latest --example counter --project-name counter
|
||||
```
|
||||
2. Navigate to the new project and start the development server.
|
||||
```bash
|
||||
cd counter
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Using the monorepo
|
||||
|
||||
This requires `pnpm` to be installed; see [https://pnpm.io/installation](https://pnpm.io/installation).
|
||||
|
||||
1. Clone the `jazz` repository.
|
||||
```bash
|
||||
git clone https://github.com/garden-co/jazz.git
|
||||
```
|
||||
2. Install dependencies.
|
||||
```bash
|
||||
cd jazz
|
||||
pnpm install
|
||||
```
|
||||
3. Navigate to the example and start the development server.
|
||||
```bash
|
||||
cd examples/counter
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
The example should be running at [http://localhost:5173](http://localhost:5173) by default.
|
||||
28
examples/multiauth/eslint.config.js
Normal file
28
examples/multiauth/eslint.config.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import js from "@eslint/js";
|
||||
import reactHooks from "eslint-plugin-react-hooks";
|
||||
import reactRefresh from "eslint-plugin-react-refresh";
|
||||
import globals from "globals";
|
||||
import tseslint from "typescript-eslint";
|
||||
|
||||
export default tseslint.config(
|
||||
{ ignores: ["dist"] },
|
||||
{
|
||||
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
||||
files: ["**/*.{ts,tsx}"],
|
||||
languageOptions: {
|
||||
ecmaVersion: 2020,
|
||||
globals: globals.browser,
|
||||
},
|
||||
plugins: {
|
||||
"react-hooks": reactHooks,
|
||||
"react-refresh": reactRefresh,
|
||||
},
|
||||
rules: {
|
||||
...reactHooks.configs.recommended.rules,
|
||||
"react-refresh/only-export-components": [
|
||||
"warn",
|
||||
{ allowConstantExport: true },
|
||||
],
|
||||
},
|
||||
},
|
||||
);
|
||||
12
examples/multiauth/index.html
Normal file
12
examples/multiauth/index.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Jazz Multi-auth (React)</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
30
examples/multiauth/package.json
Normal file
30
examples/multiauth/package.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "multiauth",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc -b && vite build",
|
||||
"preview": "vite preview",
|
||||
"format-and-lint": "biome check .",
|
||||
"format-and-lint:fix": "biome check . --write"
|
||||
},
|
||||
"dependencies": {
|
||||
"@clerk/clerk-react": "^5.4.1",
|
||||
"jazz-react": "workspace:*",
|
||||
"jazz-react-auth-clerk": "workspace:*",
|
||||
"jazz-tools": "workspace:*",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "1.9.4",
|
||||
"@types/react": "^18.3.12",
|
||||
"@types/react-dom": "^18.3.1",
|
||||
"@vitejs/plugin-react": "^4.3.3",
|
||||
"globals": "^15.11.0",
|
||||
"typescript": "~5.6.2",
|
||||
"vite": "^6.0.11"
|
||||
}
|
||||
}
|
||||
12
examples/multiauth/src/App.css
Normal file
12
examples/multiauth/src/App.css
Normal file
@@ -0,0 +1,12 @@
|
||||
#root {
|
||||
max-width: 1280px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.card {
|
||||
padding: 2em;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
12
examples/multiauth/src/App.tsx
Normal file
12
examples/multiauth/src/App.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Home } from "./components/Home.tsx";
|
||||
import "./App.css";
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<div className="card">
|
||||
<h1>Jazz Multi-auth (React)</h1>
|
||||
|
||||
<Home />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
1
examples/multiauth/src/apiKey.ts
Normal file
1
examples/multiauth/src/apiKey.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const apiKey = "counter-example@garden.co";
|
||||
26
examples/multiauth/src/components/Home.tsx
Normal file
26
examples/multiauth/src/components/Home.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import { useAccount, useIsAuthenticated } from "jazz-react";
|
||||
|
||||
export function Home() {
|
||||
const { me, logOut } = useAccount({ root: {} });
|
||||
const isAuthenticated = useIsAuthenticated();
|
||||
|
||||
if (!me) return;
|
||||
if (!isAuthenticated) return;
|
||||
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
alignItems: "center",
|
||||
gap: "1rem",
|
||||
}}
|
||||
>
|
||||
<div className="container">
|
||||
<h1>You're logged in</h1>
|
||||
<p>Welcome back, {me?.profile?.name}</p>
|
||||
<button onClick={() => logOut()}>Logout</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
184
examples/multiauth/src/components/OmniAuth.tsx
Normal file
184
examples/multiauth/src/components/OmniAuth.tsx
Normal file
@@ -0,0 +1,184 @@
|
||||
import { SignInButton } from "@clerk/clerk-react";
|
||||
import { usePassphraseAuth } from "jazz-react";
|
||||
import { JazzProviderProps, useIsAuthenticated } from "jazz-react";
|
||||
import { useState } from "react";
|
||||
import "../index.css";
|
||||
import { useClerk } from "@clerk/clerk-react";
|
||||
import { JazzProviderWithClerk } from "jazz-react-auth-clerk";
|
||||
import { wordlist } from "../wordlist.ts";
|
||||
|
||||
export function OmniAuthContainer(props: {
|
||||
appName: string;
|
||||
wordlist: string[];
|
||||
children?: React.ReactNode;
|
||||
}) {
|
||||
const isAuthenticated = useIsAuthenticated();
|
||||
|
||||
const passphraseAuth = usePassphraseAuth({
|
||||
wordlist: props.wordlist,
|
||||
});
|
||||
|
||||
const [step, setStep] = useState<
|
||||
"initial" | "create" | "loginWithPassphrase" | "loginWithClerk"
|
||||
>("initial");
|
||||
const [loginPassphrase, setLoginPassphrase] = useState("");
|
||||
const [isCopied, setIsCopied] = useState(false);
|
||||
const [currentPassphrase, setCurrentPassphrase] = useState(() =>
|
||||
passphraseAuth.generateRandomPassphrase(),
|
||||
);
|
||||
|
||||
if (passphraseAuth.state === "signedIn" || isAuthenticated) {
|
||||
return props.children ?? null;
|
||||
}
|
||||
|
||||
const handleCreateAccount = async () => {
|
||||
setStep("create");
|
||||
};
|
||||
|
||||
const handleLoginWithPassphrase = () => {
|
||||
setStep("loginWithPassphrase");
|
||||
};
|
||||
|
||||
const handleLoginWithClerk = () => {
|
||||
setStep("loginWithClerk");
|
||||
};
|
||||
|
||||
const handleReroll = () => {
|
||||
const newPassphrase = passphraseAuth.generateRandomPassphrase();
|
||||
setCurrentPassphrase(newPassphrase);
|
||||
setIsCopied(false);
|
||||
};
|
||||
|
||||
const handleBack = () => {
|
||||
setStep("initial");
|
||||
setLoginPassphrase("");
|
||||
};
|
||||
|
||||
const handleCopy = async () => {
|
||||
await navigator.clipboard.writeText(passphraseAuth.passphrase);
|
||||
setIsCopied(true);
|
||||
};
|
||||
|
||||
const handleLoginSubmit = async () => {
|
||||
await passphraseAuth.logIn(loginPassphrase);
|
||||
setStep("initial");
|
||||
setLoginPassphrase("");
|
||||
};
|
||||
|
||||
const handleNext = async () => {
|
||||
await passphraseAuth.registerNewAccount(currentPassphrase, "My Account");
|
||||
setStep("initial");
|
||||
setLoginPassphrase("");
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="auth-container">
|
||||
<div className="auth-card">
|
||||
{step === "initial" && (
|
||||
<div>
|
||||
<h1 className="auth-heading">{props.appName}</h1>
|
||||
<button
|
||||
onClick={handleCreateAccount}
|
||||
className="auth-button-primary"
|
||||
>
|
||||
Signup with passphrase
|
||||
</button>
|
||||
<button
|
||||
onClick={handleLoginWithPassphrase}
|
||||
className="auth-button-secondary"
|
||||
>
|
||||
Login with passphrase
|
||||
</button>
|
||||
<button
|
||||
onClick={handleLoginWithClerk}
|
||||
className="auth-button-secondary"
|
||||
>
|
||||
Login with Clerk
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{step === "create" && (
|
||||
<>
|
||||
<h1 className="auth-heading">Your Passphrase</h1>
|
||||
<p className="auth-description">
|
||||
Please copy and store this passphrase somewhere safe. You'll need
|
||||
it to log in.
|
||||
</p>
|
||||
<textarea
|
||||
readOnly
|
||||
value={currentPassphrase}
|
||||
className="auth-textarea"
|
||||
rows={5}
|
||||
/>
|
||||
<button onClick={handleCopy} className="auth-button-primary">
|
||||
{isCopied ? "Copied!" : "Copy"}
|
||||
</button>
|
||||
<div className="auth-button-group">
|
||||
<button onClick={handleBack} className="auth-button-secondary">
|
||||
Back
|
||||
</button>
|
||||
<button onClick={handleReroll} className="auth-button-secondary">
|
||||
Generate New Passphrase
|
||||
</button>
|
||||
<button onClick={handleNext} className="auth-button-primary">
|
||||
Register
|
||||
</button>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
{step === "loginWithPassphrase" && (
|
||||
<div>
|
||||
<h1 className="auth-heading">Log In</h1>
|
||||
<textarea
|
||||
value={loginPassphrase}
|
||||
onChange={(e) => setLoginPassphrase(e.target.value)}
|
||||
placeholder="Enter your passphrase"
|
||||
className="auth-textarea"
|
||||
rows={5}
|
||||
/>
|
||||
<div className="auth-button-group">
|
||||
<button onClick={handleBack} className="auth-button-secondary">
|
||||
Back
|
||||
</button>
|
||||
<button
|
||||
onClick={handleLoginSubmit}
|
||||
className="auth-button-primary"
|
||||
>
|
||||
Log In
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{step === "loginWithClerk" && <SignInButton />}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function OmniAuth({
|
||||
children,
|
||||
AccountSchema,
|
||||
sync,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
} & JazzProviderProps) {
|
||||
const clerk = useClerk();
|
||||
|
||||
return (
|
||||
<JazzProviderWithClerk
|
||||
clerk={clerk}
|
||||
sync={sync}
|
||||
AccountSchema={AccountSchema}
|
||||
>
|
||||
<OmniAuthContainer
|
||||
appName="Jazz Multi-Authentication Example"
|
||||
wordlist={wordlist}
|
||||
>
|
||||
{children}
|
||||
</OmniAuthContainer>
|
||||
</JazzProviderWithClerk>
|
||||
);
|
||||
}
|
||||
151
examples/multiauth/src/index.css
Normal file
151
examples/multiauth/src/index.css
Normal file
@@ -0,0 +1,151 @@
|
||||
:root {
|
||||
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
||||
line-height: 1.5;
|
||||
font-weight: 400;
|
||||
|
||||
color-scheme: light dark;
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
background-color: #242424;
|
||||
|
||||
font-synthesis: none;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
a {
|
||||
font-weight: 500;
|
||||
color: #646cff;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
a:hover {
|
||||
color: #535bf2;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: auto 0;
|
||||
display: flex;
|
||||
place-items: center;
|
||||
min-width: 320px;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2.2em;
|
||||
line-height: 1.1;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.6px;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 6px;
|
||||
border: 1px solid white;
|
||||
color: inherit;
|
||||
padding: 0.5rem 1rem;
|
||||
font-size: 1em;
|
||||
font-weight: 500;
|
||||
font-family: inherit;
|
||||
background-color: transparent;
|
||||
cursor: pointer;
|
||||
transition: all 0.05s ease, border-color 0.1s ease;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
button:hover {
|
||||
background-color: #313131;
|
||||
}
|
||||
|
||||
button:active {
|
||||
border-color: #3313f7;
|
||||
transform: translateY(2px);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
:root {
|
||||
color: rgb(21, 20, 20);
|
||||
background-color: #ffffff;
|
||||
}
|
||||
a:hover {
|
||||
color: #747bff;
|
||||
}
|
||||
button {
|
||||
border-color: #e5e4e2;
|
||||
}
|
||||
button:hover {
|
||||
border-color: rgb(47, 46, 46);
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
button:active {
|
||||
border-color: #3313f7;
|
||||
}
|
||||
}
|
||||
|
||||
.auth-container {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #f3f4f6;
|
||||
}
|
||||
|
||||
.auth-card {
|
||||
background-color: white;
|
||||
padding: 2rem;
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px
|
||||
rgba(0, 0, 0, 0.06);
|
||||
width: 28rem;
|
||||
}
|
||||
|
||||
.auth-button-primary,
|
||||
.auth-button-secondary {
|
||||
width: 100%;
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 0.25rem;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.auth-button-primary {
|
||||
background-color: black;
|
||||
color: white;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.auth-button-secondary {
|
||||
background-color: white;
|
||||
color: black;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
.auth-heading {
|
||||
color: black;
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.auth-textarea {
|
||||
width: 100%;
|
||||
padding: 0.5rem;
|
||||
border: 1px solid #d1d5db;
|
||||
border-radius: 0.25rem;
|
||||
margin-bottom: 1rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.auth-description {
|
||||
font-size: 0.875rem;
|
||||
color: #4b5563;
|
||||
text-align: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.auth-button-group {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
}
|
||||
29
examples/multiauth/src/main.tsx
Normal file
29
examples/multiauth/src/main.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import { ClerkProvider } from "@clerk/clerk-react";
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import App from "./App";
|
||||
import "./index.css";
|
||||
import { apiKey } from "./apiKey.ts";
|
||||
import { OmniAuth } from "./components/OmniAuth.tsx";
|
||||
|
||||
// Import your publishable key
|
||||
const PUBLISHABLE_KEY = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY;
|
||||
|
||||
if (!PUBLISHABLE_KEY) {
|
||||
throw new Error("Add your Clerk publishable key to the .env.local file");
|
||||
}
|
||||
|
||||
createRoot(document.getElementById("root")!).render(
|
||||
<StrictMode>
|
||||
<ClerkProvider publishableKey={PUBLISHABLE_KEY} afterSignOutUrl="/">
|
||||
<OmniAuth
|
||||
sync={{
|
||||
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
|
||||
when: "signedUp", // This makes the app work in local mode when the user is not authenticated
|
||||
}}
|
||||
>
|
||||
<App />
|
||||
</OmniAuth>
|
||||
</ClerkProvider>
|
||||
</StrictMode>,
|
||||
);
|
||||
1
examples/multiauth/src/vite-env.d.ts
vendored
Normal file
1
examples/multiauth/src/vite-env.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/// <reference types="vite/client" />
|
||||
2050
examples/multiauth/src/wordlist.ts
Normal file
2050
examples/multiauth/src/wordlist.ts
Normal file
File diff suppressed because it is too large
Load Diff
24
examples/multiauth/tsconfig.app.json
Normal file
24
examples/multiauth/tsconfig.app.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||
"target": "ES2020",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": ["ES2023", "DOM", "DOM.Iterable"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
|
||||
"moduleResolution": "Bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"isolatedModules": true,
|
||||
"moduleDetection": "force",
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx",
|
||||
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUncheckedSideEffectImports": true
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
7
examples/multiauth/tsconfig.json
Normal file
7
examples/multiauth/tsconfig.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"files": [],
|
||||
"references": [
|
||||
{ "path": "./tsconfig.app.json" },
|
||||
{ "path": "./tsconfig.node.json" }
|
||||
]
|
||||
}
|
||||
22
examples/multiauth/tsconfig.node.json
Normal file
22
examples/multiauth/tsconfig.node.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
||||
"target": "ES2022",
|
||||
"lib": ["ES2023"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
|
||||
"moduleResolution": "Bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"isolatedModules": true,
|
||||
"moduleDetection": "force",
|
||||
"noEmit": true,
|
||||
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUncheckedSideEffectImports": true
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
}
|
||||
7
examples/multiauth/vite.config.ts
Normal file
7
examples/multiauth/vite.config.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { defineConfig } from "vite";
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
});
|
||||
@@ -1,5 +1,47 @@
|
||||
# jazz-example-musicplayer
|
||||
|
||||
## 0.0.82
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6892dc6]
|
||||
- jazz-tools@0.11.2
|
||||
- jazz-inspector@0.11.2
|
||||
- jazz-react@0.11.2
|
||||
|
||||
## 0.0.81
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7b00a81]
|
||||
- jazz-inspector@0.11.1
|
||||
- jazz-react@0.11.1
|
||||
|
||||
## 0.0.80
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6a96d8b]
|
||||
- Updated dependencies [a35249a]
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [b7deb3c]
|
||||
- Updated dependencies [f039e8f]
|
||||
- Updated dependencies [e22de9f]
|
||||
- jazz-tools@0.11.0
|
||||
- jazz-react@0.11.0
|
||||
- jazz-inspector@0.10.13
|
||||
|
||||
## 0.0.79
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2f99de0]
|
||||
- jazz-tools@0.10.15
|
||||
- jazz-inspector@0.10.12
|
||||
- jazz-react@0.10.15
|
||||
|
||||
## 0.0.78
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-music-player",
|
||||
"private": true,
|
||||
"version": "0.0.78",
|
||||
"version": "0.0.82",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -22,8 +22,8 @@
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.0.0",
|
||||
"jazz-inspector": "workspace:*",
|
||||
"jazz-react": "workspace:0.10.14",
|
||||
"jazz-tools": "workspace:0.10.14",
|
||||
"jazz-react": "workspace:0.11.2",
|
||||
"jazz-tools": "workspace:0.11.2",
|
||||
"lucide-react": "^0.274.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
|
||||
@@ -112,34 +112,31 @@ export async function addTrackToPlaylist(
|
||||
playlist.tracks?.push(track);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Since musicTracks are created as private values (see uploadMusicTracks)
|
||||
* to make them shareable as part of the playlist we are cloning them
|
||||
* and setting the playlist group as owner of the clone
|
||||
*
|
||||
* Doing this for backwards compatibility for when the Group inheritance wasn't possible
|
||||
*/
|
||||
const blob = await FileStream.loadAsBlob(track._refs.file.id);
|
||||
const waveform = await MusicTrackWaveform.load(track._refs.waveform.id, {});
|
||||
|
||||
if (!blob || !waveform) return;
|
||||
|
||||
const trackClone = MusicTrack.create(
|
||||
{
|
||||
file: await FileStream.createFromBlob(blob, playlist._owner),
|
||||
duration: track.duration,
|
||||
waveform: MusicTrackWaveform.create(
|
||||
{ data: waveform.data },
|
||||
playlist._owner,
|
||||
),
|
||||
title: track.title,
|
||||
sourceTrack: track,
|
||||
},
|
||||
playlist._owner,
|
||||
export async function removeTrackFromPlaylist(
|
||||
playlist: Playlist,
|
||||
track: MusicTrack,
|
||||
) {
|
||||
const notAdded = !playlist.tracks?.some(
|
||||
(t) => t?.id === track.id || t?._refs.sourceTrack?.id === track.id,
|
||||
);
|
||||
|
||||
playlist.tracks?.push(trackClone);
|
||||
if (notAdded) return;
|
||||
|
||||
if (track._owner._type === "Group" && playlist._owner._type === "Group") {
|
||||
const trackGroup = track._owner;
|
||||
await trackGroup.revokeExtend(playlist._owner);
|
||||
|
||||
const index =
|
||||
playlist.tracks?.findIndex(
|
||||
(t) => t?.id === track.id || t?._refs.sourceTrack?.id === track.id,
|
||||
) ?? -1;
|
||||
if (index > -1) {
|
||||
playlist.tracks?.splice(index, 1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
export async function updatePlaylistTitle(playlist: Playlist, title: string) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useAcceptInvite } from "jazz-react";
|
||||
import { useAcceptInvite, useIsAuthenticated } from "jazz-react";
|
||||
import { ID } from "jazz-tools";
|
||||
import { useCallback } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
@@ -7,6 +7,8 @@ import { MusicaAccount, Playlist } from "./1_schema";
|
||||
export function InvitePage() {
|
||||
const navigate = useNavigate();
|
||||
|
||||
const isAuthenticated = useIsAuthenticated();
|
||||
|
||||
useAcceptInvite({
|
||||
invitedObjectSchema: Playlist,
|
||||
onAccept: useCallback(
|
||||
@@ -32,5 +34,9 @@ export function InvitePage() {
|
||||
),
|
||||
});
|
||||
|
||||
return <p>Accepting invite....</p>;
|
||||
return isAuthenticated ? (
|
||||
<p>Accepting invite....</p>
|
||||
) : (
|
||||
<p>Please sign in to accept the invite.</p>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { MusicTrack, Playlist } from "@/1_schema";
|
||||
import { addTrackToPlaylist } from "@/4_actions";
|
||||
import { addTrackToPlaylist, removeTrackFromPlaylist } from "@/4_actions";
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
@@ -10,6 +10,7 @@ import { cn } from "@/lib/utils";
|
||||
import { useAccount, useCoState } from "jazz-react";
|
||||
import { ID } from "jazz-tools";
|
||||
import { MoreHorizontal } from "lucide-react";
|
||||
import { Fragment } from "react/jsx-runtime";
|
||||
import { MusicTrackTitleInput } from "./MusicTrackTitleInput";
|
||||
import { Button } from "./ui/button";
|
||||
|
||||
@@ -46,6 +47,11 @@ export function MusicTrackRow({
|
||||
addTrackToPlaylist(playlist, track);
|
||||
}
|
||||
|
||||
function handleRemoveFromPlaylist(playlist: Playlist) {
|
||||
if (!track) return;
|
||||
removeTrackFromPlaylist(playlist, track);
|
||||
}
|
||||
|
||||
return (
|
||||
<li
|
||||
className={
|
||||
@@ -85,12 +91,20 @@ export function MusicTrackRow({
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end">
|
||||
{playlists.map((playlist, index) => (
|
||||
<DropdownMenuItem
|
||||
key={index}
|
||||
onSelect={() => handleAddToPlaylist(playlist)}
|
||||
>
|
||||
Add to {playlist.title}
|
||||
</DropdownMenuItem>
|
||||
<Fragment key={index}>
|
||||
<DropdownMenuItem
|
||||
key={`add-${index}`}
|
||||
onSelect={() => handleAddToPlaylist(playlist)}
|
||||
>
|
||||
Add to {playlist.title}
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem
|
||||
key={`remove-${index}`}
|
||||
onSelect={() => handleRemoveFromPlaylist(playlist)}
|
||||
>
|
||||
Remove from {playlist.title}
|
||||
</DropdownMenuItem>
|
||||
</Fragment>
|
||||
))}
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
|
||||
@@ -82,3 +82,47 @@ test("create a new playlist and share", async ({
|
||||
await luigiHome.playMusicTrack("Super Mario World");
|
||||
await luigiHome.expectActiveTrackPlaying();
|
||||
});
|
||||
|
||||
test("create a new playlist, share, then remove track", async ({
|
||||
page: marioPage,
|
||||
browser,
|
||||
}) => {
|
||||
// Create playlist with a song and share
|
||||
await marioPage.goto("/");
|
||||
const marioHome = new HomePage(marioPage);
|
||||
await marioHome.expectMusicTrack("Example song");
|
||||
await marioHome.editTrackTitle("Example song", "Super Mario World");
|
||||
await marioHome.createPlaylist();
|
||||
await marioHome.editPlaylistTitle("Save the princess");
|
||||
await marioHome.navigateToPlaylist("All tracks");
|
||||
await marioHome.addTrackToPlaylist("Super Mario World", "Save the princess");
|
||||
await marioHome.navigateToPlaylist("Save the princess");
|
||||
await marioHome.expectMusicTrack("Super Mario World");
|
||||
await marioHome.signUp("Mario");
|
||||
const url = await marioHome.getShareLink();
|
||||
|
||||
await sleep(4000); // Wait for the sync to complete
|
||||
|
||||
// Retrieve shared playlist
|
||||
const luigiContext = await browser.newContext();
|
||||
await mockAuthenticator(luigiContext);
|
||||
const luigiPage = await luigiContext.newPage();
|
||||
await luigiPage.goto("/");
|
||||
const luigiHome = new HomePage(luigiPage);
|
||||
await luigiHome.signUp("Luigi");
|
||||
await luigiPage.goto(url);
|
||||
await luigiHome.expectMusicTrack("Super Mario World");
|
||||
|
||||
// Remove track from playlist
|
||||
await marioHome.navigateToHome();
|
||||
await marioHome.removeTrackFromPlaylist(
|
||||
"Super Mario World",
|
||||
"Save the princess",
|
||||
);
|
||||
await sleep(4000); // Wait for the sync to complete
|
||||
|
||||
// Expect that the track is removed from the playlist
|
||||
await marioHome.navigateToPlaylist("Save the princess");
|
||||
await marioHome.notExpectMusicTrack("Super Mario World");
|
||||
await luigiHome.notExpectMusicTrack("Super Mario World");
|
||||
});
|
||||
|
||||
@@ -33,6 +33,14 @@ export class HomePage {
|
||||
).toBeVisible();
|
||||
}
|
||||
|
||||
async notExpectMusicTrack(trackName: string) {
|
||||
await expect(
|
||||
this.page.getByRole("button", {
|
||||
name: `Play ${trackName}`,
|
||||
}),
|
||||
).not.toBeVisible();
|
||||
}
|
||||
|
||||
async playMusicTrack(trackName: string) {
|
||||
await this.page
|
||||
.getByRole("button", {
|
||||
@@ -65,6 +73,14 @@ export class HomePage {
|
||||
.click();
|
||||
}
|
||||
|
||||
async navigateToHome() {
|
||||
await this.page
|
||||
.getByRole("link", {
|
||||
name: "All tracks",
|
||||
})
|
||||
.click();
|
||||
}
|
||||
|
||||
async getShareLink() {
|
||||
await this.page
|
||||
.getByRole("button", {
|
||||
@@ -95,6 +111,20 @@ export class HomePage {
|
||||
.click();
|
||||
}
|
||||
|
||||
async removeTrackFromPlaylist(trackTitle: string, playlistTitle: string) {
|
||||
await this.page
|
||||
.getByRole("button", {
|
||||
name: `Open ${trackTitle} menu`,
|
||||
})
|
||||
.click();
|
||||
|
||||
await this.page
|
||||
.getByRole("menuitem", {
|
||||
name: `Remove from ${playlistTitle}`,
|
||||
})
|
||||
.click();
|
||||
}
|
||||
|
||||
async signUp(name: string) {
|
||||
await this.page.getByRole("button", { name: "Sign up" }).click();
|
||||
await this.page.getByRole("textbox", { name: "Username" }).fill(name);
|
||||
|
||||
@@ -1,5 +1,41 @@
|
||||
# organization
|
||||
|
||||
## 0.0.54
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6892dc6]
|
||||
- jazz-tools@0.11.2
|
||||
- jazz-react@0.11.2
|
||||
|
||||
## 0.0.53
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.11.1
|
||||
|
||||
## 0.0.52
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6a96d8b]
|
||||
- Updated dependencies [a35249a]
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [f039e8f]
|
||||
- Updated dependencies [e22de9f]
|
||||
- jazz-tools@0.11.0
|
||||
- jazz-react@0.11.0
|
||||
|
||||
## 0.0.51
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2f99de0]
|
||||
- jazz-tools@0.10.15
|
||||
- jazz-react@0.10.15
|
||||
|
||||
## 0.0.50
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "organization",
|
||||
"private": true,
|
||||
"version": "0.0.50",
|
||||
"version": "0.0.54",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -23,7 +23,7 @@ export function CreateOrganization() {
|
||||
return;
|
||||
}
|
||||
|
||||
const group = Group.create({ owner: me });
|
||||
const group = Group.create();
|
||||
|
||||
me.root.organizations.push(draft as Organization);
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { useCoState } from "jazz-react";
|
||||
import { Account, Group, ID } from "jazz-tools";
|
||||
import { Group } from "jazz-tools";
|
||||
import { Organization } from "../schema.ts";
|
||||
|
||||
export function OrganizationMembers({
|
||||
@@ -10,26 +9,13 @@ export function OrganizationMembers({
|
||||
return (
|
||||
<>
|
||||
{group.members.map((member) => (
|
||||
<Member
|
||||
key={member.id}
|
||||
accountId={member.id as ID<Account>}
|
||||
role={member.role}
|
||||
/>
|
||||
<div key={member.id} className="px-4 py-5 sm:px-6">
|
||||
<strong className="font-medium">
|
||||
{member.account.profile?.name}
|
||||
</strong>{" "}
|
||||
({member.role})
|
||||
</div>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
function Member({
|
||||
accountId,
|
||||
role,
|
||||
}: { accountId: ID<Account>; role?: string }) {
|
||||
const account = useCoState(Account, accountId, { profile: {} });
|
||||
|
||||
if (!account?.profile) return;
|
||||
|
||||
return (
|
||||
<div className="px-4 py-5 sm:px-6">
|
||||
<strong className="font-medium">{account.profile.name}</strong> ({role})
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
# passkey-svelte
|
||||
|
||||
## 0.0.48
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.11.2
|
||||
|
||||
## 0.0.47
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.11.0
|
||||
|
||||
## 0.0.46
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.10.15
|
||||
|
||||
## 0.0.45
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "passkey-svelte",
|
||||
"version": "0.0.45",
|
||||
"version": "0.0.48",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,41 @@
|
||||
# minimal-auth-passkey
|
||||
|
||||
## 0.0.59
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6892dc6]
|
||||
- jazz-tools@0.11.2
|
||||
- jazz-react@0.11.2
|
||||
|
||||
## 0.0.58
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.11.1
|
||||
|
||||
## 0.0.57
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6a96d8b]
|
||||
- Updated dependencies [a35249a]
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [f039e8f]
|
||||
- Updated dependencies [e22de9f]
|
||||
- jazz-tools@0.11.0
|
||||
- jazz-react@0.11.0
|
||||
|
||||
## 0.0.56
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2f99de0]
|
||||
- jazz-tools@0.10.15
|
||||
- jazz-react@0.10.15
|
||||
|
||||
## 0.0.55
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "passkey",
|
||||
"private": true,
|
||||
"version": "0.0.55",
|
||||
"version": "0.0.59",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,41 @@
|
||||
# passphrase
|
||||
|
||||
## 0.0.56
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6892dc6]
|
||||
- jazz-tools@0.11.2
|
||||
- jazz-react@0.11.2
|
||||
|
||||
## 0.0.55
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.11.1
|
||||
|
||||
## 0.0.54
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6a96d8b]
|
||||
- Updated dependencies [a35249a]
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [f039e8f]
|
||||
- Updated dependencies [e22de9f]
|
||||
- jazz-tools@0.11.0
|
||||
- jazz-react@0.11.0
|
||||
|
||||
## 0.0.53
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2f99de0]
|
||||
- jazz-tools@0.10.15
|
||||
- jazz-react@0.10.15
|
||||
|
||||
## 0.0.52
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "passphrase",
|
||||
"private": true,
|
||||
"version": "0.0.52",
|
||||
"version": "0.0.56",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,41 @@
|
||||
# jazz-password-manager
|
||||
|
||||
## 0.0.80
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6892dc6]
|
||||
- jazz-tools@0.11.2
|
||||
- jazz-react@0.11.2
|
||||
|
||||
## 0.0.79
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.11.1
|
||||
|
||||
## 0.0.78
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6a96d8b]
|
||||
- Updated dependencies [a35249a]
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [f039e8f]
|
||||
- Updated dependencies [e22de9f]
|
||||
- jazz-tools@0.11.0
|
||||
- jazz-react@0.11.0
|
||||
|
||||
## 0.0.77
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2f99de0]
|
||||
- jazz-tools@0.10.15
|
||||
- jazz-react@0.10.15
|
||||
|
||||
## 0.0.76
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-password-manager",
|
||||
"private": true,
|
||||
"version": "0.0.76",
|
||||
"version": "0.0.80",
|
||||
"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.10.14",
|
||||
"jazz-tools": "workspace:0.10.14",
|
||||
"jazz-react": "workspace:0.11.2",
|
||||
"jazz-tools": "workspace:0.11.2",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-hook-form": "^7.41.5",
|
||||
|
||||
@@ -6,7 +6,7 @@ import NewItemModal from "./components/new-item-modal";
|
||||
import Table from "./components/table";
|
||||
|
||||
import { useAccount, useCoState } from "jazz-react";
|
||||
import { CoMapInit, Group, ID } from "jazz-tools";
|
||||
import { CoMapInit, ID } from "jazz-tools";
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
import { Folder, FolderList, PasswordItem } from "./1_schema";
|
||||
import {
|
||||
@@ -136,20 +136,14 @@ const VaultPage: React.FC = () => {
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => setEditingItem(item)}
|
||||
disabled={
|
||||
item._owner.castAs(Group).myRole() !== "admin" &&
|
||||
item._owner.castAs(Group).myRole() !== "writer"
|
||||
}
|
||||
disabled={!me.canWrite(item)}
|
||||
>
|
||||
Edit
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => handleDeleteItem(item)}
|
||||
variant="danger"
|
||||
disabled={
|
||||
item._owner.castAs(Group).myRole() !== "admin" &&
|
||||
item._owner.castAs(Group).myRole() !== "writer"
|
||||
}
|
||||
disabled={!me.canWrite(item)}
|
||||
>
|
||||
Delete
|
||||
</Button>
|
||||
@@ -210,21 +204,13 @@ const VaultPage: React.FC = () => {
|
||||
<div className="flex gap-2">
|
||||
<Button
|
||||
onClick={() => setIsNewItemModalOpen(true)}
|
||||
disabled={
|
||||
!selectedFolder ||
|
||||
(selectedFolder._owner.castAs(Group).myRole() !== "admin" &&
|
||||
selectedFolder._owner.castAs(Group).myRole() !== "writer")
|
||||
}
|
||||
disabled={!selectedFolder || !me.canWrite(selectedFolder)}
|
||||
>
|
||||
New Item
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => setIsInviteModalOpen(true)}
|
||||
disabled={
|
||||
!selectedFolder ||
|
||||
(selectedFolder._owner.castAs(Group).myRole() !== "admin" &&
|
||||
selectedFolder._owner.castAs(Group).myRole() !== "writer")
|
||||
}
|
||||
disabled={!selectedFolder || !me.canWrite(selectedFolder)}
|
||||
>
|
||||
Share Folder
|
||||
</Button>
|
||||
|
||||
@@ -21,11 +21,9 @@ const InviteModal: React.FC<InviteModalProps> = ({
|
||||
>("reader");
|
||||
const [inviteLink, setInviteLink] = useState("");
|
||||
|
||||
const members = selectedFolder?._owner.castAs(Group).members;
|
||||
const members = selectedFolder?._owner.members;
|
||||
const invitedMembers = members
|
||||
? members
|
||||
.filter((m) => !m.account?.isMe && m.role !== "revoked")
|
||||
.map((m) => m.account)
|
||||
? members.filter((m) => !m.account?.isMe).map((m) => m.account)
|
||||
: [];
|
||||
|
||||
const handleCreateInviteLink = () => {
|
||||
|
||||
@@ -1,5 +1,44 @@
|
||||
# jazz-example-pets
|
||||
|
||||
## 0.0.178
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6892dc6]
|
||||
- jazz-tools@0.11.2
|
||||
- jazz-react@0.11.2
|
||||
- jazz-browser-media-images@0.11.2
|
||||
|
||||
## 0.0.177
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.11.1
|
||||
|
||||
## 0.0.176
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6a96d8b]
|
||||
- Updated dependencies [a35249a]
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [f039e8f]
|
||||
- Updated dependencies [e22de9f]
|
||||
- jazz-tools@0.11.0
|
||||
- jazz-browser-media-images@0.11.0
|
||||
- jazz-react@0.11.0
|
||||
|
||||
## 0.0.175
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2f99de0]
|
||||
- jazz-tools@0.10.15
|
||||
- jazz-browser-media-images@0.10.15
|
||||
- jazz-react@0.10.15
|
||||
|
||||
## 0.0.174
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-pets",
|
||||
"private": true,
|
||||
"version": "0.0.174",
|
||||
"version": "0.0.178",
|
||||
"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.10.14",
|
||||
"jazz-react": "workspace:0.10.14",
|
||||
"jazz-tools": "workspace:0.10.14",
|
||||
"jazz-browser-media-images": "workspace:0.11.2",
|
||||
"jazz-react": "workspace:0.11.2",
|
||||
"jazz-tools": "workspace:0.11.2",
|
||||
"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.10.14",
|
||||
"jazz-run": "workspace:0.11.2",
|
||||
"postcss": "^8.4.27",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"typescript": "~5.6.2",
|
||||
|
||||
@@ -34,7 +34,7 @@ export function NewPetPostForm() {
|
||||
if (newPetPost) {
|
||||
newPetPost.name = name;
|
||||
} else {
|
||||
const petPostGroup = Group.create({ owner: me });
|
||||
const petPostGroup = Group.create();
|
||||
const petPost = PartialPetPost.create(
|
||||
{
|
||||
name,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useParams } from "react-router";
|
||||
|
||||
import { PetPost, PetReactions, ReactionTypes } from "./1_schema";
|
||||
|
||||
import { ProgressiveImg } from "jazz-react";
|
||||
import { ProgressiveImg, useAccount } from "jazz-react";
|
||||
import { useCoState } from "jazz-react";
|
||||
import { ID } from "jazz-tools";
|
||||
import uniqolor from "uniqolor";
|
||||
@@ -26,6 +26,7 @@ const reactionEmojiMap: {
|
||||
export function RatePetPostUI() {
|
||||
const petPostID = useParams<{ petPostId: ID<PetPost> }>().petPostId;
|
||||
|
||||
const { me } = useAccount();
|
||||
const petPost = useCoState(PetPost, petPostID);
|
||||
|
||||
return (
|
||||
@@ -60,7 +61,7 @@ export function RatePetPostUI() {
|
||||
))}
|
||||
</div>
|
||||
|
||||
{petPost?._owner.myRole() === "admin" && petPost.reactions && (
|
||||
{petPost && me.canAdmin(petPost) && petPost.reactions && (
|
||||
<ReactionOverview petReactions={petPost.reactions} />
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useState } from "react";
|
||||
|
||||
import { PetPost } from "../1_schema";
|
||||
|
||||
import { createInviteLink } from "jazz-react";
|
||||
import { createInviteLink, useAccount } from "jazz-react";
|
||||
import QRCode from "qrcode";
|
||||
|
||||
import { Button, useToast } from "../basicComponents";
|
||||
@@ -10,9 +10,11 @@ import { Button, useToast } from "../basicComponents";
|
||||
export function ShareButton({ petPost }: { petPost?: PetPost | null }) {
|
||||
const [existingInviteLink, setExistingInviteLink] = useState<string>();
|
||||
const { toast } = useToast();
|
||||
const { me } = useAccount();
|
||||
|
||||
return (
|
||||
petPost?._owner.myRole() === "admin" && (
|
||||
petPost &&
|
||||
me.canAdmin(petPost) && (
|
||||
<Button
|
||||
size="sm"
|
||||
className="py-0"
|
||||
|
||||
@@ -1,5 +1,44 @@
|
||||
# reactions
|
||||
|
||||
## 0.0.58
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6892dc6]
|
||||
- jazz-tools@0.11.2
|
||||
- jazz-react@0.11.2
|
||||
- jazz-browser-media-images@0.11.2
|
||||
|
||||
## 0.0.57
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.11.1
|
||||
|
||||
## 0.0.56
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6a96d8b]
|
||||
- Updated dependencies [a35249a]
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [f039e8f]
|
||||
- Updated dependencies [e22de9f]
|
||||
- jazz-tools@0.11.0
|
||||
- jazz-browser-media-images@0.11.0
|
||||
- jazz-react@0.11.0
|
||||
|
||||
## 0.0.55
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2f99de0]
|
||||
- jazz-tools@0.10.15
|
||||
- jazz-browser-media-images@0.10.15
|
||||
- jazz-react@0.10.15
|
||||
|
||||
## 0.0.54
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "reactions",
|
||||
"private": true,
|
||||
"version": "0.0.54",
|
||||
"version": "0.0.58",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -9,8 +9,7 @@ function App() {
|
||||
const router = useIframeHashRouter();
|
||||
|
||||
const createReactions = () => {
|
||||
if (!me) return;
|
||||
const group = Group.create({ owner: me });
|
||||
const group = Group.create();
|
||||
group.addMember("everyone", "writer");
|
||||
const chat = Reactions.create([], { owner: group });
|
||||
router.navigate("/#/reactions/" + chat.id);
|
||||
|
||||
@@ -1,5 +1,39 @@
|
||||
# todo-vue
|
||||
|
||||
## 0.0.62
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6892dc6]
|
||||
- jazz-tools@0.11.2
|
||||
- jazz-browser@0.11.2
|
||||
- jazz-vue@0.11.2
|
||||
|
||||
## 0.0.61
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6a96d8b]
|
||||
- Updated dependencies [a35249a]
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [18428ea]
|
||||
- Updated dependencies [f039e8f]
|
||||
- Updated dependencies [e22de9f]
|
||||
- jazz-tools@0.11.0
|
||||
- jazz-browser@0.11.0
|
||||
- jazz-vue@0.11.0
|
||||
|
||||
## 0.0.60
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2f99de0]
|
||||
- jazz-tools@0.10.15
|
||||
- jazz-browser@0.10.15
|
||||
- jazz-vue@0.10.15
|
||||
|
||||
## 0.0.59
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "todo-vue",
|
||||
"version": "0.0.59",
|
||||
"version": "0.0.62",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,41 @@
|
||||
# jazz-example-todo
|
||||
|
||||
## 0.0.177
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6892dc6]
|
||||
- jazz-tools@0.11.2
|
||||
- jazz-react@0.11.2
|
||||
|
||||
## 0.0.176
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.11.1
|
||||
|
||||
## 0.0.175
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6a96d8b]
|
||||
- Updated dependencies [a35249a]
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [f039e8f]
|
||||
- Updated dependencies [e22de9f]
|
||||
- jazz-tools@0.11.0
|
||||
- jazz-react@0.11.0
|
||||
|
||||
## 0.0.174
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2f99de0]
|
||||
- jazz-tools@0.10.15
|
||||
- jazz-react@0.10.15
|
||||
|
||||
## 0.0.173
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-todo",
|
||||
"private": true,
|
||||
"version": "0.0.173",
|
||||
"version": "0.0.177",
|
||||
"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.10.14",
|
||||
"jazz-tools": "workspace:0.10.14",
|
||||
"jazz-react": "workspace:0.11.2",
|
||||
"jazz-tools": "workspace:0.11.2",
|
||||
"lucide-react": "^0.274.0",
|
||||
"qrcode": "^1.5.3",
|
||||
"react": "^18.3.1",
|
||||
|
||||
@@ -21,7 +21,7 @@ export function NewProjectForm() {
|
||||
// To create a new todo project, we first create a `Group`,
|
||||
// which is a scope for defining access rights (reader/writer/admin)
|
||||
// of its members, which will apply to all CoValues owned by that group.
|
||||
const projectGroup = Group.create({ owner: me });
|
||||
const projectGroup = Group.create();
|
||||
|
||||
// Then we create an empty todo project within that group
|
||||
const project = TodoProject.create(
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useState } from "react";
|
||||
|
||||
import QRCode from "qrcode";
|
||||
|
||||
import { createInviteLink } from "jazz-react";
|
||||
import { createInviteLink, useAccount } from "jazz-react";
|
||||
import { CoValue } from "jazz-tools";
|
||||
import { Button, useToast } from "../basicComponents";
|
||||
|
||||
@@ -15,9 +15,11 @@ export function InviteButton<T extends CoValue>({
|
||||
}) {
|
||||
const [existingInviteLink, setExistingInviteLink] = useState<string>();
|
||||
const { toast } = useToast();
|
||||
const { me } = useAccount();
|
||||
|
||||
return (
|
||||
value?._owner?.myRole() === "admin" && (
|
||||
value &&
|
||||
me.canAdmin(value) && (
|
||||
<Button
|
||||
size="sm"
|
||||
className="py-0"
|
||||
|
||||
@@ -1,5 +1,41 @@
|
||||
# version-history
|
||||
|
||||
## 0.0.55
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6892dc6]
|
||||
- jazz-tools@0.11.2
|
||||
- jazz-react@0.11.2
|
||||
|
||||
## 0.0.54
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.11.1
|
||||
|
||||
## 0.0.53
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6a96d8b]
|
||||
- Updated dependencies [a35249a]
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [f039e8f]
|
||||
- Updated dependencies [e22de9f]
|
||||
- jazz-tools@0.11.0
|
||||
- jazz-react@0.11.0
|
||||
|
||||
## 0.0.52
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2f99de0]
|
||||
- jazz-tools@0.10.15
|
||||
- jazz-react@0.10.15
|
||||
|
||||
## 0.0.51
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "version-history",
|
||||
"private": true,
|
||||
"version": "0.0.51",
|
||||
"version": "0.0.55",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -15,7 +15,7 @@ function App() {
|
||||
const issue = useCoState(Issue, issueID);
|
||||
|
||||
const createIssue = () => {
|
||||
const group = Group.create({ owner: me });
|
||||
const group = Group.create();
|
||||
group.addMember("everyone", "writer");
|
||||
|
||||
const newIssue = Issue.create(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createInviteLink } from "jazz-react";
|
||||
import { createInviteLink, useAccount } from "jazz-react";
|
||||
import { useCoState } from "jazz-react";
|
||||
import { ID } from "jazz-tools";
|
||||
import { IssueComponent } from "./Issue.tsx";
|
||||
@@ -21,14 +21,15 @@ export function ProjectComponent({ projectID }: { projectID: ID<Project> }) {
|
||||
estimate: 0,
|
||||
status: "backlog",
|
||||
},
|
||||
{ owner: project._owner },
|
||||
project._owner,
|
||||
),
|
||||
);
|
||||
};
|
||||
const { me } = useAccount();
|
||||
return project ? (
|
||||
<div>
|
||||
<h1>{project.name}</h1>
|
||||
{project._owner?.myRole() === "admin" && (
|
||||
{me.canAdmin(project) && (
|
||||
<>
|
||||
<button onClick={() => invite("reader")}>Invite Guest</button>
|
||||
<button onClick={() => invite("writer")}>Invite Member</button>
|
||||
|
||||
49
homepage/design-system/src/app/components/atoms/Alert.tsx
Normal file
49
homepage/design-system/src/app/components/atoms/Alert.tsx
Normal file
@@ -0,0 +1,49 @@
|
||||
import clsx from "clsx";
|
||||
import type { ReactNode } from "react";
|
||||
import { Icon } from "./Icon";
|
||||
|
||||
interface Props {
|
||||
children: ReactNode;
|
||||
variant?: "warning" | "info";
|
||||
title: string;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function Alert({
|
||||
children,
|
||||
variant = "warning",
|
||||
title,
|
||||
className,
|
||||
}: Props) {
|
||||
return (
|
||||
<div
|
||||
className={clsx(
|
||||
"border-l-4 p-4 pl-6 dark:bg-red-200/5 overflow-hidden relative rounded",
|
||||
{
|
||||
"border-yellow-400 bg-yellow-50 dark:border-yellow-500 dark:bg-yellow-200/5":
|
||||
variant === "warning",
|
||||
"border-blue-400 bg-blue-50 dark:border-blue-500 dark:bg-blue-200/5":
|
||||
variant === "info",
|
||||
},
|
||||
className,
|
||||
)}
|
||||
>
|
||||
<span
|
||||
className={clsx(
|
||||
"text-sm font-bold flex items-center gap-1",
|
||||
variant === "warning" && "text-yellow-700 dark:text-yellow-400",
|
||||
variant === "info" && "text-blue-700 dark:text-blue-400",
|
||||
)}
|
||||
>
|
||||
<Icon
|
||||
name={variant}
|
||||
size="7xl"
|
||||
className="absolute -z-10 right-0 opacity-5 top-0 rotate-12 pointer-events-none"
|
||||
/>
|
||||
<Icon name={variant} size="xs" />
|
||||
{title}
|
||||
</span>
|
||||
<span className={clsx("text-sm")}>{children}</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
import {
|
||||
AlertCircleIcon,
|
||||
AlertTriangleIcon,
|
||||
ArrowDownIcon,
|
||||
ArrowRightIcon,
|
||||
BookTextIcon,
|
||||
@@ -6,8 +8,8 @@ import {
|
||||
CheckIcon,
|
||||
ChevronDown,
|
||||
ChevronRight,
|
||||
ClipboardIcon,
|
||||
CodeIcon,
|
||||
CopyIcon,
|
||||
FileLock2Icon,
|
||||
FileTextIcon,
|
||||
FingerprintIcon,
|
||||
@@ -16,9 +18,10 @@ import {
|
||||
GlobeIcon,
|
||||
HashIcon,
|
||||
ImageIcon,
|
||||
InfoIcon,
|
||||
LinkIcon,
|
||||
LockKeyholeIcon,
|
||||
LucideIcon,
|
||||
type LucideIcon,
|
||||
MailIcon,
|
||||
MenuIcon,
|
||||
MessageCircleQuestionIcon,
|
||||
@@ -46,7 +49,7 @@ const icons = {
|
||||
chevronDown: ChevronDown,
|
||||
close: XIcon,
|
||||
code: CodeIcon,
|
||||
copy: CopyIcon,
|
||||
copy: ClipboardIcon,
|
||||
darkTheme: MoonIcon,
|
||||
delete: TrashIcon,
|
||||
devices: MonitorSmartphoneIcon,
|
||||
@@ -71,6 +74,8 @@ const icons = {
|
||||
touchId: FingerprintIcon,
|
||||
upload: UploadCloudIcon,
|
||||
zip: FolderArchiveIcon,
|
||||
warning: AlertTriangleIcon,
|
||||
info: InfoIcon,
|
||||
};
|
||||
|
||||
// copied from tailwind line height https://tailwindcss.com/docs/font-size
|
||||
|
||||
@@ -6,7 +6,11 @@ import { Icon } from "../atoms/Icon";
|
||||
|
||||
// TODO: add tabs feature, and remove CodeExampleTabs
|
||||
|
||||
function CopyButton({ code, size }: { code: string; size: "md" | "lg" }) {
|
||||
export function CopyButton({
|
||||
code,
|
||||
size,
|
||||
className,
|
||||
}: { code: string; size: "md" | "lg"; className?: string }) {
|
||||
const [copyCount, setCopyCount] = useState(0);
|
||||
const copied = copyCount > 0;
|
||||
|
||||
@@ -23,6 +27,7 @@ function CopyButton({ code, size }: { code: string; size: "md" | "lg" }) {
|
||||
<button
|
||||
type="button"
|
||||
className={clsx(
|
||||
className,
|
||||
"group/button absolute overflow-hidden rounded text-2xs font-medium md:opacity-0 backdrop-blur transition md:focus:opacity-100 group-hover:opacity-100",
|
||||
copied
|
||||
? "bg-emerald-400/10 ring-1 ring-inset ring-emerald-400/20"
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
The homepage of the [Jazz](https://github.com/garden-co/jazz) project, including information about the project, features, and resources.
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation about the documentation can be found in the `./docs` folder.
|
||||
|
||||
## Build
|
||||
|
||||
The homepage is built using [Next.js](https://nextjs.org/) and [Tailwind CSS](https://tailwindcss.com/).
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Frequently Asked Questions
|
||||
|
||||
## How established is Jazz?
|
||||
|
||||
Jazz is backed by fantastic angel and institutional investors with experience and know-how in devtools and has been in development since 2020.
|
||||
|
||||
## Will Jazz be around long-term?
|
||||
|
||||
We're committed to Jazz being around for a long time! We understand that when you choose Jazz for your projects, you're investing time and making a significant architectural choice, and we take that responsibility seriously.
|
||||
That's why we've designed Jazz with longevity in mind from the start:
|
||||
|
||||
- The open source nature of our sync server means you'll always be able to run your own infrastructure
|
||||
- Your data remains accessible even if our cloud services change
|
||||
- We're designing the protocol as an open specification
|
||||
|
||||
This approach creates a foundation that can continue regardless of any single company's involvement. The local-first architecture means your apps will always work, even offline, and your data remains yours.
|
||||
|
||||
@@ -133,6 +133,36 @@ teamGroup.extend(companyGroup);
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
## Revoking a group extension
|
||||
|
||||
You can revoke a group extension by using the `revokeExtend` method:
|
||||
|
||||
<CodeGroup>
|
||||
```typescript
|
||||
const parentGroup = Group.create();
|
||||
const childGroup = Group.create();
|
||||
|
||||
childGroup.extend(parentGroup);
|
||||
|
||||
// Revoke the extension
|
||||
await childGroup.revokeExtend(parentGroup);
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
## Getting all parent groups
|
||||
|
||||
You can get all the parent groups of a group by calling the `getParentGroups` method:
|
||||
|
||||
<CodeGroup>
|
||||
```typescript
|
||||
const childGroup = Group.create();
|
||||
const parentGroup = Group.create();
|
||||
childGroup.extend(parentGroup);
|
||||
|
||||
console.log(childGroup.getParentGroups()); // [parentGroup]
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
## Example: Team Hierarchy
|
||||
|
||||
Here's a practical example of using group inheritance for team permissions:
|
||||
|
||||
@@ -9,8 +9,6 @@ Every CoValue has an owner, which can be a `Group` or an `Account`.
|
||||
You can use a `Group` to grant access to a CoValue to multiple users. These users can
|
||||
have different roles, such as "writer", "reader" or "admin".
|
||||
|
||||
...more docs coming soon
|
||||
|
||||
## Creating a Group
|
||||
|
||||
Here's how you can create a `Group`.
|
||||
@@ -19,7 +17,7 @@ Here's how you can create a `Group`.
|
||||
```tsx
|
||||
import { Group } from "jazz-tools";
|
||||
|
||||
const group = Group.create({ owner: me });
|
||||
const group = Group.create();
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
@@ -53,7 +51,6 @@ const bob = await Account.load(bobsID as ID<Account>, []);
|
||||
group.addMember(bob, "writer");
|
||||
```
|
||||
</CodeGroup>
|
||||
...more docs coming soon
|
||||
|
||||
## Getting the Group of an existing CoValue
|
||||
|
||||
@@ -77,7 +74,47 @@ import { Group } from "jazz-tools";
|
||||
|
||||
const group = existingCoValue._owner.castAs(Group);
|
||||
group.addMember(bob, "writer");
|
||||
group.myRole();
|
||||
|
||||
const role = group.getRoleOf(bob);
|
||||
```
|
||||
</CodeGroup>
|
||||
...more docs coming soon
|
||||
|
||||
## Checking the permissions
|
||||
|
||||
You can check the permissions of an account on a CoValue by using the `canRead`, `canWrite` and `canAdmin` methods.
|
||||
|
||||
<CodeGroup>
|
||||
```tsx
|
||||
const value = await MyCoMap.load(valueID, {});
|
||||
const me = Account.getMe();
|
||||
|
||||
if (me.canAdmin(value)) {
|
||||
console.log("I can share value with others");
|
||||
} else if (me.canWrite(value)) {
|
||||
console.log("I can edit value");
|
||||
} else if (me.canRead(value)) {
|
||||
console.log("I can view value");
|
||||
} else {
|
||||
console.log("I cannot access value");
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
To check the permissions of another account, you need to load it first:
|
||||
|
||||
<CodeGroup>
|
||||
```tsx
|
||||
const value = await MyCoMap.load(valueID, {});
|
||||
const bob = await Account.load(accountID, []);
|
||||
|
||||
if (bob.canAdmin(value)) {
|
||||
console.log("Bob can share value with others");
|
||||
} else if (bob.canWrite(value)) {
|
||||
console.log("Bob can edit value");
|
||||
} else if (bob.canRead(value)) {
|
||||
console.log("Bob can view value");
|
||||
} else {
|
||||
console.log("Bob cannot access value");
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
@@ -749,6 +749,8 @@ import { createInviteLink } from "jazz-react";
|
||||
export function ProjectComponent({ projectID }: { projectID: ID<Project> }) {// old
|
||||
const project = useCoState(Project, projectID, { issues: [{}] }); // old
|
||||
|
||||
const { me } = useAccount();
|
||||
|
||||
const invite = (role: "reader" | "writer") => {
|
||||
const link = createInviteLink(project, role, { valueHint: "project" });
|
||||
navigator.clipboard.writeText(link);
|
||||
@@ -766,7 +768,7 @@ export function ProjectComponent({ projectID }: { projectID: ID<Project> }) {//
|
||||
return project ? (// old
|
||||
<div>// old
|
||||
<h1>{project.name}</h1>// old
|
||||
{project._owner?.myRole() === "admin" && (
|
||||
{me.canAdmin(project) && (
|
||||
<>
|
||||
<button onClick={() => invite("reader")}>Invite Guest</button>
|
||||
<button onClick={() => invite("writer")}>Invite Member</button>
|
||||
|
||||
@@ -146,8 +146,9 @@ Jazz waits for the migration to finish before passing the account to your app's
|
||||
```ts
|
||||
export class MyAppAccount extends Account {
|
||||
root = co.ref(MyAppRoot);
|
||||
profile = co.ref(MyAppProfile);
|
||||
|
||||
async migrate() {
|
||||
async migrate(this: MyAppAccount, creationProps?: { name: string }) {
|
||||
// we specifically need to check for undefined,
|
||||
// because the root might simply be not loaded (`null`) yet
|
||||
if (this.root === undefined) {
|
||||
@@ -159,6 +160,17 @@ export class MyAppAccount extends Account {
|
||||
myContacts: ListOfAccounts.create([], Group.create())
|
||||
});
|
||||
}
|
||||
|
||||
if (this.profile === undefined) {
|
||||
const profileGroup = Group.create();
|
||||
// Unlike the root, we want the profile to be publicly readable.
|
||||
profileGroup.addMember("everyone", "reader");
|
||||
|
||||
this.profile = MyAppProfile.create({
|
||||
name: creationProps?.name,
|
||||
bookmarks: ListOfBookmarks.create([], profileGroup),
|
||||
}, profileGroup);
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -179,7 +191,7 @@ Now let's say we want to add a `myBookmarks` field to the `root` schema:
|
||||
export class MyAppAccount extends Account {
|
||||
root = co.ref(MyAppRoot);// old
|
||||
|
||||
async migrate() { // old
|
||||
async migrate(this: MyAppAccount) {
|
||||
if (this.root === undefined) { // old
|
||||
this.root = MyAppRoot.create({ // old
|
||||
myChats: ListOfChats.create([], Group.create()), // old
|
||||
@@ -188,12 +200,10 @@ export class MyAppAccount extends Account {
|
||||
} // old
|
||||
|
||||
// We need to load the root field to check for the myContacts field
|
||||
const result = await this.ensureLoaded({
|
||||
const { root } = await this.ensureLoaded({
|
||||
root: {},
|
||||
});
|
||||
|
||||
const { root } = result;
|
||||
|
||||
// we specifically need to check for undefined,
|
||||
// because myBookmarks might simply be not loaded (`null`) yet
|
||||
if (root.myBookmarks === undefined) {
|
||||
|
||||
@@ -0,0 +1,247 @@
|
||||
import { ContentByFramework, CodeGroup } from '@/components/forMdx'
|
||||
import { Alert } from "gcmp-design-system/src/app/components/atoms/Alert";
|
||||
|
||||
export const metadata = { title: "Upgrade to Jazz 0.11.0" };
|
||||
|
||||
# Jazz 0.11.0 is out!
|
||||
|
||||
Jazz 0.11.0 brings several improvements to member handling, roles, and permissions management. This guide will help you upgrade your application to the latest version.
|
||||
|
||||
## What's new?
|
||||
Here is what's changed in this release:
|
||||
- [New permissions check APIs](#new-permissions-check-apis): New methods like `canRead`, `canWrite`, `canAdmin`, and `getRoleOf` to simplify permission checks.
|
||||
- [Group.revokeExtend](#grouprevokeextend): New method to revoke group extension permissions.
|
||||
- [Group.getParentGroups](#accountgetparentgroups): New method to get all the parent groups of an account.
|
||||
- [Account Profile & Migrations](#account-profile--migrations): Fixed issues with custom account profile migrations for a more consistent experience
|
||||
- [Dropped support for Accounts owning Profiles](#dropped-support-for-accounts-owning-profiles): Profiles can now only be owned by Groups.
|
||||
- [Group.members now includes inherited members](#member-inheritance-changes): Updated behavior for the `members` getter method to include inherited members and have a more intuitive type definition.
|
||||
|
||||
## New Features
|
||||
|
||||
### New permissions check APIs
|
||||
|
||||
New methods have been added to both `Account` and `Group` classes to improve permission handling:
|
||||
|
||||
#### Permission checks
|
||||
|
||||
The new `canRead`, `canWrite` and `canAdmin` methods on `Account` allow you to easily check if the account has specific permissions on a CoValue:
|
||||
|
||||
<CodeGroup>
|
||||
{/* prettier-ignore */}
|
||||
```typescript
|
||||
const me = Account.getMe();
|
||||
|
||||
if (me.canAdmin(value)) {
|
||||
console.log("I can share value with others");
|
||||
} else if (me.canWrite(value)) {
|
||||
console.log("I can edit value");
|
||||
} else if (me.canRead(value)) {
|
||||
console.log("I can view value");
|
||||
} else {
|
||||
console.log("I cannot access value");
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
#### Getting the role of an account
|
||||
|
||||
The `getRoleOf` method has been added to query the role of specific entities:
|
||||
|
||||
<CodeGroup>
|
||||
```typescript
|
||||
const group = Group.create();
|
||||
group.getRoleOf(me); // admin
|
||||
group.getRoleOf(Eve); // undefined
|
||||
|
||||
group.addMember(Eve, "writer");
|
||||
group.getRoleOf(Eve); // writer
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
#### Group.revokeExtend
|
||||
|
||||
We added a new method to revoke the extend of a Group:
|
||||
<CodeGroup>
|
||||
```typescript
|
||||
function addTrackToPlaylist(playlist: Playlist, track: MusicTrack) {
|
||||
const trackGroup = track._owner.castAs(Group);
|
||||
trackGroup.extend(playlist._owner, "reader"); // Grant read access to the track to the playlist accounts
|
||||
|
||||
playlist.tracks.push(track);
|
||||
}
|
||||
|
||||
function removeTrackFromPlaylist(playlist: Playlist, track: MusicTrack) {
|
||||
const trackGroup = track._owner.castAs(Group);
|
||||
trackGroup.revokeExtend(playlist._owner); // Revoke access to the track to the playlist accounts
|
||||
|
||||
const index = playlist.tracks.findIndex(t => t.id === track.id);
|
||||
if (index !== -1) {
|
||||
playlist.tracks.splice(index, 1);
|
||||
}
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
### Group.getParentGroups
|
||||
|
||||
The `getParentGroups` method has been added to `Group` to get all the parent groups of a group.
|
||||
|
||||
<CodeGroup>
|
||||
```ts
|
||||
const childGroup = Group.create();
|
||||
const parentGroup = Group.create();
|
||||
childGroup.extend(parentGroup);
|
||||
|
||||
console.log(childGroup.getParentGroups()); // [parentGroup]
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
## Breaking Changes
|
||||
|
||||
### Account Profile & Migrations
|
||||
|
||||
The previous way of making the `Profile` migration work was to assume that the profile was always already there:
|
||||
|
||||
<CodeGroup>
|
||||
```ts
|
||||
export class MyAppAccount extends Account {
|
||||
profile = co.ref(MyAppProfile);
|
||||
|
||||
async migrate(this: MyAppAccount, creationProps: { name: string, lastName: string }) {
|
||||
if (creationProps) {
|
||||
const { profile } = await this.ensureLoaded({ profile: {} });
|
||||
|
||||
profile.name = creationProps.name;
|
||||
profile.bookmarks = ListOfBookmarks.create([], profileGroup);
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
This was kind-of tricky to picture, and having different migration strategies for different CoValues was confusing.
|
||||
|
||||
We changed the logic so the default profile is created only if you didn't provide one in your migration.
|
||||
|
||||
This way you can use the same pattern for both `root` and `profile` migrations:
|
||||
<CodeGroup>
|
||||
```ts
|
||||
export class MyAppAccount extends Account {
|
||||
profile = co.ref(MyAppProfile);
|
||||
|
||||
async migrate(this: MyAppAccount, creationProps?: { name: string }) {
|
||||
if (this.profile === undefined) {
|
||||
const profileGroup = Group.create();
|
||||
profileGroup.addMember("everyone", "reader");
|
||||
|
||||
this.profile = MyAppProfile.create({
|
||||
name: creationProps?.name,
|
||||
bookmarks: ListOfBookmarks.create([], profileGroup),
|
||||
}, profileGroup);
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
<Alert variant="warning" title="Warning" className="mt-4">
|
||||
If you provide a custom `Profile` in your `Account` schema and migration for a Worker account,
|
||||
make sure to also add `everyone` as member with `reader` role to the owning group.
|
||||
Failing to do so will prevent any account from sending messages to the Worker's Inbox.
|
||||
</Alert>
|
||||
|
||||
### Dropped support for Accounts owning Profiles
|
||||
Starting from `0.11.0` `Profile`s can only be owned by `Group`s.
|
||||
|
||||
<Alert variant="info" title="Note" className="mt-4">
|
||||
Existing profiles owned by `Account`s will still work, but you will get incorrect types when accessing a `Profile`'s `_owner`.
|
||||
</Alert>
|
||||
|
||||
### Member Inheritance Changes
|
||||
|
||||
The behavior of groups' `members` getter method has been updated to return both direct members and inherited ones from ancestor groups.
|
||||
This might affect your application if you were relying on only direct members being returned.
|
||||
|
||||
<CodeGroup>
|
||||
```ts
|
||||
/**
|
||||
* The following pseudocode only illustrates the inheritance logic,
|
||||
* the actual implementation is different.
|
||||
*/
|
||||
|
||||
const parentGroup = Group.create();
|
||||
parentGroup.addMember(John, "admin");
|
||||
|
||||
const childGroup = Group.create();
|
||||
childGroup.addMember(Eve, "admin");
|
||||
|
||||
childGroup.extend(parentGroup);
|
||||
|
||||
console.log(childGroup.members);
|
||||
// Before 0.11.0
|
||||
// [Eve]
|
||||
|
||||
// After 0.11.0
|
||||
// [Eve, John]
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
Additionally:
|
||||
- now `Group.members` doesn't include the `everyone` member anymore
|
||||
- the account type in `Group.members` is now the globally registered Account schema and we have removed the `co.members` way to define an AccountSchema for members
|
||||
|
||||
If you need to explicitly check if "everyone" is a member of a group, you can use the `getRoleOf` method instead:
|
||||
<CodeGroup>
|
||||
```ts
|
||||
if (group.getRoleOf("everyone")) {
|
||||
console.log("Everyone has access to the group");
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
#### Migration Steps
|
||||
|
||||
1. Review your member querying logic to account for inherited members.
|
||||
2. Update your permission checking code to utilize the new [`hasPermissions` and `getRoleOf`](#enhanced-permission-management) methods.
|
||||
3. Consider implementing `"everyone"` role checks where appropriate.
|
||||
|
||||
### Removed auto-update of `profile.name` in `usePasskeyAuth`
|
||||
|
||||
The `usePasskeyAuth` hook now doesn't update the `profile.name` if the provided username is empty.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
> I'm getting the following error: `Error: Profile must be owned by a Group`
|
||||
|
||||
If you previously forced a migration of your `Account` schema to include a custom `Profile`,
|
||||
and assigned its ownership to an `Account`, you need to recreate your profile code and assign it to a `Group` instead.
|
||||
|
||||
<CodeGroup>
|
||||
```ts
|
||||
export class MyAppAccount extends Account {
|
||||
profile = co.ref(MyAppProfile);
|
||||
|
||||
override async migrate() {
|
||||
// ...
|
||||
|
||||
const me = await this.ensureLoaded({
|
||||
profile: {},
|
||||
});
|
||||
|
||||
if ((me.profile._owner as Group | Account)._type === "Account") {
|
||||
const profileGroup = Group.create();
|
||||
profileGroup.addMember("everyone", "reader");
|
||||
|
||||
// recreate your profile here...
|
||||
me.profile = Profile.create(
|
||||
{
|
||||
name: me.profile.name,
|
||||
},
|
||||
profileGroup,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
@@ -13,6 +13,10 @@ export function JazzFooter() {
|
||||
{
|
||||
title: "About",
|
||||
links: [
|
||||
{
|
||||
href: "/status",
|
||||
label: "Status",
|
||||
},
|
||||
{
|
||||
href: "https://garden.co/team",
|
||||
label: "Team",
|
||||
@@ -23,11 +27,6 @@ export function JazzFooter() {
|
||||
label: "Blog",
|
||||
newTab: true,
|
||||
},
|
||||
{
|
||||
href: "https://github.com/garden-co/jazz/releases",
|
||||
label: "Releases",
|
||||
newTab: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
7
homepage/homepage/components/home/CreateJazzApp.mdx
Normal file
7
homepage/homepage/components/home/CreateJazzApp.mdx
Normal file
@@ -0,0 +1,7 @@
|
||||
```sh
|
||||
npx create-jazz-app@latest
|
||||
|
||||
> Framework: react
|
||||
> Auth: passkey
|
||||
> Project name: _
|
||||
```
|
||||
@@ -2,6 +2,9 @@ import { H1 } from "gcmp-design-system/src/app/components/atoms/Headings";
|
||||
import { Icon } from "gcmp-design-system/src/app/components/atoms/Icon";
|
||||
import { Prose } from "gcmp-design-system/src/app/components/molecules/Prose";
|
||||
import Link from "next/link";
|
||||
import { CopyButton } from "gcmp-design-system/src/app/components/molecules/CodeGroup";
|
||||
import CreateJazzApp from "@/components/home/CreateJazzApp.mdx";
|
||||
import { SectionHeader } from "gcmp-design-system/src/app/components/molecules/SectionHeader";
|
||||
|
||||
const features = [
|
||||
{
|
||||
@@ -40,8 +43,8 @@ const features = [
|
||||
|
||||
export function HeroSection() {
|
||||
return (
|
||||
<div className="container grid gap-x-8 gap-y-10 py-12 md:py-16 lg:py-24 lg:gap-0 lg:grid-cols-3">
|
||||
<div className="flex flex-col justify-center gap-4 lg:col-span-3 lg:gap-8">
|
||||
<div className="container grid items-center gap-x-8 gap-y-10 py-12 md:py-16 lg:py-24 lg:gap-x-10 lg:grid-cols-3">
|
||||
<div className="flex flex-col justify-center gap-5 lg:col-span-2 lg:gap-8">
|
||||
<p className="uppercase text-blue tracking-widest text-sm font-medium dark:text-stone-400">
|
||||
Local-first development toolkit
|
||||
</p>
|
||||
@@ -79,6 +82,23 @@ export function HeroSection() {
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="h-full pt-12 group grid md:grid-cols-2 items-center lg:grid-cols-1">
|
||||
<SectionHeader className="md:col-span-2 lg:sr-only" title="Get a Jazz app running in minutes."/>
|
||||
<div className=" overflow-hidden sm:rounded-xl sm:border h-full sm:px-8 sm:pt-6 bg-stone-50 dark:bg-stone-950">
|
||||
<div className="rounded-lg bg-white dark:bg-stone-925 sm:ring-4 ring-stone-400/20 sm:shadow-xl shadow-blue/20 border relative sm:top-2 h-full w-full">
|
||||
<div className="py-4 flex items-center gap-2.5 px-6 border-b">
|
||||
<span className="rounded-full size-3 bg-stone-200 dark:bg-stone-900"/>
|
||||
<span className="rounded-full size-3 bg-stone-200 dark:bg-stone-900"/>
|
||||
<span className="rounded-full size-3 bg-stone-200 dark:bg-stone-900"/>
|
||||
<CopyButton code="npx create-jazz-app@latest" size="md" className="mt-0.5 mr-0.5" />
|
||||
</div>
|
||||
<div className="p-3">
|
||||
<CreateJazzApp/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -38,13 +38,8 @@ export function JazzNav({ sections }: { sections?: NavSection[] }) {
|
||||
newTab: true,
|
||||
},
|
||||
{
|
||||
title: "Releases",
|
||||
href: "https://github.com/garden-co/jazz/releases",
|
||||
newTab: true,
|
||||
},
|
||||
{
|
||||
title: "Status",
|
||||
href: "/status",
|
||||
title: "Status",
|
||||
},
|
||||
]}
|
||||
socials={socials}
|
||||
|
||||
12
homepage/homepage/docs/README.md
Normal file
12
homepage/homepage/docs/README.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Homepage documentation
|
||||
|
||||
This folder contains the documentation for the homepage documentation. Yup.
|
||||
|
||||
## Tone and Voice
|
||||
|
||||
We have a tone and voice document. `./tone-and-voice.md`
|
||||
|
||||
## Writing docs
|
||||
|
||||
We use MDX to write docs. You can find our docs in the `../app/(docs)/docs` folder.
|
||||
|
||||
74
homepage/homepage/docs/tone-and-voice.md
Normal file
74
homepage/homepage/docs/tone-and-voice.md
Normal file
@@ -0,0 +1,74 @@
|
||||
# Jazz Documentation Tone and Voice Guide
|
||||
|
||||
## Core Principles
|
||||
|
||||
Write like you're helping a friend understand a new tool. Be clear, direct, and practical. Assume your reader is smart but busy.
|
||||
|
||||
## Voice
|
||||
|
||||
- **Direct**: Say what you mean simply
|
||||
- **Practical**: Focus on getting things done
|
||||
- **Friendly**: Write like you're talking to a friend
|
||||
- **Knowledgeable**: Show depth through examples, not jargon
|
||||
- **Progressive**: Build concepts step by step
|
||||
|
||||
## Do
|
||||
|
||||
- Start with working examples
|
||||
- Add context naturally as needed
|
||||
- Use active voice
|
||||
- Break complex ideas into smaller chunks
|
||||
- Let code do the heavy lifting
|
||||
- Show common gotchas through examples
|
||||
|
||||
## Don't
|
||||
|
||||
- Explain what's obvious
|
||||
- Use fancy technical terms when simple ones work
|
||||
- Add artificial formality
|
||||
- Repeat yourself
|
||||
- State the obvious
|
||||
- Hide key details in long paragraphs
|
||||
|
||||
## Examples
|
||||
|
||||
---
|
||||
|
||||
Instead of:
|
||||
|
||||
The CoValue instantiation process requires extending the CoMap class and defining appropriate schema fields utilizing the co namespace for type specification.
|
||||
|
||||
Write:
|
||||
|
||||
Create a CoValue by extending CoMap and defining your fields:
|
||||
|
||||
```ts
|
||||
class Agent extends CoMap {
|
||||
name = co.string;
|
||||
status = co.string;
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Instead of:
|
||||
|
||||
It is imperative to ensure proper cleanup of subscriptions to prevent memory leaks and unnecessary network connections in your application.
|
||||
|
||||
Write:
|
||||
|
||||
Remember to clean up subscriptions when you're done:
|
||||
|
||||
```ts
|
||||
const unsubscribe = Company.subscribe(id, me, {...});
|
||||
// Later:
|
||||
unsubscribe();
|
||||
```
|
||||
|
||||
## Code Examples
|
||||
|
||||
- Should be complete and runnable
|
||||
- Start simple, add complexity gradually
|
||||
- Include TypeScript types naturally
|
||||
- Show real-world patterns
|
||||
- Handle errors without being verbose
|
||||
@@ -34,6 +34,7 @@ export const docNavigationItems = [
|
||||
href: "/docs/inspector",
|
||||
done: 100,
|
||||
},
|
||||
{ name: "FAQ", href: "/docs/faq", done: 100 },
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -65,6 +66,12 @@ export const docNavigationItems = [
|
||||
{
|
||||
name: "Upgrade guides",
|
||||
items: [
|
||||
{
|
||||
// upgrade guides
|
||||
name: "0.11.0 - Roles and permissions",
|
||||
href: "/docs/upgrade/0-11-0",
|
||||
done: 100,
|
||||
},
|
||||
{
|
||||
// upgrade guides
|
||||
name: "0.10.0 - New authentication flow",
|
||||
|
||||
@@ -1,5 +1,26 @@
|
||||
# cojson-storage-indexeddb
|
||||
|
||||
## 0.11.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- a4713df: Moving to the d.ts files for the exported type definitions
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [e22de9f]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [0f67e0a]
|
||||
- cojson@0.11.0
|
||||
- cojson-storage@0.11.0
|
||||
|
||||
## 0.10.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [f86e278]
|
||||
- cojson@0.10.15
|
||||
- cojson-storage@0.10.15
|
||||
|
||||
## 0.10.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "cojson-storage-indexeddb",
|
||||
"version": "0.10.8",
|
||||
"version": "0.11.0",
|
||||
"main": "dist/index.js",
|
||||
"type": "module",
|
||||
"types": "src/index.ts",
|
||||
"types": "dist/index.d.ts",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cojson": "workspace:*",
|
||||
@@ -21,8 +21,7 @@
|
||||
"test:watch": "vitest --watch --root ../../ --project cojson-storage-indexeddb",
|
||||
"format-and-lint": "biome check .",
|
||||
"format-and-lint:fix": "biome check . --write",
|
||||
"build": "rm -rf ./dist && tsc --sourceMap --outDir dist",
|
||||
"prepublishOnly": "npm run build"
|
||||
"build": "rm -rf ./dist && tsc --sourceMap --outDir dist"
|
||||
},
|
||||
"gitHead": "33c27053293b4801b968c61d5c4c989f93a67d13"
|
||||
}
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"esModuleInterop": true
|
||||
"esModuleInterop": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true
|
||||
},
|
||||
"include": ["./src/**/*"]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,32 @@
|
||||
# cojson-storage-sqlite
|
||||
|
||||
## 0.11.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 7b00a81: Version bump
|
||||
|
||||
## 0.8.68
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- a4713df: Moving to the d.ts files for the exported type definitions
|
||||
- Updated dependencies [b9d194a]
|
||||
- Updated dependencies [a4713df]
|
||||
- Updated dependencies [e22de9f]
|
||||
- Updated dependencies [34cbdc3]
|
||||
- Updated dependencies [0f67e0a]
|
||||
- cojson@0.11.0
|
||||
- cojson-storage@0.11.0
|
||||
|
||||
## 0.8.67
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [f86e278]
|
||||
- cojson@0.10.15
|
||||
- cojson-storage@0.10.15
|
||||
|
||||
## 0.8.66
|
||||
|
||||
### 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