@gem-sdk/swiper 0.0.21-dev.1 → 0.0.22-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.21-dev.1
2
+ * Swiper 0.0.22-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: April 6, 2026
10
+ * Released on: April 8, 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.21-dev.1
2
+ * Swiper 0.0.22-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: April 6, 2026
10
+ * Released on: April 8, 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.21-dev.1
2
+ * Swiper 0.0.22-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: April 6, 2026
10
+ * Released on: April 8, 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.21-dev.1
2
+ * Swiper 0.0.22-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: April 6, 2026
10
+ * Released on: April 8, 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.21-dev.1
2
+ * Swiper Custom Element 0.0.22-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: April 6, 2026
10
+ * Released on: April 8, 2026
11
11
  */
12
12
 
13
13
  (function () {
@@ -1680,7 +1680,21 @@
1680
1680
  }
1681
1681
 
1682
1682
  function maxTranslate() {
1683
- return -this.snapGrid[this.snapGrid.length - 1];
1683
+ const {
1684
+ params,
1685
+ snapGrid
1686
+ } = this;
1687
+ const physicalMax = -snapGrid[snapGrid.length - 1];
1688
+ if (!params?.centeredSlides || !params?.isSneakPeekCenter) {
1689
+ return physicalMax;
1690
+ }
1691
+
1692
+ // For sneak-peek centered mode in this project, the last snap is a trailing buffer.
1693
+ // Use penultimate snap as logical max to prevent extra end movement.
1694
+ if (snapGrid.length >= 2) {
1695
+ return -snapGrid[snapGrid.length - 2];
1696
+ }
1697
+ return physicalMax;
1684
1698
  }
1685
1699
 
1686
1700
  function translateTo(translate, speed, runCallbacks, translateBounds, internal) {
@@ -3297,7 +3311,19 @@
3297
3311
  if (params.cssMode) return;
3298
3312
 
3299
3313
  // Find current slide
3300
- const swipeToLast = currentPos >= -swiper.maxTranslate() && !swiper.params.loop;
3314
+ const logicalMaxTranslate = swiper.maxTranslate();
3315
+ const swipeToLast = currentPos >= -logicalMaxTranslate && !swiper.params.loop;
3316
+ let logicalLastStopIndex = slidesGrid.length - 1;
3317
+ if (params.centeredSlides && params.isSneakPeekCenter) {
3318
+ let slidesPerView = params.slidesPerView;
3319
+ if (slidesPerView === 'auto') {
3320
+ slidesPerView = swiper.slidesPerViewDynamic();
3321
+ } else {
3322
+ slidesPerView = Math.ceil(parseFloat(params.slidesPerView, 10));
3323
+ }
3324
+ slidesPerView = Math.max(slidesPerView, 1);
3325
+ logicalLastStopIndex = Math.max(slidesGrid.length - slidesPerView, 0);
3326
+ }
3301
3327
  let stopIndex = 0;
3302
3328
  let groupSize = swiper.slidesSizesGrid[0];
3303
3329
  for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) {
@@ -3312,6 +3338,11 @@
3312
3338
  groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];
3313
3339
  }
3314
3340
  }
3341
+ if (swipeToLast && stopIndex > logicalLastStopIndex) {
3342
+ stopIndex = logicalLastStopIndex;
3343
+ const nextLogicalIndex = Math.min(logicalLastStopIndex + 1, slidesGrid.length - 1);
3344
+ groupSize = slidesGrid[nextLogicalIndex] - slidesGrid[logicalLastStopIndex] || groupSize;
3345
+ }
3315
3346
  let rewindFirstIndex = null;
3316
3347
  let rewindLastIndex = null;
3317
3348
  if (params.rewind) {
@@ -3823,12 +3854,11 @@
3823
3854
  isLocked: wasLocked,
3824
3855
  params
3825
3856
  } = swiper;
3826
- const {
3827
- slidesOffsetBefore
3828
- } = params;
3829
- if (slidesOffsetBefore) {
3857
+ const offsetBefore = params.slidesOffsetBefore || 0;
3858
+ const offsetAfter = params.slidesOffsetAfter || 0;
3859
+ if (offsetBefore > 0 || offsetAfter > 0) {
3830
3860
  const lastSlideIndex = swiper.slides.length - 1;
3831
- const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2;
3861
+ const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + offsetBefore + offsetAfter;
3832
3862
  swiper.isLocked = swiper.size > lastSlideRightEdge;
3833
3863
  } else {
3834
3864
  swiper.isLocked = swiper.snapGrid.length === 1;
@@ -9999,7 +10029,7 @@
9999
10029
  }
10000
10030
 
10001
10031
  /**
10002
- * Swiper 0.0.21-dev.1
10032
+ * Swiper 0.0.22-dev.1
10003
10033
  * Gem SDK - Swiper, Customized of swiper
10004
10034
  * https://swiperjs.com
10005
10035
  *
@@ -10007,7 +10037,7 @@
10007
10037
  *
10008
10038
  * Released under the MIT License
10009
10039
  *
10010
- * Released on: April 6, 2026
10040
+ * Released on: April 8, 2026
10011
10041
  */
10012
10042
 
10013
10043
 
@@ -10341,7 +10371,7 @@
10341
10371
  }
10342
10372
 
10343
10373
  /**
10344
- * Swiper Custom Element 0.0.21-dev.1
10374
+ * Swiper Custom Element 0.0.22-dev.1
10345
10375
  * Gem SDK - Swiper, Customized of swiper
10346
10376
  * https://swiperjs.com
10347
10377
  *
@@ -10349,7 +10379,7 @@
10349
10379
  *
10350
10380
  * Released under the MIT License
10351
10381
  *
10352
- * Released on: April 6, 2026
10382
+ * Released on: April 8, 2026
10353
10383
  */
10354
10384
 
10355
10385