@xiongtao.xt/tau-plugins 0.58.0 → 0.59.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.
Files changed (111) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/docs/pages.md +71 -2
  3. package/docs/portability.md +1 -0
  4. package/docs/references.md +2 -0
  5. package/docs/settings-and-commands.md +3 -0
  6. package/package.json +1 -1
  7. package/publish-artifacts.js +20 -18
  8. package/tailwind.css +3 -3
  9. package/types/packages/collaboration/src/document-history-edit.d.ts +11 -0
  10. package/types/packages/collaboration/src/document-history.d.ts +91 -0
  11. package/types/packages/collaboration/src/index.d.ts +2 -0
  12. package/types/packages/collaboration/src/node-document.d.ts +1 -1
  13. package/types/packages/db-schema/content-identities.d.ts +1 -1
  14. package/types/packages/editor/src/core/CoreEditor.d.ts +10 -1
  15. package/types/packages/editor/src/core/api/extension.d.ts +0 -1
  16. package/types/packages/editor/src/core/api/index.d.ts +3 -1
  17. package/types/packages/editor/src/core/utils/nodeOperations.d.ts +1 -0
  18. package/types/packages/editor/src/core/utils/undoStep.d.ts +6 -0
  19. package/types/packages/editor/src/core/utils/wrapInlineText.d.ts +4 -0
  20. package/types/packages/editor/src/extensions/kbd/src/types.d.ts +2 -2
  21. package/types/packages/editor/src/extensions/link/src/types.d.ts +2 -2
  22. package/types/packages/editor/src/extensions/styled-text/src/types.d.ts +2 -2
  23. package/types/packages/editor/src/extensions/underline/src/types.d.ts +2 -2
  24. package/types/packages/markdown/src/codec.d.ts +6 -2
  25. package/types/packages/markdown/src/markdown.d.ts +2 -1
  26. package/types/packages/markdown/src/positionMapper.d.ts +7 -1
  27. package/types/packages/plugins/src/app.d.ts +2 -0
  28. package/types/packages/plugins/src/index.d.ts +1 -1
  29. package/types/packages/plugins/src/pages.d.ts +8 -2
  30. package/types/packages/shared/src/chat-core/aiRunProtocol.d.ts +1 -1
  31. package/types/packages/shared/src/chat-core/messages.d.ts +13 -4
  32. package/types/packages/themes/src/themes/ink.theme.d.ts +1 -2
  33. package/types/packages/themes/src/themes/mint.theme.d.ts +1 -2
  34. package/types/packages/themes/src/themes/ocean.theme.d.ts +1 -2
  35. package/types/packages/themes/src/themes/paper.theme.d.ts +1 -2
  36. package/types/packages/themes/src/themes/sakura.theme.d.ts +1 -2
  37. package/types/packages/themes/src/themes/wisteria.theme.d.ts +1 -2
  38. package/types/packages/ui/src/cn.d.ts +1 -1
  39. package/types/packages/ui/src/primitives/AnchoredPanel.d.ts +3 -3
  40. package/types/packages/ui/src/primitives/Button.d.ts +4 -4
  41. package/types/packages/ui/src/primitives/Checkbox.d.ts +2 -2
  42. package/types/packages/ui/src/primitives/ConfirmDialog.d.ts +3 -3
  43. package/types/packages/ui/src/primitives/Dialog.d.ts +4 -4
  44. package/types/packages/ui/src/primitives/Loading.d.ts +1 -1
  45. package/types/packages/ui/src/primitives/Menu.d.ts +1 -1
  46. package/types/packages/ui/src/primitives/Notification.d.ts +2 -2
  47. package/types/packages/ui/src/primitives/Popover.d.ts +3 -3
  48. package/types/packages/ui/src/primitives/Radio.d.ts +2 -3
  49. package/types/packages/ui/src/primitives/RadioGroup.d.ts +1 -1
  50. package/types/packages/ui/src/primitives/Segmented.d.ts +3 -3
  51. package/types/packages/ui/src/primitives/Select.d.ts +6 -6
  52. package/types/packages/ui/src/primitives/Switch.d.ts +2 -2
  53. package/types/packages/ui/src/primitives/Tag.d.ts +2 -3
  54. package/types/packages/ui/src/primitives/Toast.d.ts +1 -1
  55. package/types/packages/ui/src/primitives/Tooltip.d.ts +5 -5
  56. package/types/packages/ui/src/primitives/ValueDisplay.d.ts +2 -3
  57. package/types/packages/ui/src/primitives/anchoredPosition.d.ts +1 -2
  58. package/types/packages/ui/src/primitives/datepicker/DatePicker.d.ts +2 -2
  59. package/types/packages/ui/src/primitives/datepicker/DateRangePicker.d.ts +1 -1
  60. package/types/packages/ui/src/primitives/input/Input.d.ts +4 -4
  61. package/types/packages/ui/src/primitives/input/NumberInput.d.ts +2 -2
  62. package/types/packages/ui/src/primitives/input/Textarea.d.ts +1 -1
  63. package/types/packages/whiteboard/src/Board.d.ts +8 -6
  64. package/types/packages/whiteboard/src/{WhiteBoard.d.ts → Whiteboard.d.ts} +6 -6
  65. package/types/packages/whiteboard/src/chrome/index.d.ts +1 -1
  66. package/types/packages/whiteboard/src/components/ArrowConnectPoint/index.d.ts +26 -0
  67. package/types/packages/whiteboard/src/components/ArrowConnectPointGroup/index.d.ts +3 -0
  68. package/types/packages/whiteboard/src/components/DocumentElement/index.d.ts +2 -0
  69. package/types/packages/whiteboard/src/components/ExcerptElement/index.d.ts +13 -0
  70. package/types/packages/whiteboard/src/components/SketchPopover.d.ts +1 -1
  71. package/types/packages/whiteboard/src/constants/arrow.d.ts +0 -2
  72. package/types/packages/whiteboard/src/constants/mind.d.ts +0 -13
  73. package/types/packages/whiteboard/src/constants/text-style.d.ts +1 -1
  74. package/types/packages/whiteboard/src/extensions/authorApi.d.ts +0 -1
  75. package/types/packages/whiteboard/src/extensions/events.d.ts +0 -1
  76. package/types/packages/whiteboard/src/hooks/useDropArrow.d.ts +1 -1
  77. package/types/packages/whiteboard/src/hooks/useReadonly.d.ts +1 -0
  78. package/types/packages/whiteboard/src/hooks/useSelectState.d.ts +0 -1
  79. package/types/packages/whiteboard/src/index.d.ts +10 -6
  80. package/types/packages/whiteboard/src/plugins/ArrowPlugin.d.ts +1 -1
  81. package/types/packages/whiteboard/src/plugins/ColumnPlugin.d.ts +1 -1
  82. package/types/packages/whiteboard/src/plugins/CommonPlugin.d.ts +10 -10
  83. package/types/packages/whiteboard/src/plugins/DocumentPlugin.d.ts +36 -3
  84. package/types/packages/whiteboard/src/plugins/ExcerptPlugin.d.ts +48 -0
  85. package/types/packages/whiteboard/src/plugins/FramePlugin.d.ts +1 -1
  86. package/types/packages/whiteboard/src/plugins/GeometryPlugin.d.ts +5 -2
  87. package/types/packages/whiteboard/src/plugins/MindPlugin.d.ts +1 -2
  88. package/types/packages/whiteboard/src/plugins/WebviewPlugin.d.ts +1 -1
  89. package/types/packages/whiteboard/src/plugins/{WhiteBoardPlugin.d.ts → WhiteboardPlugin.d.ts} +8 -5
  90. package/types/packages/whiteboard/src/plugins/index.d.ts +2 -1
  91. package/types/packages/whiteboard/src/public.d.ts +23 -1
  92. package/types/packages/whiteboard/src/types/board.d.ts +10 -10
  93. package/types/packages/whiteboard/src/types/element.d.ts +6 -1
  94. package/types/packages/whiteboard/src/types/operation.d.ts +1 -1
  95. package/types/packages/whiteboard/src/types/selection.d.ts +1 -1
  96. package/types/packages/whiteboard/src/types/sketch.d.ts +2 -2
  97. package/types/packages/whiteboard/src/types/viewport.d.ts +1 -1
  98. package/types/packages/whiteboard/src/utils/ArrowStyleUtil.d.ts +0 -1
  99. package/types/packages/whiteboard/src/utils/CanvasUtil.d.ts +0 -1
  100. package/types/packages/whiteboard/src/utils/ClipboardUtil.d.ts +0 -5
  101. package/types/packages/whiteboard/src/utils/HandwriteUtil.d.ts +0 -1
  102. package/types/packages/whiteboard/src/utils/MindUtil.d.ts +0 -3
  103. package/types/packages/whiteboard/src/utils/PathUtil.d.ts +1 -1
  104. package/types/packages/whiteboard/src/utils/PointUtil.d.ts +0 -1
  105. package/types/packages/whiteboard/src/utils/PresentationManager.d.ts +1 -1
  106. package/types/packages/whiteboard/src/utils/TextStyleStore.d.ts +2 -1
  107. package/types/packages/whiteboard/src/utils/index.d.ts +0 -1
  108. package/types/packages/whiteboard/src/utils/sketch/handText.d.ts +1 -1
  109. package/types/packages/whiteboard/src/utils/sketch/index.d.ts +4 -5
  110. package/types/packages/whiteboard/src/utils/sketch/shape.d.ts +1 -2
  111. package/types/packages/whiteboard/src/utils/ViewportUtil.d.ts +0 -10
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import SnapManager from "./utils/snap/SnapManager";
3
3
  import { PresentationManager } from "./utils/PresentationManager";
