@autono/create-open-pages 0.1.0 → 0.3.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.
Files changed (94) hide show
  1. package/README.md +6 -3
  2. package/dist/cli.js +1 -1
  3. package/package.json +1 -1
  4. package/template/.agents/skills/apply-comments/SKILL.md +4 -4
  5. package/template/.agents/skills/create-page/SKILL.md +26 -8
  6. package/template/.agents/skills/create-theme/SKILL.md +137 -150
  7. package/template/.agents/skills/current-page/SKILL.md +1 -1
  8. package/template/.agents/skills/page-authoring/SKILL.md +97 -42
  9. package/template/.agents/skills/page-authoring/references/interactivity.md +70 -22
  10. package/template/.agents/skills/page-authoring/references/layout-and-responsive.md +38 -17
  11. package/template/.agents/skills/page-authoring/references/typography-and-color.md +50 -32
  12. package/template/.agents/skills/shadcn/SKILL.md +277 -0
  13. package/template/.agents/skills/shadcn/assets/shadcn-small.png +0 -0
  14. package/template/.agents/skills/shadcn/assets/shadcn.png +0 -0
  15. package/template/.agents/skills/shadcn/cli.md +290 -0
  16. package/template/.agents/skills/shadcn/customization.md +209 -0
  17. package/template/.agents/skills/shadcn/mcp.md +105 -0
  18. package/template/.agents/skills/shadcn/registry.md +277 -0
  19. package/template/.agents/skills/shadcn/rules/base-vs-radix.md +306 -0
  20. package/template/.agents/skills/shadcn/rules/chat.md +224 -0
  21. package/template/.agents/skills/shadcn/rules/composition.md +213 -0
  22. package/template/.agents/skills/shadcn/rules/forms.md +192 -0
  23. package/template/.agents/skills/shadcn/rules/icons.md +101 -0
  24. package/template/.agents/skills/shadcn/rules/styling.md +185 -0
  25. package/template/AGENTS.md +7 -4
  26. package/template/README.md +21 -4
  27. package/template/components.json +9 -0
  28. package/template/hooks/use-mobile.ts +19 -0
  29. package/template/lib/utils.ts +6 -0
  30. package/template/package.json +24 -2
  31. package/template/pages/getting-started/index.tsx +51 -45
  32. package/template/styles/globals.css +118 -0
  33. package/template/tsconfig.json +13 -2
  34. package/template/ui/accordion.tsx +64 -0
  35. package/template/ui/alert-dialog.tsx +196 -0
  36. package/template/ui/alert.tsx +66 -0
  37. package/template/ui/aspect-ratio.tsx +11 -0
  38. package/template/ui/attachment.tsx +204 -0
  39. package/template/ui/avatar.tsx +107 -0
  40. package/template/ui/badge.tsx +48 -0
  41. package/template/ui/breadcrumb.tsx +109 -0
  42. package/template/ui/bubble.tsx +125 -0
  43. package/template/ui/button-group.tsx +83 -0
  44. package/template/ui/button.tsx +64 -0
  45. package/template/ui/calendar.tsx +218 -0
  46. package/template/ui/card.tsx +92 -0
  47. package/template/ui/carousel.tsx +241 -0
  48. package/template/ui/chart.tsx +374 -0
  49. package/template/ui/checkbox.tsx +32 -0
  50. package/template/ui/collapsible.tsx +31 -0
  51. package/template/ui/combobox.tsx +308 -0
  52. package/template/ui/command.tsx +182 -0
  53. package/template/ui/context-menu.tsx +252 -0
  54. package/template/ui/dialog.tsx +156 -0
  55. package/template/ui/direction.tsx +22 -0
  56. package/template/ui/drawer.tsx +133 -0
  57. package/template/ui/dropdown-menu.tsx +257 -0
  58. package/template/ui/empty.tsx +104 -0
  59. package/template/ui/field.tsx +246 -0
  60. package/template/ui/form.tsx +167 -0
  61. package/template/ui/hover-card.tsx +42 -0
  62. package/template/ui/input-group.tsx +170 -0
  63. package/template/ui/input-otp.tsx +77 -0
  64. package/template/ui/input.tsx +21 -0
  65. package/template/ui/item.tsx +193 -0
  66. package/template/ui/kbd.tsx +28 -0
  67. package/template/ui/label.tsx +22 -0
  68. package/template/ui/marker.tsx +69 -0
  69. package/template/ui/menubar.tsx +276 -0
  70. package/template/ui/message-scroller.tsx +128 -0
  71. package/template/ui/message.tsx +92 -0
  72. package/template/ui/native-select.tsx +62 -0
  73. package/template/ui/navigation-menu.tsx +168 -0
  74. package/template/ui/pagination.tsx +127 -0
  75. package/template/ui/popover.tsx +87 -0
  76. package/template/ui/progress.tsx +31 -0
  77. package/template/ui/radio-group.tsx +43 -0
  78. package/template/ui/resizable.tsx +53 -0
  79. package/template/ui/scroll-area.tsx +56 -0
  80. package/template/ui/select.tsx +190 -0
  81. package/template/ui/separator.tsx +26 -0
  82. package/template/ui/sheet.tsx +143 -0
  83. package/template/ui/sidebar.tsx +726 -0
  84. package/template/ui/skeleton.tsx +13 -0
  85. package/template/ui/slider.tsx +61 -0
  86. package/template/ui/sonner.tsx +40 -0
  87. package/template/ui/spinner.tsx +16 -0
  88. package/template/ui/switch.tsx +33 -0
  89. package/template/ui/table.tsx +116 -0
  90. package/template/ui/tabs.tsx +89 -0
  91. package/template/ui/textarea.tsx +18 -0
  92. package/template/ui/toggle-group.tsx +81 -0
  93. package/template/ui/toggle.tsx +47 -0
  94. package/template/ui/tooltip.tsx +55 -0
