@aarsteinmedia/dotlottie-player 6.3.3 → 6.3.4

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/dist/canvas.d.ts CHANGED
@@ -1,205 +1,8 @@
1
- import { PlayMode, PreserveAspectRatio, RendererType } from '@aarsteinmedia/lottie-web/utils';
1
+ import { RendererType, PreserveAspectRatio } from '@aarsteinmedia/lottie-web/utils';
2
2
  export { PlayMode, PlayerEvents, RendererType } from '@aarsteinmedia/lottie-web/utils';
3
- import { HTMLBooleanAttribute, AnimationData, AnimationDirection, AddAnimationParams, Result, ConvertParams, LottieManifest, AnimationSettings, Vector2, AnimationConfiguration } from '@aarsteinmedia/lottie-web';
4
-
5
- declare abstract class PropertyCallbackElement extends HTMLElement {
6
- constructor();
7
- connectedCallback(): void;
8
- propertyChangedCallback(_name: string, _oldValue: unknown, _value: unknown): void;
9
- }
10
-
11
- declare function renderControls(this: DotLottiePlayerBase): void;
12
-
13
- declare function renderPlayer(this: DotLottiePlayerBase): Promise<void>;
14
-
15
- declare enum MouseOut {
16
- Pause = "pause",
17
- Reverse = "reverse",
18
- Stop = "stop",
19
- Void = "void"
20
- }
21
- declare enum PlayerState {
22
- Completed = "completed",
23
- Destroyed = "destroyed",
24
- Error = "error",
25
- Frozen = "frozen",
26
- Loading = "loading",
27
- Paused = "paused",
28
- Playing = "playing",
29
- Stopped = "stopped"
30
- }
31
- declare const tagName = "dotlottie-player";
32
-
33
- interface DotLottieAnimationInstance {
34
- addEventListener: (name: string, callback: (...args: any[]) => void) => void;
35
- autoplay?: boolean;
36
- currentFrame: number;
37
- destroy: () => void;
38
- goToAndPlay: (value: number, isFrame?: boolean) => void;
39
- goToAndStop: (value: number, isFrame?: boolean) => void;
40
- pause: () => void;
41
- play: () => void;
42
- playDirection: number;
43
- removeEventListener: (name: string, callback: (...args: any[]) => void) => void;
44
- setDirection: (direction: AnimationDirection) => void;
45
- setLoop: (loop: boolean) => void;
46
- setSpeed: (speed: number) => void;
47
- setSubframe: (useSubframe: boolean) => void;
48
- stop: () => void;
49
- totalFrames: number;
50
- }
51
- declare abstract class DotLottiePlayerBase extends PropertyCallbackElement {
52
- static get observedAttributes(): readonly ["animateOnScroll", "autoplay", "controls", "direction", "hover", "loop", "mode", "playOnClick", "playOnVisible", "selector", "speed", "src", "subframe"];
53
- static get observedProperties(): string[];
54
- static get styles(): () => Promise<CSSStyleSheet>;
55
- isLight: boolean;
56
- playerState: PlayerState;
57
- shadow: ShadowRoot | undefined;
58
- source?: string;
59
- template?: HTMLTemplateElement;
60
- set animateOnScroll(value: HTMLBooleanAttribute);
61
- get animateOnScroll(): HTMLBooleanAttribute;
62
- get animations(): AnimationData[];
63
- set autoplay(value: HTMLBooleanAttribute);
64
- get autoplay(): HTMLBooleanAttribute;
65
- set background(value: string);
66
- get background(): string;
67
- set controls(value: HTMLBooleanAttribute);
68
- get controls(): HTMLBooleanAttribute;
69
- set count(value: number);
70
- get count(): number;
71
- get currentAnimation(): number;
72
- set delay(value: number);
73
- get delay(): number;
74
- set description(value: string | null);
75
- get description(): string | null;
76
- set direction(value: AnimationDirection);
77
- get direction(): AnimationDirection;
78
- set dontFreezeOnBlur(value: HTMLBooleanAttribute);
79
- get dontFreezeOnBlur(): HTMLBooleanAttribute;
80
- set hover(value: HTMLBooleanAttribute);
81
- get hover(): HTMLBooleanAttribute;
82
- set intermission(value: number);
83
- get intermission(): number;
84
- get isDotLottie(): boolean;
85
- set loop(value: HTMLBooleanAttribute);
86
- get loop(): HTMLBooleanAttribute;
87
- set mode(value: PlayMode);
88
- get mode(): PlayMode;
89
- set mouseout(value: MouseOut);
90
- get mouseout(): MouseOut;
91
- set objectfit(value: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down');
92
- get objectfit(): "contain" | "cover" | "fill" | "none" | "scale-down";
93
- set once(value: HTMLBooleanAttribute);
94
- get once(): HTMLBooleanAttribute;
95
- set playOnClick(value: HTMLBooleanAttribute);
96
- get playOnClick(): HTMLBooleanAttribute;
97
- set playOnVisible(value: HTMLBooleanAttribute);
98
- get playOnVisible(): HTMLBooleanAttribute;
99
- set preserveAspectRatio(value: PreserveAspectRatio | null);
100
- get preserveAspectRatio(): PreserveAspectRatio | null;
101
- set renderer(value: RendererType);
102
- get renderer(): RendererType;
103
- set selector(value: string | null);
104
- get selector(): string | null;
105
- set simple(value: HTMLBooleanAttribute);
106
- get simple(): HTMLBooleanAttribute;
107
- set speed(value: number);
108
- get speed(): number;
109
- set src(value: string | null);
110
- get src(): string | null;
111
- set subframe(value: HTMLBooleanAttribute);
112
- get subframe(): HTMLBooleanAttribute;
113
- protected _container: HTMLElement | null;
114
- protected _DOMRect: DOMRect | null;
115
- protected _errorMessage: string;
116
- protected _identifier: string;
117
- protected _isSettingsOpen: boolean;
118
- protected _playerState: {
119
- prev: PlayerState;
120
- count: number;
121
- loaded: boolean;
122
- visible: boolean;
123
- scrollY: number;
124
- scrollTimeout: NodeJS.Timeout | null;
125
- };
126
- protected _render: typeof renderPlayer;
127
- protected _renderControls: typeof renderControls;
128
- protected _seeker: number;
129
- private _animations;
130
- private _currentAnimation;
131
- private _intersectionObserver?;
132
- private _isBounce;
133
- private _isDotLottie;
134
- private _lottieInstance;
135
- private _manifest?;
136
- private _multiAnimationSettings;
137
- private _segment?;
138
- constructor();
139
- addAnimation(_params: AddAnimationParams): Promise<Result>;
140
- attributeChangedCallback(name: typeof DotLottiePlayerBase.observedAttributes[number], _oldValue: unknown, value: string): Promise<void>;
141
- connectedCallback(): void;
142
- convert(_params: ConvertParams): Promise<Result>;
143
- destroy(): void;
144
- disconnectedCallback(): void;
145
- getLottie(): DotLottieAnimationInstance | null;
146
- getManifest(): LottieManifest | undefined;
147
- getMultiAnimationSettings(): AnimationSettings[];
148
- getSegment(): Vector2 | undefined;
149
- load(src: string | null): Promise<void>;
150
- loadAnimation(_config: AnimationConfiguration): DotLottieAnimationInstance;
151
- next(): void;
152
- pause(): void;
153
- play(): void;
154
- prev(): void;
155
- propertyChangedCallback(name: string, _oldValue: unknown, value: unknown): void;
156
- reload(): Promise<void>;
157
- seek(value: number | string): void;
158
- setCount(value: number): void;
159
- setDirection(value: AnimationDirection): void;
160
- setLoop(value: boolean): void;
161
- setMultiAnimationSettings(settings: AnimationSettings[]): void;
162
- setSegment(segment: Vector2): void;
163
- setSpeed(value?: number): void;
164
- setSubframe(value: boolean): void;
165
- snapshot(shouldDownload?: boolean, name?: string): string | null;
166
- stop(): void;
167
- toggleBoomerang(): void;
168
- toggleLoop(): void;
169
- togglePlay(): void;
170
- protected _freeze(): void;
171
- protected _handleBlur(): void;
172
- protected _handleClick(): void;
173
- protected _handleSeekChange({ target }: Event): void;
174
- protected _handleSettingsClick({ target }: Event): void;
175
- protected setOptions(_options: {
176
- container?: undefined | HTMLElement;
177
- rendererType: RendererType;
178
- initialSegment?: undefined | Vector2;
179
- hasAutoplay: boolean;
180
- hasLoop: boolean;
181
- preserveAspectRatio: PreserveAspectRatio;
182
- }): AnimationConfiguration;
183
- private _addEventListeners;
184
- private _addIntersectionObserver;
185
- private _complete;
186
- private _dataFailed;
187
- private _dataReady;
188
- private _DOMLoaded;
189
- private _enterFrame;
190
- private _getOptions;
191
- private _handleScroll;
192
- private _handleWindowBlur;
193
- private _intersectionObserverFallback;
194
- private _loopComplete;
195
- private _mouseEnter;
196
- private _mouseLeave;
197
- private _onVisibilityChange;
198
- private _removeEventListeners;
199
- private _switchInstance;
200
- private _toggleEventListeners;
201
- private _toggleSettings;
202
- }
3
+ import { D as DotLottiePlayerBase, a as DotLottieAnimationInstance } from './chunks/DotLottiePlayerBase.d-COx4pY8X.js';
4
+ export { M as MouseOut, P as PlayerState, t as tagName } from './chunks/DotLottiePlayerBase.d-COx4pY8X.js';
5
+ import { AnimationConfiguration, Vector2 } from '@aarsteinmedia/lottie-web';
203
6
 
204
7
  declare class DotLottiePlayerCanvas extends DotLottiePlayerBase {
205
8
  get renderer(): RendererType;
@@ -215,4 +18,4 @@ declare class DotLottiePlayerCanvas extends DotLottiePlayerBase {
215
18
  }): AnimationConfiguration<RendererType.Canvas>;
216
19
  }
217
20
 
218
- export { MouseOut, PlayerState, DotLottiePlayerCanvas as default, tagName };
21
+ export { DotLottiePlayerCanvas as default };