Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dotlottie/react-player

Package Overview
Dependencies
Maintainers
3
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dotlottie/react-player - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

dist/chunk-CFFUVKG4.js

6

dist/controls.js

@@ -1,4 +0,6 @@

export { a as Controls } from './chunk-NCDSG2XD.js';
import './chunk-FMS366MP.js';
export { a as Controls } from './chunk-CFFUVKG4.js';
import './chunk-DOMEZ2JD.js';
import './chunk-EJS7TKYF.js';
import './chunk-M2BEWT7H.js';
//# sourceMappingURL=out.js.map
//# sourceMappingURL=controls.js.map

@@ -0,1 +1,7 @@

import { e, b as b$1, P, R } from './dotlottie-player-470b89a9.js';
export { b as PlayMode, P as PlayerEvents, a as PlayerState } from './dotlottie-player-470b89a9.js';
import { b } from './dotlottie-state-machine-common-f17570dd.js';
export { b as PlaybackOptions } from './dotlottie-state-machine-common-f17570dd.js';
import { M } from './manifest-c3ad44f7.js';
export { M as Manifest, a as ManifestAnimation, e as ManifestTheme } from './manifest-c3ad44f7.js';
import React, { MutableRefObject } from 'react';

@@ -101,37 +107,2 @@

type BaseRendererConfig = {
imagePreserveAspectRatio?: string;
className?: string;
};
type SVGRendererConfig = BaseRendererConfig & {
title?: string;
description?: string;
preserveAspectRatio?: string;
progressiveLoad?: boolean;
hideOnTransparent?: boolean;
viewBoxOnly?: boolean;
viewBoxSize?: string;
focusable?: boolean;
filterSize?: FilterSizeConfig;
};
type CanvasRendererConfig = BaseRendererConfig & {
clearCanvas?: boolean;
context?: CanvasRenderingContext2D;
progressiveLoad?: boolean;
preserveAspectRatio?: string;
};
type HTMLRendererConfig = BaseRendererConfig & {
hideOnTransparent?: boolean;
};
type FilterSizeConfig = {
width: string;
height: string;
x: string;
y: string;
};
/**

@@ -141,95 +112,28 @@ * Copyright 2023 Design Barn Inc.

declare enum PlayerEvents {
Complete = "complete",
DataFail = "data_fail",
DataReady = "data_ready",
Error = "error",
Frame = "frame",
Freeze = "freeze",
LoopComplete = "loopComplete",
Pause = "pause",
Play = "play",
Ready = "ready",
Stop = "stop"
}
declare enum PlayerState {
Error = "error",
Fetching = "fetching",
Frozen = "frozen",
Initial = "initial",
Loading = "loading",
Paused = "paused",
Playing = "playing",
Ready = "ready",
Stopped = "stopped"
}
declare enum PlayMode {
Bounce = "bounce",
Normal = "normal"
}
interface ManifestTheme {
animations: string[];
id: string;
}
interface ManifestAnimation {
autoplay?: boolean;
defaultTheme?: string;
direction?: AnimationDirection;
hover?: boolean;
id: string;
intermission?: number;
loop?: boolean | number;
playMode?: PlayMode;
speed?: number;
themeColor?: string;
}
type PlaybackOptions = Omit<ManifestAnimation, 'id'>;
interface Manifest {
activeAnimationId?: string;
animations: ManifestAnimation[];
author?: string;
custom?: Record<string, unknown>;
description?: string;
generator?: string;
keywords?: string;
revision?: number;
themes?: ManifestTheme[];
version?: string;
}
type RendererSettings = SVGRendererConfig & CanvasRendererConfig & HTMLRendererConfig;
declare global {
interface Window {
dotLottiePlayer: Record<string, Record<string, unknown>>;
}
}
interface DotLottiePlayerState extends PlaybackOptions {
background: string;
currentAnimationId: string | undefined;
currentState: PlayerState;
frame: number;
intermission: number;
seeker: number;
}
/**
* Copyright 2023 Design Barn Inc.
*/
interface DotLottieRefProps {
enterInteractiveMode: (stateId: string) => void;
exitInteractiveMode: () => void;
getContainer: () => HTMLDivElement | undefined;
getCurrentAnimationId: () => string | undefined;
getLottie: () => AnimationItem | undefined;
getManifest: () => Manifest | undefined;
getState: () => DotLottiePlayerState;
getManifest: () => M | undefined;
getState: () => e;
getVersions: () => Versions;
goToAndPlay(value: number | string, isFrame?: boolean, name?: string): void;
goToAndStop(value: number | string, isFrame?: boolean, name?: string): void;
next: (getOptions?: (currPlaybackOptions?: PlaybackOptions, manifestPlaybackOptions?: PlaybackOptions) => PlaybackOptions) => void;
next: (getOptions?: (currPlaybackOptions?: b, manifestPlaybackOptions?: b) => b) => void;
pause: () => void;
play: (indexOrId?: string | number, getOptions?: (currPlaybackOptions?: PlaybackOptions, manifestPlaybackOptions?: PlaybackOptions) => PlaybackOptions) => void;
previous: (getOptions?: (currPlaybackOptions?: PlaybackOptions, manifestPlaybackOptions?: PlaybackOptions) => PlaybackOptions) => void;
play: (indexOrId?: string | number, getOptions?: (currPlaybackOptions?: b, manifestPlaybackOptions?: b) => b) => void;
playOnScroll: (scrollOptions?: {
positionCallback?: (position: number) => void;
segments?: [number, number];
threshold?: [number, number];
}) => void;
playOnShow: (playOnShowOptions?: {
threshold: number[];
}) => void;
previous: (getOptions?: (currPlaybackOptions?: b, manifestPlaybackOptions?: b) => b) => void;
reset: () => void;
resize(): void;
revertToManifestValues: (playbackKeys?: Array<keyof PlaybackOptions | 'activeAnimationId'>) => void;
revertToManifestValues: (playbackKeys?: Array<keyof b | 'activeAnimationId'>) => void;
seek: (frame: number) => void;

@@ -243,5 +147,7 @@ setAutoplay: (autoplay: boolean) => void;

setLoop: (loop: number | boolean) => void;
setPlayMode: (mode: PlayMode) => void;
setPlayMode: (mode: b$1) => void;
setSpeed: (speed: number) => void;
stop(): void;
stopPlayOnScroll: () => void;
stopPlayOnShow: () => void;
togglePlay(): void;

@@ -260,2 +166,3 @@ }

