dsh-design-studio 1.4.0 → 1.5.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.en.md CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  </div>
17
17
 
18
- **Design Studio** is a DeepSeek Harness (DSH) plugin. Say what you want to make, and the model's web pages, app screens, mini programs, desktop apps, posters, slides, mind maps and roadmaps appear one by one on a canvas in the right sidebar, inside phone, browser or app-window frames. Click the direction you like, or click whatever looks off and add a sentence, and the model edits it.
18
+ **Design Studio** is a DeepSeek Harness (DSH) plugin. Say what you want to make, and the model's web pages, app screens, mini programs, desktop apps, posters, slides, mind maps and roadmaps appear one by one on a canvas in the right sidebar, inside phone, browser or app-window device frames. Click the direction you like, or click whatever looks off and add a sentence, and the model edits it.
19
19
 
20
20
  ![Demo: one sentence → three directions → pick one for the full set → click to edit](assets/demo.gif)
21
21
 
@@ -37,21 +37,21 @@ If DSH can't reach the npm registry, it falls back to a mirror in China. To upda
37
37
 
38
38
  ## What it does
39
39
 
40
- - **The 1.0 interface:** a title bar on top (Page setup, screens, Share, Export, Build as code) and an island at the bottom (Ask or run a command, Select, Text, Style, Draw, Play, Look, Check). One panel at a time: a drawer on a narrow sidebar, a card on the right with DSH full screen. ⇧⌘K (Ctrl+Shift+K on Windows) opens the command palette, V T S P R L C switch tools, and the motion is a soft aurora.
40
+ - **The 1.0 interface:** a title bar on top (Page setup, screens, Share, Export, Build as code) and an island at the bottom (Ask or run a command, Select, Text, Style, Annotate, Present, Theme, Check). One panel at a time: a drawer on a narrow sidebar, a card on the right with DSH full screen. ⇧⌘K (Ctrl+Shift+K on Windows) opens the command palette, V T S P R L C switch tools, and the motion is a soft aurora.
41
41
  - **Pick from three directions:** three different first screens side by side, then the full set in the one you pick. Any single screen can also get two alternative takes.
42
- - **Click to edit:** click an element or drag over an area, and a small chip lands in the input (hover it for details); just add how to change it. Markup, style changes, style cards and check lists land as chips too, not walls of text. The model still gets the full location and styles. Changed spots flash in the preview. You can also draw circles, arrows and notes right on the page and hand the marked-up screenshot to the model, or copy it to paste elsewhere. Adjust style can apply a change to every screen at once, and when you edit a design by hand in the sidebar, the model is told before its next step so it won't undo your edits.
42
+ - **Click to edit:** click an element or drag over an area, and a small chip lands in the input (hover it for details); just add how to change it. Annotations, style changes, style cards and check lists land as chips too, not walls of text. The model still gets the full location and styles. Changed spots flash in the preview. You can also draw circles, arrows and notes right on the page and hand the marked-up screenshot to the model, or copy it to paste elsewhere. Adjust style can apply a change to every screen at once, and when you edit a design by hand in the sidebar, the model is told before its next step so it won't undo your edits.
43
43
  - **Open what you have:** home + › Open HTML… picks an HTML file, or drop an HTML file or folder onto the sidebar (desktop app); you can also type a path or a dev-server port.
44
44
  - **Design check:** one click finds overflowing text, low contrast, small tap targets and tiny text, marked right on the page. In Design mode the model also checks its own work and fixes what it finds.
