canvu-react 0.4.5 → 0.4.7
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-B7yMDQE-.d.cts → asset-hydration-CWhld14A.d.cts} +1 -1
- package/dist/{asset-hydration-CbwQVAwh.d.ts → asset-hydration-D35mHbUP.d.ts} +1 -1
- package/dist/chatbot.d.cts +3 -3
- package/dist/chatbot.d.ts +3 -3
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/link-item-Bg5vj0RI.d.ts +151 -0
- package/dist/link-item-D870_X6P.d.cts +151 -0
- package/dist/native.cjs +617 -244
- package/dist/native.cjs.map +1 -1
- package/dist/native.d.cts +34 -4
- package/dist/native.d.ts +34 -4
- package/dist/native.js +616 -247
- package/dist/native.js.map +1 -1
- package/dist/react.d.cts +7 -7
- package/dist/react.d.ts +7 -7
- package/dist/realtime.d.cts +4 -4
- package/dist/realtime.d.ts +4 -4
- package/dist/{shape-builders-BAWu-PxX.d.cts → shape-builders-CKEMjivV.d.cts} +42 -143
- package/dist/{shape-builders-ClKv9tz9.d.ts → shape-builders-Cyh8zvDG.d.ts} +42 -143
- package/dist/{types-BC9Xgfu6.d.cts → types-Bw1SdC9v.d.cts} +2 -2
- package/dist/{types-DlSVGX0w.d.ts → types-DeXFfs7Y.d.ts} +2 -2
- package/package.json +1 -1
- package/dist/camera-CVVG7z56.d.cts +0 -50
- package/dist/camera-CoRYN_IV.d.ts +0 -50
package/dist/native.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { C as Camera2D } from './shape-builders-CKEMjivV.cjs';
|
|
2
|
+
export { o as createFreehandStrokeItem, q as createImageItem, t as createShapeId } from './shape-builders-CKEMjivV.cjs';
|
|
3
3
|
import { V as VectorSceneItem, R as Rect } from './types-BCCvY6ie.cjs';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
5
|
import * as react from 'react';
|
|
5
6
|
import { ReactNode } from 'react';
|
|
6
7
|
import { StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
@@ -82,6 +83,8 @@ type NativeVectorToolDefinition = {
|
|
|
82
83
|
readonly id: string;
|
|
83
84
|
readonly label: string;
|
|
84
85
|
readonly shortLabel?: string;
|
|
86
|
+
readonly tooltipLabel?: string;
|
|
87
|
+
readonly shortcutHint?: string;
|
|
85
88
|
readonly accessibilityLabel?: string;
|
|
86
89
|
readonly disabled?: boolean;
|
|
87
90
|
};
|
|
@@ -99,6 +102,20 @@ type NativeVectorToolbarRenderToolInput = {
|
|
|
99
102
|
readonly foregroundColor: string;
|
|
100
103
|
readonly onSelect: () => void;
|
|
101
104
|
};
|
|
105
|
+
type NativeVectorToolbarDensity = "compact" | "comfortable";
|
|
106
|
+
type NativeVectorToolbarRenderToolLockInput = {
|
|
107
|
+
readonly locked: boolean;
|
|
108
|
+
readonly disabled: boolean;
|
|
109
|
+
readonly foregroundColor: string;
|
|
110
|
+
readonly onToggle: () => void;
|
|
111
|
+
};
|
|
112
|
+
type NativeVectorToolbarRenderOverflowInput = {
|
|
113
|
+
readonly open: boolean;
|
|
114
|
+
readonly activeTool: NativeVectorToolDefinition | null;
|
|
115
|
+
readonly disabled: boolean;
|
|
116
|
+
readonly foregroundColor: string;
|
|
117
|
+
readonly onToggle: () => void;
|
|
118
|
+
};
|
|
102
119
|
/**
|
|
103
120
|
* Props for {@link NativeVectorToolbar}.
|
|
104
121
|
*
|
|
@@ -110,18 +127,29 @@ type NativeVectorToolbarProps = {
|
|
|
110
127
|
readonly value: string;
|
|
111
128
|
readonly onChange: (toolId: string) => void;
|
|
112
129
|
readonly tools?: readonly NativeVectorToolDefinition[];
|
|
130
|
+
readonly overflowToolIds?: readonly string[];
|
|
131
|
+
readonly overflowMenuAccessibilityLabel?: string;
|
|
113
132
|
readonly disabled?: boolean;
|
|
114
133
|
readonly disabledToolIds?: readonly string[];
|
|
134
|
+
readonly showToolLockToggle?: boolean;
|
|
135
|
+
readonly toolLocked?: boolean;
|
|
136
|
+
readonly onToolLockedChange?: (locked: boolean) => void;
|
|
137
|
+
readonly density?: NativeVectorToolbarDensity;
|
|
115
138
|
readonly accessibilityLabel?: string;
|
|
116
139
|
readonly style?: StyleProp<ViewStyle>;
|
|
117
140
|
readonly contentContainerStyle?: StyleProp<ViewStyle>;
|
|
141
|
+
readonly overflowPanelStyle?: StyleProp<ViewStyle>;
|
|
118
142
|
readonly toolButtonStyle?: StyleProp<ViewStyle>;
|
|
119
143
|
readonly activeToolButtonStyle?: StyleProp<ViewStyle>;
|
|
120
144
|
readonly toolLabelStyle?: StyleProp<TextStyle>;
|
|
121
145
|
readonly activeToolLabelStyle?: StyleProp<TextStyle>;
|
|
122
146
|
readonly renderToolIcon?: (input: NativeVectorToolbarRenderToolInput) => ReactNode;
|
|
147
|
+
readonly renderToolLockIcon?: (input: NativeVectorToolbarRenderToolLockInput) => ReactNode;
|
|
148
|
+
readonly renderOverflowIcon?: (input: NativeVectorToolbarRenderOverflowInput) => ReactNode;
|
|
149
|
+
readonly renderOverflowChevronIcon?: (input: NativeVectorToolbarRenderOverflowInput) => ReactNode;
|
|
123
150
|
readonly renderToolButton?: (input: NativeVectorToolbarRenderToolInput) => ReactNode;
|
|
124
151
|
};
|
|
152
|
+
declare const DEFAULT_NATIVE_OVERFLOW_TOOL_IDS: readonly ["rect", "ellipse", "architectural-cloud", "line", "marker", "laser", "image"];
|
|
125
153
|
/**
|
|
126
154
|
* Default mobile-friendly tool list for {@link NativeVectorToolbar}.
|
|
127
155
|
*
|
|
@@ -144,7 +172,7 @@ declare const DEFAULT_NATIVE_VECTOR_TOOLS: readonly NativeVectorToolDefinition[]
|
|
|
144
172
|
* <NativeVectorToolbar value={toolId} onChange={setToolId} />
|
|
145
173
|
* ```
|
|
146
174
|
*/
|
|
147
|
-
declare function NativeVectorToolbar({ value, onChange, tools, disabled, disabledToolIds, accessibilityLabel, style, contentContainerStyle, toolButtonStyle, activeToolButtonStyle, toolLabelStyle, activeToolLabelStyle, renderToolIcon, renderToolButton, }: NativeVectorToolbarProps): react_jsx_runtime.JSX.Element;
|
|
175
|
+
declare function NativeVectorToolbar({ value, onChange, tools, overflowToolIds, overflowMenuAccessibilityLabel, disabled, disabledToolIds, showToolLockToggle, toolLocked, onToolLockedChange, density, accessibilityLabel, style, contentContainerStyle, overflowPanelStyle, toolButtonStyle, activeToolButtonStyle, toolLabelStyle, activeToolLabelStyle, renderToolIcon, renderToolLockIcon, renderOverflowIcon, renderOverflowChevronIcon, renderToolButton, }: NativeVectorToolbarProps): react_jsx_runtime.JSX.Element;
|
|
148
176
|
|
|
149
177
|
type NativeVectorViewportHandle = {
|
|
150
178
|
getCamera: () => Camera2D | null;
|
|
@@ -161,9 +189,11 @@ type NativeVectorViewportProps = {
|
|
|
161
189
|
readonly items: readonly VectorSceneItem[];
|
|
162
190
|
readonly selectedIds?: readonly string[];
|
|
163
191
|
readonly toolId?: string;
|
|
192
|
+
readonly toolLocked?: boolean;
|
|
164
193
|
readonly interactive?: boolean;
|
|
165
194
|
readonly onSelectionChange?: (ids: string[]) => void;
|
|
166
195
|
readonly onItemsChange?: (items: VectorSceneItem[]) => void;
|
|
196
|
+
readonly onToolChangeRequest?: (toolId: string) => void;
|
|
167
197
|
readonly onCameraChange?: () => void;
|
|
168
198
|
readonly toolbar?: React.ReactNode;
|
|
169
199
|
};
|
|
@@ -291,4 +321,4 @@ type SvgNode = SvgRectNode | SvgEllipseNode | SvgCircleNode | SvgLineNode | SvgP
|
|
|
291
321
|
*/
|
|
292
322
|
declare function parseSvgFragment(xml: string): SvgNode[];
|
|
293
323
|
|
|
294
|
-
export { DEFAULT_NATIVE_VECTOR_TOOLS, NativeInteractionOverlay, type NativeInteractionOverlayProps, NativeSceneRenderer, type NativeSceneRendererProps, NativeShapeRenderer, type NativeShapeRendererProps, type NativeVectorToolDefinition, NativeVectorToolbar, type NativeVectorToolbarProps, type NativeVectorToolbarRenderToolInput, NativeVectorViewport, type NativeVectorViewportHandle, type NativeVectorViewportProps, type PlacementPreview, type SvgNode, parseSvgFragment };
|
|
324
|
+
export { DEFAULT_NATIVE_OVERFLOW_TOOL_IDS, DEFAULT_NATIVE_VECTOR_TOOLS, NativeInteractionOverlay, type NativeInteractionOverlayProps, NativeSceneRenderer, type NativeSceneRendererProps, NativeShapeRenderer, type NativeShapeRendererProps, type NativeVectorToolDefinition, NativeVectorToolbar, type NativeVectorToolbarDensity, type NativeVectorToolbarProps, type NativeVectorToolbarRenderOverflowInput, type NativeVectorToolbarRenderToolInput, type NativeVectorToolbarRenderToolLockInput, NativeVectorViewport, type NativeVectorViewportHandle, type NativeVectorViewportProps, type PlacementPreview, type SvgNode, VectorSceneItem, parseSvgFragment };
|
package/dist/native.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { C as Camera2D } from './shape-builders-Cyh8zvDG.js';
|
|
2
|
+
export { o as createFreehandStrokeItem, q as createImageItem, t as createShapeId } from './shape-builders-Cyh8zvDG.js';
|
|
3
3
|
import { V as VectorSceneItem, R as Rect } from './types-BCCvY6ie.js';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
5
|
import * as react from 'react';
|
|
5
6
|
import { ReactNode } from 'react';
|
|
6
7
|
import { StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
@@ -82,6 +83,8 @@ type NativeVectorToolDefinition = {
|
|
|
82
83
|
readonly id: string;
|
|
83
84
|
readonly label: string;
|
|
84
85
|
readonly shortLabel?: string;
|
|
86
|
+
readonly tooltipLabel?: string;
|
|
87
|
+
readonly shortcutHint?: string;
|
|
85
88
|
readonly accessibilityLabel?: string;
|
|
86
89
|
readonly disabled?: boolean;
|
|
87
90
|
};
|
|
@@ -99,6 +102,20 @@ type NativeVectorToolbarRenderToolInput = {
|
|
|
99
102
|
readonly foregroundColor: string;
|
|
100
103
|
readonly onSelect: () => void;
|
|
101
104
|
};
|
|
105
|
+
type NativeVectorToolbarDensity = "compact" | "comfortable";
|
|
106
|
+
type NativeVectorToolbarRenderToolLockInput = {
|
|
107
|
+
readonly locked: boolean;
|
|
108
|
+
readonly disabled: boolean;
|
|
109
|
+
readonly foregroundColor: string;
|
|
110
|
+
readonly onToggle: () => void;
|
|
111
|
+
};
|
|
112
|
+
type NativeVectorToolbarRenderOverflowInput = {
|
|
113
|
+
readonly open: boolean;
|
|
114
|
+
readonly activeTool: NativeVectorToolDefinition | null;
|
|
115
|
+
readonly disabled: boolean;
|
|
116
|
+
readonly foregroundColor: string;
|
|
117
|
+
readonly onToggle: () => void;
|
|
118
|
+
};
|
|
102
119
|
/**
|
|
103
120
|
* Props for {@link NativeVectorToolbar}.
|
|
104
121
|
*
|
|
@@ -110,18 +127,29 @@ type NativeVectorToolbarProps = {
|
|
|
110
127
|
readonly value: string;
|
|
111
128
|
readonly onChange: (toolId: string) => void;
|
|
112
129
|
readonly tools?: readonly NativeVectorToolDefinition[];
|
|
130
|
+
readonly overflowToolIds?: readonly string[];
|
|
131
|
+
readonly overflowMenuAccessibilityLabel?: string;
|
|
113
132
|
readonly disabled?: boolean;
|
|
114
133
|
readonly disabledToolIds?: readonly string[];
|
|
134
|
+
readonly showToolLockToggle?: boolean;
|
|
135
|
+
readonly toolLocked?: boolean;
|
|
136
|
+
readonly onToolLockedChange?: (locked: boolean) => void;
|
|
137
|
+
readonly density?: NativeVectorToolbarDensity;
|
|
115
138
|
readonly accessibilityLabel?: string;
|
|
116
139
|
readonly style?: StyleProp<ViewStyle>;
|
|
117
140
|
readonly contentContainerStyle?: StyleProp<ViewStyle>;
|
|
141
|
+
readonly overflowPanelStyle?: StyleProp<ViewStyle>;
|
|
118
142
|
readonly toolButtonStyle?: StyleProp<ViewStyle>;
|
|
119
143
|
readonly activeToolButtonStyle?: StyleProp<ViewStyle>;
|
|
120
144
|
readonly toolLabelStyle?: StyleProp<TextStyle>;
|
|
121
145
|
readonly activeToolLabelStyle?: StyleProp<TextStyle>;
|
|
122
146
|
readonly renderToolIcon?: (input: NativeVectorToolbarRenderToolInput) => ReactNode;
|
|
147
|
+
readonly renderToolLockIcon?: (input: NativeVectorToolbarRenderToolLockInput) => ReactNode;
|
|
148
|
+
readonly renderOverflowIcon?: (input: NativeVectorToolbarRenderOverflowInput) => ReactNode;
|
|
149
|
+
readonly renderOverflowChevronIcon?: (input: NativeVectorToolbarRenderOverflowInput) => ReactNode;
|
|
123
150
|
readonly renderToolButton?: (input: NativeVectorToolbarRenderToolInput) => ReactNode;
|
|
124
151
|
};
|
|
152
|
+
declare const DEFAULT_NATIVE_OVERFLOW_TOOL_IDS: readonly ["rect", "ellipse", "architectural-cloud", "line", "marker", "laser", "image"];
|
|
125
153
|
/**
|
|
126
154
|
* Default mobile-friendly tool list for {@link NativeVectorToolbar}.
|
|
127
155
|
*
|
|
@@ -144,7 +172,7 @@ declare const DEFAULT_NATIVE_VECTOR_TOOLS: readonly NativeVectorToolDefinition[]
|
|
|
144
172
|
* <NativeVectorToolbar value={toolId} onChange={setToolId} />
|
|
145
173
|
* ```
|
|
146
174
|
*/
|
|
147
|
-
declare function NativeVectorToolbar({ value, onChange, tools, disabled, disabledToolIds, accessibilityLabel, style, contentContainerStyle, toolButtonStyle, activeToolButtonStyle, toolLabelStyle, activeToolLabelStyle, renderToolIcon, renderToolButton, }: NativeVectorToolbarProps): react_jsx_runtime.JSX.Element;
|
|
175
|
+
declare function NativeVectorToolbar({ value, onChange, tools, overflowToolIds, overflowMenuAccessibilityLabel, disabled, disabledToolIds, showToolLockToggle, toolLocked, onToolLockedChange, density, accessibilityLabel, style, contentContainerStyle, overflowPanelStyle, toolButtonStyle, activeToolButtonStyle, toolLabelStyle, activeToolLabelStyle, renderToolIcon, renderToolLockIcon, renderOverflowIcon, renderOverflowChevronIcon, renderToolButton, }: NativeVectorToolbarProps): react_jsx_runtime.JSX.Element;
|
|
148
176
|
|
|
149
177
|
type NativeVectorViewportHandle = {
|
|
150
178
|
getCamera: () => Camera2D | null;
|
|
@@ -161,9 +189,11 @@ type NativeVectorViewportProps = {
|
|
|
161
189
|
readonly items: readonly VectorSceneItem[];
|
|
162
190
|
readonly selectedIds?: readonly string[];
|
|
163
191
|
readonly toolId?: string;
|
|
192
|
+
readonly toolLocked?: boolean;
|
|
164
193
|
readonly interactive?: boolean;
|
|
165
194
|
readonly onSelectionChange?: (ids: string[]) => void;
|
|
166
195
|
readonly onItemsChange?: (items: VectorSceneItem[]) => void;
|
|
196
|
+
readonly onToolChangeRequest?: (toolId: string) => void;
|
|
167
197
|
readonly onCameraChange?: () => void;
|
|
168
198
|
readonly toolbar?: React.ReactNode;
|
|
169
199
|
};
|
|
@@ -291,4 +321,4 @@ type SvgNode = SvgRectNode | SvgEllipseNode | SvgCircleNode | SvgLineNode | SvgP
|
|
|
291
321
|
*/
|
|
292
322
|
declare function parseSvgFragment(xml: string): SvgNode[];
|
|
293
323
|
|
|
294
|
-
export { DEFAULT_NATIVE_VECTOR_TOOLS, NativeInteractionOverlay, type NativeInteractionOverlayProps, NativeSceneRenderer, type NativeSceneRendererProps, NativeShapeRenderer, type NativeShapeRendererProps, type NativeVectorToolDefinition, NativeVectorToolbar, type NativeVectorToolbarProps, type NativeVectorToolbarRenderToolInput, NativeVectorViewport, type NativeVectorViewportHandle, type NativeVectorViewportProps, type PlacementPreview, type SvgNode, parseSvgFragment };
|
|
324
|
+
export { DEFAULT_NATIVE_OVERFLOW_TOOL_IDS, DEFAULT_NATIVE_VECTOR_TOOLS, NativeInteractionOverlay, type NativeInteractionOverlayProps, NativeSceneRenderer, type NativeSceneRendererProps, NativeShapeRenderer, type NativeShapeRendererProps, type NativeVectorToolDefinition, NativeVectorToolbar, type NativeVectorToolbarDensity, type NativeVectorToolbarProps, type NativeVectorToolbarRenderOverflowInput, type NativeVectorToolbarRenderToolInput, type NativeVectorToolbarRenderToolLockInput, NativeVectorViewport, type NativeVectorViewportHandle, type NativeVectorViewportProps, type PlacementPreview, type SvgNode, VectorSceneItem, parseSvgFragment };
|