refactor: 类型安全与接口清理 (#311)

* refactor: 分解 IEngineBridge 为单一职责接口

- 新增 ITextureService, IDynamicAtlasService, ICoordinateService, IRenderConfigService
- 移除 EngineBridgeToken,改用具体服务 Token
- 更新 camera, ui, particle 等模块使用新接口
- 优化装饰器类型安全,使用 Symbol-based metadata 访问模式

* refactor: 删除 plugin-types 包,统一 createServiceToken 实现

- 移动 IEditorModuleBase 接口到 engine-core
- 移除 engine-core 和 editor-core 对 plugin-types 的依赖
- 删除冗余的 plugin-types 包
- 统一使用 core 中基于 Symbol.for() 的 createServiceToken

* refactor: 统一 IPlugin 接口,移除 deprecated 别名

- 移除 engine-core、editor-core、runtime-core 中的 IPlugin 别名
- 模块插件统一使用 IRuntimePlugin(运行时)或 IEditorPlugin(编辑器)
- 保留 core 包中的 IPlugin 作为 ECS 核心插件接口(不同概念)
- 更新所有消费方使用正确的类型

* refactor: 重命名 editor-core ComponentRegistry 为 EditorComponentRegistry

- 消除与 core 包 ComponentRegistry(ECS 位掩码管理)的命名歧义
- editor-core 的 EditorComponentRegistry 专用于编辑器组件元数据
- 更新所有编辑器包使用新名称
This commit is contained in:
YHH
2025-12-19 17:48:18 +08:00
committed by GitHub
parent ecdb8f2021
commit e24c850568
51 changed files with 492 additions and 623 deletions

24
pnpm-lock.yaml generated
View File

@@ -777,9 +777,6 @@ importers:
'@esengine/engine-core':
specifier: workspace:*
version: link:../engine-core
'@esengine/plugin-types':
specifier: workspace:*
version: link:../plugin-types
'@eslint/js':
specifier: ^9.37.0
version: 9.39.1
@@ -925,9 +922,6 @@ importers:
'@esengine/platform-common':
specifier: workspace:*
version: link:../platform-common
'@esengine/plugin-types':
specifier: workspace:*
version: link:../plugin-types
devDependencies:
'@esengine/build-config':
specifier: workspace:*
@@ -1331,24 +1325,6 @@ importers:
specifier: ^5.8.3
version: 5.9.3
packages/plugin-types:
devDependencies:
'@esengine/build-config':
specifier: workspace:*
version: link:../build-config
'@esengine/ecs-framework':
specifier: workspace:*
version: link:../core
rimraf:
specifier: ^5.0.0
version: 5.0.10
tsup:
specifier: ^8.0.0
version: 8.5.1(@microsoft/api-extractor@7.55.1(@types/node@20.19.25))(@swc/core@1.15.3)(jiti@2.6.1)(postcss@8.5.6)(typescript@5.9.3)(yaml@2.8.1)
typescript:
specifier: ^5.8.3
version: 5.9.3
packages/rapier2d:
devDependencies:
rimraf: