canvu-react 0.4.47 → 0.4.49

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.
Files changed (51) hide show
  1. package/dist/{asset-hydration-Dc7fsnTG.d.ts → asset-hydration-BSjiek7Q.d.ts} +2 -2
  2. package/dist/{asset-hydration-Cy_2FyV5.d.cts → asset-hydration-F6aM5C7x.d.cts} +2 -2
  3. package/dist/{asset-store-TzOPvlgn.d.cts → asset-store-35ysK28r.d.cts} +1 -1
  4. package/dist/{asset-store-DQPRZEcy.d.ts → asset-store-D_FjW_CN.d.ts} +1 -1
  5. package/dist/chatbot.d.cts +6 -6
  6. package/dist/chatbot.d.ts +6 -6
  7. package/dist/index.cjs +49 -1
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.d.cts +53 -9
  10. package/dist/index.d.ts +53 -9
  11. package/dist/index.js +49 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/{link-item-DwzXOwU5.d.cts → link-item-BMV3VUCr.d.cts} +1 -1
  14. package/dist/{link-item-IW4GTnxl.d.ts → link-item-COoNNvCu.d.ts} +1 -1
  15. package/dist/native.cjs +59 -10
  16. package/dist/native.cjs.map +1 -1
  17. package/dist/native.d.cts +6 -6
  18. package/dist/native.d.ts +6 -6
  19. package/dist/native.js +59 -10
  20. package/dist/native.js.map +1 -1
  21. package/dist/react.cjs +259 -18
  22. package/dist/react.cjs.map +1 -1
  23. package/dist/react.d.cts +29 -13
  24. package/dist/react.d.ts +29 -13
  25. package/dist/react.js +259 -18
  26. package/dist/react.js.map +1 -1
  27. package/dist/realtime.cjs +3 -1
  28. package/dist/realtime.cjs.map +1 -1
  29. package/dist/realtime.d.cts +8 -8
  30. package/dist/realtime.d.ts +8 -8
  31. package/dist/realtime.js +3 -1
  32. package/dist/realtime.js.map +1 -1
  33. package/dist/realtimeNative.d.cts +4 -4
  34. package/dist/realtimeNative.d.ts +4 -4
  35. package/dist/{shape-builders-Cyh8zvDG.d.ts → shape-builders-BCOAG0pS.d.ts} +1 -1
  36. package/dist/{shape-builders-CKEMjivV.d.cts → shape-builders-BmLS8CNh.d.cts} +1 -1
  37. package/dist/tldraw.cjs +3 -1
  38. package/dist/tldraw.cjs.map +1 -1
  39. package/dist/tldraw.d.cts +1 -1
  40. package/dist/tldraw.d.ts +1 -1
  41. package/dist/tldraw.js +3 -1
  42. package/dist/tldraw.js.map +1 -1
  43. package/dist/{types-BUPc2Zgw.d.cts → types-6HszqSa5.d.cts} +1 -1
  44. package/dist/{types-B7xZAKVJ.d.ts → types-BAEHaIYO.d.ts} +43 -6
  45. package/dist/{types-B82WiQQh.d.ts → types-BMMPUak7.d.ts} +1 -1
  46. package/dist/{types-BQUbxMgz.d.cts → types-BOQLWyCw.d.cts} +1 -1
  47. package/dist/{types-CYtq9Pr9.d.ts → types-BtWbGOqh.d.ts} +1 -1
  48. package/dist/{types-BCCvY6ie.d.cts → types-fJNwEnHf.d.cts} +35 -1
  49. package/dist/{types-BCCvY6ie.d.ts → types-fJNwEnHf.d.ts} +35 -1
  50. package/dist/{types-C4wI3Jyc.d.cts → types-uzeExFkd.d.cts} +43 -6
  51. package/package.json +1 -1
@@ -1,13 +1,13 @@
1
- import { P as PlacementPreview, q as VectorViewportHandle, V as VectorToolDefinition, r as VectorViewportProps, C as CanvasPlugin, e as CanvasPluginRenderContext } from './types-C4wI3Jyc.cjs';
2
- import { a as RemotePresenceMarkupStroke, R as RemotePresencePeer, b as RemotePresenceCamera, c as RealtimeConnectionState } from './types-BQUbxMgz.cjs';
3
- export { P as PresenceOverlayRenderContext } from './types-BQUbxMgz.cjs';
1
+ import { P as PlacementPreview, r as VectorViewportHandle, V as VectorToolDefinition, s as VectorViewportProps, a as CanvasPlugin, f as CanvasPluginRenderContext } from './types-uzeExFkd.cjs';
2
+ import { a as RemotePresenceMarkupStroke, R as RemotePresencePeer, b as RemotePresenceCamera, c as RealtimeConnectionState } from './types-BOQLWyCw.cjs';
3
+ export { P as PresenceOverlayRenderContext } from './types-BOQLWyCw.cjs';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
- import { C as Camera2D } from './shape-builders-CKEMjivV.cjs';
6
- import { V as VectorSceneItem, R as Rect } from './types-BCCvY6ie.cjs';
5
+ import { C as Camera2D } from './shape-builders-BmLS8CNh.cjs';
6
+ import { V as VectorSceneItem, R as Rect } from './types-fJNwEnHf.cjs';
7
7
  import { ReactNode, RefObject } from 'react';
