astro-component-kit 0.4.0 → 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 +139 -27
- package/bin/cli.js +67 -0
- package/bin/installer.js +179 -0
- package/package.json +35 -5
- package/src/components/index.ts +2 -0
- package/src/components/lib/Galaxy3D.astro +249 -137
- package/src/components/lib/app/AppSidebar.astro +249 -0
- package/src/components/lib/app/AppTopbar.astro +284 -0
- package/src/components/lib/app/ArrivalsBoard.astro +176 -0
- package/src/components/lib/app/AuthCard.astro +213 -0
- package/src/components/lib/app/DataTable.astro +346 -0
- package/src/components/lib/app/GuestProfileCard.astro +133 -0
- package/src/components/lib/app/HousekeepingBoard.astro +189 -0
- package/src/components/lib/app/PageHeader.astro +157 -0
- package/src/components/lib/app/PlanUsageCard.astro +112 -0
- package/src/components/lib/app/RoomRack.astro +207 -0
- package/src/components/lib/app/SettingsSection.astro +96 -0
- package/src/components/lib/app/SwitchRow.astro +71 -0
- package/src/components/lib/app/TeamMembers.astro +190 -0
- package/src/components/lib/app/app-icons.ts +52 -0
- package/src/components/lib/app/index.ts +19 -0
- package/src/components/lib/charts/AreaChart.astro +4 -4
- package/src/components/lib/charts/BarChart.astro +3 -3
- package/src/components/lib/charts/ChartFrame.astro +10 -10
- package/src/components/lib/charts/DonutChart.astro +2 -2
- package/src/components/lib/charts/DumbbellChart.astro +1 -1
- package/src/components/lib/charts/ForecastLineChart.astro +1 -1
- package/src/components/lib/charts/GaugeChart.astro +1 -1
- package/src/components/lib/charts/HeatmapChart.astro +1 -1
- package/src/components/lib/charts/HorizontalBarChart.astro +2 -2
- package/src/components/lib/charts/KpiStatTile.astro +4 -4
- package/src/components/lib/charts/LinearProgressGauge.astro +4 -4
- package/src/components/lib/charts/MetricDeltaTable.astro +3 -3
- package/src/components/lib/charts/RadarMetricChart.astro +4 -4
- package/src/components/lib/charts/RadialBarChart.astro +1 -1
- package/src/components/lib/charts/RetentionCohortTable.astro +2 -2
- package/src/components/lib/charts/TreemapChart.astro +1 -1
- package/src/components/lib/ecommerce/CartDrawer.astro +483 -0
- package/src/components/lib/ecommerce/CartPageList.astro +290 -0
- package/src/components/lib/ecommerce/CartToast.astro +276 -0
- package/src/components/lib/ecommerce/CategoryTiles.astro +143 -0
- package/src/components/lib/ecommerce/CheckoutForm.astro +423 -0
- package/src/components/lib/ecommerce/CountdownBanner.astro +230 -0
- package/src/components/lib/ecommerce/FilterBar.astro +278 -0
- package/src/components/lib/ecommerce/FilterSidebar.astro +405 -0
- package/src/components/lib/ecommerce/LiveActivityToast.astro +213 -0
- package/src/components/lib/ecommerce/OrderSummary.astro +295 -0
- package/src/components/lib/ecommerce/ProductBuyBox.astro +247 -0
- package/src/components/lib/ecommerce/ProductCardMinimal.astro +229 -0
- package/src/components/lib/ecommerce/ProductGallery.astro +145 -0
- package/src/components/lib/ecommerce/ProductGrid.astro +118 -0
- package/src/components/lib/ecommerce/ProductMedia.astro +113 -0
- package/src/components/lib/ecommerce/ProductRating.astro +78 -0
- package/src/components/lib/ecommerce/ProductToolbar.astro +93 -0
- package/src/components/lib/ecommerce/PromoBar.astro +145 -0
- package/src/components/lib/ecommerce/StockIndicator.astro +127 -0
- package/src/components/lib/ecommerce/StoreHeader.astro +446 -0
- package/src/components/lib/ecommerce/StoreHero.astro +260 -0
- package/src/components/lib/ecommerce/StoreProductCard.astro +307 -0
- package/src/components/lib/ecommerce/TrustBadges.astro +101 -0
- package/src/components/lib/ecommerce/VariantPicker.astro +145 -0
- package/src/components/lib/ecommerce/cart-store.ts +151 -0
- package/src/components/lib/ecommerce/catalog-filter.ts +62 -0
- package/src/components/lib/ecommerce/index.ts +34 -0
- package/src/components/lib/ecommerce/product-icons.ts +28 -0
- package/src/components/lib/ecommerce/types.ts +70 -0
- package/src/components/lib/forms/AnimatedInput.astro +4 -2
- package/src/components/lib/forms/CustomRadioGroup.astro +3 -1
- package/src/components/lib/index.ts +2 -0
- package/src/components/lib/layout/BentoGrid3.astro +6 -4
- package/src/components/lib/layout/CenterFixedBox.astro +2 -2
- package/src/components/lib/layout/CenteredContainer.astro +4 -2
- package/src/components/lib/layout/ClusterHorizontal.astro +2 -2
- package/src/components/lib/layout/FeatureHero.astro +4 -2
- package/src/components/lib/layout/FooterCenteredMinimal.astro +4 -2
- package/src/components/lib/layout/FullBleedSection.astro +2 -2
- package/src/components/lib/layout/GalleryGrid4.astro +2 -2
- package/src/components/lib/layout/HolyGrailGrid.astro +11 -9
- package/src/components/lib/layout/LandingSectionSplit.astro +5 -3
- package/src/components/lib/layout/MasonryGrid.astro +2 -2
- package/src/components/lib/layout/MinimalFooterGrid.astro +1 -1
- package/src/components/lib/layout/ScrollSnapSection.astro +1 -1
- package/src/components/lib/layout/SidebarLayoutWrapper.astro +4 -2
- package/src/components/lib/layout/SplitScreenLayout.astro +3 -3
- package/src/components/lib/layout/StepLayoutVertical.astro +1 -1
- package/src/components/lib/layout/StickySidebarWrapper.astro +4 -2
- package/src/components/lib/sections/AgencyContactBrief.astro +194 -0
- package/src/components/lib/sections/AgencyFooterCta.astro +94 -0
- package/src/components/lib/sections/AgencyHeader.astro +161 -0
- package/src/components/lib/sections/AgencyHeroKinetic.astro +172 -0
- package/src/components/lib/sections/AgencyServicesList.astro +113 -0
- package/src/components/lib/sections/AgencyTeamGrid.astro +111 -0
- package/src/components/lib/sections/AgencyWorkGrid.astro +147 -0
- package/src/components/lib/sections/BlogGridSection.astro +9 -7
- package/src/components/lib/sections/ButtonsShowcase.astro +20 -18
- package/src/components/lib/sections/CardsShowcase.astro +28 -26
- package/src/components/lib/sections/CareersOpenings.astro +10 -8
- package/src/components/lib/sections/ChangelogSection.astro +20 -7
- package/src/components/lib/sections/ContactGlassForm.astro +10 -8
- package/src/components/lib/sections/ContactSplitMap.astro +11 -9
- package/src/components/lib/sections/CtaAppDownload.astro +13 -11
- package/src/components/lib/sections/CtaGlowBanner.astro +12 -10
- package/src/components/lib/sections/CtaNewsletterSection.astro +13 -11
- package/src/components/lib/sections/CtaSplitImage.astro +13 -11
- package/src/components/lib/sections/DataShowcase.astro +23 -21
- package/src/components/lib/sections/FaqAccordionSection.astro +8 -8
- package/src/components/lib/sections/FaqTwoColumn.astro +9 -7
- package/src/components/lib/sections/FeatureAlternatingRows.astro +10 -8
- package/src/components/lib/sections/FeatureBentoGrid.astro +13 -11
- package/src/components/lib/sections/FeatureIconGrid.astro +6 -6
- package/src/components/lib/sections/FeatureTabsShowcase.astro +13 -11
- package/src/components/lib/sections/FeatureTimelineFlow.astro +8 -6
- package/src/components/lib/sections/FeedbackShowcase.astro +15 -13
- package/src/components/lib/sections/FooterMegaSection.astro +13 -11
- package/src/components/lib/sections/FormsShowcase.astro +22 -20
- package/src/components/lib/sections/HeroDashboardPreview.astro +11 -9
- package/src/components/lib/sections/HeroGlass.astro +22 -20
- package/src/components/lib/sections/HeroGradient.astro +15 -13
- package/src/components/lib/sections/HeroMinimalCentered.astro +10 -10
- package/src/components/lib/sections/HeroShowcaseSplit.astro +18 -16
- package/src/components/lib/sections/HeroSplit.astro +13 -11
- package/src/components/lib/sections/HeroTerminal.astro +14 -12
- package/src/components/lib/sections/HeroWaitlist.astro +10 -8
- package/src/components/lib/sections/HowItWorksSteps.astro +12 -10
- package/src/components/lib/sections/IntegrationsGrid.astro +7 -7
- package/src/components/lib/sections/LayoutShowcase.astro +21 -19
- package/src/components/lib/sections/LogoCloudSection.astro +4 -4
- package/src/components/lib/sections/LogoWallGrid.astro +6 -4
- package/src/components/lib/sections/NavigationShowcase.astro +15 -13
- package/src/components/lib/sections/OverlaysShowcase.astro +21 -19
- package/src/components/lib/sections/PricingComparisonMatrix.astro +15 -13
- package/src/components/lib/sections/PricingSinglePlan.astro +13 -11
- package/src/components/lib/sections/PricingTierCards.astro +11 -9
- package/src/components/lib/sections/PricingToggleCards.astro +13 -13
- package/src/components/lib/sections/ShopCategoryHero.astro +103 -0
- package/src/components/lib/sections/ShopCollectionMosaic.astro +131 -0
- package/src/components/lib/sections/ShopFooterWordmark.astro +100 -0
- package/src/components/lib/sections/ShopHeaderEditorial.astro +396 -0
- package/src/components/lib/sections/ShopHeroEditorial.astro +151 -0
- package/src/components/lib/sections/ShopLookbook.astro +250 -0
- package/src/components/lib/sections/ShopNewsletterEditorial.astro +128 -0
- package/src/components/lib/sections/ShopProductRail.astro +150 -0
- package/src/components/lib/sections/ShopReviewsEditorial.astro +133 -0
- package/src/components/lib/sections/ShopValuesMarquee.astro +91 -0
- package/src/components/lib/sections/StatsCounterBand.astro +9 -7
- package/src/components/lib/sections/StatsDashboardSection.astro +4 -2
- package/src/components/lib/sections/StatsMetricShowcase.astro +9 -7
- package/src/components/lib/sections/TeamGridSection.astro +12 -10
- package/src/components/lib/sections/TestimonialCarousel.astro +10 -8
- package/src/components/lib/sections/TestimonialFeatured.astro +7 -5
- package/src/components/lib/sections/TestimonialGridSection.astro +7 -7
- package/src/components/lib/sections/TestimonialWallGlass.astro +11 -9
- package/src/components/lib/sections/TypographyShowcase.astro +10 -8
- package/src/components/lib/sections/index.ts +10 -0
- package/src/components/lib/templates/ecommerce/StoreCategoryPage.astro +160 -0
- package/src/components/lib/templates/ecommerce/StoreCheckoutPage.astro +98 -0
- package/src/components/lib/templates/ecommerce/StoreHomePage.astro +191 -0
- package/src/components/lib/templates/ecommerce/StoreLayout.astro +169 -0
- package/src/components/lib/templates/ecommerce/StoreProductPage.astro +165 -0
- package/src/components/lib/templates/ecommerce/data.ts +187 -0
- package/src/components/lib/templates/ecommerce/index.ts +14 -0
- package/src/components/lib/templates/ecommerce-editorial/EditorialBagPage.astro +52 -0
- package/src/components/lib/templates/ecommerce-editorial/EditorialCheckoutPage.astro +123 -0
- package/src/components/lib/templates/ecommerce-editorial/EditorialHomePage.astro +102 -0
- package/src/components/lib/templates/ecommerce-editorial/EditorialLayout.astro +216 -0
- package/src/components/lib/templates/ecommerce-editorial/EditorialProductPage.astro +205 -0
- package/src/components/lib/templates/ecommerce-editorial/EditorialShopPage.astro +112 -0
- package/src/components/lib/templates/ecommerce-editorial/data.ts +125 -0
- package/src/components/lib/templates/ecommerce-editorial/index.ts +16 -0
- package/src/components/lib/templates/saas-hotel/AppLayout.astro +83 -0
- package/src/components/lib/templates/saas-hotel/DashboardPage.astro +66 -0
- package/src/components/lib/templates/saas-hotel/GuestsPage.astro +65 -0
- package/src/components/lib/templates/saas-hotel/LandingPage.astro +213 -0
- package/src/components/lib/templates/saas-hotel/ReportsPage.astro +63 -0
- package/src/components/lib/templates/saas-hotel/ReservationsPage.astro +49 -0
- package/src/components/lib/templates/saas-hotel/RoomsPage.astro +48 -0
- package/src/components/lib/templates/saas-hotel/SettingsPage.astro +115 -0
- package/src/components/lib/templates/saas-hotel/SignInPage.astro +50 -0
- package/src/components/lib/templates/saas-hotel/data.ts +229 -0
- package/src/components/lib/templates/saas-hotel/index.ts +19 -0
- package/src/components/lib/templates/saas-hotel/lobby-theme.css +90 -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
- package/src/styles/global.css +95 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
// src/mcp/registry-adapter.ts
|
|
2
|
+
// Direct adapter between Astro Components Kit registry and the MCP server.
|
|
3
|
+
// Whenever components or templates are added to the codebase, this adapter
|
|
4
|
+
// dynamically discovers and exposes them without any manual sync.
|
|
5
|
+
import fs from 'node:fs';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
import { components, categories } from '../data/registry/index.js';
|
|
8
|
+
import { templates } from '../data/registry/templates.js';
|
|
9
|
+
import type { ComponentDoc } from '../data/registry/types.js';
|
|
10
|
+
import type { TemplateDoc } from '../data/registry/templates.js';
|
|
11
|
+
import type {
|
|
12
|
+
ComponentSearchResult,
|
|
13
|
+
ComponentDetail,
|
|
14
|
+
CategorySummary,
|
|
15
|
+
TemplateSummary,
|
|
16
|
+
LibraryStats,
|
|
17
|
+
} from './types.js';
|
|
18
|
+
|
|
19
|
+
// Resolve project root
|
|
20
|
+
const ROOT_DIR = process.cwd();
|
|
21
|
+
const PKG_PATH = path.resolve(ROOT_DIR, 'package.json');
|
|
22
|
+
const GLOBAL_CSS_PATH = path.resolve(ROOT_DIR, 'src/styles/global.css');
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Returns basic package info from package.json.
|
|
26
|
+
*/
|
|
27
|
+
export function getPackageMeta() {
|
|
28
|
+
try {
|
|
29
|
+
const pkgRaw = fs.readFileSync(PKG_PATH, 'utf8');
|
|
30
|
+
return JSON.parse(pkgRaw);
|
|
31
|
+
} catch {
|
|
32
|
+
return { name: 'astro-component-kit', version: '0.5.0' };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Derives the optimal npm import statement for a component.
|
|
38
|
+
*/
|
|
39
|
+
function getImportStatement(c: ComponentDoc): string {
|
|
40
|
+
const componentName = c.name.replace(/\s+/g, '');
|
|
41
|
+
if (c.category === 'sections') {
|
|
42
|
+
return `import { ${componentName} } from 'astro-component-kit/sections';`;
|
|
43
|
+
}
|
|
44
|
+
if (c.category === 'charts') {
|
|
45
|
+
return `import { ${componentName} } from 'astro-component-kit/charts';`;
|
|
46
|
+
}
|
|
47
|
+
if (c.category === 'ecommerce') {
|
|
48
|
+
return `import { ${componentName} } from 'astro-component-kit/ecommerce';`;
|
|
49
|
+
}
|
|
50
|
+
if (c.category === 'app') {
|
|
51
|
+
return `import { ${componentName} } from 'astro-component-kit/app';`;
|
|
52
|
+
}
|
|
53
|
+
return `import { ${componentName} } from 'astro-component-kit/${c.category}';`;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Searches components by text query, category, and tag.
|
|
58
|
+
*/
|
|
59
|
+
export function searchComponents(opts: {
|
|
60
|
+
query?: string;
|
|
61
|
+
category?: string;
|
|
62
|
+
tag?: string;
|
|
63
|
+
limit?: number;
|
|
64
|
+
}): ComponentSearchResult[] {
|
|
65
|
+
const query = (opts.query || '').trim().toLowerCase();
|
|
66
|
+
const targetCategory = opts.category?.trim().toLowerCase();
|
|
67
|
+
const targetTag = opts.tag?.trim().toLowerCase();
|
|
68
|
+
const limit = Math.max(1, Math.min(opts.limit || 20, 50));
|
|
69
|
+
|
|
70
|
+
let results = components.filter((c) => {
|
|
71
|
+
if (targetCategory && c.category.toLowerCase() !== targetCategory) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
if (targetTag && !c.tags.some((t) => t.toLowerCase() === targetTag)) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
if (!query) {
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const inSlug = c.slug.toLowerCase().includes(query);
|
|
82
|
+
const inName = c.name.toLowerCase().includes(query);
|
|
83
|
+
const inDesc = c.description.toLowerCase().includes(query);
|
|
84
|
+
const inTags = c.tags.some((t) => t.toLowerCase().includes(query));
|
|
85
|
+
return inSlug || inName || inDesc || inTags;
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// Sort: exact name match first, then featured, then alphabetical
|
|
89
|
+
if (query) {
|
|
90
|
+
results.sort((a, b) => {
|
|
91
|
+
const aExact = a.name.toLowerCase() === query || a.slug.toLowerCase() === query ? 1 : 0;
|
|
92
|
+
const bExact = b.name.toLowerCase() === query || b.slug.toLowerCase() === query ? 1 : 0;
|
|
93
|
+
if (aExact !== bExact) return bExact - aExact;
|
|
94
|
+
if ((a.featured ? 1 : 0) !== (b.featured ? 1 : 0)) return (b.featured ? 1 : 0) - (a.featured ? 1 : 0);
|
|
95
|
+
return a.name.localeCompare(b.name);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return results.slice(0, limit).map((c) => ({
|
|
100
|
+
slug: c.slug,
|
|
101
|
+
name: c.name,
|
|
102
|
+
category: c.category,
|
|
103
|
+
description: c.description,
|
|
104
|
+
tags: c.tags,
|
|
105
|
+
importPath: `astro-component-kit/${c.category}`,
|
|
106
|
+
featured: Boolean(c.featured),
|
|
107
|
+
}));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Retrieves a component by slug with usage, import statement, and documentation.
|
|
112
|
+
*/
|
|
113
|
+
export function getComponent(slug: string): ComponentDetail | null {
|
|
114
|
+
const c = components.find((item) => item.slug === slug || item.slug.toLowerCase() === slug.toLowerCase());
|
|
115
|
+
if (!c) return null;
|
|
116
|
+
|
|
117
|
+
return {
|
|
118
|
+
slug: c.slug,
|
|
119
|
+
name: c.name,
|
|
120
|
+
category: c.category,
|
|
121
|
+
description: c.description,
|
|
122
|
+
tags: c.tags,
|
|
123
|
+
importStatement: getImportStatement(c),
|
|
124
|
+
usageExample: c.usage || `--- \n${getImportStatement(c)}\n---\n\n<${c.name.replace(/\s+/g, '')} />`,
|
|
125
|
+
installationGuide: c.installation?.manual || undefined,
|
|
126
|
+
codeSnippet: c.code || '',
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Retrieves the full raw Astro source code of a component.
|
|
132
|
+
*/
|
|
133
|
+
export function getComponentCode(slug: string): { slug: string; name: string; code: string } | null {
|
|
134
|
+
const c = components.find((item) => item.slug === slug || item.slug.toLowerCase() === slug.toLowerCase());
|
|
135
|
+
if (!c) return null;
|
|
136
|
+
|
|
137
|
+
let code = c.code || '';
|
|
138
|
+
|
|
139
|
+
// If code is empty or placeholder, attempt to read directly from src/components/lib/
|
|
140
|
+
if (!code || code.length < 50) {
|
|
141
|
+
const candidatePaths = [
|
|
142
|
+
path.resolve(ROOT_DIR, `src/components/lib/${c.category}/${c.name.replace(/\s+/g, '')}.astro`),
|
|
143
|
+
path.resolve(ROOT_DIR, `src/components/lib/${c.category}/${c.slug}.astro`),
|
|
144
|
+
path.resolve(ROOT_DIR, `src/components/lib/sections/${c.name.replace(/\s+/g, '')}.astro`),
|
|
145
|
+
];
|
|
146
|
+
for (const p of candidatePaths) {
|
|
147
|
+
if (fs.existsSync(p)) {
|
|
148
|
+
try {
|
|
149
|
+
code = fs.readFileSync(p, 'utf8');
|
|
150
|
+
break;
|
|
151
|
+
} catch {
|
|
152
|
+
// ignore
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return {
|
|
159
|
+
slug: c.slug,
|
|
160
|
+
name: c.name,
|
|
161
|
+
code,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Lists all component categories with component counts.
|
|
167
|
+
*/
|
|
168
|
+
export function listCategories(): CategorySummary[] {
|
|
169
|
+
return categories.map((cat) => {
|
|
170
|
+
const count = components.filter((c) => c.category === cat.id).length;
|
|
171
|
+
return {
|
|
172
|
+
id: cat.id,
|
|
173
|
+
name: cat.name,
|
|
174
|
+
description: cat.description,
|
|
175
|
+
count,
|
|
176
|
+
};
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Lists all multi-page templates available in the kit.
|
|
182
|
+
*/
|
|
183
|
+
export function listTemplates(): TemplateSummary[] {
|
|
184
|
+
return templates.map((t) => ({
|
|
185
|
+
slug: t.slug,
|
|
186
|
+
name: t.name.en,
|
|
187
|
+
tagline: t.tagline.en,
|
|
188
|
+
description: t.description.en,
|
|
189
|
+
tags: t.tags,
|
|
190
|
+
importPath: t.importPath,
|
|
191
|
+
previewUrl: `https://astrocomponents.dev${t.previewBase}`,
|
|
192
|
+
pageCount: t.pages.length,
|
|
193
|
+
pages: t.pages.map((p) => ({
|
|
194
|
+
id: p.id,
|
|
195
|
+
name: p.name.en,
|
|
196
|
+
path: p.path,
|
|
197
|
+
file: p.file,
|
|
198
|
+
})),
|
|
199
|
+
}));
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Retrieves full details and code for a template.
|
|
204
|
+
*/
|
|
205
|
+
export function getTemplate(slug: string): (TemplateDoc & { previewUrl: string }) | null {
|
|
206
|
+
const t = templates.find((item) => item.slug === slug || item.slug.toLowerCase() === slug.toLowerCase());
|
|
207
|
+
if (!t) return null;
|
|
208
|
+
return {
|
|
209
|
+
...t,
|
|
210
|
+
previewUrl: `https://astrocomponents.dev${t.previewBase}`,
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Retrieves the global design tokens and theme setup guide.
|
|
216
|
+
*/
|
|
217
|
+
export function getDesignTokens(): {
|
|
218
|
+
cssImport: string;
|
|
219
|
+
themeToggleSnippet: string;
|
|
220
|
+
tokensOverview: string;
|
|
221
|
+
cssSource: string;
|
|
222
|
+
} {
|
|
223
|
+
let cssSource = '';
|
|
224
|
+
try {
|
|
225
|
+
if (fs.existsSync(GLOBAL_CSS_PATH)) {
|
|
226
|
+
cssSource = fs.readFileSync(GLOBAL_CSS_PATH, 'utf8');
|
|
227
|
+
}
|
|
228
|
+
} catch {
|
|
229
|
+
// ignore
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
return {
|
|
233
|
+
cssImport: `import 'astro-component-kit/global.css';`,
|
|
234
|
+
themeToggleSnippet: `<!-- Add data-theme="light" to html or body for light theme -->
|
|
235
|
+
<html lang="en" data-theme="dark">
|
|
236
|
+
<head>
|
|
237
|
+
<script is:inline>
|
|
238
|
+
// Persistent theme toggle script
|
|
239
|
+
const theme = localStorage.getItem('ack-theme') ||
|
|
240
|
+
(window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark');
|
|
241
|
+
document.documentElement.setAttribute('data-theme', theme);
|
|
242
|
+
</script>
|
|
243
|
+
</head>
|
|
244
|
+
<body>
|
|
245
|
+
<!-- components adapt automatically using --ink-rgb, --paper-rgb, --c-on-primary -->
|
|
246
|
+
</body>
|
|
247
|
+
</html>`,
|
|
248
|
+
tokensOverview: `Astro Components Kit design tokens:
|
|
249
|
+
- Primary Color: var(--c-primary, #b8860b) and var(--c-primary-light)
|
|
250
|
+
- Text Contrast: var(--c-text-1), var(--c-text-2), var(--c-text-3), var(--c-on-primary)
|
|
251
|
+
- Theme Adaptation: rgb(var(--ink-rgb, 255 255 255) / opacity) for dark, rgb(var(--ink-rgb, 10 10 10) / opacity) for light
|
|
252
|
+
- Backgrounds: var(--c-bg), var(--c-bg-subtle), var(--c-card-bg)
|
|
253
|
+
- Radii: var(--r-sm, 6px), var(--r-md, 12px), var(--r-lg, 18px), var(--r-xl, 24px), var(--r-full, 9999px)
|
|
254
|
+
- Spacing: var(--sp-1) (4px) to var(--sp-20) (80px)
|
|
255
|
+
- SVG Charts: var(--chart-1)...var(--chart-8), var(--chart-pos), var(--chart-neg), var(--chart-grid)`,
|
|
256
|
+
cssSource,
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Returns overall stats and overview for the library.
|
|
262
|
+
*/
|
|
263
|
+
export function getLibraryStats(): LibraryStats {
|
|
264
|
+
const pkg = getPackageMeta();
|
|
265
|
+
const cats = listCategories();
|
|
266
|
+
return {
|
|
267
|
+
name: pkg.name || 'astro-component-kit',
|
|
268
|
+
version: pkg.version || '0.5.0',
|
|
269
|
+
description: pkg.description || 'A free, open-source accessible UI component library for Astro',
|
|
270
|
+
totalComponents: components.length,
|
|
271
|
+
totalCategories: cats.length,
|
|
272
|
+
totalTemplates: templates.length,
|
|
273
|
+
homepage: 'https://astrocomponents.dev',
|
|
274
|
+
npm: 'https://www.npmjs.com/package/astro-component-kit',
|
|
275
|
+
categories: cats,
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// src/mcp/stdio-server.ts
|
|
2
|
+
// Stdio transport for local execution (e.g. npx astro-component-kit mcp).
|
|
3
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
|
+
import { createMcpServer } from './tools.js';
|
|
5
|
+
|
|
6
|
+
export async function startStdioServer() {
|
|
7
|
+
const server = createMcpServer();
|
|
8
|
+
const transport = new StdioServerTransport();
|
|
9
|
+
await server.connect(transport);
|
|
10
|
+
}
|
|
11
|
+
|
package/src/mcp/tools.ts
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
// src/mcp/tools.ts
|
|
2
|
+
// MCP Tools definition for Astro Components Kit.
|
|
3
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import {
|
|
6
|
+
searchComponents,
|
|
7
|
+
getComponent,
|
|
8
|
+
getComponentCode,
|
|
9
|
+
listCategories,
|
|
10
|
+
listTemplates,
|
|
11
|
+
getTemplate,
|
|
12
|
+
getDesignTokens,
|
|
13
|
+
getLibraryStats,
|
|
14
|
+
} from './registry-adapter.js';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Creates and registers all tools on a new McpServer instance.
|
|
18
|
+
*/
|
|
19
|
+
export function createMcpServer(): McpServer {
|
|
20
|
+
const stats = getLibraryStats();
|
|
21
|
+
const server = new McpServer({
|
|
22
|
+
name: 'astro-components-kit-mcp',
|
|
23
|
+
version: stats.version,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// 1. search_components
|
|
27
|
+
server.tool(
|
|
28
|
+
'search_components',
|
|
29
|
+
'Search for Astro UI components by keyword, category, or tag (e.g. "button", "pricing", "kpi chart", "cart", "modal"). Returns matching components with description and import paths.',
|
|
30
|
+
{
|
|
31
|
+
query: z.string().optional().describe('Keyword to search in name, description, slug, or tags'),
|
|
32
|
+
category: z
|
|
33
|
+
.string()
|
|
34
|
+
.optional()
|
|
35
|
+
.describe(
|
|
36
|
+
'Filter by category: buttons, cards, forms, feedback, navigation, layout, overlays, data, typography, charts, ecommerce, app, sections'
|
|
37
|
+
),
|
|
38
|
+
tag: z.string().optional().describe('Filter by specific tag, e.g. "glass", "chart", "hero", "table"'),
|
|
39
|
+
limit: z.number().int().min(1).max(50).optional().describe('Max results to return (default: 20)'),
|
|
40
|
+
},
|
|
41
|
+
async (args) => {
|
|
42
|
+
const results = searchComponents(args);
|
|
43
|
+
return {
|
|
44
|
+
content: [
|
|
45
|
+
{
|
|
46
|
+
type: 'text',
|
|
47
|
+
text: JSON.stringify(
|
|
48
|
+
{
|
|
49
|
+
totalFound: results.length,
|
|
50
|
+
components: results,
|
|
51
|
+
},
|
|
52
|
+
null,
|
|
53
|
+
2
|
|
54
|
+
),
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
// 2. get_component
|
|
62
|
+
server.tool(
|
|
63
|
+
'get_component',
|
|
64
|
+
'Get full details, props interface, usage example, and import statement for a specific Astro component by its slug (e.g. "product-buy-box", "glass-button", "feature-bento-grid").',
|
|
65
|
+
{
|
|
66
|
+
slug: z.string().describe('The kebab-case slug of the component (e.g. "kpi-stat-tile", "cart-drawer", "data-table")'),
|
|
67
|
+
},
|
|
68
|
+
async ({ slug }) => {
|
|
69
|
+
const detail = getComponent(slug);
|
|
70
|
+
if (!detail) {
|
|
71
|
+
return {
|
|
72
|
+
isError: true,
|
|
73
|
+
content: [
|
|
74
|
+
{
|
|
75
|
+
type: 'text',
|
|
76
|
+
text: `Component with slug "${slug}" not found in astro-component-kit. Use the "search_components" tool to find valid slugs.`,
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
content: [
|
|
83
|
+
{
|
|
84
|
+
type: 'text',
|
|
85
|
+
text: JSON.stringify(detail, null, 2),
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
// 3. get_component_code
|
|
93
|
+
server.tool(
|
|
94
|
+
'get_component_code',
|
|
95
|
+
'Get the complete, raw .astro source code of a component ready to be copy-pasted directly into a project without npm.',
|
|
96
|
+
{
|
|
97
|
+
slug: z.string().describe('The kebab-case slug of the component (e.g. "line-chart", "glass-button")'),
|
|
98
|
+
},
|
|
99
|
+
async ({ slug }) => {
|
|
100
|
+
const result = getComponentCode(slug);
|
|
101
|
+
if (!result || !result.code) {
|
|
102
|
+
return {
|
|
103
|
+
isError: true,
|
|
104
|
+
content: [
|
|
105
|
+
{
|
|
106
|
+
type: 'text',
|
|
107
|
+
text: `Could not retrieve source code for component "${slug}". Check the slug using "search_components".`,
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
content: [
|
|
114
|
+
{
|
|
115
|
+
type: 'text',
|
|
116
|
+
text: result.code,
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
// 4. list_categories
|
|
124
|
+
server.tool(
|
|
125
|
+
'list_categories',
|
|
126
|
+
'List all available component and section categories in Astro Components Kit with their descriptions and component counts.',
|
|
127
|
+
{},
|
|
128
|
+
async () => {
|
|
129
|
+
const categories = listCategories();
|
|
130
|
+
return {
|
|
131
|
+
content: [
|
|
132
|
+
{
|
|
133
|
+
type: 'text',
|
|
134
|
+
text: JSON.stringify({ categories }, null, 2),
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
|
|
141
|
+
// 5. list_templates
|
|
142
|
+
server.tool(
|
|
143
|
+
'list_templates',
|
|
144
|
+
'List all multi-page production templates (e.g. E-Commerce Store, Editorial Shop, SaaS Hotel PMS) with page lists and features.',
|
|
145
|
+
{},
|
|
146
|
+
async () => {
|
|
147
|
+
const templates = listTemplates();
|
|
148
|
+
return {
|
|
149
|
+
content: [
|
|
150
|
+
{
|
|
151
|
+
type: 'text',
|
|
152
|
+
text: JSON.stringify({ templates }, null, 2),
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
// 6. get_template
|
|
160
|
+
server.tool(
|
|
161
|
+
'get_template',
|
|
162
|
+
'Get the complete multi-page template specification, architecture, pages, code, and routing instructions (e.g. "ecommerce", "ecommerce-editorial", "saas-hotel").',
|
|
163
|
+
{
|
|
164
|
+
slug: z
|
|
165
|
+
.string()
|
|
166
|
+
.describe('Template slug: "ecommerce" (Nova Store), "ecommerce-editorial" (Forma Studio), or "saas-hotel" (The Lobby)'),
|
|
167
|
+
},
|
|
168
|
+
async ({ slug }) => {
|
|
169
|
+
const template = getTemplate(slug);
|
|
170
|
+
if (!template) {
|
|
171
|
+
return {
|
|
172
|
+
isError: true,
|
|
173
|
+
content: [
|
|
174
|
+
{
|
|
175
|
+
type: 'text',
|
|
176
|
+
text: `Template "${slug}" not found. Valid slugs are: "ecommerce", "ecommerce-editorial", "saas-hotel". Use "list_templates" to inspect them.`,
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
return {
|
|
182
|
+
content: [
|
|
183
|
+
{
|
|
184
|
+
type: 'text',
|
|
185
|
+
text: JSON.stringify(template, null, 2),
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
|
|
192
|
+
// 7. get_design_tokens
|
|
193
|
+
server.tool(
|
|
194
|
+
'get_design_tokens',
|
|
195
|
+
'Get CSS design tokens, color palette, spacing scale, radii, and dark/light theme switching guide for Astro Components Kit.',
|
|
196
|
+
{},
|
|
197
|
+
async () => {
|
|
198
|
+
const tokens = getDesignTokens();
|
|
199
|
+
return {
|
|
200
|
+
content: [
|
|
201
|
+
{
|
|
202
|
+
type: 'text',
|
|
203
|
+
text: JSON.stringify(tokens, null, 2),
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
);
|
|
209
|
+
|
|
210
|
+
// 8. get_library_info
|
|
211
|
+
server.tool(
|
|
212
|
+
'get_library_info',
|
|
213
|
+
'Get general library overview: active version, total component count, npm install commands, and quickstart guide for Astro developers.',
|
|
214
|
+
{},
|
|
215
|
+
async () => {
|
|
216
|
+
const stats = getLibraryStats();
|
|
217
|
+
return {
|
|
218
|
+
content: [
|
|
219
|
+
{
|
|
220
|
+
type: 'text',
|
|
221
|
+
text: JSON.stringify(
|
|
222
|
+
{
|
|
223
|
+
...stats,
|
|
224
|
+
quickStart: {
|
|
225
|
+
install: 'npm install astro-component-kit',
|
|
226
|
+
cssImport: "import 'astro-component-kit/global.css';",
|
|
227
|
+
recommendedCategoryImports: [
|
|
228
|
+
"import { StoreProductCard, CartDrawer } from 'astro-component-kit/ecommerce';",
|
|
229
|
+
"import { DataTable, AppSidebar } from 'astro-component-kit/app';",
|
|
230
|
+
"import { LineChart, KpiStatTile } from 'astro-component-kit/charts';",
|
|
231
|
+
"import { GlassButton } from 'astro-component-kit/buttons';",
|
|
232
|
+
"import { FeatureBentoGrid } from 'astro-component-kit/sections';",
|
|
233
|
+
],
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
null,
|
|
237
|
+
2
|
|
238
|
+
),
|
|
239
|
+
},
|
|
240
|
+
],
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
);
|
|
244
|
+
|
|
245
|
+
return server;
|
|
246
|
+
}
|
|
247
|
+
|
package/src/mcp/types.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// src/mcp/types.ts
|
|
2
|
+
export interface ComponentSearchResult {
|
|
3
|
+
slug: string;
|
|
4
|
+
name: string;
|
|
5
|
+
category: string;
|
|
6
|
+
description: string;
|
|
7
|
+
tags: string[];
|
|
8
|
+
importPath: string;
|
|
9
|
+
featured: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ComponentDetail {
|
|
13
|
+
slug: string;
|
|
14
|
+
name: string;
|
|
15
|
+
category: string;
|
|
16
|
+
description: string;
|
|
17
|
+
tags: string[];
|
|
18
|
+
importStatement: string;
|
|
19
|
+
usageExample: string;
|
|
20
|
+
installationGuide?: string;
|
|
21
|
+
codeSnippet: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface CategorySummary {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
description: string;
|
|
28
|
+
count: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface TemplateSummary {
|
|
32
|
+
slug: string;
|
|
33
|
+
name: string;
|
|
34
|
+
tagline: string;
|
|
35
|
+
description: string;
|
|
36
|
+
tags: string[];
|
|
37
|
+
importPath: string;
|
|
38
|
+
previewUrl: string;
|
|
39
|
+
pageCount: number;
|
|
40
|
+
pages: Array<{ id: string; name: string; path: string; file: string }>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface LibraryStats {
|
|
44
|
+
name: string;
|
|
45
|
+
version: string;
|
|
46
|
+
description: string;
|
|
47
|
+
totalComponents: number;
|
|
48
|
+
totalCategories: number;
|
|
49
|
+
totalTemplates: number;
|
|
50
|
+
homepage: string;
|
|
51
|
+
npm: string;
|
|
52
|
+
categories: CategorySummary[];
|
|
53
|
+
}
|
package/src/styles/global.css
CHANGED
|
@@ -64,11 +64,54 @@
|
|
|
64
64
|
--r-xl: 28px;
|
|
65
65
|
--r-full: 9999px;
|
|
66
66
|
|
|
67
|
+
/* Theme helpers (used by e-commerce components and templates) */
|
|
68
|
+
--ink-rgb: 255 255 255; /* foreground for translucent lines/fills */
|
|
69
|
+
--paper-rgb: 5 5 5; /* background for translucent surfaces */
|
|
70
|
+
--c-on-primary: #050505; /* text on primary (gold) buttons */
|
|
71
|
+
--c-success: #34d399;
|
|
72
|
+
--c-danger: #f87171;
|
|
73
|
+
--c-warning: #fbbf24;
|
|
74
|
+
color-scheme: dark;
|
|
75
|
+
|
|
67
76
|
/* Sidebar */
|
|
68
77
|
--sidebar-w: 280px;
|
|
69
78
|
--header-h: 85px;
|
|
70
79
|
}
|
|
71
80
|
|
|
81
|
+
/* ── Light theme (opt-in: <html data-theme="light">) ──────── */
|
|
82
|
+
[data-theme='light'] {
|
|
83
|
+
--c-bg: #f6f5f2;
|
|
84
|
+
--c-bg-1: #ffffff;
|
|
85
|
+
--c-bg-2: #ecebe6;
|
|
86
|
+
--c-surface: rgba(17,17,17,0.025);
|
|
87
|
+
--c-border: rgba(17,17,17,0.09);
|
|
88
|
+
|
|
89
|
+
--c-primary: #8a6500;
|
|
90
|
+
--c-primary-light: #8a6500;
|
|
91
|
+
--c-primary-glow: rgba(138,101,0,0.12);
|
|
92
|
+
--c-accent: #5c4300;
|
|
93
|
+
|
|
94
|
+
--c-text-1: #121212;
|
|
95
|
+
--c-text-2: #4a4a4a;
|
|
96
|
+
--c-text-3: #666666;
|
|
97
|
+
|
|
98
|
+
--ink-rgb: 17 17 17;
|
|
99
|
+
--paper-rgb: 255 255 255;
|
|
100
|
+
--c-on-primary: #ffffff;
|
|
101
|
+
--c-success: #047857;
|
|
102
|
+
--c-danger: #b91c1c;
|
|
103
|
+
--c-warning: #92400e;
|
|
104
|
+
--pm-ink-s: 65%;
|
|
105
|
+
--pm-ink-l: 36%;
|
|
106
|
+
--pm-soft-s: 35%;
|
|
107
|
+
--pm-soft-l: 82%;
|
|
108
|
+
--pm-soft-a: 0.9;
|
|
109
|
+
--chart-grid: rgba(17,24,39,0.08);
|
|
110
|
+
--chart-axis: rgba(17,24,39,0.22);
|
|
111
|
+
--chart-surface: #ffffff;
|
|
112
|
+
color-scheme: light;
|
|
113
|
+
}
|
|
114
|
+
|
|
72
115
|
/* ── Base ────────────────────────────────────────────────── */
|
|
73
116
|
html {
|
|
74
117
|
font-family: var(--font-sans);
|
|
@@ -157,3 +200,55 @@ body::before {
|
|
|
157
200
|
.anim-delay-1 { animation-delay: 0.1s; }
|
|
158
201
|
.anim-delay-2 { animation-delay: 0.2s; }
|
|
159
202
|
.anim-delay-3 { animation-delay: 0.3s; }
|
|
203
|
+
|
|
204
|
+
/* ── Site header: keep every nav link on one line on tablets / small laptops ── */
|
|
205
|
+
@media (min-width: 769px) and (max-width: 1180px) {
|
|
206
|
+
#site-nav a { padding-inline: 0.55rem; font-size: 0.82rem; }
|
|
207
|
+
#site-nav .gh-link { font-size: 0; gap: 0; }
|
|
208
|
+
#site-nav .gh-link svg { width: 18px; height: 18px; }
|
|
209
|
+
}
|
|
210
|
+
@media (min-width: 769px) and (max-width: 960px) {
|
|
211
|
+
header .docs-header__brand .brand-logo { height: 46px; }
|
|
212
|
+
#site-nav { gap: 0; }
|
|
213
|
+
#site-nav a { padding-inline: 0.45rem; font-size: 0.78rem; }
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* ── Light theme adapters for shared components ──────────────
|
|
217
|
+
Scoped component styles assume a dark surface; these overrides
|
|
218
|
+
(:root[data-theme='light'] wins on specificity) keep them legible. */
|
|
219
|
+
:root[data-theme='light'] .badge--default { background: rgba(17,17,17,0.06); color: #3f3f3f; border-color: rgba(17,17,17,0.12); }
|
|
220
|
+
:root[data-theme='light'] .badge--success { background: rgba(4,120,87,0.1); color: #047857; border-color: rgba(4,120,87,0.25); }
|
|
221
|
+
:root[data-theme='light'] .badge--warning { background: rgba(146,64,14,0.1); color: #92400e; border-color: rgba(146,64,14,0.25); }
|
|
222
|
+
:root[data-theme='light'] .badge--danger { background: rgba(185,28,28,0.08); color: #b91c1c; border-color: rgba(185,28,28,0.22); }
|
|
223
|
+
:root[data-theme='light'] .badge--info { background: rgba(29,78,216,0.08); color: #1d4ed8; border-color: rgba(29,78,216,0.22); }
|
|
224
|
+
|
|
225
|
+
:root[data-theme='light'] .cns--glass .cns__box { background: #fff; border-color: rgba(17,17,17,0.08); box-shadow: 0 30px 60px -40px rgba(17,17,17,0.35); }
|
|
226
|
+
:root[data-theme='light'] .cns__icon { background: rgba(17,17,17,0.04); border-color: rgba(17,17,17,0.08); }
|
|
227
|
+
:root[data-theme='light'] .cns__input { background: #fff; border-color: rgba(17,17,17,0.18); }
|
|
228
|
+
:root[data-theme='light'] .cns__btn { background: #121212; color: #fff; }
|
|
229
|
+
:root[data-theme='light'] .cns__btn:hover { background: var(--c-primary); }
|
|
230
|
+
:root[data-theme='light'] .cns__perks svg { color: #047857; }
|
|
231
|
+
|
|
232
|
+
:root[data-theme='light'] .fms { background: var(--c-bg-1); border-top-color: rgba(17,17,17,0.08); }
|
|
233
|
+
:root[data-theme='light'] .fms__top { border-bottom-color: rgba(17,17,17,0.08); }
|
|
234
|
+
:root[data-theme='light'] .fms__news-field { background: #fff; border-color: rgba(17,17,17,0.16); }
|
|
235
|
+
:root[data-theme='light'] .fms__news-field button { background: rgba(17,17,17,0.05); }
|
|
236
|
+
:root[data-theme='light'] .fms__news-field button:hover { color: #fff; }
|
|
237
|
+
:root[data-theme='light'] .fms__status { border-color: rgba(17,17,17,0.1); }
|
|
238
|
+
|
|
239
|
+
:root[data-theme='light'] .logo-badge { background: #fff; border-color: rgba(17,17,17,0.08); }
|
|
240
|
+
:root[data-theme='light'] .step-nav__line { background: rgba(17,17,17,0.1); }
|
|
241
|
+
|
|
242
|
+
:root[data-theme='light'] .anim-input,
|
|
243
|
+
:root[data-theme='light'] .custom-select,
|
|
244
|
+
:root[data-theme='light'] .stepper { background: #fff; border-color: rgba(17,17,17,0.14); }
|
|
245
|
+
:root[data-theme='light'] .radio-circle { border-color: rgba(17,17,17,0.3); background: #fff; }
|
|
246
|
+
|
|
247
|
+
:root[data-theme='light'] .step-nav__circle { background: #fff; border-color: rgba(17,17,17,0.18); }
|
|
248
|
+
:root[data-theme='light'] .step-nav__item--complete .step-nav__circle { background: rgba(4,120,87,0.1); border-color: #047857; color: #047857; }
|
|
249
|
+
:root[data-theme='light'] .step-nav__item--active .step-nav__circle { color: #fff; background: var(--c-primary); border-color: var(--c-primary); box-shadow: none; }
|
|
250
|
+
:root[data-theme='light'] .status-feed__line { background: rgba(17,24,39,0.1); }
|
|
251
|
+
:root[data-theme='light'] .status-feed__bullet { background: var(--c-bg-1); border-color: rgba(17,24,39,0.16); }
|
|
252
|
+
:root[data-theme='light'] .status-feed__item--done .status-feed__bullet { background: rgba(4,120,87,0.1); border-color: #047857; color: #047857; }
|
|
253
|
+
:root[data-theme='light'] .status-feed__item--active .status-feed__bullet { background: var(--c-primary-glow); border-color: var(--c-primary-light); color: var(--c-primary-light); box-shadow: none; }
|
|
254
|
+
:root[data-theme='light'] .status-feed__content { background: var(--c-bg-1); border-color: rgba(17,24,39,0.08); }
|