@mdxui/terminal 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/README.md +571 -0
  2. package/dist/ansi-css-Sk5mWtdK.d.ts +119 -0
  3. package/dist/ansi-css-V6JIHGsM.d.ts +119 -0
  4. package/dist/ansi-css-_3eSEU9d.d.ts +119 -0
  5. package/dist/chunk-3EFDH7PK.js +5235 -0
  6. package/dist/chunk-3RG5ZIWI.js +10 -0
  7. package/dist/chunk-3X5IR6WE.js +884 -0
  8. package/dist/chunk-4FV5ZDCE.js +5236 -0
  9. package/dist/chunk-4OVMSF2J.js +243 -0
  10. package/dist/chunk-63FEETIS.js +4048 -0
  11. package/dist/chunk-B43KP7XJ.js +884 -0
  12. package/dist/chunk-BMTJXWUV.js +655 -0
  13. package/dist/chunk-C3SVH4N7.js +882 -0
  14. package/dist/chunk-EVWR7Y47.js +874 -0
  15. package/dist/chunk-F6A5VWUC.js +1285 -0
  16. package/dist/chunk-FD7KW7GE.js +882 -0
  17. package/dist/chunk-GBQ6UD6I.js +655 -0
  18. package/dist/chunk-GMDD3M6U.js +5227 -0
  19. package/dist/chunk-JBHRXOXM.js +1058 -0
  20. package/dist/chunk-JFOO3EYO.js +1182 -0
  21. package/dist/chunk-JQ5H3WXL.js +1291 -0
  22. package/dist/chunk-JQD5NASE.js +234 -0
  23. package/dist/chunk-KRHJP5R7.js +592 -0
  24. package/dist/chunk-KWF6WVJE.js +962 -0
  25. package/dist/chunk-LHYQVN3H.js +1038 -0
  26. package/dist/chunk-M3TLQLGC.js +1032 -0
  27. package/dist/chunk-MVW4Q5OP.js +240 -0
  28. package/dist/chunk-NXCZSWLU.js +1294 -0
  29. package/dist/chunk-O25TNRO6.js +607 -0
  30. package/dist/chunk-PNECDA2I.js +884 -0
  31. package/dist/chunk-QIHWRLJR.js +962 -0
  32. package/dist/chunk-QW5YMQ7K.js +882 -0
  33. package/dist/chunk-R5U7XKVJ.js +16 -0
  34. package/dist/chunk-RP2MVQLR.js +962 -0
  35. package/dist/chunk-TP6RXGXA.js +1087 -0
  36. package/dist/chunk-TQQSTITZ.js +655 -0
  37. package/dist/chunk-X24GWXQV.js +1281 -0
  38. package/dist/components/index.d.ts +802 -0
  39. package/dist/components/index.js +149 -0
  40. package/dist/data/index.d.ts +2554 -0
  41. package/dist/data/index.js +51 -0
  42. package/dist/forms/index.d.ts +1596 -0
  43. package/dist/forms/index.js +464 -0
  44. package/dist/index-CQRFZntR.d.ts +867 -0
  45. package/dist/index.d.ts +579 -0
  46. package/dist/index.js +786 -0
  47. package/dist/interactive-D0JkWosD.d.ts +217 -0
  48. package/dist/keyboard/index.d.ts +2 -0
  49. package/dist/keyboard/index.js +43 -0
  50. package/dist/renderers/index.d.ts +546 -0
  51. package/dist/renderers/index.js +2157 -0
  52. package/dist/storybook/index.d.ts +396 -0
  53. package/dist/storybook/index.js +641 -0
  54. package/dist/theme/index.d.ts +1339 -0
  55. package/dist/theme/index.js +123 -0
  56. package/dist/types-Bxu5PAgA.d.ts +710 -0
  57. package/dist/types-CIlop5Ji.d.ts +701 -0
  58. package/dist/types-Ca8p_p5X.d.ts +710 -0
  59. package/package.json +90 -0
  60. package/src/__tests__/components/data/card.test.ts +458 -0
  61. package/src/__tests__/components/data/list.test.ts +473 -0
  62. package/src/__tests__/components/data/metrics.test.ts +541 -0
  63. package/src/__tests__/components/data/table.test.ts +448 -0
  64. package/src/__tests__/components/input/field.test.ts +555 -0
  65. package/src/__tests__/components/input/form.test.ts +870 -0
  66. package/src/__tests__/components/input/search.test.ts +1238 -0
  67. package/src/__tests__/components/input/select.test.ts +658 -0
  68. package/src/__tests__/components/navigation/breadcrumb.test.ts +923 -0
  69. package/src/__tests__/components/navigation/command-palette.test.ts +1095 -0
  70. package/src/__tests__/components/navigation/sidebar.test.ts +1018 -0
  71. package/src/__tests__/components/navigation/tabs.test.ts +995 -0
  72. package/src/__tests__/components.test.tsx +1197 -0
  73. package/src/__tests__/core/compiler.test.ts +986 -0
  74. package/src/__tests__/core/parser.test.ts +785 -0
  75. package/src/__tests__/core/tier-switcher.test.ts +1103 -0
  76. package/src/__tests__/core/types.test.ts +1398 -0
  77. package/src/__tests__/data/collections.test.ts +1337 -0
  78. package/src/__tests__/data/db.test.ts +1265 -0
  79. package/src/__tests__/data/reactive.test.ts +1010 -0
  80. package/src/__tests__/data/sync.test.ts +1614 -0
  81. package/src/__tests__/errors.test.ts +660 -0
  82. package/src/__tests__/forms/integration.test.ts +444 -0
  83. package/src/__tests__/integration.test.ts +905 -0
  84. package/src/__tests__/keyboard.test.ts +1791 -0
  85. package/src/__tests__/renderer.test.ts +489 -0
  86. package/src/__tests__/renderers/ansi-css.test.ts +948 -0
  87. package/src/__tests__/renderers/ansi.test.ts +1366 -0
  88. package/src/__tests__/renderers/ascii.test.ts +1360 -0
  89. package/src/__tests__/renderers/interactive.test.ts +2353 -0
  90. package/src/__tests__/renderers/markdown.test.ts +1483 -0
  91. package/src/__tests__/renderers/text.test.ts +1369 -0
  92. package/src/__tests__/renderers/unicode.test.ts +1307 -0
  93. package/src/__tests__/theme.test.ts +639 -0
  94. package/src/__tests__/utils/assertions.ts +685 -0
  95. package/src/__tests__/utils/index.ts +115 -0
  96. package/src/__tests__/utils/test-renderer.ts +381 -0
  97. package/src/__tests__/utils/utils.test.ts +560 -0
  98. package/src/components/containers/card.ts +56 -0
  99. package/src/components/containers/dialog.ts +53 -0
  100. package/src/components/containers/index.ts +9 -0
  101. package/src/components/containers/panel.ts +59 -0
  102. package/src/components/feedback/badge.ts +40 -0
  103. package/src/components/feedback/index.ts +8 -0
  104. package/src/components/feedback/spinner.ts +23 -0
  105. package/src/components/helpers.ts +81 -0
  106. package/src/components/index.ts +153 -0
  107. package/src/components/layout/breadcrumb.ts +31 -0
  108. package/src/components/layout/index.ts +10 -0
  109. package/src/components/layout/list.ts +29 -0
  110. package/src/components/layout/sidebar.ts +79 -0
  111. package/src/components/layout/table.ts +62 -0
  112. package/src/components/primitives/box.ts +95 -0
  113. package/src/components/primitives/button.ts +54 -0
  114. package/src/components/primitives/index.ts +11 -0
  115. package/src/components/primitives/input.ts +88 -0
  116. package/src/components/primitives/select.ts +97 -0
  117. package/src/components/primitives/text.ts +60 -0
  118. package/src/components/render.ts +155 -0
  119. package/src/components/templates/app.ts +43 -0
  120. package/src/components/templates/index.ts +8 -0
  121. package/src/components/templates/site.ts +54 -0
  122. package/src/components/types.ts +777 -0
  123. package/src/core/compiler.ts +718 -0
  124. package/src/core/parser.ts +127 -0
  125. package/src/core/tier-switcher.ts +607 -0
  126. package/src/core/types.ts +672 -0
  127. package/src/data/collection.ts +316 -0
  128. package/src/data/collections.ts +50 -0
  129. package/src/data/context.tsx +174 -0
  130. package/src/data/db.ts +127 -0
  131. package/src/data/hooks.ts +532 -0
  132. package/src/data/index.ts +138 -0
  133. package/src/data/reactive.ts +1225 -0
  134. package/src/data/saas-collections.ts +375 -0
  135. package/src/data/sync.ts +1213 -0
  136. package/src/data/types.ts +660 -0
  137. package/src/forms/converters.ts +512 -0
  138. package/src/forms/index.ts +133 -0
  139. package/src/forms/schemas.ts +403 -0
  140. package/src/forms/types.ts +476 -0
  141. package/src/index.ts +542 -0
  142. package/src/keyboard/focus.ts +748 -0
  143. package/src/keyboard/index.ts +96 -0
  144. package/src/keyboard/integration.ts +371 -0
  145. package/src/keyboard/manager.ts +377 -0
  146. package/src/keyboard/presets.ts +90 -0
  147. package/src/renderers/ansi-css.ts +576 -0
  148. package/src/renderers/ansi.ts +802 -0
  149. package/src/renderers/ascii.ts +680 -0
  150. package/src/renderers/breadcrumb.ts +480 -0
  151. package/src/renderers/command-palette.ts +802 -0
  152. package/src/renderers/components/field.ts +210 -0
  153. package/src/renderers/components/form.ts +327 -0
  154. package/src/renderers/components/index.ts +21 -0
  155. package/src/renderers/components/search.ts +449 -0
  156. package/src/renderers/components/select.ts +222 -0
  157. package/src/renderers/index.ts +101 -0
  158. package/src/renderers/interactive/component-handlers.ts +622 -0
  159. package/src/renderers/interactive/cursor-manager.ts +147 -0
  160. package/src/renderers/interactive/focus-manager.ts +279 -0
  161. package/src/renderers/interactive/index.ts +661 -0
  162. package/src/renderers/interactive/input-handler.ts +164 -0
  163. package/src/renderers/interactive/keyboard-handler.ts +212 -0
  164. package/src/renderers/interactive/mouse-handler.ts +167 -0
  165. package/src/renderers/interactive/state-manager.ts +109 -0
  166. package/src/renderers/interactive/types.ts +338 -0
  167. package/src/renderers/interactive-string.ts +299 -0
  168. package/src/renderers/interactive.ts +59 -0
  169. package/src/renderers/markdown.ts +950 -0
  170. package/src/renderers/sidebar.ts +549 -0
  171. package/src/renderers/tabs.ts +682 -0
  172. package/src/renderers/text.ts +791 -0
  173. package/src/renderers/unicode.ts +917 -0
  174. package/src/renderers/utils.ts +942 -0
  175. package/src/router/adapters.ts +383 -0
  176. package/src/router/types.ts +140 -0
  177. package/src/router/utils.ts +452 -0
  178. package/src/schemas.ts +205 -0
  179. package/src/storybook/index.ts +91 -0
  180. package/src/storybook/interactive-decorator.tsx +659 -0
  181. package/src/storybook/keyboard-simulator.ts +501 -0
  182. package/src/theme/ansi-codes.ts +80 -0
  183. package/src/theme/box-drawing.ts +132 -0
  184. package/src/theme/color-convert.ts +254 -0
  185. package/src/theme/color-support.ts +321 -0
  186. package/src/theme/index.ts +134 -0
  187. package/src/theme/strip-ansi.ts +50 -0
  188. package/src/theme/tailwind-map.ts +469 -0
  189. package/src/theme/text-styles.ts +206 -0
  190. package/src/theme/theme-system.ts +568 -0
  191. package/src/types.ts +103 -0