4
- import { Operation, Selection, IBoardPlugin, BoardElement, ViewPort, PresentationSequence, ElementBounds, BoardContextMenuPayload, PluginContextMenuItem, CustomOffset, PageSketch } from "./types/index";
4
+ import { Operation, Selection, IBoardPlugin, BoardElement, ViewPort, PresentationSequence, ElementBounds, BoardContextMenuPayload, PluginContextMenuItem, CustomOffset, Point, PageSketch } from "./types/index";
5
5
  import { CapabilityService } from "./services/CapabilityService";
6
6
  import { InteractionManager } from "./interactions/InteractionManager";
7
7
  import { ExtensionRuntime } from "./extensions/runtime";
@@ -21,6 +21,8 @@ declare class Board {
21
21
  attachDocument(document: WhiteboardDocumentBinding): void;
22
22
  publishDocument(children: BoardElement[], sketch?: PageSketch, sequences?: PresentationSequence[]): void;
23
23
  private plugins;
24
+ /** 指针在画布上的最近位置(画布坐标);指针离开画布为 null。`/` 放入等需要光标处的入口读取 */
25
+ pointer: Point | null;
24
26
  private eventEmitter;
25
27
  snap: SnapManager;
26
28
  capabilityService: CapabilityService;
@@ -45,7 +47,7 @@ declare class Board {
45
47
  children: BoardElement[];
46
48
  viewPort: ViewPort;
47
49
  selection: Selection;
48
- /** 页级画风(D-107);变化时 emit("sketch:change") */
50
+ /** 页级画风;变化时 emit("sketch:change") */
49
51
  sketch: PageSketch;
50
52
  undos: Array<Operation[]>;
51
53
  redos: Array<Operation[]>;
@@ -57,7 +59,7 @@ declare class Board {
57
59
  * 容器视口矩形(缓存):指针热路径(每次 pointermove 的坐标转换)高频读取,
58
60
  * getBoundingClientRect 在上一帧 DOM 写入后会把整文档强制重排(大页面百 ms 级)。
59
61
  * 平移/手势期间容器几何不变,缓存恒命中;布局变化经 invalidateContainerRect 失效
60
- * (容器 ResizeObserver 与窗口滚动捕获,见 WhiteBoard 接线)。
62
+ * (容器 ResizeObserver 与窗口滚动捕获,见 Whiteboard 接线)。
61
63
  */
62
64
  getContainerRect(): {
63
65
  x: number;
@@ -93,13 +95,13 @@ declare class Board {
93
95
  markCreationPreviewLeaving(): void;
94
96
  constructor(children: BoardElement[], viewPort: ViewPort, selection: Selection, plugins?: IBoardPlugin[], presentationSequences?: PresentationSequence[], readonly?: boolean, sketch?: PageSketch);
95
97
  private _readonly;
96
- /** 文档版本过高导致的强制只读原因;普通只读为 null。宿主(WhiteBoard 组件)负责设置。 */
98
+ /** 文档版本过高导致的强制只读原因;普通只读为 null。宿主(Whiteboard 组件)负责设置。 */
97
99
  readonlyReason: "document-too-new" | null;
98
100
  get readonly(): boolean;
99
101
  set readonly(value: boolean);
100
102
  on(event: string, listener: (...args: any[]) => void): void;
101
103
  off(event: string, listener: (...args: any[]) => void): void;
102
- emit(event: string, ...args: any[]): void;
104
+ emit(event: string, ...args: unknown[]): void;
103
105
  once(event: string, listener: (...args: any[]) => void): void;
104
106
  destroy(): void;
105
107
  initPlugins(plugins: IBoardPlugin[]): void;
@@ -149,7 +151,7 @@ declare class Board {
149
151
  renderElement(element: BoardElement): React.ReactElement | null | undefined;
150
152
  renderPluginElement(plugin: IBoardPlugin, element: BoardElement, children: React.ReactElement[]): import("react/jsx-runtime").JSX.Element;
151
153
  renderElements(value?: BoardElement[]): (React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null | undefined)[];
152
- getArrowBindPoint(element: BoardElement, connectId: string, customOffset?: CustomOffset): import("./types/index").Point | null;
154
+ getArrowBindPoint(element: BoardElement, connectId: string, customOffset?: CustomOffset): Point | null;
153
155
  canUndo(): boolean;
154
156
  canRedo(): boolean;
155
157
  undo(): void;
@@ -4,7 +4,7 @@ import React from "react";
4
4
  import { type ServiceRegistry } from "../../shared/service-registry";
5
5
  import { BoardElement, ViewPort, Selection, PresentationSequence, PageSketch } from "./types/index";
6
6
  import type { WhiteboardExtension, WhiteboardExtensionError, WhiteboardOutline, WhiteboardSnapshot } from "./extensions/api";
7
- export interface WhiteBoardProps {
7
+ export interface WhiteboardProps {
8
8
  presence?: WhiteboardPresenceOptions;
9
9
  document?: WhiteboardDocumentBinding;
10
10
  extensions: readonly WhiteboardExtension[];
@@ -17,7 +17,7 @@ export interface WhiteBoardProps {
17
17
  initViewPort?: ViewPort;
18
18
  initSelection?: Selection;
19
19
  initPresentationSequences?: PresentationSequence[];
20
- /** 页级画风(D-107),缺省为普通 */
20
+ /** 页级画风,缺省为普通 */
21
21
  initSketch?: PageSketch;
22
22
  /** 加载的文档版本(getDocumentVersion(data)),缺省视为 1;高于支持范围时强制只读且不写回 */
23
23
  version?: number;
@@ -38,7 +38,7 @@ export interface WhiteBoardProps {
38
38
  /** 宿主为特定扩展派生服务作用域;未提供时使用公共注册表。 */
39
39
  extensionServices?: (id: string, api: import("./extensions/api").WhiteboardAPI) => ServiceRegistry;
40
40
  }
41
- export interface WhiteBoardRef {
41
+ export interface WhiteboardRef {
42
42
  fitAllElements: (padding?: number, animate?: boolean) => void;
43
43
  getElements: () => BoardElement[];
44
44
  zoomIn: () => void;
@@ -50,8 +50,8 @@ export interface WhiteBoardRef {
50
50
  /**
51
51
  * 画板生命周期:渲染期只构造无副作用的 Board,文档连接与扩展装配放在提交期,完成后才挂载画布。
52
52
  * 被丢弃的渲染(挂起、出错重试、StrictMode 双渲染)因此不会残留扩展实例或占用文档绑定;
53
- * 销毁由画布在容器真正脱离文档时执行(见 WhiteBoardCanvas 的容器 effect)。
53
+ * 销毁由画布在容器真正脱离文档时执行(见 WhiteboardCanvas 的容器 effect)。
54
54
  */
55
- declare const WhiteBoard: React.NamedExoticComponent<WhiteBoardProps & React.RefAttributes<WhiteBoardRef>>;
56
- export default WhiteBoard;
55
+ declare const Whiteboard: React.NamedExoticComponent<WhiteboardProps & React.RefAttributes<WhiteboardRef>>;
56
+ export default Whiteboard;
57
57
  export * from "./types/index";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * 画布 chrome 公共件(D-049):
2
+ * 画布 chrome 公共件:
3
3
  * 工具条 / 属性浮动条 / 状态栏 / 元素树等浮动件共用一套主题语言——
4
4
  * 实底 surface + shadow-lift + 1px 细描边,不用毛玻璃与蓝调;激活 = accent-soft,悬停 = bg-hover;
5
5
  * 组内分隔靠留白(ChromeGap),不画竖线。
@@ -0,0 +1,26 @@
1
+ import type { PointerEventHandler } from "react";
2
+ import type { Point, BoardElement } from "../../types/index";
3
+ interface ArrowConnectPointProps {
4
+ element: BoardElement;
5
+ connectId: string;
6
+ x: number;
7
+ y: number;
8
+ r: number;
9
+ fill: string;
10
+ fillOpacity?: number;
11
+ onConnectStart?: () => void;
12
+ /**
13
+ * 拖出的箭头松手时没有连到任何元素:返回 true 表示由调用方接手(不提交这条箭头),
14
+ * release 用于在接手结束后撤掉还画着的临时箭头。
15
+ */
16
+ onReleaseInSpace?: (event: {
17
+ point: Point;
18
+ clientX: number;
19
+ clientY: number;
20
+ release(): void;
21
+ }) => boolean;
22
+ onPointerEnter?: PointerEventHandler<SVGCircleElement>;
23
+ onPointerLeave?: PointerEventHandler<SVGCircleElement>;
24
+ }
25
+ declare const ArrowConnectPoint: import("react").MemoExoticComponent<(props: ArrowConnectPointProps) => import("react/jsx-runtime").JSX.Element>;
26
+ export default ArrowConnectPoint;
@@ -1,4 +1,6 @@
1
+ import { type ComponentProps } from "react";
1
2
  import type { BoardElement, Point } from "../../types/index";
3
+ import ArrowConnectPoint from "../ArrowConnectPoint/index";
2
4
  type ArrowConnectPointData = {
3
5
  connectId: string;
4
6
  point: Point;
@@ -8,6 +10,7 @@ interface ArrowConnectPointGroupProps {
8
10
  points: ArrowConnectPointData[];
9
11
  isSelected: boolean;
10
12
  disabled?: boolean;
13
+ onReleaseInSpace?: ComponentProps<typeof ArrowConnectPoint>["onReleaseInSpace"];
11
14
  }
12
15
  declare const ArrowConnectPointGroup: import("react").MemoExoticComponent<(props: ArrowConnectPointGroupProps) => import("react/jsx-runtime").JSX.Element>;
13
16
  export default ArrowConnectPointGroup;
@@ -4,6 +4,8 @@ import { type DocumentElement } from "../../plugins/DocumentPlugin";
4
4
  export declare const DOCUMENT_CARD_RADIUS = 16;
5
5
  interface DocumentElementProps {
6
6
  element: DocumentElement;
7
+ /** 从连接点拖到空白处松手时打开放入面板(宿主装配了放入入口才开) */
8
+ insertable?: boolean;
7
9
  onResizeStart?: (element: DocumentElement, startPoint: Point) => void;
8
10
  onResize: (board: Board, element: DocumentElement, position: EHandlerPosition, startPoint: Point, endPoint: Point, isPreserveRatio?: boolean, isAdsorb?: boolean) => void;
9
11
  onResizeEnd?: (board: Board, element: DocumentElement, position: EHandlerPosition, startPoint: Point, endPoint: Point) => void;
@@ -0,0 +1,13 @@
1
+ import { Board, EHandlerPosition, Point } from "../../types/index";
2
+ import type { ExcerptElement } from "../../plugins/ExcerptPlugin";
3
+ /** 摘录卡的圆角,宿主卡面与选中框共用 */
4
+ export declare const EXCERPT_CARD_RADIUS = 10;
5
+ interface ExcerptElementProps {
6
+ element: ExcerptElement;
7
+ onResizeStart?: (element: ExcerptElement, startPoint: Point) => void;
8
+ onResize: (board: Board, element: ExcerptElement, position: EHandlerPosition, startPoint: Point, endPoint: Point, isPreserveRatio?: boolean, isAdsorb?: boolean) => void;
9
+ onResizeEnd?: (board: Board, element: ExcerptElement, position: EHandlerPosition, startPoint: Point, endPoint: Point) => void;
10
+ }
11
+ /** 摘录外壳负责选中、缩放和连线,卡面(原文、笔记、来源条)由摘录扩展的宿主 Body 提供。 */
12
+ declare const ExcerptElementComponent: import("react").MemoExoticComponent<(props: ExcerptElementProps) => import("react/jsx-runtime").JSX.Element>;
13
+ export default ExcerptElementComponent;
@@ -36,7 +36,7 @@ interface SketchPopoverProps<T extends BoardElement> {
36
36
  };
37
37
  }
38
38
  /**
39
- * 元素级「笔触」(D-107):画风(跟随页面 / 手绘 / 普通)· 笔触档位 · 填充 · 换一笔。
39
+ * 元素级「笔触」:画风(跟随页面 / 手绘 / 普通)· 笔触档位 · 填充 · 换一笔。
40
40
  * 未单独设置的字段跟随页面,选「跟随页面」即删除覆盖。
41
41
  */
42
42
  declare function SketchPopover<T extends BoardElement>({ target, onChange, fill }: SketchPopoverProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -4,8 +4,6 @@ export declare const ARROW_CONNECT_POINT_RADIUS = 4;
4
4
  export declare const ARROW_CONNECT_PROXIMITY_RADIUS = 28;
5
5
  export declare const ARROW_CONNECT_PROXIMITY_HIDE_DELAY = 80;
6
6
  export declare const ARROW_DROP_PROXIMITY_RADIUS = 10;
7
- export declare const DEFAULT_ARROW_LINE_COLOR = "currentColor";
8
- export declare const DEFAULT_ARROW_LINE_WIDTH = 2;
9
7
  export declare const ARROW_CONNECT_ID: {
10
8
  readonly TOP: "top";
11
9
  readonly BOTTOM: "bottom";
@@ -1,14 +1 @@
1
- export declare const MIND_COLORS: readonly [{
2
- readonly background: "rgb(62, 136, 245)";
3
- readonly textColor: "#fff";
4
- readonly theme: "dark";
5
- }, {
6
- readonly background: "rgb(238, 238, 238)";
7
- readonly textColor: "#000";
8
- readonly theme: "light";
9
- }, {
10
- readonly background: "transparent";
11
- readonly textColor: "currentColor";
12
- }];
13
- export declare const MIND_LINE_COLORS: string[];
14
1
  export declare const getMindDragSourceId: (nodeId: string) => string;
@@ -43,7 +43,7 @@ export declare function getTextBoxPadding(style: TextStyle): TextBoxPadding;
43
43
  export declare const toCssPadding: (p: TextBoxPadding) => string;
44
44
  /**
45
45
  * 底板的底色与发丝线色;none 返回 null。卡片不用阴影,只靠发丝线分层。
46
- * sketchEdge:手绘模式下的墨迹框色——发丝线太淡,墨迹需要可辨的颜色(D-107)
46
+ * sketchEdge:手绘模式下的墨迹框色——发丝线太淡,墨迹需要可辨的颜色
47
47
  */
48
48
  export declare function getTextSurface(style: TextStyle): {
49
49
  background: string;
@@ -2,7 +2,6 @@ import type { WhiteboardAPI as HostAPI, WhiteboardExtension as HostExtension } f
2
2
  import type { WhiteboardAPI, WhiteboardAuthorBridge, WhiteboardElementDefinition, WhiteboardExtension } from "./authorTypes";
3
3
  export declare const whiteboardAuthorOwner: (extension: object) => string | undefined;
4
4
  export declare function bindWhiteboardAuthorAPI(base: HostAPI, owner: string, get: () => WhiteboardAuthorBridge | undefined, active: () => boolean): () => void;
5
- export declare function authorAPI(base: HostAPI): WhiteboardAPI;
6
5
  export declare function useWhiteboardAPI(): WhiteboardAPI;
7
6
  export declare function defineElement<TData = unknown>(definition: WhiteboardElementDefinition<TData>): WhiteboardElementDefinition<TData>;
8
7
  /** 作者工厂及回调始终收到受控外观,宿主旧能力不进入作者对象原型。 */
@@ -40,7 +40,6 @@ export type KernelEventName = keyof WhiteboardKernelEvents;
40
40
  export declare const KERNEL_EVENT_NAMES: readonly KernelEventName[];
41
41
  /** 扩展事件名:`<命名空间>.<名称>`,命名空间取扩展 id 第一段 */
42
42
  export type ExtensionEventName = `${string}.${string}`;
43
- export declare function isKernelEventName(event: string): event is KernelEventName;
44
43
  /** api.on 允许的事件:内核事件 + 任意命名空间的扩展事件(扩展间通信) */
45
44
  export declare function assertSubscribableEventName(event: string): void;
46
45
  /**
@@ -7,7 +7,7 @@ interface DropArrowOptions {
7
7
  container?: boolean;
8
8
  }
9
9
  /** 注册元素为箭头连接目标(悬停连接点与拖动落点共用一份候选),并在拖动箭头时判定自己是否为落点 */
10
- export declare const useDropArrow: (element: CommonElement & any, { container }?: DropArrowOptions) => {
10
+ export declare const useDropArrow: (element: CommonElement, { container }?: DropArrowOptions) => {
11
11
  isMoveArrowClosing: boolean;
12
12
  activeConnectId: string;
13
13
  arrowConnectPoints: ({
@@ -0,0 +1 @@
1
+ export declare const useReadonly: () => boolean;
@@ -7,4 +7,3 @@ export declare const useSelectState: (elementId: string) => {
7
7
  isSelected: boolean;
8
8
  isSelecting: boolean;
9
9
  };
10
- export default useSelectState;
@@ -1,5 +1,5 @@
1
- export { default, default as WhiteBoard } from "./WhiteBoard";
2
- export type { WhiteBoardProps, WhiteBoardRef } from "./WhiteBoard";
1
+ export { default, default as Whiteboard } from "./Whiteboard";
2
+ export type { WhiteboardProps, WhiteboardRef } from "./Whiteboard";
3
3
  export * from "./extensions/api";
4
4
  export type { WhiteboardKernelEvents, KernelEventName, ExtensionEventName, } from "./extensions/events";
5
5
  export { KERNEL_EVENT_NAMES } from "./extensions/events";
@@ -25,11 +25,12 @@ export { SELECT_TOOL_ID } from "./constants/tools";
25
25
  export type { BoardElement, ElementBounds, BoardContextMenuPayload, ContextMenuModalPayload, } from "./types/board";
26
26
  export type { WhiteboardAPI as Board } from "./extensions/api";
27
27
  export type { Path } from "./types/index";
28
- export { BoardUtil, PathUtil, ViewPortTransforms, ImageUtil, VideoUtil, AudioUtil, createWhiteboardSession, FrameUtil, PointUtil, MindUtil, } from "./public";
28
+ export { BoardUtil, PathUtil, ViewPortTransforms, ImageUtil, VideoUtil, AudioUtil, createWhiteboardSession, FrameUtil, PointUtil, MindUtil, placeDocuments, placeExcerpt, } from "./public";
29
29
  export { default as MindThemeUtil } from "./utils/MindThemeUtil";
30
30
  export type { MindMode, MindNodeVisual } from "./utils/MindThemeUtil";
31
31
  export { useWhiteboardAPI as useBoard } from "./extensions/context";
32
32
  export { useSelection, useViewPort } from "./extensions/publicHooks";
33
+ export { useReadonly } from "./hooks/useReadonly";
33
34
  export { useBoardState } from "./hooks/useBoardState";
34
35
  export { useDropArrow } from "./hooks/useDropArrow";
35
36
  export { useSelectState } from "./hooks/useSelectState";
@@ -38,9 +39,12 @@ export { useSketch } from "./hooks/useSketch";
38
39
  export { RESIZE_CIRCLE_FILL, RESIZE_CIRCLE_RADIUS } from "./constants/resize";
39
40
  export { SELECT_RECT_STROKE, SELECT_RECT_STROKE_WIDTH, SELECT_RECT_FILL_OPACITY, } from "./constants/select";
40
41
  export { SKETCH_MEDIA_FRAME } from "./constants/sketch";
41
- export { DOCUMENT_OPEN_EVENT, DOCUMENT_DEFAULT_SIZE, isDocumentElement, } from "./plugins/DocumentPlugin";
42
- export type { DocumentElement, DocumentKind } from "./plugins/DocumentPlugin";
43
- export type { WhiteBoardElement } from "./plugins/WhiteBoardPlugin";
42
+ export { DOCUMENT_OPEN_EVENT, DOCUMENT_INSERT_EVENT, DOCUMENT_RELATED_EVENT, DOCUMENT_PEEK_EVENT, DOCUMENT_TURN_PAGE_EVENT, DOCUMENT_DEFAULT_SIZE, isDocumentElement, } from "./plugins/DocumentPlugin";
43
+ export type { DocumentElement, DocumentKind, DocumentInsertRequest, } from "./plugins/DocumentPlugin";
44
+ export type { WhiteboardElement } from "./plugins/WhiteboardPlugin";
45
+ export { EXCERPT_OPEN_SOURCE_EVENT, EXCERPT_DEFAULT_SIZE, isExcerptElement, } from "./plugins/ExcerptPlugin";
46
+ export type { ExcerptElement, ExcerptSource } from "./plugins/ExcerptPlugin";
47
+ export { EXCERPT_CARD_RADIUS } from "./components/ExcerptElement/index";
44
48
  export * from "./chrome/index";
45
49
  export { PageSchematic } from "./schematic/PageSchematic";
46
50
  export { default as ResizeCircle } from "./components/ResizeCircle/index";
@@ -30,7 +30,7 @@ export declare class ArrowPlugin implements IBoardPlugin {
30
30
  children?: import("../index").BoardElement[];
31
31
  resizable?: boolean;
32
32
  autoHeight?: boolean;
33
- entityRef?: import("../../../shared/entity-ref").EntityRef;
33
+ entityRef?: import("../types/element").BoardEntityRef;
34
34
  entity?: import("../../../db-schema/content-identities").ContentEntityReference;
35
35
  sketch?: import("../index").ElementSketch;
36
36
  schemaVersion?: number;
@@ -76,6 +76,6 @@ export declare class ColumnPlugin extends CommonPlugin implements IBoardPlugin {
76
76
  protected onResizeEnd(board: Board): void;
77
77
  render(board: Board, { element, children }: {
78
78
  element: ColumnElement;
79
- children?: any;
79
+ children?: React.ReactNode;
80
80
  }): import("react/jsx-runtime").JSX.Element;
81
81
  }
@@ -88,17 +88,17 @@ export declare abstract class CommonPlugin implements IBoardPlugin {
88
88
  })[];
89
89
  static getCustomBindPoint(element: CommonElement, customOffset: CustomOffset): Point;
90
90
  getArrowBindPoint(_board: Board, element: CommonElement, connectId: string, customOffset?: CustomOffset): Point | null;
91
- isHit(_board: Board, element: CommonElement & any, x: number, y: number): boolean;
92
- moveElement(_board: Board, element: CommonElement & any, dx: number, dy: number): any;
93
- getBounds(_board: Board, element: CommonElement & any): {
94
- minX: any;
95
- minY: any;
96
- maxX: any;
97
- maxY: any;
91
+ isHit(_board: Board, element: CommonElement, x: number, y: number): boolean;
92
+ moveElement(_board: Board, element: CommonElement, dx: number, dy: number): BoardElement | null;
93
+ getBounds(_board: Board, element: CommonElement): {
94
+ minX: number;
95
+ minY: number;
96
+ maxX: number;
97
+ maxY: number;
98
98
  };
99
- isElementSelected(board: Board, element: CommonElement & any, selectArea?: Selection["selectArea"]): boolean;
100
- protected onResizeStart(element: CommonElement & any): void;
101
- protected onResize(board: Board, element: CommonElement & any, position: EHandlerPosition, startPoint: Point, endPoint: Point, isPreserveRatio?: boolean, isAdsorb?: boolean): any;
99
+ isElementSelected(board: Board, element: CommonElement, selectArea?: Selection["selectArea"]): boolean;
100
+ protected onResizeStart(element: CommonElement): void;
101
+ protected onResize(board: Board, element: CommonElement, position: EHandlerPosition, startPoint: Point, endPoint: Point, isPreserveRatio?: boolean, isAdsorb?: boolean): void | CommonElement;
102
102
  protected onResizeEnd(board: Board): void;
103
103
  }
104
104
  export default CommonPlugin;
@@ -1,9 +1,10 @@
1
1
  import { Board, BoardElement, IBoardPlugin, EHandlerPosition, Point, ContextMenuContext, PluginContextMenuItem, IElementCapabilities } from "../types/index";
2
+ import type { ViewPort } from "../types/viewport";
2
3
  import { CommonPlugin, CommonElement } from "./CommonPlugin";
3
- /** 文档卡可指向的正文实体,写法同 EntityRefKind */
4
- export type DocumentKind = "card" | "article" | "project-item" | "diary-moment";
4
+ /** 文档卡可指向的实体:正文实体写法同 EntityRefKind;pdf 是一整份 PDF(pdfs.id),没有正文 */
5
+ export type DocumentKind = "card" | "article" | "project-item" | "diary-moment" | "pdf";
5
6
  /**
6
- * 文档卡:引用一篇库里的正文(卡片 / 文章 / 项目文档 / 日记里的一条碎碎念)。画布上只读预览,展开后编辑;
7
+ * 文档卡:引用一篇库里的正文(卡片 / 文章 / 项目文档 / 日记里的一条碎碎念),或一整份 PDF。画布上只读预览,展开后编辑;
7
8
  * 正文不存在元素上,删除元素不影响原文。只存 entityRef,不存 contentId——白板保存按 contentId 计引用。
8
9
  */
9
10
  export interface DocumentElement extends CommonElement {
@@ -23,8 +24,40 @@ export declare const DOCUMENT_DEFAULT_SIZE: Record<DocumentKind, {
23
24
  width: number;
24
25
  height: number;
25
26
  }>;
27
+ /**
28
+ * 放入请求:`/`、工具栏、右键「文档」、从文档卡拖出到空白处都只发这个请求,宿主的检索面板响应。
29
+ * - at:放入位置(画布坐标),一行内容从这里向右展开;
30
+ * - screen:面板贴在哪里(client 坐标),缺省放在视口中央;
31
+ * - linkFrom:放入后从这个元素连一条箭头到每个新元素。
32
+ */
33
+ export declare const DOCUMENT_INSERT_EVENT = "tau.document.insert";
34
+ export interface DocumentInsertRequest {
35
+ at: Point;
36
+ /** at 是行的左缘还是中心,缺省左缘 */
37
+ align?: "start" | "center";
38
+ screen?: Point;
39
+ linkFrom?: string;
40
+ /** 拖出时画着的临时连线:面板关闭(放入或取消)时由宿主调用移除 */
41
+ release?(): void;
42
+ }
43
+ /**
44
+ * 速览:按住文档卡 250ms,或选中后按住空格,卡面原位放大到能读,松开落回。
45
+ * 载荷为元素 id(开始)或 null(结束);宿主的速览层响应,只读画布同样可用。
46
+ */
47
+ export declare const DOCUMENT_PEEK_EVENT = "tau.document.peek";
48
+ export declare const DOCUMENT_PEEK_DELAY = 250;
49
+ export declare const requestPeekDocument: (board: Board, elementId: string | null) => void;
50
+ /** PDF 文档卡翻页:选中 PDF 卡按 [ / ],载荷 { id, delta };宿主写回全局「上次读到的页」 */
51
+ export declare const DOCUMENT_TURN_PAGE_EVENT = "tau.document.turn-page";
52
+ /** 长出相关请求:选中文档卡按 R 或点属性条「相关」,载荷为元素 id;宿主在卡旁浮出建议 */
53
+ export declare const DOCUMENT_RELATED_EVENT = "tau.document.related";
26
54
  export declare const isDocumentElement: (element: BoardElement | null | undefined) => boolean;
27
55
  export declare const requestOpenDocument: (board: Board, elementId: string) => void;
56
+ export declare const requestInsertDocument: (board: Board, request: DocumentInsertRequest) => void;
57
+ /** 视口中央的放入请求(工具栏按钮、没有光标位置时) */
58
+ export declare function viewportInsertRequest(source: {
59
+ viewPort: ViewPort;
60
+ }): DocumentInsertRequest;
28
61
  export declare class DocumentPlugin extends CommonPlugin implements IBoardPlugin {
29
62
  private readonly actions;
30
63
  name: string;
@@ -0,0 +1,48 @@
1
+ import { Board, BoardElement, IBoardPlugin, EHandlerPosition, Point, IElementCapabilities } from "../types/index";
2
+ import { CommonPlugin, CommonElement } from "./CommonPlugin";
3
+ /** 摘录的来源:PDF 里的一处标注,或一篇正文 */
4
+ export type ExcerptSource = {
5
+ kind: "pdf";
6
+ entity: import("../../../db-schema/content-identities").ContentEntityReference & {
7
+ kind: "pdf";
8
+ };
9
+ annotationObjectId: string;
10
+ page: number;
11
+ } | {
12
+ kind: "pdf";
13
+ pdfId: number;
14
+ annotationId: number | null;
15
+ page: number;
16
+ } | {
17
+ kind: "card" | "article" | "project-item";
18
+ id: number;
19
+ };
20
+ /**
21
+ * 摘录:从阅读纸里摘下的一段原文,带来源。原文与笔记存快照(来源删除后照样显示),不进库、不建索引;
22
+ * 回到原文由来源条发 EXCERPT_OPEN_SOURCE_EVENT,宿主打开来源并定位。
23
+ */
24
+ export interface ExcerptElement extends CommonElement {
25
+ type: "excerpt";
26
+ source?: ExcerptSource;
27
+ quote?: string;
28
+ note?: string;
29
+ /** 高亮色(EHighlightColor 的值),卡片左侧色条 */
30
+ color?: string;
31
+ /** 来源标题快照:来源条显示 */
32
+ sourceTitle?: string;
33
+ }
34
+ export declare const EXCERPT_OPEN_SOURCE_EVENT = "tau.excerpt.open-source";
35
+ export declare const EXCERPT_DEFAULT_SIZE: {
36
+ width: number;
37
+ height: number;
38
+ };
39
+ export declare const isExcerptElement: (element: BoardElement | null | undefined) => boolean;
40
+ export declare class ExcerptPlugin extends CommonPlugin implements IBoardPlugin {
41
+ name: string;
42
+ constructor();
43
+ getCapabilities(): IElementCapabilities;
44
+ onResize(board: Board, element: ExcerptElement, position: EHandlerPosition, startPoint: Point, endPoint: Point, isPreserveRatio?: boolean, isAdsorb?: boolean): void;
45
+ render(_board: Board, { element }: {
46
+ element: ExcerptElement;
47
+ }): import("react/jsx-runtime").JSX.Element;
48
+ }
@@ -9,6 +9,6 @@ export declare class FramePlugin extends CommonPlugin implements IBoardPlugin {
9
9
  protected onResizeEnd(board: Board): void;
10
10
  render(_board: Board, { element, children }: {
11
11
  element: FrameElement;
12
- children?: any;
12
+ children?: React.ReactNode;
13
13
  }): import("react/jsx-runtime").JSX.Element;
14
14
  }
@@ -11,10 +11,13 @@ export interface GeometryElement extends CommonElement {
11
11
  stroke?: string;
12
12
  strokeWidth?: number;
13
13
  strokeOpacity?: number;
14
- /** 手绘模式下的填充样式(D-107);普通模式一律按实色渲染,缺省 solid */
14
+ /** 手绘模式下的填充样式;普通模式一律按实色渲染,缺省 solid */
15
15
  fillStyle?: SketchFillStyle;
16
16
  paths: string[];
17
- extraInfo?: Record<string, any>;
17
+ /** 渲染器按图形类型读取附加参数(如矩形圆角);未知键原样保留 */
18
+ extraInfo?: {
19
+ cornerRadius?: number;
20
+ } & Record<string, unknown>;
18
21
  text: {
19
22
  align: "left" | "center" | "right";
20
23
  content: Descendant[];
@@ -2,14 +2,13 @@ import { type TextExtensionOptions } from "../extensions/text";
2
2
  import { type ReactNode } from "react";
3
3
  import { Board, IBoardPlugin, MindNodeElement, Selection, MindDragState, ContextMenuContext, PluginContextMenuItem, IElementCapabilities, BoardElement } from "../types/index";
4
4
  import type { InteractionState } from "../interactions/InteractionState";
5
- export declare const EMPTY_MIND_DRAG_STATE: MindDragState;
6
5
  export declare class MindPlugin implements IBoardPlugin {
7
6
  private readonly text;
8
7
  name: string;
9
8
  constructor(text?: TextExtensionOptions);
10
9
  getCapabilities(): IElementCapabilities;
11
10
  private dragState;
12
- private dragAnimationFrame;
11
+ private cancelDragPreviewFrame;
13
12
  private pendingPointerMove;
14
13
  private listeners;
15
14
  getContextMenu(context: ContextMenuContext): PluginContextMenuItem[];
@@ -4,7 +4,7 @@ export declare class WebviewPlugin extends CommonPlugin implements IBoardPlugin
4
4
  name: string;
5
5
  constructor();
6
6
  getContextMenu(context: ContextMenuContext): PluginContextMenuItem[];
7
- isHit(_board: Board, element: CommonElement & any, x: number, y: number): boolean;
7
+ isHit(_board: Board, element: CommonElement, x: number, y: number): boolean;
8
8
  render(_board: Board, { element }: {
9
9
  element: WebviewElement;
10
10
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,13 @@
1
1
  import { Board, IBoardPlugin, EHandlerPosition, Point, ContextMenuContext, PluginContextMenuItem, IElementCapabilities } from "../types/index";
2
2
  import { CommonPlugin, CommonElement } from "./CommonPlugin";
3
- export interface WhiteBoardElement extends CommonElement {
3
+ export interface WhiteboardElement extends CommonElement {
4
4
  type: "whiteboard";
5
5
  /** 引用的整块白板 */
6
- whiteBoardId?: number;
6
+ whiteboardId?: number;
7
7
  /** 旧元素:只引用了某一页(新元素不再写入) */
8
+ whiteboardContentId?: number;
9
+ /** 旧画布元素的误拼 key,读取兼容 */
10
+ whiteBoardId?: number;
8
11
  whiteBoardContentId?: number;
9
12
  /** 插入时的白板标题(白板读取失败时兜底显示) */
10
13
  name: string;
@@ -18,14 +21,14 @@ export interface WhiteBoardElement extends CommonElement {
18
21
  theme?: "light" | "dark";
19
22
  resizable?: boolean;
20
23
  }
21
- export declare class WhiteBoardPlugin extends CommonPlugin implements IBoardPlugin {
24
+ export declare class WhiteboardPlugin extends CommonPlugin implements IBoardPlugin {
22
25
  private readonly canCreate;
23
26
  name: string;
24
27
  constructor(canCreate?: boolean);
25
28
  getCapabilities(): IElementCapabilities;
26
29
  getContextMenu(context: ContextMenuContext): PluginContextMenuItem[];
27
- onResize(board: Board, element: WhiteBoardElement, position: EHandlerPosition, startPoint: Point, endPoint: Point, _isPreserveRatio?: boolean, isAdsorb?: boolean): void;
30
+ onResize(board: Board, element: WhiteboardElement, position: EHandlerPosition, startPoint: Point, endPoint: Point, _isPreserveRatio?: boolean, isAdsorb?: boolean): void;
28
31
  render(board: Board, { element }: {
29
- element: WhiteBoardElement;
32
+ element: WhiteboardElement;
30
33
  }): import("react/jsx-runtime").JSX.Element;
31
34
  }
@@ -4,6 +4,7 @@ export * from "./RichTextPlugin";
4
4
  export * from "./GeometryPlugin";
5
5
  export * from "./HandwritePlugin";
6
6
  export * from "./DocumentPlugin";
7
+ export * from "./ExcerptPlugin";
7
8
  export * from "./CommonPlugin";
8
9
  export * from "./ArrowPlugin";
9
10
  export * from "./ImagePlugin";
@@ -13,7 +14,7 @@ export * from "./MindPlugin";
13
14
  export * from "./PresentationPlugin";
14
15
  export * from "./WebviewPlugin";
15
16
  export * from "./FramePlugin";
16
- export * from "./WhiteBoardPlugin";
17
+ export * from "./WhiteboardPlugin";
17
18
  export * from "./ColumnPlugin";
18
19
  export * from "./FileDragDropPlugin";
19
20
  export * from "./ExportImagePlugin";
@@ -2,7 +2,9 @@ import type { WhiteboardAPI, WhiteboardExtension, WhiteboardSnapshot } from "./e
2
2
  import { BoardUtil as InternalBoardUtil } from "./utils/BoardUtil";
3
3
  import { ViewPortTransforms as InternalViewport } from "./transforms/index";
4
4
  import { VideoUtil as InternalVideo } from "./utils/VideoUtil";
5
- import type { BoardElement } from "./types/index";
5
+ import type { BoardElement, Point } from "./types/index";
6
+ import { type DocumentElement } from "./plugins/DocumentPlugin";
7
+ import { type ExcerptElement } from "./plugins/ExcerptPlugin";
6
8
  import type { MediaCapabilities } from "./extensions/media";
7
9
  import { FrameUtil as InternalFrame } from "./utils/FrameUtil";
8
10
  import { PointUtil as InternalPoint } from "./utils/PointUtil";
@@ -52,3 +54,23 @@ export declare const AudioUtil: {
52
54
  insertAudioFromUrl: (url: string, api: WhiteboardAPI) => Promise<void>;
53
55
  insertAudioFromTTS: (blob: Blob, text: string, api: WhiteboardAPI, media: MediaCapabilities) => Promise<void>;
54
56
  };
57
+ /**
58
+ * 把一组文档放到白板:从 at 起排成一行(align 为 center 时以 at 为中心),可选从 linkFrom 连箭头,选中新卡。
59
+ * 插入、连线与选中是一次 apply(一步撤销)。返回新元素;linkFrom 已不存在时不连线。
60
+ */
61
+ export declare function placeDocuments(api: WhiteboardAPI, documents: readonly Pick<DocumentElement, "entityRef" | "entity" | "title">[], options: {
62
+ at: Point;
63
+ align?: "start" | "center";
64
+ linkFrom?: string;
65
+ /** 保留当前选中(长出相关:放入建议后还要继续看这张卡的其他建议) */
66
+ keepSelection?: boolean;
67
+ }): DocumentElement[];
68
+ /**
69
+ * 放一张摘录:at 为左缘中点(align center 时为中心);linkFrom 存在时从来源卡画一条虚线箭头。
70
+ * 插入、连线与选中是一次 apply。返回新元素。
71
+ */
72
+ export declare function placeExcerpt(api: WhiteboardAPI, excerpt: Pick<ExcerptElement, "source" | "quote" | "note" | "color" | "sourceTitle">, options: {
73
+ at: Point;
74
+ align?: "start" | "center";
75
+ linkFrom?: string;
76
+ }): ExcerptElement;
@@ -60,20 +60,20 @@ export interface IBoardPlugin {
60
60
  onDragOver?: EventHandler;
61
61
  onDragEnter?: EventHandler;
62
62
  onDragLeave?: EventHandler;
63
- getArrowBindPoint?: (board: Board, element: BoardElement & any, connectId: string, customOffset?: CustomOffset) => Point | null;
64
- isElementSelected?: (board: Board, element: BoardElement & any, selectArea?: Selection["selectArea"]) => boolean;
65
- moveElement?: (board: Board, element: BoardElement & any, offsetX: number, offsetY: number) => BoardElement | null;
66
- isHit?(board: Board, element: BoardElement & any, x: number, y: number): boolean;
67
- render?: (board: Board, value: {
68
- element: BoardElement & any;
69
- children?: React.ReactElement[];
70
- }) => React.ReactElement;
71
- getBounds?: (board: Board, element: BoardElement & any) => ElementBounds | null;
63
+ getArrowBindPoint?(board: Board, element: BoardElement, connectId: string, customOffset?: CustomOffset): Point | null;
64
+ isElementSelected?(board: Board, element: BoardElement, selectArea?: Selection["selectArea"]): boolean;
65
+ moveElement?(board: Board, element: BoardElement, offsetX: number, offsetY: number): BoardElement | null;
66
+ isHit?(board: Board, element: BoardElement, x: number, y: number): boolean;
67
+ render?(board: Board, value: {
68
+ element: BoardElement;
69
+ children?: React.ReactNode;
70
+ }): React.ReactElement;
71
+ getBounds?(board: Board, element: BoardElement): ElementBounds | null;
72
72
  getContextMenu?: (context: ContextMenuContext) => PluginContextMenuItem[];
73
73
  getCapabilities?: () => IElementCapabilities;
74
74
  }
75
75
  export interface ContextMenuModalPayload {
76
- type: "document" | "image" | "video" | "audio" | "webview" | "whiteboard" | "export-image";
76
+ type: "image" | "video" | "audio" | "webview" | "whiteboard" | "export-image";
77
77
  action?: string;
78
78
  selectedElementIds?: string[];
79
79
  }