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
package/dist/react.d.cts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { I as IndexedDbImageStore } from './asset-hydration-
|
|
2
|
-
export { H as HydratedSceneItemsWithAssetsResult, h as hydrateSceneItemsWithAssets } from './asset-hydration-
|
|
3
|
-
import { V as VectorSceneItem } from './types-
|
|
4
|
-
import { V as VectorViewportAssetKind,
|
|
5
|
-
export {
|
|
6
|
-
import { B as BoardComponentPosition, V as VectorToolDefinition, C as CanvasPlugin, a as VectorSelectionInspector } from './types-
|
|
7
|
-
export { b as CanvasPluginComponentProps, c as CanvasPluginContribution, d as CanvasPluginItemsChangeMiddlewareContext, e as CanvasPluginRenderContext, f as CanvuChromeActiveToolStyle, g as CanvuChromeContext, h as CanvuChromeContextValue, i as CanvuChromeSelectionStyleChange, j as CanvuPluginContext, k as CanvuPluginContextValue, l as CanvuPluginViewportSnapshot, m as CustomShapePlacementOptions, P as PlacementPreview, n as VectorCanvasSpacePosition, o as VectorSelectionInspectorProps, p as VectorViewport, q as VectorViewportHandle, r as VectorViewportProps, W as WorldPointerDownDetail, s as createCanvuPlugin, t as getBoardPositionStyle, u as useCanvuChromeContext, v as useCanvuDocumentContext, w as useCanvuPluginContext, x as useCanvuPluginContribution, y as useCanvuResolvedTools, z as useCanvuViewportContext } from './types-
|
|
1
|
+
import { I as IndexedDbImageStore } from './asset-hydration-EtEuBwb7.cjs';
|
|
2
|
+
export { H as HydratedSceneItemsWithAssetsResult, h as hydrateSceneItemsWithAssets } from './asset-hydration-EtEuBwb7.cjs';
|
|
3
|
+
import { V as VectorSceneItem } from './types-Bnq2HtHQ.cjs';
|
|
4
|
+
import { V as VectorViewportAssetKind, x as VectorViewportAssetStore } from './shape-builders-CsbSRZnQ.cjs';
|
|
5
|
+
export { y as VectorViewportAssetHydrationRequest, z as VectorViewportAssetResolveRequest, A as VectorViewportAssetResolveResult, B as VectorViewportAssetUploadRequest, C as VectorViewportAssetUploadResult } from './shape-builders-CsbSRZnQ.cjs';
|
|
6
|
+
import { B as BoardComponentPosition, V as VectorToolDefinition, C as CanvasPlugin, a as VectorSelectionInspector } from './types-DWGk2_GZ.cjs';
|
|
7
|
+
export { b as CanvasPluginComponentProps, c as CanvasPluginContribution, d as CanvasPluginItemsChangeMiddlewareContext, e as CanvasPluginRenderContext, f as CanvuChromeActiveToolStyle, g as CanvuChromeContext, h as CanvuChromeContextValue, i as CanvuChromeSelectionStyleChange, j as CanvuPluginContext, k as CanvuPluginContextValue, l as CanvuPluginViewportSnapshot, m as CustomShapePlacementOptions, P as PlacementPreview, n as VectorCanvasSpacePosition, o as VectorSelectionInspectorProps, p as VectorViewport, q as VectorViewportHandle, r as VectorViewportProps, W as WorldPointerDownDetail, s as createCanvuPlugin, t as getBoardPositionStyle, u as useCanvuChromeContext, v as useCanvuDocumentContext, w as useCanvuPluginContext, x as useCanvuPluginContribution, y as useCanvuResolvedTools, z as useCanvuViewportContext } from './types-DWGk2_GZ.cjs';
|
|
8
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
9
|
import * as react from 'react';
|
|
10
10
|
import { CSSProperties, ReactNode, ReactElement, SVGProps } from 'react';
|
|
11
|
-
import { C as Camera2D } from './camera-
|
|
12
|
-
import { V as VectorCanvasPersistenceAdapter, a as VectorCanvasRemoteAdapter } from './types-
|
|
13
|
-
export { b as VectorCanvasSnapshot } from './types-
|
|
11
|
+
import { C as Camera2D } from './camera-Di5R_Rwl.cjs';
|
|
12
|
+
import { V as VectorCanvasPersistenceAdapter, a as VectorCanvasRemoteAdapter } from './types-B2Na677H.cjs';
|
|
13
|
+
export { b as VectorCanvasSnapshot } from './types-B2Na677H.cjs';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Extra context for each item created by {@link ingestAssetFilesToSceneItems}.
|
|
@@ -425,7 +425,7 @@ declare function ShapeContextMenu({ x, y, allSelectedLocked, onClose, onToggleLo
|
|
|
425
425
|
* Tool ids shown in the overflow menu at the end of the default toolbar (horizontal layout).
|
|
426
426
|
* Order: shapes, marker, laser, image.
|
|
427
427
|
*/
|
|
428
|
-
declare const DEFAULT_OVERFLOW_TOOL_IDS: readonly ["rect", "ellipse", "line", "marker", "laser", "image"];
|
|
428
|
+
declare const DEFAULT_OVERFLOW_TOOL_IDS: readonly ["rect", "ellipse", "architectural-cloud", "line", "marker", "laser", "image"];
|
|
429
429
|
/**
|
|
430
430
|
* Opinionated default tool strip using [Lucide](https://lucide.dev) icons.
|
|
431
431
|
* Pass a subset or your own list via {@link VectorToolbarProps.tools}.
|
|
@@ -437,6 +437,7 @@ declare function IconHand(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
|
437
437
|
declare function IconSelect(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
438
438
|
declare function IconRect(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
439
439
|
declare function IconEllipse(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
440
|
+
declare function IconArchitecturalCloud(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
440
441
|
declare function IconLine(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
441
442
|
declare function IconArrow(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
442
443
|
declare function IconDraw(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
@@ -668,6 +669,7 @@ declare const HandBinding: ToolBinding;
|
|
|
668
669
|
declare const SelectBinding: ToolBinding;
|
|
669
670
|
declare const RectBinding: ToolBinding;
|
|
670
671
|
declare const EllipseBinding: ToolBinding;
|
|
672
|
+
declare const ArchitecturalCloudBinding: ToolBinding;
|
|
671
673
|
declare const LineBinding: ToolBinding;
|
|
672
674
|
declare const ArrowBinding: ToolBinding;
|
|
673
675
|
declare const DrawBinding: ToolBinding;
|
|
@@ -684,6 +686,7 @@ type VectorToolbarWithStatics = ((props: VectorToolbarProps) => ReactElement) &
|
|
|
684
686
|
Select: typeof SelectBinding;
|
|
685
687
|
Rect: typeof RectBinding;
|
|
686
688
|
Ellipse: typeof EllipseBinding;
|
|
689
|
+
ArchitecturalCloud: typeof ArchitecturalCloudBinding;
|
|
687
690
|
Line: typeof LineBinding;
|
|
688
691
|
Arrow: typeof ArrowBinding;
|
|
689
692
|
Draw: typeof DrawBinding;
|
|
@@ -703,4 +706,4 @@ type VectorToolbarWithStatics = ((props: VectorToolbarProps) => ReactElement) &
|
|
|
703
706
|
*/
|
|
704
707
|
declare const VectorToolbar: VectorToolbarWithStatics;
|
|
705
708
|
|
|
706
|
-
export { BoardComponentPosition, CanvasPlugin, type CreateLocalStoragePersistenceAdapterOptions, type CreateToolPluginOptions, DEFAULT_OVERFLOW_TOOL_IDS, DEFAULT_VECTOR_CANVAS_STORAGE_KEY, DEFAULT_VECTOR_TOOLS, IconArrow, IconDraw, IconEllipse, IconHand, IconImage, IconLaser, IconLine, IconRect, IconSelect, IconText, ImagesMenu, type ImagesMenuLabels, type ImagesMenuProps, type IngestAssetFileError, type IngestAssetFilesToSceneItemsOptions, type IngestAssetFilesToSceneItemsResult, type IngestedAssetItemContext, NavMenu, type NavMenuMinimapProps, type NavMenuProps, type NavMenuUndoRedoProps, type NavMenuZoomControlsProps, ShapeContextMenu, type ShapeContextMenuProps, type UseVectorCanvasDocumentOptions, type UseVectorCanvasDocumentResult, VectorCanvas, VectorCanvasBody, VectorCanvasHeader, VectorCanvasMain, VectorCanvasPersistenceAdapter, VectorCanvasRemoteAdapter, VectorCanvasRoot, type VectorCanvasSlotProps, type VectorCanvasSpaceProps, VectorCanvasToolbar, type VectorCanvasToolbarProps, VectorCanvasViewportSurface, VectorSelectionInspector, VectorToolDefinition, VectorToolbar, type VectorToolbarOverflowProps, type VectorToolbarProps, type VectorToolbarRenderContext, type VectorToolbarToolLockProps, type VectorToolbarToolProps, VectorViewportAssetKind, VectorViewportAssetStore, createIndexedDbPersistenceAdapter, createLocalStoragePersistenceAdapter, createNoopPersistenceAdapter, createToolPlugin, cursorForVectorToolId, ingestAssetFilesToSceneItems, useVectorCanvasDocument };
|
|
709
|
+
export { BoardComponentPosition, CanvasPlugin, type CreateLocalStoragePersistenceAdapterOptions, type CreateToolPluginOptions, DEFAULT_OVERFLOW_TOOL_IDS, DEFAULT_VECTOR_CANVAS_STORAGE_KEY, DEFAULT_VECTOR_TOOLS, IconArchitecturalCloud, IconArrow, IconDraw, IconEllipse, IconHand, IconImage, IconLaser, IconLine, IconRect, IconSelect, IconText, ImagesMenu, type ImagesMenuLabels, type ImagesMenuProps, type IngestAssetFileError, type IngestAssetFilesToSceneItemsOptions, type IngestAssetFilesToSceneItemsResult, type IngestedAssetItemContext, NavMenu, type NavMenuMinimapProps, type NavMenuProps, type NavMenuUndoRedoProps, type NavMenuZoomControlsProps, ShapeContextMenu, type ShapeContextMenuProps, type UseVectorCanvasDocumentOptions, type UseVectorCanvasDocumentResult, VectorCanvas, VectorCanvasBody, VectorCanvasHeader, VectorCanvasMain, VectorCanvasPersistenceAdapter, VectorCanvasRemoteAdapter, VectorCanvasRoot, type VectorCanvasSlotProps, type VectorCanvasSpaceProps, VectorCanvasToolbar, type VectorCanvasToolbarProps, VectorCanvasViewportSurface, VectorSelectionInspector, VectorToolDefinition, VectorToolbar, type VectorToolbarOverflowProps, type VectorToolbarProps, type VectorToolbarRenderContext, type VectorToolbarToolLockProps, type VectorToolbarToolProps, VectorViewportAssetKind, VectorViewportAssetStore, createIndexedDbPersistenceAdapter, createLocalStoragePersistenceAdapter, createNoopPersistenceAdapter, createToolPlugin, cursorForVectorToolId, ingestAssetFilesToSceneItems, useVectorCanvasDocument };
|
package/dist/react.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { I as IndexedDbImageStore } from './asset-hydration-
|
|
2
|
-
export { H as HydratedSceneItemsWithAssetsResult, h as hydrateSceneItemsWithAssets } from './asset-hydration-
|
|
3
|
-
import { V as VectorSceneItem } from './types-
|
|
4
|
-
import { V as VectorViewportAssetKind,
|
|
5
|
-
export {
|
|
6
|
-
import { B as BoardComponentPosition, V as VectorToolDefinition, C as CanvasPlugin, a as VectorSelectionInspector } from './types-
|
|
7
|
-
export { b as CanvasPluginComponentProps, c as CanvasPluginContribution, d as CanvasPluginItemsChangeMiddlewareContext, e as CanvasPluginRenderContext, f as CanvuChromeActiveToolStyle, g as CanvuChromeContext, h as CanvuChromeContextValue, i as CanvuChromeSelectionStyleChange, j as CanvuPluginContext, k as CanvuPluginContextValue, l as CanvuPluginViewportSnapshot, m as CustomShapePlacementOptions, P as PlacementPreview, n as VectorCanvasSpacePosition, o as VectorSelectionInspectorProps, p as VectorViewport, q as VectorViewportHandle, r as VectorViewportProps, W as WorldPointerDownDetail, s as createCanvuPlugin, t as getBoardPositionStyle, u as useCanvuChromeContext, v as useCanvuDocumentContext, w as useCanvuPluginContext, x as useCanvuPluginContribution, y as useCanvuResolvedTools, z as useCanvuViewportContext } from './types-
|
|
1
|
+
import { I as IndexedDbImageStore } from './asset-hydration-DrTOgDdd.js';
|
|
2
|
+
export { H as HydratedSceneItemsWithAssetsResult, h as hydrateSceneItemsWithAssets } from './asset-hydration-DrTOgDdd.js';
|
|
3
|
+
import { V as VectorSceneItem } from './types-Bnq2HtHQ.js';
|
|
4
|
+
import { V as VectorViewportAssetKind, x as VectorViewportAssetStore } from './shape-builders-CsSXKCcs.js';
|
|
5
|
+
export { y as VectorViewportAssetHydrationRequest, z as VectorViewportAssetResolveRequest, A as VectorViewportAssetResolveResult, B as VectorViewportAssetUploadRequest, C as VectorViewportAssetUploadResult } from './shape-builders-CsSXKCcs.js';
|
|
6
|
+
import { B as BoardComponentPosition, V as VectorToolDefinition, C as CanvasPlugin, a as VectorSelectionInspector } from './types-B6PAYKzx.js';
|
|
7
|
+
export { b as CanvasPluginComponentProps, c as CanvasPluginContribution, d as CanvasPluginItemsChangeMiddlewareContext, e as CanvasPluginRenderContext, f as CanvuChromeActiveToolStyle, g as CanvuChromeContext, h as CanvuChromeContextValue, i as CanvuChromeSelectionStyleChange, j as CanvuPluginContext, k as CanvuPluginContextValue, l as CanvuPluginViewportSnapshot, m as CustomShapePlacementOptions, P as PlacementPreview, n as VectorCanvasSpacePosition, o as VectorSelectionInspectorProps, p as VectorViewport, q as VectorViewportHandle, r as VectorViewportProps, W as WorldPointerDownDetail, s as createCanvuPlugin, t as getBoardPositionStyle, u as useCanvuChromeContext, v as useCanvuDocumentContext, w as useCanvuPluginContext, x as useCanvuPluginContribution, y as useCanvuResolvedTools, z as useCanvuViewportContext } from './types-B6PAYKzx.js';
|
|
8
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
9
|
import * as react from 'react';
|
|
10
10
|
import { CSSProperties, ReactNode, ReactElement, SVGProps } from 'react';
|
|
11
|
-
import { C as Camera2D } from './camera-
|
|
12
|
-
import { V as VectorCanvasPersistenceAdapter, a as VectorCanvasRemoteAdapter } from './types-
|
|
13
|
-
export { b as VectorCanvasSnapshot } from './types-
|
|
11
|
+
import { C as Camera2D } from './camera-AoTwBSoE.js';
|
|
12
|
+
import { V as VectorCanvasPersistenceAdapter, a as VectorCanvasRemoteAdapter } from './types-zmUah-vP.js';
|
|
13
|
+
export { b as VectorCanvasSnapshot } from './types-zmUah-vP.js';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Extra context for each item created by {@link ingestAssetFilesToSceneItems}.
|
|
@@ -425,7 +425,7 @@ declare function ShapeContextMenu({ x, y, allSelectedLocked, onClose, onToggleLo
|
|
|
425
425
|
* Tool ids shown in the overflow menu at the end of the default toolbar (horizontal layout).
|
|
426
426
|
* Order: shapes, marker, laser, image.
|
|
427
427
|
*/
|
|
428
|
-
declare const DEFAULT_OVERFLOW_TOOL_IDS: readonly ["rect", "ellipse", "line", "marker", "laser", "image"];
|
|
428
|
+
declare const DEFAULT_OVERFLOW_TOOL_IDS: readonly ["rect", "ellipse", "architectural-cloud", "line", "marker", "laser", "image"];
|
|
429
429
|
/**
|
|
430
430
|
* Opinionated default tool strip using [Lucide](https://lucide.dev) icons.
|
|
431
431
|
* Pass a subset or your own list via {@link VectorToolbarProps.tools}.
|
|
@@ -437,6 +437,7 @@ declare function IconHand(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
|
437
437
|
declare function IconSelect(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
438
438
|
declare function IconRect(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
439
439
|
declare function IconEllipse(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
440
|
+
declare function IconArchitecturalCloud(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
440
441
|
declare function IconLine(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
441
442
|
declare function IconArrow(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
442
443
|
declare function IconDraw(props: IconProps): react_jsx_runtime.JSX.Element;
|
|
@@ -668,6 +669,7 @@ declare const HandBinding: ToolBinding;
|
|
|
668
669
|
declare const SelectBinding: ToolBinding;
|
|
669
670
|
declare const RectBinding: ToolBinding;
|
|
670
671
|
declare const EllipseBinding: ToolBinding;
|
|
672
|
+
declare const ArchitecturalCloudBinding: ToolBinding;
|
|
671
673
|
declare const LineBinding: ToolBinding;
|
|
672
674
|
declare const ArrowBinding: ToolBinding;
|
|
673
675
|
declare const DrawBinding: ToolBinding;
|
|
@@ -684,6 +686,7 @@ type VectorToolbarWithStatics = ((props: VectorToolbarProps) => ReactElement) &
|
|
|
684
686
|
Select: typeof SelectBinding;
|
|
685
687
|
Rect: typeof RectBinding;
|
|
686
688
|
Ellipse: typeof EllipseBinding;
|
|
689
|
+
ArchitecturalCloud: typeof ArchitecturalCloudBinding;
|
|
687
690
|
Line: typeof LineBinding;
|
|
688
691
|
Arrow: typeof ArrowBinding;
|
|
689
692
|
Draw: typeof DrawBinding;
|
|
@@ -703,4 +706,4 @@ type VectorToolbarWithStatics = ((props: VectorToolbarProps) => ReactElement) &
|
|
|
703
706
|
*/
|
|
704
707
|
declare const VectorToolbar: VectorToolbarWithStatics;
|
|
705
708
|
|
|
706
|
-
export { BoardComponentPosition, CanvasPlugin, type CreateLocalStoragePersistenceAdapterOptions, type CreateToolPluginOptions, DEFAULT_OVERFLOW_TOOL_IDS, DEFAULT_VECTOR_CANVAS_STORAGE_KEY, DEFAULT_VECTOR_TOOLS, IconArrow, IconDraw, IconEllipse, IconHand, IconImage, IconLaser, IconLine, IconRect, IconSelect, IconText, ImagesMenu, type ImagesMenuLabels, type ImagesMenuProps, type IngestAssetFileError, type IngestAssetFilesToSceneItemsOptions, type IngestAssetFilesToSceneItemsResult, type IngestedAssetItemContext, NavMenu, type NavMenuMinimapProps, type NavMenuProps, type NavMenuUndoRedoProps, type NavMenuZoomControlsProps, ShapeContextMenu, type ShapeContextMenuProps, type UseVectorCanvasDocumentOptions, type UseVectorCanvasDocumentResult, VectorCanvas, VectorCanvasBody, VectorCanvasHeader, VectorCanvasMain, VectorCanvasPersistenceAdapter, VectorCanvasRemoteAdapter, VectorCanvasRoot, type VectorCanvasSlotProps, type VectorCanvasSpaceProps, VectorCanvasToolbar, type VectorCanvasToolbarProps, VectorCanvasViewportSurface, VectorSelectionInspector, VectorToolDefinition, VectorToolbar, type VectorToolbarOverflowProps, type VectorToolbarProps, type VectorToolbarRenderContext, type VectorToolbarToolLockProps, type VectorToolbarToolProps, VectorViewportAssetKind, VectorViewportAssetStore, createIndexedDbPersistenceAdapter, createLocalStoragePersistenceAdapter, createNoopPersistenceAdapter, createToolPlugin, cursorForVectorToolId, ingestAssetFilesToSceneItems, useVectorCanvasDocument };
|
|
709
|
+
export { BoardComponentPosition, CanvasPlugin, type CreateLocalStoragePersistenceAdapterOptions, type CreateToolPluginOptions, DEFAULT_OVERFLOW_TOOL_IDS, DEFAULT_VECTOR_CANVAS_STORAGE_KEY, DEFAULT_VECTOR_TOOLS, IconArchitecturalCloud, IconArrow, IconDraw, IconEllipse, IconHand, IconImage, IconLaser, IconLine, IconRect, IconSelect, IconText, ImagesMenu, type ImagesMenuLabels, type ImagesMenuProps, type IngestAssetFileError, type IngestAssetFilesToSceneItemsOptions, type IngestAssetFilesToSceneItemsResult, type IngestedAssetItemContext, NavMenu, type NavMenuMinimapProps, type NavMenuProps, type NavMenuUndoRedoProps, type NavMenuZoomControlsProps, ShapeContextMenu, type ShapeContextMenuProps, type UseVectorCanvasDocumentOptions, type UseVectorCanvasDocumentResult, VectorCanvas, VectorCanvasBody, VectorCanvasHeader, VectorCanvasMain, VectorCanvasPersistenceAdapter, VectorCanvasRemoteAdapter, VectorCanvasRoot, type VectorCanvasSlotProps, type VectorCanvasSpaceProps, VectorCanvasToolbar, type VectorCanvasToolbarProps, VectorCanvasViewportSurface, VectorSelectionInspector, VectorToolDefinition, VectorToolbar, type VectorToolbarOverflowProps, type VectorToolbarProps, type VectorToolbarRenderContext, type VectorToolbarToolLockProps, type VectorToolbarToolProps, VectorViewportAssetKind, VectorViewportAssetStore, createIndexedDbPersistenceAdapter, createLocalStoragePersistenceAdapter, createNoopPersistenceAdapter, createToolPlugin, cursorForVectorToolId, ingestAssetFilesToSceneItems, useVectorCanvasDocument };
|
package/dist/react.js
CHANGED
|
@@ -174,6 +174,8 @@ __export(shape_builders_exports, {
|
|
|
174
174
|
DEFAULT_TEXT_FONT_SIZE: () => DEFAULT_TEXT_FONT_SIZE,
|
|
175
175
|
applyStrokeToItem: () => applyStrokeToItem,
|
|
176
176
|
applyTextDraftWhileEditing: () => applyTextDraftWhileEditing,
|
|
177
|
+
buildArchitecturalCloudPathD: () => buildArchitecturalCloudPathD,
|
|
178
|
+
buildArchitecturalCloudSvg: () => buildArchitecturalCloudSvg,
|
|
177
179
|
buildArrowSvg: () => buildArrowSvg,
|
|
178
180
|
buildDrawDotSvg: () => buildDrawDotSvg,
|
|
179
181
|
buildEllipseSvg: () => buildEllipseSvg,
|
|
@@ -185,6 +187,7 @@ __export(shape_builders_exports, {
|
|
|
185
187
|
buildTextSvg: () => buildTextSvg,
|
|
186
188
|
computeFreehandSvgPayload: () => computeFreehandSvgPayload,
|
|
187
189
|
computeStraightArrowGeometry: () => computeStraightArrowGeometry,
|
|
190
|
+
createArchitecturalCloudItem: () => createArchitecturalCloudItem,
|
|
188
191
|
createDrawDotItem: () => createDrawDotItem,
|
|
189
192
|
createEllipseItem: () => createEllipseItem,
|
|
190
193
|
createFreehandStrokeItem: () => createFreehandStrokeItem,
|
|
@@ -276,6 +279,41 @@ function resolveStrokeStyle(item) {
|
|
|
276
279
|
function strokeOpacityAttr(style) {
|
|
277
280
|
return style.strokeOpacity != null ? ` stroke-opacity="${style.strokeOpacity}"` : "";
|
|
278
281
|
}
|
|
282
|
+
function clampNumber(value, min, max) {
|
|
283
|
+
return Math.min(max, Math.max(min, value));
|
|
284
|
+
}
|
|
285
|
+
function svgNumber(value) {
|
|
286
|
+
if (!Number.isFinite(value)) return "0";
|
|
287
|
+
return Number(value.toFixed(3)).toString();
|
|
288
|
+
}
|
|
289
|
+
function architecturalCloudScallopCount(length, depth) {
|
|
290
|
+
if (length <= 1e-6) return 0;
|
|
291
|
+
return Math.max(1, Math.round(length / Math.max(depth * 2.05, 8)));
|
|
292
|
+
}
|
|
293
|
+
function appendHorizontalScallops(segments, startX, endX, y, controlY, count) {
|
|
294
|
+
if (count <= 0) return;
|
|
295
|
+
const step = (endX - startX) / count;
|
|
296
|
+
for (let index = 1; index <= count; index += 1) {
|
|
297
|
+
const x0 = startX + step * (index - 1);
|
|
298
|
+
const x1 = index === count ? endX : startX + step * index;
|
|
299
|
+
const cx = (x0 + x1) / 2;
|
|
300
|
+
segments.push(
|
|
301
|
+
`Q${svgNumber(cx)} ${svgNumber(controlY)} ${svgNumber(x1)} ${svgNumber(y)}`
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
function appendVerticalScallops(segments, startY, endY, x, controlX, count) {
|
|
306
|
+
if (count <= 0) return;
|
|
307
|
+
const step = (endY - startY) / count;
|
|
308
|
+
for (let index = 1; index <= count; index += 1) {
|
|
309
|
+
const y0 = startY + step * (index - 1);
|
|
310
|
+
const y1 = index === count ? endY : startY + step * index;
|
|
311
|
+
const cy = (y0 + y1) / 2;
|
|
312
|
+
segments.push(
|
|
313
|
+
`Q${svgNumber(controlX)} ${svgNumber(cy)} ${svgNumber(x)} ${svgNumber(y1)}`
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
279
317
|
function buildRectSvg(width, height, style = DEFAULT_STROKE_STYLE) {
|
|
280
318
|
return `<rect width="${width}" height="${height}" fill="none" stroke="${style.stroke}" stroke-width="${style.strokeWidth}" rx="4"${strokeOpacityAttr(style)} />`;
|
|
281
319
|
}
|
|
@@ -284,6 +322,63 @@ function buildEllipseSvg(width, height, style = DEFAULT_STROKE_STYLE) {
|
|
|
284
322
|
const ry = height / 2;
|
|
285
323
|
return `<ellipse cx="${rx}" cy="${ry}" rx="${rx}" ry="${ry}" fill="none" stroke="${style.stroke}" stroke-width="${style.strokeWidth}"${strokeOpacityAttr(style)} />`;
|
|
286
324
|
}
|
|
325
|
+
function buildArchitecturalCloudPathD(width, height, strokeWidth = DEFAULT_STROKE_STYLE.strokeWidth) {
|
|
326
|
+
const w = Math.max(0, width);
|
|
327
|
+
const h = Math.max(0, height);
|
|
328
|
+
if (w <= 0 || h <= 0) return "";
|
|
329
|
+
const inset = Math.min(w / 2, h / 2, Math.max(0.5, strokeWidth / 2));
|
|
330
|
+
const x0 = inset;
|
|
331
|
+
const y0 = inset;
|
|
332
|
+
const x1 = Math.max(x0, w - inset);
|
|
333
|
+
const y1 = Math.max(y0, h - inset);
|
|
334
|
+
const innerW = Math.max(0, x1 - x0);
|
|
335
|
+
const innerH = Math.max(0, y1 - y0);
|
|
336
|
+
if (innerW <= 0 || innerH <= 0) return "";
|
|
337
|
+
const maxDepth = Math.max(0.5, Math.min(innerW, innerH) * 0.18);
|
|
338
|
+
const depth = clampNumber(Math.min(w, h) * 0.08, 2, Math.min(12, maxDepth));
|
|
339
|
+
const corner = Math.min(depth * 1.2, innerW / 2, innerH / 2);
|
|
340
|
+
const topStart = x0 + corner;
|
|
341
|
+
const topEnd = x1 - corner;
|
|
342
|
+
const rightStart = y0 + corner;
|
|
343
|
+
const rightEnd = y1 - corner;
|
|
344
|
+
const bottomStart = x1 - corner;
|
|
345
|
+
const bottomEnd = x0 + corner;
|
|
346
|
+
const leftStart = y1 - corner;
|
|
347
|
+
const leftEnd = y0 + corner;
|
|
348
|
+
const topCount = architecturalCloudScallopCount(topEnd - topStart, depth);
|
|
349
|
+
const rightCount = architecturalCloudScallopCount(rightEnd - rightStart, depth);
|
|
350
|
+
const bottomCount = architecturalCloudScallopCount(bottomStart - bottomEnd, depth);
|
|
351
|
+
const leftCount = architecturalCloudScallopCount(leftStart - leftEnd, depth);
|
|
352
|
+
const segments = [`M${svgNumber(topStart)} ${svgNumber(y0)}`];
|
|
353
|
+
appendHorizontalScallops(segments, topStart, topEnd, y0, y0 + depth, topCount);
|
|
354
|
+
segments.push(
|
|
355
|
+
`Q${svgNumber(x1)} ${svgNumber(y0)} ${svgNumber(x1)} ${svgNumber(rightStart)}`
|
|
356
|
+
);
|
|
357
|
+
appendVerticalScallops(segments, rightStart, rightEnd, x1, x1 - depth, rightCount);
|
|
358
|
+
segments.push(
|
|
359
|
+
`Q${svgNumber(x1)} ${svgNumber(y1)} ${svgNumber(bottomStart)} ${svgNumber(y1)}`
|
|
360
|
+
);
|
|
361
|
+
appendHorizontalScallops(
|
|
362
|
+
segments,
|
|
363
|
+
bottomStart,
|
|
364
|
+
bottomEnd,
|
|
365
|
+
y1,
|
|
366
|
+
y1 - depth,
|
|
367
|
+
bottomCount
|
|
368
|
+
);
|
|
369
|
+
segments.push(
|
|
370
|
+
`Q${svgNumber(x0)} ${svgNumber(y1)} ${svgNumber(x0)} ${svgNumber(leftStart)}`
|
|
371
|
+
);
|
|
372
|
+
appendVerticalScallops(segments, leftStart, leftEnd, x0, x0 + depth, leftCount);
|
|
373
|
+
segments.push(
|
|
374
|
+
`Q${svgNumber(x0)} ${svgNumber(y0)} ${svgNumber(topStart)} ${svgNumber(y0)} Z`
|
|
375
|
+
);
|
|
376
|
+
return segments.join(" ");
|
|
377
|
+
}
|
|
378
|
+
function buildArchitecturalCloudSvg(width, height, style = DEFAULT_STROKE_STYLE) {
|
|
379
|
+
const d = buildArchitecturalCloudPathD(width, height, style.strokeWidth);
|
|
380
|
+
return `<path d="${d}" fill="none" stroke="${style.stroke}" stroke-width="${style.strokeWidth}" stroke-linecap="round" stroke-linejoin="round"${strokeOpacityAttr(style)} />`;
|
|
381
|
+
}
|
|
287
382
|
function buildLineSvg(line, style = DEFAULT_STROKE_STYLE) {
|
|
288
383
|
return `<line x1="${line.x1}" y1="${line.y1}" x2="${line.x2}" y2="${line.y2}" stroke="${style.stroke}" stroke-width="${style.strokeWidth}"${strokeOpacityAttr(style)} />`;
|
|
289
384
|
}
|
|
@@ -426,6 +521,13 @@ function rebuildItemSvg(item) {
|
|
|
426
521
|
childrenSvg: buildEllipseSvg(b.width, b.height, style)
|
|
427
522
|
};
|
|
428
523
|
}
|
|
524
|
+
if (k === "architectural-cloud") {
|
|
525
|
+
const b = normalizeRect(item.bounds);
|
|
526
|
+
return {
|
|
527
|
+
...item,
|
|
528
|
+
childrenSvg: buildArchitecturalCloudSvg(b.width, b.height, style)
|
|
529
|
+
};
|
|
530
|
+
}
|
|
429
531
|
if ((k === "line" || k === "arrow") && item.line) {
|
|
430
532
|
const line = item.line;
|
|
431
533
|
const childrenSvg = k === "arrow" ? buildArrowSvg(item.id, line, style) : buildLineSvg(line, style);
|
|
@@ -538,6 +640,21 @@ function createEllipseItem(id, bounds, style) {
|
|
|
538
640
|
childrenSvg: ""
|
|
539
641
|
});
|
|
540
642
|
}
|
|
643
|
+
function createArchitecturalCloudItem(id, bounds, style) {
|
|
644
|
+
const r = normalizeRect(bounds);
|
|
645
|
+
const s = { ...DEFAULT_STROKE_STYLE, ...style };
|
|
646
|
+
return rebuildItemSvg({
|
|
647
|
+
id,
|
|
648
|
+
x: r.x,
|
|
649
|
+
y: r.y,
|
|
650
|
+
bounds: { ...r },
|
|
651
|
+
toolKind: "architectural-cloud",
|
|
652
|
+
stroke: s.stroke,
|
|
653
|
+
strokeWidth: s.strokeWidth,
|
|
654
|
+
...s.strokeOpacity != null ? { strokeOpacity: s.strokeOpacity } : {},
|
|
655
|
+
childrenSvg: ""
|
|
656
|
+
});
|
|
657
|
+
}
|
|
541
658
|
function createLineItem(id, bounds, line, toolKind, style, arrowBind) {
|
|
542
659
|
const r = normalizeRect(bounds);
|
|
543
660
|
const s = { ...DEFAULT_STROKE_STYLE, ...style };
|
|
@@ -3042,6 +3159,9 @@ function IconRect(props) {
|
|
|
3042
3159
|
function IconEllipse(props) {
|
|
3043
3160
|
return /* @__PURE__ */ jsx("svg", { ...base, ...props, "aria-hidden": true, children: /* @__PURE__ */ jsx("ellipse", { cx: "12", cy: "12", rx: "9", ry: "6" }) });
|
|
3044
3161
|
}
|
|
3162
|
+
function IconArchitecturalCloud(props) {
|
|
3163
|
+
return /* @__PURE__ */ jsx("svg", { ...base, ...props, "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M6.5 7.5Q4.4 7.5 4.4 9.4Q3 9.9 3 11.6Q3 13.5 5.2 13.5Q5.8 16 8.3 15.2Q9.2 17.2 11.3 15.7Q12.8 17 14.3 15.5Q16.5 16.4 17 14Q20.7 13.7 20.2 10.9Q21 8.5 18 8.3Q17.2 5.9 14.8 6.7Q13.2 5.2 11.5 6.5Q9.1 5.1 7.8 7.2Q7.2 7.2 6.5 7.5Z" }) });
|
|
3164
|
+
}
|
|
3045
3165
|
function IconLine(props) {
|
|
3046
3166
|
return /* @__PURE__ */ jsx("svg", { ...base, ...props, "aria-hidden": true, children: /* @__PURE__ */ jsx("line", { x1: "5", y1: "19", x2: "19", y2: "5" }) });
|
|
3047
3167
|
}
|
|
@@ -3086,6 +3206,7 @@ var ic = { size: 20, strokeWidth: 2 };
|
|
|
3086
3206
|
var DEFAULT_OVERFLOW_TOOL_IDS = [
|
|
3087
3207
|
"rect",
|
|
3088
3208
|
"ellipse",
|
|
3209
|
+
"architectural-cloud",
|
|
3089
3210
|
"line",
|
|
3090
3211
|
"marker",
|
|
3091
3212
|
"laser",
|
|
@@ -3116,6 +3237,13 @@ var DEFAULT_VECTOR_TOOLS = [
|
|
|
3116
3237
|
icon: /* @__PURE__ */ jsx(Circle, { ...ic, "aria-hidden": true }),
|
|
3117
3238
|
shortcutHint: "O"
|
|
3118
3239
|
},
|
|
3240
|
+
{
|
|
3241
|
+
id: "architectural-cloud",
|
|
3242
|
+
label: "Nuvem arquitetural",
|
|
3243
|
+
tooltipLabel: "Architectural cloud",
|
|
3244
|
+
icon: /* @__PURE__ */ jsx(IconArchitecturalCloud, { "aria-hidden": true }),
|
|
3245
|
+
shortcutHint: "C"
|
|
3246
|
+
},
|
|
3119
3247
|
{
|
|
3120
3248
|
id: "line",
|
|
3121
3249
|
label: "Line",
|
|
@@ -3193,7 +3321,7 @@ function normalizeHex(stroke) {
|
|
|
3193
3321
|
return "#2563eb";
|
|
3194
3322
|
}
|
|
3195
3323
|
function isStylableKind(tk) {
|
|
3196
|
-
return tk === "rect" || tk === "ellipse" || tk === "line" || tk === "arrow" || tk === "draw" || tk === "pencil" || tk === "brush" || tk === "marker" || tk === "text";
|
|
3324
|
+
return tk === "rect" || tk === "ellipse" || tk === "architectural-cloud" || tk === "line" || tk === "arrow" || tk === "draw" || tk === "pencil" || tk === "brush" || tk === "marker" || tk === "text";
|
|
3197
3325
|
}
|
|
3198
3326
|
function VectorSelectionInspector({
|
|
3199
3327
|
items: itemsProp,
|
|
@@ -4554,6 +4682,7 @@ var HandBinding = makeToolBinding("hand");
|
|
|
4554
4682
|
var SelectBinding = makeToolBinding("select");
|
|
4555
4683
|
var RectBinding = makeToolBinding("rect");
|
|
4556
4684
|
var EllipseBinding = makeToolBinding("ellipse");
|
|
4685
|
+
var ArchitecturalCloudBinding = makeToolBinding("architectural-cloud");
|
|
4557
4686
|
var LineBinding = makeToolBinding("line");
|
|
4558
4687
|
var ArrowBinding = makeToolBinding("arrow");
|
|
4559
4688
|
var DrawBinding = makeToolBinding("draw");
|
|
@@ -4573,6 +4702,7 @@ var VectorToolbar = Object.assign(
|
|
|
4573
4702
|
Select: SelectBinding,
|
|
4574
4703
|
Rect: RectBinding,
|
|
4575
4704
|
Ellipse: EllipseBinding,
|
|
4705
|
+
ArchitecturalCloud: ArchitecturalCloudBinding,
|
|
4576
4706
|
Line: LineBinding,
|
|
4577
4707
|
Arrow: ArrowBinding,
|
|
4578
4708
|
Draw: DrawBinding,
|
|
@@ -5302,7 +5432,7 @@ function isArrowBindTarget(item) {
|
|
|
5302
5432
|
if (item.locked) return false;
|
|
5303
5433
|
const k = item.toolKind;
|
|
5304
5434
|
if (!k) return false;
|
|
5305
|
-
return k === "rect" || k === "ellipse" || k === "text" || k === "image" || k === "custom";
|
|
5435
|
+
return k === "rect" || k === "ellipse" || k === "architectural-cloud" || k === "text" || k === "image" || k === "custom";
|
|
5306
5436
|
}
|
|
5307
5437
|
function closestPointOnShapeBoundaryLocal(item, lx, ly, w, h) {
|
|
5308
5438
|
if (item.toolKind === "ellipse") {
|
|
@@ -5641,6 +5771,16 @@ function resizeItemByHandle(item, start, handle, currentWorld) {
|
|
|
5641
5771
|
childrenSvg: buildEllipseSvg(nb.width, nb.height, style)
|
|
5642
5772
|
};
|
|
5643
5773
|
}
|
|
5774
|
+
if (k === "architectural-cloud") {
|
|
5775
|
+
const style = resolveStrokeStyle(item);
|
|
5776
|
+
return {
|
|
5777
|
+
...item,
|
|
5778
|
+
x: nb.x,
|
|
5779
|
+
y: nb.y,
|
|
5780
|
+
bounds: nb,
|
|
5781
|
+
childrenSvg: buildArchitecturalCloudSvg(nb.width, nb.height, style)
|
|
5782
|
+
};
|
|
5783
|
+
}
|
|
5644
5784
|
if (k === "text" && item.text !== void 0) {
|
|
5645
5785
|
const sfw = Math.max(sb.width, 1e-6);
|
|
5646
5786
|
const sfh = Math.max(sb.height, 1e-6);
|
|
@@ -6183,7 +6323,7 @@ function InteractionOverlay({
|
|
|
6183
6323
|
vectorEffect: "non-scaling-stroke"
|
|
6184
6324
|
}
|
|
6185
6325
|
);
|
|
6186
|
-
} else if (placementPreview.kind === "rect" || placementPreview.kind === "ellipse") {
|
|
6326
|
+
} else if (placementPreview.kind === "rect" || placementPreview.kind === "ellipse" || placementPreview.kind === "architectural-cloud") {
|
|
6187
6327
|
const r = normalizeRect(placementPreview.rect);
|
|
6188
6328
|
preview = placementPreview.kind === "rect" ? /* @__PURE__ */ jsx(
|
|
6189
6329
|
"rect",
|
|
@@ -6198,7 +6338,7 @@ function InteractionOverlay({
|
|
|
6198
6338
|
strokeDasharray: dashPattern,
|
|
6199
6339
|
vectorEffect: "non-scaling-stroke"
|
|
6200
6340
|
}
|
|
6201
|
-
) : /* @__PURE__ */ jsx(
|
|
6341
|
+
) : placementPreview.kind === "ellipse" ? /* @__PURE__ */ jsx(
|
|
6202
6342
|
"ellipse",
|
|
6203
6343
|
{
|
|
6204
6344
|
cx: r.x + r.width / 2,
|
|
@@ -6211,7 +6351,19 @@ function InteractionOverlay({
|
|
|
6211
6351
|
strokeDasharray: dashPattern,
|
|
6212
6352
|
vectorEffect: "non-scaling-stroke"
|
|
6213
6353
|
}
|
|
6214
|
-
)
|
|
6354
|
+
) : /* @__PURE__ */ jsx("g", { transform: `translate(${r.x}, ${r.y})`, children: /* @__PURE__ */ jsx(
|
|
6355
|
+
"path",
|
|
6356
|
+
{
|
|
6357
|
+
d: buildArchitecturalCloudPathD(r.width, r.height, overlayStrokePx),
|
|
6358
|
+
fill: "none",
|
|
6359
|
+
stroke: "#64748b",
|
|
6360
|
+
strokeWidth: overlayStrokePx,
|
|
6361
|
+
strokeDasharray: dashPattern,
|
|
6362
|
+
strokeLinecap: "round",
|
|
6363
|
+
strokeLinejoin: "round",
|
|
6364
|
+
vectorEffect: "non-scaling-stroke"
|
|
6365
|
+
}
|
|
6366
|
+
) });
|
|
6215
6367
|
} else if (placementPreview.kind === "line" || placementPreview.kind === "arrow") {
|
|
6216
6368
|
const { start, end } = placementPreview;
|
|
6217
6369
|
const geometry = placementPreview.kind === "arrow" ? computeStraightArrowGeometry(
|
|
@@ -6784,6 +6936,7 @@ function cursorForVectorToolId(toolId) {
|
|
|
6784
6936
|
return "default";
|
|
6785
6937
|
case "rect":
|
|
6786
6938
|
case "ellipse":
|
|
6939
|
+
case "architectural-cloud":
|
|
6787
6940
|
case "line":
|
|
6788
6941
|
case "arrow":
|
|
6789
6942
|
return "crosshair";
|
|
@@ -6834,7 +6987,7 @@ function replaceItem(items, id, next) {
|
|
|
6834
6987
|
}
|
|
6835
6988
|
function supportsResizeHandles(item) {
|
|
6836
6989
|
const k = item?.toolKind;
|
|
6837
|
-
if (k === "rect" || k === "ellipse" || k === "line" || k === "arrow" || k === "image" || k === "text") {
|
|
6990
|
+
if (k === "rect" || k === "ellipse" || k === "architectural-cloud" || k === "line" || k === "arrow" || k === "image" || k === "text") {
|
|
6838
6991
|
return true;
|
|
6839
6992
|
}
|
|
6840
6993
|
if ((k === "draw" || k === "pencil" || k === "brush" || k === "marker") && item?.pathPointsLocal && item.pathPointsLocal.length > 0) {
|
|
@@ -6891,6 +7044,9 @@ function defaultPlacementWorld(tool, center) {
|
|
|
6891
7044
|
if (tool === "ellipse") {
|
|
6892
7045
|
return { raw: { x: cx - 70, y: cy - 45, width: 140, height: 90 } };
|
|
6893
7046
|
}
|
|
7047
|
+
if (tool === "architectural-cloud") {
|
|
7048
|
+
return { raw: { x: cx - 90, y: cy - 50, width: 180, height: 100 } };
|
|
7049
|
+
}
|
|
6894
7050
|
const a = { x: cx - 50, y: cy };
|
|
6895
7051
|
const b = { x: cx + 50, y: cy };
|
|
6896
7052
|
return {
|
|
@@ -8794,7 +8950,7 @@ var VectorViewport = forwardRef(
|
|
|
8794
8950
|
return;
|
|
8795
8951
|
}
|
|
8796
8952
|
const cp = customPlacementRef.current;
|
|
8797
|
-
if (tool === "rect" || tool === "ellipse" || tool === "line" || tool === "arrow" || cp && tool === cp.toolId) {
|
|
8953
|
+
if (tool === "rect" || tool === "ellipse" || tool === "architectural-cloud" || tool === "line" || tool === "arrow" || cp && tool === cp.toolId) {
|
|
8798
8954
|
dragStateRef.current = {
|
|
8799
8955
|
kind: "place",
|
|
8800
8956
|
tool,
|
|
@@ -9214,6 +9370,11 @@ var VectorViewport = forwardRef(
|
|
|
9214
9370
|
setPlacementPreview({ kind: "rect", rect: rectFromCorners(a, b) });
|
|
9215
9371
|
} else if (st.tool === "ellipse") {
|
|
9216
9372
|
setPlacementPreview({ kind: "ellipse", rect: rectFromCorners(a, b) });
|
|
9373
|
+
} else if (st.tool === "architectural-cloud") {
|
|
9374
|
+
setPlacementPreview({
|
|
9375
|
+
kind: "architectural-cloud",
|
|
9376
|
+
rect: rectFromCorners(a, b)
|
|
9377
|
+
});
|
|
9217
9378
|
} else if (st.tool === "line") {
|
|
9218
9379
|
setPlacementPreview({
|
|
9219
9380
|
kind: "line",
|
|
@@ -9472,6 +9633,12 @@ var VectorViewport = forwardRef(
|
|
|
9472
9633
|
} else if (st.tool === "ellipse") {
|
|
9473
9634
|
change([...itemsRef.current, createEllipseItem(id, raw, pen)]);
|
|
9474
9635
|
setEffectiveSelectedIdsRef.current([id]);
|
|
9636
|
+
} else if (st.tool === "architectural-cloud") {
|
|
9637
|
+
change([
|
|
9638
|
+
...itemsRef.current,
|
|
9639
|
+
createArchitecturalCloudItem(id, raw, pen)
|
|
9640
|
+
]);
|
|
9641
|
+
setEffectiveSelectedIdsRef.current([id]);
|
|
9475
9642
|
} else if (st.tool === "line" || st.tool === "arrow") {
|
|
9476
9643
|
const line = lineEndpointsToLocal(raw, lineA, lineB);
|
|
9477
9644
|
change([
|
|
@@ -9788,6 +9955,6 @@ var VectorViewport = forwardRef(
|
|
|
9788
9955
|
);
|
|
9789
9956
|
VectorViewport.displayName = "VectorViewport";
|
|
9790
9957
|
|
|
9791
|
-
export { CanvuChromeContext, CanvuPluginContext, DEFAULT_OVERFLOW_TOOL_IDS, DEFAULT_VECTOR_CANVAS_STORAGE_KEY, DEFAULT_VECTOR_TOOLS, IconArrow, IconDraw, IconEllipse, IconHand, IconImage, IconLaser, IconLine, IconRect, IconSelect, IconText, ImagesMenu, NavMenu, ShapeContextMenu, VectorCanvas, VectorCanvasBody, VectorCanvasHeader, VectorCanvasMain, VectorCanvasRoot, VectorCanvasToolbar, VectorCanvasViewportSurface, VectorSelectionInspector, VectorToolbar, VectorViewport, createCanvuPlugin, createIndexedDbPersistenceAdapter, createLocalStoragePersistenceAdapter, createNoopPersistenceAdapter, createToolPlugin, cursorForVectorToolId, getBoardPositionStyle, hydrateSceneItemsWithAssets, ingestAssetFilesToSceneItems, useCanvuChromeContext, useCanvuDocumentContext, useCanvuPluginContext, useCanvuPluginContribution, useCanvuResolvedTools, useCanvuViewportContext, useVectorCanvasDocument };
|
|
9958
|
+
export { CanvuChromeContext, CanvuPluginContext, DEFAULT_OVERFLOW_TOOL_IDS, DEFAULT_VECTOR_CANVAS_STORAGE_KEY, DEFAULT_VECTOR_TOOLS, IconArchitecturalCloud, IconArrow, IconDraw, IconEllipse, IconHand, IconImage, IconLaser, IconLine, IconRect, IconSelect, IconText, ImagesMenu, NavMenu, ShapeContextMenu, VectorCanvas, VectorCanvasBody, VectorCanvasHeader, VectorCanvasMain, VectorCanvasRoot, VectorCanvasToolbar, VectorCanvasViewportSurface, VectorSelectionInspector, VectorToolbar, VectorViewport, createCanvuPlugin, createIndexedDbPersistenceAdapter, createLocalStoragePersistenceAdapter, createNoopPersistenceAdapter, createToolPlugin, cursorForVectorToolId, getBoardPositionStyle, hydrateSceneItemsWithAssets, ingestAssetFilesToSceneItems, useCanvuChromeContext, useCanvuDocumentContext, useCanvuPluginContext, useCanvuPluginContribution, useCanvuResolvedTools, useCanvuViewportContext, useVectorCanvasDocument };
|
|
9792
9959
|
//# sourceMappingURL=react.js.map
|
|
9793
9960
|
//# sourceMappingURL=react.js.map
|