@@ -0,0 +1,802 @@
1
+ import { ReactNode, ReactElement } from 'react';
2
+
3
+ /**
4
+ * @mdxui/terminal/components/types
5
+ *
6
+ * Component prop interfaces and type guards for terminal components.
7
+ */
8
+
9
+ interface RenderContext {
10
+ width: number;
11
+ parentWidth?: number;
12
+ /** Enable color output (optional, for testing) */
13
+ colors?: boolean;
14
+ /** Color support level (optional, for testing) */
15
+ colorSupport?: 'none' | '16' | '256' | 'truecolor';
16
+ }
17
+ /**
18
+ * Valid component type strings used in createElement
19
+ */
20
+ type TerminalComponentType = 'box' | 'text' | 'table' | 'input' | 'select' | 'sidebar' | 'sidebar-item' | 'breadcrumb' | 'badge' | 'dialog' | 'spinner' | 'button' | 'panel' | 'list' | 'card';
21
+ /**
22
+ * Set of all valid component types for O(1) lookup
23
+ */
24
+ declare const COMPONENT_TYPES: Set<string>;
25
+ interface BoxProps {
26
+ children?: ReactNode;
27
+ border?: 'none' | 'single' | 'double' | 'rounded';
28
+ padding?: number;
29
+ margin?: number;
30
+ width?: number | string;
31
+ height?: number | string;
32
+ flexDirection?: 'row' | 'column';
33
+ justifyContent?: 'flex-start' | 'center' | 'flex-end' | 'space-between';
34
+ alignItems?: 'flex-start' | 'center' | 'flex-end' | 'stretch';
35
+ gap?: number;
36
+ bg?: string;
37
+ }
38
+ interface TextProps {
39
+ children?: ReactNode;
40
+ bold?: boolean;
41
+ italic?: boolean;
42
+ underline?: boolean;
43
+ dim?: boolean;
44
+ color?: string;
45
+ backgroundColor?: string;
46
+ wrap?: 'wrap' | 'truncate' | 'truncate-middle' | 'truncate-end';
47
+ }
48
+ interface InputProps {
49
+ value?: string;
50
+ onChange?: (value: string) => void;
51
+ placeholder?: string;
52
+ label?: string;
53
+ disabled?: boolean;
54
+ focused?: boolean;
55
+ type?: 'text' | 'password';
56
+ /** Cursor position within the input value (defaults to end of value) */
57
+ cursorPosition?: number;
58
+ /** Width of the input field */
59
+ width?: number;
60
+ }
61
+ interface SelectOption<T> {
62
+ label: string;
63
+ value: T;
64
+ /** Optional: disable this option */
65
+ disabled?: boolean;
66
+ }
67
+ interface SelectProps<T> {
68
+ options: SelectOption<T>[];
69
+ value?: T;
70
+ onChange?: (value: T) => void;
71
+ label?: string;
72
+ focused?: boolean;
73
+ highlightedIndex?: number;
74
+ /** Maximum visible options when expanded (defaults to 5) */
75
+ maxVisible?: number;
76
+ }
77
+ interface ButtonProps {
78
+ children?: ReactNode;
79
+ onPress?: () => void;
80
+ hotkey?: string;
81
+ disabled?: boolean;
82
+ focused?: boolean;
83
+ variant?: 'primary' | 'secondary' | 'destructive';
84
+ }
85
+ interface PanelProps {
86
+ children?: ReactNode;
87
+ title?: string;
88
+ border?: 'none' | 'single' | 'double' | 'rounded';
89
+ collapsible?: boolean;
90
+ collapsed?: boolean;
91
+ padding?: number;
92
+ }
93
+ interface CardProps {
94
+ children?: ReactNode;
95
+ title?: string;
96
+ border?: 'none' | 'single' | 'double';
97
+ }
98
+ interface DialogProps {
99
+ open?: boolean;
100
+ onClose?: () => void;
101
+ title?: string;
102
+ children?: ReactNode;
103
+ }
104
+ /**
105
+ * Sidebar layout component props (internal terminal component).
106
+ * This is distinct from the mdxui SidebarProps for AppComponents.
107
+ * @deprecated Use SidebarProps (mdxui-compatible) instead for new code.
108
+ */
109
+ interface TerminalSidebarLayoutProps {
110
+ children?: ReactNode;
111
+ width?: number;
112
+ collapsed?: boolean;
113
+ }
114
+ interface SidebarItemProps {
115
+ label: string;
116
+ icon?: string;
117
+ active?: boolean;
118
+ onSelect?: () => void;
119
+ children?: ReactNode;
120
+ }
121
+ interface BreadcrumbProps {
122
+ items: Array<{
123
+ label: string;
124
+ path?: string;
125
+ }>;
126
+ separator?: string;
127
+ }
128
+ interface ListProps {
129
+ items: string[] | ReactNode[];
130
+ selectedIndex?: number;
131
+ onSelect?: (item: string | ReactNode, index: number) => void;
132
+ bullet?: string;
133
+ numbered?: boolean;
134
+ }
135
+ interface TableColumn<T> {
136
+ key: keyof T | string;
137
+ header: string;
138
+ width?: number;
139
+ align?: 'left' | 'center' | 'right';
140
+ render?: (value: unknown, row: T) => ReactNode;
141
+ }
142
+ interface TableProps<T> {
143
+ data: T[];
144
+ columns: TableColumn<T>[];
145
+ onSelect?: (row: T, index: number) => void;
146
+ selectedIndex?: number;
147
+ navigable?: boolean;
148
+ }
149
+ interface BadgeProps {
150
+ children?: ReactNode;
151
+ variant?: 'default' | 'success' | 'warning' | 'error' | 'info';
152
+ }
153
+ interface SpinnerProps {
154
+ label?: string;
155
+ }
156
+ /**
157
+ * Navigation item for headers, sidebars, etc.
158
+ * Compatible with mdxui NavItem.
159
+ */
160
+ interface NavItem {
161
+ label: string;
162
+ href: string;
163
+ icon?: string;
164
+ description?: string;
165
+ children?: NavItem[];
166
+ }
167
+ /**
168
+ * Action configuration for behavior props.
169
+ * Compatible with mdxui ActionConfig.
170
+ */
171
+ interface ActionConfig {
172
+ kind?: 'config';
173
+ href: string;
174
+ onClick?: () => void;
175
+ target?: '_blank' | '_self';
176
+ }
177
+ /**
178
+ * Action prop accepts either a simple string (href) or full config.
179
+ */
180
+ type ActionProp = string | ActionConfig;
181
+ /**
182
+ * Standard actions object for components with primary/secondary actions.
183
+ */
184
+ interface ActionsProps {
185
+ primary?: ActionProp;
186
+ secondary?: ActionProp;
187
+ }
188
+ /**
189
+ * Footer link group structure.
190
+ */
191
+ interface FooterLinkGroup {
192
+ title: string;
193
+ links: Array<{
194
+ label: string;
195
+ href: string;
196
+ }>;
197
+ }
198
+ /**
199
+ * Social link structure.
200
+ */
201
+ interface SocialLink {
202
+ platform: string;
203
+ href: string;
204
+ icon?: ReactNode;
205
+ }
206
+ /**
207
+ * Feature item for Features section.
208
+ */
209
+ interface FeatureItem {
210
+ title: string;
211
+ description: string;
212
+ icon?: ReactNode;
213
+ actions?: {
214
+ link?: ActionProp;
215
+ };
216
+ }
217
+ /**
218
+ * Pricing tier structure.
219
+ */
220
+ interface PricingTier {
221
+ name: string;
222
+ price: string;
223
+ description?: string;
224
+ features: string[];
225
+ callToAction: string;
226
+ highlighted?: boolean;
227
+ actions?: ActionsProps;
228
+ }
229
+ /**
230
+ * FAQ item structure.
231
+ */
232
+ interface FAQItem {
233
+ question: string;
234
+ answer: string;
235
+ }
236
+ /**
237
+ * Dashboard metric structure.
238
+ */
239
+ interface DashboardMetric {
240
+ label: string;
241
+ value: string | number;
242
+ change?: number;
243
+ trend?: 'up' | 'down' | 'neutral';
244
+ }
245
+ /**
246
+ * Settings section types.
247
+ */
248
+ type SettingsSection = 'profile' | 'security' | 'notifications' | 'billing' | 'team' | 'api' | 'integrations';
249
+ /**
250
+ * App header user structure.
251
+ */
252
+ interface AppHeaderUser {
253
+ name: string;
254
+ email: string;
255
+ avatar?: string;
256
+ }
257
+ /**
258
+ * Breadcrumb item structure.
259
+ */
260
+ interface BreadcrumbItem {
261
+ label: string;
262
+ href?: string;
263
+ }
264
+ /**
265
+ * Site component props - root container for marketing sites.
266
+ * Compatible with mdxui SiteProps.
267
+ */
268
+ interface SiteProps {
269
+ /** Site display name (required by mdxui) */
270
+ name: string;
271
+ /** Primary domain (e.g., "example.com") */
272
+ domain?: string;
273
+ /** Theme mode */
274
+ theme?: 'light' | 'dark' | 'system';
275
+ /** Child content */
276
+ children?: ReactNode;
277
+ }
278
+ /**
279
+ * Header component props - navigation header.
280
+ * Compatible with both mdxui HeaderProps (SiteComponents) and AppHeaderProps (AppComponents).
281
+ *
282
+ * This combined interface allows the terminal Header component to work in
283
+ * both site and app contexts. In site mode, logo and nav are typically used.
284
+ * In app mode, user and breadcrumbs are typically used.
285
+ *
286
+ * Note: For strict mdxui HeaderProps compatibility in site context,
287
+ * logo and nav should be provided. They are optional here to allow
288
+ * the same component to work with AppHeaderProps.
289
+ */
290
+ interface HeaderProps {
291
+ /**
292
+ * Logo element or URL.
293
+ * Required for site usage (mdxui HeaderProps).
294
+ * Optional here to support dual use with AppHeaderProps.
295
+ */
296
+ logo?: ReactNode;
297
+ /**
298
+ * Navigation links.
299
+ * Required for site usage (mdxui HeaderProps).
300
+ * Optional here to support dual use with AppHeaderProps.
301
+ */
302
+ nav?: NavItem[];
303
+ /** Primary CTA button text */
304
+ callToAction?: string;
305
+ /** Action behaviors */
306
+ actions?: ActionsProps;
307
+ /** Custom link component */
308
+ LinkComponent?: ReactNode;
309
+ /** Current user (used in app mode) */
310
+ user?: AppHeaderUser;
311
+ /** Show search */
312
+ showSearch?: boolean;
313
+ /** Show notifications */
314
+ showNotifications?: boolean;
315
+ /** Breadcrumbs */
316
+ breadcrumbs?: BreadcrumbItem[];
317
+ /** Child content */
318
+ children?: ReactNode;
319
+ }
320
+ /**
321
+ * Footer component props - site footer.
322
+ * Compatible with mdxui FooterProps.
323
+ */
324
+ interface FooterProps {
325
+ /** Logo element or URL (required by mdxui) */
326
+ logo: ReactNode;
327
+ /** Footer link groups (required by mdxui) */
328
+ links: FooterLinkGroup[];
329
+ /** Social media links */
330
+ social?: SocialLink[];
331
+ /** Copyright text */
332
+ copyright?: string;
333
+ /** Newsletter signup configuration */
334
+ newsletter?: {
335
+ headline: string;
336
+ subheadline: string;
337
+ };
338
+ /** Child content */
339
+ children?: ReactNode;
340
+ }
341
+ /**
342
+ * Hero component props - hero section.
343
+ * Compatible with mdxui HeroProps.
344
+ */
345
+ interface HeroProps {
346
+ /** Main title (required by mdxui as string) */
347
+ title: string;
348
+ /** Subtitle or description */
349
+ subtitle?: string;
350
+ /** Badge text (above headline) */
351
+ badge?: string;
352
+ /** Primary call-to-action text (required by mdxui) */
353
+ callToAction: string;
354
+ /** Secondary call-to-action text */
355
+ secondaryCallToAction?: string;
356
+ /** Layout variant */
357
+ variant?: 'default' | 'centered' | 'split' | 'code-below' | 'video-beside' | 'image-split';
358
+ /** Hero image URL */
359
+ image?: string;
360
+ /** Hero video URL */
361
+ video?: string;
362
+ /** Product screenshot URL */
363
+ screenshot?: string;
364
+ /** Code block content */
365
+ code?: {
366
+ language: string;
367
+ code: string;
368
+ };
369
+ /** Action behaviors */
370
+ actions?: ActionsProps;
371
+ /** Child content */
372
+ children?: ReactNode;
373
+ }
374
+ /**
375
+ * Features component props - features section.
376
+ * Compatible with mdxui FeaturesProps.
377
+ */
378
+ interface FeaturesProps {
379
+ /** Section title */
380
+ title?: string;
381
+ /** Section description */
382
+ description?: string;
383
+ /** Feature items (required by mdxui) */
384
+ features: FeatureItem[];
385
+ /** Layout variant */
386
+ variant?: 'grid' | 'list' | 'bento';
387
+ /** Number of columns (for grid) */
388
+ columns?: number;
389
+ /** Child content */
390
+ children?: ReactNode;
391
+ }
392
+ /**
393
+ * Pricing component props - pricing section.
394
+ * Compatible with mdxui PricingProps.
395
+ */
396
+ interface PricingProps {
397
+ /** Section title */
398
+ title?: string;
399
+ /** Section description */
400
+ description?: string;
401
+ /** Pricing tiers (required by mdxui) */
402
+ tiers: PricingTier[];
403
+ /** Show annual/monthly toggle */
404
+ showToggle?: boolean;
405
+ /** Layout variant */
406
+ variant?: 'cards' | 'comparison-table' | 'toggle';
407
+ /** Child content */
408
+ children?: ReactNode;
409
+ }
410
+ /**
411
+ * FAQ component props - FAQ section.
412
+ * Compatible with mdxui FAQProps.
413
+ */
414
+ interface FAQProps {
415
+ /** Section title */
416
+ title?: string;
417
+ /** FAQ items (required by mdxui) */
418
+ items: FAQItem[];
419
+ /** Layout variant */
420
+ variant?: 'accordion' | 'grid' | 'list';
421
+ /** Child content */
422
+ children?: ReactNode;
423
+ }
424
+ /**
425
+ * LandingPage component props - homepage layout.
426
+ * Compatible with mdxui LandingPageProps.
427
+ */
428
+ interface LandingPageProps {
429
+ /** Child sections (Hero, Features, Pricing, etc.) */
430
+ children?: ReactNode;
431
+ }
432
+ /**
433
+ * Page component props - generic content page.
434
+ * Compatible with mdxui PageProps.
435
+ */
436
+ interface PageProps {
437
+ /** Page title */
438
+ title?: string;
439
+ /** Page description */
440
+ description?: string;
441
+ /** Page content */
442
+ children?: ReactNode;
443
+ }
444
+ /**
445
+ * App component props - root container for SaaS applications.
446
+ * Compatible with mdxui AppProps.
447
+ */
448
+ interface AppProps {
449
+ /** App display name (required by mdxui) */
450
+ name: string;
451
+ /** Authentication configuration */
452
+ auth?: {
453
+ provider: 'workos' | 'clerk' | 'auth0' | 'custom';
454
+ clientId?: string;
455
+ loginUrl?: string;
456
+ redirectUri?: string;
457
+ };
458
+ /** Child content */
459
+ children?: ReactNode;
460
+ }
461
+ /**
462
+ * Shell component props - app shell layout.
463
+ * Compatible with mdxui ShellProps.
464
+ */
465
+ interface ShellProps {
466
+ /** Show sidebar */
467
+ sidebar?: boolean;
468
+ /** Show header */
469
+ header?: boolean;
470
+ /** Sidebar collapsed by default */
471
+ sidebarCollapsed?: boolean;
472
+ /** Child content */
473
+ children?: ReactNode;
474
+ }
475
+ /**
476
+ * Sidebar component props - navigation sidebar.
477
+ * Compatible with mdxui SidebarProps.
478
+ */
479
+ interface SidebarProps {
480
+ /** Navigation items (required by mdxui) */
481
+ nav: NavItem[];
482
+ /** User info for bottom of sidebar */
483
+ user?: AppHeaderUser;
484
+ /** Branding */
485
+ logo?: ReactNode;
486
+ /** Collapsed state */
487
+ collapsed?: boolean;
488
+ /** On collapse toggle */
489
+ onCollapse?: () => void;
490
+ /** Width */
491
+ width?: number;
492
+ /** Child content */
493
+ children?: ReactNode;
494
+ }
495
+ /**
496
+ * AppHeader component props - top header bar.
497
+ * Compatible with mdxui AppHeaderProps.
498
+ */
499
+ interface AppHeaderProps {
500
+ /** Current user */
501
+ user?: AppHeaderUser;
502
+ /** Show search */
503
+ showSearch?: boolean;
504
+ /** Show notifications */
505
+ showNotifications?: boolean;
506
+ /** Breadcrumbs */
507
+ breadcrumbs?: BreadcrumbItem[];
508
+ /** Child content */
509
+ children?: ReactNode;
510
+ }
511
+ /**
512
+ * Dashboard component props - main dashboard view.
513
+ * Compatible with mdxui DashboardProps.
514
+ */
515
+ interface DashboardProps {
516
+ /** Dashboard title */
517
+ title?: string;
518
+ /** Metrics to display */
519
+ metrics?: DashboardMetric[];
520
+ /** Child widgets/content */
521
+ children?: ReactNode;
522
+ }
523
+ /**
524
+ * Settings component props - settings page layout.
525
+ * Compatible with mdxui SettingsProps.
526
+ */
527
+ interface SettingsProps {
528
+ /** Settings sections to show */
529
+ sections?: SettingsSection[];
530
+ /** Child content */
531
+ children?: ReactNode;
532
+ }
533
+ /**
534
+ * Type guard to check if a value is a valid TerminalComponentType
535
+ */
536
+ declare function isTerminalComponentType(type: unknown): type is TerminalComponentType;
537
+ /**
538
+ * Type guard for props objects - validates object shape
539
+ */
540
+ declare function isPropsObject(props: unknown): props is Record<string, unknown>;
541
+ /**
542
+ * Type guard for BoxProps
543
+ */
544
+ declare function isBoxProps(props: unknown): props is BoxProps;
545
+ /**
546
+ * Type guard for TextProps
547
+ */
548
+ declare function isTextProps(props: unknown): props is TextProps;
549
+ /**
550
+ * Type guard for TableProps
551
+ */
552
+ declare function isTableProps(props: unknown): props is TableProps<unknown>;
553
+ /**
554
+ * Type guard for InputProps
555
+ */
556
+ declare function isInputProps(props: unknown): props is InputProps;
557
+ /**
558
+ * Type guard for SelectProps
559
+ */
560
+ declare function isSelectProps(props: unknown): props is SelectProps<unknown>;
561
+ /**
562
+ * Type guard for SidebarProps
563
+ */
564
+ declare function isSidebarProps(props: unknown): props is SidebarProps;
565
+ /**
566
+ * Type guard for SidebarItemProps
567
+ */
568
+ declare function isSidebarItemProps(props: unknown): props is SidebarItemProps;
569
+ /**
570
+ * Type guard for BreadcrumbProps
571
+ */
572
+ declare function isBreadcrumbProps(props: unknown): props is BreadcrumbProps;
573
+ /**
574
+ * Type guard for BadgeProps
575
+ */
576
+ declare function isBadgeProps(props: unknown): props is BadgeProps;
577
+ /**
578
+ * Type guard for DialogProps
579
+ */
580
+ declare function isDialogProps(props: unknown): props is DialogProps;
581
+ /**
582
+ * Type guard for SpinnerProps
583
+ */
584
+ declare function isSpinnerProps(props: unknown): props is SpinnerProps;
585
+ /**
586
+ * Type guard for ButtonProps
587
+ */
588
+ declare function isButtonProps(props: unknown): props is ButtonProps;
589
+ /**
590
+ * Type guard for PanelProps
591
+ */
592
+ declare function isPanelProps(props: unknown): props is PanelProps;
593
+ /**
594
+ * Type guard for ListProps
595
+ */
596
+ declare function isListProps(props: unknown): props is ListProps;
597
+ /**
598
+ * Type guard for CardProps
599
+ */
600
+ declare function isCardProps(props: unknown): props is CardProps;
601
+
602
+ /**
603
+ * @mdxui/terminal/components/helpers
604
+ *
605
+ * Helper functions for terminal component rendering.
606
+ */
607
+
608
+ /**
609
+ * Color map combining basic ANSI colors with semantic theme colors.
610
+ * Re-exports from theme module for backward compatibility.
611
+ */
612
+ declare const colorMap: Record<string, string>;
613
+ /**
614
+ * Background color map using ANSI constants.
615
+ */
616
+ declare const bgColorMap: Record<string, string>;
617
+ declare function getColorCode(color: string): string;
618
+ declare function getBgColorCode(color: string): string;
619
+ declare function extractChildren(children: ReactNode): string;
620
+
621
+ /**
622
+ * @mdxui/terminal/components/render
623
+ *
624
+ * Core rendering functions for terminal components.
625
+ */
626
+
627
+ declare function renderElement(element: ReactElement, context: RenderContext): string[];
628
+ /**
629
+ * Render a React element to terminal output strings
630
+ */
631
+ declare function renderComponent(element: ReactElement): string[];
632
+
633
+ /**
634
+ * @mdxui/terminal/components/primitives/box
635
+ *
636
+ * Box component for terminal rendering.
637
+ */
638
+
639
+ declare function renderBox(props: BoxProps, context: RenderContext): string[];
640
+ declare function Box(props: BoxProps): ReactElement;
641
+
642
+ /**
643
+ * @mdxui/terminal/components/primitives/text
644
+ *
645
+ * Text component for terminal rendering.
646
+ */
647
+
648
+ declare function renderText(props: TextProps, context: RenderContext): string[];
649
+ declare function Text(props: TextProps): ReactElement;
650
+
651
+ /**
652
+ * @mdxui/terminal/components/primitives/input
653
+ *
654
+ * Input component for terminal rendering.
655
+ */
656
+
657
+ declare function renderInput(props: InputProps, context: RenderContext): string[];
658
+ declare function Input(props: InputProps): ReactElement;
659
+
660
+ /**
661
+ * @mdxui/terminal/components/primitives/select
662
+ *
663
+ * Select component for terminal rendering.
664
+ */
665
+
666
+ declare function renderSelect<T>(props: SelectProps<T>, _context: RenderContext): string[];
667
+ declare function Select<T>(props: SelectProps<T>): ReactElement;
668
+
669
+ /**
670
+ * @mdxui/terminal/components/primitives/button
671
+ *
672
+ * Button component for terminal rendering.
673
+ */
674
+
675
+ declare function renderButton(props: ButtonProps, _context: RenderContext): string[];
676
+ declare function Button(props: ButtonProps): ReactElement;
677
+
678
+ /**
679
+ * @mdxui/terminal/components/containers/panel
680
+ *
681
+ * Panel component for terminal rendering.
682
+ */
683
+
684
+ declare function renderPanel(props: PanelProps, context: RenderContext): string[];
685
+ declare function Panel(props: PanelProps): ReactElement;
686
+
687
+ /**
688
+ * @mdxui/terminal/components/containers/card
689
+ *
690
+ * Card component for terminal rendering.
691
+ */
692
+
693
+ declare function renderCard(props: CardProps, context: RenderContext): string[];
694
+ declare function Card(props: CardProps): ReactElement;
695
+
696
+ /**
697
+ * @mdxui/terminal/components/containers/dialog
698
+ *
699
+ * Dialog component for terminal rendering.
700
+ */
701
+
702
+ declare function renderDialog(props: DialogProps, context: RenderContext): string[];
703
+ declare function Dialog(props: DialogProps): ReactElement;
704
+
705
+ /**
706
+ * @mdxui/terminal/components/layout/sidebar
707
+ *
708
+ * Internal sidebar layout components for terminal rendering.
709
+ * These are primitive layout components, distinct from mdxui Sidebar.
710
+ */
711
+
712
+ declare function renderSidebarItem(props: SidebarItemProps & {
713
+ _collapsed?: boolean;
714
+ }, _context: RenderContext): string[];
715
+ declare function renderSidebar(props: TerminalSidebarLayoutProps, context: RenderContext): string[];
716
+ /**
717
+ * SidebarLayout - primitive sidebar layout component for terminal rendering.
718
+ * Use mdxui Sidebar (from templates/app) for mdxui-compatible interface.
719
+ */
720
+ declare function SidebarLayout(props: TerminalSidebarLayoutProps): ReactElement;
721
+ declare function SidebarItem(props: SidebarItemProps): ReactElement;
722
+
723
+ /**
724
+ * @mdxui/terminal/components/layout/breadcrumb
725
+ *
726
+ * Breadcrumb component for terminal rendering.
727
+ */
728
+
729
+ declare function renderBreadcrumb(props: BreadcrumbProps, _context: RenderContext): string[];
730
+ declare function Breadcrumb(props: BreadcrumbProps): ReactElement;
731
+
732
+ /**
733
+ * @mdxui/terminal/components/layout/list
734
+ *
735
+ * List component for terminal rendering.
736
+ */
737
+
738
+ declare function renderList(props: ListProps, _context: RenderContext): string[];
739
+ declare function List(props: ListProps): ReactElement;
740
+
741
+ /**
742
+ * @mdxui/terminal/components/layout/table
743
+ *
744
+ * Table component for terminal rendering.
745
+ */
746
+
747
+ declare function renderTable<T>(props: TableProps<T>, _context: RenderContext): string[];
748
+ declare function Table<T>(props: TableProps<T>): ReactElement;
749
+
750
+ /**
751
+ * @mdxui/terminal/components/feedback/badge
752
+ *
753
+ * Badge component for terminal rendering.
754
+ */
755
+
756
+ declare function renderBadge(props: BadgeProps, _context: RenderContext): string[];
757
+ declare function Badge(props: BadgeProps): ReactElement;
758
+
759
+ /**
760
+ * @mdxui/terminal/components/feedback/spinner
761
+ *
762
+ * Spinner component for terminal rendering.
763
+ */
764
+
765
+ declare const spinnerFrames: string[];
766
+ declare function renderSpinner(props: SpinnerProps, _context: RenderContext): string[];
767
+ declare function Spinner(props: SpinnerProps): ReactElement;
768
+
769
+ /**
770
+ * @mdxui/terminal/components/templates/site
771
+ *
772
+ * Site template components (mdxui SiteComponents interface).
773
+ */
774
+
775
+ declare function Site(props: SiteProps): ReactElement;
776
+ declare function Header(props: HeaderProps): ReactElement;
777
+ declare function Footer(props: FooterProps): ReactElement;
778
+ declare function Hero(props: HeroProps): ReactElement;
779
+ declare function Features(props: FeaturesProps): ReactElement;
780
+ declare function Pricing(props: PricingProps): ReactElement;
781
+ declare function FAQ(props: FAQProps): ReactElement;
782
+ declare function LandingPage(props: LandingPageProps): ReactElement;
783
+ declare function Page(props: PageProps): ReactElement;
784
+
785
+ /**
786
+ * @mdxui/terminal/components/templates/app
787
+ *
788
+ * App template components (mdxui AppComponents interface).
789
+ */
790
+
791
+ declare function App(props: AppProps): ReactElement;
792
+ declare function Shell(props: ShellProps): ReactElement;
793
+ declare function Sidebar(props: SidebarProps): ReactElement;
794
+ /**
795
+ * AppHeader component for the top header bar.
796
+ * Note: The test imports this as Header but it uses AppHeaderProps.
797
+ */
798
+ declare function AppHeader(props: AppHeaderProps): ReactElement;
799
+ declare function Dashboard(props: DashboardProps): ReactElement;
800
+ declare function Settings(props: SettingsProps): ReactElement;
801
+
802
+ export { type ActionConfig, type ActionProp, type ActionsProps, App, AppHeader, type AppHeaderProps, type AppHeaderUser, type AppProps, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, COMPONENT_TYPES, Card, type CardProps, Dashboard, type DashboardMetric, type DashboardProps, Dialog, type DialogProps, FAQ, type FAQItem, type FAQProps, type FeatureItem, Features, type FeaturesProps, Footer, type FooterLinkGroup, type FooterProps, Header, type HeaderProps, Hero, type HeroProps, Input, type InputProps, LandingPage, type LandingPageProps, List, type ListProps, type NavItem, Page, type PageProps, Panel, type PanelProps, Pricing, type PricingProps, type PricingTier, type RenderContext, Select, type SelectOption, type SelectProps, Settings, type SettingsProps, type SettingsSection, Shell, type ShellProps, Sidebar, SidebarItem, type SidebarItemProps, SidebarLayout, type SidebarProps, Site, type SiteProps, type SocialLink, Spinner, type SpinnerProps, Table, type TableColumn, type TableProps, type TerminalComponentType, type TerminalSidebarLayoutProps, Text, type TextProps, bgColorMap, colorMap, extractChildren, getBgColorCode, getColorCode, isBadgeProps, isBoxProps, isBreadcrumbProps, isButtonProps, isCardProps, isDialogProps, isInputProps, isListProps, isPanelProps, isPropsObject, isSelectProps, isSidebarItemProps, isSidebarProps, isSpinnerProps, isTableProps, isTerminalComponentType, isTextProps, renderBadge, renderBox, renderBreadcrumb, renderButton, renderCard, renderComponent, renderDialog, renderElement, renderInput, renderList, renderPanel, renderSelect, renderSidebar, renderSidebarItem, renderSpinner, renderTable, renderText, spinnerFrames };