45
45
  - **Clickable prototypes:** back arrows marked `data-back` go back to wherever you came from; the different looks of one page (empty list, with data, paid) are states in one file instead of extra screens, switchable next to the screen name on the canvas, and checked and exported state by state. The design check also points out a shared part that is styled differently on different screens (#30).
46
46
  - **Mock data:** ask for a prototype whose clicks really change things and survive page changes, and the model writes `mock.json` as the data source and binds the pages to it: "Accept offer" switches the whole app to its on-site stage, clocking in updates the time, and it all stays across pages and reloads; a global stage or role changes every page at once. **Data** in the bottom bar opens the data as a tree: edit any value, reset it, or save it as the initial data. The HTML demo carries the data too, with a Reset data button (#30).
47
47
  - **Versions and compare:** every turn is saved; drag a slider to compare, and go back to any version.
48
- - **Export and share:** Export makes showcase images, PDF and PowerPoint (links between screens still work), and designs with hundreds of screens export in full (up to 1000). Share has a clickable HTML demo that opens with a double-click (device frame included, ready to send to a client), a temporary public link (beta; opens in WeChat or any browser, closes after 2 hours), and a QR code to see it on your phone at real size. Slides and posters larger than the default canvas now use the page's real size. You can also set it by adding `WIDTHxHEIGHT` after the type, for example `<meta name="dsh-design" content="slides 1440x810">`. Export options let you pick the page size (16:9, 4:3, A3 landscape or custom), what each page shows (one screen, full page or a set height) and two screens per page. If anything would be cut off, you get a checklist first, with a one-click fix that fits the canvas to the content.
49
- - **Diagrams:** mind maps, technical route charts (the kind in grant proposals and theses), product roadmaps and system architecture diagrams. Lines, branches and arrows are laid out for you and re-flow when you change text or add nodes; colors follow the design style, and a high-resolution PNG or PDF export drops straight into Word or PowerPoint. For grant-proposal and final-report frameworks, the model first lists how the parts relate (which problem maps to which task) for you to confirm, then draws labelled arrows between the blocks, in a bold 3D-gradient "proposal" style by default or after a reference image you give it.
48
+ - **Export and share:** Export makes showcase images, PDF and PowerPoint (links between screens still work), and designs with hundreds of screens export in full (up to 1000). Share has a clickable HTML demo that opens with a double-click (device frame included, ready to send to a client), a temporary online link (beta; opens in WeChat or any browser, closes after 2 hours), and Phone preview, a QR code to see it on your phone at real size. Slides and posters larger than the default size now use the page's real size. You can also set it by adding `WIDTHxHEIGHT` after the type, for example `<meta name="dsh-design" content="slides 1440x810">`. Export options let you pick the page size (16:9, 4:3, A3 landscape or custom), the capture (current viewport, full-length page or a set height) and two screens per page. If anything would be cut off, you get a checklist first, with a one-click fix that fits the size to the content.
49
+ - **Diagrams:** mind maps, technical route charts (the kind in grant proposals and theses), product roadmaps and system architecture diagrams. Roadmaps & diagrams sits right on the home page type row; pick it and a second row offers Technical roadmap (grant proposal), Research framework, Architecture, Mind map and Product roadmap, each with its own example. Lines, branches and arrows are laid out for you and re-flow when you change text or add nodes; colors follow the design style, and a high-resolution PNG or PDF export drops straight into Word or PowerPoint. For grant-proposal and final-report frameworks, the model first lists how the parts relate (which problem maps to which task) for you to confirm, then draws labelled arrows between the blocks, in a bold 3D-gradient "proposal" style by default or after a reference image you give it.
50
50
  - **DSH plugins:** design a plugin inside the real DSH desktop frame (left sidebar entry, settings section, session tab or right sidebar panel, in light and dark). Only the plugin area is designed, so you see exactly how it looks once installed; the design check warns if the frame gets changed.
51
51
  - **Gallery, My designs, Inspiration:** three tabs on the home page. My designs has everything you've designed (and your saved frames, which you can rename or delete); Inspiration holds saved references and styles; the Gallery has templates, design systems and style cards others shared, and "Start from this" copies one for you to keep editing. Submit your own with Share › Submit to gallery: it's checked, zipped and submitted, and listed once reviewed. The gallery catalog comes from npm mirrors and is used only when its signature and checksums match; to keep it offline, turn on "Design library offline" on the Plugins page.
52
52
  - **Your brand, and real code:** give a site URL to extract a brand design system and design with it from then on; turn a finished design into React / Vue / HTML (mini programs straight into uni-app or native WeChat code, HBuilderX projects included), compared screen by screen against the design.
53
53
  - **Built-in photo library:** for designs that rely on photos (hotels, food, cafes, fitness, beauty, fashion, education, travel), the model uses real-looking photos instead of only drawing illustrations. About 8 MB is downloaded the first time it is needed. All of them are AI-generated placeholders, so replace them with real photos before launch.
54
- - **Built-in font library:** click a font row in the Look panel to pick from 18 free, commercially usable fonts (Noto Sans / Serif SC, Smiley Sans, the ZCOOL family, brush and running-script calligraphy, plus Latin faces such as Inter). The page updates at once; saving copies the font files into the design folder, so exports and remote viewing keep them. You can also just ask the model, e.g. "use brush calligraphy for the headline". About 19 MB is downloaded the first time it is needed.
54
+ - **Built-in font library:** click a font row in the Theme panel to pick from 18 free, commercially usable fonts (Noto Sans / Serif SC, Smiley Sans, the ZCOOL family, brush and running-script calligraphy, plus Latin faces such as Inter). The page updates at once; saving copies the font files into the design folder, so exports and remote viewing keep them. You can also just ask the model, e.g. "use brush calligraphy for the headline". About 19 MB is downloaded the first time it is needed.
55
55
  - **Real components:** parts repeated across screens (tab bars, top bars, cards) live as components in `components/`, and each screen uses them as `<c-name>`. Change one component and every screen using it follows; exports are still plain HTML that opens offline. The model pulls out components on its own when it builds several screens, and can convert an existing design too; a broken component shows as a red box in the preview, and the check says exactly where.
56
56
  - **A style that fits the subject:** when you have not chosen a style, the model first picks a style card for the subject (colors, fonts, corner radius) and builds with it, so a homestay app, a bubble-tea shop and a review deck no longer all come out beige. If you name a style or colors, it follows yours.
57
57
  - **Business annotations (experimental, off by default):** turn on "Business annotations" under Design Studio on the Plugins page, and the model also writes `annotations.json` with the rules, states and edge cases the UI does not show. Numbered markers appear on the page and cards in the sidebar, and clicking either one finds the other. Code handoff passes the rules on to developers (#15).
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  </div>
17
17
 
18
- **设计工作台**是 DeepSeek Harness(DSH)的插件:说一句要做什么,模型做的网页、App 界面、小程序、桌面软件、海报、幻灯片、思维导图和路线图在右边画布上一屏屏长出来,套着手机、浏览器或软件窗口外框。看中哪个方向点一下,哪里不对点一下说一句,模型就照着改。
18
+ **设计工作台**是 DeepSeek Harness(DSH)的插件:说一句要做什么,模型做的网页、App 界面、小程序、桌面软件、海报、幻灯片、思维导图和路线图在右边画布上一屏屏长出来,套着手机、浏览器或软件窗口的设备框。看中哪个方向点一下,哪里不对点一下说一句,模型就照着改。
19
19
 
20
20
  ![演示:一句话 → 三个方向 → 挑一个做全套 → 点一下改](assets/demo.gif)
21
21
 
@@ -25,7 +25,7 @@
25
25
  2. **装好后点「立即启用」**。插件默认是关的,不点不生效。
26
26
  3. 新建会话,模式选「设计模式」。不用重启 DSH。
27
27
 
28
- **需要什么**:DSH 桌面版、网页版都能用,Mac、Windows 都行。「设计体检」要电脑上装着 Chrome 或 Edge。
28
+ **需要什么**:DSH 桌面版、网页版都能用,Mac、Windows 都行。「设计检查」要电脑上装着 Chrome 或 Edge。
29
29
 
30
30
  连不上 npm 时 DSH 会自动换国内镜像。更新:DSH 0.2.2 起,在「插件」页点开它,点「更新到 …」;更老的 DSH 先卸载,再添加一次。新版发布后大约一天,按包名才装得到;急的话卸载后填发布包地址 `https://github.com/OrderG-X/dsh-design-studio/releases/latest/download/dsh-design-studio.tgz`(要能连上 GitHub),不过这样装的以后不能点更新。
31
31
 
@@ -37,24 +37,24 @@
37
37
 
38
38
  ## 能做什么
39
39
 
40
- - **1.0 新界面**:顶上一行标题栏(页面设置、换屏、分享、导出、转成代码),底下一条灵动条(说一句或输命令、选择、改字、调样式、画笔、试用、外观、体检),面板一次只开一个,窄栏是抽屉、DSH 全屏时在右边。⇧⌘K(Windows 是 Ctrl+Shift+K)开命令面板,V T S P R L C 一键切工具;动效换成柔和的极光。
40
+ - **1.0 新界面**:顶上一行标题栏(页面设置、换屏、分享、导出、转成代码),底下一条灵动条(说一句或输命令、选择、文字、样式、标注、演示、主题、检查),面板一次只开一个,窄栏是抽屉、DSH 全屏时在右边。⇧⌘K(Windows 是 Ctrl+Shift+K)开命令面板,V T S P R L C 一键切工具;动效换成柔和的极光。
41
41
  - **三个方向挑着做**:先出三个风格不同的首屏并排比,挑中再做全套;单独一屏也能「再出两版」。
42
- - **点一下就改**:点元素或框一块区域,输入框里出现一个小标签(悬停看详情),你只要补一句怎么改;标注、调样式、风格、体检清单这些放进输入框的也都是小标签,不再是一大段字;发出去模型拿到完整的位置和样式。改过的地方在预览里闪一下。也能直接在页面上画圈、画箭头、写字,拼成一张图交给模型,或者复制下来贴到别处。调样式可以「各屏一起改」;你在右侧栏亲手改过的地方,模型下一步会先知道,不会改回去。
42
+ - **点一下就改**:点元素或框一块区域,输入框里出现一个小标签(悬停看详情),你只要补一句怎么改;标注、样式、风格、检查清单这些放进输入框的也都是小标签,不再是一大段字;发出去模型拿到完整的位置和样式。改过的地方在预览里闪一下。也能直接在页面上画圈、画箭头、写字,拼成一张图交给模型,或者复制下来贴到别处。「样式」里可以「各屏一起改」;你在右侧栏亲手改过的地方,模型下一步会先知道,不会改回去。
43
43
  - **打开已有的页面**:首页输入框左边的「+」→「打开 HTML…」选一个,或把 HTML 文件 / 文件夹拖进右侧栏就能预览(桌面版);也能输路径或开发服务器端口。
44
- - **设计体检**:一键查文字溢出、对比度不够、按钮太小、字太小,问题直接标在页面上;模型做完也会自己查一遍再改。
45
- - **点得动的原型**:返回按钮写上 `data-back` 就「从哪来回哪去」;同一个页面的几种样子(空列表 / 有数据 / 已付款)写成状态,不用另做一屏,画布上屏名旁边就能切,体检、导出每个状态都算;共用部件在各屏写得不一样时,体检会提醒(#30)。
44
+ - **设计检查**:一键查文字溢出、对比度不够、按钮太小、字太小,问题直接标在页面上;模型做完也会自己查一遍再改。
45
+ - **点得动的原型**:返回按钮写上 `data-back` 就「从哪来回哪去」;同一个页面的几种样子(空列表 / 有数据 / 已付款)写成状态,不用另做一屏,画布上屏名旁边就能切,检查、导出每个状态都算;共用部件在各屏写得不一样时,检查会提醒(#30)。
46
46
  - **模拟数据**:说「点了要真的变、换页还在」,模型会写一份 `mock.json` 当数据源,页面绑在上面——点「接受 Offer」整个 App 切到在项、打卡后时间变了,换页、刷新都还在;阶段、角色这种全局的东西一处改所有页一起变。底部「数据」打开就是一棵数据树:随手改、一键重置、存成初始数据;HTML 演示也带着数据和「重置数据」按钮(#30)。
47
47
  - **版本和对比**:每轮自动存一版,左右拖动对比,随时回到任意一版。
48
- - **导出和分享**:标题栏「导出」出展示图、PDF、PPT(屏和屏之间的跳转照样能点),几百屏的设计也全部导出(最多 1000 屏);「分享」里有双击就能开的 HTML 演示(带外壳、点得动,发给客户直接看)、临时公网链接(实验,微信里点开就能看,2 小时自动关),扫码在手机上按真机尺寸看。页面比默认画幅大的幻灯片、海报,画幅自动跟页面走;也可以在类型后面跟 `宽x高` 指定,比如 `<meta name="dsh-design" content="slides 1440x810">`。导出选项里可以选版面(16:9、4:3、A3 横向、自定义)、每页取景(一屏、整页、指定高度)和每页拼 2 屏;有内容会被裁时,导出前先给一张清单,可以一键按内容改画幅。
49
- - **图表**:思维导图、技术路线图(申报书、开题报告那种)、产品路线图、系统架构图。连线、分叉、箭头自动排好,改字、加节点自己重排;配色跟着设计风格走,导出高清 PNG 或 PDF 贴进 Word / PPT。申报书、结题报告的框架图先帮你理清「哪个问题对应哪项内容」请你确认再画,版块之间画出带关系词的箭头;默认是立体渐变的「申报书炫酷样式」,也能照你给的参考图画。
50
- - **DSH 插件**:给 DSH 做插件界面时,四周直接套上 DSH 桌面端的外框(左侧栏入口、设置分区、会话标签页、右侧栏面板四个位置,浅色、深色都有),只设计插件那一块,一眼看出装进 DSH 是什么样;外框被改了体检会提醒。
51
- - **市场、我的作品、灵感**:首页顶上三个页签。以前做过的设计(还有自己存的外框,能改名、删除)在「我的作品」,收的参考图和风格在「灵感」;「市场」里逛大家分享的模板、设计系统和风格卡,点「用这个开始」复制一份接着改。自己做的从「分享」›「投稿到市场」交上去,查过打成 zip,审过就上架。市场目录从 npm 镜像取,签了名、核对过才用;不想让它联网,在插件页打开「设计库不联网」。
48
+ - **导出和分享**:标题栏「导出」出展示图、PDF、PPT(屏和屏之间的跳转照样能点),几百屏的设计也全部导出(最多 1000 屏);「分享」里有双击就能开的 HTML 演示(带设备框、点得动,发给客户直接看)、临时的在线链接(测试版,微信里点开就能看,2 小时自动关),还有「手机预览」扫码在手机上按真机尺寸看。页面比默认尺寸大的幻灯片、海报,尺寸自动跟页面走;也可以在类型后面跟 `宽x高` 指定,比如 `<meta name="dsh-design" content="slides 1440x810">`。导出选项里可以选版面(16:9、4:3、A3 横向、自定义)、截取方式(当前可见区域、完整长页、自定义高度)和每页拼 2 屏;有内容会被裁时,导出前先给一张清单,可以一键按内容改尺寸。
49
+ - **路线图·导图**:思维导图、技术路线图(申报书、开题报告那种)、产品路线图、系统架构图。首页类型行里直接选「路线图·导图」,下面再点具体哪种:技术路线图(申报书)· 研究框架图 · 架构图 · 思维导图 · 产品路线图,示例跟着换。连线、分叉、箭头自动排好,改字、加节点自己重排;配色跟着设计风格走,导出高清 PNG 或 PDF 贴进 Word / PPT。申报书、结题报告的框架图先帮你理清「哪个问题对应哪项内容」请你确认再画,版块之间画出带关系词的箭头;默认是立体渐变的「申报书炫酷样式」,也能照你给的参考图画。
50
+ - **DSH 插件**:给 DSH 做插件界面时,四周直接套上 DSH 桌面端的外壳(左侧栏入口、设置分区、会话标签页、右侧栏面板四个位置,浅色、深色都有),只设计插件那一块,一眼看出装进 DSH 是什么样;外壳被改了检查会提醒。
51
+ - **市场、我的作品、灵感**:首页顶上三个页签。以前做过的设计(还有自己存的外壳,能改名、删除)在「我的作品」,收的参考图和风格在「灵感」;「市场」里逛大家分享的模板、设计系统和风格卡,点「用这个开始」复制一份接着改。自己做的从「分享」›「投稿到市场」交上去,查过打成设计包,审过就上架。市场目录从 npm 镜像取,签了名、核对过才用;不想让它联网,在插件页打开「设计库不联网」。
52
52
  - **照品牌风格做、转成代码**:给官网地址,提一套品牌设计系统,以后都照它做;做好的设计转成 React / Vue / HTML,小程序直接转成 uni-app 或原生小程序代码(HBuilderX 建的项目也认得出),逐屏和设计稿比对。
53
53
  - **自带照片库**:民宿酒店、餐饮、奶茶咖啡、健身、美妆、服饰、教育、旅行风景这些靠照片说话的设计,模型会直接用上照片,不再只画插画。第一次用到时下载约 8 MB。都是 AI 生成的示意图,上线前请换成真实照片。
54
- - **自带字体库**:外观面板里点字体那行,就能从 18 款免费可商用字体里挑(思源黑体 / 宋体、得意黑、站酷系列、毛笔楷书、行书,加上 Inter 等英文字体),页面马上换,保存后字体文件放进设计目录,导出、远程看都带着。也可以直接跟模型说「标题用毛笔字」。第一次用到时下载约 19 MB。
55
- - **真组件**:几屏重复的部分(标签栏、顶栏、卡片)写成 `components/` 里的组件,各屏用 `<c-名>` 引用;改一个组件,用到它的屏一起变,导出的成品照样是普通 HTML、离线能开。新做好几屏时模型会自己抽组件,也可以让它把老设计改成组件;组件写错了预览里画红框、体检说清在哪。
54
+ - **自带字体库**:主题面板里点字体那行,就能从 18 款免费可商用字体里挑(思源黑体 / 宋体、得意黑、站酷系列、毛笔楷书、行书,加上 Inter 等英文字体),页面马上换,保存后字体文件放进设计目录,导出、远程看都带着。也可以直接跟模型说「标题用毛笔字」。第一次用到时下载约 19 MB。
55
+ - **真组件**:几屏重复的部分(标签栏、顶栏、卡片)写成 `components/` 里的组件,各屏用 `<c-名>` 引用;改一个组件,用到它的屏一起变,导出的成品照样是普通 HTML、离线能开。新做好几屏时模型会自己抽组件,也可以让它把老设计改成组件;组件写错了预览里画红框、检查说清在哪。
56
56
  - **按题材挑风格**:没定风格时,模型先按题材挑一张风格卡(配色、字体、圆角)再动手,民宿、奶茶店、复盘幻灯片不再都是一个米色调;你自己说了风格或配色就照你的。
57
- - **业务标注(试验,默认关)**:在「插件」页的设计工作台里打开「业务标注」,模型做设计时同时写一份 `annotations.json`,记界面上看不出来的规则、状态和边界。页面上出编号,右侧栏列卡片,点哪边都能定位到另一边;转成代码时这些规则一起交给开发(#15)。
57
+ - **需求说明(试验,默认关)**:在「插件」页的设计工作台里打开「需求说明」,模型做设计时同时写一份 `annotations.json`,记界面上看不出来的规则、状态和边界。页面上出编号,右侧栏列卡片,点哪边都能定位到另一边;转成代码时这些规则一起交给开发(#15)。
58
58
 
59
59
  全部功能、工具参数和安全设计见[完整功能](https://github.com/OrderG-X/dsh-design-studio/blob/main/docs/功能详解.md);开发和测试见[开发说明](https://github.com/OrderG-X/dsh-design-studio/blob/main/docs/开发.md)。
60
60
 
@@ -166,7 +166,7 @@ export function annotationFindings(all, found) {
166
166
 
167
167
  /** 给 ui-design 技能补的一段(开关开着才加) */
168
168
  export function annotationSection() {
169
- return '\n\n## 业务标注(用户打开了这个试验开关)\n\n' +
169
+ return '\n\n## 业务标注(用户打开了这个试验开关;界面上叫「需求说明」,跟用户说话用这个叫法)\n\n' +
170
170
  '每套新设计都带一份 `annotations.json`(放在设计目录,和 `tokens.css` 并排),不用等用户说。字段、例子、选择器怎么写,看 `references/annotations.md`。\n\n' +
171
171
  '- **什么时候写**:一套设计的屏都做完、最后一次 `check_design` 之前写;之后改了设计,同步改它。\n' +
172
172
  '- **写什么**:界面上看不出来的规则、状态、边界、数据口径,每屏 3–8 条,不复述页面上的字。\n' +