@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,4 +1,9 @@
1
1
  import type { EntityRef } from "../../../shared/entity-ref";
2
+ /** 元素指向的库内实体:正文实体(EntityRef),或一整份 PDF(文档卡) */
3
+ export type BoardEntityRef = EntityRef | {
4
+ kind: "pdf";
5
+ id: number;
6
+ };
2
7
  import type { ElementSketch } from "./sketch";
3
8
  import type { Point } from "./point";
4
9
  /** 白板持久化元素;不依赖 Board 或内部插件实例。 */
@@ -10,7 +15,7 @@ export interface BoardElement {
10
15
  children?: BoardElement[];
11
16
  resizable?: boolean;
12
17
  autoHeight?: boolean;
13
- entityRef?: EntityRef;
18
+ entityRef?: BoardEntityRef;
14
19
  entity?: import("../../../db-schema/content-identities").ContentEntityReference;
15
20
  sketch?: ElementSketch;
16
21
  schemaVersion?: number;
@@ -37,7 +37,7 @@ export type SetViewportOperation = {
37
37
  properties: Partial<ViewPort>;
38
38
  newProperties: Partial<ViewPort>;
39
39
  };
40
- /** 页级画风(D-107),进撤销历史 */
40
+ /** 页级画风,进撤销历史 */
41
41
  export type SetSketchOperation = {
42
42
  type: "set_sketch";
43
43
  properties: Partial<PageSketch>;
@@ -7,5 +7,5 @@ export interface SelectArea {
7
7
  export interface Selection {
8
8
  selectArea: SelectArea | null;
9
9
  selectedElements: BoardElement[];
10
- [key: string]: any;
10
+ [key: string]: unknown;
11
11
  }
@@ -1,10 +1,10 @@
1
- /** 页面画风:手绘 / 普通(D-107) */
1
+ /** 页面画风:手绘 / 普通 */
2
2
  export type SketchMode = "sketch" | "normal";
3
3
  /** 笔触档位:工整 / 自然 / 潦草 */
4
4
  export type SketchLevel = "neat" | "natural" | "loose";
5
5
  /** 形状填充样式;普通模式下一律按实色渲染 */
6
6
  export type SketchFillStyle = "solid" | "hatch" | "cross" | "scribble";
7
- /** 页级画风,存在 WhiteBoardContent.data.sketch,缺省为 DEFAULT_PAGE_SKETCH */
7
+ /** 页级画风,存在 WhiteboardContent.data.sketch,缺省为 DEFAULT_PAGE_SKETCH */
8
8
  export interface PageSketch {
9
9
  mode: SketchMode;
10
10
  level: SketchLevel;
@@ -4,5 +4,5 @@ export interface ViewPort {
4
4
  width: number;
5
5
  height: number;
6
6
  zoom: number;
7
- [key: string]: any;
7
+ [key: string]: unknown;
8
8
  }
@@ -10,6 +10,5 @@ export interface ArrowStylePreset {
10
10
  animated: boolean;
11
11
  animationSpeed: number;
12
12
  }
13
- export declare const getDefaultArrowStylePreset: () => ArrowStylePreset;
14
13
  export declare const getPrevArrowStylePreset: () => ArrowStylePreset;
15
14
  export declare const saveArrowStylePresetFromElement: (element: ArrowElement) => void;
@@ -2,4 +2,3 @@ export declare class CanvasUtil {
2
2
  static isPointInPath(path: Path2D, x: number, y: number): boolean;
3
3
  static isPointInStroke(path: Path2D, lineWidth: number, x: number, y: number): boolean;
4
4
  }
5
- export default CanvasUtil;
@@ -1,8 +1,3 @@
1
1
  import { Board, BoardElement } from "../types/index";
2
2
  export declare const buildClipboardPayload: (board: Board, elements: BoardElement[]) => string | null;
3
3
  export declare const writeClipboardPayload: (payload: string) => Promise<boolean>;
4
- declare const _default: {
5
- buildClipboardPayload: (board: Board, elements: BoardElement[]) => string | null;
6
- writeClipboardPayload: (payload: string) => Promise<boolean>;
7
- };
8
- export default _default;
@@ -1,4 +1,3 @@
1
- export declare const HANDWRITE_STYLE_STORAGE_KEY = "whiteboard-handwrite-style-v1";
2
1
  export interface HandwriteStyle {
3
2
  themeColorId: string;
4
3
  opacity: number;
@@ -1,7 +1,4 @@
1
1
  import { Board, ElementBounds, MindNodeElement, MindDragTarget } from "../types/index";
2
- export declare const MIND_DRAG_HORIZONTAL_THRESHOLD_PX = 120;
3
- export declare const MIND_DRAG_VERTICAL_THRESHOLD_PX = 80;
4
- export declare const MIND_DRAG_TARGET_RETENTION_SCALE = 1.2;
5
2
  export declare class MindUtil {
6
3
  static isRoot(node: MindNodeElement): boolean;
7
4
  static layout(node: MindNodeElement): MindNodeElement;
@@ -1,7 +1,7 @@
1
1
  import { BoardElement, Board, Operation } from "../types/index";
2
2
  export type Path = number[];
3
3
  export declare class PathUtil {
4
- static getPathByElement(board: Board, element: BoardElement & any): Path | null;
4
+ static getPathByElement(board: Board, element: BoardElement): Path | null;
5
5
  static getElementByPath(board: Board, path: number[]): BoardElement;
6
6
  static getElement(children: BoardElement[], path: Path): BoardElement | null;
7
7
  static getParentByPath(board: Board, path: Path): Board | BoardElement | null;
@@ -47,4 +47,3 @@ export declare class PointUtil {
47
47
  static getResizedBBox(bbox: BBox, position: EHandlerPosition, anchor: Point, focus: Point): BBox;
48
48
  static getResizeCursor(position: EHandlerPosition): "move" | "e-resize" | "n-resize" | "ne-resize" | "nw-resize" | "s-resize" | "se-resize" | "sw-resize" | "w-resize";
49
49
  }
50
- export default PointUtil;
@@ -11,7 +11,7 @@ export declare class PresentationManager {
11
11
  constructor(board: Board, initialSequences?: PresentationSequence[]);
12
12
  on(event: string, listener: (...args: any[]) => void): void;
13
13
  off(event: string, listener: (...args: any[]) => void): void;
14
- emit(event: string, ...args: any[]): void;
14
+ emit(event: string, ...args: unknown[]): void;
15
15
  once(event: string, listener: (...args: any[]) => void): void;
16
16
  get isPresentationMode(): boolean;
17
17
  set isPresentationMode(value: boolean);
@@ -1,6 +1,6 @@
1
1
  import { TextStyle } from "../constants/index";
2
2
  /** 记住上一次选的外观,新建同类元素时沿用;只存语义,旧版色值键不再读取 */
3
- export declare class TextStyleStore {
3
+ declare class TextStyleStore {
4
4
  private readonly prefix;
5
5
  private readonly fallback;
6
6
  constructor(prefix: string, fallback: TextStyle);
@@ -8,3 +8,4 @@ export declare class TextStyleStore {
8
8
  load(): TextStyle;
9
9
  }
10
10
  export declare const RichTextUtil: TextStyleStore;
11
+ export {};
@@ -24,4 +24,3 @@ export * from "./HandwriteUtil";
24
24
  export * from "./HandwriteGroupUtil";
25
25
  export * from "./ExportImageUtil";
26
26
  export * from "./LayerOrderUtil";
27
- export { default as ViewportUtil } from "./ViewportUtil";
@@ -1,3 +1,3 @@
1
1
  import type { ResolvedSketch } from "../../types/sketch";
2
- /** 手绘文字容器的类名(D-107);未启用手绘时为空串 */
2
+ /** 手绘文字容器的类名;未启用手绘时为空串 */
3
3
  export declare const handTextClass: (sketch: ResolvedSketch) => string;
@@ -1,9 +1,8 @@
1
1
  export * from "./types";
2
- export { sketchShape, hatchGap, type SketchOutline, type SketchShapeInput } from "./shape";
3
- export { sketchArrow, markerLength, type SketchArrowInput, type SketchArrowOutput } from "./arrow";
4
- export { resolveSketch, isSketchableType } from "./resolve";
2
+ export { sketchShape, type SketchOutline, type SketchShapeInput } from "./shape";
3
+ export { sketchArrow, type SketchArrowInput, type SketchArrowOutput } from "./arrow";
4
+ export { resolveSketch } from "./resolve";
5
5
  export { inkSize } from "./levels";
6
- export { createRandom, hashSeed } from "./random";
7
- export { flattenPath } from "./geometry";
6
+ export { hashSeed } from "./random";
8
7
  export { patchSketch, getSketchTargets, buildSketchOps } from "./batch";
9
8
  export { handTextClass } from "./handText";
@@ -1,5 +1,5 @@
1
1
  import type { SketchFillStyle, SketchLevel } from "../../types/sketch";
2
- import { type Polyline, type Vec } from "./geometry";
2
+ import { type Vec } from "./geometry";
3
3
  import type { SketchPath } from "./types";
4
4
  export type SketchOutline = {
5
5
  kind: "rect";
@@ -29,7 +29,6 @@ export interface SketchShapeInput {
29
29
  level: SketchLevel;
30
30
  seed: number;
31
31
  }
32
- export declare function outlinePolylines(outline: SketchOutline, width: number, height: number): Polyline[];
33
32
  /** 闭合轮廓一笔绕一圈:随机起点,末尾一小段向外搭接,形成手绘的收口 */
34
33
  export declare function loopStroke(loop: Vec[], amplitude: number, random: () => number, overlapRatio?: number): Vec[];
35
34
  /** 排线间距随线宽变粗、随形状尺寸微调:大形状不稀、小形状不糊 */
@@ -1,10 +0,0 @@
1
- import type { ViewPort } from "../types/index";
2
- declare class ViewportUtil {
3
- static isRectInViewport(rect: {
4
- x: number;
5
- y: number;
6
- width: number;
7
- height: number;
8
- }, viewPort: ViewPort, expandPixels?: number): boolean;
9
- }
10
- export default ViewportUtil;