canvu-react 0.4.67 → 0.4.68

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.
@@ -2,8 +2,8 @@ import * as react from 'react';
2
2
  import { CSSProperties, ReactNode, RefObject } from 'react';
3
3
  import { V as VectorSceneItem, R as Rect } from './types-fJNwEnHf.js';
4
4
  import { S as StrokeStyle, C as Camera2D } from './shape-builders-xG3A66sv.js';
5
+ import { a as VectorViewportAssetStore, R as RasterImageCanvasRenderingOptions } from './raster-image-canvas-BZh73aoc.js';
5
6
  import { C as CanvuLinkData } from './link-item-COoNNvCu.js';
6
- import { a as VectorViewportAssetStore } from './asset-store-D_FjW_CN.js';
7
7
  import { R as RemotePresencePeer, P as PresenceOverlayRenderContext } from './types-BXa2CIrc.js';
8
8
  import * as react_jsx_runtime from 'react/jsx-runtime';
9
9
 
@@ -704,6 +704,17 @@ type VectorViewportProps = {
704
704
  * canvu's native file tool.
705
705
  */
706
706
  assetStore?: VectorViewportAssetStore;
707
+ /**
708
+ * Optional canvas-backed raster rendering for image items.
709
+ *
710
+ * Use this for large PDF/page images where the item SVG should stay stable while
711
+ * the viewport progressively redraws a sharper bitmap as users zoom in. The
712
+ * original SVG `<image>` remains as the fallback while the canvas target loads.
713
+ *
714
+ * Provide `resolveRenderTarget` when your app has a resize/proxy image endpoint;
715
+ * it receives the target pixel size and can return the URL that best matches it.
716
+ */
717
+ imageCanvasRendering?: RasterImageCanvasRenderingOptions | null;
707
718
  /**
708
719
  * When false (default), finishing a draw/place/erase gesture requests switching back to `autoResetToolTo`.
709
720
  * Use with controlled tool state (`onToolChangeRequest`) to keep "select-after-use" behavior.
@@ -2,8 +2,8 @@ import * as react from 'react';
2
2
  import { CSSProperties, ReactNode, RefObject } from 'react';
3
3
  import { V as VectorSceneItem, R as Rect } from './types-fJNwEnHf.cjs';
4
4
  import { S as StrokeStyle, C as Camera2D } from './shape-builders-DzhCOuzo.cjs';
5
+ import { a as VectorViewportAssetStore, R as RasterImageCanvasRenderingOptions } from './raster-image-canvas-zerVYllB.cjs';
5
6
  import { C as CanvuLinkData } from './link-item-BMV3VUCr.cjs';
6
- import { a as VectorViewportAssetStore } from './asset-store-35ysK28r.cjs';
7
7
  import { R as RemotePresencePeer, P as PresenceOverlayRenderContext } from './types-DqsqQQVf.cjs';
8
8
  import * as react_jsx_runtime from 'react/jsx-runtime';
9
9
 
@@ -704,6 +704,17 @@ type VectorViewportProps = {
704
704
  * canvu's native file tool.
705
705
  */
706
706
  assetStore?: VectorViewportAssetStore;
707
+ /**
708
+ * Optional canvas-backed raster rendering for image items.
709
+ *
710
+ * Use this for large PDF/page images where the item SVG should stay stable while
711
+ * the viewport progressively redraws a sharper bitmap as users zoom in. The
712
+ * original SVG `<image>` remains as the fallback while the canvas target loads.
713
+ *
714
+ * Provide `resolveRenderTarget` when your app has a resize/proxy image endpoint;
715
+ * it receives the target pixel size and can return the URL that best matches it.
716
+ */
717
+ imageCanvasRendering?: RasterImageCanvasRenderingOptions | null;
707
718
  /**
708
719
  * When false (default), finishing a draw/place/erase gesture requests switching back to `autoResetToolTo`.
709
720
  * Use with controlled tool state (`onToolChangeRequest`) to keep "select-after-use" behavior.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "canvu-react",
3
- "version": "0.4.67",
3
+ "version": "0.4.68",
4
4
  "description": "Vector-first infinite canvas (SVG) with pan, zoom, React bindings, and optional plugins",
5
5
  "license": "MIT",
6
6
  "type": "module",