Compare commits

...

106 Commits

Author SHA1 Message Date
Anselm Eickhoff
676f2195ab Merge pull request #898 from garden-co/chore/example-projects-ci
Rename chat-clerk to clerk in yaml file
2024-11-28 15:15:52 +00:00
Trisha Lim
45ba926cff Rename chat-clerk to clerk in yaml file 2024-11-28 14:40:21 +00:00
Anselm Eickhoff
a909f2212f Merge pull request #895 from garden-co/changeset-release/main
Version Packages
2024-11-28 12:51:04 +00:00
github-actions[bot]
d55f944238 Version Packages 2024-11-28 12:45:00 +00:00
Anselm Eickhoff
7b557f188b Merge pull request #894 from garden-co/fix/known-message-errors
fix: removed a no more valid error on the known state message sync
2024-11-28 12:43:23 +00:00
Trisha Lim
9ca25d1cdf Add changeset 2024-11-28 10:09:56 +00:00
Trisha Lim
4339e485e2 Update lock file 2024-11-28 10:09:56 +00:00
Trisha Lim
e6dcec2317 Change thumbnail for password manager example 2024-11-28 10:09:56 +00:00
Trisha Lim
057286a8df Add passkey example to examples page 2024-11-28 10:09:56 +00:00
Trisha Lim
b0fa35e11e Replace chat-clerk example with minimal clerk example 2024-11-28 10:09:56 +00:00
Anselm Eickhoff
ae6f3a39c7 Merge pull request #888 from garden-co/changeset-release/main 2024-11-28 07:00:44 +00:00
Guido D'Orsi
e4f110fa9f fix: Removed a no more valid error on the known state message sync 2024-11-28 01:23:24 +01:00
github-actions[bot]
5d72d0a5a0 Version Packages 2024-11-27 14:25:17 +00:00
Anselm Eickhoff
bb874490c5 Write initial "Defining Schemas" docs (#826)
* Document most of CoValue schemas

* Fix typo and broken links

---------

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

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

Bitwarden (and possibly other password managers) won't find passkeys created on other devices unless they are discoverable.
2024-11-27 06:32:26 +10:00
Anselm Eickhoff
3937781246 Merge pull request #885 from garden-co/benjamin-jazz-536
Fix comment regarding localStorage
2024-11-26 19:42:54 +00:00
Benjamin S. Leveritt
44bcf6e411 Fix comment regarding localStorage 2024-11-26 19:25:31 +00:00
Trisha Lim
b66206f1a6 Change footer links for jazz 2024-11-26 13:56:13 +00:00
Trisha Lim
973824795e Redesign footer 2024-11-26 13:53:42 +00:00
Trisha Lim
f4974e5975 Fix inconsistent social icons size 2024-11-26 13:29:43 +00:00
Trisha Lim
9099bbf75f Fix grid layout on mobile 2024-11-26 11:41:52 +00:00
Anselm Eickhoff
e1a40b41eb Merge pull request #879 from sventies/patch-1
Check for clerk.user before rendering the app
2024-11-26 11:29:36 +00:00
sventies
9683e24237 Check for clerk.user
Check if we're actually authed before navigating to the app. (as per the code in the docs as well: https://jazz.tools/docs/authentication/auth-methods#clerk)
2024-11-26 12:12:58 +01:00
Anselm Eickhoff
0ff381b8d5 Merge pull request #872 from garden-co/changeset-release/main 2024-11-25 21:46:23 +00:00
github-actions[bot]
ef7931761a Version Packages 2024-11-25 21:08:25 +00:00
Anselm Eickhoff
da30641856 Merge pull request #829 from garden-co/benjamin-jazz-514 2024-11-25 21:05:46 +00:00
Anselm Eickhoff
01435dc20b Merge pull request #843 from garden-co/benjamin-jazz-494 2024-11-25 21:05:04 +00:00
Anselm Eickhoff
506256e291 Merge pull request #868 from garden-co/jazz-run/json 2024-11-25 21:03:50 +00:00
Anselm Eickhoff
6bb0d38b26 Merge pull request #860 from garden-co/trishalim-jazz-509 2024-11-25 21:03:30 +00:00
Anselm Eickhoff
397ff9ce09 Merge pull request #874 from garden-co/aeplay-jazz-532 2024-11-25 21:02:38 +00:00
Anselm
df42b2b295 Add changesets 2024-11-25 14:43:37 +00:00
Anselm
aae280b7da Implement and test getting all CoMap edits 2024-11-25 14:41:40 +00:00
Anselm Eickhoff
d1e4ee0fe4 Merge pull request #840 from garden-co/benjamin-jazz-524
Fix `jazz-*-auth-clerk` readmes
2024-11-25 13:35:35 +00:00
Benjamin S. Leveritt
7cfd47b7f3 Add minimal example links 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
c34ce695ea Improves navigation links 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
7666dc6da2 Add documentation for authentication hooks 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
be3ac8aa63 Fix formatting 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
b759668022 Improve browser auth typedocs 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
1ada04f6f4 Add Passphrase section to Auth Methods 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
f3455bc691 Add stub typedocs to browser auth 2024-11-25 12:37:47 +00:00
Benjamin S. Leveritt
044f61e3d7 Add authentication method page stub 2024-11-25 12:37:47 +00:00
Trisha Lim
6d63f4cf2e Reuse FeatureCard on Coming Soon section 2024-11-25 12:34:23 +00:00
Trisha Lim
b828f41cf0 Renamed LabelledFeatureIcon to FeatureCard 2024-11-25 12:34:23 +00:00
Trisha Lim
14d24888e1 Make coming soon section 4-col 2024-11-25 12:34:23 +00:00
Trisha Lim
29bdb0a120 Add cols prop to GappedGrid component 2024-11-25 12:34:23 +00:00
Trisha Lim
c7ec6baba8 Create card component 2024-11-25 12:34:23 +00:00
Anselm Eickhoff
f8cf198a27 Merge pull request #709 from garden-co/benjamin-jazz-438 2024-11-25 12:32:59 +00:00
Benjamin S. Leveritt
720435e2f2 Add examples to access coFeed 2024-11-25 12:29:57 +00:00
Benjamin S. Leveritt
2dcf6925b4 Add explanation and example for coFeed.push 2024-11-25 12:29:57 +00:00
Benjamin S. Leveritt
55d49a3435 Update CoFeed ensureLoaded
To clarify depth and undefined states
2024-11-25 12:29:57 +00:00
Benjamin S. Leveritt
33d1c11909 Update packages/jazz-tools/src/coValues/coStream.ts
Co-authored-by: Anselm Eickhoff <anselm.eickhoff@gmail.com>
2024-11-25 12:29:57 +00:00
Benjamin S. Leveritt
02ee69672d Update packages/jazz-tools/src/coValues/interfaces.ts
Co-authored-by: Anselm Eickhoff <anselm.eickhoff@gmail.com>
2024-11-25 12:29:57 +00:00
Benjamin S. Leveritt
743f7d068b Tweak CoList docs 2024-11-25 11:51:01 +00:00
Benjamin S. Leveritt
c0a1bb272e Add docs for type ID 2024-11-25 11:49:49 +00:00
Benjamin S. Leveritt
a9f08ebbbe Add a few more notes for coMaps 2024-11-25 11:49:49 +00:00
Benjamin S. Leveritt
0d86b132ea Add more docs to BinaryCoStream docs 2024-11-25 11:49:46 +00:00
Benjamin S. Leveritt
5114bbec88 Add FileStream docs 2024-11-25 11:46:38 +00:00
Benjamin S. Leveritt
29deedb163 Add coStream docs 2024-11-25 11:39:05 +00:00
Benjamin S. Leveritt
a322a0e3b5 Add more coStream docs 2024-11-25 11:35:19 +00:00
Benjamin S. Leveritt
4fea86141f Fix description 2024-11-25 11:34:47 +00:00
Benjamin S. Leveritt
d923d45a82 Add some initial coStream docs 2024-11-25 11:34:11 +00:00
Trisha Lim
ff52fb3275 Add loading state to button 2024-11-25 10:42:16 +00:00
Anselm
c65a8806f6 Test current CoMap _edits behavior 2024-11-25 10:16:00 +00:00
Trisha Lim
8c8a5b242a Add Gio to team page 2024-11-25 10:03:25 +00:00
Benjamin S. Leveritt
d020ee2825 Merge pull request #856 from garden-co/trishalim-jazz-522
API Reference: typography and spacing adjustments
2024-11-23 07:26:36 +00:00
Guido D'Orsi
2e2a13f22d feat(account): add --json option to output the account info as json 2024-11-22 22:49:05 +01:00
Trisha Lim
b1056c2ed3 Add env var names to turbo.json 2024-11-22 19:31:37 +00:00
Guido D'Orsi
e00489d8ee Merge pull request #865 from garden-co/fix/less-reads-on-known-state
chore(SyncStateSubscriptionManager): improve the internal API
2024-11-22 18:21:39 +01:00
Anselm Eickhoff
1e08581049 Merge pull request #864 from garden-co/changeset-release/main
Version Packages
2024-11-22 17:20:42 +00:00
Guido D'Orsi
5a5f886bdf chore: formatting 2024-11-22 18:20:41 +01:00
Guido D'Orsi
e5c575ec10 chore(SyncStateSubscriptionManager): improve the internal API 2024-11-22 18:18:44 +01:00
github-actions[bot]
68c2b2598e Version Packages 2024-11-22 17:17:04 +00:00
Anselm Eickhoff
c0ba15cca8 Merge pull request #863 from garden-co/fix/less-reads-on-known-state
perf(SyncStateSubscriptionManager): make the isUploaded computation lazy
2024-11-22 17:15:49 +00:00
Trisha Lim
3e0493f88f Create social links component 2024-11-22 17:07:17 +00:00
Guido D'Orsi
e511d6d56a chore: changeset 2024-11-22 18:03:10 +01:00
Guido D'Orsi
53f4b23c0a perf(SyncStateSubscriptionManager): make the isUploaded computation lazy 2024-11-22 18:02:07 +01:00
Anselm Eickhoff
749a424cf1 Merge pull request #862 from garden-co/changeset-release/main
Version Packages
2024-11-22 16:54:32 +00:00
github-actions[bot]
33c4ef902d Version Packages 2024-11-22 16:52:40 +00:00
Anselm Eickhoff
e2e3751172 Merge pull request #858 from garden-co/fix/improve-peers-close
fix: reduce noise on Peer close and increase load timeout
2024-11-22 16:50:30 +00:00
Anselm Eickhoff
6c62f4be5d Merge pull request #861 from garden-co/optimize-known-state
Optimize known state
2024-11-22 16:50:16 +00:00
Anselm
0a2fae3830 Add changeset 2024-11-22 16:44:16 +00:00
Anselm
4ab533af6b More optimised way to get knownState 2024-11-22 16:44:03 +00:00
Trisha Lim
0fa017d148 Add newsletter subscription form to jazz footer 2024-11-22 16:42:31 +00:00
Guido D'Orsi
99cda2f33d fix: reduce noise on Peer close and increase load timeout 2024-11-22 17:23:31 +01:00
Trisha Lim
7c4f519ca1 Move NewsletterForm component to design system 2024-11-22 16:18:42 +00:00
Anselm Eickhoff
e4fcafd576 Merge pull request #857 from garden-co/changeset-release/main
Version Packages
2024-11-22 15:46:42 +00:00
github-actions[bot]
a9cff03bcb Version Packages 2024-11-22 15:35:56 +00:00
Anselm Eickhoff
26324d4b1e Merge pull request #853 from garden-co/fix/improve-peers-close
fix: clean the queues on peers close
2024-11-22 15:32:43 +00:00
Anselm Eickhoff
bd022ffd5e Merge pull request #854 from garden-co/fix/offline-support-and-faster-load
fix: restore offline support and faster load when storage is active
2024-11-22 15:32:31 +00:00
Trisha Lim
94e3922efc Adjust scroll margin in API Reference pages; fixes #830 2024-11-22 15:00:50 +00:00
Guido D'Orsi
dcc9c2e376 chore: changeset 2024-11-22 15:53:14 +01:00
Guido D'Orsi
48edcaff37 fix: clean the queues on peers close 2024-11-22 15:49:42 +01:00
Trisha Lim
a18ed077ca API Ref: make headings more prominent 2024-11-22 14:48:16 +00:00
Guido D'Orsi
7780346208 fix(jazz-browser): fix unitialized variable when loading offline 2024-11-22 15:36:02 +01:00
Guido D'Orsi
699553fe9f chore: changeset 2024-11-22 10:11:30 +01:00
Guido D'Orsi
bdd5ad7eb1 fix: restore offline support and faster load when storage is active 2024-11-22 10:09:56 +01:00
Benjamin S. Leveritt
28fea37446 Fix comment block for rendering with TypeDoc 2024-11-21 20:23:24 +00:00
Benjamin S. Leveritt
61915fe3ed Split doc-generation scripts into separate commands
Easier to run individually
2024-11-21 20:23:24 +00:00
Guido D'Orsi
a6942030d4 Merge pull request #848 from garden-co/benjamin-jazz-528
Chore: Bump turbo to v2
2024-11-21 18:21:05 +01:00
Benjamin S. Leveritt
905c6b312b Chore: Bump turbo to v2 2024-11-21 17:00:10 +00:00
Benjamin S. Leveritt
1a4bda09ca Chore: Add changesets to bump Npm 2024-11-21 08:24:18 +00:00
Benjamin S. Leveritt
815f54fafb Fix readmes 2024-11-21 08:20:49 +00:00
187 changed files with 3470 additions and 2860 deletions

View File

@@ -11,7 +11,8 @@ jobs:
matrix:
example: [
"chat",
"chat-clerk",
"clerk",
"passkey",
"inspector",
"music-player",
"password-manager",

View File

@@ -1,5 +1,59 @@
# @jazz-e2e/binarycostream
## 0.0.111
### Patch Changes
- Updated dependencies [e4f110f]
- cojson@0.8.34
- jazz-react@0.8.34
- jazz-tools@0.8.34
## 0.0.110
### Patch Changes
- jazz-react@0.8.33
## 0.0.109
### Patch Changes
- Updated dependencies [df42b2b]
- Updated dependencies [df42b2b]
- cojson@0.8.32
- jazz-tools@0.8.32
- jazz-react@0.8.32
## 0.0.108
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
- jazz-react@0.8.31
- jazz-tools@0.8.31
## 0.0.107
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
- jazz-react@0.8.30
- jazz-tools@0.8.30
## 0.0.106
### Patch Changes
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson@0.8.29
- jazz-react@0.8.29
- jazz-tools@0.8.29
## 0.0.105
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@jazz-e2e/filestream",
"private": true,
"version": "0.0.105",
"version": "0.0.111",
"type": "module",
"scripts": {
"dev": "vite",
@@ -13,11 +13,11 @@
"test:ui": "playwright test --ui"
},
"dependencies": {
"cojson": "workspace:0.8.28",
"cojson": "workspace:0.8.34",
"hash-slash": "workspace:0.2.1",
"is-ci": "^3.0.1",
"jazz-react": "workspace:0.8.28",
"jazz-tools": "workspace:0.8.28",
"jazz-react": "workspace:0.8.34",
"jazz-tools": "workspace:0.8.34",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},

View File

@@ -1,5 +1,59 @@
# @jazz-e2e/covalues
## 0.0.110
### Patch Changes
- Updated dependencies [e4f110f]
- cojson@0.8.34
- jazz-react@0.8.34
- jazz-tools@0.8.34
## 0.0.109
### Patch Changes
- jazz-react@0.8.33
## 0.0.108
### Patch Changes
- Updated dependencies [df42b2b]
- Updated dependencies [df42b2b]
- cojson@0.8.32
- jazz-tools@0.8.32
- jazz-react@0.8.32
## 0.0.107
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
- jazz-react@0.8.31
- jazz-tools@0.8.31
## 0.0.106
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
- jazz-react@0.8.30
- jazz-tools@0.8.30
## 0.0.105
### Patch Changes
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson@0.8.29
- jazz-react@0.8.29
- jazz-tools@0.8.29
## 0.0.104
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@jazz-e2e/covalues",
"private": true,
"version": "0.0.104",
"version": "0.0.110",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,53 @@
# jazz-example-book-shelf
## 0.1.26
### Patch Changes
- jazz-react@0.8.34
- jazz-tools@0.8.34
- jazz-browser-media-images@0.8.34
## 0.1.25
### Patch Changes
- jazz-browser-media-images@0.8.33
- jazz-react@0.8.33
## 0.1.24
### Patch Changes
- Updated dependencies [df42b2b]
- jazz-tools@0.8.32
- jazz-react@0.8.32
- jazz-browser-media-images@0.8.32
## 0.1.23
### Patch Changes
- jazz-react@0.8.31
- jazz-tools@0.8.31
- jazz-browser-media-images@0.8.31
## 0.1.22
### Patch Changes
- jazz-react@0.8.30
- jazz-tools@0.8.30
- jazz-browser-media-images@0.8.30
## 0.1.21
### Patch Changes
- jazz-react@0.8.29
- jazz-tools@0.8.29
- jazz-browser-media-images@0.8.29
## 0.1.20
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-example-book-shelf",
"version": "0.1.20",
"version": "0.1.26",
"private": true,
"scripts": {
"dev": "next dev",
@@ -11,9 +11,9 @@
},
"dependencies": {
"clsx": "^2.0.0",
"jazz-browser-media-images": "workspace:0.8.28",
"jazz-react": "workspace:0.8.28",
"jazz-tools": "workspace:0.8.28",
"jazz-browser-media-images": "workspace:0.8.34",
"jazz-react": "workspace:0.8.34",
"jazz-tools": "workspace:0.8.34",
"next": "14.2.5",
"react": "^18.2.0",
"react-dom": "^18.2.0"

View File

@@ -1,26 +0,0 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
sync-db/

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +0,0 @@
FROM caddy:2.7.3-alpine
LABEL org.opencontainers.image.source="https://github.com/gardencmp/jazz"
COPY ./dist /usr/share/caddy/

View File

@@ -1,42 +0,0 @@
# Jazz Chat Example (with Clerk auth)
Live version: [https://chat-clerk-demo.jazz.tools](https://chat-clerk-demo.jazz.tools)
## Installing & running the example locally
(this requires `pnpm` to be installed, see [https://pnpm.io/installation](https://pnpm.io/installation))
Start by checking out `jazz`
```bash
git clone https://github.com/gardencmp/jazz.git
cd jazz/examples/chat-clerk
pnpm pack --pack-destination /tmp
mkdir -p ~/jazz-examples/chat-clerk # or any other directory
tar -xf /tmp/jazz-example-chat-* --strip-components 1 -C ~/jazz-examples/chat-clerk
cd ~/jazz-examples/chat-clerk
```
This ensures that you have the example app without git history and independent of the Jazz multi-package monorepo.
Install dependencies:
```bash
pnpm install
```
Start the dev server:
```bash
pnpm dev
```
## Questions / problems / feedback
If you have feedback, let us know on [Discord](https://discord.gg/utDMjHYg42) or open an issue or PR to fix something that seems wrong.
## Configuration: sync server
By default, the example app uses [Jazz Cloud](https://jazz.tools/cloud) (`wss://cloud.jazz.tools`) - so cross-device use, invites and collaboration should just work.
You can also run a local sync server by running `npx jazz-run sync` and adding the query param `?sync=ws://localhost:4200` to the URL of the example app (for example: `http://localhost:5173/?peer=ws://localhost:4200`), or by setting the `sync` parameter of the `<Jazz.Provider>` provider component in [./src/2_main.tsx](./src/2_main.tsx).

View File

@@ -1,14 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/jazz-logo.png" />
<link rel="stylesheet" href="/src/index.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Jazz Chat Example</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/app.tsx"></script>
</body>
</html>

View File

@@ -1,56 +0,0 @@
job "chat$BRANCH_SUFFIX" {
region = "global"
datacenters = ["*"]
group "static" {
count = 4
network {
port "http" {
to = 80
}
}
constraint {
attribute = "${node.class}"
operator = "="
value = "cloud"
}
spread {
attribute = "${node.datacenter}"
weight = 100
}
constraint {
distinct_hosts = true
}
task "server" {
driver = "docker"
config {
image = "$DOCKER_TAG"
ports = ["http"]
auth = {
username = "$DOCKER_USER"
password = "$DOCKER_PASSWORD"
}
}
service {
tags = ["public"]
name = "chat$BRANCH_SUFFIX"
port = "http"
provider = "consul"
}
resources {
cpu = 50 # MHz
memory = 50 # MB
}
}
}
}
# deploy bump 4

View File

@@ -1,47 +0,0 @@
{
"name": "jazz-example-chat-clerk",
"private": true,
"version": "0.0.104",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"format-and-lint": "biome check .",
"format-and-lint:fix": "biome check . --write",
"preview": "vite preview"
},
"dependencies": {
"@clerk/clerk-react": "^5.4.1",
"@radix-ui/react-checkbox": "^1.0.4",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-toast": "^1.1.4",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"cojson": "workspace:0.8.28",
"hash-slash": "workspace:0.2.1",
"jazz-react": "workspace:0.8.28",
"jazz-react-auth-clerk": "workspace:0.8.28",
"jazz-tools": "workspace:0.8.28",
"lucide-react": "^0.274.0",
"qrcode": "^1.5.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router": "^6.16.0",
"react-router-dom": "^6.16.0",
"react-use": "^17.4.0",
"tailwind-merge": "^1.14.0",
"tailwindcss-animate": "^1.0.7",
"uniqolor": "^1.1.0"
},
"devDependencies": {
"@types/qrcode": "^1.5.1",
"@types/react": "^18.2.19",
"@types/react-dom": "^18.2.7",
"@vitejs/plugin-react-swc": "^3.3.2",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.27",
"tailwindcss": "3.3.2",
"typescript": "^5.3.3",
"vite": "^5.0.10"
}
}

View File

@@ -1,6 +0,0 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

View File

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

View File

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

View File

@@ -1,78 +0,0 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 20 14.3% 4.1%;
--card: 0 0% 100%;
--card-foreground: 20 14.3% 4.1%;
--popover: 0 0% 100%;
--popover-foreground: 20 14.3% 4.1%;
--primary: 24 9.8% 10%;
--primary-foreground: 60 9.1% 97.8%;
--secondary: 60 4.8% 95.9%;
--secondary-foreground: 24 9.8% 10%;
--muted: 60 4.8% 95.9%;
--muted-foreground: 25 5.3% 44.7%;
--accent: 60 4.8% 95.9%;
--accent-foreground: 24 9.8% 10%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 60 9.1% 97.8%;
--border: 20 5.9% 90%;
--input: 20 5.9% 90%;
--ring: 20 14.3% 4.1%;
--radius: 0.5rem;
}
.dark {
--background: 20 14.3% 4.1%;
--foreground: 60 9.1% 97.8%;
--card: 20 14.3% 4.1%;
--card-foreground: 60 9.1% 97.8%;
--popover: 20 14.3% 4.1%;
--popover-foreground: 60 9.1% 97.8%;
--primary: 60 9.1% 97.8%;
--primary-foreground: 24 9.8% 10%;
--secondary: 12 6.5% 15.1%;
--secondary-foreground: 60 9.1% 97.8%;
--muted: 12 6.5% 15.1%;
--muted-foreground: 24 5.4% 63.9%;
--accent: 12 6.5% 15.1%;
--accent-foreground: 60 9.1% 97.8%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 60 9.1% 97.8%;
--border: 12 6.5% 15.1%;
--input: 12 6.5% 15.1%;
--ring: 24 5.7% 82.9%;
}
}
@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
margin: 0;
padding: 0;
}
}

View File

@@ -1,46 +0,0 @@
import { createJazzReactApp } from "jazz-react";
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { App } from "./app.tsx";
import { ClerkProvider, SignInButton, useClerk } from "@clerk/clerk-react";
import { useJazzClerkAuth } from "jazz-react-auth-clerk";
const Jazz = createJazzReactApp();
export const { useAccount, useCoState } = Jazz;
function JazzAndAuth({ children }: { children: React.ReactNode }) {
const clerk = useClerk();
const [auth, state] = useJazzClerkAuth(clerk);
return (
<>
{state.errors.map((error) => (
<div key={error}>{error}</div>
))}
{auth ? (
<Jazz.Provider
auth={auth}
peer="wss://cloud.jazz.tools/?key=chat-example-jazz-clerk@gcmp.io"
>
{children}
</Jazz.Provider>
) : (
<SignInButton />
)}
</>
);
}
createRoot(document.getElementById("root")!).render(
<StrictMode>
<ClerkProvider
publishableKey={import.meta.env.VITE_CLERK_PUBLISHABLE_KEY}
afterSignOutUrl="/"
>
<JazzAndAuth>
<App />
</JazzAndAuth>
</ClerkProvider>
</StrictMode>,
);

View File

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

View File

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

View File

@@ -1,75 +0,0 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./pages/**/*.{ts,tsx}",
"./components/**/*.{ts,tsx}",
"./app/**/*.{ts,tsx}",
"./src/**/*.{ts,tsx}",
],
theme: {
container: {
center: true,
padding: "2rem",
screens: {
"2xl": "1400px",
},
},
extend: {
colors: {
border: "hsl(var(--border))",
input: "hsl(var(--input))",
ring: "hsl(var(--ring))",
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
primary: {
DEFAULT: "hsl(var(--primary))",
foreground: "hsl(var(--primary-foreground))",
},
secondary: {
DEFAULT: "hsl(var(--secondary))",
foreground: "hsl(var(--secondary-foreground))",
},
destructive: {
DEFAULT: "hsl(var(--destructive))",
foreground: "hsl(var(--destructive-foreground))",
},
muted: {
DEFAULT: "hsl(var(--muted))",
foreground: "hsl(var(--muted-foreground))",
},
accent: {
DEFAULT: "hsl(var(--accent))",
foreground: "hsl(var(--accent-foreground))",
},
popover: {
DEFAULT: "hsl(var(--popover))",
foreground: "hsl(var(--popover-foreground))",
},
card: {
DEFAULT: "hsl(var(--card))",
foreground: "hsl(var(--card-foreground))",
},
},
borderRadius: {
lg: "var(--radius)",
md: "calc(var(--radius) - 2px)",
sm: "calc(var(--radius) - 4px)",
},
keyframes: {
"accordion-down": {
from: { height: 0 },
to: { height: "var(--radix-accordion-content-height)" },
},
"accordion-up": {
from: { height: "var(--radix-accordion-content-height)" },
to: { height: 0 },
},
},
animation: {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
},
},
},
plugins: [require("tailwindcss-animate")],
};

View File

@@ -1,29 +0,0 @@
{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2023", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
}

View File

@@ -1,10 +0,0 @@
{
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}

View File

@@ -1,16 +0,0 @@
import path from "path";
import react from "@vitejs/plugin-react-swc";
import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
build: {
minify: false,
},
});

