@atom63/create 0.0.0-stage → 0.1.0-beta.2

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.
Files changed (89) hide show
  1. package/LICENSE +27 -0
  2. package/README.md +70 -2
  3. package/package.json +27 -3
  4. package/src/generate.mjs +281 -0
  5. package/src/index.mjs +64 -0
  6. package/starter/app/AGENTS.md +17 -0
  7. package/starter/app/README.md +40 -0
  8. package/starter/app/src/app.ts +4 -0
  9. package/starter/app/src/components/app-layout.tsx +49 -0
  10. package/starter/app/src/components/appearance-settings.tsx +87 -0
  11. package/starter/app/src/pages/not-found.tsx +30 -0
  12. package/starter/app/src/router.tsx +79 -0
  13. package/starter/app/src/styles.css +31 -0
  14. package/starter/app/vite.config.ts +10 -0
  15. package/starter/base/_gitignore +4 -0
  16. package/starter/base/components.json +21 -0
  17. package/starter/base/index.html +12 -0
  18. package/starter/base/src/lib/utils.ts +7 -0
  19. package/starter/base/src/main.tsx +21 -0
  20. package/starter/base/src/theme.tsx +89 -0
  21. package/starter/base/tsconfig.json +21 -0
  22. package/starter/content/AGENTS.md +16 -0
  23. package/starter/content/README.md +35 -0
  24. package/starter/content/src/components/site-footer.tsx +9 -0
  25. package/starter/content/src/components/site-header.tsx +32 -0
  26. package/starter/content/src/mdx.d.ts +7 -0
  27. package/starter/content/src/styles.css +32 -0
  28. package/starter/content/vite.config.ts +25 -0
  29. package/starter/docs/src/components/docs-sidebar.tsx +35 -0
  30. package/starter/docs/src/content/docs/installation.mdx +22 -0
  31. package/starter/docs/src/content/docs/introduction.mdx +22 -0
  32. package/starter/docs/src/content/docs/writing-pages.mdx +36 -0
  33. package/starter/docs/src/content/docs.ts +60 -0
  34. package/starter/docs/src/pages/doc-page.tsx +57 -0
  35. package/starter/docs/src/pages/home.tsx +39 -0
  36. package/starter/docs/src/pages/not-found.tsx +30 -0
  37. package/starter/docs/src/router.tsx +86 -0
  38. package/starter/docs/src/site.ts +7 -0
  39. package/starter/portfolio/AGENTS.md +28 -0
  40. package/starter/portfolio/README.md +152 -0
  41. package/starter/portfolio/public/plates/hero.svg +40 -0
  42. package/starter/portfolio/public/projects/front-desk-scheduling/calendar.svg +30 -0
  43. package/starter/portfolio/public/projects/front-desk-scheduling/cover.svg +28 -0
  44. package/starter/portfolio/public/projects/ledger-design-system/cover.svg +13 -0
  45. package/starter/portfolio/public/projects/night-trip-planner/cover.svg +19 -0
  46. package/starter/portfolio/public/projects/night-trip-planner/flow.svg +34 -0
  47. package/starter/portfolio/src/components/mdx-components.tsx +25 -0
  48. package/starter/portfolio/src/components/project-card.tsx +32 -0
  49. package/starter/portfolio/src/components/site-footer.tsx +33 -0
  50. package/starter/portfolio/src/components/site-header.tsx +124 -0
  51. package/starter/portfolio/src/components/site-layout.tsx +62 -0
  52. package/starter/portfolio/src/content/projects/front-desk-scheduling.mdx +47 -0
  53. package/starter/portfolio/src/content/projects/ledger-design-system.mdx +40 -0
  54. package/starter/portfolio/src/content/projects/night-trip-planner.mdx +51 -0
  55. package/starter/portfolio/src/content/projects.ts +43 -0
  56. package/starter/portfolio/src/content/resume.ts +80 -0
  57. package/starter/portfolio/src/content/timeline.ts +69 -0
  58. package/starter/portfolio/src/content/writing/a-design-system-for-one.mdx +21 -0
  59. package/starter/portfolio/src/content/writing/case-studies-that-show-the-work.mdx +24 -0
  60. package/starter/portfolio/src/content/writing/designing-for-interruptions.mdx +23 -0
  61. package/starter/portfolio/src/content/writing.ts +37 -0
  62. package/starter/portfolio/src/modules/assistant/answers.ts +60 -0
  63. package/starter/portfolio/src/modules/assistant/assistant.tsx +107 -0
  64. package/starter/portfolio/src/modules/assistant/transport.ts +36 -0
  65. package/starter/portfolio/src/modules/dock/dock.tsx +141 -0
  66. package/starter/portfolio/src/modules/slides/decks.ts +49 -0
  67. package/starter/portfolio/src/modules/slides/slides-pages.tsx +128 -0
  68. package/starter/portfolio/src/modules/widgets/widget-board.tsx +121 -0
  69. package/starter/portfolio/src/pages/home.tsx +139 -0
  70. package/starter/portfolio/src/pages/not-found.tsx +30 -0
  71. package/starter/portfolio/src/pages/project-page.tsx +102 -0
  72. package/starter/portfolio/src/pages/projects-index.tsx +39 -0
  73. package/starter/portfolio/src/pages/resume.tsx +97 -0
  74. package/starter/portfolio/src/pages/timeline.tsx +89 -0
  75. package/starter/portfolio/src/pages/writing-index.tsx +64 -0
  76. package/starter/portfolio/src/pages/writing-post.tsx +43 -0
  77. package/starter/portfolio/src/portfolio.config.ts +88 -0
  78. package/starter/portfolio/src/router.tsx +113 -0
  79. package/starter/portfolio/src/styles.css +38 -0
  80. package/starter/site/src/content/blog/hello-world.mdx +25 -0
  81. package/starter/site/src/content/blog/writing-with-mdx.mdx +29 -0
  82. package/starter/site/src/content/posts.ts +37 -0
  83. package/starter/site/src/pages/blog-index.tsx +60 -0
  84. package/starter/site/src/pages/blog-post.tsx +43 -0
  85. package/starter/site/src/pages/home.tsx +143 -0
  86. package/starter/site/src/pages/not-found.tsx +30 -0
  87. package/starter/site/src/router.tsx +82 -0
  88. package/starter/site/src/site.ts +7 -0
  89. package/versions.json +27 -0
