@zpress/config 0.3.0 → 0.5.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://raw.githubusercontent.com/joggrdocs/zpress/v0.3.0/packages/config/schemas/schema.json",
3
+ "$id": "https://raw.githubusercontent.com/joggrdocs/zpress/v0.5.0/packages/config/schemas/schema.json",
4
4
  "title": "Zpress Configuration",
5
5
  "description": "Configuration file for zpress documentation framework",
6
6
  "$ref": "#/definitions/ZpressConfig",
@@ -124,10 +124,27 @@
124
124
  ]
125
125
  },
126
126
  "icon": {
127
- "type": "string"
128
- },
129
- "iconColor": {
130
- "type": "string"
127
+ "anyOf": [
128
+ {
129
+ "$ref": "#/definitions/ZpressConfig/properties/icon"
130
+ },
131
+ {
132
+ "type": "object",
133
+ "properties": {
134
+ "id": {
135
+ "$ref": "#/definitions/ZpressConfig/properties/icon"
136
+ },
137
+ "color": {
138
+ "type": "string"
139
+ }
140
+ },
141
+ "required": [
142
+ "id",
143
+ "color"
144
+ ],
145
+ "additionalProperties": false
146
+ }
147
+ ]
131
148
  },
132
149
  "description": {
133
150
  "type": "string"
@@ -154,142 +171,21 @@
154
171
  ],
155
172
  "additionalProperties": false
156
173
  },
