dsh-claude-design-system 2.12.2 → 2.12.3

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/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // dsh-claude-design-system 2.12.2: built from baoyu-design.
1
+ // dsh-claude-design-system 2.12.3: built from baoyu-design.
2
2
  var define_PLUGIN_default = { name: "claude-design-system", provider: "dsh-claude-design-system", skills: [{ name: "claude-design-system", description: "Create and revise design systems in the Design System artifact format (project/design-system.json, tokens.json, a README brand book, component previews, fonts and asset groups) as local files, then open them in a local design-system page where the user can browse and edit tokens, type, components and assets. Use when the user asks for a design system or brand kit in this format, built from a code repository, a design tool or scratch, names claude-design-system or the Design System type, or wants to revise a folder that holds project/design-system.json. claude-slides and claude-design install these systems. Not for a free-form HTML style guide, UI kit or token page.", comments: true }] };
3
3
 
4
4
  import { readFile } from "node:fs/promises";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-claude-design-system",
3
- "version": "2.12.2",
3
+ "version": "2.12.3",
4
4
  "description": "DeepSeek Harness plugin: the claude-design-system skill from baoyu-design. The agent writes design systems (tokens, type, components, assets) as files and opens them in a local design-system page.",
5
5
  "keywords": [
6
6
  "dsh",
@@ -24,6 +24,12 @@
24
24
  "icon": "./icon.svg",
25
25
  "baoyuDesign": {
26
26
  "releaseNotes": [
27
+ {
28
+ "version": "2.12.3",
29
+ "date": "2026-11-10",
30
+ "en": "### Fixes\n- **`claude-design`: `check` now catches a canvas title placed too close above its row.** An artboard's name strip keeps its size on screen while a title (`title1`) scales with the canvas, so a title 140 px above its row looked fine at 100% but covered the artboards' names once zoomed out below about 50%. `SKILL.md` already asked for at least 223 px. `check` now reports a title of 72 px or more that is closer than that to the artboards under it, or that sits over one: one issue per title, with the `y` to move it to. Text the user adds with the editor's text tool is left alone, wherever it is (contributed by @congee949, [#38](https://github.com/JimLiu/baoyu-design/pull/38)).",
31
+ "zh": "### 修复\n- **`claude-design`:`check` 现在会查出离画板太近的画布标题。** 画板的名称条在屏幕上大小不变,标题(`title1`)却跟着画布缩放,所以标题放在一行画板上方 140 px,100% 时看着没问题,缩到 50% 以下就压住了画板的名字。`SKILL.md` 本来就要求至少 223 px;现在 72 px 及以上的标题离下面的画板不到这个距离,或者压在画板上,`check` 都会报出来,每个标题一条,并给出要挪到的 `y`。用户用编辑器文字工具加的文字,放在哪里都不查(@congee949 贡献,[#38](https://github.com/JimLiu/baoyu-design/pull/38))。"
32
+ },
27
33
  {
28
34
  "version": "2.12.2",
29
35
  "date": "2026-11-09",
@@ -65,12 +71,6 @@
65
71
  "date": "2026-11-05",
66
72
  "en": "### Features\n- **The DeepSeek Harness plugins update in one click.** When a new version is out, the app offers it: a card at the bottom right, a line at the top of the **Artifacts** page, and an **Update** button on each plugin's page. One click updates the plugins together, with nothing to uninstall, and most updates need no restart. If an update fails, the plugin stays on the version it was. A plugin added from a folder isn't offered one. This starts with 2.10.0, so 2.9.2 and earlier need [one last update by hand](dsh-plugins/README.md#update).\n- **DeepSeek Harness: a skill can be kept to one agent preset.** Turn off the plugin's own row and declare the plugin in the preset, and `/` lists the skill only in that preset's sessions. The **Artifacts** page and comments keep working, through a new package, `dsh-claude-artifacts`, that each plugin installs with it. See [how to set it up](dsh-plugins/README.md#keep-a-skill-to-one-preset).\n\n### Fixes\n- `archive` and the **Whole folder** export zipped `.git`, including the remote's address and any token in it, and that zip is what gets sent to other people. `.git` now stays out, at any depth.\n- An artifact folder's default `.gitignore` took `exports/` (a film's MP4 too) and two of the three temp file shapes into git, and its `history/` rule also matched a project's own folder of that name, which git then dropped. `history/` and `exports/` now match only at the top of the folder.\n- `share` could give out a TUN proxy's address, such as sing-box's `172.19.0.1`, first when the system lists it first. It now skips an address that answers at every port, and lists tunnels after the local network.\n- Design's Standalone export: a `#id` link did nothing when the file was opened directly, and over `http://` it also scrolled the page around the frame. A click now scrolls inside the frame only, as Play does.",
67
73
  "zh": "### 新功能\n- **DeepSeek Harness 插件可以一键更新。** 出了新版本,应用会提示你:右下角弹出卡片,**Artifacts** 页(中文界面是「作品」)顶部和每个插件的详情页也有 **Update**(更新)按钮。点一下,这些插件一起更新,不用卸载,多数情况也不用重启。更新失败时插件还是原来的版本。从文件夹安装的插件不会收到提示。这个功能从 2.10.0 开始,所以 2.9.2 和更早的版本要[最后手动更新一次](dsh-plugins/README.zh-CN.md#更新)。\n- **DeepSeek Harness:技能可以只留给某个 Agent 预设。** 关掉插件自己那一行,再在预设里声明这个插件,`/` 就只在这个预设的会话里列出这个技能。作品页和评论照常工作,它们现在由新包 `dsh-claude-artifacts` 负责,每个插件都会带上它。[设置方法](dsh-plugins/README.zh-CN.md#只让某个预设用某个技能)。\n\n### 修复\n- `archive` 和导出的 **Whole folder**(整个文件夹)会把 `.git` 打进 zip,里面有远程仓库地址和可能带着的 token,而这个 zip 正是要发给别人的。现在任何层级的 `.git` 都不会打进去。\n- 作品文件夹默认的 `.gitignore` 会把 `exports/`(包括影片的 MP4)和三种临时文件里的两种提交进 git;它的 `history/` 规则还会匹配项目自己的同名文件夹,导致 git 把那个文件夹漏掉。现在 `history/` 和 `exports/` 只匹配文件夹顶层。\n- 系统把 TUN 代理的网卡排在前面时,`share` 可能先给出代理的地址,比如 sing-box 的 `172.19.0.1`。现在会跳过在所有端口都有应答的地址,并把隧道网卡排在局域网后面。\n- 设计稿的 Standalone 导出:直接打开文件时,`#id` 链接点了没反应;通过 `http://` 打开时,还会连带滚动框架外的页面。现在点击只在框架内滚动,和 Play 一样。"
68
- },
69
- {
70
- "version": "2.9.2",
71
- "date": "2026-11-04",
72
- "en": "### Fixes\n- DeepSeek Harness on Windows: the command the skills told the agent to run was written for a POSIX shell, and PowerShell reads a quoted path at the start of a line as a string, not a command. On Windows they now give `& '<node>' '<script>' <command>`, and say that PowerShell has no heredoc.",
73
- "zh": "### 修复\n- Windows 上的 DeepSeek Harness:技能告诉 agent 运行的命令是按 POSIX shell 写的,而 PowerShell 会把行首带引号的路径当成字符串,不当成命令。现在 Windows 上给的是 `& '<node>' '<script>' <command>`,并说明 PowerShell 没有 heredoc。"
74
74
  }
75
75
  ]
76
76
  },
@@ -96,7 +96,7 @@
96
96
  "dsh": ">=0.2.0-0"
97
97
  },
