foliko 1.1.0 → 1.1.2

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 (214) hide show
  1. package/.agent/.shared/ui-ux-pro-max/data/charts.csv +26 -0
  2. package/.agent/.shared/ui-ux-pro-max/data/colors.csv +97 -0
  3. package/.agent/.shared/ui-ux-pro-max/data/icons.csv +101 -0
  4. package/.agent/.shared/ui-ux-pro-max/data/landing.csv +31 -0
  5. package/.agent/.shared/ui-ux-pro-max/data/products.csv +97 -0
  6. package/.agent/.shared/ui-ux-pro-max/data/prompts.csv +24 -0
  7. package/.agent/.shared/ui-ux-pro-max/data/react-performance.csv +45 -0
  8. package/.agent/.shared/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  9. package/.agent/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  10. package/.agent/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  11. package/.agent/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  12. package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  13. package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  14. package/.agent/.shared/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  15. package/.agent/.shared/ui-ux-pro-max/data/stacks/react.csv +54 -0
  16. package/.agent/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  17. package/.agent/.shared/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  18. package/.agent/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  19. package/.agent/.shared/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  20. package/.agent/.shared/ui-ux-pro-max/data/styles.csv +59 -0
  21. package/.agent/.shared/ui-ux-pro-max/data/typography.csv +58 -0
  22. package/.agent/.shared/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  23. package/.agent/.shared/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  24. package/.agent/.shared/ui-ux-pro-max/data/web-interface.csv +31 -0
  25. package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
  26. package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
  27. package/.agent/.shared/ui-ux-pro-max/scripts/core.py +258 -0
  28. package/.agent/.shared/ui-ux-pro-max/scripts/design_system.py +1067 -0
  29. package/.agent/.shared/ui-ux-pro-max/scripts/search.py +106 -0
  30. package/.agent/ARCHITECTURE.md +288 -0
  31. package/.agent/agents/ambient-agent.md +57 -0
  32. package/.agent/agents/debugger.md +55 -0
  33. package/.agent/agents/email-assistant.md +49 -0
  34. package/.agent/agents/file-manager.md +42 -0
  35. package/.agent/agents/python-developer.md +60 -0
  36. package/.agent/agents/scheduler.md +59 -0
  37. package/.agent/agents/web-developer.md +45 -0
  38. package/.agent/data/default.json +412 -3
  39. package/.agent/data/plugins-state.json +173 -174
  40. package/.agent/data/puppeteer-sessions/undefined.json +6 -0
  41. package/.agent/data/weixin-media/2026-04-08/img_1775618677512.jpg +0 -0
  42. package/.agent/data/weixin-media/2026-04-08/img_1775619073340.jpg +0 -0
  43. package/.agent/data/weixin-media/2026-04-08/img_1775619097536.jpg +0 -0
  44. package/.agent/data/weixin-media/2026-04-08/img_1775619209388.jpg +0 -0
  45. package/.agent/mcp_config_updated.json +12 -0
  46. package/.agent/plugins/poster-plugin/fonts/NotoColorEmoji-Regular.ttf +0 -0
  47. package/.agent/plugins/poster-plugin/package.json +2 -1
  48. package/.agent/plugins/poster-plugin/src/canvas.js +70 -7
  49. package/.agent/plugins/poster-plugin/src/components/barcode.js +120 -0
  50. package/.agent/plugins/poster-plugin/src/components/bubble.js +153 -0
  51. package/.agent/plugins/poster-plugin/src/components/button.js +124 -0
  52. package/.agent/plugins/poster-plugin/src/components/cta.js +26 -24
  53. package/.agent/plugins/poster-plugin/src/components/featureGrid.js +22 -17
  54. package/.agent/plugins/poster-plugin/src/components/frame.js +230 -0
  55. package/.agent/plugins/poster-plugin/src/components/highlightText.js +144 -0
  56. package/.agent/plugins/poster-plugin/src/components/icon.js +94 -0
  57. package/.agent/plugins/poster-plugin/src/components/index.js +19 -0
  58. package/.agent/plugins/poster-plugin/src/components/listItem.js +6 -5
  59. package/.agent/plugins/poster-plugin/src/components/qrcode.js +74 -0
  60. package/.agent/plugins/poster-plugin/src/components/ribbon.js +193 -0
  61. package/.agent/plugins/poster-plugin/src/components/seal.js +146 -0
  62. package/.agent/plugins/poster-plugin/src/components/table.js +17 -9
  63. package/.agent/plugins/poster-plugin/src/components/tagCloud.js +24 -17
  64. package/.agent/plugins/poster-plugin/src/components/timeline.js +24 -12
  65. package/.agent/plugins/poster-plugin/src/composer.js +392 -150
  66. package/.agent/plugins/poster-plugin/src/elements/background.js +36 -4
  67. package/.agent/plugins/poster-plugin/src/elements/image.js +4 -47
  68. package/.agent/plugins/poster-plugin/src/elements/index.js +2 -0
  69. package/.agent/plugins/poster-plugin/src/elements/polygon.js +37 -6
  70. package/.agent/plugins/poster-plugin/src/elements/richText.js +230 -0
  71. package/.agent/plugins/poster-plugin/src/elements/svg.js +35 -19
  72. package/.agent/plugins/poster-plugin/src/elements/text.js +71 -2
  73. package/.agent/plugins/poster-plugin/src/fonts.js +123 -8
  74. package/.agent/plugins/poster-plugin/src/index.js +445 -23
  75. package/.agent/plugins/poster-plugin/src/utils/imageLoader.js +84 -0
  76. package/.agent/plugins/poster-plugin/test-background.svg +1 -0
  77. package/.agent/plugins/poster-plugin/test-full-poster.svg +2 -0
  78. package/.agent/plugins/poster-plugin/test-image.png +0 -0
  79. package/.agent/plugins/puppeteer-plugin/README.md +147 -0
  80. package/.agent/plugins/puppeteer-plugin/index.js +1418 -0
  81. package/.agent/plugins/puppeteer-plugin/package.json +9 -0
  82. package/.agent/plugins.json +5 -11
  83. package/.agent/rules/GEMINI.md +273 -0
  84. package/.agent/rules/allow-rule.md +77 -0
  85. package/.agent/rules/log-rule.md +83 -0
  86. package/.agent/rules/security-rule.md +93 -0
  87. package/.agent/scripts/auto_preview.py +148 -0
  88. package/.agent/scripts/checklist.py +217 -0
  89. package/.agent/scripts/session_manager.py +120 -0
  90. package/.agent/scripts/verify_all.py +327 -0
  91. package/.agent/sessions/cli_default.json +678 -23580
  92. package/.agent/sessions/weixin_o9cq80zgZqKPA2-s59PN43GdDy1w@im.wechat.json +11097 -0
  93. package/.agent/skills/api-patterns/SKILL.md +81 -0
  94. package/.agent/skills/api-patterns/api-style.md +42 -0
  95. package/.agent/skills/api-patterns/auth.md +24 -0
  96. package/.agent/skills/api-patterns/documentation.md +26 -0
  97. package/.agent/skills/api-patterns/graphql.md +41 -0
  98. package/.agent/skills/api-patterns/rate-limiting.md +31 -0
  99. package/.agent/skills/api-patterns/response.md +37 -0
  100. package/.agent/skills/api-patterns/rest.md +40 -0
  101. package/.agent/skills/api-patterns/scripts/api_validator.py +211 -0
  102. package/.agent/skills/api-patterns/security-testing.md +122 -0
  103. package/.agent/skills/api-patterns/trpc.md +41 -0
  104. package/.agent/skills/api-patterns/versioning.md +22 -0
  105. package/.agent/skills/app-builder/SKILL.md +75 -0
  106. package/.agent/skills/app-builder/agent-coordination.md +71 -0
  107. package/.agent/skills/app-builder/feature-building.md +53 -0
  108. package/.agent/skills/app-builder/project-detection.md +34 -0
  109. package/.agent/skills/app-builder/scaffolding.md +118 -0
  110. package/.agent/skills/app-builder/tech-stack.md +40 -0
  111. package/.agent/skills/app-builder/templates/SKILL.md +39 -0
  112. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
  113. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
  114. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  115. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
  116. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
  117. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
  118. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
  119. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +122 -0
  120. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +122 -0
  121. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +169 -0
  122. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +134 -0
  123. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
  124. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +119 -0
  125. package/.agent/skills/architecture/SKILL.md +55 -0
  126. package/.agent/skills/architecture/context-discovery.md +43 -0
  127. package/.agent/skills/architecture/examples.md +94 -0
  128. package/.agent/skills/architecture/pattern-selection.md +68 -0
  129. package/.agent/skills/architecture/patterns-reference.md +50 -0
  130. package/.agent/skills/architecture/trade-off-analysis.md +77 -0
  131. package/.agent/skills/clean-code/SKILL.md +201 -0
  132. package/.agent/skills/doc.md +177 -0
  133. package/.agent/skills/frontend-design/SKILL.md +418 -0
  134. package/.agent/skills/frontend-design/animation-guide.md +331 -0
  135. package/.agent/skills/frontend-design/color-system.md +311 -0
  136. package/.agent/skills/frontend-design/decision-trees.md +418 -0
  137. package/.agent/skills/frontend-design/motion-graphics.md +306 -0
  138. package/.agent/skills/frontend-design/scripts/accessibility_checker.py +183 -0
  139. package/.agent/skills/frontend-design/scripts/ux_audit.py +722 -0
  140. package/.agent/skills/frontend-design/typography-system.md +345 -0
  141. package/.agent/skills/frontend-design/ux-psychology.md +1116 -0
  142. package/.agent/skills/frontend-design/visual-effects.md +383 -0
  143. package/.agent/skills/i18n-localization/SKILL.md +154 -0
  144. package/.agent/skills/i18n-localization/scripts/i18n_checker.py +241 -0
  145. package/.agent/skills/mcp-builder/SKILL.md +176 -0
  146. package/.agent/skills/web-design-guidelines/SKILL.md +57 -0
  147. package/.agent/workflows/brainstorm.md +113 -0
  148. package/.agent/workflows/create.md +59 -0
  149. package/.agent/workflows/debug.md +103 -0
  150. package/.agent/workflows/deploy.md +176 -0
  151. package/.agent/workflows/enhance.md +63 -0
  152. package/.agent/workflows/orchestrate.md +237 -0
  153. package/.agent/workflows/plan.md +89 -0
  154. package/.agent/workflows/preview.md +81 -0
  155. package/.agent/workflows/simple-test.md +42 -0
  156. package/.agent/workflows/status.md +86 -0
  157. package/.agent/workflows/structured-orchestrate.md +180 -0
  158. package/.agent/workflows/test.md +144 -0
  159. package/.agent/workflows/ui-ux-pro-max.md +296 -0
  160. package/.claude/settings.local.json +21 -1
  161. package/.env.example +56 -56
  162. package/README.md +441 -441
  163. package/cli/src/commands/chat.js +2 -1
  164. package/output/international-news-daily.png +0 -0
  165. package/package.json +2 -1
  166. package/plugins/extension-executor-plugin.js +91 -12
  167. package/plugins/file-system-plugin.js +4 -19
  168. package/plugins/subagent-plugin.js +37 -14
  169. package/plugins/weixin-plugin.js +168 -40
  170. package/poster-test-2.png +0 -0
  171. package/skills/find-skills/AGENTS.md +162 -162
  172. package/skills/find-skills/SKILL.md +133 -133
  173. package/skills/poster-guide/SKILL.md +1435 -627
  174. package/src/core/agent-chat.js +223 -11
  175. package/src/core/agent.js +6 -3
  176. package/.agent/agents/code-assistant.json +0 -14
  177. package/.agent/agents/email-assistant.json +0 -14
  178. package/.agent/agents/file-assistant.json +0 -15
  179. package/.agent/agents/system-assistant.json +0 -15
  180. package/.agent/agents/web-assistant.json +0 -12
  181. package/.agent/data/ambient/goals.json +0 -50
  182. package/.agent/data/ambient/memories.json +0 -7
  183. package/.agent/data/scheduler/tasks.json +0 -1
  184. package/.agent/memory/core.md +0 -1
  185. package/.agent/memory/project/mnn93ogy-ypjn27.md +0 -9
  186. package/.agent/memory/project/mnn98fqy-5nhc1u.md +0 -25
  187. package/.agent/memory/user/mnm67t9m-x8rekk.md +0 -9
  188. package/.agent/memory/user/mnn5mmqh-w6aktx.md +0 -11
  189. package/.agent/memory/user/mnnbfhhn-dk1bd1.md +0 -22
  190. package/.agent/package.json +0 -8
  191. package/.agent/plugins/__pycache__/file_writer.cpython-312.pyc +0 -0
  192. package/.agent/plugins/daytona/README.md +0 -89
  193. package/.agent/plugins/daytona/index.js +0 -377
  194. package/.agent/plugins/daytona/package.json +0 -12
  195. package/.agent/plugins/marknative/README.md +0 -134
  196. package/.agent/plugins/marknative/index.js +0 -228
  197. package/.agent/plugins/marknative/package.json +0 -12
  198. package/.agent/plugins/marknative/update-readme.js +0 -134
  199. package/.agent/plugins/system-info/index.js +0 -387
  200. package/.agent/plugins/system-info/package.json +0 -4
  201. package/.agent/plugins/system-info/test.js +0 -40
  202. package/.agent/python-scripts/test_sample.py +0 -24
  203. package/.agent/skills/agent-browser/SKILL.md +0 -311
  204. package/.agent/skills/agent-browser/TEST_PLAN.md +0 -200
  205. package/.agent/skills/sysinfo/SKILL.md +0 -38
  206. package/.agent/skills/sysinfo/system-info.sh +0 -130
  207. package/.agent/skills/workflow/SKILL.md +0 -324
  208. package/.agent/weixin.json +0 -6
  209. package/.agent/workflows/email-digest.json +0 -50
  210. package/.agent/workflows/file-backup.json +0 -21
  211. package/.agent/workflows/get-ip-notify.json +0 -32
  212. package/.agent/workflows/news-aggregator.json +0 -93
  213. package/.agent/workflows/news-dashboard-v2.json +0 -94
  214. package/.agent/workflows/notification-batch.json +0 -32
