@fieldnotes/core 0.38.1 → 0.38.2
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 +320 -252
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -9
- package/dist/index.d.ts +5 -9
- package/dist/index.js +320 -252
- 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,7 +481,7 @@ declare class Viewport {
|
|
|
478
481
|
private readonly interactMode;
|
|
479
482
|
private readonly onHtmlElementMount?;
|
|
480
483
|
private readonly dropHandler?;
|
|
481
|
-
private readonly
|
|
484
|
+
private readonly gridController;
|
|
482
485
|
private readonly doubleTapDetector;
|
|
483
486
|
private tapDownX;
|
|
484
487
|
private tapDownY;
|
|
@@ -556,8 +559,6 @@ declare class Viewport {
|
|
|
556
559
|
toggleLockSelection(): void;
|
|
557
560
|
alignSelection(edge: AlignEdge): void;
|
|
558
561
|
distributeSelection(axis: DistributeAxis): void;
|
|
559
|
-
private boundedSelection;
|
|
560
|
-
private isMovable;
|
|
561
562
|
getRenderStats(): RenderStatsSnapshot;
|
|
562
563
|
logPerformance(intervalMs?: number): () => void;
|
|
563
564
|
destroy(): void;
|
|
@@ -573,13 +574,8 @@ declare class Viewport {
|
|
|
573
574
|
private onDragOver;
|
|
574
575
|
private onDrop;
|
|
575
576
|
private unbindArrowsFrom;
|
|
576
|
-
private createWrapper;
|
|
577
|
-
private createCanvas;
|
|
578
|
-
private createDomLayer;
|
|
579
577
|
private applyCameraTransform;
|
|
580
578
|
private syncCanvasSize;
|
|
581
|
-
private syncGridContext;
|
|
582
|
-
private notifyGridChangeListeners;
|
|
583
579
|
private observeResize;
|
|
584
580
|
}
|
|
585
581
|
|
|
@@ -1009,6 +1005,6 @@ declare class TemplateTool implements Tool {
|
|
|
1009
1005
|
private notifyOptionsChange;
|
|
1010
1006
|
}
|
|
1011
1007
|
|
|
1012
|
-
declare const VERSION = "0.38.
|
|
1008
|
+
declare const VERSION = "0.38.2";
|
|
1013
1009
|
|
|
1014
1010
|
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,7 +481,7 @@ declare class Viewport {
|
|
|
478
481
|
private readonly interactMode;
|
|
479
482
|
private readonly onHtmlElementMount?;
|
|
480
483
|
private readonly dropHandler?;
|
|
481
|
-
private readonly
|
|
484
|
+
private readonly gridController;
|
|
482
485
|
private readonly doubleTapDetector;
|
|
483
486
|
private tapDownX;
|
|
484
487
|
private tapDownY;
|
|
@@ -556,8 +559,6 @@ declare class Viewport {
|
|
|
556
559
|
toggleLockSelection(): void;
|
|
557
560
|
alignSelection(edge: AlignEdge): void;
|
|
558
561
|
distributeSelection(axis: DistributeAxis): void;
|
|
559
|
-
private boundedSelection;
|
|
560
|
-
private isMovable;
|
|
561
562
|
getRenderStats(): RenderStatsSnapshot;
|
|
562
563
|
logPerformance(intervalMs?: number): () => void;
|
|
563
564
|
destroy(): void;
|
|
@@ -573,13 +574,8 @@ declare class Viewport {
|
|
|
573
574
|
private onDragOver;
|
|
574
575
|
private onDrop;
|
|
575
576
|
private unbindArrowsFrom;
|
|
576
|
-
private createWrapper;
|
|
577
|
-
private createCanvas;
|
|
578
|
-
private createDomLayer;
|
|
579
577
|
private applyCameraTransform;
|
|
580
578
|
private syncCanvasSize;
|
|
581
|
-
private syncGridContext;
|
|
582
|
-
private notifyGridChangeListeners;
|
|
583
579
|
private observeResize;
|
|
584
580
|
}
|
|
585
581
|
|
|
@@ -1009,6 +1005,6 @@ declare class TemplateTool implements Tool {
|
|
|
1009
1005
|
private notifyOptionsChange;
|
|
1010
1006
|
}
|
|
1011
1007
|
|
|
1012
|
-
declare const VERSION = "0.38.
|
|
1008
|
+
declare const VERSION = "0.38.2";
|
|
1013
1009
|
|
|
1014
1010
|
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 };
|