|
| 1 | +/** |
| 2 | + * 临时类型声明文件 |
| 3 | + * |
| 4 | + * 此文件为暂未导出类型声明的内部包提供临时类型定义 |
| 5 | + * TODO: 当这些包完成类型导出后,应当删除此文件 |
| 6 | + * |
| 7 | + * 相关包列表: |
| 8 | + * - @opentiny/tiny-engine-canvas |
| 9 | + * - @opentiny/tiny-engine-layout |
| 10 | + * - @opentiny/tiny-engine-plugin-* (block, datasource, help, i18n, materials, page, robot) |
| 11 | + * - @opentiny/tiny-engine-setting-props |
| 12 | + * - @opentiny/tiny-engine-toolbar-* (breadcrumb, generate-code, redoundo) |
| 13 | + * - @opentiny/tiny-engine-common |
| 14 | + */ |
| 15 | + |
| 16 | +// Canvas API - 导出一个返回 API 对象的函数 |
| 17 | +declare module '@opentiny/tiny-engine-canvas/DesignCanvas/src/api' { |
| 18 | + const useCanvasApi: () => Record<string, any> |
| 19 | + export default useCanvasApi |
| 20 | +} |
| 21 | + |
| 22 | +// Layout Service - 导出包含 apis 属性的服务对象 |
| 23 | +declare module '@opentiny/tiny-engine-layout' { |
| 24 | + export const LayoutService: { |
| 25 | + apis: Record<string, any> |
| 26 | + } |
| 27 | +} |
| 28 | + |
| 29 | +// Plugin: Block - 区块管理服务 |
| 30 | +declare module '@opentiny/tiny-engine-plugin-block' { |
| 31 | + export const BlockService: { |
| 32 | + apis: Record<string, any> |
| 33 | + } |
| 34 | +} |
| 35 | + |
| 36 | +// Plugin: DataSource - 数据源管理服务 |
| 37 | +declare module '@opentiny/tiny-engine-plugin-datasource' { |
| 38 | + export const DataSourceService: { |
| 39 | + apis: Record<string, any> |
| 40 | + } |
| 41 | +} |
| 42 | + |
| 43 | +// Plugin: Help - 帮助服务 |
| 44 | +declare module '@opentiny/tiny-engine-plugin-help' { |
| 45 | + export const HelpService: { |
| 46 | + apis: Record<string, any> |
| 47 | + } |
| 48 | +} |
| 49 | + |
| 50 | +// Plugin: I18n - 国际化翻译服务 |
| 51 | +declare module '@opentiny/tiny-engine-plugin-i18n' { |
| 52 | + export const TranslateService: { |
| 53 | + apis: Record<string, any> |
| 54 | + } |
| 55 | +} |
| 56 | + |
| 57 | +// Plugin: Materials - 物料管理服务(包含两个服务) |
| 58 | +declare module '@opentiny/tiny-engine-plugin-materials' { |
| 59 | + export const MaterialService: { |
| 60 | + apis: Record<string, any> |
| 61 | + } |
| 62 | + export const ResourceService: { |
| 63 | + apis: Record<string, any> |
| 64 | + } |
| 65 | +} |
| 66 | + |
| 67 | +// Plugin: Page - 页面管理服务 |
| 68 | +declare module '@opentiny/tiny-engine-plugin-page' { |
| 69 | + export const PageService: { |
| 70 | + apis: Record<string, any> |
| 71 | + } |
| 72 | +} |
| 73 | + |
| 74 | +// Plugin: Robot - AI 机器人服务 |
| 75 | +declare module '@opentiny/tiny-engine-plugin-robot' { |
| 76 | + export const RobotService: { |
| 77 | + apis: Record<string, any> |
| 78 | + } |
| 79 | +} |
| 80 | + |
| 81 | +// Setting: Props - 属性配置服务(包含两个服务) |
| 82 | +declare module '@opentiny/tiny-engine-setting-props' { |
| 83 | + export const PropertiesService: { |
| 84 | + apis: Record<string, any> |
| 85 | + } |
| 86 | + export const PropertyService: { |
| 87 | + apis: Record<string, any> |
| 88 | + } |
| 89 | +} |
| 90 | + |
| 91 | +// Toolbar: Breadcrumb - 面包屑导航服务 |
| 92 | +declare module '@opentiny/tiny-engine-toolbar-breadcrumb' { |
| 93 | + export const BreadcrumbService: { |
| 94 | + apis: Record<string, any> |
| 95 | + } |
| 96 | +} |
| 97 | + |
| 98 | +// Toolbar: Generate Code - 代码生成和本地保存服务 |
| 99 | +declare module '@opentiny/tiny-engine-toolbar-generate-code' { |
| 100 | + export const SaveLocalService: { |
| 101 | + apis: Record<string, any> |
| 102 | + } |
| 103 | +} |
| 104 | + |
| 105 | +// Toolbar: Redo/Undo - 历史记录服务 |
| 106 | +declare module '@opentiny/tiny-engine-toolbar-redoundo' { |
| 107 | + export const HistoryService: { |
| 108 | + apis: Record<string, any> |
| 109 | + } |
| 110 | +} |
| 111 | + |
| 112 | +// Common - 通用工具(Modal 和 Notify) |
| 113 | +declare module '@opentiny/tiny-engine-common' { |
| 114 | + export const Modal: Record<string, any> |
| 115 | + export const Notify: (...args: any[]) => any |
| 116 | +} |
0 commit comments