@autono/open-pages 0.4.0 → 0.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autono/open-pages",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Runtime and CLI for open-pages — live preview of React and HTML pages, click-to-comment inspector, and static export.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -77,7 +77,7 @@ Before writing code, map every planned section to the shadcn components it shoul
77
77
  | --- | --- |
78
78
  | Landing / marketing | `navigation-menu` or plain links + `sheet` for mobile nav, `button` (CTAs), `badge` (eyebrows), `card` (features, pricing tiers), `tabs` or `switch` (billing toggle), `accordion` (FAQ), `separator` |
79
79
  | Dashboard / app UI | `sidebar` (`SidebarProvider` + `SidebarInset`), `table`, `chart`, `card` (KPIs), `tabs`, `select`, `dropdown-menu`, `badge` (status), `skeleton`, `empty` |
80
- | Form / signup | `form` (react-hook-form + zod) or `field`, `input`, `select`, `checkbox`, `radio-group`, `switch`, `textarea`, `button`, `alert` |
80
+ | Form / signup | `field`, `input`, `select`, `checkbox`, `radio-group`, `switch`, `textarea`, `button`, `alert` |
81
81
  | Docs / long-form | `sidebar` or a sticky `scroll-area` TOC, `breadcrumb`, prose in a `max-w-[65ch]` column, `kbd`, `table`, `alert` (callouts) |
82
82
  | Portfolio / gallery | `carousel`, `aspect-ratio`, `card`, `dialog` (lightbox), `hover-card` |
83
83
  | Internal tool | `command` (palette), `combobox`, `resizable`, `context-menu`, `tooltip`, `sonner` (toasts), `alert-dialog` (confirm) |
@@ -25,10 +25,10 @@ Every workspace is a shadcn/ui project out of the box. Nothing needs installing:
25
25
  | `lib/utils.ts` | `cn()` for merging class names. Import as `@/lib/utils`. |
26
26
  | `hooks/use-mobile.ts` | `useIsMobile()` breakpoint hook. Import as `@/hooks/use-mobile`. |
27
27
  | `styles/globals.css` | Tailwind v4 entry: `@source` for `pages/ ui/ lib/ hooks/ themes/`, the `dark` variant, `:root`/`.dark` OKLCH tokens, `@theme inline`, base layer. Loaded into every page automatically. |
28
- | `components.json` | shadcn config (style `new-york`, base `radix`, aliases `@/ui`, `@/lib/utils`, `@/hooks`, `@/components`). Activates the `shadcn` skill and CLI lookups. |
28
+ | `components.json` | shadcn config (style `radix-nova`, aliases `@/ui`, `@/lib/utils`, `@/hooks`, `@/components`). Activates the `shadcn` skill and CLI lookups. |
29
29
  | `themes/<id>.css` | Optional token overrides a page opts into with `meta.theme` (see Themes). |
30
30
 
31
- Installed deps you may import directly: `lucide-react` (icons), `radix-ui`, `class-variance-authority`, `clsx`, `tailwind-merge`, `cmdk`, `sonner`, `vaul`, `recharts`, `react-day-picker`, `date-fns`, `react-hook-form`, `zod`, `@hookform/resolvers`, `input-otp`, `embla-carousel-react`, `react-resizable-panels`, `next-themes`. Nothing else.
31
+ Installed deps you may import directly: `lucide-react` (icons), `radix-ui`, `class-variance-authority`, `clsx`, `tailwind-merge`, `cmdk`, `sonner`, `vaul`, `recharts`, `react-day-picker`, `date-fns`, `input-otp`, `embla-carousel-react`, `react-resizable-panels`, `next-themes`. Nothing else.
32
32
 
33
33
  `npx shadcn@latest add <item>` is only for **blocks** (`dashboard-01`, `login-03`, …) or third-party registries; every core component is already under `ui/`. For lookups use `npx shadcn@latest docs <component> --json`, `view`, `search` — details in the `shadcn` skill.
34
34
 
@@ -35,32 +35,24 @@ const [billing, setBilling] = useState<'monthly' | 'yearly'>('monthly');
35
35
 
36
36
  Simple forms: `<form onSubmit>` with `@/ui/field`, `@/ui/input`, `@/ui/label`,
37
37
  `@/ui/select`, `@/ui/checkbox`, `@/ui/textarea`, `@/ui/button`. Validated
38
- forms: `react-hook-form` + `zod` through `@/ui/form`:
38
+ forms: native form state (or your own) presented with `@/ui/field`:
39
39
 
40
40
  ```tsx
41
- import { zodResolver } from '@hookform/resolvers/zod';
42
- import { useForm } from 'react-hook-form';
43
- import { z } from 'zod';
44
41
  import { Button } from '@/ui/button';
45
- import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@/ui/form';
42
+ import { Field, FieldDescription, FieldError, FieldGroup, FieldLabel } from '@/ui/field';
46
43
  import { Input } from '@/ui/input';
47
44
 
48
- const schema = z.object({ email: z.string().email('Enter a valid work email') });
49
-
50
- const form = useForm<z.infer<typeof schema>>({ resolver: zodResolver(schema), defaultValues: { email: '' } });
51
-
52
- <Form {...form}>
53
- <form onSubmit={form.handleSubmit((values) => setSubmitted(values))} className="flex flex-col gap-4">
54
- <FormField control={form.control} name="email" render={({ field }) => (
55
- <FormItem>
56
- <FormLabel>Work email</FormLabel>
57
- <FormControl><Input type="email" autoComplete="email" {...field} /></FormControl>
58
- <FormMessage />
59
- </FormItem>
60
- )} />
61
- <Button type="submit">Join the waitlist</Button>
62
- </form>
63
- </Form>
45
+ <form onSubmit={handleSubmit}>
46
+ <FieldGroup>
47
+ <Field>
48
+ <FieldLabel htmlFor="email">Work email</FieldLabel>
49
+ <Input id="email" name="email" type="email" required />
50
+ <FieldDescription>We never share it.</FieldDescription>
51
+ {error && <FieldError>{error}</FieldError>}
52
+ </Field>
53
+ <Button type="submit">Create account</Button>
54
+ </FieldGroup>
55
+ </form>
64
56
  ```
65
57
 
66
58
  - Every input has a label (`<Label htmlFor>` or `<FormLabel>`), a `name`, and