157
- "prefix": {
174
+ "path": {
158
175
  "type": "string"
159
176
  },
160
- "discovery": {
161
- "type": "object",
162
- "properties": {
163
- "from": {
177
+ "include": {
178
+ "anyOf": [
179
+ {
164
180
  "type": "string"
165
181
  },
166
- "title": {
167
- "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/title"
168
- },
169
- "sort": {
170
- "anyOf": [
171
- {
172
- "type": "string",
173
- "enum": [
174
- "default",
175
- "alpha",
176
- "filename"
177
- ]
178
- },
179
- {}
180
- ]
181
- },
182
- "exclude": {
182
+ {
183
183
  "type": "array",
184
184
  "items": {
185
185
  "type": "string"
186
186
  }
187
- },
188
- "frontmatter": {
189
- "type": "object",
190
- "properties": {
191
- "title": {
192
- "type": "string"
193
- },
194
- "titleTemplate": {
195
- "type": [
196
- "string",
197
- "boolean"
198
- ]
199
- },
200
- "description": {
201
- "type": "string"
202
- },
203
- "layout": {
204
- "type": "string"
205
- },
206
- "sidebar": {
207
- "type": "boolean"
208
- },
209
- "aside": {
210
- "anyOf": [
211
- {
212
- "type": "boolean"
213
- },
214
- {
215
- "type": "string",
216
- "const": "left"
217
- }
218
- ]
219
- },
220
- "outline": {
221
- "anyOf": [
222
- {
223
- "type": "boolean",
224
- "const": false
225
- },
226
- {
227
- "type": "number"
228
- },
229
- {
230
- "type": "array",
231
- "minItems": 2,
232
- "maxItems": 2,
233
- "items": [
234
- {
235
- "type": "number"
236
- },
237
- {
238
- "type": "number"
239
- }
240
- ]
241
- },
242
- {
243
- "type": "string",
244
- "const": "deep"
245
- }
246
- ]
247
- },
248
- "navbar": {
249
- "type": "boolean"
250
- },
251
- "editLink": {
252
- "type": "boolean"
253
- },
254
- "lastUpdated": {
255
- "type": "boolean"
256
- },
257
- "footer": {
258
- "type": "boolean"
259
- },
260
- "pageClass": {
261
- "type": "string"
262
- },
263
- "head": {
264
- "type": "array",
265
- "items": {
266
- "type": "array",
267
- "minItems": 2,
268
- "maxItems": 2,
269
- "items": [
270
- {
271
- "type": "string"
272
- },
273
- {
274
- "type": "object",
275
- "additionalProperties": {
276
- "type": "string"
277
- }
278
- }
279
- ]
280
- }
281
- }
282
- },
283
- "additionalProperties": true
284
- },
285
- "recursive": {
286
- "type": "boolean"
287
- },
288
- "indexFile": {
289
- "type": "string"
290
187
  }
291
- },
292
- "additionalProperties": false
188
+ ]
293
189
  },
294
190
  "items": {
295
191
  "type": "array",
@@ -299,14 +195,14 @@
299
195
  "title": {
300
196
  "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/title"
301
197
  },
302
- "link": {
198
+ "description": {
303
199
  "type": "string"
304
200
  },
305
- "from": {
201
+ "path": {
306
202
  "type": "string"
307
203
  },
308
- "prefix": {
309
- "type": "string"
204
+ "include": {
205
+ "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/include"
310
206
  },
311
207
  "content": {
312
208
  "anyOf": [
@@ -323,20 +219,7 @@
323
219
  }
324
220
  },
325
221
  "landing": {
326
- "anyOf": [
327
- {
328
- "type": "string",
329
- "enum": [
330
- "auto",
331
- "cards",
332
- "overview"
333
- ]
334
- },
335
- {
336
- "type": "boolean",
337
- "const": false
338
- }
339
- ]
222
+ "type": "boolean"
340
223
  },
341
224
  "collapsible": {
342
225
  "type": "boolean"
@@ -351,7 +234,101 @@
351
234
  "type": "boolean"
352
235
  },
353
236
  "frontmatter": {
354
- "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/discovery/properties/frontmatter"
237
+ "type": "object",
238
+ "properties": {
239
+ "title": {
240
+ "type": "string"
241
+ },
242
+ "titleTemplate": {
243
+ "type": [
244
+ "string",
245
+ "boolean"
246
+ ]
247
+ },
248
+ "description": {
249
+ "type": "string"
250
+ },
251
+ "layout": {
252
+ "type": "string"
253
+ },
254
+ "sidebar": {
255
+ "type": "boolean"
256
+ },
257
+ "aside": {
258
+ "anyOf": [
259
+ {
260
+ "type": "boolean"
261
+ },
262
+ {
263
+ "type": "string",
264
+ "const": "left"
265
+ }
266
+ ]
267
+ },
268
+ "outline": {
269
+ "anyOf": [
270
+ {
271
+ "type": "boolean",
272
+ "const": false
273
+ },
274
+ {
275
+ "type": "number"
276
+ },
277
+ {
278
+ "type": "array",
279
+ "minItems": 2,
280
+ "maxItems": 2,
281
+ "items": [
282
+ {
283
+ "type": "number"
284
+ },
285
+ {
286
+ "type": "number"
287
+ }
288
+ ]
289
+ },
290
+ {
291
+ "type": "string",
292
+ "const": "deep"
293
+ }
294
+ ]
295
+ },
296
+ "navbar": {
297
+ "type": "boolean"
298
+ },
299
+ "editLink": {
300
+ "type": "boolean"
301
+ },
302
+ "lastUpdated": {
303
+ "type": "boolean"
304
+ },
305
+ "footer": {
306
+ "type": "boolean"
307
+ },
308
+ "pageClass": {
309
+ "type": "string"
310
+ },
311
+ "head": {
312
+ "type": "array",
313
+ "items": {
314
+ "type": "array",
315
+ "minItems": 2,
316
+ "maxItems": 2,
317
+ "items": [
318
+ {
319
+ "type": "string"
320
+ },
321
+ {
322
+ "type": "object",
323
+ "additionalProperties": {
324
+ "type": "string"
325
+ }
326
+ }
327
+ ]
328
+ }
329
+ }
330
+ },
331
+ "additionalProperties": true
355
332
  },
356
333
  "sort": {
357
334
  "anyOf": [
@@ -363,31 +340,23 @@
363
340
  "filename"
364
341
  ]
365
342
  },
366
- {
367
- "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/discovery/properties/sort/anyOf/1"
368
- }
343
+ {}
369
344
  ]
370
345
  },
371
346
  "recursive": {
372
347
  "type": "boolean"
373
348
  },
374
- "indexFile": {
349
+ "entryFile": {
375
350
  "type": "string"
376
351
  },
377
352
  "icon": {
378
- "type": "string"
379
- },
380
- "iconColor": {
381
- "type": "string"
353
+ "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/icon"
382
354
  },
383
355
  "card": {
384
356
  "type": "object",
385
357
  "properties": {
386
358
  "icon": {
387
- "type": "string"
388
- },
389
- "iconColor": {
390
- "type": "string"
359
+ "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/icon"
391
360
  },
392
361
  "scope": {
393
362
  "type": "string"
@@ -420,20 +389,8 @@
420
389
  },
421
390
  "additionalProperties": false
422
391
  },
423
- "isolated": {
392
+ "standalone": {
424
393
  "type": "boolean"
425
- },
426
- "titleFrom": {
427
- "type": "string",
428
- "enum": [
429
- "filename",
430
- "heading",
431
- "frontmatter",
432
- "auto"
433
- ]
434
- },
435
- "titleTransform": {
436
- "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/title/anyOf/1/properties/transform"
437
394
  }
438
395
  },
439
396
  "required": [
@@ -442,13 +399,43 @@
442
399
  "additionalProperties": false
443
400
  }
444
401
  },
402
+ "sort": {
403
+ "anyOf": [
404
+ {
405
+ "type": "string",
406
+ "enum": [
407
+ "default",
408
+ "alpha",
409
+ "filename"
410
+ ]
411
+ },
412
+ {
413
+ "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/items/items/properties/sort/anyOf/1"
414
+ }
415
+ ]
416
+ },
417
+ "exclude": {
418
+ "type": "array",
419
+ "items": {
420
+ "type": "string"
421
+ }
422
+ },
423
+ "recursive": {
424
+ "type": "boolean"
425
+ },
426
+ "entryFile": {
427
+ "type": "string"
428
+ },
429
+ "frontmatter": {
430
+ "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/items/items/properties/frontmatter"
431
+ },
445
432
  "openapi": {
446
433
  "type": "object",
447
434
  "properties": {
448
435
  "spec": {
449
436
  "type": "string"
450
437
  },
451
- "prefix": {
438
+ "path": {
452
439
  "type": "string"
453
440
  },
454
441
  "title": {
@@ -464,7 +451,7 @@
464
451
  },
465
452
  "required": [
466
453
  "spec",
467
- "prefix"
454
+ "path"
468
455
  ],
469
456
  "additionalProperties": false
470
457
  }
@@ -472,7 +459,7 @@
472
459
  "required": [
473
460
  "title",
474
461
  "description",
475
- "prefix"
462
+ "path"
476
463
  ],
477
464
  "additionalProperties": false
478
465
  }
@@ -495,7 +482,7 @@
495
482
  "type": "string"
496
483
  },
497
484
  "icon": {
498
- "type": "string"
485
+ "$ref": "#/definitions/ZpressConfig/properties/icon"
499
486
  },
500
487
  "items": {
501
488
  "type": "array",
@@ -510,7 +497,6 @@
510
497
  },
511
498
  "required": [
512
499
  "title",
513
- "description",
514
500
  "icon",
515
501
  "items"
516
502
  ],
@@ -532,7 +518,7 @@
532
518
  "type": "string"
533
519
  },
534
520
  "icon": {
535
- "type": "string"
521
+ "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/icon"
536
522
  }
537
523
  },
538
524
  "required": [
@@ -584,26 +570,22 @@
584
570
  "type": "string"
585
571
  },
586
572
  "icon": {
587
- "anyOf": [
588
- {
589
- "type": "string"
590
- },
591
- {
592
- "type": "object",
593
- "properties": {
594
- "id": {
595
- "type": "string"
596
- },
597
- "color": {
598
- "type": "string"
599
- }
600
- },
601
- "required": [
602
- "id",
603
- "color"
604
- ],
605
- "additionalProperties": false
606
- }
573
+ "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/icon"
574
+ },
575
+ "style": {
576
+ "type": "string",
577
+ "enum": [
578
+ "brand",
579
+ "alt",
580
+ "ghost"
581
+ ]
582
+ },
583
+ "shape": {
584
+ "type": "string",
585
+ "enum": [
586
+ "square",
587
+ "rounded",
588
+ "circle"
607
589
  ]
608
590
  }
609
591
  },
@@ -670,6 +652,128 @@
670
652
  "items": {
671
653
  "type": "string"
672
654
  }
655
+ },
656
+ "home": {
657
+ "type": "object",
658
+ "properties": {
659
+ "features": {
660
+ "type": "object",
661
+ "properties": {
662
+ "columns": {
663
+ "type": "number",
664
+ "enum": [
665
+ 1,
666
+ 2,
667
+ 3,
668
+ 4
669
+ ]
670
+ },
671
+ "truncate": {
672
+ "type": "object",
673
+ "properties": {
674
+ "title": {
675
+ "type": "integer",
676
+ "minimum": 1
677
+ },
678
+ "description": {
679
+ "type": "integer",
680
+ "minimum": 1
681
+ }
682
+ },
683
+ "additionalProperties": false
684
+ }
685
+ },
686
+ "additionalProperties": false
687
+ },
688
+ "workspaces": {
689
+ "$ref": "#/definitions/ZpressConfig/properties/home/properties/features"
690
+ }
691
+ },
692
+ "additionalProperties": false
693
+ },
694
+ "socialLinks": {
695
+ "type": "array",
696
+ "items": {
697
+ "type": "object",
698
+ "properties": {
699
+ "icon": {
700
+ "anyOf": [
701
+ {
702
+ "type": "string",
703
+ "enum": [
704
+ "lark",
705
+ "discord",
706
+ "facebook",
707
+ "github",
708
+ "instagram",
709
+ "linkedin",
710
+ "slack",
711
+ "x",
712
+ "youtube",
713
+ "wechat",
714
+ "qq",
715
+ "juejin",
716
+ "zhihu",
717
+ "bilibili",
718
+ "weibo",
719
+ "gitlab",
720
+ "X",
721
+ "bluesky",
722
+ "npm"
723
+ ]
724
+ },
725
+ {
726
+ "type": "object",
727
+ "properties": {
728
+ "svg": {
729
+ "type": "string"
730
+ }
731
+ },
732
+ "required": [
733
+ "svg"
734
+ ],
735
+ "additionalProperties": false
736
+ }
737
+ ]
738
+ },
739
+ "mode": {
740
+ "type": "string",
741
+ "enum": [
742
+ "link",
743
+ "text",
744
+ "img",
745
+ "dom"
746
+ ]
747
+ },
748
+ "content": {
749
+ "type": "string"
750
+ }
751
+ },
752
+ "required": [
753
+ "icon",
754
+ "mode",
755
+ "content"
756
+ ],
757
+ "additionalProperties": false
758
+ }
759
+ },
760
+ "footer": {
761
+ "type": "object",
762
+ "properties": {
763
+ "message": {
764
+ "type": "string"
765
+ },
766
+ "copyright": {
767
+ "type": "string"
768
+ },
769
+ "socials": {
770
+ "type": "boolean"
771
+ }
772
+ },
773
+ "additionalProperties": false
774
+ },
775
+ "openapi": {
776
+ "$ref": "#/definitions/ZpressConfig/properties/apps/items/properties/openapi"
673
777
  }
674
778
  },
675
779
  "required": [