@@ -0,0 +1,87 @@
1
+ import { type Theme, themes } from '@atom63/ui-foundation'
2
+ import { type Atom63ThemeMode, Label, Radio, RadioGroup } from '@atom63/ui-react'
3
+ import { useId } from 'react'
4
+
5
+ import { SettingsSection } from '../templates/blocks/settings-section/settings-section'
6
+ import { themeLabels, useAppearance } from '../theme'
7
+
8
+ type Option = { label: string; value: string }
9
+
10
+ /* One labelled choice: the row's label and description name the radio group. */
11
+ function ChoiceRow({
12
+ description,
13
+ label,
14
+ onValueChange,
15
+ options,
16
+ value,
17
+ }: {
18
+ description: string
19
+ label: string
20
+ onValueChange: (value: string) => void
21
+ options: Option[]
22
+ value: string
23
+ }) {
24
+ const labelId = useId()
25
+ const descriptionId = useId()
26
+ const optionId = useId()
27
+ return (
28
+ <div className="flex flex-col gap-3 p-4 sm:flex-row sm:items-start sm:justify-between sm:gap-4">
29
+ <div className="flex min-w-0 flex-col gap-1">
30
+ <span className="text-foreground text-sm font-medium" id={labelId}>
31
+ {label}
32
+ </span>
33
+ <span className="text-muted-foreground text-sm" id={descriptionId}>
34
+ {description}
35
+ </span>
36
+ </div>
37
+ <RadioGroup
38
+ aria-describedby={descriptionId}
39
+ aria-labelledby={labelId}
40
+ onValueChange={next => onValueChange(String(next))}
41
+ value={value}
42
+ >
43
+ {options.map(option => (
44
+ <div className="flex items-center gap-2" key={option.value}>
45
+ <Radio id={`${optionId}-${option.value}`} value={option.value} />
46
+ <Label className="text-sm" htmlFor={`${optionId}-${option.value}`}>
47
+ {option.label}
48
+ </Label>
49
+ </div>
50
+ ))}
51
+ </RadioGroup>
52
+ </div>
53
+ )
54
+ }
55
+
56
+ /*
57
+ * The app's appearance, in settings so every width can reach it (the top bar
58
+ * shows the same switches from `sm` up). It changes the theme and mode that
59
+ * src/theme.tsx applies through Atom63Theme.
60
+ */
61
+ export function AppearanceSettings() {
62
+ const { mode, setMode, setTheme, theme } = useAppearance()
63
+ return (
64
+ <SettingsSection
65
+ description="How the app looks on this device. It is remembered in this browser."
66
+ title="Appearance"
67
+ >
68
+ <ChoiceRow
69
+ description="The system's look: color, type and shape."
70
+ label="Theme"
71
+ onValueChange={value => setTheme(value as Theme)}
72
+ options={themes.map(value => ({ label: themeLabels[value], value }))}
73
+ value={theme}
74
+ />
75
+ <ChoiceRow
76
+ description="Light or dark surfaces."
77
+ label="Mode"
78
+ onValueChange={value => setMode(value as Atom63ThemeMode)}
79
+ options={[
80
+ { label: 'Light', value: 'light' },
81
+ { label: 'Dark', value: 'dark' },
82
+ ]}
83
+ value={mode}
84
+ />
85
+ </SettingsSection>
86
+ )
87
+ }
@@ -0,0 +1,30 @@
1
+ import {
2
+ Button,
3
+ Empty,
4
+ EmptyContent,
5
+ EmptyDescription,
6
+ EmptyHeader,
7
+ EmptyTitle,
8
+ } from '@atom63/ui-react'
9
+ import { Container, Page } from '@atom63/ui-react/layout'
10
+ import { Link } from '@tanstack/react-router'
11
+
12
+ export function NotFoundPage() {
13
+ return (
14
+ <Page>
15
+ <Container maxWidth="narrow">
16
+ <Empty>
17
+ <EmptyHeader>
18
+ <EmptyTitle aria-level={1}>Page not found</EmptyTitle>
19
+ <EmptyDescription>
20
+ The page you are looking for does not exist or has moved.
21
+ </EmptyDescription>
22
+ </EmptyHeader>
23
+ <EmptyContent>
24
+ <Button render={<Link to="/" />}>Go to the overview</Button>
25
+ </EmptyContent>
26
+ </Empty>
27
+ </Container>
28
+ </Page>
29
+ )
30
+ }
@@ -0,0 +1,79 @@
1
+ import {
2
+ createRootRoute,
3
+ createRoute,
4
+ createRouter,
5
+ Outlet,
6
+ ScrollRestoration,
7
+ } from '@tanstack/react-router'
8
+
9
+ import { AppLayout } from './components/app-layout'
10
+ import { AppearanceSettings } from './components/appearance-settings'
11
+ import { NotFoundPage } from './pages/not-found'
12
+ import { DashboardContent } from './templates/pages/dashboard-page/dashboard-page'
13
+ import { ListContent } from './templates/pages/list-page/list-page'
14
+ import { OnboardingContent } from './templates/pages/onboarding-page/onboarding-page'
15
+ import { SettingsContent } from './templates/pages/settings-page/settings-page'
16
+ import { SignInPage } from './templates/pages/sign-in-page/sign-in-page'
17
+
18
+ const rootRoute = createRootRoute({
19
+ component: () => (
20
+ <>
21
+ <ScrollRestoration />
22
+ <Outlet />
23
+ </>
24
+ ),
25
+ notFoundComponent: NotFoundPage,
26
+ })
27
+
28
+ /* The signed-in pages share the app shell through this pathless layout route. */
29
+ const shellRoute = createRoute({
30
+ getParentRoute: () => rootRoute,
31
+ id: 'shell',
32
+ component: AppLayout,
33
+ })
34
+
35
+ const overviewRoute = createRoute({
36
+ getParentRoute: () => shellRoute,
37
+ path: '/',
38
+ component: DashboardContent,
39
+ })
40
+ const invoicesRoute = createRoute({
41
+ getParentRoute: () => shellRoute,
42
+ path: '/invoices',
43
+ component: () => <ListContent />,
44
+ })
45
+ const settingsRoute = createRoute({
46
+ getParentRoute: () => shellRoute,
47
+ path: '/settings',
48
+ // The template's sections, then the app's own appearance settings.
49
+ component: () => (
50
+ <SettingsContent>
51
+ <AppearanceSettings />
52
+ </SettingsContent>
53
+ ),
54
+ })
55
+ const welcomeRoute = createRoute({
56
+ getParentRoute: () => shellRoute,
57
+ path: '/welcome',
58
+ component: OnboardingContent,
59
+ })
60
+
61
+ /* Sign-in sits outside the shell. The page is the template's; wire it to your auth. */
62
+ const signInRoute = createRoute({
63
+ getParentRoute: () => rootRoute,
64
+ path: '/sign-in',
65
+ component: () => <SignInPage />,
66
+ })
67
+
68
+ export const router = createRouter({
69
+ routeTree: rootRoute.addChildren([
70
+ shellRoute.addChildren([overviewRoute, invoicesRoute, settingsRoute, welcomeRoute]),
71
+ signInRoute,
72
+ ]),
73
+ })
74
+
75
+ declare module '@tanstack/react-router' {
76
+ interface Register {
77
+ router: typeof router
78
+ }
79
+ }
@@ -0,0 +1,31 @@
1
+ @import 'tailwindcss';
2
+
3
+ /* The Atom63 token stack. --a63-* tokens are the source of truth; the Tailwind
4
+ theme maps utilities onto them (bg-background, text-muted-foreground, …), and
5
+ the shadcn bridge gives components added with `npx shadcn add` the same
6
+ colors, radius and modes. */
7
+ @import '@atom63/styles';
8
+ @import '@atom63/styles/tailwind';
9
+ @import '@atom63/styles/compat/shadcn';
10
+
11
+ /* Component recipes. */
12
+ @import '@atom63/ui-react/reset.css';
13
+ @import '@atom63/ui-react/recipes.css';
14
+
15
+ /* Generate the utilities the Atom63 components use. */
16
+ @source '../node_modules/@atom63/ui-react/dist';
17
+
18
+ /* Atom63Theme puts the mode on a class, so `dark:` and `light:` utilities
19
+ (including those in shadcn components) follow it, not the OS setting. */
20
+ @custom-variant light (&:not(.dark *));
21
+ @custom-variant dark (&:is(.dark *));
22
+
23
+ @layer base {
24
+ html,
25
+ body,
26
+ #root {
27
+ min-height: 100%;
28
+ background-color: var(--a63-surface-page);
29
+ color: var(--a63-text-primary);
30
+ }
31
+ }
@@ -0,0 +1,10 @@
1
+ import tailwindcss from '@tailwindcss/vite'
2
+ import react from '@vitejs/plugin-react'
3
+ import { defineConfig } from 'vite'
4
+
5
+ export default defineConfig({
6
+ plugins: [react(), tailwindcss()],
7
+ resolve: {
8
+ dedupe: ['react', 'react-dom'],
9
+ },
10
+ })
@@ -0,0 +1,4 @@
1
+ node_modules
2
+ dist
3
+ *.local
4
+ .DS_Store
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "new-york",
4
+ "rsc": false,
5
+ "tsx": true,
6
+ "tailwind": {
7
+ "config": "",
8
+ "css": "src/styles.css",
9
+ "baseColor": "neutral",
10
+ "cssVariables": true,
11
+ "prefix": ""
12
+ },
13
+ "aliases": {
14
+ "components": "@/components",
15
+ "utils": "@/lib/utils",
16
+ "ui": "@/components/ui",
17
+ "lib": "@/lib",
18
+ "hooks": "@/hooks"
19
+ },
20
+ "iconLibrary": "lucide"
21
+ }
@@ -0,0 +1,12 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
6
+ <title>{{title}}</title>
7
+ </head>
8
+ <body>
9
+ <div id="root"></div>
10
+ <script type="module" src="/src/main.tsx"></script>
11
+ </body>
12
+ </html>
@@ -0,0 +1,7 @@
1
+ import { type ClassValue, clsx } from 'clsx'
2
+ import { twMerge } from 'tailwind-merge'
3
+
4
+ /** Merge class names; shadcn components import this as `@/lib/utils`. */
5
+ export function cn(...inputs: ClassValue[]): string {
6
+ return twMerge(clsx(inputs))
7
+ }
@@ -0,0 +1,21 @@
1
+ import './styles.css'
2
+
3
+ import { RouterProvider } from '@tanstack/react-router'
4
+ import { StrictMode } from 'react'
5
+ import { createRoot } from 'react-dom/client'
6
+
7
+ import { router } from './router'
8
+ import { ThemeProvider } from './theme'
9
+
10
+ const root = document.getElementById('root')
11
+ if (!root) {
12
+ throw new Error('Missing #root element')
13
+ }
14
+
15
+ createRoot(root).render(
16
+ <StrictMode>
17
+ <ThemeProvider>
18
+ <RouterProvider router={router} />
19
+ </ThemeProvider>
20
+ </StrictMode>
21
+ )
@@ -0,0 +1,89 @@
1
+ import { type Theme, themes } from '@atom63/ui-foundation'
2
+ import { Atom63Theme, type Atom63ThemeMode, SegmentedControl } from '@atom63/ui-react'
3
+ import { createContext, type ReactNode, useContext, useEffect, useState } from 'react'
4
+
5
+ type ThemeState = {
6
+ mode: Atom63ThemeMode
7
+ setMode: (mode: Atom63ThemeMode) => void
8
+ setTheme: (theme: Theme) => void
9
+ theme: Theme
10
+ }
11
+
12
+ const ThemeContext = createContext<ThemeState | null>(null)
13
+ const storageKey = 'atom63-appearance'
14
+
15
+ function readStored(): { mode?: Atom63ThemeMode; theme?: Theme } {
16
+ try {
17
+ return JSON.parse(localStorage.getItem(storageKey) ?? '{}')
18
+ } catch {
19
+ return {}
20
+ }
21
+ }
22
+
23
+ function systemMode(): Atom63ThemeMode {
24
+ return window.matchMedia?.('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
25
+ }
26
+
27
+ /**
28
+ * Mode and theme for the whole app. Atom63Theme sets the attributes every
29
+ * token reads, so components never branch on light or dark themselves.
30
+ */
31
+ export function ThemeProvider({ children }: { children: ReactNode }) {
32
+ const [mode, setMode] = useState<Atom63ThemeMode>(() => readStored().mode ?? systemMode())
33
+ const [theme, setTheme] = useState<Theme>(() => readStored().theme ?? 'modern')
34
+
35
+ useEffect(() => {
36
+ try {
37
+ localStorage.setItem(storageKey, JSON.stringify({ mode, theme }))
38
+ } catch {
39
+ // Private windows can refuse storage; the choice then lasts for the visit.
40
+ }
41
+ }, [mode, theme])
42
+
43
+ return (
44
+ <ThemeContext.Provider value={{ mode, setMode, setTheme, theme }}>
45
+ <Atom63Theme className="bg-background text-foreground min-h-screen" mode={mode} theme={theme}>
46
+ {children}
47
+ </Atom63Theme>
48
+ </ThemeContext.Provider>
49
+ )
50
+ }
51
+
52
+ export function useAppearance(): ThemeState {
53
+ const state = useContext(ThemeContext)
54
+ if (!state) {
55
+ throw new Error('useAppearance must be used inside ThemeProvider')
56
+ }
57
+ return state
58
+ }
59
+
60
+ export const themeLabels: Record<Theme, string> = {
61
+ aqua: 'Aqua',
62
+ modern: 'Modern',
63
+ retro: 'Retro',
64
+ terminal: 'Terminal',
65
+ }
66
+
67
+ /** The mode and theme switches, so every axis is visible from the first run. */
68
+ export function AppearanceControls() {
69
+ const { mode, setMode, setTheme, theme } = useAppearance()
70
+ return (
71
+ <div className="flex flex-wrap items-center gap-2">
72
+ <SegmentedControl
73
+ items={themes.map(value => ({ label: themeLabels[value], value }))}
74
+ onValueChange={value => setTheme(value as Theme)}
75
+ size="sm"
76
+ value={theme}
77
+ />
78
+ <SegmentedControl
79
+ items={[
80
+ { label: 'Light', value: 'light' },
81
+ { label: 'Dark', value: 'dark' },
82
+ ]}
83
+ onValueChange={value => setMode(value as Atom63ThemeMode)}
84
+ size="sm"
85
+ value={mode}
86
+ />
87
+ </div>
88
+ )
89
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "jsx": "react-jsx",
8
+ "types": ["vite/client"],
9
+ "strict": true,
10
+ "noEmit": true,
11
+ "skipLibCheck": true,
12
+ "isolatedModules": true,
13
+ "verbatimModuleSyntax": true,
14
+ "noUnusedLocals": true,
15
+ "noUnusedParameters": true,
16
+ "paths": {
17
+ "@/*": ["./src/*"]
18
+ }
19
+ },
20
+ "include": ["src", "vite.config.ts"]
21
+ }
@@ -0,0 +1,16 @@
1
+ This app is built on the Atom63 design system. Components come from `@atom63/ui-react`, tokens
2
+ from `@atom63/styles`, and long-form content from `@atom63/mdx`.
3
+
4
+ ## Project
5
+
6
+ - `pnpm dev` runs the site; `pnpm typecheck` and `pnpm build` must pass before a change is done.
7
+ - Routes live in `src/router.tsx`, pages in `src/pages`, and shared pieces in `src/components`.
8
+ A site page is a child of `siteRoute`, which draws the header and footer; a full-window page,
9
+ such as an AppView, is a child of `rootRoute` and draws no site chrome.
10
+ - Content is MDX in `src/content`. The file name is the slug; the frontmatter fields are the ones
11
+ the loader next to the folder reads (`posts.ts` or `docs.ts`).
12
+ - Mode and theme are set once in `src/theme.tsx` through `Atom63Theme`. Style with tokens and the
13
+ Tailwind utilities mapped onto them (`bg-background`, `text-muted-foreground`, `border-border`).
14
+ - `npx shadcn add <component>` works (see `components.json`). Use it only for something the design
15
+ system does not offer; its components pick up the same tokens through the shadcn bridge.
16
+
@@ -0,0 +1,35 @@
1
+ # {{title}}
2
+
3
+ A site built on the [Atom63 design system](https://system.atom63.io): React, Tailwind CSS and MDX,
4
+ with every color, space and radius coming from the system's tokens.
5
+
6
+ ```bash
7
+ pnpm install
8
+ pnpm dev
9
+ ```
10
+
11
+ | Command | What it does |
12
+ | --- | --- |
13
+ | `pnpm dev` | Start the dev server |
14
+ | `pnpm build` | Typecheck and build to `dist/` |
15
+ | `pnpm typecheck` | Typecheck only |
16
+ | `pnpm preview` | Serve the built site |
17
+
18
+ ## Where things are
19
+
20
+ - `src/site.ts`: the site title and tagline.
21
+ - `src/pages`: the pages. `src/router.tsx` maps them to routes.
22
+ - `src/content`: the MDX content. Add a file to publish a post or page.
23
+ - `src/theme.tsx`: mode and theme, applied through `Atom63Theme` and remembered per browser.
24
+ - `src/styles.css`: Tailwind, the token stack and the component styles.
25
+
26
+ ## Using the design system
27
+
28
+ Prefer components from `@atom63/ui-react`; the [component docs](https://system.atom63.io) list
29
+ them with their contracts. Tailwind utilities such as `bg-background` and `text-muted-foreground`
30
+ resolve to the same tokens, so custom layout follows every theme and mode.
31
+
32
+ For something the system does not offer, `npx shadcn add <component>` works in this project. The
33
+ shadcn bridge maps shadcn's variables onto the Atom63 tokens, so added components match.
34
+
35
+ `AGENTS.md` tells coding agents how to use the design system here.
@@ -0,0 +1,9 @@
1
+ export function SiteFooter({ title }: { title: string }) {
2
+ return (
3
+ <footer className="border-border border-t">
4
+ <div className="text-muted-foreground mx-auto max-w-5xl px-6 py-8 text-sm">
5
+ {title} · Built with the Atom63 design system
6
+ </div>
7
+ </footer>
8
+ )
9
+ }
@@ -0,0 +1,32 @@
1
+ import { Link } from '@tanstack/react-router'
2
+
3
+ import { AppearanceControls } from '../theme'
4
+
5
+ export type NavItem = { label: string; to: string }
6
+
7
+ export function SiteHeader({ nav, title }: { nav: NavItem[]; title: string }) {
8
+ return (
9
+ <header className="border-border border-b">
10
+ <div className="mx-auto flex max-w-5xl flex-wrap items-center justify-between gap-4 px-6 py-4">
11
+ <div className="flex items-center gap-6">
12
+ <Link className="font-semibold" to="/">
13
+ {title}
14
+ </Link>
15
+ <nav aria-label="Main" className="flex items-center gap-4 text-sm">
16
+ {nav.map(item => (
17
+ <Link
18
+ activeProps={{ 'aria-current': 'page', className: 'text-foreground' }}
19
+ className="text-muted-foreground hover:text-foreground transition-colors"
20
+ key={item.to}
21
+ to={item.to}
22
+ >
23
+ {item.label}
24
+ </Link>
25
+ ))}
26
+ </nav>
27
+ </div>
28
+ <AppearanceControls />
29
+ </div>
30
+ </header>
31
+ )
32
+ }
@@ -0,0 +1,7 @@
1
+ declare module '*.mdx' {
2
+ import type { ComponentType } from 'react'
3
+
4
+ export const frontmatter: Record<string, unknown>
5
+ const Content: ComponentType
6
+ export default Content
7
+ }
@@ -0,0 +1,32 @@
1
+ @import 'tailwindcss';
2
+
3
+ /* The Atom63 token stack. --a63-* tokens are the source of truth; the Tailwind
4
+ theme maps utilities onto them (bg-background, text-muted-foreground, …), and
5
+ the shadcn bridge gives components added with `npx shadcn add` the same
6
+ colors, radius and modes. */
7
+ @import '@atom63/styles';
8
+ @import '@atom63/styles/tailwind';
9
+ @import '@atom63/styles/compat/shadcn';
10
+
11
+ /* Component recipes and the MDX prose styles. */
12
+ @import '@atom63/ui-react/reset.css';
13
+ @import '@atom63/ui-react/recipes.css';
14
+ @import '@atom63/mdx/styles/a63.css';
15
+
16
+ /* Generate the utilities the Atom63 components use. */
17
+ @source '../node_modules/@atom63/ui-react/dist';
18
+
19
+ /* Atom63Theme puts the mode on a class, so `dark:` and `light:` utilities
20
+ (including those in shadcn components) follow it, not the OS setting. */
21
+ @custom-variant light (&:not(.dark *));
22
+ @custom-variant dark (&:is(.dark *));
23
+
24
+ @layer base {
25
+ html,
26
+ body,
27
+ #root {
28
+ min-height: 100%;
29
+ background-color: var(--a63-surface-page);
30
+ color: var(--a63-text-primary);
31
+ }
32
+ }
@@ -0,0 +1,25 @@
1
+ import mdx from '@mdx-js/rollup'
2
+ import tailwindcss from '@tailwindcss/vite'
3
+ import react from '@vitejs/plugin-react'
4
+ import remarkFrontmatter from 'remark-frontmatter'
5
+ import remarkGfm from 'remark-gfm'
6
+ import remarkMdxFrontmatter from 'remark-mdx-frontmatter'
7
+ import { defineConfig } from 'vite'
8
+
9
+ export default defineConfig({
10
+ plugins: [
11
+ // MDX first, so its output goes through the React plugin like any other component.
12
+ {
13
+ enforce: 'pre',
14
+ ...mdx({
15
+ providerImportSource: '@mdx-js/react',
16
+ remarkPlugins: [remarkFrontmatter, remarkMdxFrontmatter, remarkGfm],
17
+ }),
18
+ },
19
+ react({ include: /\.(mdx|tsx?)$/ }),
20
+ tailwindcss(),
21
+ ],
22
+ resolve: {
23
+ dedupe: ['react', 'react-dom'],
24
+ },
25
+ })
@@ -0,0 +1,35 @@
1
+ import {
2
+ Sidebar,
3
+ SidebarContent,
4
+ SidebarNavGroup,
5
+ SidebarNavLinkItem,
6
+ SidebarProvider,
7
+ } from '@atom63/ui-react'
8
+ import { Link, useRouterState } from '@tanstack/react-router'
9
+
10
+ import { groups } from '../content/docs'
11
+
12
+ /** Navigation built from the content folder: one group per `group`, one link per page. */
13
+ export function DocsSidebar() {
14
+ const pathname = useRouterState({ select: state => state.location.pathname })
15
+ return (
16
+ <SidebarProvider className="min-h-0 w-auto">
17
+ {/* Transparent, so the column reads as part of the page rather than a panel. */}
18
+ <Sidebar className="bg-transparent" collapsible="none">
19
+ <SidebarContent>
20
+ {groups.map(group => (
21
+ <SidebarNavGroup key={group.name} label={group.name}>
22
+ {group.docs.map(doc => (
23
+ <SidebarNavLinkItem isActive={pathname === `/docs/${doc.slug}`} key={doc.slug}>
24
+ <Link params={{ slug: doc.slug }} to="/docs/$slug">
25
+ {doc.title}
26
+ </Link>
27
+ </SidebarNavLinkItem>
28
+ ))}
29
+ </SidebarNavGroup>
30
+ ))}
31
+ </SidebarContent>
32
+ </Sidebar>
33
+ </SidebarProvider>
34
+ )
35
+ }
@@ -0,0 +1,22 @@
1
+ ---
2
+ title: Installation
3
+ description: Run the docs locally and build them for production.
4
+ group: Getting started
5
+ order: 2
6
+ ---
7
+
8
+ ## Run locally
9
+
10
+ ```bash
11
+ pnpm install
12
+ pnpm dev
13
+ ```
14
+
15
+ ## Build
16
+
17
+ ```bash
18
+ pnpm build
19
+ ```
20
+
21
+ The output goes to `dist/`. Serve it from any static host, and route unknown paths to
22
+ `index.html` so deep links work.
@@ -0,0 +1,22 @@
1
+ ---
2
+ title: Introduction
3
+ description: What these docs cover and how they are organized.
4
+ group: Getting started
5
+ order: 1
6
+ ---
7
+
8
+ These docs are MDX files in `src/content/docs`. Each file is a page: the file name is its slug,
9
+ and its frontmatter sets the title, description, sidebar group and order.
10
+
11
+ ## How the sidebar works
12
+
13
+ Pages with the same `group` appear together, and `order` sorts them inside the group. The groups
14
+ follow the list in `src/content/docs.ts`; new groups come after it.
15
+
16
+ ## Reading straight through
17
+
18
+ Every page links to the one before and after it, in the same order as the sidebar.
19
+
20
+ <Callout type="info">
21
+ Replace these pages with your own. Keep one page per task or concept.
22
+ </Callout>