@xiongtao.xt/tau-plugins 0.18.0 → 0.19.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 (77) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/PUBLISH-DATA.md +19 -0
  3. package/README.md +1 -1
  4. package/client/fuse-M2Z6NNAT.js +2000 -0
  5. package/package.json +15 -3
  6. package/publish-artifacts.js +215 -0
  7. package/publish-client.js +249 -0
  8. package/publish-data.js +1 -0
  9. package/types/packages/editor/api.d.ts +1 -1
  10. package/types/packages/editor/contracts.d.ts +2 -2
  11. package/types/packages/editor/source-contracts.d.ts +48 -0
  12. package/types/packages/editor/src/{services → core/services}/overlayBackDismiss.d.ts +1 -1
  13. package/types/packages/editor/src/{services → core/services}/registry.d.ts +2 -2
  14. package/types/packages/editor/src/{services → core/services}/tokens.d.ts +4 -4
  15. package/types/packages/editor/src/{types → core/types}/custom-element.d.ts +1 -1
  16. package/types/packages/editor/src/core/types/text.d.ts +1 -0
  17. package/types/packages/editor/src/{ui → core/ui}/Tooltip.d.ts +1 -1
  18. package/types/packages/editor/src/{utils → core/utils}/blockNavigation.d.ts +1 -1
  19. package/types/packages/plugins/src/ids.d.ts +1 -0
  20. package/types/packages/plugins/src/inline-source.d.ts +2 -13
  21. package/types/packages/plugins/src/package.d.ts +29 -0
  22. package/types/packages/plugins/src/publish-artifacts.d.ts +15 -0
  23. package/types/packages/plugins/src/publish-client.d.ts +8 -0
  24. package/types/packages/plugins/src/publish-data.d.ts +274 -0
  25. package/types/packages/plugins/src/render-artifact.d.ts +9 -0
  26. package/types/packages/plugins/src/source-editor.d.ts +2 -38
  27. package/types/packages/plugins/src/version.d.ts +4 -0
  28. package/types/packages/editor/src/types/text.d.ts +0 -1
  29. /package/types/packages/editor/src/{api → core/api}/command.d.ts +0 -0
  30. /package/types/packages/editor/src/{api → core/api}/copy.d.ts +0 -0
  31. /package/types/packages/editor/src/{api → core/api}/drag.d.ts +0 -0
  32. /package/types/packages/editor/src/{api → core/api}/extension.d.ts +0 -0
  33. /package/types/packages/editor/src/{api → core/api}/index.d.ts +0 -0
  34. /package/types/packages/editor/src/{api → core/api}/ingest.d.ts +0 -0
  35. /package/types/packages/editor/src/{api → core/api}/legacy.d.ts +0 -0
  36. /package/types/packages/editor/src/{api → core/api}/marks.d.ts +0 -0
  37. /package/types/packages/editor/src/{api → core/api}/menu.d.ts +0 -0
  38. /package/types/packages/editor/src/{api → core/api}/submission.d.ts +0 -0
  39. /package/types/packages/editor/src/{api → core/api}/toolbar.d.ts +0 -0
  40. /package/types/packages/editor/src/{components → core/components}/AddParagraph/index.d.ts +0 -0
  41. /package/types/packages/editor/src/{components → core/components}/BlockDrag/index.d.ts +0 -0
  42. /package/types/packages/editor/src/{components → core/components}/ElementMenu/index.d.ts +0 -0
  43. /package/types/packages/editor/src/{components → core/components}/FloatingToolbar/index.d.ts +0 -0
  44. /package/types/packages/editor/src/{components → core/components}/HoveringToolbar/FloatingSubmenu.d.ts +0 -0
  45. /package/types/packages/editor/src/{components → core/components}/HoveringToolbar/context.d.ts +0 -0
  46. /package/types/packages/editor/src/{components → core/components}/HoveringToolbar/floatingPosition.d.ts +0 -0
  47. /package/types/packages/editor/src/{components → core/components}/InlineChromiumBugFix/index.d.ts +0 -0
  48. /package/types/packages/editor/src/{components → core/components}/OverlayBackDismiss/index.d.ts +0 -0
  49. /package/types/packages/editor/src/{hooks → core/hooks}/useIsLastElement.d.ts +0 -0
  50. /package/types/packages/editor/src/{kit → core/kit}/elementEmpty.d.ts +0 -0
  51. /package/types/packages/editor/src/{menu → core/menu}/conversion.d.ts +0 -0
  52. /package/types/packages/editor/src/{model → core/model}/paragraph.d.ts +0 -0
  53. /package/types/packages/editor/src/{services → core/services}/editorNotifier.d.ts +0 -0
  54. /package/types/packages/editor/src/{services → core/services}/errorReporter.d.ts +0 -0
  55. /package/types/packages/editor/src/{services → core/services}/hooks.d.ts +0 -0
  56. /package/types/packages/editor/src/{services → core/services}/notifier.d.ts +0 -0
  57. /package/types/packages/editor/src/{theme → core/theme}/ThemeService.d.ts +0 -0
  58. /package/types/packages/editor/src/{theme → core/theme}/context.d.ts +0 -0
  59. /package/types/packages/editor/src/{types → core/types}/block-panel.d.ts +0 -0
  60. /package/types/packages/editor/src/{types → core/types}/editor.d.ts +0 -0
  61. /package/types/packages/editor/src/{types → core/types}/element/paragraph.d.ts +0 -0
  62. /package/types/packages/editor/src/{types → core/types}/hotkeys.d.ts +0 -0
  63. /package/types/packages/editor/src/{types → core/types}/hovering-bar.d.ts +0 -0
  64. /package/types/packages/editor/src/{types → core/types}/index.d.ts +0 -0
  65. /package/types/packages/editor/src/{types.d.ts → core/types.d.ts} +0 -0
  66. /package/types/packages/editor/src/{ui → core/ui}/CaretRight.d.ts +0 -0
  67. /package/types/packages/editor/src/{utils → core/utils}/commandTarget.d.ts +0 -0
  68. /package/types/packages/editor/src/{utils → core/utils}/container.d.ts +0 -0
  69. /package/types/packages/editor/src/{utils → core/utils}/editor.d.ts +0 -0
  70. /package/types/packages/editor/src/{utils → core/utils}/element.d.ts +0 -0
  71. /package/types/packages/editor/src/{utils → core/utils}/insertElement.d.ts +0 -0
  72. /package/types/packages/editor/src/{utils → core/utils}/nodeOperations.d.ts +0 -0
  73. /package/types/packages/editor/src/{utils → core/utils}/paragraphShortcut.d.ts +0 -0
  74. /package/types/packages/editor/src/{utils → core/utils}/path.d.ts +0 -0
  75. /package/types/packages/editor/src/{utils → core/utils}/plugin.d.ts +0 -0
  76. /package/types/packages/editor/src/{utils → core/utils}/selectionSnapshot.d.ts +0 -0
  77. /package/types/packages/editor/src/{utils → core/utils}/zoomPan.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # 更新记录
