@fieldnotes/core 0.24.0 → 0.26.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/README.md +8 -1
- package/dist/index.cjs +779 -813
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -369
- package/dist/index.d.ts +40 -369
- package/dist/index.js +778 -781
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
type Listener<T> = (data: T) => void;
|
|
2
|
-
declare class EventBus<TEvents extends {
|
|
3
|
-
[K in keyof TEvents]: TEvents[K];
|
|
4
|
-
}> {
|
|
5
|
-
private listeners;
|
|
6
|
-
on<K extends keyof TEvents>(event: K, listener: Listener<TEvents[K]>): () => void;
|
|
7
|
-
off<K extends keyof TEvents>(event: K, listener: Listener<TEvents[K]>): void;
|
|
8
|
-
emit<K extends keyof TEvents>(event: K, data: TEvents[K]): void;
|
|
9
|
-
clear(): void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
1
|
interface Point {
|
|
13
2
|
x: number;
|
|
14
3
|
y: number;
|
|
@@ -24,20 +13,6 @@ interface Size {
|
|
|
24
13
|
}
|
|
25
14
|
type Bounds = Point & Size;
|
|
26
15
|
|
|
27
|
-
declare class Quadtree {
|
|
28
|
-
private root;
|
|
29
|
-
private _size;
|
|
30
|
-
private readonly worldBounds;
|
|
31
|
-
constructor(worldBounds: Bounds);
|
|
32
|
-
get size(): number;
|
|
33
|
-
insert(id: string, bounds: Bounds): void;
|
|
34
|
-
remove(id: string): void;
|
|
35
|
-
update(id: string, newBounds: Bounds): void;
|
|
36
|
-
query(rect: Bounds): string[];
|
|
37
|
-
queryPoint(point: Point): string[];
|
|
38
|
-
clear(): void;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
16
|
interface BaseElement {
|
|
42
17
|
id: string;
|
|
43
18
|
type: string;
|
|
@@ -130,31 +105,6 @@ interface TemplateElement extends BaseElement {
|
|
|
130
105
|
type CanvasElement = StrokeElement | NoteElement | ArrowElement | ImageElement | HtmlElement | TextElement | ShapeElement | GridElement | TemplateElement;
|
|
131
106
|
type ElementType = CanvasElement['type'];
|
|
132
107
|
|
|
133
|
-
interface Layer {
|
|
134
|
-
id: string;
|
|
135
|
-
name: string;
|
|
136
|
-
visible: boolean;
|
|
137
|
-
locked: boolean;
|
|
138
|
-
order: number;
|
|
139
|
-
opacity: number;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
interface CanvasState {
|
|
143
|
-
version: number;
|
|
144
|
-
camera: {
|
|
145
|
-
position: Point;
|
|
146
|
-
zoom: number;
|
|
147
|
-
};
|
|
148
|
-
elements: CanvasElement[];
|
|
149
|
-
layers?: Layer[];
|
|
150
|
-
activeLayerId?: string;
|
|
151
|
-
}
|
|
152
|
-
declare function exportState(elements: CanvasElement[], camera: {
|
|
153
|
-
position: Point;
|
|
154
|
-
zoom: number;
|
|
155
|
-
}, layers?: Layer[], activeLayerId?: string): CanvasState;
|
|
156
|
-
declare function parseState(json: string): CanvasState;
|
|
157
|
-
|
|
158
108
|
interface CameraOptions {
|
|
159
109
|
minZoom?: number;
|
|
160
110
|
maxZoom?: number;
|
|
@@ -235,6 +185,7 @@ interface ToolContext {
|
|
|
235
185
|
requestRender: () => void;
|
|
236
186
|
switchTool?: (name: string) => void;
|
|
237
187
|
editElement?: (id: string) => void;
|
|
188
|
+
fitNoteHeight?: (id: string) => void;
|
|
238
189
|
setCursor?: (cursor: string) => void;
|
|
239
190
|
snapToGrid?: boolean;
|
|
240
191
|
gridSize?: number;
|
|
@@ -270,6 +221,26 @@ declare function snapPoint(point: Point, gridSize: number): Point;
|
|
|
270
221
|
declare function snapToHexCenter(point: Point, cellSize: number, orientation: HexOrientation): Point;
|
|
271
222
|
declare function smartSnap(point: Point, ctx: ToolContext): Point;
|
|
272
223
|
|
|
224
|
+
interface Layer {
|
|
225
|
+
id: string;
|
|
226
|
+
name: string;
|
|
227
|
+
visible: boolean;
|
|
228
|
+
locked: boolean;
|
|
229
|
+
order: number;
|
|
230
|
+
opacity: number;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
interface CanvasState {
|
|
234
|
+
version: number;
|
|
235
|
+
camera: {
|
|
236
|
+
position: Point;
|
|
237
|
+
zoom: number;
|
|
238
|
+
};
|
|
239
|
+
elements: CanvasElement[];
|
|
240
|
+
layers?: Layer[];
|
|
241
|
+
activeLayerId?: string;
|
|
242
|
+
}
|
|
243
|
+
|
|
273
244
|
interface LayerManagerEvents {
|
|
274
245
|
change: null;
|
|
275
246
|
create: Layer;
|
|
@@ -343,25 +314,22 @@ interface BackgroundOptions {
|
|
|
343
314
|
dotRadius?: number;
|
|
344
315
|
lineWidth?: number;
|
|
345
316
|
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
private adaptSpacing;
|
|
363
|
-
private renderDots;
|
|
364
|
-
private renderGrid;
|
|
317
|
+
|
|
318
|
+
type ShortcutBindings = Record<string, string | string[] | null>;
|
|
319
|
+
interface ShortcutOptions {
|
|
320
|
+
scope?: 'focus' | 'window';
|
|
321
|
+
bindings?: ShortcutBindings;
|
|
322
|
+
}
|
|
323
|
+
interface ShortcutsApi {
|
|
324
|
+
rebind(action: string, bindings: string | string[] | null): void;
|
|
325
|
+
disable(action: string): void;
|
|
326
|
+
reset(action?: string): void;
|
|
327
|
+
getBindings(): Record<string, string[]>;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
interface FontSizePreset {
|
|
331
|
+
label: string;
|
|
332
|
+
size: number;
|
|
365
333
|
}
|
|
366
334
|
|
|
367
335
|
declare class ToolManager {
|
|
@@ -405,161 +373,6 @@ declare class HistoryStack {
|
|
|
405
373
|
private notifyChange;
|
|
406
374
|
}
|
|
407
375
|
|
|
408
|
-
declare class HistoryRecorder {
|
|
409
|
-
private readonly store;
|
|
410
|
-
private readonly stack;
|
|
411
|
-
private readonly layerManager?;
|
|
412
|
-
private recording;
|
|
413
|
-
private transaction;
|
|
414
|
-
private generation;
|
|
415
|
-
private updateSnapshots;
|
|
416
|
-
private unsubscribers;
|
|
417
|
-
constructor(store: ElementStore, stack: HistoryStack, layerManager?: LayerManager | undefined);
|
|
418
|
-
pause(): void;
|
|
419
|
-
resume(): void;
|
|
420
|
-
begin(): void;
|
|
421
|
-
get currentTransactionId(): number | null;
|
|
422
|
-
commit(): void;
|
|
423
|
-
rollback(): void;
|
|
424
|
-
destroy(): void;
|
|
425
|
-
private record;
|
|
426
|
-
private onAdd;
|
|
427
|
-
private onRemove;
|
|
428
|
-
private onUpdate;
|
|
429
|
-
private onLayerCreate;
|
|
430
|
-
private onLayerRemove;
|
|
431
|
-
private onLayerUpdate;
|
|
432
|
-
private flushUpdateSnapshots;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
type ShortcutBindings = Record<string, string | string[] | null>;
|
|
436
|
-
interface ShortcutOptions {
|
|
437
|
-
scope?: 'focus' | 'window';
|
|
438
|
-
bindings?: ShortcutBindings;
|
|
439
|
-
}
|
|
440
|
-
interface ShortcutsApi {
|
|
441
|
-
rebind(action: string, bindings: string | string[] | null): void;
|
|
442
|
-
disable(action: string): void;
|
|
443
|
-
reset(action?: string): void;
|
|
444
|
-
getBindings(): Record<string, string[]>;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
interface InputHandlerOptions {
|
|
448
|
-
toolManager?: ToolManager;
|
|
449
|
-
toolContext?: ToolContext;
|
|
450
|
-
historyRecorder?: HistoryRecorder;
|
|
451
|
-
historyStack?: HistoryStack;
|
|
452
|
-
fitToContent?: () => void;
|
|
453
|
-
shortcuts?: ShortcutOptions;
|
|
454
|
-
}
|
|
455
|
-
declare class InputHandler {
|
|
456
|
-
private readonly element;
|
|
457
|
-
private readonly camera;
|
|
458
|
-
private isPanning;
|
|
459
|
-
private lastPointer;
|
|
460
|
-
private spaceHeld;
|
|
461
|
-
private activePointers;
|
|
462
|
-
private lastPinchDistance;
|
|
463
|
-
private lastPinchCenter;
|
|
464
|
-
private toolManager;
|
|
465
|
-
private toolContext;
|
|
466
|
-
private historyRecorder;
|
|
467
|
-
private historyStack;
|
|
468
|
-
private isToolActive;
|
|
469
|
-
private lastPointerEvent;
|
|
470
|
-
private readonly inputFilter;
|
|
471
|
-
private deferredDown;
|
|
472
|
-
private readonly abortController;
|
|
473
|
-
private readonly actions;
|
|
474
|
-
private readonly shortcutMap;
|
|
475
|
-
private readonly scope;
|
|
476
|
-
constructor(element: HTMLElement, camera: Camera, options?: InputHandlerOptions);
|
|
477
|
-
setToolManager(toolManager: ToolManager, toolContext: ToolContext): void;
|
|
478
|
-
flushPendingHistory(): void;
|
|
479
|
-
get shortcuts(): ShortcutsApi;
|
|
480
|
-
destroy(): void;
|
|
481
|
-
private bind;
|
|
482
|
-
private onWheel;
|
|
483
|
-
private onPointerDown;
|
|
484
|
-
private onPointerMove;
|
|
485
|
-
private onPointerUp;
|
|
486
|
-
private onKeyDown;
|
|
487
|
-
private onKeyUp;
|
|
488
|
-
private runAction;
|
|
489
|
-
private startPinch;
|
|
490
|
-
private handlePinchMove;
|
|
491
|
-
private getPinchPoints;
|
|
492
|
-
private distance;
|
|
493
|
-
private midpoint;
|
|
494
|
-
private toPointerState;
|
|
495
|
-
private dispatchToolDown;
|
|
496
|
-
private dispatchToolMove;
|
|
497
|
-
private dispatchToolHover;
|
|
498
|
-
private dispatchToolUp;
|
|
499
|
-
private isInScope;
|
|
500
|
-
private focusSelf;
|
|
501
|
-
private cancelToolIfActive;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
type FilterAction = 'dispatch' | 'suppress' | 'defer';
|
|
505
|
-
interface FilteredEvent {
|
|
506
|
-
event: PointerEvent;
|
|
507
|
-
action: FilterAction;
|
|
508
|
-
}
|
|
509
|
-
interface FilteredUpEvent extends FilteredEvent {
|
|
510
|
-
pendingTap?: {
|
|
511
|
-
x: number;
|
|
512
|
-
y: number;
|
|
513
|
-
};
|
|
514
|
-
}
|
|
515
|
-
declare class InputFilter {
|
|
516
|
-
private activePenId;
|
|
517
|
-
private pendingTap;
|
|
518
|
-
static readonly MIN_MOVE_DISTANCE = 3;
|
|
519
|
-
filterDown(e: PointerEvent): FilteredEvent;
|
|
520
|
-
filterMove(e: PointerEvent): FilteredEvent;
|
|
521
|
-
filterUp(e: PointerEvent): FilteredUpEvent;
|
|
522
|
-
reset(): void;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
interface DoubleTapDetectorOptions {
|
|
526
|
-
timeout?: number;
|
|
527
|
-
maxDistance?: number;
|
|
528
|
-
}
|
|
529
|
-
declare class DoubleTapDetector {
|
|
530
|
-
private readonly timeout;
|
|
531
|
-
private readonly maxDistance;
|
|
532
|
-
private lastTapTime;
|
|
533
|
-
private lastTapX;
|
|
534
|
-
private lastTapY;
|
|
535
|
-
private hasPendingTap;
|
|
536
|
-
constructor(options?: DoubleTapDetectorOptions);
|
|
537
|
-
feed(e: PointerEvent): boolean;
|
|
538
|
-
reset(): void;
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
interface FontSizePreset {
|
|
542
|
-
label: string;
|
|
543
|
-
size: number;
|
|
544
|
-
}
|
|
545
|
-
declare const DEFAULT_FONT_SIZE_PRESETS: FontSizePreset[];
|
|
546
|
-
declare class NoteToolbar {
|
|
547
|
-
private el;
|
|
548
|
-
private anchor;
|
|
549
|
-
private selectionListener;
|
|
550
|
-
private readonly fontSizePresets;
|
|
551
|
-
constructor(fontSizePresets?: FontSizePreset[]);
|
|
552
|
-
show(anchor: HTMLElement): void;
|
|
553
|
-
hide(): void;
|
|
554
|
-
getElement(): HTMLDivElement | null;
|
|
555
|
-
updatePosition(anchor: HTMLElement): void;
|
|
556
|
-
private createToolbarElement;
|
|
557
|
-
private createFormatButton;
|
|
558
|
-
private createFontSizeSelect;
|
|
559
|
-
private positionToolbar;
|
|
560
|
-
private updateActiveStates;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
376
|
interface ExportImageOptions {
|
|
564
377
|
scale?: number;
|
|
565
378
|
padding?: number;
|
|
@@ -685,6 +498,7 @@ declare class Viewport {
|
|
|
685
498
|
logPerformance(intervalMs?: number): () => void;
|
|
686
499
|
destroy(): void;
|
|
687
500
|
private startEditingElement;
|
|
501
|
+
private fitNoteHeight;
|
|
688
502
|
private onTextEditStop;
|
|
689
503
|
private onTapDown;
|
|
690
504
|
private onDoubleTap;
|
|
@@ -703,87 +517,6 @@ declare class Viewport {
|
|
|
703
517
|
private observeResize;
|
|
704
518
|
}
|
|
705
519
|
|
|
706
|
-
declare class ElementRenderer {
|
|
707
|
-
private store;
|
|
708
|
-
private imageCache;
|
|
709
|
-
private onImageLoad;
|
|
710
|
-
private onImageError;
|
|
711
|
-
private camera;
|
|
712
|
-
private canvasSize;
|
|
713
|
-
private hexTileCache;
|
|
714
|
-
private hexTileCacheKey;
|
|
715
|
-
private gridBoundsOverride;
|
|
716
|
-
setStore(store: ElementStore): void;
|
|
717
|
-
setOnImageLoad(callback: () => void): void;
|
|
718
|
-
setOnImageError(callback: (src: string, cause?: unknown) => void): void;
|
|
719
|
-
setCamera(camera: Camera): void;
|
|
720
|
-
setCanvasSize(w: number, h: number): void;
|
|
721
|
-
setGridBoundsOverride(bounds: {
|
|
722
|
-
minX: number;
|
|
723
|
-
minY: number;
|
|
724
|
-
maxX: number;
|
|
725
|
-
maxY: number;
|
|
726
|
-
} | null): void;
|
|
727
|
-
isDomElement(element: CanvasElement): boolean;
|
|
728
|
-
renderCanvasElement(ctx: CanvasRenderingContext2D, element: CanvasElement): void;
|
|
729
|
-
private renderStroke;
|
|
730
|
-
private renderArrow;
|
|
731
|
-
private renderArrowhead;
|
|
732
|
-
private getVisualEndpoints;
|
|
733
|
-
private renderShape;
|
|
734
|
-
private fillShapePath;
|
|
735
|
-
private strokeShapePath;
|
|
736
|
-
private renderGrid;
|
|
737
|
-
private renderTemplate;
|
|
738
|
-
private renderGeometricTemplate;
|
|
739
|
-
private renderHexTemplate;
|
|
740
|
-
private renderRadiusMarker;
|
|
741
|
-
private renderImage;
|
|
742
|
-
private renderImagePlaceholder;
|
|
743
|
-
private getHexTile;
|
|
744
|
-
private getImage;
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
interface NoteEditorOptions {
|
|
748
|
-
fontSizePresets?: FontSizePreset[];
|
|
749
|
-
toolbar?: boolean;
|
|
750
|
-
placeholder?: string;
|
|
751
|
-
}
|
|
752
|
-
declare class NoteEditor {
|
|
753
|
-
private editingId;
|
|
754
|
-
private editingNode;
|
|
755
|
-
private blurHandler;
|
|
756
|
-
private keyHandler;
|
|
757
|
-
private pointerHandler;
|
|
758
|
-
private inputHandler;
|
|
759
|
-
private pendingEditId;
|
|
760
|
-
private onStopCallback;
|
|
761
|
-
private toolbar;
|
|
762
|
-
private readonly placeholder;
|
|
763
|
-
constructor(options?: NoteEditorOptions);
|
|
764
|
-
get isEditing(): boolean;
|
|
765
|
-
get editingElementId(): string | null;
|
|
766
|
-
setOnStop(callback: (elementId: string) => void): void;
|
|
767
|
-
startEditing(node: HTMLDivElement, elementId: string, store: ElementStore): void;
|
|
768
|
-
stopEditing(store: ElementStore): void;
|
|
769
|
-
destroy(store: ElementStore): void;
|
|
770
|
-
updateToolbarPosition(): void;
|
|
771
|
-
private activateEditing;
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
interface RunStyle {
|
|
775
|
-
bold: boolean;
|
|
776
|
-
italic: boolean;
|
|
777
|
-
underline: boolean;
|
|
778
|
-
strikethrough: boolean;
|
|
779
|
-
fontSize: number;
|
|
780
|
-
}
|
|
781
|
-
interface StyledRun extends RunStyle {
|
|
782
|
-
text: string;
|
|
783
|
-
}
|
|
784
|
-
declare function sanitizeNoteHtml(html: string): string;
|
|
785
|
-
declare function isNoteContentEmpty(html: string): boolean;
|
|
786
|
-
|
|
787
520
|
interface ActiveFormats {
|
|
788
521
|
bold: boolean;
|
|
789
522
|
italic: boolean;
|
|
@@ -797,8 +530,6 @@ declare function toggleStrikethrough(): void;
|
|
|
797
530
|
declare function setFontSize(size: number): void;
|
|
798
531
|
declare function getActiveFormats(): ActiveFormats;
|
|
799
532
|
|
|
800
|
-
declare function createId(prefix: string): string;
|
|
801
|
-
|
|
802
533
|
declare const DEFAULT_NOTE_FONT_SIZE = 18;
|
|
803
534
|
interface BaseDefaults {
|
|
804
535
|
position?: Point;
|
|
@@ -893,15 +624,6 @@ declare function getArrowTangentAngle(from: Point, to: Point, bend: number, t: n
|
|
|
893
624
|
declare function isNearBezier(point: Point, from: Point, to: Point, bend: number, threshold: number): boolean;
|
|
894
625
|
declare function getArrowBounds(from: Point, to: Point, bend: number): Bounds;
|
|
895
626
|
|
|
896
|
-
declare function isBindable(element: CanvasElement): boolean;
|
|
897
|
-
declare function getElementCenter(element: CanvasElement): Point;
|
|
898
|
-
declare function getEdgeIntersection(bounds: Bounds, outsidePoint: Point): Point;
|
|
899
|
-
declare function findBindTarget(point: Point, store: ElementStore, threshold: number, excludeId?: string, filter?: (el: CanvasElement) => boolean): CanvasElement | null;
|
|
900
|
-
declare function findBoundArrows(elementId: string, store: ElementStore): ArrowElement[];
|
|
901
|
-
declare function updateBoundArrow(arrow: ArrowElement, store: ElementStore): Partial<ArrowElement> | null;
|
|
902
|
-
declare function clearStaleBindings(arrow: ArrowElement, store: ElementStore): Partial<ArrowElement> | null;
|
|
903
|
-
declare function unbindArrow(arrow: ArrowElement, store: ElementStore): Partial<ArrowElement>;
|
|
904
|
-
|
|
905
627
|
declare function getElementBounds(element: CanvasElement): Bounds | null;
|
|
906
628
|
declare function boundsIntersect(a: Bounds, b: Bounds): boolean;
|
|
907
629
|
|
|
@@ -914,33 +636,6 @@ declare function getHexCellsInLine(center: Point, angle: number, radiusCells: nu
|
|
|
914
636
|
declare function getHexCellsInSquare(center: Point, radiusCells: number, cellSize: number, orientation: HexOrientation): Point[];
|
|
915
637
|
declare function drawHexPath(ctx: CanvasRenderingContext2D, cx: number, cy: number, cellSize: number, orientation: HexOrientation): void;
|
|
916
638
|
|
|
917
|
-
declare class AddElementCommand implements Command {
|
|
918
|
-
private readonly element;
|
|
919
|
-
constructor(element: CanvasElement);
|
|
920
|
-
execute(store: ElementStore): void;
|
|
921
|
-
undo(store: ElementStore): void;
|
|
922
|
-
}
|
|
923
|
-
declare class RemoveElementCommand implements Command {
|
|
924
|
-
private readonly element;
|
|
925
|
-
constructor(element: CanvasElement);
|
|
926
|
-
execute(store: ElementStore): void;
|
|
927
|
-
undo(store: ElementStore): void;
|
|
928
|
-
}
|
|
929
|
-
declare class UpdateElementCommand implements Command {
|
|
930
|
-
private readonly id;
|
|
931
|
-
private readonly previous;
|
|
932
|
-
private readonly current;
|
|
933
|
-
constructor(id: string, previous: CanvasElement, current: CanvasElement);
|
|
934
|
-
execute(store: ElementStore): void;
|
|
935
|
-
undo(store: ElementStore): void;
|
|
936
|
-
}
|
|
937
|
-
declare class BatchCommand implements Command {
|
|
938
|
-
readonly commands: readonly Command[];
|
|
939
|
-
constructor(commands: Command[]);
|
|
940
|
-
execute(store: ElementStore): void;
|
|
941
|
-
undo(store: ElementStore): void;
|
|
942
|
-
}
|
|
943
|
-
|
|
944
639
|
declare class HandTool implements Tool {
|
|
945
640
|
readonly name = "hand";
|
|
946
641
|
private panning;
|
|
@@ -1238,30 +933,6 @@ declare class TemplateTool implements Tool {
|
|
|
1238
933
|
private notifyOptionsChange;
|
|
1239
934
|
}
|
|
1240
935
|
|
|
1241
|
-
declare
|
|
1242
|
-
private readonly manager;
|
|
1243
|
-
private readonly layer;
|
|
1244
|
-
constructor(manager: LayerManager, layer: Layer);
|
|
1245
|
-
execute(_store: ElementStore): void;
|
|
1246
|
-
undo(_store: ElementStore): void;
|
|
1247
|
-
}
|
|
1248
|
-
declare class RemoveLayerCommand implements Command {
|
|
1249
|
-
private readonly manager;
|
|
1250
|
-
private readonly layer;
|
|
1251
|
-
constructor(manager: LayerManager, layer: Layer);
|
|
1252
|
-
execute(_store: ElementStore): void;
|
|
1253
|
-
undo(_store: ElementStore): void;
|
|
1254
|
-
}
|
|
1255
|
-
declare class UpdateLayerCommand implements Command {
|
|
1256
|
-
private readonly manager;
|
|
1257
|
-
private readonly layerId;
|
|
1258
|
-
private readonly previous;
|
|
1259
|
-
private readonly current;
|
|
1260
|
-
constructor(manager: LayerManager, layerId: string, previous: Layer, current: Layer);
|
|
1261
|
-
execute(_store: ElementStore): void;
|
|
1262
|
-
undo(_store: ElementStore): void;
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
declare const VERSION = "0.24.0";
|
|
936
|
+
declare const VERSION = "0.26.0";
|
|
1266
937
|
|
|
1267
|
-
export { type ActiveFormats,
|
|
938
|
+
export { type ActiveFormats, type ArrowElement, ArrowTool, type ArrowToolOptions, AutoSave, type AutoSaveOptions, type BackgroundOptions, type BackgroundPattern, type Binding, type Bounds, Camera, type CameraChangeInfo, type CameraOptions, type CanvasElement, type CanvasState, type Command, DEFAULT_NOTE_FONT_SIZE, ElementStore, type ElementType, type ElementUpdateEvent, EraserTool, type EraserToolOptions, type ExportImageOptions, type FontSizePreset, type GridElement, type GridInfo, HandTool, type HexOrientation, HistoryStack, type HistoryStackOptions, type HtmlElement, type ImageElement, ImageTool, type ImageToolOptions, type Layer, LayerManager, MeasureTool, type MeasureToolOptions, type Measurement, type NoteElement, NoteTool, type NoteToolOptions, PencilTool, type PencilToolOptions, type Point, type PointerState, type RenderStatsSnapshot, SelectTool, type ShapeElement, type ShapeKind, ShapeTool, type ShapeToolOptions, type ShortcutBindings, type ShortcutOptions, type ShortcutsApi, type Size, type StrokeElement, type StrokePoint, type TemplateElement, type TemplateShape, TemplateTool, type TemplateToolOptions, type TextElement, TextTool, type TextToolOptions, type Tool, type ToolContext, ToolManager, type ToolName, VERSION, Viewport, type ViewportOptions, boundsIntersect, createArrow, createGrid, createHtmlElement, createImage, createNote, createShape, createStroke, createTemplate, createText, drawHexPath, exportImage, getActiveFormats, getArrowBounds, getArrowControlPoint, getArrowMidpoint, getArrowTangentAngle, getBendFromPoint, getElementBounds, getElementsBoundingBox, getHexCellsInCone, getHexCellsInLine, getHexCellsInRadius, getHexCellsInSquare, getHexDistance, isNearBezier, setFontSize, smartSnap, snapPoint, snapToHexCenter, toggleBold, toggleItalic, toggleStrikethrough, toggleUnderline };
|