@fieldnotes/core 0.13.0 → 0.14.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 +389 -46
- package/dist/index.d.cts +66 -4
- package/dist/index.d.ts +66 -4
- package/dist/index.js +386 -46
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -85,6 +85,7 @@ interface HtmlElement extends BaseElement {
|
|
|
85
85
|
type: 'html';
|
|
86
86
|
size: Size;
|
|
87
87
|
domId?: string;
|
|
88
|
+
interactive?: boolean;
|
|
88
89
|
}
|
|
89
90
|
interface TextElement extends BaseElement {
|
|
90
91
|
type: 'text';
|
|
@@ -146,11 +147,12 @@ interface CanvasState {
|
|
|
146
147
|
};
|
|
147
148
|
elements: CanvasElement[];
|
|
148
149
|
layers?: Layer[];
|
|
150
|
+
activeLayerId?: string;
|
|
149
151
|
}
|
|
150
152
|
declare function exportState(elements: CanvasElement[], camera: {
|
|
151
153
|
position: Point;
|
|
152
154
|
zoom: number;
|
|
153
|
-
}, layers?: Layer[]): CanvasState;
|
|
155
|
+
}, layers?: Layer[], activeLayerId?: string): CanvasState;
|
|
154
156
|
declare function parseState(json: string): CanvasState;
|
|
155
157
|
|
|
156
158
|
interface CameraOptions {
|
|
@@ -178,6 +180,7 @@ declare class Camera {
|
|
|
178
180
|
screenToWorld(screen: Point): Point;
|
|
179
181
|
worldToScreen(world: Point): Point;
|
|
180
182
|
getVisibleRect(canvasWidth: number, canvasHeight: number): Bounds;
|
|
183
|
+
fitToContent(boundingBox: Bounds, canvasWidth: number, canvasHeight: number, padding?: number): void;
|
|
181
184
|
toCSSTransform(): string;
|
|
182
185
|
onChange(listener: (info: CameraChangeInfo) => void): () => void;
|
|
183
186
|
private notifyPan;
|
|
@@ -200,6 +203,7 @@ declare class ElementStore {
|
|
|
200
203
|
private bus;
|
|
201
204
|
private layerOrderMap;
|
|
202
205
|
private spatialIndex;
|
|
206
|
+
private sortedCache;
|
|
203
207
|
get count(): number;
|
|
204
208
|
setLayerOrder(order: Map<string, number>): void;
|
|
205
209
|
getAll(): CanvasElement[];
|
|
@@ -238,6 +242,8 @@ interface PointerState {
|
|
|
238
242
|
x: number;
|
|
239
243
|
y: number;
|
|
240
244
|
pressure: number;
|
|
245
|
+
pointerType: 'mouse' | 'touch' | 'pen';
|
|
246
|
+
shiftKey: boolean;
|
|
241
247
|
}
|
|
242
248
|
interface Tool {
|
|
243
249
|
readonly name: string;
|
|
@@ -293,6 +299,7 @@ interface AutoSaveOptions {
|
|
|
293
299
|
key?: string;
|
|
294
300
|
debounceMs?: number;
|
|
295
301
|
layerManager?: LayerManager;
|
|
302
|
+
onError?: (error: Error) => void;
|
|
296
303
|
}
|
|
297
304
|
declare class AutoSave {
|
|
298
305
|
private readonly store;
|
|
@@ -302,6 +309,7 @@ declare class AutoSave {
|
|
|
302
309
|
private readonly layerManager?;
|
|
303
310
|
private timerId;
|
|
304
311
|
private unsubscribers;
|
|
312
|
+
private readonly onError?;
|
|
305
313
|
constructor(store: ElementStore, camera: Camera, options?: AutoSaveOptions);
|
|
306
314
|
start(): void;
|
|
307
315
|
stop(): void;
|
|
@@ -423,7 +431,12 @@ declare class InputHandler {
|
|
|
423
431
|
private historyRecorder;
|
|
424
432
|
private historyStack;
|
|
425
433
|
private isToolActive;
|
|
434
|
+
private lastPointerEvent;
|
|
435
|
+
private readonly inputFilter;
|
|
436
|
+
private deferredDown;
|
|
426
437
|
private readonly abortController;
|
|
438
|
+
private clipboard;
|
|
439
|
+
private pasteCount;
|
|
427
440
|
constructor(element: HTMLElement, camera: Camera, options?: InputHandlerOptions);
|
|
428
441
|
setToolManager(toolManager: ToolManager, toolContext: ToolContext): void;
|
|
429
442
|
destroy(): void;
|
|
@@ -447,9 +460,48 @@ declare class InputHandler {
|
|
|
447
460
|
private deleteSelected;
|
|
448
461
|
private handleUndo;
|
|
449
462
|
private handleRedo;
|
|
463
|
+
private handleCopy;
|
|
464
|
+
private handlePaste;
|
|
450
465
|
private cancelToolIfActive;
|
|
451
466
|
}
|
|
452
467
|
|
|
468
|
+
type FilterAction = 'dispatch' | 'suppress' | 'defer';
|
|
469
|
+
interface FilteredEvent {
|
|
470
|
+
event: PointerEvent;
|
|
471
|
+
action: FilterAction;
|
|
472
|
+
}
|
|
473
|
+
interface FilteredUpEvent extends FilteredEvent {
|
|
474
|
+
pendingTap?: {
|
|
475
|
+
x: number;
|
|
476
|
+
y: number;
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
declare class InputFilter {
|
|
480
|
+
private activePenId;
|
|
481
|
+
private pendingTap;
|
|
482
|
+
static readonly MIN_MOVE_DISTANCE = 3;
|
|
483
|
+
filterDown(e: PointerEvent): FilteredEvent;
|
|
484
|
+
filterMove(e: PointerEvent): FilteredEvent;
|
|
485
|
+
filterUp(e: PointerEvent): FilteredUpEvent;
|
|
486
|
+
reset(): void;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
interface DoubleTapDetectorOptions {
|
|
490
|
+
timeout?: number;
|
|
491
|
+
maxDistance?: number;
|
|
492
|
+
}
|
|
493
|
+
declare class DoubleTapDetector {
|
|
494
|
+
private readonly timeout;
|
|
495
|
+
private readonly maxDistance;
|
|
496
|
+
private lastTapTime;
|
|
497
|
+
private lastTapX;
|
|
498
|
+
private lastTapY;
|
|
499
|
+
private hasPendingTap;
|
|
500
|
+
constructor(options?: DoubleTapDetectorOptions);
|
|
501
|
+
feed(e: PointerEvent): boolean;
|
|
502
|
+
reset(): void;
|
|
503
|
+
}
|
|
504
|
+
|
|
453
505
|
interface FontSizePreset {
|
|
454
506
|
label: string;
|
|
455
507
|
size: number;
|
|
@@ -526,6 +578,9 @@ declare class Viewport {
|
|
|
526
578
|
private readonly domNodeManager;
|
|
527
579
|
private readonly interactMode;
|
|
528
580
|
private readonly gridChangeListeners;
|
|
581
|
+
private readonly doubleTapDetector;
|
|
582
|
+
private tapDownX;
|
|
583
|
+
private tapDownY;
|
|
529
584
|
constructor(container: HTMLElement, options?: ViewportOptions);
|
|
530
585
|
get ctx(): CanvasRenderingContext2D | null;
|
|
531
586
|
get snapToGrid(): boolean;
|
|
@@ -569,7 +624,8 @@ declare class Viewport {
|
|
|
569
624
|
destroy(): void;
|
|
570
625
|
private startEditingElement;
|
|
571
626
|
private onTextEditStop;
|
|
572
|
-
private
|
|
627
|
+
private onTapDown;
|
|
628
|
+
private onDoubleTap;
|
|
573
629
|
private hitTestWorld;
|
|
574
630
|
stopInteracting(): void;
|
|
575
631
|
private onDragOver;
|
|
@@ -706,6 +762,7 @@ interface HtmlInput extends BaseDefaults {
|
|
|
706
762
|
position: Point;
|
|
707
763
|
size: Size;
|
|
708
764
|
domId?: string;
|
|
765
|
+
interactive?: boolean;
|
|
709
766
|
}
|
|
710
767
|
interface TextInput extends BaseDefaults {
|
|
711
768
|
position: Point;
|
|
@@ -772,6 +829,8 @@ declare function unbindArrow(arrow: ArrowElement, store: ElementStore): Partial<
|
|
|
772
829
|
declare function getElementBounds(element: CanvasElement): Bounds | null;
|
|
773
830
|
declare function boundsIntersect(a: Bounds, b: Bounds): boolean;
|
|
774
831
|
|
|
832
|
+
declare function getElementsBoundingBox(elements: CanvasElement[]): Bounds | null;
|
|
833
|
+
|
|
775
834
|
declare function getHexDistance(a: Point, b: Point, cellSize: number, orientation: HexOrientation): number;
|
|
776
835
|
declare function getHexCellsInRadius(center: Point, radiusCells: number, cellSize: number, orientation: HexOrientation): Point[];
|
|
777
836
|
declare function getHexCellsInCone(center: Point, angle: number, radiusCells: number, cellSize: number, orientation: HexOrientation): Point[];
|
|
@@ -874,7 +933,10 @@ declare class SelectTool implements Tool {
|
|
|
874
933
|
private lastWorld;
|
|
875
934
|
private currentWorld;
|
|
876
935
|
private ctx;
|
|
936
|
+
private pendingSingleSelectId;
|
|
937
|
+
private hasDragged;
|
|
877
938
|
get selectedIds(): string[];
|
|
939
|
+
setSelection(ids: string[]): void;
|
|
878
940
|
get isMarqueeActive(): boolean;
|
|
879
941
|
onActivate(ctx: ToolContext): void;
|
|
880
942
|
onDeactivate(ctx: ToolContext): void;
|
|
@@ -1119,6 +1181,6 @@ declare class UpdateLayerCommand implements Command {
|
|
|
1119
1181
|
undo(_store: ElementStore): void;
|
|
1120
1182
|
}
|
|
1121
1183
|
|
|
1122
|
-
declare const VERSION = "0.
|
|
1184
|
+
declare const VERSION = "0.14.0";
|
|
1123
1185
|
|
|
1124
|
-
export { type ActiveFormats, AddElementCommand, type ArrowElement, ArrowTool, type ArrowToolOptions, AutoSave, type AutoSaveOptions, Background, type BackgroundOptions, type BackgroundPattern, BatchCommand, type Binding, type Bounds, Camera, type CameraChangeInfo, type CameraOptions, type CanvasElement, type CanvasState, type Command, CreateLayerCommand, DEFAULT_FONT_SIZE_PRESETS, DEFAULT_NOTE_FONT_SIZE, ElementRenderer, ElementStore, type ElementType, type ElementUpdateEvent, EraserTool, type EraserToolOptions, EventBus, type ExportImageOptions, type FontSizePreset, type GridElement, type GridInfo, HandTool, type HexOrientation, HistoryRecorder, HistoryStack, type HistoryStackOptions, type HtmlElement, type ImageElement, ImageTool, type ImageToolOptions, InputHandler, type Layer, LayerManager, MeasureTool, type MeasureToolOptions, type Measurement, NoteEditor, type NoteEditorOptions, type NoteElement, NoteTool, type NoteToolOptions, NoteToolbar, PencilTool, type PencilToolOptions, type Point, type PointerState, Quadtree, RemoveElementCommand, RemoveLayerCommand, type RenderStatsSnapshot, SelectTool, type ShapeElement, type ShapeKind, ShapeTool, type ShapeToolOptions, type Size, type StrokeElement, type StrokePoint, type StyledRun, type TemplateElement, type TemplateShape, TemplateTool, type TemplateToolOptions, type TextElement, TextTool, type TextToolOptions, type Tool, type ToolContext, ToolManager, type ToolName, UpdateElementCommand, UpdateLayerCommand, VERSION, Viewport, type ViewportOptions, boundsIntersect, clearStaleBindings, createArrow, createGrid, createHtmlElement, createId, createImage, createNote, createShape, createStroke, createTemplate, createText, drawHexPath, exportImage, exportState, findBindTarget, findBoundArrows, getActiveFormats, getArrowBounds, getArrowControlPoint, getArrowMidpoint, getArrowTangentAngle, getBendFromPoint, getEdgeIntersection, getElementBounds, getElementCenter, getHexCellsInCone, getHexCellsInLine, getHexCellsInRadius, getHexCellsInSquare, getHexDistance, isBindable, isNearBezier, parseState, sanitizeNoteHtml, setFontSize, smartSnap, snapPoint, snapToHexCenter, toggleBold, toggleItalic, toggleStrikethrough, toggleUnderline, unbindArrow, updateBoundArrow };
|
|
1186
|
+
export { type ActiveFormats, AddElementCommand, type ArrowElement, ArrowTool, type ArrowToolOptions, AutoSave, type AutoSaveOptions, Background, type BackgroundOptions, type BackgroundPattern, BatchCommand, type Binding, type Bounds, Camera, type CameraChangeInfo, type CameraOptions, type CanvasElement, type CanvasState, type Command, CreateLayerCommand, DEFAULT_FONT_SIZE_PRESETS, DEFAULT_NOTE_FONT_SIZE, DoubleTapDetector, type DoubleTapDetectorOptions, ElementRenderer, ElementStore, type ElementType, type ElementUpdateEvent, EraserTool, type EraserToolOptions, EventBus, type ExportImageOptions, type FilterAction, type FilteredEvent, type FilteredUpEvent, type FontSizePreset, type GridElement, type GridInfo, HandTool, type HexOrientation, HistoryRecorder, HistoryStack, type HistoryStackOptions, type HtmlElement, type ImageElement, ImageTool, type ImageToolOptions, InputFilter, InputHandler, type Layer, LayerManager, MeasureTool, type MeasureToolOptions, type Measurement, NoteEditor, type NoteEditorOptions, type NoteElement, NoteTool, type NoteToolOptions, NoteToolbar, PencilTool, type PencilToolOptions, type Point, type PointerState, Quadtree, RemoveElementCommand, RemoveLayerCommand, type RenderStatsSnapshot, SelectTool, type ShapeElement, type ShapeKind, ShapeTool, type ShapeToolOptions, type Size, type StrokeElement, type StrokePoint, type StyledRun, type TemplateElement, type TemplateShape, TemplateTool, type TemplateToolOptions, type TextElement, TextTool, type TextToolOptions, type Tool, type ToolContext, ToolManager, type ToolName, UpdateElementCommand, UpdateLayerCommand, VERSION, Viewport, type ViewportOptions, boundsIntersect, clearStaleBindings, createArrow, createGrid, createHtmlElement, createId, createImage, createNote, createShape, createStroke, createTemplate, createText, drawHexPath, exportImage, exportState, findBindTarget, findBoundArrows, getActiveFormats, getArrowBounds, getArrowControlPoint, getArrowMidpoint, getArrowTangentAngle, getBendFromPoint, getEdgeIntersection, getElementBounds, getElementCenter, getElementsBoundingBox, getHexCellsInCone, getHexCellsInLine, getHexCellsInRadius, getHexCellsInSquare, getHexDistance, isBindable, isNearBezier, parseState, sanitizeNoteHtml, setFontSize, smartSnap, snapPoint, snapToHexCenter, toggleBold, toggleItalic, toggleStrikethrough, toggleUnderline, unbindArrow, updateBoundArrow };
|
package/dist/index.d.ts
CHANGED
|
@@ -85,6 +85,7 @@ interface HtmlElement extends BaseElement {
|
|
|
85
85
|
type: 'html';
|
|
86
86
|
size: Size;
|
|
87
87
|
domId?: string;
|
|
88
|
+
interactive?: boolean;
|
|
88
89
|
}
|
|
89
90
|
interface TextElement extends BaseElement {
|
|
90
91
|
type: 'text';
|
|
@@ -146,11 +147,12 @@ interface CanvasState {
|
|
|
146
147
|
};
|
|
147
148
|
elements: CanvasElement[];
|
|
148
149
|
layers?: Layer[];
|
|
150
|
+
activeLayerId?: string;
|
|
149
151
|
}
|
|
150
152
|
declare function exportState(elements: CanvasElement[], camera: {
|
|
151
153
|
position: Point;
|
|
152
154
|
zoom: number;
|
|
153
|
-
}, layers?: Layer[]): CanvasState;
|
|
155
|
+
}, layers?: Layer[], activeLayerId?: string): CanvasState;
|
|
154
156
|
declare function parseState(json: string): CanvasState;
|
|
155
157
|
|
|
156
158
|
interface CameraOptions {
|
|
@@ -178,6 +180,7 @@ declare class Camera {
|
|
|
178
180
|
screenToWorld(screen: Point): Point;
|
|
179
181
|
worldToScreen(world: Point): Point;
|
|
180
182
|
getVisibleRect(canvasWidth: number, canvasHeight: number): Bounds;
|
|
183
|
+
fitToContent(boundingBox: Bounds, canvasWidth: number, canvasHeight: number, padding?: number): void;
|
|
181
184
|
toCSSTransform(): string;
|
|
182
185
|
onChange(listener: (info: CameraChangeInfo) => void): () => void;
|
|
183
186
|
private notifyPan;
|
|
@@ -200,6 +203,7 @@ declare class ElementStore {
|
|
|
200
203
|
private bus;
|
|
201
204
|
private layerOrderMap;
|
|
202
205
|
private spatialIndex;
|
|
206
|
+
private sortedCache;
|
|
203
207
|
get count(): number;
|
|
204
208
|
setLayerOrder(order: Map<string, number>): void;
|
|
205
209
|
getAll(): CanvasElement[];
|
|
@@ -238,6 +242,8 @@ interface PointerState {
|
|
|
238
242
|
x: number;
|
|
239
243
|
y: number;
|
|
240
244
|
pressure: number;
|
|
245
|
+
pointerType: 'mouse' | 'touch' | 'pen';
|
|
246
|
+
shiftKey: boolean;
|
|
241
247
|
}
|
|
242
248
|
interface Tool {
|
|
243
249
|
readonly name: string;
|
|
@@ -293,6 +299,7 @@ interface AutoSaveOptions {
|
|
|
293
299
|
key?: string;
|
|
294
300
|
debounceMs?: number;
|
|
295
301
|
layerManager?: LayerManager;
|
|
302
|
+
onError?: (error: Error) => void;
|
|
296
303
|
}
|
|
297
304
|
declare class AutoSave {
|
|
298
305
|
private readonly store;
|
|
@@ -302,6 +309,7 @@ declare class AutoSave {
|
|
|
302
309
|
private readonly layerManager?;
|
|
303
310
|
private timerId;
|
|
304
311
|
private unsubscribers;
|
|
312
|
+
private readonly onError?;
|
|
305
313
|
constructor(store: ElementStore, camera: Camera, options?: AutoSaveOptions);
|
|
306
314
|
start(): void;
|
|
307
315
|
stop(): void;
|
|
@@ -423,7 +431,12 @@ declare class InputHandler {
|
|
|
423
431
|
private historyRecorder;
|
|
424
432
|
private historyStack;
|
|
425
433
|
private isToolActive;
|
|
434
|
+
private lastPointerEvent;
|
|
435
|
+
private readonly inputFilter;
|
|
436
|
+
private deferredDown;
|
|
426
437
|
private readonly abortController;
|
|
438
|
+
private clipboard;
|
|
439
|
+
private pasteCount;
|
|
427
440
|
constructor(element: HTMLElement, camera: Camera, options?: InputHandlerOptions);
|
|
428
441
|
setToolManager(toolManager: ToolManager, toolContext: ToolContext): void;
|
|
429
442
|
destroy(): void;
|
|
@@ -447,9 +460,48 @@ declare class InputHandler {
|
|
|
447
460
|
private deleteSelected;
|
|
448
461
|
private handleUndo;
|
|
449
462
|
private handleRedo;
|
|
463
|
+
private handleCopy;
|
|
464
|
+
private handlePaste;
|
|
450
465
|
private cancelToolIfActive;
|
|
451
466
|
}
|
|
452
467
|
|
|
468
|
+
type FilterAction = 'dispatch' | 'suppress' | 'defer';
|
|
469
|
+
interface FilteredEvent {
|
|
470
|
+
event: PointerEvent;
|
|
471
|
+
action: FilterAction;
|
|
472
|
+
}
|
|
473
|
+
interface FilteredUpEvent extends FilteredEvent {
|
|
474
|
+
pendingTap?: {
|
|
475
|
+
x: number;
|
|
476
|
+
y: number;
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
declare class InputFilter {
|
|
480
|
+
private activePenId;
|
|
481
|
+
private pendingTap;
|
|
482
|
+
static readonly MIN_MOVE_DISTANCE = 3;
|
|
483
|
+
filterDown(e: PointerEvent): FilteredEvent;
|
|
484
|
+
filterMove(e: PointerEvent): FilteredEvent;
|
|
485
|
+
filterUp(e: PointerEvent): FilteredUpEvent;
|
|
486
|
+
reset(): void;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
interface DoubleTapDetectorOptions {
|
|
490
|
+
timeout?: number;
|
|
491
|
+
maxDistance?: number;
|
|
492
|
+
}
|
|
493
|
+
declare class DoubleTapDetector {
|
|
494
|
+
private readonly timeout;
|
|
495
|
+
private readonly maxDistance;
|
|
496
|
+
private lastTapTime;
|
|
497
|
+
private lastTapX;
|
|
498
|
+
private lastTapY;
|
|
499
|
+
private hasPendingTap;
|
|
500
|
+
constructor(options?: DoubleTapDetectorOptions);
|
|
501
|
+
feed(e: PointerEvent): boolean;
|
|
502
|
+
reset(): void;
|
|
503
|
+
}
|
|
504
|
+
|
|
453
505
|
interface FontSizePreset {
|
|
454
506
|
label: string;
|
|
455
507
|
size: number;
|
|
@@ -526,6 +578,9 @@ declare class Viewport {
|
|
|
526
578
|
private readonly domNodeManager;
|
|
527
579
|
private readonly interactMode;
|
|
528
580
|
private readonly gridChangeListeners;
|
|
581
|
+
private readonly doubleTapDetector;
|
|
582
|
+
private tapDownX;
|
|
583
|
+
private tapDownY;
|
|
529
584
|
constructor(container: HTMLElement, options?: ViewportOptions);
|
|
530
585
|
get ctx(): CanvasRenderingContext2D | null;
|
|
531
586
|
get snapToGrid(): boolean;
|
|
@@ -569,7 +624,8 @@ declare class Viewport {
|
|
|
569
624
|
destroy(): void;
|
|
570
625
|
private startEditingElement;
|
|
571
626
|
private onTextEditStop;
|
|
572
|
-
private
|
|
627
|
+
private onTapDown;
|
|
628
|
+
private onDoubleTap;
|
|
573
629
|
private hitTestWorld;
|
|
574
630
|
stopInteracting(): void;
|
|
575
631
|
private onDragOver;
|
|
@@ -706,6 +762,7 @@ interface HtmlInput extends BaseDefaults {
|
|
|
706
762
|
position: Point;
|
|
707
763
|
size: Size;
|
|
708
764
|
domId?: string;
|
|
765
|
+
interactive?: boolean;
|
|
709
766
|
}
|
|
710
767
|
interface TextInput extends BaseDefaults {
|
|
711
768
|
position: Point;
|
|
@@ -772,6 +829,8 @@ declare function unbindArrow(arrow: ArrowElement, store: ElementStore): Partial<
|
|
|
772
829
|
declare function getElementBounds(element: CanvasElement): Bounds | null;
|
|
773
830
|
declare function boundsIntersect(a: Bounds, b: Bounds): boolean;
|
|
774
831
|
|
|
832
|
+
declare function getElementsBoundingBox(elements: CanvasElement[]): Bounds | null;
|
|
833
|
+
|
|
775
834
|
declare function getHexDistance(a: Point, b: Point, cellSize: number, orientation: HexOrientation): number;
|
|
776
835
|
declare function getHexCellsInRadius(center: Point, radiusCells: number, cellSize: number, orientation: HexOrientation): Point[];
|
|
777
836
|
declare function getHexCellsInCone(center: Point, angle: number, radiusCells: number, cellSize: number, orientation: HexOrientation): Point[];
|
|
@@ -874,7 +933,10 @@ declare class SelectTool implements Tool {
|
|
|
874
933
|
private lastWorld;
|
|
875
934
|
private currentWorld;
|
|
876
935
|
private ctx;
|
|
936
|
+
private pendingSingleSelectId;
|
|
937
|
+
private hasDragged;
|
|
877
938
|
get selectedIds(): string[];
|
|
939
|
+
setSelection(ids: string[]): void;
|
|
878
940
|
get isMarqueeActive(): boolean;
|
|
879
941
|
onActivate(ctx: ToolContext): void;
|
|
880
942
|
onDeactivate(ctx: ToolContext): void;
|
|
@@ -1119,6 +1181,6 @@ declare class UpdateLayerCommand implements Command {
|
|
|
1119
1181
|
undo(_store: ElementStore): void;
|
|
1120
1182
|
}
|
|
1121
1183
|
|
|
1122
|
-
declare const VERSION = "0.
|
|
1184
|
+
declare const VERSION = "0.14.0";
|
|
1123
1185
|
|
|
1124
|
-
export { type ActiveFormats, AddElementCommand, type ArrowElement, ArrowTool, type ArrowToolOptions, AutoSave, type AutoSaveOptions, Background, type BackgroundOptions, type BackgroundPattern, BatchCommand, type Binding, type Bounds, Camera, type CameraChangeInfo, type CameraOptions, type CanvasElement, type CanvasState, type Command, CreateLayerCommand, DEFAULT_FONT_SIZE_PRESETS, DEFAULT_NOTE_FONT_SIZE, ElementRenderer, ElementStore, type ElementType, type ElementUpdateEvent, EraserTool, type EraserToolOptions, EventBus, type ExportImageOptions, type FontSizePreset, type GridElement, type GridInfo, HandTool, type HexOrientation, HistoryRecorder, HistoryStack, type HistoryStackOptions, type HtmlElement, type ImageElement, ImageTool, type ImageToolOptions, InputHandler, type Layer, LayerManager, MeasureTool, type MeasureToolOptions, type Measurement, NoteEditor, type NoteEditorOptions, type NoteElement, NoteTool, type NoteToolOptions, NoteToolbar, PencilTool, type PencilToolOptions, type Point, type PointerState, Quadtree, RemoveElementCommand, RemoveLayerCommand, type RenderStatsSnapshot, SelectTool, type ShapeElement, type ShapeKind, ShapeTool, type ShapeToolOptions, type Size, type StrokeElement, type StrokePoint, type StyledRun, type TemplateElement, type TemplateShape, TemplateTool, type TemplateToolOptions, type TextElement, TextTool, type TextToolOptions, type Tool, type ToolContext, ToolManager, type ToolName, UpdateElementCommand, UpdateLayerCommand, VERSION, Viewport, type ViewportOptions, boundsIntersect, clearStaleBindings, createArrow, createGrid, createHtmlElement, createId, createImage, createNote, createShape, createStroke, createTemplate, createText, drawHexPath, exportImage, exportState, findBindTarget, findBoundArrows, getActiveFormats, getArrowBounds, getArrowControlPoint, getArrowMidpoint, getArrowTangentAngle, getBendFromPoint, getEdgeIntersection, getElementBounds, getElementCenter, getHexCellsInCone, getHexCellsInLine, getHexCellsInRadius, getHexCellsInSquare, getHexDistance, isBindable, isNearBezier, parseState, sanitizeNoteHtml, setFontSize, smartSnap, snapPoint, snapToHexCenter, toggleBold, toggleItalic, toggleStrikethrough, toggleUnderline, unbindArrow, updateBoundArrow };
|
|
1186
|
+
export { type ActiveFormats, AddElementCommand, type ArrowElement, ArrowTool, type ArrowToolOptions, AutoSave, type AutoSaveOptions, Background, type BackgroundOptions, type BackgroundPattern, BatchCommand, type Binding, type Bounds, Camera, type CameraChangeInfo, type CameraOptions, type CanvasElement, type CanvasState, type Command, CreateLayerCommand, DEFAULT_FONT_SIZE_PRESETS, DEFAULT_NOTE_FONT_SIZE, DoubleTapDetector, type DoubleTapDetectorOptions, ElementRenderer, ElementStore, type ElementType, type ElementUpdateEvent, EraserTool, type EraserToolOptions, EventBus, type ExportImageOptions, type FilterAction, type FilteredEvent, type FilteredUpEvent, type FontSizePreset, type GridElement, type GridInfo, HandTool, type HexOrientation, HistoryRecorder, HistoryStack, type HistoryStackOptions, type HtmlElement, type ImageElement, ImageTool, type ImageToolOptions, InputFilter, InputHandler, type Layer, LayerManager, MeasureTool, type MeasureToolOptions, type Measurement, NoteEditor, type NoteEditorOptions, type NoteElement, NoteTool, type NoteToolOptions, NoteToolbar, PencilTool, type PencilToolOptions, type Point, type PointerState, Quadtree, RemoveElementCommand, RemoveLayerCommand, type RenderStatsSnapshot, SelectTool, type ShapeElement, type ShapeKind, ShapeTool, type ShapeToolOptions, type Size, type StrokeElement, type StrokePoint, type StyledRun, type TemplateElement, type TemplateShape, TemplateTool, type TemplateToolOptions, type TextElement, TextTool, type TextToolOptions, type Tool, type ToolContext, ToolManager, type ToolName, UpdateElementCommand, UpdateLayerCommand, VERSION, Viewport, type ViewportOptions, boundsIntersect, clearStaleBindings, createArrow, createGrid, createHtmlElement, createId, createImage, createNote, createShape, createStroke, createTemplate, createText, drawHexPath, exportImage, exportState, findBindTarget, findBoundArrows, getActiveFormats, getArrowBounds, getArrowControlPoint, getArrowMidpoint, getArrowTangentAngle, getBendFromPoint, getEdgeIntersection, getElementBounds, getElementCenter, getElementsBoundingBox, getHexCellsInCone, getHexCellsInLine, getHexCellsInRadius, getHexCellsInSquare, getHexDistance, isBindable, isNearBezier, parseState, sanitizeNoteHtml, setFontSize, smartSnap, snapPoint, snapToHexCenter, toggleBold, toggleItalic, toggleStrikethrough, toggleUnderline, unbindArrow, updateBoundArrow };
|