@dowel-ui/registry 0.1.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.js","names":["meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta","meta$1","meta$2","meta$3","meta$4","meta$5","meta$6","meta$7","meta","meta$1","meta$2","meta$3","meta$4","meta$5","meta$6","meta$7","meta$8","meta$9","meta$10","meta$11","meta$12","meta$13","meta$14","meta$15","meta$16","meta$17","meta$18","meta$19","meta$20","meta$21","meta$22","meta$23","meta$24","meta$25","meta$26","meta$27","meta$28","meta$29","meta$30","meta$31","meta$32","meta$33","meta$34","meta$35","meta$36","meta$37","meta$38","meta$39","meta$40","meta$41","meta$42","meta$43","meta$44","meta$45"],"sources":["../../ui/dist/registry/schema.js","../../ui/dist/components/accordion/meta.js","../../ui/dist/components/activity-feed/meta.js","../../ui/dist/components/ai-agent-status/meta.js","../../ui/dist/components/ai-conversation/meta.js","../../ui/dist/components/ai-message/meta.js","../../ui/dist/components/ai-model-selector/meta.js","../../ui/dist/components/ai-prompt-input/meta.js","../../ui/dist/components/ai-reasoning/meta.js","../../ui/dist/components/ai-response/meta.js","../../ui/dist/components/ai-sources/meta.js","../../ui/dist/components/ai-token-usage/meta.js","../../ui/dist/components/ai-tool/meta.js","../../ui/dist/components/alert/meta.js","../../ui/dist/components/avatar/meta.js","../../ui/dist/components/badge/meta.js","../../ui/dist/components/button/meta.js","../../ui/dist/components/calendar/meta.js","../../ui/dist/components/card/meta.js","../../ui/dist/components/checkbox/meta.js","../../ui/dist/components/code-block/meta.js","../../ui/dist/components/combobox/meta.js","../../ui/dist/components/command/meta.js","../../ui/dist/components/data-table/meta.js","../../ui/dist/components/date-picker/meta.js","../../ui/dist/components/dialog/meta.js","../../ui/dist/components/drawer/meta.js","../../ui/dist/components/dropdown-menu/meta.js","../../ui/dist/components/empty-state/meta.js","../../ui/dist/components/form/meta.js","../../ui/dist/components/input/meta.js","../../ui/dist/components/label/meta.js","../../ui/dist/components/pagination/meta.js","../../ui/dist/components/popover/meta.js","../../ui/dist/components/progress/meta.js","../../ui/dist/components/radio-group/meta.js","../../ui/dist/components/select/meta.js","../../ui/dist/components/separator/meta.js","../../ui/dist/components/sheet/meta.js","../../ui/dist/components/skeleton/meta.js","../../ui/dist/components/slider/meta.js","../../ui/dist/components/spinner/meta.js","../../ui/dist/components/switch/meta.js","../../ui/dist/components/table/meta.js","../../ui/dist/components/tabs/meta.js","../../ui/dist/components/toast/meta.js","../../ui/dist/components/tooltip/meta.js","../../ui/dist/blocks/admin-users/meta.js","../../ui/dist/blocks/ai-chat/meta.js","../../ui/dist/blocks/dashboard/meta.js","../../ui/dist/blocks/forgot-password/meta.js","../../ui/dist/blocks/login/meta.js","../../ui/dist/blocks/pricing/meta.js","../../ui/dist/blocks/settings/meta.js","../../ui/dist/blocks/signup/meta.js","../../ui/dist/registry/blocks.js","../../ui/dist/registry/components.js","../src/build.ts"],"sourcesContent":["//#region src/registry/schema.ts\n/**\n* Registry metadata contract.\n*\n* Every component ships a `meta.ts` describing what the CLI must install\n* alongside it. This file defines the *type* only; `meta.test.ts` validates\n* every declaration against the source's real imports, so metadata cannot drift\n* from the code it describes. See docs/architecture/0003-registry-metadata.md.\n*/\nconst COMPONENT_CATEGORIES = [\n\t\"foundation\",\n\t\"display\",\n\t\"navigation\",\n\t\"overlay\",\n\t\"layout\",\n\t\"form\",\n\t\"feedback\",\n\t\"data\",\n\t\"ai\"\n];\nconst COMPONENT_STATUSES = [\n\t\"stable\",\n\t\"beta\",\n\t\"experimental\"\n];\n/** Identity helper that gives editors autocomplete inside `meta.ts`. */\nfunction defineMeta(meta) {\n\treturn meta;\n}\n//#endregion\nexport { COMPONENT_CATEGORIES, COMPONENT_STATUSES, defineMeta };\n\n//# sourceMappingURL=schema.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/accordion/meta.ts\nconst meta = defineMeta({\n\tname: \"accordion\",\n\ttitle: \"Accordion\",\n\tdescription: \"Vertically stacked sections that expand to reveal their content.\",\n\tcategory: \"data\",\n\tstatus: \"stable\",\n\tdependencies: [\"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"accordion.tsx\"],\n\ta11y: \"Each trigger is a button inside a heading, so screen reader users can navigate the sections by heading. aria-expanded and aria-controls tie the trigger to its panel, and arrow keys move between triggers.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/activity-feed/meta.ts\nconst meta = defineMeta({\n\tname: \"activity-feed\",\n\ttitle: \"Activity Feed\",\n\tdescription: \"A chronological list of events, with a connecting timeline rail.\",\n\tcategory: \"data\",\n\tstatus: \"stable\",\n\tdependencies: [\"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"activity-feed.tsx\"],\n\ta11y: \"An ordered list, so position and count are announced — the order is the meaning here. The rail and the indicators are decorative; the item text has to say what happened. ActivityTime requires a machine-readable dateTime, because a relative label like \\\"2 hours ago\\\" is ambiguous outside the moment it was rendered.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/ai-agent-status/meta.ts\nconst meta = defineMeta({\n\tname: \"ai-agent-status\",\n\ttitle: \"AI Agent Status\",\n\tdescription: \"A pill showing what an agent is doing, in words as well as colour.\",\n\tcategory: \"ai\",\n\tstatus: \"stable\",\n\tdependencies: [\"class-variance-authority\"],\n\tregistryDependencies: [],\n\tfiles: [\"ai-agent-status.tsx\"],\n\ta11y: \"The state is always text. Agent states matter most when something has failed, which is exactly when a colour-only signal fails the people who most need to see it. Live announcements are off by default — several agents each announcing their transitions turns a dashboard into noise; enable it for the one agent being watched.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/ai-conversation/meta.ts\nconst meta = defineMeta({\n\tname: \"ai-conversation\",\n\ttitle: \"AI Conversation\",\n\tdescription: \"The scrolling transcript container, with follow-on-new-content and a status region.\",\n\tcategory: \"ai\",\n\tstatus: \"stable\",\n\tdependencies: [],\n\tregistryDependencies: [],\n\tfiles: [\"ai-conversation.tsx\"],\n\ta11y: \"The transcript is an ordered list, NOT a live region. A live region that updates on every streamed token is unusable with a screen reader, and is the most common accessibility failure in chat interfaces. Announce state — \\\"generating\\\", \\\"response complete\\\" — through ConversationStatus instead, and let the reader navigate the transcript at their own pace. Auto-scroll stops the moment the reader scrolls up, and ConversationScrollButton is the explicit way back.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/ai-message/meta.ts\nconst meta = defineMeta({\n\tname: \"ai-message\",\n\ttitle: \"AI Message\",\n\tdescription: \"One turn in a conversation, with role, avatar, actions and footer slots.\",\n\tcategory: \"ai\",\n\tstatus: \"stable\",\n\tdependencies: [\"class-variance-authority\", \"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"ai-message.tsx\"],\n\ta11y: \"Every message carries a visually hidden label naming the speaker. Alignment and colour tell a sighted reader who is talking and tell a screen reader user nothing, so the role is always in text. Message actions fade in on hover but stay in the DOM and in the tab order — a control that only exists on hover is unreachable by keyboard and invisible on touch.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/ai-model-selector/meta.ts\nconst meta = defineMeta({\n\tname: \"ai-model-selector\",\n\ttitle: \"AI Model Selector\",\n\tdescription: \"Picks the model a conversation runs on, with descriptions and availability.\",\n\tcategory: \"ai\",\n\tstatus: \"stable\",\n\tdependencies: [],\n\tregistryDependencies: [\"select\"],\n\tfiles: [\"ai-model-selector.tsx\"],\n\ta11y: \"Inherits Select's listbox keyboard model. Each option sets textValue to the model name so typeahead matches the name rather than the description. A disabled model shows and announces why it is unavailable — a disabled option with no reason reads as a broken interface.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/ai-prompt-input/meta.ts\nconst meta = defineMeta({\n\tname: \"ai-prompt-input\",\n\ttitle: \"AI Prompt Input\",\n\tdescription: \"The composer: auto-growing textarea, send-on-Enter, and a send/stop control.\",\n\tcategory: \"ai\",\n\tstatus: \"stable\",\n\tdependencies: [],\n\tregistryDependencies: [],\n\tfiles: [\"ai-prompt-input.tsx\"],\n\ta11y: \"Enter sends and Shift+Enter inserts a newline, but never while an IME composition is active — for Japanese, Chinese and Korean input Enter confirms a candidate, and sending there truncates the sentence mid-word. The submit control renames itself to \\\"Stop generating\\\" while busy, so its accessible name always matches what it does. The character counter stays silent until it nears the limit; announcing every keystroke would be unusable.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/ai-reasoning/meta.ts\nconst meta = defineMeta({\n\tname: \"ai-reasoning\",\n\ttitle: \"AI Reasoning\",\n\tdescription: \"A collapsible disclosure for the model's reasoning.\",\n\tcategory: \"ai\",\n\tstatus: \"stable\",\n\tdependencies: [\"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"ai-reasoning.tsx\"],\n\ta11y: \"A standard disclosure with aria-expanded on the trigger. Collapsed by default because reasoning is supporting material — giving it the same weight as the answer buries the answer. The trigger's label changes while reasoning streams, so its accessible name matches what is happening.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/ai-response/meta.ts\nconst meta = defineMeta({\n\tname: \"ai-response\",\n\ttitle: \"AI Response\",\n\tdescription: \"Assistant response text, with a streaming caret and a thinking indicator.\",\n\tcategory: \"ai\",\n\tstatus: \"stable\",\n\tdependencies: [],\n\tregistryDependencies: [],\n\tfiles: [\"ai-response.tsx\"],\n\ta11y: \"Deliberately not a live region: announcing streamed text as it arrives interrupts a screen reader user on every token. Announce state through ConversationStatus and let them read the response when it settles. The caret is decorative; ThinkingIndicator carries a label because it is the only thing on screen while waiting for the first token.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/ai-sources/meta.ts\nconst meta = defineMeta({\n\tname: \"ai-sources\",\n\ttitle: \"AI Sources\",\n\tdescription: \"Inline citation markers and the source list they refer to.\",\n\tcategory: \"ai\",\n\tstatus: \"stable\",\n\tdependencies: [\"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"ai-sources.tsx\"],\n\ta11y: \"An inline marker shows a bare number, which conveys nothing on its own, so the source title is carried in its accessible name. A marker with no href renders as text rather than as a link that goes nowhere. The source list is ordered, because the marker numbers refer to positions in it.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/ai-token-usage/meta.ts\nconst meta = defineMeta({\n\tname: \"ai-token-usage\",\n\ttitle: \"AI Token Usage\",\n\tdescription: \"A gauge showing how much of the context window a conversation has used.\",\n\tcategory: \"ai\",\n\tstatus: \"stable\",\n\tdependencies: [],\n\tregistryDependencies: [],\n\tfiles: [\"ai-token-usage.tsx\"],\n\ta11y: \"The numbers are the content and the bar only summarises them, so the bar is aria-hidden rather than a second progressbar to read past. Counts are formatted for the locale. Warning and over-limit states change the wording's colour but never remove the figures.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/ai-tool/meta.ts\nconst meta = defineMeta({\n\tname: \"ai-tool\",\n\ttitle: \"AI Tool Call\",\n\tdescription: \"A collapsible record of a tool the model called, its arguments and its result.\",\n\tcategory: \"ai\",\n\tstatus: \"stable\",\n\tdependencies: [\"class-variance-authority\", \"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"ai-tool.tsx\"],\n\ta11y: \"A disclosure: the trigger exposes aria-expanded and controls the panel. Status is stated in words, not by a coloured dot — colour alone is unavailable to a screen reader and to anyone who cannot distinguish it. Payload blocks are focusable named regions, since JSON scrolls and an unfocusable scroll box is unreachable by keyboard.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/alert/meta.ts\nconst meta = defineMeta({\n\tname: \"alert\",\n\ttitle: \"Alert\",\n\tdescription: \"A callout that draws attention to an important message.\",\n\tcategory: \"feedback\",\n\tstatus: \"stable\",\n\tdependencies: [\"class-variance-authority\"],\n\tregistryDependencies: [],\n\tfiles: [\"alert.tsx\"],\n\ta11y: \"Not a live region by default. Pass live=\\\"polite\\\" for alerts that appear in response to a user action, or live=\\\"assertive\\\" for errors that must interrupt. Variant colour is never the only signal — the title carries the meaning.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/avatar/meta.ts\nconst meta = defineMeta({\n\tname: \"avatar\",\n\ttitle: \"Avatar\",\n\tdescription: \"An image representation of a user or entity with a graceful text fallback.\",\n\tcategory: \"display\",\n\tstatus: \"stable\",\n\tdependencies: [\"class-variance-authority\", \"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"avatar.tsx\"],\n\ta11y: \"Give AvatarImage a meaningful alt, or alt=\\\"\\\" when the adjacent text already names the person. Fallback initials are decorative and are not announced separately.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/badge/meta.ts\nconst meta = defineMeta({\n\tname: \"badge\",\n\ttitle: \"Badge\",\n\tdescription: \"A compact marker for status, counts and categories.\",\n\tcategory: \"display\",\n\tstatus: \"stable\",\n\tdependencies: [\"class-variance-authority\", \"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"badge.tsx\"],\n\ta11y: \"The badge label must convey the meaning on its own; variant colour is decoration. Use asChild to render an interactive badge as a link or button rather than adding handlers.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/button/meta.ts\nconst meta = defineMeta({\n\tname: \"button\",\n\ttitle: \"Button\",\n\tdescription: \"Triggers an action or event, with variants for every level of emphasis.\",\n\tcategory: \"foundation\",\n\tstatus: \"stable\",\n\tdependencies: [\"class-variance-authority\", \"radix-ui\"],\n\tregistryDependencies: [\"spinner\"],\n\tfiles: [\"button.tsx\"],\n\ta11y: \"Keyboard activatable via Enter and Space. The loading state uses aria-disabled and aria-busy rather than the disabled attribute, so focus is never stranded mid-action. Use `size=\\\"icon\\\"` only with an accessible name from aria-label or visually hidden text.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/calendar/meta.ts\nconst meta = defineMeta({\n\tname: \"calendar\",\n\ttitle: \"Calendar\",\n\tdescription: \"A date grid for selecting a day, several days or a range.\",\n\tcategory: \"form\",\n\tstatus: \"stable\",\n\tdependencies: [\"react-day-picker\"],\n\tregistryDependencies: [\"button\"],\n\tfiles: [\"calendar.tsx\"],\n\ta11y: \"A real grid with roving focus: arrows move by day, Page Up/Down by month, Home/End to the ends of a week. Selection is announced through aria-selected, and the month caption is a live region so moving between months is announced. Give the calendar an accessible name when more than one is on the page.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/card/meta.ts\nconst meta = defineMeta({\n\tname: \"card\",\n\ttitle: \"Card\",\n\tdescription: \"A surface that groups related content and actions into a single block.\",\n\tcategory: \"display\",\n\tstatus: \"stable\",\n\tdependencies: [\"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"card.tsx\"],\n\ta11y: \"Card renders a plain div with no implicit landmark. CardTitle is an h3 by default — use asChild to set the level the page actually needs, since heading levels must increase by one, or to render something that is not a heading at all.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/checkbox/meta.ts\nconst meta = defineMeta({\n\tname: \"checkbox\",\n\ttitle: \"Checkbox\",\n\tdescription: \"A control for an on/off choice, with support for an indeterminate state.\",\n\tcategory: \"form\",\n\tstatus: \"stable\",\n\tdependencies: [\"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"checkbox.tsx\"],\n\ta11y: \"Toggles with Space, matching the native control. Always pair with a Label via htmlFor/id — the box alone has no accessible name. Indeterminate is announced as \\\"mixed\\\" and is a state the application sets, not one the user can reach by clicking.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/code-block/meta.ts\nconst meta = defineMeta({\n\tname: \"code-block\",\n\ttitle: \"Code Block\",\n\tdescription: \"A block of code with a copy control, ready for any highlighter.\",\n\tcategory: \"data\",\n\tstatus: \"stable\",\n\tdependencies: [],\n\tregistryDependencies: [],\n\tfiles: [\"code-block.tsx\"],\n\ta11y: \"The pre is a focusable named region, since code overflows horizontally and an unfocusable scroll box is unreachable by keyboard. Copying is announced through a polite live region as well as shown, and a refused clipboard write reports failure rather than looking like success.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/combobox/meta.ts\nconst meta = defineMeta({\n\tname: \"combobox\",\n\ttitle: \"Combobox\",\n\tdescription: \"A searchable single-select built on the ARIA combobox pattern.\",\n\tcategory: \"form\",\n\tstatus: \"stable\",\n\tdependencies: [\"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"combobox.tsx\"],\n\ta11y: \"The input owns role=\\\"combobox\\\" with aria-expanded, aria-controls and aria-autocomplete; the list owns role=\\\"listbox\\\" and each option role=\\\"option\\\" with aria-selected. Focus stays in the input while arrow keys move aria-activedescendant, so typing is never interrupted. Arrow navigation wraps, Home/End jump, Enter selects the active option and Escape closes.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/command/meta.ts\nconst meta = defineMeta({\n\tname: \"command\",\n\ttitle: \"Command\",\n\tdescription: \"A searchable command palette, with groups and a ⌘K dialog variant.\",\n\tcategory: \"navigation\",\n\tstatus: \"stable\",\n\tdependencies: [],\n\tregistryDependencies: [\"dialog\"],\n\tfiles: [\"command.tsx\"],\n\ta11y: \"The input owns role=\\\"combobox\\\" and the list role=\\\"listbox\\\"; focus stays in the input while arrow keys move aria-activedescendant, so typing is never interrupted. Enter runs the active item through the same path as a click. A group whose items are all filtered out hides its heading rather than labelling nothing. CommandDialog always renders a title and description, visually hidden, so the dialog is never unnamed.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/data-table/meta.ts\nconst meta = defineMeta({\n\tname: \"data-table\",\n\ttitle: \"Data Table\",\n\tdescription: \"Presentation for a TanStack Table instance: sorting, column visibility and pagination.\",\n\tcategory: \"data\",\n\tstatus: \"stable\",\n\tdependencies: [\"@tanstack/react-table\"],\n\tregistryDependencies: [\n\t\t\"button\",\n\t\t\"dropdown-menu\",\n\t\t\"select\",\n\t\t\"table\"\n\t],\n\tfiles: [\"data-table.tsx\"],\n\ta11y: \"Sortable headers carry aria-sort, so the current sort is announced rather than being conveyed by an arrow icon alone, and each sort button has visually hidden text stating the column and its direction. The pagination status is a polite live region, because paging swaps the rows in place with no other signal. A column that cannot be sorted renders as text, not as a button that does nothing.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/date-picker/meta.ts\nconst meta = defineMeta({\n\tname: \"date-picker\",\n\ttitle: \"Date Picker\",\n\tdescription: \"A button that opens a calendar to pick a date or a date range.\",\n\tcategory: \"form\",\n\tstatus: \"stable\",\n\tdependencies: [\"react-day-picker\"],\n\tregistryDependencies: [\n\t\t\"button\",\n\t\t\"calendar\",\n\t\t\"popover\"\n\t],\n\tfiles: [\"date-picker.tsx\"],\n\ta11y: \"The trigger states the selected date, formatted for the locale, so its accessible name changes with the value. The popover is named because it carries role=\\\"dialog\\\". Selecting a single date closes the popover and returns focus to the trigger; a range stays open, since one click is only half an answer. Offer a typed input alongside it for dates the user already knows.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/dialog/meta.ts\nconst meta = defineMeta({\n\tname: \"dialog\",\n\ttitle: \"Dialog\",\n\tdescription: \"A modal window that interrupts the user to gather a response.\",\n\tcategory: \"overlay\",\n\tstatus: \"stable\",\n\tdependencies: [\"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"dialog.tsx\"],\n\ta11y: \"Focus is trapped while open and restored to the trigger on close; Escape and an overlay click dismiss. Always render a DialogTitle — it names the dialog for screen readers. Use DialogDescription, or aria-describedby, to explain consequential actions.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/drawer/meta.ts\nconst meta = defineMeta({\n\tname: \"drawer\",\n\ttitle: \"Drawer\",\n\tdescription: \"A bottom sheet that can be dismissed by dragging it down.\",\n\tcategory: \"overlay\",\n\tstatus: \"stable\",\n\tdependencies: [\"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"drawer.tsx\"],\n\ta11y: \"Drag is pointer-only and never the sole way out: Escape, the overlay and DrawerCancel all dismiss. The grab handle is aria-hidden because it duplicates those affordances. Always render a DrawerTitle.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/dropdown-menu/meta.ts\nconst meta = defineMeta({\n\tname: \"dropdown-menu\",\n\ttitle: \"Dropdown Menu\",\n\tdescription: \"A menu of actions revealed from a trigger, with submenus and selectable items.\",\n\tcategory: \"overlay\",\n\tstatus: \"stable\",\n\tdependencies: [\"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"dropdown-menu.tsx\"],\n\ta11y: \"Full menu keyboard model: arrows move, Home/End jump, typeahead searches, Escape closes and restores focus, Right/Left open and close submenus. Highlight is driven by data-highlighted so pointer and keyboard focus never diverge. Use it for actions — links belong in a nav, and value selection belongs in Select.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/empty-state/meta.ts\nconst meta = defineMeta({\n\tname: \"empty-state\",\n\ttitle: \"Empty State\",\n\tdescription: \"Shown where content would be, explaining why it is empty and what to do next.\",\n\tcategory: \"feedback\",\n\tstatus: \"stable\",\n\tdependencies: [\"class-variance-authority\"],\n\tregistryDependencies: [],\n\tfiles: [\"empty-state.tsx\"],\n\ta11y: \"A plain container with no implicit landmark or live region. When it replaces content after a search, put aria-live on the results region so the change is announced. The icon is decorative — the title has to carry the message on its own.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/form/meta.ts\nconst meta = defineMeta({\n\tname: \"form\",\n\ttitle: \"Form\",\n\tdescription: \"Accessible field wiring that works with any form library, or none.\",\n\tcategory: \"form\",\n\tstatus: \"stable\",\n\tdependencies: [\"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"form.tsx\"],\n\ta11y: \"FormField generates the id, points the Label at the control, and assembles aria-describedby from whichever of the description and error are actually present — a dangling reference announces nothing and is flagged by axe. aria-invalid follows the error. FormMessage is a polite live region, so a late validation message is announced without interrupting.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/input/meta.ts\nconst meta = defineMeta({\n\tname: \"input\",\n\ttitle: \"Input\",\n\tdescription: \"A single-line text field with size variants and native validation styling.\",\n\tcategory: \"form\",\n\tstatus: \"stable\",\n\tdependencies: [\"class-variance-authority\"],\n\tregistryDependencies: [],\n\tfiles: [\"input.tsx\"],\n\ta11y: \"Always pair with a Label via htmlFor/id. Error state is driven by aria-invalid so assistive technology and styling stay in sync; describe the error with aria-describedby.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/label/meta.ts\nconst meta = defineMeta({\n\tname: \"label\",\n\ttitle: \"Label\",\n\tdescription: \"An accessible caption that associates text with a form control.\",\n\tcategory: \"form\",\n\tstatus: \"stable\",\n\tdependencies: [\"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"label.tsx\"],\n\ta11y: \"Set htmlFor to the id of the control it labels. Clicking the label moves focus to that control, including composite widgets that are not native inputs.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/pagination/meta.ts\nconst meta = defineMeta({\n\tname: \"pagination\",\n\ttitle: \"Pagination\",\n\tdescription: \"Navigation between pages of a list.\",\n\tcategory: \"navigation\",\n\tstatus: \"stable\",\n\tdependencies: [\"radix-ui\"],\n\tregistryDependencies: [\"button\"],\n\tfiles: [\"pagination.tsx\"],\n\ta11y: \"A named nav landmark. The current page carries aria-current=\\\"page\\\" — styling it differently conveys nothing on its own. Links by default, since a page of results is a place worth sharing; use asChild for your router's link, or render buttons when paging only changes client state.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/popover/meta.ts\nconst meta = defineMeta({\n\tname: \"popover\",\n\ttitle: \"Popover\",\n\tdescription: \"Rich floating content anchored to a trigger.\",\n\tcategory: \"overlay\",\n\tstatus: \"stable\",\n\tdependencies: [\"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"popover.tsx\"],\n\ta11y: \"The content has role=\\\"dialog\\\" and therefore REQUIRES an accessible name — pass aria-label, or aria-labelledby pointing at a heading inside it. A development-only warning fires if neither is present. The trigger exposes aria-expanded and aria-controls; Escape closes and returns focus to it. Non-modal by default, so the rest of the page stays reachable; pass `modal` only when the content is a task the user must finish or abandon.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/progress/meta.ts\nconst meta = defineMeta({\n\tname: \"progress\",\n\ttitle: \"Progress\",\n\tdescription: \"Shows how far along a task is, or that one is running at all.\",\n\tcategory: \"feedback\",\n\tstatus: \"stable\",\n\tdependencies: [\"class-variance-authority\", \"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"progress.tsx\"],\n\ta11y: \"Exposed as role=\\\"progressbar\\\" with aria-valuenow, and give it a name with aria-label or aria-labelledby. Omitting `value` marks it indeterminate, which is announced differently from zero. Show the percentage in text as well — the bar alone is not readable at a glance for everyone.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/radio-group/meta.ts\nconst meta = defineMeta({\n\tname: \"radio-group\",\n\ttitle: \"Radio Group\",\n\tdescription: \"A set of mutually exclusive options.\",\n\tcategory: \"form\",\n\tstatus: \"stable\",\n\tdependencies: [\"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"radio-group.tsx\"],\n\ta11y: \"Arrow keys move between options and select as they go, and the group is a single tab stop — the standard radio model. Give the group an accessible name with aria-labelledby, and each item a Label tied by htmlFor/id.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/select/meta.ts\nconst meta = defineMeta({\n\tname: \"select\",\n\ttitle: \"Select\",\n\tdescription: \"Picks one value from a short list of options.\",\n\tcategory: \"form\",\n\tstatus: \"stable\",\n\tdependencies: [\"class-variance-authority\", \"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"select.tsx\"],\n\ta11y: \"Full listbox keyboard model: arrows move, typeahead jumps, Enter selects, Escape closes and restores focus. Give the trigger a name with aria-labelledby or a Label. Past about a dozen options prefer Combobox — scrolling a long listbox by keyboard is slow.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/separator/meta.ts\nconst meta = defineMeta({\n\tname: \"separator\",\n\ttitle: \"Separator\",\n\tdescription: \"A horizontal or vertical rule that divides content.\",\n\tcategory: \"layout\",\n\tstatus: \"stable\",\n\tdependencies: [\"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"separator.tsx\"],\n\ta11y: \"Decorative by default and hidden from assistive technology. Set decorative={false} to expose it as a semantic separator when it divides meaningfully distinct groups.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/sheet/meta.ts\nconst meta = defineMeta({\n\tname: \"sheet\",\n\ttitle: \"Sheet\",\n\tdescription: \"A panel that enters from an edge of the viewport for secondary content.\",\n\tcategory: \"overlay\",\n\tstatus: \"stable\",\n\tdependencies: [\"class-variance-authority\", \"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"sheet.tsx\"],\n\ta11y: \"Modal, with the same focus trapping and restoration as Dialog. Always render a SheetTitle. For a side navigation sheet, put a nav landmark inside rather than relying on placement to convey the role.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/skeleton/meta.ts\nconst meta = defineMeta({\n\tname: \"skeleton\",\n\ttitle: \"Skeleton\",\n\tdescription: \"A shaped placeholder that holds layout while content loads.\",\n\tcategory: \"feedback\",\n\tstatus: \"stable\",\n\tdependencies: [],\n\tregistryDependencies: [],\n\tfiles: [\"skeleton.tsx\"],\n\ta11y: \"Hidden from assistive technology. Put aria-busy on the container that owns the loading data so the state is announced once instead of once per placeholder.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/slider/meta.ts\nconst meta = defineMeta({\n\tname: \"slider\",\n\ttitle: \"Slider\",\n\tdescription: \"Selects a value, or a range, from a continuous span.\",\n\tcategory: \"form\",\n\tstatus: \"stable\",\n\tdependencies: [\"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"slider.tsx\"],\n\ta11y: \"Each thumb is a role=\\\"slider\\\" with arrow keys, Home/End and Page Up/Down. The name is forwarded onto the thumbs, since the root has no role — a range slider should name each thumb separately with thumbLabels. A development-only warning fires if a thumb would be unnamed. Pass aria-valuetext when the raw number is not meaningful on its own (a price, a duration). Show the current value on screen too — a slider is imprecise, so pair it with a numeric input when exactness matters.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/spinner/meta.ts\nconst meta = defineMeta({\n\tname: \"spinner\",\n\ttitle: \"Spinner\",\n\tdescription: \"An indeterminate loading indicator for buttons, panels and inline content.\",\n\tcategory: \"feedback\",\n\tstatus: \"stable\",\n\tdependencies: [\"class-variance-authority\"],\n\tregistryDependencies: [],\n\tfiles: [\"spinner.tsx\"],\n\ta11y: \"Renders aria-hidden by default so it does not announce inside controls that already expose a busy state. Pass `label` to announce it standalone via role=\\\"status\\\".\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/switch/meta.ts\nconst meta = defineMeta({\n\tname: \"switch\",\n\ttitle: \"Switch\",\n\tdescription: \"An immediate on/off toggle for settings that apply straight away.\",\n\tcategory: \"form\",\n\tstatus: \"stable\",\n\tdependencies: [\"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"switch.tsx\"],\n\ta11y: \"Exposed as role=\\\"switch\\\" and toggled with Space or Enter. Needs a visible label tied with htmlFor/id. Do not rely on colour alone to show state — position and the label carry it too.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/table/meta.ts\nconst meta = defineMeta({\n\tname: \"table\",\n\ttitle: \"Table\",\n\tdescription: \"Semantic table primitives for tabular data.\",\n\tcategory: \"data\",\n\tstatus: \"stable\",\n\tdependencies: [],\n\tregistryDependencies: [],\n\tfiles: [\"table.tsx\"],\n\ta11y: \"A native table, so row and column position, header association and dimensions are all announced without ARIA. Give it a name with TableCaption or aria-label. The scrolling wrapper is focusable so an overflowing table can be scrolled by keyboard — without that, columns past the edge are unreachable. Use scope=\\\"row\\\" on th elements inside tbody.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/tabs/meta.ts\nconst meta = defineMeta({\n\tname: \"tabs\",\n\ttitle: \"Tabs\",\n\tdescription: \"Switches between panels of related content.\",\n\tcategory: \"navigation\",\n\tstatus: \"stable\",\n\tdependencies: [\"class-variance-authority\", \"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"tabs.tsx\"],\n\ta11y: \"Implements the ARIA tabs pattern: arrows move between tabs, Home/End jump to the ends, and only the active tab is in the tab sequence. Panels are focusable so keyboard users reach their content directly. Use activationMode=\\\"manual\\\" when showing a panel is expensive, so arrowing past it does not load it.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/toast/meta.ts\nconst meta = defineMeta({\n\tname: \"toast\",\n\ttitle: \"Toast\",\n\tdescription: \"Brief, non-blocking messages with an imperative API callable from anywhere.\",\n\tcategory: \"feedback\",\n\tstatus: \"stable\",\n\tdependencies: [\"class-variance-authority\", \"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"toast-store.ts\", \"toast.tsx\"],\n\ta11y: \"Toasts are announced through a live region: destructive and warning variants interrupt (foreground), the rest wait for a pause (background). Auto-dismiss timers pause on hover, focus and window blur, and F8 moves focus into the toast list from anywhere. An action must carry altText describing how to do the same thing without the toast, since it may be gone before a screen reader user reaches it.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/components/tooltip/meta.ts\nconst meta = defineMeta({\n\tname: \"tooltip\",\n\ttitle: \"Tooltip\",\n\tdescription: \"A short label revealed on hover or keyboard focus.\",\n\tcategory: \"overlay\",\n\tstatus: \"stable\",\n\tdependencies: [\"radix-ui\"],\n\tregistryDependencies: [],\n\tfiles: [\"tooltip.tsx\"],\n\ta11y: \"Opens on focus as well as hover, and Escape dismisses it. Never put essential or interactive content in a tooltip: it is unreachable on touch and vanishes on blur. For an icon-only button, prefer aria-label for the name and use the tooltip only to repeat it visually.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/blocks/admin-users/meta.ts\nconst meta = defineMeta({\n\tname: \"admin-users\",\n\tkind: \"block\",\n\ttitle: \"Admin — users\",\n\tdescription: \"A team administration table with filtering, sorting and per-row actions.\",\n\tcategory: \"data\",\n\tstatus: \"stable\",\n\tdependencies: [\"@tanstack/react-table\"],\n\tregistryDependencies: [\n\t\t\"avatar\",\n\t\t\"badge\",\n\t\t\"button\",\n\t\t\"data-table\",\n\t\t\"dropdown-menu\",\n\t\t\"empty-state\",\n\t\t\"input\",\n\t\t\"label\"\n\t],\n\tfiles: [\"admin-users.tsx\"],\n\ta11y: \"Filtering changes the results without the user asking, so the matching count is announced politely. The filter has a real label rather than only a placeholder, which disappears the moment anyone types. Each row's action button is named after its row — four identical \\\"Actions\\\" buttons say nothing about which row you are on.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/blocks/ai-chat/meta.ts\nconst meta = defineMeta({\n\tname: \"ai-chat\",\n\tkind: \"block\",\n\ttitle: \"AI Chat\",\n\tdescription: \"A complete chat surface: transcript, reasoning, tool calls, sources and composer.\",\n\tcategory: \"ai\",\n\tstatus: \"stable\",\n\tdependencies: [],\n\tregistryDependencies: [\n\t\t\"ai-conversation\",\n\t\t\"ai-message\",\n\t\t\"ai-model-selector\",\n\t\t\"ai-prompt-input\",\n\t\t\"ai-reasoning\",\n\t\t\"ai-response\",\n\t\t\"ai-sources\",\n\t\t\"ai-token-usage\",\n\t\t\"ai-tool\",\n\t\t\"button\",\n\t\t\"empty-state\"\n\t],\n\tfiles: [\"ai-chat.tsx\"],\n\ta11y: \"Assembled from the AI components rather than reimplementing them, so their decisions still hold: the transcript is a list and not a live region, state is announced separately through ConversationStatus, and the composer will not send while an IME composition is active. Tool payloads are named per tool, so two open tool calls do not present two regions called \\\"Result\\\".\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/blocks/dashboard/meta.ts\nconst meta = defineMeta({\n\tname: \"dashboard\",\n\tkind: \"block\",\n\ttitle: \"Dashboard\",\n\tdescription: \"An overview page with headline metrics and a recent activity feed.\",\n\tcategory: \"data\",\n\tstatus: \"stable\",\n\tdependencies: [],\n\tregistryDependencies: [\n\t\t\"activity-feed\",\n\t\t\"badge\",\n\t\t\"card\",\n\t\t\"skeleton\"\n\t],\n\tfiles: [\"dashboard.tsx\"],\n\ta11y: \"Each metric states its change in words — \\\"up 12.4%\\\" — rather than by a coloured arrow, which is unreadable to a screen reader and ambiguous to anyone who cannot distinguish the colours. Whether a rise is good is configurable, since churn going up is not. The metrics sit in a named region so they can be jumped to.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/blocks/forgot-password/meta.ts\nconst meta = defineMeta({\n\tname: \"forgot-password\",\n\tkind: \"block\",\n\ttitle: \"Forgot password\",\n\tdescription: \"A password reset request, with a confirmation that does not leak account existence.\",\n\tcategory: \"form\",\n\tstatus: \"stable\",\n\tdependencies: [],\n\tregistryDependencies: [\n\t\t\"button\",\n\t\t\"card\",\n\t\t\"empty-state\",\n\t\t\"form\",\n\t\t\"input\"\n\t],\n\tfiles: [\"forgot-password.tsx\"],\n\ta11y: \"The confirmation replaces the form, so it is a polite live region — otherwise a screen reader user submits and hears nothing. The wording is deliberately neutral about whether the address exists: confirming it would turn this form into an account enumeration oracle.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/blocks/login/meta.ts\nconst meta = defineMeta({\n\tname: \"login\",\n\tkind: \"block\",\n\ttitle: \"Login\",\n\tdescription: \"A sign-in form with validation, social providers and a busy state.\",\n\tcategory: \"form\",\n\tstatus: \"stable\",\n\tdependencies: [],\n\tregistryDependencies: [\n\t\t\"button\",\n\t\t\"card\",\n\t\t\"checkbox\",\n\t\t\"form\",\n\t\t\"input\",\n\t\t\"label\",\n\t\t\"separator\"\n\t],\n\tfiles: [\"login.tsx\"],\n\ta11y: \"Email and password fields carry the right type and autocomplete, so password managers and mobile keyboards behave. Field errors are tied to their inputs through the Form wiring; a server error is an assertive alert, because it arrived after the user acted and explains why nothing happened. The submit button reports its own busy state rather than going quiet.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/blocks/pricing/meta.ts\nconst meta = defineMeta({\n\tname: \"pricing\",\n\tkind: \"block\",\n\ttitle: \"Pricing\",\n\tdescription: \"A pricing section with plan cards and a monthly/yearly toggle.\",\n\tcategory: \"layout\",\n\tstatus: \"stable\",\n\tdependencies: [],\n\tregistryDependencies: [\n\t\t\"badge\",\n\t\t\"button\",\n\t\t\"card\",\n\t\t\"label\",\n\t\t\"switch\"\n\t],\n\tfiles: [\"pricing.tsx\"],\n\ta11y: \"Switching the billing period rewrites every price on the page, so the change is announced politely rather than happening silently. Each plan's call to action names the plan — three buttons all reading \\\"Choose\\\" are indistinguishable out of context. Feature ticks are decorative; the feature text carries the meaning.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/blocks/settings/meta.ts\nconst meta = defineMeta({\n\tname: \"settings\",\n\tkind: \"block\",\n\ttitle: \"Settings\",\n\tdescription: \"A settings page with a profile form, immediate toggles and a danger zone.\",\n\tcategory: \"form\",\n\tstatus: \"stable\",\n\tdependencies: [],\n\tregistryDependencies: [\n\t\t\"avatar\",\n\t\t\"button\",\n\t\t\"card\",\n\t\t\"dialog\",\n\t\t\"form\",\n\t\t\"input\",\n\t\t\"label\",\n\t\t\"separator\",\n\t\t\"switch\",\n\t\t\"tabs\"\n\t],\n\tfiles: [\"settings.tsx\"],\n\ta11y: \"Switches apply immediately and have no Save button — a switch that needs saving is a broken promise, so staged changes live in the form instead. The delete confirmation names what will be destroyed and requires typing the account's email, so the destructive button cannot be reached by muscle memory.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { defineMeta } from \"../../registry/schema.js\";\n//#region src/blocks/signup/meta.ts\nconst meta = defineMeta({\n\tname: \"signup\",\n\tkind: \"block\",\n\ttitle: \"Sign up\",\n\tdescription: \"An account creation form with a password strength hint and terms acceptance.\",\n\tcategory: \"form\",\n\tstatus: \"stable\",\n\tdependencies: [],\n\tregistryDependencies: [\n\t\t\"button\",\n\t\t\"card\",\n\t\t\"checkbox\",\n\t\t\"form\",\n\t\t\"input\",\n\t\t\"progress\"\n\t],\n\tfiles: [\"signup.tsx\"],\n\ta11y: \"The strength label is text and the bar beside it is aria-hidden, so the estimate is not announced twice. autoComplete=\\\"new-password\\\" tells password managers to offer a generated password rather than an existing one. Strength is a hint, never a gate: the form is validated on length alone.\"\n});\n//#endregion\nexport { meta };\n\n//# sourceMappingURL=meta.js.map","import { meta } from \"../blocks/admin-users/meta.js\";\nimport { meta as meta$1 } from \"../blocks/ai-chat/meta.js\";\nimport { meta as meta$2 } from \"../blocks/dashboard/meta.js\";\nimport { meta as meta$3 } from \"../blocks/forgot-password/meta.js\";\nimport { meta as meta$4 } from \"../blocks/login/meta.js\";\nimport { meta as meta$5 } from \"../blocks/pricing/meta.js\";\nimport { meta as meta$6 } from \"../blocks/settings/meta.js\";\nimport { meta as meta$7 } from \"../blocks/signup/meta.js\";\n//#region src/registry/blocks.ts\n/**\n* Every block in the registry.\n*\n* Kept separate from `componentMetas` for the same reason blocks install into a\n* different directory: they are whole page sections, browsed and used\n* differently from the components they are assembled out of.\n*\n* `meta.test.ts` fails if a block directory exists that is missing from here.\n*/\nconst blockMetas = [\n\tmeta,\n\tmeta$1,\n\tmeta$2,\n\tmeta$3,\n\tmeta$4,\n\tmeta$5,\n\tmeta$6,\n\tmeta$7\n];\n//#endregion\nexport { blockMetas };\n\n//# sourceMappingURL=blocks.js.map","import { COMPONENT_CATEGORIES, COMPONENT_STATUSES } from \"./schema.js\";\nimport { meta } from \"../components/accordion/meta.js\";\nimport { meta as meta$1 } from \"../components/activity-feed/meta.js\";\nimport { meta as meta$2 } from \"../components/ai-agent-status/meta.js\";\nimport { meta as meta$3 } from \"../components/ai-conversation/meta.js\";\nimport { meta as meta$4 } from \"../components/ai-message/meta.js\";\nimport { meta as meta$5 } from \"../components/ai-model-selector/meta.js\";\nimport { meta as meta$6 } from \"../components/ai-prompt-input/meta.js\";\nimport { meta as meta$7 } from \"../components/ai-reasoning/meta.js\";\nimport { meta as meta$8 } from \"../components/ai-response/meta.js\";\nimport { meta as meta$9 } from \"../components/ai-sources/meta.js\";\nimport { meta as meta$10 } from \"../components/ai-token-usage/meta.js\";\nimport { meta as meta$11 } from \"../components/ai-tool/meta.js\";\nimport { meta as meta$12 } from \"../components/alert/meta.js\";\nimport { meta as meta$13 } from \"../components/avatar/meta.js\";\nimport { meta as meta$14 } from \"../components/badge/meta.js\";\nimport { meta as meta$15 } from \"../components/button/meta.js\";\nimport { meta as meta$16 } from \"../components/calendar/meta.js\";\nimport { meta as meta$17 } from \"../components/card/meta.js\";\nimport { meta as meta$18 } from \"../components/checkbox/meta.js\";\nimport { meta as meta$19 } from \"../components/code-block/meta.js\";\nimport { meta as meta$20 } from \"../components/combobox/meta.js\";\nimport { meta as meta$21 } from \"../components/command/meta.js\";\nimport { meta as meta$22 } from \"../components/data-table/meta.js\";\nimport { meta as meta$23 } from \"../components/date-picker/meta.js\";\nimport { meta as meta$24 } from \"../components/dialog/meta.js\";\nimport { meta as meta$25 } from \"../components/drawer/meta.js\";\nimport { meta as meta$26 } from \"../components/dropdown-menu/meta.js\";\nimport { meta as meta$27 } from \"../components/empty-state/meta.js\";\nimport { meta as meta$28 } from \"../components/form/meta.js\";\nimport { meta as meta$29 } from \"../components/input/meta.js\";\nimport { meta as meta$30 } from \"../components/label/meta.js\";\nimport { meta as meta$31 } from \"../components/pagination/meta.js\";\nimport { meta as meta$32 } from \"../components/popover/meta.js\";\nimport { meta as meta$33 } from \"../components/progress/meta.js\";\nimport { meta as meta$34 } from \"../components/radio-group/meta.js\";\nimport { meta as meta$35 } from \"../components/select/meta.js\";\nimport { meta as meta$36 } from \"../components/separator/meta.js\";\nimport { meta as meta$37 } from \"../components/sheet/meta.js\";\nimport { meta as meta$38 } from \"../components/skeleton/meta.js\";\nimport { meta as meta$39 } from \"../components/slider/meta.js\";\nimport { meta as meta$40 } from \"../components/spinner/meta.js\";\nimport { meta as meta$41 } from \"../components/switch/meta.js\";\nimport { meta as meta$42 } from \"../components/table/meta.js\";\nimport { meta as meta$43 } from \"../components/tabs/meta.js\";\nimport { meta as meta$44 } from \"../components/toast/meta.js\";\nimport { meta as meta$45 } from \"../components/tooltip/meta.js\";\nimport { blockMetas } from \"./blocks.js\";\n//#region src/registry/components.ts\n/**\n* Every component in the registry.\n*\n* An explicit list rather than a glob: the registry build runs in plain Node,\n* where bundler-only globbing is unavailable, and a static list is also what\n* lets the bundle tree-shake. `meta.test.ts` fails if a component directory\n* exists that is missing from here, so it cannot silently fall out of date.\n*\n* Identifiers carry a `Meta` suffix because component names include reserved\n* words — `switch` cannot be a binding name.\n*/\nconst componentMetas = [\n\tmeta,\n\tmeta$1,\n\tmeta$2,\n\tmeta$3,\n\tmeta$4,\n\tmeta$5,\n\tmeta$6,\n\tmeta$7,\n\tmeta$8,\n\tmeta$9,\n\tmeta$10,\n\tmeta$11,\n\tmeta$12,\n\tmeta$13,\n\tmeta$14,\n\tmeta$15,\n\tmeta$16,\n\tmeta$17,\n\tmeta$18,\n\tmeta$19,\n\tmeta$20,\n\tmeta$21,\n\tmeta$22,\n\tmeta$23,\n\tmeta$24,\n\tmeta$25,\n\tmeta$26,\n\tmeta$27,\n\tmeta$28,\n\tmeta$29,\n\tmeta$30,\n\tmeta$31,\n\tmeta$32,\n\tmeta$33,\n\tmeta$34,\n\tmeta$35,\n\tmeta$36,\n\tmeta$37,\n\tmeta$38,\n\tmeta$39,\n\tmeta$40,\n\tmeta$41,\n\tmeta$42,\n\tmeta$43,\n\tmeta$44,\n\tmeta$45\n];\n//#endregion\nexport { COMPONENT_CATEGORIES, COMPONENT_STATUSES, blockMetas, componentMetas };\n\n//# sourceMappingURL=components.js.map","import { readFileSync, mkdirSync, writeFileSync, rmSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\nimport { fileURLToPath, pathToFileURL } from \"node:url\";\n\nimport { blockMetas, componentMetas, type ComponentMeta } from \"@dowel-ui/react/registry\";\n\nimport { hashContent } from \"./hash\";\nimport {\n REGISTRY_VERSION,\n registryIndexSchema,\n registryItemSchema,\n type RegistryFile,\n type RegistryIndexEntry,\n type RegistryItem,\n} from \"./schema\";\n\n/**\n * Emits the public registry.\n *\n * Everything the CLI installs originates here, from the same source files the\n * library itself builds and tests. There is no second copy of a component to\n * drift out of sync.\n */\n\nconst here = dirname(fileURLToPath(import.meta.url));\nconst uiSrc = join(here, \"..\", \"..\", \"ui\", \"src\");\nconst themesSrc = join(here, \"..\", \"..\", \"themes\", \"src\");\nconst uiPackageJson = JSON.parse(\n readFileSync(join(here, \"..\", \"..\", \"ui\", \"package.json\"), \"utf8\"),\n) as { name: string; version: string };\n\nfunction read(path: string): string {\n return readFileSync(path, \"utf8\");\n}\n\n/**\n * Turns a meta into a registry item.\n *\n * Components and blocks differ only in where their source lives and where it is\n * installed, so one function covers both rather than two that drift.\n */\nfunction buildSourceItem(meta: ComponentMeta): RegistryItem {\n const isBlock = meta.kind === \"block\";\n const sourceDir = join(uiSrc, isBlock ? \"blocks\" : \"components\", meta.name);\n const group = isBlock ? \"blocks\" : \"ui\";\n const fileType = isBlock ? \"registry:block\" : \"registry:ui\";\n\n const files: RegistryFile[] = meta.files.map((file) => {\n const content = read(join(sourceDir, file));\n return {\n path: `${group}/${file}`,\n type: fileType,\n content,\n hash: hashContent(content),\n };\n });\n\n return registryItemSchema.parse({\n $schema: \"./schema/registry-item.json\",\n registryVersion: REGISTRY_VERSION,\n name: meta.name,\n type: fileType,\n title: meta.title,\n description: meta.description,\n category: meta.category,\n status: meta.status,\n dependencies: meta.dependencies,\n registryDependencies: meta.registryDependencies,\n files,\n a11y: meta.a11y,\n });\n}\n\n/**\n * The utilities every component imports.\n *\n * Written by `init` rather than by `add`, because a project needs them before\n * the first component and every component assumes they are present.\n */\nfunction buildUtilsItem(): RegistryItem {\n const files: RegistryFile[] = ([\"utils.ts\", \"styles.ts\"] as const).map((file) => {\n const content = read(join(uiSrc, \"lib\", file));\n return {\n path: `lib/${file}`,\n type: \"registry:lib\",\n content,\n hash: hashContent(content),\n };\n });\n\n return registryItemSchema.parse({\n registryVersion: REGISTRY_VERSION,\n name: \"utils\",\n type: \"registry:lib\",\n title: \"Utilities\",\n description:\n \"The cn() class merger and the shared interaction-state fragments every component uses.\",\n category: \"foundation\",\n status: \"stable\",\n dependencies: [\"clsx\", \"tailwind-merge\"],\n registryDependencies: [],\n files,\n });\n}\n\n/**\n * The design tokens, as CSS to append to the project stylesheet.\n *\n * Appended rather than imported from a package: a consumer who cannot edit the\n * tokens does not really own their design system, which is the whole premise.\n */\nfunction buildThemeItem(): RegistryItem {\n const content = [\n \"/* Design tokens. Safe to edit — this is your copy. */\",\n read(join(themesSrc, \"tokens.css\")),\n read(join(themesSrc, \"base.css\")),\n ].join(\"\\n\\n\");\n\n return registryItemSchema.parse({\n registryVersion: REGISTRY_VERSION,\n name: \"theme\",\n type: \"registry:theme\",\n title: \"Theme\",\n description:\n \"Design tokens: colour, radius, typography, elevation and motion, in light and dark.\",\n category: \"foundation\",\n status: \"stable\",\n dependencies: [],\n registryDependencies: [],\n files: [\n {\n path: \"theme.css\",\n type: \"registry:style\",\n content,\n hash: hashContent(content),\n },\n ],\n });\n}\n\nexport function buildRegistry(): RegistryItem[] {\n return [\n buildUtilsItem(),\n buildThemeItem(),\n ...componentMetas.map(buildSourceItem),\n ...blockMetas.map(buildSourceItem),\n ];\n}\n\nexport function buildIndex(items: RegistryItem[]) {\n const entries: RegistryIndexEntry[] = items.map((item) => ({\n name: item.name,\n type: item.type,\n title: item.title,\n description: item.description,\n category: item.category,\n status: item.status,\n dependencies: item.dependencies,\n registryDependencies: item.registryDependencies,\n fileCount: item.files.length,\n }));\n\n return registryIndexSchema.parse({\n $schema: \"./schema/registry-index.json\",\n registryVersion: REGISTRY_VERSION,\n // The package version, not a timestamp: the same source must always produce\n // byte-identical output, or every build shows as a change.\n generatedFrom: `${uiPackageJson.name}@${uiPackageJson.version}`,\n items: entries,\n });\n}\n\nexport function writeRegistry(outDir: string): { items: number; files: number } {\n const items = buildRegistry();\n const index = buildIndex(items);\n\n rmSync(outDir, { recursive: true, force: true });\n mkdirSync(outDir, { recursive: true });\n\n writeFileSync(join(outDir, \"index.json\"), `${JSON.stringify(index, null, 2)}\\n`);\n for (const item of items) {\n writeFileSync(join(outDir, `${item.name}.json`), `${JSON.stringify(item, null, 2)}\\n`);\n }\n\n return {\n items: items.length,\n files: items.reduce((total, item) => total + item.files.length, 0),\n };\n}\n\n// Run directly: `tsx src/build.ts [--out <dir>]`\nconst invokedDirectly =\n process.argv[1] !== undefined && import.meta.url === pathToFileURL(process.argv[1]).href;\n\nif (invokedDirectly) {\n const outIndex = process.argv.indexOf(\"--out\");\n const outDir =\n outIndex === -1\n ? join(here, \"..\", \"r\")\n : (process.argv[outIndex + 1] ?? join(here, \"..\", \"r\"));\n\n const result = writeRegistry(outDir);\n console.log(\n `Registry written to ${outDir}: ${String(result.items)} items, ${String(result.files)} files.`,\n );\n}\n"],"mappings":";;;;;;AA0BA,SAAS,WAAW,MAAM;CACzB,OAAO;AACR;;;AC1BA,MAAMA,UAAO,WAAW;CACvB,MAAM;CACN,OAAO;CACP,aAAa;CACb,UAAU;CACV,QAAQ;CACR,cAAc,CAAC,UAAU;CACzB,sBAAsB,CAAC;CACvB,OAAO,CAAC,eAAe;CACvB,MAAM;AACP,CAAC;;;ACVD,MAAMC,UAAO,WAAW;CACvB,MAAM;CACN,OAAO;CACP,aAAa;CACb,UAAU;CACV,QAAQ;CACR,cAAc,CAAC,UAAU;CACzB,sBAAsB,CAAC;CACvB,OAAO,CAAC,mBAAmB;CAC3B,MAAM;AACP,CAAC;;;ACVD,MAAMC,UAAO,WAAW;CACvB,MAAM;CACN,OAAO;CACP,aAAa;CACb,UAAU;CACV,QAAQ;CACR,cAAc,CAAC,0BAA0B;CACzC,sBAAsB,CAAC;CACvB,OAAO,CAAC,qBAAqB;CAC7B,MAAM;AACP,CAAC;;;ACVD,MAAMC,UAAO,WAAW;CACvB,MAAM;CACN,OAAO;CACP,aAAa;CACb,UAAU;CACV,QAAQ;CACR,cAAc,CAAC;CACf,sBAAsB,CAAC;CACvB,OAAO,CAAC,qBAAqB;CAC7B,MAAM;AACP,CAAC;;;ACVD,MAAMC,UAAO,WAAW;CACvB,MAAM;CACN,OAAO;CACP,aAAa;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,CAAC,aAAa;CACrB,MAAM;AACP,CAAC;;;;;;;;;;;;ASMD,MAAM,aAAa;CRhBN,WAAW;EACvB,MAAM;EACN,MAAM;EACN,OAAO;EACP,aAAa;EACb,UAAU;EACV,QAAQ;EACR,cAAc,CAAC,uBAAuB;EACtC,sBAAsB;GACrB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA,OAAO,CAAC,iBAAiB;EACzB,MAAM;CACP,CQHCQ;CPjBY,WAAW;EACvB,MAAM;EACN,MAAM;EACN,OAAO;EACP,aAAa;EACb,UAAU;EACV,QAAQ;EACR,cAAc,CAAC;EACf,sBAAsB;GACrB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA,OAAO,CAAC,aAAa;EACrB,MAAM;CACP,COLCC;CNlBY,WAAW;EACvB,MAAM;EACN,MAAM;EACN,OAAO;EACP,aAAa;EACb,UAAU;EACV,QAAQ;EACR,cAAc,CAAC;EACf,sBAAsB;GACrB;GACA;GACA;GACA;EACD;EACA,OAAO,CAAC,eAAe;EACvB,MAAM;CACP,CMGCC;CLnBY,WAAW;EACvB,MAAM;EACN,MAAM;EACN,OAAO;EACP,aAAa;EACb,UAAU;EACV,QAAQ;EACR,cAAc,CAAC;EACf,sBAAsB;GACrB;GACA;GACA;GACA;GACA;EACD;EACA,OAAO,CAAC,qBAAqB;EAC7B,MAAM;CACP,CKGCC;CJpBY,WAAW;EACvB,MAAM;EACN,MAAM;EACN,OAAO;EACP,aAAa;EACb,UAAU;EACV,QAAQ;EACR,cAAc,CAAC;EACf,sBAAsB;GACrB;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA,OAAO,CAAC,WAAW;EACnB,MAAM;CACP,CIECC;CHrBY,WAAW;EACvB,MAAM;EACN,MAAM;EACN,OAAO;EACP,aAAa;EACb,UAAU;EACV,QAAQ;EACR,cAAc,CAAC;EACf,sBAAsB;GACrB;GACA;GACA;GACA;GACA;EACD;EACA,OAAO,CAAC,aAAa;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AAQ,KAAK,WAAW,MAAM,KAAK,MAAM,MAAM,GAAG;CAEzD,MAAM,SAAS,cAAc,MAAM;CACnC,QAAQ,IACN,uBAAuB,OAAO,IAAI,OAAO,OAAO,KAAK,EAAE,UAAU,OAAO,OAAO,KAAK,EAAE,QACxF;AACF"}
@@ -0,0 +1,12 @@
1
+ import { a as RegistryIndexEntry, c as registryFileSchema, d as registryIndexSchema, f as registryItemSchema, i as RegistryIndex, l as registryFileTypeSchema, n as RegistryFile, o as RegistryItem, p as registryItemTypeSchema, r as RegistryFileType, s as RegistryItemType, t as REGISTRY_VERSION, u as registryIndexEntrySchema } from "./schema-Cc32v3R-.js";
2
+ //#region src/hash.d.ts
3
+ /**
4
+ * Content hash used to detect local edits to an installed file.
5
+ *
6
+ * Line endings are normalised before hashing so a Windows checkout does not
7
+ * read as "every file modified", which would make `update` useless there.
8
+ */
9
+ declare function hashContent(content: string): string;
10
+ //#endregion
11
+ export { REGISTRY_VERSION, type RegistryFile, type RegistryFileType, type RegistryIndex, type RegistryIndexEntry, type RegistryItem, type RegistryItemType, hashContent, registryFileSchema, registryFileTypeSchema, registryIndexEntrySchema, registryIndexSchema, registryItemSchema, registryItemTypeSchema };
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/hash.ts"],"mappings":";;;;;;;;iBAQgB,YAAY"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ import { a as registryIndexSchema, c as hashContent, i as registryIndexEntrySchema, n as registryFileSchema, o as registryItemSchema, r as registryFileTypeSchema, s as registryItemTypeSchema, t as REGISTRY_VERSION } from "./schema-ByqIpT47.js";
2
+ export { REGISTRY_VERSION, hashContent, registryFileSchema, registryFileTypeSchema, registryIndexEntrySchema, registryIndexSchema, registryItemSchema, registryItemTypeSchema };
@@ -0,0 +1,101 @@
1
+ import { createHash } from "node:crypto";
2
+ import { z } from "zod";
3
+ //#region src/hash.ts
4
+ /**
5
+ * Content hash used to detect local edits to an installed file.
6
+ *
7
+ * Line endings are normalised before hashing so a Windows checkout does not
8
+ * read as "every file modified", which would make `update` useless there.
9
+ */
10
+ function hashContent(content) {
11
+ const normalised = content.replace(/\r\n/g, "\n");
12
+ return `sha256:${createHash("sha256").update(normalised, "utf8").digest("hex")}`;
13
+ }
14
+ //#endregion
15
+ //#region src/schema.ts
16
+ /**
17
+ * The public registry contract.
18
+ *
19
+ * This is the boundary between the library and every consumer's project, so it
20
+ * is validated on both sides: the build refuses to emit anything that does not
21
+ * satisfy it, and the CLI refuses to install anything that does not parse. A
22
+ * registry that serves malformed data breaks builds in someone else's
23
+ * repository, where it is hardest to diagnose.
24
+ */
25
+ /** Bumped only for a breaking change to the shape below. */
26
+ const REGISTRY_VERSION = 1;
27
+ const registryFileTypeSchema = z.enum([
28
+ "registry:ui",
29
+ "registry:lib",
30
+ "registry:hook",
31
+ "registry:block",
32
+ "registry:style"
33
+ ]);
34
+ const registryItemTypeSchema = z.enum([
35
+ "registry:ui",
36
+ "registry:lib",
37
+ "registry:hook",
38
+ "registry:theme",
39
+ "registry:block"
40
+ ]);
41
+ const registryFileSchema = z.object({
42
+ /**
43
+ * Logical path within the registry, e.g. `ui/button.tsx`, `lib/utils.ts`.
44
+ *
45
+ * The leading segment selects which of the consumer's aliases the file is
46
+ * written under. The registry deliberately does not know the destination —
47
+ * that depends on a project layout it has never seen.
48
+ */
49
+ path: z.string().min(1),
50
+ type: registryFileTypeSchema,
51
+ content: z.string(),
52
+ /**
53
+ * `sha256:<hex>` of `content` as published.
54
+ *
55
+ * Recorded at install time so `update` can tell an untouched file from one
56
+ * the user has edited. This cannot be added later: an install that did not
57
+ * record a hash leaves no way to know what it originally wrote.
58
+ */
59
+ hash: z.string().regex(/^sha256:[0-9a-f]{64}$/)
60
+ });
61
+ const registryItemSchema = z.object({
62
+ $schema: z.string().optional(),
63
+ registryVersion: z.literal(1),
64
+ name: z.string().regex(/^[a-z][a-z0-9-]*$/),
65
+ type: registryItemTypeSchema,
66
+ title: z.string().min(1),
67
+ description: z.string().min(10),
68
+ category: z.string().min(1),
69
+ status: z.enum([
70
+ "stable",
71
+ "beta",
72
+ "experimental"
73
+ ]),
74
+ /** npm packages to install alongside the files. */
75
+ dependencies: z.array(z.string()),
76
+ /** Other registry items to install first. */
77
+ registryDependencies: z.array(z.string()),
78
+ files: z.array(registryFileSchema).min(1),
79
+ a11y: z.string().optional()
80
+ });
81
+ const registryIndexEntrySchema = registryItemSchema.pick({
82
+ name: true,
83
+ type: true,
84
+ title: true,
85
+ description: true,
86
+ category: true,
87
+ status: true,
88
+ dependencies: true,
89
+ registryDependencies: true
90
+ }).extend({ fileCount: z.number().int().positive() });
91
+ const registryIndexSchema = z.object({
92
+ $schema: z.string().optional(),
93
+ registryVersion: z.literal(1),
94
+ /** Version of the package the registry was generated from. */
95
+ generatedFrom: z.string().min(1),
96
+ items: z.array(registryIndexEntrySchema)
97
+ });
98
+ //#endregion
99
+ export { registryIndexSchema as a, hashContent as c, registryIndexEntrySchema as i, registryFileSchema as n, registryItemSchema as o, registryFileTypeSchema as r, registryItemTypeSchema as s, REGISTRY_VERSION as t };
100
+
101
+ //# sourceMappingURL=schema-ByqIpT47.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-ByqIpT47.js","names":[],"sources":["../src/hash.ts","../src/schema.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\n\n/**\n * Content hash used to detect local edits to an installed file.\n *\n * Line endings are normalised before hashing so a Windows checkout does not\n * read as \"every file modified\", which would make `update` useless there.\n */\nexport function hashContent(content: string): string {\n const normalised = content.replace(/\\r\\n/g, \"\\n\");\n return `sha256:${createHash(\"sha256\").update(normalised, \"utf8\").digest(\"hex\")}`;\n}\n","import { z } from \"zod\";\n\n/**\n * The public registry contract.\n *\n * This is the boundary between the library and every consumer's project, so it\n * is validated on both sides: the build refuses to emit anything that does not\n * satisfy it, and the CLI refuses to install anything that does not parse. A\n * registry that serves malformed data breaks builds in someone else's\n * repository, where it is hardest to diagnose.\n */\n\n/** Bumped only for a breaking change to the shape below. */\nexport const REGISTRY_VERSION = 1;\n\nexport const registryFileTypeSchema = z.enum([\n /** A component. Installed under the `ui` alias. */\n \"registry:ui\",\n /** A shared utility. Installed under the `lib` alias. */\n \"registry:lib\",\n /** A hook. Installed under the `hooks` alias. */\n \"registry:hook\",\n /** A whole page section. Installed under the `blocks` alias. */\n \"registry:block\",\n /** CSS appended to the project stylesheet rather than written as a file. */\n \"registry:style\",\n]);\n\nexport type RegistryFileType = z.infer<typeof registryFileTypeSchema>;\n\nexport const registryItemTypeSchema = z.enum([\n \"registry:ui\",\n \"registry:lib\",\n \"registry:hook\",\n \"registry:theme\",\n \"registry:block\",\n]);\n\nexport type RegistryItemType = z.infer<typeof registryItemTypeSchema>;\n\nexport const registryFileSchema = z.object({\n /**\n * Logical path within the registry, e.g. `ui/button.tsx`, `lib/utils.ts`.\n *\n * The leading segment selects which of the consumer's aliases the file is\n * written under. The registry deliberately does not know the destination —\n * that depends on a project layout it has never seen.\n */\n path: z.string().min(1),\n type: registryFileTypeSchema,\n content: z.string(),\n /**\n * `sha256:<hex>` of `content` as published.\n *\n * Recorded at install time so `update` can tell an untouched file from one\n * the user has edited. This cannot be added later: an install that did not\n * record a hash leaves no way to know what it originally wrote.\n */\n hash: z.string().regex(/^sha256:[0-9a-f]{64}$/),\n});\n\nexport type RegistryFile = z.infer<typeof registryFileSchema>;\n\nexport const registryItemSchema = z.object({\n $schema: z.string().optional(),\n registryVersion: z.literal(REGISTRY_VERSION),\n name: z.string().regex(/^[a-z][a-z0-9-]*$/),\n type: registryItemTypeSchema,\n title: z.string().min(1),\n description: z.string().min(10),\n category: z.string().min(1),\n status: z.enum([\"stable\", \"beta\", \"experimental\"]),\n /** npm packages to install alongside the files. */\n dependencies: z.array(z.string()),\n /** Other registry items to install first. */\n registryDependencies: z.array(z.string()),\n files: z.array(registryFileSchema).min(1),\n a11y: z.string().optional(),\n});\n\nexport type RegistryItem = z.infer<typeof registryItemSchema>;\n\nexport const registryIndexEntrySchema = registryItemSchema\n .pick({\n name: true,\n type: true,\n title: true,\n description: true,\n category: true,\n status: true,\n dependencies: true,\n registryDependencies: true,\n })\n .extend({ fileCount: z.number().int().positive() });\n\nexport type RegistryIndexEntry = z.infer<typeof registryIndexEntrySchema>;\n\nexport const registryIndexSchema = z.object({\n $schema: z.string().optional(),\n registryVersion: z.literal(REGISTRY_VERSION),\n /** Version of the package the registry was generated from. */\n generatedFrom: z.string().min(1),\n items: z.array(registryIndexEntrySchema),\n});\n\nexport type RegistryIndex = z.infer<typeof registryIndexSchema>;\n"],"mappings":";;;;;;;;;AAQA,SAAgB,YAAY,SAAyB;CACnD,MAAM,aAAa,QAAQ,QAAQ,SAAS,IAAI;CAChD,OAAO,UAAU,WAAW,QAAQ,CAAC,CAAC,OAAO,YAAY,MAAM,CAAC,CAAC,OAAO,KAAK;AAC/E;;;;;;;;;;;;;ACEA,MAAa,mBAAmB;AAEhC,MAAa,yBAAyB,EAAE,KAAK;CAE3C;CAEA;CAEA;CAEA;CAEA;AACF,CAAC;AAID,MAAa,yBAAyB,EAAE,KAAK;CAC3C;CACA;CACA;CACA;CACA;AACF,CAAC;AAID,MAAa,qBAAqB,EAAE,OAAO;;;;;;;;CAQzC,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CACtB,MAAM;CACN,SAAS,EAAE,OAAO;;;;;;;;CAQlB,MAAM,EAAE,OAAO,CAAC,CAAC,MAAM,uBAAuB;AAChD,CAAC;AAID,MAAa,qBAAqB,EAAE,OAAO;CACzC,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS;CAC7B,iBAAiB,EAAE,QAAA,CAAwB;CAC3C,MAAM,EAAE,OAAO,CAAC,CAAC,MAAM,mBAAmB;CAC1C,MAAM;CACN,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CACvB,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE;CAC9B,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CAC1B,QAAQ,EAAE,KAAK;EAAC;EAAU;EAAQ;CAAc,CAAC;;CAEjD,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC;;CAEhC,sBAAsB,EAAE,MAAM,EAAE,OAAO,CAAC;CACxC,OAAO,EAAE,MAAM,kBAAkB,CAAC,CAAC,IAAI,CAAC;CACxC,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS;AAC5B,CAAC;AAID,MAAa,2BAA2B,mBACrC,KAAK;CACJ,MAAM;CACN,MAAM;CACN,OAAO;CACP,aAAa;CACb,UAAU;CACV,QAAQ;CACR,cAAc;CACd,sBAAsB;AACxB,CAAC,CAAC,CACD,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;AAIpD,MAAa,sBAAsB,EAAE,OAAO;CAC1C,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS;CAC7B,iBAAiB,EAAE,QAAA,CAAwB;;CAE3C,eAAe,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CAC/B,OAAO,EAAE,MAAM,wBAAwB;AACzC,CAAC"}
@@ -0,0 +1,130 @@
1
+ import { z } from "zod";
2
+ //#region src/schema.d.ts
3
+ /**
4
+ * The public registry contract.
5
+ *
6
+ * This is the boundary between the library and every consumer's project, so it
7
+ * is validated on both sides: the build refuses to emit anything that does not
8
+ * satisfy it, and the CLI refuses to install anything that does not parse. A
9
+ * registry that serves malformed data breaks builds in someone else's
10
+ * repository, where it is hardest to diagnose.
11
+ */
12
+ /** Bumped only for a breaking change to the shape below. */
13
+ declare const REGISTRY_VERSION = 1;
14
+ declare const registryFileTypeSchema: z.ZodEnum<{
15
+ "registry:ui": "registry:ui";
16
+ "registry:lib": "registry:lib";
17
+ "registry:hook": "registry:hook";
18
+ "registry:block": "registry:block";
19
+ "registry:style": "registry:style";
20
+ }>;
21
+ type RegistryFileType = z.infer<typeof registryFileTypeSchema>;
22
+ declare const registryItemTypeSchema: z.ZodEnum<{
23
+ "registry:ui": "registry:ui";
24
+ "registry:lib": "registry:lib";
25
+ "registry:hook": "registry:hook";
26
+ "registry:theme": "registry:theme";
27
+ "registry:block": "registry:block";
28
+ }>;
29
+ type RegistryItemType = z.infer<typeof registryItemTypeSchema>;
30
+ declare const registryFileSchema: z.ZodObject<{
31
+ path: z.ZodString;
32
+ type: z.ZodEnum<{
33
+ "registry:ui": "registry:ui";
34
+ "registry:lib": "registry:lib";
35
+ "registry:hook": "registry:hook";
36
+ "registry:block": "registry:block";
37
+ "registry:style": "registry:style";
38
+ }>;
39
+ content: z.ZodString;
40
+ hash: z.ZodString;
41
+ }, z.core.$strip>;
42
+ type RegistryFile = z.infer<typeof registryFileSchema>;
43
+ declare const registryItemSchema: z.ZodObject<{
44
+ $schema: z.ZodOptional<z.ZodString>;
45
+ registryVersion: z.ZodLiteral<1>;
46
+ name: z.ZodString;
47
+ type: z.ZodEnum<{
48
+ "registry:ui": "registry:ui";
49
+ "registry:lib": "registry:lib";
50
+ "registry:hook": "registry:hook";
51
+ "registry:theme": "registry:theme";
52
+ "registry:block": "registry:block";
53
+ }>;
54
+ title: z.ZodString;
55
+ description: z.ZodString;
56
+ category: z.ZodString;
57
+ status: z.ZodEnum<{
58
+ stable: "stable";
59
+ beta: "beta";
60
+ experimental: "experimental";
61
+ }>;
62
+ dependencies: z.ZodArray<z.ZodString>;
63
+ registryDependencies: z.ZodArray<z.ZodString>;
64
+ files: z.ZodArray<z.ZodObject<{
65
+ path: z.ZodString;
66
+ type: z.ZodEnum<{
67
+ "registry:ui": "registry:ui";
68
+ "registry:lib": "registry:lib";
69
+ "registry:hook": "registry:hook";
70
+ "registry:block": "registry:block";
71
+ "registry:style": "registry:style";
72
+ }>;
73
+ content: z.ZodString;
74
+ hash: z.ZodString;
75
+ }, z.core.$strip>>;
76
+ a11y: z.ZodOptional<z.ZodString>;
77
+ }, z.core.$strip>;
78
+ type RegistryItem = z.infer<typeof registryItemSchema>;
79
+ declare const registryIndexEntrySchema: z.ZodObject<{
80
+ type: z.ZodEnum<{
81
+ "registry:ui": "registry:ui";
82
+ "registry:lib": "registry:lib";
83
+ "registry:hook": "registry:hook";
84
+ "registry:theme": "registry:theme";
85
+ "registry:block": "registry:block";
86
+ }>;
87
+ name: z.ZodString;
88
+ title: z.ZodString;
89
+ description: z.ZodString;
90
+ category: z.ZodString;
91
+ status: z.ZodEnum<{
92
+ stable: "stable";
93
+ beta: "beta";
94
+ experimental: "experimental";
95
+ }>;
96
+ dependencies: z.ZodArray<z.ZodString>;
97
+ registryDependencies: z.ZodArray<z.ZodString>;
98
+ fileCount: z.ZodNumber;
99
+ }, z.core.$strip>;
100
+ type RegistryIndexEntry = z.infer<typeof registryIndexEntrySchema>;
101
+ declare const registryIndexSchema: z.ZodObject<{
102
+ $schema: z.ZodOptional<z.ZodString>;
103
+ registryVersion: z.ZodLiteral<1>;
104
+ generatedFrom: z.ZodString;
105
+ items: z.ZodArray<z.ZodObject<{
106
+ type: z.ZodEnum<{
107
+ "registry:ui": "registry:ui";
108
+ "registry:lib": "registry:lib";
109
+ "registry:hook": "registry:hook";
110
+ "registry:theme": "registry:theme";
111
+ "registry:block": "registry:block";
112
+ }>;
113
+ name: z.ZodString;
114
+ title: z.ZodString;
115
+ description: z.ZodString;
116
+ category: z.ZodString;
117
+ status: z.ZodEnum<{
118
+ stable: "stable";
119
+ beta: "beta";
120
+ experimental: "experimental";
121
+ }>;
122
+ dependencies: z.ZodArray<z.ZodString>;
123
+ registryDependencies: z.ZodArray<z.ZodString>;
124
+ fileCount: z.ZodNumber;
125
+ }, z.core.$strip>>;
126
+ }, z.core.$strip>;
127
+ type RegistryIndex = z.infer<typeof registryIndexSchema>;
128
+ //#endregion
129
+ export { RegistryIndexEntry as a, registryFileSchema as c, registryIndexSchema as d, registryItemSchema as f, RegistryIndex as i, registryFileTypeSchema as l, RegistryFile as n, RegistryItem as o, registryItemTypeSchema as p, RegistryFileType as r, RegistryItemType as s, REGISTRY_VERSION as t, registryIndexEntrySchema as u };
130
+ //# sourceMappingURL=schema-Cc32v3R-.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-Cc32v3R-.d.ts","names":[],"sources":["../src/schema.ts"],"mappings":";;;;;;;;;;;;cAaa;cAEA,wBAAsB,EAAA;;;;;;;KAavB,mBAAmB,EAAE,aAAa;cAEjC,wBAAsB,EAAA;;;;;;;KAQvB,mBAAmB,EAAE,aAAa;cAEjC,oBAAkB,EAAA;;;;;;;;;;;GAmB7B,EAAA,KAAA;KAEU,eAAe,EAAE,aAAa;cAE7B,oBAAkB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAe7B,EAAA,KAAA;KAEU,eAAe,EAAE,aAAa;cAE7B,0BAAwB,EAAA;;;;;;;;;;;;;;;;;;;;GAWgB,EAAA,KAAA;KAEzC,qBAAqB,EAAE,aAAa;cAEnC,qBAAmB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAM9B,EAAA,KAAA;KAEU,gBAAgB,EAAE,aAAa"}
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@dowel-ui/registry",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "Registry schema and the build that emits the public registry JSON.",
6
+ "files": [
7
+ "dist",
8
+ "src"
9
+ ],
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.js"
14
+ }
15
+ },
16
+ "bin": {
17
+ "build-registry": "./dist/build.js"
18
+ },
19
+ "dependencies": {
20
+ "zod": "4.5.4"
21
+ },
22
+ "devDependencies": {
23
+ "@types/node": "26.4.0",
24
+ "tsdown": "0.22.14",
25
+ "tsx": "4.23.13",
26
+ "typescript": "6.0.3",
27
+ "vitest": "4.1.10",
28
+ "@dowel-ui/themes": "0.1.0",
29
+ "@dowel-ui/config": "0.1.0",
30
+ "@dowel-ui/react": "0.1.0"
31
+ },
32
+ "scripts": {
33
+ "build": "tsdown && tsx src/build.ts --out r",
34
+ "build:registry": "tsx src/build.ts",
35
+ "typecheck": "tsc --noEmit",
36
+ "test": "vitest run",
37
+ "clean": "rm -rf dist .turbo r"
38
+ }
39
+ }
@@ -0,0 +1,131 @@
1
+ import { describe, expect, it } from "vitest";
2
+
3
+ import { buildIndex, buildRegistry } from "./build";
4
+ import { hashContent } from "./hash";
5
+ import { registryIndexSchema, registryItemSchema } from "./schema";
6
+
7
+ /**
8
+ * The registry is the boundary with every consumer's project, so these tests
9
+ * check the shape and the invariants the CLI relies on — not the contents of
10
+ * any particular component.
11
+ */
12
+
13
+ const items = buildRegistry();
14
+
15
+ describe("hashContent", () => {
16
+ it("produces a stable prefixed sha256", () => {
17
+ expect(hashContent("hello")).toMatch(/^sha256:[0-9a-f]{64}$/);
18
+ expect(hashContent("hello")).toBe(hashContent("hello"));
19
+ });
20
+
21
+ it("distinguishes different content", () => {
22
+ expect(hashContent("a")).not.toBe(hashContent("b"));
23
+ });
24
+
25
+ it("ignores line endings, so a Windows checkout is not all modified", () => {
26
+ expect(hashContent("a\r\nb")).toBe(hashContent("a\nb"));
27
+ });
28
+ });
29
+
30
+ describe("buildRegistry", () => {
31
+ it("emits every item in the published shape", () => {
32
+ for (const item of items) {
33
+ expect(() => registryItemSchema.parse(item)).not.toThrow();
34
+ }
35
+ });
36
+
37
+ it("includes the two items init depends on", () => {
38
+ const names = items.map((item) => item.name);
39
+ expect(names).toContain("utils");
40
+ expect(names).toContain("theme");
41
+ });
42
+
43
+ it("ships the components as registry:ui items", () => {
44
+ const button = items.find((item) => item.name === "button");
45
+ expect(button?.type).toBe("registry:ui");
46
+ expect(button?.files[0]?.path).toBe("ui/button.tsx");
47
+ });
48
+
49
+ it("ships the tokens as a style item, not a file to write", () => {
50
+ const theme = items.find((item) => item.name === "theme");
51
+ expect(theme?.files[0]?.type).toBe("registry:style");
52
+ expect(theme?.files[0]?.content).toContain("@theme");
53
+ expect(theme?.files[0]?.content).toContain("--radius-scale");
54
+ });
55
+
56
+ it("hashes match the content actually published", () => {
57
+ for (const item of items) {
58
+ for (const file of item.files) {
59
+ expect(file.hash).toBe(hashContent(file.content));
60
+ }
61
+ }
62
+ });
63
+
64
+ it("names every registry dependency that exists", () => {
65
+ const names = new Set(items.map((item) => item.name));
66
+ for (const item of items) {
67
+ for (const dependency of item.registryDependencies) {
68
+ expect(names.has(dependency), `${item.name} depends on missing "${dependency}"`).toBe(
69
+ true,
70
+ );
71
+ }
72
+ }
73
+ });
74
+
75
+ it("has no dependency cycles", () => {
76
+ const graph = new Map(items.map((item) => [item.name, item.registryDependencies]));
77
+ const state = new Map<string, "visiting" | "done">();
78
+
79
+ function visit(name: string, trail: string[]): void {
80
+ const current = state.get(name);
81
+ if (current === "done") return;
82
+ expect(current, `cycle: ${[...trail, name].join(" → ")}`).not.toBe("visiting");
83
+
84
+ state.set(name, "visiting");
85
+ for (const dependency of graph.get(name) ?? []) visit(dependency, [...trail, name]);
86
+ state.set(name, "done");
87
+ }
88
+
89
+ for (const name of graph.keys()) visit(name, []);
90
+ });
91
+
92
+ it("preserves directives that must stay on the first line", () => {
93
+ const dialog = items.find((item) => item.name === "dialog");
94
+ expect(dialog?.files[0]?.content.startsWith('"use client"')).toBe(true);
95
+ });
96
+
97
+ it("does not ship tests or stories", () => {
98
+ for (const item of items) {
99
+ for (const file of item.files) {
100
+ expect(file.path).not.toMatch(/\.(test|stories)\./);
101
+ }
102
+ }
103
+ });
104
+
105
+ it("is deterministic — the same source produces identical output", () => {
106
+ expect(JSON.stringify(buildRegistry())).toBe(JSON.stringify(items));
107
+ });
108
+ });
109
+
110
+ describe("buildIndex", () => {
111
+ const index = buildIndex(items);
112
+
113
+ it("matches the published shape", () => {
114
+ expect(() => registryIndexSchema.parse(index)).not.toThrow();
115
+ });
116
+
117
+ it("lists every item", () => {
118
+ expect(index.items).toHaveLength(items.length);
119
+ });
120
+
121
+ it("records where it was generated from, not when", () => {
122
+ // A timestamp would make every build a diff even when nothing changed.
123
+ // Scope and package name are branding, so only the shape is asserted here.
124
+ expect(index.generatedFrom).toMatch(/^@[\w-]+\/[\w-]+@\d+\.\d+\.\d+$/);
125
+ expect(JSON.stringify(index)).not.toMatch(/\d{4}-\d{2}-\d{2}T/);
126
+ });
127
+
128
+ it("omits file contents, so the index stays small", () => {
129
+ expect(JSON.stringify(index)).not.toContain("export function");
130
+ });
131
+ });