canvu-react 0.4.36 → 0.4.38

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/native.d.cts CHANGED
@@ -226,13 +226,25 @@ type NativeLinkToolInsertOptions = {
226
226
  readonly id?: string;
227
227
  readonly bounds?: Rect;
228
228
  };
229
+ /**
230
+ * Copy used by the built-in native link dialog.
231
+ *
232
+ * Pass this only when you need localized or product-specific text. Omit it for
233
+ * the default plug-and-play `"link"` tool flow.
234
+ */
235
+ type NativeLinkToolDialogLabels = {
236
+ readonly title?: string;
237
+ readonly description?: string;
238
+ readonly inputPlaceholder?: string;
239
+ readonly cancelLabel?: string;
240
+ readonly addLabel?: string;
241
+ };
229
242
  /**
230
243
  * Detail passed when the built-in native `"link"` tool receives a tap.
231
244
  *
232
- * This is the high-level native integration point: show an app-native URL
233
- * dialog, then call {@link NativeLinkToolRequestDetail.insertLink} with the
234
- * submitted link metadata. Use `onWorldPointerDown` only for fully custom tools
235
- * or when you do not want canvu to insert the card.
245
+ * The default flow shows canvu's built-in URL dialog and inserts the card after
246
+ * submit. Use this detail only when overriding that dialog through
247
+ * `onLinkToolRequest`.
236
248
  *
237
249
  * @example
238
250
  * ```tsx
@@ -266,13 +278,14 @@ type NativeVectorViewportProps = {
266
278
  readonly onItemsChange?: (items: VectorSceneItem[]) => void;
267
279
  readonly onToolChangeRequest?: (toolId: string) => void;
268
280
  /**
269
- * Called after the built-in native `"link"` tool is tapped on the canvas.
281
+ * Optional override for the built-in native link dialog.
270
282
  *
271
- * Use this to open your app's native modal or sheet for URL entry. Call
272
- * `detail.insertLink(...)` after the user confirms to append and select the
273
- * link card at the tapped world point.
283
+ * Omit this for the plug-and-play first-party link tool. When supplied,
284
+ * canvu will not show its default dialog; your app is responsible for
285
+ * calling `detail.insertLink(...)`.
274
286
  */
275
287
  readonly onLinkToolRequest?: (detail: NativeLinkToolRequestDetail) => void;
288
+ readonly linkToolDialogLabels?: NativeLinkToolDialogLabels;
276
289
  readonly onWorldPointerDown?: (detail: NativeWorldPointerDownDetail) => void;
