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