@logictan/dsh-stitch-designer 2.0.1 → 2.0.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.
package/README.md CHANGED
@@ -52,9 +52,9 @@ Commissioning:
52
52
 
53
53
  | Rule | Why |
54
54
  | --- | --- |
55
- | Say what it should look like and what it must show; put no other limits on it | A brief that fixes layout, spacing and colour turns design into transcription, and the result is no better than writing it by hand. |
55
+ | Say what to show and what to leave out, and nothing about style | The brief names the content and the existing components, plus what must not appear. Layout, spacing, colour, type and motion are left to Stitch; a brief that fixes them turns design into transcription, no better than writing it by hand. |
56
56
  | Ask for nothing that cannot be built | The screen is going to be reproduced pixel for pixel, so a wish for an impossible interaction or unavailable data is a defect in the brief. |
57
- | Follow the project's existing design language | Screens in this repository follow `@logictan/dsh-macos-theme` unless told otherwise. A second visual language cannot be implemented without a rewrite. |
57
+ | Describe a design language only when the implementation must match one — and describe it, don't name it | The one exception to "no style limits": when a screen has to fit an existing visual system (here, `@logictan/dsh-macos-theme`), the brief must say what that system actually looks like — colour values, radii, borders, type weights and sizes, spacing density, light/dark relationships. Stitch does not know our package or theme names; pass the theme's own design-system text verbatim when the project has one. With no such constraint, specify no design language at all. |
58
58
  | Compose it from components the project already has | Host components and the shared component layer exist; a redrawn lookalike is work spent twice. |
59
59
  | Ask for a dark variant every time | Dark is the same design language's dark values, not an inversion. Both are implemented from one set of tokens. |
60
60
 
package/lib/guidance.js CHANGED
@@ -46,9 +46,9 @@ export const STITCH_GUIDANCE = [
46
46
  '3. 先导出 Stitch 的设计稿 HTML,照着它实现,尽可能做到像素级还原。设计稿 HTML 落在 `<项目>/docs/design/<screenId>.html`,应提交到版本库。凡实现需要与设计稿不一致的地方,先问用户并给出理由,不要自行偏离。',
47
47
  '',
48
48
  '下单给 Stitch 时,遵守以下规范:',
49
- '4. 只告诉它需要什么样的视觉效果、需要展示什么内容,不做其他限制,尽可能让它自我发挥。把布局、间距、配色写死成一份详细规格,等于让它照着抄,产出的稿子不会比你自己写的更好。',
50
- '5. 设计稿最终要被像素级还原,所以稿子里不得出现无法实现的功能和元素。写提示词时就假定它会被逐像素实现:不要许愿一个做不到的交互、一个实现不了的效果,或一份拿不到的数据。',
51
- '6. 遵循项目既有的设计语言。本仓库的界面统一按 `@logictan/dsh-macos-theme` 的设计语言出稿;没有另行指定时,就以它为准,不要另起一套视觉体系。',
49
+ '4. 提示词只说明需要显示什么内容、用哪些已有组件,以及不需要显示什么(不要出现的模块、数据、交互)。布局、间距、配色、字体、动效等样式一律不写,让它自由发挥。把样式写死成一份详细规格,等于让它照着抄,产出的稿子不会比你自己写的更好。',
50
+ '5. 唯一例外:当实现必须与某个既有设计语言保持一致时(例如要求按 `@logictan/dsh-macos-theme` 出稿),才需要交代样式——但只报名字没用,Stitch 不认识你的包名和主题名。要把那套语言实际长什么样告诉它:颜色取值、圆角、描边、字重与字号层级、间距密度、明暗关系。项目里已有设计系统说明(如主题包的设计系统文档或 Stitch 的 design system)就直接给原文,不要只给一个标识符。没有这种一致性要求时,不要指定任何设计语言。',
51
+ '6. 设计稿最终要被像素级还原,所以稿子里不得出现无法实现的功能和元素。写提示词时就假定它会被逐像素实现:不要许愿一个做不到的交互、一个实现不了的效果,或一份拿不到的数据。',
52
52
  '7. 尽可能复用已有组件。出稿前先看项目里已经有什么(宿主组件、共享组件层),让稿子由这些组件拼出来,而不是重画一套长得像的。',
53
53
  '8. 每份设计稿都要同时给出暗色版本。暗色不是把亮色反相,而是同一套设计语言在暗色下的取值:颜色、描边、层级都要按暗色重新给。实现时两边共用同一套 token,暗色不另写一份。',
54
54
  ].join('\n');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logictan/dsh-stitch-designer",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "DSH Stitch designer: Google Stitch AI UI generation as native mcp__stitch__* tools, plus the design conventions that keep one code project bound to one Stitch project. DSH Stitch 界面设计子插件。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",