@@ -1,743 +1,1551 @@
1
1
  ---
2
2
  name: poster-guide
3
- description: 海报设计技能 - 收集优秀设计风格、配色方案和创意灵感,当用户询问"海报制作"、"卡片制作"、"配图制作"时立即调用。
4
- allowed-tools: create_poster_canvas, add_poster_background, add_poster_rectangle, add_poster_circle, add_poster_line, add_poster_polygon, add_poster_text, add_poster_art_text, add_poster_image, add_poster_svg, add_poster_image_frame, add_poster_columns, add_poster_grid, add_poster_card, add_poster_badge, add_poster_cta, add_poster_feature, add_poster_feature_grid, add_poster_divider, add_poster_avatar, add_poster_progress, add_poster_rating, add_poster_quote, add_poster_stat_card, add_poster_tag_cloud, add_poster_stepper, add_poster_timeline, add_poster_list_item, add_poster_notification, add_poster_star, add_poster_arrow, add_poster_progress_circle, add_poster_chip, add_poster_chart, add_poster_watermark, add_poster_table, compose_poster, generate_poster, export_poster_canvas, export_poster_svg, list_poster_components, list_poster_templates
3
+ description: 海报设计技能 - 使用 poster 扩展生成海报和图片。使用 ext_call 调用 poster 插件。
4
+ allowed-tools: ext_call
5
5
  ---
6
6
 
7
7
  # 海报设计技能指南
8
8
 
