Compare commits
359 Commits
handler-we
...
cojson@0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88e314d980 | ||
|
|
62e0e5d721 | ||
|
|
aa16ad9c1c | ||
|
|
ada802bff8 | ||
|
|
471b8c6a15 | ||
|
|
7dd080d907 | ||
|
|
69c81a3e90 | ||
|
|
d8ed987461 | ||
|
|
beb45c2656 | ||
|
|
1d71ca1511 | ||
|
|
65941c7f87 | ||
|
|
a37dc1c22f | ||
|
|
774f232390 | ||
|
|
12c19fc940 | ||
|
|
f0ae3ace13 | ||
|
|
cc973137b7 | ||
|
|
7fff0e0b36 | ||
|
|
6909357f64 | ||
|
|
59ff77e0dc | ||
|
|
338f5421f4 | ||
|
|
a7590d14d6 | ||
|
|
e0daca300b | ||
|
|
a5347b613b | ||
|
|
9de58bb098 | ||
|
|
de1be9ac18 | ||
|
|
43df7f2b48 | ||
|
|
5f4f70d06d | ||
|
|
a9aa61c2c0 | ||
|
|
bc0d2fcd23 | ||
|
|
f5675c49a2 | ||
|
|
da13e9cf7c | ||
|
|
ab2546ca71 | ||
|
|
43c36a8c20 | ||
|
|
24ad5f42b5 | ||
|
|
c620d9c87c | ||
|
|
59121a1f52 | ||
|
|
f766de8d9e | ||
|
|
eb8621550a | ||
|
|
5d28413648 | ||
|
|
d0ed7177a3 | ||
|
|
091d753ab4 | ||
|
|
87f917d297 | ||
|
|
88acea362a | ||
|
|
0107f4939d | ||
|
|
f468b89994 | ||
|
|
617ea91a13 | ||
|
|
b0ef1259ae | ||
|
|
a0ba4f235f | ||
|
|
e197900fc5 | ||
|
|
1af6072299 | ||
|
|
510e8874e1 | ||
|
|
ed7ee85304 | ||
|
|
ac726421d2 | ||
|
|
585b22941e | ||
|
|
5d557a830a | ||
|
|
f0188df13b | ||
|
|
4c8ce0a24f | ||
|
|
8645f8ce86 | ||
|
|
d01d467136 | ||
|
|
ad4fcbafa4 | ||
|
|
05c51d5a85 | ||
|
|
ab20a81751 | ||
|
|
adad802ceb | ||
|
|
32b1cc9dab | ||
|
|
5c236e5c3c | ||
|
|
7616d5789b | ||
|
|
631486e235 | ||
|
|
5e0d63a4d6 | ||
|
|
ba988cbb90 | ||
|
|
6f6800bcd8 | ||
|
|
90290902e8 | ||
|
|
d8582fc9ed | ||
|
|
5c76e37f14 | ||
|
|
0117d0c9b9 | ||
|
|
b90c766c05 | ||
|
|
262a36e456 | ||
|
|
cb1df65beb | ||
|
|
ea91e63ff2 | ||
|
|
8eae2eb31e | ||
|
|
c9044f5123 | ||
|
|
24340173fa | ||
|
|
53e88993a0 | ||
|
|
ece168878b | ||
|
|
cad84db52b | ||
|
|
342a385111 | ||
|
|
f87ba7d927 | ||
|
|
7c7f55b85c | ||
|
|
0e5b9f5292 | ||
|
|
2f5af3dece | ||
|
|
2c35e2ba85 | ||
|
|
0a4f79d5a4 | ||
|
|
43cb7abba7 | ||
|
|
25f76f6b02 | ||
|
|
6a56561c98 | ||
|
|
2ac31e7c51 | ||
|
|
1bbefab5a9 | ||
|
|
1143b32cf3 | ||
|
|
51ada27810 | ||
|
|
954ecb3984 | ||
|
|
05089270d9 | ||
|
|
fecc81111a | ||
|
|
4d3e7dbcd5 | ||
|
|
ee65f18fd9 | ||
|
|
bcbc4636ed | ||
|
|
8c323c4513 | ||
|
|
4103ea0c88 | ||
|
|
58905ae8f4 | ||
|
|
733ebec902 | ||
|
|
10a3834668 | ||
|
|
593c3aeb6e | ||
|
|
a55d71c28d | ||
|
|
c030c7a57e | ||
|
|
e5b4c0448a | ||
|
|
0d516a3c6a | ||
|
|
271ff3eb40 | ||
|
|
dcc836ff98 | ||
|
|
65f630fb44 | ||
|
|
b68f85542b | ||
|
|
f122a9f938 | ||
|
|
22da4ea136 | ||
|
|
80e86c92b2 | ||
|
|
e15d994df6 | ||
|
|
48ac92bc67 | ||
|
|
226b1171e6 | ||
|
|
29228e21fe | ||
|
|
302a1e6660 | ||
|
|
d3603625fd | ||
|
|
fa94d8c171 | ||
|
|
aeb094baa1 | ||
|
|
18f3497397 | ||
|
|
8be7158d1f | ||
|
|
cae3a9ee32 | ||
|
|
6260045140 | ||
|
|
466d79d9a6 | ||
|
|
67776c77a0 | ||
|
|
e6868d3030 | ||
|
|
c8ae3a36ca | ||
|
|
bf9c158455 | ||
|
|
1301112a6b | ||
|
|
c447f08029 | ||
|
|
5a63cbae9b | ||
|
|
7d06f1dbf4 | ||
|
|
e48a3e4c27 | ||
|
|
a326ed971c | ||
|
|
b5f1bb35d1 | ||
|
|
b4ed7b0587 | ||
|
|
652ff8f53c | ||
|
|
f519cd7356 | ||
|
|
20babc2e41 | ||
|
|
6fc8efc1b5 | ||
|
|
e30bd2f489 | ||
|
|
0b9cc2e0aa | ||
|
|
610543c5b8 | ||
|
|
53dbfee385 | ||
|
|
9c577b98cd | ||
|
|
6139803679 | ||
|
|
b2c03ca8c4 | ||
|
|
3feb3e82ff | ||
|
|
95e9bdb624 | ||
|
|
68127a95d0 | ||
|
|
690e65ac06 | ||
|
|
6f007a9470 | ||
|
|
23c588c717 | ||
|
|
494d902e79 | ||
|
|
eebee4db6a | ||
|
|
44f38f3438 | ||
|
|
bb2052e1f2 | ||
|
|
40af02acb3 | ||
|
|
950db502c2 | ||
|
|
3bdb753b78 | ||
|
|
33293f3b64 | ||
|
|
d5d448670d | ||
|
|
e3c3913c74 | ||
|
|
2ee2fcaa27 | ||
|
|
edc77c4bd5 | ||
|
|
0ce25f143b | ||
|
|
e35018a5fa | ||
|
|
0d05c927f1 | ||
|
|
4ef43e3477 | ||
|
|
d7ce078f17 | ||
|
|
95349d59f8 | ||
|
|
bb13b6e41d | ||
|
|
3c2da2f0db | ||
|
|
7bac26cf7f | ||
|
|
d3d9200acf | ||
|
|
60558ee664 | ||
|
|
6354135af4 | ||
|
|
69a0befb7b | ||
|
|
c48aa7358a | ||
|
|
01517d1463 | ||
|
|
cdd7e6454f | ||
|
|
2e030ea942 | ||
|
|
5207c00582 | ||
|
|
22fa01b9c5 | ||
|
|
f5a1e42dd6 | ||
|
|
58fe07351e | ||
|
|
25e79fd001 | ||
|
|
53868a4d50 | ||
|
|
21f6f4d933 | ||
|
|
21f691b6da | ||
|
|
45c46ff14a | ||
|
|
6dad0878da | ||
|
|
3b6552d728 | ||
|
|
e83ce5d6c8 | ||
|
|
b6c672a1ad | ||
|
|
e2cfa60caa | ||
|
|
fa8f4e03d2 | ||
|
|
ac3d9fa2c3 | ||
|
|
ff325ebf2a | ||
|
|
71825cb90a | ||
|
|
d1281e560a | ||
|
|
a1dc7f38ed | ||
|
|
581118b918 | ||
|
|
ab378b3d16 | ||
|
|
dd034643da | ||
|
|
bc2e531c05 | ||
|
|
334f6cf2d8 | ||
|
|
31296a6ce2 | ||
|
|
6fc8ae8293 | ||
|
|
a1d6e7147b | ||
|
|
0d111b15f8 | ||
|
|
95b9c4825f | ||
|
|
65e26d9ba4 | ||
|
|
cabce37133 | ||
|
|
20c4484066 | ||
|
|
17dc5fc37f | ||
|
|
05d907b675 | ||
|
|
62cb650356 | ||
|
|
9f833b3931 | ||
|
|
f0d123979c | ||
|
|
90078a4bce | ||
|
|
2d3aa76bf0 | ||
|
|
86bd86b966 | ||
|
|
bebd0ede64 | ||
|
|
14bdd496f7 | ||
|
|
91fcb3f6b6 | ||
|
|
ff94cadd7b | ||
|
|
60fe8f9106 | ||
|
|
5158581b0c | ||
|
|
ee511b4934 | ||
|
|
bc13653236 | ||
|
|
fe28e254a3 | ||
|
|
82179812de | ||
|
|
d42c2aa014 | ||
|
|
ff92316488 | ||
|
|
00f1072f5a | ||
|
|
c2d56b5eb8 | ||
|
|
0d9eacc1ec | ||
|
|
75491e65c0 | ||
|
|
a93df6fcb2 | ||
|
|
b5962b4f81 | ||
|
|
b5be0273a6 | ||
|
|
62a1aec555 | ||
|
|
5053a6fc80 | ||
|
|
f038c2d378 | ||
|
|
febafecfdd | ||
|
|
394feb715d | ||
|
|
76c125e628 | ||
|
|
10ac9d8659 | ||
|
|
9a6d950727 | ||
|
|
326d3b90c2 | ||
|
|
499f39340b | ||
|
|
54eba823ad | ||
|
|
61e787ec89 | ||
|
|
95d42b1340 | ||
|
|
bf9840ea46 | ||
|
|
74dbbaf4d4 | ||
|
|
c2ae5b6206 | ||
|
|
25de660d27 | ||
|
|
de90f45f41 | ||
|
|
dda79df1c3 | ||
|
|
26ea68999b | ||
|
|
4cfb4af1da | ||
|
|
11eaa99af7 | ||
|
|
93231c27f4 | ||
|
|
e7b9c90eef | ||
|
|
70c9a5db88 | ||
|
|
2e6c2498b5 | ||
|
|
e7fd617ca9 | ||
|
|
bd5b03b18d | ||
|
|
3a7ab9b3a1 | ||
|
|
0cf789622c | ||
|
|
d63f5eec5e | ||
|
|
42bd8b76a1 | ||
|
|
73742656ae | ||
|
|
f71f26d1dc | ||
|
|
95822300d7 | ||
|
|
679fe040cf | ||
|
|
c8ad016d9c | ||
|
|
498954fd09 | ||
|
|
198f6d3627 | ||
|
|
f701f2a4f4 | ||
|
|
94131ba6d6 | ||
|
|
c0e892313f | ||
|
|
b426342c02 | ||
|
|
2d639667a3 | ||
|
|
03df4fee8e | ||
|
|
c658ed3404 | ||
|
|
99e58e60dc | ||
|
|
a9ad0284e9 | ||
|
|
6e2d791c4b | ||
|
|
f9be857bbb | ||
|
|
1288ac140e | ||
|
|
7f07f7e049 | ||
|
|
b22589bbad | ||
|
|
be144adeee | ||
|
|
513619b04e | ||
|
|
81f6a75aac | ||
|
|
913d03de75 | ||
|
|
2d0172d839 | ||
|
|
27d46641e3 | ||
|
|
1014816d79 | ||
|
|
441194acb7 | ||
|
|
c9bea7200f | ||
|
|
9eaa88bd83 | ||
|
|
6ada48d57a | ||
|
|
8fa978df21 | ||
|
|
df7356fd24 | ||
|
|
153fa4ce44 | ||
|
|
6105bd2c88 | ||
|
|
c06d63eec1 | ||
|
|
4ee7359370 | ||
|
|
7b5c47b377 | ||
|
|
7ad57e88f3 | ||
|
|
c181e55557 | ||
|
|
7e0cd721e6 | ||
|
|
59ddff40ab | ||
|
|
cb75cc62b2 | ||
|
|
b141f6a62f | ||
|
|
4a251a528c | ||
|
|
f8b6119996 | ||
|
|
a7c90f749e | ||
|
|
3a6e34589f | ||
|
|
a1d512d9d7 | ||
|
|
51bf6b7fdc | ||
|
|
b5826fc0a5 | ||
|
|
becdd2f451 | ||
|
|
3b20bf354f | ||
|
|
fff7fe934b | ||
|
|
4c8d128eee | ||
|
|
df106ca680 | ||
|
|
c58f93b597 | ||
|
|
3f2a0ead1b | ||
|
|
c9e6d2998e | ||
|
|
40634c6ec1 | ||
|
|
8bc758ce95 | ||
|
|
73079ca1b7 | ||
|
|
c36f19a97f | ||
|
|
109338923a | ||
|
|
f4c2501b06 | ||
|
|
9161229474 | ||
|
|
265f2f40bf | ||
|
|
d2935ac2ae | ||
|
|
aaf00b8a20 | ||
|
|
f9c6a49d2a | ||
|
|
2f54a48a3d | ||
|
|
be4dd0a787 | ||
|
|
f3f072e7cf | ||
|
|
a6270bf552 |
@@ -11,7 +11,7 @@
|
||||
"cojson-storage-sqlite",
|
||||
"cojson-transport-ws",
|
||||
"jazz-browser",
|
||||
"jazz-browser-auth-clerk",
|
||||
"jazz-auth-clerk",
|
||||
"jazz-browser-media-images",
|
||||
"jazz-nodejs",
|
||||
"jazz-react",
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"cojson-transport-ws": patch
|
||||
---
|
||||
|
||||
Handle websocket errors and add an onSuccess callback
|
||||
39
.github/actions/android-emulator/action.yml
vendored
Normal file
39
.github/actions/android-emulator/action.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
name: Setup Android Emulator
|
||||
|
||||
inputs:
|
||||
api-level:
|
||||
description: 'API level to use for the emulator'
|
||||
required: true
|
||||
default: '29'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Enable KVM
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger --name-match=kvm
|
||||
|
||||
- name: Gradle cache
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
- name: AVD cache
|
||||
uses: useblacksmith/cache@v5
|
||||
id: avd-cache
|
||||
with:
|
||||
path: |
|
||||
~/.android/avd/*
|
||||
~/.android/adb*
|
||||
key: avd-${{ inputs.api-level }}
|
||||
|
||||
- name: Create AVD and Generate Snapshot for Caching
|
||||
if: steps.avd-cache.outputs.cache-hit != 'true'
|
||||
uses: reactivecircus/android-emulator-runner@v2
|
||||
with:
|
||||
api-level: ${{ inputs.api-level }}
|
||||
force-avd-creation: false
|
||||
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -no-metrics
|
||||
disable-animations: false
|
||||
script: echo "Generated AVD snapshot for caching."
|
||||
36
.github/actions/source-code/action.yml
vendored
Normal file
36
.github/actions/source-code/action.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Get and Build Source Code
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Enable latestcorepack
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Before: corepack version => $(corepack --version || echo 'not installed')"
|
||||
npm install -g corepack@latest
|
||||
echo "After : corepack version => $(corepack --version)"
|
||||
corepack enable
|
||||
pnpm --version
|
||||
|
||||
- name: Install Node.js
|
||||
uses: useblacksmith/setup-node@v5
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
|
||||
- uses: useblacksmith/cache@v5
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: pnpm install --frozen-lockfile
|
||||
34
.github/workflows/build-examples.yaml
vendored
34
.github/workflows/build-examples.yaml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build-examples:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2204
|
||||
strategy:
|
||||
matrix:
|
||||
example: [
|
||||
@@ -19,40 +19,16 @@ jobs:
|
||||
"pets",
|
||||
"reactions",
|
||||
"todo",
|
||||
"onboarding",
|
||||
]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Enable corepack
|
||||
run: corepack enable
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Setup Source Code
|
||||
uses: ./.github/actions/source-code/
|
||||
|
||||
- name: Pnpm Build
|
||||
run: |
|
||||
|
||||
52
.github/workflows/build-starters.yaml
vendored
52
.github/workflows/build-starters.yaml
vendored
@@ -2,51 +2,25 @@ name: Build Starters
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: ["main"]
|
||||
|
||||
jobs:
|
||||
build-starters:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2204
|
||||
strategy:
|
||||
matrix:
|
||||
starter: [
|
||||
"react-demo-auth-tailwind",
|
||||
]
|
||||
starter: ["react-passkey-auth"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Enable corepack
|
||||
run: corepack enable
|
||||
- name: Setup Source Code
|
||||
uses: ./.github/actions/source-code/
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
|
||||
- name: Pnpm Build
|
||||
run: |
|
||||
pnpm install
|
||||
pnpm turbo build;
|
||||
working-directory: ./starters/${{ matrix.starter }}
|
||||
- name: Pnpm Build
|
||||
run: |
|
||||
pnpm install
|
||||
pnpm turbo build;
|
||||
working-directory: ./starters/${{ matrix.starter }}
|
||||
|
||||
2
.github/workflows/code-quality.yml
vendored
2
.github/workflows/code-quality.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
|
||||
jobs:
|
||||
quality:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2204
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
85
.github/workflows/e2e-rn-test.yml
vendored
Normal file
85
.github/workflows/e2e-rn-test.yml
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
name: End-to-End Tests for React Native
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
paths:
|
||||
- ".github/actions/android-emulator/**"
|
||||
- ".github/actions/source-code/**"
|
||||
- ".github/workflows/e2e-rn-test.yml"
|
||||
- "examples/chat-rn/**"
|
||||
- "examples/chat-rn-clerk/**"
|
||||
- "packages/**"
|
||||
|
||||
jobs:
|
||||
e2e-tests:
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2204
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Source Code
|
||||
uses: ./.github/actions/source-code/
|
||||
|
||||
- name: Create Output Directory
|
||||
run: |
|
||||
mkdir -p ~/output
|
||||
|
||||
- name: Setup JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: corretto
|
||||
java-version: 22
|
||||
cache: gradle
|
||||
|
||||
- name: Pnpm Build
|
||||
run: pnpm turbo build --filter="./packages/*"
|
||||
|
||||
- name: chat-rn App Pre Build
|
||||
working-directory: ./examples/chat-rn
|
||||
run: |
|
||||
pnpm build
|
||||
pnpm expo prebuild --clean
|
||||
|
||||
- name: Install Maestro
|
||||
run: |
|
||||
curl -fsSL "https://get.maestro.mobile.dev" | bash
|
||||
|
||||
- name: Setup Android Emulator
|
||||
id: android-emulator
|
||||
uses: ./.github/actions/android-emulator/
|
||||
with:
|
||||
api-level: 29
|
||||
|
||||
- name: Test App
|
||||
uses: reactivecircus/android-emulator-runner@v2
|
||||
id: e2e_test
|
||||
continue-on-error: true
|
||||
with:
|
||||
api-level: 29
|
||||
force-avd-creation: false
|
||||
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -no-metrics
|
||||
disable-animations: true
|
||||
working-directory: ./examples/chat-rn/
|
||||
script: ./test/e2e/run.sh
|
||||
|
||||
- name: Copy Maestro Output
|
||||
if: steps.e2e_test.outcome != 'success'
|
||||
run: |
|
||||
cp -r ~/.maestro/tests/* ~/output
|
||||
|
||||
- name: Upload Output Files
|
||||
if: steps.e2e_test.outcome != 'success'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: e2e-test-output
|
||||
path: ~/output/*
|
||||
retention-days: 5
|
||||
|
||||
- name: Exit with Test Result
|
||||
if: always()
|
||||
run: |
|
||||
if [ "${{ steps.e2e_test.outcome }}" != "success" ]; then
|
||||
exit 1
|
||||
fi
|
||||
31
.github/workflows/jazz-run.yml
vendored
31
.github/workflows/jazz-run.yml
vendored
@@ -8,38 +8,16 @@ on:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2204
|
||||
timeout-minutes: 5
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Enable corepack
|
||||
run: corepack enable
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Setup Source Code
|
||||
uses: ./.github/actions/source-code/
|
||||
|
||||
- name: Build jazz-run
|
||||
run: pnpm exec turbo build && chmod +x dist/index.js;
|
||||
@@ -48,4 +26,3 @@ jobs:
|
||||
- name: Run create account
|
||||
run: ./dist/index.js account create --name "Jazz Run CI test"
|
||||
working-directory: ./packages/jazz-run
|
||||
|
||||
32
.github/workflows/playwright.yml
vendored
32
.github/workflows/playwright.yml
vendored
@@ -9,41 +9,19 @@ on:
|
||||
jobs:
|
||||
test:
|
||||
timeout-minutes: 60
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2204
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
project: ["tests/e2e", "examples/chat", "examples/file-share-svelte", "examples/form", "examples/music-player", "examples/pets", "examples/onboarding", "starters/react-demo-auth-tailwind"]
|
||||
project: ["tests/e2e", "examples/chat", "examples/file-share-svelte", "examples/form", "examples/music-player", "examples/pets", "starters/react-passkey-auth"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Enable corepack
|
||||
run: corepack enable
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Setup Source Code
|
||||
uses: ./.github/actions/source-code/
|
||||
|
||||
- name: Pnpm Build
|
||||
run: pnpm turbo build
|
||||
|
||||
102
.github/workflows/pre-release.yml
vendored
Normal file
102
.github/workflows/pre-release.yml
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
name: Pre-Publish tagged Pull Requests
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
pre-release:
|
||||
if: contains(github.event.pull_request.labels.*.name, 'pre-release')
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Source Code
|
||||
uses: ./.github/actions/source-code/
|
||||
|
||||
- name: Pnpm Build
|
||||
run: pnpm turbo build --filter="./packages/*"
|
||||
|
||||
- name: Pre publish
|
||||
run: pnpm exec pkg-pr-new publish --json output.json --comment=off "./packages/*"
|
||||
|
||||
- name: Post or update comment
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
const output = JSON.parse(fs.readFileSync('output.json', 'utf8'));
|
||||
|
||||
const packages = output.packages
|
||||
.map((p) => `- ${p.name}: ${p.url}`)
|
||||
.join('\n');
|
||||
|
||||
const sha =
|
||||
context.event_name === 'pull_request'
|
||||
? context.payload.pull_request.head.sha
|
||||
: context.payload.after;
|
||||
|
||||
const resolutions = Object.fromEntries(
|
||||
output.packages.map((p) => [p.name, p.url])
|
||||
);
|
||||
|
||||
const commitUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/commit/${sha}`;
|
||||
|
||||
const body = `## Jazz pre-release
|
||||
|
||||
### Packages:
|
||||
|
||||
\`\`\`json
|
||||
${JSON.stringify(resolutions, null, 4)}
|
||||
\`\`\`
|
||||
|
||||
[View Commit](${commitUrl})`;
|
||||
|
||||
async function logPublishInfo() {
|
||||
console.log('\n' + '='.repeat(50));
|
||||
console.log('Publish Information');
|
||||
console.log('='.repeat(50));
|
||||
console.log('\nPublished Packages:');
|
||||
console.log(output.packages);
|
||||
console.log('\nTemplates:');
|
||||
console.log(templates);
|
||||
console.log(`\nCommit URL: ${commitUrl}`);
|
||||
console.log('\n' + '='.repeat(50));
|
||||
}
|
||||
|
||||
if (context.eventName === 'pull_request') {
|
||||
if (context.issue.number) {
|
||||
await github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: body,
|
||||
});
|
||||
}
|
||||
} else if (context.eventName === 'push') {
|
||||
const pullRequests = await github.rest.pulls.list({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
state: 'open',
|
||||
head: `${context.repo.owner}:${context.ref.replace(
|
||||
'refs/heads/',
|
||||
''
|
||||
)}`,
|
||||
});
|
||||
|
||||
if (pullRequests.data.length > 0) {
|
||||
await github.rest.issues.createComment({
|
||||
issue_number: pullRequests.data[0].number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: body,
|
||||
});
|
||||
} else {
|
||||
console.log(
|
||||
'No open pull request found for this push. Logging publish information to console:'
|
||||
);
|
||||
await logPublishInfo();
|
||||
}
|
||||
}
|
||||
30
.github/workflows/release.yml
vendored
30
.github/workflows/release.yml
vendored
@@ -17,35 +17,13 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}
|
||||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2204
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Enable corepack
|
||||
run: corepack enable
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Setup Source Code
|
||||
uses: ./.github/actions/source-code/
|
||||
|
||||
- name: Create Release Pull Request or Publish to npm
|
||||
id: changesets
|
||||
|
||||
31
.github/workflows/unit-test.yml
vendored
31
.github/workflows/unit-test.yml
vendored
@@ -9,39 +9,20 @@ on:
|
||||
|
||||
jobs:
|
||||
unit-tests:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2204
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Enable corepack
|
||||
run: corepack enable
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/cache@v4
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Setup Source Code
|
||||
uses: ./.github/actions/source-code/
|
||||
|
||||
- name: Pnpm Build
|
||||
run: pnpm turbo build --filter="./packages/*"
|
||||
|
||||
- name: Install Playwright Browsers
|
||||
run: pnpm exec playwright install
|
||||
|
||||
- name: Unit Tests
|
||||
run: pnpm test:ci
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -19,3 +19,5 @@ test-results
|
||||
.husky
|
||||
|
||||
.vscode/settings.json
|
||||
|
||||
.svelte-kit
|
||||
@@ -48,7 +48,19 @@ You'll need Node.js 20.x or 22.x installed (we're working on support for 23.x),
|
||||
pnpm install
|
||||
```
|
||||
|
||||
3. **Run tests** to verify everything is working:
|
||||
3. **Install homepage dependencies**:
|
||||
|
||||
```bash
|
||||
cd homepage && pnpm install
|
||||
```
|
||||
|
||||
4. **Build the packages**:
|
||||
|
||||
```bash
|
||||
pnpm build
|
||||
```
|
||||
|
||||
5. **Run tests** to verify everything is working:
|
||||
```bash
|
||||
pnpm test
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Copyright 2024, Garden Computing, Inc.
|
||||
Copyright 2025, Garden Computing, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
SOFTWARE.
|
||||
|
||||
@@ -17,4 +17,4 @@ For community and support, please join our [Discord](https://discord.gg/utDMjHYg
|
||||
- Community & support: [Discord](https://discord.gg/utDMjHYg42)
|
||||
- Updates: [X](https://x.com/jazz_tools) & [Email](https://garden.co/news)
|
||||
|
||||
Copyright 2024 — Garden Computing, Inc.
|
||||
Copyright 2025 — Garden Computing, Inc.
|
||||
|
||||
@@ -1,5 +1,92 @@
|
||||
# chat-rn-clerk
|
||||
|
||||
## 1.0.71
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [ada802b]
|
||||
- jazz-tools@0.10.6
|
||||
- jazz-react-native@0.10.6
|
||||
- jazz-react-native-auth-clerk@0.10.6
|
||||
- jazz-react-native-media-images@0.10.6
|
||||
|
||||
## 1.0.70
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [59ff77e]
|
||||
- jazz-tools@0.10.5
|
||||
- jazz-react-native@0.10.5
|
||||
- jazz-react-native-auth-clerk@0.10.5
|
||||
- jazz-react-native-media-images@0.10.5
|
||||
|
||||
## 1.0.69
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.10.4
|
||||
- jazz-react-native-auth-clerk@0.10.4
|
||||
- jazz-tools@0.10.4
|
||||
- jazz-react-native-media-images@0.10.4
|
||||
|
||||
## 1.0.68
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d8582fc]
|
||||
- jazz-tools@0.10.3
|
||||
- jazz-react-native@0.10.3
|
||||
- jazz-react-native-auth-clerk@0.10.3
|
||||
- jazz-react-native-media-images@0.10.3
|
||||
|
||||
## 1.0.67
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.10.2
|
||||
- jazz-react-native-auth-clerk@0.10.2
|
||||
- jazz-tools@0.10.2
|
||||
- jazz-react-native-media-images@0.10.2
|
||||
|
||||
## 1.0.66
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5a63cba]
|
||||
- jazz-tools@0.10.1
|
||||
- jazz-react-native@0.10.1
|
||||
- jazz-react-native-auth-clerk@0.10.1
|
||||
- jazz-react-native-media-images@0.10.1
|
||||
|
||||
## 1.0.65
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [498954f]
|
||||
- Updated dependencies [d42c2aa]
|
||||
- Updated dependencies [dd03464]
|
||||
- Updated dependencies [b426342]
|
||||
- jazz-react-native-auth-clerk@0.10.0
|
||||
- jazz-react-native@0.10.0
|
||||
- jazz-tools@0.10.0
|
||||
- jazz-react-native-media-images@0.10.0
|
||||
|
||||
## 1.0.64
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.9.23
|
||||
- jazz-react-native-auth-clerk@0.9.23
|
||||
- jazz-tools@0.9.23
|
||||
- jazz-react-native-media-images@0.9.23
|
||||
|
||||
## 1.0.63
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.9.22
|
||||
- jazz-react-native-auth-clerk@0.9.22
|
||||
|
||||
## 1.0.62
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Redirect, Stack } from "expo-router";
|
||||
import { useIsAuthenticated } from "jazz-react-native";
|
||||
import React from "react";
|
||||
import { useAuth } from "../../src/auth-context";
|
||||
|
||||
export default function HomeLayout() {
|
||||
const { isAuthenticated } = useAuth();
|
||||
const isAuthenticated = useIsAuthenticated();
|
||||
|
||||
if (isAuthenticated) {
|
||||
return <Redirect href={"/chat"} />;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Redirect, Stack } from "expo-router";
|
||||
import { useAuth } from "../../src/auth-context";
|
||||
import { useIsAuthenticated } from "jazz-react-native";
|
||||
|
||||
export default function UnAuthenticatedLayout() {
|
||||
const { isAuthenticated } = useAuth();
|
||||
const isAuthenticated = useIsAuthenticated();
|
||||
|
||||
if (isAuthenticated) {
|
||||
return <Redirect href={"/chat"} />;
|
||||
|
||||
@@ -20,10 +20,15 @@ export default function ChatScreen() {
|
||||
const navigation = useNavigation();
|
||||
const { user } = useUser();
|
||||
|
||||
function handleLogOut() {
|
||||
logOut();
|
||||
router.navigate("/");
|
||||
}
|
||||
|
||||
useLayoutEffect(() => {
|
||||
navigation.setOptions({
|
||||
headerTitle: "Chat",
|
||||
headerRight: () => <Button onPress={logOut} title="Logout" />,
|
||||
headerRight: () => <Button onPress={handleLogOut} title="Logout" />,
|
||||
});
|
||||
}, [navigation]);
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ config.resolver.nodeModulesPaths = [
|
||||
path.resolve(workspaceRoot, "node_modules"),
|
||||
];
|
||||
config.resolver.sourceExts = ["mjs", "js", "json", "ts", "tsx"];
|
||||
config.resolver.unstable_enablePackageExports = true;
|
||||
config.resolver.requireCycleIgnorePatterns = [
|
||||
/(^|\/|\\)node_modules($|\/|\\)/,
|
||||
/(^|\/|\\)packages($|\/|\\)/,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "chat-rn-clerk",
|
||||
"main": "index.js",
|
||||
"version": "1.0.62",
|
||||
"version": "1.0.71",
|
||||
"scripts": {
|
||||
"build": "expo export -p ios",
|
||||
"start": "expo start",
|
||||
@@ -72,7 +72,7 @@
|
||||
"jest": "^29.2.1",
|
||||
"jest-expo": "~52.0.2",
|
||||
"react-test-renderer": "18.2.0",
|
||||
"tailwindcss": "^3.4.15",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"typescript": "~5.6.2"
|
||||
},
|
||||
"private": true
|
||||
|
||||
1
examples/chat-rn-clerk/src/apiKey.ts
Normal file
1
examples/chat-rn-clerk/src/apiKey.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const apiKey = "chat-rn-clerk-example-jazz@garden.co";
|
||||
@@ -1,49 +1,21 @@
|
||||
import { useClerk, useUser } from "@clerk/clerk-expo";
|
||||
import { JazzProvider, setupKvStore } from "jazz-react-native";
|
||||
import { useJazzClerkAuth } from "jazz-react-native-auth-clerk";
|
||||
import React, { createContext, PropsWithChildren, useContext } from "react";
|
||||
import { Text, View } from "react-native";
|
||||
const AuthContext = createContext<{
|
||||
isAuthenticated: boolean;
|
||||
isLoading: boolean;
|
||||
}>({
|
||||
isAuthenticated: false,
|
||||
isLoading: true,
|
||||
});
|
||||
|
||||
export function useAuth() {
|
||||
return useContext(AuthContext);
|
||||
}
|
||||
|
||||
const kvStore = setupKvStore();
|
||||
import { useClerk } from "@clerk/clerk-expo";
|
||||
import { JazzProviderWithClerk } from "jazz-react-native-auth-clerk";
|
||||
import React, { PropsWithChildren } from "react";
|
||||
import { apiKey } from "./apiKey";
|
||||
|
||||
export function JazzAndAuth({ children }: PropsWithChildren) {
|
||||
const { isSignedIn, isLoaded: isClerkLoaded } = useUser();
|
||||
const clerk = useClerk();
|
||||
const [auth, state] = useJazzClerkAuth(clerk, kvStore);
|
||||
const isAuthenticated = Boolean(isSignedIn && isClerkLoaded && auth);
|
||||
|
||||
return (
|
||||
<AuthContext.Provider
|
||||
value={{ isAuthenticated, isLoading: !isClerkLoaded || !auth }}
|
||||
<JazzProviderWithClerk
|
||||
clerk={clerk}
|
||||
storage="sqlite"
|
||||
sync={{
|
||||
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
|
||||
when: "signedUp", // This makes the app work in local mode when the user is not authenticated
|
||||
}}
|
||||
>
|
||||
{state?.errors?.length > 0 &&
|
||||
state.errors.map((error) => (
|
||||
<View key={error}>
|
||||
<Text style={{ color: "red" }}>{error}</Text>
|
||||
</View>
|
||||
))}
|
||||
{auth && clerk.user ? (
|
||||
<JazzProvider
|
||||
auth={auth}
|
||||
storage="sqlite"
|
||||
peer="wss://cloud.jazz.tools/?key=chat-rn-clerk-example-jazz@garden.co"
|
||||
>
|
||||
{children}
|
||||
</JazzProvider>
|
||||
) : (
|
||||
children
|
||||
)}
|
||||
</AuthContext.Provider>
|
||||
{children}
|
||||
</JazzProviderWithClerk>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,75 @@
|
||||
# chat-rn
|
||||
|
||||
## 1.0.68
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [ada802b]
|
||||
- jazz-tools@0.10.6
|
||||
- jazz-react-native@0.10.6
|
||||
|
||||
## 1.0.67
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [59ff77e]
|
||||
- jazz-tools@0.10.5
|
||||
- jazz-react-native@0.10.5
|
||||
|
||||
## 1.0.66
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.10.4
|
||||
- jazz-tools@0.10.4
|
||||
|
||||
## 1.0.65
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d8582fc]
|
||||
- jazz-tools@0.10.3
|
||||
- jazz-react-native@0.10.3
|
||||
|
||||
## 1.0.64
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.10.2
|
||||
- jazz-tools@0.10.2
|
||||
|
||||
## 1.0.63
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5a63cba]
|
||||
- jazz-tools@0.10.1
|
||||
- jazz-react-native@0.10.1
|
||||
|
||||
## 1.0.62
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [498954f]
|
||||
- Updated dependencies [d42c2aa]
|
||||
- Updated dependencies [dd03464]
|
||||
- Updated dependencies [b426342]
|
||||
- jazz-react-native@0.10.0
|
||||
- jazz-tools@0.10.0
|
||||
|
||||
## 1.0.61
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.9.23
|
||||
- jazz-tools@0.9.23
|
||||
|
||||
## 1.0.60
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react-native@0.9.22
|
||||
|
||||
## 1.0.59
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -19,7 +19,6 @@ config.resolver.nodeModulesPaths = [
|
||||
path.resolve(workspaceRoot, "node_modules"),
|
||||
];
|
||||
config.resolver.sourceExts = ["mjs", "js", "json", "ts", "tsx"];
|
||||
config.resolver.unstable_enablePackageExports = true;
|
||||
config.resolver.requireCycleIgnorePatterns = [
|
||||
/(^|\/|\\)node_modules($|\/|\\)/,
|
||||
/(^|\/|\\)packages($|\/|\\)/,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "chat-rn",
|
||||
"version": "1.0.59",
|
||||
"version": "1.0.68",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "expo export -p ios",
|
||||
@@ -23,7 +23,6 @@
|
||||
"expo-build-properties": "~0.13.1",
|
||||
"expo-clipboard": "~7.0.0",
|
||||
"expo-constants": "~17.0.3",
|
||||
"expo-crypto": "~14.0.1",
|
||||
"expo-dev-client": "~5.0.5",
|
||||
"expo-linking": "~7.0.3",
|
||||
"expo-secure-store": "~14.0.0",
|
||||
@@ -36,7 +35,9 @@
|
||||
"react-native": "~0.76.3",
|
||||
"react-native-fetch-api": "^3.0.0",
|
||||
"react-native-get-random-values": "^1.11.0",
|
||||
"react-native-nitro-modules": "0.21.0",
|
||||
"react-native-polyfill-globals": "^3.1.0",
|
||||
"react-native-quick-crypto": "1.0.0-beta.12",
|
||||
"react-native-safe-area-context": "4.12.0",
|
||||
"react-native-screens": "4.1.0",
|
||||
"react-native-url-polyfill": "^2.0.0",
|
||||
@@ -46,7 +47,7 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.20.0",
|
||||
"@types/react": "^18.3.12",
|
||||
"tailwindcss": "^3.4.15",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"typescript": "~5.6.2"
|
||||
},
|
||||
"private": true
|
||||
|
||||
@@ -9,7 +9,8 @@ import * as Linking from "expo-linking";
|
||||
import React, { StrictMode, useEffect, useState } from "react";
|
||||
import HandleInviteScreen from "./invite";
|
||||
|
||||
import { DemoAuthBasicUI, JazzProvider, useDemoAuth } from "jazz-react-native";
|
||||
import { JazzProvider, RNQuickCrypto } from "jazz-react-native";
|
||||
import { apiKey } from "./apiKey";
|
||||
import ChatScreen from "./chat";
|
||||
|
||||
const Stack = createNativeStackNavigator();
|
||||
@@ -28,7 +29,6 @@ const linking = {
|
||||
};
|
||||
|
||||
function App() {
|
||||
const [auth, state] = useDemoAuth();
|
||||
const [initialRoute, setInitialRoute] = useState<
|
||||
"ChatScreen" | "HandleInviteScreen"
|
||||
>("ChatScreen");
|
||||
@@ -43,16 +43,14 @@ function App() {
|
||||
});
|
||||
}, []);
|
||||
|
||||
if (!auth) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<StrictMode>
|
||||
<JazzProvider
|
||||
auth={auth}
|
||||
storage="sqlite"
|
||||
peer="wss://cloud.jazz.tools/?key=chat-rn-example-jazz@garden.co"
|
||||
sync={{
|
||||
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
|
||||
}}
|
||||
CryptoProvider={RNQuickCrypto}
|
||||
>
|
||||
<NavigationContainer linking={linking} ref={navigationRef}>
|
||||
<Stack.Navigator initialRouteName={initialRoute}>
|
||||
@@ -69,9 +67,6 @@ function App() {
|
||||
</Stack.Navigator>
|
||||
</NavigationContainer>
|
||||
</JazzProvider>
|
||||
{state.state !== "signedIn" ? (
|
||||
<DemoAuthBasicUI appName="Jazz Chat" state={state} />
|
||||
) : null}
|
||||
</StrictMode>
|
||||
);
|
||||
}
|
||||
|
||||
1
examples/chat-rn/src/apiKey.ts
Normal file
1
examples/chat-rn/src/apiKey.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const apiKey = "chat-rn-example-jazz@garden.co";
|
||||
@@ -1,6 +1,6 @@
|
||||
import clsx from "clsx";
|
||||
import * as Clipboard from "expo-clipboard";
|
||||
import { Group, ID } from "jazz-tools";
|
||||
import { Group, ID, Profile } from "jazz-tools";
|
||||
import { useEffect, useState } from "react";
|
||||
import React, {
|
||||
Button,
|
||||
@@ -22,10 +22,16 @@ export default function ChatScreen({ navigation }: { navigation: any }) {
|
||||
const [chatId, setChatId] = useState<ID<Chat>>();
|
||||
const loadedChat = useCoState(Chat, chatId, [{}]);
|
||||
const [message, setMessage] = useState("");
|
||||
const profile = useCoState(Profile, me._refs.profile?.id, {});
|
||||
|
||||
function handleLogOut() {
|
||||
setChatId(undefined);
|
||||
logOut();
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
navigation.setOptions({
|
||||
headerRight: () => <Button onPress={logOut} title="Logout" />,
|
||||
headerRight: () => <Button onPress={handleLogOut} title="Logout" />,
|
||||
headerLeft: () =>
|
||||
loadedChat ? (
|
||||
<Button
|
||||
@@ -131,6 +137,19 @@ export default function ChatScreen({ navigation }: { navigation: any }) {
|
||||
<View className="flex flex-col h-full">
|
||||
{!loadedChat ? (
|
||||
<View className="flex flex-col h-full items-center justify-center">
|
||||
<Text className="text-m font-bold mb-6">Username</Text>
|
||||
<TextInput
|
||||
className="rounded h-12 p-2 mb-12 w-40 border border-gray-200 block"
|
||||
value={profile?.name ?? ""}
|
||||
onChangeText={(value) => {
|
||||
if (profile) {
|
||||
profile.name = value;
|
||||
}
|
||||
}}
|
||||
textAlignVertical="center"
|
||||
onSubmitEditing={sendMessage}
|
||||
testID="username-input"
|
||||
/>
|
||||
<TouchableOpacity
|
||||
onPress={createChat}
|
||||
className="bg-blue-500 p-4 rounded-md"
|
||||
@@ -172,10 +191,12 @@ export default function ChatScreen({ navigation }: { navigation: any }) {
|
||||
placeholder="Type a message..."
|
||||
textAlignVertical="center"
|
||||
onSubmitEditing={sendMessage}
|
||||
testID="message-input"
|
||||
/>
|
||||
<TouchableOpacity
|
||||
onPress={sendMessage}
|
||||
className="bg-gray-300 text-white rounded-full h-8 w-8 items-center justify-center"
|
||||
testID="send-button"
|
||||
>
|
||||
<Text>↑</Text>
|
||||
</TouchableOpacity>
|
||||
|
||||
16
examples/chat-rn/test/e2e/erase_text.yml
Normal file
16
examples/chat-rn/test/e2e/erase_text.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
# this sub-flow exists to work around an ios issue where the text field is not
|
||||
# fully erased. The tap into the input field hits the middle, and clears all
|
||||
# text to the left. If there's more to the right, it slides left, and thus we
|
||||
# repeat this step. https://maestro.mobile.dev/api-reference/commands/erasetext
|
||||
appId: com.jazz.chatrn
|
||||
---
|
||||
- copyTextFrom:
|
||||
id: ${id}
|
||||
- repeat:
|
||||
times: 4
|
||||
commands:
|
||||
- tapOn:
|
||||
id: ${id}
|
||||
- eraseText
|
||||
- copyTextFrom:
|
||||
id: ${id}
|
||||
47
examples/chat-rn/test/e2e/flow.yml
Normal file
47
examples/chat-rn/test/e2e/flow.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
appId: com.jazz.chatrn
|
||||
---
|
||||
- launchApp
|
||||
|
||||
# # handle Expo screens (for local dev)
|
||||
# - assertVisible: "Continue"
|
||||
# - tapOn: "Continue"
|
||||
# - assertVisible: "Reload"
|
||||
# - tapOn: "Reload"
|
||||
|
||||
# login
|
||||
- assertVisible: "Anonymous user"
|
||||
- runFlow:
|
||||
label: "Erase existing username"
|
||||
file: erase_text.yml
|
||||
env:
|
||||
id: "username-input"
|
||||
- inputText: "boorad"
|
||||
- assertVisible: "boorad"
|
||||
|
||||
# start new chat
|
||||
- tapOn: "Start new chat"
|
||||
- assertVisible: "Share"
|
||||
- assertVisible: "Jazz Chat"
|
||||
- assertVisible: "Logout"
|
||||
|
||||
# send a message
|
||||
- runFlow:
|
||||
label: "Erase existing message"
|
||||
file: erase_text.yml
|
||||
env:
|
||||
id: "message-input"
|
||||
- inputText: "bro, low key, it do be like that tho"
|
||||
- tapOn:
|
||||
id: "send-button"
|
||||
- assertVisible: "bro, low key, it do be like that tho"
|
||||
|
||||
# get invite code
|
||||
- tapOn: "Share"
|
||||
- assertVisible: "Copied to clipboard"
|
||||
- tapOn: "OK"
|
||||
# this assert doesn't work. maestro.copiedText only populates from `copyTextFrom`
|
||||
# - assertTrue: ${maestro.copiedText.startsWith("co_z")}
|
||||
|
||||
# logout
|
||||
- tapOn: "Logout"
|
||||
- assertVisible: "Anonymous user"
|
||||
20
examples/chat-rn/test/e2e/run.sh
Executable file
20
examples/chat-rn/test/e2e/run.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script is necessary, because unlike ios, the android emulator action
|
||||
# accepts a script, runs it as your tests, then terminates.
|
||||
|
||||
set -e
|
||||
|
||||
# build and install the app
|
||||
echo "Building and installing Android app."
|
||||
echo "If it fails, its output will be in artifact: android-install.log..."
|
||||
cd ./android/
|
||||
./gradlew installRelease >> ~/output/android-install.log 2>&1
|
||||
cd ..
|
||||
|
||||
# run the e2e tests
|
||||
export PATH="$PATH":"$HOME/.maestro/bin"
|
||||
export MAESTRO_DRIVER_STARTUP_TIMEOUT=300000 # setting to 5 mins 👀
|
||||
export MAESTRO_CLI_NO_ANALYTICS=1
|
||||
export MAESTRO_CLI_ANALYSIS_NOTIFICATION_DISABLED=true
|
||||
maestro test test/e2e/flow.yml
|
||||
@@ -1,5 +1,84 @@
|
||||
# chat-vue
|
||||
|
||||
## 0.0.55
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [ada802b]
|
||||
- jazz-tools@0.10.6
|
||||
- jazz-browser@0.10.6
|
||||
- jazz-vue@0.10.6
|
||||
|
||||
## 0.0.54
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [59ff77e]
|
||||
- jazz-tools@0.10.5
|
||||
- jazz-browser@0.10.5
|
||||
- jazz-vue@0.10.5
|
||||
|
||||
## 0.0.53
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.10.4
|
||||
- jazz-tools@0.10.4
|
||||
- jazz-vue@0.10.4
|
||||
|
||||
## 0.0.52
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d8582fc]
|
||||
- jazz-tools@0.10.3
|
||||
- jazz-browser@0.10.3
|
||||
- jazz-vue@0.10.3
|
||||
|
||||
## 0.0.51
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.10.2
|
||||
- jazz-tools@0.10.2
|
||||
- jazz-vue@0.10.2
|
||||
|
||||
## 0.0.50
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5a63cba]
|
||||
- jazz-tools@0.10.1
|
||||
- jazz-browser@0.10.1
|
||||
- jazz-vue@0.10.1
|
||||
|
||||
## 0.0.49
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [498954f]
|
||||
- Updated dependencies [d42c2aa]
|
||||
- Updated dependencies [dd03464]
|
||||
- Updated dependencies [b426342]
|
||||
- jazz-browser@0.10.0
|
||||
- jazz-tools@0.10.0
|
||||
- jazz-vue@0.10.0
|
||||
|
||||
## 0.0.48
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.9.23
|
||||
- jazz-tools@0.9.23
|
||||
- jazz-vue@0.9.23
|
||||
|
||||
## 0.0.47
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser@0.9.22
|
||||
- jazz-vue@0.9.22
|
||||
|
||||
## 0.0.46
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "chat-vue",
|
||||
"version": "0.0.46",
|
||||
"version": "0.0.55",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
@@ -30,9 +30,9 @@
|
||||
"eslint-plugin-vue": "^9.28.0",
|
||||
"npm-run-all2": "^6.2.3",
|
||||
"postcss": "^8.4.27",
|
||||
"tailwindcss": "^3.4.15",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"typescript": "~5.6.2",
|
||||
"vite": "^5.4.10",
|
||||
"vite": "^6.0.11",
|
||||
"vite-plugin-vue-devtools": "^7.4.6",
|
||||
"vue-tsc": "^2.1.6"
|
||||
}
|
||||
|
||||
1
examples/chat-vue/src/apiKey.ts
Normal file
1
examples/chat-vue/src/apiKey.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const apiKey = "chat-example-jazz@garden.co";
|
||||
@@ -1,32 +1,31 @@
|
||||
import { DemoAuthBasicUI, JazzProvider, useDemoAuth } from "jazz-vue";
|
||||
import { DemoAuthBasicUI, JazzProvider } from "jazz-vue";
|
||||
import { createApp, defineComponent, h } from "vue";
|
||||
import App from "./App.vue";
|
||||
import "./index.css";
|
||||
import { apiKey } from "@/apiKey";
|
||||
import router from "./router";
|
||||
|
||||
const RootComponent = defineComponent({
|
||||
name: "RootComponent",
|
||||
setup() {
|
||||
const { authMethod, state } = useDemoAuth();
|
||||
|
||||
return () => [
|
||||
return () =>
|
||||
h(
|
||||
JazzProvider,
|
||||
{
|
||||
auth: authMethod.value,
|
||||
peer: "wss://cloud.jazz.tools/?key=chat-example-jazz@garden.co",
|
||||
sync: {
|
||||
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
|
||||
},
|
||||
},
|
||||
{
|
||||
default: () => h(App),
|
||||
},
|
||||
),
|
||||
|
||||
state.state !== "signedIn" &&
|
||||
h(DemoAuthBasicUI, {
|
||||
appName: "Jazz Chat",
|
||||
state,
|
||||
}),
|
||||
];
|
||||
h(
|
||||
DemoAuthBasicUI,
|
||||
{
|
||||
appName: "Jazz Vue Chat",
|
||||
},
|
||||
{
|
||||
default: () => h(App),
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,86 @@
|
||||
# jazz-example-chat
|
||||
|
||||
## 0.0.151
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1d71ca1]
|
||||
- Updated dependencies [ada802b]
|
||||
- hash-slash@0.2.2
|
||||
- jazz-react@0.10.6
|
||||
- jazz-tools@0.10.6
|
||||
- jazz-browser-media-images@0.10.6
|
||||
|
||||
## 0.0.150
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [59ff77e]
|
||||
- jazz-tools@0.10.5
|
||||
- jazz-browser-media-images@0.10.5
|
||||
- jazz-react@0.10.5
|
||||
|
||||
## 0.0.149
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.10.4
|
||||
- jazz-tools@0.10.4
|
||||
- jazz-browser-media-images@0.10.4
|
||||
|
||||
## 0.0.148
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d8582fc]
|
||||
- jazz-tools@0.10.3
|
||||
- jazz-browser-media-images@0.10.3
|
||||
- jazz-react@0.10.3
|
||||
|
||||
## 0.0.147
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.10.2
|
||||
- jazz-tools@0.10.2
|
||||
- jazz-browser-media-images@0.10.2
|
||||
|
||||
## 0.0.146
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5a63cba]
|
||||
- jazz-tools@0.10.1
|
||||
- jazz-browser-media-images@0.10.1
|
||||
- jazz-react@0.10.1
|
||||
|
||||
## 0.0.145
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [498954f]
|
||||
- Updated dependencies [d42c2aa]
|
||||
- Updated dependencies [dd03464]
|
||||
- Updated dependencies [b426342]
|
||||
- jazz-react@0.10.0
|
||||
- jazz-tools@0.10.0
|
||||
- jazz-browser-media-images@0.10.0
|
||||
|
||||
## 0.0.144
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.23
|
||||
- jazz-tools@0.9.23
|
||||
- jazz-browser-media-images@0.9.23
|
||||
|
||||
## 0.0.143
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser-media-images@0.9.22
|
||||
- jazz-react@0.9.22
|
||||
|
||||
## 0.0.142
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-chat",
|
||||
"private": true,
|
||||
"version": "0.0.142",
|
||||
"version": "0.0.151",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -23,15 +23,15 @@
|
||||
"react-dom": "^18.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.46.1",
|
||||
"@playwright/test": "^1.50.1",
|
||||
"@types/react": "^18.3.12",
|
||||
"@types/react-dom": "^18.3.1",
|
||||
"@vitejs/plugin-react-swc": "^3.3.2",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"is-ci": "^3.0.1",
|
||||
"postcss": "^8.4.27",
|
||||
"tailwindcss": "^3.4.15",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"typescript": "~5.6.2",
|
||||
"vite": "^5.4.10"
|
||||
"vite": "^6.0.11"
|
||||
}
|
||||
}
|
||||
|
||||
1
examples/chat/src/apiKey.ts
Normal file
1
examples/chat/src/apiKey.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const apiKey = "chat-example-jazz@garden.co";
|
||||
@@ -1,11 +1,11 @@
|
||||
import { inIframe, onChatLoad } from "@/util.ts";
|
||||
import { apiKey } from "@/apiKey.ts";
|
||||
import { getRandomUsername, inIframe, onChatLoad } from "@/util.ts";
|
||||
import { useIframeHashRouter } from "hash-slash";
|
||||
import { useAccount } from "jazz-react";
|
||||
import { JazzProvider, useAccount } from "jazz-react";
|
||||
import { Group, ID } from "jazz-tools";
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import { ChatScreen } from "./chatScreen.tsx";
|
||||
import { JazzAndAuth } from "./jazz.tsx";
|
||||
import { Chat } from "./schema.ts";
|
||||
import { ThemeProvider } from "./themeProvider.tsx";
|
||||
import { AppContainer, TopBar } from "./ui.tsx";
|
||||
@@ -28,7 +28,16 @@ export function App() {
|
||||
return (
|
||||
<AppContainer>
|
||||
<TopBar>
|
||||
<p>{me?.profile?.name}</p>
|
||||
<input
|
||||
type="text"
|
||||
value={me?.profile?.name ?? ""}
|
||||
className="bg-transparent"
|
||||
onChange={(e) => {
|
||||
if (!me?.profile) return;
|
||||
me.profile.name = e.target.value;
|
||||
}}
|
||||
placeholder="Set username"
|
||||
/>
|
||||
{!inIframe && <button onClick={logOut}>Log out</button>}
|
||||
</TopBar>
|
||||
{router.route({
|
||||
@@ -39,12 +48,20 @@ export function App() {
|
||||
);
|
||||
}
|
||||
|
||||
const url = new URL(window.location.href);
|
||||
const defaultProfileName = url.searchParams.get("user") ?? getRandomUsername();
|
||||
|
||||
createRoot(document.getElementById("root")!).render(
|
||||
<ThemeProvider>
|
||||
<StrictMode>
|
||||
<JazzAndAuth>
|
||||
<JazzProvider
|
||||
sync={{
|
||||
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
|
||||
}}
|
||||
defaultProfileName={defaultProfileName}
|
||||
>
|
||||
<App />
|
||||
</JazzAndAuth>
|
||||
</JazzProvider>
|
||||
</StrictMode>
|
||||
</ThemeProvider>,
|
||||
);
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
import { DemoAuthBasicUI, JazzProvider, useDemoAuth } from "jazz-react";
|
||||
|
||||
export function JazzAndAuth({ children }: { children: React.ReactNode }) {
|
||||
const [auth, state] = useDemoAuth();
|
||||
|
||||
return (
|
||||
<>
|
||||
<JazzProvider
|
||||
auth={auth}
|
||||
peer="wss://cloud.jazz.tools/?key=chat-example-jazz@garden.co"
|
||||
>
|
||||
{children}
|
||||
</JazzProvider>
|
||||
{state.state !== "signedIn" && (
|
||||
<DemoAuthBasicUI appName="Jazz Chat" state={state} />
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import { useId, useRef } from "react";
|
||||
|
||||
export function AppContainer(props: { children: React.ReactNode }) {
|
||||
return (
|
||||
<div className="flex flex-col justify-between w-screen h-screen bg-stone-50 dark:bg-black dark:text-white">
|
||||
<div className="flex flex-col justify-between w-screen h-screen bg-stone-50 dark:bg-stone-925 dark:text-white">
|
||||
{props.children}
|
||||
</div>
|
||||
);
|
||||
@@ -14,7 +14,7 @@ export function AppContainer(props: { children: React.ReactNode }) {
|
||||
|
||||
export function TopBar(props: { children: React.ReactNode }) {
|
||||
return (
|
||||
<div className="p-3 bg-white w-full flex justify-between gap-2 border-b dark:bg-transparent dark:border-stone-800">
|
||||
<div className="p-3 bg-white w-full flex justify-between gap-2 border-b dark:bg-transparent dark:border-stone-900">
|
||||
{props.children}
|
||||
</div>
|
||||
);
|
||||
@@ -33,7 +33,7 @@ export function ChatBody(props: { children: React.ReactNode }) {
|
||||
|
||||
export function EmptyChatMessage() {
|
||||
return (
|
||||
<div className="h-full text-base text-stone-500 flex items-center justify-center px-3 text-lg md:text-2xl">
|
||||
<div className="h-full text-base text-stone-500 flex items-center justify-center px-3 md:text-2xl">
|
||||
Start a conversation below.
|
||||
</div>
|
||||
);
|
||||
@@ -61,7 +61,7 @@ export function BubbleBody(props: {
|
||||
"line-clamp-10 text-ellipsis whitespace-pre-wrap",
|
||||
"rounded-2xl overflow-hidden max-w-[calc(100%-5rem)] shadow-sm p-1",
|
||||
props.fromMe
|
||||
? "bg-white dark:bg-stone-700 dark:text-white"
|
||||
? "bg-white dark:bg-stone-900 dark:text-white"
|
||||
: "bg-blue text-white",
|
||||
)}
|
||||
>
|
||||
@@ -97,7 +97,7 @@ export function BubbleInfo(props: { by: string | undefined; madeAt: Date }) {
|
||||
|
||||
export function InputBar(props: { children: React.ReactNode }) {
|
||||
return (
|
||||
<div className="p-3 bg-white border-t shadow-2xl mt-auto flex gap-1 dark:bg-transparent dark:border-stone-800">
|
||||
<div className="p-3 bg-white border-t shadow-2xl mt-auto flex gap-1 dark:bg-transparent dark:border-stone-900">
|
||||
{props.children}
|
||||
</div>
|
||||
);
|
||||
@@ -147,7 +147,7 @@ export function TextInput(props: { onSubmit: (text: string) => void }) {
|
||||
</label>
|
||||
<input
|
||||
id={inputId}
|
||||
className="rounded-full py-1 px-3 border block w-full placeholder:text-stone-500 dark:bg-black dark:text-white dark:border-stone-700"
|
||||
className="rounded-full py-1 px-3 border block w-full placeholder:text-stone-500 dark:bg-stone-925 dark:text-white dark:border-stone-900"
|
||||
placeholder="Type a message and press Enter"
|
||||
maxLength={2048}
|
||||
onKeyDown={({ key, currentTarget: input }) => {
|
||||
|
||||
@@ -15,3 +15,20 @@ export function onChatLoad(chat: Chat) {
|
||||
}
|
||||
|
||||
export const inIframe = window.self !== window.top;
|
||||
|
||||
const animals = [
|
||||
"elephant",
|
||||
"penguin",
|
||||
"giraffe",
|
||||
"octopus",
|
||||
"kangaroo",
|
||||
"dolphin",
|
||||
"cheetah",
|
||||
"koala",
|
||||
"platypus",
|
||||
"pangolin",
|
||||
];
|
||||
|
||||
export function getRandomUsername() {
|
||||
return `Anonymous ${animals[Math.floor(Math.random() * animals.length)]}`;
|
||||
}
|
||||
|
||||
@@ -1,48 +1,35 @@
|
||||
import { test } from "@playwright/test";
|
||||
import { ChatPage } from "./pages/ChatPage";
|
||||
import { LoginPage } from "./pages/LoginPage";
|
||||
|
||||
test("chat between two users", async ({ page }) => {
|
||||
const loginPage = new LoginPage(page);
|
||||
test("chat between two users", async ({ page: marioPage, browser }) => {
|
||||
const context = await browser.newContext();
|
||||
const luigiPage = await context.newPage();
|
||||
|
||||
const mario = "S. Mario";
|
||||
const luigi = "Luigi";
|
||||
await marioPage.goto("/");
|
||||
|
||||
await loginPage.goto();
|
||||
await loginPage.fillUsername(mario);
|
||||
await loginPage.signup();
|
||||
const marioChat = new ChatPage(marioPage);
|
||||
const luigiChat = new ChatPage(luigiPage);
|
||||
|
||||
const chatPage = new ChatPage(page);
|
||||
await marioChat.setUsername("Mario");
|
||||
|
||||
const message1ByMario = "Hello Luigi, are you ready to save the princess?";
|
||||
|
||||
await chatPage.sendMessage(message1ByMario);
|
||||
await chatPage.expectMessageRow(message1ByMario);
|
||||
await marioChat.sendMessage(message1ByMario);
|
||||
await marioChat.expectMessageRow(message1ByMario);
|
||||
|
||||
const roomURL = page.url();
|
||||
const roomURL = marioPage.url();
|
||||
await luigiPage.goto(roomURL);
|
||||
|
||||
await chatPage.logout();
|
||||
await luigiChat.setUsername("Luigi");
|
||||
|
||||
await loginPage.expectLoaded();
|
||||
|
||||
await loginPage.fillUsername(luigi);
|
||||
await loginPage.signup();
|
||||
|
||||
await page.goto(roomURL);
|
||||
|
||||
await chatPage.expectMessageRow(message1ByMario);
|
||||
await luigiChat.expectMessageRow(message1ByMario);
|
||||
|
||||
const message2ByLuigi =
|
||||
"No, I'm not ready yet. I'm still trying to find the key to the castle.";
|
||||
|
||||
await chatPage.sendMessage(message2ByLuigi);
|
||||
await chatPage.expectMessageRow(message2ByLuigi);
|
||||
await luigiChat.sendMessage(message2ByLuigi);
|
||||
await luigiChat.expectMessageRow(message2ByLuigi);
|
||||
|
||||
await chatPage.logout();
|
||||
await loginPage.loginAs(mario);
|
||||
|
||||
await page.goto(roomURL);
|
||||
|
||||
await chatPage.expectMessageRow(message1ByMario);
|
||||
await chatPage.expectMessageRow(message2ByLuigi);
|
||||
await marioChat.expectMessageRow(message1ByMario);
|
||||
await luigiChat.expectMessageRow(message2ByLuigi);
|
||||
});
|
||||
|
||||
@@ -4,7 +4,7 @@ export class ChatPage {
|
||||
readonly page: Page;
|
||||
readonly messageInput: Locator;
|
||||
readonly logoutButton: Locator;
|
||||
|
||||
readonly usernameInput: Locator;
|
||||
constructor(page: Page) {
|
||||
this.page = page;
|
||||
this.messageInput = page.getByRole("textbox", {
|
||||
@@ -13,6 +13,11 @@ export class ChatPage {
|
||||
this.logoutButton = page.getByRole("button", {
|
||||
name: "Log out",
|
||||
});
|
||||
this.usernameInput = page.getByPlaceholder("Set username");
|
||||
}
|
||||
|
||||
async setUsername(username: string) {
|
||||
await this.usernameInput.fill(username);
|
||||
}
|
||||
|
||||
async sendMessage(message: string) {
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
import { Locator, Page, expect } from "@playwright/test";
|
||||
|
||||
export class LoginPage {
|
||||
readonly page: Page;
|
||||
readonly usernameInput: Locator;
|
||||
readonly signupButton: Locator;
|
||||
|
||||
constructor(page: Page) {
|
||||
this.page = page;
|
||||
this.usernameInput = page.getByRole("textbox");
|
||||
this.signupButton = page.getByRole("button", {
|
||||
name: "Sign up",
|
||||
});
|
||||
}
|
||||
|
||||
async goto() {
|
||||
this.page.goto("/");
|
||||
}
|
||||
|
||||
async fillUsername(value: string) {
|
||||
await this.usernameInput.clear();
|
||||
await this.usernameInput.fill(value);
|
||||
}
|
||||
|
||||
async loginAs(value: string) {
|
||||
await this.page
|
||||
.getByRole("button", {
|
||||
name: value,
|
||||
})
|
||||
.click();
|
||||
}
|
||||
|
||||
async signup() {
|
||||
await this.signupButton.click();
|
||||
}
|
||||
|
||||
async expectLoaded() {
|
||||
await expect(this.signupButton).toBeVisible();
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,85 @@
|
||||
# minimal-auth-clerk
|
||||
|
||||
## 0.0.50
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1d71ca1]
|
||||
- Updated dependencies [ada802b]
|
||||
- jazz-react-auth-clerk@0.10.6
|
||||
- jazz-react@0.10.6
|
||||
- jazz-tools@0.10.6
|
||||
|
||||
## 0.0.49
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [59ff77e]
|
||||
- jazz-tools@0.10.5
|
||||
- jazz-react@0.10.5
|
||||
- jazz-react-auth-clerk@0.10.5
|
||||
|
||||
## 0.0.48
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.10.4
|
||||
- jazz-react-auth-clerk@0.10.4
|
||||
- jazz-tools@0.10.4
|
||||
|
||||
## 0.0.47
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d8582fc]
|
||||
- jazz-tools@0.10.3
|
||||
- jazz-react@0.10.3
|
||||
- jazz-react-auth-clerk@0.10.3
|
||||
|
||||
## 0.0.46
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.10.2
|
||||
- jazz-react-auth-clerk@0.10.2
|
||||
- jazz-tools@0.10.2
|
||||
|
||||
## 0.0.45
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5a63cba]
|
||||
- jazz-tools@0.10.1
|
||||
- jazz-react@0.10.1
|
||||
- jazz-react-auth-clerk@0.10.1
|
||||
|
||||
## 0.0.44
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [498954f]
|
||||
- Updated dependencies [d42c2aa]
|
||||
- Updated dependencies [dd03464]
|
||||
- Updated dependencies [b426342]
|
||||
- jazz-react-auth-clerk@0.10.0
|
||||
- jazz-react@0.10.0
|
||||
- jazz-tools@0.10.0
|
||||
|
||||
## 0.0.43
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.23
|
||||
- jazz-react-auth-clerk@0.9.23
|
||||
- jazz-tools@0.9.23
|
||||
|
||||
## 0.0.42
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.22
|
||||
- jazz-react-auth-clerk@0.9.22
|
||||
|
||||
## 0.0.41
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "clerk",
|
||||
"private": true,
|
||||
"version": "0.0.41",
|
||||
"version": "0.0.50",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -13,7 +13,7 @@
|
||||
"dependencies": {
|
||||
"@clerk/clerk-react": "^5.4.1",
|
||||
"jazz-react": "workspace:*",
|
||||
"jazz-react-auth-clerk": "workspace:0.9.21",
|
||||
"jazz-react-auth-clerk": "workspace:0.10.6",
|
||||
"jazz-tools": "workspace:*",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1"
|
||||
@@ -25,6 +25,6 @@
|
||||
"@vitejs/plugin-react": "^4.3.3",
|
||||
"globals": "^15.11.0",
|
||||
"typescript": "~5.6.2",
|
||||
"vite": "^5.4.10"
|
||||
"vite": "^6.0.11"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,25 @@
|
||||
import { useAccount } from "jazz-react";
|
||||
import { SignInButton } from "@clerk/clerk-react";
|
||||
import { useAccount, useIsAuthenticated } from "jazz-react";
|
||||
|
||||
function App() {
|
||||
const { me, logOut } = useAccount();
|
||||
|
||||
const isAuthenticated = useIsAuthenticated();
|
||||
|
||||
if (isAuthenticated) {
|
||||
return (
|
||||
<div className="container">
|
||||
<h1>You're logged in</h1>
|
||||
<p>Welcome back, {me?.profile?.name}</p>
|
||||
<button onClick={() => logOut()}>Logout</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="container">
|
||||
<h1>You're logged in</h1>
|
||||
<p>Welcome back, {me?.profile?.name}</p>
|
||||
<button onClick={() => logOut()}>Logout</button>
|
||||
<h1>You're not logged in</h1>
|
||||
<SignInButton />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
1
examples/clerk/src/apiKey.ts
Normal file
1
examples/clerk/src/apiKey.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const apiKey = "minimal-auth-clerk-example@garden.co";
|
||||
@@ -62,7 +62,7 @@ button {
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 200px;
|
||||
max-width: 400px;
|
||||
margin: 0 auto;
|
||||
padding: 0 1rem;
|
||||
display: flex;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { ClerkProvider, SignInButton, useClerk } from "@clerk/clerk-react";
|
||||
import { useJazzClerkAuth } from "jazz-react-auth-clerk";
|
||||
import { ClerkProvider, useClerk } from "@clerk/clerk-react";
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import App from "./App.tsx";
|
||||
import "./index.css";
|
||||
import { JazzProvider } from "jazz-react";
|
||||
import { JazzProviderWithClerk } from "jazz-react-auth-clerk";
|
||||
import { apiKey } from "./apiKey";
|
||||
|
||||
// Import your publishable key
|
||||
const PUBLISHABLE_KEY = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY;
|
||||
@@ -13,35 +13,28 @@ if (!PUBLISHABLE_KEY) {
|
||||
throw new Error("Add your Clerk publishable key to the .env.local file");
|
||||
}
|
||||
|
||||
function JazzAndAuth({ children }: { children: React.ReactNode }) {
|
||||
function JazzProvider({ children }: { children: React.ReactNode }) {
|
||||
const clerk = useClerk();
|
||||
const [auth, state] = useJazzClerkAuth(clerk);
|
||||
|
||||
return (
|
||||
<main className="container">
|
||||
{state?.errors?.map((error) => (
|
||||
<div key={error}>{error}</div>
|
||||
))}
|
||||
{clerk.user && auth ? (
|
||||
<JazzProvider
|
||||
auth={auth}
|
||||
peer="wss://cloud.jazz.tools/?key=minimal-auth-clerk-example@garden.co"
|
||||
>
|
||||
{children}
|
||||
</JazzProvider>
|
||||
) : (
|
||||
<SignInButton />
|
||||
)}
|
||||
</main>
|
||||
<JazzProviderWithClerk
|
||||
clerk={clerk}
|
||||
sync={{
|
||||
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
|
||||
when: "signedUp", // This makes the app work in local mode when the user is not authenticated
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</JazzProviderWithClerk>
|
||||
);
|
||||
}
|
||||
|
||||
createRoot(document.getElementById("root")!).render(
|
||||
<StrictMode>
|
||||
<ClerkProvider publishableKey={PUBLISHABLE_KEY} afterSignOutUrl="/">
|
||||
<JazzAndAuth>
|
||||
<JazzProvider>
|
||||
<App />
|
||||
</JazzAndAuth>
|
||||
</JazzProvider>
|
||||
</ClerkProvider>
|
||||
</StrictMode>,
|
||||
);
|
||||
|
||||
@@ -1,5 +1,75 @@
|
||||
# file-share-svelte
|
||||
|
||||
## 0.0.35
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [ada802b]
|
||||
- jazz-tools@0.10.6
|
||||
- jazz-svelte@0.10.6
|
||||
|
||||
## 0.0.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [59ff77e]
|
||||
- jazz-tools@0.10.5
|
||||
- jazz-svelte@0.10.5
|
||||
|
||||
## 0.0.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.10.4
|
||||
- jazz-tools@0.10.4
|
||||
|
||||
## 0.0.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d8582fc]
|
||||
- jazz-tools@0.10.3
|
||||
- jazz-svelte@0.10.3
|
||||
|
||||
## 0.0.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.10.2
|
||||
- jazz-tools@0.10.2
|
||||
|
||||
## 0.0.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5a63cba]
|
||||
- jazz-tools@0.10.1
|
||||
- jazz-svelte@0.10.1
|
||||
|
||||
## 0.0.29
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [498954f]
|
||||
- Updated dependencies [d42c2aa]
|
||||
- Updated dependencies [dd03464]
|
||||
- Updated dependencies [b426342]
|
||||
- jazz-tools@0.10.0
|
||||
- jazz-svelte@0.10.0
|
||||
|
||||
## 0.0.28
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.23
|
||||
- jazz-tools@0.9.23
|
||||
|
||||
## 0.0.27
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-svelte@0.9.22
|
||||
|
||||
## 0.0.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "file-share-svelte",
|
||||
"version": "0.0.26",
|
||||
"version": "0.0.35",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
@@ -18,8 +18,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sveltejs/adapter-vercel": "^5.5.0",
|
||||
"@sveltejs/kit": "^2.0.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^4.0.1",
|
||||
"@sveltejs/kit": "^2.16.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^5.0.0",
|
||||
"@types/is-ci": "^3.0.4",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"eslint": "^9.7.0",
|
||||
@@ -32,10 +32,10 @@
|
||||
"prettier-plugin-tailwindcss": "^0.6.5",
|
||||
"svelte": "^5.0.0",
|
||||
"svelte-check": "^4.0.0",
|
||||
"tailwindcss": "^3.4.15",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"typescript": "~5.6.2",
|
||||
"typescript-eslint": "^8.0.0",
|
||||
"vite": "^5.4.10"
|
||||
"vite": "^6.0.11"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tailwindcss/typography": "^0.5.15",
|
||||
|
||||
1
examples/file-share-svelte/src/apiKey.ts
Normal file
1
examples/file-share-svelte/src/apiKey.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const apiKey = "file-share-svelte@garden.co"
|
||||
@@ -17,6 +17,6 @@ export function formatFileSize(bytes: number): string {
|
||||
* @param createdAt The creation date
|
||||
* @returns A unique file ID string
|
||||
*/
|
||||
export function generateTempFileId(fileName: string, createdAt: Date): string {
|
||||
return `file-${fileName}-${createdAt.getTime()}`;
|
||||
export function generateTempFileId(fileName: string | undefined, createdAt: Date | undefined): string {
|
||||
return `file-${fileName ?? 'unknown'}-${createdAt?.getTime() ?? 0}`;
|
||||
}
|
||||
|
||||
@@ -12,11 +12,9 @@
|
||||
import { Toaster } from 'svelte-sonner';
|
||||
import '../app.css';
|
||||
import { FileShareAccount } from '$lib/schema';
|
||||
import {apiKey} from '../apiKey';
|
||||
|
||||
let { children } = $props();
|
||||
const auth = usePasskeyAuth({
|
||||
appName: 'File Share'
|
||||
});
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@@ -25,21 +23,16 @@
|
||||
|
||||
<Toaster richColors />
|
||||
|
||||
{#if auth.state.state === 'ready'}
|
||||
<div class="fixed inset-0 flex items-center justify-center bg-gray-50/80">
|
||||
<div class="rounded-lg bg-white p-8 shadow-lg">
|
||||
<PasskeyAuthBasicUI state={auth.state} />
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{#if auth.current}
|
||||
<JazzProvider
|
||||
AccountSchema={FileShareAccount}
|
||||
auth={auth.current}
|
||||
peer="wss://cloud.jazz.tools/?key=file-share-svelte@garden.co"
|
||||
>
|
||||
<JazzProvider
|
||||
AccountSchema={FileShareAccount}
|
||||
sync={{
|
||||
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
|
||||
when: "signedUp",
|
||||
}}
|
||||
>
|
||||
<PasskeyAuthBasicUI appName="File Share">
|
||||
<div class="min-h-screen bg-gray-100">
|
||||
{@render children()}
|
||||
</div>
|
||||
</JazzProvider>
|
||||
{/if}
|
||||
</PasskeyAuthBasicUI>
|
||||
</JazzProvider>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
const input = event.target as HTMLInputElement;
|
||||
const files = input.files;
|
||||
|
||||
if (!files || !files.length || !me?.root?.sharedFiles || !me.root.publicGroup) return;
|
||||
if (!files || !files.length || !me.root?.sharedFiles || !me.root.publicGroup) return;
|
||||
|
||||
const file = files[0];
|
||||
const fileName = file.name;
|
||||
@@ -129,12 +129,14 @@
|
||||
{#if sharedFiles.current}
|
||||
{#if !(sharedFiles.current.length === 0 && uploadingFiles.size === 0)}
|
||||
{#each [...sharedFiles.current, ...uploadingFiles.values()] as file (generateTempFileId(file?.name, file?.createdAt))}
|
||||
<FileItem
|
||||
{file}
|
||||
loading={uploadingFiles.has(generateTempFileId(file?.name, file?.createdAt))}
|
||||
onShare={shareFile}
|
||||
onDelete={deleteFile}
|
||||
/>
|
||||
{#if file}
|
||||
<FileItem
|
||||
{file}
|
||||
loading={uploadingFiles.has(generateTempFileId(file?.name, file?.createdAt))}
|
||||
onShare={shareFile}
|
||||
onDelete={deleteFile}
|
||||
/>
|
||||
{/if}
|
||||
{/each}
|
||||
{:else}
|
||||
<p class="text-center text-gray-500">No files yet</p>
|
||||
|
||||
@@ -1,5 +1,86 @@
|
||||
# form
|
||||
|
||||
## 0.0.46
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1d71ca1]
|
||||
- Updated dependencies [ada802b]
|
||||
- hash-slash@0.2.2
|
||||
- jazz-react@0.10.6
|
||||
- jazz-tools@0.10.6
|
||||
- jazz-browser-media-images@0.10.6
|
||||
|
||||
## 0.0.45
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [59ff77e]
|
||||
- jazz-tools@0.10.5
|
||||
- jazz-browser-media-images@0.10.5
|
||||
- jazz-react@0.10.5
|
||||
|
||||
## 0.0.44
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.10.4
|
||||
- jazz-tools@0.10.4
|
||||
- jazz-browser-media-images@0.10.4
|
||||
|
||||
## 0.0.43
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d8582fc]
|
||||
- jazz-tools@0.10.3
|
||||
- jazz-browser-media-images@0.10.3
|
||||
- jazz-react@0.10.3
|
||||
|
||||
## 0.0.42
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.10.2
|
||||
- jazz-tools@0.10.2
|
||||
- jazz-browser-media-images@0.10.2
|
||||
|
||||
## 0.0.41
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5a63cba]
|
||||
- jazz-tools@0.10.1
|
||||
- jazz-browser-media-images@0.10.1
|
||||
- jazz-react@0.10.1
|
||||
|
||||
## 0.0.40
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [498954f]
|
||||
- Updated dependencies [d42c2aa]
|
||||
- Updated dependencies [dd03464]
|
||||
- Updated dependencies [b426342]
|
||||
- jazz-react@0.10.0
|
||||
- jazz-tools@0.10.0
|
||||
- jazz-browser-media-images@0.10.0
|
||||
|
||||
## 0.0.39
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.23
|
||||
- jazz-tools@0.9.23
|
||||
- jazz-browser-media-images@0.9.23
|
||||
|
||||
## 0.0.38
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser-media-images@0.9.22
|
||||
- jazz-react@0.9.22
|
||||
|
||||
## 0.0.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "form",
|
||||
"private": true,
|
||||
"version": "0.0.37",
|
||||
"version": "0.0.46",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -20,7 +20,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "1.9.4",
|
||||
"@playwright/test": "^1.46.1",
|
||||
"@playwright/test": "^1.50.1",
|
||||
"@tailwindcss/forms": "^0.5.9",
|
||||
"@types/react": "^18.3.12",
|
||||
"@types/react-dom": "^18.3.1",
|
||||
@@ -29,8 +29,8 @@
|
||||
"globals": "^15.11.0",
|
||||
"is-ci": "^3.0.1",
|
||||
"postcss": "^8.4.27",
|
||||
"tailwindcss": "^3.4.15",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"typescript": "~5.6.2",
|
||||
"vite": "^5.4.10"
|
||||
"vite": "^6.0.11"
|
||||
}
|
||||
}
|
||||
|
||||
1
examples/form/src/apiKey.ts
Normal file
1
examples/form/src/apiKey.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const apiKey = "form-example@garden.co";
|
||||
@@ -1,30 +1,11 @@
|
||||
import { DemoAuthBasicUI, JazzProvider, useDemoAuth } from "jazz-react";
|
||||
import { JazzProvider } from "jazz-react";
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import App from "./App.tsx";
|
||||
import "./index.css";
|
||||
import { apiKey } from "./apiKey";
|
||||
import { JazzAccount } from "./schema.ts";
|
||||
|
||||
function JazzAndAuth({ children }: { children: React.ReactNode }) {
|
||||
const [auth, authState] = useDemoAuth();
|
||||
|
||||
return (
|
||||
<>
|
||||
<JazzProvider
|
||||
auth={auth}
|
||||
peer="wss://cloud.jazz.tools/?key=form-example@garden.co"
|
||||
AccountSchema={JazzAccount}
|
||||
>
|
||||
{children}
|
||||
</JazzProvider>
|
||||
|
||||
{authState.state !== "signedIn" && (
|
||||
<DemoAuthBasicUI appName="Form" state={authState} />
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
declare module "jazz-react" {
|
||||
interface Register {
|
||||
Account: JazzAccount;
|
||||
@@ -33,8 +14,13 @@ declare module "jazz-react" {
|
||||
|
||||
createRoot(document.getElementById("root")!).render(
|
||||
<StrictMode>
|
||||
<JazzAndAuth>
|
||||
<JazzProvider
|
||||
sync={{
|
||||
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
|
||||
}}
|
||||
AccountSchema={JazzAccount}
|
||||
>
|
||||
<App />
|
||||
</JazzAndAuth>
|
||||
</JazzProvider>
|
||||
</StrictMode>,
|
||||
);
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
import { expect, test } from "@playwright/test";
|
||||
import { LoginPage } from "./pages/LoginPage";
|
||||
|
||||
test("create and edit an order", async ({ page }) => {
|
||||
const loginPage = new LoginPage(page);
|
||||
|
||||
await loginPage.goto();
|
||||
await loginPage.fillUsername("Alice");
|
||||
await loginPage.signup();
|
||||
|
||||
await page.goto("/");
|
||||
// start an order
|
||||
await page.getByRole("link", { name: "Add new order" }).click();
|
||||
await page.getByLabel("Base tea").selectOption("Oolong");
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
import { Locator, Page, expect } from "@playwright/test";
|
||||
|
||||
export class LoginPage {
|
||||
readonly page: Page;
|
||||
readonly usernameInput: Locator;
|
||||
readonly signupButton: Locator;
|
||||
|
||||
constructor(page: Page) {
|
||||
this.page = page;
|
||||
this.usernameInput = page.getByRole("textbox");
|
||||
this.signupButton = page.getByRole("button", {
|
||||
name: "Sign up",
|
||||
});
|
||||
}
|
||||
|
||||
async goto() {
|
||||
this.page.goto("/");
|
||||
}
|
||||
|
||||
async fillUsername(value: string) {
|
||||
await this.usernameInput.clear();
|
||||
await this.usernameInput.fill(value);
|
||||
}
|
||||
|
||||
async loginAs(value: string) {
|
||||
await this.page
|
||||
.getByRole("button", {
|
||||
name: value,
|
||||
})
|
||||
.click();
|
||||
}
|
||||
|
||||
async signup() {
|
||||
await this.signupButton.click();
|
||||
}
|
||||
|
||||
async expectLoaded() {
|
||||
await expect(this.signupButton).toBeVisible();
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,85 @@
|
||||
# image-upload
|
||||
|
||||
## 0.0.48
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1d71ca1]
|
||||
- Updated dependencies [ada802b]
|
||||
- jazz-react@0.10.6
|
||||
- jazz-tools@0.10.6
|
||||
- jazz-browser-media-images@0.10.6
|
||||
|
||||
## 0.0.47
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [59ff77e]
|
||||
- jazz-tools@0.10.5
|
||||
- jazz-browser-media-images@0.10.5
|
||||
- jazz-react@0.10.5
|
||||
|
||||
## 0.0.46
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.10.4
|
||||
- jazz-tools@0.10.4
|
||||
- jazz-browser-media-images@0.10.4
|
||||
|
||||
## 0.0.45
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d8582fc]
|
||||
- jazz-tools@0.10.3
|
||||
- jazz-browser-media-images@0.10.3
|
||||
- jazz-react@0.10.3
|
||||
|
||||
## 0.0.44
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.10.2
|
||||
- jazz-tools@0.10.2
|
||||
- jazz-browser-media-images@0.10.2
|
||||
|
||||
## 0.0.43
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5a63cba]
|
||||
- jazz-tools@0.10.1
|
||||
- jazz-browser-media-images@0.10.1
|
||||
- jazz-react@0.10.1
|
||||
|
||||
## 0.0.42
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [498954f]
|
||||
- Updated dependencies [d42c2aa]
|
||||
- Updated dependencies [dd03464]
|
||||
- Updated dependencies [b426342]
|
||||
- jazz-react@0.10.0
|
||||
- jazz-tools@0.10.0
|
||||
- jazz-browser-media-images@0.10.0
|
||||
|
||||
## 0.0.41
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.23
|
||||
- jazz-tools@0.9.23
|
||||
- jazz-browser-media-images@0.9.23
|
||||
|
||||
## 0.0.40
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser-media-images@0.9.22
|
||||
- jazz-react@0.9.22
|
||||
|
||||
## 0.0.39
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "image-upload",
|
||||
"private": true,
|
||||
"version": "0.0.39",
|
||||
"version": "0.0.48",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -24,6 +24,6 @@
|
||||
"@vitejs/plugin-react": "^4.3.3",
|
||||
"globals": "^15.11.0",
|
||||
"typescript": "~5.6.2",
|
||||
"vite": "^5.4.10"
|
||||
"vite": "^6.0.11"
|
||||
}
|
||||
}
|
||||
|
||||
1
examples/image-upload/src/apiKey.ts
Normal file
1
examples/image-upload/src/apiKey.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const apiKey = "image-upload-example@garden.co";
|
||||
@@ -1,30 +1,11 @@
|
||||
import { DemoAuthBasicUI, JazzProvider, useDemoAuth } from "jazz-react";
|
||||
import { JazzProvider } from "jazz-react";
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import App from "./App.tsx";
|
||||
import "./index.css";
|
||||
import { apiKey } from "./apiKey.ts";
|
||||
import { JazzAccount } from "./schema.ts";
|
||||
|
||||
function JazzAndAuth({ children }: { children: React.ReactNode }) {
|
||||
const [auth, authState] = useDemoAuth();
|
||||
|
||||
return (
|
||||
<>
|
||||
<JazzProvider
|
||||
auth={auth}
|
||||
peer="wss://cloud.jazz.tools/?key=image-upload-example@garden.co"
|
||||
AccountSchema={JazzAccount}
|
||||
>
|
||||
{children}
|
||||
</JazzProvider>
|
||||
|
||||
{authState.state !== "signedIn" && (
|
||||
<DemoAuthBasicUI appName="Image upload" state={authState} />
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
declare module "jazz-react" {
|
||||
interface Register {
|
||||
Account: JazzAccount;
|
||||
@@ -33,8 +14,13 @@ declare module "jazz-react" {
|
||||
|
||||
createRoot(document.getElementById("root")!).render(
|
||||
<StrictMode>
|
||||
<JazzAndAuth>
|
||||
<JazzProvider
|
||||
sync={{
|
||||
peer: `wss://cloud.jazz.tools/?key=${apiKey}`,
|
||||
}}
|
||||
AccountSchema={JazzAccount}
|
||||
>
|
||||
<App />
|
||||
</JazzAndAuth>
|
||||
</JazzProvider>
|
||||
</StrictMode>,
|
||||
);
|
||||
|
||||
@@ -1,5 +1,66 @@
|
||||
# jazz-example-inspector
|
||||
|
||||
## 0.0.107
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1d71ca1]
|
||||
- Updated dependencies [5c76e37]
|
||||
- hash-slash@0.2.2
|
||||
- cojson@0.10.6
|
||||
- cojson-transport-ws@0.10.6
|
||||
|
||||
## 0.0.106
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1af6072]
|
||||
- cojson@0.10.4
|
||||
- cojson-transport-ws@0.10.4
|
||||
|
||||
## 0.0.105
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [cae3a9e]
|
||||
- cojson@0.10.2
|
||||
- cojson-transport-ws@0.10.2
|
||||
|
||||
## 0.0.104
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5a63cba]
|
||||
- cojson@0.10.1
|
||||
- cojson-transport-ws@0.10.1
|
||||
|
||||
## 0.0.103
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b426342]
|
||||
- Updated dependencies [498954f]
|
||||
- Updated dependencies [8217981]
|
||||
- Updated dependencies [ac3d9fa]
|
||||
- Updated dependencies [610543c]
|
||||
- cojson@0.10.0
|
||||
- cojson-transport-ws@0.10.0
|
||||
|
||||
## 0.0.102
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [70c9a5d]
|
||||
- cojson@0.9.23
|
||||
- cojson-transport-ws@0.9.23
|
||||
|
||||
## 0.0.101
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [14b6149]
|
||||
- cojson-transport-ws@0.9.22
|
||||
|
||||
## 0.0.100
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-inspector-app",
|
||||
"private": true,
|
||||
"version": "0.0.100",
|
||||
"version": "0.0.107",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -12,13 +12,13 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@radix-ui/react-checkbox": "^1.0.4",
|
||||
"@radix-ui/react-slot": "^1.0.2",
|
||||
"@radix-ui/react-slot": "^1.1.1",
|
||||
"@radix-ui/react-toast": "^1.1.4",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.0.0",
|
||||
"cojson": "workspace:0.9.19",
|
||||
"cojson-transport-ws": "workspace:0.9.19",
|
||||
"hash-slash": "workspace:0.2.1",
|
||||
"cojson": "workspace:0.10.6",
|
||||
"cojson-transport-ws": "workspace:0.10.6",
|
||||
"hash-slash": "workspace:0.2.2",
|
||||
"lucide-react": "^0.274.0",
|
||||
"qrcode": "^1.5.3",
|
||||
"react": "^18.3.1",
|
||||
@@ -37,8 +37,8 @@
|
||||
"@vitejs/plugin-react-swc": "^3.3.2",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"postcss": "^8.4.27",
|
||||
"tailwindcss": "^3.4.15",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"typescript": "~5.6.2",
|
||||
"vite": "^5.4.10"
|
||||
"vite": "^6.0.11"
|
||||
}
|
||||
}
|
||||
|
||||
1
examples/inspector/src/apiKey.ts
Normal file
1
examples/inspector/src/apiKey.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const apiKey = "";
|
||||
@@ -5,13 +5,9 @@ import {
|
||||
RawCoStream,
|
||||
RawCoValue,
|
||||
} from "cojson";
|
||||
import { base64URLtoBytes } from "cojson/src/base64url.ts";
|
||||
import {
|
||||
BinaryStreamItem,
|
||||
BinaryStreamStart,
|
||||
CoStreamItem,
|
||||
} from "cojson/src/coValues/coStream.ts";
|
||||
import { JsonObject, JsonValue } from "cojson/src/jsonValue.ts";
|
||||
import { base64URLtoBytes } from "cojson";
|
||||
import { BinaryStreamItem, BinaryStreamStart, CoStreamItem } from "cojson";
|
||||
import { JsonObject, JsonValue } from "cojson";
|
||||
import { ArrowDownToLine } from "lucide-react";
|
||||
import { useEffect, useState } from "react";
|
||||
import { PageInfo } from "./types";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import clsx from "clsx";
|
||||
import { CoID, LocalNode, RawCoValue } from "cojson";
|
||||
import { JsonObject } from "cojson/src/jsonValue.ts";
|
||||
import { JsonObject } from "cojson";
|
||||
import { ResolveIcon } from "./type-icon";
|
||||
import { PageInfo, isCoId } from "./types";
|
||||
import { CoMapPreview, ValueRenderer } from "./value-renderer";
|
||||
|
||||
@@ -6,9 +6,9 @@ import {
|
||||
RawAccount,
|
||||
RawAccountID,
|
||||
RawCoValue,
|
||||
WasmCrypto,
|
||||
} from "cojson";
|
||||
import { createWebSocketPeer } from "cojson-transport-ws";
|
||||
import { WasmCrypto } from "cojson/crypto/WasmCrypto";
|
||||
import { Trash2 } from "lucide-react";
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { Breadcrumbs } from "./breadcrumbs";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { CoID, LocalNode, RawCoValue } from "cojson";
|
||||
import { JsonObject } from "cojson/src/jsonValue.ts";
|
||||
import { JsonObject } from "cojson";
|
||||
import { useMemo, useState } from "react";
|
||||
import { LinkIcon } from "../link-icon";
|
||||
import { PageInfo } from "./types";
|
||||
|
||||
@@ -1,5 +1,84 @@
|
||||
# jazz-example-musicplayer
|
||||
|
||||
## 0.0.72
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1d71ca1]
|
||||
- Updated dependencies [ada802b]
|
||||
- jazz-react@0.10.6
|
||||
- jazz-tools@0.10.6
|
||||
- jazz-inspector@0.10.6
|
||||
|
||||
## 0.0.71
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [59ff77e]
|
||||
- jazz-tools@0.10.5
|
||||
- jazz-inspector@0.10.5
|
||||
- jazz-react@0.10.5
|
||||
|
||||
## 0.0.70
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-inspector@0.10.4
|
||||
- jazz-react@0.10.4
|
||||
- jazz-tools@0.10.4
|
||||
|
||||
## 0.0.69
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d8582fc]
|
||||
- jazz-tools@0.10.3
|
||||
- jazz-inspector@0.10.3
|
||||
- jazz-react@0.10.3
|
||||
|
||||
## 0.0.68
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-inspector@0.10.2
|
||||
- jazz-react@0.10.2
|
||||
- jazz-tools@0.10.2
|
||||
|
||||
## 0.0.67
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5a63cba]
|
||||
- jazz-tools@0.10.1
|
||||
- jazz-inspector@0.10.1
|
||||
- jazz-react@0.10.1
|
||||
|
||||
## 0.0.66
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [498954f]
|
||||
- Updated dependencies [d42c2aa]
|
||||
- Updated dependencies [dd03464]
|
||||
- Updated dependencies [b426342]
|
||||
- jazz-inspector@0.10.0
|
||||
- jazz-react@0.10.0
|
||||
- jazz-tools@0.10.0
|
||||
|
||||
## 0.0.65
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-inspector@0.9.23
|
||||
- jazz-react@0.9.23
|
||||
- jazz-tools@0.9.23
|
||||
|
||||
## 0.0.64
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.22
|
||||
|
||||
## 0.0.63
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jazz-example-music-player",
|
||||
"private": true,
|
||||
"version": "0.0.63",
|
||||
"version": "0.0.72",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -13,14 +13,17 @@
|
||||
"test:ui": "playwright test --ui"
|
||||
},
|
||||
"dependencies": {
|
||||
"@radix-ui/react-dialog": "^1.1.4",
|
||||
"@radix-ui/react-dropdown-menu": "^2.1.1",
|
||||
"@radix-ui/react-slot": "^1.0.2",
|
||||
"@radix-ui/react-label": "^2.1.1",
|
||||
"@radix-ui/react-slot": "^1.1.1",
|
||||
"@radix-ui/react-toast": "^1.1.4",
|
||||
"@radix-ui/react-tooltip": "^1.1.6",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.0.0",
|
||||
"jazz-react": "workspace:0.9.21",
|
||||
"jazz-tools": "workspace:0.9.21",
|
||||
"jazz-inspector": "workspace:*",
|
||||
"jazz-react": "workspace:0.10.6",
|
||||
"jazz-tools": "workspace:0.10.6",
|
||||
"lucide-react": "^0.274.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
@@ -30,14 +33,14 @@
|
||||
"tailwindcss-animate": "^1.0.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.46.1",
|
||||
"@playwright/test": "^1.50.1",
|
||||
"@types/react": "^18.3.12",
|
||||
"@types/react-dom": "^18.3.1",
|
||||
"@vitejs/plugin-react-swc": "^3.3.2",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"postcss": "^8.4.27",
|
||||
"tailwindcss": "^3.4.15",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"typescript": "~5.6.2",
|
||||
"vite": "^5.4.10"
|
||||
"vite": "^6.0.11"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ export class MusicTrack extends CoMap {
|
||||
*/
|
||||
file = co.ref(FileStream);
|
||||
waveform = co.ref(MusicTrackWaveform);
|
||||
|
||||
isExampleTrack = co.optional.boolean;
|
||||
}
|
||||
|
||||
export class MusicTrackWaveform extends CoMap {
|
||||
@@ -86,28 +88,20 @@ export class MusicaAccount extends Account {
|
||||
* You can use it to set up the account root and any other initial CoValues you need.
|
||||
*/
|
||||
migrate() {
|
||||
if (!this._refs.root) {
|
||||
const ownership = { owner: this };
|
||||
if (this.root === undefined) {
|
||||
const tracks = ListOfTracks.create([]);
|
||||
const rootPlaylist = Playlist.create({
|
||||
tracks,
|
||||
title: "",
|
||||
});
|
||||
|
||||
const tracks = ListOfTracks.create([], ownership);
|
||||
const rootPlaylist = Playlist.create(
|
||||
{
|
||||
tracks,
|
||||
title: "",
|
||||
},
|
||||
ownership,
|
||||
);
|
||||
|
||||
this.root = MusicaAccountRoot.create(
|
||||
{
|
||||
rootPlaylist,
|
||||
playlists: ListOfPlaylists.create([], ownership),
|
||||
activeTrack: null,
|
||||
activePlaylist: rootPlaylist,
|
||||
exampleDataLoaded: false,
|
||||
},
|
||||
ownership,
|
||||
);
|
||||
this.root = MusicaAccountRoot.create({
|
||||
rootPlaylist,
|
||||
playlists: ListOfPlaylists.create([]),
|
||||
activeTrack: null,
|
||||
activePlaylist: rootPlaylist,
|
||||
exampleDataLoaded: false,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,9 @@ import { PlayerControls } from "./components/PlayerControls";
|
||||
import "./index.css";
|
||||
|
||||
import { MusicaAccount } from "@/1_schema";
|
||||
import { DemoAuthBasicUI, JazzProvider, useDemoAuth } from "jazz-react";
|
||||
import { apiKey } from "@/apiKey.ts";
|
||||
import { JazzProvider } from "jazz-react";
|
||||
import { onAnonymousAccountDiscarded } from "./4_actions";
|
||||
import { useUploadExampleData } from "./lib/useUploadExampleData";
|
||||
|
||||
/**
|
||||
@@ -54,30 +56,10 @@ function Main() {
|
||||
);
|
||||
}
|
||||
|
||||
function JazzAndAuth({ children }: { children: React.ReactNode }) {
|
||||
const [auth, state] = useDemoAuth();
|
||||
|
||||
const peer =
|
||||
(new URL(window.location.href).searchParams.get(
|
||||
"peer",
|
||||
) as `ws://${string}`) ??
|
||||
"wss://cloud.jazz.tools/?key=music-player-example-jazz@garden.co";
|
||||
|
||||
return (
|
||||
<>
|
||||
<JazzProvider
|
||||
storage="indexedDB"
|
||||
auth={auth}
|
||||
peer={peer}
|
||||
AccountSchema={MusicaAccount}
|
||||
>
|
||||
{children}
|
||||
<JazzInspector />
|
||||
</JazzProvider>
|
||||
<DemoAuthBasicUI appName="Jazz Music Player" state={state} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
const peer =
|
||||
(new URL(window.location.href).searchParams.get(
|
||||
"peer",
|
||||
) as `ws://${string}`) ?? `wss://cloud.jazz.tools/?key=${apiKey}`;
|
||||
|
||||
declare module "jazz-react" {
|
||||
interface Register {
|
||||
@@ -87,8 +69,18 @@ declare module "jazz-react" {
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root")!).render(
|
||||
<React.StrictMode>
|
||||
<JazzAndAuth>
|
||||
<JazzProvider
|
||||
sync={{
|
||||
peer,
|
||||
when: "signedUp", // This makes the app work in local mode when the user is anonymous
|
||||
}}
|
||||
storage="indexedDB"
|
||||
AccountSchema={MusicaAccount}
|
||||
defaultProfileName="Anonymous unicorn"
|
||||
onAnonymousAccountDiscarded={onAnonymousAccountDiscarded}
|
||||
>
|
||||
<Main />
|
||||
</JazzAndAuth>
|
||||
<JazzInspector />
|
||||
</JazzProvider>
|
||||
</React.StrictMode>,
|
||||
);
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
import { useToast } from "@/hooks/use-toast";
|
||||
import { createInviteLink, useAccount, useCoState } from "jazz-react";
|
||||
import {
|
||||
createInviteLink,
|
||||
useAccount,
|
||||
useCoState,
|
||||
useIsAuthenticated,
|
||||
} from "jazz-react";
|
||||
import { ID } from "jazz-tools";
|
||||
import { useNavigate, useParams } from "react-router";
|
||||
import { Playlist } from "./1_schema";
|
||||
import { createNewPlaylist, uploadMusicTracks } from "./4_actions";
|
||||
import { MediaPlayer } from "./5_useMediaPlayer";
|
||||
import { AuthButton } from "./components/AuthButton";
|
||||
import { FileUploadButton } from "./components/FileUploadButton";
|
||||
import { LogoutButton } from "./components/LogoutButton";
|
||||
import { MusicTrackRow } from "./components/MusicTrackRow";
|
||||
import { PlaylistTitleInput } from "./components/PlaylistTitleInput";
|
||||
import { SidePanel } from "./components/SidePanel";
|
||||
@@ -66,6 +71,8 @@ export function HomePage({ mediaPlayer }: { mediaPlayer: MediaPlayer }) {
|
||||
});
|
||||
};
|
||||
|
||||
const isAuthenticated = useIsAuthenticated();
|
||||
|
||||
return (
|
||||
<div className="flex flex-col h-screen text-gray-800 bg-blue-50">
|
||||
<div className="flex flex-1 overflow-hidden">
|
||||
@@ -86,12 +93,12 @@ export function HomePage({ mediaPlayer }: { mediaPlayer: MediaPlayer }) {
|
||||
<Button onClick={handleCreatePlaylist}>New playlist</Button>
|
||||
</>
|
||||
)}
|
||||
{!isRootPlaylist && (
|
||||
{!isRootPlaylist && isAuthenticated && (
|
||||
<Button onClick={handlePlaylistShareClick}>
|
||||
Share playlist
|
||||
</Button>
|
||||
)}
|
||||
<LogoutButton />
|
||||
<AuthButton />
|
||||
</div>
|
||||
</div>
|
||||
<ul className="flex flex-col">
|
||||
|
||||
@@ -22,18 +22,18 @@ import {
|
||||
* pattern that best fits your app.
|
||||
*/
|
||||
|
||||
export async function uploadMusicTracks(files: Iterable<File>) {
|
||||
const me = await MusicaAccount.getMe().ensureLoaded({
|
||||
export async function uploadMusicTracks(
|
||||
files: Iterable<File>,
|
||||
isExampleTrack: boolean = false,
|
||||
) {
|
||||
const { root } = await MusicaAccount.getMe().ensureLoaded({
|
||||
root: {
|
||||
rootPlaylist: {
|
||||
tracks: [],
|
||||
},
|
||||
playlists: [],
|
||||
},
|
||||
});
|
||||
|
||||
if (!me) return;
|
||||
|
||||
for (const file of files) {
|
||||
// The ownership object defines the user that owns the created coValues
|
||||
// We are creating a group for each CoValue in order to be able to share them via Playlist
|
||||
@@ -52,25 +52,24 @@ export async function uploadMusicTracks(files: Iterable<File>) {
|
||||
duration: data.duration,
|
||||
waveform: MusicTrackWaveform.create({ data: data.waveform }, group),
|
||||
title: file.name,
|
||||
isExampleTrack,
|
||||
},
|
||||
group,
|
||||
);
|
||||
|
||||
// The newly created musicTrack can be associated to the
|
||||
// user track list using a simple push call
|
||||
me.root.rootPlaylist.tracks.push(musicTrack);
|
||||
root.rootPlaylist.tracks.push(musicTrack);
|
||||
}
|
||||
}
|
||||
|
||||
export async function createNewPlaylist() {
|
||||
const me = await MusicaAccount.getMe().ensureLoaded({
|
||||
const { root } = await MusicaAccount.getMe().ensureLoaded({
|
||||
root: {
|
||||
playlists: [],
|
||||
},
|
||||
});
|
||||
|
||||
if (!me) throw new Error("Current playlist not resolved");
|
||||
|
||||
// Since playlists are meant to be shared we associate them
|
||||
// to a group which will contain the keys required to get
|
||||
// access to the "owned" values
|
||||
@@ -86,7 +85,7 @@ export async function createNewPlaylist() {
|
||||
|
||||
// Again, we associate the new playlist to the
|
||||
// user by pushing it into the playlists CoList
|
||||
me.root.playlists.push(playlist);
|
||||
root.playlists.push(playlist);
|
||||
|
||||
return playlist;
|
||||
}
|
||||
@@ -152,24 +151,49 @@ export async function updateMusicTrackTitle(track: MusicTrack, title: string) {
|
||||
}
|
||||
|
||||
export async function updateActivePlaylist(playlist?: Playlist) {
|
||||
const me = await MusicaAccount.getMe().ensureLoaded({
|
||||
const { root } = await MusicaAccount.getMe().ensureLoaded({
|
||||
root: {
|
||||
activePlaylist: {},
|
||||
rootPlaylist: {},
|
||||
},
|
||||
});
|
||||
|
||||
if (!me) return;
|
||||
|
||||
me.root.activePlaylist = playlist ?? me.root.rootPlaylist;
|
||||
root.activePlaylist = playlist ?? root.rootPlaylist;
|
||||
}
|
||||
|
||||
export async function updateActiveTrack(track: MusicTrack) {
|
||||
const me = await MusicaAccount.getMe().ensureLoaded({
|
||||
const { root } = await MusicaAccount.getMe().ensureLoaded({
|
||||
root: {},
|
||||
});
|
||||
|
||||
if (!me) return;
|
||||
|
||||
me.root.activeTrack = track;
|
||||
root.activeTrack = track;
|
||||
}
|
||||
|
||||
export async function onAnonymousAccountDiscarded(
|
||||
anonymousAccount: MusicaAccount,
|
||||
) {
|
||||
const { root: anonymousAccountRoot } = await anonymousAccount.ensureLoaded({
|
||||
root: {
|
||||
rootPlaylist: {
|
||||
tracks: [{}],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const me = await MusicaAccount.getMe().ensureLoaded({
|
||||
root: {
|
||||
rootPlaylist: {
|
||||
tracks: [],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
for (const track of anonymousAccountRoot.rootPlaylist.tracks) {
|
||||
if (track.isExampleTrack) continue;
|
||||
|
||||
const trackGroup = track._owner.castAs(Group);
|
||||
trackGroup.addMember(me, "admin");
|
||||
|
||||
me.root.rootPlaylist.tracks.push(track);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,6 @@ export function InvitePage() {
|
||||
},
|
||||
});
|
||||
|
||||
if (!me) return;
|
||||
|
||||
if (
|
||||
playlist &&
|
||||
!me.root.playlists.some((item) => playlist.id === item?.id)
|
||||
|
||||
1
examples/music-player/src/apiKey.ts
Normal file
1
examples/music-player/src/apiKey.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const apiKey = "music-player-example-jazz@garden.co";
|
||||
40
examples/music-player/src/components/AuthButton.tsx
Normal file
40
examples/music-player/src/components/AuthButton.tsx
Normal file
@@ -0,0 +1,40 @@
|
||||
"use client";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { useAccount, useIsAuthenticated } from "jazz-react";
|
||||
import { useState } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { AuthModal } from "./AuthModal";
|
||||
|
||||
export function AuthButton() {
|
||||
const [open, setOpen] = useState(false);
|
||||
const { logOut } = useAccount();
|
||||
const navigate = useNavigate();
|
||||
|
||||
const isAuthenticated = useIsAuthenticated();
|
||||
|
||||
function handleSignOut() {
|
||||
logOut();
|
||||
navigate("/");
|
||||
}
|
||||
|
||||
if (isAuthenticated) {
|
||||
return (
|
||||
<Button variant="outline" onClick={handleSignOut}>
|
||||
Sign out
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
onClick={() => setOpen(true)}
|
||||
className="bg-white text-black hover:bg-gray-100"
|
||||
>
|
||||
Sign up
|
||||
</Button>
|
||||
<AuthModal open={open} onOpenChange={setOpen} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
116
examples/music-player/src/components/AuthModal.tsx
Normal file
116
examples/music-player/src/components/AuthModal.tsx
Normal file
@@ -0,0 +1,116 @@
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogDescription,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from "@/components/ui/dialog";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { useAccount, usePasskeyAuth } from "jazz-react";
|
||||
import { useState } from "react";
|
||||
|
||||
interface AuthModalProps {
|
||||
open: boolean;
|
||||
onOpenChange: (open: boolean) => void;
|
||||
}
|
||||
|
||||
export function AuthModal({ open, onOpenChange }: AuthModalProps) {
|
||||
const [username, setUsername] = useState("");
|
||||
const [isSignUp, setIsSignUp] = useState(true);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
||||
const { me } = useAccount({
|
||||
root: {
|
||||
rootPlaylist: {
|
||||
tracks: [{}],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const auth = usePasskeyAuth({
|
||||
appName: "Jazz Music Player",
|
||||
});
|
||||
|
||||
const handleViewChange = () => {
|
||||
setIsSignUp(!isSignUp);
|
||||
setError(null);
|
||||
};
|
||||
|
||||
const handleSubmit = async (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
|
||||
try {
|
||||
if (isSignUp) {
|
||||
await auth.signUp(username);
|
||||
} else {
|
||||
await auth.logIn();
|
||||
}
|
||||
onOpenChange(false);
|
||||
} catch (error) {
|
||||
setError(error instanceof Error ? error.message : "Unknown error");
|
||||
}
|
||||
};
|
||||
|
||||
const shouldShowTransferRootPlaylist =
|
||||
!isSignUp &&
|
||||
me?.root.rootPlaylist.tracks.some((track) => !track.isExampleTrack);
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent className="sm:max-w-[425px]">
|
||||
<DialogHeader>
|
||||
<DialogTitle className="text-2xl font-bold">
|
||||
{isSignUp ? "Create account" : "Welcome back"}
|
||||
</DialogTitle>
|
||||
<DialogDescription>
|
||||
{isSignUp
|
||||
? "Sign up to enable network sync and share your playlists with others"
|
||||
: "Changes done before logging in will be lost"}
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
<form onSubmit={handleSubmit} className="space-y-4">
|
||||
{isSignUp && (
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="username">Username</Label>
|
||||
<Input
|
||||
id="username"
|
||||
value={username}
|
||||
onChange={(e) => setUsername(e.target.value)}
|
||||
placeholder="Enter your username"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{error && <div className="text-sm text-red-500">{error}</div>}
|
||||
{shouldShowTransferRootPlaylist && (
|
||||
<div className="text-sm text-red-500">
|
||||
You have tracks in your root playlist that are not example tracks.
|
||||
If you log in with a passkey, your playlists will be transferred
|
||||
to your logged account.
|
||||
</div>
|
||||
)}
|
||||
<div className="space-y-4">
|
||||
<Button
|
||||
type="submit"
|
||||
className="w-full bg-blue-600 hover:bg-blue-700"
|
||||
>
|
||||
{isSignUp ? "Sign up with passkey" : "Login with passkey"}
|
||||
</Button>
|
||||
<div className="text-center text-sm">
|
||||
{isSignUp ? "Already have an account?" : "Don't have an account?"}{" "}
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleViewChange}
|
||||
className="text-blue-600 hover:underline"
|
||||
>
|
||||
{isSignUp ? "Login" : "Sign up"}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
37
examples/music-player/src/components/LocalOnlyTag.tsx
Normal file
37
examples/music-player/src/components/LocalOnlyTag.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
TooltipProvider,
|
||||
TooltipTrigger,
|
||||
} from "@/components/ui/tooltip";
|
||||
import { useIsAuthenticated } from "jazz-react";
|
||||
import { Info } from "lucide-react";
|
||||
|
||||
export function LocalOnlyTag() {
|
||||
const isAuthenticated = useIsAuthenticated();
|
||||
|
||||
if (isAuthenticated) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<div className="inline-flex items-center gap-1.5 cursor-help">
|
||||
<Badge variant="default" className="h-5 text-xs font-normal">
|
||||
Local only
|
||||
</Badge>
|
||||
<Info className="h-3.5 w-3.5 text-muted-foreground" />
|
||||
</div>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent className="max-w-[250px]">
|
||||
<p>
|
||||
Sign up to enable network sync and share your playlists with others
|
||||
</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
);
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import { useAccount } from "jazz-react";
|
||||
import { useNavigate, useParams } from "react-router";
|
||||
import { LocalOnlyTag } from "./LocalOnlyTag";
|
||||
|
||||
export function SidePanel() {
|
||||
const { playlistId } = useParams();
|
||||
@@ -25,7 +26,7 @@ export function SidePanel() {
|
||||
|
||||
return (
|
||||
<aside className="w-64 p-6 bg-white overflow-y-auto">
|
||||
<div className="flex items-center mb-6">
|
||||
<div className="flex items-center mb-1">
|
||||
<svg
|
||||
className="w-8 h-8 mr-2"
|
||||
viewBox="0 0 24 24"
|
||||
@@ -46,6 +47,9 @@ export function SidePanel() {
|
||||
</svg>
|
||||
<span className="text-xl font-bold text-blue-600">Music Player</span>
|
||||
</div>
|
||||
<div className="mb-6">
|
||||
<LocalOnlyTag />
|
||||
</div>
|
||||
<nav>
|
||||
<h2 className="mb-2 text-sm font-semibold text-gray-600">Playlists</h2>
|
||||
<ul className="space-y-1">
|
||||
|
||||
36
examples/music-player/src/components/ui/badge.tsx
Normal file
36
examples/music-player/src/components/ui/badge.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
import { type VariantProps, cva } from "class-variance-authority";
|
||||
import * as React from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const badgeVariants = cva(
|
||||
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
||||
{
|
||||
variants: {
|
||||
variant: {
|
||||
default:
|
||||
"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
||||
secondary:
|
||||
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
||||
destructive:
|
||||
"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
||||
outline: "text-foreground",
|
||||
},
|
||||
},
|
||||
defaultVariants: {
|
||||
variant: "default",
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
export interface BadgeProps
|
||||
extends React.HTMLAttributes<HTMLDivElement>,
|
||||
VariantProps<typeof badgeVariants> {}
|
||||
|
||||
function Badge({ className, variant, ...props }: BadgeProps) {
|
||||
return (
|
||||
<div className={cn(badgeVariants({ variant }), className)} {...props} />
|
||||
);
|
||||
}
|
||||
|
||||
export { Badge, badgeVariants };
|
||||
120
examples/music-player/src/components/ui/dialog.tsx
Normal file
120
examples/music-player/src/components/ui/dialog.tsx
Normal file
@@ -0,0 +1,120 @@
|
||||
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
||||
import { X } from "lucide-react";
|
||||
import * as React from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const Dialog = DialogPrimitive.Root;
|
||||
|
||||
const DialogTrigger = DialogPrimitive.Trigger;
|
||||
|
||||
const DialogPortal = DialogPrimitive.Portal;
|
||||
|
||||
const DialogClose = DialogPrimitive.Close;
|
||||
|
||||
const DialogOverlay = React.forwardRef<
|
||||
React.ElementRef<typeof DialogPrimitive.Overlay>,
|
||||
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<DialogPrimitive.Overlay
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
));
|
||||
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
||||
|
||||
const DialogContent = React.forwardRef<
|
||||
React.ElementRef<typeof DialogPrimitive.Content>,
|
||||
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
|
||||
>(({ className, children, ...props }, ref) => (
|
||||
<DialogPortal>
|
||||
<DialogOverlay />
|
||||
<DialogPrimitive.Content
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
|
||||
<X className="h-4 w-4" />
|
||||
<span className="sr-only">Close</span>
|
||||
</DialogPrimitive.Close>
|
||||
</DialogPrimitive.Content>
|
||||
</DialogPortal>
|
||||
));
|
||||
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
||||
|
||||
const DialogHeader = ({
|
||||
className,
|
||||
...props
|
||||
}: React.HTMLAttributes<HTMLDivElement>) => (
|
||||
<div
|
||||
className={cn(
|
||||
"flex flex-col space-y-1.5 text-center sm:text-left",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
DialogHeader.displayName = "DialogHeader";
|
||||
|
||||
const DialogFooter = ({
|
||||
className,
|
||||
...props
|
||||
}: React.HTMLAttributes<HTMLDivElement>) => (
|
||||
<div
|
||||
className={cn(
|
||||
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
DialogFooter.displayName = "DialogFooter";
|
||||
|
||||
const DialogTitle = React.forwardRef<
|
||||
React.ElementRef<typeof DialogPrimitive.Title>,
|
||||
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<DialogPrimitive.Title
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"text-lg font-semibold leading-none tracking-tight",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
));
|
||||
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
||||
|
||||
const DialogDescription = React.forwardRef<
|
||||
React.ElementRef<typeof DialogPrimitive.Description>,
|
||||
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<DialogPrimitive.Description
|
||||
ref={ref}
|
||||
className={cn("text-sm text-muted-foreground", className)}
|
||||
{...props}
|
||||
/>
|
||||
));
|
||||
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
||||
|
||||
export {
|
||||
Dialog,
|
||||
DialogPortal,
|
||||
DialogOverlay,
|
||||
DialogClose,
|
||||
DialogTrigger,
|
||||
DialogContent,
|
||||
DialogHeader,
|
||||
DialogFooter,
|
||||
DialogTitle,
|
||||
DialogDescription,
|
||||
};
|
||||
22
examples/music-player/src/components/ui/input.tsx
Normal file
22
examples/music-player/src/components/ui/input.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import * as React from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>(
|
||||
({ className, type, ...props }, ref) => {
|
||||
return (
|
||||
<input
|
||||
type={type}
|
||||
className={cn(
|
||||
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
||||
className,
|
||||
)}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
},
|
||||
);
|
||||
Input.displayName = "Input";
|
||||
|
||||
export { Input };
|
||||
24
examples/music-player/src/components/ui/label.tsx
Normal file
24
examples/music-player/src/components/ui/label.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import * as LabelPrimitive from "@radix-ui/react-label";
|
||||
import { type VariantProps, cva } from "class-variance-authority";
|
||||
import * as React from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const labelVariants = cva(
|
||||
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
||||
);
|
||||
|
||||
const Label = React.forwardRef<
|
||||
React.ElementRef<typeof LabelPrimitive.Root>,
|
||||
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
|
||||
VariantProps<typeof labelVariants>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<LabelPrimitive.Root
|
||||
ref={ref}
|
||||
className={cn(labelVariants(), className)}
|
||||
{...props}
|
||||
/>
|
||||
));
|
||||
Label.displayName = LabelPrimitive.Root.displayName;
|
||||
|
||||
export { Label };
|
||||
30
examples/music-player/src/components/ui/tooltip.tsx
Normal file
30
examples/music-player/src/components/ui/tooltip.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
"use client";
|
||||
|
||||
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
||||
import * as React from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const TooltipProvider = TooltipPrimitive.Provider;
|
||||
|
||||
const Tooltip = TooltipPrimitive.Root;
|
||||
|
||||
const TooltipTrigger = TooltipPrimitive.Trigger;
|
||||
|
||||
const TooltipContent = React.forwardRef<
|
||||
React.ElementRef<typeof TooltipPrimitive.Content>,
|
||||
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
|
||||
>(({ className, sideOffset = 4, ...props }, ref) => (
|
||||
<TooltipPrimitive.Content
|
||||
ref={ref}
|
||||
sideOffset={sideOffset}
|
||||
className={cn(
|
||||
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
));
|
||||
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
||||
|
||||
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
||||
@@ -9,8 +9,6 @@ export async function getNextTrack() {
|
||||
},
|
||||
});
|
||||
|
||||
if (!me) return;
|
||||
|
||||
const tracks = me.root.activePlaylist.tracks;
|
||||
const activeTrack = me.root._refs.activeTrack;
|
||||
|
||||
@@ -30,8 +28,6 @@ export async function getPrevTrack() {
|
||||
},
|
||||
});
|
||||
|
||||
if (!me) return;
|
||||
|
||||
const tracks = me.root.activePlaylist.tracks;
|
||||
const activeTrack = me.root._refs.activeTrack;
|
||||
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
import { MusicaAccount } from "@/1_schema";
|
||||
import { useAccount } from "jazz-react";
|
||||
import { useEffect } from "react";
|
||||
import { uploadMusicTracks } from "../4_actions";
|
||||
|
||||
export function useUploadExampleData() {
|
||||
const { me } = useAccount();
|
||||
|
||||
useEffect(() => {
|
||||
uploadOnboardingData();
|
||||
}, []);
|
||||
}, [me.id]);
|
||||
}
|
||||
|
||||
async function uploadOnboardingData() {
|
||||
@@ -13,8 +16,6 @@ async function uploadOnboardingData() {
|
||||
root: {},
|
||||
});
|
||||
|
||||
if (!me) throw new Error("Me not resolved");
|
||||
|
||||
if (me.root.exampleDataLoaded) return;
|
||||
|
||||
me.root.exampleDataLoaded = true;
|
||||
@@ -22,7 +23,7 @@ async function uploadOnboardingData() {
|
||||
try {
|
||||
const trackFile = await (await fetch("/example.mp3")).blob();
|
||||
|
||||
await uploadMusicTracks([new File([trackFile], "Example song")]);
|
||||
await uploadMusicTracks([new File([trackFile], "Example song")], true);
|
||||
} catch (error) {
|
||||
me.root.exampleDataLoaded = false;
|
||||
throw error;
|
||||
|
||||
@@ -1,44 +1,84 @@
|
||||
import { test } from "@playwright/test";
|
||||
import { BrowserContext, test } from "@playwright/test";
|
||||
import { HomePage } from "./pages/HomePage";
|
||||
import { LoginPage } from "./pages/LoginPage";
|
||||
|
||||
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
|
||||
|
||||
test("create a new playlist and share", async ({ page }) => {
|
||||
const loginPage = new LoginPage(page);
|
||||
async function mockAuthenticator(context: BrowserContext) {
|
||||
await context.addInitScript(() => {
|
||||
Object.defineProperty(window.navigator, "credentials", {
|
||||
value: {
|
||||
...window.navigator.credentials,
|
||||
create: async () => ({
|
||||
type: "public-key",
|
||||
id: new Uint8Array([1, 2, 3, 4]),
|
||||
rawId: new Uint8Array([1, 2, 3, 4]),
|
||||
response: {
|
||||
clientDataJSON: new Uint8Array([1]),
|
||||
attestationObject: new Uint8Array([2]),
|
||||
},
|
||||
}),
|
||||
get: async () => ({
|
||||
type: "public-key",
|
||||
id: new Uint8Array([1, 2, 3, 4]),
|
||||
rawId: new Uint8Array([1, 2, 3, 4]),
|
||||
response: {
|
||||
authenticatorData: new Uint8Array([1]),
|
||||
clientDataJSON: new Uint8Array([2]),
|
||||
signature: new Uint8Array([3]),
|
||||
},
|
||||
}),
|
||||
},
|
||||
configurable: true,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
await loginPage.goto();
|
||||
await loginPage.fillUsername("S. Mario");
|
||||
await loginPage.signup();
|
||||
// Configure the authenticator
|
||||
test.beforeEach(async ({ context }) => {
|
||||
// Enable virtual authenticator environment
|
||||
await mockAuthenticator(context);
|
||||
});
|
||||
|
||||
const homePage = new HomePage(page);
|
||||
test("create a new playlist and share", async ({
|
||||
page: marioPage,
|
||||
browser,
|
||||
}) => {
|
||||
await marioPage.goto("/");
|
||||
|
||||
const marioHome = new HomePage(marioPage);
|
||||
|
||||
// The example song should be loaded
|
||||
await homePage.expectMusicTrack("Example song");
|
||||
await homePage.editTrackTitle("Example song", "Super Mario World");
|
||||
await marioHome.expectMusicTrack("Example song");
|
||||
await marioHome.editTrackTitle("Example song", "Super Mario World");
|
||||
|
||||
await homePage.createPlaylist();
|
||||
await homePage.editPlaylistTitle("Save the princess");
|
||||
await marioHome.createPlaylist();
|
||||
await marioHome.editPlaylistTitle("Save the princess");
|
||||
|
||||
await homePage.navigateToPlaylist("All tracks");
|
||||
await homePage.addTrackToPlaylist("Super Mario World", "Save the princess");
|
||||
await marioHome.navigateToPlaylist("All tracks");
|
||||
await marioHome.addTrackToPlaylist("Super Mario World", "Save the princess");
|
||||
|
||||
await homePage.navigateToPlaylist("Save the princess");
|
||||
await homePage.expectMusicTrack("Super Mario World");
|
||||
await marioHome.navigateToPlaylist("Save the princess");
|
||||
await marioHome.expectMusicTrack("Super Mario World");
|
||||
|
||||
const url = await homePage.getShareLink();
|
||||
await marioHome.signUp("Mario");
|
||||
|
||||
const url = await marioHome.getShareLink();
|
||||
|
||||
await sleep(4000); // Wait for the sync to complete
|
||||
|
||||
await homePage.logout();
|
||||
const luigiContext = await browser.newContext();
|
||||
await mockAuthenticator(luigiContext);
|
||||
|
||||
await loginPage.goto();
|
||||
await loginPage.fillUsername("Luigi");
|
||||
await loginPage.signup();
|
||||
const luigiPage = await luigiContext.newPage();
|
||||
await luigiPage.goto("/");
|
||||
|
||||
await page.goto(url);
|
||||
const luigiHome = new HomePage(luigiPage);
|
||||
|
||||
await homePage.expectMusicTrack("Super Mario World");
|
||||
await homePage.playMusicTrack("Super Mario World");
|
||||
await homePage.expectActiveTrackPlaying();
|
||||
await luigiHome.signUp("Luigi");
|
||||
|
||||
await luigiPage.goto(url);
|
||||
|
||||
await luigiHome.expectMusicTrack("Super Mario World");
|
||||
await luigiHome.playMusicTrack("Super Mario World");
|
||||
await luigiHome.expectActiveTrackPlaying();
|
||||
});
|
||||
|
||||
@@ -95,6 +95,17 @@ export class HomePage {
|
||||
.click();
|
||||
}
|
||||
|
||||
async signUp(name: string) {
|
||||
await this.page.getByRole("button", { name: "Sign up" }).click();
|
||||
await this.page.getByRole("textbox", { name: "Username" }).fill(name);
|
||||
await this.page
|
||||
.getByRole("button", { name: "Sign up with passkey" })
|
||||
.click();
|
||||
await expect(
|
||||
this.page.getByRole("button", { name: "Sign out" }),
|
||||
).toBeVisible();
|
||||
}
|
||||
|
||||
async logout() {
|
||||
await this.logoutButton.click();
|
||||
}
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
import { Locator, Page, expect } from "@playwright/test";
|
||||
|
||||
export class LoginPage {
|
||||
readonly page: Page;
|
||||
readonly usernameInput: Locator;
|
||||
readonly signupButton: Locator;
|
||||
|
||||
constructor(page: Page) {
|
||||
this.page = page;
|
||||
this.usernameInput = page.getByRole("textbox");
|
||||
this.signupButton = page.getByRole("button", {
|
||||
name: "Sign up",
|
||||
});
|
||||
}
|
||||
|
||||
async goto() {
|
||||
this.page.goto("/");
|
||||
}
|
||||
|
||||
async fillUsername(value: string) {
|
||||
await this.usernameInput.clear();
|
||||
await this.usernameInput.fill(value);
|
||||
}
|
||||
|
||||
async loginAs(value: string) {
|
||||
await this.page
|
||||
.getByRole("button", {
|
||||
name: value,
|
||||
})
|
||||
.click();
|
||||
}
|
||||
|
||||
async signup() {
|
||||
await this.signupButton.click();
|
||||
}
|
||||
|
||||
async expectLoaded() {
|
||||
await expect(this.signupButton).toBeVisible();
|
||||
}
|
||||
}
|
||||
@@ -1,359 +0,0 @@
|
||||
# jazz-example-onboarding
|
||||
|
||||
## 0.0.43
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1be017d]
|
||||
- jazz-tools@0.9.21
|
||||
- jazz-browser-media-images@0.9.21
|
||||
- jazz-react@0.9.21
|
||||
|
||||
## 0.0.42
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b01cc1f]
|
||||
- jazz-tools@0.9.20
|
||||
- jazz-browser-media-images@0.9.20
|
||||
- jazz-react@0.9.20
|
||||
|
||||
## 0.0.41
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.19
|
||||
- jazz-tools@0.9.19
|
||||
- jazz-browser-media-images@0.9.19
|
||||
|
||||
## 0.0.40
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.18
|
||||
- jazz-tools@0.9.18
|
||||
- jazz-browser-media-images@0.9.18
|
||||
|
||||
## 0.0.39
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c2ca1fe]
|
||||
- Updated dependencies [1227047]
|
||||
- jazz-tools@0.9.17
|
||||
- jazz-browser-media-images@0.9.17
|
||||
- jazz-react@0.9.17
|
||||
|
||||
## 0.0.38
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [24b3b6a]
|
||||
- jazz-tools@0.9.16
|
||||
- jazz-browser-media-images@0.9.16
|
||||
- jazz-react@0.9.16
|
||||
|
||||
## 0.0.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7491711]
|
||||
- jazz-tools@0.9.15
|
||||
- jazz-browser-media-images@0.9.15
|
||||
- jazz-react@0.9.15
|
||||
|
||||
## 0.0.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3df93cc]
|
||||
- jazz-tools@0.9.14
|
||||
- jazz-browser-media-images@0.9.14
|
||||
- jazz-react@0.9.14
|
||||
|
||||
## 0.0.35
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.13
|
||||
- jazz-tools@0.9.13
|
||||
- jazz-browser-media-images@0.9.13
|
||||
|
||||
## 0.0.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.12
|
||||
- jazz-tools@0.9.12
|
||||
- jazz-browser-media-images@0.9.12
|
||||
|
||||
## 0.0.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.11
|
||||
- jazz-tools@0.9.11
|
||||
- jazz-browser-media-images@0.9.11
|
||||
|
||||
## 0.0.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [5e83864]
|
||||
- jazz-react@0.9.10
|
||||
- jazz-tools@0.9.10
|
||||
- jazz-browser-media-images@0.9.10
|
||||
|
||||
## 0.0.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [8eb9247]
|
||||
- jazz-tools@0.9.9
|
||||
- jazz-browser-media-images@0.9.9
|
||||
- jazz-react@0.9.9
|
||||
|
||||
## 0.0.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d1d773b]
|
||||
- jazz-tools@0.9.8
|
||||
- jazz-react@0.9.8
|
||||
- jazz-browser-media-images@0.9.8
|
||||
|
||||
## 0.0.29
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.9.4
|
||||
|
||||
## 0.0.28
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1b71969]
|
||||
- jazz-react@0.9.1
|
||||
- jazz-tools@0.9.1
|
||||
- jazz-browser-media-images@0.9.1
|
||||
|
||||
## 0.0.27
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [956a4d1]
|
||||
- Updated dependencies [8eda792]
|
||||
- jazz-react@0.9.0
|
||||
- jazz-tools@0.9.0
|
||||
- jazz-browser-media-images@0.9.0
|
||||
|
||||
## 0.0.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [dc62b95]
|
||||
- Updated dependencies [1de26f8]
|
||||
- jazz-tools@0.8.51
|
||||
- jazz-browser-media-images@0.8.51
|
||||
- jazz-react@0.8.51
|
||||
|
||||
## 0.0.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.50
|
||||
- jazz-tools@0.8.50
|
||||
- jazz-browser-media-images@0.8.50
|
||||
|
||||
## 0.0.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.49
|
||||
- jazz-tools@0.8.49
|
||||
- jazz-browser-media-images@0.8.49
|
||||
|
||||
## 0.0.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [635e824]
|
||||
- Updated dependencies [0a85982]
|
||||
- jazz-tools@0.8.48
|
||||
- jazz-browser-media-images@0.8.48
|
||||
- jazz-react@0.8.48
|
||||
|
||||
## 0.0.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [fa41f8e]
|
||||
- Updated dependencies [88d7d9a]
|
||||
- Updated dependencies [60e35ea]
|
||||
- jazz-tools@0.8.45
|
||||
- jazz-react@0.8.45
|
||||
- jazz-browser-media-images@0.8.45
|
||||
|
||||
## 0.0.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.44
|
||||
- jazz-tools@0.8.44
|
||||
- jazz-browser-media-images@0.8.44
|
||||
|
||||
## 0.0.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.41
|
||||
- jazz-tools@0.8.41
|
||||
- jazz-browser-media-images@0.8.41
|
||||
|
||||
## 0.0.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser-media-images@0.8.40
|
||||
- jazz-react@0.8.40
|
||||
|
||||
## 0.0.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [249eecb]
|
||||
- jazz-tools@0.8.39
|
||||
- jazz-browser-media-images@0.8.39
|
||||
- jazz-react@0.8.39
|
||||
|
||||
## 0.0.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.38
|
||||
- jazz-tools@0.8.38
|
||||
- jazz-browser-media-images@0.8.38
|
||||
|
||||
## 0.0.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.37
|
||||
- jazz-tools@0.8.37
|
||||
- jazz-browser-media-images@0.8.37
|
||||
|
||||
## 0.0.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [441fe27]
|
||||
- jazz-tools@0.8.36
|
||||
- jazz-react@0.8.36
|
||||
- jazz-browser-media-images@0.8.36
|
||||
|
||||
## 0.0.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [9212ab8]
|
||||
- Updated dependencies [8b87117]
|
||||
- jazz-react@0.8.35
|
||||
- jazz-tools@0.8.35
|
||||
- jazz-browser-media-images@0.8.35
|
||||
|
||||
## 0.0.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.34
|
||||
- jazz-tools@0.8.34
|
||||
- jazz-browser-media-images@0.8.34
|
||||
|
||||
## 0.0.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser-media-images@0.8.33
|
||||
- jazz-react@0.8.33
|
||||
|
||||
## 0.0.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [df42b2b]
|
||||
- jazz-tools@0.8.32
|
||||
- jazz-react@0.8.32
|
||||
- jazz-browser-media-images@0.8.32
|
||||
|
||||
## 0.0.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.31
|
||||
- jazz-tools@0.8.31
|
||||
- jazz-browser-media-images@0.8.31
|
||||
|
||||
## 0.0.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.30
|
||||
- jazz-tools@0.8.30
|
||||
- jazz-browser-media-images@0.8.30
|
||||
|
||||
## 0.0.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.29
|
||||
- jazz-tools@0.8.29
|
||||
- jazz-browser-media-images@0.8.29
|
||||
|
||||
## 0.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.28
|
||||
- jazz-tools@0.8.28
|
||||
- jazz-browser-media-images@0.8.28
|
||||
|
||||
## 0.0.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-react@0.8.27
|
||||
- jazz-tools@0.8.27
|
||||
- jazz-browser-media-images@0.8.27
|
||||
|
||||
## 0.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [59d37df]
|
||||
- jazz-react@0.8.26
|
||||
|
||||
## 0.0.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- jazz-browser-media-images@0.8.24
|
||||
- jazz-react@0.8.24
|
||||
|
||||
## 0.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [d348c2d]
|
||||
- Updated dependencies [6902b5b]
|
||||
- Updated dependencies [1a0cd3d]
|
||||
- jazz-tools@0.8.23
|
||||
- jazz-react@0.8.23
|
||||
- jazz-browser-media-images@0.8.23
|
||||
|
||||
## 0.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [59cc64d]
|
||||
- jazz-react@0.8.22
|
||||
- jazz-browser-media-images@0.8.22
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user