canvu-react 0.3.37 → 0.3.39

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,7 +2,7 @@ import * as react from 'react';
2
2
  import { CSSProperties, ReactNode, RefObject } from 'react';
3
3
  import { V as VectorSceneItem, R as Rect } from './types-Bnq2HtHQ.js';
4
4
  import { C as Camera2D } from './camera-AoTwBSoE.js';
5
- import { S as StrokeStyle, x as VectorViewportAssetStore } from './shape-builders-CsSXKCcs.js';
5
+ import { S as StrokeStyle, C as CanvuLinkData, E as VectorViewportAssetStore } from './shape-builders-C7bxJBGR.js';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
 
8
8
  type CanvuChromeActiveToolStyle = StrokeStyle & {
@@ -269,6 +269,15 @@ type VectorViewportProps = {
269
269
  selectedIds?: readonly string[];
270
270
  onSelectionChange?: (ids: string[]) => void;
271
271
  onItemsChange?: (items: VectorSceneItem[]) => void;
272
+ /**
273
+ * Fires when a link/bookmark item is activated (double-click / double-tap).
274
+ * When omitted, the link opens in a new browser tab by default (web only).
275
+ * Provide this to customize navigation (e.g. in-app preview, confirmation).
276
+ */
277
+ onActivateLink?: (detail: {
278
+ link: CanvuLinkData;
279
+ item: VectorSceneItem;
280
+ }) => void;
272
281
  /**
273
282
  * Fires on primary pointer down on the viewport in **world** coordinates.
274
283
  * Not called when `toolId` is `"hand"` (use that tool for panning).
@@ -2,7 +2,7 @@ import * as react from 'react';
2
2
  import { CSSProperties, ReactNode, RefObject } from 'react';
3
3
  import { V as VectorSceneItem, R as Rect } from './types-Bnq2HtHQ.cjs';
4
4
  import { C as Camera2D } from './camera-Di5R_Rwl.cjs';
5
- import { S as StrokeStyle, x as VectorViewportAssetStore } from './shape-builders-CsbSRZnQ.cjs';
5
+ import { S as StrokeStyle, C as CanvuLinkData, E as VectorViewportAssetStore } from './shape-builders-Dedcl6tw.cjs';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
 
8
8
  type CanvuChromeActiveToolStyle = StrokeStyle & {
@@ -269,6 +269,15 @@ type VectorViewportProps = {
269
269
  selectedIds?: readonly string[];
270
270
  onSelectionChange?: (ids: string[]) => void;
271
271
  onItemsChange?: (items: VectorSceneItem[]) => void;
272
+ /**
273
+ * Fires when a link/bookmark item is activated (double-click / double-tap).
274
+ * When omitted, the link opens in a new browser tab by default (web only).
275
+ * Provide this to customize navigation (e.g. in-app preview, confirmation).
276
+ */
277
+ onActivateLink?: (detail: {
278
+ link: CanvuLinkData;
279
+ item: VectorSceneItem;
280
+ }) => void;
272
281
  /**
273
282
  * Fires on primary pointer down on the viewport in **world** coordinates.
274
283
  * Not called when `toolId` is `"hand"` (use that tool for panning).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "canvu-react",
3
- "version": "0.3.37",
3
+ "version": "0.3.39",
4
4
  "description": "Vector-first infinite canvas (SVG) with pan, zoom, React bindings, and optional plugins",
5
5
  "license": "MIT",
6
6
  "type": "module",