canvu-react 0.4.34 → 0.4.36
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-BFGZ3igr.d.cts → asset-hydration-Cy_2FyV5.d.cts} +1 -1
- package/dist/{asset-hydration-D6Q3TJL1.d.ts → asset-hydration-Dc7fsnTG.d.ts} +1 -1
- package/dist/{link-item-voRU0Up9.d.ts → asset-store-DQPRZEcy.d.ts} +2 -40
- package/dist/{link-item-Dncuz2d_.d.cts → asset-store-TzOPvlgn.d.cts} +2 -40
- package/dist/chatbot.d.cts +3 -2
- package/dist/chatbot.d.ts +3 -2
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/link-item-DwzXOwU5.d.cts +41 -0
- package/dist/link-item-IW4GTnxl.d.ts +41 -0
- package/dist/native.cjs +409 -6
- package/dist/native.cjs.map +1 -1
- package/dist/native.d.cts +52 -2
- package/dist/native.d.ts +52 -2
- package/dist/native.js +407 -8
- package/dist/native.js.map +1 -1
- package/dist/react.d.cts +7 -6
- package/dist/react.d.ts +7 -6
- package/dist/realtime.d.cts +3 -2
- package/dist/realtime.d.ts +3 -2
- package/dist/{types-DeDm865m.d.ts → types-B7xZAKVJ.d.ts} +2 -1
- package/dist/{types-NBYvslB-.d.cts → types-C4wI3Jyc.d.cts} +2 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { V as VectorSceneItem } from './types-BCCvY6ie.cjs';
|
|
2
|
-
import { a as VectorViewportAssetStore } from './
|
|
2
|
+
import { a as VectorViewportAssetStore } from './asset-store-TzOPvlgn.cjs';
|
|
3
3
|
|
|
4
4
|
declare class IndexedDbImageStore {
|
|
5
5
|
private dbPromise;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { V as VectorSceneItem } from './types-BCCvY6ie.js';
|
|
2
|
-
import { a as VectorViewportAssetStore } from './
|
|
2
|
+
import { a as VectorViewportAssetStore } from './asset-store-DQPRZEcy.js';
|
|
3
3
|
|
|
4
4
|
declare class IndexedDbImageStore {
|
|
5
5
|
private dbPromise;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VectorSceneItem
|
|
1
|
+
import { V as VectorSceneItem } from './types-BCCvY6ie.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Kind of binary selected through the built-in canvu asset ingestion flow.
|
|
@@ -110,42 +110,4 @@ type VectorViewportAssetStore = {
|
|
|
110
110
|
getHydrationRequest?: (item: VectorSceneItem) => VectorViewportAssetHydrationRequest | null;
|
|
111
111
|
};
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
declare const LINK_PLUGIN_KEY = "canvuLink";
|
|
115
|
-
/**
|
|
116
|
-
* Metadata describing a clickable link/bookmark item.
|
|
117
|
-
* `href` is required; the rest enrich the rendered card (unfurl result).
|
|
118
|
-
*/
|
|
119
|
-
type CanvuLinkData = {
|
|
120
|
-
/** Absolute URL the card points to. */
|
|
121
|
-
href: string;
|
|
122
|
-
/** Human readable title (falls back to the hostname). */
|
|
123
|
-
title?: string;
|
|
124
|
-
/** Short description shown under the title. */
|
|
125
|
-
description?: string;
|
|
126
|
-
/** Preview image URL (og:image). */
|
|
127
|
-
image?: string;
|
|
128
|
-
/** Favicon URL shown in the leading badge. */
|
|
129
|
-
favicon?: string;
|
|
130
|
-
};
|
|
131
|
-
/**
|
|
132
|
-
* Builds the inner SVG (no outer `<svg>`) for a link/bookmark card at the given box size.
|
|
133
|
-
* Uses fixed pixel bands so text never overlaps regardless of the card's aspect ratio.
|
|
134
|
-
*/
|
|
135
|
-
declare function buildLinkCardSvg(width: number, _height: number, link: CanvuLinkData): string;
|
|
136
|
-
/** Reads the link metadata from an item, or `null` when the item is not a link. */
|
|
137
|
-
declare function getLinkData(item: VectorSceneItem): CanvuLinkData | null;
|
|
138
|
-
/** True when the item carries link metadata (clickable card). */
|
|
139
|
-
declare function isLinkItem(item: VectorSceneItem): boolean;
|
|
140
|
-
/**
|
|
141
|
-
* Creates a clickable link/bookmark card item ready to append to the scene.
|
|
142
|
-
* The card resizes by scaling its authored SVG, like other custom shapes.
|
|
143
|
-
*/
|
|
144
|
-
declare function createLinkItem(id: string, bounds: Rect, link: CanvuLinkData): VectorSceneItem;
|
|
145
|
-
/** Default card size used when placing a new link without explicit bounds. */
|
|
146
|
-
declare const DEFAULT_LINK_CARD_SIZE: {
|
|
147
|
-
readonly width: 320;
|
|
148
|
-
readonly height: 70;
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
export { type CanvuLinkData as C, DEFAULT_LINK_CARD_SIZE as D, LINK_PLUGIN_KEY as L, type VectorViewportAssetKind as V, type VectorViewportAssetStore as a, buildLinkCardSvg as b, createLinkItem as c, type VectorViewportAssetHydrationRequest as d, type VectorViewportAssetResolveRequest as e, type VectorViewportAssetResolveResult as f, getLinkData as g, type VectorViewportAssetUploadRequest as h, isLinkItem as i, type VectorViewportAssetUploadResult as j };
|
|
113
|
+
export type { VectorViewportAssetKind as V, VectorViewportAssetStore as a, VectorViewportAssetHydrationRequest as b, VectorViewportAssetResolveRequest as c, VectorViewportAssetResolveResult as d, VectorViewportAssetUploadRequest as e, VectorViewportAssetUploadResult as f };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VectorSceneItem
|
|
1
|
+
import { V as VectorSceneItem } from './types-BCCvY6ie.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Kind of binary selected through the built-in canvu asset ingestion flow.
|
|
@@ -110,42 +110,4 @@ type VectorViewportAssetStore = {
|
|
|
110
110
|
getHydrationRequest?: (item: VectorSceneItem) => VectorViewportAssetHydrationRequest | null;
|
|
111
111
|
};
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
declare const LINK_PLUGIN_KEY = "canvuLink";
|
|
115
|
-
/**
|
|
116
|
-
* Metadata describing a clickable link/bookmark item.
|
|
117
|
-
* `href` is required; the rest enrich the rendered card (unfurl result).
|
|
118
|
-
*/
|
|
119
|
-
type CanvuLinkData = {
|
|
120
|
-
/** Absolute URL the card points to. */
|
|
121
|
-
href: string;
|
|
122
|
-
/** Human readable title (falls back to the hostname). */
|
|
123
|
-
title?: string;
|
|
124
|
-
/** Short description shown under the title. */
|
|
125
|
-
description?: string;
|
|
126
|
-
/** Preview image URL (og:image). */
|
|
127
|
-
image?: string;
|
|
128
|
-
/** Favicon URL shown in the leading badge. */
|
|
129
|
-
favicon?: string;
|
|
130
|
-
};
|
|
131
|
-
/**
|
|
132
|
-
* Builds the inner SVG (no outer `<svg>`) for a link/bookmark card at the given box size.
|
|
133
|
-
* Uses fixed pixel bands so text never overlaps regardless of the card's aspect ratio.
|
|
134
|
-
*/
|
|
135
|
-
declare function buildLinkCardSvg(width: number, _height: number, link: CanvuLinkData): string;
|
|
136
|
-
/** Reads the link metadata from an item, or `null` when the item is not a link. */
|
|
137
|
-
declare function getLinkData(item: VectorSceneItem): CanvuLinkData | null;
|
|
138
|
-
/** True when the item carries link metadata (clickable card). */
|
|
139
|
-
declare function isLinkItem(item: VectorSceneItem): boolean;
|
|
140
|
-
/**
|
|
141
|
-
* Creates a clickable link/bookmark card item ready to append to the scene.
|
|
142
|
-
* The card resizes by scaling its authored SVG, like other custom shapes.
|
|
143
|
-
*/
|
|
144
|
-
declare function createLinkItem(id: string, bounds: Rect, link: CanvuLinkData): VectorSceneItem;
|
|
145
|
-
/** Default card size used when placing a new link without explicit bounds. */
|
|
146
|
-
declare const DEFAULT_LINK_CARD_SIZE: {
|
|
147
|
-
readonly width: 320;
|
|
148
|
-
readonly height: 70;
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
export { type CanvuLinkData as C, DEFAULT_LINK_CARD_SIZE as D, LINK_PLUGIN_KEY as L, type VectorViewportAssetKind as V, type VectorViewportAssetStore as a, buildLinkCardSvg as b, createLinkItem as c, type VectorViewportAssetHydrationRequest as d, type VectorViewportAssetResolveRequest as e, type VectorViewportAssetResolveResult as f, getLinkData as g, type VectorViewportAssetUploadRequest as h, isLinkItem as i, type VectorViewportAssetUploadResult as j };
|
|
113
|
+
export type { VectorViewportAssetKind as V, VectorViewportAssetStore as a, VectorViewportAssetHydrationRequest as b, VectorViewportAssetResolveRequest as c, VectorViewportAssetResolveResult as d, VectorViewportAssetUploadRequest as e, VectorViewportAssetUploadResult as f };
|
package/dist/chatbot.d.cts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as CanvasPlugin } from './types-
|
|
2
|
+
import { C as CanvasPlugin } from './types-C4wI3Jyc.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './types-BCCvY6ie.cjs';
|
|
5
5
|
import './shape-builders-CKEMjivV.cjs';
|
|
6
|
-
import './link-item-
|
|
6
|
+
import './link-item-DwzXOwU5.cjs';
|
|
7
|
+
import './asset-store-TzOPvlgn.cjs';
|
|
7
8
|
import './types-BQUbxMgz.cjs';
|
|
8
9
|
|
|
9
10
|
type ChatbotPluginPanelProps = {
|
package/dist/chatbot.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as CanvasPlugin } from './types-
|
|
2
|
+
import { C as CanvasPlugin } from './types-B7xZAKVJ.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './types-BCCvY6ie.js';
|
|
5
5
|
import './shape-builders-Cyh8zvDG.js';
|
|
6
|
-
import './link-item-
|
|
6
|
+
import './link-item-IW4GTnxl.js';
|
|
7
|
+
import './asset-store-DQPRZEcy.js';
|
|
7
8
|
import './types-B82WiQQh.js';
|
|
8
9
|
|
|
9
10
|
type ChatbotPluginPanelProps = {
|
package/dist/index.d.cts
CHANGED
|
@@ -2,8 +2,9 @@ import { C as Camera2D } from './shape-builders-CKEMjivV.cjs';
|
|
|
2
2
|
export { a as Camera2DOptions, D as DEFAULT_STROKE_STYLE, F as FreehandSvgPayload, S as StrokeStyle, b as applyStrokeToItem, c as buildArchitecturalCloudPathD, d as buildArchitecturalCloudSvg, e as buildArrowSvg, f as buildDrawDotSvg, g as buildEllipseSvg, h as buildFreehandPathSvg, i as buildLineSvg, j as buildRectSvg, k as computeFreehandSvgPayload, l as createArchitecturalCloudItem, m as createDrawDotItem, n as createEllipseItem, o as createFreehandStrokeItem, p as createImageFromVectorTrace, q as createImageItem, r as createLineItem, s as createRectangleItem, t as createShapeId, u as createTextItem, v as lineEndpointsToLocal, w as rebuildItemSvg, x as resolveStrokeStyle } from './shape-builders-CKEMjivV.cjs';
|
|
3
3
|
import { V as VectorSceneItem, A as ArrowEndpointBinding, R as Rect } from './types-BCCvY6ie.cjs';
|
|
4
4
|
export { a as ArrowBindings, b as VectorPathPoint, n as normalizeRect, r as rectsIntersect } from './types-BCCvY6ie.cjs';
|
|
5
|
-
export { H as HydratedSceneItemsWithAssetsResult, h as hydrateSceneItemsWithAssets } from './asset-hydration-
|
|
6
|
-
export { C as CanvuLinkData, D as DEFAULT_LINK_CARD_SIZE, L as LINK_PLUGIN_KEY, b as buildLinkCardSvg, c as createLinkItem, g as getLinkData, i as isLinkItem } from './link-item-
|
|
5
|
+
export { H as HydratedSceneItemsWithAssetsResult, h as hydrateSceneItemsWithAssets } from './asset-hydration-Cy_2FyV5.cjs';
|
|
6
|
+
export { C as CanvuLinkData, D as DEFAULT_LINK_CARD_SIZE, L as LINK_PLUGIN_KEY, b as buildLinkCardSvg, c as createLinkItem, g as getLinkData, i as isLinkItem } from './link-item-DwzXOwU5.cjs';
|
|
7
|
+
import './asset-store-TzOPvlgn.cjs';
|
|
7
8
|
|
|
8
9
|
type EncodeCanvasToBlobOptions = {
|
|
9
10
|
mimeType?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ import { C as Camera2D } from './shape-builders-Cyh8zvDG.js';
|
|
|
2
2
|
export { a as Camera2DOptions, D as DEFAULT_STROKE_STYLE, F as FreehandSvgPayload, S as StrokeStyle, b as applyStrokeToItem, c as buildArchitecturalCloudPathD, d as buildArchitecturalCloudSvg, e as buildArrowSvg, f as buildDrawDotSvg, g as buildEllipseSvg, h as buildFreehandPathSvg, i as buildLineSvg, j as buildRectSvg, k as computeFreehandSvgPayload, l as createArchitecturalCloudItem, m as createDrawDotItem, n as createEllipseItem, o as createFreehandStrokeItem, p as createImageFromVectorTrace, q as createImageItem, r as createLineItem, s as createRectangleItem, t as createShapeId, u as createTextItem, v as lineEndpointsToLocal, w as rebuildItemSvg, x as resolveStrokeStyle } from './shape-builders-Cyh8zvDG.js';
|
|
3
3
|
import { V as VectorSceneItem, A as ArrowEndpointBinding, R as Rect } from './types-BCCvY6ie.js';
|
|
4
4
|
export { a as ArrowBindings, b as VectorPathPoint, n as normalizeRect, r as rectsIntersect } from './types-BCCvY6ie.js';
|
|
5
|
-
export { H as HydratedSceneItemsWithAssetsResult, h as hydrateSceneItemsWithAssets } from './asset-hydration-
|
|
6
|
-
export { C as CanvuLinkData, D as DEFAULT_LINK_CARD_SIZE, L as LINK_PLUGIN_KEY, b as buildLinkCardSvg, c as createLinkItem, g as getLinkData, i as isLinkItem } from './link-item-
|
|
5
|
+
export { H as HydratedSceneItemsWithAssetsResult, h as hydrateSceneItemsWithAssets } from './asset-hydration-Dc7fsnTG.js';
|
|
6
|
+
export { C as CanvuLinkData, D as DEFAULT_LINK_CARD_SIZE, L as LINK_PLUGIN_KEY, b as buildLinkCardSvg, c as createLinkItem, g as getLinkData, i as isLinkItem } from './link-item-IW4GTnxl.js';
|
|
7
|
+
import './asset-store-DQPRZEcy.js';
|
|
7
8
|
|
|
8
9
|
type EncodeCanvasToBlobOptions = {
|
|
9
10
|
mimeType?: string;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { R as Rect, V as VectorSceneItem } from './types-BCCvY6ie.cjs';
|
|
2
|
+
|
|
3
|
+
/** Plugin key under which link metadata is stored on a link item's `pluginData`. */
|
|
4
|
+
declare const LINK_PLUGIN_KEY = "canvuLink";
|
|
5
|
+
/**
|
|
6
|
+
* Metadata describing a clickable link/bookmark item.
|
|
7
|
+
* `href` is required; the rest enrich the rendered card (unfurl result).
|
|
8
|
+
*/
|
|
9
|
+
type CanvuLinkData = {
|
|
10
|
+
/** Absolute URL the card points to. */
|
|
11
|
+
href: string;
|
|
12
|
+
/** Human readable title (falls back to the hostname). */
|
|
13
|
+
title?: string;
|
|
14
|
+
/** Short description shown under the title. */
|
|
15
|
+
description?: string;
|
|
16
|
+
/** Preview image URL (og:image). */
|
|
17
|
+
image?: string;
|
|
18
|
+
/** Favicon URL shown in the leading badge. */
|
|
19
|
+
favicon?: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Builds the inner SVG (no outer `<svg>`) for a link/bookmark card at the given box size.
|
|
23
|
+
* Uses fixed pixel bands so text never overlaps regardless of the card's aspect ratio.
|
|
24
|
+
*/
|
|
25
|
+
declare function buildLinkCardSvg(width: number, _height: number, link: CanvuLinkData): string;
|
|
26
|
+
/** Reads the link metadata from an item, or `null` when the item is not a link. */
|
|
27
|
+
declare function getLinkData(item: VectorSceneItem): CanvuLinkData | null;
|
|
28
|
+
/** True when the item carries link metadata (clickable card). */
|
|
29
|
+
declare function isLinkItem(item: VectorSceneItem): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Creates a clickable link/bookmark card item ready to append to the scene.
|
|
32
|
+
* The card resizes by scaling its authored SVG, like other custom shapes.
|
|
33
|
+
*/
|
|
34
|
+
declare function createLinkItem(id: string, bounds: Rect, link: CanvuLinkData): VectorSceneItem;
|
|
35
|
+
/** Default card size used when placing a new link without explicit bounds. */
|
|
36
|
+
declare const DEFAULT_LINK_CARD_SIZE: {
|
|
37
|
+
readonly width: 320;
|
|
38
|
+
readonly height: 70;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export { type CanvuLinkData as C, DEFAULT_LINK_CARD_SIZE as D, LINK_PLUGIN_KEY as L, buildLinkCardSvg as b, createLinkItem as c, getLinkData as g, isLinkItem as i };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { R as Rect, V as VectorSceneItem } from './types-BCCvY6ie.js';
|
|
2
|
+
|
|
3
|
+
/** Plugin key under which link metadata is stored on a link item's `pluginData`. */
|
|
4
|
+
declare const LINK_PLUGIN_KEY = "canvuLink";
|
|
5
|
+
/**
|
|
6
|
+
* Metadata describing a clickable link/bookmark item.
|
|
7
|
+
* `href` is required; the rest enrich the rendered card (unfurl result).
|
|
8
|
+
*/
|
|
9
|
+
type CanvuLinkData = {
|
|
10
|
+
/** Absolute URL the card points to. */
|
|
11
|
+
href: string;
|
|
12
|
+
/** Human readable title (falls back to the hostname). */
|
|
13
|
+
title?: string;
|
|
14
|
+
/** Short description shown under the title. */
|
|
15
|
+
description?: string;
|
|
16
|
+
/** Preview image URL (og:image). */
|
|
17
|
+
image?: string;
|
|
18
|
+
/** Favicon URL shown in the leading badge. */
|
|
19
|
+
favicon?: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Builds the inner SVG (no outer `<svg>`) for a link/bookmark card at the given box size.
|
|
23
|
+
* Uses fixed pixel bands so text never overlaps regardless of the card's aspect ratio.
|
|
24
|
+
*/
|
|
25
|
+
declare function buildLinkCardSvg(width: number, _height: number, link: CanvuLinkData): string;
|
|
26
|
+
/** Reads the link metadata from an item, or `null` when the item is not a link. */
|
|
27
|
+
declare function getLinkData(item: VectorSceneItem): CanvuLinkData | null;
|
|
28
|
+
/** True when the item carries link metadata (clickable card). */
|
|
29
|
+
declare function isLinkItem(item: VectorSceneItem): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Creates a clickable link/bookmark card item ready to append to the scene.
|
|
32
|
+
* The card resizes by scaling its authored SVG, like other custom shapes.
|
|
33
|
+
*/
|
|
34
|
+
declare function createLinkItem(id: string, bounds: Rect, link: CanvuLinkData): VectorSceneItem;
|
|
35
|
+
/** Default card size used when placing a new link without explicit bounds. */
|
|
36
|
+
declare const DEFAULT_LINK_CARD_SIZE: {
|
|
37
|
+
readonly width: 320;
|
|
38
|
+
readonly height: 70;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export { type CanvuLinkData as C, DEFAULT_LINK_CARD_SIZE as D, LINK_PLUGIN_KEY as L, buildLinkCardSvg as b, createLinkItem as c, getLinkData as g, isLinkItem as i };
|