@getcoherent/core 0.5.5 → 0.5.7
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 +14 -1
- package/dist/index.js +167 -10
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3830,6 +3830,13 @@ interface FaqContent extends BasePageContent {
|
|
|
3830
3830
|
category?: string;
|
|
3831
3831
|
}>;
|
|
3832
3832
|
}
|
|
3833
|
+
interface LoginContent extends BasePageContent {
|
|
3834
|
+
forgotPasswordRoute?: string;
|
|
3835
|
+
registerRoute?: string;
|
|
3836
|
+
}
|
|
3837
|
+
interface RegisterContent extends BasePageContent {
|
|
3838
|
+
loginRoute?: string;
|
|
3839
|
+
}
|
|
3833
3840
|
interface ChangelogContent extends BasePageContent {
|
|
3834
3841
|
versions: Array<{
|
|
3835
3842
|
version: string;
|
|
@@ -3881,6 +3888,12 @@ type PageContent = {
|
|
|
3881
3888
|
} | {
|
|
3882
3889
|
pageType: 'changelog';
|
|
3883
3890
|
content: ChangelogContent;
|
|
3891
|
+
} | {
|
|
3892
|
+
pageType: 'login';
|
|
3893
|
+
content: LoginContent;
|
|
3894
|
+
} | {
|
|
3895
|
+
pageType: 'register';
|
|
3896
|
+
content: RegisterContent;
|
|
3884
3897
|
};
|
|
3885
3898
|
|
|
3886
3899
|
type TemplateFn = (content: any, options: TemplateOptions) => string;
|
|
@@ -4260,4 +4273,4 @@ interface AuditResult {
|
|
|
4260
4273
|
*/
|
|
4261
4274
|
declare function runAudit(projectRoot: string): Promise<AuditResult>;
|
|
4262
4275
|
|
|
4263
|
-
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, 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 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 };
|
|
4276
|
+
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 };
|
package/dist/index.js
CHANGED
|
@@ -6150,24 +6150,22 @@ export function Footer() {
|
|
|
6150
6150
|
return (
|
|
6151
6151
|
<footer className="border-t bg-muted/30">
|
|
6152
6152
|
<div className="mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8">
|
|
6153
|
-
<div className="
|
|
6154
|
-
<div className="
|
|
6153
|
+
<div className="grid grid-cols-2 gap-8 py-10 md:grid-cols-4">
|
|
6154
|
+
<div className="col-span-2 md:col-span-1">
|
|
6155
6155
|
<Link href="/" className="text-sm font-semibold text-foreground hover:text-foreground/90 transition-colors">
|
|
6156
6156
|
${appName}
|
|
6157
6157
|
</Link>
|
|
6158
|
-
<p className="text-sm text-muted-foreground
|
|
6158
|
+
<p className="mt-2 text-sm text-muted-foreground">
|
|
6159
6159
|
Modern project management for teams of all sizes.
|
|
6160
6160
|
</p>
|
|
6161
6161
|
</div>
|
|
6162
|
-
<div className="flex
|
|
6163
|
-
<
|
|
6164
|
-
<p className="text-sm font-medium text-foreground">Product</p>
|
|
6162
|
+
<div className="flex flex-col space-y-3">
|
|
6163
|
+
<p className="text-sm font-medium text-foreground">Product</p>
|
|
6165
6164
|
${linkElements}
|
|
6166
|
-
</div>
|
|
6167
|
-
${companyColumn}
|
|
6168
6165
|
</div>
|
|
6166
|
+
${companyColumn}
|
|
6169
6167
|
</div>
|
|
6170
|
-
<div className="flex items-center justify-between border-t py-
|
|
6168
|
+
<div className="flex items-center justify-between border-t py-6 text-xs text-muted-foreground">
|
|
6171
6169
|
<p>{'\xA9'} {new Date().getFullYear()} ${appName}. All rights reserved.</p>
|
|
6172
6170
|
<div className="flex gap-4">
|
|
6173
6171
|
<span>Privacy Policy</span>
|
|
@@ -8614,6 +8612,163 @@ ${versionBlocks}
|
|
|
8614
8612
|
`;
|
|
8615
8613
|
}
|
|
8616
8614
|
|
|
8615
|
+
// src/generators/templates/pages/login.ts
|
|
8616
|
+
function loginTemplate(content, options) {
|
|
8617
|
+
const { title, description, forgotPasswordRoute, registerRoute } = content;
|
|
8618
|
+
const { pageName } = options;
|
|
8619
|
+
return `"use client"
|
|
8620
|
+
|
|
8621
|
+
import { useState } from 'react'
|
|
8622
|
+
import Link from 'next/link'
|
|
8623
|
+
import { Button } from '@/components/ui/button'
|
|
8624
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
|
|
8625
|
+
import { Input } from '@/components/ui/input'
|
|
8626
|
+
import { Label } from '@/components/ui/label'
|
|
8627
|
+
|
|
8628
|
+
export default function ${pageName}() {
|
|
8629
|
+
const [email, setEmail] = useState('')
|
|
8630
|
+
const [password, setPassword] = useState('')
|
|
8631
|
+
|
|
8632
|
+
const handleSubmit = (e: React.FormEvent) => {
|
|
8633
|
+
e.preventDefault()
|
|
8634
|
+
}
|
|
8635
|
+
|
|
8636
|
+
return (
|
|
8637
|
+
<div className="${D.centeredForm}">
|
|
8638
|
+
<div className="${D.formContainer}">
|
|
8639
|
+
<Card>
|
|
8640
|
+
<CardHeader className="text-center">
|
|
8641
|
+
<CardTitle className="text-xl">${title}</CardTitle>
|
|
8642
|
+
<CardDescription>${description}</CardDescription>
|
|
8643
|
+
</CardHeader>
|
|
8644
|
+
<CardContent>
|
|
8645
|
+
<form onSubmit={handleSubmit} className="${D.formGap}">
|
|
8646
|
+
<div className="${D.fieldGroup}">
|
|
8647
|
+
<Label htmlFor="email">Email</Label>
|
|
8648
|
+
<Input
|
|
8649
|
+
id="email"
|
|
8650
|
+
type="email"
|
|
8651
|
+
placeholder="you@example.com"
|
|
8652
|
+
value={email}
|
|
8653
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
8654
|
+
required
|
|
8655
|
+
/>
|
|
8656
|
+
</div>
|
|
8657
|
+
<div className="${D.fieldGroup}">
|
|
8658
|
+
<div className="flex items-center justify-between">
|
|
8659
|
+
<Label htmlFor="password">Password</Label>
|
|
8660
|
+
<Link href="${forgotPasswordRoute || "/forgot-password"}" className="text-xs text-muted-foreground hover:text-foreground transition-colors">
|
|
8661
|
+
Forgot password?
|
|
8662
|
+
</Link>
|
|
8663
|
+
</div>
|
|
8664
|
+
<Input
|
|
8665
|
+
id="password"
|
|
8666
|
+
type="password"
|
|
8667
|
+
placeholder="\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"
|
|
8668
|
+
value={password}
|
|
8669
|
+
onChange={(e) => setPassword(e.target.value)}
|
|
8670
|
+
required
|
|
8671
|
+
/>
|
|
8672
|
+
</div>
|
|
8673
|
+
<Button type="submit" className="w-full">Sign in</Button>
|
|
8674
|
+
</form>
|
|
8675
|
+
<p className="mt-4 text-center text-sm text-muted-foreground">
|
|
8676
|
+
Don't have an account?{' '}
|
|
8677
|
+
<Link href="${registerRoute || "/register"}" className="text-foreground underline underline-offset-4 hover:text-foreground/80 transition-colors">
|
|
8678
|
+
Sign up
|
|
8679
|
+
</Link>
|
|
8680
|
+
</p>
|
|
8681
|
+
</CardContent>
|
|
8682
|
+
</Card>
|
|
8683
|
+
</div>
|
|
8684
|
+
</div>
|
|
8685
|
+
)
|
|
8686
|
+
}
|
|
8687
|
+
`;
|
|
8688
|
+
}
|
|
8689
|
+
|
|
8690
|
+
// src/generators/templates/pages/register.ts
|
|
8691
|
+
function registerTemplate(content, options) {
|
|
8692
|
+
const { title, description, loginRoute } = content;
|
|
8693
|
+
const { pageName } = options;
|
|
8694
|
+
return `"use client"
|
|
8695
|
+
|
|
8696
|
+
import { useState } from 'react'
|
|
8697
|
+
import Link from 'next/link'
|
|
8698
|
+
import { Button } from '@/components/ui/button'
|
|
8699
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
|
|
8700
|
+
import { Input } from '@/components/ui/input'
|
|
8701
|
+
import { Label } from '@/components/ui/label'
|
|
8702
|
+
|
|
8703
|
+
export default function ${pageName}() {
|
|
8704
|
+
const [name, setName] = useState('')
|
|
8705
|
+
const [email, setEmail] = useState('')
|
|
8706
|
+
const [password, setPassword] = useState('')
|
|
8707
|
+
|
|
8708
|
+
const handleSubmit = (e: React.FormEvent) => {
|
|
8709
|
+
e.preventDefault()
|
|
8710
|
+
}
|
|
8711
|
+
|
|
8712
|
+
return (
|
|
8713
|
+
<div className="${D.centeredForm}">
|
|
8714
|
+
<div className="${D.formContainer}">
|
|
8715
|
+
<Card>
|
|
8716
|
+
<CardHeader className="text-center">
|
|
8717
|
+
<CardTitle className="text-xl">${title}</CardTitle>
|
|
8718
|
+
<CardDescription>${description}</CardDescription>
|
|
8719
|
+
</CardHeader>
|
|
8720
|
+
<CardContent>
|
|
8721
|
+
<form onSubmit={handleSubmit} className="${D.formGap}">
|
|
8722
|
+
<div className="${D.fieldGroup}">
|
|
8723
|
+
<Label htmlFor="name">Name</Label>
|
|
8724
|
+
<Input
|
|
8725
|
+
id="name"
|
|
8726
|
+
type="text"
|
|
8727
|
+
placeholder="Your name"
|
|
8728
|
+
value={name}
|
|
8729
|
+
onChange={(e) => setName(e.target.value)}
|
|
8730
|
+
required
|
|
8731
|
+
/>
|
|
8732
|
+
</div>
|
|
8733
|
+
<div className="${D.fieldGroup}">
|
|
8734
|
+
<Label htmlFor="email">Email</Label>
|
|
8735
|
+
<Input
|
|
8736
|
+
id="email"
|
|
8737
|
+
type="email"
|
|
8738
|
+
placeholder="you@example.com"
|
|
8739
|
+
value={email}
|
|
8740
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
8741
|
+
required
|
|
8742
|
+
/>
|
|
8743
|
+
</div>
|
|
8744
|
+
<div className="${D.fieldGroup}">
|
|
8745
|
+
<Label htmlFor="password">Password</Label>
|
|
8746
|
+
<Input
|
|
8747
|
+
id="password"
|
|
8748
|
+
type="password"
|
|
8749
|
+
placeholder="\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"
|
|
8750
|
+
value={password}
|
|
8751
|
+
onChange={(e) => setPassword(e.target.value)}
|
|
8752
|
+
required
|
|
8753
|
+
/>
|
|
8754
|
+
</div>
|
|
8755
|
+
<Button type="submit" className="w-full">Create account</Button>
|
|
8756
|
+
</form>
|
|
8757
|
+
<p className="mt-4 text-center text-sm text-muted-foreground">
|
|
8758
|
+
Already have an account?{' '}
|
|
8759
|
+
<Link href="${loginRoute || "/login"}" className="text-foreground underline underline-offset-4 hover:text-foreground/80 transition-colors">
|
|
8760
|
+
Sign in
|
|
8761
|
+
</Link>
|
|
8762
|
+
</p>
|
|
8763
|
+
</CardContent>
|
|
8764
|
+
</Card>
|
|
8765
|
+
</div>
|
|
8766
|
+
</div>
|
|
8767
|
+
)
|
|
8768
|
+
}
|
|
8769
|
+
`;
|
|
8770
|
+
}
|
|
8771
|
+
|
|
8617
8772
|
// src/generators/templates/pages/index.ts
|
|
8618
8773
|
var TEMPLATE_REGISTRY = {
|
|
8619
8774
|
dashboard: dashboardTemplate,
|
|
@@ -8627,7 +8782,9 @@ var TEMPLATE_REGISTRY = {
|
|
|
8627
8782
|
onboarding: onboardingTemplate,
|
|
8628
8783
|
gallery: galleryTemplate,
|
|
8629
8784
|
faq: faqTemplate,
|
|
8630
|
-
changelog: changelogTemplate
|
|
8785
|
+
changelog: changelogTemplate,
|
|
8786
|
+
login: loginTemplate,
|
|
8787
|
+
register: registerTemplate
|
|
8631
8788
|
};
|
|
8632
8789
|
function getTemplateForPageType(pageType) {
|
|
8633
8790
|
return TEMPLATE_REGISTRY[pageType] ?? null;
|