9
- > 本技能收集了来自日本优秀设计网站(muuuuu.org、ics.media 等)和国际设计平台(Behance、Dribbble,Pinterest 等)的流行趋势和配色方案。
9
+ ## 📡 调用方式
10
+
11
+ poster 扩展使用 `ext_call` 工具调用:
12
+
13
+ ```javascript
14
+ ext_call({
15
+ plugin: 'poster',
16
+ tool: '<工具名>',
17
+ args: {
18
+ /* 参数 */
19
+ },
20
+ });
21
+ ```
22
+
23
+ ---
24
+
25
+ ## 🎨 配色方案
26
+
27
+ ### 1. 流行配色来源
28
+
29
+ - [Color Hunt 流行配色](https://colorhunt.co/palettes/popular)
30
+ - [Coolors Trending](https://coolors.co/palettes/trending)
31
+ - [Tailwind CSS 官方配色](https://tailwindcss.com/docs/colors)
32
+
33
+ ### Color Hunt 流行配色(2026年热门)
34
+
35
+ #### 优雅大地色系
36
+
37
+ ```
38
+ #4B2E2B #8C5A3C #C08552 #FFF8F0
39
+ ```
40
+
41
+ #### 梦幻紫罗兰
42
+
43
+ ```
44
+ #9B8EC7 #BDA6CE #B4D3D9 #F2EAE0
45
+ ```
46
+
47
+ #### 森林绿系
48
+
49
+ ```
50
+ #B0E4CC #408A71 #285A48 #091413
51
+ ```
52
+
53
+ #### 热情橙红色
54
+
55
+ ```
56
+ #EED9B9 #D53E0F #9B0F06 #5E0006
57
+ ```
58
+
59
+ #### 活力黄橙
60
+
61
+ ```
62
+ #FCBF49 #F77F00 #D62828 #003049
63
+ ```
64
+
65
+ #### 清新薄荷绿
66
+
67
+ ```
68
+ #EDF7BD #85C79A #4E8D9C #281C59
69
+ ```
70
+
71
+ #### 自然米色系
72
+
73
+ ```
74
+ #BABF94 #F3E4C9 #BFA28C #A98B76
75
+ ```
76
+
77
+ #### 梦幻粉色系
78
+
79
+ ```
80
+ #FFEABB #FBC3C1 #FAACBF #FE81D4
81
+ ```
82
+
83
+ #### 柔和新配色
84
+
85
+ ```
86
+ #FBE8CE #E4DFB5 #C3CC9B #9AB17A
87
+ ```
88
+
89
+ #### 海洋蓝调
90
+
91
+ ```
92
+ #1A3263 #547792 #EFD2B0 #FFC570
93
+ ```
94
+
95
+ #### 活力珊瑚粉
96
+
97
+ ```
98
+ #2C687B #8CC7C4 #FFF6F6 #DB1A1A
99
+ ```
100
+
101
+ #### 清新薄荷粉
102
+
103
+ ```
104
+ #FAFFCB #F9D0CD #F891BB #F13E93
105
+ ```
106
+
107
+ #### 自然绿茵
108
+
109
+ ```
110
+ #F2EDC2 #9FCB98 #6B8E48 #4A7A32
111
+ ```
10
112
 
11
113
  ---
12
114
 
13
- ## 📐 设计尺寸规范
115
+ ### 3. 深色科技风(Dark Tech)
116
+
117
+ 适合:科技产品、AI、开发者工具
118
+
119
+ ```
120
+ 背景: #0f172a 深蓝黑
121
+ 主色: #3b82f6 蓝色
122
+ 强调: #10b981 绿色
123
+ 点缀: #ec4899 粉色
124
+ 文字: #e2e8f0 浅灰
125
+ 边框: #334155 深灰
126
+ ```
127
+
128
+ ### 4. 霓虹渐变(Neon Gradient)
129
+
130
+ 适合:现代应用、创意产品
131
+
132
+ ```
133
+ 背景: #0D0D1A 深黑
134
+ 主色: #00D9FF 青色
135
+ 强调: #00FF88 绿色
136
+ 点缀: #fbbf24 金色
137
+ 文字: #A0AEC0 灰色
138
+ ```
139
+
140
+ ### 3. 莫兰迪色系(Morandi)
141
+
142
+ 适合:高端设计、生活方式
14
143
 
15
- ### 社交媒体
144
+ ```
145
+ 背景: #f5f5f4 米白
146
+ 主色: #a8a29e 灰棕
147
+ 强调: #78716c 深灰
148
+ 点缀: #d6d3d1 浅灰
149
+ 文字: #44403c 墨色
150
+ ```
151
+
152
+ ### 4. 扁平化蓝(Flat Blue)
153
+
154
+ 适合:企业、软件、SaaS
155
+
156
+ ```
157
+ 背景: #ffffff 白色
158
+ 主色: #007aff iOS蓝
159
+ 强调: #5856d6 紫色
160
+ 点缀: #ff9500 橙色
161
+ 文字: #1c1c1e 深灰
162
+ ```
163
+
164
+ ### 5. 赛博朋克(Cyberpunk)
165
+
166
+ 适合:游戏、科技、潮流
167
+
168
+ ```
169
+ 背景: #0a0a0f 纯黑
170
+ 主色: #ff006e 品红
171
+ 强调: #00f5d4 青色
172
+ 点缀: #fee440 黄色
173
+ 文字: #f0f0f0 浅白
174
+ ```
175
+
176
+ ### 6. 暖色调(Warm Pastel)
177
+
178
+ 适合:食品、咖啡、温馨场景
179
+
180
+ ```
181
+ 背景: #fef3e2 奶油白
182
+ 主色: #e07a5f 珊瑚红
183
+ 强调: #f4a261 杏色
184
+ 点缀: #81b29a 薄荷绿
185
+ 文字: #3d405b 深蓝灰
186
+ ```
187
+
188
+ ### 7. 冷色调(Cool Nordic)
189
+
190
+ 适合:金融、医疗、企业
191
+
192
+ ```
193
+ 背景: #f8fafc 冷白
194
+ 主色: #0f766e 深青
195
+ 强调: #0891b2 天蓝
196
+ 点缀: #6366f1 靛蓝
197
+ 文字: #0f172a 近黑
198
+ ```
199
+
200
+ ### 8. 日式和风(Japanese)
201
+
202
+ 适合:文化、艺术、极简
203
+
204
+ ```
205
+ 背景: #f5f0e8 米白
206
+ 主色: #1e4d7b 藏蓝
207
+ 强调: #c41e3a 朱红
208
+ 点缀: #d4a574 古铜金
209
+ 文字: #333333 墨色
210
+ ```
211
+
212
+ ### 9. 极简主义(Minimal)
213
+
214
+ 适合:奢侈品牌、高端产品
215
+
216
+ ```
217
+ 背景: #ffffff 纯白
218
+ 主色: #000000 纯黑
219
+ 强调: #6b7280 中灰
220
+ 点缀: #d1d5db 浅灰
221
+ 文字: #111827 近黑
222
+ ```
223
+
224
+ ### 10. 活力渐变(Vibrant Gradient)
225
+
226
+ 适合:社交媒体、移动应用
227
+
228
+ ```
229
+ 背景: #667eea 蓝紫
230
+ 主色: #764ba2 紫色
231
+ 强调: #f093fb 粉红
232
+ 点缀: #f5576c 玫红
233
+ 文字: #ffffff 白色
234
+ ```
16
235
 
17
- | 尺寸 | 用途 |
18
- | --------- | ----------------------- |
19
- | 1080×1080 | Instagram 正方形 |
20
- | 1080×1920 | Instagram Story / Reels |
21
- | 1200×630 | Facebook 封面 |
22
- | 1500×500 | Twitter 封面 |
23
- | 1200×627 | LinkedIn 封面 |
24
- | 2560×1440 | YouTube 封面 |
236
+ ### 11. 森林自然(Forest Nature)
25
237
 
26
- ### 营销物料
238
+ 适合:环保、自然、健康
27
239
 
28
- | 尺寸 | 用途 |
29
- | --------- | ---------------- |
30
- | 1920×1080 | 16:9 宣传海报 |
31
- | 1080×1920 | 9:16 竖版海报 |
32
- | 2480×3508 | A4 海报 (300dpi) |
33
- | 2000×2000 | 方形海报 |
240
+ ```
241
+ 背景: #f0fdf4 浅绿
242
+ 主色: #22c55e 翠绿
243
+ 强调: #16a34a 深绿
244
+ 点缀: #84cc16 草绿
245
+ 文字: #14532d 墨绿
246
+ ```
247
+
248
+ ### 12. 复古色调(Retro Vintage)
34
249
 
35
- ### Banner 广告
250
+ 适合:复古品牌、文艺风格
36
251
 
37
- | 尺寸 | 用途 |
38
- | -------- | --------------- |
39
- | 1920×500 | 网站全屏 Banner |
40
- | 1200×400 | 电商 Banner |
41
- | 750×300 | 移动端 Banner |
42
- | 728×90 | PC 端横幅 |
252
+ ```
253
+ 背景: #fdf6e3 暖白
254
+ 主色: #cb4b16 橙红
255
+ 强调: #b58900 琥珀
256
+ 点缀: #268bd2 钴蓝
257
+ 文字: #657b83 青灰
258
+ ```
43
259
 
44
260
  ---
45
261
 
46
- ## 🧩 组件速查表(共 35 个组件)
47
-
48
- ### 基础元素 (10)
49
-
50
- | 组件 | 工具名 | 用途 |
51
- | ------ | ------------------------ | ---------------- |
52
- | 背景 | `add_poster_background` | 纯色/渐变背景 |
53
- | 矩形 | `add_poster_rectangle` | 矩形、圆角矩形 |
54
- | 圆形 | `add_poster_circle` | 圆形、椭圆 |
55
- | 线条 | `add_poster_line` | 直线、虚线 |
56
- | 多边形 | `add_poster_polygon` | 三角形、六边形等 |
57
- | 文字 | `add_poster_text` | 普通文字 |
58
- | 艺术字 | `add_poster_art_text` | 渐变文字、描边 |
59
- | 图片 | `add_poster_image` | 插入图片 |
60
- | SVG | `add_poster_svg` | SVG 矢量图 |
61
- | 图片框 | `add_poster_image_frame` | 带装饰边框的图片 |
62
-
63
- ### 布局组件 (2)
64
-
65
- | 组件 | 工具名 | 用途 |
66
- | ---- | -------------------- | ------------------ |
67
- | 分栏 | `add_poster_columns` | 左右分栏、多栏布局 |
68
- | 网格 | `add_poster_grid` | 任意行列网格 |
69
-
70
- ### 装饰组件 (7) ⭐ 新增
71
-
72
- | 组件 | 工具名 | 用途 |
73
- | -------- | ---------------------------- | ---------------- |
74
- | 星形 | `add_poster_star` | 五角星、六角星等 |
75
- | 箭头 | `add_poster_arrow` | 指示箭头 |
76
- | 环形进度 | `add_poster_progress_circle` | 圆环进度条 |
77
- | 标签 | `add_poster_chip` | 小型信息标签 |
78
- | 图表 | `add_poster_chart` | 柱状图、饼图 |
79
- | 水印 | `add_poster_watermark` | 倾斜水印 |
80
- | 表格 | `add_poster_table` | 数据表格 |
81
-
82
- ### 高级组件 (16)
83
-
84
- | 组件 | 工具名 | 用途 |
85
- | -------- | ------------------------- | ------------ |
86
- | 卡片 | `add_poster_card` | 产品卡片 |
87
- | 徽章 | `add_poster_badge` | 标签徽章 |
88
- | 按钮 | `add_poster_cta` | 行动号召按钮 |
89
- | 特性 | `add_poster_feature` | 功能特性展示 |
90
- | 特性网格 | `add_poster_feature_grid` | 特性网格布局 |
91
- | 分隔线 | `add_poster_divider` | 水平分隔线 |
92
- | 头像 | `add_poster_avatar` | 用户头像 |
93
- | 进度条 | `add_poster_progress` | 线性进度条 |
94
- | 评分 | `add_poster_rating` | 星级评分 |
95
- | 引用 | `add_poster_quote` | 引用块 |
96
- | 统计卡 | `add_poster_stat_card` | 数据统计卡片 |
97
- | 标签云 | `add_poster_tag_cloud` | 标签集合 |
98
- | 步骤条 | `add_poster_stepper` | 步骤指示器 |
99
- | 时间线 | `add_poster_timeline` | 时间轴 |
100
- | 列表项 | `add_poster_list_item` | 列表条目 |
101
- | 通知 | `add_poster_notification` | 提示消息 |
262
+ ## 🎯 快速生成(模板方式)
263
+
264
+ ### 一键生成海报
265
+
266
+ ```javascript
267
+ // 现代风格
268
+ ext_call({ plugin: 'poster', tool: 'generate_poster', args: { template: 'modern' } });
269
+
270
+ // 商务风格
271
+ ext_call({ plugin: 'poster', tool: 'generate_poster', args: { template: 'business' } });
272
+
273
+ // 科技风格
274
+ ext_call({ plugin: 'poster', tool: 'generate_poster', args: { template: 'tech' } });
275
+
276
+ // 渐变风格
277
+ ext_call({ plugin: 'poster', tool: 'generate_poster', args: { template: 'gradient' } });
278
+
279
+ // 社交媒体
280
+ ext_call({ plugin: 'poster', tool: 'generate_poster', args: { template: 'social' } });
281
+
282
+ // 简约风格
283
+ ext_call({ plugin: 'poster', tool: 'generate_poster', args: { template: 'simple' } });
284
+ ```
102
285
 
103
286
  ---
104
287
 
105
- ## 🆕 新增组件详解
288
+ ## 🎯 组件化生成(推荐)
106
289
 
107
- ### 星形 (star) ⭐
290
+ ### 步骤 1:创建画布
108
291
 
109
292
  ```javascript
110
- add_poster_star({
111
- cx: 200, // 中心X坐标
112
- cy: 200, // 中心Y坐标
113
- points: 5, // 星形点数,默认5
114
- outerRadius: 60, // 外半径
115
- innerRadius: 25, // 内半径(可选,默认外半径*0.4)
116
- fill: '#fbbf24', // 填充颜色
117
- stroke: '#000000', // 边框颜色
118
- strokeWidth: 2, // 边框宽度
119
- opacity: 1, // 透明度
120
- rotation: 0, // 旋转角度
293
+ // 使用预设尺寸
294
+ ext_call({
295
+ plugin: 'poster',
296
+ tool: 'create_poster_canvas',
297
+ args: { preset: 'poster_16_9', background: '#0f172a' },
298
+ });
299
+
300
+ // 或自定义尺寸
301
+ ext_call({
302
+ plugin: 'poster',
303
+ tool: 'create_poster_canvas',
304
+ args: { width: 1920, height: 1080, background: '#0f172a' },
121
305
  });
122
306
  ```
123
307
 
124
- ### 箭头 (arrow) ⭐
308
+ **预设尺寸:**
309
+
310
+ | key | 尺寸 | 用途 |
311
+ | ------------------ | --------- | --------------- |
312
+ | `poster_16_9` | 1920×1080 | 16:9海报 |
313
+ | `poster_square` | 2000×2000 | 方形海报 |
314
+ | `poster_9_16` | 1080×1920 | 竖版海报 |
315
+ | `poster_a4` | 2480×3508 | A4海报 |
316
+ | `social_instagram` | 1080×1080 | Instagram |
317
+ | `social_story` | 1080×1920 | Instagram Story |
318
+ | `banner_1920x500` | 1920×500 | 网站Banner |
319
+
320
+ ### 步骤 2:添加元素
321
+
322
+ #### 艺术字标题
125
323
 
126
324
  ```javascript
127
- add_poster_arrow({
128
- x1: 100, // 起点X
129
- y1: 200, // 起点Y
130
- x2: 300, // 终点X
131
- y2: 200, // 终点Y
132
- color: '#3b82f6', // 箭头颜色
133
- strokeWidth: 3, // 线宽
134
- headSize: 15, // 箭头头部大小
135
- style: 'solid', // solid(实线) / dashed(虚线)
136
- direction: 'end', // end(尾部) / start(头部) / both(双向)
325
+ ext_call({
326
+ plugin: 'poster',
327
+ tool: 'add_poster_art_text',
328
+ args: {
329
+ text: 'FOLIKO',
330
+ x: 960,
331
+ y: 300,
332
+ fontSize: 120,
333
+ gradient: { colors: ['#00D9FF', '#00FF88'] },
334
+ shadow: { color: '#00D9FF', blur: 40 },
335
+ },
137
336
  });
138
337
  ```
139
338
 
140
- ### 环形进度条 (progressCircle) ⭐
339
+ #### 普通文字
141
340
 
142
341
  ```javascript
143
- add_poster_progress_circle({
144
- cx: 200, // 圆心X坐标
145
- cy: 200, // 圆心Y坐标
146
- radius: 60, // 圆环半径
147
- value: 75, // 进度值 0-100
148
- strokeWidth: 12, // 环宽度
149
- trackColor: '#e5e7eb', // 轨道颜色
150
- fillColor: '#3b82f6', // 进度颜色
151
- backgroundColor: '#ffffff', // 背景填充色
152
- showLabel: true, // 显示百分比标签
153
- labelColor: '#3b82f6', // 标签颜色
342
+ ext_call({
343
+ plugin: 'poster',
344
+ tool: 'add_poster_text',
345
+ args: {
346
+ text: '简约的插件化 Agent 框架',
347
+ x: 960,
348
+ y: 420,
349
+ fontSize: 36,
350
+ color: '#A0AEC0',
351
+ align: 'center',
352
+ },
154
353
  });
155
354
  ```
156
355
 
157
- ### 标签 (chip) ⭐
356
+ #### 圆形装饰
158
357
 
159
358
  ```javascript
160
- add_poster_chip({
161
- x: 200, // X坐标(居中)
162
- y: 150, // Y坐标
163
- text: 'NEW', // 标签文字
164
- background: '#ef4444', // 背景色
165
- color: '#ffffff', // 文字颜色
166
- borderColor: '#dc2626', // 边框颜色
167
- fontSize: 14, // 字体大小
168
- padding: 12, // 内边距
169
- radius: 16, // 圆角
170
- icon: '⭐', // 前置图标(可选)
359
+ ext_call({
360
+ plugin: 'poster',
361
+ tool: 'add_poster_circle',
362
+ args: { cx: 1600, cy: -100, rx: 500, fill: '#00D9FF', opacity: 0.1 },
171
363
  });
172
364
  ```
173
365
 
174
- ### 图表 (chart) ⭐
366
+ #### 星形装饰
175
367
 
176
368
  ```javascript
177
- // 柱状图
178
- add_poster_chart({
179
- type: 'bar', // 类型:bar / pie
180
- x: 100,
181
- y: 300,
182
- width: 500,
183
- height: 250,
184
- data: [
185
- { label: '一月', value: 120, color: '#3b82f6' },
186
- { label: '二月', value: 90, color: '#10b981' },
187
- { label: '三月', value: 150, color: '#f59e0b' },
188
- { label: '四月', value: 110, color: '#ef4444' },
189
- ],
190
- showLabels: true, // 显示标签
191
- showValues: true, // 显示数值
192
- });
193
-
194
- // 饼图
195
- add_poster_chart({
196
- type: 'pie',
197
- x: 650,
198
- y: 300,
199
- width: 250,
200
- height: 250,
201
- data: [
202
- { label: '桌面端', value: 45, color: '#3b82f6' },
203
- { label: '移动端', value: 35, color: '#10b981' },
204
- { label: '平板', value: 20, color: '#f59e0b' },
205
- ],
206
- showLabels: true,
207
- });
208
- ```
209
-
210
- ### 水印 (watermark) ⭐
369
+ ext_call({
370
+ plugin: 'poster',
371
+ tool: 'add_poster_star',
372
+ args: { cx: 200, cy: 200, points: 5, outerRadius: 50, fill: '#fbbf24', opacity: 0.8 },
373
+ });
374
+ ```
375
+
376
+ #### 分隔线
211
377
 
212
378
  ```javascript
213
- add_poster_watermark({
214
- text: 'VB-Agent', // 水印文字
215
- cx: 960, // 中心X坐标
216
- cy: 540, // 中心Y坐标
217
- color: 'rgba(200,200,200,0.3)', // 水印颜色
218
- fontSize: 120, // 字体大小
219
- fontFamily: 'sans-serif',
220
- opacity: 0.3, // 透明度
221
- rotation: -30, // 旋转角度
222
- align: 'center', // 对齐方式
379
+ ext_call({
380
+ plugin: 'poster',
381
+ tool: 'add_poster_divider',
382
+ args: { x: 960, y: 480, width: 200, color: '#00D9FF' },
223
383
  });
224
384
  ```
225
385
 
226
- ### 表格 (table) ⭐
386
+ #### 特性网格
227
387
 
228
388
  ```javascript
229
- add_poster_table({
230
- x: 100,
231
- y: 400,
232
- width: 800,
233
- columns: [
234
- { title: '功能', width: 250, align: 'left' },
235
- { title: '状态', width: 200 },
236
- { title: '价格', width: 150 },
237
- ],
238
- rows: [
239
- ['智能对话', '可用', '免费'],
240
- ['图片生成', '可用', '$29'],
241
- ['代码助手', 'Beta', '免费'],
242
- ],
243
- rowHeight: 45,
244
- headerBg: '#1e293b', // 表头背景
245
- headerColor: '#ffffff', // 表头文字色
246
- borderColor: '#e0e0e0',
247
- fontSize: 14,
248
- striped: true, // 斑马纹
249
- });
250
- ```
251
-
252
- ### 分栏布局 (columns) ⭐
389
+ ext_call({
390
+ plugin: 'poster',
391
+ tool: 'add_poster_feature_grid',
392
+ args: {
393
+ x: 90,
394
+ y: 280,
395
+ columns: 3,
396
+ itemWidth: 560,
397
+ itemHeight: 120,
398
+ items: [
399
+ { icon: '', title: '插件化架构', description: '核心简单', color: '#3b82f6' },
400
+ { icon: '🤖', title: '多 AI 支持', description: '多种大模型', color: '#10b981' },
401
+ { icon: '📡', title: '流式输出', description: '实时响应', color: '#ec4899' },
402
+ ],
403
+ background: '#1e293b',
404
+ borderColor: '#3b82f6',
405
+ },
406
+ });
407
+ ```
408
+
409
+ #### 统计卡片
253
410
 
254
411
  ```javascript
255
- add_poster_columns({
256
- x: 100,
257
- y: 100,
258
- width: 1720,
259
- height: 400,
260
- columns: 3, // 列数,默认2
261
- gap: 30, // 列间距
262
- background: '#fafafa',
263
- borderColor: '#e0e0e0',
264
- radius: 8,
265
- align: 'top', // top / center / bottom
412
+ ext_call({
413
+ plugin: 'poster',
414
+ tool: 'add_poster_stat_card',
415
+ args: {
416
+ x: 90,
417
+ y: 580,
418
+ title: '27+',
419
+ subtitle: '内置插件',
420
+ icon: '📦',
421
+ color: '#3b82f6',
422
+ background: '#1e293b',
423
+ borderColor: '#3b82f6',
424
+ },
266
425
  });
267
426
  ```
268
427
 
269
- ### 网格布局 (grid) ⭐
428
+ #### 进度条
270
429
 
271
430
  ```javascript
272
- add_poster_grid({
273
- x: 100,
274
- y: 550,
275
- width: 1720,
276
- height: 400,
277
- columns: 4, // 列数,默认3
278
- rows: 2, // 行数,默认2
279
- gapX: 20, // 水平间距
280
- gapY: 20, // 垂直间距
281
- background: '#fafafa',
282
- borderColor: '#d0d0d0',
283
- radius: 0,
284
- direction: 'row', // row(行优先) / column(列优先)
431
+ ext_call({
432
+ plugin: 'poster',
433
+ tool: 'add_poster_progress',
434
+ args: {
435
+ x: 1450,
436
+ y: 640,
437
+ width: 380,
438
+ value: 95,
439
+ label: '响应速度 95%',
440
+ color: '#3b82f6',
441
+ background: '#334155',
442
+ },
285
443
  });
286
444
  ```
287
445
 
288
- ### 图片框 (imageFrame) ⭐
446
+ #### 环形进度
289
447
 
290
448
  ```javascript
291
- add_poster_image_frame({
292
- src: 'image.png', // 图片路径或URL
293
- x: 100,
294
- y: 100,
295
- width: 400,
296
- height: 300,
297
- borderColor: '#ffffff', // 边框颜色
298
- borderWidth: 3, // 边框宽度
299
- outerColor: '#1a1a2e', // 外边框颜色
300
- outerWidth: 6, // 外边框宽度
301
- radius: 8, // 圆角
302
- fit: 'cover', // cover / contain / fill
449
+ ext_call({
450
+ plugin: 'poster',
451
+ tool: 'add_poster_progress_circle',
452
+ args: {
453
+ cx: 540,
454
+ cy: 400,
455
+ radius: 80,
456
+ value: 85,
457
+ strokeWidth: 15,
458
+ fillColor: '#3b82f6',
459
+ trackColor: '#334155',
460
+ showLabel: true,
461
+ },
303
462
  });
304
463
  ```
305
464
 
306
- ---
465
+ #### 标签
466
+
467
+ ```javascript
468
+ ext_call({
469
+ plugin: 'poster',
470
+ tool: 'add_poster_chip',
471
+ args: {
472
+ x: 550,
473
+ y: 720,
474
+ text: 'v1.1.0',
475
+ background: '#3b82f6',
476
+ color: '#ffffff',
477
+ fontSize: 16,
478
+ },
479
+ });
480
+ ```
307
481
 
308
- ## 🎨 日本设计配色方案(来源:MUUUUU)
482
+ #### CTA 按钮
309
483
 
310
- ### 1. 和風・禅意 (Japanese Zen)
484
+ ```javascript
485
+ ext_call({
486
+ plugin: 'poster',
487
+ tool: 'add_poster_cta',
488
+ args: {
489
+ x: 960,
490
+ y: 850,
491
+ text: '立即体验 →',
492
+ background: '#00D9FF',
493
+ color: '#0D0D1A',
494
+ fontSize: 24,
495
+ radius: 30,
496
+ },
497
+ });
498
+ ```
311
499
 
500
+ #### 评分
501
+
502
+ ```javascript
503
+ ext_call({
504
+ plugin: 'poster',
505
+ tool: 'add_poster_rating',
506
+ args: {
507
+ x: 960,
508
+ y: 950,
509
+ value: 4.5,
510
+ count: 5,
511
+ color: '#fbbf24',
512
+ size: 24,
513
+ label: 'GitHub 4.2k Stars',
514
+ },
515
+ });
312
516
  ```
313
- 主色: #1E4D7B (藏蓝 / 藍色)
314
- 强调: #C41E3A (朱红 / 紅色)
315
- 背景: #F5F0E8 (米白 / 白茶)
316
- 文字: #333333 (墨色)
317
- 点缀: #D4A574 (古铜金)
517
+
518
+ #### 引用块
519
+
520
+ ```javascript
521
+ ext_call({
522
+ plugin: 'poster',
523
+ tool: 'add_poster_quote',
524
+ args: {
525
+ x: 100,
526
+ y: 780,
527
+ quote: '让 AI 助手开发更简单',
528
+ color: '#c4b5fd',
529
+ background: '#1e293b',
530
+ },
531
+ });
318
532
  ```
319
533
 
320
- ### 2. モダン和風 (Modern Japanese)
534
+ #### 水印
321
535
 
536
+ ```javascript
537
+ ext_call({
538
+ plugin: 'poster',
539
+ tool: 'add_poster_watermark',
540
+ args: {
541
+ text: 'FOLIKO',
542
+ cx: 960,
543
+ cy: 600,
544
+ fontSize: 250,
545
+ color: 'rgba(255,255,255,0.02)',
546
+ rotation: -15,
547
+ },
548
+ });
322
549
  ```
323
- 主色: #2C3E50 (墨灰)
324
- 强调: #C0392B (深红)
325
- 背景: #ECE5D8 (浅麻)
326
- 文字: #2C2C2C (浓墨)
327
- 点缀: #D4AF37 (金色)
550
+
551
+ ### 步骤 3:导出
552
+
553
+ ```javascript
554
+ ext_call({
555
+ plugin: 'poster',
556
+ tool: 'export_poster_canvas',
557
+ args: {
558
+ filename: 'my-poster',
559
+ format: 'png',
560
+ outputDir: 'output',
561
+ },
562
+ });
328
563
  ```
329
564
 
330
565
  ---
331
566
 
332
- ## 🌸 日本特色设计风格(来源:MUUUUU 分类)
567
+ ## 📋 组件速查表
568
+
569
+ ### 画布管理
570
+
571
+ | 工具 | 说明 |
572
+ | ------------------------ | ------------ |
573
+ | `create_poster_canvas` | 创建画布 |
574
+ | `get_poster_canvas_info` | 获取画布信息 |
575
+ | `clear_poster_canvas` | 清除画布 |
576
+
577
+ ### 导出
578
+
579
+ | 工具 | 说明 |
580
+ | ---------------------- | ----------- |
581
+ | `export_poster_canvas` | 导出 PNG |
582
+ | `export_poster_svg` | 导出 SVG |
583
+ | `export_poster_base64` | 导出 Base64 |
584
+
585
+ ### 基础元素
586
+
587
+ | 工具 | 说明 |
588
+ | ------------------------ | ------ |
589
+ | `add_poster_background` | 背景 |
590
+ | `add_poster_rectangle` | 矩形 |
591
+ | `add_poster_circle` | 圆形 |
592
+ | `add_poster_line` | 线条 |
593
+ | `add_poster_polygon` | 多边形 |
594
+ | `add_poster_text` | 文字 |
595
+ | `add_poster_art_text` | 艺术字 |
596
+ | `add_poster_image` | 图片 |
597
+ | `add_poster_svg` | SVG |
598
+ | `add_poster_image_frame` | 图片框 |
599
+
600
+ ### 布局组件
601
+
602
+ | 工具 | 说明 |
603
+ | -------------------- | ---- |
604
+ | `add_poster_columns` | 分栏 |
605
+ | `add_poster_grid` | 网格 |
606
+
607
+ ### 装饰组件
608
+
609
+ | 工具 | 说明 |
610
+ | ---------------------------- | -------- |
611
+ | `add_poster_star` | 星形 |
612
+ | `add_poster_arrow` | 箭头 |
613
+ | `add_poster_progress_circle` | 环形进度 |
614
+ | `add_poster_chip` | 标签 |
615
+ | `add_poster_chart` | 图表 |
616
+ | `add_poster_watermark` | 水印 |
617
+ | `add_poster_table` | 表格 |
618
+
619
+ ### 高级组件
620
+
621
+ | 工具 | 说明 |
622
+ | ------------------------- | -------- |
623
+ | `add_poster_card` | 卡片 |
624
+ | `add_poster_badge` | 徽章 |
625
+ | `add_poster_cta` | CTA按钮 |
626
+ | `add_poster_feature` | 特性 |
627
+ | `add_poster_feature_grid` | 特性网格 |
628
+ | `add_poster_divider` | 分隔线 |
629
+ | `add_poster_avatar` | 头像 |
630
+ | `add_poster_progress` | 进度条 |
631
+ | `add_poster_rating` | 评分 |
632
+ | `add_poster_quote` | 引用 |
633
+ | `add_poster_stat_card` | 统计卡 |
634
+ | `add_poster_tag_cloud` | 标签云 |
635
+ | `add_poster_stepper` | 步骤条 |
636
+ | `add_poster_timeline` | 时间线 |
637
+ | `add_poster_list_item` | 列表项 |
638
+ | `add_poster_notification` | 通知 |
639
+
640
+ ### 设计组件(新增)
641
+
642
+ | 工具 | 说明 |
643
+ | --------------------------- | --------- |
644
+ | `add_poster_button` | 按钮 |
645
+ | `add_poster_icon` | 图标 |
646
+ | `add_poster_qrcode` | 二维码 |
647
+ | `add_poster_frame` | 装饰边框 |
648
+ | `add_poster_bubble` | 对话气泡 |
649
+ | `add_poster_ribbon` | 丝带/飘带 |
650
+ | `add_poster_seal` | 印章 |
651
+ | `add_poster_highlight_text` | 高亮文字 |
652
+ | `add_poster_barcode` | 条形码 |
653
+
654
+ ### 模板
655
+
656
+ | 工具 | 说明 |
657
+ | ------------------------ | ------------ |
658
+ | `generate_poster` | 一键生成 |
659
+ | `list_poster_templates` | 列出模板 |
660
+ | `list_poster_components` | 列出组件 |
661
+ | `list_poster_presets` | 列出预设尺寸 |
333
662
 
334
- ### 1. 和風デザイン (Japanese Style)
663
+ ---
664
+
665
+ ## 🆕 新增设计组件详解
666
+
667
+ ### 按钮 (button)
668
+
669
+ 支持图标、渐变、阴影的现代化按钮。
335
670
 
336
671
  ```javascript
337
- compose_poster({
338
- components: [
339
- { type: 'background', color: '#F5F0E8' },
340
- { type: 'rectangle', x: 80, y: 80, width: 920, height: 920, stroke: '#1E4D7B', strokeWidth: 1 },
341
- { type: 'circle', cx: 540, cy: 300, rx: 6, fill: '#C41E3A' },
342
- {
343
- type: 'artText',
344
- text: '花道',
345
- x: 540,
346
- y: 550,
347
- fontSize: 100,
348
- gradient: { colors: ['#1E4D7B', '#333333'] },
349
- },
350
- { type: 'divider', x: 540, y: 750, width: 100, color: '#C41E3A', thickness: 2 },
351
- {
352
- type: 'text',
353
- text: 'Ikebana',
354
- x: 540,
355
- y: 820,
356
- fontSize: 24,
357
- color: '#666666',
358
- align: 'center',
359
- },
360
- ],
361
- });
362
- ```
363
-
364
- ### 2. かわいい系 (Kawaii / Cute)
672
+ ext_call({
673
+ plugin: 'poster',
674
+ tool: 'add_poster_button',
675
+ args: {
676
+ x: 960,
677
+ y: 800,
678
+ width: 280,
679
+ height: 70,
680
+ text: '立即购买',
681
+ fontSize: 28,
682
+ color: '#ffffff',
683
+ backgroundColor: '#3b82f6',
684
+ borderColor: '#2563eb',
685
+ borderWidth: 2,
686
+ radius: 35,
687
+ shadow: { color: '#3b82f6', blur: 20, offsetX: 0, offsetY: 8 },
688
+ gradient: { colors: ['#3b82f6', '#8b5cf6'] },
689
+ icon: '🛒',
690
+ iconPosition: 'left',
691
+ },
692
+ });
693
+ ```
694
+
695
+ ### 图标 (icon)
696
+
697
+ 支持 emoji 和图片的图标组件。
365
698
 
366
699
  ```javascript
367
- compose_poster({
368
- components: [
369
- { type: 'background', color: '#FFF5E6' },
370
- { type: 'circle', cx: 200, cy: 200, rx: 100, fill: '#FFB6C1', opacity: 0.6 },
371
- { type: 'star', cx: 400, cy: 300, points: 5, outerRadius: 60, fill: '#FFB6C1' },
372
- {
373
- type: 'artText',
374
- text: 'HELLO',
375
- x: 540,
376
- y: 450,
377
- fontSize: 120,
378
- gradient: { colors: ['#FF6B9D', '#C44569'] },
379
- },
380
- { type: 'chip', x: 540, y: 550, text: 'NEW', background: '#FF6B9D', color: '#ffffff' },
381
- {
382
- type: 'cta',
383
- x: 540,
384
- y: 700,
385
- text: 'Learn More',
386
- background: '#FF6B9D',
387
- color: '#FFFFFF',
388
- radius: 25,
389
- },
390
- ],
700
+ ext_call({
701
+ plugin: 'poster',
702
+ tool: 'add_poster_icon',
703
+ args: {
704
+ x: 100,
705
+ y: 100,
706
+ size: 80,
707
+ icon: '',
708
+ color: '#fbbf24',
709
+ backgroundColor: '#1e293b',
710
+ borderColor: '#fbbf24',
711
+ borderWidth: 2,
712
+ radius: 16,
713
+ shadow: { color: '#000000', blur: 10, offsetX: 2, offsetY: 4 },
714
+ },
391
715
  });
392
716
  ```
393
717
 
394
- ---
718
+ ### 二维码 (qrcode)
719
+
720
+ 本地生成二维码,支持自定义颜色和 Logo。
721
+
722
+ ```javascript
723
+ ext_call({
724
+ plugin: 'poster',
725
+ tool: 'add_poster_qrcode',
726
+ args: {
727
+ x: 1600,
728
+ y: 700,
729
+ size: 200,
730
+ content: 'https://example.com',
731
+ color: '#0f172a',
732
+ backgroundColor: '#ffffff',
733
+ logo: 'https://example.com/logo.png',
734
+ logoSize: 40,
735
+ },
736
+ });
737
+ ```
738
+
739
+ ### 装饰边框 (frame)
740
+
741
+ 多种边框样式:simple、double、dashed、dotted、corner、vintage、modern、floral。
742
+
743
+ ```javascript
744
+ ext_call({
745
+ plugin: 'poster',
746
+ tool: 'add_poster_frame',
747
+ args: {
748
+ x: 100,
749
+ y: 100,
750
+ width: 500,
751
+ height: 400,
752
+ style: 'vintage', // 边框样式
753
+ color: '#c9a227',
754
+ borderWidth: 3,
755
+ radius: 8,
756
+ padding: 20,
757
+ },
758
+ });
759
+ ```
760
+
761
+ **style 可选值:**
762
+
763
+ - `simple` - 简单矩形
764
+ - `double` - 双线边框
765
+ - `dashed` - 虚线边框
766
+ - `dotted` - 点线边框
767
+ - `corner` - 四角装饰
768
+ - `vintage` - 复古边框(双线+角装饰)
769
+ - `modern` - 现代边框(粗细交替)
770
+ - `floral` - 花纹边框
771
+
772
+ ### 对话气泡 (bubble)
773
+
774
+ 带尾巴的对话气泡组件。
775
+
776
+ ```javascript
777
+ ext_call({
778
+ plugin: 'poster',
779
+ tool: 'add_poster_bubble',
780
+ args: {
781
+ x: 200,
782
+ y: 500,
783
+ width: 400,
784
+ height: 120,
785
+ text: '你好!有什么可以帮助你的吗?',
786
+ fontSize: 24,
787
+ color: '#1e293b',
788
+ backgroundColor: '#ffffff',
789
+ borderColor: '#e2e8f0',
790
+ borderWidth: 1,
791
+ radius: 20,
792
+ tailDirection: 'bottom', // 尾巴方向: bottom, top, left, right
793
+ tailPosition: 'left', // 尾巴位置: left, center, right
794
+ shadow: { color: '#000000', blur: 10, offsetX: 3, offsetY: 3 },
795
+ },
796
+ });
797
+ ```
395
798
 
396
- ## 📊 实用数据可视化示例
799
+ ### 丝带/飘带 (ribbon)
397
800
 
398
- ### 仪表盘卡片
801
+ 三种样式:fold(折叠)、diagonal(对角)、corner(角落)。
399
802
 
400
803
  ```javascript
401
- compose_poster({
402
- components: [
403
- { type: 'background', color: '#0f172a' },
404
- { type: 'text', text: '数据概览', x: 100, y: 80, fontSize: 32, color: '#ffffff' },
405
-
406
- // 环形进度条
407
- {
408
- type: 'progressCircle',
409
- cx: 200,
410
- cy: 250,
411
- radius: 80,
412
- value: 75,
413
- strokeWidth: 15,
414
- fillColor: '#3b82f6',
415
- trackColor: '#334155',
416
- showLabel: true,
417
- },
418
- {
419
- type: 'progressCircle',
420
- cx: 450,
421
- cy: 250,
422
- radius: 80,
423
- value: 60,
424
- strokeWidth: 15,
425
- fillColor: '#10b981',
426
- trackColor: '#334155',
427
- showLabel: true,
428
- },
429
- {
430
- type: 'progressCircle',
431
- cx: 700,
432
- cy: 250,
433
- radius: 80,
434
- value: 45,
435
- strokeWidth: 15,
436
- fillColor: '#f59e0b',
437
- trackColor: '#334155',
438
- showLabel: true,
439
- },
440
-
441
- // 柱状图
442
- {
443
- type: 'chart',
444
- type: 'bar',
445
- x: 100,
446
- y: 400,
447
- width: 600,
448
- height: 300,
449
- data: [
450
- { label: '周一', value: 120, color: '#3b82f6' },
451
- { label: '周二', value: 90, color: '#10b981' },
452
- { label: '周三', value: 150, color: '#f59e0b' },
453
- { label: '周四', value: 110, color: '#ef4444' },
454
- { label: '周五', value: 180, color: '#8b5cf6' },
455
- ],
456
- showLabels: true,
457
- showValues: true,
458
- },
459
-
460
- // 数据表格
461
- {
462
- type: 'table',
463
- x: 750,
464
- y: 400,
465
- width: 400,
466
- columns: [
467
- { title: '指标', width: 150 },
468
- { title: '数值', width: 100 },
469
- ],
470
- rows: [
471
- ['总用户', '10,000'],
472
- ['活跃用户', '7,500'],
473
- ['增长率', '+25%'],
474
- ],
475
- headerBg: '#1e293b',
476
- headerColor: '#ffffff',
477
- },
478
- ],
479
- });
480
- ```
481
-
482
- ### 特性展示海报
804
+ ext_call({
805
+ plugin: 'poster',
806
+ tool: 'add_poster_ribbon',
807
+ args: {
808
+ x: 100,
809
+ y: 50,
810
+ width: 200,
811
+ text: '限时特惠',
812
+ fontSize: 24,
813
+ color: '#ffffff',
814
+ backgroundColor: '#e74c3c',
815
+ borderColor: '#c0392b',
816
+ borderWidth: 2,
817
+ style: 'fold', // fold, diagonal, corner
818
+ position: 'top',
819
+ shadow: { color: '#000000', blur: 8, offsetX: 3, offsetY: 3 },
820
+ },
821
+ });
822
+ ```
823
+
824
+ ### 印章 (seal)
825
+
826
+ 印章效果组件,支持多种形状。
827
+
828
+ ```javascript
829
+ ext_call({
830
+ plugin: 'poster',
831
+ tool: 'add_poster_seal',
832
+ args: {
833
+ x: 1700,
834
+ y: 900,
835
+ size: 120,
836
+ text: '正品',
837
+ fontSize: 20,
838
+ color: '#e74c3c',
839
+ style: 'circle', // circle, square, star, hexagon
840
+ borderWidth: 4,
841
+ },
842
+ });
843
+ ```
844
+
845
+ ### 高亮文字 (highlightText)
846
+
847
+ 多种高亮效果:marker、underline、background、stroke、neon。
483
848
 
484
849
  ```javascript
485
- compose_poster({
486
- components: [
487
- { type: 'background', color: '#ffffff' },
488
- {
489
- type: 'text',
490
- text: '产品特性',
491
- x: 960,
492
- y: 80,
493
- fontSize: 48,
494
- color: '#1e293b',
495
- align: 'center',
496
- },
497
-
498
- // 分栏布局
499
- {
500
- type: 'columns',
501
- x: 100,
502
- y: 150,
503
- width: 1720,
504
- height: 400,
505
- columns: 3,
506
- gap: 40,
507
- borderColor: '#e2e8f0',
508
- },
509
-
510
- // 星星装饰
511
- { type: 'star', cx: 200, cy: 200, points: 5, outerRadius: 40, fill: '#fbbf24' },
512
- { type: 'star', cx: 600, cy: 200, points: 6, outerRadius: 35, fill: '#f472b6' },
513
- { type: 'star', cx: 1000, cy: 200, points: 8, outerRadius: 38, fill: '#60a5fa' },
514
-
515
- // 标签
516
- { type: 'chip', x: 200, y: 350, text: 'AI驱动', background: '#dbeafe', color: '#2563eb' },
517
- { type: 'chip', x: 600, y: 350, text: '实时响应', background: '#dcfce7', color: '#16a34a' },
518
- { type: 'chip', x: 1000, y: 350, text: '安全可靠', background: '#fef3c7', color: '#d97706' },
519
-
520
- // CTA按钮
521
- {
522
- type: 'cta',
523
- x: 960,
524
- y: 600,
525
- text: '立即体验 →',
526
- background: '#3b82f6',
527
- color: '#ffffff',
528
- radius: 30,
529
- },
530
- ],
850
+ ext_call({
851
+ plugin: 'poster',
852
+ tool: 'add_poster_highlight_text',
853
+ args: {
854
+ x: 300,
855
+ y: 400,
856
+ text: '重要通知',
857
+ fontSize: 60,
858
+ fontFamily: 'sans-serif',
859
+ color: '#1e293b',
860
+ highlightColor: '#fbbf24',
861
+ highlightStyle: 'marker', // marker, underline, background, stroke, neon
862
+ highlightWidth: 20,
863
+ strokeWidth: 3,
864
+ shadow: { color: '#fbbf24', blur: 15, offsetX: 2, offsetY: 2 },
865
+ },
866
+ });
867
+ ```
868
+
869
+ **highlightStyle 可选值:**
870
+
871
+ - `marker` - 荧光笔效果(倾斜半透明矩形)
872
+ - `underline` - 下划线
873
+ - `background` - 背景色块
874
+ - `stroke` - 文字描边
875
+ - `neon` - 霓虹发光效果
876
+
877
+ ### 条形码 (barcode)
878
+
879
+ 生成条形码,支持简单条形码和 API 条形码。
880
+
881
+ ```javascript
882
+ ext_call({
883
+ plugin: 'poster',
884
+ tool: 'add_poster_barcode',
885
+ args: {
886
+ x: 1500,
887
+ y: 900,
888
+ width: 300,
889
+ height: 100,
890
+ content: '123456789012',
891
+ showText: true,
892
+ textColor: '#1e293b',
893
+ fontSize: 16,
894
+ },
531
895
  });
532
896
  ```
533
897
 
534
898
  ---
535
899
 
536
- ## 📋 完整海报示例
900
+ ## 📝 完整示例
901
+
902
+ ### 示例 1:Foliko 项目海报(深色科技风)
903
+
904
+ ```javascript
905
+ // 1. 创建画布
906
+ ext_call({
907
+ plugin: 'poster',
908
+ tool: 'create_poster_canvas',
909
+ args: { width: 1920, height: 1080, background: '#0f172a' },
910
+ });
911
+
912
+ // 2. 装饰元素
913
+ ext_call({
914
+ plugin: 'poster',
915
+ tool: 'add_poster_circle',
916
+ args: { cx: 1700, cy: -100, rx: 400, fill: '#3b82f6', opacity: 0.1 },
917
+ });
918
+ ext_call({
919
+ plugin: 'poster',
920
+ tool: 'add_poster_star',
921
+ args: { cx: 180, cy: 180, points: 5, outerRadius: 40, fill: '#fbbf24', opacity: 0.9 },
922
+ });
923
+
924
+ // 3. 标题
925
+ ext_call({
926
+ plugin: 'poster',
927
+ tool: 'add_poster_art_text',
928
+ args: {
929
+ text: 'FOLIKO',
930
+ x: 960,
931
+ y: 120,
932
+ fontSize: 100,
933
+ gradient: { colors: ['#3b82f6', '#8b5cf6'] },
934
+ shadow: { color: '#3b82f6', blur: 50 },
935
+ },
936
+ });
937
+ ext_call({
938
+ plugin: 'poster',
939
+ tool: 'add_poster_text',
940
+ args: {
941
+ text: '简约的插件化 Agent 框架',
942
+ x: 960,
943
+ y: 190,
944
+ fontSize: 28,
945
+ color: '#94a3b8',
946
+ align: 'center',
947
+ },
948
+ });
949
+
950
+ // 4. 特性网格
951
+ ext_call({
952
+ plugin: 'poster',
953
+ tool: 'add_poster_feature_grid',
954
+ args: {
955
+ x: 90,
956
+ y: 280,
957
+ columns: 3,
958
+ itemWidth: 560,
959
+ itemHeight: 120,
960
+ items: [
961
+ { icon: '⚡', title: '插件化架构', description: '核心简单', color: '#3b82f6' },
962
+ { icon: '🤖', title: '多 AI 支持', description: '多种大模型', color: '#10b981' },
963
+ { icon: '📡', title: '流式输出', description: '实时响应', color: '#ec4899' },
964
+ { icon: '🔧', title: '内置工具', description: '85+工具', color: '#f59e0b' },
965
+ { icon: '🧩', title: '技能系统', description: '可扩展', color: '#8b5cf6' },
966
+ { icon: '🎯', title: '子 Agent', description: '分工协作', color: '#06b6d4' },
967
+ ],
968
+ background: '#1e293b',
969
+ borderColor: '#3b82f6',
970
+ },
971
+ });
972
+
973
+ // 5. 统计卡片
974
+ ext_call({
975
+ plugin: 'poster',
976
+ tool: 'add_poster_stat_card',
977
+ args: {
978
+ x: 90,
979
+ y: 580,
980
+ title: '27+',
981
+ subtitle: '内置插件',
982
+ icon: '📦',
983
+ color: '#3b82f6',
984
+ background: '#1e293b',
985
+ borderColor: '#3b82f6',
986
+ },
987
+ });
988
+ ext_call({
989
+ plugin: 'poster',
990
+ tool: 'add_poster_stat_card',
991
+ args: {
992
+ x: 430,
993
+ y: 580,
994
+ title: '25+',
995
+ subtitle: '内置技能',
996
+ icon: '✨',
997
+ color: '#10b981',
998
+ background: '#1e293b',
999
+ borderColor: '#10b981',
1000
+ },
1001
+ });
1002
+
1003
+ // 6. 标签
1004
+ ext_call({
1005
+ plugin: 'poster',
1006
+ tool: 'add_poster_chip',
1007
+ args: { x: 550, y: 870, text: 'v1.1.0', background: '#3b82f6', color: '#ffffff', fontSize: 14 },
1008
+ });
1009
+ ext_call({
1010
+ plugin: 'poster',
1011
+ tool: 'add_poster_chip',
1012
+ args: {
1013
+ x: 680,
1014
+ y: 870,
1015
+ text: 'MIT License',
1016
+ background: '#10b981',
1017
+ color: '#ffffff',
1018
+ fontSize: 14,
1019
+ },
1020
+ });
1021
+
1022
+ // 7. CTA
1023
+ ext_call({
1024
+ plugin: 'poster',
1025
+ tool: 'add_poster_cta',
1026
+ args: {
1027
+ x: 960,
1028
+ y: 940,
1029
+ text: 'npm install -g foliko',
1030
+ background: '#3b82f6',
1031
+ color: '#ffffff',
1032
+ fontSize: 22,
1033
+ radius: 30,
1034
+ },
1035
+ });
1036
+
1037
+ // 8. 水印
1038
+ ext_call({
1039
+ plugin: 'poster',
1040
+ tool: 'add_poster_watermark',
1041
+ args: {
1042
+ text: 'FOLIKO',
1043
+ cx: 960,
1044
+ cy: 600,
1045
+ fontSize: 250,
1046
+ color: 'rgba(255,255,255,0.02)',
1047
+ rotation: -15,
1048
+ },
1049
+ });
1050
+
1051
+ // 9. 导出
1052
+ ext_call({
1053
+ plugin: 'poster',
1054
+ tool: 'export_poster_canvas',
1055
+ args: { filename: 'foliko-poster', format: 'png', outputDir: 'output' },
1056
+ });
1057
+ ```
537
1058
 
538
- ### AI 产品发布海报
1059
+ ### 示例 2:赛博朋克风格海报
539
1060
 
540
1061
  ```javascript
541
- compose_poster({
542
- components: [
543
- { type: 'background', color: '#0D0D1A' },
544
- { type: 'circle', cx: 900, cy: 100, rx: 200, fill: '#00D9FF', opacity: 0.1 },
545
- { type: 'star', cx: 200, cy: 200, points: 5, outerRadius: 60, fill: '#fbbf24', opacity: 0.8 },
546
- {
547
- type: 'artText',
548
- text: 'FOLIKO',
549
- x: 540,
550
- y: 320,
551
- fontSize: 140,
552
- gradient: { colors: ['#00D9FF', '#00FF88'] },
553
- shadow: { color: '#00D9FF', blur: 40 },
554
- },
555
- {
556
- type: 'text',
557
- text: '简约的插件化 Agent 框架',
558
- x: 540,
559
- y: 420,
560
- fontSize: 36,
561
- color: '#A0AEC0',
562
- align: 'center',
563
- },
564
- { type: 'divider', x: 540, y: 500, width: 200, color: '#00D9FF' },
565
- {
566
- type: 'featureGrid',
567
- x: 90,
568
- y: 560,
569
- columns: 3,
570
- itemWidth: 300,
571
- itemHeight: 150,
572
- items: [
573
- { icon: '⚡', title: '插件化架构', description: '核心简单' },
574
- { icon: '🤖', title: '多 AI 支持', description: '多种大模型' },
575
- { icon: '📡', title: '流式输出', description: '实时响应' },
576
- ],
577
- background: '#1A1A2E',
578
- borderColor: '#00D9FF',
579
- },
580
- {
581
- type: 'cta',
582
- x: 540,
583
- y: 950,
584
- text: 'npm install -g foliko',
585
- background: '#00D9FF',
586
- color: '#0D0D1A',
587
- fontSize: 22,
588
- },
589
- ],
590
- });
591
- ```
592
-
593
- ### 数据仪表盘
1062
+ // 使用赛博朋克配色
1063
+ ext_call({
1064
+ plugin: 'poster',
1065
+ tool: 'create_poster_canvas',
1066
+ args: { width: 1920, height: 1080, background: '#0a0a0f' },
1067
+ });
1068
+ ext_call({
1069
+ plugin: 'poster',
1070
+ tool: 'add_poster_circle',
1071
+ args: { cx: 1600, cy: 200, rx: 400, fill: '#ff006e', opacity: 0.15 },
1072
+ });
1073
+ ext_call({
1074
+ plugin: 'poster',
1075
+ tool: 'add_poster_circle',
1076
+ args: { cx: 200, cy: 900, rx: 300, fill: '#00f5d4', opacity: 0.1 },
1077
+ });
1078
+ ext_call({
1079
+ plugin: 'poster',
1080
+ tool: 'add_poster_art_text',
1081
+ args: {
1082
+ text: 'CYBER',
1083
+ x: 960,
1084
+ y: 300,
1085
+ fontSize: 140,
1086
+ gradient: { colors: ['#ff006e', '#00f5d4'] },
1087
+ shadow: { color: '#ff006e', blur: 50 },
1088
+ },
1089
+ });
1090
+ ext_call({
1091
+ plugin: 'poster',
1092
+ tool: 'add_poster_text',
1093
+ args: { text: '未来已来', x: 960, y: 420, fontSize: 48, color: '#f0f0f0', align: 'center' },
1094
+ });
1095
+ ext_call({
1096
+ plugin: 'poster',
1097
+ tool: 'add_poster_cta',
1098
+ args: {
1099
+ x: 960,
1100
+ y: 600,
1101
+ text: '探索未来 →',
1102
+ background: '#ff006e',
1103
+ color: '#ffffff',
1104
+ fontSize: 24,
1105
+ radius: 30,
1106
+ },
1107
+ });
1108
+ ext_call({
1109
+ plugin: 'poster',
1110
+ tool: 'export_poster_canvas',
1111
+ args: { filename: 'cyber-poster', format: 'png', outputDir: 'output' },
1112
+ });
1113
+ ```
1114
+
1115
+ ### 示例 3:温暖风格海报
594
1116
 
595
1117
  ```javascript
596
- compose_poster({
597
- components: [
598
- { type: 'background', color: '#f8fafc' },
599
- {
600
- type: 'text',
601
- text: '数据概览',
602
- x: 960,
603
- y: 60,
604
- fontSize: 36,
605
- color: '#1e293b',
606
- align: 'center',
607
- },
608
-
609
- // 环形进度
610
- {
611
- type: 'progressCircle',
612
- cx: 200,
613
- cy: 200,
614
- radius: 70,
615
- value: 85,
616
- strokeWidth: 12,
617
- fillColor: '#3b82f6',
618
- showLabel: true,
619
- },
620
- {
621
- type: 'text',
622
- text: '完成率',
623
- x: 200,
624
- y: 300,
625
- fontSize: 14,
626
- color: '#64748b',
627
- align: 'center',
628
- },
629
-
630
- {
631
- type: 'progressCircle',
632
- cx: 450,
633
- cy: 200,
634
- radius: 70,
635
- value: 60,
636
- strokeWidth: 12,
637
- fillColor: '#10b981',
638
- showLabel: true,
639
- },
640
- {
641
- type: 'text',
642
- text: '增长率',
643
- x: 450,
644
- y: 300,
645
- fontSize: 14,
646
- color: '#64748b',
647
- align: 'center',
648
- },
649
-
650
- // 柱状图
651
- {
652
- type: 'chart',
653
- type: 'bar',
654
- x: 700,
655
- y: 100,
656
- width: 500,
657
- height: 250,
658
- data: [
659
- { label: 'Q1', value: 120, color: '#3b82f6' },
660
- { label: 'Q2', value: 150, color: '#10b981' },
661
- { label: 'Q3', value: 180, color: '#f59e0b' },
662
- { label: 'Q4', value: 220, color: '#ef4444' },
663
- ],
664
- showLabels: true,
665
- showValues: true,
666
- },
667
-
668
- // 表格
669
- {
670
- type: 'table',
671
- x: 100,
672
- y: 400,
673
- width: 1720,
674
- columns: [
675
- { title: '产品', width: 400, align: 'left' },
676
- { title: '销量', width: 200 },
677
- { title: '增长率', width: 200 },
678
- ],
679
- rows: [
680
- ['智能助手 Pro', '1,250', '+25%'],
681
- ['图片生成器', '890', '+18%'],
682
- ['代码助手', '2,100', '+42%'],
683
- ],
684
- headerBg: '#1e293b',
685
- headerColor: '#ffffff',
686
- fontSize: 14,
687
- },
688
-
689
- // 水印
690
- {
691
- type: 'watermark',
692
- text: 'FOLIKO',
693
- cx: 960,
694
- cy: 700,
695
- fontSize: 200,
696
- color: 'rgba(0,0,0,0.03)',
697
- rotation: -15,
698
- },
699
- ],
1118
+ // 使用暖色调配色
1119
+ ext_call({
1120
+ plugin: 'poster',
1121
+ tool: 'create_poster_canvas',
1122
+ args: { width: 1080, height: 1080, background: '#fef3e2' },
1123
+ });
1124
+ ext_call({
1125
+ plugin: 'poster',
1126
+ tool: 'add_poster_art_text',
1127
+ args: {
1128
+ text: 'COFFEE',
1129
+ x: 540,
1130
+ y: 350,
1131
+ fontSize: 100,
1132
+ gradient: { colors: ['#e07a5f', '#f4a261'] },
1133
+ },
1134
+ });
1135
+ ext_call({
1136
+ plugin: 'poster',
1137
+ tool: 'add_poster_text',
1138
+ args: {
1139
+ text: '慢下来,享受生活',
1140
+ x: 540,
1141
+ y: 450,
1142
+ fontSize: 32,
1143
+ color: '#3d405b',
1144
+ align: 'center',
1145
+ },
1146
+ });
1147
+ ext_call({
1148
+ plugin: 'poster',
1149
+ tool: 'add_poster_chip',
1150
+ args: {
1151
+ x: 450,
1152
+ y: 600,
1153
+ text: '☕ 手冲咖啡',
1154
+ background: '#e07a5f',
1155
+ color: '#ffffff',
1156
+ fontSize: 18,
1157
+ },
1158
+ });
1159
+ ext_call({
1160
+ plugin: 'poster',
1161
+ tool: 'add_poster_cta',
1162
+ args: {
1163
+ x: 540,
1164
+ y: 750,
1165
+ text: '了解更多',
1166
+ background: '#81b29a',
1167
+ color: '#ffffff',
1168
+ fontSize: 20,
1169
+ radius: 25,
1170
+ },
1171
+ });
1172
+ ext_call({
1173
+ plugin: 'poster',
1174
+ tool: 'export_poster_canvas',
1175
+ args: { filename: 'coffee-poster', format: 'png', outputDir: 'output' },
1176
+ });
1177
+ ```
1178
+
1179
+ ### 示例 4:产品宣传海报(使用新增组件)
1180
+
1181
+ 展示 button、icon、qrcode、frame、bubble、ribbon、seal、highlightText、barcode 等新组件。
1182
+
1183
+ ```javascript
1184
+ // 1. 创建画布
1185
+ ext_call({
1186
+ plugin: 'poster',
1187
+ tool: 'create_poster_canvas',
1188
+ args: { width: 1200, height: 1600, background: '#f8fafc' },
1189
+ });
1190
+
1191
+ // 2. 装饰边框
1192
+ ext_call({
1193
+ plugin: 'poster',
1194
+ tool: 'add_poster_frame',
1195
+ args: {
1196
+ x: 40,
1197
+ y: 40,
1198
+ width: 1120,
1199
+ height: 1520,
1200
+ style: 'vintage',
1201
+ color: '#c9a227',
1202
+ borderWidth: 4,
1203
+ padding: 30,
1204
+ },
1205
+ });
1206
+
1207
+ // 3. 丝带标签
1208
+ ext_call({
1209
+ plugin: 'poster',
1210
+ tool: 'add_poster_ribbon',
1211
+ args: {
1212
+ x: 800,
1213
+ y: 80,
1214
+ width: 200,
1215
+ text: '新品上市',
1216
+ fontSize: 22,
1217
+ backgroundColor: '#e74c3c',
1218
+ style: 'fold',
1219
+ },
1220
+ });
1221
+
1222
+ // 4. 主标题(高亮文字)
1223
+ ext_call({
1224
+ plugin: 'poster',
1225
+ tool: 'add_poster_highlight_text',
1226
+ args: {
1227
+ x: 100,
1228
+ y: 200,
1229
+ text: '智能手表 Pro',
1230
+ fontSize: 72,
1231
+ fontFamily: 'sans-serif',
1232
+ color: '#1e293b',
1233
+ highlightColor: '#fbbf24',
1234
+ highlightStyle: 'marker',
1235
+ },
1236
+ });
1237
+
1238
+ // 5. 图标装饰
1239
+ ext_call({
1240
+ plugin: 'poster',
1241
+ tool: 'add_poster_icon',
1242
+ args: { x: 100, y: 280, size: 60, icon: '⌚', backgroundColor: '#1e293b', radius: 12 },
1243
+ });
1244
+ ext_call({
1245
+ plugin: 'poster',
1246
+ tool: 'add_poster_icon',
1247
+ args: { x: 180, y: 280, size: 60, icon: '🔋', backgroundColor: '#10b981', radius: 12 },
1248
+ });
1249
+ ext_call({
1250
+ plugin: 'poster',
1251
+ tool: 'add_poster_icon',
1252
+ args: { x: 260, y: 280, size: 60, icon: '💧', backgroundColor: '#3b82f6', radius: 12 },
1253
+ });
1254
+
1255
+ // 6. 对话气泡
1256
+ ext_call({
1257
+ plugin: 'poster',
1258
+ tool: 'add_poster_bubble',
1259
+ args: {
1260
+ x: 100,
1261
+ y: 400,
1262
+ width: 500,
1263
+ height: 100,
1264
+ text: '限时特惠,仅剩 3 天!',
1265
+ fontSize: 24,
1266
+ backgroundColor: '#fef3c7',
1267
+ borderColor: '#fbbf24',
1268
+ tailDirection: 'bottom',
1269
+ tailPosition: 'left',
1270
+ },
1271
+ });
1272
+
1273
+ // 7. 产品介绍文字
1274
+ ext_call({
1275
+ plugin: 'poster',
1276
+ tool: 'add_poster_text',
1277
+ args: {
1278
+ x: 100,
1279
+ y: 580,
1280
+ text: '全新智能手表,支持心率监测、GPS定位、防水50米。',
1281
+ fontSize: 28,
1282
+ color: '#64748b',
1283
+ },
1284
+ });
1285
+
1286
+ // 8. 印章认证
1287
+ ext_call({
1288
+ plugin: 'poster',
1289
+ tool: 'add_poster_seal',
1290
+ args: {
1291
+ x: 900,
1292
+ y: 500,
1293
+ size: 100,
1294
+ text: '正品',
1295
+ fontSize: 18,
1296
+ color: '#e74c3c',
1297
+ style: 'circle',
1298
+ },
1299
+ });
1300
+
1301
+ // 9. CTA 按钮
1302
+ ext_call({
1303
+ plugin: 'poster',
1304
+ tool: 'add_poster_button',
1305
+ args: {
1306
+ x: 350,
1307
+ y: 700,
1308
+ width: 500,
1309
+ height: 80,
1310
+ text: '立即购买 →',
1311
+ fontSize: 32,
1312
+ backgroundColor: '#1e293b',
1313
+ gradient: { colors: ['#1e293b', '#334155'] },
1314
+ radius: 40,
1315
+ shadow: { color: '#1e293b', blur: 20, offsetY: 8 },
1316
+ },
1317
+ });
1318
+
1319
+ // 10. 统计卡片
1320
+ ext_call({
1321
+ plugin: 'poster',
1322
+ tool: 'add_poster_stat_card',
1323
+ args: {
1324
+ x: 100,
1325
+ y: 850,
1326
+ title: '1999',
1327
+ subtitle: '原价',
1328
+ icon: '💰',
1329
+ color: '#94a3b8',
1330
+ background: '#f1f5f9',
1331
+ borderColor: '#e2e8f0',
1332
+ },
1333
+ });
1334
+ ext_call({
1335
+ plugin: 'poster',
1336
+ tool: 'add_poster_stat_card',
1337
+ args: {
1338
+ x: 350,
1339
+ y: 850,
1340
+ title: '1499',
1341
+ subtitle: '限时价',
1342
+ icon: '🔥',
1343
+ color: '#e74c3c',
1344
+ background: '#fef2f2',
1345
+ borderColor: '#fecaca',
1346
+ },
1347
+ });
1348
+ ext_call({
1349
+ plugin: 'poster',
1350
+ tool: 'add_poster_stat_card',
1351
+ args: {
1352
+ x: 600,
1353
+ y: 850,
1354
+ title: '4.9',
1355
+ subtitle: '评分',
1356
+ icon: '⭐',
1357
+ color: '#f59e0b',
1358
+ background: '#fffbeb',
1359
+ borderColor: '#fde68a',
1360
+ },
1361
+ });
1362
+
1363
+ // 11. 分隔线
1364
+ ext_call({
1365
+ plugin: 'poster',
1366
+ tool: 'add_poster_divider',
1367
+ args: { x: 100, y: 1050, width: 1000, color: '#e2e8f0', style: 'dashed' },
1368
+ });
1369
+
1370
+ // 12. 二维码
1371
+ ext_call({
1372
+ plugin: 'poster',
1373
+ tool: 'add_poster_qrcode',
1374
+ args: {
1375
+ x: 150,
1376
+ y: 1150,
1377
+ size: 180,
1378
+ content: 'https://example.com/shop/watch-pro',
1379
+ color: '#1e293b',
1380
+ backgroundColor: '#ffffff',
1381
+ },
1382
+ });
1383
+
1384
+ // 13. 条形码
1385
+ ext_call({
1386
+ plugin: 'poster',
1387
+ tool: 'add_poster_barcode',
1388
+ args: {
1389
+ x: 700,
1390
+ y: 1200,
1391
+ width: 300,
1392
+ height: 80,
1393
+ content: '6923456789012',
1394
+ showText: true,
1395
+ textColor: '#1e293b',
1396
+ },
1397
+ });
1398
+
1399
+ // 14. 页脚文字
1400
+ ext_call({
1401
+ plugin: 'poster',
1402
+ tool: 'add_poster_text',
1403
+ args: {
1404
+ x: 600,
1405
+ y: 1450,
1406
+ text: '扫描二维码访问官网',
1407
+ fontSize: 20,
1408
+ color: '#94a3b8',
1409
+ align: 'center',
1410
+ },
1411
+ });
1412
+
1413
+ // 15. 导出
1414
+ ext_call({
1415
+ plugin: 'poster',
1416
+ tool: 'export_poster_canvas',
1417
+ args: { filename: 'product-poster', format: 'png', outputDir: 'output' },
700
1418
  });
701
1419
  ```
702
1420
 
703
1421
  ---
704
1422
 
705
- ## 🛠️ 工具速查
1423
+ ## 🔗 参考资源
706
1424
 
707
- | 工具 | 用途 |
708
- | ------------------------ | --------------- |
709
- | `list_poster_components` | 列出所有组件 |
710
- | `list_poster_templates` | 列出所有模板 |
711
- | `generate_poster` | 一键生成海报 |
712
- | `compose_poster` | 组件化生成海报 |
713
- | `export_poster_canvas` | 导出 PNG |
714
- | `export_poster_svg` | 导出 SVG (矢量) |
1425
+ | 网站 | URL | 特点 |
1426
+ | --------------- | ----------------------- | ------------ |
1427
+ | Coolors | https://coolors.co | 智能配色生成 |
1428
+ | Color Hunt | https://colorhunt.co | 流行配色分享 |
1429
+ | Adobe Color | https://color.adobe.com | 配色趋势 |
1430
+ | Material Design | https://m3.material.io | 设计系统配色 |
715
1431
 
716
1432
  ---
717
1433
 
718
- ## 📚 参考资源
1434
+ ## 🎨 设计理念与原则
1435
+
1436
+ ### 核心设计原则(来自 Refactoring UI & Smashing Magazine)
1437
+
1438
+ #### 1. 层次结构(Hierarchy)
1439
+
1440
+ - **不是所有元素都相等** - 使用大小、颜色、间距区分重要性
1441
+ - **尺寸不是一切** - 结合粗细、颜色、对比度
1442
+ - **去饱和以强调** - 在彩色背景上避免灰色文字
1443
+ - **分离视觉层次与文档层次** - 不要让 HTML 结构限制设计
1444
+
1445
+ #### 2. 颜色系统
1446
+
1447
+ - **使用 HSL 而非 HEX** - 更易理解和调整
1448
+ - **建立完整色阶** - 至少 5-10 个色阶(浅→深)
1449
+ - **灰度不一定是灰色** - 可以偏蓝、偏紫、偏绿
1450
+ - **考虑可访问性** - 对比度至少 4.5:1
1451
+ - **颜色仅用于强调** - 不要依赖颜色传达所有信息
1452
+
1453
+ #### 3. 间距系统
1454
+
1455
+ - **从过多留白开始** - 更容易后期收紧
1456
+ - **建立间距和尺寸系统** - 使用 4px/8px 基础网格
1457
+ - **避免歧义间距** - 间距应该有明显的倍数关系
1458
+ - **留白不是浪费** - 呼吸感提升可读性
1459
+
1460
+ #### 4. 排版
1461
+
1462
+ - **建立类型比例** - 使用固定比例(如 1.25、1.333)
1463
+ - **选择优质字体** - 无衬线字体适合屏幕
1464
+ - **控制行长度** - 理想 60-75 字符
1465
+ - **调高行高** - 正文 1.5-1.75,标题可更低
1466
+ - **有效使用字间距** - 全大写时增加间距
1467
+
1468
+ #### 5. 深度与阴影
1469
+
1470
+ - **模拟统一光源方向** - 所有阴影方向一致
1471
+ - **阴影可有两个部分** - 近景阴影 + 远景阴影
1472
+ - **扁平设计也可以有深度** - 使用微妙渐变
1473
+ - **重叠元素创造层次** - 使用 z-index 和叠加
1474
+
1475
+ #### 6. 边框与分隔
1476
+
1477
+ - **使用更少的边框** - 过多的边框让设计杂乱
1478
+ - **使用对比背景色** - 分隔元素的好方法
1479
+ - **用阴影代替边框** - 更现代的感觉
1480
+ - **box-shadow 替代 border** - 视觉更柔和
1481
+
1482
+ #### 7. 组件设计
1483
+
1484
+ - **从功能开始,而非布局** - 先确定组件用途
1485
+ - **细节稍后添加** - 先完成结构再美化
1486
+ - **不要设计过多** - 专注于当前需要
1487
+ - **选择一种个性** - 设计语言保持一致
1488
+ - **限制选择** - 减少颜色、字体、间距选项
1489
+
1490
+ ### 设计灵感来源
719
1491
 
720
- ### 日本设计灵感
1492
+ #### 国际设计资源
721
1493
 
722
- | 网站 | URL | 特点 |
723
- | ---------- | ------------------------- | ------------------ |
724
- | MUUUUU | https://muuuuu.org | 卓越Web设计精选 |
725
- | ICS MEDIA | https://ics.media | 前端技术 + CSS设计 |
726
- | Lifehacker | https://www.lifehacker.jp | 生活设计科技 |
1494
+ | 网站 | URL | 特点 |
1495
+ | ------------------- | -------------------------------- | -------------------- |
1496
+ | Smashing Magazine | https://www.smashingmagazine.com | 顶级设计文章与指南 |
1497
+ | Google Design | https://design.google | Material Design 系统 |
1498
+ | Refactoring UI | https://refactoringui.com | 开发者设计指南 |
1499
+ | Refactoring UI Book | https://refactoringui.com/book | 50+ 设计技巧 |
727
1500
 
728
- ### 国际设计平台
1501
+ #### 设计灵感网站
729
1502
 
730
- | 网站 | URL | 特点 |
1503
+ | 网站 | URL | 用途 |
731
1504
  | --------- | --------------------- | -------------- |
732
- | Behance | https://behance.net | 专业设计作品集 |
733
- | Dribbble | https://dribbble.com | 设计师社区 |
734
- | Pinterest | https://pinterest.com | 视觉灵感收藏 |
735
- | Awwwards | https://awwwards.com | 最佳网页设计 |
736
-
737
- ### 配色灵感
738
-
739
- | 网站 | URL | 特点 |
740
- | ----------- | ----------------------- | ------------ |
741
- | Coolors | https://coolors.co | 智能配色生成 |
742
- | Color Hunt | https://colorhunt.co | 配色方案分享 |
743
- | Adobe Color | https://color.adobe.com | 配色趋势 |
1505
+ | Dribbble | https://dribbble.com | UI/UX 设计展示 |
1506
+ | Behance | https://behance.net | 创意设计作品 |
1507
+ | Awwwards | https://awwwards.com | 优秀网页设计 |
1508
+ | Pinterest | https://pinterest.com | 设计灵感收藏 |
1509
+
1510
+ #### 配色灵感网站
1511
+
1512
+ | 网站 | URL | 特点 |
1513
+ | --------------- | ------------------------------------- | ----------------- |
1514
+ | Color Hunt | https://colorhunt.co/palettes/popular | 流行配色分享 |
1515
+ | Coolors | https://coolors.co/palettes/trending | 智能配色生成 |
1516
+ | Adobe Color | https://color.adobe.com | 配色趋势与提取 |
1517
+ | Tailwind Colors | https://tailwindcss.com/docs/colors | 完整色彩系统 |
1518
+ | Material Color | https://m3.material.io/color | Material 配色工具 |
1519
+
1520
+ ### 实用设计技巧
1521
+
1522
+ #### 快速提升设计感的技巧
1523
+
1524
+ 1. **增加对比度** - 标题和正文对比更明显
1525
+ 2. **使用渐变** - 纯色 + 渐变增加层次
1526
+ 3. **添加微妙阴影** - 让元素"浮"起来
1527
+ 4. **统一图标风格** - 使用同一套图标库
1528
+ 5. **控制留白** - 不要让元素太拥挤
1529
+ 6. **一致的圆角** - 全部使用相同的圆角值
1530
+ 7. **对齐边缘** - 使用网格系统对齐
1531
+ 8. **限制颜色数量** - 主色 + 强调色 + 中性色
1532
+
1533
+ #### 常见设计反模式
1534
+
1535
+ - ❌ 使用太多字体
1536
+ - ❌ 所有元素都有边框
1537
+ - ❌ 灰色文字在彩色背景
1538
+ - ❌ 不一致的间距
1539
+ - ❌ 忽视可访问性
1540
+ - ❌ 设计过于复杂
1541
+ - ❌ 纯色背景无层次
1542
+
1543
+ #### 设计检查清单
1544
+
1545
+ - [ ] 视觉层次清晰?
1546
+ - [ ] 颜色对比度足够?
1547
+ - [ ] 间距系统一致?
1548
+ - [ ] 字体比例协调?
1549
+ - [ ] 阴影方向统一?
1550
+ - [ ] 移动端适配良好?
1551
+ - [ ] 无障碍访问达标?