@muten/shadcn 0.0.3 → 0.0.5

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/AGENTS.md ADDED
@@ -0,0 +1,108 @@
1
+ # @muten/shadcn - component catalog (for an AI assembling a muten app)
2
+
3
+ ## Setup (once): `plugins { shadcn {} }` in muten.config + `@import "@muten/shadcn/globals.css";` in src/styles.css. Then everything below is usable directly; `muten add <name>` only ejects a source.
4
+
5
+ ## PLUG-AND-PLAY (zero class props)
6
+ - **Btn**(variant, onClick) { slot } · **LinkBtn**(to, variant) { slot } · **Input**(value, placeholder)
7
+ - **DataTable** @rows columns(a, b) - STYLED BY DEFAULT, no class needed.
8
+ - + every Part / Custom below.
9
+
10
+ ## Parts (64) - imported by plugins {}
11
+
12
+ - **Card** - A surface with CardHeader / CardTitle / CardDescription / CardContent / CardFooter sub-components. · +CardHeader, CardTitle, CardDescription, CardContent, CardFooter
13
+ - **Badge** - A small status descriptor. variant: default | secondary | destructive | outline.
14
+ - **Alert** - A callout with AlertTitle / AlertDescription. variant: default | destructive. · +AlertTitle, AlertDescription
15
+ - **Avatar** - A user's initials in a circle (AvatarFallback).
16
+ - **Switch** - A toggle; the page owns the bool + the action.
17
+ - **Spinner** - A loading indicator (animate-spin loader).
18
+ - **Progress** - A determinate progress bar; value is 0-100.
19
+ - **Separator** - A thin divider line.
20
+ - **Empty** - An empty-state placeholder (title + description in a dashed border).
21
+ - **Breadcrumb** - A breadcrumb trail with BreadcrumbLink / BreadcrumbSeparator / BreadcrumbPage. · +BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator
22
+ - **Pagination** - Page navigation with PaginationLink / Previous / Next / Ellipsis. · +PaginationLink, PaginationPrevious, PaginationNext, PaginationEllipsis
23
+ - **Field** - A labelled form control: FieldLabel / FieldDescription / FieldError. · +FieldLabel, FieldDescription, FieldError
24
+ - **Item** - A bordered row: ItemContent / ItemTitle / ItemDescription. · +ItemContent, ItemTitle, ItemDescription
25
+ - **Checkbox** - A checkbox; the page owns the bool + the toggle action.
26
+ - **Toggle** - A two-state button; the page owns the bool + the toggle action.
27
+ - **ToggleGroup** - Single-select toolbar with ToggleGroupItem; page owns a text state. · +ToggleGroupItem
28
+ - **RadioGroup** - Single choice with RadioGroupItem; page owns a text state. · +RadioGroupItem
29
+ - **Collapsible** - A trigger + content shown when open; page owns the bool.
30
+ - **Accordion** - Stacked expandable sections with AccordionItem; page owns a bool per item. · +AccordionItem
31
+ - **TabsList** - Tab bar (TabsList/TabsTrigger) + TabsContent panels; page owns the active-tab text. · +TabsTrigger, TabsContent
32
+ - **Dialog** - A modal with DialogTitle/Description/Footer; page owns the open bool. Backdrop click closes. · +DialogTitle, DialogDescription, DialogFooter
33
+ - **Tooltip** - A hover tooltip (pure CSS, no state). The slot is the trigger.
34
+ - **DropdownMenu** - A menu below a trigger with DropdownItem/Label/Separator; page owns the open bool. · +DropdownItem, DropdownLabel, DropdownSeparator
35
+ - **Popover** - A floating panel below a trigger; page owns the open bool.
36
+ - **AlertDialog** - A modal requiring an explicit choice (no backdrop dismiss); page owns the open bool. · +AlertDialogTitle, AlertDialogDescription, AlertDialogFooter
37
+ - **Sheet** - A panel that slides in from the right; page owns the open bool. · +SheetTitle, SheetDescription
38
+ - **Drawer** - A panel that slides up from the bottom; page owns the open bool.
39
+ - **HoverCard** - Richer content shown on hover (pure CSS, no state).
40
+ - **Select** - A value picker with SelectItem; page owns the value text + open bool. · +SelectItem
41
+ - **ScrollArea** - A scrollable region with styled scrollbars.
42
+ - **Message** - Chat Message + Bubble + Marker (variant: sent | received). · +Bubble, Marker
43
+ - **MessageScroller** - A scrollable column of chat messages.
44
+ - **Attachment** - A file attachment chip (icon + name + size).
45
+ - **Menubar** - A bar of menus (File/Edit/View); page owns which is open via a text state. · +MenubarMenu, MenubarItem, MenubarSeparator
46
+ - **NavigationMenu** - A nav bar with hover-revealed panels (pure CSS, no state). · +NavigationMenuItem, NavigationMenuLink
47
+ - **Combobox** - A Select with a search box; page filters items with `each … where`. · +ComboboxItem
48
+ - **Command** - A command palette (search + grouped CommandItem list). · +CommandList, CommandGroup, CommandItem, CommandShortcut
49
+ - **SegmentedControl** - A single-select toolbar (SegmentedItem); page owns a text state. · +SegmentedItem, SegmentedTabs, IconTab
50
+ - **VectorField** - Paired NumberFields (X/Y) for position or size.
51
+ - **Toolbar** - A grouped button bar with ToolbarGroup / ToolbarSeparator. · +ToolbarGroup, ToolbarSeparator
52
+ - **StatusBar** - A thin bottom bar with StatusItem / StatusSpacer. · +StatusItem, StatusSpacer
53
+ - **ZoomControl** - A - 100% + zoom widget; page owns the zoom number.
54
+ - **SplitButton** - A main action + a caret dropdown; page owns the open bool.
55
+ - **SwatchPalette** - A grid of selectable color swatches (Swatch); page owns the selected hex + colors. · +Swatch
56
+ - **AppSidebar** - AppSidebar - a collapsible nav panel (SidebarHeader / SidebarGroup / SidebarItem). Named AppSidebar so it never shadows muten's core Sidebar <aside> primitive. · +SidebarHeader, SidebarGroup, SidebarGroupLabel, SidebarItem
57
+ - **Inspector** - Property grid: InspectorSection (collapsible) / InspectorRow (label : value slot). · +InspectorSection, InspectorRow
58
+ - **CommandPalette** - A top-anchored modal holding a Command; page owns the open bool.
59
+ - **Stepper** - Horizontal or vertical step progress indicator; done steps show a check, the current step is ringed (parts: Stepper, StepperVertical, Step). · +StepperVertical, Step
60
+ - **Timeline** - Vertical event timeline: a dot on a connector line + title/time/description per item (parts: Timeline, TimelineItem). · +TimelineItem
61
+ - **Pill** - A hero eyebrow chip (rounded-full, bigger than Badge); slot-based for an icon + text.
62
+ - **FeatureGrid** - BLOCK: responsive grid of feature cards (icon + title + copy). Parts: FeatureGrid, FeatureCard. · +FeatureCard
63
+ - **Pricing** - BLOCK: a row of pricing tiers (name/price/features/CTA), featured highlight. Parts: Pricing, PricingTier, PricingFeature. · +PricingTier, PricingTierFeatured, PricingFeature
64
+ - **LogoCloud** - BLOCK: a 'trusted by' strip of logos, muted + grayscale until hover. Parts: LogoCloud, LogoCloudItem. · +LogoCloudItem
65
+ - **NavPill** - BLOCK: the floating glass navbar (sticky wrapper + glass pill + scroll animation baked in). Drop logo/links/CTA inside.
66
+ - **StatBand** - BLOCK: a divided row of KPI stats. Parts: StatBand, Stat(label) - value goes in the slot (Span or Custom CountUp). · +Stat
67
+ - **FeatureRows** - BLOCK: numbered feature/schedule rows with side gutters (12-col grid inside). Parts: FeatureRows, FeatureRow. · +FeatureRow
68
+ - **BentoGallery** - BLOCK: fixed-row-height tiling gallery; cells pick their col-span. Parts: BentoGallery, BentoCell. · +BentoCell
69
+ - **ButtonGroup** - A segmented row of buttons that share borders. Put btn-outline buttons inside.
70
+ - **InputGroup** - An input with a leading icon/addon in one bordered field.
71
+ - **Skeleton** - A loading placeholder (pulse). Add size via class: Skeleton class("h-4 w-32").
72
+ - **Kbd** - A keyboard key hint. Kbd { Span "Ctrl" }.
73
+ - **Btn** - Plug-and-play button (part Btn - Button is a primitive). `Btn(variant: "default", onClick: save) { Span "Save" }`. variant: default|secondary|outline|ghost|destructive|link.
74
+ - **Input** - Plug-and-play text input (part Input wraps SearchField). `Input(value: q, placeholder: "...")` - value is two-way bound. For typed/validated fields use a Form.
75
+ - **LinkBtn** - A navigation link styled as a button. `LinkBtn(to: "/signup", variant: "default") { Span "Get started" }`.
76
+
77
+ ## Customs (21) - importable; some need a dep
78
+
79
+ - **Slider** (`slider`) - A draggable range slider (Custom). Page owns the value number.
80
+ - **InputOtp** (`input-otp`) - N single-character boxes synced to one value (Custom). Page owns the value text.
81
+ - **Calendar** (`calendar`) - A month-grid date picker (Custom). Page owns the selected ISO date text.
82
+ - **Toaster** (`toaster`) - Fixed toast notifications (Custom). Page bumps a trigger counter to fire one.
83
+ - **Carousel** (`carousel`) - A slide carousel over a list (Custom). Page owns the slides list.
84
+ - **Chart** (`chart`) - An SVG bar chart over a list of { label, value } (Custom).
85
+ - **GradientBlinds** (`gradient-blinds`) · **needs npm: ogl** - Animated WebGL gradient + diagonal-blinds hero background that follows the cursor and fades into the page (needs ogl).
86
+ - **Resizable** (`resizable`) - Two panels with a draggable splitter (Custom).
87
+ - **ContextMenu** (`context-menu`) - Right-click an area to open a menu of items (Custom).
88
+ - **NumberField** (`number-field`) - A numeric input with -/+ steppers, min/max/step (Custom).
89
+ - **FileInput** (`file-input`) - A click/drag-drop file dropzone (Custom); emits file names.
90
+ - **ColorPicker** (`color-picker`) - A swatch + saturation/value + hue popover (Custom); page owns the hex.
91
+ - **TreeView** (`tree-view`) - A nested folder/file tree (Custom): expandable, selectable, icons + indent.
92
+ - **CanvasHost** (`canvas-viewport`) - A <canvas> with pan/zoom (Custom) + a muten toolbar slot floating on top.
93
+ - **TagInput** (`tag-input`) - Chips you add by typing + Enter (Custom); page owns a comma-joined text.
94
+ - **RangeSlider** (`range-slider`) - A two-thumb range slider (Custom); page owns the low + high numbers.
95
+ - **SortableList** (`sortable-list`) - Drag rows to reorder (Custom); page owns a comma-joined order.
96
+ - **FolderPicker** (`folder-picker`) - Connect a local folder via showDirectoryPicker (Custom); emits the name.
97
+ - **Hotkey** (`hotkey`) - A global keyboard shortcut (Cmd/Ctrl+key), invisible (Custom).
98
+ - **Code** (`code`) - Syntax-highlighted code block that understands muten (shared highlight.js, same grammar as the VS Code extension).
99
+ - **CountUp** (`count-up`) - Animate a formatted number (2.4M / 94% / 40ms / 99.99%) from 0 when it scrolls into view; lands on the exact target. Custom. Styled form (takes the class): `Custom CountUp inputs(to: "2.4M") class("text-4xl font-bold")`. For stat bands + hero metrics.
100
+
101
+ ## Class recipes (4) - style a primitive (Table is default-styled; typography/textarea/motion)
102
+
103
+ - **textarea** - class("textarea") · label: class("label") · native select: class("native-select")
104
+ - **typography** - Title "Docs" h1 class("prose-h1") (prose-h1..h4 · prose-p|lead|large|small|muted|blockquote|code|list)
105
+ - **table** - DataTable @rows columns(name, email, status) - STYLED BY DEFAULT (no class needed). `class("data-table")` still works as an explicit alias. Raw cells; for badge/formatted cells build with each + Stack.
106
+ - **motion** - Page animations, all CSS + reduced-motion safe. Entrance: animate-fade-up|fade-in|scale-in|slide-in (+ d1..d6 stagger). Scroll: reveal|reveal-left|reveal-scale, and nav-scroll on a navbar. Hover/press: hover-lift, hover-glow, arrow-hover (nudges a trailing Icon), link-underline, press, float.
107
+
108
+ ### Gotcha: a part can not be named after a primitive (Button/Link/Form/Image/SearchField/DataTable/Icon/Text/Title/Span) - hence Btn/Input/LinkBtn. `Part(...) class(...)` is a syntax error.