canvu-react 0.3.29 → 0.3.30
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-BEG21hMp.d.ts → asset-hydration-DrTOgDdd.d.ts} +2 -2
- package/dist/{asset-hydration-3Iv5xHxM.d.cts → asset-hydration-EtEuBwb7.d.cts} +2 -2
- package/dist/{camera-KwCYYPhm.d.ts → camera-AoTwBSoE.d.ts} +1 -1
- package/dist/{camera-BwQjm5oh.d.cts → camera-Di5R_Rwl.d.cts} +1 -1
- package/dist/chatbot.d.cts +4 -4
- package/dist/chatbot.d.ts +4 -4
- package/dist/index.cjs +118 -1
- 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 +116 -2
- package/dist/index.js.map +1 -1
- package/dist/native.cjs +99 -0
- 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 +99 -0
- package/dist/native.js.map +1 -1
- package/dist/react.cjs +175 -7
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +15 -12
- package/dist/react.d.ts +15 -12
- package/dist/react.js +175 -8
- package/dist/react.js.map +1 -1
- package/dist/realtime.cjs +10 -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 +10 -0
- package/dist/realtime.js.map +1 -1
- package/dist/{shape-builders-DFudWDFI.d.cts → shape-builders-CsSXKCcs.d.ts} +43 -2
- package/dist/{shape-builders-ENwnK-zT.d.ts → shape-builders-CsbSRZnQ.d.cts} +43 -2
- package/dist/tldraw.cjs +101 -2
- 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 +101 -2
- package/dist/tldraw.js.map +1 -1
- package/dist/{types-DNwjgs5U.d.cts → types-B2Na677H.d.cts} +1 -1
- package/dist/{types-BLXR7g_L.d.cts → types-B6PAYKzx.d.ts} +4 -4
- package/dist/{types-CB0TZZuk.d.cts → types-Bnq2HtHQ.d.cts} +1 -1
- package/dist/{types-CB0TZZuk.d.ts → types-Bnq2HtHQ.d.ts} +1 -1
- package/dist/{types-Cm7IsgL4.d.ts → types-DWGk2_GZ.d.cts} +4 -4
- package/dist/{types-BtAJFS_-.d.ts → types-zmUah-vP.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VectorSceneItem, L as LineEndpointsLocal, b as VectorPathPoint, R as Rect, a as ArrowBindings } from './types-
|
|
1
|
+
import { V as VectorSceneItem, L as LineEndpointsLocal, b as VectorPathPoint, R as Rect, a as ArrowBindings } from './types-Bnq2HtHQ.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Kind of binary selected through the built-in canvu asset ingestion flow.
|
|
@@ -120,6 +120,28 @@ declare const DEFAULT_STROKE_STYLE: StrokeStyle;
|
|
|
120
120
|
declare function resolveStrokeStyle(item: VectorSceneItem): StrokeStyle;
|
|
121
121
|
declare function buildRectSvg(width: number, height: number, style?: StrokeStyle): string;
|
|
122
122
|
declare function buildEllipseSvg(width: number, height: number, style?: StrokeStyle): string;
|
|
123
|
+
/**
|
|
124
|
+
* Returns the local SVG path for a scalable architectural revision cloud.
|
|
125
|
+
*
|
|
126
|
+
* Use this low-level helper when you need to preview or inspect the shape without
|
|
127
|
+
* creating a full scene item. Prefer {@link createArchitecturalCloudItem} when
|
|
128
|
+
* adding a cloud to a `VectorSceneItem[]`, because it keeps `toolKind`, bounds,
|
|
129
|
+
* stroke fields, and `childrenSvg` synchronized for editing.
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```ts
|
|
133
|
+
* const d = buildArchitecturalCloudPathD(180, 90);
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
136
|
+
declare function buildArchitecturalCloudPathD(width: number, height: number, strokeWidth?: number): string;
|
|
137
|
+
/**
|
|
138
|
+
* Builds an SVG fragment for an architectural revision cloud outline.
|
|
139
|
+
*
|
|
140
|
+
* This is the renderer-level primitive behind the built-in `"architectural-cloud"`
|
|
141
|
+
* tool. Prefer {@link createArchitecturalCloudItem} for app code that inserts a
|
|
142
|
+
* normal editable scene item.
|
|
143
|
+
*/
|
|
144
|
+
declare function buildArchitecturalCloudSvg(width: number, height: number, style?: StrokeStyle): string;
|
|
123
145
|
declare function buildLineSvg(line: LineEndpointsLocal, style?: StrokeStyle): string;
|
|
124
146
|
declare function buildArrowSvg(itemId: string, line: LineEndpointsLocal, style?: StrokeStyle): string;
|
|
125
147
|
declare function buildDrawDotSvg(r: number, style?: StrokeStyle): string;
|
|
@@ -181,6 +203,25 @@ declare function applyStrokeToItem(item: VectorSceneItem, patch: Partial<Pick<Ve
|
|
|
181
203
|
declare function createRectangleItem(id: string, bounds: Rect, style?: Partial<StrokeStyle>): VectorSceneItem;
|
|
182
204
|
/** Creates an ellipse shape. */
|
|
183
205
|
declare function createEllipseItem(id: string, bounds: Rect, style?: Partial<StrokeStyle>): VectorSceneItem;
|
|
206
|
+
/**
|
|
207
|
+
* Creates an architectural revision cloud shape.
|
|
208
|
+
*
|
|
209
|
+
* Use this high-level builder when adding the built-in cloud shape from code or
|
|
210
|
+
* from custom integrations. It creates an editable `VectorSceneItem` with
|
|
211
|
+
* `toolKind: "architectural-cloud"`, so resize, stroke styling, selection, and
|
|
212
|
+
* serialization continue to work like the built-in rectangle and ellipse tools.
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* ```ts
|
|
216
|
+
* const cloud = createArchitecturalCloudItem(createShapeId(), {
|
|
217
|
+
* x: 40,
|
|
218
|
+
* y: 30,
|
|
219
|
+
* width: 180,
|
|
220
|
+
* height: 90,
|
|
221
|
+
* });
|
|
222
|
+
* ```
|
|
223
|
+
*/
|
|
224
|
+
declare function createArchitecturalCloudItem(id: string, bounds: Rect, style?: Partial<StrokeStyle>): VectorSceneItem;
|
|
184
225
|
/** Creates a straight line or arrow; `line` is usually from {@link lineEndpointsToLocal}. */
|
|
185
226
|
declare function createLineItem(id: string, bounds: Rect, line: LineEndpointsLocal, toolKind: "line" | "arrow", style?: Partial<StrokeStyle>, arrowBind?: ArrowBindings): VectorSceneItem;
|
|
186
227
|
/** “Draw dot” tool: a small filled circle at (`worldX`, `worldY`). */
|
|
@@ -200,4 +241,4 @@ declare function createImageFromVectorTrace(id: string, bounds: Rect, imageVecto
|
|
|
200
241
|
height: number;
|
|
201
242
|
}): VectorSceneItem;
|
|
202
243
|
|
|
203
|
-
export { DEFAULT_STROKE_STYLE as D, type FreehandSvgPayload as F, type StrokeStyle as S, type VectorViewportAssetKind as V, applyStrokeToItem as a,
|
|
244
|
+
export { type VectorViewportAssetResolveResult as A, type VectorViewportAssetUploadRequest as B, type VectorViewportAssetUploadResult as C, DEFAULT_STROKE_STYLE as D, type FreehandSvgPayload as F, type StrokeStyle as S, type VectorViewportAssetKind as V, applyStrokeToItem as a, buildArchitecturalCloudPathD as b, buildArchitecturalCloudSvg as c, buildArrowSvg as d, buildDrawDotSvg as e, buildEllipseSvg as f, buildFreehandPathSvg as g, buildLineSvg as h, buildRectSvg as i, computeFreehandSvgPayload as j, createArchitecturalCloudItem as k, createDrawDotItem as l, createEllipseItem as m, createFreehandStrokeItem as n, createImageFromVectorTrace as o, createImageItem as p, createLineItem as q, createRectangleItem as r, createShapeId as s, createTextItem as t, lineEndpointsToLocal as u, rebuildItemSvg as v, resolveStrokeStyle as w, type VectorViewportAssetStore as x, type VectorViewportAssetHydrationRequest as y, type VectorViewportAssetResolveRequest as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VectorSceneItem, L as LineEndpointsLocal, b as VectorPathPoint, R as Rect, a as ArrowBindings } from './types-
|
|
1
|
+
import { V as VectorSceneItem, L as LineEndpointsLocal, b as VectorPathPoint, R as Rect, a as ArrowBindings } from './types-Bnq2HtHQ.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Kind of binary selected through the built-in canvu asset ingestion flow.
|
|
@@ -120,6 +120,28 @@ declare const DEFAULT_STROKE_STYLE: StrokeStyle;
|
|
|
120
120
|
declare function resolveStrokeStyle(item: VectorSceneItem): StrokeStyle;
|
|
121
121
|
declare function buildRectSvg(width: number, height: number, style?: StrokeStyle): string;
|
|
122
122
|
declare function buildEllipseSvg(width: number, height: number, style?: StrokeStyle): string;
|
|
123
|
+
/**
|
|
124
|
+
* Returns the local SVG path for a scalable architectural revision cloud.
|
|
125
|
+
*
|
|
126
|
+
* Use this low-level helper when you need to preview or inspect the shape without
|
|
127
|
+
* creating a full scene item. Prefer {@link createArchitecturalCloudItem} when
|
|
128
|
+
* adding a cloud to a `VectorSceneItem[]`, because it keeps `toolKind`, bounds,
|
|
129
|
+
* stroke fields, and `childrenSvg` synchronized for editing.
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```ts
|
|
133
|
+
* const d = buildArchitecturalCloudPathD(180, 90);
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
136
|
+
declare function buildArchitecturalCloudPathD(width: number, height: number, strokeWidth?: number): string;
|
|
137
|
+
/**
|
|
138
|
+
* Builds an SVG fragment for an architectural revision cloud outline.
|
|
139
|
+
*
|
|
140
|
+
* This is the renderer-level primitive behind the built-in `"architectural-cloud"`
|
|
141
|
+
* tool. Prefer {@link createArchitecturalCloudItem} for app code that inserts a
|
|
142
|
+
* normal editable scene item.
|
|
143
|
+
*/
|
|
144
|
+
declare function buildArchitecturalCloudSvg(width: number, height: number, style?: StrokeStyle): string;
|
|
123
145
|
declare function buildLineSvg(line: LineEndpointsLocal, style?: StrokeStyle): string;
|
|
124
146
|
declare function buildArrowSvg(itemId: string, line: LineEndpointsLocal, style?: StrokeStyle): string;
|
|
125
147
|
declare function buildDrawDotSvg(r: number, style?: StrokeStyle): string;
|
|
@@ -181,6 +203,25 @@ declare function applyStrokeToItem(item: VectorSceneItem, patch: Partial<Pick<Ve
|
|
|
181
203
|
declare function createRectangleItem(id: string, bounds: Rect, style?: Partial<StrokeStyle>): VectorSceneItem;
|
|
182
204
|
/** Creates an ellipse shape. */
|
|
183
205
|
declare function createEllipseItem(id: string, bounds: Rect, style?: Partial<StrokeStyle>): VectorSceneItem;
|
|
206
|
+
/**
|
|
207
|
+
* Creates an architectural revision cloud shape.
|
|
208
|
+
*
|
|
209
|
+
* Use this high-level builder when adding the built-in cloud shape from code or
|
|
210
|
+
* from custom integrations. It creates an editable `VectorSceneItem` with
|
|
211
|
+
* `toolKind: "architectural-cloud"`, so resize, stroke styling, selection, and
|
|
212
|
+
* serialization continue to work like the built-in rectangle and ellipse tools.
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* ```ts
|
|
216
|
+
* const cloud = createArchitecturalCloudItem(createShapeId(), {
|
|
217
|
+
* x: 40,
|
|
218
|
+
* y: 30,
|
|
219
|
+
* width: 180,
|
|
220
|
+
* height: 90,
|
|
221
|
+
* });
|
|
222
|
+
* ```
|
|
223
|
+
*/
|
|
224
|
+
declare function createArchitecturalCloudItem(id: string, bounds: Rect, style?: Partial<StrokeStyle>): VectorSceneItem;
|
|
184
225
|
/** Creates a straight line or arrow; `line` is usually from {@link lineEndpointsToLocal}. */
|
|
185
226
|
declare function createLineItem(id: string, bounds: Rect, line: LineEndpointsLocal, toolKind: "line" | "arrow", style?: Partial<StrokeStyle>, arrowBind?: ArrowBindings): VectorSceneItem;
|
|
186
227
|
/** “Draw dot” tool: a small filled circle at (`worldX`, `worldY`). */
|
|
@@ -200,4 +241,4 @@ declare function createImageFromVectorTrace(id: string, bounds: Rect, imageVecto
|
|
|
200
241
|
height: number;
|
|
201
242
|
}): VectorSceneItem;
|
|
202
243
|
|
|
203
|
-
export { DEFAULT_STROKE_STYLE as D, type FreehandSvgPayload as F, type StrokeStyle as S, type VectorViewportAssetKind as V, applyStrokeToItem as a,
|
|
244
|
+
export { type VectorViewportAssetResolveResult as A, type VectorViewportAssetUploadRequest as B, type VectorViewportAssetUploadResult as C, DEFAULT_STROKE_STYLE as D, type FreehandSvgPayload as F, type StrokeStyle as S, type VectorViewportAssetKind as V, applyStrokeToItem as a, buildArchitecturalCloudPathD as b, buildArchitecturalCloudSvg as c, buildArrowSvg as d, buildDrawDotSvg as e, buildEllipseSvg as f, buildFreehandPathSvg as g, buildLineSvg as h, buildRectSvg as i, computeFreehandSvgPayload as j, createArchitecturalCloudItem as k, createDrawDotItem as l, createEllipseItem as m, createFreehandStrokeItem as n, createImageFromVectorTrace as o, createImageItem as p, createLineItem as q, createRectangleItem as r, createShapeId as s, createTextItem as t, lineEndpointsToLocal as u, rebuildItemSvg as v, resolveStrokeStyle as w, type VectorViewportAssetStore as x, type VectorViewportAssetHydrationRequest as y, type VectorViewportAssetResolveRequest as z };
|
package/dist/tldraw.cjs
CHANGED
|
@@ -223,6 +223,41 @@ function resolveStrokeStyle(item) {
|
|
|
223
223
|
function strokeOpacityAttr(style) {
|
|
224
224
|
return style.strokeOpacity != null ? ` stroke-opacity="${style.strokeOpacity}"` : "";
|
|
225
225
|
}
|
|
226
|
+
function clampNumber(value, min, max) {
|
|
227
|
+
return Math.min(max, Math.max(min, value));
|
|
228
|
+
}
|
|
229
|
+
function svgNumber(value) {
|
|
230
|
+
if (!Number.isFinite(value)) return "0";
|
|
231
|
+
return Number(value.toFixed(3)).toString();
|
|
232
|
+
}
|
|
233
|
+
function architecturalCloudScallopCount(length, depth) {
|
|
234
|
+
if (length <= 1e-6) return 0;
|
|
235
|
+
return Math.max(1, Math.round(length / Math.max(depth * 2.05, 8)));
|
|
236
|
+
}
|
|
237
|
+
function appendHorizontalScallops(segments, startX, endX, y, controlY, count) {
|
|
238
|
+
if (count <= 0) return;
|
|
239
|
+
const step = (endX - startX) / count;
|
|
240
|
+
for (let index = 1; index <= count; index += 1) {
|
|
241
|
+
const x0 = startX + step * (index - 1);
|
|
242
|
+
const x1 = index === count ? endX : startX + step * index;
|
|
243
|
+
const cx = (x0 + x1) / 2;
|
|
244
|
+
segments.push(
|
|
245
|
+
`Q${svgNumber(cx)} ${svgNumber(controlY)} ${svgNumber(x1)} ${svgNumber(y)}`
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
function appendVerticalScallops(segments, startY, endY, x, controlX, count) {
|
|
250
|
+
if (count <= 0) return;
|
|
251
|
+
const step = (endY - startY) / count;
|
|
252
|
+
for (let index = 1; index <= count; index += 1) {
|
|
253
|
+
const y0 = startY + step * (index - 1);
|
|
254
|
+
const y1 = index === count ? endY : startY + step * index;
|
|
255
|
+
const cy = (y0 + y1) / 2;
|
|
256
|
+
segments.push(
|
|
257
|
+
`Q${svgNumber(controlX)} ${svgNumber(cy)} ${svgNumber(x)} ${svgNumber(y1)}`
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
226
261
|
function buildRectSvg(width, height, style = DEFAULT_STROKE_STYLE) {
|
|
227
262
|
return `<rect width="${width}" height="${height}" fill="none" stroke="${style.stroke}" stroke-width="${style.strokeWidth}" rx="4"${strokeOpacityAttr(style)} />`;
|
|
228
263
|
}
|
|
@@ -231,6 +266,63 @@ function buildEllipseSvg(width, height, style = DEFAULT_STROKE_STYLE) {
|
|
|
231
266
|
const ry = height / 2;
|
|
232
267
|
return `<ellipse cx="${rx}" cy="${ry}" rx="${rx}" ry="${ry}" fill="none" stroke="${style.stroke}" stroke-width="${style.strokeWidth}"${strokeOpacityAttr(style)} />`;
|
|
233
268
|
}
|
|
269
|
+
function buildArchitecturalCloudPathD(width, height, strokeWidth = DEFAULT_STROKE_STYLE.strokeWidth) {
|
|
270
|
+
const w = Math.max(0, width);
|
|
271
|
+
const h = Math.max(0, height);
|
|
272
|
+
if (w <= 0 || h <= 0) return "";
|
|
273
|
+
const inset = Math.min(w / 2, h / 2, Math.max(0.5, strokeWidth / 2));
|
|
274
|
+
const x0 = inset;
|
|
275
|
+
const y0 = inset;
|
|
276
|
+
const x1 = Math.max(x0, w - inset);
|
|
277
|
+
const y1 = Math.max(y0, h - inset);
|
|
278
|
+
const innerW = Math.max(0, x1 - x0);
|
|
279
|
+
const innerH = Math.max(0, y1 - y0);
|
|
280
|
+
if (innerW <= 0 || innerH <= 0) return "";
|
|
281
|
+
const maxDepth = Math.max(0.5, Math.min(innerW, innerH) * 0.18);
|
|
282
|
+
const depth = clampNumber(Math.min(w, h) * 0.08, 2, Math.min(12, maxDepth));
|
|
283
|
+
const corner = Math.min(depth * 1.2, innerW / 2, innerH / 2);
|
|
284
|
+
const topStart = x0 + corner;
|
|
285
|
+
const topEnd = x1 - corner;
|
|
286
|
+
const rightStart = y0 + corner;
|
|
287
|
+
const rightEnd = y1 - corner;
|
|
288
|
+
const bottomStart = x1 - corner;
|
|
289
|
+
const bottomEnd = x0 + corner;
|
|
290
|
+
const leftStart = y1 - corner;
|
|
291
|
+
const leftEnd = y0 + corner;
|
|
292
|
+
const topCount = architecturalCloudScallopCount(topEnd - topStart, depth);
|
|
293
|
+
const rightCount = architecturalCloudScallopCount(rightEnd - rightStart, depth);
|
|
294
|
+
const bottomCount = architecturalCloudScallopCount(bottomStart - bottomEnd, depth);
|
|
295
|
+
const leftCount = architecturalCloudScallopCount(leftStart - leftEnd, depth);
|
|
296
|
+
const segments = [`M${svgNumber(topStart)} ${svgNumber(y0)}`];
|
|
297
|
+
appendHorizontalScallops(segments, topStart, topEnd, y0, y0 + depth, topCount);
|
|
298
|
+
segments.push(
|
|
299
|
+
`Q${svgNumber(x1)} ${svgNumber(y0)} ${svgNumber(x1)} ${svgNumber(rightStart)}`
|
|
300
|
+
);
|
|
301
|
+
appendVerticalScallops(segments, rightStart, rightEnd, x1, x1 - depth, rightCount);
|
|
302
|
+
segments.push(
|
|
303
|
+
`Q${svgNumber(x1)} ${svgNumber(y1)} ${svgNumber(bottomStart)} ${svgNumber(y1)}`
|
|
304
|
+
);
|
|
305
|
+
appendHorizontalScallops(
|
|
306
|
+
segments,
|
|
307
|
+
bottomStart,
|
|
308
|
+
bottomEnd,
|
|
309
|
+
y1,
|
|
310
|
+
y1 - depth,
|
|
311
|
+
bottomCount
|
|
312
|
+
);
|
|
313
|
+
segments.push(
|
|
314
|
+
`Q${svgNumber(x0)} ${svgNumber(y1)} ${svgNumber(x0)} ${svgNumber(leftStart)}`
|
|
315
|
+
);
|
|
316
|
+
appendVerticalScallops(segments, leftStart, leftEnd, x0, x0 + depth, leftCount);
|
|
317
|
+
segments.push(
|
|
318
|
+
`Q${svgNumber(x0)} ${svgNumber(y0)} ${svgNumber(topStart)} ${svgNumber(y0)} Z`
|
|
319
|
+
);
|
|
320
|
+
return segments.join(" ");
|
|
321
|
+
}
|
|
322
|
+
function buildArchitecturalCloudSvg(width, height, style = DEFAULT_STROKE_STYLE) {
|
|
323
|
+
const d = buildArchitecturalCloudPathD(width, height, style.strokeWidth);
|
|
324
|
+
return `<path d="${d}" fill="none" stroke="${style.stroke}" stroke-width="${style.strokeWidth}" stroke-linecap="round" stroke-linejoin="round"${strokeOpacityAttr(style)} />`;
|
|
325
|
+
}
|
|
234
326
|
function buildLineSvg(line, style = DEFAULT_STROKE_STYLE) {
|
|
235
327
|
return `<line x1="${line.x1}" y1="${line.y1}" x2="${line.x2}" y2="${line.y2}" stroke="${style.stroke}" stroke-width="${style.strokeWidth}"${strokeOpacityAttr(style)} />`;
|
|
236
328
|
}
|
|
@@ -369,6 +461,13 @@ function rebuildItemSvg(item) {
|
|
|
369
461
|
childrenSvg: buildEllipseSvg(b.width, b.height, style)
|
|
370
462
|
};
|
|
371
463
|
}
|
|
464
|
+
if (k === "architectural-cloud") {
|
|
465
|
+
const b = normalizeRect(item.bounds);
|
|
466
|
+
return {
|
|
467
|
+
...item,
|
|
468
|
+
childrenSvg: buildArchitecturalCloudSvg(b.width, b.height, style)
|
|
469
|
+
};
|
|
470
|
+
}
|
|
372
471
|
if ((k === "line" || k === "arrow") && item.line) {
|
|
373
472
|
const line = item.line;
|
|
374
473
|
const childrenSvg = k === "arrow" ? buildArrowSvg(item.id, line, style) : buildLineSvg(line, style);
|
|
@@ -1795,8 +1894,8 @@ function itemsToTldrawSnapshot(items) {
|
|
|
1795
1894
|
if (item.strokeOpacity != null) {
|
|
1796
1895
|
props.opacity = Math.round(item.strokeOpacity * 100);
|
|
1797
1896
|
}
|
|
1798
|
-
if (type === "rect" || type === "ellipse") {
|
|
1799
|
-
props.geo = type === "ellipse" ? "ellipse" : "rectangle";
|
|
1897
|
+
if (type === "rect" || type === "ellipse" || type === "architectural-cloud") {
|
|
1898
|
+
props.geo = type === "ellipse" ? "ellipse" : type === "architectural-cloud" ? "cloud" : "rectangle";
|
|
1800
1899
|
props.fill = "none";
|
|
1801
1900
|
} else if (type === "draw" || type === "marker") {
|
|
1802
1901
|
props.segments = [
|