@forgespace/siza-gen 0.2.0 → 0.3.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 +2 -0
- package/dist/index.d.ts +56 -1
- package/dist/index.js +139 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2110,6 +2110,61 @@ declare class DesignContextStore {
|
|
|
2110
2110
|
}
|
|
2111
2111
|
declare const designContextStore: DesignContextStore;
|
|
2112
2112
|
|
|
2113
|
+
interface BrandIdentityInput {
|
|
2114
|
+
colors: {
|
|
2115
|
+
primary: {
|
|
2116
|
+
hex: string;
|
|
2117
|
+
};
|
|
2118
|
+
secondary: {
|
|
2119
|
+
hex: string;
|
|
2120
|
+
};
|
|
2121
|
+
accent: {
|
|
2122
|
+
hex: string;
|
|
2123
|
+
};
|
|
2124
|
+
neutral: Array<{
|
|
2125
|
+
hex: string;
|
|
2126
|
+
}>;
|
|
2127
|
+
semantic: {
|
|
2128
|
+
success: {
|
|
2129
|
+
hex: string;
|
|
2130
|
+
};
|
|
2131
|
+
warning: {
|
|
2132
|
+
hex: string;
|
|
2133
|
+
};
|
|
2134
|
+
error: {
|
|
2135
|
+
hex: string;
|
|
2136
|
+
};
|
|
2137
|
+
info: {
|
|
2138
|
+
hex: string;
|
|
2139
|
+
};
|
|
2140
|
+
};
|
|
2141
|
+
};
|
|
2142
|
+
typography: {
|
|
2143
|
+
headingFont: string;
|
|
2144
|
+
bodyFont: string;
|
|
2145
|
+
baseSize: number;
|
|
2146
|
+
steps: Array<{
|
|
2147
|
+
name: string;
|
|
2148
|
+
size: string;
|
|
2149
|
+
lineHeight: string;
|
|
2150
|
+
weight: number;
|
|
2151
|
+
}>;
|
|
2152
|
+
};
|
|
2153
|
+
spacing: {
|
|
2154
|
+
unit: number;
|
|
2155
|
+
values: Record<string, string>;
|
|
2156
|
+
};
|
|
2157
|
+
shadows?: {
|
|
2158
|
+
levels: Record<string, {
|
|
2159
|
+
cssValue: string;
|
|
2160
|
+
}>;
|
|
2161
|
+
};
|
|
2162
|
+
borders?: {
|
|
2163
|
+
radii: Record<string, string>;
|
|
2164
|
+
};
|
|
2165
|
+
}
|
|
2166
|
+
declare function brandToDesignContext(brand: BrandIdentityInput): Partial<IDesignContext>;
|
|
2167
|
+
|
|
2113
2168
|
/**
|
|
2114
2169
|
* Component Libraries Integration
|
|
2115
2170
|
*
|
|
@@ -2366,4 +2421,4 @@ declare function isNetworkError(error: unknown): boolean;
|
|
|
2366
2421
|
*/
|
|
2367
2422
|
declare function retry<T>(fn: () => Promise<T>, maxAttempts?: number, delay?: number): Promise<T>;
|
|
2368
2423
|
|
|
2369
|
-
export { ANIMATION_PRESETS, type AdapterType, AngularGenerator, type AppType, type Architecture, type ArtifactType, type BackendCategory, type BackendFramework, BaseGenerator, COLOR_SYSTEMS, COMPONENT_LIBRARIES, type ComponentCategory, type ComponentLibrary, type ComponentLibraryId, type ComponentLibraryIntegration, type ComponentLibrarySetupOptions, type Config, DEFAULT_COLOR_SYSTEM, DEFAULT_CONTEXT, DEFAULT_DESIGN_CONTEXT, DEFAULT_FONT_PAIRING, DEFAULT_LORA_CONFIG, DEFAULT_PRESET, type DeployTarget, FONT_PAIRINGS, type Framework, GeneratorFactory, HtmlGenerator, type IAccessibilityIssue, type IAccessibilityReport, type IArtifactQuery, type IBackendSnippet, ICON_LIBRARIES, type ICodePattern, type IComponentLibrary, type IComponentQuery, type IComponentSnippet, type IComponentStructure, type IConfigFile, type IDesignAnalysisResult, type IDesignContext, type IDirectoryStructure, type IEmbedding, type IEmbeddingConfig, type IEnhancedPrompt, type IEnhancementContext, type IExplicitFeedbackInput, type IFeedback, type IFigmaDesignToken, type IFigmaVariable, type IGeneratedArtifact, type IGeneratedFile, type IGeneration, type IImageAnalysis, type IImplicitSignal, type ILearningStats, type ILoRAConfig, type IModelPaths, INSPIRATION_SOURCES, type IPatternMatch, type IPresetConfig, type IProjectTemplate, type IPromptClassification, type IQualityScore, type IScaffoldOptions, type IScrapedPage, type IScreenElement, type ISearchResult, type ISimilarityResult, type IStyleContext, type IStyleRecommendation, type ITailwindMapping, type ITemplateSelectionCriteria, type ITrainingExample, type ITrainingStatus, type ITransition, type IValidationResult, type ImageType, type IndustryTag, LAYOUT_PATTERNS, type ModelId, type MoodTag, PRESETS, type PageTemplateType, type ProjectType, ReactGenerator, SPACING_SYSTEM, type Scale, type StateManagement$1 as StateManagement, SvelteGenerator, TYPE_SCALE, type VisualStyleId, VueGenerator, applyVisualStyle, buildPromptEnhancerData, buildQualityScorerData, buildStyleRecommenderData, cancelTrainingJob, capitalize, checkTrainingReadiness, classifyPromptPair, classifyPromptText, cleanJsxSyntax, clearAllMicroInteractions, clearCompositions, clearHistory as clearDiversityHistory, clearRegistry, clearSessionCache, closeDatabase, composePageFromTemplate, composeSection, configureEmbeddings, configureModelDir, convertPathForFramework, convertStyleObjectToString, cosineSimilarity, createEmbedding, createError, createLogger, createTrainingJob, customizeTemplate, deleteArtifact, deleteEmbeddings, designContextStore, embed, embedBatch, enhancePrompt, enhancePromptWithRAG, enhanceWithRules, ensureDirectories, ensurePatternsTable, escapeHtml, exportForAdapter, exportRawExamples, exportTrainingData, expressApiTemplate, extractDesignPatterns, extractSkeleton, feedbackBoostedSearch, findBestComposition, findSimilar, fingerprint, fullstackMonoTemplate, generateArtifactId, generateComponent, generateComponentFromLibrary, generateRandomId, getAdapterPath, getAggregateScore, getAllCompositions, getAllInteractions, getAllJobStatuses, getAllPacks, getAllSnippets, getAllTemplates, getAnimationsByCategory, getArtifact, getArtifactCount, getAvailableComponentLibraries, getAvailableComponentsForLibrary, getAvailablePatternsForLibrary, getAvailableTypes, getBaseDir, getBestMatch, getBestMatchWithFeedback, getByCategory, getByIndustry, getByMood, getColorSystem, getColorSystemsByMood, getComponentLibrariesForFramework, getComponentLibrary, getComposition, getConfig, getDatabase, getDefaultIconLibrary, getDiskUsage, getEmbedding, getEmbeddingConfig, getEmbeddingCount, getFallbackDesignReference, getFeedbackBoost, getFeedbackCount, getFeedbackStats, getFileExtension, getFileName, getFontPairing, getFontPairingsByMood, getInspirationByCategory, getInspirationByPriority, getInteractionsByCategory, getLatestJobStatus, getLayoutPattern, getLayoutPatternsByUseCase, getLearningStats, getMicroInteraction, getModelDownloadUrl, getModelPath, getModelPaths, getPack, getPatternStats, getPreset, getPrimaryDesignReference, getPromotablePatternsFromDb, getPromotionCandidates, getRecentArtifacts, getRecommendations, getRecommendedLibrary, getRegistrySize, getSimilarArtifacts, getSnippetById, getTemplate, getTopArtifacts, getTrainingDataPath, getTrainingSummary, getVariants, groupBy, hasEnoughData, hashSkeleton, htmlToJsxAttributes, includesCaseInsensitive, initializeBackendRegistry, initializeInteractions, initializeRegistry, injectAnimations, isAdapterAvailable, isArray, isDuplicateConsecutive, isFunction, isLikelyAccepted, isModelAvailable, isModelLoaded, isNetworkError, isNumber, isObject, isPromotable, isString, isTraining, isValidComponentName, isValidEmail, isValidHexColor, isValidProjectName, isValidUrl, jsxToHtml, jsxToHtmlAttributes, jsxToSvelte, listAdapters, listModels, listPresets, loadConfig, loadEmbeddings, logger, mergeStyles, needsEnhancement, nextAppTemplate, nextSaasTemplate, parseStyleString, pluralize, promotePattern, queryArtifacts, reactEventsToHtml, reactEventsToSvelte, reactSpaTemplate, recommendStyle, recordGeneration as recordDiversityGeneration, recordExplicitFeedback, recordGeneratedArtifact, recordGeneration$1 as recordGeneration, recordPattern, reduxToolkitPattern as reduxToolkitPatterns, registerComposition, registerInteraction, registerInteractions, registerPack, registerSnippet, registerSnippets, resetSchemaInit, retry, runPromotionCycle, safeJSONParse, sanitizeClassName, scoreQuality, scoreQualityWithRAG, searchBackendSnippets, searchComponents, searchPacks, selectTemplate, semanticSearch, setupComponentLibraryProject, sortBy, startTrainingJob, stateManagementPatterns, storeArtifact, storeDesignLearning, storeEmbedding, storeEmbeddings, suggestDiverseVariant, tanstackQueryPattern as tanstackQueryPatterns, templateList, templates, toCamelCase, toKebabCase, toPascalCase, toSnakeCase, triggerPatternPromotion, truncate, unique, unloadModel, updateFeedbackScore, updateJobStatus, updateQualityScore, validateSnippet, validateSnippetStrict, writeJsonl, zustandPatterns };
|
|
2424
|
+
export { ANIMATION_PRESETS, type AdapterType, AngularGenerator, type AppType, type Architecture, type ArtifactType, type BackendCategory, type BackendFramework, BaseGenerator, type BrandIdentityInput, COLOR_SYSTEMS, COMPONENT_LIBRARIES, type ComponentCategory, type ComponentLibrary, type ComponentLibraryId, type ComponentLibraryIntegration, type ComponentLibrarySetupOptions, type Config, DEFAULT_COLOR_SYSTEM, DEFAULT_CONTEXT, DEFAULT_DESIGN_CONTEXT, DEFAULT_FONT_PAIRING, DEFAULT_LORA_CONFIG, DEFAULT_PRESET, type DeployTarget, FONT_PAIRINGS, type Framework, GeneratorFactory, HtmlGenerator, type IAccessibilityIssue, type IAccessibilityReport, type IArtifactQuery, type IBackendSnippet, ICON_LIBRARIES, type ICodePattern, type IComponentLibrary, type IComponentQuery, type IComponentSnippet, type IComponentStructure, type IConfigFile, type IDesignAnalysisResult, type IDesignContext, type IDirectoryStructure, type IEmbedding, type IEmbeddingConfig, type IEnhancedPrompt, type IEnhancementContext, type IExplicitFeedbackInput, type IFeedback, type IFigmaDesignToken, type IFigmaVariable, type IGeneratedArtifact, type IGeneratedFile, type IGeneration, type IImageAnalysis, type IImplicitSignal, type ILearningStats, type ILoRAConfig, type IModelPaths, INSPIRATION_SOURCES, type IPatternMatch, type IPresetConfig, type IProjectTemplate, type IPromptClassification, type IQualityScore, type IScaffoldOptions, type IScrapedPage, type IScreenElement, type ISearchResult, type ISimilarityResult, type IStyleContext, type IStyleRecommendation, type ITailwindMapping, type ITemplateSelectionCriteria, type ITrainingExample, type ITrainingStatus, type ITransition, type IValidationResult, type ImageType, type IndustryTag, LAYOUT_PATTERNS, type ModelId, type MoodTag, PRESETS, type PageTemplateType, type ProjectType, ReactGenerator, SPACING_SYSTEM, type Scale, type StateManagement$1 as StateManagement, SvelteGenerator, TYPE_SCALE, type VisualStyleId, VueGenerator, applyVisualStyle, brandToDesignContext, buildPromptEnhancerData, buildQualityScorerData, buildStyleRecommenderData, cancelTrainingJob, capitalize, checkTrainingReadiness, classifyPromptPair, classifyPromptText, cleanJsxSyntax, clearAllMicroInteractions, clearCompositions, clearHistory as clearDiversityHistory, clearRegistry, clearSessionCache, closeDatabase, composePageFromTemplate, composeSection, configureEmbeddings, configureModelDir, convertPathForFramework, convertStyleObjectToString, cosineSimilarity, createEmbedding, createError, createLogger, createTrainingJob, customizeTemplate, deleteArtifact, deleteEmbeddings, designContextStore, embed, embedBatch, enhancePrompt, enhancePromptWithRAG, enhanceWithRules, ensureDirectories, ensurePatternsTable, escapeHtml, exportForAdapter, exportRawExamples, exportTrainingData, expressApiTemplate, extractDesignPatterns, extractSkeleton, feedbackBoostedSearch, findBestComposition, findSimilar, fingerprint, fullstackMonoTemplate, generateArtifactId, generateComponent, generateComponentFromLibrary, generateRandomId, getAdapterPath, getAggregateScore, getAllCompositions, getAllInteractions, getAllJobStatuses, getAllPacks, getAllSnippets, getAllTemplates, getAnimationsByCategory, getArtifact, getArtifactCount, getAvailableComponentLibraries, getAvailableComponentsForLibrary, getAvailablePatternsForLibrary, getAvailableTypes, getBaseDir, getBestMatch, getBestMatchWithFeedback, getByCategory, getByIndustry, getByMood, getColorSystem, getColorSystemsByMood, getComponentLibrariesForFramework, getComponentLibrary, getComposition, getConfig, getDatabase, getDefaultIconLibrary, getDiskUsage, getEmbedding, getEmbeddingConfig, getEmbeddingCount, getFallbackDesignReference, getFeedbackBoost, getFeedbackCount, getFeedbackStats, getFileExtension, getFileName, getFontPairing, getFontPairingsByMood, getInspirationByCategory, getInspirationByPriority, getInteractionsByCategory, getLatestJobStatus, getLayoutPattern, getLayoutPatternsByUseCase, getLearningStats, getMicroInteraction, getModelDownloadUrl, getModelPath, getModelPaths, getPack, getPatternStats, getPreset, getPrimaryDesignReference, getPromotablePatternsFromDb, getPromotionCandidates, getRecentArtifacts, getRecommendations, getRecommendedLibrary, getRegistrySize, getSimilarArtifacts, getSnippetById, getTemplate, getTopArtifacts, getTrainingDataPath, getTrainingSummary, getVariants, groupBy, hasEnoughData, hashSkeleton, htmlToJsxAttributes, includesCaseInsensitive, initializeBackendRegistry, initializeInteractions, initializeRegistry, injectAnimations, isAdapterAvailable, isArray, isDuplicateConsecutive, isFunction, isLikelyAccepted, isModelAvailable, isModelLoaded, isNetworkError, isNumber, isObject, isPromotable, isString, isTraining, isValidComponentName, isValidEmail, isValidHexColor, isValidProjectName, isValidUrl, jsxToHtml, jsxToHtmlAttributes, jsxToSvelte, listAdapters, listModels, listPresets, loadConfig, loadEmbeddings, logger, mergeStyles, needsEnhancement, nextAppTemplate, nextSaasTemplate, parseStyleString, pluralize, promotePattern, queryArtifacts, reactEventsToHtml, reactEventsToSvelte, reactSpaTemplate, recommendStyle, recordGeneration as recordDiversityGeneration, recordExplicitFeedback, recordGeneratedArtifact, recordGeneration$1 as recordGeneration, recordPattern, reduxToolkitPattern as reduxToolkitPatterns, registerComposition, registerInteraction, registerInteractions, registerPack, registerSnippet, registerSnippets, resetSchemaInit, retry, runPromotionCycle, safeJSONParse, sanitizeClassName, scoreQuality, scoreQualityWithRAG, searchBackendSnippets, searchComponents, searchPacks, selectTemplate, semanticSearch, setupComponentLibraryProject, sortBy, startTrainingJob, stateManagementPatterns, storeArtifact, storeDesignLearning, storeEmbedding, storeEmbeddings, suggestDiverseVariant, tanstackQueryPattern as tanstackQueryPatterns, templateList, templates, toCamelCase, toKebabCase, toPascalCase, toSnakeCase, triggerPatternPromotion, truncate, unique, unloadModel, updateFeedbackScore, updateJobStatus, updateQualityScore, validateSnippet, validateSnippetStrict, writeJsonl, zustandPatterns };
|
package/dist/index.js
CHANGED
|
@@ -38763,6 +38763,144 @@ var DesignContextStore = class {
|
|
|
38763
38763
|
};
|
|
38764
38764
|
var designContextStore = new DesignContextStore();
|
|
38765
38765
|
|
|
38766
|
+
// src/brand-identity-transform.ts
|
|
38767
|
+
function hexToRgb(hex) {
|
|
38768
|
+
const h = hex.replace("#", "");
|
|
38769
|
+
return [parseInt(h.slice(0, 2), 16), parseInt(h.slice(2, 4), 16), parseInt(h.slice(4, 6), 16)];
|
|
38770
|
+
}
|
|
38771
|
+
function perceivedBrightness(hex) {
|
|
38772
|
+
const [r, g, b] = hexToRgb(hex);
|
|
38773
|
+
return (0.299 * r + 0.587 * g + 0.114 * b) / 255;
|
|
38774
|
+
}
|
|
38775
|
+
function contrastForeground(hex) {
|
|
38776
|
+
return perceivedBrightness(hex) > 0.5 ? "#000000" : "#ffffff";
|
|
38777
|
+
}
|
|
38778
|
+
function pickNeutral(neutrals, index) {
|
|
38779
|
+
const clamped = Math.min(index, neutrals.length - 1);
|
|
38780
|
+
return neutrals[clamped]?.hex ?? "#888888";
|
|
38781
|
+
}
|
|
38782
|
+
var STEP_TO_KEY = {
|
|
38783
|
+
xs: "xs",
|
|
38784
|
+
sm: "sm",
|
|
38785
|
+
base: "base",
|
|
38786
|
+
md: "base",
|
|
38787
|
+
lg: "lg",
|
|
38788
|
+
xl: "xl",
|
|
38789
|
+
"2xl": "2xl",
|
|
38790
|
+
"3xl": "3xl"
|
|
38791
|
+
};
|
|
38792
|
+
function mapFontSizes(steps) {
|
|
38793
|
+
const result = {
|
|
38794
|
+
xs: "0.75rem",
|
|
38795
|
+
sm: "0.875rem",
|
|
38796
|
+
base: "1rem",
|
|
38797
|
+
lg: "1.125rem",
|
|
38798
|
+
xl: "1.25rem",
|
|
38799
|
+
"2xl": "1.5rem",
|
|
38800
|
+
"3xl": "1.875rem"
|
|
38801
|
+
};
|
|
38802
|
+
for (const step of steps) {
|
|
38803
|
+
const key = STEP_TO_KEY[step.name.toLowerCase()];
|
|
38804
|
+
if (key) result[key] = step.size;
|
|
38805
|
+
}
|
|
38806
|
+
return result;
|
|
38807
|
+
}
|
|
38808
|
+
function categorizeLineHeight(value) {
|
|
38809
|
+
const num = parseFloat(value);
|
|
38810
|
+
if (isNaN(num)) return "normal";
|
|
38811
|
+
if (num < 1.3) return "tight";
|
|
38812
|
+
if (num > 1.6) return "relaxed";
|
|
38813
|
+
return "normal";
|
|
38814
|
+
}
|
|
38815
|
+
function mapLineHeights(steps) {
|
|
38816
|
+
const lh = {
|
|
38817
|
+
tight: "1.25",
|
|
38818
|
+
normal: "1.5",
|
|
38819
|
+
relaxed: "1.75"
|
|
38820
|
+
};
|
|
38821
|
+
for (const step of steps) {
|
|
38822
|
+
const cat = categorizeLineHeight(step.lineHeight);
|
|
38823
|
+
lh[cat] = step.lineHeight;
|
|
38824
|
+
}
|
|
38825
|
+
return lh;
|
|
38826
|
+
}
|
|
38827
|
+
function parseSpacingScale(values) {
|
|
38828
|
+
return Object.values(values).map((v) => parseFloat(v)).filter((n) => !isNaN(n)).sort((a, b) => a - b);
|
|
38829
|
+
}
|
|
38830
|
+
function mapColors(colors) {
|
|
38831
|
+
const n = colors.neutral;
|
|
38832
|
+
const last = n.length - 1;
|
|
38833
|
+
const mid = Math.floor(last / 2);
|
|
38834
|
+
const midLight = Math.floor(last * 0.7);
|
|
38835
|
+
return {
|
|
38836
|
+
primary: colors.primary.hex,
|
|
38837
|
+
primaryForeground: contrastForeground(colors.primary.hex),
|
|
38838
|
+
secondary: colors.secondary.hex,
|
|
38839
|
+
secondaryForeground: contrastForeground(colors.secondary.hex),
|
|
38840
|
+
accent: colors.accent.hex,
|
|
38841
|
+
accentForeground: contrastForeground(colors.accent.hex),
|
|
38842
|
+
background: pickNeutral(n, last),
|
|
38843
|
+
foreground: pickNeutral(n, 0),
|
|
38844
|
+
muted: pickNeutral(n, mid),
|
|
38845
|
+
mutedForeground: pickNeutral(n, 0),
|
|
38846
|
+
border: pickNeutral(n, midLight),
|
|
38847
|
+
destructive: colors.semantic.error.hex,
|
|
38848
|
+
destructiveForeground: contrastForeground(colors.semantic.error.hex)
|
|
38849
|
+
};
|
|
38850
|
+
}
|
|
38851
|
+
function mapShadows(levels) {
|
|
38852
|
+
const sm = levels["sm"]?.cssValue;
|
|
38853
|
+
const md = levels["md"]?.cssValue;
|
|
38854
|
+
const lg = levels["lg"]?.cssValue;
|
|
38855
|
+
if (!sm && !md && !lg) return void 0;
|
|
38856
|
+
return {
|
|
38857
|
+
sm: sm ?? "0 1px 2px rgba(0,0,0,0.05)",
|
|
38858
|
+
md: md ?? "0 4px 6px rgba(0,0,0,0.1)",
|
|
38859
|
+
lg: lg ?? "0 10px 15px rgba(0,0,0,0.1)"
|
|
38860
|
+
};
|
|
38861
|
+
}
|
|
38862
|
+
function mapBorderRadius(radii) {
|
|
38863
|
+
if (!radii["sm"] && !radii["md"] && !radii["lg"]) {
|
|
38864
|
+
return void 0;
|
|
38865
|
+
}
|
|
38866
|
+
return {
|
|
38867
|
+
sm: radii["sm"] ?? "0.125rem",
|
|
38868
|
+
md: radii["md"] ?? "0.375rem",
|
|
38869
|
+
lg: radii["lg"] ?? "0.5rem",
|
|
38870
|
+
full: radii["full"] ?? "9999px"
|
|
38871
|
+
};
|
|
38872
|
+
}
|
|
38873
|
+
function brandToDesignContext(brand) {
|
|
38874
|
+
const result = {
|
|
38875
|
+
colorPalette: mapColors(brand.colors),
|
|
38876
|
+
typography: {
|
|
38877
|
+
fontFamily: brand.typography.bodyFont,
|
|
38878
|
+
headingFont: brand.typography.headingFont,
|
|
38879
|
+
fontSize: mapFontSizes(brand.typography.steps),
|
|
38880
|
+
fontWeight: {
|
|
38881
|
+
normal: "400",
|
|
38882
|
+
medium: "500",
|
|
38883
|
+
semibold: "600",
|
|
38884
|
+
bold: "700"
|
|
38885
|
+
},
|
|
38886
|
+
lineHeight: mapLineHeights(brand.typography.steps)
|
|
38887
|
+
},
|
|
38888
|
+
spacing: {
|
|
38889
|
+
unit: brand.spacing.unit,
|
|
38890
|
+
scale: parseSpacingScale(brand.spacing.values)
|
|
38891
|
+
}
|
|
38892
|
+
};
|
|
38893
|
+
if (brand.shadows?.levels) {
|
|
38894
|
+
const shadows = mapShadows(brand.shadows.levels);
|
|
38895
|
+
if (shadows) result.shadows = shadows;
|
|
38896
|
+
}
|
|
38897
|
+
if (brand.borders?.radii) {
|
|
38898
|
+
const radii = mapBorderRadius(brand.borders.radii);
|
|
38899
|
+
if (radii) result.borderRadius = radii;
|
|
38900
|
+
}
|
|
38901
|
+
return result;
|
|
38902
|
+
}
|
|
38903
|
+
|
|
38766
38904
|
// src/component-libraries/shadcn/templates.ts
|
|
38767
38905
|
var buttonTemplate = {
|
|
38768
38906
|
name: "Button",
|
|
@@ -41796,6 +41934,6 @@ async function retry(fn, maxAttempts = 3, delay = 1e3) {
|
|
|
41796
41934
|
throw lastError;
|
|
41797
41935
|
}
|
|
41798
41936
|
|
|
41799
|
-
export { ANIMATION_PRESETS, AngularGenerator, BaseGenerator, COLOR_SYSTEMS, COMPONENT_LIBRARIES, DEFAULT_COLOR_SYSTEM, DEFAULT_CONTEXT, DEFAULT_DESIGN_CONTEXT, DEFAULT_FONT_PAIRING, DEFAULT_LORA_CONFIG, DEFAULT_PRESET, FONT_PAIRINGS, GeneratorFactory, HtmlGenerator, ICON_LIBRARIES, INSPIRATION_SOURCES, LAYOUT_PATTERNS, PRESETS, ReactGenerator, SPACING_SYSTEM, SvelteGenerator, TYPE_SCALE, VueGenerator, applyVisualStyle2 as applyVisualStyle, buildPromptEnhancerData, buildQualityScorerData, buildStyleRecommenderData, cancelTrainingJob, capitalize, checkTrainingReadiness, classifyPromptPair, classifyPromptText, cleanJsxSyntax, clearAllMicroInteractions, clearCompositions, clearHistory as clearDiversityHistory, clearRegistry, clearSessionCache, closeDatabase, composePageFromTemplate, composeSection, configureEmbeddings, configureModelDir, convertPathForFramework, convertStyleObjectToString, cosineSimilarity, createEmbedding, createError, createLogger, createTrainingJob, customizeTemplate, deleteArtifact, deleteEmbeddings, designContextStore, embed, embedBatch, enhancePrompt, enhancePromptWithRAG, enhanceWithRules, ensureDirectories, ensurePatternsTable, escapeHtml, exportForAdapter, exportRawExamples, exportTrainingData, expressApiTemplate, extractDesignPatterns, extractSkeleton, feedbackBoostedSearch, findBestComposition, findSimilar, fingerprint, fullstackMonoTemplate, generateArtifactId, generateComponent, generateComponentFromLibrary, generateRandomId, getAdapterPath, getAggregateScore, getAllCompositions, getAllInteractions, getAllJobStatuses, getAllPacks, getAllSnippets, getAllTemplates, getAnimationsByCategory, getArtifact, getArtifactCount, getAvailableComponentLibraries, getAvailableComponentsForLibrary, getAvailablePatternsForLibrary, getAvailableTypes, getBaseDir, getBestMatch, getBestMatchWithFeedback, getByCategory, getByIndustry, getByMood, getColorSystem, getColorSystemsByMood, getComponentLibrariesForFramework, getComponentLibrary, getComposition, getConfig, getDatabase, getDefaultIconLibrary, getDiskUsage, getEmbedding, getEmbeddingConfig, getEmbeddingCount, getFallbackDesignReference, getFeedbackBoost, getFeedbackCount, getFeedbackStats, getFileExtension, getFileName, getFontPairing, getFontPairingsByMood, getInspirationByCategory, getInspirationByPriority, getInteractionsByCategory, getLatestJobStatus, getLayoutPattern, getLayoutPatternsByUseCase, getLearningStats, getMicroInteraction, getModelDownloadUrl, getModelPath, getModelPaths, getPack, getPatternStats, getPreset, getPrimaryDesignReference, getPromotablePatternsFromDb, getPromotionCandidates, getRecentArtifacts, getRecommendations, getRecommendedLibrary, getRegistrySize, getSimilarArtifacts, getSnippetById, getTemplate, getTopArtifacts, getTrainingDataPath, getTrainingSummary, getVariants, groupBy, hasEnoughData, hashSkeleton, htmlToJsxAttributes, includesCaseInsensitive, initializeBackendRegistry, initializeInteractions, initializeRegistry, injectAnimations, isAdapterAvailable, isArray, isDuplicateConsecutive, isFunction, isLikelyAccepted, isModelAvailable, isModelLoaded, isNetworkError, isNumber, isObject, isPromotable, isString, isTraining, isValidComponentName, isValidEmail, isValidHexColor, isValidProjectName, isValidUrl, jsxToHtml, jsxToHtmlAttributes, jsxToSvelte, listAdapters, listModels, listPresets, loadConfig, loadEmbeddings, logger6 as logger, mergeStyles, needsEnhancement, nextAppTemplate, nextSaasTemplate, parseStyleString, pluralize, promotePattern, queryArtifacts, reactEventsToHtml, reactEventsToSvelte, reactSpaTemplate, recommendStyle, recordGeneration2 as recordDiversityGeneration, recordExplicitFeedback, recordGeneratedArtifact, recordGeneration, recordPattern, reduxToolkitPattern as reduxToolkitPatterns, registerComposition, registerInteraction, registerInteractions, registerPack, registerSnippet, registerSnippets, resetSchemaInit, retry, runPromotionCycle, safeJSONParse, sanitizeClassName, scoreQuality, scoreQualityWithRAG, searchBackendSnippets, searchComponents, searchPacks, selectTemplate, semanticSearch, setupComponentLibraryProject, sortBy, startTrainingJob, stateManagementPatterns, storeArtifact, storeDesignLearning, storeEmbedding, storeEmbeddings, suggestDiverseVariant, tanstackQueryPattern as tanstackQueryPatterns, templateList, templates2 as templates, toCamelCase, toKebabCase, toPascalCase, toSnakeCase, triggerPatternPromotion, truncate, unique, unloadModel, updateFeedbackScore, updateJobStatus, updateQualityScore, validateSnippet, validateSnippetStrict, writeJsonl, zustandPatterns };
|
|
41937
|
+
export { ANIMATION_PRESETS, AngularGenerator, BaseGenerator, COLOR_SYSTEMS, COMPONENT_LIBRARIES, DEFAULT_COLOR_SYSTEM, DEFAULT_CONTEXT, DEFAULT_DESIGN_CONTEXT, DEFAULT_FONT_PAIRING, DEFAULT_LORA_CONFIG, DEFAULT_PRESET, FONT_PAIRINGS, GeneratorFactory, HtmlGenerator, ICON_LIBRARIES, INSPIRATION_SOURCES, LAYOUT_PATTERNS, PRESETS, ReactGenerator, SPACING_SYSTEM, SvelteGenerator, TYPE_SCALE, VueGenerator, applyVisualStyle2 as applyVisualStyle, brandToDesignContext, buildPromptEnhancerData, buildQualityScorerData, buildStyleRecommenderData, cancelTrainingJob, capitalize, checkTrainingReadiness, classifyPromptPair, classifyPromptText, cleanJsxSyntax, clearAllMicroInteractions, clearCompositions, clearHistory as clearDiversityHistory, clearRegistry, clearSessionCache, closeDatabase, composePageFromTemplate, composeSection, configureEmbeddings, configureModelDir, convertPathForFramework, convertStyleObjectToString, cosineSimilarity, createEmbedding, createError, createLogger, createTrainingJob, customizeTemplate, deleteArtifact, deleteEmbeddings, designContextStore, embed, embedBatch, enhancePrompt, enhancePromptWithRAG, enhanceWithRules, ensureDirectories, ensurePatternsTable, escapeHtml, exportForAdapter, exportRawExamples, exportTrainingData, expressApiTemplate, extractDesignPatterns, extractSkeleton, feedbackBoostedSearch, findBestComposition, findSimilar, fingerprint, fullstackMonoTemplate, generateArtifactId, generateComponent, generateComponentFromLibrary, generateRandomId, getAdapterPath, getAggregateScore, getAllCompositions, getAllInteractions, getAllJobStatuses, getAllPacks, getAllSnippets, getAllTemplates, getAnimationsByCategory, getArtifact, getArtifactCount, getAvailableComponentLibraries, getAvailableComponentsForLibrary, getAvailablePatternsForLibrary, getAvailableTypes, getBaseDir, getBestMatch, getBestMatchWithFeedback, getByCategory, getByIndustry, getByMood, getColorSystem, getColorSystemsByMood, getComponentLibrariesForFramework, getComponentLibrary, getComposition, getConfig, getDatabase, getDefaultIconLibrary, getDiskUsage, getEmbedding, getEmbeddingConfig, getEmbeddingCount, getFallbackDesignReference, getFeedbackBoost, getFeedbackCount, getFeedbackStats, getFileExtension, getFileName, getFontPairing, getFontPairingsByMood, getInspirationByCategory, getInspirationByPriority, getInteractionsByCategory, getLatestJobStatus, getLayoutPattern, getLayoutPatternsByUseCase, getLearningStats, getMicroInteraction, getModelDownloadUrl, getModelPath, getModelPaths, getPack, getPatternStats, getPreset, getPrimaryDesignReference, getPromotablePatternsFromDb, getPromotionCandidates, getRecentArtifacts, getRecommendations, getRecommendedLibrary, getRegistrySize, getSimilarArtifacts, getSnippetById, getTemplate, getTopArtifacts, getTrainingDataPath, getTrainingSummary, getVariants, groupBy, hasEnoughData, hashSkeleton, htmlToJsxAttributes, includesCaseInsensitive, initializeBackendRegistry, initializeInteractions, initializeRegistry, injectAnimations, isAdapterAvailable, isArray, isDuplicateConsecutive, isFunction, isLikelyAccepted, isModelAvailable, isModelLoaded, isNetworkError, isNumber, isObject, isPromotable, isString, isTraining, isValidComponentName, isValidEmail, isValidHexColor, isValidProjectName, isValidUrl, jsxToHtml, jsxToHtmlAttributes, jsxToSvelte, listAdapters, listModels, listPresets, loadConfig, loadEmbeddings, logger6 as logger, mergeStyles, needsEnhancement, nextAppTemplate, nextSaasTemplate, parseStyleString, pluralize, promotePattern, queryArtifacts, reactEventsToHtml, reactEventsToSvelte, reactSpaTemplate, recommendStyle, recordGeneration2 as recordDiversityGeneration, recordExplicitFeedback, recordGeneratedArtifact, recordGeneration, recordPattern, reduxToolkitPattern as reduxToolkitPatterns, registerComposition, registerInteraction, registerInteractions, registerPack, registerSnippet, registerSnippets, resetSchemaInit, retry, runPromotionCycle, safeJSONParse, sanitizeClassName, scoreQuality, scoreQualityWithRAG, searchBackendSnippets, searchComponents, searchPacks, selectTemplate, semanticSearch, setupComponentLibraryProject, sortBy, startTrainingJob, stateManagementPatterns, storeArtifact, storeDesignLearning, storeEmbedding, storeEmbeddings, suggestDiverseVariant, tanstackQueryPattern as tanstackQueryPatterns, templateList, templates2 as templates, toCamelCase, toKebabCase, toPascalCase, toSnakeCase, triggerPatternPromotion, truncate, unique, unloadModel, updateFeedbackScore, updateJobStatus, updateQualityScore, validateSnippet, validateSnippetStrict, writeJsonl, zustandPatterns };
|
|
41800
41938
|
//# sourceMappingURL=index.js.map
|
|
41801
41939
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED