@weldsuite/helpdesk-widget-sdk 1.0.7 → 1.0.9

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.
@@ -651,7 +651,7 @@ class IframeManager {
651
651
  }
652
652
  }
653
653
  else {
654
- // Desktop: positioned widget with border and shadow
654
+ // Desktop: positioned widget with border, shadow and animation
655
655
  container.style.cssText = `
656
656
  position: fixed;
657
657
  bottom: ${widget.position.bottom};
@@ -662,11 +662,15 @@ class IframeManager {
662
662
  z-index: 2147483001;
663
663
  pointer-events: none;
664
664
  display: none;
665
- border-radius: 16px;
665
+ border-radius: 24px;
666
666
  overflow: hidden;
667
667
  background: #ffffff;
668
- box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
668
+ box-shadow: rgba(9, 14, 21, 0.16) 0px 5px 40px 0px;
669
669
  border: 1px solid rgba(0, 0, 0, 0.1);
670
+ opacity: 0;
671
+ transform: scale(0.95) translateY(10px);
672
+ transform-origin: bottom right;
673
+ transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
670
674
  `;
671
675
  }
672
676
  // Create iframe
@@ -680,7 +684,7 @@ class IframeManager {
680
684
  border: none;
681
685
  background: transparent;
682
686
  display: block;
683
- border-radius: ${this.deviceInfo.isMobile ? '0' : '16px'};
687
+ border-radius: ${this.deviceInfo.isMobile ? '0' : '24px'};
684
688
  `;
685
689
  iframe.setAttribute('allow', 'clipboard-write; camera; microphone');
686
690
  iframe.setAttribute('sandbox', 'allow-scripts allow-same-origin allow-forms allow-popups allow-downloads');
@@ -856,6 +860,14 @@ class IframeManager {
856
860
  iframe.container.setAttribute('data-state', type === IframeType.BACKDROP ? 'visible' : 'open');
857
861
  iframe.container.style.pointerEvents = 'auto';
858
862
  iframe.container.style.display = 'block';
863
+ // Trigger open animation for widget on desktop
864
+ if (type === IframeType.WIDGET && !this.deviceInfo.isMobile) {
865
+ // Force reflow to ensure transition works
866
+ iframe.container.offsetHeight;
867
+ // Animate to visible state
868
+ iframe.container.style.opacity = '1';
869
+ iframe.container.style.transform = 'scale(1) translateY(0)';
870
+ }
859
871
  // Handle mobile scroll lock
860
872
  if (this.deviceInfo.isMobile && type === IframeType.WIDGET && this.config.mobile.scrollLock) {
861
873
  document.body.classList.add('weld-mobile-open');
@@ -887,7 +899,21 @@ class IframeManager {
887
899
  iframe.visible = false;
888
900
  iframe.container.setAttribute('data-state', type === IframeType.BACKDROP ? 'hidden' : 'closed');
889
901
  iframe.container.style.pointerEvents = 'none';
890
- iframe.container.style.display = 'none';
902
+ // Animate close for widget on desktop, then hide after animation
903
+ if (type === IframeType.WIDGET && !this.deviceInfo.isMobile) {
904
+ // Animate to hidden state
905
+ iframe.container.style.opacity = '0';
906
+ iframe.container.style.transform = 'scale(0.95) translateY(10px)';
907
+ // Hide after transition completes
908
+ setTimeout(() => {
909
+ if (!iframe.visible) {
910
+ iframe.container.style.display = 'none';
911
+ }
912
+ }, 200);
913
+ }
914
+ else {
915
+ iframe.container.style.display = 'none';
916
+ }
891
917
  // Remove mobile scroll lock
892
918
  if (this.deviceInfo.isMobile && type === IframeType.WIDGET) {
893
919
  document.body.classList.remove('weld-mobile-open');
@@ -2217,7 +2243,7 @@ class StateCoordinator {
2217
2243
  }
2218
2244
  }
2219
2245
 
2220
- var version = "1.0.7";
2246
+ var version = "1.0.9";
2221
2247
  var packageJson = {
2222
2248
  version: version};
2223
2249