-
-
Notifications
You must be signed in to change notification settings - Fork 958
/
Copy pathindex-types.d.ts
181 lines (159 loc) · 7.81 KB
/
index-types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
// the purpose of that file is very stupid
// I was not able to generate correct typescript declarations from the main source code
// because right now Konva is an object. Typescript can not define types from object like this:
// const stage : Konva.Stage = new Konva.Stage();
// we can convert Konva to namespace
// but I was not able to find a way to extend it
// so here we just need to define full API of Konva manually
// filters
import { Blur } from './filters/Blur';
import { Brighten } from './filters/Brighten';
import { Contrast } from './filters/Contrast';
import { Emboss } from './filters/Emboss';
import { Enhance } from './filters/Enhance';
import { Grayscale } from './filters/Grayscale';
import { HSL } from './filters/HSL';
import { HSV } from './filters/HSV';
import { Invert } from './filters/Invert';
import { Kaleidoscope } from './filters/Kaleidoscope';
import { Mask } from './filters/Mask';
import { Noise } from './filters/Noise';
import { Pixelate } from './filters/Pixelate';
import { Posterize } from './filters/Posterize';
import { RGB } from './filters/RGB';
import { RGBA } from './filters/RGBA';
import { Sepia } from './filters/Sepia';
import { Solarize } from './filters/Solarize';
import { Threshold } from './filters/Threshold';
declare namespace Konva {
export let enableTrace: number;
export let pixelRatio: number;
export let autoDrawEnabled: boolean;
export let dragDistance: number;
export let angleDeg: boolean;
export let showWarnings: boolean;
export let capturePointerEventsEnabled: boolean;
export let dragButtons: Array<number>;
export let hitOnDragEnabled: boolean;
export const isDragging: () => boolean;
export const isDragReady: () => boolean;
export const getAngle: (angle: number) => number;
export type Vector2d = import('./types').Vector2d;
export const Node: typeof import('./Node').Node;
export type Node = import('./Node').Node;
export type NodeConfig = import('./Node').NodeConfig;
export type KonvaEventObject<EventType> =
import('./Node').KonvaEventObject<EventType>;
export type KonvaPointerEvent = import('./PointerEvents').KonvaPointerEvent;
export type KonvaEventListener<This, EventType> =
import('./Node').KonvaEventListener<This, EventType>;
export const Container: typeof import('./Container').Container;
export type Container = import('./Container').Container<Node>;
export type ContainerConfig = import('./Container').ContainerConfig;
export const Transform: typeof import('./Util').Transform;
export type Transform = import('./Util').Transform;
export const Util: typeof import('./Util').Util;
export const Context: typeof import('./Context').Context;
export type Context = import('./Context').Context;
export const Stage: typeof import('./Stage').Stage;
export type Stage = import('./Stage').Stage;
export type StageConfig = import('./Stage').StageConfig;
export const stages: typeof import('./Stage').stages;
export const Layer: typeof import('./Layer').Layer;
export type Layer = import('./Layer').Layer;
export type LayerConfig = import('./Layer').LayerConfig;
export const FastLayer: typeof import('./FastLayer').FastLayer;
export type FastLayer = import('./FastLayer').FastLayer;
export const Group: typeof import('./Group').Group;
export type Group = import('./Group').Group;
export type GroupConfig = import('./Group').GroupConfig;
export const DD: typeof import('./DragAndDrop').DD;
export const Shape: typeof import('./Shape').Shape;
export type Shape = import('./Shape').Shape;
export type ShapeConfig = import('./Shape').ShapeConfig;
export const shapes: typeof import('./Shape').shapes;
export const Animation: typeof import('./Animation').Animation;
export type Animation = import('./Animation').Animation;
export const Tween: typeof import('./Tween').Tween;
export type Tween = import('./Tween').Tween;
export type TweenConfig = import('./Tween').TweenConfig;
export const Easings: typeof import('./Tween').Easings;
export const Arc: typeof import('./shapes/Arc').Arc;
export type Arc = import('./shapes/Arc').Arc;
export type ArcConfig = import('./shapes/Arc').ArcConfig;
export const Arrow: typeof import('./shapes/Arrow').Arrow;
export type Arrow = import('./shapes/Arrow').Arrow;
export type ArrowConfig = import('./shapes/Arrow').ArrowConfig;
export const Circle: typeof import('./shapes/Circle').Circle;
export type Circle = import('./shapes/Circle').Circle;
export type CircleConfig = import('./shapes/Circle').CircleConfig;
export const Ellipse: typeof import('./shapes/Ellipse').Ellipse;
export type Ellipse = import('./shapes/Ellipse').Ellipse;
export type EllipseConfig = import('./shapes/Ellipse').EllipseConfig;
export const Image: typeof import('./shapes/Image').Image;
export type Image = import('./shapes/Image').Image;
export type ImageConfig = import('./shapes/Image').ImageConfig;
export const Label: typeof import('./shapes/Label').Label;
export type Label = import('./shapes/Label').Label;
export type LabelConfig = import('./shapes/Label').LabelConfig;
export const Tag: typeof import('./shapes/Label').Tag;
export type Tag = import('./shapes/Label').Tag;
export type TagConfig = import('./shapes/Label').TagConfig;
export const Line: typeof import('./shapes/Line').Line;
export type Line = import('./shapes/Line').Line;
export type LineConfig = import('./shapes/Line').LineConfig;
export const Path: typeof import('./shapes/Path').Path;
export type Path = import('./shapes/Path').Path;
export type PathConfig = import('./shapes/Path').PathConfig;
export const Rect: typeof import('./shapes/Rect').Rect;
export type Rect = import('./shapes/Rect').Rect;
export type RectConfig = import('./shapes/Rect').RectConfig;
export const RegularPolygon: typeof import('./shapes/RegularPolygon').RegularPolygon;
export type RegularPolygon = import('./shapes/RegularPolygon').RegularPolygon;
export type RegularPolygonConfig =
import('./shapes/RegularPolygon').RegularPolygonConfig;
export const Ring: typeof import('./shapes/Ring').Ring;
export type Ring = import('./shapes/Ring').Ring;
export type RingConfig = import('./shapes/Ring').RingConfig;
export const Sprite: typeof import('./shapes/Sprite').Sprite;
export type Sprite = import('./shapes/Sprite').Sprite;
export type SpriteConfig = import('./shapes/Sprite').SpriteConfig;
export const Star: typeof import('./shapes/Star').Star;
export type Star = import('./shapes/Star').Star;
export type StarConfig = import('./shapes/Star').StarConfig;
export const Text: typeof import('./shapes/Text').Text;
export type Text = import('./shapes/Text').Text;
export type TextConfig = import('./shapes/Text').TextConfig;
export const TextPath: typeof import('./shapes/TextPath').TextPath;
export type TextPath = import('./shapes/TextPath').TextPath;
export type TextPathConfig = import('./shapes/TextPath').TextPathConfig;
export const Transformer: typeof import('./shapes/Transformer').Transformer;
export type Transformer = import('./shapes/Transformer').Transformer;
export type TransformerConfig =
import('./shapes/Transformer').TransformerConfig;
export const Wedge: typeof import('./shapes/Wedge').Wedge;
export type Wedge = import('./shapes/Wedge').Wedge;
export type WedgeConfig = import('./shapes/Wedge').WedgeConfig;
export const Filters: {
Blur: typeof Blur;
Brighten: typeof Brighten;
Contrast: typeof Contrast;
Emboss: typeof Emboss;
Enhance: typeof Enhance;
Grayscale: typeof Grayscale;
HSL: typeof HSL;
HSV: typeof HSV;
Invert: typeof Invert;
Kaleidoscope: typeof Kaleidoscope;
Mask: typeof Mask;
Noise: typeof Noise;
Pixelate: typeof Pixelate;
Posterize: typeof Posterize;
RGB: typeof RGB;
RGBA: typeof RGBA;
Sepia: typeof Sepia;
Solarize: typeof Solarize;
Threshold: typeof Threshold;
};
}
export default Konva;