1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import { ComponentType } from 'react';
export interface Heading {
depth: number;
slug: string;
value: string;
}
export interface Entry {
id: string;
filepath: string;
slug: string;
route: string;
name: string;
order: number;
menu: string | null;
headings: Heading[];
[key: string]: any;
}
export interface MenuItem {
id: string;
name: string;
route?: string;
href?: string;
menu?: MenuItem[];
order?: number;
parent?: string;
}
export declare type ThemeConfig = Record<string, any>;
export interface Config {
title: string;
description: string;
themeConfig: ThemeConfig;
menu: MenuItem[];
version: string | null;
repository: string | null;
native: boolean;
separator: string;
codeSandbox: boolean;
base?: string;
}
export declare type Entries = {
key: string;
value: Entry;
}[];
export declare type Props = {
key: string;
value: any;
}[];
export declare type TransformFn = (config: ThemeConfig) => ThemeConfig;
export interface Database {
config: Config;
props?: Props;
entries?: Entries;
}
export interface DoczState extends Database {
linkComponent: ComponentType<any>;
themeConfig?: ThemeConfig;
transform?: TransformFn;
}
export declare const doczState: import("./utils/createState").State<DoczState>;