@xiongtao.xt/tau-plugins 0.56.0 → 0.57.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 +1 -1
- package/docs/README.md +15 -16
- package/docs/backend.md +5 -6
- package/docs/blog-templates.md +199 -0
- package/docs/portability.md +30 -29
- package/docs/services.md +15 -9
- package/docs/site-data.md +30 -9
- package/docs/ui.md +16 -15
- package/docs/windows.md +83 -0
- package/package.json +1 -1
- package/publish-artifacts.js +57 -13
- package/tailwind.css +20 -0
- package/types/packages/collaboration/src/document-membership.d.ts +4 -0
- package/types/packages/collaboration/src/document-operations.d.ts +8 -2
- package/types/packages/collaboration/src/document-protocol.d.ts +13 -0
- package/types/packages/collaboration/src/encoding.d.ts +1 -1
- package/types/packages/collaboration/src/index.d.ts +3 -0
- package/types/packages/collaboration/src/member-activities.d.ts +8 -0
- package/types/packages/collaboration/src/node-tree.d.ts +4 -1
- package/types/packages/collaboration/src/protocol.d.ts +7 -3
- package/types/packages/collaboration/src/scoped-content-edit.d.ts +91 -0
- package/types/packages/editor/src/core/CoreEditor.d.ts +3 -0
- package/types/packages/editor/src/core/api/clipboardFragment.d.ts +14 -0
- package/types/packages/editor/src/core/api/drag.d.ts +1 -1
- package/types/packages/editor/src/core/api/index.d.ts +3 -0
- package/types/packages/editor/src/core/api/marks.d.ts +2 -0
- package/types/packages/editor/src/core/index.d.ts +1 -0
- package/types/packages/editor/src/core/inlineSuggestion/controller.d.ts +29 -0
- package/types/packages/editor/src/core/inlineSuggestion/providerContext.d.ts +3 -0
- package/types/packages/editor/src/core/utils/nodeOperations.d.ts +1 -1
- package/types/packages/editor/src/extensions/table/src/types.d.ts +4 -0
- package/types/packages/editor/text-field-contract.d.ts +3 -0
- package/types/packages/plugins/src/contract.d.ts +3 -0
- package/types/packages/plugins/src/index.d.ts +1 -0
- package/types/packages/plugins/src/windows.d.ts +76 -0
- package/types/packages/themes/src/tokenContract.d.ts +1 -0
- package/types/packages/ui/src/hooks/scrollbarAutoHide.d.ts +1 -1
package/docs/windows.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# 桌面插件窗口
|
|
2
|
+
|
|
3
|
+
窗口 API 需要插件 SDK **0.57.0** 和 Tau 桌面端 **0.63.5** 或更新版本。Android、iOS 和网页宿主没有此能力。必须使用窗口的插件只声明桌面目标,并将 `targets.desktop.minAppVersion` 设为 `"0.63.5"` 或更高的实际测试版本。
|
|
4
|
+
|
|
5
|
+
## 声明与打开窗口
|
|
6
|
+
|
|
7
|
+
在 `definePlugin({ windows })` 里声明 React 组件、窗口 ID、标题和选项。下面的插件注册一条桌面命令,用户可以从命令面板打开预览窗口。
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { definePlugin, type PluginWindowProps } from "@tau/plugins";
|
|
11
|
+
import { Button } from "@tau/ui";
|
|
12
|
+
|
|
13
|
+
declare const __PLUGIN_META__: { id: string; name: string; version: string };
|
|
14
|
+
|
|
15
|
+
function Preview({ params, close }: PluginWindowProps) {
|
|
16
|
+
return (
|
|
17
|
+
<section className="yourname-preview">
|
|
18
|
+
<h2>{String(params.title ?? "预览")}</h2>
|
|
19
|
+
<Button onClick={() => void close()}>关闭</Button>
|
|
20
|
+
</section>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default definePlugin({
|
|
25
|
+
...__PLUGIN_META__,
|
|
26
|
+
windows: [
|
|
27
|
+
{
|
|
28
|
+
id: "preview",
|
|
29
|
+
title: "预览",
|
|
30
|
+
options: { kind: "normal", width: 720, height: 480 },
|
|
31
|
+
component: Preview,
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
create: () => ({
|
|
35
|
+
activate(context) {
|
|
36
|
+
context.commands.register({
|
|
37
|
+
id: "open-preview",
|
|
38
|
+
title: "打开预览",
|
|
39
|
+
async run() {
|
|
40
|
+
await context.windows?.open("preview", { title: "本次预览" });
|
|
41
|
+
return null;
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
},
|
|
45
|
+
}),
|
|
46
|
+
});
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
- 在用户点击或按键时调用 `open(id, params?)`。参数接受字符串、有限数字和布尔值。重复打开同一 ID 会聚焦窗口并整体替换参数,组件保持挂载。
|
|
50
|
+
- 普通窗用 `kind: "normal"`,可调整尺寸。小窗用 `kind: "compact"`,尺寸固定,可声明 `alwaysOnTop: true`。全屏用 `kind: "fullscreen"`,宿主处理显示器与退出操作。
|
|
51
|
+
- `open()` 返回可关闭这次物理窗口的句柄。组件内用 `props.close()` 关闭自己。关窗重开会挂载新组件。用 `props.signal` 取消随窗口结束的工作。
|
|
52
|
+
- 窗口组件在独立渲染环境中运行,应用级 `activate()` 在主窗口执行。需要在两端共享的值通过下文接口传递。
|
|
53
|
+
|
|
54
|
+
## 外观自动跟随 Tau
|
|
55
|
+
|
|
56
|
+
宿主在组件挂载前应用主题、明暗、用户字体与字号,并在设置变化时更新已打开的窗口。用 `@tau/ui` 或现有语义 token 就能继承外观,按[界面组件与样式](ui-components.md)编译插件自己的 CSS。
|
|
57
|
+
|
|
58
|
+
```css
|
|
59
|
+
.yourname-preview {
|
|
60
|
+
background: var(--tau-bg-page);
|
|
61
|
+
color: var(--tau-ink-1);
|
|
62
|
+
font: var(--tau-text-body) var(--tau-font);
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
全屏等场景可以在窗口选项里声明 `theme: "dark"`。窗口仍跟随用户选择的主题族和字体。
|
|
67
|
+
|
|
68
|
+
画布等自绘组件可用只读的 `system.get("system.appearance")` 读初值,再用 `system.subscribe("system.appearance", redraw)` 监听变化。快照包含 `themeId`、全局明暗偏好 `appearance`、本窗口生效的 `mode`,以及 `font` 里的 `chineseFont`、`englishFont`、`codeFont` 和 `fontSize`。
|
|
69
|
+
|
|
70
|
+
## 同步状态与发送消息
|
|
71
|
+
|
|
72
|
+
主窗口通过 `context.windows.communication`,独立窗口通过 `props.communication` 访问同一插件和工作区的通信。插件定义自己的键、消息名和 JSON 值,`system.` 前缀由 Tau 保留。
|
|
73
|
+
|
|
74
|
+
| 接口 | 用法 |
|
|
75
|
+
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
76
|
+
| `state.get(key)` / `state.set(key, value)` | 读取或整体替换当前值。未设置时读到 `undefined`。 |
|
|
77
|
+
| `await state.subscribe(key, listener)` | 先收到当前值,再接收变化。返回可调用 `dispose()` 的订阅。 |
|
|
78
|
+
| `messages.on(name, listener)` | 监听即时消息。回调收到 JSON 载荷和发送窗口类型。 |
|
|
79
|
+
| `await messages.send(name, payload, target)` | `"main"` 发给其他在线主窗口端点,`"all"` 发给同插件的其他在线端点,`{ windowId: "preview" }` 发给指定窗口。返回实际提交投递的端点数,无目标时返回 `0`。 |
|
|
80
|
+
|
|
81
|
+
例如主窗口用 `state.set("selection", { id: "draft" })` 保存选中项。预览窗稍后打开,订阅 `selection` 时会拿到这份当前值。预览窗也可在用户操作完成时调用 `messages.send("refresh", null, "main")`,让在线主窗口刷新。状态在当前插件会话内保留,消息发送后不会回放。跨重启数据用[插件私有存储](storage-and-network.md)。
|
|
82
|
+
|
|
83
|
+
组件移除监听时调用 `dispose()`。插件停用、切库或窗口关闭时,宿主会清理相关端点。消息发送结果表示宿主提交了投递,接收窗口的业务处理有无完成由插件自行判断。
|
package/package.json
CHANGED
package/publish-artifacts.js
CHANGED
|
@@ -6037,7 +6037,11 @@ var paper_theme_default = defineTheme({
|
|
|
6037
6037
|
"shadow-card": "0 1px 2px rgba(120, 100, 70, 0.05), 0 10px 24px -14px rgba(120, 100, 70, 0.18)",
|
|
6038
6038
|
"shadow-lift": "0 1px 2px rgba(120, 100, 70, 0.06), 0 6px 16px -10px rgba(120, 100, 70, 0.22)",
|
|
6039
6039
|
"shadow-float": "0 16px 40px -12px rgba(120, 100, 70, 0.4)",
|
|
6040
|
-
"shadow-paper": "0 0 0 1px rgba(120, 100, 70, 0.07), 0 2px 4px -1px rgba(120, 100, 70, 0.12), 0 22px 44px -18px rgba(120, 100, 70, 0.45)"
|
|
6040
|
+
"shadow-paper": "0 0 0 1px rgba(120, 100, 70, 0.07), 0 2px 4px -1px rgba(120, 100, 70, 0.12), 0 22px 44px -18px rgba(120, 100, 70, 0.45)",
|
|
6041
|
+
// 壳层极光背景的三团色(模糊后铺在侧栏与大卡留白下,峰值处 ink-2 仍过 AA)
|
|
6042
|
+
"glow-1": "#f6d3b6",
|
|
6043
|
+
"glow-2": "#f1d4ca",
|
|
6044
|
+
"glow-3": "#f4e3ae"
|
|
6041
6045
|
})
|
|
6042
6046
|
},
|
|
6043
6047
|
dark: {
|
|
@@ -6108,7 +6112,10 @@ var paper_theme_default = defineTheme({
|
|
|
6108
6112
|
"shadow-card": "0 1px 2px rgba(0, 0, 0, 0.24), 0 10px 24px -14px rgba(0, 0, 0, 0.5)",
|
|
6109
6113
|
"shadow-lift": "0 1px 2px rgba(0, 0, 0, 0.26), 0 6px 16px -10px rgba(0, 0, 0, 0.52)",
|
|
6110
6114
|
"shadow-float": "0 16px 40px -12px rgba(0, 0, 0, 0.65)",
|
|
6111
|
-
"shadow-paper": "0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.72)"
|
|
6115
|
+
"shadow-paper": "0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.72)",
|
|
6116
|
+
"glow-1": "#492c18",
|
|
6117
|
+
"glow-2": "#47221f",
|
|
6118
|
+
"glow-3": "#3b3215"
|
|
6112
6119
|
})
|
|
6113
6120
|
}
|
|
6114
6121
|
});
|
|
@@ -6186,7 +6193,11 @@ var ocean_theme_default = defineTheme({
|
|
|
6186
6193
|
"shadow-card": "0 1px 2px rgba(60, 80, 120, 0.06), 0 10px 24px -14px rgba(60, 80, 120, 0.2)",
|
|
6187
6194
|
"shadow-lift": "0 1px 2px rgba(60, 80, 120, 0.07), 0 6px 16px -10px rgba(60, 80, 120, 0.24)",
|
|
6188
6195
|
"shadow-float": "0 16px 40px -12px rgba(60, 80, 120, 0.4)",
|
|
6189
|
-
"shadow-paper": "0 0 0 1px rgba(60, 80, 120, 0.07), 0 2px 4px -1px rgba(60, 80, 120, 0.12), 0 22px 44px -18px rgba(60, 80, 120, 0.45)"
|
|
6196
|
+
"shadow-paper": "0 0 0 1px rgba(60, 80, 120, 0.07), 0 2px 4px -1px rgba(60, 80, 120, 0.12), 0 22px 44px -18px rgba(60, 80, 120, 0.45)",
|
|
6197
|
+
// 壳层极光背景的三团色(模糊后铺在侧栏与大卡留白下,峰值处 ink-2 仍过 AA)
|
|
6198
|
+
"glow-1": "#d3e2f7",
|
|
6199
|
+
"glow-2": "#dfdff6",
|
|
6200
|
+
"glow-3": "#c0e8e6"
|
|
6190
6201
|
})
|
|
6191
6202
|
},
|
|
6192
6203
|
dark: {
|
|
@@ -6256,7 +6267,10 @@ var ocean_theme_default = defineTheme({
|
|
|
6256
6267
|
"shadow-card": "0 1px 2px rgba(0, 0, 0, 0.24), 0 10px 24px -14px rgba(0, 0, 0, 0.5)",
|
|
6257
6268
|
"shadow-lift": "0 1px 2px rgba(0, 0, 0, 0.26), 0 6px 16px -10px rgba(0, 0, 0, 0.52)",
|
|
6258
6269
|
"shadow-float": "0 16px 40px -12px rgba(0, 0, 0, 0.65)",
|
|
6259
|
-
"shadow-paper": "0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.72)"
|
|
6270
|
+
"shadow-paper": "0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.72)",
|
|
6271
|
+
"glow-1": "#15305a",
|
|
6272
|
+
"glow-2": "#272656",
|
|
6273
|
+
"glow-3": "#0e3a40"
|
|
6260
6274
|
})
|
|
6261
6275
|
}
|
|
6262
6276
|
});
|
|
@@ -6327,7 +6341,11 @@ var mint_theme_default = defineTheme({
|
|
|
6327
6341
|
"shadow-card": "0 1px 2px rgba(60, 90, 70, 0.06), 0 10px 24px -14px rgba(60, 90, 70, 0.2)",
|
|
6328
6342
|
"shadow-lift": "0 1px 2px rgba(60, 90, 70, 0.07), 0 6px 16px -10px rgba(60, 90, 70, 0.24)",
|
|
6329
6343
|
"shadow-float": "0 16px 40px -12px rgba(60, 90, 70, 0.4)",
|
|
6330
|
-
"shadow-paper": "0 0 0 1px rgba(60, 90, 70, 0.07), 0 2px 4px -1px rgba(60, 90, 70, 0.12), 0 22px 44px -18px rgba(60, 90, 70, 0.45)"
|
|
6344
|
+
"shadow-paper": "0 0 0 1px rgba(60, 90, 70, 0.07), 0 2px 4px -1px rgba(60, 90, 70, 0.12), 0 22px 44px -18px rgba(60, 90, 70, 0.45)",
|
|
6345
|
+
// 壳层极光背景的三团色(模糊后铺在侧栏与大卡留白下,峰值处 ink-2 仍过 AA)
|
|
6346
|
+
"glow-1": "#c2ebd2",
|
|
6347
|
+
"glow-2": "#bfe5e2",
|
|
6348
|
+
"glow-3": "#e1efb8"
|
|
6331
6349
|
})
|
|
6332
6350
|
},
|
|
6333
6351
|
dark: {
|
|
@@ -6395,7 +6413,10 @@ var mint_theme_default = defineTheme({
|
|
|
6395
6413
|
"shadow-card": "0 1px 2px rgba(0, 0, 0, 0.24), 0 10px 24px -14px rgba(0, 0, 0, 0.5)",
|
|
6396
6414
|
"shadow-lift": "0 1px 2px rgba(0, 0, 0, 0.26), 0 6px 16px -10px rgba(0, 0, 0, 0.52)",
|
|
6397
6415
|
"shadow-float": "0 16px 40px -12px rgba(0, 0, 0, 0.65)",
|
|
6398
|
-
"shadow-paper": "0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.72)"
|
|
6416
|
+
"shadow-paper": "0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.72)",
|
|
6417
|
+
"glow-1": "#0f3a24",
|
|
6418
|
+
"glow-2": "#0f3534",
|
|
6419
|
+
"glow-3": "#2a3714"
|
|
6399
6420
|
})
|
|
6400
6421
|
}
|
|
6401
6422
|
});
|
|
@@ -6466,7 +6487,11 @@ var wisteria_theme_default = defineTheme({
|
|
|
6466
6487
|
"shadow-card": "0 1px 2px rgba(80, 64, 120, 0.06), 0 10px 24px -14px rgba(80, 64, 120, 0.2)",
|
|
6467
6488
|
"shadow-lift": "0 1px 2px rgba(80, 64, 120, 0.07), 0 6px 16px -10px rgba(80, 64, 120, 0.24)",
|
|
6468
6489
|
"shadow-float": "0 16px 40px -12px rgba(80, 64, 120, 0.4)",
|
|
6469
|
-
"shadow-paper": "0 0 0 1px rgba(80, 64, 120, 0.07), 0 2px 4px -1px rgba(80, 64, 120, 0.12), 0 22px 44px -18px rgba(80, 64, 120, 0.45)"
|
|
6490
|
+
"shadow-paper": "0 0 0 1px rgba(80, 64, 120, 0.07), 0 2px 4px -1px rgba(80, 64, 120, 0.12), 0 22px 44px -18px rgba(80, 64, 120, 0.45)",
|
|
6491
|
+
// 壳层极光背景的三团色(模糊后铺在侧栏与大卡留白下,峰值处 ink-2 仍过 AA)
|
|
6492
|
+
"glow-1": "#dbcff6",
|
|
6493
|
+
"glow-2": "#c9d6f6",
|
|
6494
|
+
"glow-3": "#f1cfe7"
|
|
6470
6495
|
})
|
|
6471
6496
|
},
|
|
6472
6497
|
dark: {
|
|
@@ -6533,7 +6558,10 @@ var wisteria_theme_default = defineTheme({
|
|
|
6533
6558
|
"shadow-card": "0 1px 2px rgba(0, 0, 0, 0.24), 0 10px 24px -14px rgba(0, 0, 0, 0.5)",
|
|
6534
6559
|
"shadow-lift": "0 1px 2px rgba(0, 0, 0, 0.26), 0 6px 16px -10px rgba(0, 0, 0, 0.52)",
|
|
6535
6560
|
"shadow-float": "0 16px 40px -12px rgba(0, 0, 0, 0.65)",
|
|
6536
|
-
"shadow-paper": "0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.72)"
|
|
6561
|
+
"shadow-paper": "0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.72)",
|
|
6562
|
+
"glow-1": "#2f1f58",
|
|
6563
|
+
"glow-2": "#1a2752",
|
|
6564
|
+
"glow-3": "#421c40"
|
|
6537
6565
|
})
|
|
6538
6566
|
}
|
|
6539
6567
|
});
|
|
@@ -6605,7 +6633,11 @@ var sakura_theme_default = defineTheme({
|
|
|
6605
6633
|
"shadow-card": "0 1px 2px rgba(110, 70, 85, 0.06), 0 10px 24px -14px rgba(110, 70, 85, 0.2)",
|
|
6606
6634
|
"shadow-lift": "0 1px 2px rgba(110, 70, 85, 0.07), 0 6px 16px -10px rgba(110, 70, 85, 0.24)",
|
|
6607
6635
|
"shadow-float": "0 16px 40px -12px rgba(110, 70, 85, 0.4)",
|
|
6608
|
-
"shadow-paper": "0 0 0 1px rgba(110, 70, 85, 0.07), 0 2px 4px -1px rgba(110, 70, 85, 0.12), 0 22px 44px -18px rgba(110, 70, 85, 0.45)"
|
|
6636
|
+
"shadow-paper": "0 0 0 1px rgba(110, 70, 85, 0.07), 0 2px 4px -1px rgba(110, 70, 85, 0.12), 0 22px 44px -18px rgba(110, 70, 85, 0.45)",
|
|
6637
|
+
// 壳层极光背景的三团色(模糊后铺在侧栏与大卡留白下,峰值处 ink-2 仍过 AA)
|
|
6638
|
+
"glow-1": "#f7cad9",
|
|
6639
|
+
"glow-2": "#e6cdf0",
|
|
6640
|
+
"glow-3": "#fbd8c4"
|
|
6609
6641
|
})
|
|
6610
6642
|
},
|
|
6611
6643
|
dark: {
|
|
@@ -6673,7 +6705,10 @@ var sakura_theme_default = defineTheme({
|
|
|
6673
6705
|
"shadow-card": "0 1px 2px rgba(0, 0, 0, 0.24), 0 10px 24px -14px rgba(0, 0, 0, 0.5)",
|
|
6674
6706
|
"shadow-lift": "0 1px 2px rgba(0, 0, 0, 0.26), 0 6px 16px -10px rgba(0, 0, 0, 0.52)",
|
|
6675
6707
|
"shadow-float": "0 16px 40px -12px rgba(0, 0, 0, 0.65)",
|
|
6676
|
-
"shadow-paper": "0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.72)"
|
|
6708
|
+
"shadow-paper": "0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.72)",
|
|
6709
|
+
"glow-1": "#4a1a2e",
|
|
6710
|
+
"glow-2": "#341d44",
|
|
6711
|
+
"glow-3": "#43251a"
|
|
6677
6712
|
})
|
|
6678
6713
|
}
|
|
6679
6714
|
});
|
|
@@ -6746,7 +6781,11 @@ var ink_theme_default = defineTheme({
|
|
|
6746
6781
|
"shadow-card": "0 1px 2px rgba(40, 38, 30, 0.04), 0 10px 24px -14px rgba(40, 38, 30, 0.14)",
|
|
6747
6782
|
"shadow-lift": "0 1px 2px rgba(40, 38, 30, 0.05), 0 6px 16px -10px rgba(40, 38, 30, 0.18)",
|
|
6748
6783
|
"shadow-float": "0 16px 40px -12px rgba(40, 38, 30, 0.3)",
|
|
6749
|
-
"shadow-paper": "0 0 0 1px rgba(40, 38, 30, 0.07), 0 2px 4px -1px rgba(40, 38, 30, 0.12), 0 22px 44px -18px rgba(40, 38, 30, 0.45)"
|
|
6784
|
+
"shadow-paper": "0 0 0 1px rgba(40, 38, 30, 0.07), 0 2px 4px -1px rgba(40, 38, 30, 0.12), 0 22px 44px -18px rgba(40, 38, 30, 0.45)",
|
|
6785
|
+
// 壳层极光背景的三团色(模糊后铺在侧栏与大卡留白下,峰值处 ink-2 仍过 AA)
|
|
6786
|
+
"glow-1": "#dde3e8",
|
|
6787
|
+
"glow-2": "#e2e2dc",
|
|
6788
|
+
"glow-3": "#ece4d6"
|
|
6750
6789
|
})
|
|
6751
6790
|
},
|
|
6752
6791
|
dark: {
|
|
@@ -6813,7 +6852,10 @@ var ink_theme_default = defineTheme({
|
|
|
6813
6852
|
"shadow-card": "0 1px 2px rgba(0, 0, 0, 0.24), 0 10px 24px -14px rgba(0, 0, 0, 0.5)",
|
|
6814
6853
|
"shadow-lift": "0 1px 2px rgba(0, 0, 0, 0.26), 0 6px 16px -10px rgba(0, 0, 0, 0.52)",
|
|
6815
6854
|
"shadow-float": "0 16px 40px -12px rgba(0, 0, 0, 0.65)",
|
|
6816
|
-
"shadow-paper": "0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.72)"
|
|
6855
|
+
"shadow-paper": "0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.72)",
|
|
6856
|
+
"glow-1": "#232a31",
|
|
6857
|
+
"glow-2": "#262624",
|
|
6858
|
+
"glow-3": "#2d2820"
|
|
6817
6859
|
})
|
|
6818
6860
|
}
|
|
6819
6861
|
});
|
|
@@ -6840,7 +6882,9 @@ var tokenContract = {
|
|
|
6840
6882
|
"tag-5",
|
|
6841
6883
|
"tag-5-soft"
|
|
6842
6884
|
],
|
|
6843
|
-
float: ["overlay", "shadow-card", "shadow-lift", "shadow-float", "shadow-paper"]
|
|
6885
|
+
float: ["overlay", "shadow-card", "shadow-lift", "shadow-float", "shadow-paper"],
|
|
6886
|
+
// 壳层渐变背景(极光)的三团色:只由壳层背景层消费,组件不要拿来做填充色
|
|
6887
|
+
backdrop: ["glow-1", "glow-2", "glow-3"]
|
|
6844
6888
|
};
|
|
6845
6889
|
var ALL_TOKEN_WORDS = Object.values(tokenContract).flat();
|
|
6846
6890
|
|
package/tailwind.css
CHANGED
|
@@ -86,6 +86,26 @@
|
|
|
86
86
|
|
|
87
87
|
/* 域内动效(keyframes 与词表同处声明,hover:animate-hm-pulse 消费) */
|
|
88
88
|
--animate-hm-pulse: hmPulse 0.5s linear alternate infinite;
|
|
89
|
+
/* 壳层极光背景三团色的漂移(只动 transform,合成层完成) */
|
|
90
|
+
--animate-aurora-1: auroraDrift1 26s ease-in-out infinite alternate;
|
|
91
|
+
--animate-aurora-2: auroraDrift2 32s ease-in-out infinite alternate;
|
|
92
|
+
--animate-aurora-3: auroraDrift3 38s ease-in-out infinite alternate;
|
|
93
|
+
|
|
94
|
+
@keyframes auroraDrift1 {
|
|
95
|
+
to {
|
|
96
|
+
transform: translate(35%, 23%) scale(1.15);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
@keyframes auroraDrift2 {
|
|
100
|
+
to {
|
|
101
|
+
transform: translate(-46%, 33%) scale(0.9);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
@keyframes auroraDrift3 {
|
|
105
|
+
to {
|
|
106
|
+
transform: translate(-29%, -30%) scale(1.2);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
89
109
|
|
|
90
110
|
@keyframes hmPulse {
|
|
91
111
|
0% {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DocumentSql, DocumentProtocol } from "./document-protocol";
|
|
2
|
+
import { type ScopedContentConflict, type ScopedContentEdits } from "./scoped-content-edit";
|
|
2
3
|
export interface DocumentOperationRequest {
|
|
3
4
|
operationId: string;
|
|
4
5
|
epoch: number;
|
|
@@ -8,18 +9,22 @@ export interface DocumentOperationRequest {
|
|
|
8
9
|
expiresAt: number;
|
|
9
10
|
expectedRevision?: string;
|
|
10
11
|
expectedSequence?: number;
|
|
12
|
+
kind?: "scoped-edit";
|
|
13
|
+
source?: ScopedContentEdits["source"];
|
|
11
14
|
}
|
|
12
15
|
export interface DocumentOperation extends DocumentOperationRequest {
|
|
13
16
|
documentId: string;
|
|
14
17
|
actorId: string;
|
|
15
18
|
state: "PENDING" | "COMMITTED" | "ABORTED" | "EXPIRED";
|
|
16
19
|
reason?: string;
|
|
20
|
+
conflicts?: ScopedContentConflict[];
|
|
17
21
|
receipt?: {
|
|
18
22
|
documentId: string;
|
|
19
23
|
epoch: number;
|
|
20
24
|
baselineId: string;
|
|
21
25
|
revision: string;
|
|
22
26
|
sequence: number;
|
|
27
|
+
inverse?: ScopedContentEdits;
|
|
23
28
|
};
|
|
24
29
|
}
|
|
25
30
|
/** 普通条件提交保留 epoch,回执与更新必须同事务提交。 */
|
|
@@ -31,7 +36,8 @@ export declare class DocumentOperationLedger {
|
|
|
31
36
|
advance(documentId: string): number;
|
|
32
37
|
private save;
|
|
33
38
|
get(documentId: string, operationId: string, actorId: string): DocumentOperation | null;
|
|
39
|
+
isScopedUndo(operation: DocumentOperation, scope: ScopedContentEdits): boolean;
|
|
34
40
|
begin(documentId: string, actorId: string, request: DocumentOperationRequest): DocumentOperation;
|
|
35
|
-
abort(operation: DocumentOperation, reason: string): DocumentOperation;
|
|
36
|
-
commit(operation: DocumentOperation, read: () => DocumentProtocol, revision: string, install: () => void): DocumentOperation;
|
|
41
|
+
abort(operation: DocumentOperation, reason: string, conflicts?: ScopedContentConflict[]): DocumentOperation;
|
|
42
|
+
commit(operation: DocumentOperation, read: () => DocumentProtocol, revision: string, install: () => void, inverse?: ScopedContentEdits): DocumentOperation;
|
|
37
43
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type SharedDocumentListing } from "./protocol";
|
|
1
2
|
export interface DocumentProtocol {
|
|
2
3
|
id: string;
|
|
3
4
|
ownerId: string;
|
|
@@ -11,6 +12,16 @@ export interface DocumentProtocol {
|
|
|
11
12
|
version: number;
|
|
12
13
|
};
|
|
13
14
|
}
|
|
15
|
+
export interface DocumentStateResponse {
|
|
16
|
+
state: string;
|
|
17
|
+
protocol: DocumentProtocol & {
|
|
18
|
+
sequence: number;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export interface DocumentCloseReceipt {
|
|
22
|
+
ok: true;
|
|
23
|
+
revision: string | null;
|
|
24
|
+
}
|
|
14
25
|
type Parameter = string | number | null;
|
|
15
26
|
export interface DocumentSql {
|
|
16
27
|
exec(sql: string, ...parameters: Parameter[]): void;
|
|
@@ -25,6 +36,8 @@ export declare class DocumentProtocolStore {
|
|
|
25
36
|
private readonly readCurrent;
|
|
26
37
|
private readonly verified;
|
|
27
38
|
constructor(sql: DocumentSql, readCurrent: (id: string) => DocumentProtocol);
|
|
39
|
+
private stored;
|
|
40
|
+
describe(documentId: string): Pick<SharedDocumentListing, "kind" | "protocolVersion">;
|
|
28
41
|
publication(documentId: string): {
|
|
29
42
|
candidateHash: string;
|
|
30
43
|
baselineId: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare function bytesToBase64(bytes: Uint8Array): string;
|
|
2
|
-
export declare function base64ToBytes(value: string): Uint8Array
|
|
2
|
+
export declare function base64ToBytes(value: string): Uint8Array<ArrayBuffer>;
|
|
@@ -9,6 +9,7 @@ export * from "./model-limits";
|
|
|
9
9
|
export * from "./whiteboard-contract";
|
|
10
10
|
export * from "./node-document";
|
|
11
11
|
export * from "./document-protocol";
|
|
12
|
+
export { leaveDocument } from "./document-membership";
|
|
12
13
|
export * from "./document-installation";
|
|
13
14
|
export * from "./document-write-queue";
|
|
14
15
|
export * from "./whiteboard-types";
|
|
@@ -17,10 +18,12 @@ export * from "./whiteboard-relations";
|
|
|
17
18
|
export * from "./whiteboard-document";
|
|
18
19
|
export * from "./document-adapter";
|
|
19
20
|
export * from "./document-operations";
|
|
21
|
+
export * from "./scoped-content-edit";
|
|
20
22
|
export * from "./document-sync";
|
|
21
23
|
export { exportWhiteboardTransfer, prepareWhiteboardTransfer, whiteboardTransferResources, } from "./whiteboard-transfer";
|
|
22
24
|
export type { WhiteboardTransfer } from "./whiteboard-types";
|
|
23
25
|
export { isSafeResource, isVideoResource, imageMimeFromBytes, collaborationAssetMime, } from "./resource-policy";
|
|
24
26
|
export * from "./whiteboard-baseline";
|
|
25
27
|
export { assertPresenceBudget } from "./presence-budget";
|
|
28
|
+
export { memberActivities } from "./member-activities";
|
|
26
29
|
export * from "./whiteboard-presence";
|
|
@@ -75,6 +75,7 @@ export declare class NodeTree {
|
|
|
75
75
|
private readSpans;
|
|
76
76
|
snapshot(): readonly ContentNode[];
|
|
77
77
|
nodeSnapshot(id: string): ContentNode;
|
|
78
|
+
rootBlockId(id: string): string | undefined;
|
|
78
79
|
read(): ContentNode[];
|
|
79
80
|
physicalOffset(parent: string | null, index: number): number;
|
|
80
81
|
textLocation(parent: string | null, index: number): {
|
|
@@ -83,7 +84,7 @@ export declare class NodeTree {
|
|
|
83
84
|
segment?: string;
|
|
84
85
|
};
|
|
85
86
|
visibleOffset(parent: string | null, index: number): number;
|
|
86
|
-
capturePosition(parent: string, index: number): Y.RelativePosition;
|
|
87
|
+
capturePosition(parent: string, index: number, assoc?: number): Y.RelativePosition;
|
|
87
88
|
resolvePosition(position: Y.RelativePosition): {
|
|
88
89
|
parent: string;
|
|
89
90
|
offset: number;
|
|
@@ -102,6 +103,8 @@ export declare class NodeTree {
|
|
|
102
103
|
convertNode(id: string, targetId: string, changes: Record<string, unknown>, origin: unknown): void;
|
|
103
104
|
insertText(id: string, index: number, text: string, origin: unknown, marks?: Record<string, unknown>): void;
|
|
104
105
|
deleteText(id: string, index: number, length: number, origin: unknown): void;
|
|
106
|
+
/** 目标偏移以移除源文字后的内容为准。 */
|
|
107
|
+
moveText(source: string, start: number, target: string, index: number, length: number, origin: unknown): void;
|
|
105
108
|
formatText(id: string, index: number, length: number, marks: Record<string, unknown>, origin: unknown): void;
|
|
106
109
|
private textRanges;
|
|
107
110
|
}
|
|
@@ -43,6 +43,10 @@ export interface SharedDocumentInfo {
|
|
|
43
43
|
members: Member[];
|
|
44
44
|
updatedAt: number;
|
|
45
45
|
}
|
|
46
|
+
export interface SharedDocumentListing extends SharedDocumentInfo {
|
|
47
|
+
kind: "content" | "whiteboard" | "unknown";
|
|
48
|
+
protocolVersion: number | null;
|
|
49
|
+
}
|
|
46
50
|
export interface JoinRequest {
|
|
47
51
|
id: string;
|
|
48
52
|
documentId: string;
|
|
@@ -68,8 +72,7 @@ export interface SourceBinding {
|
|
|
68
72
|
contentDocumentId?: string;
|
|
69
73
|
/** 本机缓存最后确认的主库投影修订,不随文档共享。 */
|
|
70
74
|
projectionRevision?: string;
|
|
71
|
-
/**
|
|
72
|
-
titleAuthority?: "database";
|
|
75
|
+
/** 本机数据库替换后隔离旧缓存与延迟写入。 */
|
|
73
76
|
generation?: string;
|
|
74
77
|
sourceType?: SourceType;
|
|
75
78
|
sourceId?: number;
|
|
@@ -85,7 +88,7 @@ export interface CollaborationSession extends SharedDocumentInfo {
|
|
|
85
88
|
mode?: "local" | "shared";
|
|
86
89
|
frozen?: boolean;
|
|
87
90
|
serverUrl: string;
|
|
88
|
-
connection: "connecting" | "connected" | "offline" | "error";
|
|
91
|
+
connection: "idle" | "connecting" | "connected" | "offline" | "error";
|
|
89
92
|
pending: boolean;
|
|
90
93
|
leaving: boolean;
|
|
91
94
|
source?: SourceBinding;
|
|
@@ -123,6 +126,7 @@ export interface ContentInputDraft {
|
|
|
123
126
|
value: string;
|
|
124
127
|
revision: string;
|
|
125
128
|
sequence: number;
|
|
129
|
+
baseValue?: string;
|
|
126
130
|
}
|
|
127
131
|
export type CollaborationEvent = {
|
|
128
132
|
type: "refresh";
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import * as Y from "yjs";
|
|
2
|
+
import type { ContentContractDictionary } from "../../db-schema/content-contracts";
|
|
3
|
+
import { NodeTree } from "./node-tree";
|
|
4
|
+
import { CollaborationError, type ContentNode } from "./protocol";
|
|
5
|
+
type TextRun = {
|
|
6
|
+
text: string;
|
|
7
|
+
marks: Record<string, unknown>;
|
|
8
|
+
};
|
|
9
|
+
type TextEdit = {
|
|
10
|
+
kind: "text";
|
|
11
|
+
id: string;
|
|
12
|
+
blockId: string;
|
|
13
|
+
start: string;
|
|
14
|
+
end: string;
|
|
15
|
+
expected: TextRun[];
|
|
16
|
+
text: string;
|
|
17
|
+
runs?: TextRun[];
|
|
18
|
+
/** 逆操作额外记录提交后插入点的两侧,供逐段编辑安全接续。 */
|
|
19
|
+
continuation?: {
|
|
20
|
+
start: string;
|
|
21
|
+
end: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
type BlockEdit = {
|
|
25
|
+
kind: "blocks";
|
|
26
|
+
id: string;
|
|
27
|
+
left: string | null;
|
|
28
|
+
right: string | null;
|
|
29
|
+
expected: (ContentNode & {
|
|
30
|
+
collabId: string;
|
|
31
|
+
})[];
|
|
32
|
+
nodes: ContentNode[];
|
|
33
|
+
};
|
|
34
|
+
export type ScopedContentEdit = TextEdit | BlockEdit;
|
|
35
|
+
export interface ScopedContentEdits {
|
|
36
|
+
edits: ScopedContentEdit[];
|
|
37
|
+
contracts?: ContentContractDictionary;
|
|
38
|
+
source?: {
|
|
39
|
+
proposalId: string;
|
|
40
|
+
agentId?: string;
|
|
41
|
+
runId?: string;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export interface ScopedContentBaseline {
|
|
45
|
+
documentId: string;
|
|
46
|
+
baselineId: string;
|
|
47
|
+
epoch: number;
|
|
48
|
+
}
|
|
49
|
+
export interface ScopedContentSubmission extends ScopedContentBaseline {
|
|
50
|
+
operationId: string;
|
|
51
|
+
scope: ScopedContentEdits;
|
|
52
|
+
}
|
|
53
|
+
export type ScopedContentResult = {
|
|
54
|
+
status: "committed";
|
|
55
|
+
inverse?: ScopedContentEdits;
|
|
56
|
+
} | {
|
|
57
|
+
status: "conflict";
|
|
58
|
+
conflicts: ScopedContentConflict[];
|
|
59
|
+
} | {
|
|
60
|
+
status: "pending";
|
|
61
|
+
} | {
|
|
62
|
+
status: "rejected";
|
|
63
|
+
reason: string;
|
|
64
|
+
};
|
|
65
|
+
export interface ScopedContentConflict {
|
|
66
|
+
opId: string;
|
|
67
|
+
blockId?: string;
|
|
68
|
+
}
|
|
69
|
+
export declare class ScopedContentConflictError extends CollaborationError {
|
|
70
|
+
readonly conflicts: ScopedContentConflict[];
|
|
71
|
+
constructor(conflicts: ScopedContentConflict[]);
|
|
72
|
+
}
|
|
73
|
+
export declare function captureScopedTextEdit(tree: NodeTree, id: string, blockId: string, start: number, end: number, text: string): TextEdit;
|
|
74
|
+
export declare const scopedUndoOperationId: (operationId: string) => string;
|
|
75
|
+
export declare const scopedUndoSourceId: (operationId: string) => string | undefined;
|
|
76
|
+
export declare class ScopedUndoLimitError extends CollaborationError {
|
|
77
|
+
static readonly code = "UNDO_LIMIT";
|
|
78
|
+
static readonly description = "\u6539\u52A8\u8D85\u51FA\u53EF\u64A4\u9500\u5BB9\u91CF\uFF0C\u8BF7\u62C6\u6210\u8F83\u5C0F\u7684\u4FEE\u6539";
|
|
79
|
+
constructor();
|
|
80
|
+
}
|
|
81
|
+
/** 逐条判断编辑在当前正文上是否仍成立(锚点能解析且原文前提一致),不修改文档。 */
|
|
82
|
+
export declare function scopedEditsApplicable(current: Y.Doc, edits: ScopedContentEdit[]): boolean[];
|
|
83
|
+
export declare function validateScopedContentEdits(value: ScopedContentEdits): void;
|
|
84
|
+
/** 在写入队列内从同一份正文校验所有前提,候选失败时不触碰原文档。 */
|
|
85
|
+
export declare function buildScopedContentUpdate(current: Y.Doc, request: ScopedContentEdits, { undo }?: {
|
|
86
|
+
undo?: boolean;
|
|
87
|
+
}): Promise<{
|
|
88
|
+
update: Uint8Array;
|
|
89
|
+
inverse?: ScopedContentEdits;
|
|
90
|
+
}>;
|
|
91
|
+
export {};
|
|
@@ -2,6 +2,7 @@ import type { Node, Path } from "slate";
|
|
|
2
2
|
import { Descendant, Editor, Range } from "slate";
|
|
3
3
|
import type { EditorKit } from "./kit/EditorKit";
|
|
4
4
|
import type { EditorDocument } from "./document/EditorDocument";
|
|
5
|
+
import type { InlineSuggestionProvider } from "./inlineSuggestion/controller";
|
|
5
6
|
import type { EditorExtension } from "./api/extension";
|
|
6
7
|
import type { EditorRef } from "./types/editor";
|
|
7
8
|
import type { MarkRenderProps } from "./api/marks";
|
|
@@ -34,6 +35,8 @@ export interface IEditorProps {
|
|
|
34
35
|
decorate?: (entry: [Node, Path]) => Range[];
|
|
35
36
|
/** 包装已经应用标记的内容,不接管 Slate attributes。 */
|
|
36
37
|
leafWrapper?: ComponentType<MarkRenderProps>;
|
|
38
|
+
/** 当前视图的行内纯文本建议来源。 */
|
|
39
|
+
inlineSuggestions?: InlineSuggestionProvider;
|
|
37
40
|
/**
|
|
38
41
|
* 聚焦模式:沿光标所在的文档路径,同级兄弟元素退后(其余顶层块、列表的其他项、表格的其他单元格…)。
|
|
39
42
|
* 退后程度由宿主在容器上设置 `--ed-focus-dim`(缺省 0.26)。
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Descendant, Editor, Node } from "slate";
|
|
2
|
+
export declare const CONTENT_FRAGMENT_MIME = "application/x-tau-content";
|
|
3
|
+
interface ContentFragmentTransfer {
|
|
4
|
+
documentKey(): string;
|
|
5
|
+
flushInputs(): void;
|
|
6
|
+
serialize(nodes: readonly Node[]): string;
|
|
7
|
+
prepare(fragment: string, signal?: AbortSignal): Promise<Descendant[] | undefined>;
|
|
8
|
+
flushWrites?(): Promise<void> | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare function setContentFragmentTransfer(editor: Editor, transfer: ContentFragmentTransfer): void;
|
|
11
|
+
export declare const contentFragmentTransferOf: (editor: Editor) => ContentFragmentTransfer | undefined;
|
|
12
|
+
export declare function attachContentFragment(element: HTMLElement, fragment: string): void;
|
|
13
|
+
export declare function readContentFragment(data: DataTransfer): string | undefined;
|
|
14
|
+
export {};
|
|
@@ -6,7 +6,7 @@ import type { Element } from "slate";
|
|
|
6
6
|
export interface ElementDragSpec {
|
|
7
7
|
/** 自身可拖(显示手柄);false 时本块仅作为放置目标参与 */
|
|
8
8
|
self: boolean;
|
|
9
|
-
/**
|
|
9
|
+
/** 内部子块是否参与块级拖拽;false 时子块没有手柄,也不作为放置目标。 */
|
|
10
10
|
children: boolean;
|
|
11
11
|
/**
|
|
12
12
|
* 放置谓词:拖动元素能否落到本块(含本块内部)。缺省接受任何块。
|
|
@@ -37,6 +37,7 @@ export { default as useIsLastElement } from "../hooks/useIsLastElement";
|
|
|
37
37
|
export { registerBlockNavigation, hasBlockNavigation, unregisterBlockNavigation, focusPreviousBlock, focusNextBlock, type BlockNavigationHandler, } from "../utils/blockNavigation";
|
|
38
38
|
export { isCollapsed, getCurrentTextNode } from "../utils/editor";
|
|
39
39
|
export { copyNodeToClipboard, deleteVoidBlock } from "../utils/nodeOperations";
|
|
40
|
+
export { CONTENT_FRAGMENT_MIME, readContentFragment, setContentFragmentTransfer, } from "./clipboardFragment";
|
|
40
41
|
export { getSelectionSnapshot, isSelectionSnapshotUnchanged } from "../utils/selectionSnapshot";
|
|
41
42
|
export { createParagraph, isParagraphElement, type ParagraphElement } from "../model/paragraph";
|
|
42
43
|
export { insertParagraphAndFocus } from "../utils/editor";
|
|
@@ -69,3 +70,5 @@ export { useTextFieldBinding } from "./useTextFieldBinding";
|
|
|
69
70
|
export { bindTextFieldTextarea, rebaseTextFieldInput } from "./textFieldInput";
|
|
70
71
|
export { IEditorTextFields } from "../../../source-contracts";
|
|
71
72
|
export { slateTextFields } from "./slateTextFields";
|
|
73
|
+
export { useInlineSuggestionProvider } from "../inlineSuggestion/providerContext";
|
|
74
|
+
export { createInlineSuggestionController, type InlineSuggestionProvider, type InlineSuggestionPreview, } from "../inlineSuggestion/controller";
|
|
@@ -2,6 +2,8 @@ import type { ComponentType, ReactNode } from "react";
|
|
|
2
2
|
import type { Editor, NodeEntry, Range, Text } from "slate";
|
|
3
3
|
export interface MarkRenderProps {
|
|
4
4
|
readonly leaf: Readonly<Text>;
|
|
5
|
+
/** 该叶子在 Slate 文本节点内的起点,未切分时为 0。 */
|
|
6
|
+
readonly leafStart?: number;
|
|
5
7
|
children: ReactNode;
|
|
6
8
|
}
|
|
7
9
|
export interface MarkSpec {
|
|
@@ -34,3 +34,4 @@ export { default as AddParagraph } from "./components/AddParagraph/index";
|
|
|
34
34
|
export type { IngestContext, IngestFilesRule, IngestTextRule, ElementIngestSpec, } from "./api/ingest";
|
|
35
35
|
export { default as InlineChromiumBugfix } from "./components/InlineChromiumBugFix/index";
|
|
36
36
|
export { BLOCK_DRAG_GROUP } from "./components/BlockDrag/index";
|
|
37
|
+
export type { InlineSuggestionProvider, InlineSuggestionContext, } from "./inlineSuggestion/controller";
|