|
| 1 | +import type { |
| 2 | + DivSchema, |
| 3 | + SpanSchema, |
| 4 | + TextSchema, |
| 5 | + ImageSchema, |
| 6 | + IconSchema, |
| 7 | + SeparatorSchema, |
| 8 | + ContainerSchema, |
| 9 | + FlexSchema, |
| 10 | + GridSchema, |
| 11 | + CardSchema, |
| 12 | + TabsSchema, |
| 13 | + ScrollAreaSchema, |
| 14 | + ResizableSchema, |
| 15 | + PageSchema, |
| 16 | +} from './layout'; |
| 17 | + |
| 18 | +import type { |
| 19 | + ButtonSchema, |
| 20 | + InputSchema, |
| 21 | + TextareaSchema, |
| 22 | + SelectSchema, |
| 23 | + CheckboxSchema, |
| 24 | + RadioGroupSchema, |
| 25 | + SwitchSchema, |
| 26 | + ToggleSchema, |
| 27 | + SliderSchema, |
| 28 | + FileUploadSchema, |
| 29 | + DatePickerSchema, |
| 30 | + CalendarSchema as FormCalendarSchema, |
| 31 | + InputOTPSchema, |
| 32 | + FormSchema, |
| 33 | +} from './form'; |
| 34 | + |
| 35 | +import type { |
| 36 | + AlertSchema, |
| 37 | + BadgeSchema, |
| 38 | + AvatarSchema, |
| 39 | + ListSchema, |
| 40 | + TableSchema, |
| 41 | + DataTableSchema, |
| 42 | + MarkdownSchema, |
| 43 | + TreeViewSchema, |
| 44 | + ChartSchema, |
| 45 | + TimelineSchema, |
| 46 | + HtmlSchema, |
| 47 | +} from './data-display'; |
| 48 | + |
| 49 | +import type { |
| 50 | + LoadingSchema, |
| 51 | + ProgressSchema, |
| 52 | + SkeletonSchema, |
| 53 | + ToastSchema, |
| 54 | + ToasterSchema, |
| 55 | +} from './feedback'; |
| 56 | + |
| 57 | +import type { |
| 58 | + AccordionSchema, |
| 59 | + CollapsibleSchema, |
| 60 | + DisclosureSchema, |
| 61 | +} from './disclosure'; |
| 62 | + |
| 63 | +import type { |
| 64 | + DialogSchema, |
| 65 | + AlertDialogSchema, |
| 66 | + SheetSchema, |
| 67 | + DrawerSchema, |
| 68 | + PopoverSchema, |
| 69 | + TooltipSchema, |
| 70 | + HoverCardSchema, |
| 71 | + DropdownMenuSchema, |
| 72 | + ContextMenuSchema, |
| 73 | +} from './overlay'; |
| 74 | + |
| 75 | +import type { |
| 76 | + HeaderBarSchema, |
| 77 | + SidebarSchema, |
| 78 | + BreadcrumbSchema, |
| 79 | + PaginationSchema, |
| 80 | +} from './navigation'; |
| 81 | + |
| 82 | +import type { |
| 83 | + KanbanSchema, |
| 84 | + CalendarViewSchema, |
| 85 | + FilterBuilderSchema, |
| 86 | + CarouselSchema, |
| 87 | + ChatbotSchema, |
| 88 | +} from './complex'; |
| 89 | + |
| 90 | +/** |
| 91 | + * Registry mapping component types to their schema definitions. |
| 92 | + * This interface is the Single Source of Truth for component type lookups. |
| 93 | + */ |
| 94 | +export interface SchemaRegistry { |
| 95 | + // Layout |
| 96 | + 'div': DivSchema; |
| 97 | + 'span': SpanSchema; |
| 98 | + 'text': TextSchema; |
| 99 | + 'image': ImageSchema; |
| 100 | + 'icon': IconSchema; |
| 101 | + 'separator': SeparatorSchema; |
| 102 | + 'container': ContainerSchema; |
| 103 | + 'flex': FlexSchema; |
| 104 | + 'grid': GridSchema; |
| 105 | + 'card': CardSchema; |
| 106 | + 'tabs': TabsSchema; |
| 107 | + 'scroll-area': ScrollAreaSchema; |
| 108 | + 'resizable': ResizableSchema; |
| 109 | + 'page': PageSchema; |
| 110 | + |
| 111 | + // Form |
| 112 | + 'button': ButtonSchema; |
| 113 | + 'input': InputSchema; |
| 114 | + 'textarea': TextareaSchema; |
| 115 | + 'select': SelectSchema; |
| 116 | + 'checkbox': CheckboxSchema; |
| 117 | + 'radio-group': RadioGroupSchema; |
| 118 | + 'switch': SwitchSchema; |
| 119 | + 'toggle': ToggleSchema; |
| 120 | + 'slider': SliderSchema; |
| 121 | + 'file-upload': FileUploadSchema; |
| 122 | + 'date-picker': DatePickerSchema; |
| 123 | + 'calendar': FormCalendarSchema; |
| 124 | + 'input-otp': InputOTPSchema; |
| 125 | + 'form': FormSchema; |
| 126 | + |
| 127 | + // Data Display |
| 128 | + 'alert': AlertSchema; |
| 129 | + 'badge': BadgeSchema; |
| 130 | + 'avatar': AvatarSchema; |
| 131 | + 'list': ListSchema; |
| 132 | + 'table': TableSchema; |
| 133 | + 'data-table': DataTableSchema; |
| 134 | + 'markdown': MarkdownSchema; |
| 135 | + 'tree-view': TreeViewSchema; |
| 136 | + 'chart': ChartSchema; |
| 137 | + 'timeline': TimelineSchema; |
| 138 | + 'html': HtmlSchema; |
| 139 | + |
| 140 | + // Feedback |
| 141 | + 'loading': LoadingSchema; |
| 142 | + 'progress': ProgressSchema; |
| 143 | + 'skeleton': SkeletonSchema; |
| 144 | + 'toast': ToastSchema; |
| 145 | + 'toaster': ToasterSchema; |
| 146 | + |
| 147 | + // Disclosure |
| 148 | + 'accordion': AccordionSchema; |
| 149 | + 'collapsible': CollapsibleSchema; |
| 150 | + 'disclosure': DisclosureSchema; |
| 151 | + |
| 152 | + // Overlay |
| 153 | + 'dialog': DialogSchema; |
| 154 | + 'alert-dialog': AlertDialogSchema; |
| 155 | + 'sheet': SheetSchema; |
| 156 | + 'drawer': DrawerSchema; |
| 157 | + 'popover': PopoverSchema; |
| 158 | + 'tooltip': TooltipSchema; |
| 159 | + 'hover-card': HoverCardSchema; |
| 160 | + 'dropdown-menu': DropdownMenuSchema; |
| 161 | + 'context-menu': ContextMenuSchema; |
| 162 | + |
| 163 | + // Navigation |
| 164 | + 'header-bar': HeaderBarSchema; |
| 165 | + 'sidebar': SidebarSchema; |
| 166 | + 'breadcrumb': BreadcrumbSchema; |
| 167 | + 'pagination': PaginationSchema; |
| 168 | + |
| 169 | + // Complex |
| 170 | + 'kanban': KanbanSchema; |
| 171 | + 'calendar-view': CalendarViewSchema; |
| 172 | + 'filter-builder': FilterBuilderSchema; |
| 173 | + 'carousel': CarouselSchema; |
| 174 | + 'chatbot': ChatbotSchema; |
| 175 | +} |
| 176 | + |
| 177 | +/** |
| 178 | + * Union of all registered component types |
| 179 | + */ |
| 180 | +export type ComponentType = keyof SchemaRegistry; |
0 commit comments