dsh-claude-design-system 2.4.1 → 2.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/lib/client.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/skills/claude-design-system/SKILL.md +13 -1
- package/skills/claude-design-system/scripts/artifact.mjs +316 -78
- package/skills/claude-design-system/scripts/editor/assets/{index-BBq8YM1-.js → index-BABbb9P5.js} +82 -82
- package/skills/claude-design-system/scripts/editor/index.html +1 -1
- package/skills/claude-design-system/scripts/editor/share-ui.js +83 -0
- package/skills/claude-design-system/scripts/server.mjs +817 -95
package/lib/client.js
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// dsh-claude-design-system 2.
|
|
1
|
+
// dsh-claude-design-system 2.5.0: 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. A free-form HTML style guide, UI kit or token page is baoyu-design's.", comments: true }] };
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-claude-design-system",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
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",
|
|
@@ -163,7 +163,8 @@ leave alone stays as it is, and removing a file is deleting it. The rest goes th
|
|
|
163
163
|
- `upload <root> <file> --group <Group>` → `{url:"/_blob/<id>", record, indexPath, shownAs, …}`: stores a copy as `project/_blobs/<id>.<ext>`; the same bytes always get the same id. Write `record` into the index at `indexPath` (with the index, LAST). `<root>` must exist.
|
|
164
164
|
- `check <root>` → `problems` (0: done); `issues` (each a `file` under `project/` and its fix) and `notes`, each when any; it exits 1 while any problem remains. The generated files and whether previews render are not checked.
|
|
165
165
|
- `list [dir …]` → the design systems in the working directory (or the folders given, and those in `$CLAUDE_DESIGN_SYSTEMS`), each `{title, namespace, folder, root, readme, tokens}`.
|
|
166
|
-
- `open <root>` → `{url, pid, stop, …}`: starts the page on this machine in the background (once; later calls reuse it, `reused: true`) and prints its address. `stop <root>` ends it (`serve <root>` runs it in the foreground instead). The page saves the user's edits (and the generated files) into the same folder, and shows yours as soon as you write them. `.artifact-server.json` and `.artifact-server.log` beside `project/` are its own: leave them; so is `comments.json` (the comments, see Comments), which only the comment commands below change.
|
|
166
|
+
- `open <root>` → `{url, pid, stop, …}`: starts the page on this machine in the background (once; later calls reuse it, `reused: true`) and prints its address, 127.0.0.1:4730 (the next free port up when 4730 is taken; `--port n` starts from n, `--port 0` takes any). `stop <root>` ends it (`serve <root>` runs it in the foreground instead). The page saves the user's edits (and the generated files) into the same folder, and shows yours as soon as you write them. `.artifact-server.json` and `.artifact-server.log` beside `project/` are its own: leave them; so is `comments.json` (the comments, see Comments), which only the comment commands below change.
|
|
167
|
+
- `share <root>` (or `open <root> --lan`): opens the page to the local network and prints a link per role (Sharing, below).
|
|
167
168
|
|
|
168
169
|
Each result carries more keys than named here; its `next`, where it has one, says what to do with it.
|
|
169
170
|
|
|
@@ -243,6 +244,17 @@ People comment in the open editor: Comment (or C), then a click on a token, colo
|
|
|
243
244
|
- `comment-resolve <root> <id>` closes one (`--reopen` opens it again).
|
|
244
245
|
- Live, while the page is open: run `comments <root> --wait` as a background command that tells you when it exits. While it waits the editor offers **Send to agent**; when the person sends a comment, it prints that thread and exits. Handle it, reply, then start the wait again (its `next`). No background commands? Skip it: the page then just saves comments, without the button, and you read them when asked. (`open <root> --agent-hook "<command>"` is the other way in: the server runs the command in `<root>` for each comment sent, the thread as JSON on stdin.)
|
|
245
246
|
|
|
247
|
+
## Sharing
|
|
248
|
+
|
|
249
|
+
`share <root>` opens the system to the local network (the same Wi-Fi or LAN, as `http://<this computer's address>:4730/`), starting the server if it isn't running, and prints a link per role: `editor` edits and comments, `commenter` comments without editing, `viewer` only looks. `open <root> --lan` (or `serve --lan`) shares it as it starts.
|
|
250
|
+
|
|
251
|
+
- The person at this computer is the owner: everything, plus the Share button in the bar across the top of the page, next to the comments button (the links, the people who joined and who is online, each one's role, sharing on or off). On this computer (`127.0.0.1`) they stay the owner even when they open a link; a link opened at the network address shows what that role sees.
|
|
252
|
+
- Give the person the links to pass on. Whoever opens one types a name and is in as that role; what they change and comment lands in the same folder as the owner's. The links survive a restart while the server gets its port back; if not, `share <root>` prints the new ones to give out again.
|
|
253
|
+
- Guests have a Share button too. It holds the links they may pass on, their own role's and the ones below it (an editor's has all three, a commenter's the commenter and viewer links, a viewer's the viewer link), and Copy link for the page's address, which only people who already have access can open. Whoever joins through a guest's link shows in the owner's panel like anyone else; turning links off, resetting them, changing roles and removing people stay the owner's.
|
|
254
|
+
- `share <root> --disable <role>` / `--enable <role>` turns a link off or on (`<role>`: one, `editor,viewer`, or `all`); off, it holds everyone who came by it until it is on again. `--reset <role>` gives the role a new link: the old one stops working and the people who came by it are out. `--role <guest>=<role>` gives someone who joined another role (`<guest>`: an id from the `guests` it prints). `--off` stops sharing on the network.
|
|
255
|
+
- Only the owner's page sends to you (Send to agent); what guests comment is saved for you to read with `comments <root>`.
|
|
256
|
+
- The links and the people who joined are in `<root>/.sharing.json`: leave it. It is plain http on the local network: anyone there with a link gets in.
|
|
257
|
+
|
|
246
258
|
## The references
|
|
247
259
|
|
|
248
260
|
Under `artifact-type/reference/` in this skill's folder: `format.md` (every file, field, cap and alias, the
|