@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.
- package/CHANGELOG.md +4 -0
- package/docs/pages.md +71 -2
- package/docs/portability.md +1 -0
- package/docs/references.md +2 -0
- package/docs/settings-and-commands.md +3 -0
- package/package.json +1 -1
- package/publish-artifacts.js +20 -18
- package/tailwind.css +3 -3
- package/types/packages/collaboration/src/document-history-edit.d.ts +11 -0
- package/types/packages/collaboration/src/document-history.d.ts +91 -0
- package/types/packages/collaboration/src/index.d.ts +2 -0
- package/types/packages/collaboration/src/node-document.d.ts +1 -1
- package/types/packages/db-schema/content-identities.d.ts +1 -1
- package/types/packages/editor/src/core/CoreEditor.d.ts +10 -1
- package/types/packages/editor/src/core/api/extension.d.ts +0 -1
- package/types/packages/editor/src/core/api/index.d.ts +3 -1
- package/types/packages/editor/src/core/utils/nodeOperations.d.ts +1 -0
- package/types/packages/editor/src/core/utils/undoStep.d.ts +6 -0
- package/types/packages/editor/src/core/utils/wrapInlineText.d.ts +4 -0
- package/types/packages/editor/src/extensions/kbd/src/types.d.ts +2 -2
- package/types/packages/editor/src/extensions/link/src/types.d.ts +2 -2
- package/types/packages/editor/src/extensions/styled-text/src/types.d.ts +2 -2
- package/types/packages/editor/src/extensions/underline/src/types.d.ts +2 -2
- package/types/packages/markdown/src/codec.d.ts +6 -2
- package/types/packages/markdown/src/markdown.d.ts +2 -1
- package/types/packages/markdown/src/positionMapper.d.ts +7 -1
- package/types/packages/plugins/src/app.d.ts +2 -0
- package/types/packages/plugins/src/index.d.ts +1 -1
- package/types/packages/plugins/src/pages.d.ts +8 -2
- package/types/packages/shared/src/chat-core/aiRunProtocol.d.ts +1 -1
- package/types/packages/shared/src/chat-core/messages.d.ts +13 -4
- package/types/packages/themes/src/themes/ink.theme.d.ts +1 -2
- package/types/packages/themes/src/themes/mint.theme.d.ts +1 -2
- package/types/packages/themes/src/themes/ocean.theme.d.ts +1 -2
- package/types/packages/themes/src/themes/paper.theme.d.ts +1 -2
- package/types/packages/themes/src/themes/sakura.theme.d.ts +1 -2
- package/types/packages/themes/src/themes/wisteria.theme.d.ts +1 -2
- package/types/packages/ui/src/cn.d.ts +1 -1
- package/types/packages/ui/src/primitives/AnchoredPanel.d.ts +3 -3
- package/types/packages/ui/src/primitives/Button.d.ts +4 -4
- package/types/packages/ui/src/primitives/Checkbox.d.ts +2 -2
- package/types/packages/ui/src/primitives/ConfirmDialog.d.ts +3 -3
- package/types/packages/ui/src/primitives/Dialog.d.ts +4 -4
- package/types/packages/ui/src/primitives/Loading.d.ts +1 -1
- package/types/packages/ui/src/primitives/Menu.d.ts +1 -1
- package/types/packages/ui/src/primitives/Notification.d.ts +2 -2
- package/types/packages/ui/src/primitives/Popover.d.ts +3 -3
- package/types/packages/ui/src/primitives/Radio.d.ts +2 -3
- package/types/packages/ui/src/primitives/RadioGroup.d.ts +1 -1
- package/types/packages/ui/src/primitives/Segmented.d.ts +3 -3
- package/types/packages/ui/src/primitives/Select.d.ts +6 -6
- package/types/packages/ui/src/primitives/Switch.d.ts +2 -2
- package/types/packages/ui/src/primitives/Tag.d.ts +2 -3
- package/types/packages/ui/src/primitives/Toast.d.ts +1 -1
- package/types/packages/ui/src/primitives/Tooltip.d.ts +5 -5
- package/types/packages/ui/src/primitives/ValueDisplay.d.ts +2 -3
- package/types/packages/ui/src/primitives/anchoredPosition.d.ts +1 -2
- package/types/packages/ui/src/primitives/datepicker/DatePicker.d.ts +2 -2
- package/types/packages/ui/src/primitives/datepicker/DateRangePicker.d.ts +1 -1
- package/types/packages/ui/src/primitives/input/Input.d.ts +4 -4
- package/types/packages/ui/src/primitives/input/NumberInput.d.ts +2 -2
- package/types/packages/ui/src/primitives/input/Textarea.d.ts +1 -1
- package/types/packages/whiteboard/src/Board.d.ts +8 -6
- package/types/packages/whiteboard/src/{WhiteBoard.d.ts → Whiteboard.d.ts} +6 -6
- package/types/packages/whiteboard/src/chrome/index.d.ts +1 -1
- package/types/packages/whiteboard/src/components/ArrowConnectPoint/index.d.ts +26 -0
- package/types/packages/whiteboard/src/components/ArrowConnectPointGroup/index.d.ts +3 -0
- package/types/packages/whiteboard/src/components/DocumentElement/index.d.ts +2 -0
- package/types/packages/whiteboard/src/components/ExcerptElement/index.d.ts +13 -0
- package/types/packages/whiteboard/src/components/SketchPopover.d.ts +1 -1
- package/types/packages/whiteboard/src/constants/arrow.d.ts +0 -2
- package/types/packages/whiteboard/src/constants/mind.d.ts +0 -13
- package/types/packages/whiteboard/src/constants/text-style.d.ts +1 -1
- package/types/packages/whiteboard/src/extensions/authorApi.d.ts +0 -1
- package/types/packages/whiteboard/src/extensions/events.d.ts +0 -1
- package/types/packages/whiteboard/src/hooks/useDropArrow.d.ts +1 -1
- package/types/packages/whiteboard/src/hooks/useReadonly.d.ts +1 -0
- package/types/packages/whiteboard/src/hooks/useSelectState.d.ts +0 -1
- package/types/packages/whiteboard/src/index.d.ts +10 -6
- package/types/packages/whiteboard/src/plugins/ArrowPlugin.d.ts +1 -1
- package/types/packages/whiteboard/src/plugins/ColumnPlugin.d.ts +1 -1
- package/types/packages/whiteboard/src/plugins/CommonPlugin.d.ts +10 -10
- package/types/packages/whiteboard/src/plugins/DocumentPlugin.d.ts +36 -3
- package/types/packages/whiteboard/src/plugins/ExcerptPlugin.d.ts +48 -0
- package/types/packages/whiteboard/src/plugins/FramePlugin.d.ts +1 -1
- package/types/packages/whiteboard/src/plugins/GeometryPlugin.d.ts +5 -2
- package/types/packages/whiteboard/src/plugins/MindPlugin.d.ts +1 -2
- package/types/packages/whiteboard/src/plugins/WebviewPlugin.d.ts +1 -1
- package/types/packages/whiteboard/src/plugins/{WhiteBoardPlugin.d.ts → WhiteboardPlugin.d.ts} +8 -5
- package/types/packages/whiteboard/src/plugins/index.d.ts +2 -1
- package/types/packages/whiteboard/src/public.d.ts +23 -1
- package/types/packages/whiteboard/src/types/board.d.ts +10 -10
- package/types/packages/whiteboard/src/types/element.d.ts +6 -1
- package/types/packages/whiteboard/src/types/operation.d.ts +1 -1
- package/types/packages/whiteboard/src/types/selection.d.ts +1 -1
- package/types/packages/whiteboard/src/types/sketch.d.ts +2 -2
- package/types/packages/whiteboard/src/types/viewport.d.ts +1 -1
- package/types/packages/whiteboard/src/utils/ArrowStyleUtil.d.ts +0 -1
- package/types/packages/whiteboard/src/utils/CanvasUtil.d.ts +0 -1
- package/types/packages/whiteboard/src/utils/ClipboardUtil.d.ts +0 -5
- package/types/packages/whiteboard/src/utils/HandwriteUtil.d.ts +0 -1
- package/types/packages/whiteboard/src/utils/MindUtil.d.ts +0 -3
- package/types/packages/whiteboard/src/utils/PathUtil.d.ts +1 -1
- package/types/packages/whiteboard/src/utils/PointUtil.d.ts +0 -1
- package/types/packages/whiteboard/src/utils/PresentationManager.d.ts +1 -1
- package/types/packages/whiteboard/src/utils/TextStyleStore.d.ts +2 -1
- package/types/packages/whiteboard/src/utils/index.d.ts +0 -1
- package/types/packages/whiteboard/src/utils/sketch/handText.d.ts +1 -1
- package/types/packages/whiteboard/src/utils/sketch/index.d.ts +4 -5
- package/types/packages/whiteboard/src/utils/sketch/shape.d.ts +1 -2
- 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?:
|
|
18
|
+
entityRef?: BoardEntityRef;
|
|
14
19
|
entity?: import("../../../db-schema/content-identities").ContentEntityReference;
|
|
15
20
|
sketch?: ElementSketch;
|
|
16
21
|
schemaVersion?: number;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/** 页面画风:手绘 /
|
|
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
|
-
/** 页级画风,存在
|
|
7
|
+
/** 页级画风,存在 WhiteboardContent.data.sketch,缺省为 DEFAULT_PAGE_SKETCH */
|
|
8
8
|
export interface PageSketch {
|
|
9
9
|
mode: SketchMode;
|
|
10
10
|
level: SketchLevel;
|
|
@@ -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;
|
|
@@ -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,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
|
|
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:
|
|
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
|
-
|
|
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 {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
export * from "./types";
|
|
2
|
-
export { sketchShape,
|
|
3
|
-
export { sketchArrow,
|
|
4
|
-
export { resolveSketch
|
|
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 {
|
|
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
|
|
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;
|