create-blocklet 0.9.25 → 0.9.26
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/index.js +46 -5
- package/package.json +1 -1
- package/templates/component-studio/.cursor/rules/@metadata-json.mdc +549 -0
- package/templates/component-studio/.cursor/rules/component-studio.mdc +138 -0
- package/templates/component-studio/.cursor/rules/index-tsx.mdc +192 -0
- package/templates/component-studio/.init-component-studio +0 -0
- package/templates/component-studio/README.md +44 -0
- package/templates/component-studio/_theme.tsx +4 -0
- package/templates/component-studio/api/dev.ts +21 -0
- package/templates/component-studio/api/src/index.ts +50 -0
- package/templates/component-studio/api/src/libs/auth.ts +17 -0
- package/templates/component-studio/api/src/libs/env.ts +6 -0
- package/templates/component-studio/api/src/libs/logger.ts +3 -0
- package/templates/component-studio/api/src/routes/index.ts +12 -0
- package/templates/component-studio/api/third.d.ts +17 -0
- package/templates/component-studio/biome.json +53 -0
- package/templates/component-studio/blocklet.md +8 -0
- package/templates/component-studio/blocklet.yml +58 -0
- package/templates/component-studio/index.html +15 -0
- package/templates/component-studio/logo.png +0 -0
- package/templates/component-studio/package.json +117 -0
- package/templates/component-studio/scripts/build-clean.mjs +6 -0
- package/templates/component-studio/scripts/bump-version.mjs +39 -0
- package/templates/component-studio/scripts/init-component-studio.mjs +21 -0
- package/templates/component-studio/src/HelloWorld/@metadata.json +433 -0
- package/templates/component-studio/src/HelloWorld/index.tsx +560 -0
- package/templates/component-studio/template-info.json +12 -0
- package/templates/component-studio/tsconfig.api.json +12 -0
- package/templates/component-studio/tsconfig.json +102 -0
- package/templates/component-studio/vite-server.config.ts +20 -0
- package/templates/component-studio/vite.config.ts +28 -0
- package/templates/did-connect-dapp/package.json +1 -1
- package/templates/did-wallet-dapp/package.json +1 -1
- package/templates/react-aigne-dapp/package.json +1 -1
- package/templates/react-dapp/package.json +1 -1
- package/templates/react-dapp-ts/package.json +1 -1
- package/templates/react-gun-dapp/package.json +1 -1
- package/templates/react-static/package.json +1 -1
- package/templates/solidjs-dapp/package.json +1 -1
- package/templates/solidjs-static/package.json +1 -1
- package/templates/svelte-dapp/package.json +1 -1
- package/templates/svelte-static/package.json +1 -1
- package/templates/todo-list-example/package.json +1 -1
- package/templates/vue-dapp/package.json +1 -1
- package/templates/vue-static/package.json +1 -1
- package/templates/vue-ts-static/package.json +1 -1
- package/templates/vue2-dapp/package.json +1 -1
- package/templates/vue2-static/package.json +1 -1
package/index.js
CHANGED
|
@@ -9,7 +9,6 @@ import ora from 'ora';
|
|
|
9
9
|
import prompts from 'prompts';
|
|
10
10
|
import { fileURLToPath } from 'url';
|
|
11
11
|
import { argv, cd, chalk, fs, path, YAML } from 'zx';
|
|
12
|
-
|
|
13
12
|
import { echoBrand, echoDocument } from './lib/arcblock.js';
|
|
14
13
|
import { getBlockletDidList } from './lib/did.js';
|
|
15
14
|
import { initGitRepo } from './lib/git.js';
|
|
@@ -27,7 +26,7 @@ import {
|
|
|
27
26
|
toValidPackageName,
|
|
28
27
|
} from './lib/utils.js';
|
|
29
28
|
|
|
30
|
-
const { yellow, red, green, cyan, blue, bold } = chalk;
|
|
29
|
+
const { yellow, red, green, cyan, blue, bold, magenta } = chalk;
|
|
31
30
|
|
|
32
31
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
33
32
|
|
|
@@ -143,8 +142,21 @@ const templates = [
|
|
|
143
142
|
display: '[api] nestjs',
|
|
144
143
|
color: blue,
|
|
145
144
|
},
|
|
145
|
+
// dev
|
|
146
|
+
{
|
|
147
|
+
name: 'component-studio',
|
|
148
|
+
display: '[dev] component studio (beta): Local studio using for component development',
|
|
149
|
+
color: magenta,
|
|
150
|
+
// use this permanent did as blocklet.yml did always
|
|
151
|
+
permanentDid: 'z2qa7BQdkEb3TwYyEYC1psK6uvmGnHSUHt5RM',
|
|
152
|
+
},
|
|
146
153
|
];
|
|
147
154
|
|
|
155
|
+
const templatesMap = {};
|
|
156
|
+
templates.forEach((template) => {
|
|
157
|
+
templatesMap[template.name] = template;
|
|
158
|
+
});
|
|
159
|
+
|
|
148
160
|
// see: https://github.com/npm/npm/issues/3763
|
|
149
161
|
const renameFiles = {
|
|
150
162
|
_gitignore: '.gitignore',
|
|
@@ -232,7 +244,9 @@ async function init() {
|
|
|
232
244
|
|
|
233
245
|
const targetDir = argv._[0] ? String(argv._[0]) : undefined;
|
|
234
246
|
const inputTemplateName = argv.template;
|
|
247
|
+
|
|
235
248
|
const connectUrl = argv?.connectUrl;
|
|
249
|
+
// inputDid can be user input or command line input or getting from templates item
|
|
236
250
|
const inputDid = argv.did;
|
|
237
251
|
const checkRes = checkDid(inputDid);
|
|
238
252
|
if (typeof checkRes === 'string') {
|
|
@@ -403,11 +417,38 @@ async function init() {
|
|
|
403
417
|
}
|
|
404
418
|
|
|
405
419
|
let didList = [];
|
|
406
|
-
if (
|
|
407
|
-
|
|
420
|
+
if (templateNames.length === 1 && (inputDid || templatesMap[templateNames[0]]?.permanentDid)) {
|
|
421
|
+
// permanentDid is higher priority than inputDid
|
|
422
|
+
didList = [templatesMap[templateNames[0]]?.permanentDid || inputDid];
|
|
408
423
|
} else {
|
|
424
|
+
// initialize didList with null
|
|
425
|
+
didList = new Array(templateNames.length).fill(null);
|
|
426
|
+
|
|
427
|
+
const needDidTemplateNames = [];
|
|
428
|
+
|
|
429
|
+
templateNames.forEach((templateName, index) => {
|
|
430
|
+
const { permanentDid } = templatesMap[templateName];
|
|
431
|
+
if (permanentDid) {
|
|
432
|
+
didList[index] = permanentDid;
|
|
433
|
+
} else {
|
|
434
|
+
needDidTemplateNames.push(templateName);
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
|
|
409
438
|
try {
|
|
410
|
-
|
|
439
|
+
const tempDidList = await getBlockletDidList(needDidTemplateNames, connectUrl);
|
|
440
|
+
let tempIndex = 0;
|
|
441
|
+
// fill didList null item
|
|
442
|
+
// for example:
|
|
443
|
+
// templateNames = ['template1', 'template2(with permanentDid)', 'template3']
|
|
444
|
+
// didList = [null, did2, null]
|
|
445
|
+
// tempDidList = ['did1', 'did3']
|
|
446
|
+
// then didList = ['did1', 'did2', 'did3']
|
|
447
|
+
didList.forEach((did, index) => {
|
|
448
|
+
if (!did) {
|
|
449
|
+
didList[index] = tempDidList[tempIndex++];
|
|
450
|
+
}
|
|
451
|
+
});
|
|
411
452
|
} catch (err) {
|
|
412
453
|
console.error(red(err.message));
|
|
413
454
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -0,0 +1,549 @@
|
|
|
1
|
+
---
|
|
2
|
+
description:
|
|
3
|
+
globs:
|
|
4
|
+
alwaysApply: true
|
|
5
|
+
---
|
|
6
|
+
# @metadata.json 文件说明
|
|
7
|
+
|
|
8
|
+
## 概述
|
|
9
|
+
`@metadata.json` 是 Component Studio 中的组件元数据配置文件,用于定义组件的基本信息和可配置属性。
|
|
10
|
+
|
|
11
|
+
## 作用
|
|
12
|
+
- 定义组件的基本信息和可配置属性
|
|
13
|
+
- 支持多语言(国际化)配置
|
|
14
|
+
- 控制属性在编辑器中的显示顺序和可见性
|
|
15
|
+
- 为属性提供默认值
|
|
16
|
+
- 支持多种数据类型和嵌套属性
|
|
17
|
+
|
|
18
|
+
## 维护要点
|
|
19
|
+
- 保持 `id` 唯一性
|
|
20
|
+
- 所有 `id` 都是 16 位的 uuid,不需要语意化(非常重要!)
|
|
21
|
+
- 确保 `properties` 中每个属性有唯一的标识符
|
|
22
|
+
- 维护多语言支持(至少包含 en/zh)
|
|
23
|
+
- 管理属性的显示顺序(通过 index 字段)
|
|
24
|
+
- 适当设置默认值和可见性
|
|
25
|
+
- 正确配置复杂类型的嵌套属性(subProperties)
|
|
26
|
+
|
|
27
|
+
## 最佳实践
|
|
28
|
+
- 属性键名 `key` 使用驼峰命名(如 `titleColor` )保持一致性
|
|
29
|
+
- 为所有属性设置合适的默认值,尤其是复杂类型
|
|
30
|
+
- 属性分组时保持相关属性的索引 `index` 连续
|
|
31
|
+
- 多语言配置保持一致性,确保 zh/en 都有对应内容
|
|
32
|
+
- 修改已使用的组件时,不要更改现有属性的 ID 和 key
|
|
33
|
+
|
|
34
|
+
## 字段含义
|
|
35
|
+
|
|
36
|
+
### 顶层字段
|
|
37
|
+
| 字段 | 含义 |
|
|
38
|
+
|------|------|
|
|
39
|
+
| `id` | 组件唯一标识符 |
|
|
40
|
+
| `createdAt` | 创建时间戳 |
|
|
41
|
+
| `updatedAt` | 更新时间戳 |
|
|
42
|
+
| `name` | 组件显示名称 |
|
|
43
|
+
| `description` | 组件描述 |
|
|
44
|
+
| `properties` | 包含所有可配置属性的对象 |
|
|
45
|
+
|
|
46
|
+
### 属性定义 (properties 内)
|
|
47
|
+
每个属性都有一个唯一 ID 作为键,包含以下内容:
|
|
48
|
+
|
|
49
|
+
#### 基本结构
|
|
50
|
+
```json
|
|
51
|
+
"id": {
|
|
52
|
+
"index": 0,
|
|
53
|
+
"data": {
|
|
54
|
+
"id": "id",
|
|
55
|
+
"key": "key",
|
|
56
|
+
"type": "string",
|
|
57
|
+
"visible": true,
|
|
58
|
+
"locales": {
|
|
59
|
+
"zh": {},
|
|
60
|
+
"en": {}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
说明:
|
|
67
|
+
- `index`: 排序号,从0开始
|
|
68
|
+
- `id`: 属性唯一标识符,16 位 uuid,不需要语意化(非常重要!)
|
|
69
|
+
- `key`: 属性键名,在代码中引用时使用
|
|
70
|
+
- `type`: 属性类型,默认为 string
|
|
71
|
+
- `visible`: 是否在编辑器中可见,默认为 true
|
|
72
|
+
|
|
73
|
+
#### 属性字段说明
|
|
74
|
+
- `index`: 显示顺序编号
|
|
75
|
+
- `data`:
|
|
76
|
+
- `id`: 属性唯一标识符,16 位 uuid,不需要语意化(非常重要!)
|
|
77
|
+
- `key`: 属性键名,用于代码中引用
|
|
78
|
+
- `type`: 属性数据类型,支持以下类型:
|
|
79
|
+
- `string`: 文本
|
|
80
|
+
- `multiline`: 多行文本
|
|
81
|
+
- `number`: 整数
|
|
82
|
+
- `decimal`: 小数
|
|
83
|
+
- `boolean`: 布尔值
|
|
84
|
+
- `color`: 颜色
|
|
85
|
+
- `url`: URL链接
|
|
86
|
+
- `json`: JSON对象
|
|
87
|
+
- `array`: 数组
|
|
88
|
+
- `yaml`: YAML配置
|
|
89
|
+
- `component`: 组件,支持内嵌组件
|
|
90
|
+
- `visible`: 是否在编辑器中可见
|
|
91
|
+
- `locales`: 多语言配置
|
|
92
|
+
- `zh`/`en`: 不同语言的配置
|
|
93
|
+
- `name`: 属性显示名称
|
|
94
|
+
- `defaultValue`: 默认值,可以是简单值或复杂对象
|
|
95
|
+
- `subProperties`: 嵌套属性定义,用于 yaml、json、array 等复杂类型
|
|
96
|
+
|
|
97
|
+
### 嵌套属性 (subProperties)
|
|
98
|
+
在 `yaml`, `json`, `array` 等复杂类型中可以定义子属性(subProperties)。子属性的结构与主属性列表结构相同,用于定义复杂数据类型的内部结构。
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
## 常见问题
|
|
102
|
+
|
|
103
|
+
**Q: 添加新属性后,组件中无法访问到该属性值?**
|
|
104
|
+
A: 检查属性的`visible`是否为true,并确保属性的`key`在组件代码中正确引用。
|
|
105
|
+
|
|
106
|
+
**Q: 如何在开发时测试不同语言环境?**
|
|
107
|
+
A: 可以通过修改浏览器语言设置或使用开发工具中的语言切换功能来测试。
|
|
108
|
+
|
|
109
|
+
**Q: 修改属性类型后,原有的defaultValue不生效了?**
|
|
110
|
+
A: 不同类型需要匹配相应格式的默认值,修改类型时需同步更新defaultValue。
|
|
111
|
+
|
|
112
|
+
## `@metadata.json` 示例
|
|
113
|
+
请仔细查看它的结构,其它 `@metadata.json` 的结构与其基本一致,只是其中 `properties` 中的差别
|
|
114
|
+
请注意:所有 `id` 都是 16 位的 uuid,不需要语意化(非常重要!)
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"id": "KEHGy3vdflE8JGrV",
|
|
118
|
+
"createdAt": "2025-03-20T16:01:56.655Z",
|
|
119
|
+
"updatedAt": "2025-03-21T01:24:04.008Z",
|
|
120
|
+
"name": "HelloWorld",
|
|
121
|
+
"description": "",
|
|
122
|
+
"properties": {
|
|
123
|
+
"gs1rn5jmxfvpxptx": {
|
|
124
|
+
"index": 0,
|
|
125
|
+
"data": {
|
|
126
|
+
"id": "gs1rn5jmxfvpxptx",
|
|
127
|
+
"key": "title",
|
|
128
|
+
"type": "string",
|
|
129
|
+
"visible": true,
|
|
130
|
+
"locales": {
|
|
131
|
+
"zh": {
|
|
132
|
+
"name": "标题",
|
|
133
|
+
"defaultValue": "Hello World"
|
|
134
|
+
},
|
|
135
|
+
"en": {
|
|
136
|
+
"name": "Title",
|
|
137
|
+
"defaultValue": "Hello World"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"9ajrz12ik7esfk1z": {
|
|
143
|
+
"index": 1,
|
|
144
|
+
"data": {
|
|
145
|
+
"id": "9ajrz12ik7esfk1z",
|
|
146
|
+
"key": "description",
|
|
147
|
+
"type": "string",
|
|
148
|
+
"visible": true,
|
|
149
|
+
"locales": {
|
|
150
|
+
"zh": {
|
|
151
|
+
"name": "描述",
|
|
152
|
+
"defaultValue": "这是你的创意实验室,在这里可以:\n- 设计和构建各类强大组件\n- 将创意转化为可复用代码\n- 打造专属于您的组件库\n释放你的开发潜能,开始创作吧!"
|
|
153
|
+
},
|
|
154
|
+
"en": {
|
|
155
|
+
"name": "Description",
|
|
156
|
+
"defaultValue": "This is your creative lab, where you can:\n- Design and build powerful components\n- Transform ideas into reusable code\n- Create your own component library\nUnleash your development potential and start creating!"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"3ckcfvf6b7zyskk8": {
|
|
162
|
+
"index": 2,
|
|
163
|
+
"data": {
|
|
164
|
+
"id": "3ckcfvf6b7zyskk8",
|
|
165
|
+
"key": "logo",
|
|
166
|
+
"type": "url",
|
|
167
|
+
"visible": true,
|
|
168
|
+
"locales": {
|
|
169
|
+
"zh": {
|
|
170
|
+
"defaultValue": {
|
|
171
|
+
"url": "/.well-known/service/blocklet/logo?imageFilter=convert&f=png&h=80",
|
|
172
|
+
"mediaKitUrl": "/.well-known/service/blocklet/logo?imageFilter=convert&f=png&h=80"
|
|
173
|
+
},
|
|
174
|
+
"name": "Logo"
|
|
175
|
+
},
|
|
176
|
+
"en": {
|
|
177
|
+
"defaultValue": {
|
|
178
|
+
"url": "/.well-known/service/blocklet/logo?imageFilter=convert&f=png&h=80",
|
|
179
|
+
"mediaKitUrl": "/.well-known/service/blocklet/logo?imageFilter=convert&f=png&h=80"
|
|
180
|
+
},
|
|
181
|
+
"name": "Logo"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"subProperties": {
|
|
185
|
+
"ML-CDw7LvtlhM_cl": {
|
|
186
|
+
"index": 0,
|
|
187
|
+
"data": {
|
|
188
|
+
"id": "ML-CDw7LvtlhM_cl",
|
|
189
|
+
"key": "url",
|
|
190
|
+
"locales": {
|
|
191
|
+
"en": {
|
|
192
|
+
"name": "url"
|
|
193
|
+
},
|
|
194
|
+
"zh": {
|
|
195
|
+
"name": "url"
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"K-HYgPHtAsmO_mer": {
|
|
201
|
+
"index": 1,
|
|
202
|
+
"data": {
|
|
203
|
+
"id": "K-HYgPHtAsmO_mer",
|
|
204
|
+
"key": "mediaKitUrl",
|
|
205
|
+
"locales": {
|
|
206
|
+
"en": {
|
|
207
|
+
"name": "mediaKitUrl"
|
|
208
|
+
},
|
|
209
|
+
"zh": {
|
|
210
|
+
"name": "mediaKitUrl"
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"evequmAWgWEWZLex": {
|
|
216
|
+
"index": 2,
|
|
217
|
+
"data": {
|
|
218
|
+
"id": "evequmAWgWEWZLex",
|
|
219
|
+
"key": "width",
|
|
220
|
+
"locales": {
|
|
221
|
+
"en": {
|
|
222
|
+
"name": "width"
|
|
223
|
+
},
|
|
224
|
+
"zh": {
|
|
225
|
+
"name": "width"
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"poeAwflRHJeUmfLa": {
|
|
231
|
+
"index": 3,
|
|
232
|
+
"data": {
|
|
233
|
+
"id": "poeAwflRHJeUmfLa",
|
|
234
|
+
"key": "height",
|
|
235
|
+
"locales": {
|
|
236
|
+
"en": {
|
|
237
|
+
"name": "height"
|
|
238
|
+
},
|
|
239
|
+
"zh": {
|
|
240
|
+
"name": "height"
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"x3lqht8ikble1itx": {
|
|
249
|
+
"index": 3,
|
|
250
|
+
"data": {
|
|
251
|
+
"id": "x3lqht8ikble1itx",
|
|
252
|
+
"key": "copyright",
|
|
253
|
+
"type": "string",
|
|
254
|
+
"visible": false,
|
|
255
|
+
"locales": {
|
|
256
|
+
"zh": {
|
|
257
|
+
"name": "版权信息",
|
|
258
|
+
"defaultValue": "由 Component Studio 提供支持"
|
|
259
|
+
},
|
|
260
|
+
"en": {
|
|
261
|
+
"name": "Copyright",
|
|
262
|
+
"defaultValue": "Powered by Component Studio"
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"q0ezdj81v0m14y5m": {
|
|
268
|
+
"index": 4,
|
|
269
|
+
"data": {
|
|
270
|
+
"id": "q0ezdj81v0m14y5m",
|
|
271
|
+
"key": "number",
|
|
272
|
+
"type": "number",
|
|
273
|
+
"visible": true,
|
|
274
|
+
"locales": {
|
|
275
|
+
"zh": {
|
|
276
|
+
"name": "整数",
|
|
277
|
+
"defaultValue": 42
|
|
278
|
+
},
|
|
279
|
+
"en": {
|
|
280
|
+
"name": "Integer",
|
|
281
|
+
"defaultValue": 42
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"bl0rimfebwbencoj": {
|
|
287
|
+
"index": 5,
|
|
288
|
+
"data": {
|
|
289
|
+
"id": "bl0rimfebwbencoj",
|
|
290
|
+
"key": "decimal",
|
|
291
|
+
"type": "decimal",
|
|
292
|
+
"visible": true,
|
|
293
|
+
"locales": {
|
|
294
|
+
"zh": {
|
|
295
|
+
"name": "小数",
|
|
296
|
+
"defaultValue": 3.14
|
|
297
|
+
},
|
|
298
|
+
"en": {
|
|
299
|
+
"name": "Decimal",
|
|
300
|
+
"defaultValue": 3.14
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
"gioetxz8d13jabz6": {
|
|
306
|
+
"index": 6,
|
|
307
|
+
"data": {
|
|
308
|
+
"id": "gioetxz8d13jabz6",
|
|
309
|
+
"key": "showCopyright",
|
|
310
|
+
"type": "boolean",
|
|
311
|
+
"visible": true,
|
|
312
|
+
"locales": {
|
|
313
|
+
"zh": {
|
|
314
|
+
"name": "是否展示 Copyright",
|
|
315
|
+
"defaultValue": true
|
|
316
|
+
},
|
|
317
|
+
"en": {
|
|
318
|
+
"name": "Show Description",
|
|
319
|
+
"defaultValue": true
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
"yi1oj4rq1eziup1d": {
|
|
325
|
+
"index": 7,
|
|
326
|
+
"data": {
|
|
327
|
+
"id": "yi1oj4rq1eziup1d",
|
|
328
|
+
"key": "titleColor",
|
|
329
|
+
"type": "color",
|
|
330
|
+
"visible": true,
|
|
331
|
+
"locales": {
|
|
332
|
+
"zh": {
|
|
333
|
+
"defaultValue": "rgb(45, 36, 45)",
|
|
334
|
+
"name": "标题颜色"
|
|
335
|
+
},
|
|
336
|
+
"en": {
|
|
337
|
+
"defaultValue": "rgb(44, 39, 44)",
|
|
338
|
+
"name": "Title Color"
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"4f49q5uidkcp5ak4": {
|
|
344
|
+
"index": 8,
|
|
345
|
+
"data": {
|
|
346
|
+
"id": "4f49q5uidkcp5ak4",
|
|
347
|
+
"key": "json",
|
|
348
|
+
"type": "json",
|
|
349
|
+
"visible": true,
|
|
350
|
+
"locales": {
|
|
351
|
+
"zh": {
|
|
352
|
+
"name": "JSON 数据",
|
|
353
|
+
"defaultValue": {
|
|
354
|
+
"foo": "-",
|
|
355
|
+
"bar": "-"
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
"en": {
|
|
359
|
+
"name": "JSON Data",
|
|
360
|
+
"defaultValue": {
|
|
361
|
+
"foo": "foo",
|
|
362
|
+
"bar": "bar"
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
"subProperties": {
|
|
367
|
+
"gpy89bsxc6ovvlsp": {
|
|
368
|
+
"index": 0,
|
|
369
|
+
"data": {
|
|
370
|
+
"id": "gpy89bsxc6ovvlsp",
|
|
371
|
+
"key": "foo",
|
|
372
|
+
"type": "string",
|
|
373
|
+
"visible": true,
|
|
374
|
+
"locales": {
|
|
375
|
+
"zh": {
|
|
376
|
+
"name": "名称",
|
|
377
|
+
"defaultValue": "-"
|
|
378
|
+
},
|
|
379
|
+
"en": {
|
|
380
|
+
"name": "Foo",
|
|
381
|
+
"defaultValue": "foo"
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
"1j34jdhdptp2xm5e": {
|
|
387
|
+
"index": 1,
|
|
388
|
+
"data": {
|
|
389
|
+
"id": "1j34jdhdptp2xm5e",
|
|
390
|
+
"key": "bar",
|
|
391
|
+
"type": "string",
|
|
392
|
+
"visible": true,
|
|
393
|
+
"locales": {
|
|
394
|
+
"zh": {
|
|
395
|
+
"name": "属性",
|
|
396
|
+
"defaultValue": "-"
|
|
397
|
+
},
|
|
398
|
+
"en": {
|
|
399
|
+
"name": "Bar",
|
|
400
|
+
"defaultValue": "bar"
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
"lbclpm6mxrp10w2k": {
|
|
409
|
+
"index": 9,
|
|
410
|
+
"data": {
|
|
411
|
+
"id": "lbclpm6mxrp10w2k",
|
|
412
|
+
"key": "array",
|
|
413
|
+
"type": "array",
|
|
414
|
+
"visible": true,
|
|
415
|
+
"locales": {
|
|
416
|
+
"zh": {
|
|
417
|
+
"name": "数组数据",
|
|
418
|
+
"defaultValue": [
|
|
419
|
+
{
|
|
420
|
+
"name": "示例用户",
|
|
421
|
+
"bio": "这是一个示例用户"
|
|
422
|
+
}
|
|
423
|
+
]
|
|
424
|
+
},
|
|
425
|
+
"en": {
|
|
426
|
+
"name": "Array Data",
|
|
427
|
+
"defaultValue": [
|
|
428
|
+
{
|
|
429
|
+
"name": "Example User",
|
|
430
|
+
"bio": "This is an example user"
|
|
431
|
+
}
|
|
432
|
+
]
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
"subProperties": {
|
|
436
|
+
"1c5vl2p9cn9ryvgh": {
|
|
437
|
+
"index": 0,
|
|
438
|
+
"data": {
|
|
439
|
+
"id": "1c5vl2p9cn9ryvgh",
|
|
440
|
+
"key": "name",
|
|
441
|
+
"type": "string",
|
|
442
|
+
"visible": true,
|
|
443
|
+
"locales": {
|
|
444
|
+
"zh": {
|
|
445
|
+
"name": "姓名",
|
|
446
|
+
"defaultValue": ""
|
|
447
|
+
},
|
|
448
|
+
"en": {
|
|
449
|
+
"name": "Name",
|
|
450
|
+
"defaultValue": ""
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
"c5whnccwzqqzaa0w": {
|
|
456
|
+
"index": 1,
|
|
457
|
+
"data": {
|
|
458
|
+
"id": "c5whnccwzqqzaa0w",
|
|
459
|
+
"key": "bio",
|
|
460
|
+
"type": "multiline",
|
|
461
|
+
"visible": true,
|
|
462
|
+
"locales": {
|
|
463
|
+
"zh": {
|
|
464
|
+
"name": "简介",
|
|
465
|
+
"defaultValue": ""
|
|
466
|
+
},
|
|
467
|
+
"en": {
|
|
468
|
+
"name": "Bio",
|
|
469
|
+
"defaultValue": ""
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
"s0tund4p07bzizgv": {
|
|
478
|
+
"index": 10,
|
|
479
|
+
"data": {
|
|
480
|
+
"id": "s0tund4p07bzizgv",
|
|
481
|
+
"key": "yaml",
|
|
482
|
+
"type": "yaml",
|
|
483
|
+
"visible": true,
|
|
484
|
+
"locales": {
|
|
485
|
+
"zh": {
|
|
486
|
+
"name": "YAML 配置",
|
|
487
|
+
"defaultValue": ""
|
|
488
|
+
},
|
|
489
|
+
"en": {
|
|
490
|
+
"name": "YAML Configuration",
|
|
491
|
+
"defaultValue": "ya: ya\nml: ml\n"
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
"subProperties": {
|
|
495
|
+
"1q8tsreh4k2mhbgs": {
|
|
496
|
+
"index": 0,
|
|
497
|
+
"data": {
|
|
498
|
+
"id": "1q8tsreh4k2mhbgs",
|
|
499
|
+
"key": "ya",
|
|
500
|
+
"type": "string",
|
|
501
|
+
"visible": true,
|
|
502
|
+
"locales": {
|
|
503
|
+
"en": {
|
|
504
|
+
"name": "Ya",
|
|
505
|
+
"defaultValue": "ya"
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
"09w8sncxwrj6tldi": {
|
|
511
|
+
"index": 1,
|
|
512
|
+
"data": {
|
|
513
|
+
"id": "09w8sncxwrj6tldi",
|
|
514
|
+
"key": "ml",
|
|
515
|
+
"type": "string",
|
|
516
|
+
"visible": true,
|
|
517
|
+
"locales": {
|
|
518
|
+
"en": {
|
|
519
|
+
"name": "Ml",
|
|
520
|
+
"defaultValue": "ml"
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
"8e7g6c61pxcy0q4w": {
|
|
529
|
+
"index": 11,
|
|
530
|
+
"data": {
|
|
531
|
+
"id": "8e7g6c61pxcy0q4w",
|
|
532
|
+
"key": "children",
|
|
533
|
+
"type": "component",
|
|
534
|
+
"visible": true,
|
|
535
|
+
"locales": {
|
|
536
|
+
"zh": {
|
|
537
|
+
"name": "子组件",
|
|
538
|
+
"defaultValue": {}
|
|
539
|
+
},
|
|
540
|
+
"en": {
|
|
541
|
+
"name": "Children Components",
|
|
542
|
+
"defaultValue": {}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
```
|