@xiongtao.xt/tau-plugins 0.27.0 → 0.29.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/AI.md +116 -116
- package/API.md +881 -828
- package/BACKEND.md +68 -68
- package/CHANGELOG.md +114 -102
- package/DEVELOPMENT.md +173 -170
- package/EDITOR.md +192 -192
- package/FLASHCARDS.md +92 -92
- package/IMAGES.md +16 -16
- package/LICENSE +21 -21
- package/MCP.md +2 -0
- package/NOTIFICATIONS.md +48 -0
- package/PUBLISH-DATA.md +47 -47
- package/PUBLISH.md +48 -48
- package/SERVICES.md +119 -119
- package/SYNC.md +37 -37
- package/TTS.md +20 -20
- package/UPLOAD.md +35 -35
- package/VIDEO.md +65 -65
- package/WHITEBOARD.md +115 -115
- package/package.json +1 -1
- package/types/packages/editor/source-contracts.d.ts +0 -1
- package/types/packages/plugins/src/contract.d.ts +2 -0
- package/types/packages/plugins/src/index.d.ts +2 -1
- package/types/packages/plugins/src/notifications.d.ts +25 -0
- package/types/packages/plugins/src/pages.d.ts +6 -0
- package/types/packages/plugins/src/publish-data.d.ts +12 -0
- package/types/packages/ui/src/index.d.ts +1 -0
- package/types/packages/ui/src/primitives/DocumentCard.d.ts +11 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Disposable } from "./contract";
|
|
2
|
+
export type PluginNotificationMode = "auto" | "in-app" | "system";
|
|
3
|
+
export interface PluginNotificationAction {
|
|
4
|
+
label: string;
|
|
5
|
+
primary?: boolean;
|
|
6
|
+
resolvedText?: string;
|
|
7
|
+
onClick(): void | Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export interface PluginNotificationOptions {
|
|
10
|
+
title: string;
|
|
11
|
+
body?: string;
|
|
12
|
+
/** 默认 auto:插件所在窗口聚焦时应用内展示,否则进入独立通知窗口。 */
|
|
13
|
+
mode?: PluginNotificationMode;
|
|
14
|
+
tone?: "neutral" | "ok" | "danger";
|
|
15
|
+
/** 常驻到用户处理或关闭,默认 false。 */
|
|
16
|
+
sticky?: boolean;
|
|
17
|
+
/** 最多两个按钮,最多一个主按钮;回调在插件所在窗口执行。 */
|
|
18
|
+
actions?: readonly PluginNotificationAction[];
|
|
19
|
+
}
|
|
20
|
+
export interface PluginNotifications {
|
|
21
|
+
/** 发送通知,dispose 撤销这一条;停用、激活失败或切库时自动撤销。 */
|
|
22
|
+
send(options: PluginNotificationOptions): Disposable;
|
|
23
|
+
}
|
|
24
|
+
/** 只复制公开字段,避免插件对象或回调进入跨进程载荷。 */
|
|
25
|
+
export declare function readNotificationOptions(input: PluginNotificationOptions): PluginNotificationOptions;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import type { ComponentType } from "react";
|
|
2
2
|
import type { Disposable, PluginContext } from "./index";
|
|
3
|
+
import type { JsonValue } from "./json";
|
|
3
4
|
export type PluginPageParams = Record<string, string | number | boolean>;
|
|
5
|
+
export interface PluginPageContext {
|
|
6
|
+
/** 在组件 effect 中登记当前状态提供器;返回值的形状由插件决定。 */
|
|
7
|
+
register(provider: () => JsonValue): Disposable;
|
|
8
|
+
}
|
|
4
9
|
export interface PluginPageProps {
|
|
5
10
|
readonly context: PluginContext;
|
|
6
11
|
readonly params: Readonly<PluginPageParams>;
|
|
12
|
+
readonly pageContext: PluginPageContext;
|
|
7
13
|
}
|
|
8
14
|
export interface PluginPageDefinition {
|
|
9
15
|
id: string;
|
|
@@ -56,6 +56,18 @@ export interface ContentNode {
|
|
|
56
56
|
type?: string;
|
|
57
57
|
children?: ContentNode[];
|
|
58
58
|
}
|
|
59
|
+
/** 由宿主生成发布快照、由博客渲染器内置展示的业务节点。 */
|
|
60
|
+
export declare const PUBLISHED_HOST_ELEMENT_TYPES: readonly ["project-card-list"];
|
|
61
|
+
export interface PublishedProjectCardListNode extends ContentNode {
|
|
62
|
+
type: "project-card-list";
|
|
63
|
+
items: {
|
|
64
|
+
id: number;
|
|
65
|
+
title: string;
|
|
66
|
+
summary: string;
|
|
67
|
+
target: ContentRef;
|
|
68
|
+
}[];
|
|
69
|
+
children: ContentNode[];
|
|
70
|
+
}
|
|
59
71
|
export interface TreeItem {
|
|
60
72
|
title: string;
|
|
61
73
|
target?: ContentRef;
|
|
@@ -13,6 +13,7 @@ export * from "./primitives/Button";
|
|
|
13
13
|
export * from "./primitives/IconButton";
|
|
14
14
|
export * from "./primitives/Loading";
|
|
15
15
|
export * from "./primitives/Panel";
|
|
16
|
+
export * from "./primitives/DocumentCard";
|
|
16
17
|
export * from "./primitives/Toast";
|
|
17
18
|
export * from "./primitives/Notification";
|
|
18
19
|
export * from "./primitives/Tooltip";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export declare function DocumentCardGrid({ children }: {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
/** 尺寸使用 em,让编辑器与发布站点的卡片随正文字号一起缩放。 */
|
|
6
|
+
export declare function DocumentCard({ title, description, href, onClick, }: {
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
href?: string;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|