reacthub-pixitweenjs 0.2.107-prealpha.0 → 0.2.107-prealpha.1
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/README.md +1 -1
- package/dist/components/PixiTextSprite/PixiTextSprite.d.ts +1 -0
- package/dist/components/PixiTransformer/MenuIcons.d.ts +40 -0
- package/dist/components/PixiTransformer/MenuUtils.d.ts +2 -0
- package/dist/components/PixiTransformer/PixiColorPicker.d.ts +14 -0
- package/dist/components/PixiTransformer/PixiDropdownMenu.d.ts +16 -0
- package/dist/components/PixiTransformer/PixiMenuText.d.ts +2 -0
- package/dist/components/PixiTransformer/PixiTransformer.d.ts +2 -1
- package/dist/components/PixiTransformer/PixiTransformerMenu.d.ts +9 -0
- package/dist/hocs/AbstractContainer.d.ts +3 -1
- package/dist/hooks/useGsapEffect.d.ts +15 -3
- package/dist/index.es.js +4506 -3209
- package/dist/index.umd.js +18 -18
- package/dist/providers/GsapPixieContextProvider.d.ts +1 -0
- package/dist/types/BaseProps.d.ts +10 -2
- package/dist/types/transformation.d.ts +1 -0
- package/package.json +11 -7
package/README.md
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
declare const MENUS_ICONS: {
|
|
2
|
+
ARROW_DOWN: string;
|
|
3
|
+
ARROW_UP: string;
|
|
4
|
+
COLOR: string;
|
|
5
|
+
COPY: string;
|
|
6
|
+
DELETE: string;
|
|
7
|
+
TRASH: string;
|
|
8
|
+
EYE: string;
|
|
9
|
+
EYE_SLASH: string;
|
|
10
|
+
LOCK: string;
|
|
11
|
+
UNLOCK: string;
|
|
12
|
+
PASTE: string;
|
|
13
|
+
PENCIL: string;
|
|
14
|
+
PLUS: string;
|
|
15
|
+
MINUS: string;
|
|
16
|
+
ROTATE: string;
|
|
17
|
+
SCALE: string;
|
|
18
|
+
SAVE: string;
|
|
19
|
+
RESET: string;
|
|
20
|
+
SETTINGS: string;
|
|
21
|
+
ZOOM_IN: string;
|
|
22
|
+
ZOOM_OUT: string;
|
|
23
|
+
ALIGN_LEFT: string;
|
|
24
|
+
ALIGN_CENTER: string;
|
|
25
|
+
ALIGN_RIGHT: string;
|
|
26
|
+
DISTRIBUTE_HORIZONTALLY: string;
|
|
27
|
+
DISTRIBUTE_VERTICALLY: string;
|
|
28
|
+
FLIP_HORIZONTAL: string;
|
|
29
|
+
FLIP_VERTICAL: string;
|
|
30
|
+
ROTATE_LEFT: string;
|
|
31
|
+
ROTATE_RIGHT: string;
|
|
32
|
+
SCALE_DOWN: string;
|
|
33
|
+
SCALE_UP: string;
|
|
34
|
+
ADJUST_EQUALISER: string;
|
|
35
|
+
ADJUST_EQUALISER_SLIDERS: string;
|
|
36
|
+
ADJUST_HORIZONTAL_SLIDERS: string;
|
|
37
|
+
COLOR_FILL: string;
|
|
38
|
+
};
|
|
39
|
+
declare const MAX_RECENT_COLORS = 10;
|
|
40
|
+
export { MENUS_ICONS, MAX_RECENT_COLORS };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface Position {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
}
|
|
6
|
+
interface ColorPickerPortalProps {
|
|
7
|
+
position: Position;
|
|
8
|
+
color: string;
|
|
9
|
+
onChange: (color: string) => void;
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
recentColors?: string[];
|
|
12
|
+
}
|
|
13
|
+
declare const ColorPickerPortal: ({ position, color, onChange, onClose, }: ColorPickerPortalProps) => React.ReactPortal;
|
|
14
|
+
export default ColorPickerPortal;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as PIXI from "pixi.js";
|
|
3
|
+
interface AlignmentOption {
|
|
4
|
+
icon: string;
|
|
5
|
+
label: string;
|
|
6
|
+
action: () => void;
|
|
7
|
+
}
|
|
8
|
+
interface DropdownPosition {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
}
|
|
12
|
+
declare const useDropDownMenu: (setShowAlignmentDropdown: (show: boolean) => void) => {
|
|
13
|
+
createMenu: (showAlignmentDropdown: boolean, alignmentOptions: AlignmentOption[], dropdownPosition: DropdownPosition) => (() => void) | undefined;
|
|
14
|
+
dropdownRef: import("react").MutableRefObject<PIXI.Container<PIXI.DisplayObject> | null>;
|
|
15
|
+
};
|
|
16
|
+
export default useDropDownMenu;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { Transformer } from "reacthub-react-bindings";
|
|
2
3
|
type PixiTransformerProps = {
|
|
3
|
-
pixiTransformerRef: React.MutableRefObject<
|
|
4
|
+
pixiTransformerRef: React.MutableRefObject<Transformer>;
|
|
4
5
|
imageRef: React.MutableRefObject<any>;
|
|
5
6
|
isMounted: boolean;
|
|
6
7
|
transformCommit?: (data: any) => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Transformer } from "@pixi-essentials/transformer";
|
|
3
|
+
interface TransformerMenuProps {
|
|
4
|
+
PixiTransformer: React.MutableRefObject<Transformer>;
|
|
5
|
+
uniqueId: string;
|
|
6
|
+
isText: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const TransformerMenu: ({ PixiTransformer }: TransformerMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { PixiBaseSpriteProps, ForwardedRefResponse } from "../types/BaseProps";
|
|
2
|
+
import { PixiBaseSpriteProps, ForwardedRefResponse, containerScale } from "../types/BaseProps";
|
|
3
3
|
interface AbstractContainerProps extends PixiBaseSpriteProps {
|
|
4
4
|
ignoreTlForVideo?: boolean;
|
|
5
5
|
isText?: boolean;
|
|
@@ -7,6 +7,8 @@ interface AbstractContainerProps extends PixiBaseSpriteProps {
|
|
|
7
7
|
isGif?: boolean;
|
|
8
8
|
onDoubleClick?: () => void;
|
|
9
9
|
isTextEditMode?: boolean;
|
|
10
|
+
handleDragWordWrap?: (width: number, containerScale: containerScale) => void;
|
|
11
|
+
handleDragFontSize?: (width: number, fontSize: number, containerScale: containerScale) => void;
|
|
10
12
|
}
|
|
11
13
|
declare const AbstractContainer: React.ForwardRefExoticComponent<AbstractContainerProps & React.RefAttributes<ForwardedRefResponse | null>>;
|
|
12
14
|
export default AbstractContainer;
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
interface GsapEffectVars {
|
|
3
|
+
immediateRender?: boolean;
|
|
4
|
+
x?: number;
|
|
5
|
+
y?: number;
|
|
6
|
+
overwrite?: boolean;
|
|
7
|
+
maxX?: number;
|
|
8
|
+
maxY?: number;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
interface GsapEffectResult {
|
|
12
|
+
updateEffect: (target: PIXI.Container | null, effect: string, vars: GsapEffectVars) => gsap.core.Tween | gsap.core.Timeline;
|
|
13
|
+
}
|
|
14
|
+
export declare function useGsapEffect(): GsapEffectResult;
|
|
15
|
+
export {};
|