1 | import { Transform } from './Util.js';
|
---|
2 | import { Node } from './Node.js';
|
---|
3 | import { Container } from './Container.js';
|
---|
4 | import { Stage } from './Stage.js';
|
---|
5 | import { Layer } from './Layer.js';
|
---|
6 | import { FastLayer } from './FastLayer.js';
|
---|
7 | import { Group } from './Group.js';
|
---|
8 | import { Shape } from './Shape.js';
|
---|
9 | import { Animation } from './Animation.js';
|
---|
10 | import { Tween } from './Tween.js';
|
---|
11 | import { Context } from './Context.js';
|
---|
12 | import { Canvas } from './Canvas.js';
|
---|
13 | export declare const Konva: {
|
---|
14 | _global: any;
|
---|
15 | version: string;
|
---|
16 | isBrowser: boolean;
|
---|
17 | isUnminified: boolean;
|
---|
18 | dblClickWindow: number;
|
---|
19 | getAngle(angle: number): number;
|
---|
20 | enableTrace: boolean;
|
---|
21 | pointerEventsEnabled: boolean;
|
---|
22 | autoDrawEnabled: boolean;
|
---|
23 | hitOnDragEnabled: boolean;
|
---|
24 | capturePointerEventsEnabled: boolean;
|
---|
25 | _mouseListenClick: boolean;
|
---|
26 | _touchListenClick: boolean;
|
---|
27 | _pointerListenClick: boolean;
|
---|
28 | _mouseInDblClickWindow: boolean;
|
---|
29 | _touchInDblClickWindow: boolean;
|
---|
30 | _pointerInDblClickWindow: boolean;
|
---|
31 | _mouseDblClickPointerId: null;
|
---|
32 | _touchDblClickPointerId: null;
|
---|
33 | _pointerDblClickPointerId: null;
|
---|
34 | _fixTextRendering: boolean;
|
---|
35 | pixelRatio: number;
|
---|
36 | dragDistance: number;
|
---|
37 | angleDeg: boolean;
|
---|
38 | showWarnings: boolean;
|
---|
39 | dragButtons: number[];
|
---|
40 | isDragging(): any;
|
---|
41 | isTransforming(): any;
|
---|
42 | isDragReady(): boolean;
|
---|
43 | releaseCanvasOnDestroy: boolean;
|
---|
44 | document: any;
|
---|
45 | _injectGlobal(Konva: any): void;
|
---|
46 | } & {
|
---|
47 | Util: {
|
---|
48 | _isElement(obj: any): obj is Element;
|
---|
49 | _isFunction(obj: any): boolean;
|
---|
50 | _isPlainObject(obj: any): boolean;
|
---|
51 | _isArray(obj: any): obj is any[];
|
---|
52 | _isNumber(obj: any): obj is number;
|
---|
53 | _isString(obj: any): obj is string;
|
---|
54 | _isBoolean(obj: any): obj is boolean;
|
---|
55 | isObject(val: any): val is Object;
|
---|
56 | isValidSelector(selector: any): boolean;
|
---|
57 | _sign(number: number): 1 | -1;
|
---|
58 | requestAnimFrame(callback: Function): void;
|
---|
59 | createCanvasElement(): HTMLCanvasElement;
|
---|
60 | createImageElement(): HTMLImageElement;
|
---|
61 | _isInDocument(el: any): boolean;
|
---|
62 | _urlToImage(url: string, callback: Function): void;
|
---|
63 | _rgbToHex(r: number, g: number, b: number): string;
|
---|
64 | _hexToRgb(hex: string): import("./types.js").RGB;
|
---|
65 | getRandomColor(): string;
|
---|
66 | getRGB(color: string): import("./types.js").RGB;
|
---|
67 | colorToRGBA(str: string): {
|
---|
68 | r: number;
|
---|
69 | g: number;
|
---|
70 | b: number;
|
---|
71 | a: number;
|
---|
72 | } | undefined;
|
---|
73 | _namedColorToRBA(str: string): {
|
---|
74 | r: number;
|
---|
75 | g: number;
|
---|
76 | b: number;
|
---|
77 | a: number;
|
---|
78 | } | null;
|
---|
79 | _rgbColorToRGBA(str: string): {
|
---|
80 | r: number;
|
---|
81 | g: number;
|
---|
82 | b: number;
|
---|
83 | a: number;
|
---|
84 | } | undefined;
|
---|
85 | _rgbaColorToRGBA(str: string): {
|
---|
86 | r: number;
|
---|
87 | g: number;
|
---|
88 | b: number;
|
---|
89 | a: number;
|
---|
90 | } | undefined;
|
---|
91 | _hex8ColorToRGBA(str: string): {
|
---|
92 | r: number;
|
---|
93 | g: number;
|
---|
94 | b: number;
|
---|
95 | a: number;
|
---|
96 | } | undefined;
|
---|
97 | _hex6ColorToRGBA(str: string): {
|
---|
98 | r: number;
|
---|
99 | g: number;
|
---|
100 | b: number;
|
---|
101 | a: number;
|
---|
102 | } | undefined;
|
---|
103 | _hex4ColorToRGBA(str: string): {
|
---|
104 | r: number;
|
---|
105 | g: number;
|
---|
106 | b: number;
|
---|
107 | a: number;
|
---|
108 | } | undefined;
|
---|
109 | _hex3ColorToRGBA(str: string): {
|
---|
110 | r: number;
|
---|
111 | g: number;
|
---|
112 | b: number;
|
---|
113 | a: number;
|
---|
114 | } | undefined;
|
---|
115 | _hslColorToRGBA(str: string): {
|
---|
116 | r: number;
|
---|
117 | g: number;
|
---|
118 | b: number;
|
---|
119 | a: number;
|
---|
120 | } | undefined;
|
---|
121 | haveIntersection(r1: import("./types").IRect, r2: import("./types.js").IRect): boolean;
|
---|
122 | cloneObject<Any>(obj: Any): Any;
|
---|
123 | cloneArray(arr: any[]): any[];
|
---|
124 | degToRad(deg: number): number;
|
---|
125 | radToDeg(rad: number): number;
|
---|
126 | _degToRad(deg: number): number;
|
---|
127 | _radToDeg(rad: number): number;
|
---|
128 | _getRotation(radians: number): number;
|
---|
129 | _capitalize(str: string): string;
|
---|
130 | throw(str: string): never;
|
---|
131 | error(str: string): void;
|
---|
132 | warn(str: string): void;
|
---|
133 | each(obj: Object, func: Function): void;
|
---|
134 | _inRange(val: number, left: number, right: number): boolean;
|
---|
135 | _getProjectionToSegment(x1: any, y1: any, x2: any, y2: any, x3: any, y3: any): any[];
|
---|
136 | _getProjectionToLine(pt: import("./types").Vector2d, line: import("./types").Vector2d[], isClosed: boolean): import("./types.js").Vector2d;
|
---|
137 | _prepareArrayForTween(startArray: any, endArray: any, isClosed: any): number[];
|
---|
138 | _prepareToStringify<T>(obj: any): T | null;
|
---|
139 | _assign<T_1, U>(target: T_1, source: U): T_1 & U;
|
---|
140 | _getFirstPointerId(evt: any): any;
|
---|
141 | releaseCanvas(...canvases: HTMLCanvasElement[]): void;
|
---|
142 | drawRoundedRectPath(context: Context, width: number, height: number, cornerRadius: number | number[]): void;
|
---|
143 | };
|
---|
144 | Transform: typeof Transform;
|
---|
145 | Node: typeof Node;
|
---|
146 | Container: typeof Container;
|
---|
147 | Stage: typeof Stage;
|
---|
148 | stages: Stage[];
|
---|
149 | Layer: typeof Layer;
|
---|
150 | FastLayer: typeof FastLayer;
|
---|
151 | Group: typeof Group;
|
---|
152 | DD: {
|
---|
153 | readonly isDragging: boolean;
|
---|
154 | justDragged: boolean;
|
---|
155 | readonly node: Node<import("./Node.js").NodeConfig> | undefined;
|
---|
156 | _dragElements: Map<number, {
|
---|
157 | node: Node<import("./Node.js").NodeConfig>;
|
---|
158 | startPointerPos: import("./types.js").Vector2d;
|
---|
159 | offset: import("./types.js").Vector2d;
|
---|
160 | pointerId?: number | undefined;
|
---|
161 | dragStatus: "ready" | "dragging" | "stopped";
|
---|
162 | }>;
|
---|
163 | _drag(evt: any): void;
|
---|
164 | _endDragBefore(evt?: any): void;
|
---|
165 | _endDragAfter(evt: any): void;
|
---|
166 | };
|
---|
167 | Shape: typeof Shape;
|
---|
168 | shapes: {
|
---|
169 | [key: string]: Shape<import("./Shape.js").ShapeConfig>;
|
---|
170 | };
|
---|
171 | Animation: typeof Animation;
|
---|
172 | Tween: typeof Tween;
|
---|
173 | Easings: {
|
---|
174 | BackEaseIn(t: any, b: any, c: any, d: any): any;
|
---|
175 | BackEaseOut(t: any, b: any, c: any, d: any): any;
|
---|
176 | BackEaseInOut(t: any, b: any, c: any, d: any): any;
|
---|
177 | ElasticEaseIn(t: any, b: any, c: any, d: any, a: any, p: any): any;
|
---|
178 | ElasticEaseOut(t: any, b: any, c: any, d: any, a: any, p: any): any;
|
---|
179 | ElasticEaseInOut(t: any, b: any, c: any, d: any, a: any, p: any): any;
|
---|
180 | BounceEaseOut(t: any, b: any, c: any, d: any): any;
|
---|
181 | BounceEaseIn(t: any, b: any, c: any, d: any): any;
|
---|
182 | BounceEaseInOut(t: any, b: any, c: any, d: any): any;
|
---|
183 | EaseIn(t: any, b: any, c: any, d: any): any;
|
---|
184 | EaseOut(t: any, b: any, c: any, d: any): any;
|
---|
185 | EaseInOut(t: any, b: any, c: any, d: any): any;
|
---|
186 | StrongEaseIn(t: any, b: any, c: any, d: any): any;
|
---|
187 | StrongEaseOut(t: any, b: any, c: any, d: any): any;
|
---|
188 | StrongEaseInOut(t: any, b: any, c: any, d: any): any;
|
---|
189 | Linear(t: any, b: any, c: any, d: any): any;
|
---|
190 | };
|
---|
191 | Context: typeof Context;
|
---|
192 | Canvas: typeof Canvas;
|
---|
193 | };
|
---|
194 | export default Konva;
|
---|