@brushes/schema-to-view 1.0.4 → 1.0.7
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/package.json +1 -1
- package/skills/SKILL.md +4 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brushes/schema-to-view",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "根据 UI 截图/设计稿动态生成低代码平台 JSON schema。当用户提供 UI 图片要求生成页面、将设计稿转为低代码页面、根据截图创建页面 JSON、图片转 Schema 时使用此 skill。触发条件:UI 截图 + 低代码、设计稿转代码、图片生成页面、schema 生成",
|
|
5
5
|
"keywords": ["pi-package"],
|
|
6
6
|
"pi": {
|
package/skills/SKILL.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: schema-to-view
|
|
3
3
|
description: >
|
|
4
4
|
根据 Pc / Web UI 截图/设计稿动态生成低代码平台 Web JSON schema。当用户提供Pc/ Web UI 图片要求生成页面、
|
|
5
5
|
将设计稿转为低代码页面、根据截图创建页面 JSON、图片转 Schema 时使用此 skill。
|
|
@@ -18,7 +18,7 @@ scope:
|
|
|
18
18
|
- 已有 Schema 的属性修改
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
#
|
|
21
|
+
# schema-to-view:UI 截图 → 低代码 JSON Schema
|
|
22
22
|
|
|
23
23
|
将 Pc / Web UI 设计稿/截图转换为 web-lowcode 平台可用的 JSON schema 文件。
|
|
24
24
|
|
|
@@ -126,6 +126,7 @@ JSON schema 是一个 **扁平字典** `Record<NodeId, SerializedNode>`,唯一
|
|
|
126
126
|
- 示例:`"FKp8Qm3vNx"`, `"FCd9Wr8dGf"`, `"sN6ZG4fCJK"`
|
|
127
127
|
- 每个 ID 在整个 JSON 中唯一
|
|
128
128
|
- 可任意生成,但要确保 `parent` 和 `nodes` 引用的 ID 都存在
|
|
129
|
+
- 所有生成的节点数据都可以能删除。保证所有节点引用验证通过
|
|
129
130
|
|
|
130
131
|
#### 构建步骤
|
|
131
132
|
|
|
@@ -328,4 +329,4 @@ ROOT → OutContainer
|
|
|
328
329
|
7. JSON 输出为单行(compact),不要格式化
|
|
329
330
|
8. 文本组件绑定数据必须同时设置 `module`, `storeKey`, `code`
|
|
330
331
|
9. 生成后写入 `pageModels/{name}.json`
|
|
331
|
-
10. Container (卡片外层) 比如4列网格布局 (width: 25% ❌) 不管一行多少个 (width: 100% ✅)
|
|
332
|
+
10. Container (卡片外层) 比如4列网格布局 (width: 25% ❌) 不管一行多少个 (width: 100% ✅)
|