@gem-sdk/swiper 0.0.18-dev.1 → 0.0.20-dev.1

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Swiper 0.0.18-dev.1
2
+ * Swiper 0.0.20-dev.1
3
3
  * Gem SDK - Swiper, Customized of swiper
4
4
  * https://swiperjs.com
5
5
  *
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Released under the MIT License
9
9
  *
10
- * Released on: March 25, 2026
10
+ * Released on: April 6, 2026
11
11
  */
12
12
 
13
13
  import{S as Swiper}from"./shared/swiper-core.min.mjs";import Virtual from"./modules/virtual.min.mjs";import Keyboard from"./modules/keyboard.min.mjs";import Mousewheel from"./modules/mousewheel.min.mjs";import Navigation from"./modules/navigation.min.mjs";import Pagination from"./modules/pagination.min.mjs";import Scrollbar from"./modules/scrollbar.min.mjs";import Parallax from"./modules/parallax.min.mjs";import Zoom from"./modules/zoom.min.mjs";import Controller from"./modules/controller.min.mjs";import A11y from"./modules/a11y.min.mjs";import History from"./modules/history.min.mjs";import HashNavigation from"./modules/hash-navigation.min.mjs";import Autoplay from"./modules/autoplay.min.mjs";import Thumb from"./modules/thumbs.min.mjs";import freeMode from"./modules/free-mode.min.mjs";import Grid from"./modules/grid.min.mjs";import Manipulation from"./modules/manipulation.min.mjs";import EffectFade from"./modules/effect-fade.min.mjs";import EffectCube from"./modules/effect-cube.min.mjs";import EffectFlip from"./modules/effect-flip.min.mjs";import EffectCoverflow from"./modules/effect-coverflow.min.mjs";import EffectCreative from"./modules/effect-creative.min.mjs";import EffectCards from"./modules/effect-cards.min.mjs";const modules=[Virtual,Keyboard,Mousewheel,Navigation,Pagination,Scrollbar,Parallax,Zoom,Controller,A11y,History,HashNavigation,Autoplay,Thumb,freeMode,Grid,Manipulation,EffectFade,EffectCube,EffectFlip,EffectCoverflow,EffectCreative,EffectCards];Swiper.use(modules);export{Swiper,Swiper as default};
package/swiper-bundle.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Swiper 0.0.18-dev.1
2
+ * Swiper 0.0.20-dev.1
3
3
  * Gem SDK - Swiper, Customized of swiper
4
4
  * https://swiperjs.com
5
5
  *
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Released under the MIT License
9
9
  *
10
- * Released on: March 25, 2026
10
+ * Released on: April 6, 2026
11
11
  */
12
12
 
13
13
  import { S as Swiper } from './shared/swiper-core.mjs';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Swiper 0.0.18-dev.1
2
+ * Swiper 0.0.20-dev.1
3
3
  * Gem SDK - Swiper, Customized of swiper
4
4
  * https://swiperjs.com
5
5
  *
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Released under the MIT License
9
9
  *
10
- * Released on: March 25, 2026
10
+ * Released on: April 6, 2026
11
11
  */
12
12
 
13
13
  export{c as createShadow}from"./shared/create-shadow.min.mjs";export{e as effectInit}from"./shared/effect-init.min.mjs";export{e as effectTarget}from"./shared/effect-target.min.mjs";export{e as effectVirtualTransitionEnd}from"./shared/effect-virtual-transition-end.min.mjs";export{g as getSlideTransformEl}from"./shared/utils.min.mjs";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Swiper 0.0.18-dev.1
2
+ * Swiper 0.0.20-dev.1
3
3
  * Gem SDK - Swiper, Customized of swiper
4
4
  * https://swiperjs.com
5
5
  *
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Released under the MIT License
9
9
  *
10
- * Released on: March 25, 2026
10
+ * Released on: April 6, 2026
11
11
  */
12
12
 
13
13
  export { c as createShadow } from './shared/create-shadow.mjs';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Swiper Custom Element 0.0.18-dev.1
2
+ * Swiper Custom Element 0.0.20-dev.1
3
3
  * Gem SDK - Swiper, Customized of swiper
4
4
  * https://swiperjs.com
5
5
  *
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Released under the MIT License
9
9
  *
10
- * Released on: March 25, 2026
10
+ * Released on: April 6, 2026
11
11
  */
12
12
 
