@lottiefiles/dotlottie-svelte 0.0.1 → 0.1.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.
package/README.md CHANGED
@@ -72,7 +72,7 @@ import { DotLottieSvelte } from '@lottiefiles/dotlottie-svelte';
72
72
  | `data` | string \| ArrayBuffer | | undefined | Animation data provided either as a Lottie JSON string or as an ArrayBuffer for .lottie animations. | |
73
73
  | `mode` | string | | "forward" | Animation play mode. Accepts "forward", "reverse", "bounce", "reverse-bounce". | |
74
74
  | `backgroundColor` | string | | undefined | Background color of the canvas. Accepts 6-digit or 8-digit hex color string (e.g., "#000000", "#000000FF"), | |
75
- | `segments` | \[number, number] | | undefined | Animation segments. Accepts an array of two numbers, where the first number is the start frame and the second number is the end frame. | |
75
+ | `segment` | \[number, number] | | undefined | Animation segment. Accepts an array of two numbers, where the first number is the start frame and the second number is the end frame. | |
76
76
  | `renderConfig` | RenderConfig | | undefined | Configuration for rendering the animation. | |
77
77
  | `dotLottieRefCallback` | (dotLottie: [DotLottie](../web/README.md#apis)) => void | | undefined | Callback function that receives a reference to the [`dotLottie`](../web/README.md) web player instance once instantiated. | |
78
78
  | `useFrameInterpolation` | boolean | | true | Determines if the animation should update on subframes. If set to false, the original AE frame rate will be maintained. If set to true, it will refresh at each requestAnimationFrame, including intermediate values. The default setting is true. | |
@@ -7,7 +7,7 @@ export let data = void 0;
7
7
  export let loop = false;
8
8
  export let mode = "forward";
9
9
  export let renderConfig = void 0;
10
- export let segments = void 0;
10
+ export let segment = void 0;
11
11
  export let speed = 1;
12
12
  export let src = void 0;
13
13
  export let useFrameInterpolation = true;
@@ -27,7 +27,7 @@ onMount(() => {
27
27
  speed,
28
28
  data,
29
29
  renderConfig,
30
- segments,
30
+ segment,
31
31
  useFrameInterpolation,
32
32
  backgroundColor,
33
33
  mode
@@ -70,9 +70,9 @@ $: {
70
70
  }
71
71
  }
72
72
  $: {
73
- if (dotLottie && dotLottie.isLoaded && Array.isArray(segments) && segments.length === 2 && typeof segments[0] === "number" && typeof segments[1] === "number") {
74
- let [start, end] = segments;
75
- dotLottie.setSegments(start, end);
73
+ if (dotLottie && dotLottie.isLoaded && Array.isArray(segment) && segment.length === 2 && typeof segment[0] === "number" && typeof segment[1] === "number") {
74
+ let [start, end] = segment;
75
+ dotLottie.setSegment(start, end);
76
76
  }
77
77
  }
78
78
  $: {
@@ -99,7 +99,7 @@ $:
99
99
  speed,
100
100
  data,
101
101
  renderConfig,
102
- segments,
102
+ segment,
103
103
  useFrameInterpolation,
104
104
  backgroundColor,
105
105
  mode
@@ -115,7 +115,7 @@ $:
115
115
  speed,
116
116
  data,
117
117
  renderConfig,
118
- segments,
118
+ segment,
119
119
  useFrameInterpolation,
120
120
  backgroundColor,
121
121
  mode
@@ -8,7 +8,7 @@ declare const __propDef: {
8
8
  loop?: Config['loop'];
9
9
  mode?: Config['mode'];
10
10
  renderConfig?: Config['renderConfig'];
11
- segments?: Config['segments'];
11
+ segment?: Config['segment'];
12
12
  speed?: Config['speed'];
13
13
  src?: Config['src'];
14
14
  useFrameInterpolation?: Config['useFrameInterpolation'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lottiefiles/dotlottie-svelte",
3
- "version": "0.0.1",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "description": "Svelte component wrapper around the dotlottie-web library to render Lottie and dotLottie animations",
6
6
  "repository": {
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "debounce": "^2.0.0",
37
- "@lottiefiles/dotlottie-web": "0.16.0"
37
+ "@lottiefiles/dotlottie-web": "0.18.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@sveltejs/adapter-auto": "^3.0.0",