New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@lottiefiles/dotlottie-web

Package Overview
Dependencies
Maintainers
4
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lottiefiles/dotlottie-web - npm Package Compare versions

Comparing version 0.11.1 to 0.12.0

17

dist/animation-frame-manager.js

@@ -1,3 +0,1 @@

import { IS_NODE } from './constants';
var __defProp = Object.defineProperty;

@@ -9,3 +7,6 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;

};
class WebAnimationFrameStrategy {
var IS_NODE = typeof global !== "undefined";
// src/animation-frame-manager.ts
var WebAnimationFrameStrategy = class {
requestAnimationFrame(callback) {

@@ -17,4 +18,4 @@ return requestAnimationFrame(callback);

}
}
class NodeAnimationFrameStrategy {
};
var NodeAnimationFrameStrategy = class {
constructor() {

@@ -39,4 +40,4 @@ __publicField(this, "_lastHandleId", 0);

}
}
class AnimationFrameManager {
};
var AnimationFrameManager = class {
constructor() {

@@ -52,4 +53,4 @@ __publicField(this, "_strategy");

}
}
};
export { AnimationFrameManager };

@@ -5,2 +5,3 @@ /**

declare const IS_BROWSER: boolean;
declare const IS_WEB_WORKER: boolean;
declare const IS_NODE: boolean;

@@ -10,2 +11,2 @@ declare const MS_TO_SEC_FACTOR = 1000;

export { DEFAULT_BG_COLOR, IS_BROWSER, IS_NODE, MS_TO_SEC_FACTOR };
export { DEFAULT_BG_COLOR, IS_BROWSER, IS_NODE, IS_WEB_WORKER, MS_TO_SEC_FACTOR };

@@ -1,6 +0,8 @@

const IS_BROWSER = typeof window !== "undefined";
const IS_NODE = typeof process !== "undefined";
const MS_TO_SEC_FACTOR = 1e3;
const DEFAULT_BG_COLOR = "#00000000";
// src/constants.ts
var IS_BROWSER = typeof window !== "undefined" && typeof window.document !== "undefined";
var IS_WEB_WORKER = typeof self !== "undefined" && typeof Window === "undefined";
var IS_NODE = typeof global !== "undefined";
var MS_TO_SEC_FACTOR = 1e3;
var DEFAULT_BG_COLOR = "#00000000";
export { DEFAULT_BG_COLOR, IS_BROWSER, IS_NODE, MS_TO_SEC_FACTOR };
export { DEFAULT_BG_COLOR, IS_BROWSER, IS_NODE, IS_WEB_WORKER, MS_TO_SEC_FACTOR };

@@ -113,2 +113,3 @@ import { EventType, EventListener } from './event-manager.js';

constructor(config: Config);
get renderConfig(): RenderConfig;
get canvas(): HTMLCanvasElement | OffscreenCanvas;

@@ -334,4 +335,5 @@ get mode(): Mode;

setUseFrameInterpolation(useFrameInterpolation: boolean): void;
setRenderConfig(config: RenderConfig): void;
}
export { type Config, DotLottie, type Mode };

@@ -7,3 +7,5 @@ var __defProp = Object.defineProperty;

};
class EventManager {
// src/event-manager.ts
var EventManager = class {
constructor() {

@@ -40,4 +42,4 @@ __publicField(this, "_eventListeners", /* @__PURE__ */ new Map());

}
}
};
export { EventManager };
import { loadFromArrayBuffer, getManifest, getAnimation } from '@dotlottie/dotlottie-js';
// src/utils.ts
async function getAnimationJSONFromDotLottie(dotLottieBuffer) {

@@ -4,0 +5,0 @@ const loadedDotLottieFile = await loadFromArrayBuffer(dotLottieBuffer);

{
"name": "@lottiefiles/dotlottie-web",
"version": "0.11.1",
"version": "0.12.0",
"type": "module",

@@ -50,3 +50,3 @@ "description": "Lottie and DotLottie player for the web",

"dependencies": {
"@dotlottie/dotlottie-js": "^0.6.0"
"@dotlottie/dotlottie-js": "^0.6.2"
},

@@ -53,0 +53,0 @@ "devDependencies": {

@@ -128,3 +128,3 @@ # @lottiefiles/dotlottie-web

| `renderConfig` | [RenderConfig](#renderconfig) | | `{}` | Configuration for rendering the animation. |
| `useFrameInterpolation` | boolean | | false | 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. |
| `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. |

@@ -143,21 +143,22 @@ #### RenderConfig

| Property | Type | Description |
| ----------------------- | ------- | --------------------------------------------------------------------------------------------------------------------- |
| `currentFrame` | number | Represents the animation's currently displayed frame number. |
| `duration` | number | Specifies the animation's total playback time in milliseconds. |
| `totalFrames` | number | Denotes the total count of individual frames within the animation. |
| `loop` | boolean | Indicates if the animation is set to play in a continuous loop. |
| `speed` | number | Represents the playback speed factor; e.g., 2 would mean double speed. |
| `loopCount` | number | Tracks how many times the animation has completed its loop. |
| `direction` | string | Reflects the current playback direction; e.g., 1 would mean forward, -1 would mean reverse. |
| `mode` | string | Reflects the current playback mode. |
| `isPaused` | boolean | Reflects whether the animation is paused or not. |
| `isStopped` | boolean | Reflects whether the animation is stopped or not. |
| `isPlaying` | boolean | Reflects whether the animation is playing or not. |
| `segments` | number | Reflects the frames range of the animations. where segments\[0] is the start frame and segments\[1] is the end frame. |
| `backgroundColor` | string | Gets the background color of the canvas. |
| `autoplay` | boolean | Indicates if the animation is set to auto-play. |
| `isFrozen` | boolean | Reflects whether the animation loop is stopped or not. |
| `isLoaded` | boolean | Reflects whether the animation is loaded or not. |
| `useFrameInterpolation` | boolean | Reflects whether the animation should update on subframes. |
| Property | Type | Description |
| ----------------------- | ----------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `currentFrame` | number | Represents the animation's currently displayed frame number. |
| `duration` | number | Specifies the animation's total playback time in milliseconds. |
| `totalFrames` | number | Denotes the total count of individual frames within the animation. |
| `loop` | boolean | Indicates if the animation is set to play in a continuous loop. |
| `speed` | number | Represents the playback speed factor; e.g., 2 would mean double speed. |
| `loopCount` | number | Tracks how many times the animation has completed its loop. |
| `direction` | string | Reflects the current playback direction; e.g., 1 would mean forward, -1 would mean reverse. |
| `mode` | string | Reflects the current playback mode. |
| `isPaused` | boolean | Reflects whether the animation is paused or not. |
| `isStopped` | boolean | Reflects whether the animation is stopped or not. |
| `isPlaying` | boolean | Reflects whether the animation is playing or not. |
| `segments` | \[number, number] | Reflects the frames range of the animations. where segments\[0] is the start frame and segments\[1] is the end frame. |
| `backgroundColor` | string | Gets the background color of the canvas. |
| `autoplay` | boolean | Indicates if the animation is set to auto-play. |
| `isFrozen` | boolean | Reflects whether the animation loop is stopped or not. |
| `isLoaded` | boolean | Reflects whether the animation is loaded or not. |
| `useFrameInterpolation` | boolean | Reflects whether the animation should update on subframes. |
| `renderConfig` | [RenderConfig](#renderconfig) | Configuration for rendering the animation. |

@@ -187,2 +188,3 @@ ### Methods

| `setUseFrameInterpolation(useFrameInterpolation: boolean)` | Sets whether the animation should update on subframes. |
| `setRenderConfig(renderConfig: RenderConfig)` | Sets the render configuration. check [RenderConfig](#renderconfig) for more details. |

@@ -189,0 +191,0 @@ ### Static Methods

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc