canvu-react 0.3.38 → 0.3.40
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/{asset-hydration-EtEuBwb7.d.cts → asset-hydration-B7yMDQE-.d.cts} +2 -2
- package/dist/{asset-hydration-DrTOgDdd.d.ts → asset-hydration-CbwQVAwh.d.ts} +2 -2
- package/dist/{camera-Di5R_Rwl.d.cts → camera-CVVG7z56.d.cts} +1 -1
- package/dist/{camera-AoTwBSoE.d.ts → camera-CoRYN_IV.d.ts} +1 -1
- package/dist/chatbot.d.cts +4 -4
- package/dist/chatbot.d.ts +4 -4
- package/dist/index.cjs +164 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +159 -16
- package/dist/index.js.map +1 -1
- package/dist/native.cjs +57 -14
- package/dist/native.cjs.map +1 -1
- package/dist/native.d.cts +2 -2
- package/dist/native.d.ts +2 -2
- package/dist/native.js +57 -14
- package/dist/native.js.map +1 -1
- package/dist/react.cjs +731 -258
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +10 -10
- package/dist/react.d.ts +10 -10
- package/dist/react.js +731 -258
- package/dist/react.js.map +1 -1
- package/dist/realtime.cjs +36 -0
- package/dist/realtime.cjs.map +1 -1
- package/dist/realtime.d.cts +6 -6
- package/dist/realtime.d.ts +6 -6
- package/dist/realtime.js +36 -0
- package/dist/realtime.js.map +1 -1
- package/dist/{shape-builders-CsbSRZnQ.d.cts → shape-builders-BAWu-PxX.d.cts} +46 -4
- package/dist/{shape-builders-CsSXKCcs.d.ts → shape-builders-ClKv9tz9.d.ts} +46 -4
- package/dist/tldraw.cjs +189 -78
- package/dist/tldraw.cjs.map +1 -1
- package/dist/tldraw.d.cts +1 -1
- package/dist/tldraw.d.ts +1 -1
- package/dist/tldraw.js +189 -78
- package/dist/tldraw.js.map +1 -1
- package/dist/{types-DWGk2_GZ.d.cts → types-BC9Xgfu6.d.cts} +20 -6
- package/dist/{types-Bnq2HtHQ.d.cts → types-BCCvY6ie.d.cts} +2 -0
- package/dist/{types-Bnq2HtHQ.d.ts → types-BCCvY6ie.d.ts} +2 -0
- package/dist/{types-B2Na677H.d.cts → types-BUPc2Zgw.d.cts} +1 -1
- package/dist/{types-zmUah-vP.d.ts → types-CYtq9Pr9.d.ts} +1 -1
- package/dist/{types-B6PAYKzx.d.ts → types-DlSVGX0w.d.ts} +20 -6
- package/package.json +1 -1
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { CSSProperties, ReactNode, RefObject } from 'react';
|
|
3
|
-
import { V as VectorSceneItem, R as Rect } from './types-
|
|
4
|
-
import { C as Camera2D } from './camera-
|
|
5
|
-
import { S as StrokeStyle,
|
|
3
|
+
import { V as VectorSceneItem, R as Rect } from './types-BCCvY6ie.cjs';
|
|
4
|
+
import { C as Camera2D } from './camera-CVVG7z56.cjs';
|
|
5
|
+
import { S as StrokeStyle, C as CanvuLinkData, E as VectorViewportAssetStore } from './shape-builders-BAWu-PxX.cjs';
|
|
6
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
8
|
type CanvuChromeActiveToolStyle = StrokeStyle & {
|
|
9
|
-
toolKind: "draw" | "marker";
|
|
9
|
+
toolKind: "draw" | "marker" | "text" | "rect" | "ellipse" | "architectural-cloud" | "line" | "arrow";
|
|
10
10
|
label?: string;
|
|
11
|
+
/** Local font size when `toolKind === "text"`. */
|
|
12
|
+
textFontSize?: number;
|
|
11
13
|
};
|
|
12
14
|
type CanvuChromeSelectionStyleChange = (patch: {
|
|
13
15
|
stroke: string;
|
|
14
16
|
strokeWidth: number;
|
|
15
17
|
strokeOpacity?: number;
|
|
18
|
+
strokeDash?: "solid" | "dashed";
|
|
19
|
+
textFontSize?: number;
|
|
16
20
|
}) => void;
|
|
17
21
|
/**
|
|
18
22
|
* Runtime data and handlers shared with floating board chrome (e.g. {@link NavMenu},
|
|
@@ -179,8 +183,9 @@ type PresenceOverlayRenderContext = {
|
|
|
179
183
|
};
|
|
180
184
|
|
|
181
185
|
type ActiveToolStyle = StrokeStyle & {
|
|
182
|
-
toolKind: "draw" | "marker";
|
|
186
|
+
toolKind: "draw" | "marker" | "text" | "rect" | "ellipse" | "architectural-cloud" | "line" | "arrow";
|
|
183
187
|
label?: string;
|
|
188
|
+
textFontSize?: number;
|
|
184
189
|
};
|
|
185
190
|
/**
|
|
186
191
|
* Color + stroke-width inspector for the current selection (or active drawing tool style).
|
|
@@ -193,7 +198,7 @@ type VectorSelectionInspectorProps = {
|
|
|
193
198
|
items?: readonly VectorSceneItem[];
|
|
194
199
|
/** Optional active tool style shown even without a selection. */
|
|
195
200
|
activeToolStyle?: ActiveToolStyle | null;
|
|
196
|
-
/** Apply stroke / width / opacity to every item in `items`. */
|
|
201
|
+
/** Apply stroke / width / opacity / dash / text size to every item in `items`. */
|
|
197
202
|
onChange?: CanvuChromeSelectionStyleChange;
|
|
198
203
|
/** Anchor preset. Defaults to top-left. */
|
|
199
204
|
position?: BoardComponentPosition;
|
|
@@ -269,6 +274,15 @@ type VectorViewportProps = {
|
|
|
269
274
|
selectedIds?: readonly string[];
|
|
270
275
|
onSelectionChange?: (ids: string[]) => void;
|
|
271
276
|
onItemsChange?: (items: VectorSceneItem[]) => void;
|
|
277
|
+
/**
|
|
278
|
+
* Fires when a link/bookmark item is activated (double-click / double-tap).
|
|
279
|
+
* When omitted, the link opens in a new browser tab by default (web only).
|
|
280
|
+
* Provide this to customize navigation (e.g. in-app preview, confirmation).
|
|
281
|
+
*/
|
|
282
|
+
onActivateLink?: (detail: {
|
|
283
|
+
link: CanvuLinkData;
|
|
284
|
+
item: VectorSceneItem;
|
|
285
|
+
}) => void;
|
|
272
286
|
/**
|
|
273
287
|
* Fires on primary pointer down on the viewport in **world** coordinates.
|
|
274
288
|
* Not called when `toolId` is `"hand"` (use that tool for panning).
|
|
@@ -80,6 +80,8 @@ type VectorSceneItem = {
|
|
|
80
80
|
readonly strokeWidth?: number;
|
|
81
81
|
/** Optional stroke opacity (e.g. highlighter `~0.45`). */
|
|
82
82
|
readonly strokeOpacity?: number;
|
|
83
|
+
/** Dash style for freehand drawings (`"dashed"` paints a centerline with dash gaps). */
|
|
84
|
+
readonly strokeDash?: "solid" | "dashed";
|
|
83
85
|
/**
|
|
84
86
|
* Polyline for freehand tools (`draw`, `marker`; legacy `pencil` / `brush`) in **local** coords relative to `x`,`y`.
|
|
85
87
|
*/
|
|
@@ -80,6 +80,8 @@ type VectorSceneItem = {
|
|
|
80
80
|
readonly strokeWidth?: number;
|
|
81
81
|
/** Optional stroke opacity (e.g. highlighter `~0.45`). */
|
|
82
82
|
readonly strokeOpacity?: number;
|
|
83
|
+
/** Dash style for freehand drawings (`"dashed"` paints a centerline with dash gaps). */
|
|
84
|
+
readonly strokeDash?: "solid" | "dashed";
|
|
83
85
|
/**
|
|
84
86
|
* Polyline for freehand tools (`draw`, `marker`; legacy `pencil` / `brush`) in **local** coords relative to `x`,`y`.
|
|
85
87
|
*/
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { CSSProperties, ReactNode, RefObject } from 'react';
|
|
3
|
-
import { V as VectorSceneItem, R as Rect } from './types-
|
|
4
|
-
import { C as Camera2D } from './camera-
|
|
5
|
-
import { S as StrokeStyle,
|
|
3
|
+
import { V as VectorSceneItem, R as Rect } from './types-BCCvY6ie.js';
|
|
4
|
+
import { C as Camera2D } from './camera-CoRYN_IV.js';
|
|
5
|
+
import { S as StrokeStyle, C as CanvuLinkData, E as VectorViewportAssetStore } from './shape-builders-ClKv9tz9.js';
|
|
6
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
8
|
type CanvuChromeActiveToolStyle = StrokeStyle & {
|
|
9
|
-
toolKind: "draw" | "marker";
|
|
9
|
+
toolKind: "draw" | "marker" | "text" | "rect" | "ellipse" | "architectural-cloud" | "line" | "arrow";
|
|
10
10
|
label?: string;
|
|
11
|
+
/** Local font size when `toolKind === "text"`. */
|
|
12
|
+
textFontSize?: number;
|
|
11
13
|
};
|
|
12
14
|
type CanvuChromeSelectionStyleChange = (patch: {
|
|
13
15
|
stroke: string;
|
|
14
16
|
strokeWidth: number;
|
|
15
17
|
strokeOpacity?: number;
|
|
18
|
+
strokeDash?: "solid" | "dashed";
|
|
19
|
+
textFontSize?: number;
|
|
16
20
|
}) => void;
|
|
17
21
|
/**
|
|
18
22
|
* Runtime data and handlers shared with floating board chrome (e.g. {@link NavMenu},
|
|
@@ -179,8 +183,9 @@ type PresenceOverlayRenderContext = {
|
|
|
179
183
|
};
|
|
180
184
|
|
|
181
185
|
type ActiveToolStyle = StrokeStyle & {
|
|
182
|
-
toolKind: "draw" | "marker";
|
|
186
|
+
toolKind: "draw" | "marker" | "text" | "rect" | "ellipse" | "architectural-cloud" | "line" | "arrow";
|
|
183
187
|
label?: string;
|
|
188
|
+
textFontSize?: number;
|
|
184
189
|
};
|
|
185
190
|
/**
|
|
186
191
|
* Color + stroke-width inspector for the current selection (or active drawing tool style).
|
|
@@ -193,7 +198,7 @@ type VectorSelectionInspectorProps = {
|
|
|
193
198
|
items?: readonly VectorSceneItem[];
|
|
194
199
|
/** Optional active tool style shown even without a selection. */
|
|
195
200
|
activeToolStyle?: ActiveToolStyle | null;
|
|
196
|
-
/** Apply stroke / width / opacity to every item in `items`. */
|
|
201
|
+
/** Apply stroke / width / opacity / dash / text size to every item in `items`. */
|
|
197
202
|
onChange?: CanvuChromeSelectionStyleChange;
|
|
198
203
|
/** Anchor preset. Defaults to top-left. */
|
|
199
204
|
position?: BoardComponentPosition;
|
|
@@ -269,6 +274,15 @@ type VectorViewportProps = {
|
|
|
269
274
|
selectedIds?: readonly string[];
|
|
270
275
|
onSelectionChange?: (ids: string[]) => void;
|
|
271
276
|
onItemsChange?: (items: VectorSceneItem[]) => void;
|
|
277
|
+
/**
|
|
278
|
+
* Fires when a link/bookmark item is activated (double-click / double-tap).
|
|
279
|
+
* When omitted, the link opens in a new browser tab by default (web only).
|
|
280
|
+
* Provide this to customize navigation (e.g. in-app preview, confirmation).
|
|
281
|
+
*/
|
|
282
|
+
onActivateLink?: (detail: {
|
|
283
|
+
link: CanvuLinkData;
|
|
284
|
+
item: VectorSceneItem;
|
|
285
|
+
}) => void;
|
|
272
286
|
/**
|
|
273
287
|
* Fires on primary pointer down on the viewport in **world** coordinates.
|
|
274
288
|
* Not called when `toolId` is `"hand"` (use that tool for panning).
|