Skip to content

Commit 21f58bd

Browse files
committed
wip
1 parent d7b5742 commit 21f58bd

18 files changed

+1130
-1973
lines changed

apps/www/content/docs/(plugins)/(ai)/ai.mdx

Lines changed: 2 additions & 1084 deletions
Large diffs are not rendered by default.

apps/www/public/tailwind.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/www/src/app/(app)/editors/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ export default async function BlocksPage() {
2727
<div className="gap-3 md:flex md:flex-row-reverse md:items-start">
2828
<div className="grid flex-1 gap-12 md:gap-24 lg:gap-48">
2929
{blocks.map((block) => (
30-
<BlockDisplay key={block.name} item={block} />
30+
<BlockDisplay name={block.name} key={block.name} />
3131
))}
3232

3333
<div className="relative scroll-m-16 pb-48">
34-
<BlockDisplay item={potionBlock} />
34+
<BlockDisplay name={potionBlock.name} />
3535
</div>
3636
</div>
3737
</div>

apps/www/src/app/globals.css

Lines changed: 147 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
@import "tailwindcss";
22
@import "tw-animate-css";
3-
3+
@import 'shadcn-prose';
44
@import "./themes.css";
55

6-
@custom-variant dark (&:is(.dark *));
6+
@plugin 'tailwind-scrollbar-hide';
77

8+
@custom-variant dark (&:is(.dark *));
89
@custom-variant fixed (&:is(.layout-fixed *));
910

1011
@theme inline {
11-
--breakpoint-3xl: 1600px;
12-
--breakpoint-4xl: 2000px;
13-
--font-sans: var(--font-sans);
14-
--font-mono: var(--font-mono);
1512
--radius-sm: calc(var(--radius) - 4px);
1613
--radius-md: calc(var(--radius) - 2px);
1714
--radius-lg: var(--radius);
@@ -39,6 +36,9 @@
3936
--color-chart-3: var(--chart-3);
4037
--color-chart-4: var(--chart-4);
4138
--color-chart-5: var(--chart-5);
39+
40+
--breakpoint-3xl: 1600px;
41+
--breakpoint-4xl: 2000px;
4242
--color-sidebar: var(--sidebar);
4343
--color-sidebar-foreground: var(--sidebar-foreground);
4444
--color-sidebar-primary: var(--sidebar-primary);
@@ -49,12 +49,26 @@
4949
--color-sidebar-ring: var(--sidebar-ring);
5050
--color-surface: var(--surface);
5151
--color-surface-foreground: var(--surface-foreground);
52-
--color-code: var(--code);
53-
--color-code-foreground: var(--code-foreground);
52+
--color-code: var(--surface);
53+
--color-code-foreground: var(--surface-foreground);
5454
--color-code-highlight: var(--code-highlight);
5555
--color-code-number: var(--code-number);
5656
--color-selection: var(--selection);
5757
--color-selection-foreground: var(--selection-foreground);
58+
59+
--color-brand: var(--brand);
60+
--color-highlight: var(--highlight);
61+
62+
--font-heading: 'var(--font-heading)', 'ui-sans-serif', '-apple-system',
63+
'BlinkMacSystemFont', 'Segoe UI Variable Display', 'Segoe UI', 'Helvetica',
64+
'Apple Color Emoji', 'Arial', 'sans-serif', 'Segoe UI Emoji',
65+
'Segoe UI Symbol', 'Noto Color Emoji';
66+
--font-mono: 'var(--font-mono)', ui-monospace, SFMono-Regular, Menlo, Monaco,
67+
Consolas, 'Liberation Mono', 'Courier New', monospace;
68+
--font-sans: 'var(--font-sans)', 'ui-sans-serif', '-apple-system',
69+
'BlinkMacSystemFont', 'Segoe UI Variable Display', 'Segoe UI', 'Helvetica',
70+
'Apple Color Emoji', 'Arial', 'sans-serif', 'Segoe UI Emoji',
71+
'Segoe UI Symbol', 'Noto Color Emoji';
5872
}
5973

6074
:root {
@@ -98,6 +112,16 @@
98112
--code-number: oklch(0.56 0 0);
99113
--selection: oklch(0.145 0 0);
100114
--selection-foreground: oklch(1 0 0);
115+
116+
/* Blue color scale */
117+
--color-blue-300: oklch(0.778 0.108 231.731);
118+
--color-blue-500: oklch(0.623 0.214 259.815);
119+
--color-blue-600: oklch(0.549 0.234 260.011);
120+
--color-blue-700: oklch(0.488 0.243 264.376);
121+
--color-blue-800: oklch(0.419 0.243 267.218);
122+
123+
--brand: oklch(0.623 0.214 259.815); /* Blue 500 */
124+
--highlight: oklch(0.852 0.199 91.936); /* Yellow 400 */
101125
}
102126

103127
.dark {
@@ -140,19 +164,24 @@
140164
--code-number: oklch(0.72 0 0);
141165
--selection: oklch(0.922 0 0);
142166
--selection-foreground: oklch(0.205 0 0);
167+
168+
--brand: oklch(0.707 0.165 254.624); /* Blue 400 */
169+
--highlight: oklch(0.852 0.199 91.936); /* Yellow 400 */
143170
}
144171

145172
@layer base {
146173
* {
147174
@apply border-border outline-ring/50;
148175
}
149-
::selection {
176+
/* ::selection {
150177
@apply bg-selection text-selection-foreground;
151-
}
152-
html {
178+
} */
179+
/* html {
153180
@apply scroll-smooth;
154-
}
181+
} */
155182
body {
183+
@apply overscroll-none bg-background text-foreground;
184+
/* font-feature-settings: "rlig" 1, "calt" 1; */
156185
font-synthesis-weight: none;
157186
text-rendering: optimizeLegibility;
158187
}
@@ -167,6 +196,30 @@
167196
button:active {
168197
@apply opacity-60 md:opacity-100;
169198
}
199+
200+
/* Custom scrollbar styling (remove after sync). */
201+
::-webkit-scrollbar {
202+
width: 5px;
203+
}
204+
::-webkit-scrollbar-track {
205+
background: transparent;
206+
}
207+
::-webkit-scrollbar-thumb {
208+
background: hsl(var(--border));
209+
border-radius: 5px;
210+
}
211+
* {
212+
scrollbar-width: thin;
213+
scrollbar-color: hsl(var(--border)) transparent;
214+
}
215+
216+
/* Custom prose styling (remove after sync). */
217+
.prose {
218+
--tw-prose-body: var(--foreground);
219+
--tw-prose-bold: inherit;
220+
--tw-prose-links: inherit;
221+
--tw-prose-bullets: var(--foreground);
222+
}
170223
}
171224

172225
@utility border-grid {
@@ -182,11 +235,15 @@
182235
}
183236

184237
@utility container-wrapper {
185-
@apply 3xl:fixed:max-w-[calc(var(--breakpoint-2xl)+2rem)] mx-auto w-full px-2;
238+
/* @apply 3xl:fixed:max-w-[calc(var(--breakpoint-2xl)+2rem)] mx-auto w-full px-2; */
239+
240+
@apply px-2 mx-auto w-full max-w-[calc(var(--breakpoint-xl)+2rem)];
186241
}
187242

188243
@utility container {
189-
@apply 3xl:max-w-screen-2xl mx-auto max-w-[1400px] px-4 lg:px-8;
244+
/* @apply 3xl:max-w-screen-2xl mx-auto max-w-[1400px] px-4 lg:px-8; */
245+
246+
@apply mx-auto max-w-[calc(var(--breakpoint-xl)+2rem)] px-4 xl:px-6;
190247
}
191248

192249
@utility no-scrollbar {
@@ -248,15 +305,17 @@
248305
font-size: var(--text-sm);
249306
outline: none;
250307
position: relative;
251-
@apply md:-mx-1;
308+
@apply md:-mx-4;
252309

253310
&:has([data-rehype-pretty-code-title]) [data-slot="copy-button"] {
254311
top: calc(var(--spacing) * 1.5) !important;
255312
}
256313
}
257314

258315
[data-rehype-pretty-code-title] {
259-
border-bottom: 1px solid color-mix(in oklab, var(--border) 30%, transparent);
316+
border-bottom: color-mix(in oklab, var(--border) 30%, transparent);
317+
border-bottom-width: 1px;
318+
border-bottom-style: solid;
260319
padding-block: calc(var(--spacing) * 2.5);
261320
padding-inline: calc(var(--spacing) * 4);
262321
font-size: var(--text-sm);
@@ -339,3 +398,75 @@
339398
font-size: 0.8rem;
340399
}
341400
}
401+
402+
/* MDX (remove after sync). */
403+
404+
@layer base {
405+
[data-theme='light'] {
406+
display: block;
407+
}
408+
409+
[data-theme='dark'] {
410+
display: none;
411+
}
412+
413+
.dark [data-theme='light'] {
414+
display: none;
415+
}
416+
417+
.dark [data-theme='dark'] {
418+
display: block;
419+
}
420+
421+
[data-rehype-pretty-code-fragment] {
422+
@apply relative text-white;
423+
}
424+
425+
[data-rehype-pretty-code-fragment] code {
426+
@apply grid min-w-full rounded-none border-0 bg-transparent p-0 break-words;
427+
counter-reset: line;
428+
box-decoration-break: clone;
429+
}
430+
431+
[data-rehype-pretty-code-fragment] .line {
432+
@apply inline-block min-h-[1rem] w-full px-4 py-0.5;
433+
}
434+
435+
[data-rehype-pretty-code-fragment] [data-line-numbers] .line {
436+
@apply px-2;
437+
}
438+
439+
[data-rehype-pretty-code-fragment] [data-line-numbers] > .line::before {
440+
@apply text-xs text-zinc-50/40;
441+
counter-increment: line;
442+
content: counter(line);
443+
display: inline-block;
444+
width: 1.8rem;
445+
margin-right: 1.4rem;
446+
text-align: right;
447+
}
448+
449+
[data-rehype-pretty-code-fragment] .line--highlighted {
450+
@apply bg-zinc-700/50;
451+
}
452+
453+
[data-rehype-pretty-code-fragment] .line-highlighted span {
454+
@apply relative;
455+
}
456+
457+
[data-rehype-pretty-code-fragment] .word--highlighted {
458+
@apply rounded-md border-zinc-700/70 bg-zinc-700/50 p-1;
459+
}
460+
461+
.dark [data-rehype-pretty-code-fragment] .word--highlighted {
462+
@apply bg-zinc-900;
463+
}
464+
465+
[data-rehype-pretty-code-title] {
466+
@apply mt-2 px-4 pt-6 text-sm font-medium text-foreground;
467+
}
468+
469+
[data-rehype-pretty-code-title] + pre {
470+
@apply !mt-2;
471+
}
472+
}

apps/www/src/app/themes.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@
219219
box-shadow: none;
220220
}
221221

222-
[data-slot="toggle-group"],
223-
[data-slot="toggle-group-item"] {
222+
[data-slot='toggle-group'],
223+
[data-slot='toggle-group-item'] {
224224
@apply !rounded-none !shadow-none;
225225
}
226226
}
@@ -248,18 +248,18 @@
248248
--spacing: 0.2rem;
249249
}
250250

251-
[data-slot="select-trigger"],
252-
[data-slot="toggle-group-item"] {
251+
[data-slot='select-trigger'],
252+
[data-slot='toggle-group-item'] {
253253
--spacing: 0.2rem;
254254
}
255255

256-
[data-slot="card"] {
256+
[data-slot='card'] {
257257
border-radius: var(--radius);
258258
padding-block: calc(var(--spacing) * 4);
259259
gap: calc(var(--spacing) * 2);
260260
}
261261

262-
[data-slot="card"].pb-0 {
262+
[data-slot='card'].pb-0 {
263263
padding-bottom: 0;
264264
}
265265
}

0 commit comments

Comments
 (0)