98
98
  "dependencies": {
99
- "dsh-claude-artifacts": "^2.12.2"
99
+ "dsh-claude-artifacts": "^2.12.3"
100
100
  },
101
101
  "dsh": {
102
102
  "bundle": {
@@ -1050,6 +1050,37 @@ function checkDesignSystems(value, tree, add) {
1050
1050
  if (!recorded.has(folder)) add(`${DESIGN_SYSTEMS_DIR}/${folder}/ has no record in designSystems; the editor offers a design system only when both are there`);
1051
1051
  }
1052
1052
  }
1053
+ var NOTE_SIZES = { s: 14, m: 24, l: 40, xl: 72, xxl: 120 };
1054
+ var TITLE_SIZE = 72;
1055
+ var TITLE_CLEARANCE = 223;
1056
+ function titleSize(size) {
1057
+ if (typeof size === "string" && Object.hasOwn(NOTE_SIZES, size)) return NOTE_SIZES[size];
1058
+ return isFiniteNumber(size) ? Math.round(Math.min(Math.max(size, 8), 400)) : TITLE_SIZE;
1059
+ }
1060
+ function checkTitleClearance(id, note, boards, firstPage, add) {
1061
+ const size = titleSize(note.size);
1062
+ if (size < TITLE_SIZE) return;
1063
+ const page = note.page ?? firstPage;
1064
+ const right = note.x + (isFiniteNumber(note.maxW) && note.maxW > 0 ? note.maxW : Math.max(1, note.text.length) * size);
1065
+ const below = [];
1066
+ const over = [];
1067
+ for (const [key, board] of Object.entries(boards)) {
1068
+ if (!isRecord2(board) || !isFiniteNumber(board.x) || !isFiniteNumber(board.y) || !isFiniteNumber(board.w) || !isFiniteNumber(board.h)) continue;
1069
+ if ((board.page ?? firstPage) !== page || board.x >= right || board.x + board.w <= note.x) continue;
1070
+ if (board.y >= note.y) {
1071
+ if (board.y - note.y < TITLE_CLEARANCE) below.push({ key, y: board.y });
1072
+ } else if (note.y < board.y + board.h) over.push(key);
1073
+ }
1074
+ const others = (n, what) => n > 0 ? ` (and ${n} more ${what}${n > 1 ? "s" : ""})` : "";
1075
+ if (below.length) {
1076
+ below.sort((a, b) => a.y - b.y);
1077
+ const [row] = below;
1078
+ add(`notes["${id}"] (title1) is ${Math.round(row.y - note.y)} px above ${row.key}${others(below.length - 1, "artboard")}; put it at least ${TITLE_CLEARANCE} px above its row (y \u2264 ${row.y - TITLE_CLEARANCE}; move the rows apart if that runs into the row above), or zoomed out it runs into the artboard's name strip`);
1079
+ }
1080
+ if (over.length) {
1081
+ add(`notes["${id}"] (title1) sits over ${over[0]}${others(over.length - 1, "artboard")}; a title goes in clear canvas, at least ${TITLE_CLEARANCE} px above its row`);
1082
+ }
1083
+ }
1053
1084
  function checkIndex(canvas, tree, issues) {
1054
1085
  const add = (message) => issues.push({ file: CANVAS_FILE, message });
1055
1086
  if (canvas.title !== void 0 && typeof canvas.title !== "string") add("title must be a string");
@@ -1124,6 +1155,8 @@ function checkIndex(canvas, tree, issues) {
1124
1155
  if (canvas.notes !== void 0) {
1125
1156
  if (!isRecord2(canvas.notes)) add('notes must be an object {"<id>": {"x","y","text",\u2026}}');
1126
1157
  else {
1158
+ const first = Array.isArray(canvas.pages) ? canvas.pages[0] : void 0;
1159
+ const firstPage = isRecord2(first) && typeof first.id === "string" ? first.id : void 0;
1127
1160
  const entries = Object.entries(canvas.notes);
1128
1161
  if (entries.length > MAX_NOTES) add(`notes has ${entries.length} entries; it must stay under ${MAX_NOTES + 1}`);
1129
1162
  for (const [id, note] of entries) {
@@ -1136,6 +1169,7 @@ function checkIndex(canvas, tree, issues) {
1136
1169
  add(`notes["${id}"].kind must be "title1" (a title over several artboards), left out (a sticky), or one of the user's rect, oval, pen, line, arrow, image`);
1137
1170
  }
1138
1171
  if (note.page !== void 0 && (typeof note.page !== "string" || !pageIds.has(note.page))) add(`notes["${id}"].page must be the id of an entry in pages`);
1172
+ if (note.kind === "title1") checkTitleClearance(id, { x: note.x, y: note.y, text: note.text, size: note.size, maxW: note.maxW, page: note.page }, canvas.boards, firstPage, add);
1139
1173
  }
1140
1174
  }
1141
1175
  }