8
- import { a as VectorCanvasRemoteAdapter } from './types-BUPc2Zgw.cjs';
9
- import './link-item-DwzXOwU5.cjs';
10
- import './asset-store-TzOPvlgn.cjs';
8
+ import { a as VectorCanvasRemoteAdapter } from './types-6HszqSa5.cjs';
9
+ import './link-item-BMV3VUCr.cjs';
10
+ import './asset-store-35ysK28r.cjs';
11
11
 
12
12
  /**
13
13
  * Maps a local {@link PlacementPreview} stroke to {@link RemotePresenceMarkupStroke} for broadcasting.
@@ -1,13 +1,13 @@
1
- import { P as PlacementPreview, q as VectorViewportHandle, V as VectorToolDefinition, r as VectorViewportProps, C as CanvasPlugin, e as CanvasPluginRenderContext } from './types-B7xZAKVJ.js';
2
- import { a as RemotePresenceMarkupStroke, R as RemotePresencePeer, b as RemotePresenceCamera, c as RealtimeConnectionState } from './types-B82WiQQh.js';
3
- export { P as PresenceOverlayRenderContext } from './types-B82WiQQh.js';
1
+ import { P as PlacementPreview, r as VectorViewportHandle, V as VectorToolDefinition, s as VectorViewportProps, a as CanvasPlugin, f as CanvasPluginRenderContext } from './types-BAEHaIYO.js';
2
+ import { a as RemotePresenceMarkupStroke, R as RemotePresencePeer, b as RemotePresenceCamera, c as RealtimeConnectionState } from './types-BMMPUak7.js';
3
+ export { P as PresenceOverlayRenderContext } from './types-BMMPUak7.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
- import { C as Camera2D } from './shape-builders-Cyh8zvDG.js';
6
- import { V as VectorSceneItem, R as Rect } from './types-BCCvY6ie.js';
5
+ import { C as Camera2D } from './shape-builders-BCOAG0pS.js';
6
+ import { V as VectorSceneItem, R as Rect } from './types-fJNwEnHf.js';
7
7
  import { ReactNode, RefObject } from 'react';
8
- import { a as VectorCanvasRemoteAdapter } from './types-CYtq9Pr9.js';
9
- import './link-item-IW4GTnxl.js';
10
- import './asset-store-DQPRZEcy.js';
8
+ import { a as VectorCanvasRemoteAdapter } from './types-BtWbGOqh.js';
9
+ import './link-item-COoNNvCu.js';
10
+ import './asset-store-D_FjW_CN.js';
11
11
 
12
12
  /**
13
13
  * Maps a local {@link PlacementPreview} stroke to {@link RemotePresenceMarkupStroke} for broadcasting.
package/dist/realtime.js CHANGED
@@ -89,7 +89,7 @@ function buildCustomShapeChildrenSvg(inner, intrinsic, bounds) {
89
89
  const sy = b.height / intrinsic.height;
90
90
  return `<g transform="scale(${sx},${sy})">${inner}</g>`;
91
91
  }
92
- function createCustomShapeItem(id, bounds, content) {
92
+ function createCustomShapeItem(id, bounds, content, options = {}) {
93
93
  const r = normalizeRect(bounds);
94
94
  const intrinsic = { width: r.width, height: r.height };
95
95
  const inner = resolveCustomInner(content, intrinsic);
@@ -101,6 +101,8 @@ function createCustomShapeItem(id, bounds, content) {
101
101
  toolKind: "custom",
102
102
  customIntrinsicSize: intrinsic,
103
103
  customInnerSvg: inner,
104
+ ...options.resizeHandles !== void 0 ? { customResizeHandles: options.resizeHandles } : {},
105
+ ...options.svgClassName ? { svgClassName: options.svgClassName } : {},
104
106
  childrenSvg: buildCustomShapeChildrenSvg(inner, intrinsic, r)
105
107
  };
106
108
  }