View File

@@ -1,5 +1,59 @@
# chat-rn-clerk
## 1.0.26
### Patch Changes
- Updated dependencies [9ca25d1]
- jazz-react-auth-clerk@0.8.34
- jazz-react-native@0.8.34
- jazz-tools@0.8.34
- jazz-react-native-media-images@0.8.25
## 1.0.25
### Patch Changes
- jazz-react-auth-clerk@0.8.33
## 1.0.24
### Patch Changes
- Updated dependencies [1a4bda0]
- Updated dependencies [df42b2b]
- jazz-react-auth-clerk@0.8.32
- jazz-tools@0.8.32
- jazz-react-native@0.8.32
- jazz-react-native-media-images@0.8.24
## 1.0.23
### Patch Changes
- jazz-react-auth-clerk@0.8.31
- jazz-react-native@0.8.31
- jazz-tools@0.8.31
- jazz-react-native-media-images@0.8.23
## 1.0.22
### Patch Changes
- jazz-react-auth-clerk@0.8.30
- jazz-react-native@0.8.30
- jazz-tools@0.8.30
- jazz-react-native-media-images@0.8.22
## 1.0.21
### Patch Changes
- jazz-react-native@0.8.29
- jazz-react-auth-clerk@0.8.29
- jazz-tools@0.8.29
- jazz-react-native-media-images@0.8.21
## 1.0.20
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "chat-rn-clerk",
"main": "index.js",
"version": "1.0.20",
"version": "1.0.26",
"scripts": {
"build": "expo export -p ios",
"start": "expo start",

View File

@@ -1,5 +1,41 @@
# chat-rn
## 1.0.24
### Patch Changes
- jazz-react-native@0.8.34
- jazz-tools@0.8.34
## 1.0.23
### Patch Changes
- Updated dependencies [df42b2b]
- jazz-tools@0.8.32
- jazz-react-native@0.8.32
## 1.0.22
### Patch Changes
- jazz-react-native@0.8.31
- jazz-tools@0.8.31
## 1.0.21
### Patch Changes
- jazz-react-native@0.8.30
- jazz-tools@0.8.30
## 1.0.20
### Patch Changes
- jazz-react-native@0.8.29
- jazz-tools@0.8.29
## 1.0.19
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "chat-rn",
"version": "1.0.19",
"version": "1.0.24",
"main": "index.js",
"scripts": {
"build": "expo export -p ios",

View File

@@ -1,5 +1,54 @@
# chat-vue
## 0.0.17
### Patch Changes
- jazz-browser@0.8.34
- jazz-tools@0.8.34
- jazz-vue@0.8.22
## 0.0.16
### Patch Changes
- Updated dependencies [3cb27e1]
- jazz-browser@0.8.33
- jazz-vue@0.8.21
## 0.0.15
### Patch Changes
- Updated dependencies [df42b2b]
- jazz-tools@0.8.32
- jazz-browser@0.8.32
- jazz-vue@0.8.20
## 0.0.14
### Patch Changes
- jazz-browser@0.8.31
- jazz-tools@0.8.31
- jazz-vue@0.8.19
## 0.0.13
### Patch Changes
- jazz-browser@0.8.30
- jazz-tools@0.8.30
- jazz-vue@0.8.18
## 0.0.12
### Patch Changes
- jazz-browser@0.8.29
- jazz-tools@0.8.29
- jazz-vue@0.8.17
## 0.0.11
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "chat-vue",
"version": "0.0.11",
"version": "0.0.17",
"private": true,
"type": "module",
"scripts": {

View File

@@ -1,5 +1,59 @@
# jazz-example-chat
## 0.0.112
### Patch Changes
- Updated dependencies [e4f110f]
- cojson@0.8.34
- jazz-react@0.8.34
- jazz-tools@0.8.34
## 0.0.111
### Patch Changes
- jazz-react@0.8.33
## 0.0.110
### Patch Changes
- Updated dependencies [df42b2b]
- Updated dependencies [df42b2b]
- cojson@0.8.32
- jazz-tools@0.8.32
- jazz-react@0.8.32
## 0.0.109
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
- jazz-react@0.8.31
- jazz-tools@0.8.31
## 0.0.108
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
- jazz-react@0.8.30
- jazz-tools@0.8.30
## 0.0.107
### Patch Changes
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson@0.8.29
- jazz-react@0.8.29
- jazz-tools@0.8.29
## 0.0.106
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-chat",
"private": true,
"version": "0.0.106",
"version": "0.0.112",
"type": "module",
"scripts": {
"dev": "vite",
@@ -18,10 +18,10 @@
"@radix-ui/react-toast": "^1.1.4",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"cojson": "workspace:0.8.28",
"cojson": "workspace:0.8.34",
"hash-slash": "workspace:0.2.1",
"jazz-react": "workspace:0.8.28",
"jazz-tools": "workspace:0.8.28",
"jazz-react": "workspace:0.8.34",
"jazz-tools": "workspace:0.8.34",
"lucide-react": "^0.274.0",
"qrcode": "^1.5.3",
"react": "^18.2.0",

View File

@@ -0,0 +1,94 @@
# minimal-auth-clerk
## 0.0.11
### Patch Changes
- 9ca25d1: Rename passkey and clerk examples
- Updated dependencies [9ca25d1]
- jazz-react-auth-clerk@0.8.34
- jazz-react@0.8.34
- jazz-tools@0.8.34
## 0.0.10
### Patch Changes
- jazz-react@0.8.33
- jazz-react-auth-clerk@0.8.33
## 0.0.9
### Patch Changes
- Updated dependencies [1a4bda0]
- Updated dependencies [df42b2b]
- jazz-react-auth-clerk@0.8.32
- jazz-tools@0.8.32
- jazz-react@0.8.32
## 0.0.8
### Patch Changes
- jazz-react@0.8.31
- jazz-react-auth-clerk@0.8.31
- jazz-tools@0.8.31
## 0.0.7
### Patch Changes
- jazz-react@0.8.30
- jazz-react-auth-clerk@0.8.30
- jazz-tools@0.8.30
## 0.0.6
### Patch Changes
- jazz-react@0.8.29
- jazz-react-auth-clerk@0.8.29
- jazz-tools@0.8.29
## 0.0.5
### Patch Changes
- jazz-react@0.8.28
- jazz-react-auth-clerk@0.8.28
- jazz-tools@0.8.28
## 0.0.4
### Patch Changes
- jazz-react@0.8.27
- jazz-react-auth-clerk@0.8.27
- jazz-tools@0.8.27
## 0.0.3
### Patch Changes
- Updated dependencies [59d37df]
- jazz-react@0.8.26
- jazz-react-auth-clerk@0.8.26
## 0.0.2
### Patch Changes
- jazz-react@0.8.24
- jazz-react-auth-clerk@0.8.24
## 0.0.1
### Patch Changes
- Updated dependencies [d348c2d]
- Updated dependencies [6902b5b]
- Updated dependencies [1a0cd3d]
- jazz-tools@0.8.23
- jazz-react@0.8.23
- jazz-react-auth-clerk@0.8.23

View File

@@ -1,3 +1,3 @@
# Minimal Jazz Auth Clerk Example
This is a minimal example of how to use Clerk authentication with Jazz.
This is a minimal example of how to use Clerk authentication with Jazz.

View File

@@ -1,7 +1,7 @@
{
"name": "minimal-auth-clerk",
"name": "clerk",
"private": true,
"version": "0.0.5",
"version": "0.0.11",
"type": "module",
"scripts": {
"dev": "vite",
@@ -14,7 +14,7 @@
"@clerk/clerk-react": "^5.4.1",
"jazz-tools": "workspace:*",
"jazz-react": "workspace:*",
"jazz-react-auth-clerk": "workspace:0.8.28",
"jazz-react-auth-clerk": "workspace:0.8.34",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -1,5 +1,47 @@
# jazz-example-inspector
## 0.0.81
### Patch Changes
- Updated dependencies [e4f110f]
- cojson@0.8.34
- cojson-transport-ws@0.8.34
## 0.0.80
### Patch Changes
- Updated dependencies [df42b2b]
- cojson@0.8.32
- cojson-transport-ws@0.8.32
## 0.0.79
### Patch Changes
- Updated dependencies [e511d6d]
- cojson@0.8.31
- cojson-transport-ws@0.8.31
## 0.0.78
### Patch Changes
- Updated dependencies [0a2fae3]
- Updated dependencies [99cda2f]
- cojson@0.8.30
- cojson-transport-ws@0.8.30
## 0.0.77
### Patch Changes
- Updated dependencies [dcc9c2e]
- Updated dependencies [699553f]
- cojson-transport-ws@0.8.29
- cojson@0.8.29
## 0.0.76
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-inspector",
"private": true,
"version": "0.0.76",
"version": "0.0.81",
"type": "module",
"scripts": {
"dev": "vite",
@@ -16,8 +16,8 @@
"@radix-ui/react-toast": "^1.1.4",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"cojson": "workspace:0.8.28",
"cojson-transport-ws": "workspace:0.8.28",
"cojson": "workspace:0.8.34",
"cojson-transport-ws": "workspace:0.8.34",
"hash-slash": "workspace:0.2.1",
"lucide-react": "^0.274.0",
"qrcode": "^1.5.3",

View File

@@ -1 +0,0 @@
VITE_CLERK_PUBLISHABLE_KEY=pk_test_ZXZpZGVudC1kYW5lLTg5LmNsZXJrLmFjY291bnRzLmRldiQ

View File

@@ -1,43 +0,0 @@
# minimal-auth-clerk
## 0.0.5
### Patch Changes
- jazz-react@0.8.28
- jazz-react-auth-clerk@0.8.28
- jazz-tools@0.8.28
## 0.0.4
### Patch Changes
- jazz-react@0.8.27
- jazz-react-auth-clerk@0.8.27
- jazz-tools@0.8.27
## 0.0.3
### Patch Changes
- Updated dependencies [59d37df]
- jazz-react@0.8.26
- jazz-react-auth-clerk@0.8.26
## 0.0.2
### Patch Changes
- jazz-react@0.8.24
- jazz-react-auth-clerk@0.8.24
## 0.0.1
### Patch Changes
- Updated dependencies [d348c2d]
- Updated dependencies [6902b5b]
- Updated dependencies [1a0cd3d]
- jazz-tools@0.8.23
- jazz-react@0.8.23
- jazz-react-auth-clerk@0.8.23

View File

@@ -1,28 +0,0 @@
# minimal-auth-passkey
## 0.0.4
### Patch Changes
- jazz-react@0.8.28
- jazz-tools@0.8.28
## 0.0.3
### Patch Changes
- jazz-react@0.8.27
- jazz-tools@0.8.27
## 0.0.2
### Patch Changes
- Updated dependencies [59d37df]
- jazz-react@0.8.26
## 0.0.1
### Patch Changes
- jazz-react@0.8.24

View File

@@ -1 +0,0 @@
/// <reference types="vite/client" />

View File

@@ -1,5 +1,47 @@
# jazz-example-musicplayer
## 0.0.32
### Patch Changes
- jazz-react@0.8.34
- jazz-tools@0.8.34
## 0.0.31
### Patch Changes
- jazz-react@0.8.33
## 0.0.30
### Patch Changes
- Updated dependencies [df42b2b]
- jazz-tools@0.8.32
- jazz-react@0.8.32
## 0.0.29
### Patch Changes
- jazz-react@0.8.31
- jazz-tools@0.8.31
## 0.0.28
### Patch Changes
- jazz-react@0.8.30
- jazz-tools@0.8.30
## 0.0.27
### Patch Changes
- jazz-react@0.8.29
- jazz-tools@0.8.29
## 0.0.26
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-music-player",
"private": true,
"version": "0.0.26",
"version": "0.0.32",
"type": "module",
"scripts": {
"dev": "vite",
@@ -18,8 +18,8 @@
"@radix-ui/react-toast": "^1.1.4",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"jazz-react": "workspace:0.8.28",
"jazz-tools": "workspace:0.8.28",
"jazz-react": "workspace:0.8.34",
"jazz-tools": "workspace:0.8.34",
"lucide-react": "^0.274.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",

View File

@@ -1,5 +1,53 @@
# jazz-example-onboarding
## 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

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-onboarding",
"private": true,
"version": "0.0.7",
"version": "0.0.13",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -0,0 +1,71 @@
# minimal-auth-passkey
## 0.0.10
### Patch Changes
- 9ca25d1: Rename passkey and clerk examples
- jazz-react@0.8.34
- jazz-tools@0.8.34
## 0.0.9
### Patch Changes
- jazz-react@0.8.33
## 0.0.8
### Patch Changes
- Updated dependencies [df42b2b]
- jazz-tools@0.8.32
- jazz-react@0.8.32
## 0.0.7
### Patch Changes
- jazz-react@0.8.31
- jazz-tools@0.8.31
## 0.0.6
### Patch Changes
- jazz-react@0.8.30
- jazz-tools@0.8.30
## 0.0.5
### Patch Changes
- jazz-react@0.8.29
- jazz-tools@0.8.29
## 0.0.4
### Patch Changes
- jazz-react@0.8.28
- jazz-tools@0.8.28
## 0.0.3
### Patch Changes
- jazz-react@0.8.27
- jazz-tools@0.8.27
## 0.0.2
### Patch Changes
- Updated dependencies [59d37df]
- jazz-react@0.8.26
## 0.0.1
### Patch Changes
- jazz-react@0.8.24

View File

@@ -1,7 +1,7 @@
{
"name": "minimal-auth-passkey",
"name": "passkey",
"private": true,
"version": "0.0.4",
"version": "0.0.10",
"type": "module",
"scripts": {
"dev": "vite",

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -1,5 +1,47 @@
# jazz-password-manager
## 0.0.31
### Patch Changes
- jazz-react@0.8.34
- jazz-tools@0.8.34
## 0.0.30
### Patch Changes
- jazz-react@0.8.33
## 0.0.29
### Patch Changes
- Updated dependencies [df42b2b]
- jazz-tools@0.8.32
- jazz-react@0.8.32
## 0.0.28
### Patch Changes
- jazz-react@0.8.31
- jazz-tools@0.8.31
## 0.0.27
### Patch Changes
- jazz-react@0.8.30
- jazz-tools@0.8.30
## 0.0.26
### Patch Changes
- jazz-react@0.8.29
- jazz-tools@0.8.29
## 0.0.25
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-password-manager",
"private": true,
"version": "0.0.25",
"version": "0.0.31",
"type": "module",
"scripts": {
"dev": "vite",
@@ -12,8 +12,8 @@
"clean-install": "rm -rf node_modules pnpm-lock.yaml && pnpm install"
},
"dependencies": {
"jazz-react": "workspace:0.8.28",
"jazz-tools": "workspace:0.8.28",
"jazz-react": "workspace:0.8.34",
"jazz-tools": "workspace:0.8.34",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.41.5",

View File

@@ -1,5 +1,53 @@
# jazz-example-pets
## 0.0.129
### Patch Changes
- jazz-react@0.8.34
- jazz-tools@0.8.34
- jazz-browser-media-images@0.8.34
## 0.0.128
### Patch Changes
- jazz-browser-media-images@0.8.33
- jazz-react@0.8.33
## 0.0.127
### Patch Changes
- Updated dependencies [df42b2b]
- jazz-tools@0.8.32
- jazz-react@0.8.32
- jazz-browser-media-images@0.8.32
## 0.0.126
### Patch Changes
- jazz-react@0.8.31
- jazz-tools@0.8.31
- jazz-browser-media-images@0.8.31
## 0.0.125
### Patch Changes
- jazz-react@0.8.30
- jazz-tools@0.8.30
- jazz-browser-media-images@0.8.30
## 0.0.124
### Patch Changes
- jazz-react@0.8.29
- jazz-tools@0.8.29
- jazz-browser-media-images@0.8.29
## 0.0.123
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-pets",
"private": true,
"version": "0.0.123",
"version": "0.0.129",
"type": "module",
"scripts": {
"dev": "vite",
@@ -19,9 +19,9 @@
"@radix-ui/react-toast": "^1.1.4",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"jazz-browser-media-images": "workspace:0.8.28",
"jazz-react": "workspace:0.8.28",
"jazz-tools": "workspace:0.8.28",
"jazz-browser-media-images": "workspace:0.8.34",
"jazz-react": "workspace:0.8.34",
"jazz-tools": "workspace:0.8.34",
"lucide-react": "^0.274.0",
"qrcode": "^1.5.3",
"react": "^18.2.0",
@@ -41,7 +41,7 @@
"@vitejs/plugin-react-swc": "^3.3.2",
"autoprefixer": "^10.4.14",
"is-ci": "^3.0.1",
"jazz-run": "workspace:0.8.28",
"jazz-run": "workspace:0.8.34",
"postcss": "^8.4.27",
"tailwindcss": "3.3.2",
"typescript": "^5.3.3",

View File

@@ -1,5 +1,54 @@
# todo-vue
## 0.0.15
### Patch Changes
- jazz-browser@0.8.34
- jazz-tools@0.8.34
- jazz-vue@0.8.22
## 0.0.14
### Patch Changes
- Updated dependencies [3cb27e1]
- jazz-browser@0.8.33
- jazz-vue@0.8.21
## 0.0.13
### Patch Changes
- Updated dependencies [df42b2b]
- jazz-tools@0.8.32
- jazz-browser@0.8.32
- jazz-vue@0.8.20
## 0.0.12
### Patch Changes
- jazz-browser@0.8.31
- jazz-tools@0.8.31
- jazz-vue@0.8.19
## 0.0.11
### Patch Changes
- jazz-browser@0.8.30
- jazz-tools@0.8.30
- jazz-vue@0.8.18
## 0.0.10
### Patch Changes
- jazz-browser@0.8.29
- jazz-tools@0.8.29
- jazz-vue@0.8.17
## 0.0.9
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "todo-vue",
"version": "0.0.9",
"version": "0.0.15",
"private": true,
"type": "module",
"scripts": {

View File

@@ -1,5 +1,47 @@
# jazz-example-todo
## 0.0.128
### Patch Changes
- jazz-react@0.8.34
- jazz-tools@0.8.34
## 0.0.127
### Patch Changes
- jazz-react@0.8.33
## 0.0.126
### Patch Changes
- Updated dependencies [df42b2b]
- jazz-tools@0.8.32
- jazz-react@0.8.32
## 0.0.125
### Patch Changes
- jazz-react@0.8.31
- jazz-tools@0.8.31
## 0.0.124
### Patch Changes
- jazz-react@0.8.30
- jazz-tools@0.8.30
## 0.0.123
### Patch Changes
- jazz-react@0.8.29
- jazz-tools@0.8.29
## 0.0.122
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-todo",
"private": true,
"version": "0.0.122",
"version": "0.0.128",
"type": "module",
"scripts": {
"dev": "vite",
@@ -16,8 +16,8 @@
"@radix-ui/react-toast": "^1.1.4",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"jazz-react": "workspace:0.8.28",
"jazz-tools": "workspace:0.8.28",
"jazz-react": "workspace:0.8.34",
"jazz-tools": "workspace:0.8.34",
"lucide-react": "^0.274.0",
"qrcode": "^1.5.3",
"react": "^18.2.0",

View File

@@ -12,6 +12,7 @@
"dependencies": {
"@evilmartians/harmony": "^1.0.0",
"@headlessui/react": "^2.2.0",
"@icons-pack/react-simple-icons": "^9.1.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"lucide-react": "^0.436.0",
@@ -19,6 +20,7 @@
"next-themes": "^0.2.1",
"react": "^18",
"react-dom": "^18",
"resend": "^4.0.0",
"tailwind-merge": "^1.14.0",
"tailwindcss-animate": "^1.0.7"
},

View File

@@ -1,5 +1,7 @@
import { clsx } from "clsx";
import { LucideIcon } from "lucide-react";
import Link from "next/link";
import { Spinner } from "./Spinner";
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
children: React.ReactNode;
@@ -7,6 +9,19 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
size?: "sm" | "md" | "lg";
href?: string;
newTab?: boolean;
icon?: LucideIcon;
loading?: boolean;
loadingText?: string;
}
function ButtonIcon({ icon: Icon, loading }: ButtonProps) {
if (!Icon) return null;
const className = "size-5";
if (loading) return <Spinner className={className} />;
return <Icon strokeWidth={1.5} className={className} />;
}
export function Button(props: ButtonProps) {
@@ -18,6 +33,7 @@ export function Button(props: ButtonProps) {
href,
disabled,
newTab,
loadingText,
} = props;
const sizeClasses = {
@@ -37,6 +53,7 @@ export function Button(props: ButtonProps) {
const classNames = clsx(
className,
"inline-flex items-center justify-center gap-2 rounded-lg text-center transition-colors",
"disabled:pointer-events-none disabled:opacity-70",
sizeClasses[size],
variantClasses[variant],
disabled && "opacity-50 cursor-not-allowed pointer-events-none",
@@ -49,14 +66,21 @@ export function Button(props: ButtonProps) {
target={newTab ? "_blank" : undefined}
className={classNames}
>
<ButtonIcon {...props} />
{children}
</Link>
);
}
return (
<button {...props} className={classNames}>
{children}
<button
{...props}
disabled={props.disabled || props.loading}
className={classNames}
>
<ButtonIcon {...props} />
{props.loading && props.loadingText ? props.loadingText : children}
</button>
);
}

View File

@@ -0,0 +1,12 @@
import { clsx } from "clsx";
export function Card({
children,
className,
}: { children: React.ReactNode; className?: string }) {
return (
<div className={clsx(className, "border rounded-xl shadow-sm")}>
{children}
</div>
);
}

View File

@@ -1,16 +1,16 @@
import clsx from "clsx";
import { ReactNode } from "react";
import { Card } from "../atoms/Card";
export function GridCard(props: { children: ReactNode; className?: string }) {
return (
<div
<Card
className={clsx(
"col-span-2 p-4 [&>h4]:mt-0 [&>h3]:mt-0 [&>:last-child]:mb-0",
"border rounded-xl shadow-sm",
props.className,
)}
>
{props.children}
</div>
</Card>
);
}

View File

@@ -0,0 +1,26 @@
import clsx from "clsx";
export function Spinner({ className }: { className?: string }) {
return (
<svg
className={clsx(className, "animate-spin")}
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
>
<circle
className="opacity-25"
cx="12"
cy="12"
r="10"
stroke="currentColor"
stroke-width="4"
></circle>
<path
className="opacity-75"
fill="currentColor"
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
></path>
</svg>
);
}

View File

@@ -0,0 +1,36 @@
import clsx from "clsx";
import { LucideIcon } from "lucide-react";
import { Card } from "../atoms/Card";
import { Prose } from "./Prose";
export function FeatureCard({
label,
icon: Icon,
explanation,
children,
className,
}: {
label: React.ReactNode;
icon?: LucideIcon;
explanation?: React.ReactNode;
children?: React.ReactNode;
className?: string;
}) {
return (
<Card className={clsx(className, "p-4")}>
{Icon && (
<Icon
className="size-8 text-blue p-1.5 rounded-lg bg-blue-50 dark:text-blue-500 dark:bg-stone-900 mb-2.5 md:size-10"
strokeWidth={1.5}
strokeLinecap="butt"
size={80}
/>
)}
<div className="text-stone-900 font-medium md:text-base dark:text-stone-100 mb-2">
{label}
</div>
{explanation && <Prose>{explanation}</Prose>}
{children}
</Card>
);
}

View File

@@ -6,15 +6,23 @@ export function GappedGrid({
children,
className,
title,
cols = 3,
}: {
children: ReactNode;
className?: string;
title?: string;
cols?: 3 | 4;
}) {
const colsClassName =
cols === 3
? "grid-cols-2 md:grid-cols-4 lg:grid-cols-6"
: "sm:grid-cols-2 lg:grid-cols-4";
return (
<div
className={clsx(
"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4 lg:gap-8",
"grid gap-4 lg:gap-8",
colsClassName,
"items-stretch",
className,
)}

View File

@@ -1,37 +0,0 @@
import clsx from "clsx";
import { LucideIcon } from "lucide-react";
import { Prose } from "./Prose";
export function LabelledFeatureIcon({
label,
icon: Icon,
explanation,
className,
}: {
label: string;
icon: LucideIcon;
explanation: React.ReactNode;
className?: string;
}) {
return (
<div
className={clsx(
className,
"text-base",
"rounded-xl",
"border p-4 shadow-sm",
)}
>
<Icon
className="size-8 text-blue p-1.5 rounded-lg bg-blue-50 dark:text-blue-500 dark:bg-stone-900 mb-2.5 md:size-10"
strokeWidth={1.5}
strokeLinecap="butt"
size={80}
/>
<div className="text-stone-900 font-medium md:text-base dark:text-stone-100 mb-2">
{label}
</div>
<Prose>{explanation}</Prose>
</div>
);
}

View File

@@ -19,7 +19,7 @@ export function ThemeToggle({ className }: { className?: string }) {
type="button"
className={clsx(
className,
"md:p-2 md:rounded-full md:border",
"md:p-1.5 md:rounded-full md:border",
"text-stone-400 hover:text-stone-900 dark:text-stone-400 dark:hover:text-white",
"md:hover:bg-stone-200 md:dark:hover:bg-stone-900",
"transition-colors",
@@ -29,13 +29,13 @@ export function ThemeToggle({ className }: { className?: string }) {
>
<MoonIcon
size={24}
strokeWidth={1.5}
className="size-5 md:size-6 stroke-stone-900 dark:hidden"
strokeWidth={2}
className="size-5 stroke-stone-900 dark:hidden"
/>
<SunIcon
size={24}
strokeWidth={1.5}
className="size-5 md:size-6 hidden stroke-white dark:block"
strokeWidth={2}
className="size-5 hidden stroke-white dark:block"
/>
</button>
);

View File

@@ -5,6 +5,8 @@ import Link from "next/link";
import { usePathname } from "next/navigation";
import { ReactNode } from "react";
import { ThemeToggle } from "../molecules/ThemeToggle";
import { NewsletterForm } from "./NewsletterForm";
import { SocialLinks, SocialLinksProps } from "./SocialLinks";
type FooterSection = {
title: string;
@@ -19,6 +21,7 @@ type FooterProps = {
logo: ReactNode;
companyName: string;
sections: FooterSection[];
socials: SocialLinksProps;
};
function Copyright({
@@ -35,38 +38,54 @@ function Copyright({
);
}
export function Footer({ logo, companyName, sections }: FooterProps) {
export function Footer({ logo, companyName, sections, socials }: FooterProps) {
return (
<footer className="w-full border-t bg-stone-100 mt-12 md:mt-20 dark:bg-stone-925">
<div className="container py-8 md:py-16 grid gap-y-8 grid-cols-12">
<div className="flex flex-col justify-between col-span-full md:col-span-4">
{logo}
<Copyright className="hidden md:block" companyName={companyName} />
</div>
{sections.map((section, index) => (
<div
key={index}
className="flex flex-col gap-2 text-sm col-span-4 sm:col-span-4 md:col-span-2"
>
<h2 className="font-medium">{section.title}</h2>
{section.links.map((link, linkIndex) => (
<FooterLink key={linkIndex} href={link.href} newTab={link.newTab}>
{link.label}
</FooterLink>
))}
<footer className="w-full py-8 mt-12 md:mt-20">
<div className="container grid gap-8 md:gap-12">
<div className="grid grid-cols-12 gap-y-3 sm:items-center pb-8 border-b">
<div className="col-span-full sm:col-span-6 md:col-span-8">
{logo}
</div>
))}
<div className="hidden md:flex justify-end items-end md:col-span-2">
<ThemeToggle />
<p className="col-span-full sm:col-span-6 md:col-span-4 text-sm sm:text-base">
Playful software for serious problems.
</p>
</div>
<div className="grid gap-y-8 grid-cols-12">
<div className="flex flex-col gap-4 col-span-full md:col-span-8">
<p className="font-medium text-stone-900 dark:text-white">
Stay up to date
</p>
<NewsletterForm />
</div>
<Copyright
className="col-span-full md:hidden"
companyName={companyName}
/>
{sections.map((section, index) => (
<div
key={index}
className="flex flex-col gap-2 text-sm col-span-6 md:col-span-2"
>
<h2 className="font-medium">{section.title}</h2>
{section.links.map((link, linkIndex) => (
<FooterLink
key={linkIndex}
href={link.href}
newTab={link.newTab}
>
{link.label}
</FooterLink>
))}
</div>
))}
<Copyright
className="order-last col-span-full self-center md:col-span-10 md:order-none"
companyName={companyName}
/>
<div className="col-span-full flex items-center justify-between gap-6 md:col-span-2">
<SocialLinks {...socials}></SocialLinks>
<ThemeToggle className="hidden md:block" />
</div>
</div>
</div>
</footer>
);

View File

@@ -14,6 +14,7 @@ import { usePathname } from "next/navigation";
import { ReactNode, useEffect, useLayoutEffect, useRef, useState } from "react";
import { BreadCrumb } from "../molecules/Breadcrumb";
import { ThemeToggle } from "../molecules/ThemeToggle";
import { SocialLinks, SocialLinksProps } from "./SocialLinks";
type NavItemProps = {
href: string;
@@ -30,6 +31,7 @@ type NavProps = {
items: NavItemProps[];
docNav?: ReactNode;
cta?: ReactNode;
socials?: SocialLinksProps;
};
function NavItem({
@@ -110,7 +112,7 @@ function NavItem({
);
}
export function MobileNav({ mainLogo, items, docNav, cta }: NavProps) {
export function MobileNav({ mainLogo, items, docNav, cta, socials }: NavProps) {
const [menuOpen, setMenuOpen] = useState(false);
const [searchOpen, setSearchOpen] = useState(false);
const searchRef = useRef<HTMLInputElement>(null);
@@ -170,13 +172,8 @@ export function MobileNav({ mainLogo, items, docNav, cta }: NavProps) {
>
{mainLogo}
</NavLinkLogo>
{items
.filter((item) => "icon" in item)
.map((item, i) => (
<NavLinkLogo key={i} href={item.href} newTab={item.newTab}>
{item.icon}
</NavLinkLogo>
))}
<SocialLinks className="px-2 gap-2" {...socials} />
</div>
{pathname.startsWith("/docs") && docNav && (
@@ -310,6 +307,8 @@ export function Nav(props: NavProps) {
/>
))}
<SocialLinks {...props.socials} />
{cta}
</PopoverGroup>
</div>

View File

@@ -1,30 +1,37 @@
"use client";
import { subscribe } from "@/app/actions/resend";
import { Button } from "gcmp-design-system/src/app/components/atoms/Button";
import { Input } from "gcmp-design-system/src/app/components/molecules/Input";
import { CheckIcon } from "lucide-react";
import { CheckIcon, MailIcon } from "lucide-react";
import { useState } from "react";
import { ErrorResponse } from "resend";
import { subscribe } from "../../../actions/resend";
import { Button } from "../atoms/Button";
import { Input } from "../molecules/Input";
export function NewsletterForm() {
const [email, setEmail] = useState("");
const [subscribed, setSubscribed] = useState(false);
// const [subscribed, setSubscribed] = useState(false);
const [error, setError] = useState<ErrorResponse | undefined>();
const [state, setState] = useState<"ready" | "loading" | "success" | "error">(
"ready",
);
const submit = async (e: React.FormEvent) => {
e.preventDefault();
setState("loading");
const res = await subscribe(email);
if (res.error) {
setError(res.error);
setState("error");
} else {
setSubscribed(true);
setState("success");
}
};
if (subscribed) {
if (state === "success") {
return (
<div className="flex gap-3 items-center">
<CheckIcon className="text-green-500" size={16} />
@@ -33,12 +40,12 @@ export function NewsletterForm() {
);
}
if (error) {
if (state === "error" && error?.message) {
return <p className="text-red-700">Error: {error.message}</p>;
}
return (
<form action="" onSubmit={submit} className="flex gap-x-4 w-120 max-w-xl">
<form action="" onSubmit={submit} className="flex gap-x-4 w-120 max-w-md">
<Input
id="email-address"
name="email"
@@ -51,7 +58,13 @@ export function NewsletterForm() {
className="flex-1 label:sr-only"
label="Email address"
/>
<Button type="submit" variant="secondary">
<Button
type="submit"
variant="secondary"
loadingText="Subscribing..."
loading={state === "loading"}
icon={MailIcon}
>
Subscribe
</Button>
</form>

View File

@@ -0,0 +1,51 @@
import { SiDiscord, SiGithub, SiX } from "@icons-pack/react-simple-icons";
import { clsx } from "clsx";
export interface SocialLinksProps {
github?: string;
x?: string;
discord?: string;
}
const socials = [
{
name: "Github",
icon: SiGithub,
key: "github",
size: 20,
},
{
name: "Discord",
icon: SiDiscord,
key: "discord",
size: 23,
},
{
name: "X",
icon: SiX,
key: "x",
size: 18,
},
];
export function SocialLinks(props: SocialLinksProps & { className?: string }) {
return (
<div className={clsx(props.className, "inline-flex gap-6 items-center")}>
{socials.map(
(social) =>
props[social.key as keyof SocialLinksProps] && (
<a
key={social.key}
href={props[social.key as keyof SocialLinksProps]}
target="_blank"
rel="noreferrer"
className="flex hover:text-stone-900 hover:dark:text-white"
>
<social.icon size={social.size} />
<span className="sr-only">{social.name}</span>
</a>
),
)}
</div>
);
}

View File

@@ -1,4 +1,5 @@
import { Prose } from "@components/molecules/Prose";
import { NewsletterForm } from "@components/organisms/NewsletterForm";
export default function Home() {
return (
@@ -63,6 +64,12 @@ export default function Home() {
</Prose>
</div>
</div>
<h2>Newsletter Subscription Form</h2>
<div className="p-3 border">
<NewsletterForm />
</div>
</main>
);
}

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