codexly-ui 0.1.20 → 0.1.21
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/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -11806,6 +11806,8 @@ class ClxAppLayoutComponent {
|
|
|
11806
11806
|
const shadow = collapsed && hovered ? 'shadow-2xl' : '';
|
|
11807
11807
|
return `relative z-30 ${width} ${base} transition-[width] duration-300 ease-in-out ${shadow}`;
|
|
11808
11808
|
}, ...(ngDevMode ? [{ debugName: "_sidebarCls" }] : /* istanbul ignore next */ []));
|
|
11809
|
+
_nativeSetTimeout;
|
|
11810
|
+
_nativeClearTimeout;
|
|
11809
11811
|
_mql;
|
|
11810
11812
|
_mqlListener;
|
|
11811
11813
|
_resizeTimer = null;
|
|
@@ -11817,6 +11819,10 @@ class ClxAppLayoutComponent {
|
|
|
11817
11819
|
const win = this._document.defaultView;
|
|
11818
11820
|
if (!win)
|
|
11819
11821
|
return;
|
|
11822
|
+
// Use native (non-Zone-patched) timers so the resize debounce
|
|
11823
|
+
// does not trigger Angular change detection cycles
|
|
11824
|
+
this._nativeSetTimeout = win.__zone_symbol__setTimeout ?? win.setTimeout.bind(win);
|
|
11825
|
+
this._nativeClearTimeout = win.__zone_symbol__clearTimeout ?? win.clearTimeout.bind(win);
|
|
11820
11826
|
this._mql = win.matchMedia('(min-width: 1024px)');
|
|
11821
11827
|
this._isMobile.set(!this._mql.matches);
|
|
11822
11828
|
if (this._mql.matches)
|
|
@@ -11836,12 +11842,12 @@ class ClxAppLayoutComponent {
|
|
|
11836
11842
|
};
|
|
11837
11843
|
this._mql.addEventListener('change', this._mqlListener);
|
|
11838
11844
|
this._zone.runOutsideAngular(() => {
|
|
11839
|
-
// Suppress all transitions during resize
|
|
11845
|
+
// Suppress all transitions during resize using native (non-Zone-patched) timer
|
|
11840
11846
|
this._resizeListener = () => {
|
|
11841
11847
|
this._document.documentElement.classList.add('clx-resizing');
|
|
11842
11848
|
if (this._resizeTimer !== null)
|
|
11843
|
-
|
|
11844
|
-
this._resizeTimer =
|
|
11849
|
+
this._nativeClearTimeout(this._resizeTimer);
|
|
11850
|
+
this._resizeTimer = this._nativeSetTimeout(() => {
|
|
11845
11851
|
this._document.documentElement.classList.remove('clx-resizing');
|
|
11846
11852
|
this._resizeTimer = null;
|
|
11847
11853
|
}, 150);
|
|
@@ -11866,8 +11872,8 @@ class ClxAppLayoutComponent {
|
|
|
11866
11872
|
});
|
|
11867
11873
|
}
|
|
11868
11874
|
};
|
|
11869
|
-
// Attach after a tick so the aside is rendered
|
|
11870
|
-
|
|
11875
|
+
// Attach after a tick so the aside is rendered (native timer — no CD)
|
|
11876
|
+
this._nativeSetTimeout(() => {
|
|
11871
11877
|
const host = this._el.nativeElement;
|
|
11872
11878
|
this._sidebarEl = host.querySelector('aside');
|
|
11873
11879
|
if (this._sidebarEl) {
|
|
@@ -11882,7 +11888,7 @@ class ClxAppLayoutComponent {
|
|
|
11882
11888
|
const win = this._document.defaultView;
|
|
11883
11889
|
win?.removeEventListener('resize', this._resizeListener);
|
|
11884
11890
|
if (this._resizeTimer !== null)
|
|
11885
|
-
|
|
11891
|
+
this._nativeClearTimeout?.(this._resizeTimer);
|
|
11886
11892
|
if (this._sidebarEl) {
|
|
11887
11893
|
this._sidebarEl.removeEventListener('mouseenter', this._mouseEnterFn);
|
|
11888
11894
|
this._sidebarEl.removeEventListener('mouseleave', this._mouseLeaveFn);
|