reacthub-pixitweenjs 0.2.12 → 0.2.15
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/components/PixiAnimatedSprite/PixiAnimatedSprite.d.ts +23 -0
- package/dist/components/PixiAnimatedSprite/index.d.ts +1 -0
- package/dist/components/PixiAudioSprite/PixiAudioSprite.d.ts +11 -0
- package/dist/components/PixiAudioSprite/PixiAudioSprite.stories.d.ts +44 -0
- package/dist/components/PixiAudioSprite/index.d.ts +1 -0
- package/dist/components/PixiGifSprite/PixiGifSprite.d.ts +61 -0
- package/dist/components/PixiGifSprite/PixiGifSprite.stories.d.ts +193 -0
- package/dist/components/PixiGifSprite/index.d.ts +2 -0
- package/dist/components/PixiImageSprite/PixiImageSprite.d.ts +4 -0
- package/dist/components/PixiImageSprite/PixiImageSprite.stories.d.ts +125 -0
- package/dist/components/PixiImageSprite/index.d.ts +1 -0
- package/dist/components/PixiSVGSprite/PixiSvgPathSprite.d.ts +61 -0
- package/dist/components/PixiSVGSprite/index.d.ts +1 -0
- package/dist/components/PixiTextSprite/PixiTextSprite.d.ts +84 -0
- package/dist/components/PixiTextSprite/index.d.ts +1 -0
- package/dist/components/PixiVideoSprite/PixiVideoSprite.d.ts +57 -0
- package/dist/components/PixiVideoSprite/PixiVideoSprite.stories.d.ts +183 -0
- package/dist/components/PixiVideoSprite/index.d.ts +1 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/declare.module.d.ts +0 -0
- package/dist/hocs/AbstractContainer.d.ts +4 -0
- package/dist/hocs/WithFilterContainer.d.ts +42 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.es.js +184 -184
- package/dist/index.umd.js +21 -21
- package/dist/providers/GsapPixieContextProvider.d.ts +33 -0
- package/dist/providers/index.d.ts +1 -0
- package/dist/types/Animations.d.ts +40 -0
- package/dist/types/BaseProps.d.ts +56 -0
- package/dist/types/BlendModes.d.ts +19 -0
- package/dist/types/Effects.d.ts +11 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/transformation.d.ts +12 -0
- package/dist/utils/AppStateProvider.d.ts +11 -0
- package/dist/utils/AppStateStage.d.ts +6 -0
- package/dist/utils/AppWrapper.d.ts +7 -0
- package/dist/utils/ContextBridge.d.ts +7 -0
- package/dist/utils/GsapAnim.d.ts +29 -0
- package/dist/utils/InteractionManager.d.ts +18 -0
- package/dist/utils/PixiStage.d.ts +9 -0
- package/dist/utils/PixiTransformer.d.ts +18 -0
- package/dist/utils/VideoSeekBar.d.ts +2 -0
- package/dist/utils/useDebounce.d.ts +1 -0
- package/dist/utils/useDeepEffect.d.ts +4 -0
- package/package.json +7 -5
- package/dist/vite.svg +0 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface GsapPixieContextProps {
|
|
3
|
+
gsapCtx: React.MutableRefObject<any>;
|
|
4
|
+
tl: React.MutableRefObject<any>;
|
|
5
|
+
play: boolean;
|
|
6
|
+
isDragging: boolean;
|
|
7
|
+
handlePlay: () => void;
|
|
8
|
+
handlePause: () => void;
|
|
9
|
+
handleReset: () => void;
|
|
10
|
+
handleSeek: (value: number) => void;
|
|
11
|
+
handleSeekTest: () => void;
|
|
12
|
+
handleRestart: () => void;
|
|
13
|
+
handleRepeat: () => void;
|
|
14
|
+
playerTimeRef: React.MutableRefObject<number>;
|
|
15
|
+
totalDuration: number;
|
|
16
|
+
}
|
|
17
|
+
declare const GsapPixieContext: React.Context<GsapPixieContextProps>;
|
|
18
|
+
declare const Events: {
|
|
19
|
+
STOP: string;
|
|
20
|
+
PAUSE: string;
|
|
21
|
+
PLAY: string;
|
|
22
|
+
RESUME: string;
|
|
23
|
+
RESTART: string;
|
|
24
|
+
REPEAT: string;
|
|
25
|
+
SEEK: string;
|
|
26
|
+
RESET: string;
|
|
27
|
+
DRAGGING_START: string;
|
|
28
|
+
DRAGGING_END: string;
|
|
29
|
+
};
|
|
30
|
+
declare const GsapPixieContextProvider: React.FC<{
|
|
31
|
+
children: React.ReactNode;
|
|
32
|
+
}>;
|
|
33
|
+
export { GsapPixieContext, GsapPixieContextProvider, Events };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./GsapPixieContextProvider";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare enum Animations {
|
|
2
|
+
FADE_IN = "FADE_IN",
|
|
3
|
+
FADE_OUT = "FADE_OUT",
|
|
4
|
+
FADE_IN_OUT = "FADE_IN_OUT",
|
|
5
|
+
SLIDE_IN_LEFT = "SLIDE_IN_LEFT",
|
|
6
|
+
SLIDE_IN_RIGHT = "SLIDE_IN_RIGHT",
|
|
7
|
+
SLIDE_IN_TOP = "SLIDE_IN_TOP",
|
|
8
|
+
SLIDE_IN_BOTTOM = "SLIDE_IN_BOTTOM",
|
|
9
|
+
SLIDE_OUT_LEFT = "SLIDE_OUT_LEFT",
|
|
10
|
+
SLIDE_OUT_RIGHT = "SLIDE_OUT_RIGHT",
|
|
11
|
+
SLIDE_OUT_TOP = "SLIDE_OUT_TOP",
|
|
12
|
+
SLIDE_OUT_BOTTOM = "SLIDE_OUT_BOTTOM",
|
|
13
|
+
ZOOM_IN = "ZOOM_IN",
|
|
14
|
+
ZOOM_OUT = "ZOOM_OUT",
|
|
15
|
+
ZOOM_IN_OUT = "ZOOM_IN_OUT",
|
|
16
|
+
BOUNCE_IN = "BOUNCE_IN",
|
|
17
|
+
BOUNCE_OUT = "BOUNCE_OUT",
|
|
18
|
+
BOUNCE_IN_OUT = "BOUNCE_IN_OUT",
|
|
19
|
+
ELASTIC_IN = "ELASTIC_IN",
|
|
20
|
+
ELASTIC_OUT = "ELASTIC_OUT",
|
|
21
|
+
ELASTIC_IN_OUT = "ELASTIC_IN_OUT",
|
|
22
|
+
BACK_IN = "BACK_IN",
|
|
23
|
+
BACK_OUT = "BACK_OUT",
|
|
24
|
+
BACK_IN_OUT = "BACK_IN_OUT",
|
|
25
|
+
CIRCULAR_IN = "CIRCULAR_IN",
|
|
26
|
+
CIRCULAR_OUT = "CIRCULAR_OUT",
|
|
27
|
+
CIRCULAR_IN_OUT = "CIRCULAR_IN_OUT",
|
|
28
|
+
EXPO_IN = "EXPO_IN",
|
|
29
|
+
EXPO_OUT = "EXPO_OUT",
|
|
30
|
+
EXPO_IN_OUT = "EXPO_IN_OUT",
|
|
31
|
+
SINE_IN = "SINE_IN",
|
|
32
|
+
SINE_OUT = "SINE_OUT",
|
|
33
|
+
SINE_IN_OUT = "SINE_IN_OUT",
|
|
34
|
+
BOUNCE = "BOUNCE",
|
|
35
|
+
ELASTIC = "ELASTIC",
|
|
36
|
+
BACK = "BACK",
|
|
37
|
+
CIRCULAR = "CIRCULAR",
|
|
38
|
+
EXPO = "EXPO",
|
|
39
|
+
SINE = "SINE"
|
|
40
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Effects } from "./Effects";
|
|
3
|
+
export interface PixiBaseSpriteProps {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
uniqueId: string;
|
|
6
|
+
src?: string;
|
|
7
|
+
path?: string;
|
|
8
|
+
text?: string;
|
|
9
|
+
startAt: number;
|
|
10
|
+
endAt: number;
|
|
11
|
+
initialAlpha: number;
|
|
12
|
+
transformation: {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
anchor: number;
|
|
18
|
+
rotation?: number;
|
|
19
|
+
alpha?: number;
|
|
20
|
+
scale?: number | [number, number];
|
|
21
|
+
tint?: number;
|
|
22
|
+
blendMode?: number;
|
|
23
|
+
animation?: string;
|
|
24
|
+
colorCorrection?: {
|
|
25
|
+
enabled?: boolean;
|
|
26
|
+
temperature?: number;
|
|
27
|
+
hue?: number;
|
|
28
|
+
contrast?: number;
|
|
29
|
+
saturation?: number;
|
|
30
|
+
brightness?: number;
|
|
31
|
+
exposure?: number;
|
|
32
|
+
reset?: boolean;
|
|
33
|
+
sharpness?: number;
|
|
34
|
+
value?: number;
|
|
35
|
+
levels?: number;
|
|
36
|
+
luminance?: number;
|
|
37
|
+
enhance?: number;
|
|
38
|
+
blurRadius?: number;
|
|
39
|
+
red?: number;
|
|
40
|
+
green?: number;
|
|
41
|
+
blue?: number;
|
|
42
|
+
alpha?: number;
|
|
43
|
+
scaleInput?: number;
|
|
44
|
+
};
|
|
45
|
+
effect?: Effects;
|
|
46
|
+
};
|
|
47
|
+
pointerdown?: () => void;
|
|
48
|
+
pointerup?: () => void;
|
|
49
|
+
mousedown?: () => void;
|
|
50
|
+
mouseup?: () => void;
|
|
51
|
+
pointerover?: () => void;
|
|
52
|
+
mouseover?: () => void;
|
|
53
|
+
mouseout?: () => void;
|
|
54
|
+
applyTransformer?: boolean;
|
|
55
|
+
onAnchorTransformationEnd?: (endData: any) => void;
|
|
56
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare enum BlendModes {
|
|
2
|
+
NORMAL = 0,
|
|
3
|
+
ADD = 1,
|
|
4
|
+
MULTIPLY = 2,
|
|
5
|
+
SCREEN = 3,
|
|
6
|
+
OVERLAY = 4,
|
|
7
|
+
DARKEN = 5,
|
|
8
|
+
LIGHTEN = 6,
|
|
9
|
+
COLOR_DODGE = 7,
|
|
10
|
+
COLOR_BURN = 8,
|
|
11
|
+
HARD_LIGHT = 9,
|
|
12
|
+
SOFT_LIGHT = 10,
|
|
13
|
+
DIFFERENCE = 11,
|
|
14
|
+
EXCLUSION = 12,
|
|
15
|
+
HUE = 13,
|
|
16
|
+
SATURATION = 14,
|
|
17
|
+
COLOR = 15,
|
|
18
|
+
LUMINOSITY = 16
|
|
19
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface AppState {
|
|
3
|
+
transformation: {
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
interface AppStateContextProviderProps extends AppState {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const AppStateContextProvider: React.FC<AppStateContextProviderProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const ContextBridge: <T>({ children, Context, render, }: {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
Context: React.Context<T>;
|
|
5
|
+
render: (children: React.ReactNode) => JSX.Element;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default ContextBridge;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
interface Ease {
|
|
2
|
+
from?: {
|
|
3
|
+
duration: number;
|
|
4
|
+
ease: string;
|
|
5
|
+
y?: number;
|
|
6
|
+
x?: number;
|
|
7
|
+
};
|
|
8
|
+
fromTo?: {
|
|
9
|
+
from: {
|
|
10
|
+
y?: number;
|
|
11
|
+
x?: number;
|
|
12
|
+
alpha?: number;
|
|
13
|
+
};
|
|
14
|
+
to: {
|
|
15
|
+
ease: string;
|
|
16
|
+
y?: number;
|
|
17
|
+
x?: number;
|
|
18
|
+
alpha?: number;
|
|
19
|
+
duration: number;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
to?: {
|
|
23
|
+
ease: string;
|
|
24
|
+
alpha: number;
|
|
25
|
+
duration: number;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export declare const getAnimByName: (animate: string) => Ease;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type PixiInteractionManagerProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
options?: {
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Initialize Pixi Interaction Manager
|
|
10
|
+
* @param param0
|
|
11
|
+
* @returns
|
|
12
|
+
* @see https://pixijs.download/dev/docs/PIXI.InteractionManager.html
|
|
13
|
+
* @see https://pixijs.download/dev/docs/PIXI.InteractionManager.html#moveWhenInside
|
|
14
|
+
* @see https://pixijs.download/dev/docs/PIXI.InteractionManager.html#on
|
|
15
|
+
*
|
|
16
|
+
* */
|
|
17
|
+
declare const InteractionManager: ({ children, options, }: PixiInteractionManagerProps) => import("react").ReactNode;
|
|
18
|
+
export default InteractionManager;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type PixiTransformerProps = {
|
|
3
|
+
pixiTransformerRef: React.MutableRefObject<any>;
|
|
4
|
+
imageRef: React.MutableRefObject<any>;
|
|
5
|
+
isMounted: boolean;
|
|
6
|
+
transformCommit?: (data: any) => void;
|
|
7
|
+
transformChange?: (data: any) => void;
|
|
8
|
+
mouseoverEvent?: (flag: boolean) => void;
|
|
9
|
+
onDoubleClick?: (data: any) => void;
|
|
10
|
+
uniqueId?: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Initialize PixiTransformer to transform the image
|
|
14
|
+
* @param param0
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
declare const PixiTransformer: ({ pixiTransformerRef, imageRef, isMounted, transformCommit, transformChange, mouseoverEvent, onDoubleClick, uniqueId, }: PixiTransformerProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default PixiTransformer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useDebounce<T>(value: T, delay?: number): T;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reacthub-pixitweenjs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.15",
|
|
4
4
|
"description": "reacthub-pixitweenjs is a library that provides a powerful combination of React, PixiJS, GSAP, and image manipulation capabilities in a timeline sequence. With this library, you can easily create stunning animations and interactive graphics for your React applications",
|
|
5
5
|
"author": "khanzzirfan <reacthub.ai@gmail.com>",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"module": "dist/index.
|
|
6
|
+
"main": "dist/index.es.js",
|
|
7
|
+
"module": "dist/index.es.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
9
|
"keywords": [
|
|
10
10
|
"pixijs",
|
|
@@ -53,6 +53,8 @@
|
|
|
53
53
|
"@pixi/react": "~7.1.0",
|
|
54
54
|
"@pixi/sound": "^5.2.1",
|
|
55
55
|
"@react-gifs/tools": "^0.1.2",
|
|
56
|
+
"@rollup/plugin-commonjs": "^25.0.4",
|
|
57
|
+
"@rollup/plugin-node-resolve": "^15.2.1",
|
|
56
58
|
"@storybook/addon-essentials": "^7.1.0",
|
|
57
59
|
"@storybook/addon-interactions": "^7.1.0",
|
|
58
60
|
"@storybook/addon-links": "^7.1.0",
|
|
@@ -114,9 +116,9 @@
|
|
|
114
116
|
"typescript": "^5.1.6",
|
|
115
117
|
"typescript-plugin-css-modules": "^5.0.1",
|
|
116
118
|
"vite": "^4.4.4",
|
|
119
|
+
"vite-plugin-dts": "^3.5.2",
|
|
117
120
|
"vite-plugin-environment": "^1.1.3",
|
|
118
121
|
"vite-plugin-stylelint": "^4.3.0",
|
|
119
122
|
"vitest": "^0.30.1"
|
|
120
|
-
}
|
|
121
|
-
"dependencies": {}
|
|
123
|
+
}
|
|
122
124
|
}
|
package/dist/vite.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|