drawui-react 0.5.3 → 0.6.0

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.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { ToolType, PageTheme, Language, Shape, EditorData, Editor, ImageUploadOption, ExportFormat, ArrowStyle } from 'drawui-core';
2
+ import { ToolType, PageTheme, Language, Shape, EditorData, Editor, ImageUploadOption, ExportFormat, TemplateDef, ArrowStyle } from 'drawui-core';
3
3
  export { ToolType } from 'drawui-core';
4
4
 
5
5
  interface CanvasBoardProps {
@@ -50,6 +50,8 @@ interface ToolbarProps {
50
50
  onStickyNoteColorChange?: (color: string) => void;
51
51
  /** 从图标库面板选了一个图标:宿主负责插入画布 */
52
52
  onInsertIcon?: (iconId: string) => void;
53
+ /** 模板库:选中一张模板后把它整块插到画布视口中心 */
54
+ onInsertTemplate?: (def: TemplateDef) => void;
53
55
  /** 「表格」行列选择器里选了 rows×cols:宿主负责插入画布 */
54
56
  onInsertTable?: (rows: number, cols: number) => void;
55
57
  /** 「图片」按钮选了文件(多选):宿主负责上传并插入画布 */
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { ToolType, PageTheme, Language, Shape, EditorData, Editor, ImageUploadOption, ExportFormat, ArrowStyle } from 'drawui-core';
2
+ import { ToolType, PageTheme, Language, Shape, EditorData, Editor, ImageUploadOption, ExportFormat, TemplateDef, ArrowStyle } from 'drawui-core';
3
3
  export { ToolType } from 'drawui-core';
4
4
 
5
5
  interface CanvasBoardProps {
@@ -50,6 +50,8 @@ interface ToolbarProps {
50
50
  onStickyNoteColorChange?: (color: string) => void;
51
51
  /** 从图标库面板选了一个图标:宿主负责插入画布 */
52
52
  onInsertIcon?: (iconId: string) => void;
53
+ /** 模板库:选中一张模板后把它整块插到画布视口中心 */
54
+ onInsertTemplate?: (def: TemplateDef) => void;
53
55
  /** 「表格」行列选择器里选了 rows×cols:宿主负责插入画布 */
54
56
  onInsertTable?: (rows: number, cols: number) => void;
55
57
  /** 「图片」按钮选了文件(多选):宿主负责上传并插入画布 */