sonance-brand-mcp 1.3.15 → 1.3.16
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/assets/api/sonance-analyze/route.ts +1 -1
- package/dist/assets/api/sonance-save-logo/route.ts +2 -2
- package/dist/assets/brand-system.ts +4 -1
- package/dist/assets/components/image.tsx +3 -1
- package/dist/assets/components/select.tsx +3 -0
- package/dist/assets/dev-tools/SonanceDevTools.tsx +1837 -3579
- package/dist/assets/dev-tools/components/ApplyFirstPreview.tsx +230 -0
- package/dist/assets/dev-tools/components/ChatInterface.tsx +455 -0
- package/dist/assets/dev-tools/components/DiffPreview.tsx +190 -0
- package/dist/assets/dev-tools/components/InspectorOverlay.tsx +353 -0
- package/dist/assets/dev-tools/components/VisionDiffPreview.tsx +199 -0
- package/dist/assets/dev-tools/components/VisionModeBorder.tsx +116 -0
- package/dist/assets/dev-tools/components/common.tsx +94 -0
- package/dist/assets/dev-tools/constants.ts +616 -0
- package/dist/assets/dev-tools/index.ts +29 -8
- package/dist/assets/dev-tools/panels/AnalysisPanel.tsx +329 -0
- package/dist/assets/dev-tools/panels/ComponentsPanel.tsx +623 -0
- package/dist/assets/dev-tools/panels/LogoToolsPanel.tsx +621 -0
- package/dist/assets/dev-tools/panels/LogosPanel.tsx +16 -0
- package/dist/assets/dev-tools/panels/TextPanel.tsx +332 -0
- package/dist/assets/dev-tools/types.ts +295 -0
- package/dist/assets/dev-tools/utils.ts +360 -0
- package/dist/index.js +268 -0
- package/package.json +1 -1
|
@@ -1094,7 +1094,7 @@ export async function POST(request: Request) {
|
|
|
1094
1094
|
// Flatten back to array, processing by file, right-to-left within each file
|
|
1095
1095
|
targetElements = Array.from(elementsByFile.values()).flat();
|
|
1096
1096
|
|
|
1097
|
-
const results: { id: string; success: boolean; error?: string }[] = [];
|
|
1097
|
+
const results: { id: string; success: boolean; error?: string; skipped?: boolean }[] = [];
|
|
1098
1098
|
|
|
1099
1099
|
for (const element of targetElements) {
|
|
1100
1100
|
if (!element.suggestedId) {
|
|
@@ -333,7 +333,7 @@ export async function POST(request: Request) {
|
|
|
333
333
|
const newLogoSizesBlock = `\n// Logo dimension overrides\nexport const logoSizes: Record<string, { width?: number; height?: number; scale?: number }> = {\n ${brandId}: ${JSON.stringify(sizeConfig)}\n};\n`;
|
|
334
334
|
|
|
335
335
|
// Add after brandLogos definition
|
|
336
|
-
const brandLogosEndPattern = /export const brandLogos[
|
|
336
|
+
const brandLogosEndPattern = /export const brandLogos[\s\S]*?;/;
|
|
337
337
|
const brandLogosMatch = fileContent.match(brandLogosEndPattern);
|
|
338
338
|
if (brandLogosMatch) {
|
|
339
339
|
fileContent = fileContent.replace(brandLogosEndPattern, `${brandLogosMatch[0]}${newLogoSizesBlock}`);
|
|
@@ -391,7 +391,7 @@ export async function GET() {
|
|
|
391
391
|
const fileContent = fs.readFileSync(brandSystemPath, "utf-8");
|
|
392
392
|
|
|
393
393
|
// Extract brandLogos object using regex
|
|
394
|
-
const brandLogosMatch = fileContent.match(/export const brandLogos[^{]
|
|
394
|
+
const brandLogosMatch = fileContent.match(/export const brandLogos[^{]*\{([\s\S]*?)\n\};/);
|
|
395
395
|
|
|
396
396
|
if (!brandLogosMatch) {
|
|
397
397
|
return NextResponse.json({ exists: true, parsed: false });
|
|
@@ -253,9 +253,12 @@ export function generateThemeVariables(config: ThemeConfig): Record<string, stri
|
|
|
253
253
|
'--theme-accent': config.accentColor,
|
|
254
254
|
'--theme-accent-hover': darken(config.accentColor, 8),
|
|
255
255
|
|
|
256
|
-
// Radius
|
|
256
|
+
// Radius - Update all radius variables for global consistency
|
|
257
|
+
// This ensures Cards, Buttons, Inputs, etc. all use the same radius setting
|
|
257
258
|
'--theme-radius': radiusValue,
|
|
258
259
|
'--radius-sm': radiusValue,
|
|
260
|
+
'--radius-md': radiusValue,
|
|
261
|
+
'--radius-lg': radiusValue,
|
|
259
262
|
|
|
260
263
|
// Typography
|
|
261
264
|
'--theme-heading-weight': String(config.headingWeight),
|
|
@@ -133,6 +133,7 @@ export function ZoomImage({ zoomScale = 1.1, className, ...props }: ZoomImagePro
|
|
|
133
133
|
|
|
134
134
|
// Image gallery
|
|
135
135
|
interface ImageGalleryProps {
|
|
136
|
+
id?: string;
|
|
136
137
|
images: { src: string; alt: string }[];
|
|
137
138
|
columns?: 2 | 3 | 4;
|
|
138
139
|
gap?: "sm" | "md" | "lg";
|
|
@@ -140,6 +141,7 @@ interface ImageGalleryProps {
|
|
|
140
141
|
}
|
|
141
142
|
|
|
142
143
|
export function ImageGallery({
|
|
144
|
+
id,
|
|
143
145
|
images,
|
|
144
146
|
columns = 3,
|
|
145
147
|
gap = "md",
|
|
@@ -158,7 +160,7 @@ export function ImageGallery({
|
|
|
158
160
|
};
|
|
159
161
|
|
|
160
162
|
return (
|
|
161
|
-
<div className={cn("grid", columnClasses[columns], gapClasses[gap], className)}>
|
|
163
|
+
<div id={id} className={cn("grid", columnClasses[columns], gapClasses[gap], className)}>
|
|
162
164
|
{images.map((image, index) => (
|
|
163
165
|
<Image
|
|
164
166
|
id="image-gallery"
|
|
@@ -28,6 +28,7 @@ interface SelectOption {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
interface SelectProps {
|
|
31
|
+
id?: string;
|
|
31
32
|
value?: string;
|
|
32
33
|
defaultValue?: string;
|
|
33
34
|
onValueChange?: (value: string) => void;
|
|
@@ -44,6 +45,7 @@ interface SelectProps {
|
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
export function Select({
|
|
48
|
+
id,
|
|
47
49
|
value: controlledValue,
|
|
48
50
|
defaultValue = "",
|
|
49
51
|
onValueChange,
|
|
@@ -105,6 +107,7 @@ export function Select({
|
|
|
105
107
|
)}
|
|
106
108
|
<div className="relative">
|
|
107
109
|
<button
|
|
110
|
+
id={id}
|
|
108
111
|
type="button"
|
|
109
112
|
onClick={() => !isDisabled && setIsOpen(!isOpen)}
|
|
110
113
|
disabled={isDisabled}
|