reacthub-pixitweenjs 0.2.12 → 0.2.13
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/App.d.ts +2 -0
- 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/main.d.ts +0 -0
- 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,183 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").FC<{
|
|
6
|
+
uniqueId: string;
|
|
7
|
+
src: string;
|
|
8
|
+
startAt: number;
|
|
9
|
+
endAt: number;
|
|
10
|
+
frameStartAt: number;
|
|
11
|
+
frameEndAt: number;
|
|
12
|
+
mute: boolean;
|
|
13
|
+
locked: boolean;
|
|
14
|
+
initialAlpha: number;
|
|
15
|
+
transformation: {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
anchor: number;
|
|
21
|
+
rotation?: number | undefined;
|
|
22
|
+
alpha?: number | undefined;
|
|
23
|
+
scale?: number | [number, number] | undefined;
|
|
24
|
+
tint?: number | undefined;
|
|
25
|
+
blendMode?: number | undefined;
|
|
26
|
+
animation?: string | undefined;
|
|
27
|
+
colorCorrection?: {
|
|
28
|
+
enabled?: boolean | undefined;
|
|
29
|
+
temperature?: number | undefined;
|
|
30
|
+
hue?: number | undefined;
|
|
31
|
+
contrast?: number | undefined;
|
|
32
|
+
saturation?: number | undefined;
|
|
33
|
+
exposure?: number | undefined;
|
|
34
|
+
reset?: boolean | undefined;
|
|
35
|
+
sharpness?: number | undefined;
|
|
36
|
+
value?: number | undefined;
|
|
37
|
+
levels?: number | undefined;
|
|
38
|
+
luminance?: number | undefined;
|
|
39
|
+
enhance?: number | undefined;
|
|
40
|
+
blurRadius?: number | undefined;
|
|
41
|
+
red?: number | undefined;
|
|
42
|
+
green?: number | undefined;
|
|
43
|
+
blue?: number | undefined;
|
|
44
|
+
alpha?: number | undefined;
|
|
45
|
+
scaleInput?: number | undefined;
|
|
46
|
+
} | undefined;
|
|
47
|
+
effect?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
pointerdown?: (() => void) | undefined;
|
|
50
|
+
pointerup?: (() => void) | undefined;
|
|
51
|
+
mousedown?: (() => void) | undefined;
|
|
52
|
+
mouseup?: (() => void) | undefined;
|
|
53
|
+
pointerover?: (() => void) | undefined;
|
|
54
|
+
mouseover?: (() => void) | undefined;
|
|
55
|
+
mouseout?: (() => void) | undefined;
|
|
56
|
+
applyTransformer?: boolean | undefined;
|
|
57
|
+
onAnchorTransformationEnd?: ((endData: any) => void) | undefined;
|
|
58
|
+
}>;
|
|
59
|
+
tags: string[];
|
|
60
|
+
argTypes: {
|
|
61
|
+
uniqueId: {
|
|
62
|
+
control: string;
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
src: {
|
|
66
|
+
control: string;
|
|
67
|
+
description: string;
|
|
68
|
+
};
|
|
69
|
+
transformation: {
|
|
70
|
+
control: string;
|
|
71
|
+
description: string;
|
|
72
|
+
x: {
|
|
73
|
+
control: string;
|
|
74
|
+
description: string;
|
|
75
|
+
};
|
|
76
|
+
y: {
|
|
77
|
+
control: string;
|
|
78
|
+
description: string;
|
|
79
|
+
};
|
|
80
|
+
width: {
|
|
81
|
+
control: string;
|
|
82
|
+
description: string;
|
|
83
|
+
};
|
|
84
|
+
height: {
|
|
85
|
+
control: string;
|
|
86
|
+
description: string;
|
|
87
|
+
};
|
|
88
|
+
anchor: {
|
|
89
|
+
control: string;
|
|
90
|
+
description: string;
|
|
91
|
+
};
|
|
92
|
+
rotation: {
|
|
93
|
+
control: string;
|
|
94
|
+
description: string;
|
|
95
|
+
};
|
|
96
|
+
alpha: {
|
|
97
|
+
control: string;
|
|
98
|
+
min: number;
|
|
99
|
+
max: number;
|
|
100
|
+
description: string;
|
|
101
|
+
};
|
|
102
|
+
scale: {
|
|
103
|
+
control: string;
|
|
104
|
+
description: string;
|
|
105
|
+
};
|
|
106
|
+
tint: {
|
|
107
|
+
control: string;
|
|
108
|
+
description: string;
|
|
109
|
+
};
|
|
110
|
+
blendMode: {
|
|
111
|
+
control: string;
|
|
112
|
+
description: string;
|
|
113
|
+
};
|
|
114
|
+
colorCorrection: {
|
|
115
|
+
control: string;
|
|
116
|
+
description: string;
|
|
117
|
+
brightness: {
|
|
118
|
+
control: string;
|
|
119
|
+
description: string;
|
|
120
|
+
};
|
|
121
|
+
contrast: {
|
|
122
|
+
control: string;
|
|
123
|
+
description: string;
|
|
124
|
+
};
|
|
125
|
+
saturation: {
|
|
126
|
+
control: string;
|
|
127
|
+
description: string;
|
|
128
|
+
};
|
|
129
|
+
alpha: {
|
|
130
|
+
control: string;
|
|
131
|
+
description: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
applyTransformer: {
|
|
136
|
+
control: string;
|
|
137
|
+
description: string;
|
|
138
|
+
};
|
|
139
|
+
startAt: {
|
|
140
|
+
control: string;
|
|
141
|
+
description: string;
|
|
142
|
+
};
|
|
143
|
+
endAt: {
|
|
144
|
+
control: string;
|
|
145
|
+
description: string;
|
|
146
|
+
};
|
|
147
|
+
frameStartAt: {
|
|
148
|
+
control: string;
|
|
149
|
+
description: string;
|
|
150
|
+
};
|
|
151
|
+
frameEndAt: {
|
|
152
|
+
control: string;
|
|
153
|
+
description: string;
|
|
154
|
+
};
|
|
155
|
+
mute: {
|
|
156
|
+
control: string;
|
|
157
|
+
description: string;
|
|
158
|
+
};
|
|
159
|
+
locked: {
|
|
160
|
+
control: string;
|
|
161
|
+
description: string;
|
|
162
|
+
};
|
|
163
|
+
initialAlpha: {
|
|
164
|
+
control: string;
|
|
165
|
+
min: number;
|
|
166
|
+
max: number;
|
|
167
|
+
description: string;
|
|
168
|
+
};
|
|
169
|
+
onAnchorTransformationEnd: {
|
|
170
|
+
action: string;
|
|
171
|
+
description: string;
|
|
172
|
+
};
|
|
173
|
+
pointerdown: {
|
|
174
|
+
action: string;
|
|
175
|
+
description: string;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
export default meta;
|
|
180
|
+
type Story = StoryObj<typeof meta>;
|
|
181
|
+
export declare const Normal: Story;
|
|
182
|
+
export declare const FadeIn: Story;
|
|
183
|
+
export declare const Filters: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as PixiVideoSprite } from "./PixiVideoSprite";
|
|
File without changes
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Container } from "@pixi/react";
|
|
3
|
+
import * as PIXI from "pixi.js";
|
|
4
|
+
import { PixiBaseSpriteProps } from "../types/BaseProps";
|
|
5
|
+
import { TransformationEnd } from "../types/transformation";
|
|
6
|
+
declare const withFilterContainer: <P extends object>(WrappedComponent: React.ComponentType<P & PixiBaseSpriteProps>) => {
|
|
7
|
+
new (props: P & PixiBaseSpriteProps): {
|
|
8
|
+
imageRef: React.RefObject<PIXI.Sprite>;
|
|
9
|
+
containerRef: React.RefObject<PIXI.Container<PIXI.DisplayObject>>;
|
|
10
|
+
parentNode: React.RefObject<PIXI.Container<PIXI.DisplayObject>>;
|
|
11
|
+
imgGroupRef: React.RefObject<PIXI.Container<PIXI.DisplayObject>>;
|
|
12
|
+
transformerRef: React.RefObject<PIXI.Container<PIXI.DisplayObject>>;
|
|
13
|
+
isMounted: React.RefObject<boolean>;
|
|
14
|
+
componentDidMount(): void;
|
|
15
|
+
componentWillUnmount(): void;
|
|
16
|
+
/** handle on tranformer onchange */
|
|
17
|
+
handleOnTransformChange: () => void;
|
|
18
|
+
handleOnTransformEnd: (endData: TransformationEnd) => void;
|
|
19
|
+
setIsMouseOverTransformer: (isMouseOverTransformer: boolean) => void;
|
|
20
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
context: unknown;
|
|
22
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<P & PixiBaseSpriteProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
23
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
24
|
+
readonly props: Readonly<P & PixiBaseSpriteProps>;
|
|
25
|
+
state: Readonly<{}>;
|
|
26
|
+
refs: {
|
|
27
|
+
[key: string]: React.ReactInstance;
|
|
28
|
+
};
|
|
29
|
+
shouldComponentUpdate?(nextProps: Readonly<P & PixiBaseSpriteProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
30
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
31
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<P & PixiBaseSpriteProps>, prevState: Readonly<{}>): any;
|
|
32
|
+
componentDidUpdate?(prevProps: Readonly<P & PixiBaseSpriteProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
33
|
+
componentWillMount?(): void;
|
|
34
|
+
UNSAFE_componentWillMount?(): void;
|
|
35
|
+
componentWillReceiveProps?(nextProps: Readonly<P & PixiBaseSpriteProps>, nextContext: any): void;
|
|
36
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P & PixiBaseSpriteProps>, nextContext: any): void;
|
|
37
|
+
componentWillUpdate?(nextProps: Readonly<P & PixiBaseSpriteProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
38
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<P & PixiBaseSpriteProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
39
|
+
};
|
|
40
|
+
contextType?: React.Context<any> | undefined;
|
|
41
|
+
};
|
|
42
|
+
export default withFilterContainer;
|
package/dist/index.d.ts
ADDED
package/dist/main.d.ts
ADDED
|
File without changes
|
|
@@ -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.13",
|
|
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>
|