@haiilo/catalyst 10.32.2 → 10.33.2

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.
@@ -10976,11 +10976,12 @@ const CatScrollable = class {
10976
10976
  this.attachEmitter('top', this.scrolledTop);
10977
10977
  merge(this.init, this.scrolled, this.resizedEntries)
10978
10978
  .pipe(auditTime(CatScrollable.THROTTLE), map(() => ({
10979
- top: this.getScrollOffset('top') > 0,
10980
- left: this.getScrollOffset('left') > 0,
10981
- right: this.getScrollOffset('right') > 0,
10982
- bottom: this.getScrollOffset('bottom') > 0
10983
- })), distinctUntilChanged(), takeUntil(this.destroyed))
10979
+ // 5px used to avoid shadow bug on Windows
10980
+ top: this.getScrollOffset('top') > 5,
10981
+ left: this.getScrollOffset('left') > 5,
10982
+ right: this.getScrollOffset('right') > 5,
10983
+ bottom: this.getScrollOffset('bottom') > 5
10984
+ })), takeUntil(this.destroyed))
10984
10985
  .subscribe(({ top, left, right, bottom }) => {
10985
10986
  this.toggleClass('cat-scrollable-top', top);
10986
10987
  this.toggleClass('cat-scrollable-left', left);
@@ -11001,18 +11002,29 @@ const CatScrollable = class {
11001
11002
  }
11002
11003
  render() {
11003
11004
  return [
11004
- index.h("div", { key: 'd2c0966e736fe4da66b4ff4c17ce51b914bc4b8d', class: "scrollable-wrapper", ref: el => (this.scrollWrapperElement = el) }, !this.noShadowY && index.h("div", { key: 'a0b25b995b5f75d1c09d4dc982ceebe9a8c904b8', class: "shadow-top" }), !this.noShadowX && index.h("div", { key: '02e550e37511bff64e9c8c2bd09c41858fdd3930', class: "shadow-left" }), !this.noShadowX && index.h("div", { key: 'debb835bfcf815837e14b1378190e90a243a1af5', class: "shadow-right" }), !this.noShadowY && index.h("div", { key: 'd646f92372ab80246f0164c672812854d6c1c946', class: "shadow-bottom" })),
11005
- index.h("div", { key: 'e24d26d9c11070b8b0d5a66da3bcaeb12bf3532c', ref: el => (this.scrollElement = el), class: {
11005
+ index.h("div", { key: '8153419d11ba30f6360acb82b87ac62727248599', class: "scrollable-wrapper", ref: el => (this.scrollWrapperElement = el) }, !this.noShadowY && index.h("div", { key: '3374f51499e735a692ccd8e0f9bea23c0132b47d', class: "shadow-top" }), !this.noShadowX && index.h("div", { key: 'd208685280ae658baf5672003141ab9349d0feef', class: "shadow-left" }), !this.noShadowX && index.h("div", { key: '0404d0cd8afbaac6ac9d89947ce9fbd91c7929f6', class: "shadow-right" }), !this.noShadowY && index.h("div", { key: '539c15c633403f03e4fc36c1fb1d86e498c8d9cc', class: "shadow-bottom" })),
11006
+ index.h("div", { key: '0ea3a47900df0689a73a5c440a8774ca04edf4ad', ref: el => (this.scrollElement = el), class: {
11006
11007
  'scrollable-content': true,
11007
11008
  'scroll-x': !this.noOverflowX,
11008
11009
  'scroll-y': !this.noOverflowY,
11009
11010
  'no-overscroll': this.noOverscroll
11010
- } }, index.h("slot", { key: '6923a1a06201e1997c80af316d57d0654312dca4' }))
11011
+ } }, index.h("slot", { key: '9c10382fc5f4773242738be4070af6bd5ce2e2d3' }))
11011
11012
  ];
11012
11013
  }
11013
11014
  attachEmitter(from, emitter) {
11014
11015
  merge(this.init, this.scrolled, this.resizedEntries)
11015
- .pipe(auditTime(CatScrollable.THROTTLE), map(() => this.getScrollOffset(from)), map(offset => offset <= this.scrolledBuffer), distinctUntilChanged(), filter(isLower => isLower), takeUntil(this.destroyed))
11016
+ .pipe(auditTime(CatScrollable.THROTTLE), map(() => this.getScrollOffset(from)), map(offset => offset <= this.scrolledBuffer), filter(isLower => isLower), map(() => {
11017
+ switch (from) {
11018
+ case 'top':
11019
+ return this.getScrollOffset('bottom');
11020
+ case 'left':
11021
+ return this.getScrollOffset('right');
11022
+ case 'right':
11023
+ return this.getScrollOffset('left');
11024
+ case 'bottom':
11025
+ return this.getScrollOffset('top');
11026
+ }
11027
+ }), distinctUntilChanged(), takeUntil(this.destroyed))
11016
11028
  .subscribe(() => emitter.emit());
11017
11029
  }
11018
11030
  getScrollOffset(from) {