@antv/dumi-theme-antv 0.5.2 → 0.5.4-beta.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.
Files changed (88) hide show
  1. package/dist/common/Link.js +78 -0
  2. package/dist/common/SEO.js +61 -0
  3. package/dist/hooks/useMenu.js +117 -0
  4. package/dist/layouts/DocLayout.js +6 -7
  5. package/dist/layouts/entry/API.js +1 -0
  6. package/dist/layouts/entry/Index.js +9 -22
  7. package/dist/layouts/entry/Manual.js +6 -4
  8. package/dist/locales/en.json +49 -1
  9. package/dist/locales/zh.json +48 -1
  10. package/dist/pages/404.js +1 -2
  11. package/dist/pages/Example/index.js +2 -3
  12. package/dist/pages/Examples/index.js +4 -3
  13. package/dist/slots/ManualContent/Main.js +90 -0
  14. package/dist/slots/ManualContent/Sidebar.js +77 -0
  15. package/dist/slots/ManualContent/index.js +8 -305
  16. package/dist/slots/ManualContent/index.module.less +63 -29
  17. package/dist/slots/ManualContent/utils.js +19 -15
  18. package/dist/slots/utils.js +7 -0
  19. package/dist/utils/menu.js +46 -0
  20. package/package.json +56 -56
  21. package/dist/builtins/Playground/index.d.ts +0 -21
  22. package/dist/context.d.ts +0 -6
  23. package/dist/layouts/DocLayout.d.ts +0 -8
  24. package/dist/layouts/entry/API.d.ts +0 -10
  25. package/dist/layouts/entry/Index.d.ts +0 -7
  26. package/dist/layouts/entry/Manual.d.ts +0 -8
  27. package/dist/model/index.d.ts +0 -5
  28. package/dist/pages/404.d.ts +0 -6
  29. package/dist/pages/Example/components/CollapsedIcon/index.d.ts +0 -8
  30. package/dist/pages/Example/index.d.ts +0 -6
  31. package/dist/pages/Example/utils.d.ts +0 -1
  32. package/dist/pages/Examples/components/Accouncement/index.d.ts +0 -6
  33. package/dist/pages/Examples/components/Article/index.d.ts +0 -2
  34. package/dist/pages/Examples/components/ExampleTopicMenu/components/LeftMenu/index.d.ts +0 -10
  35. package/dist/pages/Examples/components/ExampleTopicMenu/index.d.ts +0 -9
  36. package/dist/pages/Examples/components/GalleryPageContent/DemoCard/index.d.ts +0 -10
  37. package/dist/pages/Examples/components/GalleryPageContent/index.d.ts +0 -10
  38. package/dist/pages/Examples/index.d.ts +0 -8
  39. package/dist/pages/Examples/types.d.ts +0 -34
  40. package/dist/pages/Examples/utils.d.ts +0 -1
  41. package/dist/plugin/api.d.ts +0 -7
  42. package/dist/plugin/examples.d.ts +0 -21
  43. package/dist/plugin/index.d.ts +0 -3
  44. package/dist/plugin/rehypeObservable.d.ts +0 -1
  45. package/dist/slots/404.d.ts +0 -2
  46. package/dist/slots/API/index.d.ts +0 -15
  47. package/dist/slots/Article/index.d.ts +0 -3
  48. package/dist/slots/Banner/Notification.d.ts +0 -10
  49. package/dist/slots/Banner/index.d.ts +0 -26
  50. package/dist/slots/Cases/index.d.ts +0 -19
  51. package/dist/slots/CodeEditor/Toolbar.d.ts +0 -72
  52. package/dist/slots/CodeEditor/index.d.ts +0 -62
  53. package/dist/slots/CodeEditor/utils.d.ts +0 -42
  54. package/dist/slots/CodePreview/CodeHeader.d.ts +0 -19
  55. package/dist/slots/CodePreview/index.d.ts +0 -25
  56. package/dist/slots/CodeRunner/index.d.ts +0 -17
  57. package/dist/slots/CodeRunner/utils.d.ts +0 -11
  58. package/dist/slots/Companies/index.d.ts +0 -13
  59. package/dist/slots/ContentTable/index.d.ts +0 -6
  60. package/dist/slots/Detail/News.d.ts +0 -12
  61. package/dist/slots/Detail/index.d.ts +0 -30
  62. package/dist/slots/ExampleSider/index.d.ts +0 -21
  63. package/dist/slots/Features/FeatureCard.d.ts +0 -9
  64. package/dist/slots/Features/index.d.ts +0 -15
  65. package/dist/slots/Footer/index.d.ts +0 -18
  66. package/dist/slots/Header/Navs.d.ts +0 -27
  67. package/dist/slots/Header/Products/NavigatorBanner.d.ts +0 -10
  68. package/dist/slots/Header/Products/Product.d.ts +0 -14
  69. package/dist/slots/Header/Products/getProducts.d.ts +0 -48
  70. package/dist/slots/Header/Products/index.d.ts +0 -10
  71. package/dist/slots/Header/Search/SearchResult.d.ts +0 -21
  72. package/dist/slots/Header/Search/helper.d.ts +0 -8
  73. package/dist/slots/Header/Search/index.d.ts +0 -2
  74. package/dist/slots/Header/index.d.ts +0 -84
  75. package/dist/slots/Header/utils.d.ts +0 -10
  76. package/dist/slots/Loading/index.d.ts +0 -6
  77. package/dist/slots/ManualContent/NavigatorBanner.d.ts +0 -9
  78. package/dist/slots/ManualContent/Preview.d.ts +0 -7
  79. package/dist/slots/ManualContent/ReadingTime.d.ts +0 -3
  80. package/dist/slots/ManualContent/index.d.ts +0 -9
  81. package/dist/slots/ManualContent/usePreview.d.ts +0 -1
  82. package/dist/slots/ManualContent/utils.d.ts +0 -19
  83. package/dist/slots/SEO.d.ts +0 -10
  84. package/dist/slots/SEO.js +0 -57
  85. package/dist/slots/global.d.ts +0 -1
  86. package/dist/slots/hooks.d.ts +0 -16
  87. package/dist/slots/utils.d.ts +0 -5
  88. package/dist/types.d.ts +0 -86
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { GalleryPageContentProps } from '../../types';
3
- /**
4
- * Examples 首页内容预览组件
5
- *
6
- * @param {GalleryPageContentProps} props 相关参数,详见类型定义
7
- * @returns {React.FC} React.FC
8
- * @author YuZhanglong <loveyzl1123@gmail.com>
9
- */
10
- export declare const GalleryPageContent: React.FC<GalleryPageContentProps>;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- /**
3
- * Examples 页面
4
- *
5
- * @author YuZhanglong <loveyzl1123@gmail.com>
6
- */
7
- declare const Example: () => React.JSX.Element;
8
- export default Example;
@@ -1,34 +0,0 @@
1
- import React from 'react';
2
- import { ExampleTopic, Example, Demo } from '../../types';
3
- export interface AnnouncementProps {
4
- message: React.ReactNode;
5
- localStorageId: string;
6
- bannerId: string;
7
- style?: React.CSSProperties;
8
- }
9
- export interface GalleryPageContentProps {
10
- /**
11
- * 案例主题列表
12
- */
13
- exampleTopics: ExampleTopic[];
14
- }
15
- export interface LeftMenuProps {
16
- /**
17
- * 案例主题列表
18
- */
19
- exampleTopics: ExampleTopic[];
20
- }
21
- export interface ExampleWithTopic extends Example {
22
- targetTopic: ExampleTopic;
23
- }
24
- export interface DemoCardProps {
25
- demo: Demo;
26
- topicId: string;
27
- exampleId: string;
28
- }
29
- export interface LeftMenuProps {
30
- /**
31
- * 案例主题列表
32
- */
33
- exampleTopics: ExampleTopic[];
34
- }
@@ -1 +0,0 @@
1
- export declare function getCategoryId(topicId: any, exampleId: any): string;
@@ -1,7 +0,0 @@
1
- /**
2
- * 获取API
3
- *
4
- * @param {string} apiPath API路径
5
- * @returns {string} 文件内容
6
- */
7
- export declare const getExampleAPI: (apiPath: string) => string;
@@ -1,21 +0,0 @@
1
- import { Example, ExampleTopic } from '../types';
2
- /**
3
- * 获取案例页面的所有主题
4
- *
5
- * @returns {ExampleTopic[]} 案例主题列表
6
- * @author YuZhanglong <loveyzl1123@gmail.com>
7
- */
8
- export declare const getExamplesPageTopics: (exampleTopics: ExampleTopic[], showAPIDoc: boolean) => {
9
- id: string;
10
- title: {
11
- zh: string;
12
- en: string;
13
- };
14
- icon: string;
15
- examples: Example[];
16
- childrenKey: string;
17
- }[];
18
- /**
19
- * 根据目录结构返回,所有的 example 页面,用于 buiild static
20
- */
21
- export declare function getExamplePaths(): string[];
@@ -1,3 +0,0 @@
1
- import type { IApi } from 'dumi';
2
- declare const _default: (api: IApi) => void;
3
- export default _default;
@@ -1 +0,0 @@
1
- export default function rehypeObservable(): (tree: any) => Promise<void>;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const NotFound: () => React.JSX.Element;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import { ExampleTopic } from '../../types';
3
- type APIProps = {
4
- isPlayground?: boolean;
5
- topic: string;
6
- example: string;
7
- demo: string;
8
- exampleTopics: ExampleTopic[];
9
- language?: string;
10
- };
11
- /**
12
- * API 预览
13
- */
14
- export declare const API: ({ exampleTopics, topic, example, demo, language, }: APIProps) => React.JSX.Element;
15
- export {};
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const Article: React.FC<any>;
3
- export default Article;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- export interface NotificationProps {
3
- index?: number;
4
- type: string;
5
- title: string;
6
- date: string;
7
- link: string;
8
- }
9
- declare const Notification: React.FC<NotificationProps>;
10
- export default Notification;
@@ -1,26 +0,0 @@
1
- import React from 'react';
2
- import { NotificationProps } from './Notification';
3
- import 'video-react/dist/video-react.css';
4
- type BannerButtonShape = 'round' | 'square';
5
- interface BannerButton {
6
- text: string;
7
- link: string;
8
- style?: React.CSSProperties;
9
- type?: string;
10
- shape?: BannerButtonShape;
11
- }
12
- interface BannerProps {
13
- coverImage?: React.ReactNode;
14
- title: string;
15
- description: string;
16
- notifications?: NotificationProps[];
17
- style?: React.CSSProperties;
18
- className?: string;
19
- video?: string;
20
- showGithubStars?: boolean;
21
- buttons?: BannerButton[];
22
- onCloseVideo?: () => void;
23
- onPlayVideo?: () => void;
24
- }
25
- declare const Banner: React.FC<BannerProps>;
26
- export default Banner;
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import { IC } from '../../types';
3
- import 'slick-carousel/slick/slick.css';
4
- import 'slick-carousel/slick/slick-theme.css';
5
- interface Case {
6
- logo?: string;
7
- isAppLogo?: boolean;
8
- title: IC;
9
- description: IC;
10
- link?: string;
11
- image: string;
12
- }
13
- interface CasesProps {
14
- cases: Case[];
15
- style?: React.CSSProperties;
16
- className?: string;
17
- }
18
- export declare const Cases: React.FC<CasesProps>;
19
- export {};
@@ -1,72 +0,0 @@
1
- import React, { ReactElement } from 'react';
2
- export declare enum EDITOR_TABS {
3
- JAVASCRIPT = "JavaScript",
4
- SPEC = "Spec",
5
- DATA = "Data"
6
- }
7
- type ToolbarProps = {
8
- /**
9
- * 源码文件,用于传入到三方代码平台
10
- */
11
- sourceCode: string;
12
- /**
13
- * 生成代码文件名后缀,用于传入到三方代码平台
14
- */
15
- fileExtension: string;
16
- /**
17
- * 项目标题,用于传入到三方代码平台
18
- */
19
- title: {
20
- zh?: string;
21
- en?: string;
22
- } | string;
23
- location?: Location;
24
- /**
25
- * playground 的一些配置项
26
- */
27
- playground: {
28
- container?: string;
29
- playgroundDidMount?: string;
30
- playgroundWillUnmount?: string;
31
- dependencies?: {
32
- [key: string]: string;
33
- };
34
- devDependencies?: {
35
- [key: string]: string;
36
- };
37
- htmlCodeTemplate?: string;
38
- json?: {
39
- [key: string]: any;
40
- };
41
- };
42
- /**
43
- * 全屏状态,用于显示不同的 icon
44
- */
45
- isFullScreen?: boolean;
46
- /**
47
- * Tabs 数据
48
- */
49
- editorTabs: EDITOR_TABS[];
50
- /**
51
- * 当前编辑哪个 tab
52
- */
53
- currentEditorTab: EDITOR_TABS;
54
- /**
55
- * 切换 tab
56
- */
57
- onEditorTabChange: (tab: EDITOR_TABS) => void;
58
- /**
59
- * 进入/退出全屏
60
- */
61
- onToggleFullscreen?: null | (() => void);
62
- /**
63
- * 执行代码
64
- */
65
- onExecuteCode: () => void;
66
- /**
67
- * Tab 的附加内容
68
- */
69
- slots: Record<string, ReactElement>;
70
- };
71
- export declare const Toolbar: React.FC<ToolbarProps>;
72
- export {};
@@ -1,62 +0,0 @@
1
- import React from 'react';
2
- export 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 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 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
- 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
- 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,6 +0,0 @@
1
- import React from 'react';
2
- import './index.module.less';
3
- /**
4
- * 文档右侧的指示器(table of content)
5
- */
6
- export declare const ContentTable: React.FC;
@@ -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
- type DetailButtonProps = {
5
- text: IC;
6
- link: string;
7
- style?: React.CSSProperties;
8
- type?: string;
9
- shape?: 'round' | 'square';
10
- icon?: string;
11
- };
12
- 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,9 +0,0 @@
1
- import React from 'react';
2
- import { IC } from '../../types';
3
- interface FeatureProps {
4
- icon: string;
5
- title: IC;
6
- description: string;
7
- }
8
- declare const FeatureCard: React.FC<FeatureProps>;
9
- export default FeatureCard;
@@ -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
- type dropdownItem = {
3
- name: {
4
- [key: string]: string;
5
- };
6
- url: string;
7
- target?: '_blank';
8
- };
9
- export 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 type NavProps = {
20
- navs: INav[];
21
- path: string;
22
- };
23
- /**
24
- * Header 中的导航菜单
25
- */
26
- export declare const Navs: React.FC<NavProps>;
27
- export {};
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- export interface NavigatorBannerProps {
3
- post?: {
4
- slug?: string;
5
- title?: string;
6
- };
7
- type: 'prev' | 'next';
8
- }
9
- declare const NavigatorBanner: React.FC<NavigatorBannerProps>;
10
- export default NavigatorBanner;
@@ -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 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 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 {};