@8btc/whiteboard 0.0.3 → 0.0.5

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/index.d.ts CHANGED
@@ -14,6 +14,11 @@ export declare class CanvasApi extends CanvasCore {
14
14
  * 设置当前工具类型
15
15
  */
16
16
  setToolType(type: ToolType): void;
17
+ /**
18
+ * 手动创建多个节点
19
+ * 如果你不知道自己在干什么,请使用更高层的封装方法,如 createImageNode
20
+ */
21
+ createNodes(nodes: INode[]): void;
17
22
  /**
18
23
  * 更新视口位置
19
24
  */
@@ -25,18 +30,6 @@ export declare class CanvasApi extends CanvasCore {
25
30
  x: number;
26
31
  y: number;
27
32
  }): void;
28
- /**
29
- * 在当前所有节点的左下角插入图片,并将其居中显示
30
- * 如果没有节点,插入到画布中心
31
- * @param imageUrl - 图片 URL
32
- * @param options - 配置选项
33
- * @param options.width - 图片宽度
34
- * @param options.height - 图片高度
35
- */
36
- insertImageAtBottomLeft(imageUrl: string, options?: {
37
- width?: number;
38
- height?: number;
39
- }): void;
40
33
  /**
41
34
  * 导出全部图形为图片
42
35
  * @param options - 导出配置
@@ -363,6 +356,8 @@ declare interface IViewport {
363
356
  scale: number;
364
357
  }
365
358
 
359
+ export declare const NODE_NAME_FOR_SELECT = "shapeNameForSelect";
360
+
366
361
  export declare type NodeType = "rectangle" | "image" | "image-marker";
367
362
 
368
363
  export declare function PureCanvas({ setApi }: PureCanvasProps): JSX.Element;