canvu-react 0.3.7 → 0.3.9
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/README.md +192 -0
- package/dist/chatbot.d.cts +1 -1
- package/dist/chatbot.d.ts +1 -1
- package/dist/index.cjs +32 -144
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +32 -144
- package/dist/index.js.map +1 -1
- package/dist/native.cjs +31 -109
- package/dist/native.cjs.map +1 -1
- package/dist/native.js +31 -109
- package/dist/native.js.map +1 -1
- package/dist/react.cjs +1449 -1353
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +147 -4
- package/dist/react.d.ts +147 -4
- package/dist/react.js +1449 -1354
- package/dist/react.js.map +1 -1
- package/dist/realtime.cjs +244 -11
- package/dist/realtime.cjs.map +1 -1
- package/dist/realtime.d.cts +20 -7
- package/dist/realtime.d.ts +20 -7
- package/dist/realtime.js +244 -12
- package/dist/realtime.js.map +1 -1
- package/dist/tldraw.cjs +30 -142
- package/dist/tldraw.cjs.map +1 -1
- package/dist/tldraw.js +30 -142
- package/dist/tldraw.js.map +1 -1
- package/dist/{types-B_rv7p8b.d.cts → types-BtLGGw0r.d.cts} +126 -1
- package/dist/{types-BCtWx3zP.d.ts → types-ChnTSRSe.d.ts} +126 -1
- package/package.json +1 -1
package/dist/react.d.cts
CHANGED
|
@@ -1,14 +1,157 @@
|
|
|
1
|
-
import { V as
|
|
2
|
-
|
|
1
|
+
import { V as VectorSceneItem } from './types-CB0TZZuk.cjs';
|
|
2
|
+
import { V as VectorViewportAssetKind, a as VectorViewportAssetStore, b as VectorToolDefinition, C as CanvasPlugin, B as BoardComponentPosition } from './types-BtLGGw0r.cjs';
|
|
3
|
+
export { c as CanvasPluginComponentProps, d as CanvasPluginContribution, e as CanvasPluginItemsChangeMiddlewareContext, f as CanvasPluginRenderContext, g as CanvuChromeActiveToolStyle, h as CanvuChromeContext, i as CanvuChromeContextValue, j as CanvuChromeSelectionStyleChange, k as CanvuPluginContext, l as CanvuPluginContextValue, m as CanvuPluginViewportSnapshot, n as CustomShapePlacementOptions, N as NavMenu, o as NavMenuProps, P as PlacementPreview, p as VectorCanvas, q as VectorCanvasBody, r as VectorCanvasHeader, s as VectorCanvasMain, t as VectorCanvasRoot, u as VectorCanvasSlotProps, v as VectorCanvasSpacePosition, w as VectorCanvasSpaceProps, x as VectorCanvasToolbar, y as VectorCanvasToolbarProps, z as VectorCanvasViewportSurface, A as VectorSelectionInspector, D as VectorSelectionInspectorProps, E as VectorViewport, F as VectorViewportAssetResolveRequest, G as VectorViewportAssetResolveResult, H as VectorViewportAssetUploadRequest, I as VectorViewportAssetUploadResult, J as VectorViewportHandle, K as VectorViewportProps, W as WorldPointerDownDetail, L as createCanvuPlugin, M as getBoardPositionStyle, O as useCanvuChromeContext, Q as useCanvuDocumentContext, R as useCanvuPluginContext, S as useCanvuPluginContribution, T as useCanvuResolvedTools, U as useCanvuViewportContext } from './types-BtLGGw0r.cjs';
|
|
3
4
|
import { V as VectorCanvasPersistenceAdapter, a as VectorCanvasRemoteAdapter } from './types-B58i5k-u.cjs';
|
|
4
5
|
export { b as VectorCanvasSnapshot } from './types-B58i5k-u.cjs';
|
|
5
|
-
import { V as VectorSceneItem } from './types-CB0TZZuk.cjs';
|
|
6
6
|
import * as react from 'react';
|
|
7
7
|
import { SVGProps, CSSProperties, ReactNode } from 'react';
|
|
8
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
9
|
import './camera-BwQjm5oh.cjs';
|
|
10
10
|
import './shape-builders-DxPoOecg.cjs';
|
|
11
11
|
|
|
12
|
+
declare class IndexedDbImageStore {
|
|
13
|
+
private dbPromise;
|
|
14
|
+
private getDb;
|
|
15
|
+
storeOriginal(blob: Blob): Promise<string>;
|
|
16
|
+
getOriginal(id: string): Promise<Blob | undefined>;
|
|
17
|
+
deleteOriginal(id: string): Promise<void>;
|
|
18
|
+
storeThumbnail(blob: Blob): Promise<string>;
|
|
19
|
+
getThumbnail(id: string): Promise<Blob | undefined>;
|
|
20
|
+
deleteThumbnail(id: string): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Extra context for each item created by {@link ingestAssetFilesToSceneItems}.
|
|
25
|
+
*
|
|
26
|
+
* Use this when you need to lock imported pages, assign custom ids, or attach
|
|
27
|
+
* additional metadata beyond the `pluginData` returned by {@link VectorViewportAssetStore.upload}.
|
|
28
|
+
*/
|
|
29
|
+
type IngestedAssetItemContext = {
|
|
30
|
+
file: File;
|
|
31
|
+
kind: VectorViewportAssetKind;
|
|
32
|
+
itemIndex: number;
|
|
33
|
+
pageNumber?: number;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Structured error produced while ingesting a file into scene items.
|
|
37
|
+
*
|
|
38
|
+
* The helper keeps partial success by default: one file can fail without
|
|
39
|
+
* preventing the remaining files from being converted.
|
|
40
|
+
*/
|
|
41
|
+
type IngestAssetFileError = {
|
|
42
|
+
file: File;
|
|
43
|
+
kind?: VectorViewportAssetKind;
|
|
44
|
+
error: unknown;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Options for {@link ingestAssetFilesToSceneItems}.
|
|
48
|
+
*
|
|
49
|
+
* This is the shared ingestion pipeline used by canvu's built-in file flow.
|
|
50
|
+
* Use it when files originate outside the viewport, such as:
|
|
51
|
+
*
|
|
52
|
+
* - custom upload dialogs
|
|
53
|
+
* - board/version creation flows
|
|
54
|
+
* - programmatic imports
|
|
55
|
+
* - legacy migrations
|
|
56
|
+
*
|
|
57
|
+
* Prefer passing `assetStore` directly to `VectorViewport` when the user is
|
|
58
|
+
* already interacting with canvu's native file picker or drag-and-drop UI.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const result = await ingestAssetFilesToSceneItems({
|
|
63
|
+
* files: Array.from(input.files ?? []),
|
|
64
|
+
* worldCenter: { x: 0, y: 0 },
|
|
65
|
+
* assetStore,
|
|
66
|
+
* decorateItem(item) {
|
|
67
|
+
* return {
|
|
68
|
+
* ...item,
|
|
69
|
+
* locked: true,
|
|
70
|
+
* };
|
|
71
|
+
* },
|
|
72
|
+
* });
|
|
73
|
+
*
|
|
74
|
+
* doc.onItemsChange([...doc.items, ...result.items]);
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
type IngestAssetFilesToSceneItemsOptions = {
|
|
78
|
+
files: readonly File[];
|
|
79
|
+
worldCenter: {
|
|
80
|
+
x: number;
|
|
81
|
+
y: number;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Optional binary persistence bridge shared with `VectorViewport`.
|
|
85
|
+
*
|
|
86
|
+
* When provided, `upload(...)` is called once per source file before canvu
|
|
87
|
+
* converts that file into one or more scene items.
|
|
88
|
+
*/
|
|
89
|
+
assetStore?: VectorViewportAssetStore;
|
|
90
|
+
/**
|
|
91
|
+
* Optional local blob store used to keep canvu's default image/PDF runtime
|
|
92
|
+
* behavior consistent across reload-safe persistence adapters.
|
|
93
|
+
*
|
|
94
|
+
* Omit this unless you need to share an existing store instance.
|
|
95
|
+
*/
|
|
96
|
+
imageStore?: IndexedDbImageStore;
|
|
97
|
+
/**
|
|
98
|
+
* Optional custom id factory for imported items.
|
|
99
|
+
*
|
|
100
|
+
* Defaults to `createShapeId()`.
|
|
101
|
+
*/
|
|
102
|
+
createId?: () => string;
|
|
103
|
+
/**
|
|
104
|
+
* Vertical gap between stacked PDF pages.
|
|
105
|
+
*
|
|
106
|
+
* Defaults to `16`, matching the built-in viewport flow.
|
|
107
|
+
*/
|
|
108
|
+
gapWorld?: number;
|
|
109
|
+
/**
|
|
110
|
+
* Offset step used when placing standalone raster images.
|
|
111
|
+
*
|
|
112
|
+
* Defaults to `48`, matching the built-in viewport flow.
|
|
113
|
+
*/
|
|
114
|
+
stepWorld?: number;
|
|
115
|
+
/**
|
|
116
|
+
* PDF rasterization scale forwarded to `pdfjs-dist`.
|
|
117
|
+
*
|
|
118
|
+
* Defaults to `1.5` for crisp zoom while keeping payloads reasonable.
|
|
119
|
+
*/
|
|
120
|
+
pdfScale?: number;
|
|
121
|
+
/**
|
|
122
|
+
* Final hook to customize each created item after canvu attaches its own
|
|
123
|
+
* image metadata and any `assetStore.upload(...)` `pluginData`.
|
|
124
|
+
*/
|
|
125
|
+
decorateItem?: (item: VectorSceneItem, context: IngestedAssetItemContext) => VectorSceneItem;
|
|
126
|
+
/**
|
|
127
|
+
* Optional side-channel for per-file errors.
|
|
128
|
+
*
|
|
129
|
+
* This is useful for toasts or telemetry in addition to reading the returned
|
|
130
|
+
* `errors` array.
|
|
131
|
+
*/
|
|
132
|
+
onError?: (error: IngestAssetFileError) => void;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Result of {@link ingestAssetFilesToSceneItems}.
|
|
136
|
+
*/
|
|
137
|
+
type IngestAssetFilesToSceneItemsResult = {
|
|
138
|
+
items: VectorSceneItem[];
|
|
139
|
+
errors: IngestAssetFileError[];
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Converts browser files into `VectorSceneItem[]` using the same ingestion
|
|
143
|
+
* pipeline as canvu's built-in file flow.
|
|
144
|
+
*
|
|
145
|
+
* Use this for external imports that should behave like the native canvas
|
|
146
|
+
* upload experience without reimplementing PDF rasterization, image storage, or
|
|
147
|
+
* `pluginData` attachment in app code.
|
|
148
|
+
*
|
|
149
|
+
* Do not use this as a persistence layer by itself. It only produces runtime
|
|
150
|
+
* scene items. Persist the resulting snapshot with your existing
|
|
151
|
+
* `useVectorCanvasDocument(...)` adapter or another app-specific document store.
|
|
152
|
+
*/
|
|
153
|
+
declare function ingestAssetFilesToSceneItems(options: IngestAssetFilesToSceneItemsOptions): Promise<IngestAssetFilesToSceneItemsResult>;
|
|
154
|
+
|
|
12
155
|
/**
|
|
13
156
|
* Persistence adapter that stores the document JSON in IndexedDB and manages
|
|
14
157
|
* image blobs separately. Images are stored at original resolution in a dedicated
|
|
@@ -267,4 +410,4 @@ type ViewportZoomControlsProps = {
|
|
|
267
410
|
*/
|
|
268
411
|
declare function ViewportZoomControls({ zoomPercent, onZoomIn, onZoomOut, className, position, inset, zIndex, style, }: ViewportZoomControlsProps): react_jsx_runtime.JSX.Element;
|
|
269
412
|
|
|
270
|
-
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, ShapeContextMenu, type ShapeContextMenuProps, type UseVectorCanvasDocumentOptions, type UseVectorCanvasDocumentResult, VectorCanvasPersistenceAdapter, VectorCanvasRemoteAdapter, VectorToolDefinition, VectorToolbar, type VectorToolbarProps, type VectorToolbarRenderContext, ViewportZoomControls, type ViewportZoomControlsProps, createIndexedDbPersistenceAdapter, createLocalStoragePersistenceAdapter, createNoopPersistenceAdapter, createToolPlugin, cursorForVectorToolId, useVectorCanvasDocument };
|
|
413
|
+
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, type IngestAssetFileError, type IngestAssetFilesToSceneItemsOptions, type IngestAssetFilesToSceneItemsResult, type IngestedAssetItemContext, ShapeContextMenu, type ShapeContextMenuProps, type UseVectorCanvasDocumentOptions, type UseVectorCanvasDocumentResult, VectorCanvasPersistenceAdapter, VectorCanvasRemoteAdapter, VectorToolDefinition, VectorToolbar, type VectorToolbarProps, type VectorToolbarRenderContext, VectorViewportAssetKind, VectorViewportAssetStore, ViewportZoomControls, type ViewportZoomControlsProps, createIndexedDbPersistenceAdapter, createLocalStoragePersistenceAdapter, createNoopPersistenceAdapter, createToolPlugin, cursorForVectorToolId, ingestAssetFilesToSceneItems, useVectorCanvasDocument };
|
package/dist/react.d.ts
CHANGED
|
@@ -1,14 +1,157 @@
|
|
|
1
|
-
import { V as
|
|
2
|
-
|
|
1
|
+
import { V as VectorSceneItem } from './types-CB0TZZuk.js';
|
|
2
|
+
import { V as VectorViewportAssetKind, a as VectorViewportAssetStore, b as VectorToolDefinition, C as CanvasPlugin, B as BoardComponentPosition } from './types-ChnTSRSe.js';
|
|
3
|
+
export { c as CanvasPluginComponentProps, d as CanvasPluginContribution, e as CanvasPluginItemsChangeMiddlewareContext, f as CanvasPluginRenderContext, g as CanvuChromeActiveToolStyle, h as CanvuChromeContext, i as CanvuChromeContextValue, j as CanvuChromeSelectionStyleChange, k as CanvuPluginContext, l as CanvuPluginContextValue, m as CanvuPluginViewportSnapshot, n as CustomShapePlacementOptions, N as NavMenu, o as NavMenuProps, P as PlacementPreview, p as VectorCanvas, q as VectorCanvasBody, r as VectorCanvasHeader, s as VectorCanvasMain, t as VectorCanvasRoot, u as VectorCanvasSlotProps, v as VectorCanvasSpacePosition, w as VectorCanvasSpaceProps, x as VectorCanvasToolbar, y as VectorCanvasToolbarProps, z as VectorCanvasViewportSurface, A as VectorSelectionInspector, D as VectorSelectionInspectorProps, E as VectorViewport, F as VectorViewportAssetResolveRequest, G as VectorViewportAssetResolveResult, H as VectorViewportAssetUploadRequest, I as VectorViewportAssetUploadResult, J as VectorViewportHandle, K as VectorViewportProps, W as WorldPointerDownDetail, L as createCanvuPlugin, M as getBoardPositionStyle, O as useCanvuChromeContext, Q as useCanvuDocumentContext, R as useCanvuPluginContext, S as useCanvuPluginContribution, T as useCanvuResolvedTools, U as useCanvuViewportContext } from './types-ChnTSRSe.js';
|
|
3
4
|
import { V as VectorCanvasPersistenceAdapter, a as VectorCanvasRemoteAdapter } from './types-DgEArHkA.js';
|
|
4
5
|
export { b as VectorCanvasSnapshot } from './types-DgEArHkA.js';
|
|
5
|
-
import { V as VectorSceneItem } from './types-CB0TZZuk.js';
|
|
6
6
|
import * as react from 'react';
|
|
7
7
|
import { SVGProps, CSSProperties, ReactNode } from 'react';
|
|
8
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
9
|
import './camera-KwCYYPhm.js';
|
|
10
10
|
import './shape-builders-DTYvub8W.js';
|
|
11
11
|
|
|
12
|
+
declare class IndexedDbImageStore {
|
|
13
|
+
private dbPromise;
|
|
14
|
+
private getDb;
|
|
15
|
+
storeOriginal(blob: Blob): Promise<string>;
|
|
16
|
+
getOriginal(id: string): Promise<Blob | undefined>;
|
|
17
|
+
deleteOriginal(id: string): Promise<void>;
|
|
18
|
+
storeThumbnail(blob: Blob): Promise<string>;
|
|
19
|
+
getThumbnail(id: string): Promise<Blob | undefined>;
|
|
20
|
+
deleteThumbnail(id: string): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Extra context for each item created by {@link ingestAssetFilesToSceneItems}.
|
|
25
|
+
*
|
|
26
|
+
* Use this when you need to lock imported pages, assign custom ids, or attach
|
|
27
|
+
* additional metadata beyond the `pluginData` returned by {@link VectorViewportAssetStore.upload}.
|
|
28
|
+
*/
|
|
29
|
+
type IngestedAssetItemContext = {
|
|
30
|
+
file: File;
|
|
31
|
+
kind: VectorViewportAssetKind;
|
|
32
|
+
itemIndex: number;
|
|
33
|
+
pageNumber?: number;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Structured error produced while ingesting a file into scene items.
|
|
37
|
+
*
|
|
38
|
+
* The helper keeps partial success by default: one file can fail without
|
|
39
|
+
* preventing the remaining files from being converted.
|
|
40
|
+
*/
|
|
41
|
+
type IngestAssetFileError = {
|
|
42
|
+
file: File;
|
|
43
|
+
kind?: VectorViewportAssetKind;
|
|
44
|
+
error: unknown;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Options for {@link ingestAssetFilesToSceneItems}.
|
|
48
|
+
*
|
|
49
|
+
* This is the shared ingestion pipeline used by canvu's built-in file flow.
|
|
50
|
+
* Use it when files originate outside the viewport, such as:
|
|
51
|
+
*
|
|
52
|
+
* - custom upload dialogs
|
|
53
|
+
* - board/version creation flows
|
|
54
|
+
* - programmatic imports
|
|
55
|
+
* - legacy migrations
|
|
56
|
+
*
|
|
57
|
+
* Prefer passing `assetStore` directly to `VectorViewport` when the user is
|
|
58
|
+
* already interacting with canvu's native file picker or drag-and-drop UI.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const result = await ingestAssetFilesToSceneItems({
|
|
63
|
+
* files: Array.from(input.files ?? []),
|
|
64
|
+
* worldCenter: { x: 0, y: 0 },
|
|
65
|
+
* assetStore,
|
|
66
|
+
* decorateItem(item) {
|
|
67
|
+
* return {
|
|
68
|
+
* ...item,
|
|
69
|
+
* locked: true,
|
|
70
|
+
* };
|
|
71
|
+
* },
|
|
72
|
+
* });
|
|
73
|
+
*
|
|
74
|
+
* doc.onItemsChange([...doc.items, ...result.items]);
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
type IngestAssetFilesToSceneItemsOptions = {
|
|
78
|
+
files: readonly File[];
|
|
79
|
+
worldCenter: {
|
|
80
|
+
x: number;
|
|
81
|
+
y: number;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Optional binary persistence bridge shared with `VectorViewport`.
|
|
85
|
+
*
|
|
86
|
+
* When provided, `upload(...)` is called once per source file before canvu
|
|
87
|
+
* converts that file into one or more scene items.
|
|
88
|
+
*/
|
|
89
|
+
assetStore?: VectorViewportAssetStore;
|
|
90
|
+
/**
|
|
91
|
+
* Optional local blob store used to keep canvu's default image/PDF runtime
|
|
92
|
+
* behavior consistent across reload-safe persistence adapters.
|
|
93
|
+
*
|
|
94
|
+
* Omit this unless you need to share an existing store instance.
|
|
95
|
+
*/
|
|
96
|
+
imageStore?: IndexedDbImageStore;
|
|
97
|
+
/**
|
|
98
|
+
* Optional custom id factory for imported items.
|
|
99
|
+
*
|
|
100
|
+
* Defaults to `createShapeId()`.
|
|
101
|
+
*/
|
|
102
|
+
createId?: () => string;
|
|
103
|
+
/**
|
|
104
|
+
* Vertical gap between stacked PDF pages.
|
|
105
|
+
*
|
|
106
|
+
* Defaults to `16`, matching the built-in viewport flow.
|
|
107
|
+
*/
|
|
108
|
+
gapWorld?: number;
|
|
109
|
+
/**
|
|
110
|
+
* Offset step used when placing standalone raster images.
|
|
111
|
+
*
|
|
112
|
+
* Defaults to `48`, matching the built-in viewport flow.
|
|
113
|
+
*/
|
|
114
|
+
stepWorld?: number;
|
|
115
|
+
/**
|
|
116
|
+
* PDF rasterization scale forwarded to `pdfjs-dist`.
|
|
117
|
+
*
|
|
118
|
+
* Defaults to `1.5` for crisp zoom while keeping payloads reasonable.
|
|
119
|
+
*/
|
|
120
|
+
pdfScale?: number;
|
|
121
|
+
/**
|
|
122
|
+
* Final hook to customize each created item after canvu attaches its own
|
|
123
|
+
* image metadata and any `assetStore.upload(...)` `pluginData`.
|
|
124
|
+
*/
|
|
125
|
+
decorateItem?: (item: VectorSceneItem, context: IngestedAssetItemContext) => VectorSceneItem;
|
|
126
|
+
/**
|
|
127
|
+
* Optional side-channel for per-file errors.
|
|
128
|
+
*
|
|
129
|
+
* This is useful for toasts or telemetry in addition to reading the returned
|
|
130
|
+
* `errors` array.
|
|
131
|
+
*/
|
|
132
|
+
onError?: (error: IngestAssetFileError) => void;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Result of {@link ingestAssetFilesToSceneItems}.
|
|
136
|
+
*/
|
|
137
|
+
type IngestAssetFilesToSceneItemsResult = {
|
|
138
|
+
items: VectorSceneItem[];
|
|
139
|
+
errors: IngestAssetFileError[];
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Converts browser files into `VectorSceneItem[]` using the same ingestion
|
|
143
|
+
* pipeline as canvu's built-in file flow.
|
|
144
|
+
*
|
|
145
|
+
* Use this for external imports that should behave like the native canvas
|
|
146
|
+
* upload experience without reimplementing PDF rasterization, image storage, or
|
|
147
|
+
* `pluginData` attachment in app code.
|
|
148
|
+
*
|
|
149
|
+
* Do not use this as a persistence layer by itself. It only produces runtime
|
|
150
|
+
* scene items. Persist the resulting snapshot with your existing
|
|
151
|
+
* `useVectorCanvasDocument(...)` adapter or another app-specific document store.
|
|
152
|
+
*/
|
|
153
|
+
declare function ingestAssetFilesToSceneItems(options: IngestAssetFilesToSceneItemsOptions): Promise<IngestAssetFilesToSceneItemsResult>;
|
|
154
|
+
|
|
12
155
|
/**
|
|
13
156
|
* Persistence adapter that stores the document JSON in IndexedDB and manages
|
|
14
157
|
* image blobs separately. Images are stored at original resolution in a dedicated
|
|
@@ -267,4 +410,4 @@ type ViewportZoomControlsProps = {
|
|
|
267
410
|
*/
|
|
268
411
|
declare function ViewportZoomControls({ zoomPercent, onZoomIn, onZoomOut, className, position, inset, zIndex, style, }: ViewportZoomControlsProps): react_jsx_runtime.JSX.Element;
|
|
269
412
|
|
|
270
|
-
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, ShapeContextMenu, type ShapeContextMenuProps, type UseVectorCanvasDocumentOptions, type UseVectorCanvasDocumentResult, VectorCanvasPersistenceAdapter, VectorCanvasRemoteAdapter, VectorToolDefinition, VectorToolbar, type VectorToolbarProps, type VectorToolbarRenderContext, ViewportZoomControls, type ViewportZoomControlsProps, createIndexedDbPersistenceAdapter, createLocalStoragePersistenceAdapter, createNoopPersistenceAdapter, createToolPlugin, cursorForVectorToolId, useVectorCanvasDocument };
|
|
413
|
+
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, type IngestAssetFileError, type IngestAssetFilesToSceneItemsOptions, type IngestAssetFilesToSceneItemsResult, type IngestedAssetItemContext, ShapeContextMenu, type ShapeContextMenuProps, type UseVectorCanvasDocumentOptions, type UseVectorCanvasDocumentResult, VectorCanvasPersistenceAdapter, VectorCanvasRemoteAdapter, VectorToolDefinition, VectorToolbar, type VectorToolbarProps, type VectorToolbarRenderContext, VectorViewportAssetKind, VectorViewportAssetStore, ViewportZoomControls, type ViewportZoomControlsProps, createIndexedDbPersistenceAdapter, createLocalStoragePersistenceAdapter, createNoopPersistenceAdapter, createToolPlugin, cursorForVectorToolId, ingestAssetFilesToSceneItems, useVectorCanvasDocument };
|