@@ -1,20 +1,23 @@
1
1
  # open-pages — Agent Guide
2
2
 
3
- You are authoring **web pages** in this repo. Every page is a React component rendered as a real web page — HTML JSX styled with Tailwind via `className`, with hooks, state, and browser APIs available. A page folder can hold an `index.html` instead when plain HTML is the better fit.
3
+ You are authoring **web pages** in this repo. Every page is a React component rendered as a real web page — composed from the shadcn/ui components under `ui/`, styled with Tailwind via `className`, with hooks, state, and browser APIs available. A page folder can hold an `index.html` instead when plain HTML is the better fit.
4
4
 
5
5
  ## Hard rules
6
6
 
7
7
  - Put your page under `pages/<kebab-case-id>/`.
8
8
  - The entry is `pages/<id>/index.tsx` (or `pages/<id>/index.html`).
9
9
  - A page is its entry plus optional `components/`, `styles.css`, and `assets/` (images, fonts) inside its folder. Shared assets live in the root `assets/` folder (import via `@assets/...`).
10
- - Do **not** touch `package.json`, `open-pages.config.ts`, or other pages.
11
- - Do not add dependencies. Use only `react`, `react-dom`, and standard web APIs.
10
+ - Use the shadcn components first: `import { Button } from '@/ui/button'`, `cn` from `@/lib/utils`. Use the semantic token classes (`bg-background`, `text-muted-foreground`, `bg-primary`) so themes apply.
11
+ - Do **not** edit files under `ui/`, `lib/`, or `hooks/` for one page. They are shared by every page; wrap or extend a component inside the page instead.
12
+ - Do **not** touch `package.json`, `open-pages.config.ts`, `components.json`, `styles/globals.css`, or other pages.
13
+ - Do not add dependencies beyond what is installed. `npx shadcn@latest add` is fine for blocks and registry items.
12
14
 
13
15
  ## Which skill to use
14
16
 
15
17
  - **Drafting a new page** — use the `create-page` skill. It walks through scoping questions, structure, and hand-off.
