@fieldnotes/core 0.38.1 → 0.38.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +679 -587
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -22
- package/dist/index.d.ts +6 -22
- package/dist/index.js +679 -587
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -420,12 +420,14 @@ declare function getElementStyle(element: CanvasElement): ElementStyle;
|
|
|
420
420
|
|
|
421
421
|
type AlignEdge = 'left' | 'center-x' | 'right' | 'top' | 'middle' | 'bottom';
|
|
422
422
|
type DistributeAxis = 'horizontal' | 'vertical';
|
|
423
|
+
|
|
423
424
|
interface GridInfo {
|
|
424
425
|
gridType: 'square' | 'hex';
|
|
425
426
|
hexOrientation: 'pointy' | 'flat';
|
|
426
427
|
cellSize: number;
|
|
427
428
|
cellRadius: number;
|
|
428
429
|
}
|
|
430
|
+
|
|
429
431
|
interface ViewportOptions {
|
|
430
432
|
camera?: CameraOptions;
|
|
431
433
|
background?: BackgroundOptions;
|
|
@@ -467,6 +469,7 @@ declare class Viewport {
|
|
|
467
469
|
private readonly noteEditor;
|
|
468
470
|
private readonly arrowLabelEditor;
|
|
469
471
|
private readonly historyRecorder;
|
|
472
|
+
private readonly selectionOps;
|
|
470
473
|
readonly toolContext: ToolContext;
|
|
471
474
|
private readonly marginViewport;
|
|
472
475
|
private resizeObserver;
|
|
@@ -478,10 +481,8 @@ declare class Viewport {
|
|
|
478
481
|
private readonly interactMode;
|
|
479
482
|
private readonly onHtmlElementMount?;
|
|
480
483
|
private readonly dropHandler?;
|
|
481
|
-
private readonly
|
|
482
|
-
private readonly
|
|
483
|
-
private tapDownX;
|
|
484
|
-
private tapDownY;
|
|
484
|
+
private readonly gridController;
|
|
485
|
+
private readonly interactions;
|
|
485
486
|
private contextMenu;
|
|
486
487
|
constructor(container: HTMLElement, options?: ViewportOptions);
|
|
487
488
|
get ctx(): CanvasRenderingContext2D | null;
|
|
@@ -556,30 +557,13 @@ declare class Viewport {
|
|
|
556
557
|
toggleLockSelection(): void;
|
|
557
558
|
alignSelection(edge: AlignEdge): void;
|
|
558
559
|
distributeSelection(axis: DistributeAxis): void;
|
|
559
|
-
private boundedSelection;
|
|
560
|
-
private isMovable;
|
|
561
560
|
getRenderStats(): RenderStatsSnapshot;
|
|
562
561
|
logPerformance(intervalMs?: number): () => void;
|
|
563
562
|
destroy(): void;
|
|
564
|
-
private startEditingElement;
|
|
565
|
-
private fitNoteHeight;
|
|
566
|
-
private onTextEditStop;
|
|
567
|
-
private onTapDown;
|
|
568
|
-
private onDoubleTap;
|
|
569
|
-
private findArrowAt;
|
|
570
|
-
private startArrowLabelEdit;
|
|
571
|
-
private hitTestWorld;
|
|
572
563
|
stopInteracting(): void;
|
|
573
|
-
private onDragOver;
|
|
574
|
-
private onDrop;
|
|
575
564
|
private unbindArrowsFrom;
|
|
576
|
-
private createWrapper;
|
|
577
|
-
private createCanvas;
|
|
578
|
-
private createDomLayer;
|
|
579
565
|
private applyCameraTransform;
|
|
580
566
|
private syncCanvasSize;
|
|
581
|
-
private syncGridContext;
|
|
582
|
-
private notifyGridChangeListeners;
|
|
583
567
|
private observeResize;
|
|
584
568
|
}
|
|
585
569
|
|
|
@@ -1009,6 +993,6 @@ declare class TemplateTool implements Tool {
|
|
|
1009
993
|
private notifyOptionsChange;
|
|
1010
994
|
}
|
|
1011
995
|
|
|
1012
|
-
declare const VERSION = "0.38.
|
|
996
|
+
declare const VERSION = "0.38.3";
|
|
1013
997
|
|
|
1014
998
|
export { type ActiveFormats, type AlignEdge, 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, type DistributeAxis, ElementStore, type ElementStyle, 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, getElementStyle, getElementsBoundingBox, getHexCellsInCone, getHexCellsInLine, getHexCellsInRadius, getHexCellsInSquare, getHexDistance, isNearBezier, setFontSize, smartSnap, snapPoint, snapToHexCenter, styleToPatch, toggleBold, toggleItalic, toggleStrikethrough, toggleUnderline };
|
package/dist/index.d.ts
CHANGED
|
@@ -420,12 +420,14 @@ declare function getElementStyle(element: CanvasElement): ElementStyle;
|
|
|
420
420
|
|
|
421
421
|
type AlignEdge = 'left' | 'center-x' | 'right' | 'top' | 'middle' | 'bottom';
|
|
422
422
|
type DistributeAxis = 'horizontal' | 'vertical';
|
|
423
|
+
|
|
423
424
|
interface GridInfo {
|
|
424
425
|
gridType: 'square' | 'hex';
|
|
425
426
|
hexOrientation: 'pointy' | 'flat';
|
|
426
427
|
cellSize: number;
|
|
427
428
|
cellRadius: number;
|
|
428
429
|
}
|
|
430
|
+
|
|
429
431
|
interface ViewportOptions {
|
|
430
432
|
camera?: CameraOptions;
|
|
431
433
|
background?: BackgroundOptions;
|
|
@@ -467,6 +469,7 @@ declare class Viewport {
|
|
|
467
469
|
private readonly noteEditor;
|
|
468
470
|
private readonly arrowLabelEditor;
|
|
469
471
|
private readonly historyRecorder;
|
|
472
|
+
private readonly selectionOps;
|
|
470
473
|
readonly toolContext: ToolContext;
|
|
471
474
|
private readonly marginViewport;
|
|
472
475
|
private resizeObserver;
|
|
@@ -478,10 +481,8 @@ declare class Viewport {
|
|
|
478
481
|
private readonly interactMode;
|
|
479
482
|
private readonly onHtmlElementMount?;
|
|
480
483
|
private readonly dropHandler?;
|
|
481
|
-
private readonly
|
|
482
|
-
private readonly
|
|
483
|
-
private tapDownX;
|
|
484
|
-
private tapDownY;
|
|
484
|
+
private readonly gridController;
|
|
485
|
+
private readonly interactions;
|
|
485
486
|
private contextMenu;
|
|
486
487
|
constructor(container: HTMLElement, options?: ViewportOptions);
|
|
487
488
|
get ctx(): CanvasRenderingContext2D | null;
|
|
@@ -556,30 +557,13 @@ declare class Viewport {
|
|
|
556
557
|
toggleLockSelection(): void;
|
|
557
558
|
alignSelection(edge: AlignEdge): void;
|
|
558
559
|
distributeSelection(axis: DistributeAxis): void;
|
|
559
|
-
private boundedSelection;
|
|
560
|
-
private isMovable;
|
|
561
560
|
getRenderStats(): RenderStatsSnapshot;
|
|
562
561
|
logPerformance(intervalMs?: number): () => void;
|
|
563
562
|
destroy(): void;
|
|
564
|
-
private startEditingElement;
|
|
565
|
-
private fitNoteHeight;
|
|
566
|
-
private onTextEditStop;
|
|
567
|
-
private onTapDown;
|
|
568
|
-
private onDoubleTap;
|
|
569
|
-
private findArrowAt;
|
|
570
|
-
private startArrowLabelEdit;
|
|
571
|
-
private hitTestWorld;
|
|
572
563
|
stopInteracting(): void;
|
|
573
|
-
private onDragOver;
|
|
574
|
-
private onDrop;
|
|
575
564
|
private unbindArrowsFrom;
|
|
576
|
-
private createWrapper;
|
|
577
|
-
private createCanvas;
|
|
578
|
-
private createDomLayer;
|
|
579
565
|
private applyCameraTransform;
|
|
580
566
|
private syncCanvasSize;
|
|
581
|
-
private syncGridContext;
|
|
582
|
-
private notifyGridChangeListeners;
|
|
583
567
|
private observeResize;
|
|
584
568
|
}
|
|
585
569
|
|
|
@@ -1009,6 +993,6 @@ declare class TemplateTool implements Tool {
|
|
|
1009
993
|
private notifyOptionsChange;
|
|
1010
994
|
}
|
|
1011
995
|
|
|
1012
|
-
declare const VERSION = "0.38.
|
|
996
|
+
declare const VERSION = "0.38.3";
|
|
1013
997
|
|
|
1014
998
|
export { type ActiveFormats, type AlignEdge, 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, type DistributeAxis, ElementStore, type ElementStyle, 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, getElementStyle, getElementsBoundingBox, getHexCellsInCone, getHexCellsInLine, getHexCellsInRadius, getHexCellsInSquare, getHexDistance, isNearBezier, setFontSize, smartSnap, snapPoint, snapToHexCenter, styleToPatch, toggleBold, toggleItalic, toggleStrikethrough, toggleUnderline };
|