infinity-forge 0.54.7 → 0.54.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.
@@ -0,0 +1,1092 @@
1
+ import type { A11yOptions } from './modules/a11y.js';
2
+ import type { AutoplayOptions } from './modules/autoplay.js';
3
+ import type { ControllerOptions } from './modules/controller.js';
4
+ import type { CoverflowEffectOptions } from './modules/effect-coverflow.js';
5
+ import type { CubeEffectOptions } from './modules/effect-cube.js';
6
+ import type { FadeEffectOptions } from './modules/effect-fade.js';
7
+ import type { FlipEffectOptions } from './modules/effect-flip.js';
8
+ import type { CreativeEffectOptions } from './modules/effect-creative.js';
9
+ import type { CardsEffectOptions } from './modules/effect-cards.js';
10
+ import type { HashNavigationOptions } from './modules/hash-navigation.js';
11
+ import type { HistoryOptions } from './modules/history.js';
12
+ import type { KeyboardOptions } from './modules/keyboard.js';
13
+ import type { MousewheelOptions } from './modules/mousewheel.js';
14
+ import type { NavigationOptions } from './modules/navigation.js';
15
+ import type { PaginationOptions } from './modules/pagination.js';
16
+ import type { ParallaxOptions } from './modules/parallax.js';
17
+ import type { ScrollbarOptions } from './modules/scrollbar.js';
18
+ import type { ThumbsOptions } from './modules/thumbs.js';
19
+ import type { VirtualOptions } from './modules/virtual.js';
20
+ import type { ZoomOptions } from './modules/zoom.js';
21
+ import type { FreeModeOptions } from './modules/free-mode.js';
22
+ import type { GridOptions } from './modules/grid.js';
23
+ import type { CSSSelector, SwiperModule } from './shared.js';
24
+ import type { SwiperEvents } from './swiper-events.js';
25
+ export interface SwiperOptions {
26
+ /**
27
+ * Array with Swiper modules
28
+ *
29
+ * @example
30
+ * ```js
31
+ * import Swiper from 'swiper';
32
+ * import { Navigation, Pagination } from 'swiper/modules';
33
+ *
34
+ * const swiper = new Swiper('.swiper', {
35
+ * modules: [ Navigation, Pagination ],
36
+ * });
37
+ * ```
38
+ */
39
+ modules?: SwiperModule[];
40
+ /**
41
+ * Inject text styles to the shadow DOM. Only for usage with Swiper Element
42
+ *
43
+ */
44
+ injectStyles?: string[];
45
+ /**
46
+ * Inject styles `<link>`s to the shadow DOM. Only for usage with Swiper Element
47
+ *
48
+ */
49
+ injectStylesUrls?: string[];
50
+ /**
51
+ * Whether Swiper should be initialised automatically when you create an instance.
52
+ * If disabled, then you need to init it manually by calling `swiper.init()`
53
+ *
54
+ * @default true
55
+ */
56
+ init?: boolean;
57
+ /**
58
+ * Whether Swiper initially enabled. When Swiper is disabled, it will hide all navigation elements and won't respond to any events and interactions
59
+ *
60
+ * @default true
61
+ */
62
+ enabled?: boolean;
63
+ /**
64
+ * Swiper will recalculate slides position on window resize (orientationchange)
65
+ *
66
+ * @default true
67
+ */
68
+ updateOnWindowResize?: boolean;
69
+ /**
70
+ * When enabled it will use ResizeObserver (if supported by browser) on swiper container to detect container resize (instead of watching for window resize)
71
+ *
72
+ * @default true
73
+ */
74
+ resizeObserver?: boolean;
75
+ /**
76
+ * Index number of initial slide.
77
+ *
78
+ * @default 0
79
+ */
80
+ initialSlide?: number;
81
+ /**
82
+ * Can be `'horizontal'` or `'vertical'` (for vertical slider).
83
+ *
84
+ * @default 'horizontal'
85
+ */
86
+ direction?: 'horizontal' | 'vertical';
87
+ /**
88
+ * When enabled, will swipe slides only forward (one-way) regardless of swipe direction
89
+ *
90
+ * @default false
91
+ */
92
+ oneWayMovement?: boolean;
93
+ /**
94
+ * The name of the swiper element node name; used for detecting web component rendering
95
+ *
96
+ * @default 'SWIPER-CONTAINER'
97
+ */
98
+ swiperElementNodeName?: string;
99
+ /**
100
+ * Duration of transition between slides (in ms)
101
+ *
102
+ * @default 300
103
+ */
104
+ speed?: number;
105
+ /**
106
+ * Enabled this option and plugin will set width/height on swiper wrapper equal to total size of all slides.
107
+ * Mostly should be used as compatibility fallback option for browser that don't support flexbox layout well
108
+ *
109
+ * @default false
110
+ */
111
+ setWrapperSize?: boolean;
112
+ /**
113
+ * Enabled this option and swiper will be operated as usual except it will not move, real translate values on wrapper will not be set.
114
+ * Useful when you may need to create custom slide transition
115
+ *
116
+ * @default false
117
+ */
118
+ virtualTranslate?: boolean;
119
+ /**
120
+ * Swiper width (in px). Parameter allows to force Swiper width.
121
+ * Useful only if you initialize Swiper when it is hidden and in SSR and Test environments for correct Swiper initialization
122
+ *
123
+ * @default null
124
+ *
125
+ * @note Setting this parameter will make Swiper not responsive
126
+ */
127
+ width?: number | null;
128
+ /**
129
+ * Swiper height (in px). Parameter allows to force Swiper height.
130
+ * Useful only if you initialize Swiper when it is hidden and in SSR and Test environments for correct Swiper initialization
131
+ *
132
+ * @default null
133
+ *
134
+ * @note Setting this parameter will make Swiper not responsive
135
+ */
136
+ height?: number | null;
137
+ /**
138
+ * Set to `true` and slider wrapper will adapt its height to the height of the currently active slide
139
+ *
140
+ * @default false
141
+ */
142
+ autoHeight?: boolean;
143
+ /**
144
+ * Set to `true` to round values of slides width and height to prevent blurry texts on usual
145
+ * resolution screens (if you have such)
146
+ *
147
+ * @default false
148
+ */
149
+ roundLengths?: boolean;
150
+ /**
151
+ * Set to `true` on Swiper for correct touch events interception. Use only on
152
+ * swipers that use same direction as the parent one
153
+ *
154
+ * @default false
155
+ */
156
+ nested?: boolean;
157
+ /**
158
+ * When enabled Swiper will automatically wrap slides with swiper-wrapper element,
159
+ * and will create required elements for navigation, pagination and scrollbar
160
+ * they are enabled (with their respective params object or with boolean `true`))
161
+ *
162
+ * @default false
163
+ */
164
+ createElements?: boolean;
165
+ /**
166
+ * Event name prefix for all DOM events emitted by Swiper Element (web component)
167
+ *
168
+ * @default `swiper`
169
+ */
170
+ eventsPrefix?: string;
171
+ /**
172
+ * CSS selector for focusable elements. Swiping will be disabled on such elements if they are "focused"
173
+ *
174
+ * @default 'input, select, option, textarea, button, video, label'
175
+ */
176
+ focusableElements?: string;
177
+ /**
178
+ * If enabled (by default) and navigation elements' parameters passed as a string (like `".pagination"`)
179
+ * then Swiper will look for such elements through child elements first.
180
+ * Applies for pagination, prev/next buttons and scrollbar elements
181
+ *
182
+ * @default true
183
+ */
184
+ uniqueNavElements?: boolean;
185
+ /**
186
+ * Transition effect. Can be `'slide'`, `'fade'`, `'cube'`, `'coverflow'`, `'flip'`, `'creative'` or `'cards'`
187
+ *
188
+ * @default 'slide'
189
+ */
190
+ effect?: 'slide' | 'fade' | 'cube' | 'coverflow' | 'flip' | 'creative' | 'cards' | string;
191
+ /**
192
+ * Fire Transition/SlideChange/Start/End events on swiper initialization.
193
+ * Such events will be fired on initialization in case of your initialSlide is not 0, or you use loop mode
194
+ *
195
+ * @default true
196
+ */
197
+ runCallbacksOnInit?: boolean;
198
+ /**
199
+ * When enabled Swiper will be disabled and hide navigation buttons on
200
+ * case there are not enough slides for sliding.
201
+ *
202
+ * @default true
203
+ */
204
+ watchOverflow?: boolean;
205
+ /**
206
+ * userAgent string. Required for browser/device detection when rendered on server-side
207
+ *
208
+ * @default null
209
+ */
210
+ userAgent?: string | null;
211
+ /**
212
+ * Required for active slide detection when rendered on server-side and enabled history
213
+ *
214
+ * @default null
215
+ */
216
+ url?: string | null;
217
+ /**
218
+ * Register event handlers
219
+ */
220
+ on?: {
221
+ [event in keyof SwiperEvents]?: SwiperEvents[event];
222
+ };
223
+ /**
224
+ * Add event listener that will be fired on all events
225
+ *
226
+ * @example
227
+ * ```js
228
+ * const swiper = new Swiper('.swiper', {
229
+ * onAny(eventName, ...args) {
230
+ * console.log('Event: ', eventName);
231
+ * console.log('Event data: ', args);
232
+ * }
233
+ * });
234
+ * ```
235
+ */
236
+ onAny?(handler: (eventName: string, ...args: any[]) => void): void;
237
+ /**
238
+ * When enabled it will use modern CSS Scroll Snap API.
239
+ * It doesn't support all of Swiper's features, but potentially should bring a much better performance in simple configurations.
240
+ *
241
+ * This is what is not supported when it is enabled:
242
+ *
243
+ * - Cube effect
244
+ * - `speed` parameter may not have no effect
245
+ * - All transition start/end related events (use `slideChange` instead)
246
+ * - `slidesPerGroup` has limited support
247
+ * - `simulateTouch` doesn't have effect and "dragging" with mouse doesn't work
248
+ * - `resistance` doesn't have any effect
249
+ * - `allowSlidePrev/Next`
250
+ * - `swipeHandler`
251
+ *
252
+ * In case if you use it with other effects, especially 3D effects, it is required to wrap slide's content with `<div class="swiper-slide-transform">` element. And if you use any custom styles on slides (like background colors, border radius, border, etc.), they should be set on `swiper-slide-transform` element instead.
253
+ *
254
+ * @example
255
+ * ```html
256
+ * <div class="swiper">
257
+ * <div class="swiper-wrapper">
258
+ * <div class="swiper-slide">
259
+ * <!-- wrap slide content with transform element -->
260
+ * <div class="swiper-slide-transform">
261
+ * ... slide content ...
262
+ * </div>
263
+ * </div>
264
+ * ...
265
+ * </div>
266
+ * </div>
267
+ * <script>
268
+ * const swiper = new Swiper('.swiper', {
269
+ * effect: 'flip',
270
+ * cssMode: true,
271
+ * });
272
+ * </script>
273
+ * ```
274
+ *
275
+ * @default false
276
+ */
277
+ cssMode?: boolean;
278
+ /**
279
+ * Distance between slides in px.
280
+ *
281
+ * @default 0
282
+ *
283
+ * @note If you use "margin" css property to the elements which go into Swiper in which you pass "spaceBetween" into, navigation might not work properly.
284
+ */
285
+ spaceBetween?: number | string;
286
+ /**
287
+ * Number of slides per view (slides visible at the same time on slider's container).
288
+ * @note `slidesPerView: 'auto'` is currently not compatible with multirow mode, when `grid.rows` > 1
289
+ *
290
+ * @default 1
291
+ */
292
+ slidesPerView?: number | 'auto';
293
+ /**
294
+ * If total number of slides less than specified here value, then Swiper will enable `backface-visibility: hidden` on slide elements to reduce visual "flicker" in Safari.
295
+ *
296
+ * @note It is not recommended to enable it on large amount of slides as it will reduce performance
297
+ *
298
+ * @default 10
299
+ */
300
+ maxBackfaceHiddenSlides?: number;
301
+ /**
302
+ * Set numbers of slides to define and enable group sliding. Useful to use with slidesPerView > 1
303
+ *
304
+ * @default 1
305
+ */
306
+ slidesPerGroup?: number;
307
+ /**
308
+ * The parameter works in the following way: If `slidesPerGroupSkip` equals `0` (default), no slides are excluded from grouping, and the resulting behaviour is the same as without this change.
309
+ *
310
+ * If `slidesPerGroupSkip` is equal or greater than `1` the first X slides are treated as single groups, whereas all following slides are grouped by the `slidesPerGroup` value.
311
+ *
312
+ * @default 0
313
+ */
314
+ slidesPerGroupSkip?: number;
315
+ /**
316
+ * This param intended to be used only with `slidesPerView: 'auto'` and `slidesPerGroup: 1`. When enabled, it will skip all slides in view on `.slideNext()` & `.slidePrev()` methods calls, on Navigation "buttons" clicks and in autoplay.
317
+ *
318
+ * @default false
319
+ */
320
+ slidesPerGroupAuto?: boolean;
321
+ /**
322
+ * If `true`, then active slide will be centered, not always on the left side.
323
+ *
324
+ * @default false
325
+ */
326
+ centeredSlides?: boolean;
327
+ /**
328
+ * If `true`, then active slide will be centered without adding gaps at the beginning and end of slider.
329
+ * Required `centeredSlides: true`. Not intended to be used with `loop` or `pagination`
330
+ *
331
+ * @default false
332
+ */
333
+ centeredSlidesBounds?: boolean;
334
+ /**
335
+ * Add (in px) additional slide offset in the beginning of the container (before all slides)
336
+ *
337
+ * @default 0
338
+ */
339
+ slidesOffsetBefore?: number;
340
+ /**
341
+ * Add (in px) additional slide offset in the end of the container (after all slides)
342
+ *
343
+ * @default 0
344
+ */
345
+ slidesOffsetAfter?: number;
346
+ /**
347
+ * Normalize slide index.
348
+ *
349
+ * @default true
350
+ */
351
+ normalizeSlideIndex?: boolean;
352
+ /**
353
+ * When enabled it center slides if the amount of slides less than `slidesPerView`. Not intended to be used `loop` mode and `grid.rows`
354
+ *
355
+ * @default false
356
+ */
357
+ centerInsufficientSlides?: boolean;
358
+ /**
359
+ * This option may a little improve desktop usability. If `true`, user will see the "grab" cursor when hover on Swiper
360
+ *
361
+ * @default false
362
+ */
363
+ grabCursor?: boolean;
364
+ /**
365
+ * Target element to listen touch events on. Can be `'container'` (to listen for touch events on swiper) or `'wrapper'`
366
+ * (to listen for touch events on swiper-wrapper)
367
+ *
368
+ * @default 'wrapper'
369
+ */
370
+ touchEventsTarget?: 'container' | 'wrapper';
371
+ /**
372
+ * Touch ratio
373
+ *
374
+ * @default 1
375
+ */
376
+ touchRatio?: number;
377
+ /**
378
+ * Allowable angle (in degrees) to trigger touch move
379
+ *
380
+ * @default 45
381
+ */
382
+ touchAngle?: number;
383
+ /**
384
+ * If `true`, Swiper will accept mouse events like touch events (click and drag to change slides)
385
+ *
386
+ * @default true
387
+ */
388
+ simulateTouch?: boolean;
389
+ /**
390
+ * Set to `false` if you want to disable short swipes
391
+ *
392
+ * @default true
393
+ */
394
+ shortSwipes?: boolean;
395
+ /**
396
+ * Set to `false` if you want to disable long swipes
397
+ *
398
+ * @default true
399
+ */
400
+ longSwipes?: boolean;
401
+ /**
402
+ * Ratio to trigger swipe to next/previous slide during long swipes
403
+ *
404
+ * @default 0.5
405
+ */
406
+ longSwipesRatio?: number;
407
+ /**
408
+ * Minimal duration (in ms) to trigger swipe to next/previous slide during long swipes
409
+ *
410
+ * @default 300
411
+ */
412
+ longSwipesMs?: number;
413
+ /**
414
+ * If disabled, then slider will be animated only when you release it, it will not move while you hold your finger on it
415
+ *
416
+ * @default true
417
+ */
418
+ followFinger?: boolean;
419
+ /**
420
+ * If `false`, then the only way to switch the slide is use of external API functions like slidePrev or slideNext
421
+ *
422
+ * @default true
423
+ */
424
+ allowTouchMove?: boolean;
425
+ /**
426
+ * Threshold value in px. If "touch distance" will be lower than this value then swiper will not move
427
+ *
428
+ * @default 5
429
+ */
430
+ threshold?: number;
431
+ /**
432
+ * If disabled, `pointerdown` event won't be prevented
433
+ *
434
+ * @default true
435
+ */
436
+ touchStartPreventDefault?: boolean;
437
+ /**
438
+ * Force to always prevent default for `touchstart` (`pointerdown`) event
439
+ *
440
+ * @default false
441
+ */
442
+ touchStartForcePreventDefault?: boolean;
443
+ /**
444
+ * If enabled, then propagation of "touchmove" will be stopped
445
+ *
446
+ * @default false
447
+ */
448
+ touchMoveStopPropagation?: boolean;
449
+ /**
450
+ * Enable to release Swiper events for swipe-back work in app. If set to `'prevent'` then it will prevent system swipe-back navigation instead. This feature works only with "touch" events (and not pointer events), so it will work on iOS/Android devices and won't work on Windows devices with pointer (touch) events.
451
+ *
452
+ * @default false
453
+ */
454
+ edgeSwipeDetection?: boolean | string;
455
+ /**
456
+ * Area (in px) from left edge of the screen to release touch events for swipe-back in app
457
+ *
458
+ * @default 20
459
+ */
460
+ edgeSwipeThreshold?: number;
461
+ /**
462
+ * Enable to release touch events on slider edge position (beginning, end) to allow for further page scrolling. This feature works only with "touch" events (and not pointer events), so it will work on iOS/Android devices and won't work on Windows devices with pointer events. Also `threshold` parameter must be set to `0`
463
+ *
464
+ * @default false
465
+ */
466
+ touchReleaseOnEdges?: boolean;
467
+ /**
468
+ * Passive event listeners will be used by default where possible to improve scrolling performance on mobile devices.
469
+ * But if you need to use `e.preventDefault` and you have conflict with it, then you should disable this parameter
470
+ *
471
+ * @default true
472
+ */
473
+ passiveListeners?: boolean;
474
+ /**
475
+ * Set to `false` if you want to disable resistant bounds
476
+ *
477
+ * @default true
478
+ */
479
+ resistance?: boolean;
480
+ /**
481
+ * This option allows you to control resistance ratio
482
+ *
483
+ * @default 0.85
484
+ */
485
+ resistanceRatio?: number;
486
+ /**
487
+ * When enabled it won't allow to change slides by swiping or navigation/pagination buttons during transition
488
+ *
489
+ * @default false
490
+ */
491
+ preventInteractionOnTransition?: boolean;
492
+ /**
493
+ * Set to `false` to disable swiping to previous slide direction (to left or top)
494
+ *
495
+ * @default true
496
+ */
497
+ allowSlidePrev?: boolean;
498
+ /**
499
+ * Set to `false` to disable swiping to next slide direction (to right or bottom)
500
+ *
501
+ * @default true
502
+ */
503
+ allowSlideNext?: boolean;
504
+ /**
505
+ * Enable/disable swiping on elements matched to class specified in `noSwipingClass`
506
+ *
507
+ * @default true
508
+ */
509
+ noSwiping?: boolean;
510
+ /**
511
+ * Specify `noSwiping`'s element css class
512
+ *
513
+ * @default 'swiper-no-swiping'
514
+ */
515
+ noSwipingClass?: string;
516
+ /**
517
+ * Can be used instead of `noSwipingClass` to specify elements to disable swiping on.
518
+ * For example `'input'` will disable swiping on all inputs
519
+ *
520
+ * @default
521
+ */
522
+ noSwipingSelector?: string;
523
+ /**
524
+ * String with CSS selector or HTML element of the container with pagination that will work as only available handler for swiping
525
+ *
526
+ * @default null
527
+ */
528
+ swipeHandler?: CSSSelector | HTMLElement | null;
529
+ /**
530
+ * Set to `true` to prevent accidental unwanted clicks on links during swiping
531
+ *
532
+ * @default true
533
+ */
534
+ preventClicks?: boolean;
535
+ /**
536
+ * Set to `true` to stop clicks event propagation on links during swiping
537
+ *
538
+ * @default true
539
+ */
540
+ preventClicksPropagation?: boolean;
541
+ /**
542
+ * Set to `true` and click on any slide will produce transition to this slide
543
+ *
544
+ * @default false
545
+ */
546
+ slideToClickedSlide?: boolean;
547
+ /**
548
+ * Enable this feature to calculate each slides progress and visibility (slides in viewport will have additional visible class)
549
+ *
550
+ * @default false
551
+ */
552
+ watchSlidesProgress?: boolean;
553
+ /**
554
+ * Set to `true` to enable continuous loop mode
555
+ *
556
+ * Because of nature of how the loop mode works (it will rearrange slides), total number of slides must be:
557
+ *
558
+ * - more than or equal to `slidesPerView` + `slidesPerGroup`
559
+ * - even to `slidesPerGroup` (or use `loopAddBlankSlides` parameter)
560
+ * - even to `grid.rows` (or use `loopAddBlankSlides` parameter)
561
+ *
562
+ * @default false
563
+ *
564
+ */
565
+ loop?: boolean;
566
+ /**
567
+ * Automatically adds blank slides if you use Grid or `slidesPerGroup` and the total amount of slides is not even to `slidesPerGroup` or to `grid.rows`
568
+ *
569
+ *
570
+ * @default true
571
+ *
572
+ */
573
+ loopAddBlankSlides?: boolean;
574
+ /**
575
+ * Allows to increase amount of looped slides
576
+ *
577
+ * @default 0
578
+ */
579
+ loopAdditionalSlides?: number;
580
+ /**
581
+ * If enabled then slideNext/Prev will do nothing while slider is animating in loop mode
582
+ *
583
+ * @default true
584
+ */
585
+ loopPreventsSliding?: boolean;
586
+ /**
587
+ * Set to `true` to enable "rewind" mode. When enabled, clicking "next" navigation button (or calling `.slideNext()`) when on last slide will slide back to the first slide. Clicking "prev" navigation button (or calling `.slidePrev()`) when on first slide will slide forward to the last slide.
588
+ *
589
+ * @default false
590
+ *
591
+ * @note Should not be used together with `loop` mode
592
+ */
593
+ rewind?: boolean;
594
+ /**
595
+ * Allows to set different parameter for different responsive breakpoints (screen sizes). Not all parameters can be changed in breakpoints, only those which do not require different layout and logic, like `slidesPerView`, `slidesPerGroup`, `spaceBetween`, `grid.rows`. Such parameters like `loop` and `effect` won't work
596
+ *
597
+ * @example
598
+ * ```js
599
+ * const swiper = new Swiper('.swiper', {
600
+ * // Default parameters
601
+ * slidesPerView: 1,
602
+ * spaceBetween: 10,
603
+ * // Responsive breakpoints
604
+ * breakpoints: {
605
+ * // when window width is >= 320px
606
+ * 320: {
607
+ * slidesPerView: 2,
608
+ * spaceBetween: 20
609
+ * },
610
+ * // when window width is >= 480px
611
+ * 480: {
612
+ * slidesPerView: 3,
613
+ * spaceBetween: 30
614
+ * },
615
+ * // when window width is >= 640px
616
+ * 640: {
617
+ * slidesPerView: 4,
618
+ * spaceBetween: 40
619
+ * }
620
+ * }
621
+ * })
622
+ * ```
623
+ *
624
+ * @example
625
+ * ```js
626
+ * const swiper = new Swiper('.swiper', {
627
+ * slidesPerView: 1,
628
+ * spaceBetween: 10,
629
+ * // using "ratio" endpoints
630
+ * breakpoints: {
631
+ * '@0.75': {
632
+ * slidesPerView: 2,
633
+ * spaceBetween: 20,
634
+ * },
635
+ * '@1.00': {
636
+ * slidesPerView: 3,
637
+ * spaceBetween: 40,
638
+ * },
639
+ * '@1.50': {
640
+ * slidesPerView: 4,
641
+ * spaceBetween: 50,
642
+ * },
643
+ * }
644
+ * });
645
+ * ```
646
+ */
647
+ breakpoints?: {
648
+ [width: number]: SwiperOptions;
649
+ [ratio: string]: SwiperOptions;
650
+ };
651
+ /**
652
+ * Base for breakpoints (beta). Can be `window` or `container`. If set to `window` (by default) then breakpoint keys mean window width. If set to `container` then breakpoint keys treated as swiper container width
653
+ *
654
+ * @default 'window'
655
+ */
656
+ breakpointsBase?: 'window' | 'container';
657
+ /**
658
+ * Set to `true` to enable Mutation Observer on Swiper and its elements. In this case Swiper will be updated (reinitialized) each time if you change its style (like hide/show) or modify its child elements (like adding/removing slides)
659
+ *
660
+ * @default false
661
+ */
662
+ observer?: boolean;
663
+ /**
664
+ * Set to `true` if you also need to watch Mutations for Swiper slide children elements
665
+ *
666
+ * @default false
667
+ */
668
+ observeSlideChildren?: boolean;
669
+ /**
670
+ * Set to `true` if you also need to watch Mutations for Swiper parent elements
671
+ *
672
+ * @default false
673
+ */
674
+ observeParents?: boolean;
675
+ /**
676
+ * The beginning of the modifier CSS class that can be added to swiper container depending on different parameters
677
+ *
678
+ * @default 'swiper-'
679
+ */
680
+ containerModifierClass?: string;
681
+ /**
682
+ * CSS class name of slide
683
+ *
684
+ * @default 'swiper-slide'
685
+ *
686
+ * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
687
+ *
688
+ * @note Not supported in Swiper React/Vue components
689
+ */
690
+ slideClass?: string;
691
+ /**
692
+ * CSS class name of currently active slide
693
+ *
694
+ * @default 'swiper-slide-active'
695
+ *
696
+ * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
697
+ *
698
+ * @note Not supported in Swiper React/Vue components
699
+ */
700
+ slideActiveClass?: string;
701
+ /**
702
+ * CSS class name of currently/partially visible slide
703
+ *
704
+ * @default 'swiper-slide-visible'
705
+ *
706
+ * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
707
+ *
708
+ * @note Not supported in Swiper React/Vue
709
+ */
710
+ slideVisibleClass?: string;
711
+ /**
712
+ * CSS class name of fully (when whole slide is in the viewport) visible slide
713
+ *
714
+ * @default 'swiper-slide-fully-visible'
715
+ *
716
+ * @note Not supported in Swiper React/Vue
717
+ */
718
+ slideFullyVisibleClass?: string;
719
+ /**
720
+ * CSS class name of the blank slide added by the loop mode (when `loopAddBlankSlides` is enabled)
721
+ *
722
+ * @default 'swiper-slide-blank'
723
+ *
724
+ * @note Not supported in Swiper React/Vue
725
+ */
726
+ slideBlankClass?: string;
727
+ /**
728
+ * CSS class name of slide which is right after currently active slide
729
+ *
730
+ * @default 'swiper-slide-next'
731
+ *
732
+ * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
733
+ *
734
+ * @note Not supported in Swiper React/Vue
735
+ */
736
+ slideNextClass?: string;
737
+ /**
738
+ * CSS class name of slide which is right before currently active slide
739
+ *
740
+ * @default 'swiper-slide-prev'
741
+ *
742
+ * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
743
+ *
744
+ * @note Not supported in Swiper React/Vue
745
+ */
746
+ slidePrevClass?: string;
747
+ /**
748
+ * CSS class name of slides' wrapper
749
+ *
750
+ * @default 'swiper-wrapper'
751
+ *
752
+ * @note By changing classes you will also need to change Swiper's CSS to reflect changed classes
753
+ *
754
+ * @note Not supported in Swiper React/Vue
755
+ *
756
+ */
757
+ wrapperClass?: string;
758
+ /**
759
+ * CSS class name of lazy preloader
760
+ *
761
+ * @default 'swiper-lazy-preloader'
762
+ */
763
+ lazyPreloaderClass?: string;
764
+ /**
765
+ * Number of next and previous slides to preload. Only applicable if using lazy loading.
766
+ *
767
+ * @default 0
768
+ */
769
+ lazyPreloadPrevNext?: number;
770
+ /**
771
+ * Object with a11y parameters or boolean `true` to enable with default settings.
772
+ *
773
+ * @example
774
+ * ```js
775
+ * const swiper = new Swiper('.swiper', {
776
+ * a11y: {
777
+ * prevSlideMessage: 'Previous slide',
778
+ * nextSlideMessage: 'Next slide',
779
+ * },
780
+ * });
781
+ * ```
782
+ */
783
+ a11y?: A11yOptions;
784
+ /**
785
+ * Object with autoplay parameters or boolean `true` to enable with default settings
786
+ *
787
+ * @example
788
+ * ```js
789
+ * const swiper = new Swiper('.swiper', {
790
+ * autoplay: {
791
+ * delay: 5000,
792
+ * },
793
+ *});
794
+ * ```
795
+ */
796
+ autoplay?: AutoplayOptions | boolean;
797
+ /**
798
+ * Object with controller parameters or boolean `true` to enable with default settings
799
+ *
800
+ * @example
801
+ * ```js
802
+ * const swiper = new Swiper('.swiper', {
803
+ * controller: {
804
+ * inverse: true,
805
+ * },
806
+ * });
807
+ * ```
808
+ */
809
+ controller?: ControllerOptions;
810
+ /**
811
+ * Object with Coverflow-effect parameters.
812
+ *
813
+ * @example
814
+ * ```js
815
+ * const swiper = new Swiper('.swiper', {
816
+ * effect: 'coverflow',
817
+ * coverflowEffect: {
818
+ * rotate: 30,
819
+ * slideShadows: false,
820
+ * },
821
+ * });
822
+ * ```
823
+ */
824
+ coverflowEffect?: CoverflowEffectOptions;
825
+ /**
826
+ * Object with Cube-effect parameters
827
+ *
828
+ * @example
829
+ * ```js
830
+ * const swiper = new Swiper('.swiper', {
831
+ * effect: 'cube',
832
+ * cubeEffect: {
833
+ * slideShadows: false,
834
+ * },
835
+ * });
836
+ * ```
837
+ */
838
+ cubeEffect?: CubeEffectOptions;
839
+ /**
840
+ * Object with Fade-effect parameters
841
+ *
842
+ * @example
843
+ * ```js
844
+ * const swiper = new Swiper('.swiper', {
845
+ * effect: 'fade',
846
+ * fadeEffect: {
847
+ * crossFade: true
848
+ * },
849
+ * });
850
+ * ```
851
+ */
852
+ fadeEffect?: FadeEffectOptions;
853
+ /**
854
+ * Object with Flip-effect parameters
855
+ *
856
+ * @example
857
+ * ```js
858
+ * const swiper = new Swiper('.swiper', {
859
+ * effect: 'flip',
860
+ * flipEffect: {
861
+ * slideShadows: false,
862
+ * },
863
+ * });
864
+ * ```
865
+ */
866
+ flipEffect?: FlipEffectOptions;
867
+ /**
868
+ * Object with Creative-effect parameters
869
+ *
870
+ * @example
871
+ * ```js
872
+ * const swiper = new Swiper('.swiper', {
873
+ * effect: 'creative',
874
+ * creativeEffect: {
875
+ * prev: {
876
+ * // will set `translateZ(-400px)` on previous slides
877
+ * translate: [0, 0, -400],
878
+ * },
879
+ * next: {
880
+ * // will set `translateX(100%)` on next slides
881
+ * translate: ['100%', 0, 0],
882
+ * },
883
+ * },
884
+ * });
885
+ * ```
886
+ */
887
+ creativeEffect?: CreativeEffectOptions;
888
+ /**
889
+ * Object with Cards-effect parameters
890
+ *
891
+ * @example
892
+ * ```js
893
+ * const swiper = new Swiper('.swiper', {
894
+ * effect: 'cards',
895
+ * cardsEffect: {
896
+ * // ...
897
+ * },
898
+ * });
899
+ * ```
900
+ */
901
+ cardsEffect?: CardsEffectOptions;
902
+ /**
903
+ * Enables hash url navigation to for slides.
904
+ * Object with hash navigation parameters or boolean `true` to enable with default settings
905
+ *
906
+ * @example
907
+ * ```js
908
+ * const swiper = new Swiper('.swiper', {
909
+ * hashNavigation: {
910
+ * replaceState: true,
911
+ * },
912
+ * });
913
+ * ```
914
+ */
915
+ hashNavigation?: HashNavigationOptions | boolean;
916
+ /**
917
+ * Enables history push state where every slide will have its own url. In this parameter you have to specify main slides url like `"slides"` and specify every slide url using `data-history` attribute.
918
+ *
919
+ * Object with history navigation parameters or boolean `true` to enable with default settings
920
+ *
921
+ * @example
922
+ * ```js
923
+ * const swiper = new Swiper('.swiper', {
924
+ * history: {
925
+ * replaceState: true,
926
+ * },
927
+ * });
928
+ * ```
929
+ *
930
+ * @example
931
+ * ```html
932
+ * <!-- will produce "slides/slide1" url in browser history -->
933
+ * <div class="swiper-slide" data-history="slide1"></div>
934
+ * ```
935
+ */
936
+ history?: HistoryOptions | boolean;
937
+ /**
938
+ * Enables navigation through slides using keyboard. Object with keyboard parameters or boolean `true` to enable with default settings
939
+ *
940
+ * @example
941
+ * ```js
942
+ * const swiper = new Swiper('.swiper', {
943
+ * keyboard: {
944
+ * enabled: true,
945
+ * onlyInViewport: false,
946
+ * },
947
+ * });
948
+ * ```
949
+ */
950
+ keyboard?: KeyboardOptions | boolean;
951
+ /**
952
+ * Enables navigation through slides using mouse wheel. Object with mousewheel parameters or boolean `true` to enable with default settings
953
+ *
954
+ * @example
955
+ * ```js
956
+ * const swiper = new Swiper('.swiper', {
957
+ * mousewheel: {
958
+ * invert: true,
959
+ * },
960
+ * });
961
+ * ```
962
+ */
963
+ mousewheel?: MousewheelOptions | boolean;
964
+ /**
965
+ * Object with navigation parameters or boolean `true` to enable with default settings.
966
+ *
967
+ * @example
968
+ * ```js
969
+ * const swiper = new Swiper('.swiper', {
970
+ * navigation: {
971
+ * nextEl: '.swiper-button-next',
972
+ * prevEl: '.swiper-button-prev',
973
+ * },
974
+ * });
975
+ * ```
976
+ */
977
+ navigation?: NavigationOptions | boolean;
978
+ /**
979
+ * Object with pagination parameters or boolean `true` to enable with default settings.
980
+ *
981
+ * @example
982
+ * ```js
983
+ * const swiper = new Swiper('.swiper', {
984
+ * pagination: {
985
+ * el: '.swiper-pagination',
986
+ * type: 'bullets',
987
+ * },
988
+ * });
989
+ * ```
990
+ */
991
+ pagination?: PaginationOptions | boolean;
992
+ /**
993
+ * Object with parallax parameters or boolean `true` to enable with default settings.
994
+ *
995
+ * @example
996
+ * ```js
997
+ * const swiper = new Swiper('.swiper', {
998
+ * parallax: true,
999
+ * });
1000
+ * ```
1001
+ */
1002
+ parallax?: ParallaxOptions | boolean;
1003
+ /**
1004
+ * Object with scrollbar parameters or boolean `true` to enable with default settings.
1005
+ *
1006
+ * @example
1007
+ * ```js
1008
+ * const swiper = new Swiper('.swiper', {
1009
+ * scrollbar: {
1010
+ * el: '.swiper-scrollbar',
1011
+ * draggable: true,
1012
+ * },
1013
+ * });
1014
+ * ```
1015
+ */
1016
+ scrollbar?: ScrollbarOptions | boolean;
1017
+ /**
1018
+ * Object with thumbs component parameters
1019
+ *
1020
+ * @example
1021
+ * ```js
1022
+ * const swiper = new Swiper('.swiper', {
1023
+ * ...
1024
+ * thumbs: {
1025
+ * swiper: thumbsSwiper
1026
+ * }
1027
+ * });
1028
+ * ```
1029
+ */
1030
+ thumbs?: ThumbsOptions;
1031
+ /**
1032
+ * Enables virtual slides functionality. Object with virtual slides parameters or boolean `true` to enable with default settings.
1033
+ *
1034
+ * @example
1035
+ * ```js
1036
+ * const swiper = new Swiper('.swiper', {
1037
+ * virtual: {
1038
+ * slides: ['Slide 1', 'Slide 2', 'Slide 3', 'Slide 4', 'Slide 5'],
1039
+ * },
1040
+ * });
1041
+ * ```
1042
+ */
1043
+ virtual?: VirtualOptions | boolean;
1044
+ /**
1045
+ * Enables zooming functionality. Object with zoom parameters or boolean `true` to enable with default settings
1046
+ *
1047
+ * @example
1048
+ * ```js
1049
+ * const swiper = new Swiper('.swiper', {
1050
+ * zoom: {
1051
+ * maxRatio: 5,
1052
+ * },
1053
+ * });
1054
+ * ```
1055
+ */
1056
+ zoom?: ZoomOptions | boolean;
1057
+ /**
1058
+ * Enables free mode functionality. Object with free mode parameters or boolean `true` to enable with default settings.
1059
+ *
1060
+ * @example
1061
+ * ```js
1062
+ * const swiper = new Swiper('.swiper', {
1063
+ * freeMode: true,
1064
+ * });
1065
+ *
1066
+ * const swiper = new Swiper('.swiper', {
1067
+ * freeMode: {
1068
+ * enabled: true,
1069
+ * sticky: true,
1070
+ * },
1071
+ * });
1072
+ * ```
1073
+ */
1074
+ freeMode?: FreeModeOptions | boolean;
1075
+ /**
1076
+ * Object with grid parameters to enable "multirow" slider.
1077
+ *
1078
+ * @example
1079
+ * ```js
1080
+ * const swiper = new Swiper('.swiper', {
1081
+ * grid: {
1082
+ * rows: 2,
1083
+ * },
1084
+ * });
1085
+ * ```
1086
+ */
1087
+ grid?: GridOptions;
1088
+ /**
1089
+ * !INTERNAL When enabled will emit "_containerClasses" and "_slideClass" events
1090
+ */
1091
+ _emitClasses?: boolean;
1092
+ }