astro-component-kit 0.4.1 → 0.5.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.
- package/README.md +35 -1
- package/bin/cli.js +67 -0
- package/bin/installer.js +179 -0
- package/package.json +22 -5
- package/src/components/lib/sections/ChangelogSection.astro +6 -0
- package/src/data/registry/app.ts +93 -0
- package/src/data/registry/buttons.ts +3279 -0
- package/src/data/registry/cards.ts +1753 -0
- package/src/data/registry/charts-svg.ts +557 -0
- package/src/data/registry/charts.ts +500 -0
- package/src/data/registry/data.ts +986 -0
- package/src/data/registry/ecommerce.ts +269 -0
- package/src/data/registry/feedback.ts +1824 -0
- package/src/data/registry/forms.ts +2513 -0
- package/src/data/registry/index.ts +64 -0
- package/src/data/registry/layout.ts +206 -0
- package/src/data/registry/navigation.ts +936 -0
- package/src/data/registry/overlays.ts +1133 -0
- package/src/data/registry/sections-extra.ts +397 -0
- package/src/data/registry/sections.ts +361 -0
- package/src/data/registry/sources.ts +41 -0
- package/src/data/registry/templates.ts +414 -0
- package/src/data/registry/types.ts +30 -0
- package/src/data/registry/typography.ts +777 -0
- package/src/mcp/http-server.ts +324 -0
- package/src/mcp/index.ts +67 -0
- package/src/mcp/installer.ts +178 -0
- package/src/mcp/registry-adapter.ts +278 -0
- package/src/mcp/stdio-server.ts +11 -0
- package/src/mcp/tools.ts +247 -0
- package/src/mcp/types.ts +53 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// src/data/registry/index.ts
|
|
2
|
+
import { buttons } from './buttons';
|
|
3
|
+
import { forms } from './forms';
|
|
4
|
+
import { cards } from './cards';
|
|
5
|
+
import { feedback } from './feedback';
|
|
6
|
+
import { navigation } from './navigation';
|
|
7
|
+
import { layout } from './layout';
|
|
8
|
+
import { overlays } from './overlays';
|
|
9
|
+
import { data } from './data';
|
|
10
|
+
import { typography } from './typography';
|
|
11
|
+
import { sections, sectionCategories, getSectionsByCategory, getSectionCategoryById } from './sections';
|
|
12
|
+
import { charts } from './charts';
|
|
13
|
+
import { chartsSvg } from './charts-svg';
|
|
14
|
+
import { ecommerce } from './ecommerce';
|
|
15
|
+
import { app } from './app';
|
|
16
|
+
|
|
17
|
+
import { type ComponentDoc, type Category, type SectionCategory } from './types';
|
|
18
|
+
export type { ComponentDoc, Category, SectionCategory };
|
|
19
|
+
export { sectionCategories, getSectionsByCategory, getSectionCategoryById };
|
|
20
|
+
|
|
21
|
+
export const categories: Category[] = [
|
|
22
|
+
{ id: 'buttons', name: 'Buttons', icon: `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="8" width="18" height="8" rx="4"/><circle cx="12" cy="12" r="1"/></svg>`, description: 'Interactive button components with premium styles and animations.' },
|
|
23
|
+
{ id: 'forms', name: 'Forms', icon: `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18"/></svg>`, description: 'Form elements with clean animations and validation states.' },
|
|
24
|
+
{ id: 'cards', name: 'Cards', icon: `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="4"/><path d="M3 15h18"/></svg>`, description: 'Versatile card containers for content display.' },
|
|
25
|
+
{ id: 'feedback', name: 'Feedback', icon: `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>`, description: 'Badges, alerts, and notification components.' },
|
|
26
|
+
{ id: 'navigation', name: 'Navigation', icon: `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12h18M3 6h18M3 18h18"/></svg>`, description: 'Navbars, tabs, breadcrumbs and navigation patterns.' },
|
|
27
|
+
{ id: 'layout', name: 'Layout', icon: `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="9"/><rect x="14" y="3" width="7" height="5"/><rect x="14" y="12" width="7" height="9"/><rect x="3" y="16" width="7" height="5"/></svg>`, description: 'Grids, containers, and structural sections.' },
|
|
28
|
+
{ id: 'overlays', name: 'Overlays', icon: `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="4" width="20" height="16" rx="2"/><path d="M10 4v16"/></svg>`, description: 'Modals, drawers, and popovers.' },
|
|
29
|
+
{ id: 'data', name: 'Data Display', icon: `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>`, description: 'Stats, tables, and visualization elements.' },
|
|
30
|
+
{ id: 'typography', name: 'Typography', icon: `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="4 7 4 4 20 4 20 7"/><line x1="9" y1="20" x2="15" y2="20"/><line x1="12" y1="4" x2="12" y2="20"/></svg>`, description: 'Headings and text patterns.' },
|
|
31
|
+
{ id: 'charts', name: 'Charts', icon: `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="20" x2="18" y2="10"/><line x1="12" y1="20" x2="12" y2="4"/><line x1="6" y1="20" x2="6" y2="14"/></svg>`, description: 'Charts and statistics: SVG line, bar, pie, funnel, heatmap, KPI and more.' },
|
|
32
|
+
{ id: 'ecommerce', name: 'E-commerce', icon: `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M6 7h12l-1 13H7z"/><path d="M9 7V6a3 3 0 0 1 6 0v1"/></svg>`, description: 'Shop building blocks: product cards, cart drawer, filters, product page and checkout.' },
|
|
33
|
+
{ id: 'app', name: 'App & Dashboard', icon: `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M9 3v18M9 9h12"/></svg>`, description: 'SaaS building blocks: sidebar, topbar, data table, boards, settings and auth.' },
|
|
34
|
+
{ id: 'sections', name: 'Sections', icon: `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18"/><path d="M9 21V9"/></svg>`, description: 'Complete page sections: heroes, features, pricing, CTAs, and more.' },
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
export const components: ComponentDoc[] = [
|
|
38
|
+
...buttons,
|
|
39
|
+
...forms,
|
|
40
|
+
...cards,
|
|
41
|
+
...feedback,
|
|
42
|
+
...navigation,
|
|
43
|
+
...layout,
|
|
44
|
+
...overlays,
|
|
45
|
+
...data,
|
|
46
|
+
...typography,
|
|
47
|
+
...charts,
|
|
48
|
+
...chartsSvg,
|
|
49
|
+
...ecommerce,
|
|
50
|
+
...app,
|
|
51
|
+
...sections,
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
export function getComponentsByCategory(categoryId: string): ComponentDoc[] {
|
|
55
|
+
return (components || []).filter((c) => c && c.category === categoryId);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function getComponentBySlug(slug: string): ComponentDoc | undefined {
|
|
59
|
+
return (components || []).find((c) => c && c.slug === slug);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function getFeaturedComponents(): ComponentDoc[] {
|
|
63
|
+
return (components || []).filter((c) => c && c.featured);
|
|
64
|
+
}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
// src/data/registry/layout.ts
|
|
2
|
+
import type { ComponentDoc } from './types';
|
|
3
|
+
import { source } from './sources';
|
|
4
|
+
|
|
5
|
+
export const layout: ComponentDoc[] = [
|
|
6
|
+
{
|
|
7
|
+
slug: 'centered-container',
|
|
8
|
+
name: 'Centered Container',
|
|
9
|
+
description: 'A responsive container that limits content width and centers it.',
|
|
10
|
+
category: 'layout',
|
|
11
|
+
tags: ['layout', 'container', 'grid'],
|
|
12
|
+
code: source('layout/CenteredContainer.astro'),
|
|
13
|
+
usage: `<CenteredContainer maxWidth="1200px">Content</CenteredContainer>`,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
slug: 'glass-card-grid',
|
|
17
|
+
name: 'Glass Card Grid',
|
|
18
|
+
description: 'A responsive grid specifically designed for card layouts with auto-fill columns.',
|
|
19
|
+
category: 'layout',
|
|
20
|
+
tags: ['layout', 'grid', 'cards'],
|
|
21
|
+
code: source('layout/GlassCardGrid.astro'),
|
|
22
|
+
usage: `<GlassCardGrid>Content</GlassCardGrid>`,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
slug: 'split-screen-layout',
|
|
26
|
+
name: 'Split Screen',
|
|
27
|
+
description: 'A layout divided into two equal halves, perfect for landing pages.',
|
|
28
|
+
category: 'layout',
|
|
29
|
+
tags: ['layout', 'split', 'landing'],
|
|
30
|
+
code: source('layout/SplitScreenLayout.astro'),
|
|
31
|
+
usage: `<SplitScreenLayout>Content</SplitScreenLayout>`,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
slug: 'masonry-grid',
|
|
35
|
+
name: 'Masonry Layout',
|
|
36
|
+
description: 'A CSS-based masonry layout for items of varying heights.',
|
|
37
|
+
category: 'layout',
|
|
38
|
+
tags: ['layout', 'masonry', 'columns'],
|
|
39
|
+
code: source('layout/MasonryGrid.astro'),
|
|
40
|
+
usage: `<MasonryGrid>Content</MasonryGrid>`,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
slug: 'section-divider-text',
|
|
44
|
+
name: 'Divider with Text',
|
|
45
|
+
description: 'A minimalist line divider with a label in the middle.',
|
|
46
|
+
category: 'layout',
|
|
47
|
+
tags: ['layout', 'divider', 'typography'],
|
|
48
|
+
code: source('layout/SectionDividerText.astro'),
|
|
49
|
+
usage: `<SectionDividerText>Content</SectionDividerText>`,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
slug: 'feature-hero',
|
|
53
|
+
name: 'Feature Hero Section',
|
|
54
|
+
description: 'Impactful header section with large typography and CTA buttons.',
|
|
55
|
+
category: 'layout',
|
|
56
|
+
tags: ['hero', 'layout', 'landing'],
|
|
57
|
+
code: source('layout/FeatureHero.astro'),
|
|
58
|
+
usage: `<FeatureHero>Content</FeatureHero>`,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
slug: 'vertical-stack',
|
|
62
|
+
name: 'Auto-Stack (Vertical)',
|
|
63
|
+
description: 'Utility layout for stacking elements with consistent spacing.',
|
|
64
|
+
category: 'layout',
|
|
65
|
+
tags: ['layout', 'stack', 'spacing'],
|
|
66
|
+
code: source('layout/VerticalStack.astro'),
|
|
67
|
+
usage: `<VerticalStack gap="1.5rem">Content</VerticalStack>`,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
slug: 'sidebar-layout-wrapper',
|
|
71
|
+
name: 'Sidebar Page Layout',
|
|
72
|
+
description: 'Two-column layout with fixed-width sidebar and liquid content.',
|
|
73
|
+
category: 'layout',
|
|
74
|
+
tags: ['layout', 'sidebar', 'dashboard'],
|
|
75
|
+
code: source('layout/SidebarLayoutWrapper.astro'),
|
|
76
|
+
usage: `<SidebarLayoutWrapper>Content</SidebarLayoutWrapper>`,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
slug: 'bento-grid-3',
|
|
80
|
+
name: 'Bento Grid (3 Column)',
|
|
81
|
+
description: 'Modern dashboard grid inspired by Bento-box layouts.',
|
|
82
|
+
category: 'layout',
|
|
83
|
+
tags: ['layout', 'grid', 'dashboard'],
|
|
84
|
+
code: source('layout/BentoGrid3.astro'),
|
|
85
|
+
usage: `<BentoGrid3>Content</BentoGrid3>`,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
slug: 'glass-section-header',
|
|
89
|
+
name: 'Glass Section Header',
|
|
90
|
+
description: 'Visual header for page sections with a blurred underline.',
|
|
91
|
+
category: 'layout',
|
|
92
|
+
tags: ['layout', 'header', 'glass'],
|
|
93
|
+
code: source('layout/GlassSectionHeader.astro'),
|
|
94
|
+
usage: `<GlassSectionHeader title="Example" subtitle="A description">Content</GlassSectionHeader>`,
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
slug: 'full-bleed-section',
|
|
98
|
+
name: 'Full Bleed Section',
|
|
99
|
+
description: 'Section that breaks out of the container to hit viewport edges.',
|
|
100
|
+
category: 'layout',
|
|
101
|
+
tags: ['layout', 'full-width', 'design'],
|
|
102
|
+
code: source('layout/FullBleedSection.astro'),
|
|
103
|
+
usage: `<FullBleedSection>Content</FullBleedSection>`,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
slug: 'minimal-footer-grid',
|
|
107
|
+
name: 'Modern Footer Layout',
|
|
108
|
+
description: 'Multi-column grid footer for project links and brand info.',
|
|
109
|
+
category: 'layout',
|
|
110
|
+
tags: ['layout', 'footer', 'grid'],
|
|
111
|
+
code: source('layout/MinimalFooterGrid.astro'),
|
|
112
|
+
usage: `<MinimalFooterGrid>Content</MinimalFooterGrid>`,
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
slug: 'scroll-snap-section',
|
|
116
|
+
name: 'Scroll Snap Page',
|
|
117
|
+
description: 'Layout wrapper that snaps sections to the full viewport height.',
|
|
118
|
+
category: 'layout',
|
|
119
|
+
tags: ['layout', 'scroll-snap', 'ux'],
|
|
120
|
+
code: source('layout/ScrollSnapSection.astro'),
|
|
121
|
+
usage: `<ScrollSnapSection>Content</ScrollSnapSection>`,
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
slug: 'sticky-sidebar-wrapper',
|
|
125
|
+
name: 'Sticky Side Column',
|
|
126
|
+
description: 'Main content area with a side column that remains fixed while scrolling.',
|
|
127
|
+
category: 'layout',
|
|
128
|
+
tags: ['layout', 'sticky', 'sidebar'],
|
|
129
|
+
code: source('layout/StickySidebarWrapper.astro'),
|
|
130
|
+
usage: `<StickySidebarWrapper>Content</StickySidebarWrapper>`,
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
slug: 'cluster-horizontal',
|
|
134
|
+
name: 'Horizontal Cluster',
|
|
135
|
+
description: 'Auto-wrapping flex row for buttons, badges, or list items.',
|
|
136
|
+
category: 'layout',
|
|
137
|
+
tags: ['layout', 'flex', 'spacing'],
|
|
138
|
+
code: source('layout/ClusterHorizontal.astro'),
|
|
139
|
+
usage: `<ClusterHorizontal>Content</ClusterHorizontal>`,
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
slug: 'center-fixed-box',
|
|
143
|
+
name: 'Absolute Center Box',
|
|
144
|
+
description: 'Overlay or layout utility to fix content exactly in the screen center.',
|
|
145
|
+
category: 'layout',
|
|
146
|
+
tags: ['layout', 'utility', 'absolute'],
|
|
147
|
+
code: source('layout/CenterFixedBox.astro'),
|
|
148
|
+
usage: `<CenterFixedBox>Content</CenterFixedBox>`,
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
slug: 'gallery-grid-4',
|
|
152
|
+
name: '4-Column Portfolio Grid',
|
|
153
|
+
description: 'Square aspect-ratio grid for visual galleries and photos.',
|
|
154
|
+
category: 'layout',
|
|
155
|
+
tags: ['layout', 'grid', 'gallery'],
|
|
156
|
+
code: source('layout/GalleryGrid4.astro'),
|
|
157
|
+
usage: `<GalleryGrid4>Content</GalleryGrid4>`,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
slug: 'step-layout-vertical',
|
|
161
|
+
name: 'Vertical Progress Steps',
|
|
162
|
+
description: 'Large scale vertical steps with space for detailed descriptions.',
|
|
163
|
+
category: 'layout',
|
|
164
|
+
tags: ['layout', 'onboarding', 'steps'],
|
|
165
|
+
code: source('layout/StepLayoutVertical.astro'),
|
|
166
|
+
usage: `<StepLayoutVertical>Content</StepLayoutVertical>`,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
slug: 'landing-section-split',
|
|
170
|
+
name: 'Split Media Section',
|
|
171
|
+
description: 'Landing page section with text on one side and a large media placeholder on the other.',
|
|
172
|
+
category: 'layout',
|
|
173
|
+
tags: ['layout', 'landing', 'media'],
|
|
174
|
+
code: source('layout/LandingSectionSplit.astro'),
|
|
175
|
+
usage: `<LandingSectionSplit>Content</LandingSectionSplit>`,
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
slug: 'footer-centered-minimal',
|
|
179
|
+
name: 'Bottom Brand Footer',
|
|
180
|
+
description: 'Extremely simple centered footer for portfolio or personal sites.',
|
|
181
|
+
category: 'layout',
|
|
182
|
+
tags: ['layout', 'footer', 'personal'],
|
|
183
|
+
code: source('layout/FooterCenteredMinimal.astro'),
|
|
184
|
+
usage: `<FooterCenteredMinimal>Content</FooterCenteredMinimal>`,
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
slug: 'holy-grail-grid',
|
|
188
|
+
name: 'Holy Grail Grid',
|
|
189
|
+
description: 'Modern CSS grid-based responsive layout with header, collapsible left sidebar, dynamic main content area, right aside, and footer.',
|
|
190
|
+
category: 'layout',
|
|
191
|
+
tags: ["layout","grid","holygrail","dashboard","structure"],
|
|
192
|
+
featured: true,
|
|
193
|
+
code: source('layout/HolyGrailGrid.astro'),
|
|
194
|
+
usage: `<HolyGrailGrid><div slot="header">Header</div><div slot="left">Sidebar</div><div slot="main">Content</div><div slot="footer">Footer</div></HolyGrailGrid>`,
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
slug: 'diagonal-section-divider',
|
|
198
|
+
name: 'Diagonal Section Divider',
|
|
199
|
+
description: 'SVG slant angle section separator creating dynamic non-rectangular transitions between landing page sections.',
|
|
200
|
+
category: 'layout',
|
|
201
|
+
tags: ["layout","divider","diagonal","slant","separator"],
|
|
202
|
+
featured: false,
|
|
203
|
+
code: source('layout/DiagonalSectionDivider.astro'),
|
|
204
|
+
usage: `<DiagonalSectionDivider angle="slant-down" fill="var(--c-bg-subtle)" height={60} />`,
|
|
205
|
+
},
|
|
206
|
+
];
|