sonance-brand-mcp 1.3.83 → 1.3.85

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.
@@ -2582,7 +2582,15 @@ export function SonanceDevTools() {
2582
2582
  </div>
2583
2583
 
2584
2584
  {/* Content */}
2585
- <div className="flex-1 overflow-y-auto p-4 text-[#333F48]">
2585
+ <div
2586
+ className="flex-1 overflow-y-auto p-4 text-[#333F48]"
2587
+ style={{
2588
+ overscrollBehavior: "contain", // Prevent scroll chaining to parent (modal)
2589
+ WebkitOverflowScrolling: "touch", // Smooth scrolling on iOS
2590
+ }}
2591
+ onWheel={(e) => e.stopPropagation()} // Prevent modal from intercepting wheel events
2592
+ onTouchMove={(e) => e.stopPropagation()} // Prevent modal from intercepting touch scroll
2593
+ >
2586
2594
  {/* Analysis Tab */}
2587
2595
  {activeTab === "analysis" && (
2588
2596
  <AnalysisPanel
@@ -396,7 +396,27 @@ export function ChatInterface({
396
396
  )}
397
397
 
398
398
  {/* Input */}
399
- <div className="flex gap-2">
399
+ <div
400
+ className="flex gap-2"
401
+ onPointerDown={(e) => {
402
+ // Force focus to input when clicking anywhere in this container
403
+ // This bypasses modal focus traps by using requestAnimationFrame
404
+ e.stopPropagation();
405
+ const input = inputRef.current;
406
+ if (input && !isProcessing) {
407
+ // Blur any currently focused element first (escape focus trap)
408
+ if (document.activeElement && document.activeElement !== input) {
409
+ (document.activeElement as HTMLElement).blur?.();
410
+ }
411
+ // Use rAF to ensure focus happens after any focus trap logic runs
412
+ requestAnimationFrame(() => {
413
+ input.focus();
414
+ // Also try native focus method as fallback
415
+ input.click();
416
+ });
417
+ }
418
+ }}
419
+ >
400
420
  <input
401
421
  ref={inputRef}
402
422
  type="text"
@@ -404,15 +424,31 @@ export function ChatInterface({
404
424
  onChange={(e) => setInput(e.target.value)}
405
425
  onClick={(e) => {
406
426
  e.stopPropagation();
407
- inputRef.current?.focus();
427
+ e.preventDefault();
428
+ // Force focus using multiple strategies
429
+ const input = inputRef.current;
430
+ if (input) {
431
+ // Escape any focus trap
432
+ if (document.activeElement && document.activeElement !== input) {
433
+ (document.activeElement as HTMLElement).blur?.();
434
+ }
435
+ input.focus();
436
+ }
408
437
  }}
409
438
  onPointerDown={(e) => {
410
439
  e.stopPropagation();
411
- inputRef.current?.focus();
440
+ // Don't preventDefault here - let native click handling work
441
+ const input = inputRef.current;
442
+ if (input) {
443
+ requestAnimationFrame(() => input.focus());
444
+ }
412
445
  }}
413
446
  onMouseDown={(e) => {
414
447
  e.stopPropagation();
415
- inputRef.current?.focus();
448
+ const input = inputRef.current;
449
+ if (input) {
450
+ requestAnimationFrame(() => input.focus());
451
+ }
416
452
  }}
417
453
  onKeyDown={(e) => {
418
454
  if (e.key === "Enter" && !e.shiftKey) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sonance-brand-mcp",
3
- "version": "1.3.83",
3
+ "version": "1.3.85",
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",