sonance-brand-mcp 1.3.110 → 1.3.112

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.
Files changed (84) hide show
  1. package/dist/assets/api/sonance-ai-edit/route.ts +30 -7
  2. package/dist/assets/api/sonance-save-image/route.ts +625 -0
  3. package/dist/assets/api/sonance-vision-apply/image-styling-detection.ts +1360 -0
  4. package/dist/assets/api/sonance-vision-apply/route.ts +1020 -64
  5. package/dist/assets/api/sonance-vision-apply/styling-detection.ts +730 -0
  6. package/dist/assets/api/sonance-vision-apply/theme-discovery.ts +1 -1
  7. package/dist/assets/api/sonance-vision-edit/route.ts +33 -8
  8. package/dist/assets/brand-system.ts +13 -12
  9. package/dist/assets/components/accordion.tsx +15 -7
  10. package/dist/assets/components/alert-dialog.tsx +35 -10
  11. package/dist/assets/components/alert.tsx +11 -10
  12. package/dist/assets/components/avatar.tsx +4 -4
  13. package/dist/assets/components/badge.tsx +16 -12
  14. package/dist/assets/components/button.stories.tsx +3 -3
  15. package/dist/assets/components/button.tsx +50 -31
  16. package/dist/assets/components/calendar.tsx +12 -8
  17. package/dist/assets/components/card.tsx +35 -29
  18. package/dist/assets/components/checkbox.tsx +9 -8
  19. package/dist/assets/components/code.tsx +19 -11
  20. package/dist/assets/components/command.tsx +32 -13
  21. package/dist/assets/components/context-menu.tsx +37 -16
  22. package/dist/assets/components/dialog.tsx +8 -5
  23. package/dist/assets/components/divider.tsx +15 -5
  24. package/dist/assets/components/drawer.tsx +4 -3
  25. package/dist/assets/components/dropdown-menu.tsx +15 -13
  26. package/dist/assets/components/hover-card.tsx +4 -1
  27. package/dist/assets/components/image.tsx +1 -1
  28. package/dist/assets/components/input.tsx +29 -14
  29. package/dist/assets/components/kbd.stories.tsx +3 -3
  30. package/dist/assets/components/kbd.tsx +29 -13
  31. package/dist/assets/components/listbox.tsx +8 -8
  32. package/dist/assets/components/menubar.tsx +50 -23
  33. package/dist/assets/components/navbar.stories.tsx +140 -13
  34. package/dist/assets/components/navbar.tsx +22 -5
  35. package/dist/assets/components/navigation-menu.tsx +28 -6
  36. package/dist/assets/components/pagination.tsx +10 -10
  37. package/dist/assets/components/popover.tsx +10 -8
  38. package/dist/assets/components/progress.tsx +6 -4
  39. package/dist/assets/components/radio-group.tsx +5 -5
  40. package/dist/assets/components/select.tsx +49 -29
  41. package/dist/assets/components/separator.tsx +3 -3
  42. package/dist/assets/components/sheet.tsx +4 -4
  43. package/dist/assets/components/sidebar.tsx +10 -10
  44. package/dist/assets/components/skeleton.tsx +13 -5
  45. package/dist/assets/components/slider.tsx +12 -10
  46. package/dist/assets/components/switch.tsx +4 -4
  47. package/dist/assets/components/table.tsx +5 -5
  48. package/dist/assets/components/tabs.tsx +8 -8
  49. package/dist/assets/components/textarea.tsx +11 -9
  50. package/dist/assets/components/toast.tsx +7 -7
  51. package/dist/assets/components/toggle.tsx +27 -7
  52. package/dist/assets/components/tooltip.tsx +10 -8
  53. package/dist/assets/components/user.tsx +8 -6
  54. package/dist/assets/dev-tools/SonanceDevTools.tsx +851 -708
  55. package/dist/assets/dev-tools/components/ApplyFirstPreview.tsx +10 -10
  56. package/dist/assets/dev-tools/components/ChatHistory.tsx +145 -0
  57. package/dist/assets/dev-tools/components/ChatInterface.tsx +444 -295
  58. package/dist/assets/dev-tools/components/ChatTabBar.tsx +82 -0
  59. package/dist/assets/dev-tools/components/DiffPreview.tsx +1 -1
  60. package/dist/assets/dev-tools/components/InlineDiffPreview.tsx +528 -0
  61. package/dist/assets/dev-tools/components/InspectorOverlay.tsx +21 -18
  62. package/dist/assets/dev-tools/components/PropertiesPanel.tsx +1345 -0
  63. package/dist/assets/dev-tools/components/ScreenshotAnnotator.tsx +1 -1
  64. package/dist/assets/dev-tools/components/SectionHighlight.tsx +1 -1
  65. package/dist/assets/dev-tools/components/VisionDiffPreview.tsx +7 -7
  66. package/dist/assets/dev-tools/components/VisionModeBorder.tsx +12 -63
  67. package/dist/assets/dev-tools/constants.ts +38 -6
  68. package/dist/assets/dev-tools/hooks/index.ts +69 -0
  69. package/dist/assets/dev-tools/hooks/useComponentDetection.ts +132 -0
  70. package/dist/assets/dev-tools/hooks/useComputedStyles.ts +471 -0
  71. package/dist/assets/dev-tools/hooks/useContentHash.ts +212 -0
  72. package/dist/assets/dev-tools/hooks/useElementScanner.ts +398 -0
  73. package/dist/assets/dev-tools/hooks/useImageDetection.ts +162 -0
  74. package/dist/assets/dev-tools/hooks/useTextDetection.ts +217 -0
  75. package/dist/assets/dev-tools/index.ts +3 -0
  76. package/dist/assets/dev-tools/panels/AnalysisPanel.tsx +32 -32
  77. package/dist/assets/dev-tools/panels/ComponentsPanel.tsx +384 -131
  78. package/dist/assets/dev-tools/panels/TextPanel.tsx +10 -10
  79. package/dist/assets/dev-tools/types.ts +93 -2
  80. package/dist/assets/globals.css +225 -9
  81. package/dist/assets/styles/brand-overrides.css +3 -2
  82. package/dist/assets/utils.ts +2 -1
  83. package/dist/index.js +22 -3
  84. package/package.json +2 -1
