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