@nanoforge-dev/graphics-2d 1.0.2 → 1.3.0
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/index.cjs +1 -287
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +197 -224
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +197 -224
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -183
- package/dist/index.js.map +1 -1
- package/package.json +13 -11
package/dist/index.d.cts
CHANGED
|
@@ -1,285 +1,256 @@
|
|
|
1
|
-
import { BaseGraphicsLibrary, InitContext } from
|
|
2
|
-
import
|
|
3
|
-
import * as konva_lib_Tween from 'konva/lib/Tween';
|
|
4
|
-
import * as konva_lib_shapes_Transformer from 'konva/lib/shapes/Transformer';
|
|
5
|
-
import * as konva_lib_Util from 'konva/lib/Util';
|
|
6
|
-
import * as konva_lib_shapes_TextPath from 'konva/lib/shapes/TextPath';
|
|
7
|
-
import * as konva_lib_shapes_Text from 'konva/lib/shapes/Text';
|
|
8
|
-
import * as konva_lib_shapes_Star from 'konva/lib/shapes/Star';
|
|
9
|
-
import * as konva_lib_Stage from 'konva/lib/Stage';
|
|
10
|
-
import * as konva_lib_shapes_Sprite from 'konva/lib/shapes/Sprite';
|
|
11
|
-
import * as konva_lib_Shape from 'konva/lib/Shape';
|
|
12
|
-
import * as konva_lib_shapes_Ring from 'konva/lib/shapes/Ring';
|
|
13
|
-
import * as konva_lib_shapes_RegularPolygon from 'konva/lib/shapes/RegularPolygon';
|
|
14
|
-
import * as konva_lib_shapes_Rect from 'konva/lib/shapes/Rect';
|
|
15
|
-
import * as konva_lib_shapes_Path from 'konva/lib/shapes/Path';
|
|
16
|
-
import * as konva_lib_shapes_Line from 'konva/lib/shapes/Line';
|
|
17
|
-
import * as konva_lib_Layer from 'konva/lib/Layer';
|
|
18
|
-
import * as konva_lib_shapes_Label from 'konva/lib/shapes/Label';
|
|
19
|
-
import * as konva_lib_shapes_Image from 'konva/lib/shapes/Image';
|
|
20
|
-
import * as konva_lib_Group from 'konva/lib/Group';
|
|
21
|
-
import * as konva_lib_FastLayer from 'konva/lib/FastLayer';
|
|
22
|
-
import * as konva_lib_shapes_Ellipse from 'konva/lib/shapes/Ellipse';
|
|
23
|
-
import * as konva_lib_types from 'konva/lib/types';
|
|
24
|
-
import * as konva_lib_Node from 'konva/lib/Node';
|
|
25
|
-
import * as konva_lib_Context from 'konva/lib/Context';
|
|
26
|
-
import * as konva_lib_Container from 'konva/lib/Container';
|
|
27
|
-
import * as konva_lib_shapes_Circle from 'konva/lib/shapes/Circle';
|
|
28
|
-
import * as konva_lib_Canvas from 'konva/lib/Canvas';
|
|
29
|
-
import * as konva_lib_shapes_Arrow from 'konva/lib/shapes/Arrow';
|
|
30
|
-
import * as konva_lib_shapes_Arc from 'konva/lib/shapes/Arc';
|
|
31
|
-
import * as konva_lib_Animation from 'konva/lib/Animation';
|
|
32
|
-
import Konva from 'konva';
|
|
1
|
+
import { BaseGraphicsLibrary, InitContext } from "@nanoforge-dev/common";
|
|
2
|
+
import Konva from "konva";
|
|
33
3
|
|
|
34
|
-
|
|
4
|
+
//#region src/exports/konva.d.ts
|
|
5
|
+
declare const Animation: typeof import("konva/lib/Animation").Animation;
|
|
35
6
|
type Animation = Konva.Animation;
|
|
36
|
-
declare const Arc: typeof
|
|
7
|
+
declare const Arc: typeof import("konva/lib/shapes/Arc").Arc;
|
|
37
8
|
type Arc = Konva.Arc;
|
|
38
9
|
type ArcConfig = Konva.ArcConfig;
|
|
39
|
-
declare const Arrow: typeof
|
|
10
|
+
declare const Arrow: typeof import("konva/lib/shapes/Arrow").Arrow;
|
|
40
11
|
type Arrow = Konva.Arrow;
|
|
41
12
|
type ArrowConfig = Konva.ArrowConfig;
|
|
42
|
-
declare const Canvas: typeof
|
|
13
|
+
declare const Canvas: typeof import("konva/lib/Canvas").Canvas;
|
|
43
14
|
type Canvas = typeof Konva.Canvas;
|
|
44
|
-
declare const Circle: typeof
|
|
15
|
+
declare const Circle: typeof import("konva/lib/shapes/Circle").Circle;
|
|
45
16
|
type Circle = Konva.Circle;
|
|
46
17
|
type CircleConfig = Konva.CircleConfig;
|
|
47
|
-
declare const Container: typeof
|
|
18
|
+
declare const Container: typeof import("konva/lib/Container").Container;
|
|
48
19
|
type Container = Konva.Container;
|
|
49
20
|
type ContainerConfig = Konva.ContainerConfig;
|
|
50
|
-
declare const Context: typeof
|
|
21
|
+
declare const Context: typeof import("konva/lib/Context").Context;
|
|
51
22
|
type Context = Konva.Context;
|
|
52
23
|
declare const DD: {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
24
|
+
readonly isDragging: boolean;
|
|
25
|
+
justDragged: boolean;
|
|
26
|
+
readonly node: import("konva/lib/Node").Node<import("konva/lib/Node").NodeConfig> | undefined;
|
|
27
|
+
_dragElements: Map<number, {
|
|
28
|
+
node: import("konva/lib/Node").Node;
|
|
29
|
+
startPointerPos: import("konva/lib/types").Vector2d;
|
|
30
|
+
offset: import("konva/lib/types").Vector2d;
|
|
31
|
+
pointerId?: number;
|
|
32
|
+
startEvent?: any;
|
|
33
|
+
dragStatus: "ready" | "dragging" | "stopped";
|
|
34
|
+
}>;
|
|
35
|
+
_drag(evt: any): void;
|
|
36
|
+
_endDragBefore(evt?: any): void;
|
|
37
|
+
_endDragAfter(evt: any): void;
|
|
67
38
|
};
|
|
68
39
|
type DD = typeof Konva.DD;
|
|
69
40
|
declare const Easings: {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
41
|
+
BackEaseIn(t: any, b: any, c: any, d: any): any;
|
|
42
|
+
BackEaseOut(t: any, b: any, c: any, d: any): any;
|
|
43
|
+
BackEaseInOut(t: any, b: any, c: any, d: any): any;
|
|
44
|
+
ElasticEaseIn(t: any, b: any, c: any, d: any, a: any, p: any): any;
|
|
45
|
+
ElasticEaseOut(t: any, b: any, c: any, d: any, a: any, p: any): any;
|
|
46
|
+
ElasticEaseInOut(t: any, b: any, c: any, d: any, a: any, p: any): any;
|
|
47
|
+
BounceEaseOut(t: any, b: any, c: any, d: any): any;
|
|
48
|
+
BounceEaseIn(t: any, b: any, c: any, d: any): any;
|
|
49
|
+
BounceEaseInOut(t: any, b: any, c: any, d: any): any;
|
|
50
|
+
EaseIn(t: any, b: any, c: any, d: any): any;
|
|
51
|
+
EaseOut(t: any, b: any, c: any, d: any): any;
|
|
52
|
+
EaseInOut(t: any, b: any, c: any, d: any): any;
|
|
53
|
+
StrongEaseIn(t: any, b: any, c: any, d: any): any;
|
|
54
|
+
StrongEaseOut(t: any, b: any, c: any, d: any): any;
|
|
55
|
+
StrongEaseInOut(t: any, b: any, c: any, d: any): any;
|
|
56
|
+
Linear(t: any, b: any, c: any, d: any): any;
|
|
86
57
|
};
|
|
87
58
|
type Easings = typeof Konva.Easings;
|
|
88
|
-
declare const Ellipse: typeof
|
|
59
|
+
declare const Ellipse: typeof import("konva/lib/shapes/Ellipse").Ellipse;
|
|
89
60
|
type Ellipse = Konva.Ellipse;
|
|
90
61
|
type EllipseConfig = Konva.EllipseConfig;
|
|
91
|
-
declare const FastLayer: typeof
|
|
62
|
+
declare const FastLayer: typeof import("konva/lib/FastLayer").FastLayer;
|
|
92
63
|
type FastLayer = Konva.FastLayer;
|
|
93
64
|
declare const Filters: {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
65
|
+
Blur: import("konva/lib/Node").Filter;
|
|
66
|
+
Brightness: import("konva/lib/Node").Filter;
|
|
67
|
+
Brighten: import("konva/lib/Node").Filter;
|
|
68
|
+
Contrast: import("konva/lib/Node").Filter;
|
|
69
|
+
Emboss: import("konva/lib/Node").Filter;
|
|
70
|
+
Enhance: import("konva/lib/Node").Filter;
|
|
71
|
+
Grayscale: import("konva/lib/Node").Filter;
|
|
72
|
+
HSL: import("konva/lib/Node").Filter;
|
|
73
|
+
HSV: import("konva/lib/Node").Filter;
|
|
74
|
+
Invert: import("konva/lib/Node").Filter;
|
|
75
|
+
Kaleidoscope: import("konva/lib/Node").Filter;
|
|
76
|
+
Mask: import("konva/lib/Node").Filter;
|
|
77
|
+
Noise: import("konva/lib/Node").Filter;
|
|
78
|
+
Pixelate: import("konva/lib/Node").Filter;
|
|
79
|
+
Posterize: import("konva/lib/Node").Filter;
|
|
80
|
+
RGB: import("konva/lib/Node").Filter;
|
|
81
|
+
RGBA: import("konva/lib/Node").Filter;
|
|
82
|
+
Sepia: import("konva/lib/Node").Filter;
|
|
83
|
+
Solarize: import("konva/lib/Node").Filter;
|
|
84
|
+
Threshold: import("konva/lib/Node").Filter;
|
|
114
85
|
};
|
|
115
86
|
type Filters = typeof Konva.Filters;
|
|
116
|
-
declare const Group: typeof
|
|
87
|
+
declare const Group: typeof import("konva/lib/Group").Group;
|
|
117
88
|
type Group = Konva.Group;
|
|
118
89
|
type GroupConfig = Konva.GroupConfig;
|
|
119
|
-
declare const Image: typeof
|
|
90
|
+
declare const Image: typeof import("konva/lib/shapes/Image").Image;
|
|
120
91
|
type Image = Konva.Image;
|
|
121
92
|
type ImageConfig = Konva.ImageConfig;
|
|
122
93
|
type KonvaEventListener<This, EventType> = Konva.KonvaEventListener<This, EventType>;
|
|
123
94
|
type KonvaEventObject<EventType> = Konva.KonvaEventObject<EventType>;
|
|
124
95
|
type KonvaPointerEvent = Konva.KonvaPointerEvent;
|
|
125
|
-
declare const Label: typeof
|
|
96
|
+
declare const Label: typeof import("konva/lib/shapes/Label").Label;
|
|
126
97
|
type Label = Konva.Label;
|
|
127
98
|
type LabelConfig = Konva.LabelConfig;
|
|
128
|
-
declare const Layer: typeof
|
|
99
|
+
declare const Layer: typeof import("konva/lib/Layer").Layer;
|
|
129
100
|
type Layer = Konva.Layer;
|
|
130
101
|
type LayerConfig = Konva.LayerConfig;
|
|
131
|
-
declare const Line: typeof
|
|
102
|
+
declare const Line: typeof import("konva/lib/shapes/Line").Line;
|
|
132
103
|
type Line = Konva.Line;
|
|
133
104
|
type LineConfig = Konva.LineConfig;
|
|
134
|
-
declare const Node: typeof
|
|
105
|
+
declare const Node: typeof import("konva/lib/Node").Node;
|
|
135
106
|
type Node = Konva.Node;
|
|
136
107
|
type NodeConfig = Konva.NodeConfig;
|
|
137
|
-
declare const Path: typeof
|
|
108
|
+
declare const Path: typeof import("konva/lib/shapes/Path").Path;
|
|
138
109
|
type Path = Konva.Path;
|
|
139
110
|
type PathConfig = Konva.PathConfig;
|
|
140
|
-
declare const Rect: typeof
|
|
111
|
+
declare const Rect: typeof import("konva/lib/shapes/Rect").Rect;
|
|
141
112
|
type Rect = Konva.Rect;
|
|
142
113
|
type RectConfig = Konva.RectConfig;
|
|
143
|
-
declare const RegularPolygon: typeof
|
|
114
|
+
declare const RegularPolygon: typeof import("konva/lib/shapes/RegularPolygon").RegularPolygon;
|
|
144
115
|
type RegularPolygon = Konva.RegularPolygon;
|
|
145
116
|
type RegularPolygonConfig = Konva.RegularPolygonConfig;
|
|
146
|
-
declare const Ring: typeof
|
|
117
|
+
declare const Ring: typeof import("konva/lib/shapes/Ring").Ring;
|
|
147
118
|
type Ring = Konva.Ring;
|
|
148
119
|
type RingConfig = Konva.RingConfig;
|
|
149
|
-
declare const Shape: typeof
|
|
120
|
+
declare const Shape: typeof import("konva/lib/Shape").Shape;
|
|
150
121
|
type Shape = Konva.Shape;
|
|
151
122
|
type ShapeConfig = Konva.ShapeConfig;
|
|
152
|
-
declare const Sprite: typeof
|
|
123
|
+
declare const Sprite: typeof import("konva/lib/shapes/Sprite").Sprite;
|
|
153
124
|
type Sprite = Konva.Sprite;
|
|
154
125
|
type SpriteConfig = Konva.SpriteConfig;
|
|
155
|
-
declare const Stage: typeof
|
|
126
|
+
declare const Stage: typeof import("konva/lib/Stage").Stage;
|
|
156
127
|
type Stage = Konva.Stage;
|
|
157
128
|
type StageConfig = Konva.StageConfig;
|
|
158
|
-
declare const Star: typeof
|
|
129
|
+
declare const Star: typeof import("konva/lib/shapes/Star").Star;
|
|
159
130
|
type Star = Konva.Star;
|
|
160
131
|
type StarConfig = Konva.StarConfig;
|
|
161
|
-
declare const Tag: typeof
|
|
132
|
+
declare const Tag: typeof import("konva/lib/shapes/Label").Tag;
|
|
162
133
|
type Tag = Konva.Tag;
|
|
163
134
|
type TagConfig = Konva.TagConfig;
|
|
164
|
-
declare const Text: typeof
|
|
135
|
+
declare const Text: typeof import("konva/lib/shapes/Text").Text;
|
|
165
136
|
type Text = Konva.Text;
|
|
166
137
|
type TextConfig = Konva.TextConfig;
|
|
167
|
-
declare const TextPath: typeof
|
|
138
|
+
declare const TextPath: typeof import("konva/lib/shapes/TextPath").TextPath;
|
|
168
139
|
type TextPath = Konva.TextPath;
|
|
169
140
|
type TextPathConfig = Konva.TextPathConfig;
|
|
170
|
-
declare const Transform: typeof
|
|
141
|
+
declare const Transform: typeof import("konva/lib/Util").Transform;
|
|
171
142
|
type Transform = Konva.Transform;
|
|
172
|
-
declare const Transformer: typeof
|
|
143
|
+
declare const Transformer: typeof import("konva/lib/shapes/Transformer").Transformer;
|
|
173
144
|
type Transformer = Konva.Transformer;
|
|
174
145
|
type TransformerConfig = Konva.TransformerConfig;
|
|
175
|
-
declare const Tween: typeof
|
|
146
|
+
declare const Tween: typeof import("konva/lib/Tween").Tween;
|
|
176
147
|
type Tween = Konva.Tween;
|
|
177
148
|
type TweenConfig = Konva.TweenConfig;
|
|
178
149
|
declare const Util: {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
150
|
+
_isElement(obj: any): obj is Element;
|
|
151
|
+
_isFunction(obj: any): boolean;
|
|
152
|
+
_isPlainObject(obj: any): boolean;
|
|
153
|
+
_isArray(obj: any): obj is Array<any>;
|
|
154
|
+
_isNumber(obj: any): obj is number;
|
|
155
|
+
_isString(obj: any): obj is string;
|
|
156
|
+
_isBoolean(obj: any): obj is boolean;
|
|
157
|
+
isObject(val: any): val is object;
|
|
158
|
+
isValidSelector(selector: any): boolean;
|
|
159
|
+
_sign(number: number): 1 | -1;
|
|
160
|
+
requestAnimFrame(callback: Function): void;
|
|
161
|
+
createCanvasElement(): HTMLCanvasElement;
|
|
162
|
+
createImageElement(): HTMLImageElement;
|
|
163
|
+
_isInDocument(el: any): boolean;
|
|
164
|
+
_urlToImage(url: string, callback: Function): void;
|
|
165
|
+
_rgbToHex(r: number, g: number, b: number): string;
|
|
166
|
+
_hexToRgb(hex: string): import("konva/lib/types").RGB;
|
|
167
|
+
getRandomColor(): string;
|
|
168
|
+
isCanvasFarblingActive(): boolean;
|
|
169
|
+
getHitColor(): string;
|
|
170
|
+
getHitColorKey(r: number, g: number, b: number): string;
|
|
171
|
+
getSnappedHexColor(hex: string): string;
|
|
172
|
+
getRGB(color: string): import("konva/lib/types").RGB;
|
|
173
|
+
colorToRGBA(str: string): {
|
|
174
|
+
r: number;
|
|
175
|
+
g: number;
|
|
176
|
+
b: number;
|
|
177
|
+
a: number;
|
|
178
|
+
} | undefined;
|
|
179
|
+
_namedColorToRBA(str: string): {
|
|
180
|
+
r: number;
|
|
181
|
+
g: number;
|
|
182
|
+
b: number;
|
|
183
|
+
a: number;
|
|
184
|
+
} | null;
|
|
185
|
+
_rgbColorToRGBA(str: string): {
|
|
186
|
+
r: number;
|
|
187
|
+
g: number;
|
|
188
|
+
b: number;
|
|
189
|
+
a: number;
|
|
190
|
+
} | undefined;
|
|
191
|
+
_rgbaColorToRGBA(str: string): {
|
|
192
|
+
r: number;
|
|
193
|
+
g: number;
|
|
194
|
+
b: number;
|
|
195
|
+
a: number;
|
|
196
|
+
} | undefined;
|
|
197
|
+
_hex8ColorToRGBA(str: string): {
|
|
198
|
+
r: number;
|
|
199
|
+
g: number;
|
|
200
|
+
b: number;
|
|
201
|
+
a: number;
|
|
202
|
+
} | undefined;
|
|
203
|
+
_hex6ColorToRGBA(str: string): {
|
|
204
|
+
r: number;
|
|
205
|
+
g: number;
|
|
206
|
+
b: number;
|
|
207
|
+
a: number;
|
|
208
|
+
} | undefined;
|
|
209
|
+
_hex4ColorToRGBA(str: string): {
|
|
210
|
+
r: number;
|
|
211
|
+
g: number;
|
|
212
|
+
b: number;
|
|
213
|
+
a: number;
|
|
214
|
+
} | undefined;
|
|
215
|
+
_hex3ColorToRGBA(str: string): {
|
|
216
|
+
r: number;
|
|
217
|
+
g: number;
|
|
218
|
+
b: number;
|
|
219
|
+
a: number;
|
|
220
|
+
} | undefined;
|
|
221
|
+
_hslColorToRGBA(str: string): {
|
|
222
|
+
r: number;
|
|
223
|
+
g: number;
|
|
224
|
+
b: number;
|
|
225
|
+
a: number;
|
|
226
|
+
} | undefined;
|
|
227
|
+
haveIntersection(r1: import("konva/lib/types").IRect, r2: import("konva/lib/types").IRect): boolean;
|
|
228
|
+
cloneObject<Any>(obj: Any): Any;
|
|
229
|
+
cloneArray(arr: Array<any>): any[];
|
|
230
|
+
degToRad(deg: number): number;
|
|
231
|
+
radToDeg(rad: number): number;
|
|
232
|
+
_degToRad(deg: number): number;
|
|
233
|
+
_radToDeg(rad: number): number;
|
|
234
|
+
_getRotation(radians: number): number;
|
|
235
|
+
_capitalize(str: string): string;
|
|
236
|
+
throw(str: string): never;
|
|
237
|
+
error(str: string): void;
|
|
238
|
+
warn(str: string): void;
|
|
239
|
+
each(obj: object, func: Function): void;
|
|
240
|
+
_inRange(val: number, left: number, right: number): boolean;
|
|
241
|
+
_getProjectionToSegment(x1: any, y1: any, x2: any, y2: any, x3: any, y3: any): any[];
|
|
242
|
+
_getProjectionToLine(pt: import("konva/lib/types").Vector2d, line: Array<import("konva/lib/types").Vector2d>, isClosed: boolean): import("konva/lib/types").Vector2d;
|
|
243
|
+
_prepareArrayForTween(startArray: any, endArray: any, isClosed: any): number[];
|
|
244
|
+
_prepareToStringify<T>(obj: any): T | null;
|
|
245
|
+
_assign<T, U>(target: T, source: U): T & U;
|
|
246
|
+
_getFirstPointerId(evt: any): any;
|
|
247
|
+
releaseCanvas(...canvases: HTMLCanvasElement[]): void;
|
|
248
|
+
drawRoundedRectPath(context: import("konva/lib/Context").Context, width: number, height: number, cornerRadius: number | number[]): void;
|
|
249
|
+
drawRoundedPolygonPath(context: import("konva/lib/Context").Context, points: import("konva/lib/types").Vector2d[], sides: number, radius: number, cornerRadius: number | number[]): void;
|
|
279
250
|
};
|
|
280
251
|
type Util = typeof Konva.Util;
|
|
281
252
|
type Vector2d = Konva.Vector2d;
|
|
282
|
-
declare const Wedge: typeof
|
|
253
|
+
declare const Wedge: typeof import("konva/lib/shapes/Wedge").Wedge;
|
|
283
254
|
type Wedge = Konva.Wedge;
|
|
284
255
|
type WedgeConfig = Konva.WedgeConfig;
|
|
285
256
|
declare const _global: any;
|
|
@@ -314,20 +285,22 @@ declare const pixelRatio: number;
|
|
|
314
285
|
declare const pointerEventsEnabled: boolean;
|
|
315
286
|
declare const releaseCanvasOnDestroy: boolean;
|
|
316
287
|
declare const shapes: {
|
|
317
|
-
|
|
288
|
+
[key: string]: import("konva/lib/Shape").Shape<import("konva/lib/Shape").ShapeConfig>;
|
|
318
289
|
};
|
|
319
290
|
declare const showWarnings: boolean;
|
|
320
|
-
declare const stages:
|
|
291
|
+
declare const stages: import("konva/lib/Stage").Stage[];
|
|
321
292
|
declare const version: string;
|
|
322
|
-
|
|
293
|
+
//#endregion
|
|
294
|
+
//#region src/graphics-2d.library.d.ts
|
|
323
295
|
declare class Graphics2DLibrary extends BaseGraphicsLibrary {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
296
|
+
private _stage?;
|
|
297
|
+
private _baseLayer?;
|
|
298
|
+
get __name(): string;
|
|
299
|
+
get stage(): Stage;
|
|
300
|
+
get baseLayer(): Layer;
|
|
301
|
+
__init(context: InitContext): Promise<void>;
|
|
302
|
+
__run(): Promise<void>;
|
|
331
303
|
}
|
|
332
|
-
|
|
333
|
-
export { Animation, Arc,
|
|
304
|
+
//#endregion
|
|
305
|
+
export { Animation, Arc, ArcConfig, Arrow, ArrowConfig, Canvas, Circle, CircleConfig, Container, ContainerConfig, Context, DD, Easings, Ellipse, EllipseConfig, FastLayer, Filters, Graphics2DLibrary, Group, GroupConfig, Image, ImageConfig, KonvaEventListener, KonvaEventObject, KonvaPointerEvent, Label, LabelConfig, Layer, LayerConfig, Line, LineConfig, Node, NodeConfig, Path, PathConfig, Rect, RectConfig, RegularPolygon, RegularPolygonConfig, Ring, RingConfig, Shape, ShapeConfig, Sprite, SpriteConfig, Stage, StageConfig, Star, StarConfig, Tag, TagConfig, Text, TextConfig, TextPath, TextPathConfig, Transform, Transformer, TransformerConfig, Tween, TweenConfig, Util, Vector2d, Wedge, WedgeConfig, _global, _injectGlobal, _mouseDblClickPointerId, _mouseInDblClickWindow, _mouseListenClick, _pointerDblClickPointerId, _pointerInDblClickWindow, _pointerListenClick, _renderBackend, _touchDblClickPointerId, _touchInDblClickWindow, _touchListenClick, angleDeg, autoDrawEnabled, capturePointerEventsEnabled, dblClickWindow, document, dragButtons, dragDistance, enableTrace, getAngle, hitOnDragEnabled, isBrowser, isDragReady, isDragging, isTransforming, isUnminified, legacyTextRendering, pixelRatio, pointerEventsEnabled, releaseCanvasOnDestroy, shapes, showWarnings, stages, version };
|
|
306
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/exports/konva.ts","../src/graphics-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