@flowscape-ui/core-sdk 1.0.3 → 1.0.5
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/README.md +25 -32
- package/dist/index.cjs +111 -1
- package/dist/index.d.cts +418 -1
- package/dist/index.d.ts +418 -1
- package/dist/index.js +111 -1
- package/package.json +10 -5
package/dist/index.d.cts
CHANGED
|
@@ -260,6 +260,85 @@ interface GroupNodeHandle extends NodeHandle {
|
|
|
260
260
|
height: number;
|
|
261
261
|
}): this;
|
|
262
262
|
}
|
|
263
|
+
/**
|
|
264
|
+
* Handle for SvgNode
|
|
265
|
+
*/
|
|
266
|
+
interface SvgNodeHandle extends NodeHandle {
|
|
267
|
+
setSrc(url: string, onLoad?: (node: unknown) => void, onError?: (error: Error) => void): Promise<unknown>;
|
|
268
|
+
setSize(size: {
|
|
269
|
+
width: number;
|
|
270
|
+
height: number;
|
|
271
|
+
}): this;
|
|
272
|
+
setCornerRadius(radius: number | number[]): this;
|
|
273
|
+
setOpacity(opacity: number): this;
|
|
274
|
+
getSize(): {
|
|
275
|
+
width: number;
|
|
276
|
+
height: number;
|
|
277
|
+
};
|
|
278
|
+
getCornerRadius(): number;
|
|
279
|
+
getOpacity(): number;
|
|
280
|
+
isLoading(): boolean;
|
|
281
|
+
isLoaded(): boolean;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Handle for VideoNode
|
|
285
|
+
*/
|
|
286
|
+
interface VideoNodeHandle extends NodeHandle {
|
|
287
|
+
setSrc(url: string, options?: Record<string, unknown>): Promise<unknown>;
|
|
288
|
+
play(): Promise<unknown>;
|
|
289
|
+
pause(): this;
|
|
290
|
+
stop(): this;
|
|
291
|
+
setCurrentTime(time: number): this;
|
|
292
|
+
getCurrentTime(): number;
|
|
293
|
+
getDuration(): number;
|
|
294
|
+
setVolume(volume: number): this;
|
|
295
|
+
getVolume(): number;
|
|
296
|
+
setMuted(muted: boolean): this;
|
|
297
|
+
isMuted(): boolean;
|
|
298
|
+
setLoop(loop: boolean): this;
|
|
299
|
+
isLoop(): boolean;
|
|
300
|
+
setPlaybackRate(rate: number): this;
|
|
301
|
+
getPlaybackRate(): number;
|
|
302
|
+
isPlaying(): boolean;
|
|
303
|
+
isLoaded(): boolean;
|
|
304
|
+
getVideoElement(): HTMLVideoElement | null;
|
|
305
|
+
setSize(size: {
|
|
306
|
+
width: number;
|
|
307
|
+
height: number;
|
|
308
|
+
}): this;
|
|
309
|
+
setCornerRadius(radius: number | number[]): this;
|
|
310
|
+
setOpacity(opacity: number): this;
|
|
311
|
+
getSize(): {
|
|
312
|
+
width: number;
|
|
313
|
+
height: number;
|
|
314
|
+
};
|
|
315
|
+
getCornerRadius(): number;
|
|
316
|
+
getOpacity(): number;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Handle for GifNode
|
|
320
|
+
*/
|
|
321
|
+
interface GifNodeHandle extends NodeHandle {
|
|
322
|
+
setSrc(url: string, options?: Record<string, unknown>): Promise<unknown>;
|
|
323
|
+
play(): this;
|
|
324
|
+
pause(): this;
|
|
325
|
+
isPlaying(): boolean;
|
|
326
|
+
isLoaded(): boolean;
|
|
327
|
+
getFrameIndex(): number;
|
|
328
|
+
getCanvas(): HTMLCanvasElement | null;
|
|
329
|
+
setSize(size: {
|
|
330
|
+
width: number;
|
|
331
|
+
height: number;
|
|
332
|
+
}): this;
|
|
333
|
+
setCornerRadius(radius: number | number[]): this;
|
|
334
|
+
setOpacity(opacity: number): this;
|
|
335
|
+
getSize(): {
|
|
336
|
+
width: number;
|
|
337
|
+
height: number;
|
|
338
|
+
};
|
|
339
|
+
getCornerRadius(): number;
|
|
340
|
+
getOpacity(): number;
|
|
341
|
+
}
|
|
263
342
|
|
|
264
343
|
interface BaseNodeOptions {
|
|
265
344
|
id?: string;
|
|
@@ -447,6 +526,97 @@ interface EllipseNodeOptions extends BaseNodeOptions {
|
|
|
447
526
|
strokeWidth?: number;
|
|
448
527
|
}
|
|
449
528
|
|
|
529
|
+
interface MediaPlaceholderOptions {
|
|
530
|
+
text: string;
|
|
531
|
+
textColor: string;
|
|
532
|
+
font: string;
|
|
533
|
+
backgroundColor: string;
|
|
534
|
+
borderColor: string;
|
|
535
|
+
baseSpinnerColor: string;
|
|
536
|
+
accentSpinnerColor: string;
|
|
537
|
+
lineWidth: number;
|
|
538
|
+
fallbackWidth: number;
|
|
539
|
+
fallbackHeight: number;
|
|
540
|
+
}
|
|
541
|
+
declare class MediaPlaceholder {
|
|
542
|
+
private readonly _node;
|
|
543
|
+
private _options;
|
|
544
|
+
private _rafId;
|
|
545
|
+
private _startTime;
|
|
546
|
+
private _lastDrawTime;
|
|
547
|
+
private _canvas;
|
|
548
|
+
private _ctx;
|
|
549
|
+
private _logicalWidth;
|
|
550
|
+
private _logicalHeight;
|
|
551
|
+
private _pixelRatio;
|
|
552
|
+
private readonly _maxPixelRatio;
|
|
553
|
+
private readonly _maxCanvasPixels;
|
|
554
|
+
private readonly _targetFps;
|
|
555
|
+
constructor(node: Konva.Image, options?: Partial<MediaPlaceholderOptions>);
|
|
556
|
+
setOptions(options: Partial<MediaPlaceholderOptions>): void;
|
|
557
|
+
start(): void;
|
|
558
|
+
stop(): void;
|
|
559
|
+
private _tick;
|
|
560
|
+
private _getPixelRatio;
|
|
561
|
+
private _draw;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
declare global {
|
|
565
|
+
interface Window {
|
|
566
|
+
gifler?: (url: string) => GiflerInstance;
|
|
567
|
+
}
|
|
568
|
+
interface GiflerInstance {
|
|
569
|
+
frames: (canvas: HTMLCanvasElement, onDrawFrame: (ctx: CanvasRenderingContext2D, frame: GiflerFrame) => void) => void;
|
|
570
|
+
}
|
|
571
|
+
interface GiflerFrame {
|
|
572
|
+
width: number;
|
|
573
|
+
height: number;
|
|
574
|
+
buffer: HTMLCanvasElement;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
interface GifNodeOptions extends BaseNodeOptions {
|
|
578
|
+
src?: string;
|
|
579
|
+
width?: number;
|
|
580
|
+
height?: number;
|
|
581
|
+
cornerRadius?: number | number[];
|
|
582
|
+
autoplay?: boolean;
|
|
583
|
+
placeholder?: Partial<MediaPlaceholderOptions>;
|
|
584
|
+
onLoad?: (node: GifNode) => void;
|
|
585
|
+
onError?: (error: Error) => void;
|
|
586
|
+
onFrame?: (node: GifNode, frameIndex: number) => void;
|
|
587
|
+
}
|
|
588
|
+
declare class GifNode extends BaseNode<Konva.Image> {
|
|
589
|
+
private _canvas;
|
|
590
|
+
private _placeholder;
|
|
591
|
+
private _isLoaded;
|
|
592
|
+
private _isPlaying;
|
|
593
|
+
private _giflerLoaded;
|
|
594
|
+
private _frameIndex;
|
|
595
|
+
constructor(options?: GifNodeOptions);
|
|
596
|
+
setSrc(url: string, options?: Omit<GifNodeOptions, 'src' | 'x' | 'y' | 'width' | 'height'>): Promise<this>;
|
|
597
|
+
play(): this;
|
|
598
|
+
pause(): this;
|
|
599
|
+
isPlaying(): boolean;
|
|
600
|
+
isLoaded(): boolean;
|
|
601
|
+
getFrameIndex(): number;
|
|
602
|
+
getCanvas(): HTMLCanvasElement | null;
|
|
603
|
+
getSize(): {
|
|
604
|
+
width: number;
|
|
605
|
+
height: number;
|
|
606
|
+
};
|
|
607
|
+
setSize({ width, height }: {
|
|
608
|
+
width: number;
|
|
609
|
+
height: number;
|
|
610
|
+
}): this;
|
|
611
|
+
setCornerRadius(radius: number | number[]): this;
|
|
612
|
+
getCornerRadius(): number;
|
|
613
|
+
setOpacity(opacity: number): this;
|
|
614
|
+
getOpacity(): number;
|
|
615
|
+
private _ensureGiflerLibrary;
|
|
616
|
+
private _cleanup;
|
|
617
|
+
remove(): void;
|
|
618
|
+
}
|
|
619
|
+
|
|
450
620
|
interface GroupNodeOptions extends BaseNodeOptions {
|
|
451
621
|
draggable?: boolean;
|
|
452
622
|
listening?: boolean;
|
|
@@ -464,8 +634,11 @@ interface ImageNodeOptions extends BaseNodeOptions {
|
|
|
464
634
|
src?: string;
|
|
465
635
|
width?: number;
|
|
466
636
|
height?: number;
|
|
637
|
+
cornerRadius?: number | number[];
|
|
638
|
+
placeholder?: Partial<MediaPlaceholderOptions>;
|
|
467
639
|
}
|
|
468
640
|
declare class ImageNode extends BaseNode<Konva.Image> {
|
|
641
|
+
private _placeholder;
|
|
469
642
|
constructor(options?: ImageNodeOptions);
|
|
470
643
|
getSize(): {
|
|
471
644
|
width: number;
|
|
@@ -487,6 +660,7 @@ declare class ImageNode extends BaseNode<Konva.Image> {
|
|
|
487
660
|
setCornerRadius(radius: number | number[]): this;
|
|
488
661
|
getCornerRadius(): number;
|
|
489
662
|
private _loadHTMLImage;
|
|
663
|
+
remove(): void;
|
|
490
664
|
}
|
|
491
665
|
|
|
492
666
|
interface RegularPolygonNodeOptions extends BaseNodeOptions {
|
|
@@ -536,6 +710,38 @@ interface StarNodeOptions extends BaseNodeOptions {
|
|
|
536
710
|
strokeWidth?: number;
|
|
537
711
|
}
|
|
538
712
|
|
|
713
|
+
interface SvgNodeOptions extends BaseNodeOptions {
|
|
714
|
+
src?: string;
|
|
715
|
+
width?: number;
|
|
716
|
+
height?: number;
|
|
717
|
+
cornerRadius?: number | number[];
|
|
718
|
+
placeholder?: Partial<MediaPlaceholderOptions>;
|
|
719
|
+
onLoad?: (node: SvgNode) => void;
|
|
720
|
+
onError?: (error: Error) => void;
|
|
721
|
+
}
|
|
722
|
+
declare class SvgNode extends BaseNode<Konva.Image> {
|
|
723
|
+
private _isLoading;
|
|
724
|
+
private _isLoaded;
|
|
725
|
+
private _placeholder;
|
|
726
|
+
constructor(options?: SvgNodeOptions);
|
|
727
|
+
isLoading(): boolean;
|
|
728
|
+
isLoaded(): boolean;
|
|
729
|
+
getSize(): {
|
|
730
|
+
width: number;
|
|
731
|
+
height: number;
|
|
732
|
+
};
|
|
733
|
+
setSrc(url: string, onLoad?: (node: SvgNode) => void, onError?: (error: Error) => void): Promise<this>;
|
|
734
|
+
setSize({ width, height }: {
|
|
735
|
+
width: number;
|
|
736
|
+
height: number;
|
|
737
|
+
}): this;
|
|
738
|
+
setCornerRadius(radius: number | number[]): this;
|
|
739
|
+
getCornerRadius(): number;
|
|
740
|
+
setOpacity(opacity: number): this;
|
|
741
|
+
getOpacity(): number;
|
|
742
|
+
remove(): void;
|
|
743
|
+
}
|
|
744
|
+
|
|
539
745
|
interface TextNodeOptions extends BaseNodeOptions {
|
|
540
746
|
text?: string;
|
|
541
747
|
fontSize?: number;
|
|
@@ -612,11 +818,77 @@ declare class TextNode extends BaseNode<Konva.Text> {
|
|
|
612
818
|
private _keyHandler;
|
|
613
819
|
private _clickHandler;
|
|
614
820
|
private _syncTextareaRafId;
|
|
821
|
+
private _inputHandler;
|
|
822
|
+
private _prevWrap;
|
|
823
|
+
private _getWrappedLineCount;
|
|
824
|
+
private _ensureHeightFitsWrappedText;
|
|
825
|
+
private _ensureWidthFitsText;
|
|
826
|
+
private _syncNodeSizeFromTextarea;
|
|
615
827
|
private _syncTextareaPosition;
|
|
616
828
|
private _openTextarea;
|
|
617
829
|
private _saveAndClose;
|
|
618
830
|
}
|
|
619
831
|
|
|
832
|
+
interface VideoNodeOptions extends BaseNodeOptions {
|
|
833
|
+
src?: string;
|
|
834
|
+
width?: number;
|
|
835
|
+
height?: number;
|
|
836
|
+
cornerRadius?: number | number[];
|
|
837
|
+
autoplay?: boolean;
|
|
838
|
+
loop?: boolean;
|
|
839
|
+
muted?: boolean;
|
|
840
|
+
currentTime?: number;
|
|
841
|
+
volume?: number;
|
|
842
|
+
playbackRate?: number;
|
|
843
|
+
placeholder?: Partial<MediaPlaceholderOptions>;
|
|
844
|
+
onLoadedMetadata?: (node: VideoNode, video: HTMLVideoElement) => void;
|
|
845
|
+
onError?: (error: Error) => void;
|
|
846
|
+
onPlay?: (node: VideoNode) => void;
|
|
847
|
+
onPause?: (node: VideoNode) => void;
|
|
848
|
+
onEnded?: (node: VideoNode) => void;
|
|
849
|
+
}
|
|
850
|
+
declare class VideoNode extends BaseNode<Konva.Image> {
|
|
851
|
+
private _videoElement;
|
|
852
|
+
private _animation;
|
|
853
|
+
private _placeholder;
|
|
854
|
+
private _isPlaying;
|
|
855
|
+
private _isLoaded;
|
|
856
|
+
constructor(options?: VideoNodeOptions);
|
|
857
|
+
setSrc(url: string, options?: Omit<VideoNodeOptions, 'src' | 'x' | 'y' | 'width' | 'height'>): Promise<this>;
|
|
858
|
+
play(): Promise<this>;
|
|
859
|
+
pause(): this;
|
|
860
|
+
stop(): this;
|
|
861
|
+
setCurrentTime(time: number): this;
|
|
862
|
+
getCurrentTime(): number;
|
|
863
|
+
getDuration(): number;
|
|
864
|
+
setVolume(volume: number): this;
|
|
865
|
+
getVolume(): number;
|
|
866
|
+
setMuted(muted: boolean): this;
|
|
867
|
+
isMuted(): boolean;
|
|
868
|
+
setLoop(loop: boolean): this;
|
|
869
|
+
isLoop(): boolean;
|
|
870
|
+
setPlaybackRate(rate: number): this;
|
|
871
|
+
getPlaybackRate(): number;
|
|
872
|
+
isPlaying(): boolean;
|
|
873
|
+
isLoaded(): boolean;
|
|
874
|
+
getVideoElement(): HTMLVideoElement | null;
|
|
875
|
+
getSize(): {
|
|
876
|
+
width: number;
|
|
877
|
+
height: number;
|
|
878
|
+
};
|
|
879
|
+
setSize({ width, height }: {
|
|
880
|
+
width: number;
|
|
881
|
+
height: number;
|
|
882
|
+
}): this;
|
|
883
|
+
setCornerRadius(radius: number | number[]): this;
|
|
884
|
+
getCornerRadius(): number;
|
|
885
|
+
setOpacity(opacity: number): this;
|
|
886
|
+
getOpacity(): number;
|
|
887
|
+
private _ensureAnimation;
|
|
888
|
+
private _cleanup;
|
|
889
|
+
remove(): void;
|
|
890
|
+
}
|
|
891
|
+
|
|
620
892
|
declare class NodeManager {
|
|
621
893
|
private _layer;
|
|
622
894
|
private _world;
|
|
@@ -642,6 +914,9 @@ declare class NodeManager {
|
|
|
642
914
|
addRing(options: RingNodeOptions): RingNodeHandle;
|
|
643
915
|
addRegularPolygon(options: RegularPolygonNodeOptions): RegularPolygonNodeHandle;
|
|
644
916
|
addGroup(options: GroupNodeOptions): GroupNodeHandle;
|
|
917
|
+
addSvg(options: SvgNodeOptions): SvgNodeHandle;
|
|
918
|
+
addVideo(options: VideoNodeOptions): VideoNodeHandle;
|
|
919
|
+
addGif(options: GifNodeOptions): GifNodeHandle;
|
|
645
920
|
remove(node: BaseNode): void;
|
|
646
921
|
findById(id: string): BaseNode | undefined;
|
|
647
922
|
list(): BaseNode[];
|
|
@@ -777,6 +1052,7 @@ declare class VirtualizationManager {
|
|
|
777
1052
|
private _viewport;
|
|
778
1053
|
private _visibleNodes;
|
|
779
1054
|
private _hiddenNodes;
|
|
1055
|
+
private _tempMultiNodeIds;
|
|
780
1056
|
private _updateScheduled;
|
|
781
1057
|
private _lod;
|
|
782
1058
|
constructor(_stage: Konva.Stage, _world: Konva.Group, _nodeManager: NodeManager, options?: VirtualizationOptions);
|
|
@@ -1113,10 +1389,16 @@ declare class AreaSelectionPlugin extends Plugin {
|
|
|
1113
1389
|
private _selecting;
|
|
1114
1390
|
private _skipNextClick;
|
|
1115
1391
|
private _lastPickedBaseNodes;
|
|
1392
|
+
private _autoPanRafId;
|
|
1393
|
+
private _autoPanActive;
|
|
1394
|
+
private _autoPanEdgePx;
|
|
1395
|
+
private _autoPanMaxSpeedPx;
|
|
1116
1396
|
private _options;
|
|
1117
1397
|
constructor(options?: AreaSelectionPluginOptions);
|
|
1118
1398
|
protected onAttach(core: CoreEngine): void;
|
|
1119
1399
|
protected onDetach(core: CoreEngine): void;
|
|
1400
|
+
private _startAutoPanLoop;
|
|
1401
|
+
private _stopAutoPanLoop;
|
|
1120
1402
|
private _finalizeArea;
|
|
1121
1403
|
private _clearSelection;
|
|
1122
1404
|
private _getSelectionPlugin;
|
|
@@ -1162,6 +1444,43 @@ declare class CameraHotkeysPlugin extends Plugin {
|
|
|
1162
1444
|
private _pan;
|
|
1163
1445
|
}
|
|
1164
1446
|
|
|
1447
|
+
interface ContentFromClipboardPluginOptions {
|
|
1448
|
+
target?: Window | Document | HTMLElement | EventTarget;
|
|
1449
|
+
ignoreEditableTargets?: boolean;
|
|
1450
|
+
maxImageSize?: number;
|
|
1451
|
+
enableDragDrop?: boolean;
|
|
1452
|
+
}
|
|
1453
|
+
declare class ContentFromClipboardPlugin extends Plugin {
|
|
1454
|
+
private _core?;
|
|
1455
|
+
private _options;
|
|
1456
|
+
private _dragDropAddon;
|
|
1457
|
+
constructor(options?: ContentFromClipboardPluginOptions);
|
|
1458
|
+
protected onAttach(core: CoreEngine): void;
|
|
1459
|
+
protected onDetach(_core: CoreEngine): void;
|
|
1460
|
+
private _onPaste;
|
|
1461
|
+
private _handlePaste;
|
|
1462
|
+
handleDrop(e: DragEvent): Promise<void>;
|
|
1463
|
+
private _handleDataTransfer;
|
|
1464
|
+
private _pasteSvgText;
|
|
1465
|
+
private _pasteSvgFile;
|
|
1466
|
+
private _pasteImageFile;
|
|
1467
|
+
private _pasteVideoFile;
|
|
1468
|
+
private _fitIntoMaxSize;
|
|
1469
|
+
private _isEditableTarget;
|
|
1470
|
+
private _getPastePosition;
|
|
1471
|
+
private _isPointerOnScreen;
|
|
1472
|
+
private _getScreenCenter;
|
|
1473
|
+
private _getAsString;
|
|
1474
|
+
private _looksLikeVideoFile;
|
|
1475
|
+
private _htmlToText;
|
|
1476
|
+
private _readFileAsText;
|
|
1477
|
+
private _extractSvgMarkup;
|
|
1478
|
+
private _svgTextToSrc;
|
|
1479
|
+
private _parseSvgNumber;
|
|
1480
|
+
private _extractSvgSize;
|
|
1481
|
+
private _loadImageSize;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1165
1484
|
interface GridPluginOptions {
|
|
1166
1485
|
stepX?: number;
|
|
1167
1486
|
stepY?: number;
|
|
@@ -1384,6 +1703,7 @@ declare class NodeHotkeysPlugin extends Plugin {
|
|
|
1384
1703
|
constructor(options?: NodeHotkeysOptions);
|
|
1385
1704
|
protected onAttach(core: CoreEngine): void;
|
|
1386
1705
|
protected onDetach(_core: CoreEngine): void;
|
|
1706
|
+
private _onPaste;
|
|
1387
1707
|
private _onKeyDown;
|
|
1388
1708
|
private _isEditableTarget;
|
|
1389
1709
|
private _handleCopy;
|
|
@@ -1682,6 +2002,90 @@ declare class RulerPlugin extends Plugin {
|
|
|
1682
2002
|
isVisible(): boolean;
|
|
1683
2003
|
}
|
|
1684
2004
|
|
|
2005
|
+
interface VideoOverlayAddonOptions {
|
|
2006
|
+
zIndex?: number;
|
|
2007
|
+
marginPx?: number;
|
|
2008
|
+
controlsHeightPx?: number;
|
|
2009
|
+
speeds?: number[];
|
|
2010
|
+
minWidthPx?: number;
|
|
2011
|
+
minHeightPx?: number;
|
|
2012
|
+
maxWorldScaleToShow?: number | null;
|
|
2013
|
+
hideDuringCameraZoomMs?: number;
|
|
2014
|
+
uiBackgroundColor?: string;
|
|
2015
|
+
uiBorderColor?: string;
|
|
2016
|
+
uiTextColor?: string;
|
|
2017
|
+
uiMutedTextColor?: string;
|
|
2018
|
+
uiAccentColor?: string;
|
|
2019
|
+
uiTrackColor?: string;
|
|
2020
|
+
uiTrackFilledColor?: string;
|
|
2021
|
+
}
|
|
2022
|
+
declare class VideoOverlayAddon extends PluginAddon<SelectionPlugin> {
|
|
2023
|
+
private _core;
|
|
2024
|
+
private _rootEl;
|
|
2025
|
+
private _controlsEl;
|
|
2026
|
+
private _playBtn;
|
|
2027
|
+
private _muteBtn;
|
|
2028
|
+
private _speedBtn;
|
|
2029
|
+
private _timeLabel;
|
|
2030
|
+
private _seekInput;
|
|
2031
|
+
private _volInput;
|
|
2032
|
+
private _selectedVideoNode;
|
|
2033
|
+
private _selectedVideoEl;
|
|
2034
|
+
private _hiddenForDrag;
|
|
2035
|
+
private _hiddenForSize;
|
|
2036
|
+
private _hiddenForTransform;
|
|
2037
|
+
private _hiddenForZoom;
|
|
2038
|
+
private _hiddenForWorldScale;
|
|
2039
|
+
private _hiddenForNotReady;
|
|
2040
|
+
private _uiMode;
|
|
2041
|
+
private _zoomUnhideTimeoutId;
|
|
2042
|
+
private _onKonvaDragStart;
|
|
2043
|
+
private _onKonvaDragEnd;
|
|
2044
|
+
private _onKonvaTransformStart;
|
|
2045
|
+
private _onKonvaTransformEnd;
|
|
2046
|
+
private _onLayerTransformStart;
|
|
2047
|
+
private _onLayerTransformEnd;
|
|
2048
|
+
private _onLayerDragStart;
|
|
2049
|
+
private _onLayerDragEnd;
|
|
2050
|
+
private _rafId;
|
|
2051
|
+
private _options;
|
|
2052
|
+
private _onNodeSelected;
|
|
2053
|
+
private _onNodeDeselected;
|
|
2054
|
+
private _onSelectionCleared;
|
|
2055
|
+
private _onNodeTransformed;
|
|
2056
|
+
private _onStageResized;
|
|
2057
|
+
private _onCameraChanged;
|
|
2058
|
+
private _onWorldChanged;
|
|
2059
|
+
private _onTimeUpdate;
|
|
2060
|
+
private _onLoadedMetadata;
|
|
2061
|
+
private _onCanPlay;
|
|
2062
|
+
private _onPlayPauseSync;
|
|
2063
|
+
constructor(options?: VideoOverlayAddonOptions);
|
|
2064
|
+
protected onAttach(_plugin: SelectionPlugin, core: CoreEngine): void;
|
|
2065
|
+
protected onDetach(_plugin: SelectionPlugin, core: CoreEngine): void;
|
|
2066
|
+
private _ensureDom;
|
|
2067
|
+
private _updateRangeFill;
|
|
2068
|
+
private _tryShowForNode;
|
|
2069
|
+
private _show;
|
|
2070
|
+
private _hide;
|
|
2071
|
+
private _bindLayerInteractionEvents;
|
|
2072
|
+
private _unbindLayerInteractionEvents;
|
|
2073
|
+
private _bindKonvaDragEvents;
|
|
2074
|
+
private _unbindKonvaDragEvents;
|
|
2075
|
+
private _bindKonvaTransformEvents;
|
|
2076
|
+
private _unbindKonvaTransformEvents;
|
|
2077
|
+
private _hideTemporarilyForZoom;
|
|
2078
|
+
private _bindVideoEvents;
|
|
2079
|
+
private _unbindVideoEvents;
|
|
2080
|
+
private _isVideoReady;
|
|
2081
|
+
private _maybeShowWhenReady;
|
|
2082
|
+
private _scheduleSync;
|
|
2083
|
+
private _syncPosition;
|
|
2084
|
+
private _syncControls;
|
|
2085
|
+
private _formatTime;
|
|
2086
|
+
private _applyUiMode;
|
|
2087
|
+
}
|
|
2088
|
+
|
|
1685
2089
|
interface MultiGroupControllerDeps {
|
|
1686
2090
|
ensureTempMulti: (nodes: BaseNode[]) => void;
|
|
1687
2091
|
destroyTempMulti: () => void;
|
|
@@ -1716,6 +2120,7 @@ interface SelectionPluginOptions {
|
|
|
1716
2120
|
autoPanEnabled?: boolean;
|
|
1717
2121
|
autoPanEdgePx?: number;
|
|
1718
2122
|
autoPanMaxSpeedPx?: number;
|
|
2123
|
+
enableVideoOverlay?: boolean | VideoOverlayAddonOptions;
|
|
1719
2124
|
}
|
|
1720
2125
|
/**
|
|
1721
2126
|
* Universal selection and dragging plugin for nodes compatible with BaseNode.
|
|
@@ -1740,6 +2145,7 @@ declare class SelectionPlugin extends Plugin {
|
|
|
1740
2145
|
private _cornerHandles;
|
|
1741
2146
|
private _cornerHandlesSuppressed;
|
|
1742
2147
|
private _transformOppositeCorner;
|
|
2148
|
+
private _isTransforming;
|
|
1743
2149
|
private _sizeLabel;
|
|
1744
2150
|
private _radiusLabel;
|
|
1745
2151
|
private _rotateHandlesGroup;
|
|
@@ -1756,6 +2162,7 @@ declare class SelectionPlugin extends Plugin {
|
|
|
1756
2162
|
private _autoPanEdgePx;
|
|
1757
2163
|
private _autoPanMaxSpeedPx;
|
|
1758
2164
|
private _draggingNode;
|
|
2165
|
+
private _tempMultiTransformingGroup;
|
|
1759
2166
|
private _ratioKeyPressed;
|
|
1760
2167
|
private _onGlobalKeyDown;
|
|
1761
2168
|
private _onGlobalKeyUp;
|
|
@@ -1804,6 +2211,7 @@ declare class SelectionPlugin extends Plugin {
|
|
|
1804
2211
|
*/
|
|
1805
2212
|
private _computeUnionBBox;
|
|
1806
2213
|
private _ensureTempMulti;
|
|
2214
|
+
private _destroyTempMultiOverlayOnly;
|
|
1807
2215
|
private _destroyTempMulti;
|
|
1808
2216
|
private _commitTempMultiToGroup;
|
|
1809
2217
|
private _tryUngroupSelectedGroup;
|
|
@@ -1819,6 +2227,14 @@ declare class SelectionPlugin extends Plugin {
|
|
|
1819
2227
|
private _setupRotateHandles;
|
|
1820
2228
|
private _destroyRotateHandles;
|
|
1821
2229
|
private _getNodeCenterAbs;
|
|
2230
|
+
/**
|
|
2231
|
+
* Set custom rotation cursor with dynamic angle based on handle position
|
|
2232
|
+
*/
|
|
2233
|
+
private _setRotateCursor;
|
|
2234
|
+
/**
|
|
2235
|
+
* Apply rotated cursor by creating a rotated SVG data URL
|
|
2236
|
+
*/
|
|
2237
|
+
private _applyRotatedCursor;
|
|
1822
2238
|
private _updateRotateHandlesPosition;
|
|
1823
2239
|
private _setupSizeLabel;
|
|
1824
2240
|
private _scheduleUIUpdate;
|
|
@@ -1858,6 +2274,7 @@ declare class VisualGuidesPlugin extends Plugin {
|
|
|
1858
2274
|
private _core?;
|
|
1859
2275
|
private _options;
|
|
1860
2276
|
private _layer;
|
|
2277
|
+
private _maxGuideDistancePx;
|
|
1861
2278
|
private _dragMoveHandler;
|
|
1862
2279
|
private _dragEndHandler;
|
|
1863
2280
|
private _nodesAddHandler;
|
|
@@ -2046,4 +2463,4 @@ declare class ThrottleHelper {
|
|
|
2046
2463
|
getThrottle(): number;
|
|
2047
2464
|
}
|
|
2048
2465
|
|
|
2049
|
-
export { type ArcNodeHandle, type ArcNodeOptions, AreaSelectionPlugin, type AreaSelectionPluginOptions, type ArrowNodeHandle, type ArrowNodeOptions, type BaseNodeOptions, type CameraHotkeysOptions, CameraHotkeysPlugin, CameraManager, type CircleNodeHandle, type CircleNodeOptions, CoreEngine, type CoreEngineOptions, type CoreEvents, DebounceHelper, type EllipseNodeHandle, type EllipseNodeOptions, EventBus, GridPlugin, type GridPluginOptions, type GroupNodeHandle, type GroupNodeOptions, type HistoryAction, HistoryManager, HistoryPlugin, type HistoryPluginOptions, ImageHoverFilterAddon, type ImageNodeHandle, type ImageNodeOptions, type ImageSource, type KonvaArc, type KonvaArrow, type KonvaCircle, type KonvaEllipse, type KonvaGroup, type KonvaGroupConfig, type KonvaImage, type KonvaLayer, type KonvaNode, type KonvaNodeConfig, type KonvaRegularPolygon, type KonvaRing, type KonvaShape, type KonvaStage, type KonvaStar, type KonvaText, type LogoOptions, LogoPlugin, NodeAddon, NodeAddons, type NodeAddonsHandle, type NodeHandle, type NodeHotkeysOptions, NodeHotkeysPlugin, NodeManager, PluginAddon, Plugins, type RegularPolygonNodeHandle, type RegularPolygonNodeOptions, type RingNodeHandle, type RingNodeOptions, RulerGuidesAddon, RulerGuidesPlugin, type RulerGuidesPluginOptions, RulerHighlightAddon, RulerHighlightPlugin, type RulerHighlightPluginOptions, RulerManagerAddon, RulerManagerPlugin, type RulerManagerPluginOptions, RulerPlugin, type RulerPluginOptions, SelectionPlugin, type SelectionPluginOptions, ShapeHoverHighlightAddon, type ShapeNodeHandle, type ShapeNodeOptions, type StarNodeHandle, type StarNodeOptions, TextAutoTrimAddon, type TextNodeHandle, type TextNodeOptions, ThrottleHelper, VisualGuidesPlugin, type VisualGuidesPluginOptions };
|
|
2466
|
+
export { type ArcNodeHandle, type ArcNodeOptions, AreaSelectionPlugin, type AreaSelectionPluginOptions, type ArrowNodeHandle, type ArrowNodeOptions, type BaseNodeOptions, type CameraHotkeysOptions, CameraHotkeysPlugin, CameraManager, type CircleNodeHandle, type CircleNodeOptions, ContentFromClipboardPlugin, type ContentFromClipboardPluginOptions, CoreEngine, type CoreEngineOptions, type CoreEvents, DebounceHelper, type EllipseNodeHandle, type EllipseNodeOptions, EventBus, type GifNodeHandle, type GifNodeOptions, GridPlugin, type GridPluginOptions, type GroupNodeHandle, type GroupNodeOptions, type HistoryAction, HistoryManager, HistoryPlugin, type HistoryPluginOptions, ImageHoverFilterAddon, type ImageNodeHandle, type ImageNodeOptions, type ImageSource, type KonvaArc, type KonvaArrow, type KonvaCircle, type KonvaEllipse, type KonvaGroup, type KonvaGroupConfig, type KonvaImage, type KonvaLayer, type KonvaNode, type KonvaNodeConfig, type KonvaRegularPolygon, type KonvaRing, type KonvaShape, type KonvaStage, type KonvaStar, type KonvaText, type LogoOptions, LogoPlugin, MediaPlaceholder, type MediaPlaceholderOptions, NodeAddon, NodeAddons, type NodeAddonsHandle, type NodeHandle, type NodeHotkeysOptions, NodeHotkeysPlugin, NodeManager, PluginAddon, Plugins, type RegularPolygonNodeHandle, type RegularPolygonNodeOptions, type RingNodeHandle, type RingNodeOptions, RulerGuidesAddon, RulerGuidesPlugin, type RulerGuidesPluginOptions, RulerHighlightAddon, RulerHighlightPlugin, type RulerHighlightPluginOptions, RulerManagerAddon, RulerManagerPlugin, type RulerManagerPluginOptions, RulerPlugin, type RulerPluginOptions, SelectionPlugin, type SelectionPluginOptions, ShapeHoverHighlightAddon, type ShapeNodeHandle, type ShapeNodeOptions, type StarNodeHandle, type StarNodeOptions, type SvgNodeHandle, type SvgNodeOptions, TextAutoTrimAddon, type TextNodeHandle, type TextNodeOptions, ThrottleHelper, type VideoNodeHandle, type VideoNodeOptions, VideoOverlayAddon, type VideoOverlayAddonOptions, VisualGuidesPlugin, type VisualGuidesPluginOptions };
|