@fieldnotes/core 0.8.11 → 0.10.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 +63 -9
- package/dist/index.cjs +1582 -199
- package/dist/index.d.cts +244 -65
- package/dist/index.d.ts +244 -65
- package/dist/index.js +1561 -199
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -59,6 +59,7 @@ interface NoteElement extends BaseElement {
|
|
|
59
59
|
text: string;
|
|
60
60
|
backgroundColor: string;
|
|
61
61
|
textColor: string;
|
|
62
|
+
fontSize?: number;
|
|
62
63
|
}
|
|
63
64
|
interface Binding {
|
|
64
65
|
elementId: string;
|
|
@@ -112,7 +113,20 @@ interface GridElement extends BaseElement {
|
|
|
112
113
|
strokeWidth: number;
|
|
113
114
|
opacity: number;
|
|
114
115
|
}
|
|
115
|
-
type
|
|
116
|
+
type TemplateShape = 'circle' | 'cone' | 'line' | 'square';
|
|
117
|
+
interface TemplateElement extends BaseElement {
|
|
118
|
+
type: 'template';
|
|
119
|
+
templateShape: TemplateShape;
|
|
120
|
+
radius: number;
|
|
121
|
+
angle: number;
|
|
122
|
+
fillColor: string;
|
|
123
|
+
strokeColor: string;
|
|
124
|
+
strokeWidth: number;
|
|
125
|
+
opacity: number;
|
|
126
|
+
feetPerCell?: number;
|
|
127
|
+
radiusFeet?: number;
|
|
128
|
+
}
|
|
129
|
+
type CanvasElement = StrokeElement | NoteElement | ArrowElement | ImageElement | HtmlElement | TextElement | ShapeElement | GridElement | TemplateElement;
|
|
116
130
|
type ElementType = CanvasElement['type'];
|
|
117
131
|
|
|
118
132
|
interface Layer {
|
|
@@ -139,7 +153,37 @@ declare function exportState(elements: CanvasElement[], camera: {
|
|
|
139
153
|
}, layers?: Layer[]): CanvasState;
|
|
140
154
|
declare function parseState(json: string): CanvasState;
|
|
141
155
|
|
|
142
|
-
|
|
156
|
+
interface CameraOptions {
|
|
157
|
+
minZoom?: number;
|
|
158
|
+
maxZoom?: number;
|
|
159
|
+
}
|
|
160
|
+
interface CameraChangeInfo {
|
|
161
|
+
panned: boolean;
|
|
162
|
+
zoomed: boolean;
|
|
163
|
+
}
|
|
164
|
+
declare class Camera {
|
|
165
|
+
private x;
|
|
166
|
+
private y;
|
|
167
|
+
private z;
|
|
168
|
+
private readonly minZoom;
|
|
169
|
+
private readonly maxZoom;
|
|
170
|
+
private changeListeners;
|
|
171
|
+
constructor(options?: CameraOptions);
|
|
172
|
+
get position(): Point;
|
|
173
|
+
get zoom(): number;
|
|
174
|
+
pan(dx: number, dy: number): void;
|
|
175
|
+
moveTo(x: number, y: number): void;
|
|
176
|
+
setZoom(level: number): void;
|
|
177
|
+
zoomAt(level: number, screenPoint: Point): void;
|
|
178
|
+
screenToWorld(screen: Point): Point;
|
|
179
|
+
worldToScreen(world: Point): Point;
|
|
180
|
+
getVisibleRect(canvasWidth: number, canvasHeight: number): Bounds;
|
|
181
|
+
toCSSTransform(): string;
|
|
182
|
+
onChange(listener: (info: CameraChangeInfo) => void): () => void;
|
|
183
|
+
private notifyPan;
|
|
184
|
+
private notifyZoom;
|
|
185
|
+
private notifyPanAndZoom;
|
|
186
|
+
}
|
|
143
187
|
|
|
144
188
|
interface ElementUpdateEvent {
|
|
145
189
|
previous: CanvasElement;
|
|
@@ -175,37 +219,44 @@ declare class ElementStore {
|
|
|
175
219
|
onChange(listener: () => void): () => void;
|
|
176
220
|
}
|
|
177
221
|
|
|
178
|
-
interface
|
|
179
|
-
|
|
180
|
-
|
|
222
|
+
interface ToolContext {
|
|
223
|
+
camera: Camera;
|
|
224
|
+
store: ElementStore;
|
|
225
|
+
requestRender: () => void;
|
|
226
|
+
switchTool?: (name: string) => void;
|
|
227
|
+
editElement?: (id: string) => void;
|
|
228
|
+
setCursor?: (cursor: string) => void;
|
|
229
|
+
snapToGrid?: boolean;
|
|
230
|
+
gridSize?: number;
|
|
231
|
+
gridType?: 'square' | 'hex';
|
|
232
|
+
hexOrientation?: HexOrientation;
|
|
233
|
+
activeLayerId?: string;
|
|
234
|
+
isLayerVisible?: (layerId: string) => boolean;
|
|
235
|
+
isLayerLocked?: (layerId: string) => boolean;
|
|
181
236
|
}
|
|
182
|
-
interface
|
|
183
|
-
|
|
184
|
-
|
|
237
|
+
interface PointerState {
|
|
238
|
+
x: number;
|
|
239
|
+
y: number;
|
|
240
|
+
pressure: number;
|
|
185
241
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
setZoom(level: number): void;
|
|
199
|
-
zoomAt(level: number, screenPoint: Point): void;
|
|
200
|
-
screenToWorld(screen: Point): Point;
|
|
201
|
-
worldToScreen(world: Point): Point;
|
|
202
|
-
getVisibleRect(canvasWidth: number, canvasHeight: number): Bounds;
|
|
203
|
-
toCSSTransform(): string;
|
|
204
|
-
onChange(listener: (info: CameraChangeInfo) => void): () => void;
|
|
205
|
-
private notifyPan;
|
|
206
|
-
private notifyZoom;
|
|
207
|
-
private notifyPanAndZoom;
|
|
242
|
+
interface Tool {
|
|
243
|
+
readonly name: string;
|
|
244
|
+
onPointerDown(state: PointerState, ctx: ToolContext): void;
|
|
245
|
+
onPointerMove(state: PointerState, ctx: ToolContext): void;
|
|
246
|
+
onPointerUp(state: PointerState, ctx: ToolContext): void;
|
|
247
|
+
onHover?(state: PointerState, ctx: ToolContext): void;
|
|
248
|
+
onActivate?(ctx: ToolContext): void;
|
|
249
|
+
onDeactivate?(ctx: ToolContext): void;
|
|
250
|
+
renderOverlay?(ctx: CanvasRenderingContext2D): void;
|
|
251
|
+
getOptions?(): object;
|
|
252
|
+
setOptions?(options: object): void;
|
|
253
|
+
onOptionsChange?(listener: () => void): () => void;
|
|
208
254
|
}
|
|
255
|
+
type ToolName = 'hand' | 'select' | 'pencil' | 'eraser' | 'arrow' | 'note' | 'image' | 'text' | 'shape' | 'measure' | 'template';
|
|
256
|
+
|
|
257
|
+
declare function snapPoint(point: Point, gridSize: number): Point;
|
|
258
|
+
declare function snapToHexCenter(point: Point, cellSize: number, orientation: HexOrientation): Point;
|
|
259
|
+
declare function smartSnap(point: Point, ctx: ToolContext): Point;
|
|
209
260
|
|
|
210
261
|
declare class LayerManager {
|
|
211
262
|
private readonly store;
|
|
@@ -290,39 +341,6 @@ declare class Background {
|
|
|
290
341
|
private renderGrid;
|
|
291
342
|
}
|
|
292
343
|
|
|
293
|
-
interface ToolContext {
|
|
294
|
-
camera: Camera;
|
|
295
|
-
store: ElementStore;
|
|
296
|
-
requestRender: () => void;
|
|
297
|
-
switchTool?: (name: string) => void;
|
|
298
|
-
editElement?: (id: string) => void;
|
|
299
|
-
setCursor?: (cursor: string) => void;
|
|
300
|
-
snapToGrid?: boolean;
|
|
301
|
-
gridSize?: number;
|
|
302
|
-
activeLayerId?: string;
|
|
303
|
-
isLayerVisible?: (layerId: string) => boolean;
|
|
304
|
-
isLayerLocked?: (layerId: string) => boolean;
|
|
305
|
-
}
|
|
306
|
-
interface PointerState {
|
|
307
|
-
x: number;
|
|
308
|
-
y: number;
|
|
309
|
-
pressure: number;
|
|
310
|
-
}
|
|
311
|
-
interface Tool {
|
|
312
|
-
readonly name: string;
|
|
313
|
-
onPointerDown(state: PointerState, ctx: ToolContext): void;
|
|
314
|
-
onPointerMove(state: PointerState, ctx: ToolContext): void;
|
|
315
|
-
onPointerUp(state: PointerState, ctx: ToolContext): void;
|
|
316
|
-
onHover?(state: PointerState, ctx: ToolContext): void;
|
|
317
|
-
onActivate?(ctx: ToolContext): void;
|
|
318
|
-
onDeactivate?(ctx: ToolContext): void;
|
|
319
|
-
renderOverlay?(ctx: CanvasRenderingContext2D): void;
|
|
320
|
-
getOptions?(): object;
|
|
321
|
-
setOptions?(options: object): void;
|
|
322
|
-
onOptionsChange?(listener: () => void): () => void;
|
|
323
|
-
}
|
|
324
|
-
type ToolName = 'hand' | 'select' | 'pencil' | 'eraser' | 'arrow' | 'note' | 'image' | 'text' | 'shape';
|
|
325
|
-
|
|
326
344
|
declare class ToolManager {
|
|
327
345
|
private tools;
|
|
328
346
|
private current;
|
|
@@ -432,6 +450,28 @@ declare class InputHandler {
|
|
|
432
450
|
private cancelToolIfActive;
|
|
433
451
|
}
|
|
434
452
|
|
|
453
|
+
interface FontSizePreset {
|
|
454
|
+
label: string;
|
|
455
|
+
size: number;
|
|
456
|
+
}
|
|
457
|
+
declare const DEFAULT_FONT_SIZE_PRESETS: FontSizePreset[];
|
|
458
|
+
declare class NoteToolbar {
|
|
459
|
+
private el;
|
|
460
|
+
private anchor;
|
|
461
|
+
private selectionListener;
|
|
462
|
+
private readonly fontSizePresets;
|
|
463
|
+
constructor(fontSizePresets?: FontSizePreset[]);
|
|
464
|
+
show(anchor: HTMLElement): void;
|
|
465
|
+
hide(): void;
|
|
466
|
+
getElement(): HTMLDivElement | null;
|
|
467
|
+
updatePosition(anchor: HTMLElement): void;
|
|
468
|
+
private createToolbarElement;
|
|
469
|
+
private createFormatButton;
|
|
470
|
+
private createFontSizeSelect;
|
|
471
|
+
private positionToolbar;
|
|
472
|
+
private updateActiveStates;
|
|
473
|
+
}
|
|
474
|
+
|
|
435
475
|
interface ExportImageOptions {
|
|
436
476
|
scale?: number;
|
|
437
477
|
padding?: number;
|
|
@@ -452,6 +492,8 @@ interface RenderStatsSnapshot {
|
|
|
452
492
|
interface ViewportOptions {
|
|
453
493
|
camera?: CameraOptions;
|
|
454
494
|
background?: BackgroundOptions;
|
|
495
|
+
fontSizePresets?: FontSizePreset[];
|
|
496
|
+
toolbar?: boolean;
|
|
455
497
|
}
|
|
456
498
|
declare class Viewport {
|
|
457
499
|
private readonly container;
|
|
@@ -529,6 +571,7 @@ declare class Viewport {
|
|
|
529
571
|
private createDomLayer;
|
|
530
572
|
private applyCameraTransform;
|
|
531
573
|
private syncCanvasSize;
|
|
574
|
+
private syncGridContext;
|
|
532
575
|
private observeResize;
|
|
533
576
|
}
|
|
534
577
|
|
|
@@ -554,11 +597,19 @@ declare class ElementRenderer {
|
|
|
554
597
|
private fillShapePath;
|
|
555
598
|
private strokeShapePath;
|
|
556
599
|
private renderGrid;
|
|
600
|
+
private renderTemplate;
|
|
601
|
+
private renderGeometricTemplate;
|
|
602
|
+
private renderHexTemplate;
|
|
603
|
+
private renderRadiusMarker;
|
|
557
604
|
private renderImage;
|
|
558
605
|
private getHexTile;
|
|
559
606
|
private getImage;
|
|
560
607
|
}
|
|
561
608
|
|
|
609
|
+
interface NoteEditorOptions {
|
|
610
|
+
fontSizePresets?: FontSizePreset[];
|
|
611
|
+
toolbar?: boolean;
|
|
612
|
+
}
|
|
562
613
|
declare class NoteEditor {
|
|
563
614
|
private editingId;
|
|
564
615
|
private editingNode;
|
|
@@ -567,17 +618,46 @@ declare class NoteEditor {
|
|
|
567
618
|
private pointerHandler;
|
|
568
619
|
private pendingEditId;
|
|
569
620
|
private onStopCallback;
|
|
621
|
+
private toolbar;
|
|
622
|
+
constructor(options?: NoteEditorOptions);
|
|
570
623
|
get isEditing(): boolean;
|
|
571
624
|
get editingElementId(): string | null;
|
|
572
625
|
setOnStop(callback: (elementId: string) => void): void;
|
|
573
626
|
startEditing(node: HTMLDivElement, elementId: string, store: ElementStore): void;
|
|
574
627
|
stopEditing(store: ElementStore): void;
|
|
575
628
|
destroy(store: ElementStore): void;
|
|
629
|
+
updateToolbarPosition(): void;
|
|
576
630
|
private activateEditing;
|
|
577
631
|
}
|
|
578
632
|
|
|
633
|
+
interface RunStyle {
|
|
634
|
+
bold: boolean;
|
|
635
|
+
italic: boolean;
|
|
636
|
+
underline: boolean;
|
|
637
|
+
strikethrough: boolean;
|
|
638
|
+
fontSize: number;
|
|
639
|
+
}
|
|
640
|
+
interface StyledRun extends RunStyle {
|
|
641
|
+
text: string;
|
|
642
|
+
}
|
|
643
|
+
declare function sanitizeNoteHtml(html: string): string;
|
|
644
|
+
|
|
645
|
+
interface ActiveFormats {
|
|
646
|
+
bold: boolean;
|
|
647
|
+
italic: boolean;
|
|
648
|
+
underline: boolean;
|
|
649
|
+
strikethrough: boolean;
|
|
650
|
+
}
|
|
651
|
+
declare function toggleBold(): void;
|
|
652
|
+
declare function toggleItalic(): void;
|
|
653
|
+
declare function toggleUnderline(): void;
|
|
654
|
+
declare function toggleStrikethrough(): void;
|
|
655
|
+
declare function setFontSize(size: number): void;
|
|
656
|
+
declare function getActiveFormats(): ActiveFormats;
|
|
657
|
+
|
|
579
658
|
declare function createId(prefix: string): string;
|
|
580
659
|
|
|
660
|
+
declare const DEFAULT_NOTE_FONT_SIZE = 18;
|
|
581
661
|
interface BaseDefaults {
|
|
582
662
|
position?: Point;
|
|
583
663
|
zIndex?: number;
|
|
@@ -596,6 +676,7 @@ interface NoteInput extends BaseDefaults {
|
|
|
596
676
|
text?: string;
|
|
597
677
|
backgroundColor?: string;
|
|
598
678
|
textColor?: string;
|
|
679
|
+
fontSize?: number;
|
|
599
680
|
}
|
|
600
681
|
interface ArrowInput extends BaseDefaults {
|
|
601
682
|
from: Point;
|
|
@@ -648,6 +729,19 @@ interface GridInput extends BaseDefaults {
|
|
|
648
729
|
}
|
|
649
730
|
declare function createGrid(input: GridInput): GridElement;
|
|
650
731
|
declare function createText(input: TextInput): TextElement;
|
|
732
|
+
interface TemplateInput extends BaseDefaults {
|
|
733
|
+
position: Point;
|
|
734
|
+
templateShape: TemplateShape;
|
|
735
|
+
radius: number;
|
|
736
|
+
angle?: number;
|
|
737
|
+
fillColor?: string;
|
|
738
|
+
strokeColor?: string;
|
|
739
|
+
strokeWidth?: number;
|
|
740
|
+
opacity?: number;
|
|
741
|
+
feetPerCell?: number;
|
|
742
|
+
radiusFeet?: number;
|
|
743
|
+
}
|
|
744
|
+
declare function createTemplate(input: TemplateInput): TemplateElement;
|
|
651
745
|
|
|
652
746
|
declare function getArrowControlPoint(from: Point, to: Point, bend: number): Point;
|
|
653
747
|
declare function getArrowMidpoint(from: Point, to: Point, bend: number): Point;
|
|
@@ -668,6 +762,13 @@ declare function unbindArrow(arrow: ArrowElement, store: ElementStore): Partial<
|
|
|
668
762
|
declare function getElementBounds(element: CanvasElement): Bounds | null;
|
|
669
763
|
declare function boundsIntersect(a: Bounds, b: Bounds): boolean;
|
|
670
764
|
|
|
765
|
+
declare function getHexDistance(a: Point, b: Point, cellSize: number, orientation: HexOrientation): number;
|
|
766
|
+
declare function getHexCellsInRadius(center: Point, radiusCells: number, cellSize: number, orientation: HexOrientation): Point[];
|
|
767
|
+
declare function getHexCellsInCone(center: Point, angle: number, radiusCells: number, cellSize: number, orientation: HexOrientation): Point[];
|
|
768
|
+
declare function getHexCellsInLine(center: Point, angle: number, radiusCells: number, cellSize: number, orientation: HexOrientation): Point[];
|
|
769
|
+
declare function getHexCellsInSquare(center: Point, radiusCells: number, cellSize: number, orientation: HexOrientation): Point[];
|
|
770
|
+
declare function drawHexPath(ctx: CanvasRenderingContext2D, cx: number, cy: number, cellSize: number, orientation: HexOrientation): void;
|
|
771
|
+
|
|
671
772
|
declare class AddElementCommand implements Command {
|
|
672
773
|
private readonly element;
|
|
673
774
|
constructor(element: CanvasElement);
|
|
@@ -780,6 +881,8 @@ declare class SelectTool implements Tool {
|
|
|
780
881
|
private renderMarquee;
|
|
781
882
|
private renderSelectionBoxes;
|
|
782
883
|
private renderBindingHighlights;
|
|
884
|
+
private hitTestTemplateResizeHandle;
|
|
885
|
+
private handleTemplateResize;
|
|
783
886
|
private getMarqueeRect;
|
|
784
887
|
private findElementsInRect;
|
|
785
888
|
private rectsOverlap;
|
|
@@ -818,12 +921,14 @@ interface NoteToolOptions {
|
|
|
818
921
|
backgroundColor?: string;
|
|
819
922
|
textColor?: string;
|
|
820
923
|
size?: Size;
|
|
924
|
+
fontSize?: number;
|
|
821
925
|
}
|
|
822
926
|
declare class NoteTool implements Tool {
|
|
823
927
|
readonly name = "note";
|
|
824
928
|
private backgroundColor;
|
|
825
929
|
private textColor;
|
|
826
930
|
private size;
|
|
931
|
+
private fontSize;
|
|
827
932
|
private optionListeners;
|
|
828
933
|
constructor(options?: NoteToolOptions);
|
|
829
934
|
getOptions(): NoteToolOptions;
|
|
@@ -906,6 +1011,80 @@ declare class ShapeTool implements Tool {
|
|
|
906
1011
|
private onKeyUp;
|
|
907
1012
|
}
|
|
908
1013
|
|
|
1014
|
+
interface MeasureToolOptions {
|
|
1015
|
+
feetPerCell?: number;
|
|
1016
|
+
}
|
|
1017
|
+
interface Measurement {
|
|
1018
|
+
start: Point;
|
|
1019
|
+
end: Point;
|
|
1020
|
+
worldDistance: number;
|
|
1021
|
+
cells: number;
|
|
1022
|
+
feet: number;
|
|
1023
|
+
}
|
|
1024
|
+
declare class MeasureTool implements Tool {
|
|
1025
|
+
readonly name = "measure";
|
|
1026
|
+
private start;
|
|
1027
|
+
private end;
|
|
1028
|
+
private gridSize;
|
|
1029
|
+
private gridType;
|
|
1030
|
+
private hexOrientation;
|
|
1031
|
+
private feetPerCell;
|
|
1032
|
+
private optionListeners;
|
|
1033
|
+
constructor(options?: MeasureToolOptions);
|
|
1034
|
+
getOptions(): MeasureToolOptions;
|
|
1035
|
+
setOptions(options: MeasureToolOptions): void;
|
|
1036
|
+
onOptionsChange(listener: () => void): () => void;
|
|
1037
|
+
onPointerDown(state: PointerState, ctx: ToolContext): void;
|
|
1038
|
+
onPointerMove(state: PointerState, ctx: ToolContext): void;
|
|
1039
|
+
onPointerUp(_state: PointerState, ctx: ToolContext): void;
|
|
1040
|
+
onDeactivate(_ctx: ToolContext): void;
|
|
1041
|
+
getMeasurement(): Measurement | null;
|
|
1042
|
+
renderOverlay(ctx: CanvasRenderingContext2D): void;
|
|
1043
|
+
private snapToGrid;
|
|
1044
|
+
private notifyOptionsChange;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
interface TemplateToolOptions {
|
|
1048
|
+
templateShape?: TemplateShape;
|
|
1049
|
+
fillColor?: string;
|
|
1050
|
+
strokeColor?: string;
|
|
1051
|
+
strokeWidth?: number;
|
|
1052
|
+
opacity?: number;
|
|
1053
|
+
feetPerCell?: number;
|
|
1054
|
+
}
|
|
1055
|
+
declare class TemplateTool implements Tool {
|
|
1056
|
+
readonly name = "template";
|
|
1057
|
+
private drawing;
|
|
1058
|
+
private origin;
|
|
1059
|
+
private current;
|
|
1060
|
+
private gridSize;
|
|
1061
|
+
private gridType;
|
|
1062
|
+
private hexOrientation;
|
|
1063
|
+
private snapEnabled;
|
|
1064
|
+
private templateShape;
|
|
1065
|
+
private fillColor;
|
|
1066
|
+
private strokeColor;
|
|
1067
|
+
private strokeWidth;
|
|
1068
|
+
private opacity;
|
|
1069
|
+
private feetPerCell;
|
|
1070
|
+
private optionListeners;
|
|
1071
|
+
constructor(options?: TemplateToolOptions);
|
|
1072
|
+
getOptions(): TemplateToolOptions;
|
|
1073
|
+
setOptions(options: TemplateToolOptions): void;
|
|
1074
|
+
onOptionsChange(listener: () => void): () => void;
|
|
1075
|
+
onPointerDown(state: PointerState, ctx: ToolContext): void;
|
|
1076
|
+
onPointerMove(state: PointerState, ctx: ToolContext): void;
|
|
1077
|
+
onPointerUp(_state: PointerState, ctx: ToolContext): void;
|
|
1078
|
+
onDeactivate(_ctx: ToolContext): void;
|
|
1079
|
+
renderOverlay(ctx: CanvasRenderingContext2D): void;
|
|
1080
|
+
private renderGeometricOverlay;
|
|
1081
|
+
private renderHexOverlay;
|
|
1082
|
+
private computeRadius;
|
|
1083
|
+
private computeAngle;
|
|
1084
|
+
private snapToGrid;
|
|
1085
|
+
private notifyOptionsChange;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
909
1088
|
declare class CreateLayerCommand implements Command {
|
|
910
1089
|
private readonly manager;
|
|
911
1090
|
private readonly layer;
|
|
@@ -930,6 +1109,6 @@ declare class UpdateLayerCommand implements Command {
|
|
|
930
1109
|
undo(_store: ElementStore): void;
|
|
931
1110
|
}
|
|
932
1111
|
|
|
933
|
-
declare const VERSION = "0.
|
|
1112
|
+
declare const VERSION = "0.10.0";
|
|
934
1113
|
|
|
935
|
-
export { 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, ElementRenderer, ElementStore, type ElementType, type ElementUpdateEvent, EraserTool, type EraserToolOptions, EventBus, type ExportImageOptions, type GridElement, HandTool, type HexOrientation, HistoryRecorder, HistoryStack, type HistoryStackOptions, type HtmlElement, type ImageElement, ImageTool, type ImageToolOptions, InputHandler, type Layer, LayerManager, NoteEditor, type NoteElement, NoteTool, type NoteToolOptions, 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 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, createText, exportImage, exportState, findBindTarget, findBoundArrows, getArrowBounds, getArrowControlPoint, getArrowMidpoint, getArrowTangentAngle, getBendFromPoint, getEdgeIntersection, getElementBounds, getElementCenter, isBindable, isNearBezier, parseState, snapPoint, unbindArrow, updateBoundArrow };
|
|
1114
|
+
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, 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 };
|