Skip to content

Commit 96c4e4b

Browse files
committed
fix: merge branch 'next' of github.com:pheralb/toast into next
2 parents d10da4d + dfd28ee commit 96c4e4b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+5905
-2843
lines changed

.github/workflows/check.yml

+33-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 📦 Check
1+
name: ⚙️ Check
22

33
on:
44
push:
@@ -13,7 +13,8 @@ on:
1313
concurrency: ${{ github.workflow }}-${{ github.ref }}
1414

1515
jobs:
16-
test:
16+
vitest:
17+
name: 🧪 Vitest
1718
runs-on: ubuntu-latest
1819
steps:
1920
- name: Checkout Repo
@@ -24,11 +25,36 @@ jobs:
2425
with:
2526
node-version: 20
2627

27-
- uses: pnpm/action-setup@v2.0.1
28+
- uses: pnpm/action-setup@v4
2829
name: Install pnpm
2930
id: pnpm-install
3031
with:
31-
version: 8
32+
version: 9
33+
run_install: false
34+
35+
- name: Install dependencies
36+
run: pnpm install
37+
38+
- name: Vitest - Library
39+
run: pnpm test
40+
41+
lint:
42+
name: 🔎 Eslint
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Checkout Repo
46+
uses: actions/checkout@v4
47+
48+
- name: Install Node.js
49+
uses: actions/setup-node@v4
50+
with:
51+
node-version: 20
52+
53+
- uses: pnpm/action-setup@v4
54+
name: Install pnpm
55+
id: pnpm-install
56+
with:
57+
version: 9
3258
run_install: false
3359

3460
- name: Install dependencies
@@ -38,6 +64,7 @@ jobs:
3864
run: pnpm test
3965

4066
build:
67+
name: 🛫 Build Website & Library
4168
runs-on: ubuntu-latest
4269
steps:
4370
- name: Checkout Repo
@@ -48,11 +75,11 @@ jobs:
4875
with:
4976
node-version: 20
5077

51-
- uses: pnpm/action-setup@v2.0.1
78+
- uses: pnpm/action-setup@v4
5279
name: Install pnpm
5380
id: pnpm-install
5481
with:
55-
version: 8
82+
version: 9
5683
run_install: false
5784

5885
- name: Install dependencies

.github/workflows/release.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 📦 Release
1+
name: ⚙️ Release
22

33
on:
44
workflow_dispatch:
@@ -9,7 +9,7 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}
99

1010
jobs:
1111
release:
12-
name: Release
12+
name: 📦 Release
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout Repo
@@ -23,11 +23,11 @@ jobs:
2323
with:
2424
node-version: 20
2525

26-
- uses: pnpm/action-setup@v2.0.1
26+
- uses: pnpm/action-setup@v4
2727
name: Install pnpm
2828
id: pnpm-install
2929
with:
30-
version: 8
30+
version: 9
3131
run_install: false
3232

3333
- name: Get pnpm store directory
@@ -36,7 +36,7 @@ jobs:
3636
run: |
3737
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
3838
39-
- uses: actions/cache@v3
39+
- uses: actions/cache@v4
4040
name: Setup pnpm cache
4141
with:
4242
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}

.gitignore

