text-to-design-mcp 0.9.0 → 0.10.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.
Files changed (3) hide show
  1. package/README.md +3 -1
  2. package/dist/index.js +105 -33
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -105,9 +105,10 @@ pkill -f text-to-design-mcp
105
105
  | --- | --- |
106
106
  | `jsd_ping` | 检查插件是否在线,返回三张能力表(核心能力 / 平台差异能力 / 平台特有 op 名单);回包被 daemon 缓存,后续可读 `jsd://platform/state` |
107
107
  | `jsd_get_selection` | 读取画布当前选中的节点 |
108
+ | `jsd_get_page` | 读取当前页结构(顶层节点轻量摘要 + 文档级页面总览;等价 `jsd://page` 资源) |
108
109
  | `jsd_find` | 按名称/类型/id 查找节点 |
109
110
  | `jsd_create_nodes` | 按描述创建节点(frame/rect/text 等,支持阴影/描边/渐变/文本样式) |
110
- | `jsd_create_svg` | 直接导入 SVG 字符串(保留 path/矢量数据,不经降级) |
111
+ | `jsd_create_svg` | 直接导入 SVG(保留 path/矢量数据,不经降级)。来源二选一:`svg` 内联字符串,或 `svgPath` 本地文件路径(**图表一律走这条**:脚本按 `chart-by-code` 配方算好、落盘,再传路径) |
111
112
  | `jsd_create_icon` | 按名称/别名模糊匹配插入 Lucide 内置图标,查无时返回候选名 |
112
113
  | `jsd_html_to_design` | 把 HTML 转成设计节点 |
113
114
  | `jsd_set_fill_color` | 填充(fills 整体替换)、混合模式、填充样式 |
@@ -167,6 +168,7 @@ Figma 用户不会再读到 jsDesign 的兜底细节;平台未探测时给「先
167
168
  | `variant-set` | 变体集构建:按能力位 `inPlaceVariants` 分流(原位合并 / 多主件兜底);有集合级管理 op 的平台(见 `platformOps`)直接建维度、加成分、改取值,不靠改名字,含建后回读 |
168
169
  | `component-property` | 组件属性的定义与设值:定义走 platform op、设值走 jsd_set_instance_properties,并给出本平台能收的值形态 |
169
170
  | `html-to-design` | HTML 转设计稿,含保真度取舍说明 |
171
+ | `chart-by-code` | **画图的主路径**:自己写代码算几何 → 落盘 SVG → `jsd_create_svg(svgPath)` 导入,含零依赖可跑示例与引擎侧硬约束(不用 `A` 指令、**不指定图形库**、配色与字号取自画布既有变量/本地样式) |
170
172
  | `icon-grid` | 批量插入 Lucide 图标并排成自动布局网格 |
171
173
  | `script-ops` | 脚本化调用纪律:压缩工具往返与上下文占用 |
172
174