@fieldnotes/core 0.43.0 → 0.44.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/dist/index.cjs CHANGED
@@ -3204,7 +3204,7 @@ function drawHexPath(ctx, cx, cy, cellSize, orientation) {
3204
3204
  // src/elements/renderers/template-renderer.ts
3205
3205
  function renderTemplate(ctx, template, store) {
3206
3206
  const grid = store?.getElementsByType("grid")[0];
3207
- if (grid && grid.gridType === "hex") {
3207
+ if (grid && grid.gridType === "hex" && template.renderStyle !== "geometric") {
3208
3208
  renderHexTemplate(ctx, template, grid.cellSize, grid.hexOrientation);
3209
3209
  return;
3210
3210
  }
@@ -3880,7 +3880,8 @@ function createTemplate(input) {
3880
3880
  strokeWidth: input.strokeWidth ?? 2,
3881
3881
  opacity: input.opacity ?? 0.6,
3882
3882
  feetPerCell: input.feetPerCell,
3883
- radiusFeet: input.radiusFeet
3883
+ radiusFeet: input.radiusFeet,
3884
+ ...input.renderStyle !== void 0 ? { renderStyle: input.renderStyle } : {}
3884
3885
  };
3885
3886
  }
3886
3887
 
@@ -9695,6 +9696,7 @@ var TemplateTool = class {
9695
9696
  strokeWidth;
9696
9697
  opacity;
9697
9698
  feetPerCell;
9699
+ renderStyle;
9698
9700
  optionListeners = /* @__PURE__ */ new Set();
9699
9701
  constructor(options = {}) {
9700
9702
  this.templateShape = options.templateShape ?? "circle";
@@ -9703,6 +9705,7 @@ var TemplateTool = class {
9703
9705
  this.strokeWidth = options.strokeWidth ?? 2;
9704
9706
  this.opacity = options.opacity ?? 0.6;
9705
9707
  this.feetPerCell = options.feetPerCell ?? 5;
9708
+ this.renderStyle = options.renderStyle ?? "cells";
9706
9709
  }
9707
9710
  getOptions() {
9708
9711
  return {
@@ -9711,7 +9714,8 @@ var TemplateTool = class {
9711
9714
  strokeColor: this.strokeColor,
9712
9715
  strokeWidth: this.strokeWidth,
9713
9716
  opacity: this.opacity,
9714
- feetPerCell: this.feetPerCell
9717
+ feetPerCell: this.feetPerCell,
9718
+ renderStyle: this.renderStyle
9715
9719
  };
9716
9720
  }
9717
9721
  setOptions(options) {
@@ -9721,6 +9725,7 @@ var TemplateTool = class {
9721
9725
  if (options.strokeWidth !== void 0) this.strokeWidth = options.strokeWidth;
9722
9726
  if (options.opacity !== void 0) this.opacity = options.opacity;
9723
9727
  if (options.feetPerCell !== void 0) this.feetPerCell = options.feetPerCell;
9728
+ if (options.renderStyle !== void 0) this.renderStyle = options.renderStyle;
9724
9729
  this.notifyOptionsChange();
9725
9730
  }
9726
9731
  onOptionsChange(listener) {
@@ -9763,6 +9768,7 @@ var TemplateTool = class {
9763
9768
  opacity: this.opacity,
9764
9769
  feetPerCell: this.feetPerCell,
9765
9770
  radiusFeet: radiusFeet > 0 ? radiusFeet : void 0,
9771
+ renderStyle: this.renderStyle,
9766
9772
  layerId: ctx.activeLayerId ?? ""
9767
9773
  });
9768
9774
  ctx.store.add(element);
@@ -9778,7 +9784,7 @@ var TemplateTool = class {
9778
9784
  if (!this.drawing) return;
9779
9785
  const radius = this.computeRadius();
9780
9786
  if (radius <= 0) return;
9781
- if (this.gridType === "hex" && this.hexOrientation) {
9787
+ if (this.gridType === "hex" && this.hexOrientation && this.renderStyle !== "geometric") {
9782
9788
  this.renderHexOverlay(ctx, radius);
9783
9789
  return;
9784
9790
  }
@@ -10051,7 +10057,7 @@ var LaserTool = class {
10051
10057
  };
10052
10058
 
10053
10059
  // src/index.ts
10054
- var VERSION = "0.43.0";
10060
+ var VERSION = "0.44.0";
10055
10061
  // Annotate the CommonJS export names for ESM import in node:
10056
10062
  0 && (module.exports = {
10057
10063
  ArrowTool,