@lordicon/web 1.2.0 → 1.2.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/.claude/settings.local.json +2 -1
- package/dist/interfaces.d.ts +11 -0
- package/dist/player.d.ts +1 -5
- package/package.json +1 -1
- package/src/interfaces.ts +12 -0
- package/src/player.ts +4 -7
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"Bash(python3 -c ' *)",
|
|
9
9
|
"Bash(npm prune *)",
|
|
10
10
|
"Bash(npm ls *)",
|
|
11
|
-
"Bash(python3 -c \"import json,sys; d=json.load\\(sys.stdin\\); print\\(json.dumps\\(d.get\\('dependencies',{}\\),indent=2\\)\\)\")"
|
|
11
|
+
"Bash(python3 -c \"import json,sys; d=json.load\\(sys.stdin\\); print\\(json.dumps\\(d.get\\('dependencies',{}\\),indent=2\\)\\)\")",
|
|
12
|
+
"Bash(npx tsc *)"
|
|
12
13
|
]
|
|
13
14
|
}
|
|
14
15
|
}
|
package/dist/interfaces.d.ts
CHANGED
|
@@ -52,6 +52,17 @@ export type LottieAnimationInstance = {
|
|
|
52
52
|
addEventListener(name: string, callback: any): () => void;
|
|
53
53
|
removeEventListener(name: string, callback?: any): void;
|
|
54
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* Configuration options for the underlying Lottie animation.
|
|
57
|
+
* Mirrors `@lordicon/internal`'s `AnimationConfig`, excluding `container`.
|
|
58
|
+
*/
|
|
59
|
+
export interface LottieOptions {
|
|
60
|
+
loop?: boolean;
|
|
61
|
+
autoplay?: boolean;
|
|
62
|
+
rendererSettings?: any;
|
|
63
|
+
initialSegment?: FrameSegment;
|
|
64
|
+
name?: string;
|
|
65
|
+
}
|
|
55
66
|
/**
|
|
56
67
|
* Supported property types for Lottie animations.
|
|
57
68
|
*/
|
package/dist/player.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { AnimationConfig } from '@lordicon/internal';
|
|
2
1
|
import { ColorMap, EventHandler, EventName, IconProperties, IconState, LegacyIconProperties, LottieAnimationInstance, LottieData, LottieProperty, PlaybackDirection, Stroke } from './interfaces';
|
|
3
|
-
|
|
4
|
-
* LottieOptions type represents the configuration options for the Lottie player.
|
|
5
|
-
*/
|
|
6
|
-
export type LottieOptions = Omit<AnimationConfig, 'container'>;
|
|
2
|
+
export type { LottieOptions } from './interfaces';
|
|
7
3
|
/**
|
|
8
4
|
* Player class for controlling and customizing Lottie-based icons.
|
|
9
5
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lordicon/web",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "A lightweight and flexible player for seamlessly embedding, controlling, and customizing animated Lordicon icons in any web application.",
|
|
5
5
|
"repository": "https://github.com/lordicondev/player-web",
|
|
6
6
|
"homepage": "https://lordicon.com/",
|
package/src/interfaces.ts
CHANGED
|
@@ -54,6 +54,18 @@ export type LottieAnimationInstance = {
|
|
|
54
54
|
removeEventListener(name: string, callback?: any): void;
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Configuration options for the underlying Lottie animation.
|
|
59
|
+
* Mirrors `@lordicon/internal`'s `AnimationConfig`, excluding `container`.
|
|
60
|
+
*/
|
|
61
|
+
export interface LottieOptions {
|
|
62
|
+
loop?: boolean;
|
|
63
|
+
autoplay?: boolean;
|
|
64
|
+
rendererSettings?: any;
|
|
65
|
+
initialSegment?: FrameSegment;
|
|
66
|
+
name?: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
57
69
|
/**
|
|
58
70
|
* Supported property types for Lottie animations.
|
|
59
71
|
*/
|
package/src/player.ts
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import lottie
|
|
2
|
-
import { ColorMap, EventHandler, EventName, IconProperties, IconState, LegacyIconProperties, LottieAnimationInstance, LottieData, LottieProperty, PlaybackDirection, Stroke } from './interfaces';
|
|
1
|
+
import lottie from '@lordicon/internal';
|
|
2
|
+
import { ColorMap, EventHandler, EventName, IconProperties, IconState, LegacyIconProperties, LottieAnimationInstance, LottieData, LottieOptions, LottieProperty, PlaybackDirection, Stroke } from './interfaces';
|
|
3
3
|
import { extractLottieProperties, resetLottieProperties, tupleColorToHex, updateLottieProperties } from './lottie';
|
|
4
4
|
import { parseStroke } from './parsers';
|
|
5
5
|
import { deepClone, get, isNil, set } from './utils';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
* LottieOptions type represents the configuration options for the Lottie player.
|
|
9
|
-
*/
|
|
10
|
-
export type LottieOptions = Omit<AnimationConfig, 'container'>;
|
|
7
|
+
export type { LottieOptions } from './interfaces';
|
|
11
8
|
|
|
12
9
|
/**
|
|
13
10
|
* Default options used by the Player.
|
|
14
11
|
* These options are passed to the underlying Lottie player.
|
|
15
12
|
*/
|
|
16
|
-
const DEFAULT_LOTTIE_WEB_OPTIONS:
|
|
13
|
+
const DEFAULT_LOTTIE_WEB_OPTIONS: LottieOptions = {
|
|
17
14
|
loop: false,
|
|
18
15
|
autoplay: false,
|
|
19
16
|
rendererSettings: {
|