@fieldnotes/core 0.50.6 → 0.50.7
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 +7 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1123,6 +1123,6 @@ declare class LaserTool implements Tool {
|
|
|
1123
1123
|
private notifyOptionsChange;
|
|
1124
1124
|
}
|
|
1125
1125
|
|
|
1126
|
-
declare const VERSION = "0.50.
|
|
1126
|
+
declare const VERSION = "0.50.7";
|
|
1127
1127
|
|
|
1128
1128
|
export { type ActiveFormats, type AlignEdge, type ArrowElement, type ArrowStrokeStyle, 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, type ElementChangeMeta, ElementStore, type ElementStyle, type ElementType, type ElementUpdateEvent, EraserTool, type EraserToolOptions, type ExportImageOptions, type ExportSvgOptions, type FontSizePreset, type GridElement, type GridInfo, HandTool, type HexOrientation, HistoryStack, type HistoryStackOptions, type HtmlElement, type ImageElement, ImageTool, type ImageToolOptions, IndexedDBAdapter, type IndexedDBAdapterOptions, LaserTool, type LaserToolOptions, type Layer, LayerManager, LocalStorageAdapter, MeasureTool, type MeasureToolOptions, type Measurement, MemoryAdapter, type NoteElement, NoteTool, type NoteToolOptions, PencilTool, type PencilToolOptions, type Point, type PointerState, type RenderStatsSnapshot, type RotateDirection, SelectTool, type ShapeElement, type ShapeKind, ShapeTool, type ShapeToolOptions, type ShortcutBindings, type ShortcutOptions, type ShortcutsApi, type Size, type StorageAdapter, type StrokeElement, type StrokePoint, type TemplateElement, type TemplateRenderStyle, 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, exportSvg, getActiveFormats, getArrowBounds, getArrowControlPoint, getArrowMidpoint, getArrowTangentAngle, getBendFromPoint, getElementBounds, getElementStyle, getElementsBoundingBox, getHexCellsInCone, getHexCellsInLine, getHexCellsInRadius, getHexCellsInRectangle, getHexCellsInSquare, getHexDistance, isNearBezier, setFontSize, smartSnap, snapPoint, snapToHexCenter, styleToPatch, toggleBold, toggleItalic, toggleStrikethrough, toggleUnderline };
|
package/dist/index.d.ts
CHANGED
|
@@ -1123,6 +1123,6 @@ declare class LaserTool implements Tool {
|
|
|
1123
1123
|
private notifyOptionsChange;
|
|
1124
1124
|
}
|
|
1125
1125
|
|
|
1126
|
-
declare const VERSION = "0.50.
|
|
1126
|
+
declare const VERSION = "0.50.7";
|
|
1127
1127
|
|
|
1128
1128
|
export { type ActiveFormats, type AlignEdge, type ArrowElement, type ArrowStrokeStyle, 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, type ElementChangeMeta, ElementStore, type ElementStyle, type ElementType, type ElementUpdateEvent, EraserTool, type EraserToolOptions, type ExportImageOptions, type ExportSvgOptions, type FontSizePreset, type GridElement, type GridInfo, HandTool, type HexOrientation, HistoryStack, type HistoryStackOptions, type HtmlElement, type ImageElement, ImageTool, type ImageToolOptions, IndexedDBAdapter, type IndexedDBAdapterOptions, LaserTool, type LaserToolOptions, type Layer, LayerManager, LocalStorageAdapter, MeasureTool, type MeasureToolOptions, type Measurement, MemoryAdapter, type NoteElement, NoteTool, type NoteToolOptions, PencilTool, type PencilToolOptions, type Point, type PointerState, type RenderStatsSnapshot, type RotateDirection, SelectTool, type ShapeElement, type ShapeKind, ShapeTool, type ShapeToolOptions, type ShortcutBindings, type ShortcutOptions, type ShortcutsApi, type Size, type StorageAdapter, type StrokeElement, type StrokePoint, type TemplateElement, type TemplateRenderStyle, 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, exportSvg, getActiveFormats, getArrowBounds, getArrowControlPoint, getArrowMidpoint, getArrowTangentAngle, getBendFromPoint, getElementBounds, getElementStyle, getElementsBoundingBox, getHexCellsInCone, getHexCellsInLine, getHexCellsInRadius, getHexCellsInRectangle, getHexCellsInSquare, getHexDistance, isNearBezier, setFontSize, smartSnap, snapPoint, snapToHexCenter, styleToPatch, toggleBold, toggleItalic, toggleStrikethrough, toggleUnderline };
|
package/dist/index.js
CHANGED
|
@@ -6415,7 +6415,7 @@ var RenderLoop = class {
|
|
|
6415
6415
|
layerGroups = /* @__PURE__ */ new Map();
|
|
6416
6416
|
gridCacheCanvas = null;
|
|
6417
6417
|
gridCacheCtx = null;
|
|
6418
|
-
|
|
6418
|
+
lastGridRefs = [];
|
|
6419
6419
|
constructor(deps) {
|
|
6420
6420
|
this.canvasEl = deps.canvasEl;
|
|
6421
6421
|
this.camera = deps.camera;
|
|
@@ -6615,8 +6615,8 @@ var RenderLoop = class {
|
|
|
6615
6615
|
}
|
|
6616
6616
|
if (gridElements.length > 0) {
|
|
6617
6617
|
const gridT0 = performance.now();
|
|
6618
|
-
const
|
|
6619
|
-
const gridDirty = this.gridCacheDirty ||
|
|
6618
|
+
const gridsChanged = gridElements.length !== this.lastGridRefs.length || gridElements.some((grid, index) => grid !== this.lastGridRefs[index]);
|
|
6619
|
+
const gridDirty = this.gridCacheDirty || gridsChanged;
|
|
6620
6620
|
if (gridDirty) {
|
|
6621
6621
|
this.ensureGridCache();
|
|
6622
6622
|
if (this.gridCacheCtx && this.gridCacheCanvas) {
|
|
@@ -6644,7 +6644,7 @@ var RenderLoop = class {
|
|
|
6644
6644
|
}
|
|
6645
6645
|
}
|
|
6646
6646
|
this.gridCacheDirty = false;
|
|
6647
|
-
this.
|
|
6647
|
+
this.lastGridRefs = [...gridElements];
|
|
6648
6648
|
}
|
|
6649
6649
|
if (this.gridCacheCanvas) {
|
|
6650
6650
|
const offset = this.marginViewport.compositeOffset(
|
|
@@ -6664,6 +6664,8 @@ var RenderLoop = class {
|
|
|
6664
6664
|
}
|
|
6665
6665
|
}
|
|
6666
6666
|
gridMs = performance.now() - gridT0;
|
|
6667
|
+
} else {
|
|
6668
|
+
this.lastGridRefs = [];
|
|
6667
6669
|
}
|
|
6668
6670
|
const overlayT0 = performance.now();
|
|
6669
6671
|
const activeTool = this.toolManager.activeTool;
|
|
@@ -10637,7 +10639,7 @@ var LaserTool = class {
|
|
|
10637
10639
|
};
|
|
10638
10640
|
|
|
10639
10641
|
// src/index.ts
|
|
10640
|
-
var VERSION = "0.50.
|
|
10642
|
+
var VERSION = "0.50.7";
|
|
10641
10643
|
export {
|
|
10642
10644
|
ArrowTool,
|
|
10643
10645
|
AutoSave,
|