16
18
  - **Applying inspector comments** (`@page-comment` markers in a page) — use the `apply-comments` skill.
17
- - **Creating or extracting a theme** — use the `create-theme` skill. Themes live as markdown under `themes/<id>.md` (with a `<id>.demo.tsx` preview) and are read by `create-page` before authoring.
19
+ - **Creating or extracting a theme** — use the `create-theme` skill. A theme is `themes/<id>.md` plus `themes/<id>.css` (shadcn token overrides) and a `<id>.demo.tsx` preview; `create-page` reads it before authoring and a page opts in with `meta.theme`.
20
+ - **shadcn CLI, registries, presets, component docs** — the bundled `shadcn` skill (the official one) covers `npx shadcn@latest search / view / docs / add / apply`.
18
21
  - **Resolving "this page" / "this element"** — when the user references the current page or selection without naming it, consult the `current-page` skill. It reads the dev server's `node_modules/.open-pages/current.json` to find which page and inspector-picked element they mean.
19
22
  - **Any other page edit** — read the `page-authoring` skill before writing. It is the technical reference for everything inside `pages/<id>/`: file contract, styling with Tailwind, layout and responsiveness, interactivity, assets and fonts, self-review checklist. `create-page` and `apply-comments` both defer to it for the *how*.
20
23
 
@@ -1,6 +1,17 @@
1
1
  # open-pages workspace
2
2
 
3
- Web pages as React components. Each page lives under `pages/<id>/index.tsx` and default-exports one component. The `@autono/open-pages` runtime handles Vite, React, Tailwind, the live preview, and the inspector — you just write the page.
3
+ Web pages as React components. Each page lives under `pages/<id>/index.tsx` and default-exports one component, composed from the shadcn/ui set that ships under `ui/`. The `@autono/open-pages` runtime handles Vite, React, the live preview, and the inspector — you just write the page.
4
+
5
+ ```
6
+ pages/ one folder per page
7
+ ui/ all shadcn/ui components (import from @/ui/*)
8
+ lib/utils.ts cn()
9
+ hooks/ use-mobile
10
+ styles/globals.css Tailwind v4 + shadcn tokens (:root / .dark)
11
+ themes/ <id>.md + <id>.css + <id>.demo.tsx
12
+ assets/ shared assets (import via @assets/...)
13
+ components.json shadcn config
14
+ ```
4
15
 
5
16
  ## Getting started
6
17
 
@@ -27,6 +38,7 @@ Then open `http://localhost:5173`, edit `pages/getting-started/index.tsx`, or cr
27
38
  ```tsx
28
39
  // pages/my-page/index.tsx
29
40
  import type { PageMeta } from '@autono/open-pages';
41
+ import { Button } from '@/ui/button';
30
42
 
31
43
  export const meta: PageMeta = {
32
44
  title: 'My page',
@@ -35,15 +47,16 @@ export const meta: PageMeta = {
35
47
 
36
48
  export default function MyPage() {
37
49
  return (
38
- <main className="mx-auto max-w-2xl px-6 py-24">
50
+ <main className="min-h-screen bg-background px-6 py-24 text-foreground">
39
51
  <h1 className="text-4xl font-bold tracking-tight">Hello</h1>
40
- <p className="mt-4 text-slate-600">Tailwind via className, hooks, state, all of it.</p>
52
+ <p className="mt-4 text-muted-foreground">shadcn components, Tailwind, hooks, all of it.</p>
53
+ <Button className="mt-8">Get started</Button>
41
54
  </main>
42
55
  );
43
56
  }
44
57
  ```
45
58
 
