@craftzbay/ui 0.4.0 → 0.6.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 (103) hide show
  1. package/README.md +2 -2
  2. package/dist-lib/catalog.d.ts +8 -0
  3. package/dist-lib/components/patterns/AppShell.d.ts +142 -4
  4. package/dist-lib/components/patterns/DataTablePage.d.ts +81 -1
  5. package/dist-lib/components/patterns/FirstRunEmpty.d.ts +39 -1
  6. package/dist-lib/components/patterns/Onboarding.d.ts +65 -1
  7. package/dist-lib/components/patterns/Pricing.d.ts +40 -1
  8. package/dist-lib/components/patterns/RecordDetail.d.ts +48 -1
  9. package/dist-lib/components/patterns/Settings.d.ts +34 -1
  10. package/dist-lib/components/ui/EmptyState.d.ts +22 -7
  11. package/dist-lib/components/ui/ErrorState.d.ts +15 -4
  12. package/dist-lib/icons/index.d.ts +1 -1
  13. package/dist-lib/index.cjs +2 -4
  14. package/dist-lib/index.cjs.map +1 -1
  15. package/dist-lib/index.js +2973 -4944
  16. package/dist-lib/index.js.map +1 -1
  17. package/dist-lib/showcase/components/Accordion.docs.d.ts +3 -0
  18. package/dist-lib/showcase/components/Alert.docs.d.ts +3 -0
  19. package/dist-lib/showcase/components/Avatar.docs.d.ts +3 -0
  20. package/dist-lib/showcase/components/Badge.docs.d.ts +3 -0
  21. package/dist-lib/showcase/components/Breadcrumbs.docs.d.ts +3 -0
  22. package/dist-lib/showcase/components/Button.docs.d.ts +3 -0
  23. package/dist-lib/showcase/components/Calendar.docs.d.ts +3 -0
  24. package/dist-lib/showcase/components/Card.docs.d.ts +3 -0
  25. package/dist-lib/showcase/components/Carousel.docs.d.ts +3 -0
  26. package/dist-lib/showcase/components/Chart.docs.d.ts +3 -0
  27. package/dist-lib/showcase/components/Checkbox.docs.d.ts +3 -0
  28. package/dist-lib/showcase/components/Combobox.docs.d.ts +3 -0
  29. package/dist-lib/showcase/components/CommandPalette.docs.d.ts +3 -0
  30. package/dist-lib/showcase/components/ContextMenu.docs.d.ts +3 -0
  31. package/dist-lib/showcase/components/DataGrid.docs.d.ts +3 -0
  32. package/dist-lib/showcase/components/DatePicker.docs.d.ts +3 -0
  33. package/dist-lib/showcase/components/Dialog.docs.d.ts +3 -0
  34. package/dist-lib/showcase/components/Drawer.docs.d.ts +3 -0
  35. package/dist-lib/showcase/components/DropdownMenu.docs.d.ts +3 -0
  36. package/dist-lib/showcase/components/EmptyState.docs.d.ts +3 -0
  37. package/dist-lib/showcase/components/ErrorState.docs.d.ts +3 -0
  38. package/dist-lib/showcase/components/FileUpload.docs.d.ts +3 -0
  39. package/dist-lib/showcase/components/Form.docs.d.ts +3 -0
  40. package/dist-lib/showcase/components/IconButton.docs.d.ts +3 -0
  41. package/dist-lib/showcase/components/Input.docs.d.ts +3 -0
  42. package/dist-lib/showcase/components/Kbd.docs.d.ts +3 -0
  43. package/dist-lib/showcase/components/MultiSelect.docs.d.ts +3 -0
  44. package/dist-lib/showcase/components/Pagination.docs.d.ts +3 -0
  45. package/dist-lib/showcase/components/Popover.docs.d.ts +3 -0
  46. package/dist-lib/showcase/components/Progress.docs.d.ts +3 -0
  47. package/dist-lib/showcase/components/RadioGroup.docs.d.ts +3 -0
  48. package/dist-lib/showcase/components/ScrollArea.docs.d.ts +3 -0
  49. package/dist-lib/showcase/components/Select.docs.d.ts +3 -0
  50. package/dist-lib/showcase/components/Separator.docs.d.ts +3 -0
  51. package/dist-lib/showcase/components/Sheet.docs.d.ts +3 -0
  52. package/dist-lib/showcase/components/Sidebar.docs.d.ts +3 -0
  53. package/dist-lib/showcase/components/Skeleton.docs.d.ts +3 -0
  54. package/dist-lib/showcase/components/Slider.docs.d.ts +3 -0
  55. package/dist-lib/showcase/components/Snackbar.docs.d.ts +3 -0
  56. package/dist-lib/showcase/components/Spinner.docs.d.ts +3 -0
  57. package/dist-lib/showcase/components/Stepper.docs.d.ts +3 -0
  58. package/dist-lib/showcase/components/Switch.docs.d.ts +3 -0
  59. package/dist-lib/showcase/components/Table.docs.d.ts +3 -0
  60. package/dist-lib/showcase/components/Tabs.docs.d.ts +3 -0
  61. package/dist-lib/showcase/components/TagInput.docs.d.ts +3 -0
  62. package/dist-lib/showcase/components/Textarea.docs.d.ts +3 -0
  63. package/dist-lib/showcase/components/Timeline.docs.d.ts +3 -0
  64. package/dist-lib/showcase/components/Toast.docs.d.ts +3 -0
  65. package/dist-lib/showcase/components/Tooltip.docs.d.ts +3 -0
  66. package/dist-lib/showcase/components/TopNav.docs.d.ts +3 -0
  67. package/dist-lib/showcase/components/Tree.docs.d.ts +3 -0
  68. package/dist-lib/showcase/guides/DarkMode.d.ts +1 -0
  69. package/dist-lib/showcase/guides/Forms.d.ts +1 -0
  70. package/dist-lib/showcase/guides/Responsive.d.ts +1 -0
  71. package/dist-lib/showcase/guides/Theming.d.ts +1 -0
  72. package/dist-lib/showcase/layout/DocLayout.d.ts +22 -0
  73. package/dist-lib/showcase/layout/DocSidebar.d.ts +27 -0
  74. package/dist-lib/showcase/layout/ShowcaseTopBar.d.ts +13 -0
  75. package/dist-lib/showcase/layout/sidebars.d.ts +14 -0
  76. package/dist-lib/showcase/pages/ComponentDocPage.d.ts +6 -0
  77. package/dist-lib/showcase/pages/ComponentsIndexPage.d.ts +1 -0
  78. package/dist-lib/showcase/pages/GuidePage.d.ts +6 -0
  79. package/dist-lib/showcase/pages/GuidesIndexPage.d.ts +1 -0
  80. package/dist-lib/showcase/pages/HomePage.d.ts +1 -0
  81. package/dist-lib/showcase/pages/TemplateDocPage.d.ts +6 -0
  82. package/dist-lib/showcase/pages/TemplatesIndexPage.d.ts +1 -0
  83. package/dist-lib/showcase/registry/components.d.ts +4 -0
  84. package/dist-lib/showcase/registry/guides.d.ts +3 -0
  85. package/dist-lib/showcase/registry/templates.d.ts +3 -0
  86. package/dist-lib/showcase/registry/types.d.ts +69 -0
  87. package/dist-lib/showcase/routing.d.ts +39 -0
  88. package/dist-lib/showcase/templates/AuthForgot.template.d.ts +3 -0
  89. package/dist-lib/showcase/templates/AuthMagic.template.d.ts +3 -0
  90. package/dist-lib/showcase/templates/AuthSignIn.template.d.ts +3 -0
  91. package/dist-lib/showcase/templates/AuthSignUp.template.d.ts +3 -0
  92. package/dist-lib/showcase/templates/Dashboard.template.d.ts +3 -0
  93. package/dist-lib/showcase/templates/DataTable.template.d.ts +3 -0
  94. package/dist-lib/showcase/templates/FirstRunEmpty.template.d.ts +3 -0
  95. package/dist-lib/showcase/templates/Onboarding.template.d.ts +3 -0
  96. package/dist-lib/showcase/templates/Pricing.template.d.ts +3 -0
  97. package/dist-lib/showcase/templates/RecordDetail.template.d.ts +3 -0
  98. package/dist-lib/showcase/templates/Settings.template.d.ts +3 -0
  99. package/dist-lib/showcase/widgets/CodeBlock.d.ts +12 -0
  100. package/dist-lib/showcase/widgets/CodePreview.d.ts +14 -0
  101. package/dist-lib/showcase/widgets/PropsTable.d.ts +10 -0
  102. package/dist-lib/showcase/widgets/SectionAnchor.d.ts +13 -0
  103. package/package.json +16 -22
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ declare const doc: ComponentDoc;
3
+ export default doc;
@@ -0,0 +1 @@
1
+ export declare function DarkModeBody(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function FormsBody(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ResponsiveBody(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ThemingBody(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { ReactNode } from 'react';
2
+ import { DocSidebarSection } from './DocSidebar';
3
+ import { Route } from '../routing';
4
+ interface DocLayoutProps {
5
+ sidebar: DocSidebarSection[];
6
+ topLinks?: {
7
+ label: string;
8
+ route: Route;
9
+ }[];
10
+ current: {
11
+ kind: Route['kind'];
12
+ slug?: string;
13
+ };
14
+ children: ReactNode;
15
+ }
16
+ /**
17
+ * Two-column doc shell: left sidebar (sticky), right scrollable content.
18
+ * The sticky ShowcaseTopBar sits above this in App.tsx, so the sidebar
19
+ * top offset is 3.5rem (h-14).
20
+ */
21
+ export declare function DocLayout({ sidebar, topLinks, current, children }: DocLayoutProps): import("react/jsx-runtime").JSX.Element;
22
+ export {};
@@ -0,0 +1,27 @@
1
+ import { Route } from '../routing';
2
+ export interface DocSidebarEntry {
3
+ slug: string;
4
+ label: string;
5
+ group: string;
6
+ }
7
+ export interface DocSidebarSection {
8
+ /** Heading rendered above the section. Use 'top' for the "Get started" links. */
9
+ title: string;
10
+ /** kind = 'component' | 'template' | 'guide' — used to build the URL. */
11
+ kind: 'component' | 'template' | 'guide';
12
+ entries: DocSidebarEntry[];
13
+ }
14
+ interface DocSidebarProps {
15
+ sections: DocSidebarSection[];
16
+ current?: {
17
+ kind: Route['kind'];
18
+ slug?: string;
19
+ };
20
+ /** Top links: Overview / Components index / Templates index / Guides index. */
21
+ topLinks?: {
22
+ label: string;
23
+ route: Route;
24
+ }[];
25
+ }
26
+ export declare function DocSidebar({ sections, current, topLinks }: DocSidebarProps): import("react/jsx-runtime").JSX.Element;
27
+ export {};
@@ -0,0 +1,13 @@
1
+ import { Route } from '../routing';
2
+ interface ShowcaseTopBarProps {
3
+ theme: 'light' | 'dark';
4
+ onToggleTheme: () => void;
5
+ onOpenPalette: () => void;
6
+ current: Route;
7
+ }
8
+ /**
9
+ * Persistent top bar shared by Home + docs pages. Hidden in full-bleed
10
+ * preview routes (templates rendered for screenshot / live use).
11
+ */
12
+ export declare function ShowcaseTopBar({ theme, onToggleTheme, onOpenPalette, current, }: ShowcaseTopBarProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,14 @@
1
+ import { Route } from '../routing';
2
+ import { DocSidebarSection } from './DocSidebar';
3
+ /**
4
+ * Build the sidebar sections + top links for each page kind.
5
+ * Same sidebar shape across components / templates / guides — only the
6
+ * active highlight differs.
7
+ */
8
+ export declare function buildComponentSidebar(): DocSidebarSection[];
9
+ export declare function buildTemplateSidebar(): DocSidebarSection[];
10
+ export declare function buildGuideSidebar(): DocSidebarSection[];
11
+ export declare const docTopLinks: {
12
+ label: string;
13
+ route: Route;
14
+ }[];
@@ -0,0 +1,6 @@
1
+ import { ComponentDoc } from '../registry/types';
2
+ interface ComponentDocPageProps {
3
+ doc: ComponentDoc;
4
+ }
5
+ export declare function ComponentDocPage({ doc }: ComponentDocPageProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1 @@
1
+ export declare function ComponentsIndexPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { GuideDoc } from '../registry/types';
2
+ interface GuidePageProps {
3
+ doc: GuideDoc;
4
+ }
5
+ export declare function GuidePage({ doc }: GuidePageProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1 @@
1
+ export declare function GuidesIndexPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function HomePage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { TemplateDoc } from '../registry/types';
2
+ interface TemplateDocPageProps {
3
+ doc: TemplateDoc;
4
+ }
5
+ export declare function TemplateDocPage({ doc }: TemplateDocPageProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1 @@
1
+ export declare function TemplatesIndexPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { ComponentDoc } from './types';
2
+ export declare const componentDocs: ComponentDoc[];
3
+ export declare function getComponentDoc(slug: string): ComponentDoc | undefined;
4
+ export declare function getRelatedDocs(slugs: string[]): ComponentDoc[];
@@ -0,0 +1,3 @@
1
+ import { GuideDoc } from './types';
2
+ export declare const guideDocs: GuideDoc[];
3
+ export declare function getGuideDoc(slug: string): GuideDoc | undefined;
@@ -0,0 +1,3 @@
1
+ import { TemplateDoc } from './types';
2
+ export declare const templateDocs: TemplateDoc[];
3
+ export declare function getTemplateDoc(slug: string): TemplateDoc | undefined;
@@ -0,0 +1,69 @@
1
+ import { ReactNode } from 'react';
2
+ export interface PropRow {
3
+ name: string;
4
+ type: string;
5
+ default?: string;
6
+ required?: boolean;
7
+ description: string;
8
+ }
9
+ export interface PropGroup {
10
+ title?: string;
11
+ rows: PropRow[];
12
+ }
13
+ export interface Example {
14
+ /** Short title used as the section heading on the doc page. */
15
+ title: string;
16
+ /** Optional 1–2 sentence explainer rendered above the demo. */
17
+ description?: string;
18
+ /** Live, fully interactive React node rendered in the Preview tab. */
19
+ preview: ReactNode;
20
+ /** Verbatim source code shown in the Code tab + Copy button. */
21
+ code: string;
22
+ /** Optional override for the preview surface (e.g. add height / padding). */
23
+ surfaceClassName?: string;
24
+ }
25
+ export type ComponentGroup = 'Buttons' | 'Inputs' | 'Feedback' | 'Overlays' | 'Navigation' | 'Layout' | 'Data Display' | 'Typography';
26
+ export interface ComponentDoc {
27
+ /** URL slug — e.g. 'button'. */
28
+ slug: string;
29
+ /** Display name — e.g. 'Button'. */
30
+ name: string;
31
+ group: ComponentGroup;
32
+ /** One-line tagline shown under the title and in lists. */
33
+ description: string;
34
+ /** Names re-exported from `@craftzbay/ui` for this component. */
35
+ exports: string[];
36
+ /** Path under src/components/ui/ — used for the GitHub source link. */
37
+ sourceFile: string;
38
+ examples: Example[];
39
+ /** Each table is rendered with its own optional title. */
40
+ api?: PropGroup[];
41
+ accessibility?: string[];
42
+ /** Cross-links rendered at the bottom of the page. */
43
+ related?: {
44
+ slug: string;
45
+ reason: string;
46
+ }[];
47
+ }
48
+ export interface TemplateDoc {
49
+ slug: string;
50
+ name: string;
51
+ /** One-line tagline. */
52
+ description: string;
53
+ /** Names re-exported from `@craftzbay/ui` (or component path). */
54
+ exports: string[];
55
+ sourceFile: string;
56
+ /** Full-bleed preview slug (#preview/<slug>). */
57
+ previewSlug?: string;
58
+ examples: Example[];
59
+ api?: PropGroup[];
60
+ /** What flows / pages this template is intended for. */
61
+ useCases?: string[];
62
+ }
63
+ export interface GuideDoc {
64
+ slug: string;
65
+ title: string;
66
+ description: string;
67
+ /** Rendered as the body of the guide page. */
68
+ body: ReactNode;
69
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Showcase routing — hash-based, two-segment.
3
+ *
4
+ * # → home
5
+ * #components → components index
6
+ * #components/button → individual component doc
7
+ * #templates → templates index
8
+ * #templates/auth-signin → individual template page
9
+ * #guides → guides index
10
+ * #guides/theming → individual guide
11
+ * #catalog → legacy: full mini-demo wall
12
+ * #preview/auth-signin → full-bleed live preview of a template
13
+ */
14
+ export type Route = {
15
+ kind: 'home';
16
+ } | {
17
+ kind: 'catalog';
18
+ } | {
19
+ kind: 'components-index';
20
+ } | {
21
+ kind: 'component';
22
+ slug: string;
23
+ } | {
24
+ kind: 'templates-index';
25
+ } | {
26
+ kind: 'template';
27
+ slug: string;
28
+ } | {
29
+ kind: 'guides-index';
30
+ } | {
31
+ kind: 'guide';
32
+ slug: string;
33
+ } | {
34
+ kind: 'preview';
35
+ slug: string;
36
+ };
37
+ export declare function parseHash(hash: string): Route;
38
+ export declare function routeToHash(route: Route): string;
39
+ export declare function isFullBleedRoute(route: Route): boolean;
@@ -0,0 +1,3 @@
1
+ import { TemplateDoc } from '../registry/types';
2
+ declare const doc: TemplateDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { TemplateDoc } from '../registry/types';
2
+ declare const doc: TemplateDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { TemplateDoc } from '../registry/types';
2
+ declare const doc: TemplateDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { TemplateDoc } from '../registry/types';
2
+ declare const doc: TemplateDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { TemplateDoc } from '../registry/types';
2
+ declare const doc: TemplateDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { TemplateDoc } from '../registry/types';
2
+ declare const doc: TemplateDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { TemplateDoc } from '../registry/types';
2
+ declare const doc: TemplateDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { TemplateDoc } from '../registry/types';
2
+ declare const doc: TemplateDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { TemplateDoc } from '../registry/types';
2
+ declare const doc: TemplateDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { TemplateDoc } from '../registry/types';
2
+ declare const doc: TemplateDoc;
3
+ export default doc;
@@ -0,0 +1,3 @@
1
+ import { TemplateDoc } from '../registry/types';
2
+ declare const doc: TemplateDoc;
3
+ export default doc;
@@ -0,0 +1,12 @@
1
+ interface CodeBlockProps {
2
+ code: string;
3
+ /** Display language label (tsx, css, bash, …) shown in the top-right. */
4
+ language?: string;
5
+ className?: string;
6
+ }
7
+ /**
8
+ * Minimal pre/code block with a copy-to-clipboard button.
9
+ * No syntax highlighting — keeps the showcase bundle small.
10
+ */
11
+ export declare function CodeBlock({ code, language, className }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from 'react';
2
+ interface CodePreviewProps {
3
+ preview: ReactNode;
4
+ code: string;
5
+ language?: string;
6
+ /** Tweak the preview surface — e.g. add min-height for overlays. */
7
+ surfaceClassName?: string;
8
+ }
9
+ /**
10
+ * shadcn-style "Preview / Code" tab widget. Tabs hold their own state per
11
+ * instance so a page can flip individual examples without affecting others.
12
+ */
13
+ export declare function CodePreview({ preview, code, language, surfaceClassName, }: CodePreviewProps): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,10 @@
1
+ import { PropGroup } from '../registry/types';
2
+ interface PropsTableProps {
3
+ groups: PropGroup[];
4
+ }
5
+ /**
6
+ * Renders one or more prop-reference tables. Types are shown as inline
7
+ * `code` so long unions wrap cleanly.
8
+ */
9
+ export declare function PropsTable({ groups }: PropsTableProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};