@cfp-studio/plugin-vue3 16.0.1 → 16.1.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/README.md +42 -0
- package/dist/index.d.mts +5760 -3
- package/dist/index.mjs +5 -635
- package/package.json +33 -28
- package/preview/index.ts +0 -5
- package/preview/modules/@vue/compiler-core/node_modules/.bin/parser +33 -7
- package/preview/modules/@vue/compiler-sfc/node_modules/.bin/parser +33 -7
- package/preview/modules/vue/node_modules/.bin/tsc +31 -5
- package/preview/modules/vue/node_modules/.bin/tsserver +31 -5
- package/preview/tsconfig.json +8 -8
- package/dist/index.d.ts +0 -5
- package/preview/modules/@vue/reactivity/LICENSE +0 -21
- package/preview/modules/@vue/reactivity/README.md +0 -19
- package/preview/modules/@vue/reactivity/dist/reactivity.cjs.js +0 -1939
- package/preview/modules/@vue/reactivity/dist/reactivity.cjs.prod.js +0 -1789
- package/preview/modules/@vue/reactivity/dist/reactivity.d.ts +0 -754
- package/preview/modules/@vue/reactivity/dist/reactivity.esm-browser.js +0 -1938
- package/preview/modules/@vue/reactivity/dist/reactivity.esm-browser.prod.js +0 -5
- package/preview/modules/@vue/reactivity/dist/reactivity.esm-bundler.js +0 -1896
- package/preview/modules/@vue/reactivity/dist/reactivity.global.js +0 -1994
- package/preview/modules/@vue/reactivity/dist/reactivity.global.prod.js +0 -5
- package/preview/modules/@vue/reactivity/index.js +0 -7
- package/preview/modules/@vue/reactivity/package.json +0 -55
- package/preview/modules/@vue/runtime-dom/LICENSE +0 -21
- package/preview/modules/@vue/runtime-dom/README.md +0 -13
- package/preview/modules/@vue/runtime-dom/dist/runtime-dom.cjs.js +0 -1820
- package/preview/modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +0 -1669
- package/preview/modules/@vue/runtime-dom/dist/runtime-dom.d.ts +0 -1395
- package/preview/modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js +0 -12332
- package/preview/modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js +0 -5
- package/preview/modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +0 -1860
- package/preview/modules/@vue/runtime-dom/dist/runtime-dom.global.js +0 -12383
- package/preview/modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js +0 -5
- package/preview/modules/@vue/runtime-dom/index.js +0 -7
- package/preview/modules/@vue/runtime-dom/package.json +0 -60
- package/preview/modules/@vue/shared/LICENSE +0 -21
- package/preview/modules/@vue/shared/README.md +0 -3
- package/preview/modules/@vue/shared/dist/shared.cjs.js +0 -594
- package/preview/modules/@vue/shared/dist/shared.cjs.prod.js +0 -594
- package/preview/modules/@vue/shared/dist/shared.d.ts +0 -328
- package/preview/modules/@vue/shared/dist/shared.esm-bundler.js +0 -519
- package/preview/modules/@vue/shared/index.js +0 -7
- package/preview/modules/@vue/shared/package.json +0 -47
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# @cfp-studio/plugin-vue3
|
|
2
|
+
|
|
3
|
+
Vue 3 框架的 CFP Studio 插件,支持 Vue 3 组件/Story 静态分析、属性/类型提取、预览渲染、CSF/Storybook 兼容等。
|
|
4
|
+
|
|
5
|
+
## 特性
|
|
6
|
+
- 自动检测并适配 Vue 3.x/Nuxt 3.x 项目
|
|
7
|
+
- 支持 Vue 3 组件/Story 的批量静态分析与属性/类型提取
|
|
8
|
+
- 兼容 CSF/Storybook 规范,支持 args/参数提取
|
|
9
|
+
- 支持 preview 目录下自定义 Wrapper、错误边界
|
|
10
|
+
- 内置丰富的 E2E/单元测试用例
|
|
11
|
+
|
|
12
|
+
## 架构与工作原理
|
|
13
|
+
- 通过 `FrameworkPluginFactory` 实现插件注册与兼容性检测
|
|
14
|
+
- 使用 `createTypeAnalyzer` 进行 TS/JSX 类型分析,支持 Vue 3 特殊类型适配
|
|
15
|
+
- `crawlFile` 支持单文件批量组件/Story 爬取,自动生成可预览 ID
|
|
16
|
+
- `preview/` 目录下为前端渲染入口,支持自定义 Wrapper、错误边界
|
|
17
|
+
- 支持多种 Vue 3 工程模板(apps/ 下有多种测试工程)
|
|
18
|
+
|
|
19
|
+
## 主要 API/模块
|
|
20
|
+
- `src/index.ts`:插件主入口,注册工厂与分析器
|
|
21
|
+
- `src/crawl-file.ts`:单文件批量组件/Story 爬取
|
|
22
|
+
- `src/analyze.ts`:属性/类型/JSX 结构分析
|
|
23
|
+
- `preview/index.tsx`:前端渲染入口
|
|
24
|
+
- `tests/`、`apps/`:丰富的测试与模板
|
|
25
|
+
|
|
26
|
+
## 用法示例
|
|
27
|
+
```ts
|
|
28
|
+
import { vue3FrameworkPlugin } from '@cfp-studio/plugin-vue3';
|
|
29
|
+
// 传入 core/Previewer 或 createChromelessWorkspace 等集成
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## 依赖
|
|
33
|
+
- `vue`、`@vitejs/plugin-vue`、`@cfp-studio/*`、`typescript`、`vite`
|
|
34
|
+
- 测试:`vitest`、`@playwright/test`
|
|
35
|
+
|
|
36
|
+
## 构建
|
|
37
|
+
```sh
|
|
38
|
+
pnpm build
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 许可证
|
|
42
|
+
MIT
|