2
2
 
3
+ ## 0.19.0
4
+
5
+ - 补齐 publish-data 类型、publish-client 纯数据客户端及 publish-artifacts 协议校验/定义求值入口;数据与产物声明不连带载入 Editor/React/UI 类型。
6
+ - 普通 SDK/UI 根入口保持类型与 Tau 注入约定;通用源码组件契约与实现由 Editor 公开入口维护,既有源码宿主适配只负责接线。
7
+ - 保留 master 0.18.0 的图片插件及全部已插件化接口。
8
+
3
9
  ## 0.18.0
4
10
 
5
11
  - 新增 `context.images.register`,按账号配置与模型创建图片生成或编辑实例,返回图片字节和实际 MIME。
@@ -0,0 +1,19 @@
1
+ # 独立站点的数据接入
2
+
3
+ 普通 Tau 插件仍然使用 SDK 类型开发,构建时将宿主注入模块设为 external。SDK 根入口和 UI 包不携带编辑器、组件或页面的运行实现。
4
+
5
+ 独立站点可使用 `@tau/plugins/publish-data` 的纯数据类型,以及 `@tau/plugins/publish-client` 的可执行辅助客户端。后者只有数据读取、摘要校验、取消和搜索,不包含 React、渲染器、路由或预览界面。
6
+
7
+ ```ts
8
+ import { createClient } from "@tau/plugins/publish-client";
9
+
10
+ const client = createClient({ manifestUrl: "https://example.com/data/site.<摘要>.json" });
11
+ const manifest = await client.readManifest();
12
+ const result = await client.readData({ key: manifest.items[0].key });
13
+ ```
14
+
15
+ 模板也可以自行读取协议 JSON。模板自行携带渲染实现并消费 C23 插件产物;宿主不为站点提供 UI 模块。资源以清单或所属数据文件的 URL 为上下文解析,公开路由由模板决定。
16
+
17
+ `@tau/plugins/publish-artifacts` 提供 C23 清单校验、定义求值与节点归属检查,仅处理协议,不提供 UI、模块映射或资源生命周期。其声明不连带加载 SDK 根入口的 Editor/Slate/UI 类型;共享模块由模板通过实际公开能力提供。
18
+
19
+ 可选 `@tau/editor` 是单独的可执行通用编辑器,包含默认内置功能和已编译样式。模板起步工程中的 PublishedContent 负责读取已验证正文、加载插件产物和伴生 CSS,再将扩展及节点交给 Editor;dataUrl 和发布协议不进入 Editor 的 props。普通 SDK/UI 根入口继续保持类型与 Tau 注入边界。
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Tau 插件开发包 @tau/plugins
2
2
 
3
- 开发 Tau 插件所需的类型与接口,通过 npm 别名安装为 `@tau/plugins`。实际实现由 Tau 客户端在运行时提供,构建时需设为 external,不能在普通 Node.js 程序中直接运行。
3
+ 开发 Tau 插件所需的类型与接口,通过 npm 别名安装为 `@tau/plugins`。根入口的实际实现由 Tau 客户端提供,构建时需设为 external。plugins 包另提供独立站点可用的 publish-data 类型和 publish-client 纯数据客户端,见该包 PUBLISH-DATA.md;不包含站点渲染、路由或预览实现。
4
4
 
5
5
  从模板开始开发:https://github.com/LastKnightCoder/tau-plugin-template
6
6