@mocanvas/editor 4.15.0 → 4.16.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.js CHANGED
@@ -2522,10 +2522,12 @@ var InstanceRecordType = createRecordType("instance", { scope: "session" }).with
2522
2522
  isFocusMode: false,
2523
2523
  isDebugMode: false,
2524
2524
  isToolLocked: false,
2525
- // On by default: a canvas is a drawing surface and the grid is how a
2526
- // person judges size and alignment on one. An app that wants a blank page
2527
- // sets it false on its instance record.
2528
- isGridMode: true,
2525
+ // Off by default, as tldraw has it. It was on, from a time when the grid
2526
+ // only drew dots and the choice cost nothing. Since 4.13.0 the grid also
2527
+ // moves and resizes in steps, so leaving it on handed that to every app
2528
+ // that had never asked for a grid — a consumer's boards snapped on the
2529
+ // first drag after an upgrade. An app that wants the grid turns it on.
2530
+ isGridMode: false,
2529
2531
  isReadonly: false,
2530
2532
  isFocused: false,
2531
2533
  isPenMode: false,
@@ -15462,7 +15464,7 @@ var OverlayShape = track$1(function OverlayShape2({
15462
15464
  const m = editor.getShapePageTransform(shape);
15463
15465
  const bounds = editor.getShapeGeometryBounds(shape);
15464
15466
  const asksForCamera = util.usesCameraCssVars?.(shape) === true;
15465
- const cameraRef = useCameraCssVarsOnShape(editor, asksForCamera);
15467
+ const cameraRef = useCameraCssVarsOnShape(editor, asksForCamera && !isRetained);
15466
15468
  const offset = clip ? `translate(${-clip[0]}px, ${-clip[1]}px) ` : "";
15467
15469
  const el = /* @__PURE__ */ jsx(
15468
15470
  "div",