@antv/dumi-theme-antv 0.5.3 → 0.5.4-beta.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.
- package/dist/builtins/Playground/index.js +1 -1
- package/dist/common/Link.js +78 -0
- package/dist/common/SEO.js +61 -0
- package/dist/hooks/useMenu.js +122 -0
- package/dist/layouts/DocLayout.js +6 -7
- package/dist/layouts/entry/API.js +1 -0
- package/dist/layouts/entry/Index.js +12 -25
- package/dist/layouts/entry/Manual.js +7 -5
- package/dist/pages/404.js +4 -5
- package/dist/pages/Example/index.js +6 -7
- package/dist/pages/Examples/index.js +6 -5
- package/dist/plugin/rehypeObservable.js +6 -3
- package/dist/slots/CodeEditor/index.js +1 -1
- package/dist/slots/CodeRunner/index.js +3 -3
- package/dist/slots/ManualContent/Main.js +90 -0
- package/dist/slots/ManualContent/Sidebar.js +77 -0
- package/dist/slots/ManualContent/index.js +8 -305
- package/dist/slots/ManualContent/index.module.less +63 -29
- package/dist/slots/ManualContent/utils.js +19 -15
- package/dist/slots/utils.js +7 -0
- package/dist/utils/menu.js +46 -0
- package/package.json +47 -43
- package/dist/builtins/Playground/index.d.ts +0 -21
- package/dist/context.d.ts +0 -6
- package/dist/layouts/DocLayout.d.ts +0 -7
- package/dist/layouts/entry/API.d.ts +0 -10
- package/dist/layouts/entry/Index.d.ts +0 -6
- package/dist/layouts/entry/Manual.d.ts +0 -8
- package/dist/model/index.d.ts +0 -5
- package/dist/pages/404.d.ts +0 -5
- package/dist/pages/Example/components/CollapsedIcon/index.d.ts +0 -8
- package/dist/pages/Example/index.d.ts +0 -6
- package/dist/pages/Example/utils.d.ts +0 -1
- package/dist/pages/Examples/components/Accouncement/index.d.ts +0 -6
- package/dist/pages/Examples/components/Article/index.d.ts +0 -2
- package/dist/pages/Examples/components/ExampleTopicMenu/components/LeftMenu/index.d.ts +0 -10
- package/dist/pages/Examples/components/ExampleTopicMenu/index.d.ts +0 -9
- package/dist/pages/Examples/components/GalleryPageContent/DemoCard/index.d.ts +0 -10
- package/dist/pages/Examples/components/GalleryPageContent/index.d.ts +0 -10
- package/dist/pages/Examples/index.d.ts +0 -7
- package/dist/pages/Examples/types.d.ts +0 -34
- package/dist/pages/Examples/utils.d.ts +0 -1
- package/dist/plugin/api.d.ts +0 -7
- package/dist/plugin/examples.d.ts +0 -21
- package/dist/plugin/index.d.ts +0 -3
- package/dist/plugin/rehypeObservable.d.ts +0 -1
- package/dist/slots/404.d.ts +0 -1
- package/dist/slots/API/index.d.ts +0 -14
- package/dist/slots/Article/index.d.ts +0 -3
- package/dist/slots/Banner/Notification.d.ts +0 -10
- package/dist/slots/Banner/index.d.ts +0 -26
- package/dist/slots/Cases/index.d.ts +0 -19
- package/dist/slots/CodeEditor/Toolbar.d.ts +0 -72
- package/dist/slots/CodeEditor/index.d.ts +0 -62
- package/dist/slots/CodeEditor/utils.d.ts +0 -42
- package/dist/slots/CodePreview/CodeHeader.d.ts +0 -19
- package/dist/slots/CodePreview/index.d.ts +0 -25
- package/dist/slots/CodeRunner/index.d.ts +0 -17
- package/dist/slots/CodeRunner/utils.d.ts +0 -11
- package/dist/slots/Companies/index.d.ts +0 -13
- package/dist/slots/ContentTable/index.d.ts +0 -6
- package/dist/slots/Detail/News.d.ts +0 -12
- package/dist/slots/Detail/index.d.ts +0 -30
- package/dist/slots/ExampleSider/index.d.ts +0 -21
- package/dist/slots/Features/FeatureCard.d.ts +0 -9
- package/dist/slots/Features/index.d.ts +0 -15
- package/dist/slots/Footer/index.d.ts +0 -18
- package/dist/slots/Header/Navs.d.ts +0 -27
- package/dist/slots/Header/Products/NavigatorBanner.d.ts +0 -10
- package/dist/slots/Header/Products/Product.d.ts +0 -14
- package/dist/slots/Header/Products/getProducts.d.ts +0 -48
- package/dist/slots/Header/Products/index.d.ts +0 -10
- package/dist/slots/Header/Search/SearchResult.d.ts +0 -21
- package/dist/slots/Header/Search/helper.d.ts +0 -8
- package/dist/slots/Header/Search/index.d.ts +0 -1
- package/dist/slots/Header/index.d.ts +0 -84
- package/dist/slots/Header/utils.d.ts +0 -10
- package/dist/slots/Loading/index.d.ts +0 -5
- package/dist/slots/ManualContent/NavigatorBanner.d.ts +0 -9
- package/dist/slots/ManualContent/Preview.d.ts +0 -7
- package/dist/slots/ManualContent/ReadingTime.d.ts +0 -3
- package/dist/slots/ManualContent/index.d.ts +0 -9
- package/dist/slots/ManualContent/usePreview.d.ts +0 -1
- package/dist/slots/ManualContent/utils.d.ts +0 -19
- package/dist/slots/SEO.d.ts +0 -10
- package/dist/slots/SEO.js +0 -57
- package/dist/slots/global.d.ts +0 -1
- package/dist/slots/hooks.d.ts +0 -16
- package/dist/slots/utils.d.ts +0 -5
- package/dist/types.d.ts +0 -86
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare type CodeEditorProps = {
|
|
3
|
-
/**
|
|
4
|
-
* 标题
|
|
5
|
-
*/
|
|
6
|
-
title?: string;
|
|
7
|
-
/**
|
|
8
|
-
* 示例的 id
|
|
9
|
-
*/
|
|
10
|
-
exampleId: string;
|
|
11
|
-
/**
|
|
12
|
-
* 输入的源码
|
|
13
|
-
*/
|
|
14
|
-
source: string;
|
|
15
|
-
/**
|
|
16
|
-
* 相对地址
|
|
17
|
-
*/
|
|
18
|
-
relativePath?: string;
|
|
19
|
-
/**
|
|
20
|
-
* 是否全屏状态
|
|
21
|
-
*/
|
|
22
|
-
isFullscreen?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* 在一个文档中有多个 DEMO 的时候,需要有不同的 dom id
|
|
25
|
-
*/
|
|
26
|
-
replaceId?: string;
|
|
27
|
-
/**
|
|
28
|
-
* 点击全屏按钮
|
|
29
|
-
*/
|
|
30
|
-
onFullscreen: (isFullScreen: boolean) => void;
|
|
31
|
-
/**
|
|
32
|
-
* 初始化
|
|
33
|
-
*/
|
|
34
|
-
onReady: () => void;
|
|
35
|
-
/**
|
|
36
|
-
* 销毁
|
|
37
|
-
*/
|
|
38
|
-
onDestroy: () => void;
|
|
39
|
-
/**
|
|
40
|
-
* 执行出错的时候,回调,方便上层做显示
|
|
41
|
-
*/
|
|
42
|
-
onError: (e: any) => void;
|
|
43
|
-
/**
|
|
44
|
-
* playground 的一些配置
|
|
45
|
-
*/
|
|
46
|
-
playground: {
|
|
47
|
-
container?: string;
|
|
48
|
-
playgroundDidMount?: string;
|
|
49
|
-
playgroundWillUnmount?: string;
|
|
50
|
-
dependencies?: {
|
|
51
|
-
[key: string]: string;
|
|
52
|
-
};
|
|
53
|
-
devDependencies?: {
|
|
54
|
-
[key: string]: string;
|
|
55
|
-
};
|
|
56
|
-
htmlCodeTemplate?: string;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* 代码编辑器
|
|
61
|
-
*/
|
|
62
|
-
export declare const CodeEditor: React.FC<CodeEditorProps>;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export declare function replaceFetchUrl(sourceCode: string): string;
|
|
2
|
-
/**
|
|
3
|
-
* 通过代码提取代码片段的 pkg 依赖
|
|
4
|
-
* @param sourceCode
|
|
5
|
-
*/
|
|
6
|
-
export declare function extractImportDeps(sourceCode: string): any;
|
|
7
|
-
export declare function getCodeSandboxConfig(title: string, sourceCode: string, fileExtension: string, deps: any, devDependencies: any, playground: any): {
|
|
8
|
-
files: {
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export declare function getRiddleConfig(title: string, sourceCode: string, fileExtension: string, deps: any, devDependencies: any, playground: any): {
|
|
13
|
-
title: string;
|
|
14
|
-
js: string;
|
|
15
|
-
html: any;
|
|
16
|
-
json: string;
|
|
17
|
-
};
|
|
18
|
-
export declare function getStackblitzConfig(title: string, sourceCode: string, fileExtension: string, deps: any, devDependencies: any, playground: any): {
|
|
19
|
-
title: string;
|
|
20
|
-
description: string;
|
|
21
|
-
template: any;
|
|
22
|
-
dependencies: any;
|
|
23
|
-
files: {
|
|
24
|
-
[x: string]: any;
|
|
25
|
-
'index.html': any;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
export declare function getHtmlCodeTemplate(title: string, sourceCode: string, fileExtension: string, deps: any, devDependencies: any, playground: any): any;
|
|
29
|
-
export declare function replaceInsertCss(str: string, lang: string): string;
|
|
30
|
-
/**
|
|
31
|
-
* 执行代码
|
|
32
|
-
* @param code 运行的代码
|
|
33
|
-
* @param playgroundScriptContainer 运行的节点
|
|
34
|
-
* @param container 代码中 container dom
|
|
35
|
-
* @param replaceId rid
|
|
36
|
-
* @param cb 回调错误
|
|
37
|
-
*/
|
|
38
|
-
export declare function execute(code: string, playgroundScriptContainer: string, container: string, replaceId?: string): void;
|
|
39
|
-
/**
|
|
40
|
-
* 编译代码
|
|
41
|
-
*/
|
|
42
|
-
export declare function compile(value: string, relativePath: string, es5?: boolean): any;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare type CodeHeaderProps = {
|
|
3
|
-
/**
|
|
4
|
-
* 代码的标题
|
|
5
|
-
*/
|
|
6
|
-
title: string;
|
|
7
|
-
/**
|
|
8
|
-
* 代码的路径
|
|
9
|
-
*/
|
|
10
|
-
relativePath: string;
|
|
11
|
-
/**
|
|
12
|
-
* GitHub 的地址,用于拼接最后 GitHub 编辑地址
|
|
13
|
-
*/
|
|
14
|
-
githubUrl: string;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* 组件的 header
|
|
18
|
-
*/
|
|
19
|
-
export declare const CodeHeader: React.FC<any>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare type CodePreviewProps = {
|
|
3
|
-
/**
|
|
4
|
-
* 在文档中预览
|
|
5
|
-
*/
|
|
6
|
-
isPlayground: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* id
|
|
9
|
-
*/
|
|
10
|
-
exampleId: string;
|
|
11
|
-
/**
|
|
12
|
-
* 预览页面头部组件,用于显示 demo 名称,一些操作栏等
|
|
13
|
-
*/
|
|
14
|
-
header?: React.ReactElement;
|
|
15
|
-
/**
|
|
16
|
-
* 需要展示的错误信息
|
|
17
|
-
*/
|
|
18
|
-
error: any;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* DEMO 预览页面的预览,主要包含有:
|
|
22
|
-
* 1. 一些 header 菜单
|
|
23
|
-
* 2. 错误预览
|
|
24
|
-
*/
|
|
25
|
-
export declare const CodePreview: React.FC<CodePreviewProps>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ExampleTopic } from '../../types';
|
|
3
|
-
declare type CodeRunnerProps = {
|
|
4
|
-
isPlayground?: boolean;
|
|
5
|
-
topic: string;
|
|
6
|
-
example: string;
|
|
7
|
-
demo: string;
|
|
8
|
-
exampleTopics: ExampleTopic[];
|
|
9
|
-
size?: number;
|
|
10
|
-
replaceId?: string;
|
|
11
|
-
notFound?: React.ReactElement;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* 代码编辑器 + 代码预览区域
|
|
15
|
-
*/
|
|
16
|
-
export declare const CodeRunner: React.FC<CodeRunnerProps>;
|
|
17
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Demo, ExampleTopic } from '../../types';
|
|
2
|
-
/**
|
|
3
|
-
* 将数据结构转化成 map,便于后续检索的速度
|
|
4
|
-
* @param exampleTopics
|
|
5
|
-
* @returns
|
|
6
|
-
*/
|
|
7
|
-
export declare function getExampleTopicMap(exampleTopics: ExampleTopic[]): Map<string, Demo>;
|
|
8
|
-
/**
|
|
9
|
-
* 从 Context 信息中,获取到 Example 相关的信息,用于页面渲染
|
|
10
|
-
*/
|
|
11
|
-
export declare function getDemoInfo(exampleTopics: ExampleTopic[], topic: string, example: string, demo: string): Demo;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare type Company = {
|
|
3
|
-
name: string;
|
|
4
|
-
img: string;
|
|
5
|
-
};
|
|
6
|
-
interface CompaniesProps {
|
|
7
|
-
title: any;
|
|
8
|
-
companies: Company[];
|
|
9
|
-
className?: string;
|
|
10
|
-
style?: React.CSSProperties;
|
|
11
|
-
}
|
|
12
|
-
export declare const Companies: React.FC<CompaniesProps>;
|
|
13
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IC } from '../../types';
|
|
3
|
-
export interface NewsProps {
|
|
4
|
-
index?: number;
|
|
5
|
-
type: IC;
|
|
6
|
-
title: IC;
|
|
7
|
-
date: string;
|
|
8
|
-
link: string;
|
|
9
|
-
subTitle?: string;
|
|
10
|
-
img?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare const News: React.FC<NewsProps>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IC } from '../../types';
|
|
3
|
-
import { NewsProps } from './News';
|
|
4
|
-
declare type DetailButtonProps = {
|
|
5
|
-
text: IC;
|
|
6
|
-
link: string;
|
|
7
|
-
style?: React.CSSProperties;
|
|
8
|
-
type?: string;
|
|
9
|
-
shape?: 'round' | 'square';
|
|
10
|
-
icon?: string;
|
|
11
|
-
};
|
|
12
|
-
declare type DetailProps = {
|
|
13
|
-
className?: string;
|
|
14
|
-
style?: React.CSSProperties;
|
|
15
|
-
title: IC;
|
|
16
|
-
engine?: IC;
|
|
17
|
-
description: IC;
|
|
18
|
-
image?: string;
|
|
19
|
-
imageStyle?: React.CSSProperties;
|
|
20
|
-
buttons?: DetailButtonProps[];
|
|
21
|
-
githubUrl: string;
|
|
22
|
-
showGithubStars?: boolean;
|
|
23
|
-
news: NewsProps[];
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Index.技术栈的描述区域!
|
|
27
|
-
* 各自配置
|
|
28
|
-
*/
|
|
29
|
-
export declare const Detail: React.FC<DetailProps>;
|
|
30
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Demo, ExampleTopic } from '../../types';
|
|
3
|
-
export interface ExampleSiderProps {
|
|
4
|
-
/**
|
|
5
|
-
* 当前 Example (受控)
|
|
6
|
-
*/
|
|
7
|
-
currentDemo: Demo;
|
|
8
|
-
/**
|
|
9
|
-
* 当选中的 Demo 被改变时做些什么
|
|
10
|
-
*/
|
|
11
|
-
onDemoClicked: (demo: Demo) => void;
|
|
12
|
-
/**
|
|
13
|
-
* 所有的案例主题
|
|
14
|
-
*/
|
|
15
|
-
exampleTopics: ExampleTopic[];
|
|
16
|
-
showExampleDemoTitle: boolean;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* DEMO 预览页面的菜单
|
|
20
|
-
*/
|
|
21
|
-
export declare const ExampleSider: React.FC<ExampleSiderProps>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface Card {
|
|
3
|
-
icon: string;
|
|
4
|
-
title: string;
|
|
5
|
-
description: string;
|
|
6
|
-
}
|
|
7
|
-
interface FeaturesProps {
|
|
8
|
-
title?: string;
|
|
9
|
-
features: Card[];
|
|
10
|
-
className?: string;
|
|
11
|
-
style?: React.CSSProperties;
|
|
12
|
-
id?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare const Features: React.FC<FeaturesProps>;
|
|
15
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FooterProps as RcFooterProps } from 'rc-footer';
|
|
3
|
-
import 'rc-footer/assets/index.less';
|
|
4
|
-
interface FooterProps extends RcFooterProps {
|
|
5
|
-
rootDomain?: string;
|
|
6
|
-
language?: string;
|
|
7
|
-
githubUrl?: string;
|
|
8
|
-
/**
|
|
9
|
-
* 是否为动态 footer
|
|
10
|
-
*/
|
|
11
|
-
isDynamicFooter?: boolean;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* 底部菜单
|
|
15
|
-
* @returns
|
|
16
|
-
*/
|
|
17
|
-
export declare const Footer: React.FC<FooterProps>;
|
|
18
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare type dropdownItem = {
|
|
3
|
-
name: {
|
|
4
|
-
[key: string]: string;
|
|
5
|
-
};
|
|
6
|
-
url: string;
|
|
7
|
-
target?: '_blank';
|
|
8
|
-
};
|
|
9
|
-
export declare type INav = {
|
|
10
|
-
slug?: string;
|
|
11
|
-
order: number;
|
|
12
|
-
title: {
|
|
13
|
-
[key: string]: string;
|
|
14
|
-
};
|
|
15
|
-
target?: '_blank';
|
|
16
|
-
notPage?: boolean;
|
|
17
|
-
dropdownItems?: dropdownItem[];
|
|
18
|
-
};
|
|
19
|
-
export declare type NavProps = {
|
|
20
|
-
navs: INav[];
|
|
21
|
-
path: string;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Header 中的导航菜单
|
|
25
|
-
*/
|
|
26
|
-
export declare const Navs: React.FC<NavProps>;
|
|
27
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ProductType } from './getProducts';
|
|
3
|
-
interface ProductProps {
|
|
4
|
-
name?: string;
|
|
5
|
-
icon?: string;
|
|
6
|
-
slogan?: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
url?: string;
|
|
9
|
-
links: ProductType['links'];
|
|
10
|
-
style?: React.CSSProperties;
|
|
11
|
-
language?: string;
|
|
12
|
-
}
|
|
13
|
-
declare const Product: React.FC<ProductProps>;
|
|
14
|
-
export default Product;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare const Categories: ["basic", "extension", "ecology"];
|
|
3
|
-
export interface ProductCategory {
|
|
4
|
-
type: (typeof CATEGORY_TYPE)[number];
|
|
5
|
-
name: string;
|
|
6
|
-
products: ProductType[];
|
|
7
|
-
}
|
|
8
|
-
export interface ProductItem {
|
|
9
|
-
title: string;
|
|
10
|
-
icon?: React.ReactNode;
|
|
11
|
-
slogan?: string;
|
|
12
|
-
description: string;
|
|
13
|
-
category: typeof Categories[number];
|
|
14
|
-
links?: Array<{
|
|
15
|
-
icon?: React.ReactNode;
|
|
16
|
-
title: React.ReactNode;
|
|
17
|
-
url?: string;
|
|
18
|
-
openExternal?: boolean;
|
|
19
|
-
}>;
|
|
20
|
-
}
|
|
21
|
-
export declare type ValuesOf<T extends any[]> = T[number];
|
|
22
|
-
declare const CATEGORY_TYPE: ["basic", "extension", "mobile", "ecology"];
|
|
23
|
-
export declare const CATEGORIES: Array<ProductCategory>;
|
|
24
|
-
export declare type ProductType = {
|
|
25
|
-
links: {
|
|
26
|
-
/** 产品首页 */
|
|
27
|
-
readonly home?: {
|
|
28
|
-
url: string;
|
|
29
|
-
title?: string;
|
|
30
|
-
};
|
|
31
|
-
/** 图表示例 */
|
|
32
|
-
readonly example?: {
|
|
33
|
-
url: string;
|
|
34
|
-
title?: string;
|
|
35
|
-
};
|
|
36
|
-
/** 使用文档 */
|
|
37
|
-
readonly api?: {
|
|
38
|
-
url: string;
|
|
39
|
-
title?: string;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
[k: string]: any;
|
|
43
|
-
};
|
|
44
|
-
export declare function getNewProducts({ language, isChinaMirrorHost, }: {
|
|
45
|
-
language: 'zh' | 'en';
|
|
46
|
-
isChinaMirrorHost: boolean;
|
|
47
|
-
}): Promise<ProductType[]>;
|
|
48
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare type ITextSegment = {
|
|
3
|
-
text: string;
|
|
4
|
-
highlighted?: boolean;
|
|
5
|
-
};
|
|
6
|
-
export declare type ISearchResult = {
|
|
7
|
-
/**
|
|
8
|
-
* 搜索结果的主题,显示在最左边,一般是页面的标题。
|
|
9
|
-
*/
|
|
10
|
-
subject: string;
|
|
11
|
-
tilte: ITextSegment[];
|
|
12
|
-
description?: ITextSegment[];
|
|
13
|
-
link: string;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* 展示搜索结果
|
|
17
|
-
* @returns
|
|
18
|
-
*/
|
|
19
|
-
export declare const SearchResult: React.FC<{
|
|
20
|
-
results: ISearchResult[];
|
|
21
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Search: () => JSX.Element;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { INav } from './Navs';
|
|
3
|
-
import type { IC } from '../../types';
|
|
4
|
-
export declare type HeaderProps = {
|
|
5
|
-
pathPrefix?: string;
|
|
6
|
-
/** 子标题 */
|
|
7
|
-
subTitle?: React.ReactNode;
|
|
8
|
-
/** 子标题的链接 */
|
|
9
|
-
subTitleHref?: string;
|
|
10
|
-
/** 文档和演示的菜单数据 */
|
|
11
|
-
navs?: INav[];
|
|
12
|
-
/** 是否显示搜索框 */
|
|
13
|
-
showSearch?: boolean;
|
|
14
|
-
/** 是否显示 Github 图标 */
|
|
15
|
-
showGithubCorner?: boolean;
|
|
16
|
-
/** 是否显示 Github Star */
|
|
17
|
-
showGithubStar?: boolean;
|
|
18
|
-
/** 是否显示切换语言选项 */
|
|
19
|
-
showLanguageSwitcher?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* 国内镜像相关的信息
|
|
22
|
-
*/
|
|
23
|
-
internalSite?: {
|
|
24
|
-
url: string;
|
|
25
|
-
name: object;
|
|
26
|
-
};
|
|
27
|
-
/** 切换语言的回调 */
|
|
28
|
-
onLanguageChange?: (language: string) => void;
|
|
29
|
-
/** 是否二维码 */
|
|
30
|
-
showWxQrcode?: boolean;
|
|
31
|
-
/** 自定义 logo */
|
|
32
|
-
logo?: {
|
|
33
|
-
img?: React.ReactNode;
|
|
34
|
-
link?: string;
|
|
35
|
-
};
|
|
36
|
-
siteUrl?: string;
|
|
37
|
-
/** github 仓库地址 */
|
|
38
|
-
githubUrl?: string;
|
|
39
|
-
/** 默认语言 */
|
|
40
|
-
defaultLanguage?: 'zh' | 'en';
|
|
41
|
-
/** 自定义 Link */
|
|
42
|
-
Link?: React.ComponentType<any>;
|
|
43
|
-
/** 底色是否透明 */
|
|
44
|
-
transparent?: boolean;
|
|
45
|
-
/** 是否首页模式 */
|
|
46
|
-
isHomePage?: boolean;
|
|
47
|
-
/** 是否是AntV官网 */
|
|
48
|
-
isAntVSite?: boolean;
|
|
49
|
-
/** AntV root 域名,直接用主题的可不传 */
|
|
50
|
-
rootDomain?: string;
|
|
51
|
-
/** 是否显示 AntV 产品卡片 */
|
|
52
|
-
showAntVProductsCard?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* 当前版本
|
|
55
|
-
*/
|
|
56
|
-
version?: string;
|
|
57
|
-
/** 展示版本切换 */
|
|
58
|
-
versions?: {
|
|
59
|
-
[key: string]: string;
|
|
60
|
-
};
|
|
61
|
-
/** 展示周边生态 */
|
|
62
|
-
ecosystems?: Array<{
|
|
63
|
-
name: Record<string /** zh, en */, string>;
|
|
64
|
-
url: string;
|
|
65
|
-
}>;
|
|
66
|
-
/** 头部搜索框配置 */
|
|
67
|
-
searchOptions?: {
|
|
68
|
-
docsearchOptions: {
|
|
69
|
-
versionV3: boolean;
|
|
70
|
-
apiKey: string;
|
|
71
|
-
indexName: string;
|
|
72
|
-
appId: string;
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
announcement?: {
|
|
76
|
-
title: IC;
|
|
77
|
-
icon: string;
|
|
78
|
-
link: {
|
|
79
|
-
url: string;
|
|
80
|
-
text: IC;
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
export declare const Header: React.FC<Partial<HeaderProps>>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare function getLangUrl(url: string, lang: string): string;
|
|
2
|
-
/**
|
|
3
|
-
* /en/api/xxx -> api
|
|
4
|
-
* /api/xxx -> api
|
|
5
|
-
* /docs/api/xxx -> api
|
|
6
|
-
* api/xxx -> api
|
|
7
|
-
* @param url
|
|
8
|
-
*/
|
|
9
|
-
export declare function getNavCategory(url: string): string;
|
|
10
|
-
export declare function findVersion(v: string, versions: string[]): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function usePreview(options: {}, select: any): void;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare function getOpenKeys(): any[];
|
|
2
|
-
export declare function getBaseRoute(): string;
|
|
3
|
-
export declare function getIndexRoute(MenuData: any): any;
|
|
4
|
-
/**
|
|
5
|
-
* 返回需要跳转的 pathname
|
|
6
|
-
* /en/api/ ----> /en/api/[first-doc]
|
|
7
|
-
* /zh/api/ ----> /api/[first-doc]
|
|
8
|
-
* /en/docs/api/ ----> /en/api/[first-doc]
|
|
9
|
-
* /zh/docs/api/ ----> /api/[first-doc]
|
|
10
|
-
*
|
|
11
|
-
* /en/docs/api/xxx ----> /en/api/xxx
|
|
12
|
-
* /zh/docs/api/xxx ----> /api/xxx
|
|
13
|
-
*
|
|
14
|
-
* /docs/api/xxx -----> /api/xxx
|
|
15
|
-
*
|
|
16
|
-
* @param p
|
|
17
|
-
*/
|
|
18
|
-
export declare function getNavigateUrl(pathname: string, first: string, siderbarMenu: any[]): string;
|
|
19
|
-
export declare function safeEval(source: any): any;
|