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

preview-animation

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

preview-animation - npm Package Compare versions

Comparing version 0.1.11 to 0.1.12

2

dist/components/progress-bar/index.d.ts
import React from 'react';
import { Lang } from '../../types';
declare type ProcessBarType = {

@@ -6,2 +7,3 @@ currentFrame: number;

endFrame: number;
lang?: Lang;
handleProcessClick: (processBarTipFrame: number) => void;

@@ -8,0 +10,0 @@ };

4

dist/hook/useGlobalState.d.ts
/// <reference types="react" />
import { ControllerType } from '../utils/preLoadImg';
import { LabelType, PreviewAnimationType } from '../types';
export declare const useGlobalState: () => {
import { LabelType, Lang, PreviewAnimationType } from '../types';
export declare const useGlobalState: (lang?: Lang) => {
bottomPreviewAnimationGroup: PreviewAnimationType[];

@@ -6,0 +6,0 @@ currentTaskIndex: number | undefined;

import * as React from 'react';
import './index.less';
import { Lang } from './types';
export declare const PreviewAnimation: React.FC<{

@@ -7,2 +8,3 @@ data: any[];

renderFrame?: string;
lang?: Lang;
}>;
{
"version": "0.1.11",
"version": "0.1.12",
"license": "MIT",

@@ -4,0 +4,0 @@ "main": "dist/index.js",

@@ -1,11 +0,37 @@

### 启动
```bash
npm start # or yarn start
### Usage
- install package
`yarn add preview-animation`
- create
```shell
import { PreviewAnimation } from "preview-animation";
```
### 启动example
```bash
cd example
npm i # or yarn to install dependencies
npm start # or yarn start
```
## Component
### parameter
```shell
data:{
'fileName': {
taskThumbnails:string[],
pre:string,
fps:number,
frameIndexList:string[]
}[];
blockNum?: number;
renderFrame?: string;
lang?:'zh' | 'en';
}
```
## More info
check the example
import { useCallback, useRef, useState } from 'react';
import { useTranslate } from './useTranslate';
import { ControllerType } from '../utils/preLoadImg';
import { LabelType, PreviewAnimationType } from '../types';
import { LabelType, Lang, PreviewAnimationType } from '../types';
const GAP = 1000;
export const useGlobalState = () => {
export const useGlobalState = (lang = Lang.ZH) => {
// 记录左侧预览的动画

@@ -39,3 +39,3 @@ const [leftPreviewAnimationGroup, setLeftPreviewAnimationGroup] = useState<

const currentFrameIndexRef = useRef(0);
const { t } = useTranslate();
const { t } = useTranslate(lang);
const [preloadController, setPreloadController] = useState<ControllerType>();

@@ -42,0 +42,0 @@

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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