create-vela-workflow 1.0.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 (45) hide show
  1. package/README.md +136 -0
  2. package/bin/cli.js +188 -0
  3. package/docs/ai-workflow-tutorial.md +462 -0
  4. package/docs/official-site-tutorial.md +391 -0
  5. package/package.json +34 -0
  6. package/templates/.github/HARNESS-ENGINEERING-GUIDE.md +407 -0
  7. package/templates/.github/agents/vela-knowledge.agent.md +45 -0
  8. package/templates/.github/agents/vela-s1-prd.agent.md +69 -0
  9. package/templates/.github/agents/vela-s2-tech.agent.md +66 -0
  10. package/templates/.github/agents/vela-s3-coding.agent.md +301 -0
  11. package/templates/.github/agents/vela-workflow.agent.md +110 -0
  12. package/templates/.github/copilot-instructions.md +64 -0
  13. package/templates/.github/prompts/vela-apis.prompt.md +98 -0
  14. package/templates/.github/prompts/vela-best-practices.prompt.md +93 -0
  15. package/templates/.github/prompts/vela-components.prompt.md +118 -0
  16. package/templates/.github/prompts/vela-dev-guide.prompt.md +622 -0
  17. package/templates/.github/rules/project-init.md +45 -0
  18. package/templates/.github/rules/vela-coding-convention.md +324 -0
  19. package/templates/.github/rules/vela-css.md +217 -0
  20. package/templates/.github/rules/vela-design-driven.md +306 -0
  21. package/templates/.github/rules/vela-figma-mcp.md +198 -0
  22. package/templates/.github/rules/vela-format.md +119 -0
  23. package/templates/.github/rules/vela-layout.md +67 -0
  24. package/templates/.github/rules/vela-platform.md +46 -0
  25. package/templates/.github/rules/vela-quality.md +109 -0
  26. package/templates/.kiro/hooks/figma-design-check.kiro.hook +14 -0
  27. package/templates/.kiro/hooks/post-coding-validation.kiro.hook +13 -0
  28. package/templates/.kiro/hooks/validate-ux-files.kiro.hook +16 -0
  29. package/templates/.kiro/settings/mcp.json +7 -0
  30. package/templates/.kiro/skills/vela-js-app/SKILL.md +1072 -0
  31. package/templates/.kiro/steering/workflow-conventions.md +110 -0
  32. package/templates/.workflow/resource-paths.json +62 -0
  33. package/templates/.workflow/scripts/.gitkeep +0 -0
  34. package/templates/.workflow/scripts/checkpoint_manager.js +284 -0
  35. package/templates/.workflow/scripts/context_loader.js +841 -0
  36. package/templates/.workflow/scripts/figma_export.js +346 -0
  37. package/templates/.workflow/scripts/session_manager.js +438 -0
  38. package/templates/.workflow/stages/.gitkeep +0 -0
  39. package/templates/.workflow/stages/commands.md +171 -0
  40. package/templates/.workflow/stages/s1_prd.md +286 -0
  41. package/templates/.workflow/stages/s2_tech_design.md +302 -0
  42. package/templates/.workflow/stages/s3_coding.md +699 -0
  43. package/templates/.workflow/stages/s4_simulator.md +259 -0
  44. package/templates/.workflow/workflow-config.json +46 -0
  45. package/templates/.workflow/workflow_starter.md +912 -0
@@ -0,0 +1,118 @@
1
+ # Vela 快应用组件参考
2
+
3
+ ## 容器组件
4
+
5
+ ### div — 基础 Flex 容器
6
+ 默认 flex-direction: column。支持所有通用样式。
7
+
8
+ ### list + list-item — 高性能列表
9
+ ```html
10
+ <list class="list" onscrollbottom="loadMore">
11
+ <list-item type="item" for="{{list}}" tid="id">
12
+ <text>{{$item.name}}</text>
13
+ </list-item>
14
+ </list>
15
+ ```
16
+ - list-item 必须设置 `type` 属性
17
+ - 事件: scroll, scrollbottom, scrolltop
18
+ - 方法: scrollTo({index}), scrollBy({top})
19
+
20
+ ### scroll — 滚动容器
21
+ ```html
22
+ <scroll scroll-y="true" style="height: 300px;">
23
+ <!-- 内容 -->
24
+ </scroll>
25
+ ```
26
+ - 属性: scroll-x, scroll-y, scroll-top, scroll-left
27
+ - 样式: scroll-snap-type, scroll-snap-align
28
+
29
+ ### swiper — 滑块视图
30
+ ```html
31
+ <swiper index="0" autoplay="true" interval="3000" loop="true" vertical="false">
32
+ <div><text>页面1</text></div>
33
+ <div><text>页面2</text></div>
34
+ </swiper>
35
+ ```
36
+ - 属性: index, autoplay, interval, loop, vertical, indicator
37
+ - 样式: indicator-color, indicator-selected-color, indicator-size
38
+ - 事件: change({index})
39
+ - 方法: swipeTo({index})
40
+
41
+ ### stack — 层叠容器
42
+ 子组件按层叠顺序排列。
43
+
44
+ ## 基础组件
45
+
46
+ ### text — 文本
47
+ - 样式: lines, text-overflow(clip/ellipsis), color, font-size, font-weight, text-align, line-height
48
+ - 子组件仅支持 `<span>`
49
+
50
+ ### image — 图片
51
+ ```html
52
+ <image src="/common/logo.png" alt="blank" />
53
+ ```
54
+ - 属性: src, alt("blank"=无占位图)
55
+ - 样式: object-fit(contain/cover/none/scale-down)
56
+ - 事件: complete({width, height}), error
57
+
58
+ ### span — 行内文本(仅作 text 子组件)
59
+
60
+ ### a — 链接
61
+
62
+ ### progress — 进度条
63
+ - type: horizontal / circular
64
+ - percent: 进度百分比
65
+
66
+ ### marquee — 跑马灯
67
+
68
+ ### chart — 图表(替代 echarts)
69
+
70
+ ### qrcode — 二维码
71
+
72
+ ### barcode — 条形码
73
+
74
+ ### image-animator — 帧动画
75
+
76
+ ## 表单组件
77
+
78
+ ### input — 输入/按钮/选择
79
+ ```html
80
+ <input type="button" value="点击" onclick="onClick" />
81
+ <input type="checkbox" checked="{{checked}}" onchange="onCheck" />
82
+ <input type="radio" name="group" value="1" onchange="onRadio" />
83
+ ```
84
+ - type: button, checkbox, radio
85
+ - 事件: change({name, value, checked})
86
+
87
+ ### picker — 选择器
88
+ - type: text, date, time, multi-text
89
+
90
+ ### slider — 滑块
91
+
92
+ ### switch — 开关
93
+
94
+ ## 通用事件
95
+ 所有组件支持: touchstart, touchmove, touchend, click, longpress, swipe
96
+
97
+ ## 通用方法
98
+ ```javascript
99
+ this.$element('id').getBoundingClientRect({
100
+ success(data) { /* left, right, top, bottom, width, height */ }
101
+ })
102
+ this.$element('input1').focus({ focus: true })
103
+ ```
104
+
105
+ ## 动画
106
+ ### transform
107
+ translate/translateX/translateY, scale/scaleX/scaleY, rotate
108
+
109
+ ### animation + @keyframes
110
+ ```css
111
+ .box { animation-name: fadeIn; animation-duration: 1s; }
112
+ @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
113
+ ```
114
+
115
+ ### transition
116
+ ```css
117
+ .box { transition-property: width; transition-duration: 0.3s; }
118
+ ```