@lottiefiles/dotlottie-web 0.12.1 → 0.12.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.
- package/dist/animation-frame-manager.js +1 -2
- package/dist/constants.d.ts +1 -3
- package/dist/constants.js +1 -3
- package/dist/dotlottie.js +7 -8
- package/dist/index.js +7 -8
- package/dist/renderer-loader.js +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,6 @@ var __publicField = (obj, key, value) => {
|
|
|
4
4
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
|
-
var IS_NODE = typeof global !== "undefined";
|
|
8
7
|
|
|
9
8
|
// src/animation-frame-manager.ts
|
|
10
9
|
var WebAnimationFrameStrategy = class {
|
|
@@ -39,7 +38,7 @@ var NodeAnimationFrameStrategy = class {
|
|
|
39
38
|
var AnimationFrameManager = class {
|
|
40
39
|
constructor() {
|
|
41
40
|
__publicField(this, "_strategy");
|
|
42
|
-
this._strategy =
|
|
41
|
+
this._strategy = typeof requestAnimationFrame === "function" ? new WebAnimationFrameStrategy() : new NodeAnimationFrameStrategy();
|
|
43
42
|
}
|
|
44
43
|
requestAnimationFrame(callback) {
|
|
45
44
|
return this._strategy.requestAnimationFrame(callback);
|
package/dist/constants.d.ts
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
* Copyright 2023 Design Barn Inc.
|
|
3
3
|
*/
|
|
4
4
|
declare const IS_BROWSER: boolean;
|
|
5
|
-
declare const IS_WEB_WORKER: boolean;
|
|
6
|
-
declare const IS_NODE: boolean;
|
|
7
5
|
declare const MS_TO_SEC_FACTOR = 1000;
|
|
8
6
|
declare const DEFAULT_BG_COLOR = "#00000000";
|
|
9
7
|
|
|
10
|
-
export { DEFAULT_BG_COLOR, IS_BROWSER,
|
|
8
|
+
export { DEFAULT_BG_COLOR, IS_BROWSER, MS_TO_SEC_FACTOR };
|
package/dist/constants.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// src/constants.ts
|
|
2
2
|
var IS_BROWSER = typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
3
|
-
var IS_WEB_WORKER = typeof self !== "undefined" && typeof Window === "undefined";
|
|
4
|
-
var IS_NODE = typeof global !== "undefined";
|
|
5
3
|
var MS_TO_SEC_FACTOR = 1e3;
|
|
6
4
|
var DEFAULT_BG_COLOR = "#00000000";
|
|
7
5
|
|
|
8
|
-
export { DEFAULT_BG_COLOR, IS_BROWSER,
|
|
6
|
+
export { DEFAULT_BG_COLOR, IS_BROWSER, MS_TO_SEC_FACTOR };
|
package/dist/dotlottie.js
CHANGED
|
@@ -7,12 +7,6 @@ var __publicField = (obj, key, value) => {
|
|
|
7
7
|
return value;
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
// src/constants.ts
|
|
11
|
-
var IS_BROWSER = typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
12
|
-
var IS_NODE = typeof global !== "undefined";
|
|
13
|
-
var MS_TO_SEC_FACTOR = 1e3;
|
|
14
|
-
var DEFAULT_BG_COLOR = "#00000000";
|
|
15
|
-
|
|
16
10
|
// src/animation-frame-manager.ts
|
|
17
11
|
var WebAnimationFrameStrategy = class {
|
|
18
12
|
requestAnimationFrame(callback) {
|
|
@@ -46,7 +40,7 @@ var NodeAnimationFrameStrategy = class {
|
|
|
46
40
|
var AnimationFrameManager = class {
|
|
47
41
|
constructor() {
|
|
48
42
|
__publicField(this, "_strategy");
|
|
49
|
-
this._strategy =
|
|
43
|
+
this._strategy = typeof requestAnimationFrame === "function" ? new WebAnimationFrameStrategy() : new NodeAnimationFrameStrategy();
|
|
50
44
|
}
|
|
51
45
|
requestAnimationFrame(callback) {
|
|
52
46
|
return this._strategy.requestAnimationFrame(callback);
|
|
@@ -56,6 +50,11 @@ var AnimationFrameManager = class {
|
|
|
56
50
|
}
|
|
57
51
|
};
|
|
58
52
|
|
|
53
|
+
// src/constants.ts
|
|
54
|
+
var IS_BROWSER = typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
55
|
+
var MS_TO_SEC_FACTOR = 1e3;
|
|
56
|
+
var DEFAULT_BG_COLOR = "#00000000";
|
|
57
|
+
|
|
59
58
|
// src/event-manager.ts
|
|
60
59
|
var EventManager = class {
|
|
61
60
|
constructor() {
|
|
@@ -94,7 +93,7 @@ var EventManager = class {
|
|
|
94
93
|
// package.json
|
|
95
94
|
var package_default = {
|
|
96
95
|
name: "@lottiefiles/dotlottie-web",
|
|
97
|
-
version: "0.12.
|
|
96
|
+
version: "0.12.2",
|
|
98
97
|
type: "module",
|
|
99
98
|
description: "Lottie and DotLottie player for the web",
|
|
100
99
|
repository: {
|
package/dist/index.js
CHANGED
|
@@ -7,12 +7,6 @@ var __publicField = (obj, key, value) => {
|
|
|
7
7
|
return value;
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
// src/constants.ts
|
|
11
|
-
var IS_BROWSER = typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
12
|
-
var IS_NODE = typeof global !== "undefined";
|
|
13
|
-
var MS_TO_SEC_FACTOR = 1e3;
|
|
14
|
-
var DEFAULT_BG_COLOR = "#00000000";
|
|
15
|
-
|
|
16
10
|
// src/animation-frame-manager.ts
|
|
17
11
|
var WebAnimationFrameStrategy = class {
|
|
18
12
|
requestAnimationFrame(callback) {
|
|
@@ -46,7 +40,7 @@ var NodeAnimationFrameStrategy = class {
|
|
|
46
40
|
var AnimationFrameManager = class {
|
|
47
41
|
constructor() {
|
|
48
42
|
__publicField(this, "_strategy");
|
|
49
|
-
this._strategy =
|
|
43
|
+
this._strategy = typeof requestAnimationFrame === "function" ? new WebAnimationFrameStrategy() : new NodeAnimationFrameStrategy();
|
|
50
44
|
}
|
|
51
45
|
requestAnimationFrame(callback) {
|
|
52
46
|
return this._strategy.requestAnimationFrame(callback);
|
|
@@ -56,6 +50,11 @@ var AnimationFrameManager = class {
|
|
|
56
50
|
}
|
|
57
51
|
};
|
|
58
52
|
|
|
53
|
+
// src/constants.ts
|
|
54
|
+
var IS_BROWSER = typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
55
|
+
var MS_TO_SEC_FACTOR = 1e3;
|
|
56
|
+
var DEFAULT_BG_COLOR = "#00000000";
|
|
57
|
+
|
|
59
58
|
// src/event-manager.ts
|
|
60
59
|
var EventManager = class {
|
|
61
60
|
constructor() {
|
|
@@ -94,7 +93,7 @@ var EventManager = class {
|
|
|
94
93
|
// package.json
|
|
95
94
|
var package_default = {
|
|
96
95
|
name: "@lottiefiles/dotlottie-web",
|
|
97
|
-
version: "0.12.
|
|
96
|
+
version: "0.12.2",
|
|
98
97
|
type: "module",
|
|
99
98
|
description: "Lottie and DotLottie player for the web",
|
|
100
99
|
repository: {
|
package/dist/renderer-loader.js
CHANGED
|
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8
8
|
// package.json
|
|
9
9
|
var package_default = {
|
|
10
10
|
name: "@lottiefiles/dotlottie-web",
|
|
11
|
-
version: "0.12.
|
|
11
|
+
version: "0.12.2",
|
|
12
12
|
type: "module",
|
|
13
13
|
description: "Lottie and DotLottie player for the web",
|
|
14
14
|
repository: {
|