@functionalcms/svelte-components 4.6.1 → 4.6.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.
@@ -13,11 +13,25 @@
13
13
  css?: { slide: string; container: string };
14
14
  perPage?: number;
15
15
  slideGaps: string;
16
+ disableDrag: boolean;
16
17
  }
17
18
 
18
- let { child, next, prev, items, perPage = 1, slideGaps = '20px;' }: Props = $props();
19
+ let {
20
+ child,
21
+ next,
22
+ prev,
23
+ items,
24
+ perPage = 1,
25
+ slideGaps = '20px;',
26
+ disableDrag = false
27
+ }: Props = $props();
19
28
 
20
- let options: EmblaOptionsType = { loop: false };
29
+ let options: EmblaOptionsType = {
30
+ loop: false
31
+ };
32
+ if(disableDrag) {
33
+ options.watchDrag = false;
34
+ }
21
35
  let slideStyle = $derived('flex: 0 0 ' + 100 / perPage + '%;');
22
36
  let containerCss = cn('flex', 'fw');
23
37
 
@@ -10,6 +10,7 @@ interface Props {
10
10
  };
11
11
  perPage?: number;
12
12
  slideGaps: string;
13
+ disableDrag: boolean;
13
14
  }
14
15
  declare const Carousel: import("svelte").Component<Props, {}, "">;
15
16
  type Carousel = ReturnType<typeof Carousel>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@functionalcms/svelte-components",
3
- "version": "4.6.1",
3
+ "version": "4.6.2",
4
4
  "watch": {
5
5
  "build": {
6
6
  "patterns": [