activeAnimationId?: string;
activeStateId?: string;
autoplay?: boolean;

@@ -268,8 +175,9 @@ background?: string;

intermission?: number;
light?: boolean;
loop?: number | boolean;
lottieRef?: MutableRefObject<DotLottieRefProps | undefined>;
onEvent?: <T extends PlayerEvents>(name: T, params?: unknown) => void;
playMode?: PlayMode;
onEvent?: <T extends P>(name: T, params?: unknown) => void;
playMode?: b$1;
renderer?: 'svg' | 'canvas' | 'html';
rendererSettings?: RendererSettings;
rendererSettings?: R;
speed?: number;

@@ -292,2 +200,2 @@ src: Record<string, unknown> | string;

export { AnimationItem, Controls, DotLottiePlayer, DotLottiePlayerProps, DotLottieRefProps, Manifest, ManifestAnimation, ManifestTheme, PlayMode, PlaybackOptions, PlayerEvents, PlayerState };
export { AnimationItem, Controls, DotLottiePlayer, DotLottiePlayerProps, DotLottieRefProps };

@@ -1,5 +0,7 @@

export { a as Controls } from './chunk-NCDSG2XD.js';
export { a as DotLottiePlayer } from './chunk-KUTI7W2Y.js';
export { c as PlayMode, a as PlayerEvents, b as PlayerState } from './chunk-FMS366MP.js';
export { a as Controls } from './chunk-CFFUVKG4.js';
export { a as DotLottiePlayer } from './chunk-WXJCNDUH.js';
import './chunk-DOMEZ2JD.js';
export { f as PlayMode, d as PlayerEvents, e as PlayerState } from './chunk-EJS7TKYF.js';
import './chunk-M2BEWT7H.js';
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.js.map

@@ -1,4 +0,6 @@

export { a as DotLottiePlayer } from './chunk-KUTI7W2Y.js';
import './chunk-FMS366MP.js';
export { a as DotLottiePlayer } from './chunk-WXJCNDUH.js';
import './chunk-DOMEZ2JD.js';
import './chunk-EJS7TKYF.js';
import './chunk-M2BEWT7H.js';
//# sourceMappingURL=out.js.map
//# sourceMappingURL=react-player.js.map
{
"name": "@dotlottie/react-player",
"version": "1.2.1",
"version": "1.3.0",
"type": "module",

@@ -42,3 +42,3 @@ "description": "dotlottie animation player react component.",

"vite": "^4.2.1",
"@dotlottie/common": "^0.3.0"
"@dotlottie/common": "^0.4.0"
},

@@ -45,0 +45,0 @@ "scripts": {

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