@lottiefiles/dotlottie-web 0.1.0 → 0.3.0

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/dotlottie.js CHANGED
@@ -1,6 +1,6 @@
1
- export { a as DotLottie } from './chunk-ZKPMVSNF.js';
1
+ export { b as DotLottie } from './chunk-B33PKDLW.js';
2
2
  import './chunk-VRCJABVO.js';
3
- import './chunk-MKIEOQX3.js';
3
+ import './chunk-6PRCY2FC.js';
4
4
  import './chunk-7Q3PPTBP.js';
5
5
  //# sourceMappingURL=out.js.map
6
6
  //# sourceMappingURL=dotlottie.js.map
package/dist/index.d.ts CHANGED
@@ -1,2 +1,30 @@
1
- export { DotLottie } from './dotlottie.js';
1
+ export { DotLottie, Options } from './dotlottie.js';
2
2
  export { BaseEvent, CompleteEvent, Event, EventListener, EventManager, EventType, FrameEvent, LoadErrorEvent, LoadEvent, LoopEvent, PauseEvent, PlayEvent, StopEvent } from './event-manager.js';
3
+ export { getAnimationJSONFromDotLottie, loadAnimationJSONFromURL } from './utils.js';
4
+
5
+ /**
6
+ * Copyright 2023 Design Barn Inc.
7
+ */
8
+ interface Renderer {
9
+ duration(): number;
10
+ error(): string;
11
+ frame(no: number): boolean;
12
+ load(data: string, width: number, height: number): boolean;
13
+ render(): Uint8Array;
14
+ resize(width: number, height: number): void;
15
+ size(): Float32Array;
16
+ totalFrames(): number;
17
+ update(): boolean;
18
+ }
19
+ declare class WasmLoader {
20
+ private static _renderer;
21
+ private static _isLoading;
22
+ private static _wasmURL;
23
+ private constructor();
24
+ static loadRenderer(): void;
25
+ static getInstance(callback: (renderer: Renderer) => void): void;
26
+ static awaitInstance(): Promise<Renderer>;
27
+ static setWasmUrl(url: string): void;
28
+ }
29
+
30
+ export { Renderer, WasmLoader };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export { a as DotLottie } from './chunk-ZKPMVSNF.js';
1
+ export { b as DotLottie, a as WasmLoader } from './chunk-B33PKDLW.js';
2
2
  export { a as EventManager } from './chunk-VRCJABVO.js';
3
- import './chunk-MKIEOQX3.js';
3
+ export { a as getAnimationJSONFromDotLottie, b as loadAnimationJSONFromURL } from './chunk-6PRCY2FC.js';
4
4
  import './chunk-7Q3PPTBP.js';
5
5
  //# sourceMappingURL=out.js.map
6
6
  //# sourceMappingURL=index.js.map
package/dist/utils.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Copyright 2023 Design Barn Inc.
3
3
  */
4
- declare function loadFromURL(src: string): Promise<string>;
4
+ declare function getAnimationJSONFromDotLottie(dotLottieBuffer: ArrayBuffer): Promise<string>;
5
+ declare function loadAnimationJSONFromURL(animationURL: string): Promise<string>;
5
6
 
6
- export { loadFromURL };
7
+ export { getAnimationJSONFromDotLottie, loadAnimationJSONFromURL };
package/dist/utils.js CHANGED
@@ -1,4 +1,4 @@
1
- export { a as loadFromURL } from './chunk-MKIEOQX3.js';
1
+ export { a as getAnimationJSONFromDotLottie, b as loadAnimationJSONFromURL } from './chunk-6PRCY2FC.js';
2
2
  import './chunk-7Q3PPTBP.js';
3
3
  //# sourceMappingURL=out.js.map
4
4
  //# sourceMappingURL=utils.js.map
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@lottiefiles/dotlottie-web",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "description": "Lottie and DotLottie player for the web",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/LottieFiles/dotlottie-web.git",
9
- "directory": "packages/dotlottie-web"
9
+ "directory": "packages/web"
10
10
  },
11
11
  "homepage": "https://github.com/LottieFiles/dotlottie-web#readme",
12
12
  "bugs": "https://github.com/LottieFiles/dotlottie-web/issues",
@@ -26,8 +26,12 @@
26
26
  ],
27
27
  "keywords": [
28
28
  "dotlottie",
29
- "thorvg",
30
- "lottie"
29
+ "lottie",
30
+ "player",
31
+ "animation",
32
+ "web",
33
+ "canvas",
34
+ "javascript"
31
35
  ],
32
36
  "dependencies": {
33
37
  "@dotlottie/dotlottie-js": "^0.6.0"