|
1 | | -export namespace DefaultTheme { |
2 | | - export interface Config { |
3 | | - logo?: string |
4 | | - nav?: NavItem[] | false |
5 | | - sidebar?: SideBarConfig | MultiSideBarConfig |
6 | | - |
7 | | - /** |
8 | | - * GitHub repository following the format <user>/<project>. |
9 | | - * |
10 | | - * @example `"vuejs/vue-next"` |
11 | | - */ |
12 | | - repo?: string |
13 | | - |
14 | | - /** |
15 | | - * Customize the header label. Defaults to GitHub/Gitlab/Bitbucket |
16 | | - * depending on the provided repo. |
17 | | - * |
18 | | - * @example `"Contribute!"` |
19 | | - */ |
20 | | - repoLabel?: string |
21 | | - |
22 | | - /** |
23 | | - * If your docs are in a different repository from your main project. |
24 | | - * |
25 | | - * @example `"vuejs/docs-next"` |
26 | | - */ |
27 | | - docsRepo?: string |
28 | | - |
29 | | - /** |
30 | | - * If your docs are not at the root of the repo. |
31 | | - * |
32 | | - * @example `"docs"` |
33 | | - */ |
34 | | - docsDir?: string |
35 | | - |
36 | | - /** |
37 | | - * If your docs are in a different branch. Defaults to `master`. |
38 | | - * |
39 | | - * @example `"next"` |
40 | | - */ |
41 | | - docsBranch?: string |
42 | | - |
43 | | - /** |
44 | | - * Enable links to edit pages at the bottom of the page. |
45 | | - */ |
46 | | - editLinks?: boolean |
47 | | - |
48 | | - /** |
49 | | - * Custom text for edit link. Defaults to "Edit this page". |
50 | | - */ |
51 | | - editLinkText?: string |
52 | | - |
53 | | - /** |
54 | | - * Show last updated time at the bottom of the page. Defaults to `false`. |
55 | | - * If given a string, it will be displayed as a prefix (default value: |
56 | | - * "Last Updated"). |
57 | | - */ |
58 | | - lastUpdated?: string | boolean |
59 | | - |
60 | | - prevLinks?: boolean |
61 | | - nextLinks?: boolean |
62 | | - |
63 | | - locales?: Record<string, LocaleConfig & Omit<Config, 'locales'>> |
64 | | - |
65 | | - algolia?: AlgoliaSearchOptions |
66 | | - |
67 | | - carbonAds?: { |
68 | | - carbon: string |
69 | | - custom?: string |
70 | | - placement: string |
71 | | - } |
72 | | - } |
73 | | - |
74 | | - // navbar -------------------------------------------------------------------- |
75 | | - |
76 | | - export type NavItem = NavItemWithLink | NavItemWithChildren |
77 | | - |
78 | | - export interface NavItemBase { |
79 | | - text: string |
80 | | - target?: string |
81 | | - rel?: string |
82 | | - ariaLabel?: string |
83 | | - activeMatch?: string |
84 | | - } |
85 | | - |
86 | | - export interface NavItemWithLink extends NavItemBase { |
87 | | - link: string |
88 | | - } |
89 | | - |
90 | | - export interface NavItemWithChildren extends NavItemBase { |
91 | | - items: NavItemWithLink[] |
92 | | - } |
93 | | - |
94 | | - // sidebar ------------------------------------------------------------------- |
95 | | - |
96 | | - export type SideBarConfig = SideBarItem[] | 'auto' | false |
97 | | - |
98 | | - export interface MultiSideBarConfig { |
99 | | - [path: string]: SideBarConfig |
100 | | - } |
101 | | - |
102 | | - export type SideBarItem = SideBarLink | SideBarGroup |
103 | | - |
104 | | - export interface SideBarLink { |
105 | | - text: string |
106 | | - link: string |
107 | | - } |
108 | | - |
109 | | - export interface SideBarGroup { |
110 | | - text: string |
111 | | - link?: string |
112 | | - |
113 | | - /** |
114 | | - * @default false |
115 | | - */ |
116 | | - collapsable?: boolean |
117 | | - |
118 | | - children: SideBarItem[] |
119 | | - } |
120 | | - |
121 | | - // algolia ------------------------------------------------------------------ |
122 | | - // partially copied from @docsearch/react/dist/esm/DocSearch.d.ts |
123 | | - export interface AlgoliaSearchOptions { |
124 | | - appId?: string |
125 | | - apiKey: string |
126 | | - indexName: string |
127 | | - placeholder?: string |
128 | | - searchParameters?: any |
129 | | - disableUserPersonalization?: boolean |
130 | | - initialQuery?: string |
131 | | - } |
132 | | - |
133 | | - // locales ------------------------------------------------------------------- |
134 | | - |
135 | | - export interface LocaleConfig { |
136 | | - /** |
137 | | - * Text for the language dropdown. |
138 | | - */ |
139 | | - selectText?: string |
140 | | - |
141 | | - /** |
142 | | - * Label for this locale in the language dropdown. |
143 | | - */ |
144 | | - label?: string |
145 | | - } |
146 | | -} |
| 1 | +export { DefaultTheme } from '../shared' |
0 commit comments