@redocly/theme 0.17.1 → 0.18.1

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.
Files changed (126) hide show
  1. package/lib/I18n/LanguagePicker.js +53 -85
  2. package/lib/components/Catalog/Catalog.d.ts +1 -1
  3. package/lib/components/Catalog/useCatalog.d.ts +2 -1
  4. package/lib/components/Dropdown/Dropdown.d.ts +16 -0
  5. package/lib/components/Dropdown/Dropdown.js +113 -0
  6. package/lib/components/Dropdown/index.d.ts +1 -0
  7. package/lib/components/Dropdown/index.js +18 -0
  8. package/lib/components/Menu/MenuGroup.js +2 -0
  9. package/lib/components/Menu/MenuItem.js +2 -0
  10. package/lib/components/Menu/MobileMenu.d.ts +2 -9
  11. package/lib/components/Menu/MobileMenu.js +35 -65
  12. package/lib/components/Menu/MobileMenuGroup.js +2 -0
  13. package/lib/components/Menu/constants.d.ts +5 -0
  14. package/lib/components/Menu/constants.js +10 -0
  15. package/lib/components/Menu/hooks/use-mobile-menu-items.d.ts +2 -0
  16. package/lib/components/Menu/hooks/use-mobile-menu-items.js +83 -0
  17. package/lib/components/Menu/hooks/use-mobile-menu-levels.d.ts +5 -0
  18. package/lib/components/Menu/hooks/use-mobile-menu-levels.js +50 -0
  19. package/lib/components/Menu/types.d.ts +3 -0
  20. package/lib/components/Menu/types.js +3 -0
  21. package/lib/components/Menu/utils.d.ts +7 -0
  22. package/lib/components/Menu/utils.js +76 -0
  23. package/lib/components/Navbar/MobileUserProfile.d.ts +1 -1
  24. package/lib/components/Navbar/MobileUserProfile.js +4 -7
  25. package/lib/components/Navbar/Navbar.d.ts +0 -3
  26. package/lib/components/Navbar/Navbar.js +9 -12
  27. package/lib/components/Navbar/NavbarItem.d.ts +5 -1
  28. package/lib/components/Navbar/NavbarItem.js +15 -16
  29. package/lib/components/Navbar/NavbarMenu.js +1 -1
  30. package/lib/components/OpenApiDocs/Dropdown.js +5 -5
  31. package/lib/components/Product/Product.d.ts +7 -0
  32. package/lib/components/Product/Product.js +23 -0
  33. package/lib/components/Product/ProductPicker.d.ts +2 -0
  34. package/lib/components/Product/ProductPicker.js +83 -0
  35. package/lib/components/Product/index.d.ts +2 -0
  36. package/lib/components/Product/index.js +19 -0
  37. package/lib/components/Profile/UserProfile.js +54 -6
  38. package/lib/components/Search/InputWrapper.js +1 -7
  39. package/lib/components/Search/ProductTag.d.ts +6 -0
  40. package/lib/components/Search/ProductTag.js +61 -0
  41. package/lib/components/Search/SearchDialog.js +19 -4
  42. package/lib/components/Search/SearchItem.d.ts +2 -1
  43. package/lib/components/Search/SearchItem.js +13 -2
  44. package/lib/components/Search/index.d.ts +1 -0
  45. package/lib/components/Search/index.js +1 -0
  46. package/lib/components/Select/Select.d.ts +18 -0
  47. package/lib/components/Select/Select.js +118 -0
  48. package/lib/components/Select/index.d.ts +1 -0
  49. package/lib/components/Select/index.js +18 -0
  50. package/lib/components/Sidebar/DrilldownMenuItem.js +2 -9
  51. package/lib/components/Sidebar/SidebarItemIcon.d.ts +1 -0
  52. package/lib/components/Sidebar/SidebarItemIcon.js +16 -0
  53. package/lib/components/Sidebar/VersionPicker.d.ts +7 -0
  54. package/lib/components/Sidebar/VersionPicker.js +51 -0
  55. package/lib/components/Sidebar/index.d.ts +2 -0
  56. package/lib/components/Sidebar/index.js +2 -0
  57. package/lib/components/index.d.ts +3 -0
  58. package/lib/components/index.js +3 -0
  59. package/lib/config.d.ts +952 -25
  60. package/lib/config.js +115 -2
  61. package/lib/globalStyle.js +177 -16
  62. package/lib/hooks/useThemeConfig.d.ts +1 -1
  63. package/lib/hooks/useThemeConfig.js +7 -2
  64. package/lib/mocks/hooks/index.d.ts +4 -3
  65. package/lib/mocks/hooks/index.js +6 -2
  66. package/lib/mocks/search.d.ts +1 -1
  67. package/lib/mocks/search.js +1 -1
  68. package/lib/types/portal/src/shared/types/catalog.d.ts +2 -24
  69. package/lib/types/portal/src/shared/types/nav.d.ts +4 -0
  70. package/lib/types/portal/src/shared/types/searchDocument.d.ts +2 -0
  71. package/lib/ui/darkColors.js +2 -0
  72. package/lib/ui/index.d.ts +0 -1
  73. package/lib/ui/index.js +0 -1
  74. package/package.json +1 -1
  75. package/src/I18n/LanguagePicker.tsx +62 -89
  76. package/src/components/Catalog/Catalog.tsx +1 -1
  77. package/src/components/Catalog/useCatalog.ts +2 -3
  78. package/src/components/Dropdown/Dropdown.tsx +138 -0
  79. package/src/components/Dropdown/index.ts +1 -0
  80. package/src/components/Menu/MenuGroup.tsx +2 -0
  81. package/src/components/Menu/MenuItem.tsx +2 -0
  82. package/src/components/Menu/MobileMenu.tsx +43 -96
  83. package/src/components/Menu/MobileMenuGroup.tsx +2 -0
  84. package/src/components/Menu/constants.ts +5 -0
  85. package/src/components/Menu/hooks/use-mobile-menu-items.ts +100 -0
  86. package/src/components/Menu/hooks/use-mobile-menu-levels.ts +55 -0
  87. package/src/components/Menu/types.ts +3 -0
  88. package/src/components/Menu/utils.ts +109 -0
  89. package/src/components/Navbar/MobileUserProfile.tsx +19 -20
  90. package/src/components/Navbar/Navbar.tsx +12 -22
  91. package/src/components/Navbar/NavbarItem.tsx +20 -15
  92. package/src/components/Navbar/NavbarMenu.tsx +1 -1
  93. package/src/components/OpenApiDocs/Dropdown.tsx +5 -5
  94. package/src/components/Product/Product.tsx +28 -0
  95. package/src/components/Product/ProductPicker.tsx +97 -0
  96. package/src/components/Product/index.ts +2 -0
  97. package/src/components/Profile/UserProfile.tsx +80 -21
  98. package/src/components/Search/InputWrapper.tsx +1 -7
  99. package/src/components/Search/ProductTag.tsx +46 -0
  100. package/src/components/Search/SearchDialog.tsx +21 -5
  101. package/src/components/Search/SearchItem.tsx +17 -3
  102. package/src/components/Search/index.ts +1 -0
  103. package/src/components/Select/Select.tsx +140 -0
  104. package/src/components/Select/index.ts +1 -0
  105. package/src/components/Sidebar/DrilldownMenuItem.tsx +2 -10
  106. package/src/components/Sidebar/SidebarItemIcon.tsx +10 -0
  107. package/src/components/Sidebar/VersionPicker.tsx +48 -0
  108. package/src/components/Sidebar/index.ts +2 -0
  109. package/src/components/index.ts +3 -0
  110. package/src/config.ts +140 -6
  111. package/src/globalStyle.ts +181 -16
  112. package/src/hooks/useThemeConfig.ts +18 -3
  113. package/src/mocks/hooks/index.ts +9 -3
  114. package/src/mocks/search.ts +1 -1
  115. package/src/types/portal/src/shared/types/catalog.ts +2 -26
  116. package/src/types/portal/src/shared/types/i18n.d.ts +3 -1
  117. package/src/types/portal/src/shared/types/nav.ts +41 -37
  118. package/src/types/portal/src/shared/types/searchDocument.ts +7 -4
  119. package/src/ui/darkColors.tsx +2 -0
  120. package/src/ui/index.tsx +0 -1
  121. package/lib/components/Navbar/NavbarDropdown.d.ts +0 -9
  122. package/lib/components/Navbar/NavbarDropdown.js +0 -40
  123. package/lib/components/Profile/UserProfileMenu.d.ts +0 -8
  124. package/lib/components/Profile/UserProfileMenu.js +0 -93
  125. package/src/components/Navbar/NavbarDropdown.tsx +0 -48
  126. package/src/components/Profile/UserProfileMenu.tsx +0 -97
