UNPKG

@vtj/coder

Version:

VVTJ.PRO 是一个开源的、AI 驱动的 Vue3 企业级应用开发平台,通过 AI 智能体与可视化编排实现高效开发,并支持导出标准 Vue 代码以避免平台锁定。

64 lines (63 loc) 2.14 kB
import { MaterialDescription, PlatformType } from '@vtj/core'; import { Collecter } from '../../collecter'; export interface TokenComposition { id: string; version: string; name: string; /** 顶层 imports(全部完整 import 语句) */ imports: string; /** defineProps 内容 */ props: string; /** defineEmits 列表(已带引号的字符串) */ emits: string; /** 是否需要生成 defineProps(DSL 中使用了 this.$props) */ needsProps: boolean; /** 是否需要生成 defineEmits(DSL 中使用了 this.$emit) */ needsEmit: boolean; /** defineExpose 参数 */ expose: string; /** 全局 API 顶层声明(const router = useRouter() 等) */ globalApiDeclares: string; /** inject 顶层声明 */ injects: string; /** composables 顶层声明 */ composables: string; /** state(作为 reactive) */ state: string; /** refs 顶层声明 */ refs: string; /** reactives 顶层声明 */ reactives: string; /** computed 顶层声明 */ computed: string; /** methods 顶层声明 */ methods: string; /** dataSources 顶层声明 */ dataSources: string; /** watch 顶层调用 */ watch: string; /** provide 顶层调用 */ provide: string; /** created/beforeCreate 顶层立即执行 */ createdStatements: string; /** setup 字段顶层立即执行 */ setupStatements: string; /** onXxx 生命周期顶层调用 */ lifeCycles: string; /** 模板部分 */ template: string; css: string; style: string; urlSchemas: string; blockPlugins: string; uniComponents: string[]; renderer: string; /** renderer 包导入的标识符(useProvider + 可能的 useStore 等) */ rendererImports: string; /** parent 类型组件的 const 声明(如 const AButtonGroup = AButton.Group;) */ componentDeclarations: string; } /** * Composition 模式 parser */ export declare function parserComposition(collecter: Collecter, componentMap: Map<string, MaterialDescription>, platform?: PlatformType): TokenComposition;