@trustquery/browser 0.3.2 → 0.3.3

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.
@@ -3576,13 +3576,20 @@ class AttachmentManager {
3576
3576
  const existingIcon = iconPlaceholder?.querySelector('.tq-attachment-icon');
3577
3577
 
3578
3578
  if (newMatches.length === 0 && existingIcon) {
3579
- // No more matches - remove the icon
3579
+ // No more matches - remove the icon and collapse placeholder
3580
3580
  existingIcon.remove();
3581
+
3582
+ // Collapse the icon placeholder by setting width to 0
3583
+ if (iconPlaceholder) {
3584
+ iconPlaceholder.style.width = '0';
3585
+ iconPlaceholder.style.minWidth = '0';
3586
+ }
3587
+
3581
3588
  if (this.options.debug) {
3582
3589
  console.log('[AttachmentManager] Removed warning icon - all warnings resolved');
3583
3590
  }
3584
3591
  } else if (newMatches.length > 0 && !existingIcon) {
3585
- // New matches appeared - add icon (shouldn't happen in normal flow, but handle it)
3592
+ // New matches appeared - add icon and expand placeholder
3586
3593
  const match = newMatches[0];
3587
3594
  const messageState = match.intent?.handler?.['message-state'] || 'warning';
3588
3595
  const iconMap = {
@@ -3591,6 +3598,12 @@ class AttachmentManager {
3591
3598
  'info': 'trustquery-info.svg'
3592
3599
  };
3593
3600
 
3601
+ // Expand the icon placeholder back to normal width
3602
+ if (iconPlaceholder) {
3603
+ iconPlaceholder.style.width = '24px';
3604
+ iconPlaceholder.style.minWidth = '24px';
3605
+ }
3606
+
3594
3607
  const icon = document.createElement('img');
3595
3608
  icon.className = 'tq-attachment-icon';
3596
3609
  icon.src = `./assets/${iconMap[messageState] || iconMap.warning}`;
@@ -3818,7 +3831,8 @@ class AttachmentStyleManager {
3818
3831
  display: 'flex',
3819
3832
  alignItems: 'center',
3820
3833
  justifyContent: 'center',
3821
- flexShrink: '0'
3834
+ flexShrink: '0',
3835
+ transition: 'width 0.3s ease, min-width 0.3s ease'
3822
3836
  });
3823
3837
  }
3824
3838