@@ -65,8 +65,8 @@ export function TextPanel({
65
65
  return (
66
66
  <div className="flex flex-col items-center justify-center h-full text-center p-6 text-gray-500">
67
67
  <Type className="h-12 w-12 mb-4 opacity-20" />
68
- <p className="text-sm font-medium mb-2">Text Inspector Disabled</p>
69
- <p className="text-xs max-w-[200px]">
68
+ <p id="text-panel-p-text-inspector-disab" className="text-sm font-medium mb-2">Text Inspector Disabled</p>
69
+ <p id="text-panel-p-enable-the-inspector" className="text-xs max-w-[200px]">
70
70
  Enable the inspector using the mouse icon in the top bar to select and edit text.
71
71
  </p>
72
72
  </div>
@@ -82,12 +82,12 @@ export function TextPanel({
82
82
  <div className="flex items-center justify-between mb-2">
83
83
  <div className="flex items-center gap-2">
84
84
  <div className="w-2 h-2 bg-amber-500 rounded-full animate-pulse" />
85
- <span className="text-xs font-medium text-amber-800">
85
+ <span id="text-panel-span-modifiedcount-text-e" className="text-xs font-medium text-amber-800">
86
86
  {modifiedCount} text element{modifiedCount !== 1 ? 's' : ''} modified
87
87
  </span>
88
88
  </div>
89
89
  </div>
90
- <p className="text-[10px] text-amber-600 mb-3">
90
+ <p id="text-panel-p-changes-are-previewe" className="text-[10px] text-amber-600 mb-3">
91
91
  Changes are previewed on the page. Save to keep them or revert to discard.
92
92
  </p>
93
93
  <div className="flex gap-2">
@@ -131,8 +131,8 @@ export function TextPanel({
131
131
  <Type className="h-3 w-3 text-white" />
132
132
  </div>
133
133
  </div>
134
- <p className="text-sm font-medium mb-2">Select Text to Edit</p>
135
- <p className="text-xs max-w-[200px]">
134
+ <p id="text-panel-p-select-text-to-edit" className="text-sm font-medium mb-2">Select Text to Edit</p>
135
+ <p id="text-panel-p-click-on-any-text-el" className="text-xs max-w-[200px]">
136
136
  Click on any text element on the page to adjust its typography and content.
137
137
  </p>
138
138
  </div>
@@ -153,16 +153,16 @@ export function TextPanel({
153
153
  <div className="flex items-center justify-between pb-2 border-b border-gray-100">
154
154
  <div className="flex flex-col">
155
155
  <div className="flex items-center gap-2">
156
- <span className="text-xs font-medium text-gray-900 truncate max-w-[180px]">
156
+ <span id="text-panel-span-selectedelementnames" className="text-xs font-medium text-gray-900 truncate max-w-[180px]">
157
157
  {selectedElement.name.split(':')[0]}
158
158
  </span>
159
159
  {currentHasChanges && (
160
- <span className="px-1.5 py-0.5 text-[9px] font-medium bg-amber-100 text-amber-700 rounded">
160
+ <span id="text-panel-span-modified" className="px-1.5 py-0.5 text-[9px] font-medium bg-amber-100 text-amber-700 rounded">
161
161
  Modified
162
162
  </span>
163
163
  )}
164
164
  </div>
165
- <span className="text-[10px] text-gray-400 font-mono">
165
+ <span id="text-panel-span-selectedtextid" className="text-[10px] text-gray-400 font-mono">
166
166
  {selectedTextId}
167
167
  </span>
168
168
  </div>
@@ -320,7 +320,7 @@ export function TextPanel({
320
320
  className="flex-1 h-7 px-2 text-xs border border-gray-200 rounded focus:border-[#00A3E1] focus:outline-none font-mono"
321
321
  />
322
322
  </div>
323
- <p className="text-[10px] text-gray-400">
323
+ <p id="text-panel-p-switch-theme-to-set-" className="text-[10px] text-gray-400">
324
324
  Switch theme to set color for {currentTheme === "dark" ? "light" : "dark"} mode
325
325
  </p>
326
326
  </div>
@@ -1,7 +1,17 @@
1
1
 
2
2
  import React from "react";
3
3
 
4
- export type TabId = "analysis" | "components" | "logos" | "text";
4
+ export type TabId = "analysis" | "elements";
5
+
6
+ // Element type filters for the unified element view
7
+ export interface ElementFilters {
8
+ components: boolean;
9
+ images: boolean;
10
+ text: boolean;
11
+ }
12
+
13
+ // Type for the currently selected element in the unified view
14
+ export type SelectedElementType = "component" | "logo" | "text" | null;
5
15
 
6
16
  export interface TabDefinition {
7
17
  id: TabId;
@@ -32,6 +42,8 @@ export interface DetectedElement {
32
42
  elementId?: string;
33
43
  /** IDs of child elements for more precise targeting */
34
44
  childIds?: string[];
45
+ /** The src attribute for image elements (for tracing to source code) */
46
+ imageSrc?: string;
35
47
  }
36
48
 
37
49
  // Logo asset from the API
@@ -83,6 +95,43 @@ export interface OriginalLogoState {
83
95
  srcset?: string;
84
96
  }
85
97
 
98
+ // ---- Image Editing Types ----
99
+
100
+ // Image override configuration (for general images, not just logos)
101
+ export interface ImageOverride {
102
+ src?: string; // New image source URL
103
+ width?: number; // Override width in pixels
104
+ height?: number; // Override height in pixels
105
+ scale?: number; // Scale factor (1 = 100%)
106
+ objectFit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
107
+ reset?: boolean; // If true, indicates this config is resetting to defaults
108
+ }
109
+
110
+ // Original image state for reset functionality
111
+ export interface OriginalImageState {
112
+ src: string;
113
+ width: number;
114
+ height: number;
115
+ objectFit: string;
116
+ srcset?: string;
117
+ }
118
+
119
+ // Public folder image asset
120
+ export interface PublicImageAsset {
121
+ id: string;
122
+ name: string;
123
+ path: string; // Relative path from /public (e.g., "/banners/hero.jpg")
124
+ folder: string; // Parent folder name for grouping
125
+ extension: string;
126
+ dimensions?: {
127
+ width: number;
128
+ height: number;
129
+ };
130
+ }
131
+
132
+ // Image save status
133
+ export type ImageSaveStatus = "idle" | "saving" | "success" | "error";
134
+
86
135
  // Original text state for reset
87
136
  export interface OriginalTextState {
88
137
  textContent: string | null;
@@ -108,12 +157,51 @@ export type ComponentStyleOverride = Record<string, ComponentStyle>;
108
157
 
109
158
  // ---- AI Chat Interfaces ----
110
159
 
160
+ /** Action status for inline diff display */
161
+ export type ChatActionStatus = "pending" | "accepted" | "reverted" | "error";
162
+
163
+ /** Action type for inline display in chat messages */
164
+ export type ChatActionType = "diff" | "applied" | "reverted" | "error";
165
+
166
+ /** File change info for inline diff display */
167
+ export interface ChatFileChange {
168
+ path: string;
169
+ diff: string;
170
+ originalContent?: string;
171
+ modifiedContent?: string;
172
+ }
173
+
174
+ /** Inline action display attached to assistant messages */
175
+ export interface ChatMessageAction {
176
+ type: ChatActionType;
177
+ files?: ChatFileChange[];
178
+ status: ChatActionStatus;
179
+ sessionId?: string;
180
+ explanation?: string;
181
+ }
182
+
111
183
  export interface ChatMessage {
112
184
  id: string;
113
- role: "user" | "assistant";
185
+ role: "user" | "assistant" | "system";
114
186
  content: string;
115
187
  timestamp: Date;
116
188
  editResult?: AIEditResult;
189
+ /** Inline action display for diffs/changes */
190
+ action?: ChatMessageAction;
191
+ }
192
+
193
+ /** Chat session for multi-conversation support */
194
+ export interface ChatSession {
195
+ id: string;
196
+ name: string;
197
+ messages: ChatMessage[];
198
+ createdAt: Date;
199
+ updatedAt: Date;
200
+ /** Context for the session (component type, vision mode, etc.) */
201
+ context?: {
202
+ componentType?: string;
203
+ visionMode?: boolean;
204
+ };
117
205
  }
118
206
 
119
207
  export interface AIEditResult {
@@ -250,6 +338,8 @@ export interface VisionFocusedElement {
250
338
  childIds?: string[];
251
339
  /** Parent section context for section-level targeting */
252
340
  parentSection?: ParentSectionInfo;
341
+ /** The src attribute for image elements (for tracing to source code) */
342
+ imageSrc?: string;
253
343
  }
254
344
 
255
345
  export interface VisionEditRequest {
@@ -295,6 +385,7 @@ export interface ApplyFirstSession {
295
385
  status: 'preview' | 'applied' | 'accepted' | 'reverted';
296
386
  backupPaths: string[];
297
387
  isPreview?: boolean; // True if changes are not yet written to disk
388
+ isTextOnlyChange?: boolean; // True if only text content was changed (show in Details tab instead of AI Chat)
298
389
  }
299
390
 
300
391
  export type ApplyFirstStatus =
@@ -1,4 +1,8 @@
1
1
  @import "tailwindcss";
2
+
3
+ /* Configure dark mode to use data-theme attribute */
4
+ @variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));
5
+
2
6
  @import "../styles/brand-overrides.css";
3
7
 
4
8
  /* ============================================
@@ -166,11 +170,13 @@
166
170
  --space-24: 6rem;
167
171
  --space-32: 8rem;
168
172
 
169
- /* Border Radius */
173
+ /* Border Radius - Liquid Glass (updated from 0-4px to 8-16px) */
170
174
  --radius-none: 0;
171
- --radius-sm: 2px;
172
- --radius-md: 4px;
173
- --radius-lg: 8px;
175
+ --radius-sm: 8px;
176
+ --radius-md: 12px;
177
+ --radius-lg: 16px;
178
+ --radius-xl: 20px;
179
+ --radius-2xl: 24px;
174
180
  --radius-full: 9999px;
175
181
 
176
182
  /* Animation */
@@ -179,6 +185,43 @@
179
185
  --duration-fast: 150ms;
180
186
  --duration-normal: 250ms;
181
187
  --duration-slow: 400ms;
188
+
189
+ /* ============================================
190
+ LIQUID GLASS SYSTEM - Light Mode
191
+ ============================================ */
192
+
193
+ /* Glass Backgrounds (Light Mode - frosted glass effect) */
194
+ --glass-bg: rgba(255, 255, 255, 0.7);
195
+ --glass-bg-hover: rgba(255, 255, 255, 0.8);
196
+ --glass-bg-active: rgba(255, 255, 255, 0.9);
197
+ --glass-bg-elevated: rgba(255, 255, 255, 0.85);
198
+ --glass-bg-subtle: rgba(255, 255, 255, 0.5);
199
+
200
+ /* Glass Borders (Light Mode) */
201
+ --glass-border: rgba(0, 0, 0, 0.08);
202
+ --glass-border-hover: rgba(0, 0, 0, 0.12);
203
+ --glass-border-focus: rgba(0, 0, 0, 0.15);
204
+
205
+ /* Blur Values */
206
+ --glass-blur-sm: 8px;
207
+ --glass-blur-md: 12px;
208
+ --glass-blur-lg: 20px;
209
+ --glass-blur-xl: 32px;
210
+
211
+ /* Glass Shadows (Light Mode) */
212
+ --glass-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
213
+ --glass-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
214
+ --glass-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
215
+ --glass-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
216
+
217
+ /* Glow Effects - Using Sonance Blue */
218
+ --glow-primary: rgba(0, 163, 225, 0.2);
219
+ --glow-primary-subtle: rgba(0, 163, 225, 0.1);
220
+ --glow-primary-intense: rgba(0, 163, 225, 0.35);
221
+
222
+ /* Inner Highlights */
223
+ --glass-inner-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.8);
224
+ --glass-inner-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.03);
182
225
  }
183
226
 
184
227
  /* Dark Mode */
@@ -252,6 +295,37 @@
252
295
  --sidebar-accent-foreground: #FFFFFF;
253
296
  --sidebar-border: #3a444c;
254
297
  --sidebar-ring: #00A3E1;
298
+
299
+ /* ============================================
300
+ LIQUID GLASS SYSTEM - Dark Mode
301
+ ============================================ */
302
+
303
+ /* Glass Backgrounds (Dark Mode - classic glass morphism) */
304
+ --glass-bg: rgba(255, 255, 255, 0.03);
305
+ --glass-bg-hover: rgba(255, 255, 255, 0.06);
306
+ --glass-bg-active: rgba(255, 255, 255, 0.1);
307
+ --glass-bg-elevated: rgba(255, 255, 255, 0.08);
308
+ --glass-bg-subtle: rgba(255, 255, 255, 0.02);
309
+
310
+ /* Glass Borders (Dark Mode) */
311
+ --glass-border: rgba(255, 255, 255, 0.08);
312
+ --glass-border-hover: rgba(255, 255, 255, 0.12);
313
+ --glass-border-focus: rgba(255, 255, 255, 0.18);
314
+
315
+ /* Glass Shadows (Dark Mode - more pronounced) */
316
+ --glass-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
317
+ --glass-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
318
+ --glass-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
319
+ --glass-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5);
320
+
321
+ /* Glow Effects - More intense in dark mode */
322
+ --glow-primary: rgba(0, 163, 225, 0.35);
323
+ --glow-primary-subtle: rgba(0, 163, 225, 0.2);
324
+ --glow-primary-intense: rgba(0, 163, 225, 0.5);
325
+
326
+ /* Inner Highlights (Dark Mode) */
327
+ --glass-inner-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.1);
328
+ --glass-inner-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.2);
255
329
  }
256
330
 
257
331
  /* System preference detection fallback */
@@ -395,11 +469,22 @@
395
469
 
396
470
  /* Font */
397
471
  --font-sans: var(--font-montserrat), system-ui, sans-serif;
398
-
399
- /* Border Radius */
400
- --radius-sm: 2px;
401
- --radius-md: 4px;
402
- --radius-lg: 8px;
472
+
473
+ /* Border Radius - Liquid Glass */
474
+ --radius-sm: 8px;
475
+ --radius-md: 12px;
476
+ --radius-lg: 16px;
477
+ --radius-xl: 20px;
478
+ --radius-2xl: 24px;
479
+
480
+ /* Glass System Colors */
481
+ --color-glass-bg: var(--glass-bg);
482
+ --color-glass-bg-hover: var(--glass-bg-hover);
483
+ --color-glass-bg-active: var(--glass-bg-active);
484
+ --color-glass-bg-elevated: var(--glass-bg-elevated);
485
+ --color-glass-border: var(--glass-border);
486
+ --color-glass-border-hover: var(--glass-border-hover);
487
+ --color-glass-border-focus: var(--glass-border-focus);
403
488
  }
404
489
 
405
490
  /* ============================================
@@ -520,3 +605,134 @@ code ::selection,
520
605
  -ms-overflow-style: none;
521
606
  scrollbar-width: none;
522
607
  }
608
+
609
+ /* ============================================
610
+ LIQUID GLASS UTILITY CLASSES
611
+ ============================================ */
612
+
613
+ /* Glass Card - Primary container */
614
+ .glass-card {
615
+ background: var(--glass-bg);
616
+ backdrop-filter: blur(var(--glass-blur-lg));
617
+ -webkit-backdrop-filter: blur(var(--glass-blur-lg));
618
+ border: 1px solid var(--glass-border);
619
+ box-shadow: var(--glass-shadow-md);
620
+ border-radius: var(--radius-lg);
621
+ transition: all 0.2s ease-out;
622
+ }
623
+
624
+ .glass-card:hover {
625
+ background: var(--glass-bg-hover);
626
+ border-color: var(--glass-border-hover);
627
+ box-shadow: var(--glass-shadow-lg), 0 0 20px var(--glow-primary-subtle);
628
+ }
629
+
630
+ /* Glass Button */
631
+ .glass-btn {
632
+ background: var(--glass-bg);
633
+ backdrop-filter: blur(var(--glass-blur-sm));
634
+ -webkit-backdrop-filter: blur(var(--glass-blur-sm));
635
+ border: 1px solid var(--glass-border);
636
+ border-radius: var(--radius-md);
637
+ transition: all 0.2s ease-out;
638
+ }
639
+
640
+ .glass-btn:hover {
641
+ background: var(--glass-bg-hover);
642
+ border-color: var(--glass-border-hover);
643
+ box-shadow: 0 0 20px var(--glow-primary);
644
+ }
645
+
646
+ .glass-btn:active {
647
+ background: var(--glass-bg-active);
648
+ transform: scale(0.98);
649
+ }
650
+
651
+ /* Glass Input */
652
+ .glass-input {
653
+ background: var(--glass-bg-subtle);
654
+ backdrop-filter: blur(var(--glass-blur-sm));
655
+ -webkit-backdrop-filter: blur(var(--glass-blur-sm));
656
+ border: 1px solid var(--glass-border);
657
+ border-radius: var(--radius-md);
658
+ transition: all 0.2s ease-out;
659
+ }
660
+
661
+ .glass-input:hover {
662
+ border-color: var(--glass-border-hover);
663
+ }
664
+
665
+ .glass-input:focus {
666
+ outline: none;
667
+ border-color: var(--sonance-blue);
668
+ box-shadow: 0 0 20px var(--glow-primary);
669
+ }
670
+
671
+ /* Glow Effect Utilities */
672
+ .hover-glow {
673
+ transition: box-shadow 0.3s ease-out;
674
+ }
675
+
676
+ .hover-glow:hover {
677
+ box-shadow: 0 0 30px var(--glow-primary);
678
+ }
679
+
680
+ .glow-subtle:hover {
681
+ box-shadow: 0 0 15px var(--glow-primary-subtle);
682
+ }
683
+
684
+ .glow-intense:hover {
685
+ box-shadow: 0 0 40px var(--glow-primary-intense);
686
+ }
687
+
688
+ .focus-glow:focus {
689
+ box-shadow: 0 0 25px var(--glow-primary);
690
+ }
691
+
692
+ /* Glass Blur Utilities */
693
+ .glass-blur {
694
+ backdrop-filter: blur(var(--glass-blur-lg));
695
+ -webkit-backdrop-filter: blur(var(--glass-blur-lg));
696
+ }
697
+
698
+ .glass-blur-sm {
699
+ backdrop-filter: blur(var(--glass-blur-sm));
700
+ -webkit-backdrop-filter: blur(var(--glass-blur-sm));
701
+ }
702
+
703
+ .glass-blur-xl {
704
+ backdrop-filter: blur(var(--glass-blur-xl));
705
+ -webkit-backdrop-filter: blur(var(--glass-blur-xl));
706
+ }
707
+
708
+ /* Glass Border Utilities */
709
+ .glass-border {
710
+ border: 1px solid var(--glass-border);
711
+ }
712
+
713
+ .glass-border-hover:hover {
714
+ border-color: var(--glass-border-hover);
715
+ }
716
+
717
+ /* Text Gradient Utility */
718
+ .text-gradient {
719
+ background-clip: text;
720
+ -webkit-background-clip: text;
721
+ -webkit-text-fill-color: transparent;
722
+ background-image: linear-gradient(135deg, var(--sonance-blue) 0%, var(--sonance-charcoal) 100%);
723
+ }
724
+
725
+ /* Fallback for browsers without backdrop-filter support */
726
+ @supports not (backdrop-filter: blur(10px)) {
727
+ .glass-card,
728
+ .glass-btn,
729
+ .glass-input {
730
+ background: rgba(255, 255, 255, 0.95);
731
+ }
732
+
733
+ [data-theme="dark"] .glass-card,
734
+ [data-theme="dark"] .glass-btn,
735
+ [data-theme="dark"] .glass-input {
736
+ background: rgba(26, 31, 36, 0.95);
737
+ }
738
+ }
@@ -4,13 +4,14 @@
4
4
  ========================================================================== */
5
5
 
6
6
  :root {
7
+ --zoom--scale: 0.93;
7
8
  /* Sonance Logo Sizing */
8
- --sonance-logo-scale: 1;
9
+ --sonance-logo-scale: 0.94;
9
10
  --sonance-logo-width: auto;
10
11
  --sonance-logo-height: auto;
11
12
 
12
13
  /* IPORT Logo Sizing */
13
- --iport-logo-scale: 1;
14
+ --iport-logo-scale: 1.08;
14
15
  --iport-logo-width: auto;
15
16
  --iport-logo-height: auto;
16
17
 
@@ -1,6 +1,7 @@
1
1
  import { clsx, type ClassValue } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
2
3
 
3
4
  export function cn(...inputs: ClassValue[]) {
4
- return clsx(inputs);
5
+ return twMerge(clsx(inputs));
5
6
  }
6
7
 
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ import * as path from "path";
7
7
  import * as os from "os";
8
8
  import { fileURLToPath } from "url";
9
9
  import { execSync } from "child_process";
10
+ import sharp from "sharp";
10
11
  // ============================================
11
12
  // INSTALLER (--init flag)
12
13
  // ============================================
@@ -1486,10 +1487,28 @@ async function embedLogo(logoPath) {
1486
1487
  };
1487
1488
  }
1488
1489
  try {
1489
- // Read file as base64
1490
- const fileBuffer = fs.readFileSync(resolvedPath);
1491
- const base64Data = fileBuffer.toString('base64');
1490
+ const MAX_DIMENSION = 7500; // Leave margin below Claude's 8000px limit
1491
+ // Read the image file
1492
+ let imageBuffer = fs.readFileSync(resolvedPath);
1492
1493
  const mimeType = getImageMimeType(resolvedPath);
1494
+ // Only process raster images (not SVG)
1495
+ if (mimeType !== 'image/svg+xml') {
1496
+ const image = sharp(imageBuffer);
1497
+ const metadata = await image.metadata();
1498
+ // Check if resizing is needed
1499
+ if (metadata.width && metadata.height) {
1500
+ if (metadata.width > MAX_DIMENSION || metadata.height > MAX_DIMENSION) {
1501
+ // Resize maintaining aspect ratio
1502
+ imageBuffer = await image
1503
+ .resize(MAX_DIMENSION, MAX_DIMENSION, {
1504
+ fit: 'inside',
1505
+ withoutEnlargement: true,
1506
+ })
1507
+ .toBuffer();
1508
+ }
1509
+ }
1510
+ }
1511
+ const base64Data = imageBuffer.toString('base64');
1493
1512
  return {
1494
1513
  success: true,
1495
1514
  type: "image",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sonance-brand-mcp",
3
- "version": "1.3.110",
3
+ "version": "1.3.112",
4
4
  "description": "MCP Server for Sonance Brand Guidelines and Component Library - gives Claude instant access to brand colors, typography, and UI components.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -39,6 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@modelcontextprotocol/sdk": "^1.0.0",
42
+ "sharp": "^0.33.5",
42
43
  "zod": "^3.23.8"
43
44
  },
44
45
  "devDependencies": {