base-paint 0.1.0 → 0.3.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/dist/blocks.d.ts +169 -0
- package/dist/blocks.d.ts.map +1 -0
- package/dist/blocks.js +862 -0
- package/dist/blocks.js.map +1 -0
- package/dist/charts.d.ts +62 -0
- package/dist/charts.d.ts.map +1 -0
- package/dist/charts.js +1677 -0
- package/dist/charts.js.map +1 -0
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +7 -1
- package/dist/contract.js.map +1 -1
- package/dist/controls.d.ts +139 -0
- package/dist/controls.d.ts.map +1 -0
- package/dist/controls.js +1182 -0
- package/dist/controls.js.map +1 -0
- package/dist/help.d.ts +24 -0
- package/dist/help.d.ts.map +1 -0
- package/dist/help.js +604 -0
- package/dist/help.js.map +1 -0
- package/dist/index.d.ts +21 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -1
- package/dist/index.js.map +1 -1
- package/dist/spec/charts.d.ts +222 -0
- package/dist/spec/charts.d.ts.map +1 -0
- package/dist/spec/charts.js +35 -0
- package/dist/spec/charts.js.map +1 -0
- package/dist/spec/controls.d.ts +329 -0
- package/dist/spec/controls.d.ts.map +1 -0
- package/dist/spec/controls.js +119 -0
- package/dist/spec/controls.js.map +1 -0
- package/dist/spec/help.d.ts +353 -0
- package/dist/spec/help.d.ts.map +1 -0
- package/dist/spec/help.js +167 -0
- package/dist/spec/help.js.map +1 -0
- package/dist/spec/index.d.ts +40 -0
- package/dist/spec/index.d.ts.map +1 -0
- package/dist/spec/index.js +164 -0
- package/dist/spec/index.js.map +1 -0
- package/dist/spec/style.d.ts +46 -0
- package/dist/spec/style.d.ts.map +1 -0
- package/dist/spec/style.js +39 -0
- package/dist/spec/style.js.map +1 -0
- package/dist/spec/template.d.ts +363 -0
- package/dist/spec/template.d.ts.map +1 -0
- package/dist/spec/template.js +252 -0
- package/dist/spec/template.js.map +1 -0
- package/dist/spec/text.d.ts +157 -0
- package/dist/spec/text.d.ts.map +1 -0
- package/dist/spec/text.js +83 -0
- package/dist/spec/text.js.map +1 -0
- package/dist/style.d.ts +19 -0
- package/dist/style.d.ts.map +1 -1
- package/dist/style.js +1091 -0
- package/dist/style.js.map +1 -1
- package/dist/template.d.ts +27 -0
- package/dist/template.d.ts.map +1 -0
- package/dist/template.js +362 -0
- package/dist/template.js.map +1 -0
- package/dist/text.d.ts +19 -0
- package/dist/text.d.ts.map +1 -0
- package/dist/text.js +448 -0
- package/dist/text.js.map +1 -0
- package/package.json +5 -3
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
/** base-paint/spec/help:HELP 壳与 scene-data 契约(#78 冻结面)。
|
|
2
|
+
*
|
|
3
|
+
* B6:HELP 形态 = HTML 速查台;Q11:取 F3 并回补 F1/F2 的逐场景 CLI 展示与变体示例。
|
|
4
|
+
* AC-3:场景类型徽章字段取 **`types`(复数)**,不提供 `type` 别名(旧侧
|
|
5
|
+
* `docs/scene-data-contract.md:78` 与 `docs/scene_data.schema.json:70` 用 `types`,
|
|
6
|
+
* 旧侧 `docs/help-template-contract.md:51` 用 `type` —— 本契约是对该分歧的裁定)。
|
|
7
|
+
* 引证更正(#78 施工期取证 R2):旧稿把笔误出处写成 `assets/help_template.html:52`,
|
|
8
|
+
* 该行实为 CSS;模板资产本身用 `s.types`(`help_template.html:224`)。裁定结论不变。
|
|
9
|
+
* AC-4:`SCENE_DATA_SCHEMA` 是**唯一机读权威**,文档 §3.5 只是它的可读投影。
|
|
10
|
+
*
|
|
11
|
+
* 依赖红线:只许 `import type`(AC-13);壳复用面见 `HelpShellInput`(#88 直接消费)。
|
|
12
|
+
*/
|
|
13
|
+
import type { FillTemplateOutput, TemplateAssets } from './template.js';
|
|
14
|
+
/** 场景状态只允许两值(旧 `injector.py:168-169`)。 */
|
|
15
|
+
export declare const SCENE_STATUS: readonly ["", "【待开发】"];
|
|
16
|
+
export type SceneStatus = (typeof SCENE_STATUS)[number];
|
|
17
|
+
/** 唯一权威字段名(AC-3):复数,无单数别名。 */
|
|
18
|
+
export declare const SCENE_TYPE_FIELD: "types";
|
|
19
|
+
export interface SceneTypeBadge {
|
|
20
|
+
readonly text: string;
|
|
21
|
+
readonly bg?: string;
|
|
22
|
+
readonly fg?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface SceneEditableField {
|
|
25
|
+
readonly name: string;
|
|
26
|
+
readonly label: string;
|
|
27
|
+
readonly value: string;
|
|
28
|
+
readonly hint?: string;
|
|
29
|
+
readonly required?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface Scene {
|
|
32
|
+
readonly id: string;
|
|
33
|
+
readonly title: string;
|
|
34
|
+
readonly wake_word: string;
|
|
35
|
+
readonly types?: readonly (string | SceneTypeBadge)[];
|
|
36
|
+
readonly status: SceneStatus;
|
|
37
|
+
readonly prompt_template: string;
|
|
38
|
+
readonly editable_fields?: readonly SceneEditableField[];
|
|
39
|
+
}
|
|
40
|
+
export interface SceneSubgroup {
|
|
41
|
+
readonly id: string;
|
|
42
|
+
readonly label: string;
|
|
43
|
+
readonly scenes: readonly Scene[];
|
|
44
|
+
}
|
|
45
|
+
export interface SceneGroup {
|
|
46
|
+
readonly id: string;
|
|
47
|
+
readonly icon?: string;
|
|
48
|
+
readonly label: string;
|
|
49
|
+
readonly subgroups: readonly SceneSubgroup[];
|
|
50
|
+
}
|
|
51
|
+
export interface SceneMetaBlock {
|
|
52
|
+
readonly id: string;
|
|
53
|
+
readonly title: string;
|
|
54
|
+
/** 技能方提供的 HTML 原文,Base 原样透传(转义由技能方自理)。 */
|
|
55
|
+
readonly html: string;
|
|
56
|
+
}
|
|
57
|
+
export interface SceneInitBanner {
|
|
58
|
+
readonly title: string;
|
|
59
|
+
readonly subtitle?: string;
|
|
60
|
+
readonly button_text?: string;
|
|
61
|
+
readonly prompt?: string;
|
|
62
|
+
readonly steps?: readonly string[];
|
|
63
|
+
}
|
|
64
|
+
export interface SceneContactItem {
|
|
65
|
+
readonly label: string;
|
|
66
|
+
readonly value: string;
|
|
67
|
+
}
|
|
68
|
+
export interface SceneContact {
|
|
69
|
+
readonly items: readonly SceneContactItem[];
|
|
70
|
+
readonly copy_all?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface SceneRecommendation {
|
|
73
|
+
readonly name: string;
|
|
74
|
+
readonly reason?: string;
|
|
75
|
+
readonly wake_word?: string;
|
|
76
|
+
}
|
|
77
|
+
/** HELP 页对外参数(scene_data)顶层契约。 */
|
|
78
|
+
export interface SceneData {
|
|
79
|
+
readonly skill_name: string;
|
|
80
|
+
readonly title: string;
|
|
81
|
+
readonly subtitle?: string;
|
|
82
|
+
readonly meta_blocks?: readonly SceneMetaBlock[];
|
|
83
|
+
readonly groups: readonly SceneGroup[];
|
|
84
|
+
readonly init_banner?: SceneInitBanner;
|
|
85
|
+
readonly contact?: SceneContact;
|
|
86
|
+
readonly version?: string;
|
|
87
|
+
readonly recommendations?: readonly SceneRecommendation[];
|
|
88
|
+
}
|
|
89
|
+
/** 唯一机读 schema(draft-07 子集;文档 §3.5 逐字段投影它)。 */
|
|
90
|
+
export declare const SCENE_DATA_SCHEMA: Readonly<{
|
|
91
|
+
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
92
|
+
readonly $id: "ilife://base-paint/scene-data.schema.json";
|
|
93
|
+
readonly title: "scene_data";
|
|
94
|
+
readonly type: "object";
|
|
95
|
+
readonly additionalProperties: false;
|
|
96
|
+
readonly required: readonly ["skill_name", "title", "groups"];
|
|
97
|
+
readonly properties: {
|
|
98
|
+
readonly skill_name: {
|
|
99
|
+
readonly type: "string";
|
|
100
|
+
readonly minLength: 1;
|
|
101
|
+
};
|
|
102
|
+
readonly title: {
|
|
103
|
+
readonly type: "string";
|
|
104
|
+
readonly minLength: 1;
|
|
105
|
+
};
|
|
106
|
+
readonly subtitle: {
|
|
107
|
+
readonly type: "string";
|
|
108
|
+
};
|
|
109
|
+
readonly meta_blocks: {
|
|
110
|
+
readonly type: "array";
|
|
111
|
+
readonly items: {
|
|
112
|
+
readonly type: "object";
|
|
113
|
+
readonly additionalProperties: false;
|
|
114
|
+
readonly required: readonly ["id", "title", "html"];
|
|
115
|
+
readonly properties: {
|
|
116
|
+
readonly id: {
|
|
117
|
+
readonly type: "string";
|
|
118
|
+
};
|
|
119
|
+
readonly title: {
|
|
120
|
+
readonly type: "string";
|
|
121
|
+
};
|
|
122
|
+
readonly html: {
|
|
123
|
+
readonly type: "string";
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
readonly groups: {
|
|
129
|
+
readonly type: "array";
|
|
130
|
+
readonly items: {
|
|
131
|
+
readonly type: "object";
|
|
132
|
+
readonly additionalProperties: false;
|
|
133
|
+
readonly required: readonly ["id", "label", "subgroups"];
|
|
134
|
+
readonly properties: {
|
|
135
|
+
readonly id: {
|
|
136
|
+
readonly type: "string";
|
|
137
|
+
};
|
|
138
|
+
readonly icon: {
|
|
139
|
+
readonly type: "string";
|
|
140
|
+
};
|
|
141
|
+
readonly label: {
|
|
142
|
+
readonly type: "string";
|
|
143
|
+
};
|
|
144
|
+
readonly subgroups: {
|
|
145
|
+
readonly type: "array";
|
|
146
|
+
readonly items: {
|
|
147
|
+
readonly type: "object";
|
|
148
|
+
readonly additionalProperties: false;
|
|
149
|
+
readonly required: readonly ["id", "label", "scenes"];
|
|
150
|
+
readonly properties: {
|
|
151
|
+
readonly id: {
|
|
152
|
+
readonly type: "string";
|
|
153
|
+
};
|
|
154
|
+
readonly label: {
|
|
155
|
+
readonly type: "string";
|
|
156
|
+
};
|
|
157
|
+
readonly scenes: {
|
|
158
|
+
readonly type: "array";
|
|
159
|
+
/** 文档 §3.5.2 明写「`scenes[]`(必填,**非空**)」;机读权威此前缺该约束
|
|
160
|
+
* (#78 施工期取证 R1 缺陷 1,AC-4 下即缺陷态)→ 补齐 `minItems: 1`。 */
|
|
161
|
+
readonly minItems: 1;
|
|
162
|
+
readonly items: {
|
|
163
|
+
readonly type: "object";
|
|
164
|
+
readonly additionalProperties: false;
|
|
165
|
+
readonly required: readonly ["id", "title", "wake_word", "status", "prompt_template"];
|
|
166
|
+
readonly properties: {
|
|
167
|
+
readonly id: {
|
|
168
|
+
readonly type: "string";
|
|
169
|
+
};
|
|
170
|
+
readonly title: {
|
|
171
|
+
readonly type: "string";
|
|
172
|
+
};
|
|
173
|
+
readonly wake_word: {
|
|
174
|
+
readonly type: "string";
|
|
175
|
+
};
|
|
176
|
+
readonly types: {
|
|
177
|
+
readonly type: "array";
|
|
178
|
+
readonly items: {
|
|
179
|
+
readonly oneOf: readonly [{
|
|
180
|
+
readonly type: "string";
|
|
181
|
+
}, {
|
|
182
|
+
readonly type: "object";
|
|
183
|
+
readonly additionalProperties: false;
|
|
184
|
+
readonly required: readonly ["text"];
|
|
185
|
+
readonly properties: {
|
|
186
|
+
readonly text: {
|
|
187
|
+
readonly type: "string";
|
|
188
|
+
};
|
|
189
|
+
readonly bg: {
|
|
190
|
+
readonly type: "string";
|
|
191
|
+
};
|
|
192
|
+
readonly fg: {
|
|
193
|
+
readonly type: "string";
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
}];
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
readonly status: {
|
|
200
|
+
readonly enum: readonly ["", "【待开发】"];
|
|
201
|
+
};
|
|
202
|
+
readonly prompt_template: {
|
|
203
|
+
readonly type: "string";
|
|
204
|
+
readonly minLength: 1;
|
|
205
|
+
};
|
|
206
|
+
readonly editable_fields: {
|
|
207
|
+
readonly type: "array";
|
|
208
|
+
readonly items: {
|
|
209
|
+
readonly type: "object";
|
|
210
|
+
readonly additionalProperties: false;
|
|
211
|
+
readonly required: readonly ["name", "label", "value"];
|
|
212
|
+
readonly properties: {
|
|
213
|
+
readonly name: {
|
|
214
|
+
readonly type: "string";
|
|
215
|
+
};
|
|
216
|
+
readonly label: {
|
|
217
|
+
readonly type: "string";
|
|
218
|
+
};
|
|
219
|
+
readonly value: {
|
|
220
|
+
readonly type: "string";
|
|
221
|
+
};
|
|
222
|
+
readonly hint: {
|
|
223
|
+
readonly type: "string";
|
|
224
|
+
};
|
|
225
|
+
readonly required: {
|
|
226
|
+
readonly type: "boolean";
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
readonly init_banner: {
|
|
241
|
+
readonly type: "object";
|
|
242
|
+
readonly additionalProperties: false;
|
|
243
|
+
readonly required: readonly ["title"];
|
|
244
|
+
readonly properties: {
|
|
245
|
+
readonly title: {
|
|
246
|
+
readonly type: "string";
|
|
247
|
+
};
|
|
248
|
+
readonly subtitle: {
|
|
249
|
+
readonly type: "string";
|
|
250
|
+
};
|
|
251
|
+
readonly button_text: {
|
|
252
|
+
readonly type: "string";
|
|
253
|
+
};
|
|
254
|
+
readonly prompt: {
|
|
255
|
+
readonly type: "string";
|
|
256
|
+
};
|
|
257
|
+
readonly steps: {
|
|
258
|
+
readonly type: "array";
|
|
259
|
+
readonly items: {
|
|
260
|
+
readonly type: "string";
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
readonly contact: {
|
|
266
|
+
readonly type: "object";
|
|
267
|
+
readonly additionalProperties: false;
|
|
268
|
+
readonly required: readonly ["items"];
|
|
269
|
+
readonly properties: {
|
|
270
|
+
readonly items: {
|
|
271
|
+
readonly type: "array";
|
|
272
|
+
readonly items: {
|
|
273
|
+
readonly type: "object";
|
|
274
|
+
readonly additionalProperties: false;
|
|
275
|
+
readonly required: readonly ["label", "value"];
|
|
276
|
+
readonly properties: {
|
|
277
|
+
readonly label: {
|
|
278
|
+
readonly type: "string";
|
|
279
|
+
};
|
|
280
|
+
readonly value: {
|
|
281
|
+
readonly type: "string";
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
readonly copy_all: {
|
|
287
|
+
readonly type: "string";
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
readonly version: {
|
|
292
|
+
readonly type: "string";
|
|
293
|
+
};
|
|
294
|
+
readonly recommendations: {
|
|
295
|
+
readonly type: "array";
|
|
296
|
+
readonly items: {
|
|
297
|
+
readonly type: "object";
|
|
298
|
+
readonly additionalProperties: false;
|
|
299
|
+
readonly required: readonly ["name"];
|
|
300
|
+
readonly properties: {
|
|
301
|
+
readonly name: {
|
|
302
|
+
readonly type: "string";
|
|
303
|
+
};
|
|
304
|
+
readonly reason: {
|
|
305
|
+
readonly type: "string";
|
|
306
|
+
};
|
|
307
|
+
readonly wake_word: {
|
|
308
|
+
readonly type: "string";
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
}>;
|
|
315
|
+
export declare const HELP_SHELL_ID = "ilife-help-shell";
|
|
316
|
+
/** 一键复制目标(Q11/#88 复用面)。 */
|
|
317
|
+
export declare const HELP_COPY_TARGETS: readonly ["prompt", "wakeWord", "params"];
|
|
318
|
+
export type HelpCopyTarget = (typeof HELP_COPY_TARGETS)[number];
|
|
319
|
+
/** id → actionId → 对外文案(FX-7):文案统一「复制…」,`prompt` 一律写「**复制指令**」
|
|
320
|
+
* (不写「复制 prompt」);actionId 供 `bindCopyAction` 分发(§3.3)。 */
|
|
321
|
+
export declare const HELP_COPY_ACTIONS: Readonly<{
|
|
322
|
+
readonly prompt: {
|
|
323
|
+
readonly actionId: "ilife-help-copy-prompt";
|
|
324
|
+
readonly label: "复制指令";
|
|
325
|
+
};
|
|
326
|
+
readonly wakeWord: {
|
|
327
|
+
readonly actionId: "ilife-help-copy-wakeWord";
|
|
328
|
+
readonly label: "复制唤醒词";
|
|
329
|
+
};
|
|
330
|
+
readonly params: {
|
|
331
|
+
readonly actionId: "ilife-help-copy-params";
|
|
332
|
+
readonly label: "复制参数";
|
|
333
|
+
};
|
|
334
|
+
}>;
|
|
335
|
+
export interface HelpShellInput {
|
|
336
|
+
readonly sceneData: SceneData;
|
|
337
|
+
/** 共享资产走同一填充器(B3):HELP 壳不得自填。 */
|
|
338
|
+
readonly assets: TemplateAssets;
|
|
339
|
+
readonly strict?: boolean;
|
|
340
|
+
/** 覆盖内置壳模板;缺省用 base-paint 自带模板。 */
|
|
341
|
+
readonly template?: string;
|
|
342
|
+
}
|
|
343
|
+
/** 冻结签名:`renderHelpShell(input: HelpShellInput): FillTemplateOutput`。 */
|
|
344
|
+
export type RenderHelpShell = (input: HelpShellInput) => FillTemplateOutput;
|
|
345
|
+
export declare const HELP_SCHEMA_ERROR_CODES: readonly ["schema-invalid", "duplicate-id", "status-invalid", "types-invalid"];
|
|
346
|
+
export type HelpSchemaErrorCode = (typeof HELP_SCHEMA_ERROR_CODES)[number];
|
|
347
|
+
export interface HelpSchemaErrorShape {
|
|
348
|
+
readonly name: 'HelpSchemaError';
|
|
349
|
+
readonly code: HelpSchemaErrorCode;
|
|
350
|
+
readonly path: string;
|
|
351
|
+
readonly message: string;
|
|
352
|
+
}
|
|
353
|
+
//# sourceMappingURL=help.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/spec/help.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAExE,0CAA0C;AAC1C,eAAO,MAAM,YAAY,wBAAyB,CAAC;AAEnD,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAExD,8BAA8B;AAC9B,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,E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,iBAAiB,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/** base-paint/spec/help:HELP 壳与 scene-data 契约(#78 冻结面)。
|
|
2
|
+
*
|
|
3
|
+
* B6:HELP 形态 = HTML 速查台;Q11:取 F3 并回补 F1/F2 的逐场景 CLI 展示与变体示例。
|
|
4
|
+
* AC-3:场景类型徽章字段取 **`types`(复数)**,不提供 `type` 别名(旧侧
|
|
5
|
+
* `docs/scene-data-contract.md:78` 与 `docs/scene_data.schema.json:70` 用 `types`,
|
|
6
|
+
* 旧侧 `docs/help-template-contract.md:51` 用 `type` —— 本契约是对该分歧的裁定)。
|
|
7
|
+
* 引证更正(#78 施工期取证 R2):旧稿把笔误出处写成 `assets/help_template.html:52`,
|
|
8
|
+
* 该行实为 CSS;模板资产本身用 `s.types`(`help_template.html:224`)。裁定结论不变。
|
|
9
|
+
* AC-4:`SCENE_DATA_SCHEMA` 是**唯一机读权威**,文档 §3.5 只是它的可读投影。
|
|
10
|
+
*
|
|
11
|
+
* 依赖红线:只许 `import type`(AC-13);壳复用面见 `HelpShellInput`(#88 直接消费)。
|
|
12
|
+
*/
|
|
13
|
+
/** 场景状态只允许两值(旧 `injector.py:168-169`)。 */
|
|
14
|
+
export const SCENE_STATUS = ['', '【待开发】'];
|
|
15
|
+
/** 唯一权威字段名(AC-3):复数,无单数别名。 */
|
|
16
|
+
export const SCENE_TYPE_FIELD = 'types';
|
|
17
|
+
/** 唯一机读 schema(draft-07 子集;文档 §3.5 逐字段投影它)。 */
|
|
18
|
+
export const SCENE_DATA_SCHEMA = Object.freeze({
|
|
19
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
20
|
+
$id: 'ilife://base-paint/scene-data.schema.json',
|
|
21
|
+
title: 'scene_data',
|
|
22
|
+
type: 'object',
|
|
23
|
+
additionalProperties: false,
|
|
24
|
+
required: ['skill_name', 'title', 'groups'],
|
|
25
|
+
properties: {
|
|
26
|
+
skill_name: { type: 'string', minLength: 1 },
|
|
27
|
+
title: { type: 'string', minLength: 1 },
|
|
28
|
+
subtitle: { type: 'string' },
|
|
29
|
+
meta_blocks: {
|
|
30
|
+
type: 'array',
|
|
31
|
+
items: {
|
|
32
|
+
type: 'object',
|
|
33
|
+
additionalProperties: false,
|
|
34
|
+
required: ['id', 'title', 'html'],
|
|
35
|
+
properties: { id: { type: 'string' }, title: { type: 'string' }, html: { type: 'string' } },
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
groups: {
|
|
39
|
+
type: 'array',
|
|
40
|
+
items: {
|
|
41
|
+
type: 'object',
|
|
42
|
+
additionalProperties: false,
|
|
43
|
+
required: ['id', 'label', 'subgroups'],
|
|
44
|
+
properties: {
|
|
45
|
+
id: { type: 'string' },
|
|
46
|
+
icon: { type: 'string' },
|
|
47
|
+
label: { type: 'string' },
|
|
48
|
+
subgroups: {
|
|
49
|
+
type: 'array',
|
|
50
|
+
items: {
|
|
51
|
+
type: 'object',
|
|
52
|
+
additionalProperties: false,
|
|
53
|
+
required: ['id', 'label', 'scenes'],
|
|
54
|
+
properties: {
|
|
55
|
+
id: { type: 'string' },
|
|
56
|
+
label: { type: 'string' },
|
|
57
|
+
scenes: {
|
|
58
|
+
type: 'array',
|
|
59
|
+
/** 文档 §3.5.2 明写「`scenes[]`(必填,**非空**)」;机读权威此前缺该约束
|
|
60
|
+
* (#78 施工期取证 R1 缺陷 1,AC-4 下即缺陷态)→ 补齐 `minItems: 1`。 */
|
|
61
|
+
minItems: 1,
|
|
62
|
+
items: {
|
|
63
|
+
type: 'object',
|
|
64
|
+
additionalProperties: false,
|
|
65
|
+
required: ['id', 'title', 'wake_word', 'status', 'prompt_template'],
|
|
66
|
+
properties: {
|
|
67
|
+
id: { type: 'string' },
|
|
68
|
+
title: { type: 'string' },
|
|
69
|
+
wake_word: { type: 'string' },
|
|
70
|
+
types: {
|
|
71
|
+
type: 'array',
|
|
72
|
+
items: {
|
|
73
|
+
oneOf: [
|
|
74
|
+
{ type: 'string' },
|
|
75
|
+
{
|
|
76
|
+
type: 'object',
|
|
77
|
+
additionalProperties: false,
|
|
78
|
+
required: ['text'],
|
|
79
|
+
properties: { text: { type: 'string' }, bg: { type: 'string' }, fg: { type: 'string' } },
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
status: { enum: ['', '【待开发】'] },
|
|
85
|
+
prompt_template: { type: 'string', minLength: 1 },
|
|
86
|
+
editable_fields: {
|
|
87
|
+
type: 'array',
|
|
88
|
+
items: {
|
|
89
|
+
type: 'object',
|
|
90
|
+
additionalProperties: false,
|
|
91
|
+
required: ['name', 'label', 'value'],
|
|
92
|
+
properties: {
|
|
93
|
+
name: { type: 'string' },
|
|
94
|
+
label: { type: 'string' },
|
|
95
|
+
value: { type: 'string' },
|
|
96
|
+
hint: { type: 'string' },
|
|
97
|
+
required: { type: 'boolean' },
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
init_banner: {
|
|
111
|
+
type: 'object',
|
|
112
|
+
additionalProperties: false,
|
|
113
|
+
required: ['title'],
|
|
114
|
+
properties: {
|
|
115
|
+
title: { type: 'string' },
|
|
116
|
+
subtitle: { type: 'string' },
|
|
117
|
+
button_text: { type: 'string' },
|
|
118
|
+
prompt: { type: 'string' },
|
|
119
|
+
steps: { type: 'array', items: { type: 'string' } },
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
contact: {
|
|
123
|
+
type: 'object',
|
|
124
|
+
additionalProperties: false,
|
|
125
|
+
required: ['items'],
|
|
126
|
+
properties: {
|
|
127
|
+
items: {
|
|
128
|
+
type: 'array',
|
|
129
|
+
items: {
|
|
130
|
+
type: 'object',
|
|
131
|
+
additionalProperties: false,
|
|
132
|
+
required: ['label', 'value'],
|
|
133
|
+
properties: { label: { type: 'string' }, value: { type: 'string' } },
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
copy_all: { type: 'string' },
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
version: { type: 'string' },
|
|
140
|
+
recommendations: {
|
|
141
|
+
type: 'array',
|
|
142
|
+
items: {
|
|
143
|
+
type: 'object',
|
|
144
|
+
additionalProperties: false,
|
|
145
|
+
required: ['name'],
|
|
146
|
+
properties: { name: { type: 'string' }, reason: { type: 'string' }, wake_word: { type: 'string' } },
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
});
|
|
151
|
+
export const HELP_SHELL_ID = 'ilife-help-shell';
|
|
152
|
+
/** 一键复制目标(Q11/#88 复用面)。 */
|
|
153
|
+
export const HELP_COPY_TARGETS = ['prompt', 'wakeWord', 'params'];
|
|
154
|
+
/** id → actionId → 对外文案(FX-7):文案统一「复制…」,`prompt` 一律写「**复制指令**」
|
|
155
|
+
* (不写「复制 prompt」);actionId 供 `bindCopyAction` 分发(§3.3)。 */
|
|
156
|
+
export const HELP_COPY_ACTIONS = Object.freeze({
|
|
157
|
+
prompt: { actionId: 'ilife-help-copy-prompt', label: '复制指令' },
|
|
158
|
+
wakeWord: { actionId: 'ilife-help-copy-wakeWord', label: '复制唤醒词' },
|
|
159
|
+
params: { actionId: 'ilife-help-copy-params', label: '复制参数' },
|
|
160
|
+
});
|
|
161
|
+
export const HELP_SCHEMA_ERROR_CODES = [
|
|
162
|
+
'schema-invalid',
|
|
163
|
+
'duplicate-id',
|
|
164
|
+
'status-invalid',
|
|
165
|
+
'types-invalid',
|
|
166
|
+
];
|
|
167
|
+
//# sourceMappingURL=help.js.map
|
|
@@ -0,0 +1 @@
|
|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EAAE,KAAK,EAAE,OAAO,EAAE;IAClE,MAAM,EAAE,EAAE,QAAQ,EAAE,wBAAwB,EAAE,KAAK,EAAE,MAAM,EAAE;CACmC,CAAC,CAAC;AAcpG,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,gBAAgB;IAChB,cAAc;IACd,gBAAgB;IAChB,eAAe;CACP,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** base-paint/spec:冻结的共享层契约类型汇总(#92 / 79a)。
|
|
2
|
+
*
|
|
3
|
+
* 本目录 = **冻结的共享层契约类型**;`src/contract.ts` = **既有渲染契约**
|
|
4
|
+
*(envelope→HTML)。两者不同物:前者是 #74–#78 的施工图,后者是既有运行时。
|
|
5
|
+
*
|
|
6
|
+
* 纪律:spec/ 内只许类型与纯数据常量,禁函数体实现、禁副作用、
|
|
7
|
+
* 禁第三方 import、禁 `node:`、禁运行时 import base-link-core(只许 `import type`)。
|
|
8
|
+
*
|
|
9
|
+
* `SPEC_FROZEN_SURFACE` 是**冻结面清单**(机器可读唯一真相源):
|
|
10
|
+
* 文档 §3 的签名表是它的投影,`test-d/contract-signatures.ts` 与
|
|
11
|
+
* `test/contract-signatures.test.mjs` 把清单/文档/类型三者绑死。
|
|
12
|
+
*
|
|
13
|
+
* 覆盖面口径(V1 洞 15):清单锁**主签名**(每条 = 一个对外名字);
|
|
14
|
+
* 被主签名引用但未单列的类型(`ClipboardChannel`/`CopyButtonInput`/`ToastAction`/8 个 `*ChartInput`/
|
|
15
|
+
* `SceneGroup` 等)以 `src/spec/*.ts` 为唯一真相源,其形状变更视同签名变更(须走 changeset + 三处同步)。
|
|
16
|
+
*/
|
|
17
|
+
export * from './template.js';
|
|
18
|
+
export * from './style.js';
|
|
19
|
+
export * from './controls.js';
|
|
20
|
+
export * from './text.js';
|
|
21
|
+
export * from './charts.js';
|
|
22
|
+
export * from './help.js';
|
|
23
|
+
/** 契约版本(与 RENDER_CONTRACT_VERSION/ENVELOPE_VERSION 同值,漂移由签名测试钉死)。 */
|
|
24
|
+
export declare const BASE_PAINT_CONTRACT_VERSION: "0.1.0";
|
|
25
|
+
export type FrozenSurfaceKind = 'runtime' | 'type';
|
|
26
|
+
export type FrozenSurfaceStatus = 'implemented' | 'pending';
|
|
27
|
+
export type FrozenSurfaceSection = '3.1' | '3.2' | '3.3' | '3.4' | '3.5' | '5' | '7';
|
|
28
|
+
export type FrozenSurfaceTicket = '#74' | '#75' | '#76' | '#77' | '#78' | '#92';
|
|
29
|
+
export interface FrozenSurfaceEntry {
|
|
30
|
+
readonly name: string;
|
|
31
|
+
readonly kind: FrozenSurfaceKind;
|
|
32
|
+
readonly ticket: FrozenSurfaceTicket;
|
|
33
|
+
/** implemented = #92 已落地(纯数据/类型);pending = 留给执行票实现。 */
|
|
34
|
+
readonly status: FrozenSurfaceStatus;
|
|
35
|
+
readonly section: FrozenSurfaceSection;
|
|
36
|
+
/** 逐字签名(与文档 §3 签名表逐字一致,由签名测试比对)。 */
|
|
37
|
+
readonly signature: string;
|
|
38
|
+
}
|
|
39
|
+
export declare const SPEC_FROZEN_SURFACE: readonly FrozenSurfaceEntry[];
|
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/spec/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAE1B,qEAAqE;AACrE,eAAO,MAAM,2BAA2B,EAAG,OAAgB,CAAC;AAE5D,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,MAAM,CAAC;AACnD,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,SAAS,CAAC;AAC5D,MAAM,MAAM,oBAAoB,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,GAAG,GAAG,GAAG,CAAC;AACrF,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAEhF,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,uDAAuD;IACvD,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAC;IACvC,oCAAoC;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,mBAAmB,EAAE,SAAS,kBAAkB,EAgJ3D,CAAC"}
|