dsh-design-studio 0.21.0 → 0.22.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 +1 -0
- package/README.md +1 -0
- package/lib/client.js +27 -14
- package/lib/core.js +2 -1
- package/lib/gallery/policy.js +2 -2
- package/lib/index.js +4 -4
- package/lib/look.js +6 -3
- package/lib/picker.js +58 -3
- package/lib/styles.js +1 -0
- package/package.json +1 -1
- package/skills/ui-design/SKILL.md +2 -1
- package/skills/ui-design/frames/dsh/dsh-shell.css +132 -0
- package/skills/ui-design/frames/dsh/frame.json +59 -0
- package/skills/ui-design/frames/dsh/panel.html +51 -0
- package/skills/ui-design/frames/dsh/settings.html +57 -0
- package/skills/ui-design/frames/dsh/sidebar.html +36 -0
- package/skills/ui-design/frames/dsh/view.html +40 -0
- package/skills/ui-design/references/dshplugin.md +66 -0
package/README.en.md
CHANGED
|
@@ -44,6 +44,7 @@ If DSH can't reach the npm registry, it falls back to a mirror in China. To upda
|
|
|
44
44
|
- **Versions and compare:** every turn is saved; drag a slider to compare, and go back to any version.
|
|
45
45
|
- **Export and phone preview:** showcase images, PDF and PowerPoint (links between screens still work); scan 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.
|
|
46
46
|
- **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.
|
|
47
|
+
- **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.
|
|
47
48
|
- **Design library and gallery:** everything you've designed, plus saved references and styles, lives in the Library. Browse templates, design systems and style cards others shared, and "Start from this" copies one for you to keep editing. Share your own with "Share to the gallery": it's checked, zipped and submitted on a web page, 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.
|
|
48
49
|
- **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.
|
|
49
50
|
- **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.
|
package/README.md
CHANGED
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
- **版本和对比**:每轮自动存一版,左右拖动对比,随时回到任意一版。
|
|
45
45
|
- **导出和手机上看**:导出展示图、PDF、PPT(屏和屏之间的跳转照样能点);扫码在手机上按真机尺寸看。页面比默认画幅大的幻灯片、海报,画幅自动跟页面走;也可以在类型后面跟 `宽x高` 指定,比如 `<meta name="dsh-design" content="slides 1440x810">`。导出选项里可以选版面(16:9、4:3、A3 横向、自定义)、每页取景(一屏、整页、指定高度)和每页拼 2 屏;有内容会被裁时,导出前先给一张清单,可以一键按内容改画幅。
|
|
46
46
|
- **图表**:思维导图、技术路线图(申报书、开题报告那种)、产品路线图、系统架构图。连线、分叉、箭头自动排好,改字、加节点自己重排;配色跟着设计风格走,导出高清 PNG 或 PDF 贴进 Word / PPT。申报书、结题报告的框架图先帮你理清「哪个问题对应哪项内容」请你确认再画,版块之间画出带关系词的箭头;默认是立体渐变的「申报书炫酷样式」,也能照你给的参考图画。
|
|
47
|
+
- **DSH 插件**:给 DSH 做插件界面时,四周直接套上 DSH 桌面端的外框(左侧栏入口、设置分区、会话标签页、右侧栏面板四个位置,浅色、深色都有),只设计插件那一块,一眼看出装进 DSH 是什么样;外框被改了体检会提醒。
|
|
47
48
|
- **设计库和设计市场**:以前做过的设计、收的参考图和风格都在「设计库」里;市场里逛大家分享的模板、设计系统和风格卡,点「用这个开始」复制一份接着改。自己做的点「分享到设计市场」,查过打成 zip,在网页里交上去,审过就上架。市场目录从 npm 镜像取,签了名、核对过才用;不想让它联网,在插件页打开「设计库不联网」。
|
|
48
49
|
- **照品牌风格做、转成代码**:给官网地址,提一套品牌设计系统,以后都照它做;做好的设计转成 React / Vue / HTML,小程序直接转成 uni-app 或原生小程序代码(HBuilderX 建的项目也认得出),逐屏和设计稿比对。
|
|
49
50
|
- **自带照片库**:民宿酒店、餐饮、奶茶咖啡、健身、美妆、服饰、教育、旅行风景这些靠照片说话的设计,模型会直接用上照片,不再只画插画。第一次用到时下载约 8 MB。都是 AI 生成的示意图,上线前请换成真实照片。
|
package/lib/client.js
CHANGED
|
@@ -61,6 +61,7 @@ window.__ModuleLoader__.load({
|
|
|
61
61
|
exSlides: '新品发布会的五页幻灯片:问题、方案、数字、价格、下一步',
|
|
62
62
|
exEmail: '会员生日月的优惠邮件:一张大图、一段祝福、一个按钮',
|
|
63
63
|
exDiagram: '「产品经理入门」的思维导图:用户研究、需求分析、原型、数据、项目管理',
|
|
64
|
+
exDshplugin: "做一个 DSH 插件「番茄钟」:会话标签页里放计时器和今日记录",
|
|
64
65
|
askKindLine: '类型:{k}',
|
|
65
66
|
askMore: '更多开始方式',
|
|
66
67
|
askMoreD: '打开已有的 HTML、用自己的品牌、从设计库打开',
|
|
@@ -153,7 +154,7 @@ window.__ModuleLoader__.load({
|
|
|
153
154
|
canvas: '画布:几屏并排看',
|
|
154
155
|
single: '单页:只看一屏',
|
|
155
156
|
sizes: '多尺寸:同一屏在手机 / 平板 / 电脑上并排看',
|
|
156
|
-
sizesNo: '
|
|
157
|
+
sizesNo: '海报、幻灯片、邮件、图表、DSH 插件是固定画幅,没有多尺寸',
|
|
157
158
|
szPhone: '手机',
|
|
158
159
|
szTablet: '平板',
|
|
159
160
|
szDesktop: '电脑',
|
|
@@ -170,6 +171,7 @@ window.__ModuleLoader__.load({
|
|
|
170
171
|
kindSlides: '幻灯片',
|
|
171
172
|
kindEmail: '邮件',
|
|
172
173
|
kindDiagram: '图表',
|
|
174
|
+
kindDshplugin: "DSH 插件",
|
|
173
175
|
tokens: '设计规范',
|
|
174
176
|
tokensTip: '点一个放进输入框,补一句怎么改;改它所有屏一起变',
|
|
175
177
|
tokensEmpty: '这套设计还没有设计变量(:root 上的 CSS 变量),颜色字号散在各处,改起来不统一。',
|
|
@@ -275,6 +277,7 @@ window.__ModuleLoader__.load({
|
|
|
275
277
|
ck_dgtext: '节点字太多',
|
|
276
278
|
ck_dgsmall: '字偏小',
|
|
277
279
|
ck_dglink: '箭头没对着模块',
|
|
280
|
+
ck_frame: '外框被改动',
|
|
278
281
|
cd_hscroll: '伸出屏幕 {px}px',
|
|
279
282
|
cd_clipped: '被切掉 {px}px',
|
|
280
283
|
cd_overflow: '伸出框 {px}px',
|
|
@@ -303,6 +306,7 @@ window.__ModuleLoader__.load({
|
|
|
303
306
|
cd_dgbar: '从第 {from} 段起占 {span} 段,时间轴只有 {cols} 段',
|
|
304
307
|
cd_dgtext: '{chars} 个字(最好 ≤ {max}):写关键词,补充放小字',
|
|
305
308
|
cd_dglink: '这排箭头和上下两层的模块对不上:个数要一样,层里的递进改用不占位的箭头',
|
|
309
|
+
cd_frame: 'DSH 的外框和模板对不上:外框要原样复制,插件只写在 data-slot 里面,样式都从 [data-slot="main"] 开头',
|
|
306
310
|
cd_dgsmall: '正文约 {px}px、画幅 {vw} 宽:贴进 Word 只有约 {pt} 磅。把字放大到 {need}px 左右,或把画幅改窄',
|
|
307
311
|
ckOs_mac: ' Mac ',
|
|
308
312
|
ckOs_win: ' Windows ',
|
|
@@ -946,6 +950,7 @@ window.__ModuleLoader__.load({
|
|
|
946
950
|
exSlides: 'Five-slide launch deck: problem, solution, numbers, pricing, next steps',
|
|
947
951
|
exEmail: 'Birthday-month offer email for members: one big image, a short note, one button',
|
|
948
952
|
exDiagram: 'A mind map for "Product management 101": user research, requirements, prototyping, data, project management',
|
|
953
|
+
exDshplugin: "A DSH plugin \"Pomodoro\": a timer and today's log in a session tab",
|
|
949
954
|
askKindLine: 'Type: {k}',
|
|
950
955
|
askMore: 'More ways to start',
|
|
951
956
|
askMoreD: 'Open existing HTML, use your own brand, open from the library',
|
|
@@ -1038,7 +1043,7 @@ window.__ModuleLoader__.load({
|
|
|
1038
1043
|
canvas: 'Canvas: screens side by side',
|
|
1039
1044
|
single: 'Single: one screen',
|
|
1040
1045
|
sizes: 'Sizes: the same screen on phone, tablet and desktop side by side',
|
|
1041
|
-
sizesNo: 'Posters, slides, emails and
|
|
1046
|
+
sizesNo: 'Posters, slides, emails, diagrams and DSH plugins have a fixed size',
|
|
1042
1047
|
szPhone: 'Phone',
|
|
1043
1048
|
szTablet: 'Tablet',
|
|
1044
1049
|
szDesktop: 'Desktop',
|
|
@@ -1055,6 +1060,7 @@ window.__ModuleLoader__.load({
|
|
|
1055
1060
|
kindSlides: 'Slides',
|
|
1056
1061
|
kindEmail: 'Email',
|
|
1057
1062
|
kindDiagram: 'Diagram',
|
|
1063
|
+
kindDshplugin: "DSH plugin",
|
|
1058
1064
|
tokens: 'Design tokens',
|
|
1059
1065
|
tokensTip: 'Click one to put it in the input, then say how to change it. All screens follow',
|
|
1060
1066
|
tokensEmpty: 'This design has no tokens yet (CSS variables on :root), so colors and sizes are scattered.',
|
|
@@ -1160,6 +1166,7 @@ window.__ModuleLoader__.load({
|
|
|
1160
1166
|
ck_dgtext: 'Node text too long',
|
|
1161
1167
|
ck_dgsmall: 'Text too small',
|
|
1162
1168
|
ck_dglink: 'Arrows miss the modules',
|
|
1169
|
+
ck_frame: 'Frame was changed',
|
|
1163
1170
|
cd_hscroll: 'sticks out {px}px',
|
|
1164
1171
|
cd_clipped: '{px}px cut off',
|
|
1165
1172
|
cd_overflow: 'sticks out {px}px',
|
|
@@ -1188,6 +1195,7 @@ window.__ModuleLoader__.load({
|
|
|
1188
1195
|
cd_dgbar: 'starts at period {from} and spans {span}, but the timeline has only {cols}',
|
|
1189
1196
|
cd_dgtext: '{chars} characters ({max} at most): use keywords, put details in small text',
|
|
1190
1197
|
cd_dglink: 'this row of arrows does not line up with the modules above and below: use as many arrows as modules, and arrows that take no space inside a layer',
|
|
1198
|
+
cd_frame: 'the DSH frame no longer matches its template: copy the frame as is, write the plugin only inside data-slot, and start every style rule with [data-slot="main"]',
|
|
1191
1199
|
cd_dgsmall: 'body text is about {px}px on a {vw}px-wide canvas: about {pt}pt once placed in a Word page. Enlarge it to about {need}px or make the canvas narrower',
|
|
1192
1200
|
ckOs_mac: ' Mac ',
|
|
1193
1201
|
ckOs_win: ' Windows ',
|
|
@@ -2140,6 +2148,7 @@ window.__ModuleLoader__.load({
|
|
|
2140
2148
|
.ddp-wait .card.k-slides{aspect-ratio:16/9}
|
|
2141
2149
|
.ddp-wait .card.k-email{width:min(60%,380px);aspect-ratio:3/4}
|
|
2142
2150
|
.ddp-wait .card.k-diagram{aspect-ratio:16/10}
|
|
2151
|
+
.ddp-wait .card.k-dshplugin{aspect-ratio:16/10}
|
|
2143
2152
|
.ddp-wait .card:has(.ddp-gd){animation:none}
|
|
2144
2153
|
.ddp-wait p{margin:0;color:var(--dsw-alias-label-tertiary);text-align:center;line-height:1.6}
|
|
2145
2154
|
.ddp-toast{position:absolute;left:12px;right:12px;top:14px;width:fit-content;max-width:calc(100% - 24px);margin-inline:auto;z-index:7;padding:7px 14px;border-radius:14px;background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-1);font-size:12px;line-height:1.5;text-align:center;overflow-wrap:anywhere;box-shadow:0 6px 20px rgba(0,0,0,.2);animation:ddp-in .2s ease}
|
|
@@ -2826,6 +2835,7 @@ ${Object.entries(CHIP_ICON).map(([k, d]) => `[data-composer-chip="${chipSrc(k)}"
|
|
|
2826
2835
|
slides: () => svg([h('rect', { key: 1, x: 2.5, y: 4, width: 19, height: 12, rx: 1.8 }), h('path', { key: 2, d: 'M12 16v3M8.5 20.5h7' }), h('path', { key: 3, d: 'M6.5 8h6M6.5 11h4' })]),
|
|
2827
2836
|
email: () => svg([h('rect', { key: 1, x: 3, y: 5, width: 18, height: 14, rx: 2.2 }), h('path', { key: 2, d: 'M3.5 6.5l8.5 6.5 8.5-6.5' })]),
|
|
2828
2837
|
diagram: () => svg([h('rect', { key: 1, x: 2.5, y: 9.5, width: 6, height: 5, rx: 1.4 }), h('rect', { key: 2, x: 15.5, y: 3.5, width: 6, height: 4, rx: 1.2 }), h('rect', { key: 3, x: 15.5, y: 10, width: 6, height: 4, rx: 1.2 }), h('rect', { key: 4, x: 15.5, y: 16.5, width: 6, height: 4, rx: 1.2 }), h('path', { key: 5, d: 'M8.5 12h3.5M12 5.5v13M12 5.5h3.5M12 12h3.5M12 18.5h3.5' })]),
|
|
2838
|
+
dshplugin: () => svg([h('rect', { key: 1, x: 2.5, y: 4, width: 19, height: 16, rx: 2 }), h('path', { key: 2, d: 'M8 4v16' }), h('rect', { key: 3, x: 11, y: 8, width: 7.5, height: 8, rx: 1.4, strokeDasharray: '2 1.6' })]),
|
|
2829
2839
|
caret: () => svg([h('path', { key: 1, d: 'M6 9.5l6 6 6-6', strokeWidth: 2.4 })], { className: 'cr' }),
|
|
2830
2840
|
palette: () => svg([h('path', { key: 1, d: 'M12 3a9 9 0 1 0 0 18c1.1 0 1.7-.8 1.7-1.6 0-.9-.8-1.3-.8-2.1 0-.9.8-1.6 1.7-1.6H17a4 4 0 0 0 4-4C21 6.8 17 3 12 3z' }),
|
|
2831
2841
|
h('circle', { key: 2, cx: 7.6, cy: 11.2, r: 1.25, fill: 'currentColor', stroke: 'none' }), h('circle', { key: 3, cx: 10.2, cy: 7.4, r: 1.25, fill: 'currentColor', stroke: 'none' }),
|
|
@@ -3781,6 +3791,7 @@ ${Object.entries(CHIP_ICON).map(([k, d]) => `[data-composer-chip="${chipSrc(k)}"
|
|
|
3781
3791
|
function autoStyle(text, kind) {
|
|
3782
3792
|
const s = String(text || '')
|
|
3783
3793
|
if (!s.trim()) return null
|
|
3794
|
+
if (kind === 'dshplugin') return null // DSH 插件默认用 DSH 自己的样子(外框的 --dsh-* 变量),不替它挑风格卡
|
|
3784
3795
|
const said = s.replace(NOT_STYLE_FENG, ' ')
|
|
3785
3796
|
if (SAID_STYLE.test(said) || STYLES.some((x) => said.includes(x.zh) || new RegExp(`\\b${x.en}\\s+(style|look|theme|aesthetic|vibe)\\b`, 'i').test(said))) return null
|
|
3786
3797
|
const by = (id) => STYLES.find((x) => x.id === id) || null
|
|
@@ -4078,7 +4089,7 @@ ${Object.entries(CHIP_ICON).map(([k, d]) => `[data-composer-chip="${chipSrc(k)}"
|
|
|
4078
4089
|
|
|
4079
4090
|
// ── 导出图片:设备外框、整套展示图 ───────────────────────────────────────
|
|
4080
4091
|
|
|
4081
|
-
const SHOW_COLS = { app: 4, miniprogram: 4, tablet: 3, desktop: 2, web: 2, poster: 3, slides: 2, email: 3, diagram: 2 }
|
|
4092
|
+
const SHOW_COLS = { app: 4, miniprogram: 4, tablet: 3, desktop: 2, web: 2, poster: 3, slides: 2, email: 3, diagram: 2, dshplugin: 2 }
|
|
4082
4093
|
const CANVAS_FONT = '-apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif'
|
|
4083
4094
|
const FRAMED = { app: 1, miniprogram: 1, tablet: 1, desktop: 1, web: 1 }
|
|
4084
4095
|
|
|
@@ -4561,12 +4572,12 @@ ${Object.entries(CHIP_ICON).map(([k, d]) => `[data-composer-chip="${chipSrc(k)}"
|
|
|
4561
4572
|
|
|
4562
4573
|
// ── 设计类型:画幅和外框 ─────────────────────────────────────────────────
|
|
4563
4574
|
|
|
4564
|
-
const KIND_LIST = ['web', 'app', 'miniprogram', 'tablet', 'desktop', 'poster', 'slides', 'email', 'diagram']
|
|
4565
|
-
const KIND_KEY = { web: 'kindWeb', app: 'kindApp', miniprogram: 'kindMini', tablet: 'kindTablet', desktop: 'kindDesktop', poster: 'kindPoster', slides: 'kindSlides', email: 'kindEmail', diagram: 'kindDiagram' }
|
|
4575
|
+
const KIND_LIST = ['web', 'app', 'miniprogram', 'tablet', 'desktop', 'poster', 'slides', 'email', 'diagram', 'dshplugin']
|
|
4576
|
+
const KIND_KEY = { web: 'kindWeb', app: 'kindApp', miniprogram: 'kindMini', tablet: 'kindTablet', desktop: 'kindDesktop', poster: 'kindPoster', slides: 'kindSlides', email: 'kindEmail', diagram: 'kindDiagram', dshplugin: 'kindDshplugin' }
|
|
4566
4577
|
const GHOST_MS = 90000 // 这么久没出新屏就撤掉「生成中…」占位
|
|
4567
4578
|
const HOLD_MAX = 15000 // 草稿放到一半真文件就落地了:最多再放这么久(一般几秒放完自己说一声)
|
|
4568
4579
|
const EDIT_GRACE_MS = 3000 // 退出改字后这么久里,页面交上来的最后一处改动还收
|
|
4569
|
-
const KIND_SIZE = { web: [1280, 800], app: [390, 844], miniprogram: [375, 812], tablet: [820, 1180], desktop: [1280, 800], poster: [1080, 1350], slides: [1280, 720], email: [640, 960], diagram: [1600, 1000] }
|
|
4580
|
+
const KIND_SIZE = { web: [1280, 800], app: [390, 844], miniprogram: [375, 812], tablet: [820, 1180], desktop: [1280, 800], poster: [1080, 1350], slides: [1280, 720], email: [640, 960], diagram: [1600, 1000], dshplugin: [1280, 800] }
|
|
4570
4581
|
// 外框:pad 边框厚度、top 顶上一条(浏览器栏)、r 外圆角、ir 屏幕圆角、island 灵动岛离顶的距离、capsule 小程序右上角的胶囊、win 桌面软件的窗口按钮
|
|
4571
4582
|
const FRAME = {
|
|
4572
4583
|
web: { pad: 0, top: 34, r: 10, ir: 0 },
|
|
@@ -4578,6 +4589,7 @@ ${Object.entries(CHIP_ICON).map(([k, d]) => `[data-composer-chip="${chipSrc(k)}"
|
|
|
4578
4589
|
slides: { pad: 0, top: 0, r: 8, ir: 8 },
|
|
4579
4590
|
email: { pad: 0, top: 0, r: 10, ir: 10 },
|
|
4580
4591
|
diagram: { pad: 0, top: 0, r: 8, ir: 8 },
|
|
4592
|
+
dshplugin: { pad: 0, top: 0, r: 10, ir: 10 },
|
|
4581
4593
|
}
|
|
4582
4594
|
|
|
4583
4595
|
/** 某个大小的外框:矮的手机(SE 那种,高不到宽的 1.9 倍)没有灵动岛,不然压住页面最上面 */
|
|
@@ -4590,7 +4602,7 @@ ${Object.entries(CHIP_ICON).map(([k, d]) => `[data-composer-chip="${chipSrc(k)}"
|
|
|
4590
4602
|
// 桌面软件的窗口按钮(和 picker.js 的一样):Mac 红绿灯在左上 x 20、y 20 起,三个 12px 圆点隔 8;Windows 最小化 / 最大化 / 关闭在右上角,各 46×32
|
|
4591
4603
|
const LIGHTS = { x: 20, y: 20, d: 12, gap: 8 }
|
|
4592
4604
|
const WINBTN = { w: 46, h: 32 }
|
|
4593
|
-
const META_ALIAS = { phone: 'app', mobile: 'app', ios: 'app', android: 'app', mini: 'miniprogram', miniapp: 'miniprogram', weapp: 'miniprogram', wechat: 'miniprogram', 小程序: 'miniprogram', pad: 'tablet', ipad: 'tablet', pc: 'desktop', electron: 'desktop', tauri: 'desktop', mac: 'desktop', macos: 'desktop', windows: 'desktop', win: 'desktop', 桌面: 'desktop', 桌面软件: 'desktop', social: 'poster', image: 'poster', slide: 'slides', deck: 'slides', ppt: 'slides', mail: 'email', mindmap: 'diagram', roadmap: 'diagram', architecture: 'diagram', flowchart: 'diagram', 思维导图: 'diagram', 导图: 'diagram', 路线图: 'diagram', 架构图: 'diagram', 图表: 'diagram' }
|
|
4605
|
+
const META_ALIAS = { phone: 'app', mobile: 'app', ios: 'app', android: 'app', mini: 'miniprogram', miniapp: 'miniprogram', weapp: 'miniprogram', wechat: 'miniprogram', 小程序: 'miniprogram', pad: 'tablet', ipad: 'tablet', pc: 'desktop', electron: 'desktop', tauri: 'desktop', mac: 'desktop', macos: 'desktop', windows: 'desktop', win: 'desktop', 桌面: 'desktop', 桌面软件: 'desktop', social: 'poster', image: 'poster', slide: 'slides', deck: 'slides', ppt: 'slides', mail: 'email', mindmap: 'diagram', roadmap: 'diagram', architecture: 'diagram', flowchart: 'diagram', 思维导图: 'diagram', 导图: 'diagram', 路线图: 'diagram', 架构图: 'diagram', 图表: 'diagram', dsh: 'dshplugin', 'dsh-plugin': 'dshplugin', dsh插件: 'dshplugin' }
|
|
4594
4606
|
|
|
4595
4607
|
/** 页面里 <meta name="dsh-design" content="app"> / "poster 1080x1920" / "desktop windows" → { kind, size, os }(os:win,不写是 Mac) */
|
|
4596
4608
|
function parseMeta(content) {
|
|
@@ -5071,6 +5083,7 @@ ${Object.entries(CHIP_ICON).map(([k, d]) => `[data-composer-chip="${chipSrc(k)}"
|
|
|
5071
5083
|
slides: [[6, 10, 60, 13], [6, 32, 40, 52], [52, 32, 42, 52]],
|
|
5072
5084
|
email: [[10, 4, 80, 7], [10, 14, 80, 30], [10, 48, 60, 5], [10, 56, 80, 14], [10, 75, 30, 6]],
|
|
5073
5085
|
diagram: [[38, 40, 24, 18], [6, 14, 22, 10], [6, 45, 22, 10], [6, 76, 22, 10], [72, 14, 22, 10], [72, 45, 22, 10], [72, 76, 22, 10]],
|
|
5086
|
+
dshplugin: [[0, 0, 22, 100], [26, 6, 40, 8], [26, 20, 70, 74]],
|
|
5074
5087
|
}
|
|
5075
5088
|
const GD_C = ['#4d6bfe', '#e8590c', '#0ca678']
|
|
5076
5089
|
/** 占位里的鼠标什么时候动:换了在做的事、或者又写了 15 行就加一;不在生成就不动 */
|
|
@@ -7043,7 +7056,7 @@ ${Object.entries(CHIP_ICON).map(([k, d]) => `[data-composer-chip="${chipSrc(k)}"
|
|
|
7043
7056
|
const n = { name: name || t('exThisName') } // 写出是哪一屏,别只说「这一屏」
|
|
7044
7057
|
if (FRAMED[kind]) items.push(['frame', I.single, t('exFrame', n)])
|
|
7045
7058
|
items.push(['raw', I.image, t('exRaw', n)])
|
|
7046
|
-
if (kind !== 'poster' && kind !== 'slides' && kind !== 'diagram') items.push(['long', I.long, t('exLong', n)]) // 海报、幻灯片、图表画幅是定的,没有「整页」
|
|
7059
|
+
if (kind !== 'poster' && kind !== 'slides' && kind !== 'diagram' && kind !== 'dshplugin') items.push(['long', I.long, t('exLong', n)]) // 海报、幻灯片、图表画幅是定的,没有「整页」
|
|
7047
7060
|
if (count > 1) items.push(['show', I.canvas, t('exShow')])
|
|
7048
7061
|
items.push(['pdf', I.pdf, t('exPdf')], ['pptx', I.deck, t('exPptx')], ['opts', I.sliders, t('exOpts')])
|
|
7049
7062
|
return items
|
|
@@ -7406,7 +7419,7 @@ ${Object.entries(CHIP_ICON).map(([k, d]) => `[data-composer-chip="${chipSrc(k)}"
|
|
|
7406
7419
|
|
|
7407
7420
|
// ── 设计库 › 市场 ──
|
|
7408
7421
|
const GALLERY_REPO = 'https://github.com/OrderG-X/dsh-design-gallery'
|
|
7409
|
-
const MK_KINDS = ['web', 'app', 'miniprogram', 'tablet', 'desktop', 'poster', 'slides', 'email', 'diagram']
|
|
7422
|
+
const MK_KINDS = ['web', 'app', 'miniprogram', 'tablet', 'desktop', 'poster', 'slides', 'email', 'diagram', 'dshplugin']
|
|
7410
7423
|
const mkPick = (t, x) => { const o = x || {}; return String((t('lang') === 'en' ? o.en || o.zh : o.zh || o.en) || '') }
|
|
7411
7424
|
const mkUrl = (e) => e.submission || `${GALLERY_REPO}/tree/main/${e.type === 'system' ? 'systems' : e.type === 'style' ? 'styles' : 'templates'}/${e.id}`
|
|
7412
7425
|
const mkErr = (t, e) => { const k = String((e && e.message) || e || ''); const m = t('mkErr_' + k); return m && m !== 'mkErr_' + k ? m : k }
|
|
@@ -7470,8 +7483,8 @@ ${Object.entries(CHIP_ICON).map(([k, d]) => `[data-composer-chip="${chipSrc(k)}"
|
|
|
7470
7483
|
}
|
|
7471
7484
|
|
|
7472
7485
|
// 首页大输入框:说一句 + 类型 + 风格 → onSend(发给模型)。没写字时 Tab 用占位里的例子
|
|
7473
|
-
const ASK_KINDS = ['app', 'miniprogram', 'web', 'poster', 'slides', 'diagram', 'tablet', 'desktop', 'email']
|
|
7474
|
-
const ASK_EX = { web: 'exWeb', app: 'exApp', miniprogram: 'exMini', tablet: 'exTablet', desktop: 'exDesktop', poster: 'exPoster', slides: 'exSlides', email: 'exEmail', diagram: 'exDiagram' }
|
|
7486
|
+
const ASK_KINDS = ['app', 'miniprogram', 'web', 'poster', 'slides', 'diagram', 'dshplugin', 'tablet', 'desktop', 'email']
|
|
7487
|
+
const ASK_EX = { web: 'exWeb', app: 'exApp', miniprogram: 'exMini', tablet: 'exTablet', desktop: 'exDesktop', poster: 'exPoster', slides: 'exSlides', email: 'exEmail', diagram: 'exDiagram', dshplugin: 'exDshplugin' }
|
|
7475
7488
|
function HomeAsk({ t, onSend, onRef, plus, draft, note, autoFocus }) {
|
|
7476
7489
|
const d0 = (draft && draft.current) || {}
|
|
7477
7490
|
const [text, setText] = useState(d0.text || '')
|
|
@@ -7689,7 +7702,7 @@ ${Object.entries(CHIP_ICON).map(([k, d]) => `[data-composer-chip="${chipSrc(k)}"
|
|
|
7689
7702
|
isTpl ? h('button', { className: 'ddp-pbtn', disabled: busy, title: t('mkUseTip'), onClick: use }, t('mkUse')) : null,
|
|
7690
7703
|
e.type === 'system' ? h('button', { className: 'ddp-pbtn', disabled: busy, onClick: install }, t('mkInstall')) : null,
|
|
7691
7704
|
// 海报、幻灯片、图表是定尺寸的画面、没什么可点的:只看截图(实时看会按原尺寸撑出框)
|
|
7692
|
-
!err && e.type !== 'style' && e.kind !== 'poster' && e.kind !== 'slides' && e.kind !== 'diagram' ? h('button', { className: 'ddp-sbtn', disabled: busy, title: t('mkLiveTip'), onClick: () => (live ? setLive(null) : goLive()) }, live ? t('mkShotsBack') : t('mkLive')) : null,
|
|
7705
|
+
!err && e.type !== 'style' && e.kind !== 'poster' && e.kind !== 'slides' && e.kind !== 'diagram' && e.kind !== 'dshplugin' ? h('button', { className: 'ddp-sbtn', disabled: busy, title: t('mkLiveTip'), onClick: () => (live ? setLive(null) : goLive()) }, live ? t('mkShotsBack') : t('mkLive')) : null,
|
|
7693
7706
|
e.type !== 'style' ? h('button', { className: 'ddp-sbtn' + (fav ? ' on' : ''), title: t('mkFavTip'), 'aria-pressed': !!fav, onClick: toggleFav }, fav ? '★ ' + t('mkFaved') : '☆ ' + t('mkFav')) : null),
|
|
7694
7707
|
h('ul', { className: 'facts' },
|
|
7695
7708
|
h('li', null, t('mkSafe')),
|
|
@@ -7728,7 +7741,7 @@ ${Object.entries(CHIP_ICON).map(([k, d]) => `[data-composer-chip="${chipSrc(k)}"
|
|
|
7728
7741
|
* over 比画幅大(横向永远会被裁;幻灯片、海报竖向也算);long 长页只截到一部分;dead 点了没反应的链接
|
|
7729
7742
|
*/
|
|
7730
7743
|
function precheckOf(list, kind, limit) {
|
|
7731
|
-
const fixed = kind === 'slides' || kind === 'poster' || kind === 'diagram'
|
|
7744
|
+
const fixed = kind === 'slides' || kind === 'poster' || kind === 'diagram' || kind === 'dshplugin'
|
|
7732
7745
|
const r = { over: 0, long: 0, moved: 0, dead: 0, fail: 0, ai: new Set(list.flatMap((m) => (Array.isArray(m.aiPhotos) ? m.aiPhotos : []))).size }
|
|
7733
7746
|
for (const m of list) {
|
|
7734
7747
|
if (m.failed) { r.fail++; continue }
|
|
@@ -7744,7 +7757,7 @@ ${Object.entries(CHIP_ICON).map(([k, d]) => `[data-composer-chip="${chipSrc(k)}"
|
|
|
7744
7757
|
|
|
7745
7758
|
/** 「按内容改画幅」改成多大:'宽x高',不用改或改不了返回 ''。幻灯片、海报按量到的版面,别的只把宽度加上去;竖着堆了好几页的不改高 */
|
|
7746
7759
|
function fitCanvas(list, kind, size) {
|
|
7747
|
-
const fixed = kind === 'slides' || kind === 'poster' || kind === 'diagram'
|
|
7760
|
+
const fixed = kind === 'slides' || kind === 'poster' || kind === 'diagram' || kind === 'dshplugin'
|
|
7748
7761
|
let [W, H] = size
|
|
7749
7762
|
for (const m of list) {
|
|
7750
7763
|
if (m.failed) continue
|
package/lib/core.js
CHANGED
|
@@ -35,7 +35,7 @@ const MAX_SCREENS = 60 // 右侧最多显示几屏,再多的收起来并提示
|
|
|
35
35
|
const MAX_ROUTES = 300 // 开发服务器的路由先都记着(只为算出收起了几屏);再多就是写飞了
|
|
36
36
|
|
|
37
37
|
// 设计类型:决定右侧用什么画幅显示(网页框、手机、小程序、平板、桌面软件窗口、海报、幻灯片、邮件、图表)
|
|
38
|
-
export const KINDS = ['web', 'app', 'miniprogram', 'tablet', 'desktop', 'poster', 'slides', 'email', 'diagram']
|
|
38
|
+
export const KINDS = ['web', 'app', 'miniprogram', 'tablet', 'desktop', 'poster', 'slides', 'email', 'diagram', 'dshplugin']
|
|
39
39
|
const KIND_ALIAS = {
|
|
40
40
|
website: 'web', site: 'web', page: 'web', landing: 'web', dashboard: 'web',
|
|
41
41
|
phone: 'app', mobile: 'app', ios: 'app', android: 'app',
|
|
@@ -46,6 +46,7 @@ const KIND_ALIAS = {
|
|
|
46
46
|
slide: 'slides', deck: 'slides', ppt: 'slides', presentation: 'slides',
|
|
47
47
|
mail: 'email', newsletter: 'email', edm: 'email',
|
|
48
48
|
mindmap: 'diagram', 'mind-map': 'diagram', roadmap: 'diagram', architecture: 'diagram', arch: 'diagram', flowchart: 'diagram', 思维导图: 'diagram', 导图: 'diagram', 脑图: 'diagram', 路线图: 'diagram', 技术路线图: 'diagram', 架构图: 'diagram', 图表: 'diagram',
|
|
49
|
+
dsh: 'dshplugin', 'dsh-plugin': 'dshplugin', dshplug: 'dshplugin', harness: 'dshplugin', dsh插件: 'dshplugin', 'dsh 插件': 'dshplugin',
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
/** 类型名(含常见别名)→ KINDS 里的一个;认不出返回 '' */
|
package/lib/gallery/policy.js
CHANGED
|
@@ -38,10 +38,10 @@ export const capsOf = (mode) => (mode === 'share' || mode === 'ci'
|
|
|
38
38
|
: { files: LIMITS.localFiles, screens: LIMITS.localScreens, total: LIMITS.localTotal })
|
|
39
39
|
export const TYPES = ['template', 'system', 'style']
|
|
40
40
|
export const LICENSES = ['CC0-1.0', 'CC-BY-4.0']
|
|
41
|
-
export const KINDS = ['web', 'app', 'miniprogram', 'tablet', 'desktop', 'poster', 'slides', 'email', 'diagram']
|
|
41
|
+
export const KINDS = ['web', 'app', 'miniprogram', 'tablet', 'desktop', 'poster', 'slides', 'email', 'diagram', 'dshplugin']
|
|
42
42
|
export const STYLE_IDS = ['minimal', 'warm', 'editorial', 'dark', 'playful', 'fresh', 'tech', 'glass', 'soft', 'guochao', 'ink', 'cyber', 'cute', 'retro', 'sale', 'japandi', 'swiss', 'brutal', 'cream', 'sport']
|
|
43
43
|
export const HEADS = ['SANS', 'SERIF', 'ROUND', 'MONO', 'GROTESK'] // 风格卡的字体只能是这几种系统字体栈
|
|
44
|
-
const META_ALIAS = { phone: 'app', mobile: 'app', ios: 'app', android: 'app', mini: 'miniprogram', miniapp: 'miniprogram', weapp: 'miniprogram', wechat: 'miniprogram', 小程序: 'miniprogram', pad: 'tablet', ipad: 'tablet', pc: 'desktop', electron: 'desktop', tauri: 'desktop', mac: 'desktop', macos: 'desktop', windows: 'desktop', win: 'desktop', 桌面: 'desktop', 桌面软件: 'desktop', social: 'poster', image: 'poster', slide: 'slides', deck: 'slides', ppt: 'slides', mail: 'email', mindmap: 'diagram', roadmap: 'diagram', architecture: 'diagram', flowchart: 'diagram', 思维导图: 'diagram', 导图: 'diagram', 路线图: 'diagram', 架构图: 'diagram', 图表: 'diagram' }
|
|
44
|
+
const META_ALIAS = { phone: 'app', mobile: 'app', ios: 'app', android: 'app', mini: 'miniprogram', miniapp: 'miniprogram', weapp: 'miniprogram', wechat: 'miniprogram', 小程序: 'miniprogram', pad: 'tablet', ipad: 'tablet', pc: 'desktop', electron: 'desktop', tauri: 'desktop', mac: 'desktop', macos: 'desktop', windows: 'desktop', win: 'desktop', 桌面: 'desktop', 桌面软件: 'desktop', social: 'poster', image: 'poster', slide: 'slides', deck: 'slides', ppt: 'slides', mail: 'email', mindmap: 'diagram', roadmap: 'diagram', architecture: 'diagram', flowchart: 'diagram', 思维导图: 'diagram', 导图: 'diagram', 路线图: 'diagram', 架构图: 'diagram', 图表: 'diagram', dsh: 'dshplugin', 'dsh-plugin': 'dshplugin', dsh插件: 'dshplugin' }
|
|
45
45
|
|
|
46
46
|
const EXT = { html: 'html', css: 'css', svg: 'svg', png: 'image', jpg: 'image', jpeg: 'image', webp: 'image', gif: 'image', avif: 'image', json: 'json', md: 'md' }
|
|
47
47
|
const DATA_IMAGE = /^data:image\/(png|jpe?g|webp|gif|avif)(;[a-z0-9=._-]+)*(;base64)?,/i
|
package/lib/index.js
CHANGED
|
@@ -99,7 +99,7 @@ export const studio = { tracker: null, autoOpen: 0, offline: 0, annotations: 0,
|
|
|
99
99
|
export const designSkill = {
|
|
100
100
|
name: 'ui-design',
|
|
101
101
|
description:
|
|
102
|
-
'做网页、App 界面、小程序、平板界面、桌面软件、海报 /
|
|
102
|
+
'做网页、App 界面、小程序、平板界面、桌面软件、海报 / 社媒图、幻灯片、邮件、图表(思维导图、技术路线图、产品路线图、架构图)、DSH 插件界面、组件这类设计之前先加载:' +
|
|
103
103
|
'配合右侧「设计工作台」画布的做法(一屏一个文件、设计变量、类型标记)、现代设计原则、中文排版、各类型画幅要点、避免 AI 味、设计自查清单。' +
|
|
104
104
|
'只是把回答做成一页给用户看或用(对比、表格、清单、数据图表、计算器这类,或者在对话里随手看一张导图)不算设计:有 show_page 工具就直接用它,不加载这个技能;' +
|
|
105
105
|
'要「设计」、做好看的、要导出成图片 / PDF / PPT 的思维导图、路线图、架构图才用这个技能。',
|
|
@@ -130,7 +130,7 @@ export const previewTool = {
|
|
|
130
130
|
name: 'preview_page',
|
|
131
131
|
description:
|
|
132
132
|
'在右侧栏「设计工作台」里实时打开一个页面,用户能边看边点选要改的地方。' +
|
|
133
|
-
'做网页、App
|
|
133
|
+
'做网页、App 界面、小程序、海报、幻灯片、邮件、图表(思维导图、路线图、架构图)、DSH 插件界面这类设计时用:写好第一个 HTML 文件、或启动开发服务器后调一次就行,之后改文件会自动刷新,不用再调。' +
|
|
134
134
|
'只是把回答做成一页(对比、表格、清单、数据图表、计算器)给用户看或用时,有 show_page 工具就用它,不用这里。' +
|
|
135
135
|
'本地 HTML 写文件路径;开发服务器写地址或端口(如 http://localhost:5173)。只能预览本机页面。' +
|
|
136
136
|
'kind 说明是哪类设计,右侧按它的画幅显示(App 套手机外框、幻灯片 16:9 …)。' +
|
|
@@ -143,7 +143,7 @@ export const previewTool = {
|
|
|
143
143
|
kind: {
|
|
144
144
|
type: 'string',
|
|
145
145
|
enum: KINDS,
|
|
146
|
-
description: '设计类型:web 网页(默认)、app 手机 App 界面(390×844)、miniprogram 微信小程序(375×812,外框带右上角胶囊)、tablet 平板、desktop 桌面软件(1280×800 的 Mac 窗口;Windows 软件在页面 meta 写 desktop windows)、poster 海报 / 社媒图(1080×1350)、slides 幻灯片(16:9)、email 邮件、diagram 图表(思维导图、技术路线图、产品路线图、架构图,默认 1600×1000
|
|
146
|
+
description: '设计类型:web 网页(默认)、app 手机 App 界面(390×844)、miniprogram 微信小程序(375×812,外框带右上角胶囊)、tablet 平板、desktop 桌面软件(1280×800 的 Mac 窗口;Windows 软件在页面 meta 写 desktop windows)、poster 海报 / 社媒图(1080×1350)、slides 幻灯片(16:9)、email 邮件、diagram 图表(思维导图、技术路线图、产品路线图、架构图,默认 1600×1000,图多大画幅跟着多大)、dshplugin DSH 插件(1280×800,套 DSH 桌面端外框,只设计插件那块:左侧栏入口 / 设置分区 / 会话标签页 / 右侧栏面板)',
|
|
147
147
|
},
|
|
148
148
|
size: { type: 'string', description: '画幅尺寸,可选,如 1080x1920;不填按类型的默认尺寸' },
|
|
149
149
|
screens: {
|
|
@@ -612,7 +612,7 @@ export const styleTool = {
|
|
|
612
612
|
'用户点了风格卡(消息里有〔风格〕)、自己定了具体的风格或配色、或有默认的品牌设计系统时不用调;只说「你定」「帮我推荐一个」「出几个风格挑」算没定,要调。',
|
|
613
613
|
parameters: specToJsonSchema({
|
|
614
614
|
subject: { type: 'string', required: true, description: '这次要做什么,直接写用户的原话' },
|
|
615
|
-
kind: { type: 'string', enum: ['web', 'app', 'miniprogram', 'tablet', 'desktop', 'poster', 'slides', 'email', 'diagram'], description: '设计类型' },
|
|
615
|
+
kind: { type: 'string', enum: ['web', 'app', 'miniprogram', 'tablet', 'desktop', 'poster', 'slides', 'email', 'diagram', 'dshplugin'], description: '设计类型' },
|
|
616
616
|
count: { type: 'number', description: '要几个方向,1–3,默认 1;要先出三个方向时填 3,每个方向一张不同的卡' },
|
|
617
617
|
}),
|
|
618
618
|
output: {
|
package/lib/look.js
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
import fs from 'node:fs'
|
|
10
10
|
import path from 'node:path'
|
|
11
11
|
|
|
12
|
-
export const KIND_SIZE = { web: [1280, 800], app: [390, 844], miniprogram: [375, 812], tablet: [820, 1180], desktop: [1280, 800], poster: [1080, 1350], slides: [1280, 720], email: [640, 960], diagram: [1600, 1000] }
|
|
12
|
+
export const KIND_SIZE = { web: [1280, 800], app: [390, 844], miniprogram: [375, 812], tablet: [820, 1180], desktop: [1280, 800], poster: [1080, 1350], slides: [1280, 720], email: [640, 960], diagram: [1600, 1000], dshplugin: [1280, 800] }
|
|
13
13
|
const KIND_LIST = Object.keys(KIND_SIZE)
|
|
14
|
-
const META_ALIAS = { phone: 'app', mobile: 'app', ios: 'app', android: 'app', mini: 'miniprogram', miniapp: 'miniprogram', weapp: 'miniprogram', wechat: 'miniprogram', 小程序: 'miniprogram', pad: 'tablet', ipad: 'tablet', pc: 'desktop', electron: 'desktop', tauri: 'desktop', mac: 'desktop', macos: 'desktop', windows: 'desktop', win: 'desktop', 桌面: 'desktop', 桌面软件: 'desktop', social: 'poster', image: 'poster', slide: 'slides', deck: 'slides', ppt: 'slides', mail: 'email', mindmap: 'diagram', roadmap: 'diagram', architecture: 'diagram', flowchart: 'diagram', 思维导图: 'diagram', 导图: 'diagram', 路线图: 'diagram', 架构图: 'diagram', 图表: 'diagram' }
|
|
14
|
+
const META_ALIAS = { phone: 'app', mobile: 'app', ios: 'app', android: 'app', mini: 'miniprogram', miniapp: 'miniprogram', weapp: 'miniprogram', wechat: 'miniprogram', 小程序: 'miniprogram', pad: 'tablet', ipad: 'tablet', pc: 'desktop', electron: 'desktop', tauri: 'desktop', mac: 'desktop', macos: 'desktop', windows: 'desktop', win: 'desktop', 桌面: 'desktop', 桌面软件: 'desktop', social: 'poster', image: 'poster', slide: 'slides', deck: 'slides', ppt: 'slides', mail: 'email', mindmap: 'diagram', roadmap: 'diagram', architecture: 'diagram', flowchart: 'diagram', 思维导图: 'diagram', 导图: 'diagram', 路线图: 'diagram', 架构图: 'diagram', 图表: 'diagram', dsh: 'dshplugin', 'dsh-plugin': 'dshplugin', dsh插件: 'dshplugin' }
|
|
15
15
|
// 只给宽度时的高:常见真机的屏幕高;别的宽度按这一类默认的宽高比
|
|
16
16
|
const PHONE_H = { 320: 568, 360: 780, 375: 667, 390: 844, 393: 852, 402: 874, 412: 915, 414: 896, 428: 926, 430: 932, 440: 956 }
|
|
17
17
|
const TABLET_H = { 744: 1133, 768: 1024, 810: 1080, 820: 1180, 834: 1194, 1024: 1366, 1032: 1376 }
|
|
@@ -403,7 +403,7 @@ const TYPE = {
|
|
|
403
403
|
tiny: '字太小', img: '图片没加载出来', fonts: '字号太杂', distort: '图片被拉变形', long: '一行太长', wrap: '文字被挤断行',
|
|
404
404
|
covered: '被固定栏压住', tight: '离固定栏太近', jserr: '页面脚本报错', missing: '文件没载出来', deadlink: '跳到的页面不存在',
|
|
405
405
|
capsule: '被小程序胶囊挡住', island: '被灵动岛挡住', homebar: '伸进底部横条区', tabbar: '标签栏项太多', navbar: '没有导航栏',
|
|
406
|
-
winctl: '被窗口按钮挡住', dgsize: '图比画幅大', dgli: '导图节点写法不对', dgmany: '一层放太多', dgbar: '横条超出时间轴', dgtext: '节点字太多', dgsmall: '字偏小', dglink: '箭头没对着模块',
|
|
406
|
+
winctl: '被窗口按钮挡住', dgsize: '图比画幅大', dgli: '导图节点写法不对', dgmany: '一层放太多', dgbar: '横条超出时间轴', dgtext: '节点字太多', dgsmall: '字偏小', dglink: '箭头没对着模块', frame: '外框被改动',
|
|
407
407
|
}
|
|
408
408
|
const EDGE = { top: '顶栏', bottom: '底栏' }
|
|
409
409
|
const WHAT = { css: '样式表', script: '脚本', font: '字体', link: '文件', video: '视频', audio: '音频', source: '媒体', iframe: '内嵌页' }
|
|
@@ -455,6 +455,9 @@ export function detailOf(it) {
|
|
|
455
455
|
: `伸进左上角红绿灯 ${it.px}px(外框画的、盖在页面上面,在 x 20–72、y 20–32:工具栏 / 侧栏顶上左边空出 80px,标题、按钮从 x 80 以后放)`
|
|
456
456
|
case 'jserr': return `${it.msg}${it.src ? `(${it.src}${it.line ? `:${it.line}` : ''})` : ''}`
|
|
457
457
|
case 'missing': return `${WHAT[it.what] || '文件'} ${it.src} 载不出来(路径写错了,或者文件不在)`
|
|
458
|
+
case 'frame': return it.what === 'style'
|
|
459
|
+
? `外框的样式被改了:${it.sel} 的 ${it.prop} 应该是 ${it.want},现在是 ${it.got}。多半是插件样式写了 body / * / button 这种不带前缀的选择器,或者改了 dsh-shell.css:插件样式都从 [data-slot="main"] 开头,dsh-shell.css 从技能目录 frames/dsh/ 重新原样复制`
|
|
460
|
+
: `外框(${it.frame})的结构或文字被改了:外框只能原样复制(技能目录 frames/dsh/),插件只写 data-slot 里面。重新复制外框,再把槽位里的内容放回去`
|
|
458
461
|
case 'dgsize': return `图有 ${it.w}×${it.h},画幅只有 ${it.vw}×${it.vh}:把 meta 改成 diagram ${it.w}x${it.h}(preview_page 的 size 也改),或者删减节点、改小间距`
|
|
459
462
|
case 'dgli': return '字直接写在 li 里,或者 li 的第一个孩子不是 <span class="mm-node">:连线会对不上,改成 <li><span class="mm-node">…</span><ul>…</ul></li>'
|
|
460
463
|
case 'dgmany': return it.what === 'box' ? `一行 ${it.n} 个框(最多 ${it.max} 个):拆成两行,或者合并几个` : `这一层 ${it.n} 个分支(最多 ${it.max} 个):合并几个、往下多分一层,或者拆成两张图`
|
package/lib/picker.js
CHANGED
|
@@ -3245,7 +3245,7 @@ background:rgba(20,20,22,.86);color:#e8e8ea;font:12px/18px -apple-system,system-
|
|
|
3245
3245
|
const all = body.getElementsByTagName('*')
|
|
3246
3246
|
for (let i = 0; i < all.length && atoms.length < CHECK_ATOMS; i++) {
|
|
3247
3247
|
const el = all[i]
|
|
3248
|
-
if (isOurs(el) || el.closest('dsh-design-picker,dsh-design-fx,dsh-design-edit,script,style,noscript,template,svg')) continue
|
|
3248
|
+
if (isOurs(el) || el.closest('dsh-design-picker,dsh-design-fx,dsh-design-edit,script,style,noscript,template,svg') || inFrame(el)) continue
|
|
3249
3249
|
if (!ownText(el)) continue
|
|
3250
3250
|
const cs = getComputedStyle(el)
|
|
3251
3251
|
if (cs.display === 'none' || cs.visibility !== 'visible') continue
|
|
@@ -3377,11 +3377,11 @@ background:rgba(20,20,22,.86);color:#e8e8ea;font:12px/18px -apple-system,system-
|
|
|
3377
3377
|
} })
|
|
3378
3378
|
|
|
3379
3379
|
// 5. 点击区太小(App / 小程序 / 平板 44,网页 24;文字中间的链接不算)
|
|
3380
|
-
const minTap = kind === 'app' || kind === 'miniprogram' || kind === 'tablet' ? 44 : kind === 'web' || kind === 'email' || kind === 'desktop' ? 24 : 0
|
|
3380
|
+
const minTap = kind === 'app' || kind === 'miniprogram' || kind === 'tablet' ? 44 : kind === 'web' || kind === 'email' || kind === 'desktop' || kind === 'dshplugin' ? 24 : 0
|
|
3381
3381
|
if (minTap) {
|
|
3382
3382
|
const small = []
|
|
3383
3383
|
for (const el of body.querySelectorAll(CLICKABLE)) {
|
|
3384
|
-
if (isOurs(el) || el.closest('dsh-design-picker,dsh-design-fx,dsh-design-edit')) continue
|
|
3384
|
+
if (isOurs(el) || el.closest('dsh-design-picker,dsh-design-fx,dsh-design-edit') || inFrame(el)) continue
|
|
3385
3385
|
const r = el.getBoundingClientRect()
|
|
3386
3386
|
if (r.width < 1 || r.height < 1 || (r.width >= minTap && r.height >= minTap)) continue
|
|
3387
3387
|
const cs = getComputedStyle(el)
|
|
@@ -3478,6 +3478,8 @@ background:rgba(20,20,22,.86);color:#e8e8ea;font:12px/18px -apple-system,system-
|
|
|
3478
3478
|
// 16. 图表:比画幅大、导图节点写法、一层太多、横条超出时间轴、节点字太多、字偏小(贴进 Word 看不清)
|
|
3479
3479
|
if (kind === 'diagram' || document.querySelector('.dg.mm, .dg.tr, .dg.rm, .dg.ar')) diagramCheck(add, kind, vw)
|
|
3480
3480
|
if (kind === 'diagram') smallTextCheck(add, vw)
|
|
3481
|
+
// 17. DSH 插件:外框被改动(结构、文字、样式和模板对不上)
|
|
3482
|
+
frameCheck(add)
|
|
3481
3483
|
|
|
3482
3484
|
issues.sort((x, y) => y.sev - x.sev)
|
|
3483
3485
|
const se0 = se()
|
|
@@ -3604,6 +3606,59 @@ background:rgba(20,20,22,.86);color:#e8e8ea;font:12px/18px -apple-system,system-
|
|
|
3604
3606
|
}
|
|
3605
3607
|
}
|
|
3606
3608
|
|
|
3609
|
+
/**
|
|
3610
|
+
* DSH 插件外框(skills/ui-design/frames/dsh)锁住:模型只写 data-slot 里面。
|
|
3611
|
+
* 结构指纹 = 外框里槽位以外的标签、class、style、data-slot 名和自己的字;和模板对不上就是外框被改了。
|
|
3612
|
+
* 样式:量几处外框的算出来的样式(宽高、底色、字号),插件样式漏到外框上(body / * / button 这种选择器)、改了 dsh-shell.css 都会变。
|
|
3613
|
+
* 改了外框文件要重算 FRAME_SIGS(test-look 会报出新指纹)。
|
|
3614
|
+
*/
|
|
3615
|
+
const FRAME_SIGS = { 'dsh/sidebar': 'f6cf6564', 'dsh/settings': 'e85d0eca', 'dsh/view': '2522b3ea', 'dsh/panel': '0ea5d6de' }
|
|
3616
|
+
const FRAME_PROBES = [ // [选择器, 样式, 浅色值, 深色值(一样就省略)]
|
|
3617
|
+
['.dsh-app', 'font-size', '14px'],
|
|
3618
|
+
['.dsh-side', 'width', '280px'],
|
|
3619
|
+
['.dsh-side', 'background-color', 'rgb(249, 250, 251)', 'rgb(27, 27, 28)'],
|
|
3620
|
+
['.dsh-new', 'height', '38px'],
|
|
3621
|
+
['.dsh-row', 'font-size', '15px'],
|
|
3622
|
+
['.dsh-row', 'color', 'rgb(15, 17, 21)', 'rgb(249, 250, 251)'],
|
|
3623
|
+
['.dsh-head', 'height', '76px'],
|
|
3624
|
+
['.dsh-tab.on', 'color', 'rgb(65, 118, 230)', 'rgb(122, 170, 255)'],
|
|
3625
|
+
['.dsh-right', 'width', '575px'],
|
|
3626
|
+
['.dsh-modal', 'width', '800px'],
|
|
3627
|
+
['.dsh-scell', 'font-size', '14px'],
|
|
3628
|
+
]
|
|
3629
|
+
const inFrame = (el) => !!(el.closest && el.closest('.dsh-app[data-frame]') && !el.closest('[data-slot="main"]')) // 入口图标、名字那些小槽位跟着外框的样式走,也不查
|
|
3630
|
+
function frameSig(root) {
|
|
3631
|
+
const out = []
|
|
3632
|
+
const walk = (el) => {
|
|
3633
|
+
if (SIG_SKIP.has(el.tagName) || /^DSH-DESIGN-/.test(el.tagName)) return
|
|
3634
|
+
const slot = el.getAttribute('data-slot')
|
|
3635
|
+
// 槽位本身只记标签和名字:槽位上的 class、style(调样式改的内边距、底色)算插件的
|
|
3636
|
+
out.push(slot === null ? [el.tagName.toLowerCase(), el.getAttribute('class') || '', el.getAttribute('style') || '', '', ownText(el)].join('|') : [el.tagName.toLowerCase(), '', '', slot, ''].join('|'))
|
|
3637
|
+
if (slot === null) for (const c of el.children) walk(c)
|
|
3638
|
+
}
|
|
3639
|
+
walk(root)
|
|
3640
|
+
const s = out.join('\n')
|
|
3641
|
+
let h = 0x811c9dc5
|
|
3642
|
+
for (let i = 0; i < s.length; i++) { h ^= s.charCodeAt(i); h = Math.imul(h, 0x01000193) }
|
|
3643
|
+
return (h >>> 0).toString(16).padStart(8, '0')
|
|
3644
|
+
}
|
|
3645
|
+
function frameCheck(add) {
|
|
3646
|
+
const root = document.querySelector('.dsh-app[data-frame]')
|
|
3647
|
+
if (!root) return
|
|
3648
|
+
const id = root.getAttribute('data-frame')
|
|
3649
|
+
if (!Object.prototype.hasOwnProperty.call(FRAME_SIGS, id)) return // 以后的自定外框:还没有模板指纹
|
|
3650
|
+
const got = frameSig(root)
|
|
3651
|
+
if (got !== FRAME_SIGS[id]) { add('frame', root, { what: 'dom', frame: id, got }, 2); return }
|
|
3652
|
+
const dark = document.documentElement.getAttribute('data-theme') === 'dark'
|
|
3653
|
+
for (const [sel, prop, light, darkV] of FRAME_PROBES) {
|
|
3654
|
+
const el = [root, ...root.querySelectorAll(sel)].find((x) => x.matches(sel) && !x.closest('[data-slot]')) // 只量外框自己的(槽位里插件也可能用同名类)
|
|
3655
|
+
if (!el) continue
|
|
3656
|
+
const want = dark && darkV ? darkV : light
|
|
3657
|
+
const v = getComputedStyle(el).getPropertyValue(prop)
|
|
3658
|
+
if (v !== want) { add('frame', el, { what: 'style', frame: id, sel, prop, want, got: v }, 2); return }
|
|
3659
|
+
}
|
|
3660
|
+
}
|
|
3661
|
+
|
|
3607
3662
|
/** 图表(diagram.css)的结构问题:连线是样式按结构画的,结构写错了线就对不上 */
|
|
3608
3663
|
function diagramCheck(add, kind, vw) {
|
|
3609
3664
|
const de = document.scrollingElement || document.documentElement
|
package/lib/styles.js
CHANGED
|
@@ -137,6 +137,7 @@ export const SAID_STYLE = /风格|配色|色调|主色|色系|[红橙黄绿青
|
|
|
137
137
|
export function autoStyle(text, kind) {
|
|
138
138
|
const s = String(text || '')
|
|
139
139
|
if (!s.trim()) return null
|
|
140
|
+
if (kind === 'dshplugin') return null // DSH 插件默认用 DSH 自己的样子(外框的 --dsh-* 变量),不替它挑风格卡
|
|
140
141
|
const said = s.replace(NOT_STYLE_FENG, ' ')
|
|
141
142
|
if (SAID_STYLE.test(said) || STYLES.some((x) => said.includes(x.zh) || new RegExp(`\\b${x.en}\\s+(style|look|theme|aesthetic|vibe)\\b`, 'i').test(said))) return null
|
|
142
143
|
return topicStyle(s, kind)
|
package/package.json
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
| `slides` | 1280×720(16:9) | 卡片 | `references/slides.md` |
|
|
32
32
|
| `email` | 600 宽 | 卡片 | `references/email.md` |
|
|
33
33
|
| `diagram` | 1600×1000 起,图多大画幅跟着多大 | 卡片 | `references/diagram.md`(思维导图、技术路线图、产品路线图、架构图;连线自动排,先读) |
|
|
34
|
+
| `dshplugin` | 1280×800(DSH 桌面端) | 卡片(外框是页面自己带的) | `references/dshplugin.md`(DSH 插件:4 个位置的外框,只写槽位,先读) |
|
|
34
35
|
|
|
35
36
|
细则只在做那一类时再读。
|
|
36
37
|
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
3. **一屏一个 HTML 文件,放同一个目录**。新做一套设计时先建这套设计自己的文件夹(英文短名,如 `murmur-landing/`;工作区里已有项目就放在 `design/` 下),`tokens.css`、每一屏都放进去。**不要把文件直接写在工作区最外层**——用户的项目里很可能已经有 `index.html`、`style.css`,会被覆盖。按用户会看的顺序一屏一屏写(画布按创建顺序排:登录 → 首页 → 详情 → …)。文件名用英文小写(`login.html`、`home.html`),`<title>` 写「屏名 · 产品名」,用界面的语言(如「首页 · 梅林练」「Home · Pedal」,每屏的产品名写成一样的):画布上只显示屏名,导出整套展示图时产品名做大标题。临时试验的页面用 `_` 开头(`_test.html`),不会上画布。每屏 `<head>` 里写:
|
|
40
41
|
|
|
41
42
|
```html
|
|
42
|
-
<meta name="dsh-design" content="app"> <!-- 类型;小程序写 miniprogram;Windows 软件写 desktop windows;海报可带尺寸:poster 1080x1920;图表写 diagram 1600x1000 -->
|
|
43
|
+
<meta name="dsh-design" content="app"> <!-- 类型;小程序写 miniprogram;Windows 软件写 desktop windows;海报可带尺寸:poster 1080x1920;图表写 diagram 1600x1000;DSH 插件写 dshplugin 1280x800 -->
|
|
43
44
|
```
|
|
44
45
|
|
|
45
46
|
**几屏共用的东西只写一份**:样式放 `tokens.css` 和一个公共的 `app.css`;图标、书封这类 SVG 放进一个 `icons.svg`(每个图标一个 `<symbol id="…">`),页面里用 `<svg><use href="icons.svg#cart"></use></svg>` 引用——换风格时改一处所有屏一起变,不会漏改。状态栏、标签栏这种 HTML 结构每屏照抄一份,保持一模一样。
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/* DSH 桌面端外框(照 DSH 0.2.2 网页版 1280×800 量的)。原样复制、原样引用,别改这个文件——体检会报「外框被改动」。
|
|
2
|
+
插件只写在 data-slot 里面;插件里想跟 DSH 一个样子,就用下面这些 --dsh-* 变量。
|
|
3
|
+
深色:<html data-theme="dark">。 */
|
|
4
|
+
:root {
|
|
5
|
+
--dsh-bg: #ffffff; /* 主区底色 */
|
|
6
|
+
--dsh-side: #f9fafb; /* 左侧栏底色 */
|
|
7
|
+
--dsh-card: #ffffff; /* 卡片 / 弹窗底色 */
|
|
8
|
+
--dsh-fg: #0f1115; /* 正文 */
|
|
9
|
+
--dsh-muted: #81858c; /* 次要字 */
|
|
10
|
+
--dsh-line: rgba(0, 0, 0, 0.12);
|
|
11
|
+
--dsh-hover: #ebeef2; /* 选中行 / 悬停 */
|
|
12
|
+
--dsh-accent: #4176e6; /* 选中标签、链接 */
|
|
13
|
+
--dsh-btn: #0f1115; /* 主按钮(黑底白字) */
|
|
14
|
+
--dsh-btn-fg: #ffffff;
|
|
15
|
+
--dsh-folder: #4176e6;
|
|
16
|
+
--dsh-scrim: rgba(15, 17, 21, 0.24);
|
|
17
|
+
--dsh-radius-sm: 8px;
|
|
18
|
+
--dsh-radius-md: 12px;
|
|
19
|
+
--dsh-radius-lg: 16px;
|
|
20
|
+
--dsh-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
21
|
+
--dsh-font-brand: "Montserrat", var(--dsh-font);
|
|
22
|
+
--dsh-font-code: "SF Mono", "JetBrains Mono", "Fira Code", Consolas, Menlo, monospace;
|
|
23
|
+
}
|
|
24
|
+
[data-theme="dark"] {
|
|
25
|
+
--dsh-bg: #151517;
|
|
26
|
+
--dsh-side: #1b1b1c;
|
|
27
|
+
--dsh-card: #1f1f22;
|
|
28
|
+
--dsh-fg: #f9fafb;
|
|
29
|
+
--dsh-muted: #adb2b8;
|
|
30
|
+
--dsh-line: rgba(255, 255, 255, 0.16);
|
|
31
|
+
--dsh-hover: #2c2c2f;
|
|
32
|
+
--dsh-accent: #7aaaff;
|
|
33
|
+
--dsh-btn: #f9fafb;
|
|
34
|
+
--dsh-btn-fg: #0f1115;
|
|
35
|
+
--dsh-folder: #7aaaff;
|
|
36
|
+
--dsh-scrim: rgba(0, 0, 0, 0.56);
|
|
37
|
+
color-scheme: dark;
|
|
38
|
+
}
|
|
39
|
+
html, body { margin: 0; padding: 0; background: var(--dsh-bg); }
|
|
40
|
+
|
|
41
|
+
/* ── 整个窗口 ── */
|
|
42
|
+
.dsh-app {
|
|
43
|
+
position: relative; display: flex; width: 1280px; height: 800px; overflow: hidden; box-sizing: border-box;
|
|
44
|
+
background: var(--dsh-bg); color: var(--dsh-fg); font: 400 14px/1.5 var(--dsh-font); text-align: left; letter-spacing: 0;
|
|
45
|
+
}
|
|
46
|
+
.dsh-app .dsh-i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; display: block; }
|
|
47
|
+
|
|
48
|
+
/* ── 左侧栏 ── */
|
|
49
|
+
.dsh-app .dsh-side {
|
|
50
|
+
position: relative; flex: none; width: 280px; height: 800px; box-sizing: border-box; padding: 0 8px;
|
|
51
|
+
background: var(--dsh-side); border-right: 1px solid var(--dsh-line); display: flex; flex-direction: column;
|
|
52
|
+
}
|
|
53
|
+
.dsh-app .dsh-brand { height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; box-sizing: border-box; }
|
|
54
|
+
.dsh-app .dsh-logo { display: flex; align-items: center; gap: 8px; font: 700 21px/1 var(--dsh-font-brand); letter-spacing: -0.02em; color: var(--dsh-fg); }
|
|
55
|
+
.dsh-app .dsh-logo-tag { font: 700 10px/1 var(--dsh-font); letter-spacing: 0.06em; padding: 3px 5px; border-radius: 3px; background: var(--dsh-fg); color: var(--dsh-side); }
|
|
56
|
+
.dsh-app .dsh-iconbtn { width: 28px; height: 28px; border-radius: var(--dsh-radius-sm); display: flex; align-items: center; justify-content: center; color: var(--dsh-muted); box-sizing: border-box; }
|
|
57
|
+
.dsh-app .dsh-iconbtn.on { background: var(--dsh-hover); color: var(--dsh-fg); }
|
|
58
|
+
.dsh-app .dsh-new {
|
|
59
|
+
margin: 0 4px; height: 38px; box-sizing: border-box; border: 1px solid var(--dsh-line); border-radius: var(--dsh-radius-md);
|
|
60
|
+
display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 15px; font-weight: 500; background: var(--dsh-bg); color: var(--dsh-fg);
|
|
61
|
+
}
|
|
62
|
+
[data-theme="dark"] .dsh-app .dsh-new { background: #3a3a3e; }
|
|
63
|
+
.dsh-app .dsh-nav { margin-top: 10px; display: flex; flex-direction: column; }
|
|
64
|
+
.dsh-app .dsh-row {
|
|
65
|
+
height: 38px; box-sizing: border-box; padding: 0 12px; border-radius: var(--dsh-radius-md); display: flex; align-items: center; gap: 8px;
|
|
66
|
+
font-size: 15px; color: var(--dsh-fg); white-space: nowrap; overflow: hidden;
|
|
67
|
+
}
|
|
68
|
+
.dsh-app .dsh-row.on { background: var(--dsh-hover); }
|
|
69
|
+
.dsh-app .dsh-sec { margin-top: 10px; height: 36px; padding: 0 4px 0 12px; display: flex; align-items: center; justify-content: space-between; color: var(--dsh-muted); font-size: 15px; }
|
|
70
|
+
.dsh-app .dsh-sec-acts { display: flex; gap: 4px; }
|
|
71
|
+
.dsh-app .dsh-folder { color: var(--dsh-folder); }
|
|
72
|
+
.dsh-app .dsh-sess { height: 34px; padding: 0 12px 0 34px; border-radius: var(--dsh-radius-md); display: flex; align-items: center; justify-content: space-between; font-size: 15px; color: var(--dsh-fg); white-space: nowrap; }
|
|
73
|
+
.dsh-app .dsh-sess.on { background: var(--dsh-hover); }
|
|
74
|
+
.dsh-app .dsh-time { font-size: 12px; color: var(--dsh-muted); }
|
|
75
|
+
.dsh-app .dsh-acct { margin-top: auto; height: 48px; padding: 0 8px; display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--dsh-fg); }
|
|
76
|
+
.dsh-app .dsh-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--dsh-hover); color: var(--dsh-muted); display: flex; align-items: center; justify-content: center; font-size: 12px; }
|
|
77
|
+
|
|
78
|
+
/* ── 主区 ── */
|
|
79
|
+
.dsh-app .dsh-main { position: relative; flex: 1 1 auto; min-width: 0; height: 800px; display: flex; flex-direction: column; background: var(--dsh-bg); }
|
|
80
|
+
.dsh-app .dsh-bar { flex: none; height: 40px; position: relative; }
|
|
81
|
+
.dsh-app .dsh-corner { position: absolute; top: 6px; right: 12px; }
|
|
82
|
+
/* 会话顶栏:标题一行 + 标签一行 */
|
|
83
|
+
.dsh-app .dsh-head { flex: none; height: 76px; box-sizing: border-box; border-bottom: 1px solid var(--dsh-line); position: relative; padding: 0 20px; }
|
|
84
|
+
.dsh-app .dsh-crumbs { position: absolute; top: 11px; left: 20px; height: 28px; display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 500; white-space: nowrap; }
|
|
85
|
+
.dsh-app .dsh-mode { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 400; color: var(--dsh-muted); }
|
|
86
|
+
.dsh-app .dsh-utils { position: absolute; top: 11px; right: 48px; height: 28px; display: flex; align-items: center; gap: 4px; }
|
|
87
|
+
.dsh-app .dsh-split { height: 28px; display: flex; align-items: center; border-radius: var(--dsh-radius-sm); background: var(--dsh-accent); color: #fff; font-size: 13px; padding: 0 8px; gap: 4px; }
|
|
88
|
+
.dsh-app .dsh-tabs { position: absolute; left: 18px; bottom: 0; height: 35px; display: flex; gap: 12px; }
|
|
89
|
+
.dsh-app .dsh-tab { height: 35px; padding: 0 8px; box-sizing: border-box; display: flex; align-items: center; font-size: 13px; font-weight: 500; color: var(--dsh-muted); border-bottom: 2px solid transparent; white-space: nowrap; }
|
|
90
|
+
.dsh-app .dsh-tab.on { color: var(--dsh-accent); border-bottom-color: var(--dsh-accent); }
|
|
91
|
+
/* 会话正文(占位) */
|
|
92
|
+
.dsh-app .dsh-chat { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; padding: 28px 24px 0; box-sizing: border-box; gap: 16px; overflow: hidden; }
|
|
93
|
+
.dsh-app .dsh-msg-me { align-self: flex-end; max-width: 70%; padding: 8px 14px; border-radius: var(--dsh-radius-lg); background: var(--dsh-hover); font-size: 14px; }
|
|
94
|
+
.dsh-app .dsh-msg-ai { align-self: stretch; font-size: 14px; color: var(--dsh-fg); }
|
|
95
|
+
.dsh-app .dsh-msg-ai p { margin: 0 0 8px; }
|
|
96
|
+
.dsh-app .dsh-composer {
|
|
97
|
+
flex: none; margin: 0 24px 20px; height: 112px; box-sizing: border-box; border: 1px solid var(--dsh-line); border-radius: 20px; background: var(--dsh-card);
|
|
98
|
+
display: flex; flex-direction: column; justify-content: space-between; padding: 14px 12px 10px 14px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
|
|
99
|
+
}
|
|
100
|
+
.dsh-app .dsh-ph { font-size: 14px; color: var(--dsh-muted); }
|
|
101
|
+
.dsh-app .dsh-cbar { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--dsh-muted); }
|
|
102
|
+
.dsh-app .dsh-cl, .dsh-app .dsh-cr { display: flex; align-items: center; gap: 12px; }
|
|
103
|
+
.dsh-app .dsh-send { width: 32px; height: 32px; border-radius: 50%; background: var(--dsh-accent); opacity: 0.5; color: #fff; display: flex; align-items: center; justify-content: center; }
|
|
104
|
+
|
|
105
|
+
/* ── 右侧栏 ── */
|
|
106
|
+
.dsh-app .dsh-right { flex: none; width: 575px; height: 800px; box-sizing: border-box; border-left: 1px solid var(--dsh-line); display: flex; flex-direction: column; background: var(--dsh-bg); }
|
|
107
|
+
.dsh-app .dsh-rtabs { flex: none; height: 38px; display: flex; align-items: flex-end; padding: 0 10px; gap: 4px; border-bottom: 1px solid var(--dsh-line); }
|
|
108
|
+
.dsh-app .dsh-rtab { height: 28px; max-width: 160px; box-sizing: border-box; padding: 0 10px; border-radius: var(--dsh-radius-sm) var(--dsh-radius-sm) 0 0; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dsh-muted); white-space: nowrap; overflow: hidden; }
|
|
109
|
+
.dsh-app .dsh-rtab.on { background: var(--dsh-hover); color: var(--dsh-fg); }
|
|
110
|
+
|
|
111
|
+
/* ── 设置弹窗 ── */
|
|
112
|
+
.dsh-app .dsh-scrim { position: absolute; inset: 0; background: var(--dsh-scrim); }
|
|
113
|
+
.dsh-app .dsh-modal {
|
|
114
|
+
position: absolute; left: 240px; top: 24px; width: 800px; height: 752px; box-sizing: border-box; border-radius: 24px; background: var(--dsh-card);
|
|
115
|
+
border: 1px solid var(--dsh-line); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18); display: flex; overflow: hidden;
|
|
116
|
+
}
|
|
117
|
+
.dsh-app .dsh-snav { flex: none; width: 188px; display: flex; flex-direction: column; }
|
|
118
|
+
.dsh-app .dsh-stitle { height: 54px; padding: 0 24px; display: flex; align-items: center; font-size: 16px; font-weight: 500; }
|
|
119
|
+
.dsh-app .dsh-slist { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
|
|
120
|
+
.dsh-app .dsh-scell { height: 40px; box-sizing: border-box; padding: 0 12px; border-radius: var(--dsh-radius-md); display: flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; overflow: hidden; }
|
|
121
|
+
.dsh-app .dsh-scell.on { background: var(--dsh-hover); }
|
|
122
|
+
.dsh-app .dsh-sbody { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
|
|
123
|
+
.dsh-app .dsh-stop { flex: none; height: 62px; padding: 0 16px 0 24px; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
|
|
124
|
+
.dsh-app .dsh-ghost { height: 28px; box-sizing: border-box; padding: 0 10px; border: 1px solid var(--dsh-line); border-radius: var(--dsh-radius-sm); display: flex; align-items: center; font-size: 13px; }
|
|
125
|
+
|
|
126
|
+
/* ── 槽位:插件写在这里面 ── */
|
|
127
|
+
.dsh-app [data-slot] { box-sizing: border-box; min-width: 0; }
|
|
128
|
+
.dsh-app [data-slot="main"] { flex: 1 1 auto; min-height: 0; overflow: auto; position: relative; color: var(--dsh-fg); font: 400 14px/1.5 var(--dsh-font); }
|
|
129
|
+
.dsh-app .dsh-main > [data-slot="main"] { background: var(--dsh-bg); }
|
|
130
|
+
.dsh-app .dsh-sbody > [data-slot="main"] { padding: 0 24px 24px; }
|
|
131
|
+
.dsh-app [data-slot$="-icon"] { width: 16px; height: 16px; flex: none; display: flex; align-items: center; justify-content: center; overflow: hidden; }
|
|
132
|
+
.dsh-app [data-slot$="-label"], .dsh-app [data-slot$="-title"] { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "dsh",
|
|
3
|
+
"name": "DSH 插件",
|
|
4
|
+
"nameEn": "DSH plugin",
|
|
5
|
+
"desc": "DeepSeek Harness 桌面端的外框(照 DSH 0.2.2 量的),插件只设计槽位里那块",
|
|
6
|
+
"size": [1280, 800],
|
|
7
|
+
"css": "dsh-shell.css",
|
|
8
|
+
"themes": ["light", "dark"],
|
|
9
|
+
"darkAttr": "data-theme=\"dark\"",
|
|
10
|
+
"frames": [
|
|
11
|
+
{
|
|
12
|
+
"id": "sidebar",
|
|
13
|
+
"file": "sidebar.html",
|
|
14
|
+
"name": "左侧栏入口",
|
|
15
|
+
"dshSlot": "sidebar.panellist",
|
|
16
|
+
"desc": "左侧栏「插件 / 自动化任务」那一排多一行,点开主区是插件整页",
|
|
17
|
+
"slots": {
|
|
18
|
+
"entry-icon": "那一行的图标,16×16(放一个 svg)",
|
|
19
|
+
"entry-label": "那一行的字(插件名,2–6 个字)",
|
|
20
|
+
"main": "主区整页,1000×760(顶上 40px 留给 DSH 的右上角按钮)"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "settings",
|
|
25
|
+
"file": "settings.html",
|
|
26
|
+
"name": "设置分区",
|
|
27
|
+
"dshSlot": "settings.section",
|
|
28
|
+
"desc": "设置弹窗左边导航多一项,右边是插件的设置",
|
|
29
|
+
"slots": {
|
|
30
|
+
"entry-icon": "导航那一项的图标,16×16",
|
|
31
|
+
"entry-label": "导航那一项的字",
|
|
32
|
+
"main": "右边设置内容,约 610×690,左右已留 24px"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "view",
|
|
37
|
+
"file": "view.html",
|
|
38
|
+
"name": "会话标签页",
|
|
39
|
+
"dshSlot": "conversation.view",
|
|
40
|
+
"desc": "会话顶上「对话 / 轨迹」旁边多一个标签,下面整块是插件视图",
|
|
41
|
+
"slots": {
|
|
42
|
+
"tab-label": "标签上的字(2–6 个字)",
|
|
43
|
+
"main": "标签下面整块,1000×724"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "panel",
|
|
48
|
+
"file": "panel.html",
|
|
49
|
+
"name": "右侧栏面板",
|
|
50
|
+
"dshSlot": "conversation.session.header.utilities + sidebarRightTabs",
|
|
51
|
+
"desc": "会话顶栏多一个按钮,点开右侧栏是插件面板",
|
|
52
|
+
"slots": {
|
|
53
|
+
"button-icon": "顶栏按钮的图标,16×16",
|
|
54
|
+
"panel-title": "右侧栏标签上的字",
|
|
55
|
+
"main": "右侧栏面板,574×762"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=1280">
|
|
6
|
+
<meta name="dsh-design" content="dshplugin 1280x800">
|
|
7
|
+
<title>右侧栏面板</title>
|
|
8
|
+
<link rel="stylesheet" href="dsh-shell.css">
|
|
9
|
+
<!-- 外框(DSH 插件 · 右侧栏面板):只改 data-slot 里面,别动外框的结构、文字和 dsh-shell.css -->
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div class="dsh-app" data-frame="dsh/panel">
|
|
13
|
+
<aside class="dsh-side">
|
|
14
|
+
<div class="dsh-brand"><div class="dsh-logo">deepseek<span class="dsh-logo-tag">HARNESS</span></div><div class="dsh-iconbtn"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M9 3v18"/></svg></div></div>
|
|
15
|
+
<div class="dsh-new"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 8v8M8 12h8"/></svg>新会话</div>
|
|
16
|
+
<nav class="dsh-nav">
|
|
17
|
+
<div class="dsh-row"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2.5l3 3-3 3-3-3zM18.5 9l3 3-3 3-3-3zM5.5 9l3 3-3 3-3-3zM12 15.5l3 3-3 3-3-3z"/></svg>插件</div>
|
|
18
|
+
<div class="dsh-row"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></svg>自动化任务</div>
|
|
19
|
+
<div class="dsh-row"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><rect x="4" y="4" width="6" height="6" rx="1.5"/><rect x="14" y="4" width="6" height="6" rx="3"/><rect x="4" y="14" width="6" height="6" rx="1.5"/><rect x="14" y="14" width="6" height="6" rx="1.5"/></svg>更多</div>
|
|
20
|
+
</nav>
|
|
21
|
+
<div class="dsh-sec">工作区<div class="dsh-sec-acts"><div class="dsh-iconbtn"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="M20 20l-4-4"/></svg></div><div class="dsh-iconbtn"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 8h10M18 8h2M4 16h2M10 16h10"/><circle cx="16" cy="8" r="2"/><circle cx="8" cy="16" r="2"/></svg></div><div class="dsh-iconbtn"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><path d="M12 11v5M9.5 13.5h5"/></svg></div></div></div>
|
|
22
|
+
<div class="dsh-row"><span class="dsh-folder"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></svg></span>我的项目</div>
|
|
23
|
+
<div class="dsh-sess on">整理会议记录<span class="dsh-time">2 小时</span></div>
|
|
24
|
+
<div class="dsh-sess">新会话</div>
|
|
25
|
+
<div class="dsh-acct"><div class="dsh-avatar">我</div>我的账号</div>
|
|
26
|
+
</aside>
|
|
27
|
+
<main class="dsh-main">
|
|
28
|
+
<header class="dsh-head">
|
|
29
|
+
<div class="dsh-crumbs">整理会议记录<span class="dsh-mode">标准模式<svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M6 9l6 6 6-6"/></svg></span></div>
|
|
30
|
+
<div class="dsh-utils"><div class="dsh-iconbtn on"><span data-slot="button-icon"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><rect x="4" y="4" width="16" height="16" rx="4"/></svg></span></div><div class="dsh-split"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M9 8l-4 4 4 4M15 8l4 4-4 4"/></svg><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M6 9l6 6 6-6"/></svg></div><div class="dsh-iconbtn"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><circle cx="5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/></svg></div></div>
|
|
31
|
+
<div class="dsh-iconbtn dsh-corner"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M15 3v18"/></svg></div>
|
|
32
|
+
<div class="dsh-tabs" role="tablist"><div class="dsh-tab on">对话</div><div class="dsh-tab">轨迹</div></div>
|
|
33
|
+
</header>
|
|
34
|
+
<div class="dsh-chat">
|
|
35
|
+
<div class="dsh-msg-me">帮我把这周的会议记录整理成一页</div>
|
|
36
|
+
<div class="dsh-msg-ai"><p>好的,我先读一下会议记录,再按议题归类。</p><p>整理好了,放在「会议纪要.md」。</p></div>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="dsh-composer">
|
|
39
|
+
<div class="dsh-ph">描述你想要构建的内容,/ 调用指令,@ 文件或对话</div>
|
|
40
|
+
<div class="dsh-cbar"><div class="dsh-cl"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg><span class="dsh-mode"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 3l7 3v6c0 4-3 7-7 9-4-2-7-5-7-9V6z"/></svg>工作区内修改<svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M6 9l6 6 6-6"/></svg></span></div><div class="dsh-cr">DeepSeek V4.1 Flash<div class="dsh-send"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 19V5M6 11l6-6 6 6"/></svg></div></div></div>
|
|
41
|
+
</div>
|
|
42
|
+
</main>
|
|
43
|
+
<aside class="dsh-right">
|
|
44
|
+
<div class="dsh-rtabs"><div class="dsh-rtab"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 11l8-7 8 7v9H4z"/></svg>开始</div><div class="dsh-rtab on"><span data-slot="panel-title">我的插件</span></div></div>
|
|
45
|
+
<div data-slot="main">
|
|
46
|
+
<!-- 插件面板:点会话顶栏按钮后右侧栏显示的内容 -->
|
|
47
|
+
</div>
|
|
48
|
+
</aside>
|
|
49
|
+
</div>
|
|
50
|
+
</body>
|
|
51
|
+
</html>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=1280">
|
|
6
|
+
<meta name="dsh-design" content="dshplugin 1280x800">
|
|
7
|
+
<title>设置分区</title>
|
|
8
|
+
<link rel="stylesheet" href="dsh-shell.css">
|
|
9
|
+
<!-- 外框(DSH 插件 · 设置分区):只改 data-slot 里面,别动外框的结构、文字和 dsh-shell.css -->
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div class="dsh-app" data-frame="dsh/settings">
|
|
13
|
+
<aside class="dsh-side">
|
|
14
|
+
<div class="dsh-brand"><div class="dsh-logo">deepseek<span class="dsh-logo-tag">HARNESS</span></div><div class="dsh-iconbtn"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M9 3v18"/></svg></div></div>
|
|
15
|
+
<div class="dsh-new"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 8v8M8 12h8"/></svg>新会话</div>
|
|
16
|
+
<nav class="dsh-nav">
|
|
17
|
+
<div class="dsh-row"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2.5l3 3-3 3-3-3zM18.5 9l3 3-3 3-3-3zM5.5 9l3 3-3 3-3-3zM12 15.5l3 3-3 3-3-3z"/></svg>插件</div>
|
|
18
|
+
<div class="dsh-row"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></svg>自动化任务</div>
|
|
19
|
+
<div class="dsh-row"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><rect x="4" y="4" width="6" height="6" rx="1.5"/><rect x="14" y="4" width="6" height="6" rx="3"/><rect x="4" y="14" width="6" height="6" rx="1.5"/><rect x="14" y="14" width="6" height="6" rx="1.5"/></svg>更多</div>
|
|
20
|
+
</nav>
|
|
21
|
+
<div class="dsh-sec">工作区<div class="dsh-sec-acts"><div class="dsh-iconbtn"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="M20 20l-4-4"/></svg></div><div class="dsh-iconbtn"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 8h10M18 8h2M4 16h2M10 16h10"/><circle cx="16" cy="8" r="2"/><circle cx="8" cy="16" r="2"/></svg></div><div class="dsh-iconbtn"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><path d="M12 11v5M9.5 13.5h5"/></svg></div></div></div>
|
|
22
|
+
<div class="dsh-row"><span class="dsh-folder"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></svg></span>我的项目</div>
|
|
23
|
+
<div class="dsh-sess on">整理会议记录<span class="dsh-time">2 小时</span></div>
|
|
24
|
+
<div class="dsh-sess">新会话</div>
|
|
25
|
+
<div class="dsh-acct"><div class="dsh-avatar">我</div>我的账号</div>
|
|
26
|
+
</aside>
|
|
27
|
+
<main class="dsh-main">
|
|
28
|
+
<div class="dsh-bar"><div class="dsh-iconbtn dsh-corner"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M15 3v18"/></svg></div></div>
|
|
29
|
+
<div class="dsh-chat"></div>
|
|
30
|
+
<div class="dsh-composer">
|
|
31
|
+
<div class="dsh-ph">描述你想要构建的内容,/ 调用指令,@ 文件或对话</div>
|
|
32
|
+
<div class="dsh-cbar"><div class="dsh-cl"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg><span class="dsh-mode"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 3l7 3v6c0 4-3 7-7 9-4-2-7-5-7-9V6z"/></svg>工作区内修改<svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M6 9l6 6 6-6"/></svg></span></div><div class="dsh-cr">DeepSeek V4.1 Flash<div class="dsh-send"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 19V5M6 11l6-6 6 6"/></svg></div></div></div>
|
|
33
|
+
</div>
|
|
34
|
+
</main>
|
|
35
|
+
<div class="dsh-scrim"></div>
|
|
36
|
+
<div class="dsh-modal" role="dialog">
|
|
37
|
+
<div class="dsh-snav">
|
|
38
|
+
<div class="dsh-stitle">设置</div>
|
|
39
|
+
<div class="dsh-slist">
|
|
40
|
+
<div class="dsh-scell"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="8" r="4"/><path d="M4 21c1-4 4-6 8-6s7 2 8 6"/></svg>账号与余额</div>
|
|
41
|
+
<div class="dsh-scell"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="3"/><path d="M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M4.9 19.1L7 17M17 7l2.1-2.1"/></svg>通用设置</div>
|
|
42
|
+
<div class="dsh-scell"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><ellipse cx="12" cy="6" rx="7" ry="3"/><path d="M5 6v12c0 1.7 3.1 3 7 3s7-1.3 7-3V6M5 12c0 1.7 3.1 3 7 3s7-1.3 7-3"/></svg>模型</div>
|
|
43
|
+
<div class="dsh-scell"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 8h10M18 8h2M4 16h2M10 16h10"/><circle cx="16" cy="8" r="2"/><circle cx="8" cy="16" r="2"/></svg>内置插件</div>
|
|
44
|
+
<div class="dsh-scell"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 3l8 5v8l-8 5-8-5V8z"/></svg>Agent 预设</div>
|
|
45
|
+
<div class="dsh-scell on"><span data-slot="entry-icon"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><rect x="4" y="4" width="16" height="16" rx="4"/></svg></span><span data-slot="entry-label">我的插件</span></div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="dsh-sbody">
|
|
49
|
+
<div class="dsh-stop"><div class="dsh-ghost">打开配置文件</div><div class="dsh-iconbtn"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"/></svg></div></div>
|
|
50
|
+
<div data-slot="main">
|
|
51
|
+
<!-- 插件的设置分区 -->
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</body>
|
|
57
|
+
</html>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=1280">
|
|
6
|
+
<meta name="dsh-design" content="dshplugin 1280x800">
|
|
7
|
+
<title>左侧栏入口</title>
|
|
8
|
+
<link rel="stylesheet" href="dsh-shell.css">
|
|
9
|
+
<!-- 外框(DSH 插件 · 左侧栏入口):只改 data-slot 里面,别动外框的结构、文字和 dsh-shell.css -->
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div class="dsh-app" data-frame="dsh/sidebar">
|
|
13
|
+
<aside class="dsh-side">
|
|
14
|
+
<div class="dsh-brand"><div class="dsh-logo">deepseek<span class="dsh-logo-tag">HARNESS</span></div><div class="dsh-iconbtn"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M9 3v18"/></svg></div></div>
|
|
15
|
+
<div class="dsh-new"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 8v8M8 12h8"/></svg>新会话</div>
|
|
16
|
+
<nav class="dsh-nav">
|
|
17
|
+
<div class="dsh-row"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2.5l3 3-3 3-3-3zM18.5 9l3 3-3 3-3-3zM5.5 9l3 3-3 3-3-3zM12 15.5l3 3-3 3-3-3z"/></svg>插件</div>
|
|
18
|
+
<div class="dsh-row"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></svg>自动化任务</div>
|
|
19
|
+
<div class="dsh-row on"><span data-slot="entry-icon"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><rect x="4" y="4" width="16" height="16" rx="4"/></svg></span><span data-slot="entry-label">我的插件</span></div>
|
|
20
|
+
<div class="dsh-row"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><rect x="4" y="4" width="6" height="6" rx="1.5"/><rect x="14" y="4" width="6" height="6" rx="3"/><rect x="4" y="14" width="6" height="6" rx="1.5"/><rect x="14" y="14" width="6" height="6" rx="1.5"/></svg>更多</div>
|
|
21
|
+
</nav>
|
|
22
|
+
<div class="dsh-sec">工作区<div class="dsh-sec-acts"><div class="dsh-iconbtn"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="M20 20l-4-4"/></svg></div><div class="dsh-iconbtn"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 8h10M18 8h2M4 16h2M10 16h10"/><circle cx="16" cy="8" r="2"/><circle cx="8" cy="16" r="2"/></svg></div><div class="dsh-iconbtn"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><path d="M12 11v5M9.5 13.5h5"/></svg></div></div></div>
|
|
23
|
+
<div class="dsh-row"><span class="dsh-folder"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></svg></span>我的项目</div>
|
|
24
|
+
<div class="dsh-sess">整理会议记录<span class="dsh-time">2 小时</span></div>
|
|
25
|
+
<div class="dsh-sess">新会话</div>
|
|
26
|
+
<div class="dsh-acct"><div class="dsh-avatar">我</div>我的账号</div>
|
|
27
|
+
</aside>
|
|
28
|
+
<main class="dsh-main">
|
|
29
|
+
<div class="dsh-bar"><div class="dsh-iconbtn dsh-corner"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M15 3v18"/></svg></div></div>
|
|
30
|
+
<div data-slot="main">
|
|
31
|
+
<!-- 插件整页:点左侧栏那一行后主区显示的内容 -->
|
|
32
|
+
</div>
|
|
33
|
+
</main>
|
|
34
|
+
</div>
|
|
35
|
+
</body>
|
|
36
|
+
</html>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=1280">
|
|
6
|
+
<meta name="dsh-design" content="dshplugin 1280x800">
|
|
7
|
+
<title>会话标签页</title>
|
|
8
|
+
<link rel="stylesheet" href="dsh-shell.css">
|
|
9
|
+
<!-- 外框(DSH 插件 · 会话标签页):只改 data-slot 里面,别动外框的结构、文字和 dsh-shell.css -->
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div class="dsh-app" data-frame="dsh/view">
|
|
13
|
+
<aside class="dsh-side">
|
|
14
|
+
<div class="dsh-brand"><div class="dsh-logo">deepseek<span class="dsh-logo-tag">HARNESS</span></div><div class="dsh-iconbtn"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M9 3v18"/></svg></div></div>
|
|
15
|
+
<div class="dsh-new"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 8v8M8 12h8"/></svg>新会话</div>
|
|
16
|
+
<nav class="dsh-nav">
|
|
17
|
+
<div class="dsh-row"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2.5l3 3-3 3-3-3zM18.5 9l3 3-3 3-3-3zM5.5 9l3 3-3 3-3-3zM12 15.5l3 3-3 3-3-3z"/></svg>插件</div>
|
|
18
|
+
<div class="dsh-row"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></svg>自动化任务</div>
|
|
19
|
+
<div class="dsh-row"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><rect x="4" y="4" width="6" height="6" rx="1.5"/><rect x="14" y="4" width="6" height="6" rx="3"/><rect x="4" y="14" width="6" height="6" rx="1.5"/><rect x="14" y="14" width="6" height="6" rx="1.5"/></svg>更多</div>
|
|
20
|
+
</nav>
|
|
21
|
+
<div class="dsh-sec">工作区<div class="dsh-sec-acts"><div class="dsh-iconbtn"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="M20 20l-4-4"/></svg></div><div class="dsh-iconbtn"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 8h10M18 8h2M4 16h2M10 16h10"/><circle cx="16" cy="8" r="2"/><circle cx="8" cy="16" r="2"/></svg></div><div class="dsh-iconbtn"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><path d="M12 11v5M9.5 13.5h5"/></svg></div></div></div>
|
|
22
|
+
<div class="dsh-row"><span class="dsh-folder"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></svg></span>我的项目</div>
|
|
23
|
+
<div class="dsh-sess on">整理会议记录<span class="dsh-time">2 小时</span></div>
|
|
24
|
+
<div class="dsh-sess">新会话</div>
|
|
25
|
+
<div class="dsh-acct"><div class="dsh-avatar">我</div>我的账号</div>
|
|
26
|
+
</aside>
|
|
27
|
+
<main class="dsh-main">
|
|
28
|
+
<header class="dsh-head">
|
|
29
|
+
<div class="dsh-crumbs">整理会议记录<span class="dsh-mode">标准模式<svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M6 9l6 6 6-6"/></svg></span></div>
|
|
30
|
+
<div class="dsh-utils"><div class="dsh-split"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M9 8l-4 4 4 4M15 8l4 4-4 4"/></svg><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><path d="M6 9l6 6 6-6"/></svg></div><div class="dsh-iconbtn"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><circle cx="5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/></svg></div></div>
|
|
31
|
+
<div class="dsh-iconbtn dsh-corner"><svg class="dsh-i" viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M15 3v18"/></svg></div>
|
|
32
|
+
<div class="dsh-tabs" role="tablist"><div class="dsh-tab">对话</div><div class="dsh-tab">轨迹</div><div class="dsh-tab on"><span data-slot="tab-label">我的插件</span></div></div>
|
|
33
|
+
</header>
|
|
34
|
+
<div data-slot="main">
|
|
35
|
+
<!-- 插件视图:点会话顶上这个标签后下面整块显示的内容 -->
|
|
36
|
+
</div>
|
|
37
|
+
</main>
|
|
38
|
+
</div>
|
|
39
|
+
</body>
|
|
40
|
+
</html>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# DSH 插件(`dshplugin`)
|
|
2
|
+
|
|
3
|
+
给 DSH(DeepSeek Harness)桌面端做插件界面。插件长在 DSH 里面,所以每屏都带 **DSH 的外框**(左侧栏、会话顶栏、右侧栏、设置弹窗),你只设计插件那一块。外框是照 DSH 0.2.2 量的,浅色、深色都有。
|
|
4
|
+
|
|
5
|
+
## 四个位置
|
|
6
|
+
|
|
7
|
+
| 位置 | 外框文件 | 用户在哪看到 | 槽位(`data-slot`) |
|
|
8
|
+
| --- | --- | --- | --- |
|
|
9
|
+
| 左侧栏入口 | `sidebar.html` | 左侧栏「插件 / 自动化任务」那一排多一行,点开主区是插件整页 | `entry-icon`、`entry-label`、`main`(1000×760) |
|
|
10
|
+
| 设置分区 | `settings.html` | 设置弹窗左边导航多一项,右边是插件的设置 | `entry-icon`、`entry-label`、`main`(约 610×690,左右已留 24px) |
|
|
11
|
+
| 会话标签页 | `view.html` | 会话顶上「对话 / 轨迹」旁边多一个标签,下面整块是插件视图 | `tab-label`、`main`(1000×724) |
|
|
12
|
+
| 右侧栏面板 | `panel.html` | 会话顶栏多一个按钮,点开右侧栏是插件面板 | `button-icon`、`panel-title`、`main`(574×762) |
|
|
13
|
+
|
|
14
|
+
用户没说放哪就问一句(给这四个选项);一个插件可以占好几个位置,一个位置一屏。
|
|
15
|
+
|
|
16
|
+
## 怎么做
|
|
17
|
+
|
|
18
|
+
1. **复制外框**:把技能目录 `frames/dsh/` 里的 `dsh-shell.css` 和要用的外框 HTML **原样**复制进设计目录(HTML 可以改文件名,照常用英文小写,比如 `pomodoro-view.html`);`<title>` 照常改成「屏名 · 产品名」(如「标签页 · 番茄钟」),它不算外框。外框自带 `<meta name="dsh-design" content="dshplugin 1280x800">`,别改。
|
|
19
|
+
2. **只写槽位里面**:插件界面写进 `<div data-slot="main">`;`entry-icon` / `button-icon` 放一个 16×16 的线条 `<svg>`(`stroke="currentColor"`,别用彩色图),`entry-label` / `tab-label` / `panel-title` 换成插件名(2–6 个字)。几屏的图标、名字要一致。
|
|
20
|
+
3. **外框一个字都别动**:结构、文字、class、`style`、`dsh-shell.css` 都不改,也别删外框里的东西。改了体检报「外框被改动」,用户看到的就不是真 DSH 了。
|
|
21
|
+
4. **样式只管槽位**:插件的样式写在 `<head>` 里自己的 `<style>`,每条选择器都从 `[data-slot="main"]` 开头(`[data-slot="main"] .timer { … }`)。不写 `body`、`*`、`button`、`h1` 这种不带前缀的选择器——会改到外框。
|
|
22
|
+
5. **默认长得像 DSH**:不用 `pick_style`,也不用 `tokens.css`;颜色、圆角、字体用外框的变量,深色自动跟着变:
|
|
23
|
+
|
|
24
|
+
| 变量 | 用途 |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| `--dsh-bg` / `--dsh-card` / `--dsh-side` | 主区底色 / 卡片、弹窗底色 / 侧栏底色 |
|
|
27
|
+
| `--dsh-fg` / `--dsh-muted` | 正文 / 次要字 |
|
|
28
|
+
| `--dsh-line` / `--dsh-hover` | 分隔线、边框 / 选中行、悬停 |
|
|
29
|
+
| `--dsh-accent` | 选中、链接、强调(蓝) |
|
|
30
|
+
| `--dsh-btn` / `--dsh-btn-fg` | 主按钮(浅色黑底白字,深色反过来) |
|
|
31
|
+
| `--dsh-radius-sm` / `-md` / `-lg` | 8 / 12 / 16px |
|
|
32
|
+
| `--dsh-font` / `--dsh-font-code` | 正文字体 / 代码字体 |
|
|
33
|
+
|
|
34
|
+
DSH 自己的样子:正文 14px、标题 16–20px 中粗;卡片 1px `--dsh-line` 边、12–16px 圆角、不加重阴影;按钮高 28–32px,主按钮黑底(深色白底),次按钮描边。用户要自己的品牌风格时才建 `tokens.css`,变量也只在槽位里用。
|
|
35
|
+
6. **深色**:外框和 `--dsh-*` 变量自带;插件里另写的颜色要在 `[data-theme="dark"] [data-slot="main"] …` 里给深色值。
|
|
36
|
+
7. **放得下**:`main` 比内容小时会自己滚动,但关键内容放在第一屏;右侧栏只有 574 宽,按窄面板排(一列为主)。
|
|
37
|
+
|
|
38
|
+
## 示例
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<head>
|
|
42
|
+
…外框原样…
|
|
43
|
+
<style>
|
|
44
|
+
[data-slot="main"] .pomo { padding: 32px 40px; display: grid; gap: 16px; }
|
|
45
|
+
[data-slot="main"] .pomo-time { font: 600 56px/1 var(--dsh-font); }
|
|
46
|
+
[data-slot="main"] .pomo-card { border: 1px solid var(--dsh-line); border-radius: var(--dsh-radius-lg); background: var(--dsh-card); padding: 16px; }
|
|
47
|
+
[data-slot="main"] .pomo-go { height: 32px; padding: 0 16px; border: 0; border-radius: var(--dsh-radius-lg); background: var(--dsh-btn); color: var(--dsh-btn-fg); }
|
|
48
|
+
</style>
|
|
49
|
+
</head>
|
|
50
|
+
…
|
|
51
|
+
<div class="dsh-tab on"><span data-slot="tab-label">番茄钟</span></div>
|
|
52
|
+
…
|
|
53
|
+
<div data-slot="main">
|
|
54
|
+
<section class="pomo">
|
|
55
|
+
<div class="pomo-time">25:00</div>
|
|
56
|
+
<button class="pomo-go">开始专注</button>
|
|
57
|
+
<div class="pomo-card">今天完成 3 个番茄</div>
|
|
58
|
+
</section>
|
|
59
|
+
</div>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## 讲究
|
|
63
|
+
|
|
64
|
+
- 外框里的会话名、工作区、账号(「我的账号」)是占位,别换成真实的人名、手机号。
|
|
65
|
+
- 不要自己再画一个窗口、标题栏、DSH 侧栏——外框已经有了。
|
|
66
|
+
- 插件里的弹窗、下拉菜单也画在 `main` 里面(`position: absolute`),不要盖到外框上。
|