+24-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2-
3-
# Astro
4-
.astro
5-
61
# Dependencies
72
node_modules
8-
.pnp
9-
.pnp.js
3+
/.pnp
4+
.pnp.*
5+
.yarn/*
6+
!.yarn/patches
7+
!.yarn/plugins
8+
!.yarn/releases
9+
!.yarn/versions
1010

1111
# Local env files
1212
.env
@@ -34,6 +34,19 @@ dist
3434
# Remix
3535
/.cache
3636

37+
# Next.js
38+
/.next/
39+
/out/
40+
41+
# Astro
42+
.astro
43+
44+
# env files (can opt-in for committing if needed)
45+
.env*
46+
47+
# vercel
48+
.vercel
49+
3750
# Debug
3851
npm-debug.log*
3952
yarn-debug.log*
@@ -42,3 +55,7 @@ yarn-error.log*
4255
# Misc
4356
.DS_Store
4457
*.pem
58+
59+
# typescript
60+
*.tsbuildinfo
61+
next-env.d.ts

.vscode/extensions.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
2-
"recommendations": ["astro-build.astro-vscode"],
2+
"recommendations": [
3+
"astro-build.astro-vscode",
4+
"unifiedjs.vscode-mdx",
5+
"bradlc.vscode-tailwindcss",
6+
"esbenp.prettier-vscode"
7+
],
38
"unwantedRecommendations": []
49
}

docs/astro.config.ts

+19-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { defineConfig } from 'astro/config';
22

33
// Integrations:
4+
import vercel from '@astrojs/vercel';
45
import react from '@astrojs/react';
56
import tailwind from '@astrojs/tailwind';
67
import mdx from '@astrojs/mdx';
@@ -9,25 +10,41 @@ import mdx from '@astrojs/mdx';
910
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
1011
import rehypeSlug from 'rehype-slug';
1112
import { HEADING_LINK_ANCHOR } from './src/ui/headings';
13+
import { targetBlank } from './src/components/mdx/targetBlank';
14+
15+
// Shiki Transformers:
16+
import { transformerMetaHighlight } from '@shikijs/transformers';
17+
18+
// Global settings:
19+
let websiteUrl = 'https://toast.pheralb.dev';
1220

1321
// Astro config:
1422
export default defineConfig({
15-
site: 'https://toast.pheralb.dev',
23+
adapter: vercel(),
24+
site: websiteUrl,
1625
integrations: [
1726
react(),
1827
tailwind({
1928
applyBaseStyles: false,
2029
}),
2130
mdx({
2231
syntaxHighlight: 'shiki',
23-
shikiConfig: { theme: 'vesper', wrap: true },
32+
shikiConfig: {
33+
themes: {
34+
light: 'github-light',
35+
dark: 'github-dark',
36+
},
37+
wrap: true,
38+
transformers: [transformerMetaHighlight()],
39+
},
2440
gfm: true,
2541
rehypePlugins: [
2642
rehypeSlug,
2743
[
2844
rehypeAutolinkHeadings,
2945
{ behavior: 'wrap', properties: { className: HEADING_LINK_ANCHOR } },
3046
],
47+
[targetBlank, { domain: websiteUrl }],
3148
],
3249
}),
3350
],

docs/package.json

+25-18
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,41 @@
1111
"astro": "astro"
1212
},
1313
"dependencies": {
14-
"@astrojs/check": "0.9.1",
15-
"@astrojs/mdx": "3.1.3",
16-
"@astrojs/react": "3.6.1",
17-
"@astrojs/tailwind": "5.1.0",
18-
"@radix-ui/react-dialog": "1.1.1",
19-
"@radix-ui/react-dropdown-menu": "2.1.1",
20-
"@radix-ui/react-icons": "1.3.0",
14+
"@astrojs/check": "0.9.4",
15+
"@astrojs/markdown-remark": "6.0.1",
16+
"@astrojs/mdx": "4.0.2",
17+
"@astrojs/react": "4.1.0",
18+
"@astrojs/tailwind": "5.1.3",
19+
"@astrojs/vercel": "8.0.0",
20+
"@radix-ui/react-dialog": "1.1.2",
21+
"@radix-ui/react-dropdown-menu": "2.1.2",
22+
"@radix-ui/react-icons": "1.3.2",
2123
"@radix-ui/react-slot": "1.1.0",
22-
"astro": "4.13.0",
24+
"astro": "5.0.5",
2325
"class-variance-authority": "0.7.0",
2426
"clsx": "2.1.1",
25-
"cmdk": "1.0.0",
26-
"fast-npm-meta": "0.0.1",
27+
"cmdk": "1.0.4",
28+
"fast-npm-meta": "0.2.2",
29+
"hast": "1.0.0",
2730
"js-confetti": "0.12.0",
28-
"lucide-react": "0.399.0",
31+
"lucide-react": "0.460.0",
2932
"react": "18.3.1",
3033
"react-dom": "18.3.1",
3134
"rehype-autolink-headings": "7.1.0",
3235
"rehype-slug": "6.0.0",
33-
"tailwind-merge": "2.3.0",
36+
"shiki": "1.24.2",
37+
"tailwind-merge": "2.5.4",
3438
"tailwindcss-animate": "1.0.7",
35-
"zustand": "4.5.4"
39+
"unist-util-visit": "5.0.0",
40+
"zustand": "5.0.1"
3641
},
3742
"devDependencies": {
38-
"@tailwindcss/typography": "0.5.13",
39-
"@types/react": "18.3.3",
40-
"@types/react-dom": "18.3.0",
41-
"tailwindcss": "3.4.7",
42-
"typescript": "5.5.4"
43+
"@shikijs/transformers": "1.24.0",
44+
"@tailwindcss/typography": "0.5.15",
45+
"@types/hast": "3.0.4",
46+
"@types/react": "18.3.12",
47+
"@types/react-dom": "18.3.1",
48+
"tailwindcss": "3.4.15",
49+
"typescript": "5.7.2"
4350
}
4451
}

docs/src/components/article.astro

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
import { proseClasses } from '@/ui/prose';
3+
import { cn } from '@/utils';
4+
5+
interface Props {
6+
title: string;
7+
description: string;
8+
hideHeader?: boolean;
9+
}
10+
11+
const { title, description, hideHeader } = Astro.props;
12+
---
13+
14+
<article class={cn(proseClasses, 'w-screen', hideHeader ? 'py-10' : 'py-6')}>
15+
{
16+
hideHeader ? null : (
17+
<div class="mt-4 mb-6 pb-5 flex flex-col space-y-2 border-b border-neutral-200 dark:border-neutral-800">
18+
<h1 class="text-4xl mt-0 tracking-tight font-semibold">{title}</h1>
19+
<p>{description}</p>
20+
</div>
21+
)
22+
}
23+
<slot />
24+
</article>

0 commit comments

Comments
 (0)