277
290
  readonly onWorldPointerMove?: (world: {
278
291
  readonly x: number;
@@ -360,6 +373,7 @@ type SvgPathNode = {
360
373
  readonly strokeOpacity?: number;
361
374
  readonly strokeLinecap?: string;
362
375
  readonly strokeLinejoin?: string;
376
+ readonly strokeDasharray?: string;
363
377
  readonly shapeRendering?: string;
364
378
  readonly vectorEffect?: string;
365
379
  };
@@ -419,4 +433,4 @@ type SvgNode = SvgRectNode | SvgEllipseNode | SvgCircleNode | SvgLineNode | SvgP
419
433
  */
420
434
  declare function parseSvgFragment(xml: string): SvgNode[];
421
435
 
422
- export { CanvuLinkData, DEFAULT_NATIVE_OVERFLOW_TOOL_IDS, DEFAULT_NATIVE_VECTOR_TOOLS, NATIVE_STYLE_PALETTE, type NativeCustomShapePlacementOptions, NativeInteractionOverlay, type NativeInteractionOverlayProps, type NativeLinkToolInsertOptions, type NativeLinkToolRequestDetail, NativeSceneRenderer, type NativeSceneRendererProps, NativeShapeRenderer, type NativeShapeRendererProps, type NativeStyleColor, NativeVectorStyleInspector, type NativeVectorStyleInspectorProps, type NativeVectorStyleToolId, type NativeVectorToolDefinition, NativeVectorToolbar, type NativeVectorToolbarDensity, type NativeVectorToolbarProps, type NativeVectorToolbarRenderOverflowInput, type NativeVectorToolbarRenderToolInput, type NativeVectorToolbarRenderToolLockInput, NativeVectorViewport, type NativeVectorViewportHandle, type NativeVectorViewportProps, type NativeWorldPointerDownDetail, type PlacementPreview, type SvgNode, VectorSceneItem, nativeStyleColorWithOpacity, normalizeNativeStyleHex, parseSvgFragment };
436
+ export { CanvuLinkData, DEFAULT_NATIVE_OVERFLOW_TOOL_IDS, DEFAULT_NATIVE_VECTOR_TOOLS, NATIVE_STYLE_PALETTE, type NativeCustomShapePlacementOptions, NativeInteractionOverlay, type NativeInteractionOverlayProps, type NativeLinkToolDialogLabels, type NativeLinkToolInsertOptions, type NativeLinkToolRequestDetail, NativeSceneRenderer, type NativeSceneRendererProps, NativeShapeRenderer, type NativeShapeRendererProps, type NativeStyleColor, NativeVectorStyleInspector, type NativeVectorStyleInspectorProps, type NativeVectorStyleToolId, type NativeVectorToolDefinition, NativeVectorToolbar, type NativeVectorToolbarDensity, type NativeVectorToolbarProps, type NativeVectorToolbarRenderOverflowInput, type NativeVectorToolbarRenderToolInput, type NativeVectorToolbarRenderToolLockInput, NativeVectorViewport, type NativeVectorViewportHandle, type NativeVectorViewportProps, type NativeWorldPointerDownDetail, type PlacementPreview, type SvgNode, VectorSceneItem, nativeStyleColorWithOpacity, normalizeNativeStyleHex, parseSvgFragment };
package/dist/native.d.ts CHANGED
@@ -226,13 +226,25 @@ type NativeLinkToolInsertOptions = {
226
226
  readonly id?: string;
227
227
  readonly bounds?: Rect;
228
228
  };
229
+ /**
230
+ * Copy used by the built-in native link dialog.
231
+ *
232
+ * Pass this only when you need localized or product-specific text. Omit it for
233
+ * the default plug-and-play `"link"` tool flow.
234
+ */
235
+ type NativeLinkToolDialogLabels = {
236
+ readonly title?: string;
237
+ readonly description?: string;
238
+ readonly inputPlaceholder?: string;
239
+ readonly cancelLabel?: string;
240
+ readonly addLabel?: string;
241
+ };
229
242
  /**
230
243
  * Detail passed when the built-in native `"link"` tool receives a tap.
231
244
  *
232
- * This is the high-level native integration point: show an app-native URL
233
- * dialog, then call {@link NativeLinkToolRequestDetail.insertLink} with the
234
- * submitted link metadata. Use `onWorldPointerDown` only for fully custom tools
235
- * or when you do not want canvu to insert the card.
245
+ * The default flow shows canvu's built-in URL dialog and inserts the card after
246
+ * submit. Use this detail only when overriding that dialog through
247
+ * `onLinkToolRequest`.
236
248
  *
237
249
  * @example
238
250
  * ```tsx
@@ -266,13 +278,14 @@ type NativeVectorViewportProps = {
266
278
  readonly onItemsChange?: (items: VectorSceneItem[]) => void;
267
279
  readonly onToolChangeRequest?: (toolId: string) => void;
268
280
  /**
269
- * Called after the built-in native `"link"` tool is tapped on the canvas.
281
+ * Optional override for the built-in native link dialog.
270
282
  *
271
- * Use this to open your app's native modal or sheet for URL entry. Call
272
- * `detail.insertLink(...)` after the user confirms to append and select the
273
- * link card at the tapped world point.
283
+ * Omit this for the plug-and-play first-party link tool. When supplied,
284
+ * canvu will not show its default dialog; your app is responsible for
285
+ * calling `detail.insertLink(...)`.
274
286
  */
275
287
  readonly onLinkToolRequest?: (detail: NativeLinkToolRequestDetail) => void;
288
+ readonly linkToolDialogLabels?: NativeLinkToolDialogLabels;
276
289
  readonly onWorldPointerDown?: (detail: NativeWorldPointerDownDetail) => void;
277
290
  readonly onWorldPointerMove?: (world: {
278
291
  readonly x: number;
@@ -360,6 +373,7 @@ type SvgPathNode = {
360
373
  readonly strokeOpacity?: number;
361
374
  readonly strokeLinecap?: string;
362
375
  readonly strokeLinejoin?: string;
376
+ readonly strokeDasharray?: string;
363
377
  readonly shapeRendering?: string;
364
378
  readonly vectorEffect?: string;
365
379
  };
@@ -419,4 +433,4 @@ type SvgNode = SvgRectNode | SvgEllipseNode | SvgCircleNode | SvgLineNode | SvgP
419
433
  */
420
434
  declare function parseSvgFragment(xml: string): SvgNode[];
421
435
 
422
- export { CanvuLinkData, DEFAULT_NATIVE_OVERFLOW_TOOL_IDS, DEFAULT_NATIVE_VECTOR_TOOLS, NATIVE_STYLE_PALETTE, type NativeCustomShapePlacementOptions, NativeInteractionOverlay, type NativeInteractionOverlayProps, type NativeLinkToolInsertOptions, type NativeLinkToolRequestDetail, NativeSceneRenderer, type NativeSceneRendererProps, NativeShapeRenderer, type NativeShapeRendererProps, type NativeStyleColor, NativeVectorStyleInspector, type NativeVectorStyleInspectorProps, type NativeVectorStyleToolId, type NativeVectorToolDefinition, NativeVectorToolbar, type NativeVectorToolbarDensity, type NativeVectorToolbarProps, type NativeVectorToolbarRenderOverflowInput, type NativeVectorToolbarRenderToolInput, type NativeVectorToolbarRenderToolLockInput, NativeVectorViewport, type NativeVectorViewportHandle, type NativeVectorViewportProps, type NativeWorldPointerDownDetail, type PlacementPreview, type SvgNode, VectorSceneItem, nativeStyleColorWithOpacity, normalizeNativeStyleHex, parseSvgFragment };
436
+ export { CanvuLinkData, DEFAULT_NATIVE_OVERFLOW_TOOL_IDS, DEFAULT_NATIVE_VECTOR_TOOLS, NATIVE_STYLE_PALETTE, type NativeCustomShapePlacementOptions, NativeInteractionOverlay, type NativeInteractionOverlayProps, type NativeLinkToolDialogLabels, type NativeLinkToolInsertOptions, type NativeLinkToolRequestDetail, NativeSceneRenderer, type NativeSceneRendererProps, NativeShapeRenderer, type NativeShapeRendererProps, type NativeStyleColor, NativeVectorStyleInspector, type NativeVectorStyleInspectorProps, type NativeVectorStyleToolId, type NativeVectorToolDefinition, NativeVectorToolbar, type NativeVectorToolbarDensity, type NativeVectorToolbarProps, type NativeVectorToolbarRenderOverflowInput, type NativeVectorToolbarRenderToolInput, type NativeVectorToolbarRenderToolLockInput, NativeVectorViewport, type NativeVectorViewportHandle, type NativeVectorViewportProps, type NativeWorldPointerDownDetail, type PlacementPreview, type SvgNode, VectorSceneItem, nativeStyleColorWithOpacity, normalizeNativeStyleHex, parseSvgFragment };