konva 8.4.2 → 8.4.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/cmj/Context.d.ts +10 -9
- package/cmj/Context.js +9 -9
- package/cmj/Global.js +1 -1
- package/cmj/Shape.d.ts +2 -0
- package/cmj/shapes/Arc.d.ts +4 -3
- package/cmj/shapes/Arrow.d.ts +3 -2
- package/cmj/shapes/Circle.d.ts +4 -3
- package/cmj/shapes/Ellipse.d.ts +4 -3
- package/cmj/shapes/Image.d.ts +2 -2
- package/cmj/shapes/Label.d.ts +3 -2
- package/cmj/shapes/RegularPolygon.d.ts +4 -3
- package/cmj/shapes/Ring.d.ts +4 -3
- package/cmj/shapes/Sprite.d.ts +4 -3
- package/cmj/shapes/Star.d.ts +4 -3
- package/cmj/shapes/Text.d.ts +6 -5
- package/cmj/shapes/TextPath.d.ts +5 -4
- package/cmj/shapes/Transformer.d.ts +2 -2
- package/cmj/shapes/Transformer.js +8 -1
- package/cmj/shapes/Wedge.d.ts +4 -3
- package/konva.js +34 -13
- package/konva.min.js +3 -3
- package/lib/Animation.d.ts +2 -2
- package/lib/Canvas.d.ts +1 -1
- package/lib/Container.d.ts +4 -4
- package/lib/Context.d.ts +13 -12
- package/lib/Context.js +9 -9
- package/lib/Core.d.ts +2 -2
- package/lib/DragAndDrop.d.ts +3 -3
- package/lib/FastLayer.d.ts +1 -1
- package/lib/Global.js +1 -1
- package/lib/Group.d.ts +3 -3
- package/lib/Layer.d.ts +9 -9
- package/lib/Node.d.ts +8 -8
- package/lib/PointerEvents.d.ts +4 -4
- package/lib/Shape.d.ts +6 -4
- package/lib/Stage.d.ts +7 -7
- package/lib/Tween.d.ts +2 -2
- package/lib/Util.d.ts +2 -2
- package/lib/_CoreInternals.d.ts +29 -29
- package/lib/_FullInternals.d.ts +67 -67
- package/lib/filters/Blur.d.ts +1 -1
- package/lib/filters/Brighten.d.ts +1 -1
- package/lib/filters/Contrast.d.ts +1 -1
- package/lib/filters/Emboss.d.ts +1 -1
- package/lib/filters/Enhance.d.ts +1 -1
- package/lib/filters/Grayscale.d.ts +1 -1
- package/lib/filters/HSL.d.ts +1 -1
- package/lib/filters/HSV.d.ts +1 -1
- package/lib/filters/Invert.d.ts +1 -1
- package/lib/filters/Kaleidoscope.d.ts +1 -1
- package/lib/filters/Mask.d.ts +1 -1
- package/lib/filters/Noise.d.ts +1 -1
- package/lib/filters/Pixelate.d.ts +1 -1
- package/lib/filters/Posterize.d.ts +1 -1
- package/lib/filters/RGB.d.ts +1 -1
- package/lib/filters/RGBA.d.ts +1 -1
- package/lib/filters/Sepia.d.ts +1 -1
- package/lib/filters/Solarize.d.ts +1 -1
- package/lib/filters/Threshold.d.ts +1 -1
- package/lib/index-node.d.ts +1 -1
- package/lib/index-types.d.ts +124 -124
- package/lib/index.d.ts +1 -1
- package/lib/shapes/Arc.d.ts +6 -5
- package/lib/shapes/Arrow.d.ts +5 -4
- package/lib/shapes/Circle.d.ts +6 -5
- package/lib/shapes/Ellipse.d.ts +6 -5
- package/lib/shapes/Image.d.ts +5 -5
- package/lib/shapes/Label.d.ts +8 -7
- package/lib/shapes/Line.d.ts +3 -3
- package/lib/shapes/Path.d.ts +2 -2
- package/lib/shapes/Rect.d.ts +3 -3
- package/lib/shapes/RegularPolygon.d.ts +6 -5
- package/lib/shapes/Ring.d.ts +6 -5
- package/lib/shapes/Sprite.d.ts +7 -6
- package/lib/shapes/Star.d.ts +6 -5
- package/lib/shapes/Text.d.ts +8 -7
- package/lib/shapes/TextPath.d.ts +7 -6
- package/lib/shapes/Transformer.d.ts +10 -10
- package/lib/shapes/Transformer.js +8 -1
- package/lib/shapes/Wedge.d.ts +6 -5
- package/package.json +1 -1
package/lib/Animation.d.ts
CHANGED
package/lib/Canvas.d.ts
CHANGED
package/lib/Container.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Node, NodeConfig } from './Node';
|
|
2
|
-
import { GetSet, IRect } from './types';
|
|
3
|
-
import { HitCanvas, SceneCanvas } from './Canvas';
|
|
4
|
-
import { SceneContext } from './Context';
|
|
1
|
+
import { Node, NodeConfig } from './Node.js';
|
|
2
|
+
import { GetSet, IRect } from './types.js';
|
|
3
|
+
import { HitCanvas, SceneCanvas } from './Canvas.js';
|
|
4
|
+
import { SceneContext } from './Context.js';
|
|
5
5
|
export interface ContainerConfig extends NodeConfig {
|
|
6
6
|
clearBeforeDraw?: boolean;
|
|
7
7
|
clipFunc?: (ctx: SceneContext) => void;
|
package/lib/Context.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Canvas } from './Canvas';
|
|
2
|
-
import { Shape } from './Shape';
|
|
3
|
-
import { IRect } from './types';
|
|
1
|
+
import { Canvas } from './Canvas.js';
|
|
2
|
+
import { Shape } from './Shape.js';
|
|
3
|
+
import { IRect } from './types.js';
|
|
4
|
+
import type { Node } from './Node.js';
|
|
4
5
|
declare var CONTEXT_PROPERTIES: readonly ["fillStyle", "strokeStyle", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY", "lineCap", "lineDashOffset", "lineJoin", "lineWidth", "miterLimit", "font", "textAlign", "textBaseline", "globalAlpha", "globalCompositeOperation", "imageSmoothingEnabled"];
|
|
5
6
|
export declare class Context {
|
|
6
7
|
canvas: Canvas;
|
|
@@ -10,16 +11,16 @@ export declare class Context {
|
|
|
10
11
|
fillShape(shape: Shape): void;
|
|
11
12
|
_fill(shape: Shape): void;
|
|
12
13
|
strokeShape(shape: Shape): void;
|
|
13
|
-
_stroke(shape:
|
|
14
|
+
_stroke(shape: Shape): void;
|
|
14
15
|
fillStrokeShape(shape: Shape): void;
|
|
15
|
-
getTrace(relaxed?:
|
|
16
|
+
getTrace(relaxed?: boolean, rounded?: boolean): string;
|
|
16
17
|
clearTrace(): void;
|
|
17
18
|
_trace(str: any): void;
|
|
18
19
|
reset(): void;
|
|
19
20
|
getCanvas(): Canvas;
|
|
20
21
|
clear(bounds?: IRect): void;
|
|
21
|
-
_applyLineCap(shape:
|
|
22
|
-
_applyOpacity(shape:
|
|
22
|
+
_applyLineCap(shape: Shape): void;
|
|
23
|
+
_applyOpacity(shape: Node): void;
|
|
23
24
|
_applyLineJoin(shape: Shape): void;
|
|
24
25
|
setAttr(attr: string, val: any): void;
|
|
25
26
|
arc(a0: number, a1: number, a2: number, a3: number, a4: number, a5?: boolean): void;
|
|
@@ -55,7 +56,7 @@ export declare class Context {
|
|
|
55
56
|
getLineDash(): number[];
|
|
56
57
|
setTransform(a0: number, a1: number, a2: number, a3: number, a4: number, a5: number): void;
|
|
57
58
|
stroke(path2d?: Path2D): void;
|
|
58
|
-
strokeText(a0: string, a1: number, a2: number, a3
|
|
59
|
+
strokeText(a0: string, a1: number, a2: number, a3?: number): void;
|
|
59
60
|
transform(a0: number, a1: number, a2: number, a3: number, a4: number, a5: number): void;
|
|
60
61
|
translate(a0: number, a1: number): void;
|
|
61
62
|
_enableTrace(): void;
|
|
@@ -67,9 +68,9 @@ export interface Context extends CanvasContextProps {
|
|
|
67
68
|
export declare class SceneContext extends Context {
|
|
68
69
|
constructor(canvas: Canvas);
|
|
69
70
|
_fillColor(shape: Shape): void;
|
|
70
|
-
_fillPattern(shape:
|
|
71
|
-
_fillLinearGradient(shape:
|
|
72
|
-
_fillRadialGradient(shape:
|
|
71
|
+
_fillPattern(shape: Shape): void;
|
|
72
|
+
_fillLinearGradient(shape: Shape): void;
|
|
73
|
+
_fillRadialGradient(shape: Shape): void;
|
|
73
74
|
_fill(shape: any): void;
|
|
74
75
|
_strokeLinearGradient(shape: any): void;
|
|
75
76
|
_stroke(shape: any): void;
|
|
@@ -77,7 +78,7 @@ export declare class SceneContext extends Context {
|
|
|
77
78
|
}
|
|
78
79
|
export declare class HitContext extends Context {
|
|
79
80
|
constructor(canvas: Canvas);
|
|
80
|
-
_fill(shape:
|
|
81
|
+
_fill(shape: Shape): void;
|
|
81
82
|
strokeShape(shape: Shape): void;
|
|
82
83
|
_stroke(shape: any): void;
|
|
83
84
|
}
|
package/lib/Context.js
CHANGED
|
@@ -160,7 +160,7 @@ export class Context {
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
_applyLineCap(shape) {
|
|
163
|
-
|
|
163
|
+
const lineCap = shape.attrs.lineCap;
|
|
164
164
|
if (lineCap) {
|
|
165
165
|
this.setAttr('lineCap', lineCap);
|
|
166
166
|
}
|
|
@@ -172,7 +172,7 @@ export class Context {
|
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
_applyLineJoin(shape) {
|
|
175
|
-
|
|
175
|
+
const lineJoin = shape.attrs.lineJoin;
|
|
176
176
|
if (lineJoin) {
|
|
177
177
|
this.setAttr('lineJoin', lineJoin);
|
|
178
178
|
}
|
|
@@ -401,29 +401,29 @@ export class SceneContext extends Context {
|
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
403
|
_fillRadialGradient(shape) {
|
|
404
|
-
|
|
404
|
+
const grd = shape._getRadialGradient();
|
|
405
405
|
if (grd) {
|
|
406
406
|
this.setAttr('fillStyle', grd);
|
|
407
407
|
shape._fillFunc(this);
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
_fill(shape) {
|
|
411
|
-
|
|
411
|
+
const hasColor = shape.fill(), fillPriority = shape.getFillPriority();
|
|
412
412
|
if (hasColor && fillPriority === 'color') {
|
|
413
413
|
this._fillColor(shape);
|
|
414
414
|
return;
|
|
415
415
|
}
|
|
416
|
-
|
|
416
|
+
const hasPattern = shape.getFillPatternImage();
|
|
417
417
|
if (hasPattern && fillPriority === 'pattern') {
|
|
418
418
|
this._fillPattern(shape);
|
|
419
419
|
return;
|
|
420
420
|
}
|
|
421
|
-
|
|
421
|
+
const hasLinearGradient = shape.getFillLinearGradientColorStops();
|
|
422
422
|
if (hasLinearGradient && fillPriority === 'linear-gradient') {
|
|
423
423
|
this._fillLinearGradient(shape);
|
|
424
424
|
return;
|
|
425
425
|
}
|
|
426
|
-
|
|
426
|
+
const hasRadialGradient = shape.getFillRadialGradientColorStops();
|
|
427
427
|
if (hasRadialGradient && fillPriority === 'radial-gradient') {
|
|
428
428
|
this._fillRadialGradient(shape);
|
|
429
429
|
return;
|
|
@@ -442,7 +442,7 @@ export class SceneContext extends Context {
|
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
444
|
_strokeLinearGradient(shape) {
|
|
445
|
-
|
|
445
|
+
const start = shape.getStrokeLinearGradientStartPoint(), end = shape.getStrokeLinearGradientEndPoint(), colorStops = shape.getStrokeLinearGradientColorStops(), grd = this.createLinearGradient(start.x, start.y, end.x, end.y);
|
|
446
446
|
if (colorStops) {
|
|
447
447
|
for (var n = 0; n < colorStops.length; n += 2) {
|
|
448
448
|
grd.addColorStop(colorStops[n], colorStops[n + 1]);
|
|
@@ -512,7 +512,7 @@ export class HitContext extends Context {
|
|
|
512
512
|
}
|
|
513
513
|
_stroke(shape) {
|
|
514
514
|
if (shape.hasHitStroke()) {
|
|
515
|
-
|
|
515
|
+
const strokeScaleEnabled = shape.getStrokeScaleEnabled();
|
|
516
516
|
if (!strokeScaleEnabled) {
|
|
517
517
|
this.save();
|
|
518
518
|
var pixelRatio = this.getCanvas().getPixelRatio();
|
package/lib/Core.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Konva } from './_CoreInternals';
|
|
2
|
-
import { Konva } from './_CoreInternals';
|
|
1
|
+
export { Konva } from './_CoreInternals.js';
|
|
2
|
+
import { Konva } from './_CoreInternals.js';
|
|
3
3
|
export default Konva;
|
package/lib/DragAndDrop.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Node } from './Node';
|
|
2
|
-
import { Vector2d } from './types';
|
|
1
|
+
import { Node } from './Node.js';
|
|
2
|
+
import { Vector2d } from './types.js';
|
|
3
3
|
export declare const DD: {
|
|
4
4
|
readonly isDragging: boolean;
|
|
5
5
|
justDragged: boolean;
|
|
6
|
-
readonly node: Node<import("./Node").NodeConfig>;
|
|
6
|
+
readonly node: Node<import("./Node.js").NodeConfig>;
|
|
7
7
|
_dragElements: Map<number, {
|
|
8
8
|
node: Node;
|
|
9
9
|
startPointerPos: Vector2d;
|
package/lib/FastLayer.d.ts
CHANGED
package/lib/Global.js
CHANGED
|
@@ -13,7 +13,7 @@ export const glob = typeof global !== 'undefined'
|
|
|
13
13
|
: {};
|
|
14
14
|
export const Konva = {
|
|
15
15
|
_global: glob,
|
|
16
|
-
version: '8.4.
|
|
16
|
+
version: '8.4.3',
|
|
17
17
|
isBrowser: detectBrowser(),
|
|
18
18
|
isUnminified: /param/.test(function (param) { }.toString()),
|
|
19
19
|
dblClickWindow: 400,
|
package/lib/Group.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Container, ContainerConfig } from './Container';
|
|
2
|
-
import { Node } from './Node';
|
|
3
|
-
import { Shape } from './Shape';
|
|
1
|
+
import { Container, ContainerConfig } from './Container.js';
|
|
2
|
+
import { Node } from './Node.js';
|
|
3
|
+
import { Shape } from './Shape.js';
|
|
4
4
|
export interface GroupConfig extends ContainerConfig {
|
|
5
5
|
}
|
|
6
6
|
export declare class Group extends Container<Group | Shape> {
|
package/lib/Layer.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Container, ContainerConfig } from './Container';
|
|
2
|
-
import { Node } from './Node';
|
|
3
|
-
import { SceneCanvas, HitCanvas } from './Canvas';
|
|
4
|
-
import { Stage } from './Stage';
|
|
5
|
-
import { GetSet, Vector2d } from './types';
|
|
6
|
-
import { Group } from './Group';
|
|
7
|
-
import { Shape } from './Shape';
|
|
1
|
+
import { Container, ContainerConfig } from './Container.js';
|
|
2
|
+
import { Node } from './Node.js';
|
|
3
|
+
import { SceneCanvas, HitCanvas } from './Canvas.js';
|
|
4
|
+
import { Stage } from './Stage.js';
|
|
5
|
+
import { GetSet, Vector2d } from './types.js';
|
|
6
|
+
import { Group } from './Group.js';
|
|
7
|
+
import { Shape } from './Shape.js';
|
|
8
8
|
export interface LayerConfig extends ContainerConfig {
|
|
9
9
|
clearBeforeDraw?: boolean;
|
|
10
10
|
hitGraphEnabled?: boolean;
|
|
@@ -19,7 +19,7 @@ export declare class Layer extends Container<Group | Shape> {
|
|
|
19
19
|
getCanvas(): SceneCanvas;
|
|
20
20
|
getNativeCanvasElement(): HTMLCanvasElement;
|
|
21
21
|
getHitCanvas(): HitCanvas;
|
|
22
|
-
getContext(): import("./Context").Context;
|
|
22
|
+
getContext(): import("./Context.js").Context;
|
|
23
23
|
clear(bounds?: any): this;
|
|
24
24
|
setZIndex(index: any): this;
|
|
25
25
|
moveToTop(): boolean;
|
|
@@ -42,7 +42,7 @@ export declare class Layer extends Container<Group | Shape> {
|
|
|
42
42
|
getHeight(): number;
|
|
43
43
|
setHeight(): void;
|
|
44
44
|
batchDraw(): this;
|
|
45
|
-
getIntersection(pos: Vector2d): Shape<import("./Shape").ShapeConfig>;
|
|
45
|
+
getIntersection(pos: Vector2d): Shape<import("./Shape.js").ShapeConfig>;
|
|
46
46
|
_getIntersection(pos: Vector2d): {
|
|
47
47
|
shape?: Shape;
|
|
48
48
|
antialiased?: boolean;
|
package/lib/Node.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Transform } from './Util';
|
|
2
|
-
import { SceneCanvas, Canvas } from './Canvas';
|
|
3
|
-
import { Container } from './Container';
|
|
4
|
-
import { GetSet, Vector2d, IRect } from './types';
|
|
5
|
-
import { Stage } from './Stage';
|
|
6
|
-
import { Context } from './Context';
|
|
7
|
-
import { Shape } from './Shape';
|
|
8
|
-
import { Layer } from './Layer';
|
|
1
|
+
import { Transform } from './Util.js';
|
|
2
|
+
import { SceneCanvas, Canvas } from './Canvas.js';
|
|
3
|
+
import { Container } from './Container.js';
|
|
4
|
+
import { GetSet, Vector2d, IRect } from './types.js';
|
|
5
|
+
import { Stage } from './Stage.js';
|
|
6
|
+
import { Context } from './Context.js';
|
|
7
|
+
import { Shape } from './Shape.js';
|
|
8
|
+
import { Layer } from './Layer.js';
|
|
9
9
|
export type Filter = (this: Node, imageData: ImageData) => void;
|
|
10
10
|
type globalCompositeOperationType = '' | 'source-over' | 'source-in' | 'source-out' | 'source-atop' | 'destination-over' | 'destination-in' | 'destination-out' | 'destination-atop' | 'lighter' | 'copy' | 'xor' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' | 'hard-light' | 'soft-light' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity';
|
|
11
11
|
export interface NodeConfig {
|
package/lib/PointerEvents.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { KonvaEventObject } from './Node';
|
|
2
|
-
import { Shape } from './Shape';
|
|
3
|
-
import { Stage } from './Stage';
|
|
1
|
+
import { KonvaEventObject } from './Node.js';
|
|
2
|
+
import { Shape } from './Shape.js';
|
|
3
|
+
import { Stage } from './Stage.js';
|
|
4
4
|
export interface KonvaPointerEvent extends KonvaEventObject<PointerEvent> {
|
|
5
5
|
pointerId: number;
|
|
6
6
|
}
|
|
7
|
-
export declare function getCapturedShape(pointerId: number): Shape<import("./Shape").ShapeConfig> | Stage;
|
|
7
|
+
export declare function getCapturedShape(pointerId: number): Shape<import("./Shape.js").ShapeConfig> | Stage;
|
|
8
8
|
export declare function createEvent(evt: PointerEvent): KonvaPointerEvent;
|
|
9
9
|
export declare function hasPointerCapture(pointerId: number, shape: Shape | Stage): boolean;
|
|
10
10
|
export declare function setPointerCapture(pointerId: number, shape: Shape | Stage): void;
|
package/lib/Shape.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Node, NodeConfig } from './Node';
|
|
2
|
-
import { Context } from './Context';
|
|
3
|
-
import { GetSet, Vector2d } from './types';
|
|
4
|
-
import { HitCanvas, SceneCanvas } from './Canvas';
|
|
1
|
+
import { Node, NodeConfig } from './Node.js';
|
|
2
|
+
import { Context } from './Context.js';
|
|
3
|
+
import { GetSet, Vector2d } from './types.js';
|
|
4
|
+
import { HitCanvas, SceneCanvas } from './Canvas.js';
|
|
5
5
|
export type ShapeConfigHandler<TTarget> = {
|
|
6
6
|
bivarianceHack(ctx: Context, shape: TTarget): void;
|
|
7
7
|
}['bivarianceHack'];
|
|
@@ -180,5 +180,7 @@ export declare class Shape<Config extends ShapeConfig = ShapeConfig> extends Nod
|
|
|
180
180
|
strokeHitEnabled: GetSet<boolean, this>;
|
|
181
181
|
strokeWidth: GetSet<number, this>;
|
|
182
182
|
hitStrokeWidth: GetSet<number | 'auto', this>;
|
|
183
|
+
strokeLinearGradientStartPoint: GetSet<Vector2d, this>;
|
|
184
|
+
strokeLinearGradientEndPoint: GetSet<Vector2d, this>;
|
|
183
185
|
strokeLinearGradientColorStops: GetSet<Array<number | string>, this>;
|
|
184
186
|
}
|
package/lib/Stage.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Container, ContainerConfig } from './Container';
|
|
2
|
-
import { SceneCanvas, HitCanvas } from './Canvas';
|
|
3
|
-
import { GetSet, Vector2d } from './types';
|
|
4
|
-
import { Shape } from './Shape';
|
|
5
|
-
import { Layer } from './Layer';
|
|
1
|
+
import { Container, ContainerConfig } from './Container.js';
|
|
2
|
+
import { SceneCanvas, HitCanvas } from './Canvas.js';
|
|
3
|
+
import { GetSet, Vector2d } from './types.js';
|
|
4
|
+
import { Shape } from './Shape.js';
|
|
5
|
+
import { Layer } from './Layer.js';
|
|
6
6
|
export interface StageConfig extends ContainerConfig {
|
|
7
7
|
container: HTMLDivElement | string;
|
|
8
8
|
}
|
|
@@ -48,7 +48,7 @@ export declare class Stage extends Container<Layer> {
|
|
|
48
48
|
getStage(): this;
|
|
49
49
|
getContent(): HTMLDivElement;
|
|
50
50
|
_toKonvaCanvas(config: any): SceneCanvas;
|
|
51
|
-
getIntersection(pos: Vector2d): Shape<import("./Shape").ShapeConfig>;
|
|
51
|
+
getIntersection(pos: Vector2d): Shape<import("./Shape.js").ShapeConfig>;
|
|
52
52
|
_resizeDOM(): void;
|
|
53
53
|
add(layer: Layer, ...rest: any[]): this;
|
|
54
54
|
getParent(): any;
|
|
@@ -60,7 +60,7 @@ export declare class Stage extends Container<Layer> {
|
|
|
60
60
|
_bindContentEvents(): void;
|
|
61
61
|
_pointerenter(evt: any): void;
|
|
62
62
|
_pointerover(evt: any): void;
|
|
63
|
-
_getTargetShape(evenType: any): Shape<import("./Shape").ShapeConfig>;
|
|
63
|
+
_getTargetShape(evenType: any): Shape<import("./Shape.js").ShapeConfig>;
|
|
64
64
|
_pointerleave(evt: any): void;
|
|
65
65
|
_pointerdown(evt: TouchEvent | MouseEvent | PointerEvent): void;
|
|
66
66
|
_pointermove(evt: TouchEvent | MouseEvent | PointerEvent): void;
|
package/lib/Tween.d.ts
CHANGED
package/lib/Util.d.ts
CHANGED
package/lib/_CoreInternals.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Transform } from './Util';
|
|
2
|
-
import { Node } from './Node';
|
|
3
|
-
import { Container } from './Container';
|
|
4
|
-
import { Stage } from './Stage';
|
|
5
|
-
import { Layer } from './Layer';
|
|
6
|
-
import { FastLayer } from './FastLayer';
|
|
7
|
-
import { Group } from './Group';
|
|
8
|
-
import { Shape } from './Shape';
|
|
9
|
-
import { Animation } from './Animation';
|
|
10
|
-
import { Tween } from './Tween';
|
|
11
|
-
import { Context } from './Context';
|
|
12
|
-
import { Canvas } from './Canvas';
|
|
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
13
|
export declare const Konva: {
|
|
14
14
|
_global: any;
|
|
15
15
|
version: string;
|
|
@@ -59,24 +59,24 @@ export declare const Konva: {
|
|
|
59
59
|
_isInDocument(el: any): boolean;
|
|
60
60
|
_urlToImage(url: string, callback: Function): void;
|
|
61
61
|
_rgbToHex(r: number, g: number, b: number): string;
|
|
62
|
-
_hexToRgb(hex: string): import("./types").RGB;
|
|
62
|
+
_hexToRgb(hex: string): import("./types.js").RGB;
|
|
63
63
|
getRandomColor(): string;
|
|
64
|
-
getRGB(color: string): import("./types").RGB;
|
|
65
|
-
colorToRGBA(str: string): import("./types").RGBA;
|
|
64
|
+
getRGB(color: string): import("./types.js").RGB;
|
|
65
|
+
colorToRGBA(str: string): import("./types.js").RGBA;
|
|
66
66
|
_namedColorToRBA(str: string): {
|
|
67
67
|
r: any;
|
|
68
68
|
g: any;
|
|
69
69
|
b: any;
|
|
70
70
|
a: number;
|
|
71
71
|
};
|
|
72
|
-
_rgbColorToRGBA(str: string): import("./types").RGBA;
|
|
73
|
-
_rgbaColorToRGBA(str: string): import("./types").RGBA;
|
|
74
|
-
_hex8ColorToRGBA(str: string): import("./types").RGBA;
|
|
75
|
-
_hex6ColorToRGBA(str: string): import("./types").RGBA;
|
|
76
|
-
_hex4ColorToRGBA(str: string): import("./types").RGBA;
|
|
77
|
-
_hex3ColorToRGBA(str: string): import("./types").RGBA;
|
|
78
|
-
_hslColorToRGBA(str: string): import("./types").RGBA;
|
|
79
|
-
haveIntersection(r1: import("./types").IRect, r2: import("./types").IRect): boolean;
|
|
72
|
+
_rgbColorToRGBA(str: string): import("./types.js").RGBA;
|
|
73
|
+
_rgbaColorToRGBA(str: string): import("./types.js").RGBA;
|
|
74
|
+
_hex8ColorToRGBA(str: string): import("./types.js").RGBA;
|
|
75
|
+
_hex6ColorToRGBA(str: string): import("./types.js").RGBA;
|
|
76
|
+
_hex4ColorToRGBA(str: string): import("./types.js").RGBA;
|
|
77
|
+
_hex3ColorToRGBA(str: string): import("./types.js").RGBA;
|
|
78
|
+
_hslColorToRGBA(str: string): import("./types.js").RGBA;
|
|
79
|
+
haveIntersection(r1: import("./types").IRect, r2: import("./types.js").IRect): boolean;
|
|
80
80
|
cloneObject<Any>(obj: Any): Any;
|
|
81
81
|
cloneArray(arr: any[]): any[];
|
|
82
82
|
degToRad(deg: number): number;
|
|
@@ -91,7 +91,7 @@ export declare const Konva: {
|
|
|
91
91
|
each(obj: any, func: any): void;
|
|
92
92
|
_inRange(val: any, left: any, right: any): boolean;
|
|
93
93
|
_getProjectionToSegment(x1: any, y1: any, x2: any, y2: any, x3: any, y3: any): any[];
|
|
94
|
-
_getProjectionToLine(pt: import("./types").Vector2d, line: any, isClosed: any): import("./types").Vector2d;
|
|
94
|
+
_getProjectionToLine(pt: import("./types").Vector2d, line: any, isClosed: any): import("./types.js").Vector2d;
|
|
95
95
|
_prepareArrayForTween(startArray: any, endArray: any, isClosed: any): any[];
|
|
96
96
|
_prepareToStringify(obj: any): any;
|
|
97
97
|
_assign<T, U>(target: T, source: U): T & U;
|
|
@@ -110,11 +110,11 @@ export declare const Konva: {
|
|
|
110
110
|
DD: {
|
|
111
111
|
readonly isDragging: boolean;
|
|
112
112
|
justDragged: boolean;
|
|
113
|
-
readonly node: Node<import("./Node").NodeConfig>;
|
|
113
|
+
readonly node: Node<import("./Node.js").NodeConfig>;
|
|
114
114
|
_dragElements: Map<number, {
|
|
115
|
-
node: Node<import("./Node").NodeConfig>;
|
|
116
|
-
startPointerPos: import("./types").Vector2d;
|
|
117
|
-
offset: import("./types").Vector2d;
|
|
115
|
+
node: Node<import("./Node.js").NodeConfig>;
|
|
116
|
+
startPointerPos: import("./types.js").Vector2d;
|
|
117
|
+
offset: import("./types.js").Vector2d;
|
|
118
118
|
pointerId?: number;
|
|
119
119
|
dragStatus: "stopped" | "ready" | "dragging";
|
|
120
120
|
}>;
|
|
@@ -124,7 +124,7 @@ export declare const Konva: {
|
|
|
124
124
|
};
|
|
125
125
|
Shape: typeof Shape;
|
|
126
126
|
shapes: {
|
|
127
|
-
[key: string]: Shape<import("./Shape").ShapeConfig>;
|
|
127
|
+
[key: string]: Shape<import("./Shape.js").ShapeConfig>;
|
|
128
128
|
};
|
|
129
129
|
Animation: typeof Animation;
|
|
130
130
|
Tween: typeof Tween;
|