package/lib/config.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { FromSchema } from 'json-schema-to-ts';
2
2
  import type { MenuStyle, ResolvedNavLinkItem } from './types/portal';
3
- import type { CatalogConfig } from './types/portal/src/shared/types/catalog';
3
+ import type { REDOCLY_TEAMS_RBAC } from './types/portal/src/shared/constants';
4
4
  declare const markdownConfigSchema: {
5
5
  readonly type: "object";
6
6
  readonly properties: {
@@ -41,8 +41,9 @@ declare const markdownConfigSchema: {
41
41
  readonly default: "On this page";
42
42
  };
43
43
  readonly depth: {
44
- readonly type: "number";
44
+ readonly type: "integer";
45
45
  readonly default: 3;
46
+ readonly minimum: 1;
46
47
  };
47
48
  };
48
49
  readonly additionalProperties: false;
@@ -295,6 +296,286 @@ declare const googleAnalyticsConfigSchema: {
295
296
  readonly additionalProperties: false;
296
297
  readonly required: readonly ["trackingId"];
297
298
  };
299
+ declare const productConfigSchema: {
300
+ readonly type: "object";
301
+ readonly properties: {
302
+ readonly name: {
303
+ readonly type: "string";
304
+ };
305
+ readonly icon: {
306
+ readonly type: "string";
307
+ };
308
+ readonly folder: {
309
+ readonly type: "string";
310
+ };
311
+ };
312
+ readonly additionalProperties: false;
313
+ readonly required: readonly ["name", "icon", "folder"];
314
+ };
315
+ declare const catalogFilterSchema: {
316
+ readonly type: "object";
317
+ readonly additionalProperties: false;
318
+ readonly required: readonly ["title", "property"];
319
+ readonly properties: {
320
+ readonly type: {
321
+ readonly type: "string";
322
+ readonly enum: readonly ["select", "checkboxes", "date-range"];
323
+ };
324
+ readonly title: {
325
+ readonly type: "string";
326
+ };
327
+ readonly titleTranslationKey: {
328
+ readonly type: "string";
329
+ };
330
+ readonly property: {
331
+ readonly type: "string";
332
+ };
333
+ readonly parentFilter: {
334
+ readonly type: "string";
335
+ };
336
+ readonly missingCategoryName: {
337
+ readonly type: "string";
338
+ };
339
+ readonly missingCategoryNameTranslationKey: {
340
+ readonly type: "string";
341
+ };
342
+ readonly options: {
343
+ readonly type: "array";
344
+ readonly items: {
345
+ readonly type: "string";
346
+ };
347
+ };
348
+ };
349
+ };
350
+ declare const scorecardConfigSchema: {
351
+ readonly type: "object";
352
+ readonly additionalProperties: true;
353
+ readonly required: readonly ["levels"];
354
+ readonly properties: {
355
+ readonly failBuildIfBelowMinimum: {
356
+ readonly type: "boolean";
357
+ readonly default: false;
358
+ };
359
+ readonly levels: {
360
+ readonly type: "array";
361
+ readonly items: {
362
+ readonly type: "object";
363
+ readonly required: readonly ["name"];
364
+ readonly properties: {
365
+ readonly name: {
366
+ readonly type: "string";
367
+ };
368
+ readonly extends: {
369
+ readonly type: "array";
370
+ readonly items: {
371
+ readonly type: "string";
372
+ };
373
+ };
374
+ readonly rules: {
375
+ readonly type: "object";
376
+ readonly additionalProperties: {
377
+ readonly type: readonly ["object", "string"];
378
+ };
379
+ };
380
+ };
381
+ readonly additionalProperties: false;
382
+ };
383
+ };
384
+ readonly targets: {
385
+ readonly type: "array";
386
+ readonly items: {
387
+ readonly type: "object";
388
+ readonly required: readonly ["where"];
389
+ readonly properties: {
390
+ readonly minimumLevel: {
391
+ readonly type: "string";
392
+ };
393
+ readonly where: {
394
+ readonly type: "object";
395
+ readonly required: readonly ["metadata"];
396
+ readonly properties: {
397
+ readonly metadata: {
398
+ readonly type: "object";
399
+ readonly additionalProperties: {
400
+ readonly type: "string";
401
+ };
402
+ };
403
+ };
404
+ readonly additionalProperties: false;
405
+ };
406
+ };
407
+ readonly additionalProperties: false;
408
+ };
409
+ };
410
+ };
411
+ };
412
+ declare const catalogSchema: {
413
+ readonly type: "object";
414
+ readonly additionalProperties: true;
415
+ readonly required: readonly ["slug", "filters", "groupByFirstFilter", "items"];
416
+ readonly properties: {
417
+ readonly slug: {
418
+ readonly type: "string";
419
+ };
420
+ readonly filters: {
421
+ readonly type: "array";
422
+ readonly items: {
423
+ readonly type: "object";
424
+ readonly additionalProperties: false;
425
+ readonly required: readonly ["title", "property"];
426
+ readonly properties: {
427
+ readonly type: {
428
+ readonly type: "string";
429
+ readonly enum: readonly ["select", "checkboxes", "date-range"];
430
+ };
431
+ readonly title: {
432
+ readonly type: "string";
433
+ };
434
+ readonly titleTranslationKey: {
435
+ readonly type: "string";
436
+ };
437
+ readonly property: {
438
+ readonly type: "string";
439
+ };
440
+ readonly parentFilter: {
441
+ readonly type: "string";
442
+ };
443
+ readonly missingCategoryName: {
444
+ readonly type: "string";
445
+ };
446
+ readonly missingCategoryNameTranslationKey: {
447
+ readonly type: "string";
448
+ };
449
+ readonly options: {
450
+ readonly type: "array";
451
+ readonly items: {
452
+ readonly type: "string";
453
+ };
454
+ };
455
+ };
456
+ };
457
+ };
458
+ readonly groupByFirstFilter: {
459
+ readonly type: "boolean";
460
+ };
461
+ readonly items: {
462
+ readonly type: "array";
463
+ readonly items: {
464
+ readonly properties: {
465
+ readonly items: {
466
+ readonly type: "array";
467
+ readonly items: {
468
+ readonly type: "object";
469
+ readonly properties: {
470
+ readonly page: {
471
+ readonly type: "string";
472
+ };
473
+ readonly directory: {
474
+ readonly type: "string";
475
+ };
476
+ readonly group: {
477
+ readonly type: "string";
478
+ };
479
+ readonly label: {
480
+ readonly type: "string";
481
+ };
482
+ readonly separator: {
483
+ readonly type: "string";
484
+ };
485
+ readonly separatorLine: {
486
+ readonly type: "boolean";
487
+ };
488
+ readonly version: {
489
+ readonly type: "string";
490
+ };
491
+ readonly menuStyle: {
492
+ readonly type: "string";
493
+ readonly enum: readonly [MenuStyle];
494
+ };
495
+ readonly expanded: {
496
+ readonly type: "string";
497
+ readonly const: "always";
498
+ };
499
+ readonly selectFirstItemOnExpand: {
500
+ readonly type: "boolean";
501
+ };
502
+ readonly flatten: {
503
+ readonly type: "boolean";
504
+ };
505
+ readonly linkedSidebars: {
506
+ readonly type: "array";
507
+ readonly items: {
508
+ readonly type: "string";
509
+ };
510
+ };
511
+ };
512
+ };
513
+ };
514
+ readonly page: {
515
+ readonly type: "string";
516
+ };
517
+ readonly directory: {
518
+ readonly type: "string";
519
+ };
520
+ readonly group: {
521
+ readonly type: "string";
522
+ };
523
+ readonly label: {
524
+ readonly type: "string";
525
+ };
526
+ readonly separator: {
527
+ readonly type: "string";
528
+ };
529
+ readonly separatorLine: {
530
+ readonly type: "boolean";
531
+ };
532
+ readonly version: {
533
+ readonly type: "string";
534
+ };
535
+ readonly menuStyle: {
536
+ readonly type: "string";
537
+ readonly enum: readonly [MenuStyle];
538
+ };
539
+ readonly expanded: {
540
+ readonly type: "string";
541
+ readonly const: "always";
542
+ };
543
+ readonly selectFirstItemOnExpand: {
544
+ readonly type: "boolean";
545
+ };
546
+ readonly flatten: {
547
+ readonly type: "boolean";
548
+ };
549
+ readonly linkedSidebars: {
550
+ readonly type: "array";
551
+ readonly items: {
552
+ readonly type: "string";
553
+ };
554
+ };
555
+ };
556
+ readonly type: "object";
557
+ };
558
+ };
559
+ readonly requiredPermission: {
560
+ readonly type: "string";
561
+ };
562
+ readonly separateVersions: {
563
+ readonly type: "boolean";
564
+ };
565
+ readonly title: {
566
+ readonly type: "string";
567
+ };
568
+ readonly titleTranslationKey: {
569
+ readonly type: "string";
570
+ };
571
+ readonly description: {
572
+ readonly type: "string";
573
+ };
574
+ readonly descriptionTranslationKey: {
575
+ readonly type: "string";
576
+ };
577
+ };
578
+ };
298
579
  export declare const themeConfigSchema: {
299
580
  readonly type: "object";
300
581
  readonly properties: {
@@ -430,6 +711,25 @@ export declare const themeConfigSchema: {
430
711
  };
431
712
  readonly additionalProperties: false;
432
713
  };
714
+ readonly products: {
715
+ readonly type: "object";
716
+ readonly additionalProperties: {
717
+ readonly type: "object";
718
+ readonly properties: {
719
+ readonly name: {
720
+ readonly type: "string";
721
+ };
722
+ readonly icon: {
723
+ readonly type: "string";
724
+ };
725
+ readonly folder: {
726
+ readonly type: "string";
727
+ };
728
+ };
729
+ readonly additionalProperties: false;
730
+ readonly required: readonly ["name", "icon", "folder"];
731
+ };
732
+ };
433
733
  readonly footer: {
434
734
  readonly type: "object";
435
735
  readonly properties: {
@@ -977,8 +1277,9 @@ export declare const themeConfigSchema: {
977
1277
  readonly default: "On this page";
978
1278
  };
979
1279
  readonly depth: {
980
- readonly type: "number";
1280
+ readonly type: "integer";
981
1281
  readonly default: 3;
1282
+ readonly minimum: 1;
982
1283
  };
983
1284
  };
984
1285
  readonly additionalProperties: false;
@@ -1355,29 +1656,652 @@ export declare const themeConfigSchema: {
1355
1656
  readonly additionalProperties: false;
1356
1657
  readonly default: {};
1357
1658
  };
1659
+ readonly catalog: {
1660
+ readonly type: "object";
1661
+ readonly patternProperties: {
1662
+ readonly '.*': {
1663
+ readonly type: "object";
1664
+ readonly additionalProperties: true;
1665
+ readonly required: readonly ["slug", "filters", "groupByFirstFilter", "items"];
1666
+ readonly properties: {
1667
+ readonly slug: {
1668
+ readonly type: "string";
1669
+ };
1670
+ readonly filters: {
1671
+ readonly type: "array";
1672
+ readonly items: {
1673
+ readonly type: "object";
1674
+ readonly additionalProperties: false;
1675
+ readonly required: readonly ["title", "property"];
1676
+ readonly properties: {
1677
+ readonly type: {
1678
+ readonly type: "string";
1679
+ readonly enum: readonly ["select", "checkboxes", "date-range"];
1680
+ };
1681
+ readonly title: {
1682
+ readonly type: "string";
1683
+ };
1684
+ readonly titleTranslationKey: {
1685
+ readonly type: "string";
1686
+ };
1687
+ readonly property: {
1688
+ readonly type: "string";
1689
+ };
1690
+ readonly parentFilter: {
1691
+ readonly type: "string";
1692
+ };
1693
+ readonly missingCategoryName: {
1694
+ readonly type: "string";
1695
+ };
1696
+ readonly missingCategoryNameTranslationKey: {
1697
+ readonly type: "string";
1698
+ };
1699
+ readonly options: {
1700
+ readonly type: "array";
1701
+ readonly items: {
1702
+ readonly type: "string";
1703
+ };
1704
+ };
1705
+ };
1706
+ };
1707
+ };
1708
+ readonly groupByFirstFilter: {
1709
+ readonly type: "boolean";
1710
+ };
1711
+ readonly items: {
1712
+ readonly type: "array";
1713
+ readonly items: {
1714
+ readonly properties: {
1715
+ readonly items: {
1716
+ readonly type: "array";
1717
+ readonly items: {
1718
+ readonly type: "object";
1719
+ readonly properties: {
1720
+ readonly page: {
1721
+ readonly type: "string";
1722
+ };
1723
+ readonly directory: {
1724
+ readonly type: "string";
1725
+ };
1726
+ readonly group: {
1727
+ readonly type: "string";
1728
+ };
1729
+ readonly label: {
1730
+ readonly type: "string";
1731
+ };
1732
+ readonly separator: {
1733
+ readonly type: "string";
1734
+ };
1735
+ readonly separatorLine: {
1736
+ readonly type: "boolean";
1737
+ };
1738
+ readonly version: {
1739
+ readonly type: "string";
1740
+ };
1741
+ readonly menuStyle: {
1742
+ readonly type: "string";
1743
+ readonly enum: readonly [MenuStyle];
1744
+ };
1745
+ readonly expanded: {
1746
+ readonly type: "string";
1747
+ readonly const: "always";
1748
+ };
1749
+ readonly selectFirstItemOnExpand: {
1750
+ readonly type: "boolean";
1751
+ };
1752
+ readonly flatten: {
1753
+ readonly type: "boolean";
1754
+ };
1755
+ readonly linkedSidebars: {
1756
+ readonly type: "array";
1757
+ readonly items: {
1758
+ readonly type: "string";
1759
+ };
1760
+ };
1761
+ };
1762
+ };
1763
+ };
1764
+ readonly page: {
1765
+ readonly type: "string";
1766
+ };
1767
+ readonly directory: {
1768
+ readonly type: "string";
1769
+ };
1770
+ readonly group: {
1771
+ readonly type: "string";
1772
+ };
1773
+ readonly label: {
1774
+ readonly type: "string";
1775
+ };
1776
+ readonly separator: {
1777
+ readonly type: "string";
1778
+ };
1779
+ readonly separatorLine: {
1780
+ readonly type: "boolean";
1781
+ };
1782
+ readonly version: {
1783
+ readonly type: "string";
1784
+ };
1785
+ readonly menuStyle: {
1786
+ readonly type: "string";
1787
+ readonly enum: readonly [MenuStyle];
1788
+ };
1789
+ readonly expanded: {
1790
+ readonly type: "string";
1791
+ readonly const: "always";
1792
+ };
1793
+ readonly selectFirstItemOnExpand: {
1794
+ readonly type: "boolean";
1795
+ };
1796
+ readonly flatten: {
1797
+ readonly type: "boolean";
1798
+ };
1799
+ readonly linkedSidebars: {
1800
+ readonly type: "array";
1801
+ readonly items: {
1802
+ readonly type: "string";
1803
+ };
1804
+ };
1805
+ };
1806
+ readonly type: "object";
1807
+ };
1808
+ };
1809
+ readonly requiredPermission: {
1810
+ readonly type: "string";
1811
+ };
1812
+ readonly separateVersions: {
1813
+ readonly type: "boolean";
1814
+ };
1815
+ readonly title: {
1816
+ readonly type: "string";
1817
+ };
1818
+ readonly titleTranslationKey: {
1819
+ readonly type: "string";
1820
+ };
1821
+ readonly description: {
1822
+ readonly type: "string";
1823
+ };
1824
+ readonly descriptionTranslationKey: {
1825
+ readonly type: "string";
1826
+ };
1827
+ };
1828
+ };
1829
+ };
1830
+ };
1831
+ readonly scorecard: {
1832
+ readonly type: "object";
1833
+ readonly additionalProperties: true;
1834
+ readonly required: readonly ["levels"];
1835
+ readonly properties: {
1836
+ readonly failBuildIfBelowMinimum: {
1837
+ readonly type: "boolean";
1838
+ readonly default: false;
1839
+ };
1840
+ readonly levels: {
1841
+ readonly type: "array";
1842
+ readonly items: {
1843
+ readonly type: "object";
1844
+ readonly required: readonly ["name"];
1845
+ readonly properties: {
1846
+ readonly name: {
1847
+ readonly type: "string";
1848
+ };
1849
+ readonly extends: {
1850
+ readonly type: "array";
1851
+ readonly items: {
1852
+ readonly type: "string";
1853
+ };
1854
+ };
1855
+ readonly rules: {
1856
+ readonly type: "object";
1857
+ readonly additionalProperties: {
1858
+ readonly type: readonly ["object", "string"];
1859
+ };
1860
+ };
1861
+ };
1862
+ readonly additionalProperties: false;
1863
+ };
1864
+ };
1865
+ readonly targets: {
1866
+ readonly type: "array";
1867
+ readonly items: {
1868
+ readonly type: "object";
1869
+ readonly required: readonly ["where"];
1870
+ readonly properties: {
1871
+ readonly minimumLevel: {
1872
+ readonly type: "string";
1873
+ };
1874
+ readonly where: {
1875
+ readonly type: "object";
1876
+ readonly required: readonly ["metadata"];
1877
+ readonly properties: {
1878
+ readonly metadata: {
1879
+ readonly type: "object";
1880
+ readonly additionalProperties: {
1881
+ readonly type: "string";
1882
+ };
1883
+ };
1884
+ };
1885
+ readonly additionalProperties: false;
1886
+ };
1887
+ };
1888
+ readonly additionalProperties: false;
1889
+ };
1890
+ };
1891
+ };
1892
+ };
1893
+ };
1894
+ readonly additionalProperties: true;
1895
+ readonly default: {};
1896
+ };
1897
+ export declare const productThemeOverrideSchema: {
1898
+ readonly type: "object";
1899
+ readonly properties: {
1900
+ readonly logo: {
1901
+ readonly type: "object";
1902
+ readonly properties: {
1903
+ readonly image: {
1904
+ readonly type: "string";
1905
+ };
1906
+ readonly altText: {
1907
+ readonly type: "string";
1908
+ };
1909
+ readonly link: {
1910
+ readonly type: "string";
1911
+ };
1912
+ readonly favicon: {
1913
+ readonly type: "string";
1914
+ };
1915
+ };
1916
+ readonly additionalProperties: false;
1917
+ };
1918
+ readonly navbar: {
1919
+ readonly type: "object";
1920
+ readonly properties: {
1921
+ readonly hide: {
1922
+ readonly type: "boolean";
1923
+ };
1924
+ readonly items: {
1925
+ readonly type: "array";
1926
+ readonly items: {
1927
+ readonly properties: {
1928
+ readonly items: {
1929
+ readonly type: "array";
1930
+ readonly items: {
1931
+ readonly type: "object";
1932
+ readonly properties: {
1933
+ readonly page: {
1934
+ readonly type: "string";
1935
+ };
1936
+ readonly directory: {
1937
+ readonly type: "string";
1938
+ };
1939
+ readonly group: {
1940
+ readonly type: "string";
1941
+ };
1942
+ readonly label: {
1943
+ readonly type: "string";
1944
+ };
1945
+ readonly separator: {
1946
+ readonly type: "string";
1947
+ };
1948
+ readonly separatorLine: {
1949
+ readonly type: "boolean";
1950
+ };
1951
+ readonly version: {
1952
+ readonly type: "string";
1953
+ };
1954
+ readonly menuStyle: {
1955
+ readonly type: "string";
1956
+ readonly enum: readonly [MenuStyle];
1957
+ };
1958
+ readonly expanded: {
1959
+ readonly type: "string";
1960
+ readonly const: "always";
1961
+ };
1962
+ readonly selectFirstItemOnExpand: {
1963
+ readonly type: "boolean";
1964
+ };
1965
+ readonly flatten: {
1966
+ readonly type: "boolean";
1967
+ };
1968
+ readonly linkedSidebars: {
1969
+ readonly type: "array";
1970
+ readonly items: {
1971
+ readonly type: "string";
1972
+ };
1973
+ };
1974
+ };
1975
+ };
1976
+ };
1977
+ readonly page: {
1978
+ readonly type: "string";
1979
+ };
1980
+ readonly directory: {
1981
+ readonly type: "string";
1982
+ };
1983
+ readonly group: {
1984
+ readonly type: "string";
1985
+ };
1986
+ readonly label: {
1987
+ readonly type: "string";
1988
+ };
1989
+ readonly separator: {
1990
+ readonly type: "string";
1991
+ };
1992
+ readonly separatorLine: {
1993
+ readonly type: "boolean";
1994
+ };
1995
+ readonly version: {
1996
+ readonly type: "string";
1997
+ };
1998
+ readonly menuStyle: {
1999
+ readonly type: "string";
2000
+ readonly enum: readonly [MenuStyle];
2001
+ };
2002
+ readonly expanded: {
2003
+ readonly type: "string";
2004
+ readonly const: "always";
2005
+ };
2006
+ readonly selectFirstItemOnExpand: {
2007
+ readonly type: "boolean";
2008
+ };
2009
+ readonly flatten: {
2010
+ readonly type: "boolean";
2011
+ };
2012
+ readonly linkedSidebars: {
2013
+ readonly type: "array";
2014
+ readonly items: {
2015
+ readonly type: "string";
2016
+ };
2017
+ };
2018
+ };
2019
+ readonly type: "object";
2020
+ };
2021
+ };
2022
+ };
2023
+ readonly additionalProperties: false;
2024
+ };
2025
+ readonly footer: {
2026
+ readonly type: "object";
2027
+ readonly properties: {
2028
+ readonly hide: {
2029
+ readonly type: "boolean";
2030
+ };
2031
+ readonly items: {
2032
+ readonly type: "array";
2033
+ readonly items: {
2034
+ readonly properties: {
2035
+ readonly items: {
2036
+ readonly type: "array";
2037
+ readonly items: {
2038
+ readonly type: "object";
2039
+ readonly properties: {
2040
+ readonly page: {
2041
+ readonly type: "string";
2042
+ };
2043
+ readonly directory: {
2044
+ readonly type: "string";
2045
+ };
2046
+ readonly group: {
2047
+ readonly type: "string";
2048
+ };
2049
+ readonly label: {
2050
+ readonly type: "string";
2051
+ };
2052
+ readonly separator: {
2053
+ readonly type: "string";
2054
+ };
2055
+ readonly separatorLine: {
2056
+ readonly type: "boolean";
2057
+ };
2058
+ readonly version: {
2059
+ readonly type: "string";
2060
+ };
2061
+ readonly menuStyle: {
2062
+ readonly type: "string";
2063
+ readonly enum: readonly [MenuStyle];
2064
+ };
2065
+ readonly expanded: {
2066
+ readonly type: "string";
2067
+ readonly const: "always";
2068
+ };
2069
+ readonly selectFirstItemOnExpand: {
2070
+ readonly type: "boolean";
2071
+ };
2072
+ readonly flatten: {
2073
+ readonly type: "boolean";
2074
+ };
2075
+ readonly linkedSidebars: {
2076
+ readonly type: "array";
2077
+ readonly items: {
2078
+ readonly type: "string";
2079
+ };
2080
+ };
2081
+ };
2082
+ };
2083
+ };
2084
+ readonly page: {
2085
+ readonly type: "string";
2086
+ };
2087
+ readonly directory: {
2088
+ readonly type: "string";
2089
+ };
2090
+ readonly group: {
2091
+ readonly type: "string";
2092
+ };
2093
+ readonly label: {
2094
+ readonly type: "string";
2095
+ };
2096
+ readonly separator: {
2097
+ readonly type: "string";
2098
+ };
2099
+ readonly separatorLine: {
2100
+ readonly type: "boolean";
2101
+ };
2102
+ readonly version: {
2103
+ readonly type: "string";
2104
+ };
2105
+ readonly menuStyle: {
2106
+ readonly type: "string";
2107
+ readonly enum: readonly [MenuStyle];
2108
+ };
2109
+ readonly expanded: {
2110
+ readonly type: "string";
2111
+ readonly const: "always";
2112
+ };
2113
+ readonly selectFirstItemOnExpand: {
2114
+ readonly type: "boolean";
2115
+ };
2116
+ readonly flatten: {
2117
+ readonly type: "boolean";
2118
+ };
2119
+ readonly linkedSidebars: {
2120
+ readonly type: "array";
2121
+ readonly items: {
2122
+ readonly type: "string";
2123
+ };
2124
+ };
2125
+ };
2126
+ readonly type: "object";
2127
+ };
2128
+ };
2129
+ readonly copyrightText: {
2130
+ readonly type: "string";
2131
+ };
2132
+ };
2133
+ readonly additionalProperties: false;
2134
+ };
2135
+ readonly sidebar: {
2136
+ readonly type: "object";
2137
+ readonly properties: {
2138
+ readonly hide: {
2139
+ readonly type: "boolean";
2140
+ };
2141
+ };
2142
+ readonly additionalProperties: false;
2143
+ };
2144
+ readonly search: {
2145
+ readonly type: "object";
2146
+ readonly properties: {
2147
+ readonly hide: {
2148
+ readonly type: "boolean";
2149
+ };
2150
+ readonly placement: {
2151
+ readonly type: "string";
2152
+ readonly default: "navbar";
2153
+ };
2154
+ readonly shortcuts: {
2155
+ readonly type: "array";
2156
+ readonly items: {
2157
+ readonly type: "string";
2158
+ };
2159
+ readonly default: readonly ["/"];
2160
+ };
2161
+ readonly suggestedPages: {
2162
+ readonly type: "array";
2163
+ readonly items: {
2164
+ readonly type: "object";
2165
+ readonly properties: {
2166
+ readonly page: {
2167
+ readonly type: "string";
2168
+ };
2169
+ readonly label: {
2170
+ readonly type: "string";
2171
+ };
2172
+ readonly labelTranslationKey: {
2173
+ readonly type: "string";
2174
+ };
2175
+ };
2176
+ readonly required: readonly ["page"];
2177
+ };
2178
+ };
2179
+ };
2180
+ readonly additionalProperties: false;
2181
+ readonly default: {};
2182
+ };
2183
+ readonly codeSnippet: {
2184
+ readonly type: "object";
2185
+ readonly properties: {
2186
+ readonly controlsStyle: {
2187
+ readonly type: "string";
2188
+ readonly default: "icon";
2189
+ };
2190
+ readonly copy: {
2191
+ readonly type: "object";
2192
+ readonly properties: {
2193
+ readonly hide: {
2194
+ readonly type: "boolean";
2195
+ };
2196
+ };
2197
+ readonly additionalProperties: false;
2198
+ readonly default: {
2199
+ readonly hide: false;
2200
+ };
2201
+ };
2202
+ readonly report: {
2203
+ readonly type: "object";
2204
+ readonly properties: {
2205
+ readonly hide: {
2206
+ readonly type: "boolean";
2207
+ };
2208
+ };
2209
+ readonly additionalProperties: false;
2210
+ readonly default: {
2211
+ readonly hide: true;
2212
+ };
2213
+ };
2214
+ readonly expand: {
2215
+ readonly type: "object";
2216
+ readonly properties: {
2217
+ readonly hide: {
2218
+ readonly type: "boolean";
2219
+ };
2220
+ };
2221
+ readonly additionalProperties: false;
2222
+ readonly default: {
2223
+ readonly hide: false;
2224
+ };
2225
+ };
2226
+ readonly collapse: {
2227
+ readonly type: "object";
2228
+ readonly properties: {
2229
+ readonly hide: {
2230
+ readonly type: "boolean";
2231
+ };
2232
+ };
2233
+ readonly additionalProperties: false;
2234
+ readonly default: {
2235
+ readonly hide: false;
2236
+ };
2237
+ };
2238
+ };
2239
+ readonly additionalProperties: false;
2240
+ readonly default: {};
2241
+ };
2242
+ readonly breadcrumbs: {
2243
+ readonly type: "object";
2244
+ readonly properties: {
2245
+ readonly hide: {
2246
+ readonly type: "boolean";
2247
+ };
2248
+ readonly prefixItems: {
2249
+ readonly type: "array";
2250
+ readonly items: {
2251
+ readonly type: "object";
2252
+ readonly properties: {
2253
+ readonly label: {
2254
+ readonly type: "string";
2255
+ };
2256
+ readonly labelTranslationKey: {
2257
+ readonly type: "string";
2258
+ };
2259
+ readonly page: {
2260
+ readonly type: "string";
2261
+ };
2262
+ };
2263
+ readonly additionalProperties: false;
2264
+ readonly default: {};
2265
+ };
2266
+ };
2267
+ };
2268
+ readonly additionalProperties: false;
2269
+ readonly default: {};
2270
+ };
2271
+ };
2272
+ readonly additionalProperties: true;
2273
+ readonly default: {};
2274
+ };
2275
+ export type ThemeConfig = FromSchema<typeof themeConfigSchema>;
2276
+ export type ThemeUIConfig = ThemeConfig & {
2277
+ auth?: {
2278
+ idpsInfo?: {
2279
+ idpId: string;
2280
+ type: string;
2281
+ title: string | undefined;
2282
+ }[];
2283
+ devLogin?: boolean;
2284
+ };
2285
+ search?: {
2286
+ shortcuts?: string[];
2287
+ suggestedPages?: any[];
2288
+ };
2289
+ breadcrumbs?: {
2290
+ prefixItems?: ResolvedNavLinkItem[];
2291
+ };
2292
+ products?: {
2293
+ [key: string]: ProductUiConfig;
2294
+ };
2295
+ };
2296
+ export type ProductConfig = FromSchema<typeof productConfigSchema>;
2297
+ export type ProductThemeOverrideConfig = Pick<ThemeUIConfig, 'logo' | 'navbar' | 'footer' | 'sidebar' | 'search' | 'codeSnippet' | 'breadcrumbs'>;
2298
+ export type ProductUiConfig = ProductConfig & {
2299
+ slug: string;
2300
+ link: string;
2301
+ [REDOCLY_TEAMS_RBAC]?: {
2302
+ [key: string]: string;
1358
2303
  };
1359
- readonly additionalProperties: true;
1360
- readonly default: {};
1361
- };
1362
- export type ThemeConfig = FromSchema<typeof themeConfigSchema> & {
1363
- catalog?: Record<string, CatalogConfig>;
1364
- };
1365
- export type ThemeUIConfig = ThemeConfig & {
1366
- auth?: {
1367
- idpsInfo?: {
1368
- idpId: string;
1369
- type: string;
1370
- title: string | undefined;
1371
- }[];
1372
- devLogin?: boolean;
1373
- };
1374
- search?: {
1375
- shortcuts?: string[];
1376
- suggestedPages?: any[];
1377
- };
1378
- breadcrumbs?: {
1379
- prefixItems?: ResolvedNavLinkItem[];
1380
- };
2304
+ themeOverride?: ProductThemeOverrideConfig;
1381
2305
  };
1382
2306
  export type MarkdownConfig = FromSchema<typeof markdownConfigSchema>;
1383
2307
  export type AmplitudeAnalyticsConfig = FromSchema<typeof amplitudeAnalyticsConfigSchema>;
@@ -1385,4 +2309,7 @@ export type RudderstackAnalyticsConfig = FromSchema<typeof rudderstackAnalyticsC
1385
2309
  export type SegmentAnalyticsConfig = FromSchema<typeof segmentAnalyticsConfigSchema>;
1386
2310
  export type GtmAnalyticsConfig = FromSchema<typeof gtmAnalyticsConfigSchema>;
1387
2311
  export type GoogleAnalyticsConfig = FromSchema<typeof googleAnalyticsConfigSchema>;
2312
+ export type CatalogConfig = FromSchema<typeof catalogSchema>;
2313
+ export type CatalogFilterConfig = FromSchema<typeof catalogFilterSchema>;
2314
+ export type ScorecardConfig = FromSchema<typeof scorecardConfigSchema>;
1388
2315
  export {};