@getcoherent/core 0.5.11 → 0.5.12

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/dist/index.d.ts CHANGED
@@ -1251,6 +1251,7 @@ type Features = z.infer<typeof FeaturesSchema>;
1251
1251
  * This is the single source of truth
1252
1252
  */
1253
1253
  declare const DesignSystemConfigSchema: z.ZodObject<{
1254
+ provider: z.ZodDefault<z.ZodEnum<["shadcn", "custom"]>>;
1254
1255
  version: z.ZodDefault<z.ZodString>;
1255
1256
  coherentVersion: z.ZodOptional<z.ZodString>;
1256
1257
  frameworkVersions: z.ZodOptional<z.ZodObject<{
@@ -2182,6 +2183,7 @@ declare const DesignSystemConfigSchema: z.ZodObject<{
2182
2183
  description: string;
2183
2184
  createdAt: string;
2184
2185
  updatedAt: string;
2186
+ provider: "custom" | "shadcn";
2185
2187
  version: string;
2186
2188
  tokens: {
2187
2189
  colors: {
@@ -2567,6 +2569,7 @@ declare const DesignSystemConfigSchema: z.ZodObject<{
2567
2569
  image?: string | undefined;
2568
2570
  } | undefined;
2569
2571
  } | undefined;
2572
+ provider?: "custom" | "shadcn" | undefined;
2570
2573
  version?: string | undefined;
2571
2574
  coherentVersion?: string | undefined;
2572
2575
  frameworkVersions?: {
@@ -2697,6 +2700,30 @@ declare const EXAMPLE_MULTIPAGE_CONFIG: DesignSystemConfig;
2697
2700
  */
2698
2701
  declare const EXAMPLE_SPA_CONFIG: DesignSystemConfig;
2699
2702
 
2703
+ interface ComponentMeta {
2704
+ id: string;
2705
+ name: string;
2706
+ category: 'form' | 'layout' | 'navigation' | 'feedback' | 'data-display' | 'overlay' | 'typography';
2707
+ managed: boolean;
2708
+ }
2709
+ interface ComponentAPI {
2710
+ name: string;
2711
+ subcomponents: string[];
2712
+ importPath: string;
2713
+ keyProps: Record<string, string>;
2714
+ usage: string;
2715
+ antiPatterns: string[];
2716
+ }
2717
+ interface ComponentProvider {
2718
+ id: string;
2719
+ init(projectRoot: string): Promise<void>;
2720
+ install(name: string, projectRoot: string): Promise<void>;
2721
+ list(): ComponentMeta[];
2722
+ getComponentAPI(name: string): ComponentAPI | null;
2723
+ getCssVariables(tokens: DesignTokens): string;
2724
+ getThemeBlock(tokens: DesignTokens): string;
2725
+ }
2726
+
2700
2727
  /**
2701
2728
  * Types for Epic 2: Shared Components manifest (coherent.components.json).
2702
2729
  * See docs/epic-2-shared-components.md.
@@ -4274,4 +4301,4 @@ interface AuditResult {
4274
4301
  */
4275
4302
  declare function runAudit(projectRoot: string): Promise<AuditResult>;
4276
4303
 
4277
- export { type AuditEntryResult, type AuditResult, type BlogContent, CLI_VERSION, type ChangelogContent, type ColorToken, ColorTokenSchema, type ComponentCriteria, type ComponentDefinition, ComponentDefinitionSchema, type ComponentDependency, ComponentGenerator, ComponentManager, type ComponentSize, ComponentSizeSchema, type ComponentSpec, type ComponentVariant, ComponentVariantSchema, type ContactContent, type CreateSharedComponentInput, type DashboardContent, type DesignSystemConfig, DesignSystemConfigSchema, DesignSystemGenerator, DesignSystemManager, type DesignTokens, DesignTokensSchema, type DiscoveryResult, EXAMPLE_MULTIPAGE_CONFIG, EXAMPLE_SPA_CONFIG, FIGMA_BASE_IDS, FRAMEWORK_VERSIONS, type FaqContent, type Features, FeaturesSchema, type FigmaBaseId, FigmaClient, type FigmaClientOptions, type FigmaColorStyle, type FigmaComponentData, type FigmaComponentMap, type FigmaComponentMeta, type FigmaDocumentNode, type FigmaEffectStyle, type FigmaFileResponse, type FigmaIntermediateData, type FigmaLayout, type FigmaNode, type FigmaNormalizationResult, type FigmaNormalizedEntry, type FigmaPageData, type FigmaProperty, type FigmaRgba, type FigmaStyleMeta, type FigmaTextStyle, type FigmaTokenExtractionResult, type FigmaVariant, type GalleryContent, type GenerateSharedComponentInput, type GenerateSharedComponentResult, type GeneratedPage, type LandingContent, type LayoutBlockDefinition, LayoutBlockDefinitionSchema, type ListingContent, type LoginContent, MANIFEST_FILENAME, type ModificationRequest, type ModificationResult, type Navigation, type NavigationItem, NavigationItemSchema, NavigationSchema, type OnboardingContent, type PageAnalysis, PageAnalysisSchema, type PageContent, type PageDefinition, PageDefinitionSchema, PageGenerator, type PageLayout, PageLayoutSchema, PageManager, type PageSection, PageSectionSchema, type PricingContent, type ProfileContent, ProjectScaffolder, type RadiusToken, RadiusTokenSchema, type RegisterContent, type SettingsContent, type SharedComponentEntry, SharedComponentEntrySchema, type SharedComponentType, SharedComponentTypeSchema, type SharedComponentsManifest, SharedComponentsManifestSchema, type SpacingToken, SpacingTokenSchema, TailwindConfigGenerator, type TemplateOptions, type TypographyToken, TypographyTokenSchema, allocateNextCid, atomicWriteFile, buildCssVariables, componentExists, createEntry, extractConfigObject, extractTokensFromFigma, figmaComponentNameToBaseId, figmaRgbaToHex, findSharedComponent, findSharedComponentByIdOrName, formatCid, generatePageFromFrame, generatePagesFromFigma, generateSharedComponent, generateSharedComponentTsx, getComponent, getManifestPath, getPage, getPageFilePath, getSupportedPageTypes, getTemplateForPageType, integrateSharedLayoutIntoRootLayout, loadManifest, mergeExtractedColorsWithDefaults, normalizeFigmaComponents, pageRouteExists, parseCid, parseFigmaFileResponse, removeEntry, resolveUniqueName, runAudit, saveManifest, setSharedMapping, toSharedFileName, updateEntry, updateUsedIn, validateConfig, validatePartialConfig };
4304
+ export { type AuditEntryResult, type AuditResult, type BlogContent, CLI_VERSION, type ChangelogContent, type ColorToken, ColorTokenSchema, type ComponentAPI, type ComponentCriteria, type ComponentDefinition, ComponentDefinitionSchema, type ComponentDependency, ComponentGenerator, ComponentManager, type ComponentMeta, type ComponentProvider, type ComponentSize, ComponentSizeSchema, type ComponentSpec, type ComponentVariant, ComponentVariantSchema, type ContactContent, type CreateSharedComponentInput, type DashboardContent, type DesignSystemConfig, DesignSystemConfigSchema, DesignSystemGenerator, DesignSystemManager, type DesignTokens, DesignTokensSchema, type DiscoveryResult, EXAMPLE_MULTIPAGE_CONFIG, EXAMPLE_SPA_CONFIG, FIGMA_BASE_IDS, FRAMEWORK_VERSIONS, type FaqContent, type Features, FeaturesSchema, type FigmaBaseId, FigmaClient, type FigmaClientOptions, type FigmaColorStyle, type FigmaComponentData, type FigmaComponentMap, type FigmaComponentMeta, type FigmaDocumentNode, type FigmaEffectStyle, type FigmaFileResponse, type FigmaIntermediateData, type FigmaLayout, type FigmaNode, type FigmaNormalizationResult, type FigmaNormalizedEntry, type FigmaPageData, type FigmaProperty, type FigmaRgba, type FigmaStyleMeta, type FigmaTextStyle, type FigmaTokenExtractionResult, type FigmaVariant, type GalleryContent, type GenerateSharedComponentInput, type GenerateSharedComponentResult, type GeneratedPage, type LandingContent, type LayoutBlockDefinition, LayoutBlockDefinitionSchema, type ListingContent, type LoginContent, MANIFEST_FILENAME, type ModificationRequest, type ModificationResult, type Navigation, type NavigationItem, NavigationItemSchema, NavigationSchema, type OnboardingContent, type PageAnalysis, PageAnalysisSchema, type PageContent, type PageDefinition, PageDefinitionSchema, PageGenerator, type PageLayout, PageLayoutSchema, PageManager, type PageSection, PageSectionSchema, type PricingContent, type ProfileContent, ProjectScaffolder, type RadiusToken, RadiusTokenSchema, type RegisterContent, type SettingsContent, type SharedComponentEntry, SharedComponentEntrySchema, type SharedComponentType, SharedComponentTypeSchema, type SharedComponentsManifest, SharedComponentsManifestSchema, type SpacingToken, SpacingTokenSchema, TailwindConfigGenerator, type TemplateOptions, type TypographyToken, TypographyTokenSchema, allocateNextCid, atomicWriteFile, buildCssVariables, componentExists, createEntry, extractConfigObject, extractTokensFromFigma, figmaComponentNameToBaseId, figmaRgbaToHex, findSharedComponent, findSharedComponentByIdOrName, formatCid, generatePageFromFrame, generatePagesFromFigma, generateSharedComponent, generateSharedComponentTsx, getComponent, getManifestPath, getPage, getPageFilePath, getSupportedPageTypes, getTemplateForPageType, integrateSharedLayoutIntoRootLayout, loadManifest, mergeExtractedColorsWithDefaults, normalizeFigmaComponents, pageRouteExists, parseCid, parseFigmaFileResponse, removeEntry, resolveUniqueName, runAudit, saveManifest, setSharedMapping, toSharedFileName, updateEntry, updateUsedIn, validateConfig, validatePartialConfig };
package/dist/index.js CHANGED
@@ -244,6 +244,8 @@ var FeaturesSchema = z.object({
244
244
  })
245
245
  });
246
246
  var DesignSystemConfigSchema = z.object({
247
+ // Component provider
248
+ provider: z.enum(["shadcn", "custom"]).default("shadcn"),
247
249
  // Metadata
248
250
  version: z.string().default("1.0.0"),
249
251
  coherentVersion: z.string().optional(),
@@ -314,6 +316,7 @@ function getPage(config, route) {
314
316
  return config.pages.find((p) => p.route === route);
315
317
  }
316
318
  var EXAMPLE_MULTIPAGE_CONFIG = {
319
+ provider: "shadcn",
317
320
  version: "1.0.0",
318
321
  name: "My Multi-page App",
319
322
  description: "A beautiful multi-page application",
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.5.11",
6
+ "version": "0.5.12",
7
7
  "description": "Core design system engine for Coherent",
8
8
  "type": "module",
9
9
  "main": "./dist/index.js",
@@ -32,6 +32,12 @@
32
32
  ],
33
33
  "author": "Coherent Design Method",
34
34
  "license": "MIT",
35
+ "scripts": {
36
+ "dev": "tsup --watch",
37
+ "build": "tsup",
38
+ "typecheck": "tsc --noEmit",
39
+ "test": "vitest"
40
+ },
35
41
  "dependencies": {
36
42
  "handlebars": "^4.7.8",
37
43
  "zod": "^3.22.4"
@@ -41,11 +47,5 @@
41
47
  "tsup": "^8.0.1",
42
48
  "typescript": "^5.3.3",
43
49
  "vitest": "^1.2.1"
44
- },
45
- "scripts": {
46
- "dev": "tsup --watch",
47
- "build": "tsup",
48
- "typecheck": "tsc --noEmit",
49
- "test": "vitest"
50
50
  }
51
- }
51
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Sergei Kovtun
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.