plugin-build-guide-block 1.0.12 → 1.1.2

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.
@@ -1,357 +1,434 @@
1
- export const spacesSchema = {
2
- type: 'void',
3
- name: 'ai-build-guide-spaces',
4
- properties: {
5
- card: {
6
- type: 'void',
7
- 'x-component': 'CardItem',
8
- 'x-decorator': 'TableBlockProvider',
9
- 'x-decorator-props': {
10
- collection: 'aiBuildGuideSpaces',
11
- action: 'list',
12
- rowKey: 'id',
13
- params: {
14
- appends: ['documents'],
15
- sort: ['-createdAt'],
16
- },
17
- },
18
- properties: {
19
- actions: {
20
- type: 'void',
21
- 'x-component': 'ActionBar',
22
- 'x-component-props': {
23
- style: {
24
- marginBottom: 16,
25
- },
26
- },
27
- properties: {
28
- create: {
29
- type: 'void',
30
- 'x-component': 'Action',
31
- 'x-component-props': {
32
- type: 'primary',
33
- title: '{{t("Create space")}}',
34
- icon: 'PlusOutlined',
35
- },
36
- properties: {
37
- drawer: {
38
- type: 'void',
39
- 'x-component': 'Action.Drawer',
40
- 'x-component-props': {
41
- title: '{{t("Create space")}}',
42
- },
43
- properties: {
44
- form: {
45
- type: 'void',
46
- 'x-component': 'FormV2',
47
- 'x-use-component-props': 'useCreateFormProps',
48
- properties: {
49
- title: {
50
- type: 'string',
51
- title: '{{t("Title")}}',
52
- required: true,
53
- 'x-decorator': 'FormItem',
54
- 'x-component': 'Input',
55
- },
56
- llmService: {
57
- type: 'string',
58
- title: '{{t("LLM Service")}}',
59
- required: true,
60
- 'x-decorator': 'FormItem',
61
- 'x-component': 'LLMServiceSelect',
62
- },
63
- model: {
64
- type: 'string',
65
- title: '{{t("Model")}}',
66
- required: true,
67
- 'x-decorator': 'FormItem',
68
- 'x-component': 'ModelSelect',
69
- 'x-reactions': {
70
- dependencies: ['llmService'],
71
- fulfill: {
72
- state: {
73
- value: '{{$deps[0] ? $self.value : undefined}}',
74
- },
75
- },
76
- },
77
- },
78
- outputFormat: {
79
- type: 'string',
80
- title: '{{t("Output format")}}',
81
- required: true,
82
- default: 'html',
83
- 'x-decorator': 'FormItem',
84
- 'x-component': 'Select',
85
- enum: [
86
- { label: 'HTML', value: 'html' },
87
- { label: 'Markdown', value: 'markdown' },
88
- ],
89
- },
90
- systemPrompt: {
91
- type: 'string',
92
- title: '{{t("System Prompt")}}',
93
- 'x-decorator': 'FormItem',
94
- 'x-component': 'Input.TextArea',
95
- 'x-component-props': {
96
- rows: 4,
97
- },
98
- default:
99
- 'You are an expert technical writer. Generate a comprehensive user guide based on the provided documents.',
100
- },
101
- documents: {
102
- type: 'array',
103
- title: '{{t("Documents")}}',
104
- 'x-decorator': 'FormItem',
105
- 'x-component': 'Upload.Attachment',
106
- 'x-component-props': {
107
- multiple: true,
108
- action: 'attachments:create',
109
- maxCount: 10,
110
- },
111
- },
112
- footer: {
113
- type: 'void',
114
- 'x-component': 'Action.Drawer.Footer',
115
- properties: {
116
- cancel: {
117
- type: 'void',
118
- title: '{{t("Cancel")}}',
119
- 'x-component': 'Action',
120
- 'x-use-component-props': 'useCancelActionProps',
121
- },
122
- submit: {
123
- type: 'void',
124
- title: '{{t("Submit")}}',
125
- 'x-component': 'Action',
126
- 'x-use-component-props': 'useCreateActionProps',
127
- },
128
- },
129
- },
130
- },
131
- },
132
- },
133
- },
134
- },
135
- },
136
- },
137
- },
138
- table: {
139
- type: 'array',
140
- 'x-component': 'TableV2',
141
- 'x-use-component-props': 'useTableBlockProps',
142
- 'x-component-props': {
143
- rowKey: 'id',
144
- rowSelection: {
145
- type: 'checkbox',
146
- },
147
- },
148
- properties: {
149
- title: {
150
- type: 'void',
151
- title: '{{t("Title")}}',
152
- 'x-decorator': 'TableV2.Column.Decorator',
153
- 'x-component': 'TableV2.Column',
154
- properties: {
155
- title: {
156
- type: 'string',
157
- 'x-component': 'CollectionField',
158
- 'x-read-pretty': true,
159
- },
160
- },
161
- },
162
- status: {
163
- type: 'void',
164
- title: '{{t("Status")}}',
165
- 'x-decorator': 'TableV2.Column.Decorator',
166
- 'x-component': 'TableV2.Column',
167
- properties: {
168
- status: {
169
- type: 'string',
170
- 'x-component': 'StatusTag',
171
- 'x-read-pretty': true,
172
- },
173
- },
174
- },
175
- buildLog: {
176
- type: 'void',
177
- title: '{{t("Build Log")}}',
178
- 'x-decorator': 'TableV2.Column.Decorator',
179
- 'x-component': 'TableV2.Column',
180
- properties: {
181
- buildLog: {
182
- type: 'string',
183
- 'x-component': 'CollectionField',
184
- 'x-read-pretty': true,
185
- },
186
- },
187
- },
188
- actions: {
189
- type: 'void',
190
- title: '{{t("Actions")}}',
191
- 'x-decorator': 'TableV2.Column.Decorator',
192
- 'x-component': 'TableV2.Column',
193
- properties: {
194
- actions: {
195
- type: 'void',
196
- 'x-component': 'Space',
197
- 'x-component-props': {
198
- split: '|',
199
- },
200
- properties: {
201
- build: {
202
- type: 'void',
203
- 'x-component': 'BuildButton',
204
- },
205
- update: {
206
- type: 'void',
207
- title: '{{t("Edit")}}',
208
- 'x-component': 'Action.Link',
209
- 'x-component-props': {
210
- type: 'primary',
211
- },
212
- properties: {
213
- drawer: {
214
- type: 'void',
215
- 'x-component': 'Action.Drawer',
216
- 'x-component-props': {
217
- title: '{{t("Edit space")}}',
218
- },
219
- properties: {
220
- form: {
221
- type: 'void',
222
- 'x-component': 'FormV2',
223
- 'x-use-component-props': 'useEditFormProps',
224
- properties: {
225
- title: {
226
- type: 'string',
227
- title: '{{t("Title")}}',
228
- required: true,
229
- 'x-decorator': 'FormItem',
230
- 'x-component': 'Input',
231
- },
232
- llmService: {
233
- type: 'string',
234
- title: '{{t("LLM Service")}}',
235
- required: true,
236
- 'x-decorator': 'FormItem',
237
- 'x-component': 'LLMServiceSelect',
238
- },
239
- model: {
240
- type: 'string',
241
- title: '{{t("Model")}}',
242
- required: true,
243
- 'x-decorator': 'FormItem',
244
- 'x-component': 'ModelSelect',
245
- },
246
- outputFormat: {
247
- type: 'string',
248
- title: '{{t("Output format")}}',
249
- required: true,
250
- 'x-decorator': 'FormItem',
251
- 'x-component': 'Select',
252
- enum: [
253
- { label: 'HTML', value: 'html' },
254
- { label: 'Markdown', value: 'markdown' },
255
- ],
256
- },
257
- systemPrompt: {
258
- type: 'string',
259
- title: '{{t("System Prompt")}}',
260
- 'x-decorator': 'FormItem',
261
- 'x-component': 'Input.TextArea',
262
- 'x-component-props': {
263
- rows: 4,
264
- },
265
- },
266
- documents: {
267
- type: 'array',
268
- title: '{{t("Documents")}}',
269
- 'x-decorator': 'FormItem',
270
- 'x-component': 'Upload.Attachment',
271
- 'x-component-props': {
272
- multiple: true,
273
- action: 'attachments:create',
274
- maxCount: 10,
275
- },
276
- },
277
- generatedHtml: {
278
- type: 'string',
279
- title: '{{t("Generated HTML")}}',
280
- 'x-decorator': 'FormItem',
281
- 'x-component': 'Input.TextArea',
282
- 'x-component-props': {
283
- rows: 6,
284
- },
285
- 'x-read-pretty': true,
286
- },
287
- generatedMarkdown: {
288
- type: 'string',
289
- title: '{{t("Generated Markdown")}}',
290
- 'x-decorator': 'FormItem',
291
- 'x-component': 'Input.TextArea',
292
- 'x-component-props': {
293
- rows: 6,
294
- },
295
- 'x-read-pretty': true,
296
- 'x-reactions': {
297
- dependencies: ['outputFormat'],
298
- fulfill: {
299
- state: {
300
- visible: '{{$deps[0] === "markdown"}}',
301
- },
302
- },
303
- },
304
- },
305
- buildLog: {
306
- type: 'string',
307
- title: '{{t("Build Log")}}',
308
- 'x-decorator': 'FormItem',
309
- 'x-component': 'Input.TextArea',
310
- 'x-read-pretty': true,
311
- },
312
- footer: {
313
- type: 'void',
314
- 'x-component': 'Action.Drawer.Footer',
315
- properties: {
316
- cancel: {
317
- type: 'void',
318
- title: '{{t("Cancel")}}',
319
- 'x-component': 'Action',
320
- 'x-use-component-props': 'useCancelActionProps',
321
- },
322
- submit: {
323
- type: 'void',
324
- title: '{{t("Submit")}}',
325
- 'x-component': 'Action',
326
- 'x-use-component-props': 'useUpdateActionProps',
327
- },
328
- },
329
- },
330
- },
331
- },
332
- },
333
- },
334
- },
335
- },
336
- delete: {
337
- type: 'void',
338
- title: '{{t("Delete")}}',
339
- 'x-component': 'Action.Link',
340
- 'x-use-component-props': 'useDestroyActionProps',
341
- 'x-component-props': {
342
- confirm: {
343
- title: '{{t("Delete")}}',
344
- content: '{{t("Are you sure you want to delete this space?")}}',
345
- },
346
- },
347
- },
348
- },
349
- },
350
- },
351
- },
352
- },
353
- },
354
- },
355
- },
356
- },
357
- };
1
+ export const spacesSchema = {
2
+ type: 'void',
3
+ name: 'ai-build-guide-spaces',
4
+ properties: {
5
+ card: {
6
+ type: 'void',
7
+ 'x-component': 'CardItem',
8
+ 'x-decorator': 'TableBlockProvider',
9
+ 'x-decorator-props': {
10
+ collection: 'aiBuildGuideSpaces',
11
+ action: 'list',
12
+ rowKey: 'id',
13
+ params: {
14
+ appends: ['documents'],
15
+ sort: ['-createdAt'],
16
+ },
17
+ },
18
+ properties: {
19
+ actions: {
20
+ type: 'void',
21
+ 'x-component': 'ActionBar',
22
+ 'x-component-props': {
23
+ style: {
24
+ marginBottom: 16,
25
+ },
26
+ },
27
+ properties: {
28
+ create: {
29
+ type: 'void',
30
+ 'x-component': 'Action',
31
+ 'x-component-props': {
32
+ type: 'primary',
33
+ title: '{{t("Create space")}}',
34
+ icon: 'PlusOutlined',
35
+ },
36
+ properties: {
37
+ drawer: {
38
+ type: 'void',
39
+ 'x-component': 'Action.Drawer',
40
+ 'x-component-props': {
41
+ title: '{{t("Create space")}}',
42
+ },
43
+ properties: {
44
+ form: {
45
+ type: 'void',
46
+ 'x-component': 'FormV2',
47
+ 'x-use-component-props': 'useCreateFormProps',
48
+ properties: {
49
+ title: {
50
+ type: 'string',
51
+ title: '{{t("Title")}}',
52
+ required: true,
53
+ 'x-decorator': 'FormItem',
54
+ 'x-component': 'Input',
55
+ },
56
+ llmService: {
57
+ type: 'string',
58
+ title: '{{t("LLM Service")}}',
59
+ required: true,
60
+ 'x-decorator': 'FormItem',
61
+ 'x-component': 'LLMServiceSelect',
62
+ },
63
+ model: {
64
+ type: 'string',
65
+ title: '{{t("Model")}}',
66
+ required: true,
67
+ 'x-decorator': 'FormItem',
68
+ 'x-component': 'ModelSelect',
69
+ 'x-reactions': {
70
+ dependencies: ['llmService'],
71
+ fulfill: {
72
+ state: {
73
+ value: '{{$deps[0] ? $self.value : undefined}}',
74
+ },
75
+ },
76
+ },
77
+ },
78
+ outputFormat: {
79
+ type: 'string',
80
+ title: '{{t("Output format")}}',
81
+ required: true,
82
+ default: 'html',
83
+ 'x-decorator': 'FormItem',
84
+ 'x-component': 'Select',
85
+ enum: [
86
+ { label: 'HTML', value: 'html' },
87
+ { label: 'Markdown', value: 'markdown' },
88
+ ],
89
+ },
90
+ targetChapterCount: {
91
+ type: 'number',
92
+ title: '{{t("Target chapters")}}',
93
+ required: true,
94
+ default: 5,
95
+ 'x-decorator': 'FormItem',
96
+ 'x-component': 'InputNumber',
97
+ 'x-component-props': {
98
+ min: 3,
99
+ max: 12,
100
+ precision: 0,
101
+ style: {
102
+ width: '100%',
103
+ },
104
+ },
105
+ },
106
+ chapterGuidance: {
107
+ type: 'string',
108
+ title: '{{t("Chapter guidance")}}',
109
+ 'x-decorator': 'FormItem',
110
+ 'x-component': 'Input.TextArea',
111
+ 'x-component-props': {
112
+ rows: 3,
113
+ placeholder: '{{t("Describe how the guide should be split into chapters")}}',
114
+ },
115
+ },
116
+ systemPrompt: {
117
+ type: 'string',
118
+ title: '{{t("System Prompt")}}',
119
+ 'x-decorator': 'FormItem',
120
+ 'x-component': 'Input.TextArea',
121
+ 'x-component-props': {
122
+ rows: 4,
123
+ },
124
+ default:
125
+ 'You are an expert technical writer. Generate a comprehensive user guide based on the provided documents.',
126
+ },
127
+ documents: {
128
+ type: 'array',
129
+ title: '{{t("Documents")}}',
130
+ 'x-decorator': 'FormItem',
131
+ 'x-component': 'Upload.Attachment',
132
+ 'x-component-props': {
133
+ multiple: true,
134
+ action: 'attachments:create',
135
+ maxCount: 10,
136
+ },
137
+ },
138
+ footer: {
139
+ type: 'void',
140
+ 'x-component': 'Action.Drawer.Footer',
141
+ properties: {
142
+ cancel: {
143
+ type: 'void',
144
+ title: '{{t("Cancel")}}',
145
+ 'x-component': 'Action',
146
+ 'x-use-component-props': 'useCancelActionProps',
147
+ },
148
+ submit: {
149
+ type: 'void',
150
+ title: '{{t("Submit")}}',
151
+ 'x-component': 'Action',
152
+ 'x-use-component-props': 'useCreateActionProps',
153
+ },
154
+ },
155
+ },
156
+ },
157
+ },
158
+ },
159
+ },
160
+ },
161
+ },
162
+ },
163
+ },
164
+ table: {
165
+ type: 'array',
166
+ 'x-component': 'TableV2',
167
+ 'x-use-component-props': 'useTableBlockProps',
168
+ 'x-component-props': {
169
+ rowKey: 'id',
170
+ rowSelection: {
171
+ type: 'checkbox',
172
+ },
173
+ },
174
+ properties: {
175
+ title: {
176
+ type: 'void',
177
+ title: '{{t("Title")}}',
178
+ 'x-decorator': 'TableV2.Column.Decorator',
179
+ 'x-component': 'TableV2.Column',
180
+ properties: {
181
+ title: {
182
+ type: 'string',
183
+ 'x-component': 'Input',
184
+ 'x-read-pretty': true,
185
+ },
186
+ },
187
+ },
188
+ status: {
189
+ type: 'void',
190
+ title: '{{t("Status")}}',
191
+ 'x-decorator': 'TableV2.Column.Decorator',
192
+ 'x-component': 'TableV2.Column',
193
+ properties: {
194
+ status: {
195
+ type: 'string',
196
+ 'x-component': 'StatusTag',
197
+ 'x-read-pretty': true,
198
+ },
199
+ },
200
+ },
201
+ buildPhase: {
202
+ type: 'void',
203
+ title: '{{t("Build Phase")}}',
204
+ 'x-decorator': 'TableV2.Column.Decorator',
205
+ 'x-component': 'TableV2.Column',
206
+ properties: {
207
+ buildPhase: {
208
+ type: 'string',
209
+ 'x-component': 'Input',
210
+ 'x-read-pretty': true,
211
+ },
212
+ },
213
+ },
214
+ pageCount: {
215
+ type: 'void',
216
+ title: '{{t("Chapters")}}',
217
+ 'x-decorator': 'TableV2.Column.Decorator',
218
+ 'x-component': 'TableV2.Column',
219
+ properties: {
220
+ pageCount: {
221
+ type: 'integer',
222
+ 'x-component': 'InputNumber',
223
+ 'x-read-pretty': true,
224
+ },
225
+ },
226
+ },
227
+ buildLog: {
228
+ type: 'void',
229
+ title: '{{t("Build Log")}}',
230
+ 'x-decorator': 'TableV2.Column.Decorator',
231
+ 'x-component': 'TableV2.Column',
232
+ properties: {
233
+ buildLog: {
234
+ type: 'string',
235
+ 'x-component': 'Input.TextArea',
236
+ 'x-read-pretty': true,
237
+ },
238
+ },
239
+ },
240
+ actions: {
241
+ type: 'void',
242
+ title: '{{t("Actions")}}',
243
+ 'x-decorator': 'TableV2.Column.Decorator',
244
+ 'x-component': 'TableV2.Column',
245
+ properties: {
246
+ actions: {
247
+ type: 'void',
248
+ 'x-component': 'Space',
249
+ 'x-component-props': {
250
+ split: '|',
251
+ },
252
+ properties: {
253
+ build: {
254
+ type: 'void',
255
+ 'x-component': 'BuildButton',
256
+ },
257
+ update: {
258
+ type: 'void',
259
+ title: '{{t("Edit")}}',
260
+ 'x-component': 'Action.Link',
261
+ 'x-component-props': {
262
+ type: 'primary',
263
+ },
264
+ properties: {
265
+ drawer: {
266
+ type: 'void',
267
+ 'x-component': 'Action.Drawer',
268
+ 'x-component-props': {
269
+ title: '{{t("Edit space")}}',
270
+ },
271
+ properties: {
272
+ form: {
273
+ type: 'void',
274
+ 'x-component': 'FormV2',
275
+ 'x-use-component-props': 'useEditFormProps',
276
+ properties: {
277
+ title: {
278
+ type: 'string',
279
+ title: '{{t("Title")}}',
280
+ required: true,
281
+ 'x-decorator': 'FormItem',
282
+ 'x-component': 'Input',
283
+ },
284
+ llmService: {
285
+ type: 'string',
286
+ title: '{{t("LLM Service")}}',
287
+ required: true,
288
+ 'x-decorator': 'FormItem',
289
+ 'x-component': 'LLMServiceSelect',
290
+ },
291
+ model: {
292
+ type: 'string',
293
+ title: '{{t("Model")}}',
294
+ required: true,
295
+ 'x-decorator': 'FormItem',
296
+ 'x-component': 'ModelSelect',
297
+ },
298
+ outputFormat: {
299
+ type: 'string',
300
+ title: '{{t("Output format")}}',
301
+ required: true,
302
+ 'x-decorator': 'FormItem',
303
+ 'x-component': 'Select',
304
+ enum: [
305
+ { label: 'HTML', value: 'html' },
306
+ { label: 'Markdown', value: 'markdown' },
307
+ ],
308
+ },
309
+ targetChapterCount: {
310
+ type: 'number',
311
+ title: '{{t("Target chapters")}}',
312
+ required: true,
313
+ 'x-decorator': 'FormItem',
314
+ 'x-component': 'InputNumber',
315
+ 'x-component-props': {
316
+ min: 3,
317
+ max: 12,
318
+ precision: 0,
319
+ style: {
320
+ width: '100%',
321
+ },
322
+ },
323
+ },
324
+ chapterGuidance: {
325
+ type: 'string',
326
+ title: '{{t("Chapter guidance")}}',
327
+ 'x-decorator': 'FormItem',
328
+ 'x-component': 'Input.TextArea',
329
+ 'x-component-props': {
330
+ rows: 3,
331
+ placeholder: '{{t("Describe how the guide should be split into chapters")}}',
332
+ },
333
+ },
334
+ systemPrompt: {
335
+ type: 'string',
336
+ title: '{{t("System Prompt")}}',
337
+ 'x-decorator': 'FormItem',
338
+ 'x-component': 'Input.TextArea',
339
+ 'x-component-props': {
340
+ rows: 4,
341
+ },
342
+ },
343
+ documents: {
344
+ type: 'array',
345
+ title: '{{t("Documents")}}',
346
+ 'x-decorator': 'FormItem',
347
+ 'x-component': 'Upload.Attachment',
348
+ 'x-component-props': {
349
+ multiple: true,
350
+ action: 'attachments:create',
351
+ maxCount: 10,
352
+ },
353
+ },
354
+ generatedHtml: {
355
+ type: 'string',
356
+ title: '{{t("Generated HTML")}}',
357
+ 'x-decorator': 'FormItem',
358
+ 'x-component': 'Input.TextArea',
359
+ 'x-component-props': {
360
+ rows: 6,
361
+ },
362
+ 'x-read-pretty': true,
363
+ },
364
+ generatedMarkdown: {
365
+ type: 'string',
366
+ title: '{{t("Generated Markdown")}}',
367
+ 'x-decorator': 'FormItem',
368
+ 'x-component': 'Input.TextArea',
369
+ 'x-component-props': {
370
+ rows: 6,
371
+ },
372
+ 'x-read-pretty': true,
373
+ 'x-reactions': {
374
+ dependencies: ['outputFormat'],
375
+ fulfill: {
376
+ state: {
377
+ visible: '{{$deps[0] === "markdown"}}',
378
+ },
379
+ },
380
+ },
381
+ },
382
+ buildLog: {
383
+ type: 'string',
384
+ title: '{{t("Build Log")}}',
385
+ 'x-decorator': 'FormItem',
386
+ 'x-component': 'Input.TextArea',
387
+ 'x-read-pretty': true,
388
+ },
389
+ footer: {
390
+ type: 'void',
391
+ 'x-component': 'Action.Drawer.Footer',
392
+ properties: {
393
+ cancel: {
394
+ type: 'void',
395
+ title: '{{t("Cancel")}}',
396
+ 'x-component': 'Action',
397
+ 'x-use-component-props': 'useCancelActionProps',
398
+ },
399
+ submit: {
400
+ type: 'void',
401
+ title: '{{t("Submit")}}',
402
+ 'x-component': 'Action',
403
+ 'x-use-component-props': 'useUpdateActionProps',
404
+ },
405
+ },
406
+ },
407
+ },
408
+ },
409
+ },
410
+ },
411
+ },
412
+ },
413
+ delete: {
414
+ type: 'void',
415
+ title: '{{t("Delete")}}',
416
+ 'x-component': 'Action.Link',
417
+ 'x-use-component-props': 'useDestroyActionProps',
418
+ 'x-component-props': {
419
+ confirm: {
420
+ title: '{{t("Delete")}}',
421
+ content: '{{t("Are you sure you want to delete this space?")}}',
422
+ },
423
+ },
424
+ },
425
+ },
426
+ },
427
+ },
428
+ },
429
+ },
430
+ },
431
+ },
432
+ },
433
+ },
434
+ };