13
13
  (function () {
@@ -2540,7 +2540,7 @@
2540
2540
  }
2541
2541
  if (params.watchSlidesProgress) {
2542
2542
  swiper.updateSlidesOffset({
2543
- isCalculatedFromUpdateSlides: params.slidesPerView === 'auto'
2543
+ isCalculatedFromUpdateSlides: initial
2544
2544
  });
2545
2545
  }
2546
2546
  if (slideTo) {
@@ -3652,6 +3652,52 @@
3652
3652
  swiper.emit('breakpoint', breakpointParams);
3653
3653
  }
3654
3654
 
3655
+ const WINDOW_RESIZE_TIMEOUT = 50;
3656
+ class ScreenSize {
3657
+ constructor() {
3658
+ if (ScreenSize.instance) {
3659
+ return ScreenSize.instance;
3660
+ }
3661
+ this.updateScreenSize();
3662
+ window.addEventListener('resize', this.debounceResize);
3663
+ window.addEventListener('orientationchange', this.orientationChangeHandler);
3664
+ }
3665
+ updateScreenSize() {
3666
+ this._width = window.innerWidth;
3667
+ this._height = window.innerHeight;
3668
+ }
3669
+ getScreenSize() {
3670
+ return {
3671
+ width: this._width,
3672
+ height: this._height
3673
+ };
3674
+ }
3675
+ orientationChangeHandler() {
3676
+ this.updateScreenSize();
3677
+ }
3678
+ debounceResize() {
3679
+ if (this.resizeTimeout) {
3680
+ clearTimeout(this.resizeTimeout);
3681
+ }
3682
+ this.resizeTimeout = setTimeout(() => {
3683
+ this.updateScreenSize();
3684
+ }, WINDOW_RESIZE_TIMEOUT);
3685
+ }
3686
+ destroy() {
3687
+ if (this.resizeTimeout) {
3688
+ clearTimeout(this.resizeTimeout);
3689
+ }
3690
+ window.removeEventListener('resize', this.debounceResize);
3691
+ window.removeEventListener('orientationchange', this.orientationChangeHandler);
3692
+ }
3693
+ }
3694
+ ScreenSize.getInstance = () => {
3695
+ if (!ScreenSize.instance) {
3696
+ ScreenSize.instance = new ScreenSize();
3697
+ }
3698
+ return ScreenSize.instance;
3699
+ };
3700
+
3655
3701
  function getBreakpoint(breakpoints, base, containerEl) {
3656
3702
  if (base === void 0) {
3657
3703
  base = 'window';
@@ -3659,11 +3705,18 @@
3659
3705
  if (!breakpoints || base === 'container' && !containerEl) return undefined;
3660
3706
  let breakpoint = false;
3661
3707
  const window = getWindow();
3662
- const currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight;
3708
+ const shouldUseWindowSize = base === 'window';
3709
+ const containerElSize = shouldUseWindowSize ? {
3710
+ width: 0,
3711
+ height: 0
3712
+ } : {
3713
+ width: containerEl.clientWidth,
3714
+ height: containerEl.clientHeight
3715
+ };
3663
3716
  const points = Object.keys(breakpoints).map(point => {
3664
3717
  if (typeof point === 'string' && point.indexOf('@') === 0) {
3665
3718
  const minRatio = parseFloat(point.substr(1));
3666
- const value = currentHeight * minRatio;
3719
+ const value = (shouldUseWindowSize ? ScreenSize.getInstance().getScreenSize().height : containerElSize.height) * minRatio;
3667
3720
  return {
3668
3721
  value,
3669
3722
  point
@@ -3680,11 +3733,11 @@
3680
3733
  point,
3681
3734
  value
3682
3735
  } = points[i];
3683
- if (base === 'window') {
3736
+ if (shouldUseWindowSize) {
3684
3737
  if (window.matchMedia(`(min-width: ${value}px)`).matches) {
3685
3738
  breakpoint = point;
3686
3739
  }
3687
- } else if (value <= containerEl.clientWidth) {
3740
+ } else if (value <= containerElSize.width) {
3688
3741
  breakpoint = point;
3689
3742
  }
3690
3743
  }
@@ -9936,7 +9989,7 @@
9936
9989
  }
9937
9990
 
9938
9991
  /**
9939
- * Swiper 0.0.18-dev.1
9992
+ * Swiper 0.0.20-dev.1
9940
9993
  * Gem SDK - Swiper, Customized of swiper
9941
9994
  * https://swiperjs.com
9942
9995
  *
@@ -9944,7 +9997,7 @@
9944
9997
  *
9945
9998
  * Released under the MIT License
9946
9999
  *
9947
- * Released on: March 25, 2026
10000
+ * Released on: April 6, 2026
9948
10001
  */
9949
10002
 
9950
10003
 
@@ -10278,7 +10331,7 @@
10278
10331
  }
10279
10332
 
10280
10333
  /**
10281
- * Swiper Custom Element 0.0.18-dev.1
10334
+ * Swiper Custom Element 0.0.20-dev.1
10282
10335
  * Gem SDK - Swiper, Customized of swiper
10283
10336
  * https://swiperjs.com
10284
10337
  *
@@ -10286,7 +10339,7 @@
10286
10339
  *
10287
10340
  * Released under the MIT License
10288
10341
  *
10289
- * Released on: March 25, 2026
10342
+ * Released on: April 6, 2026
10290
10343
  */
10291
10344
 
10292
10345