46
- A page is a real web page: Tailwind v4 utilities via `className` work out of the box, `import './styles.css'` for custom CSS, hooks and event handlers for interactivity. Put images and fonts under `pages/<id>/assets/` and import them; shared assets go in the root `assets/` folder and import via `@assets/...`.
59
+ A page is a real web page: every shadcn component is importable from `@/ui/<name>`, Tailwind v4 utilities via `className` work out of the box (prefer the token classes: `bg-background`, `text-muted-foreground`, `bg-primary`), `import './styles.css'` for custom CSS, hooks and event handlers for interactivity. `npx shadcn@latest add <block>` still works for blocks and other registries. Put images and fonts under `pages/<id>/assets/` and import them; shared assets go in the root `assets/` folder and import via `@assets/...`.
47
60
 
48
61
  A folder holding an `index.html` (with sibling CSS/JS) instead of `index.tsx` works too. It is served as-is and exported the same way.
49
62
 
@@ -74,3 +87,7 @@ export default openPagesConfig;
74
87
  ```
75
88
 
76
89
  Supported fields: `pagesDir`, `themesDir`, `assetsDir`, `port`, `base`, `allowedHosts`, `build`.
90
+
91
+ ## Themes
92
+
93
+ A theme is `themes/<id>.md` (direction for the agent), `themes/<id>.css` (`:root` / `.dark` overrides of the shadcn tokens, optionally a Google Fonts `@import`), and `themes/<id>.demo.tsx` (a demo page). Set `meta.theme: '<id>'` on a page and the runtime injects that CSS into its preview and export. `npx shadcn@latest apply <code> --only theme,font` from [ui.shadcn.com/create](https://ui.shadcn.com/create) is a quick way to produce the tokens.
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "new-york",
4
+ "rsc": false,
5
+ "tsx": true,
6
+ "tailwind": { "config": "", "css": "styles/globals.css", "baseColor": "neutral", "cssVariables": true, "prefix": "" },
7
+ "iconLibrary": "lucide",
8
+ "aliases": { "components": "@/components", "ui": "@/ui", "lib": "@/lib", "utils": "@/lib/utils", "hooks": "@/hooks" }
9
+ }
@@ -0,0 +1,19 @@
1
+ import * as React from "react"
2
+
3
+ const MOBILE_BREAKPOINT = 768
4
+
5
+ export function useIsMobile() {
6
+ const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)
7
+
8
+ React.useEffect(() => {
9
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)
10
+ const onChange = () => {
11
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
12
+ }
13
+ mql.addEventListener("change", onChange)
14
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
15
+ return () => mql.removeEventListener("change", onChange)
16
+ }, [])
17
+
18
+ return !!isMobile
19
+ }
@@ -0,0 +1,6 @@
1
+ import { clsx, type ClassValue } from "clsx"
2
+ import { twMerge } from "tailwind-merge"
3
+
4
+ export function cn(...inputs: ClassValue[]) {
5
+ return twMerge(clsx(inputs))
6
+ }
@@ -14,11 +14,33 @@
14
14
  "dependencies": {
15
15
  "@autono/open-pages": "^0.0.6",
16
16
  "react": "^18.3.1",
17
- "react-dom": "^18.3.1"
17
+ "react-dom": "^18.3.1",
18
+ "@base-ui/react": "^1.7.0",
19
+ "@hookform/resolvers": "^5.9.1",
20
+ "@shadcn/react": "^0.3.0",
21
+ "class-variance-authority": "^0.7.1",
22
+ "clsx": "^2.1.1",
23
+ "cmdk": "^1.1.1",
24
+ "date-fns": "^4.4.0",
25
+ "embla-carousel-react": "^8.6.0",
26
+ "input-otp": "^1.5.0",
27
+ "lucide-react": "^1.35.0",
28
+ "next-themes": "^0.4.6",
29
+ "radix-ui": "^1.6.7",
30
+ "react-day-picker": "^10.0.1",
31
+ "react-hook-form": "^7.86.0",
32
+ "react-resizable-panels": "^4.12.3",
33
+ "recharts": "3.8.0",
34
+ "sonner": "^2.0.8",
35
+ "tailwind-merge": "^3.6.0",
36
+ "vaul": "^1.1.2",
37
+ "zod": "^4.5.1"
18
38
  },
19
39
  "devDependencies": {
20
40
  "@types/react": "^18.3.12",
21
41
  "@types/react-dom": "^18.3.1",
22
- "vite": "^5.4.10"
42
+ "vite": "^5.4.10",
43
+ "tailwindcss": "^4.2.2",
44
+ "typescript": "^5.9.3"
23
45
  }
24
46
  }
@@ -1,5 +1,8 @@
1
1
  import type { PageMeta } from '@autono/open-pages';
2
- import { useState } from 'react';
2
+ import { Badge } from '@/ui/badge';
3
+ import { Button } from '@/ui/button';
4
+ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/ui/card';
5
+ import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/ui/tabs';
3
6
 
4
7
  export const meta: PageMeta = {
5
8
  title: 'Welcome to open-pages',
@@ -9,81 +12,84 @@ export const meta: PageMeta = {
9
12
 
10
13
  const steps = [
11
14
  {
15
+ id: 'describe',
12
16
  title: 'Describe',
13
17
  body: 'Tell your agent what the page is. It runs /create-page and writes the React.',
14
18
  },
15
19
  {
20
+ id: 'preview',
16
21
  title: 'Preview',
17
- body: 'This workspace renders the real page in a real browser tab on every save.',
22
+ body: 'This workspace renders the real page in a real browser frame on every save.',
18
23
  },
19
24
  {
25
+ id: 'annotate',
20
26
  title: 'Annotate',
21
27
  body: 'Press i, click anything, leave a note. It lands in the source as a comment marker.',
22
28
  },
23
29
  {
30
+ id: 'ship',
24
31
  title: 'Ship',
25
32
  body: 'Your agent runs /apply-comments. open-pages export writes a static folder you can deploy anywhere.',
26
33
  },
27
34
  ];
28
35
 
29
36
  export default function GettingStarted() {
30
- const [active, setActive] = useState(0);
31
-
32
37
  return (
33
- <main className="min-h-screen bg-white text-slate-900 antialiased">
38
+ <main className="min-h-screen bg-background text-foreground antialiased">
34
39
  <section className="mx-auto max-w-3xl px-6 pt-24 pb-16">
35
- <span className="text-xs font-semibold uppercase tracking-[0.2em] text-indigo-600">
36
- open-pages
37
- </span>
40
+ <Badge variant="secondary">open-pages</Badge>
38
41
  <h1 className="mt-4 text-5xl font-bold leading-[1.05] tracking-tight">
39
42
  The web page framework built for agents
40
43
  </h1>
41
- <p className="mt-6 max-w-xl text-lg leading-relaxed text-slate-600">
44
+ <p className="mt-6 max-w-xl text-lg leading-relaxed text-muted-foreground">
42
45
  This page is a React component at{' '}
43
- <code className="rounded bg-slate-100 px-1.5 py-0.5 font-mono text-[0.9em]">
46
+ <code className="rounded bg-muted px-1.5 py-0.5 font-mono text-[0.9em]">
44
47
  pages/getting-started/index.tsx
45
48
  </code>
46
- . Your coding agent writes it, the workspace previews it live, and the export is plain
47
- HTML, CSS, and JS.
49
+ . Every shadcn/ui component is already installed under <code>ui/</code>. Your agent
50
+ composes them, the workspace previews the result live, and the export is plain HTML, CSS,
51
+ and JS.
48
52
  </p>
53
+ <div className="mt-8 flex gap-3">
54
+ <Button>Primary action</Button>
55
+ <Button variant="outline">Secondary</Button>
56
+ <Button variant="ghost">Ghost</Button>
57
+ </div>
49
58
  </section>
50
59
 
51
60
  <section className="mx-auto max-w-3xl px-6 pb-24">
52
- <div className="grid gap-3 sm:grid-cols-4">
53
- {steps.map((step, i) => (
54
- <button
55
- key={step.title}
56
- type="button"
57
- onClick={() => setActive(i)}
58
- aria-pressed={active === i}
59
- className={
60
- active === i
61
- ? 'rounded-lg border border-indigo-600 bg-indigo-600 px-4 py-3 text-left text-white'
62
- : 'rounded-lg border border-slate-200 px-4 py-3 text-left transition-colors hover:border-slate-400'
63
- }
64
- >
65
- <span className="block font-mono text-xs opacity-60">0{i + 1}</span>
66
- <span className="mt-1 block font-semibold">{step.title}</span>
67
- </button>
61
+ <Tabs defaultValue="describe">
62
+ <TabsList>
63
+ {steps.map((step, i) => (
64
+ <TabsTrigger key={step.id} value={step.id}>
65
+ <span className="font-mono text-xs opacity-60">0{i + 1}</span>
66
+ {step.title}
67
+ </TabsTrigger>
68
+ ))}
69
+ </TabsList>
70
+ {steps.map((step) => (
71
+ <TabsContent key={step.id} value={step.id}>
72
+ <p className="mt-4 min-h-[3.5rem] text-base leading-relaxed">{step.body}</p>
73
+ </TabsContent>
68
74
  ))}
69
- </div>
70
- <p className="mt-6 min-h-[3.5rem] text-base leading-relaxed text-slate-700">
71
- {steps[active].body}
72
- </p>
75
+ </Tabs>
73
76
 
74
- <div className="mt-16 rounded-xl bg-slate-50 p-6">
75
- <h2 className="text-sm font-semibold uppercase tracking-wider text-slate-500">
76
- Try the loop
77
- </h2>
78
- <ol className="mt-3 space-y-2 text-slate-700">
79
- <li>1. Change any text in this file and watch the preview update.</li>
80
- <li>2. Switch the viewport to mobile in the toolbar. The layout is responsive.</li>
81
- <li>
82
- 3. Ask your agent for something bigger: a landing page, a pricing table, a whole new
83
- page with <code className="font-mono">/create-page</code>.
84
- </li>
85
- </ol>
86
- </div>
77
+ <Card className="mt-16">
78
+ <CardHeader>
79
+ <CardTitle>Try the loop</CardTitle>
80
+ <CardDescription>Three things to do in the next two minutes.</CardDescription>
81
+ </CardHeader>
82
+ <CardContent>
83
+ <ol className="space-y-2 text-muted-foreground">
84
+ <li>1. Change any text in this file and watch the preview update.</li>
85
+ <li>2. Switch the viewport to mobile in the toolbar. The layout is responsive.</li>
86
+ <li>
87
+ 3. Ask your agent for something bigger: a landing page, a pricing table, a whole new
88
+ page with <code className="font-mono">/create-page</code>.
89
+ </li>
90
+ </ol>
91
+ </CardContent>
92
+ </Card>
87
93
  </section>
88
94
  </main>
89
95
  );
@@ -0,0 +1,118 @@
1
+ @import "tailwindcss" source(none);
2
+ @source "../pages";
3
+ @source "../ui";
4
+ @source "../lib";
5
+ @source "../hooks";
6
+ @source "../themes";
7
+
8
+ @custom-variant dark (&:is(.dark *));
9
+
10
+ :root {
11
+ --sidebar: oklch(0.985 0 0);
12
+ --sidebar-foreground: oklch(0.145 0 0);
13
+ --sidebar-primary: oklch(0.205 0 0);
14
+ --sidebar-primary-foreground: oklch(0.985 0 0);
15
+ --sidebar-accent: oklch(0.97 0 0);
16
+ --sidebar-accent-foreground: oklch(0.205 0 0);
17
+ --sidebar-border: oklch(0.922 0 0);
18
+ --sidebar-ring: oklch(0.708 0 0);
19
+ --background: oklch(1 0 0);
20
+ --foreground: oklch(0.145 0 0);
21
+ --card: oklch(1 0 0);
22
+ --card-foreground: oklch(0.145 0 0);
23
+ --popover: oklch(1 0 0);
24
+ --popover-foreground: oklch(0.145 0 0);
25
+ --primary: oklch(0.205 0 0);
26
+ --primary-foreground: oklch(0.985 0 0);
27
+ --secondary: oklch(0.97 0 0);
28
+ --secondary-foreground: oklch(0.205 0 0);
29
+ --muted: oklch(0.97 0 0);
30
+ --muted-foreground: oklch(0.556 0 0);
31
+ --accent: oklch(0.97 0 0);
32
+ --accent-foreground: oklch(0.205 0 0);
33
+ --destructive: oklch(0.577 0.245 27.325);
34
+ --border: oklch(0.922 0 0);
35
+ --input: oklch(0.922 0 0);
36
+ --ring: oklch(0.708 0 0);
37
+ --chart-1: oklch(0.646 0.222 41.116);
38
+ --chart-2: oklch(0.6 0.118 184.704);
39
+ --chart-3: oklch(0.398 0.07 227.392);
40
+ --chart-4: oklch(0.828 0.189 84.429);
41
+ --chart-5: oklch(0.769 0.188 70.08);
42
+ --radius: 0.625rem;
43
+ }
44
+
45
+ .dark {
46
+ --sidebar: oklch(0.205 0 0);
47
+ --sidebar-foreground: oklch(0.985 0 0);
48
+ --sidebar-primary: oklch(0.488 0.243 264.376);
49
+ --sidebar-primary-foreground: oklch(0.985 0 0);
50
+ --sidebar-accent: oklch(0.269 0 0);
51
+ --sidebar-accent-foreground: oklch(0.985 0 0);
52
+ --sidebar-border: oklch(1 0 0 / 10%);
53
+ --sidebar-ring: oklch(0.556 0 0);
54
+ --background: oklch(0.145 0 0);
55
+ --foreground: oklch(0.985 0 0);
56
+ --card: oklch(0.205 0 0);
57
+ --card-foreground: oklch(0.985 0 0);
58
+ --popover: oklch(0.205 0 0);
59
+ --popover-foreground: oklch(0.985 0 0);
60
+ --primary: oklch(0.922 0 0);
61
+ --primary-foreground: oklch(0.205 0 0);
62
+ --secondary: oklch(0.269 0 0);
63
+ --secondary-foreground: oklch(0.985 0 0);
64
+ --muted: oklch(0.269 0 0);
65
+ --muted-foreground: oklch(0.708 0 0);
66
+ --accent: oklch(0.269 0 0);
67
+ --accent-foreground: oklch(0.985 0 0);
68
+ --destructive: oklch(0.704 0.191 22.216);
69
+ --border: oklch(1 0 0 / 10%);
70
+ --input: oklch(1 0 0 / 15%);
71
+ --ring: oklch(0.556 0 0);
72
+ --chart-1: oklch(0.488 0.243 264.376);
73
+ --chart-2: oklch(0.696 0.17 162.48);
74
+ --chart-3: oklch(0.769 0.188 70.08);
75
+ --chart-4: oklch(0.627 0.265 303.9);
76
+ --chart-5: oklch(0.645 0.246 16.439);
77
+ }
78
+
79
+ @theme inline {
80
+ --color-sidebar: var(--sidebar);
81
+ --color-sidebar-foreground: var(--sidebar-foreground);
82
+ --color-sidebar-primary: var(--sidebar-primary);
83
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
84
+ --color-sidebar-accent: var(--sidebar-accent);
85
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
86
+ --color-sidebar-border: var(--sidebar-border);
87
+ --color-sidebar-ring: var(--sidebar-ring);
88
+ --color-chart-5: var(--chart-5);
89
+ --color-chart-4: var(--chart-4);
90
+ --color-chart-3: var(--chart-3);
91
+ --color-chart-2: var(--chart-2);
92
+ --color-chart-1: var(--chart-1);
93
+ --color-ring: var(--ring);
94
+ --color-input: var(--input);
95
+ --color-border: var(--border);
96
+ --color-destructive: var(--destructive);
97
+ --color-accent-foreground: var(--accent-foreground);
98
+ --color-accent: var(--accent);
99
+ --color-muted-foreground: var(--muted-foreground);
100
+ --color-muted: var(--muted);
101
+ --color-secondary-foreground: var(--secondary-foreground);
102
+ --color-secondary: var(--secondary);
103
+ --color-primary-foreground: var(--primary-foreground);
104
+ --color-primary: var(--primary);
105
+ --color-popover-foreground: var(--popover-foreground);
106
+ --color-popover: var(--popover);
107
+ --color-card-foreground: var(--card-foreground);
108
+ --color-card: var(--card);
109
+ --color-foreground: var(--foreground);
110
+ --color-background: var(--background);
111
+ --radius-sm: calc(var(--radius) * 0.6);
112
+ --radius-md: calc(var(--radius) * 0.8);
113
+ --radius-lg: var(--radius);
114
+ --radius-xl: calc(var(--radius) * 1.4);
115
+ --radius-2xl: calc(var(--radius) * 1.8);
116
+ --radius-3xl: calc(var(--radius) * 2.2);
117
+ --radius-4xl: calc(var(--radius) * 2.6);
118
+ }
@@ -11,7 +11,18 @@
11
11
  "noEmit": true,
12
12
  "strict": true,
13
13
  "skipLibCheck": true,
14
- "types": ["@autono/open-pages/env"]
14
+ "types": ["@autono/open-pages/env"],
15
+ "baseUrl": ".",
16
+ "paths": {
17
+ "@/*": ["./*"]
18
+ }
15
19
  },
16
- "include": ["pages/**/*", "open-pages.config.ts"]
20
+ "include": [
21
+ "pages/**/*",
22
+ "ui/**/*",
23
+ "lib/**/*",
24
+ "hooks/**/*",
25
+ "themes/**/*",
26
+ "open-pages.config.ts"
27
+ ]
17
28
  }
@@ -0,0 +1,64 @@
1
+ import * as React from "react"
2
+ import { ChevronDownIcon } from "lucide-react"
3
+ import { Accordion as AccordionPrimitive } from "radix-ui"
4
+
5
+ import { cn } from "@/lib/utils"
6
+
7
+ function Accordion({
8
+ ...props
9
+ }: React.ComponentProps<typeof AccordionPrimitive.Root>) {
10
+ return <AccordionPrimitive.Root data-slot="accordion" {...props} />
11
+ }
12
+
13
+ function AccordionItem({
14
+ className,
15
+ ...props
16
+ }: React.ComponentProps<typeof AccordionPrimitive.Item>) {
17
+ return (
18
+ <AccordionPrimitive.Item
19
+ data-slot="accordion-item"
20
+ className={cn("border-b last:border-b-0", className)}
21
+ {...props}
22
+ />
23
+ )
24
+ }
25
+
26
+ function AccordionTrigger({
27
+ className,
28
+ children,
29
+ ...props
30
+ }: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {
31
+ return (
32
+ <AccordionPrimitive.Header className="flex">
33
+ <AccordionPrimitive.Trigger
34
+ data-slot="accordion-trigger"
35
+ className={cn(
36
+ "flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
37
+ className
38
+ )}
39
+ {...props}
40
+ >
41
+ {children}
42
+ <ChevronDownIcon className="pointer-events-none size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-200" />
43
+ </AccordionPrimitive.Trigger>
44
+ </AccordionPrimitive.Header>
45
+ )
46
+ }
47
+
48
+ function AccordionContent({
49
+ className,
50
+ children,
51
+ ...props
52
+ }: React.ComponentProps<typeof AccordionPrimitive.Content>) {
53
+ return (
54
+ <AccordionPrimitive.Content
55
+ data-slot="accordion-content"
56
+ className="overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
57
+ {...props}
58
+ >
59
+ <div className={cn("pt-0 pb-4", className)}>{children}</div>
60
+ </AccordionPrimitive.Content>
61
+ )
62
+ }
63
+
64
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }