create-swift-rust 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1030 -39
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/default/src/app/about/page.tsx +6 -6
- package/templates/default/src/app/about/team/page.tsx +6 -6
- package/templates/default/src/app/blog/[slug]/page.tsx +24 -16
- package/templates/default/src/app/blog/page.tsx +36 -18
- package/templates/default/src/app/blog/tag/[tag]/page.tsx +8 -8
- package/templates/default/src/app/contact/page.tsx +8 -8
- package/templates/default/src/app/dashboard/analytics/page.tsx +12 -12
- package/templates/default/src/app/dashboard/loading.tsx +8 -8
- package/templates/default/src/app/dashboard/page.tsx +36 -27
- package/templates/default/src/app/dashboard/posts/[id]/not-found.tsx +2 -2
- package/templates/default/src/app/dashboard/posts/[id]/page.tsx +5 -5
- package/templates/default/src/app/dashboard/posts/new/page.tsx +15 -10
- package/templates/default/src/app/dashboard/posts/page.tsx +7 -7
- package/templates/default/src/app/dashboard/settings/page.tsx +39 -17
- package/templates/default/src/app/error.tsx +2 -2
- package/templates/default/src/app/fonts/page.tsx +39 -39
- package/templates/default/src/app/images/page.tsx +53 -15
- package/templates/default/src/app/layout.tsx +1 -1
- package/templates/default/src/app/loading.tsx +5 -5
- package/templates/default/src/app/not-found.tsx +2 -2
- package/templates/default/src/app/page.tsx +114 -72
- package/templates/default/src/app/videos/page.tsx +22 -22
- package/templates/default/src/components/font-studio.tsx +37 -37
- package/templates/default/src/components/footer.tsx +5 -5
- package/templates/default/src/components/logo.tsx +2 -2
- package/templates/default/src/components/nav.tsx +28 -10
- package/templates/default/src/components/sidebar.tsx +10 -10
- package/templates/default/tsconfig.json +0 -2
|
@@ -327,11 +327,11 @@ function ZimulaLadder() {
|
|
|
327
327
|
<div className="space-y-2.5">
|
|
328
328
|
{ZIMULA_WEIGHTS.map((w) => (
|
|
329
329
|
<div key={`${w.weight}-${w.style}`} className="flex items-baseline gap-4">
|
|
330
|
-
<span className="w-20 shrink-0 font-mono text-xs text-
|
|
330
|
+
<span className="w-20 shrink-0 font-mono text-xs text-fg-subtle">
|
|
331
331
|
{w.weight} {w.label}
|
|
332
332
|
</span>
|
|
333
333
|
<span
|
|
334
|
-
className="truncate text-
|
|
334
|
+
className="truncate text-fg"
|
|
335
335
|
style={{
|
|
336
336
|
fontFamily: ZIMULA_FAMILY(w.style),
|
|
337
337
|
fontWeight: w.weight,
|
|
@@ -367,12 +367,12 @@ export default function FontsPage() {
|
|
|
367
367
|
<span className="pulse-dot h-1.5 w-1.5 rounded-full bg-current" />
|
|
368
368
|
Typography
|
|
369
369
|
</div>
|
|
370
|
-
<h1 className="text-balance text-5xl font-semibold tracking-tight text-
|
|
370
|
+
<h1 className="text-balance text-5xl font-semibold tracking-tight text-fg sm:text-6xl">
|
|
371
371
|
Every font, every weight,
|
|
372
372
|
<br />
|
|
373
373
|
live in your browser.
|
|
374
374
|
</h1>
|
|
375
|
-
<p className="mx-auto mt-6 max-w-2xl text-pretty text-lg leading-relaxed text-
|
|
375
|
+
<p className="mx-auto mt-6 max-w-2xl text-pretty text-lg leading-relaxed text-fg-muted">
|
|
376
376
|
2,071 Google fonts and 8 local font families, all available as on-demand imports. Pick a
|
|
377
377
|
font, see it in action, and copy the import statement into your project.
|
|
378
378
|
</p>
|
|
@@ -385,10 +385,10 @@ export default function FontsPage() {
|
|
|
385
385
|
].map((s) => (
|
|
386
386
|
<div
|
|
387
387
|
key={s.l}
|
|
388
|
-
className="rounded-lg border border-
|
|
388
|
+
className="rounded-lg border border-border bg-surface p-4"
|
|
389
389
|
>
|
|
390
|
-
<dt className="font-mono text-2xl font-semibold text-
|
|
391
|
-
<dd className="mt-1 text-xs uppercase tracking-wider text-
|
|
390
|
+
<dt className="font-mono text-2xl font-semibold text-fg">{s.v}</dt>
|
|
391
|
+
<dd className="mt-1 text-xs uppercase tracking-wider text-fg-subtle">
|
|
392
392
|
{s.l}
|
|
393
393
|
</dd>
|
|
394
394
|
</div>
|
|
@@ -398,10 +398,10 @@ export default function FontsPage() {
|
|
|
398
398
|
|
|
399
399
|
<section className="mt-20">
|
|
400
400
|
<div className="mb-6 flex items-baseline justify-between">
|
|
401
|
-
<h2 className="text-2xl font-semibold tracking-tight text-
|
|
401
|
+
<h2 className="text-2xl font-semibold tracking-tight text-fg">
|
|
402
402
|
Live preview
|
|
403
403
|
</h2>
|
|
404
|
-
<span className="text-sm text-
|
|
404
|
+
<span className="text-sm text-fg-muted">
|
|
405
405
|
Type a name to load any of the 2,071 Google fonts.
|
|
406
406
|
</span>
|
|
407
407
|
</div>
|
|
@@ -410,20 +410,20 @@ export default function FontsPage() {
|
|
|
410
410
|
|
|
411
411
|
<section className="mt-24">
|
|
412
412
|
<div className="mb-2 flex items-baseline justify-between">
|
|
413
|
-
<h2 className="text-2xl font-semibold tracking-tight text-
|
|
413
|
+
<h2 className="text-2xl font-semibold tracking-tight text-fg">
|
|
414
414
|
Featured Google fonts
|
|
415
415
|
</h2>
|
|
416
|
-
<span className="text-sm text-
|
|
416
|
+
<span className="text-sm text-fg-muted">
|
|
417
417
|
25 of 2,071 — every one ships the same way.
|
|
418
418
|
</span>
|
|
419
419
|
</div>
|
|
420
|
-
<p className="mb-8 max-w-2xl text-
|
|
420
|
+
<p className="mb-8 max-w-2xl text-fg-muted">
|
|
421
421
|
These are the fonts most teams reach for. Use the search above to preview any of the
|
|
422
422
|
remaining 2,046.
|
|
423
423
|
</p>
|
|
424
424
|
{FEATURED_GROUPS.map((group) => (
|
|
425
425
|
<div key={group.name} className="mb-10">
|
|
426
|
-
<h3 className="mb-3 text-xs font-semibold uppercase tracking-wider text-
|
|
426
|
+
<h3 className="mb-3 text-xs font-semibold uppercase tracking-wider text-fg-subtle">
|
|
427
427
|
{group.name}
|
|
428
428
|
</h3>
|
|
429
429
|
<div className="grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3">
|
|
@@ -432,16 +432,16 @@ export default function FontsPage() {
|
|
|
432
432
|
return (
|
|
433
433
|
<div
|
|
434
434
|
key={f.name}
|
|
435
|
-
className="group flex flex-col gap-2 rounded-lg border border-
|
|
435
|
+
className="group flex flex-col gap-2 rounded-lg border border-border bg-surface p-5 transition-colors hover:border-border-strong"
|
|
436
436
|
style={font.style}
|
|
437
437
|
>
|
|
438
438
|
<div className="flex items-baseline justify-between gap-2">
|
|
439
|
-
<h4 className="text-sm font-medium text-
|
|
440
|
-
<span className="text-xs text-
|
|
439
|
+
<h4 className="text-sm font-medium text-fg">{f.name}</h4>
|
|
440
|
+
<span className="text-xs text-fg-subtle">{f.blurb}</span>
|
|
441
441
|
</div>
|
|
442
|
-
<div className="truncate text-2xl text-
|
|
442
|
+
<div className="truncate text-2xl text-fg">Beautiful type</div>
|
|
443
443
|
<code
|
|
444
|
-
className="mt-auto truncate font-mono text-[11px] text-
|
|
444
|
+
className="mt-auto truncate font-mono text-[11px] text-fg-muted"
|
|
445
445
|
style={{ fontFamily: "ui-monospace, monospace" }}
|
|
446
446
|
>
|
|
447
447
|
import {"{ "}
|
|
@@ -458,14 +458,14 @@ export default function FontsPage() {
|
|
|
458
458
|
|
|
459
459
|
<section className="mt-24">
|
|
460
460
|
<div className="mb-2 flex items-baseline justify-between">
|
|
461
|
-
<h2 className="text-2xl font-semibold tracking-tight text-
|
|
461
|
+
<h2 className="text-2xl font-semibold tracking-tight text-fg">
|
|
462
462
|
Local fonts
|
|
463
463
|
</h2>
|
|
464
|
-
<span className="text-sm text-
|
|
464
|
+
<span className="text-sm text-fg-muted">
|
|
465
465
|
8 families bundled in the framework.
|
|
466
466
|
</span>
|
|
467
467
|
</div>
|
|
468
|
-
<p className="mb-8 max-w-2xl text-
|
|
468
|
+
<p className="mb-8 max-w-2xl text-fg-muted">
|
|
469
469
|
Bundled in <code className="font-mono text-xs">packages/font/src/local/</code> and served
|
|
470
470
|
from <code className="font-mono text-xs">/_swift-rust/fonts/</code>. Use them when you
|
|
471
471
|
need exact control over weights or want to avoid a network round-trip.
|
|
@@ -478,22 +478,22 @@ export default function FontsPage() {
|
|
|
478
478
|
return (
|
|
479
479
|
<div
|
|
480
480
|
key={f.name}
|
|
481
|
-
className="flex flex-col gap-2 rounded-lg border border-
|
|
481
|
+
className="flex flex-col gap-2 rounded-lg border border-border bg-surface p-6"
|
|
482
482
|
style={font.style}
|
|
483
483
|
>
|
|
484
484
|
<div className="flex items-baseline justify-between gap-2">
|
|
485
|
-
<h4 className="text-sm font-medium text-
|
|
485
|
+
<h4 className="text-sm font-medium text-fg">{f.name}</h4>
|
|
486
486
|
<span
|
|
487
|
-
className="font-mono text-[11px] text-
|
|
487
|
+
className="font-mono text-[11px] text-fg-subtle"
|
|
488
488
|
style={{ fontFamily: "ui-monospace, monospace" }}
|
|
489
489
|
>
|
|
490
490
|
{f.weights}
|
|
491
491
|
</span>
|
|
492
492
|
</div>
|
|
493
|
-
<div className="text-3xl text-
|
|
494
|
-
<p className="text-xs text-
|
|
493
|
+
<div className="text-3xl text-fg">Aa Bb Cc 123</div>
|
|
494
|
+
<p className="text-xs text-fg-muted">{f.blurb}</p>
|
|
495
495
|
<code
|
|
496
|
-
className="mt-auto truncate font-mono text-[11px] text-
|
|
496
|
+
className="mt-auto truncate font-mono text-[11px] text-fg-muted"
|
|
497
497
|
style={{ fontFamily: "ui-monospace, monospace" }}
|
|
498
498
|
>
|
|
499
499
|
import {"{ "}
|
|
@@ -505,28 +505,28 @@ export default function FontsPage() {
|
|
|
505
505
|
})}
|
|
506
506
|
</div>
|
|
507
507
|
|
|
508
|
-
<div className="rounded-lg border border-
|
|
508
|
+
<div className="rounded-lg border border-border bg-surface p-6">
|
|
509
509
|
<div className="mb-4 flex items-baseline justify-between gap-2">
|
|
510
510
|
<div>
|
|
511
|
-
<h4 className="text-sm font-medium text-
|
|
512
|
-
<p className="mt-0.5 text-xs text-
|
|
511
|
+
<h4 className="text-sm font-medium text-fg">Zimula</h4>
|
|
512
|
+
<p className="mt-0.5 text-xs text-fg-muted">
|
|
513
513
|
Full weight ladder 100–900 in three styles (normal, ink-trap, ink-spot)
|
|
514
514
|
</p>
|
|
515
515
|
</div>
|
|
516
|
-
<span className="font-mono text-[11px] text-
|
|
516
|
+
<span className="font-mono text-[11px] text-fg-subtle">27 weights</span>
|
|
517
517
|
</div>
|
|
518
518
|
<ZimulaLadder />
|
|
519
|
-
<code className="mt-6 block truncate font-mono text-[11px] text-
|
|
519
|
+
<code className="mt-6 block truncate font-mono text-[11px] text-fg-muted">
|
|
520
520
|
import {"{ "}Zimula{" }"} from "swift-rust/font"
|
|
521
521
|
</code>
|
|
522
522
|
</div>
|
|
523
523
|
</section>
|
|
524
524
|
|
|
525
525
|
<section className="mt-24">
|
|
526
|
-
<h2 className="mb-2 text-2xl font-semibold tracking-tight text-
|
|
526
|
+
<h2 className="mb-2 text-2xl font-semibold tracking-tight text-fg">
|
|
527
527
|
How to use
|
|
528
528
|
</h2>
|
|
529
|
-
<p className="mb-8 max-w-2xl text-
|
|
529
|
+
<p className="mb-8 max-w-2xl text-fg-muted">
|
|
530
530
|
Three patterns cover almost every case. Drop them into your{" "}
|
|
531
531
|
<code className="font-mono text-xs">app/layout.tsx</code> and you're shipping.
|
|
532
532
|
</p>
|
|
@@ -597,12 +597,12 @@ function CodeBlock({
|
|
|
597
597
|
code: string;
|
|
598
598
|
}) {
|
|
599
599
|
return (
|
|
600
|
-
<div className="overflow-hidden rounded-lg border border-
|
|
601
|
-
<div className="flex items-center justify-between border-b border-
|
|
602
|
-
<span className="font-mono text-xs text-
|
|
603
|
-
<span className="text-xs text-
|
|
600
|
+
<div className="overflow-hidden rounded-lg border border-border bg-surface">
|
|
601
|
+
<div className="flex items-center justify-between border-b border-border bg-surface-2 px-4 py-2.5">
|
|
602
|
+
<span className="font-mono text-xs text-fg-muted">{filename}</span>
|
|
603
|
+
<span className="text-xs text-fg-subtle">{caption}</span>
|
|
604
604
|
</div>
|
|
605
|
-
<pre className="overflow-x-auto bg-
|
|
605
|
+
<pre className="overflow-x-auto bg-bg p-5 font-mono text-xs leading-relaxed text-fg">
|
|
606
606
|
<code>{code}</code>
|
|
607
607
|
</pre>
|
|
608
608
|
</div>
|
|
@@ -5,33 +5,71 @@ import { BLUR } from "@/lib/blur";
|
|
|
5
5
|
export const metadata: Metadata = { title: "Images" };
|
|
6
6
|
|
|
7
7
|
const IMAGES = [
|
|
8
|
-
{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
{
|
|
9
|
+
src: "/samples/axelborg-towers-modern-architecture.jpg",
|
|
10
|
+
alt: "Modern architecture towers",
|
|
11
|
+
w: 3456,
|
|
12
|
+
h: 2635,
|
|
13
|
+
label: "4:3",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
src: "/samples/full-shot-woman-taking-selfie.jpg",
|
|
17
|
+
alt: "Woman taking a selfie",
|
|
18
|
+
w: 5327,
|
|
19
|
+
h: 7990,
|
|
20
|
+
label: "2:3",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
src: "/samples/metaverse-concept-collage-design.jpg",
|
|
24
|
+
alt: "Metaverse concept collage",
|
|
25
|
+
w: 6000,
|
|
26
|
+
h: 4000,
|
|
27
|
+
label: "3:2",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
src: "/samples/happy-black-parents-with-kids-making-video-call-smart-phone-home.jpg",
|
|
31
|
+
alt: "Family on a video call at home",
|
|
32
|
+
w: 6000,
|
|
33
|
+
h: 4000,
|
|
34
|
+
label: "3:2",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
src: "/samples/brown-high-skyscrapers.jpg",
|
|
38
|
+
alt: "Tall brown skyscrapers",
|
|
39
|
+
w: 4000,
|
|
40
|
+
h: 5000,
|
|
41
|
+
label: "4:5",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
src: "/samples/close-up-portrait-gorgeous-young-woman.jpg",
|
|
45
|
+
alt: "Close-up portrait of a young woman",
|
|
46
|
+
w: 8494,
|
|
47
|
+
h: 5663,
|
|
48
|
+
label: "3:2",
|
|
49
|
+
},
|
|
14
50
|
];
|
|
15
51
|
|
|
16
52
|
export default function ImagesPage() {
|
|
17
53
|
return (
|
|
18
54
|
<div className="container-page py-16 sm:py-20">
|
|
19
|
-
<p className="text-[0.75rem] font-semibold uppercase tracking-wider text-
|
|
55
|
+
<p className="text-[0.75rem] font-semibold uppercase tracking-wider text-fg-subtle">
|
|
20
56
|
Showcase
|
|
21
57
|
</p>
|
|
22
|
-
<h1 className="mt-2 text-4xl font-semibold tracking-tight sm:text-5xl">
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
58
|
+
<h1 className="mt-2 text-4xl font-semibold tracking-tight sm:text-5xl">
|
|
59
|
+
Images
|
|
60
|
+
</h1>
|
|
61
|
+
<p className="mt-4 max-w-2xl text-fg-muted">
|
|
62
|
+
The Image component handles sizing, format negotiation, and lazy
|
|
63
|
+
loading. These are local sample photos — replace with your own.
|
|
26
64
|
</p>
|
|
27
65
|
|
|
28
66
|
<div className="mt-12 grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
|
29
67
|
{IMAGES.map((img) => (
|
|
30
68
|
<figure
|
|
31
69
|
key={img.src}
|
|
32
|
-
className="group overflow-hidden rounded-2xl border border-
|
|
70
|
+
className="group overflow-hidden rounded-2xl border border-border bg-surface"
|
|
33
71
|
>
|
|
34
|
-
<div className="relative aspect-
|
|
72
|
+
<div className="relative aspect-4/3 overflow-hidden bg-surface-2">
|
|
35
73
|
<Image
|
|
36
74
|
src={img.src}
|
|
37
75
|
alt={img.alt}
|
|
@@ -42,8 +80,8 @@ export default function ImagesPage() {
|
|
|
42
80
|
className="h-full w-full object-cover transition-transform duration-500 group-hover:scale-105"
|
|
43
81
|
/>
|
|
44
82
|
</div>
|
|
45
|
-
<figcaption className="flex items-center justify-between border-t border-
|
|
46
|
-
<span className="font-mono text-
|
|
83
|
+
<figcaption className="flex items-center justify-between border-t border-border px-4 py-3 text-[0.8125rem]">
|
|
84
|
+
<span className="font-mono text-fg-muted">
|
|
47
85
|
{img.src.split("/").pop()}
|
|
48
86
|
</span>
|
|
49
87
|
<span className="badge">{img.label}</span>
|
|
@@ -34,7 +34,7 @@ export default function RootLayout({ children }: { children: ReactNode }) {
|
|
|
34
34
|
["--font-mono" as string]: "'Geist Mono', ui-monospace, monospace",
|
|
35
35
|
}}
|
|
36
36
|
>
|
|
37
|
-
<body className="min-h-screen bg-
|
|
37
|
+
<body className="min-h-screen bg-bg font-sans text-fg antialiased">
|
|
38
38
|
<Nav />
|
|
39
39
|
<main className="min-h-[calc(100vh-3.5rem)]">{children}</main>
|
|
40
40
|
<Footer />
|
|
@@ -2,11 +2,11 @@ export default function GlobalLoading() {
|
|
|
2
2
|
return (
|
|
3
3
|
<div className="container-page py-20">
|
|
4
4
|
<div className="mx-auto max-w-md space-y-4">
|
|
5
|
-
<div className="h-3 w-24 animate-pulse rounded bg-
|
|
6
|
-
<div className="h-9 w-72 animate-pulse rounded bg-
|
|
7
|
-
<div className="h-4 w-96 animate-pulse rounded bg-
|
|
8
|
-
<div className="h-4 w-80 animate-pulse rounded bg-
|
|
9
|
-
<div className="mt-8 h-40 w-full animate-pulse rounded-2xl bg-
|
|
5
|
+
<div className="h-3 w-24 animate-pulse rounded bg-surface-2" />
|
|
6
|
+
<div className="h-9 w-72 animate-pulse rounded bg-surface-2" />
|
|
7
|
+
<div className="h-4 w-96 animate-pulse rounded bg-surface-2" />
|
|
8
|
+
<div className="h-4 w-80 animate-pulse rounded bg-surface-2" />
|
|
9
|
+
<div className="mt-8 h-40 w-full animate-pulse rounded-2xl bg-surface-2" />
|
|
10
10
|
</div>
|
|
11
11
|
</div>
|
|
12
12
|
);
|
|
@@ -4,11 +4,11 @@ export default function GlobalNotFound() {
|
|
|
4
4
|
return (
|
|
5
5
|
<div className="container-page py-24 sm:py-32">
|
|
6
6
|
<div className="mx-auto max-w-xl text-center">
|
|
7
|
-
<p className="font-mono text-[0.875rem] font-medium text-
|
|
7
|
+
<p className="font-mono text-[0.875rem] font-medium text-accent">404</p>
|
|
8
8
|
<h1 className="mt-3 text-balance text-5xl font-semibold tracking-tight sm:text-6xl">
|
|
9
9
|
Page not found.
|
|
10
10
|
</h1>
|
|
11
|
-
<p className="mt-5 text-pretty text-lg leading-relaxed text-
|
|
11
|
+
<p className="mt-5 text-pretty text-lg leading-relaxed text-fg-muted">
|
|
12
12
|
The page you were looking for has moved, was renamed, or never existed.
|
|
13
13
|
</p>
|
|
14
14
|
<div className="mt-8 flex justify-center gap-2">
|