@elastic/eui-docusaurus-theme 2.0.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.
- package/LICENSE.txt +6 -0
- package/README.md +292 -0
- package/lib/.tsbuildinfo-client +1 -0
- package/lib/components/badge/index.d.ts +1 -0
- package/lib/components/badge/index.js +9 -0
- package/lib/components/codesandbox_icon/codesandbox_icon.d.ts +4 -0
- package/lib/components/codesandbox_icon/codesandbox_icon.js +2 -0
- package/lib/components/codesandbox_icon/index.d.ts +1 -0
- package/lib/components/codesandbox_icon/index.js +8 -0
- package/lib/components/demo/actions_bar/actions_bar.d.ts +10 -0
- package/lib/components/demo/actions_bar/actions_bar.js +34 -0
- package/lib/components/demo/actions_bar/index.d.ts +1 -0
- package/lib/components/demo/actions_bar/index.js +8 -0
- package/lib/components/demo/code_transformer.d.ts +18 -0
- package/lib/components/demo/code_transformer.js +39 -0
- package/lib/components/demo/codesandbox/find_external_dependencies.d.ts +5 -0
- package/lib/components/demo/codesandbox/find_external_dependencies.js +30 -0
- package/lib/components/demo/codesandbox/index.d.ts +1 -0
- package/lib/components/demo/codesandbox/index.js +8 -0
- package/lib/components/demo/codesandbox/open_action.d.ts +16 -0
- package/lib/components/demo/codesandbox/open_action.js +91 -0
- package/lib/components/demo/context.d.ts +14 -0
- package/lib/components/demo/context.js +13 -0
- package/lib/components/demo/create_demo.d.ts +5 -0
- package/lib/components/demo/create_demo.js +13 -0
- package/lib/components/demo/demo.d.ts +23 -0
- package/lib/components/demo/demo.js +61 -0
- package/lib/components/demo/editor/editor.d.ts +1 -0
- package/lib/components/demo/editor/editor.js +39 -0
- package/lib/components/demo/editor/index.d.ts +1 -0
- package/lib/components/demo/editor/index.js +8 -0
- package/lib/components/demo/index.d.ts +3 -0
- package/lib/components/demo/index.js +10 -0
- package/lib/components/demo/preview/index.d.ts +1 -0
- package/lib/components/demo/preview/index.js +8 -0
- package/lib/components/demo/preview/preview.d.ts +7 -0
- package/lib/components/demo/preview/preview.js +36 -0
- package/lib/components/demo/scope.d.ts +1 -0
- package/lib/components/demo/scope.js +12 -0
- package/lib/components/demo/source/get_source_from_children.d.ts +11 -0
- package/lib/components/demo/source/get_source_from_children.js +42 -0
- package/lib/components/demo/source/index.d.ts +1 -0
- package/lib/components/demo/source/index.js +8 -0
- package/lib/components/demo/source/source.d.ts +6 -0
- package/lib/components/demo/source/source.js +25 -0
- package/lib/components/figma_embed/index.d.ts +5 -0
- package/lib/components/figma_embed/index.js +36 -0
- package/lib/components/guideline/guideline.d.ts +10 -0
- package/lib/components/guideline/guideline.js +68 -0
- package/lib/components/guideline/guideline_text.d.ts +6 -0
- package/lib/components/guideline/guideline_text.js +28 -0
- package/lib/components/guideline/index.d.ts +2 -0
- package/lib/components/guideline/index.js +9 -0
- package/lib/components/guideline/types.d.ts +1 -0
- package/lib/components/guideline/types.js +8 -0
- package/lib/components/high_contrast_mode_toggle/index.d.ts +1 -0
- package/lib/components/high_contrast_mode_toggle/index.js +15 -0
- package/lib/components/icon/index.d.ts +1 -0
- package/lib/components/icon/index.js +9 -0
- package/lib/components/index.d.ts +7 -0
- package/lib/components/index.js +14 -0
- package/lib/components/navbar_item/index.d.ts +19 -0
- package/lib/components/navbar_item/index.js +84 -0
- package/lib/components/prop_table/definition_types.d.ts +43 -0
- package/lib/components/prop_table/definition_types.js +8 -0
- package/lib/components/prop_table/extended_types.d.ts +5 -0
- package/lib/components/prop_table/extended_types.js +27 -0
- package/lib/components/prop_table/extended_types_info.d.ts +26 -0
- package/lib/components/prop_table/extended_types_info.js +34 -0
- package/lib/components/prop_table/index.d.ts +1 -0
- package/lib/components/prop_table/index.js +8 -0
- package/lib/components/prop_table/prop_table.d.ts +8 -0
- package/lib/components/prop_table/prop_table.js +115 -0
- package/lib/components/theme_context/index.d.ts +16 -0
- package/lib/components/theme_context/index.js +103 -0
- package/lib/components/theme_context/theme_overrides.d.ts +2 -0
- package/lib/components/theme_context/theme_overrides.js +12 -0
- package/lib/components/version_switcher/index.d.ts +23 -0
- package/lib/components/version_switcher/index.js +51 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +19 -0
- package/lib/index.js.map +1 -0
- package/lib/theme/Admonition/Types.d.ts +3 -0
- package/lib/theme/Admonition/Types.js +51 -0
- package/lib/theme/CodeBlock/index.d.ts +3 -0
- package/lib/theme/CodeBlock/index.js +35 -0
- package/lib/theme/ColorModeToggle/index.d.ts +10 -0
- package/lib/theme/ColorModeToggle/index.js +51 -0
- package/lib/theme/Demo/actions.d.ts +8 -0
- package/lib/theme/Demo/actions.js +8 -0
- package/lib/theme/Demo/default_scope.d.ts +3 -0
- package/lib/theme/Demo/default_scope.js +17 -0
- package/lib/theme/DocBreadcrumbs/Items/Home/index.d.ts +2 -0
- package/lib/theme/DocBreadcrumbs/Items/Home/index.js +15 -0
- package/lib/theme/DocBreadcrumbs/Items/item.styles.d.ts +5 -0
- package/lib/theme/DocBreadcrumbs/Items/item.styles.js +40 -0
- package/lib/theme/DocBreadcrumbs/index.d.ts +2 -0
- package/lib/theme/DocBreadcrumbs/index.js +63 -0
- package/lib/theme/DocItem/Content/index.d.ts +3 -0
- package/lib/theme/DocItem/Content/index.js +44 -0
- package/lib/theme/DocItem/Footer/index.d.ts +2 -0
- package/lib/theme/DocItem/Footer/index.js +17 -0
- package/lib/theme/DocItem/Layout/index.d.ts +3 -0
- package/lib/theme/DocItem/Layout/index.js +71 -0
- package/lib/theme/DocItem/Metadata/index.d.ts +2 -0
- package/lib/theme/DocItem/Metadata/index.js +7 -0
- package/lib/theme/DocItem/Paginator/index.d.ts +6 -0
- package/lib/theme/DocItem/Paginator/index.js +11 -0
- package/lib/theme/DocItem/TOC/Desktop/index.d.ts +2 -0
- package/lib/theme/DocItem/TOC/Desktop/index.js +8 -0
- package/lib/theme/DocItem/TOC/Mobile/index.d.ts +2 -0
- package/lib/theme/DocItem/TOC/Mobile/index.js +17 -0
- package/lib/theme/DocItem/index.d.ts +3 -0
- package/lib/theme/DocItem/index.js +10 -0
- package/lib/theme/DocPaginator/index.d.ts +3 -0
- package/lib/theme/DocPaginator/index.js +19 -0
- package/lib/theme/DocRoot/Layout/Main/index.d.ts +3 -0
- package/lib/theme/DocRoot/Layout/Main/index.js +35 -0
- package/lib/theme/DocRoot/Layout/Sidebar/index.d.ts +3 -0
- package/lib/theme/DocRoot/Layout/Sidebar/index.js +81 -0
- package/lib/theme/DocRoot/Layout/index.d.ts +3 -0
- package/lib/theme/DocRoot/Layout/index.js +47 -0
- package/lib/theme/DocSidebarItem/Category/index.d.ts +3 -0
- package/lib/theme/DocSidebarItem/Category/index.js +146 -0
- package/lib/theme/DocSidebarItem/Link/index.d.ts +3 -0
- package/lib/theme/DocSidebarItem/Link/index.js +39 -0
- package/lib/theme/DocSidebarItem/index.d.ts +3 -0
- package/lib/theme/DocSidebarItem/index.js +15 -0
- package/lib/theme/DocSidebarItems/index.d.ts +5 -0
- package/lib/theme/DocSidebarItems/index.js +17 -0
- package/lib/theme/EditThisPage/index.d.ts +3 -0
- package/lib/theme/EditThisPage/index.js +17 -0
- package/lib/theme/Footer/index.d.ts +2 -0
- package/lib/theme/Footer/index.js +43 -0
- package/lib/theme/Heading/index.d.ts +3 -0
- package/lib/theme/Heading/index.js +49 -0
- package/lib/theme/Logo/index.d.ts +3 -0
- package/lib/theme/Logo/index.js +80 -0
- package/lib/theme/MDXComponents/A.d.ts +6 -0
- package/lib/theme/MDXComponents/A.js +17 -0
- package/lib/theme/MDXComponents/Blockquote.d.ts +2 -0
- package/lib/theme/MDXComponents/Blockquote.js +18 -0
- package/lib/theme/MDXComponents/Code.d.ts +6 -0
- package/lib/theme/MDXComponents/Code.js +35 -0
- package/lib/theme/MDXComponents/Heading.d.ts +4 -0
- package/lib/theme/MDXComponents/Heading.js +4 -0
- package/lib/theme/MDXComponents/ListItem.d.ts +2 -0
- package/lib/theme/MDXComponents/ListItem.js +5 -0
- package/lib/theme/MDXComponents/OrderedList.d.ts +2 -0
- package/lib/theme/MDXComponents/OrderedList.js +11 -0
- package/lib/theme/MDXComponents/Paragraph.d.ts +2 -0
- package/lib/theme/MDXComponents/Paragraph.js +18 -0
- package/lib/theme/MDXComponents/Table.d.ts +2 -0
- package/lib/theme/MDXComponents/Table.js +3 -0
- package/lib/theme/MDXComponents/TableBody.d.ts +2 -0
- package/lib/theme/MDXComponents/TableBody.js +3 -0
- package/lib/theme/MDXComponents/TableDataCell.d.ts +2 -0
- package/lib/theme/MDXComponents/TableDataCell.js +3 -0
- package/lib/theme/MDXComponents/TableHeader.d.ts +2 -0
- package/lib/theme/MDXComponents/TableHeader.js +3 -0
- package/lib/theme/MDXComponents/TableHeaderCell.d.ts +2 -0
- package/lib/theme/MDXComponents/TableHeaderCell.js +3 -0
- package/lib/theme/MDXComponents/TableRow.d.ts +2 -0
- package/lib/theme/MDXComponents/TableRow.js +3 -0
- package/lib/theme/MDXComponents/UnorderedList.d.ts +2 -0
- package/lib/theme/MDXComponents/UnorderedList.js +11 -0
- package/lib/theme/MDXComponents/index.d.ts +2 -0
- package/lib/theme/MDXComponents/index.js +46 -0
- package/lib/theme/MDXContent/index.d.ts +6 -0
- package/lib/theme/MDXContent/index.js +4 -0
- package/lib/theme/Navbar/Content/index.d.ts +7 -0
- package/lib/theme/Navbar/Content/index.js +149 -0
- package/lib/theme/Navbar/Layout/index.d.ts +6 -0
- package/lib/theme/Navbar/Layout/index.js +59 -0
- package/lib/theme/Navbar/MobileSidebar/Header/index.d.ts +7 -0
- package/lib/theme/Navbar/MobileSidebar/Header/index.js +46 -0
- package/lib/theme/Navbar/MobileSidebar/Layout/index.d.ts +6 -0
- package/lib/theme/Navbar/MobileSidebar/Layout/index.js +26 -0
- package/lib/theme/Navbar/MobileSidebar/index.d.ts +7 -0
- package/lib/theme/Navbar/MobileSidebar/index.js +14 -0
- package/lib/theme/NavbarItem/DropdownNavbarItem/index.d.ts +3 -0
- package/lib/theme/NavbarItem/DropdownNavbarItem/index.js +94 -0
- package/lib/theme/NavbarItem/NavbarNavLink.d.ts +7 -0
- package/lib/theme/NavbarItem/NavbarNavLink.js +48 -0
- package/lib/theme/PaginatorNavLink/index.d.ts +3 -0
- package/lib/theme/PaginatorNavLink/index.js +43 -0
- package/lib/theme/Root.d.ts +3 -0
- package/lib/theme/Root.js +66 -0
- package/lib/theme/Root.styles.d.ts +2 -0
- package/lib/theme/Root.styles.js +111 -0
- package/lib/theme/TOCCollapsible/CollapseButton/index.d.ts +3 -0
- package/lib/theme/TOCCollapsible/CollapseButton/index.js +23 -0
- package/lib/theme/TOCItems/Tree.d.ts +5 -0
- package/lib/theme/TOCItems/Tree.js +80 -0
- package/lib/theme/infima.styles.d.ts +1 -0
- package/lib/theme/infima.styles.js +1456 -0
- package/lib/theme/reset.styles.d.ts +2 -0
- package/lib/theme/reset.styles.js +79 -0
- package/package.json +61 -0
- package/src/components/badge/index.ts +11 -0
- package/src/components/codesandbox_icon/codesandbox_icon.tsx +24 -0
- package/src/components/codesandbox_icon/index.ts +9 -0
- package/src/components/demo/actions_bar/actions_bar.tsx +95 -0
- package/src/components/demo/actions_bar/index.ts +9 -0
- package/src/components/demo/code_transformer.ts +44 -0
- package/src/components/demo/codesandbox/find_external_dependencies.ts +34 -0
- package/src/components/demo/codesandbox/index.ts +9 -0
- package/src/components/demo/codesandbox/open_action.tsx +132 -0
- package/src/components/demo/context.ts +30 -0
- package/src/components/demo/create_demo.tsx +17 -0
- package/src/components/demo/demo.tsx +143 -0
- package/src/components/demo/editor/editor.tsx +51 -0
- package/src/components/demo/editor/index.ts +9 -0
- package/src/components/demo/index.ts +11 -0
- package/src/components/demo/preview/index.ts +9 -0
- package/src/components/demo/preview/preview.tsx +77 -0
- package/src/components/demo/scope.ts +14 -0
- package/src/components/demo/source/get_source_from_children.ts +59 -0
- package/src/components/demo/source/index.ts +9 -0
- package/src/components/demo/source/source.tsx +36 -0
- package/src/components/figma_embed/index.tsx +57 -0
- package/src/components/guideline/guideline.tsx +121 -0
- package/src/components/guideline/guideline_text.tsx +51 -0
- package/src/components/guideline/index.ts +10 -0
- package/src/components/guideline/types.ts +9 -0
- package/src/components/high_contrast_mode_toggle/index.tsx +28 -0
- package/src/components/icon/index.ts +11 -0
- package/src/components/index.ts +15 -0
- package/src/components/navbar_item/index.tsx +164 -0
- package/src/components/prop_table/definition_types.ts +53 -0
- package/src/components/prop_table/extended_types.tsx +66 -0
- package/src/components/prop_table/extended_types_info.ts +35 -0
- package/src/components/prop_table/index.ts +9 -0
- package/src/components/prop_table/prop_table.tsx +235 -0
- package/src/components/theme_context/index.tsx +156 -0
- package/src/components/theme_context/theme_overrides.ts +15 -0
- package/src/components/version_switcher/index.tsx +144 -0
- package/src/index.ts +21 -0
- package/src/theme/Admonition/Types.tsx +85 -0
- package/src/theme/CodeBlock/index.tsx +57 -0
- package/src/theme/ColorModeToggle/index.tsx +93 -0
- package/src/theme/Demo/actions.tsx +20 -0
- package/src/theme/Demo/default_scope.ts +19 -0
- package/src/theme/DocBreadcrumbs/Items/Home/index.tsx +38 -0
- package/src/theme/DocBreadcrumbs/Items/item.styles.ts +43 -0
- package/src/theme/DocBreadcrumbs/index.tsx +144 -0
- package/src/theme/DocItem/Content/index.tsx +75 -0
- package/src/theme/DocItem/Footer/index.tsx +59 -0
- package/src/theme/DocItem/Layout/index.tsx +112 -0
- package/src/theme/DocItem/Metadata/index.tsx +23 -0
- package/src/theme/DocItem/Paginator/index.tsx +20 -0
- package/src/theme/DocItem/TOC/Desktop/index.tsx +24 -0
- package/src/theme/DocItem/TOC/Mobile/index.tsx +35 -0
- package/src/theme/DocItem/index.tsx +30 -0
- package/src/theme/DocPaginator/index.tsx +64 -0
- package/src/theme/DocRoot/Layout/Main/index.tsx +61 -0
- package/src/theme/DocRoot/Layout/Sidebar/index.tsx +124 -0
- package/src/theme/DocRoot/Layout/index.tsx +72 -0
- package/src/theme/DocSidebarItem/Category/index.tsx +266 -0
- package/src/theme/DocSidebarItem/Link/index.tsx +86 -0
- package/src/theme/DocSidebarItem/index.tsx +29 -0
- package/src/theme/DocSidebarItems/index.tsx +30 -0
- package/src/theme/EditThisPage/index.tsx +50 -0
- package/src/theme/Footer/index.tsx +67 -0
- package/src/theme/Heading/index.tsx +94 -0
- package/src/theme/Logo/index.tsx +146 -0
- package/src/theme/MDXComponents/A.tsx +33 -0
- package/src/theme/MDXComponents/Blockquote.tsx +35 -0
- package/src/theme/MDXComponents/Code.tsx +60 -0
- package/src/theme/MDXComponents/Heading.tsx +16 -0
- package/src/theme/MDXComponents/ListItem.tsx +20 -0
- package/src/theme/MDXComponents/OrderedList.tsx +26 -0
- package/src/theme/MDXComponents/Paragraph.tsx +33 -0
- package/src/theme/MDXComponents/Table.tsx +16 -0
- package/src/theme/MDXComponents/TableBody.tsx +16 -0
- package/src/theme/MDXComponents/TableDataCell.tsx +20 -0
- package/src/theme/MDXComponents/TableHeader.tsx +16 -0
- package/src/theme/MDXComponents/TableHeaderCell.tsx +20 -0
- package/src/theme/MDXComponents/TableRow.tsx +16 -0
- package/src/theme/MDXComponents/UnorderedList.tsx +26 -0
- package/src/theme/MDXComponents/index.ts +61 -0
- package/src/theme/MDXContent/index.tsx +22 -0
- package/src/theme/Navbar/Content/index.tsx +262 -0
- package/src/theme/Navbar/Layout/index.tsx +100 -0
- package/src/theme/Navbar/MobileSidebar/Header/index.tsx +89 -0
- package/src/theme/Navbar/MobileSidebar/Layout/index.tsx +44 -0
- package/src/theme/Navbar/MobileSidebar/index.tsx +46 -0
- package/src/theme/NavbarItem/DropdownNavbarItem/index.tsx +200 -0
- package/src/theme/NavbarItem/NavbarNavLink.tsx +141 -0
- package/src/theme/PaginatorNavLink/index.tsx +72 -0
- package/src/theme/Root.styles.ts +122 -0
- package/src/theme/Root.tsx +106 -0
- package/src/theme/TOCCollapsible/CollapseButton/index.tsx +53 -0
- package/src/theme/TOCItems/Tree.tsx +114 -0
- package/src/theme/infima.styles.ts +1458 -0
- package/src/theme/reset.styles.ts +82 -0
- package/src/theme/theme.d.ts +598 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { UseEuiTheme, euiFocusRing } from '@elastic/eui';
|
|
10
|
+
import { css } from '@emotion/react';
|
|
11
|
+
|
|
12
|
+
export const getResetStyles = (theme: UseEuiTheme) => {
|
|
13
|
+
const { euiTheme } = theme;
|
|
14
|
+
|
|
15
|
+
return css`
|
|
16
|
+
button {
|
|
17
|
+
background: none;
|
|
18
|
+
border: none;
|
|
19
|
+
padding: 0;
|
|
20
|
+
margin: 0;
|
|
21
|
+
color: inherit;
|
|
22
|
+
border-radius: 0;
|
|
23
|
+
font-size: inherit;
|
|
24
|
+
font-family: inherit;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
input,
|
|
28
|
+
textarea,
|
|
29
|
+
select {
|
|
30
|
+
font-size: 1rem; // Inherit from html root
|
|
31
|
+
font-family: inherit;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
dd {
|
|
35
|
+
margin: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
figure {
|
|
39
|
+
margin: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
img {
|
|
43
|
+
max-inline-size: 100%;
|
|
44
|
+
height: auto;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
ul, ol {
|
|
48
|
+
list-style: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
* {
|
|
52
|
+
${euiFocusRing(theme, 'outset', { color: euiTheme.colors.primary })};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Resets globals in theme/Layout
|
|
57
|
+
* https://github.com/facebook/docusaurus/blob/e64e0e7c96f695f9d63b22c0d0ee2e4001852ac6/packages/docusaurus-theme-classic/src/theme/Layout/styles.module.css#L8-L11
|
|
58
|
+
*/
|
|
59
|
+
body {
|
|
60
|
+
height: initial;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
html, body, div, span, applet, object, iframe,
|
|
64
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
|
65
|
+
a, abbr, acronym, address, big, cite, code,
|
|
66
|
+
del, dfn, em, img, ins, kbd, q, s, samp,
|
|
67
|
+
small, strike, strong, sub, sup, tt, var,
|
|
68
|
+
b, u, i, center,
|
|
69
|
+
dl, dt, dd, ol, ul, li,
|
|
70
|
+
fieldset, form, label, legend,
|
|
71
|
+
table, caption, tbody, tfoot, thead, tr, th, td,
|
|
72
|
+
article, aside, canvas, details, embed,
|
|
73
|
+
figure, figcaption, footer, header, hgroup,
|
|
74
|
+
menu, nav, output, ruby, section, summary,
|
|
75
|
+
time, mark, audio, video {
|
|
76
|
+
margin: 0;
|
|
77
|
+
padding: 0;
|
|
78
|
+
border: none;
|
|
79
|
+
vertical-align: baseline;
|
|
80
|
+
}
|
|
81
|
+
`;
|
|
82
|
+
};
|
|
@@ -0,0 +1,598 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// Docusaurus static asset alias
|
|
10
|
+
declare module '@site/*';
|
|
11
|
+
|
|
12
|
+
// Prop types are declared for @theme scope in @docusaurus/theme-classic
|
|
13
|
+
// but when using swizzle --eject the type import is not available.
|
|
14
|
+
// we re-declare the needed types here to ensure type checking
|
|
15
|
+
// NOTE: when using swizzle --wrap there is the approach to do the following:
|
|
16
|
+
// type Props = WrapperProps<typeof NameOfComponent> but it will result in `any` type
|
|
17
|
+
|
|
18
|
+
// original: https://github.com/facebook/docusaurus/blob/8b877d27d4b1bcd5c2ee13dde8332407a1c26447/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L42
|
|
19
|
+
declare module '@theme-original/Admonition' {
|
|
20
|
+
import type { ReactNode } from 'react';
|
|
21
|
+
|
|
22
|
+
export interface Props {
|
|
23
|
+
readonly children: ReactNode;
|
|
24
|
+
readonly type: string;
|
|
25
|
+
readonly icon?: ReactNode;
|
|
26
|
+
readonly title?: ReactNode;
|
|
27
|
+
readonly className?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export default function Admonition(props: Props): JSX.Element;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare module '@theme/Admonition/Types' {
|
|
34
|
+
import type { ComponentType } from 'react';
|
|
35
|
+
import type { Props } from '@theme-original/Admonition';
|
|
36
|
+
|
|
37
|
+
const AdmonitionTypes: {
|
|
38
|
+
[admonitionType: string]: ComponentType<Props>;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default AdmonitionTypes;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// original: https://github.com/facebook/docusaurus/blob/8b877d27d4b1bcd5c2ee13dde8332407a1c26447/packages/docusaurus-plugin-content-docs/src/plugin-content-docs.d.ts#L635
|
|
45
|
+
declare module '@theme-original/DocRoot' {
|
|
46
|
+
import type { RouteConfigComponentProps } from 'react-router-config';
|
|
47
|
+
import type { Required } from 'utility-types';
|
|
48
|
+
|
|
49
|
+
export interface Props extends Required<RouteConfigComponentProps, 'route'> {}
|
|
50
|
+
|
|
51
|
+
export default function DocRoot(props: Props): JSX.Element;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// original: https://github.com/facebook/docusaurus/blob/8b877d27d4b1bcd5c2ee13dde8332407a1c26447/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L510
|
|
55
|
+
declare module '@theme-original/DocRoot/Layout' {
|
|
56
|
+
import type { ReactNode } from 'react';
|
|
57
|
+
|
|
58
|
+
export interface Props {
|
|
59
|
+
readonly children: ReactNode;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export default function DocRootLayout(props: Props): JSX.Element;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// original: https://github.com/facebook/docusaurus/blob/8b877d27d4b1bcd5c2ee13dde8332407a1c26447/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L543
|
|
66
|
+
declare module '@theme-original/DocRoot/Layout/Main' {
|
|
67
|
+
import type { ReactNode } from 'react';
|
|
68
|
+
|
|
69
|
+
export interface Props {
|
|
70
|
+
readonly hiddenSidebarContainer: boolean;
|
|
71
|
+
readonly children: ReactNode;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export default function DocRootLayoutMain(props: Props): JSX.Element;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// original: https://github.com/facebook/docusaurus/blob/8b877d27d4b1bcd5c2ee13dde8332407a1c26447/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L520
|
|
78
|
+
declare module '@theme-original/DocRoot/Layout/Sidebar' {
|
|
79
|
+
import type { Dispatch, SetStateAction } from 'react';
|
|
80
|
+
import type { PropSidebar } from '@docusaurus/plugin-content-docs';
|
|
81
|
+
|
|
82
|
+
export interface Props {
|
|
83
|
+
readonly sidebar: PropSidebar;
|
|
84
|
+
readonly hiddenSidebarContainer: boolean;
|
|
85
|
+
readonly setHiddenSidebarContainer: Dispatch<SetStateAction<boolean>>;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export default function DocRootLayoutSidebar(props: Props): JSX.Element;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// original: https://github.com/facebook/docusaurus/blob/8b877d27d4b1bcd5c2ee13dde8332407a1c26447/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L533
|
|
92
|
+
declare module '@theme-original/DocRoot/Layout/Sidebar/ExpandButton' {
|
|
93
|
+
export interface Props {
|
|
94
|
+
toggleSidebar: () => void;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export default function DocRootLayoutSidebarExpandButton(
|
|
98
|
+
props: Props
|
|
99
|
+
): JSX.Element;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// original" https://github.com/facebook/docusaurus/blob/8b877d27d4b1bcd5c2ee13dde8332407a1c26447/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L672
|
|
103
|
+
declare module '@theme-original/DocVersionBanner' {
|
|
104
|
+
export interface Props {
|
|
105
|
+
readonly className?: string;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export default function DocVersionBanner(props: Props): JSX.Element;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// original: https://github.com/facebook/docusaurus/blob/8b877d27d4b1bcd5c2ee13dde8332407a1c26447/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L680
|
|
112
|
+
declare module '@theme-original/DocVersionBadge' {
|
|
113
|
+
export interface Props {
|
|
114
|
+
readonly className?: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export default function DocVersionBadge(props: Props): JSX.Element;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// original: https://github.com/facebook/docusaurus/blob/d2bb74a8fd4ee92fc7ff806657dbb35de1de845f/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L560
|
|
121
|
+
declare module '@theme-original/DocItem/Content' {
|
|
122
|
+
export interface Props {
|
|
123
|
+
readonly children: JSX.Element;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// original: https://github.com/facebook/docusaurus/blob/d2bb74a8fd4ee92fc7ff806657dbb35de1de845f/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L554
|
|
128
|
+
declare module '@theme-original/DocPaginator' {
|
|
129
|
+
import type { PropNavigation } from '@docusaurus/plugin-content-docs';
|
|
130
|
+
|
|
131
|
+
export interface Props extends PropNavigation {}
|
|
132
|
+
|
|
133
|
+
export default function DocPaginator(props: Props): JSX.Element;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// original: https://github.com/facebook/docusaurus/blob/d2bb74a8fd4ee92fc7ff806657dbb35de1de845f/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L1252
|
|
137
|
+
declare module '@theme-original/PaginatorNavLink' {
|
|
138
|
+
import type { ReactNode } from 'react';
|
|
139
|
+
import type { PropNavigationLink } from '@docusaurus/plugin-content-docs';
|
|
140
|
+
|
|
141
|
+
export interface Props extends Omit<PropNavigationLink, 'title'> {
|
|
142
|
+
readonly title: ReactNode;
|
|
143
|
+
readonly subLabel?: JSX.Element;
|
|
144
|
+
readonly isNext?: boolean;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export default function PaginatorNavLink(props: Props): JSX.Element;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L702
|
|
151
|
+
declare module '@theme-original/EditThisPage' {
|
|
152
|
+
export interface Props {
|
|
153
|
+
readonly editUrl: string;
|
|
154
|
+
}
|
|
155
|
+
export default function EditThisPage(props: Props): JSX.Element;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L364
|
|
159
|
+
declare module '@theme/CodeBlock' {
|
|
160
|
+
import type { ReactNode } from 'react';
|
|
161
|
+
|
|
162
|
+
export interface Props {
|
|
163
|
+
readonly children: ReactNode;
|
|
164
|
+
readonly className?: string;
|
|
165
|
+
readonly metastring?: string;
|
|
166
|
+
readonly title?: string;
|
|
167
|
+
readonly language?: string;
|
|
168
|
+
readonly showLineNumbers?: boolean;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export default function CodeBlock(props: Props): JSX.Element;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// original: https://github.com/facebook/docusaurus/blob/8b877d27d4b1bcd5c2ee13dde8332407a1c26447/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L510
|
|
175
|
+
declare module '@theme/MDXComponents/Code' {
|
|
176
|
+
import type { ComponentProps } from 'react';
|
|
177
|
+
|
|
178
|
+
export interface Props extends ComponentProps<'code'> {}
|
|
179
|
+
|
|
180
|
+
export default function MDXCode(props: Props): JSX.Element;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L563
|
|
184
|
+
declare module '@theme-original/DocSidebar' {
|
|
185
|
+
import type { PropSidebarItem } from '@docusaurus/plugin-content-docs';
|
|
186
|
+
|
|
187
|
+
export interface Props {
|
|
188
|
+
readonly path: string;
|
|
189
|
+
readonly sidebar: readonly PropSidebarItem[];
|
|
190
|
+
readonly onCollapse: () => void;
|
|
191
|
+
readonly isHidden: boolean;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export default function DocSidebar(props: Props): JSX.Element;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L576
|
|
198
|
+
declare module '@theme-original/DocSidebar/Mobile' {
|
|
199
|
+
import type { Props as DocSidebarProps } from '@theme-original/DocSidebar';
|
|
200
|
+
|
|
201
|
+
export interface Props extends DocSidebarProps {}
|
|
202
|
+
|
|
203
|
+
export default function DocSidebarMobile(props: Props): JSX.Element;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L584
|
|
207
|
+
declare module '@theme-original/DocSidebar/Desktop' {
|
|
208
|
+
import type { Props as DocSidebarProps } from '@theme-original/DocSidebar';
|
|
209
|
+
|
|
210
|
+
export interface Props extends DocSidebarProps {}
|
|
211
|
+
|
|
212
|
+
export default function DocSidebarDesktop(props: Props): JSX.Element;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L592
|
|
216
|
+
declare module '@theme-original/DocSidebar/Desktop/Content' {
|
|
217
|
+
import type { PropSidebarItem } from '@docusaurus/plugin-content-docs';
|
|
218
|
+
|
|
219
|
+
export interface Props {
|
|
220
|
+
readonly className?: string;
|
|
221
|
+
readonly path: string;
|
|
222
|
+
readonly sidebar: readonly PropSidebarItem[];
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export default function Content(props: Props): JSX.Element;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// original
|
|
229
|
+
declare module '@theme-original/DocSidebar/Desktop/CollapseButton' {
|
|
230
|
+
export interface Props {
|
|
231
|
+
readonly onClick: React.MouseEventHandler;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export default function CollapseButton(props: Props): JSX.Element;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L612
|
|
238
|
+
declare module '@theme-original/DocSidebarItem' {
|
|
239
|
+
import type { PropSidebarItem } from '@docusaurus/plugin-content-docs';
|
|
240
|
+
|
|
241
|
+
export interface Props {
|
|
242
|
+
readonly activePath: string;
|
|
243
|
+
readonly onItemClick?: (item: PropSidebarItem) => void;
|
|
244
|
+
readonly level: number;
|
|
245
|
+
readonly tabIndex?: number;
|
|
246
|
+
readonly item: PropSidebarItem;
|
|
247
|
+
readonly index: number;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export default function DocSidebarItem(props: Props): JSX.Element;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L661
|
|
254
|
+
declare module '@theme-original/DocSidebarItems' {
|
|
255
|
+
import type { Props as DocSidebarItemProps } from '@theme-original/DocSidebarItem';
|
|
256
|
+
import type { PropSidebarItem } from '@docusaurus/plugin-content-docs';
|
|
257
|
+
|
|
258
|
+
export interface Props extends Omit<DocSidebarItemProps, 'item' | 'index'> {
|
|
259
|
+
readonly items: readonly PropSidebarItem[];
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export default function DocSidebarItems(props: Props): JSX.Element;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L627
|
|
266
|
+
declare module '@theme-original/DocSidebarItem/Link' {
|
|
267
|
+
import type { Props as DocSidebarItemProps } from '@theme-original/DocSidebarItem';
|
|
268
|
+
|
|
269
|
+
import type { PropSidebarItemLink } from '@docusaurus/plugin-content-docs';
|
|
270
|
+
|
|
271
|
+
export interface Props extends DocSidebarItemProps {
|
|
272
|
+
readonly item: PropSidebarItemLink;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export default function DocSidebarItemLink(props: Props): JSX.Element;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L639
|
|
279
|
+
declare module '@theme-original/DocSidebarItem/Html' {
|
|
280
|
+
import type { Props as DocSidebarItemProps } from '@theme-original/DocSidebarItem';
|
|
281
|
+
import type { PropSidebarItemHtml } from '@docusaurus/plugin-content-docs';
|
|
282
|
+
|
|
283
|
+
export interface Props extends DocSidebarItemProps {
|
|
284
|
+
readonly item: PropSidebarItemHtml;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export default function DocSidebarItemHtml(props: Props): JSX.Element;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L650
|
|
291
|
+
declare module '@theme-original/DocSidebarItem/Category' {
|
|
292
|
+
import type { Props as DocSidebarItemProps } from '@theme-original/DocSidebarItem';
|
|
293
|
+
import type { PropSidebarItemCategory } from '@docusaurus/plugin-content-docs';
|
|
294
|
+
|
|
295
|
+
export interface Props extends DocSidebarItemProps {
|
|
296
|
+
readonly item: PropSidebarItemCategory;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export default function DocSidebarItemCategory(props: Props): JSX.Element;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L1051
|
|
303
|
+
declare module '@theme-original/NavbarItem/DefaultNavbarItem' {
|
|
304
|
+
import type { Props as NavbarNavLinkProps } from '@theme-original/NavbarItem/NavbarNavLink';
|
|
305
|
+
|
|
306
|
+
export type DesktopOrMobileNavBarItemProps = NavbarNavLinkProps & {
|
|
307
|
+
readonly isDropdownItem?: boolean;
|
|
308
|
+
readonly className?: string;
|
|
309
|
+
readonly position?: 'left' | 'right';
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
export interface Props extends DesktopOrMobileNavBarItemProps {
|
|
313
|
+
readonly mobile?: boolean;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export default function DefaultNavbarItem(props: Props): JSX.Element;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// original: https://github.com/facebook/docusaurus/blob/a6de0f2725c68854bb37acab25705c4a7709f230/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L1407
|
|
320
|
+
declare module '@theme-original/ColorModeToggle' {
|
|
321
|
+
import type { ColorMode } from '@docusaurus/theme-common';
|
|
322
|
+
|
|
323
|
+
export interface Props {
|
|
324
|
+
readonly className?: string;
|
|
325
|
+
readonly buttonClassName?: string;
|
|
326
|
+
readonly value: ColorMode;
|
|
327
|
+
/**
|
|
328
|
+
* The parameter represents the "to-be" value. For example, if currently in
|
|
329
|
+
* dark mode, clicking the button should call `onChange("light")`
|
|
330
|
+
*/
|
|
331
|
+
readonly onChange: (colorMode: ColorMode) => void;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export default function ColorModeToggle(props: Props): JSX.Element;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
// original: https://github.com/facebook/docusaurus/blob/026a317fc4300e6ae1817404519d229d2ca684a4/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L1014
|
|
338
|
+
declare module '@theme-original/Navbar/Layout' {
|
|
339
|
+
export interface Props {
|
|
340
|
+
readonly children: React.ReactNode;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
export default function NavbarLayout(props: Props): JSX.Element;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L1067
|
|
347
|
+
declare module '@theme-original/NavbarItem/NavbarNavLink' {
|
|
348
|
+
import type { ReactNode } from 'react';
|
|
349
|
+
import type { Props as LinkProps } from '@docusaurus/Link';
|
|
350
|
+
|
|
351
|
+
export interface Props extends LinkProps {
|
|
352
|
+
readonly activeBasePath?: string;
|
|
353
|
+
readonly activeBaseRegex?: string;
|
|
354
|
+
readonly exact?: boolean;
|
|
355
|
+
readonly label?: ReactNode;
|
|
356
|
+
readonly html?: string;
|
|
357
|
+
readonly prependBaseUrlToHref?: boolean;
|
|
358
|
+
readonly isDropdownLink?: boolean;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export default function NavbarNavLink(props: Props): JSX.Element;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L1084
|
|
365
|
+
declare module '@theme-original/NavbarItem/DropdownNavbarItem' {
|
|
366
|
+
import type { Props as NavbarNavLinkProps } from '@theme-original/NavbarItem/NavbarNavLink';
|
|
367
|
+
import type { LinkLikeNavbarItemProps } from '@theme-original/NavbarItem';
|
|
368
|
+
|
|
369
|
+
export type LinkLikeNavbarItemProps = LinkLikeNavbarItemProps;
|
|
370
|
+
|
|
371
|
+
export type DesktopOrMobileNavBarItemProps = NavbarNavLinkProps & {
|
|
372
|
+
readonly position?: 'left' | 'right';
|
|
373
|
+
readonly items: readonly LinkLikeNavbarItemProps[];
|
|
374
|
+
readonly className?: string;
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
export interface Props extends DesktopOrMobileNavBarItemProps {
|
|
378
|
+
readonly mobile?: boolean;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
export default function DropdownNavbarItem(props: Props): JSX.Element;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L1101
|
|
385
|
+
declare module '@theme-original/NavbarItem/SearchNavbarItem' {
|
|
386
|
+
export interface Props {
|
|
387
|
+
readonly mobile?: boolean;
|
|
388
|
+
readonly className?: string;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export default function SearchNavbarItem(props: Props): JSX.Element;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L1110
|
|
395
|
+
declare module '@theme-original/NavbarItem/LocaleDropdownNavbarItem' {
|
|
396
|
+
import type { Props as DropdownNavbarItemProps } from '@theme-original/NavbarItem/DropdownNavbarItem';
|
|
397
|
+
import type { LinkLikeNavbarItemProps } from '@theme-original/NavbarItem';
|
|
398
|
+
|
|
399
|
+
export interface Props extends DropdownNavbarItemProps {
|
|
400
|
+
readonly dropdownItemsBefore: LinkLikeNavbarItemProps[];
|
|
401
|
+
readonly dropdownItemsAfter: LinkLikeNavbarItemProps[];
|
|
402
|
+
readonly queryString?: string;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
export default function LocaleDropdownNavbarItem(props: Props): JSX.Element;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L1123
|
|
409
|
+
declare module '@theme-original/NavbarItem/DocsVersionDropdownNavbarItem' {
|
|
410
|
+
import type { Props as DropdownNavbarItemProps } from '@theme-original/NavbarItem/DropdownNavbarItem';
|
|
411
|
+
import type { LinkLikeNavbarItemProps } from '@theme-original/NavbarItem';
|
|
412
|
+
|
|
413
|
+
export interface Props extends DropdownNavbarItemProps {
|
|
414
|
+
readonly docsPluginId?: string;
|
|
415
|
+
readonly dropdownActiveClassDisabled?: boolean;
|
|
416
|
+
readonly dropdownItemsBefore: LinkLikeNavbarItemProps[];
|
|
417
|
+
readonly dropdownItemsAfter: LinkLikeNavbarItemProps[];
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
export default function DocsVersionDropdownNavbarItem(
|
|
421
|
+
props: Props
|
|
422
|
+
): JSX.Element;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L1139
|
|
426
|
+
declare module '@theme/NavbarItem/DocsVersionNavbarItem' {
|
|
427
|
+
import type { Props as DefaultNavbarItemProps } from '@theme-original/NavbarItem/DefaultNavbarItem';
|
|
428
|
+
|
|
429
|
+
export interface Props extends DefaultNavbarItemProps {
|
|
430
|
+
readonly docsPluginId?: string;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
export default function DocsVersionNavbarItem(props: Props): JSX.Element;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L1149
|
|
437
|
+
declare module '@theme-original/NavbarItem/DocNavbarItem' {
|
|
438
|
+
import type { Props as DefaultNavbarItemProps } from '@theme-original/NavbarItem/DefaultNavbarItem';
|
|
439
|
+
|
|
440
|
+
export interface Props extends DefaultNavbarItemProps {
|
|
441
|
+
readonly docId: string;
|
|
442
|
+
readonly docsPluginId?: string;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
export default function DocsSidebarNavbarItem(
|
|
446
|
+
props: Props
|
|
447
|
+
): JSX.Element | null;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L1162
|
|
451
|
+
declare module '@theme-original/NavbarItem/DocSidebarNavbarItem' {
|
|
452
|
+
import type { Props as DefaultNavbarItemProps } from '@theme-original/NavbarItem/DefaultNavbarItem';
|
|
453
|
+
|
|
454
|
+
export interface Props extends DefaultNavbarItemProps {
|
|
455
|
+
readonly sidebarId: string;
|
|
456
|
+
readonly docsPluginId?: string;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
export default function DocSidebarNavbarItem(props: Props): JSX.Element;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L1173
|
|
463
|
+
declare module '@theme-original/NavbarItem/HtmlNavbarItem' {
|
|
464
|
+
import type { Props as DefaultNavbarItemProps } from '@theme-original/NavbarItem/DefaultNavbarItem';
|
|
465
|
+
|
|
466
|
+
export interface Props extends DefaultNavbarItemProps {
|
|
467
|
+
readonly value: string;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
export default function HtmlNavbarItem(props: Props): JSX.Element;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
// original: https://github.com/facebook/docusaurus/blob/fa743c81defd24e22eae45c81bd79eb8ec2c4ef0/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L1214
|
|
474
|
+
declare module '@theme-original/NavbarItem' {
|
|
475
|
+
import type { ComponentProps } from 'react';
|
|
476
|
+
import type { Props as DefaultNavbarItemProps } from '@theme-original/NavbarItem/DefaultNavbarItem';
|
|
477
|
+
import type { Props as DocNavbarItemProps } from '@theme-original/NavbarItem/DocNavbarItem';
|
|
478
|
+
import type { Props as DocSidebarNavbarItemProps } from '@theme-original/NavbarItem/DocSidebarNavbarItem';
|
|
479
|
+
import type { Props as DocsVersionNavbarItemProps } from '@theme-original/NavbarItem/DocsVersionNavbarItem';
|
|
480
|
+
import type { Props as DropdownNavbarItemProps } from '@theme-original/NavbarItem/DropdownNavbarItem';
|
|
481
|
+
import type { Props as DocsVersionDropdownNavbarItemProps } from '@theme-original/NavbarItem/DocsVersionDropdownNavbarItem';
|
|
482
|
+
import type { Props as LocaleDropdownNavbarItemProps } from '@theme-original/NavbarItem/LocaleDropdownNavbarItem';
|
|
483
|
+
import type { Props as SearchNavbarItemProps } from '@theme-original/NavbarItem/SearchNavbarItem';
|
|
484
|
+
import type { Props as HtmlNavbarItemProps } from '@theme-original/NavbarItem/HtmlNavbarItem';
|
|
485
|
+
|
|
486
|
+
export type LinkLikeNavbarItemProps =
|
|
487
|
+
| ({ readonly type?: 'default' } & DefaultNavbarItemProps)
|
|
488
|
+
| ({ readonly type: 'doc' } & DocNavbarItemProps)
|
|
489
|
+
| ({ readonly type: 'docsVersion' } & DocsVersionNavbarItemProps)
|
|
490
|
+
| ({ readonly type: 'docSidebar' } & DocSidebarNavbarItemProps)
|
|
491
|
+
| ({ readonly type: 'html' } & HtmlNavbarItemProps);
|
|
492
|
+
|
|
493
|
+
export type Props = ComponentProps<'a'> & {
|
|
494
|
+
readonly position?: 'left' | 'right';
|
|
495
|
+
} & (
|
|
496
|
+
| LinkLikeNavbarItemProps
|
|
497
|
+
| ({ readonly type?: 'dropdown' } & DropdownNavbarItemProps)
|
|
498
|
+
| ({
|
|
499
|
+
readonly type: 'docsVersionDropdown';
|
|
500
|
+
} & DocsVersionDropdownNavbarItemProps)
|
|
501
|
+
| ({ readonly type: 'localeDropdown' } & LocaleDropdownNavbarItemProps)
|
|
502
|
+
| ({
|
|
503
|
+
readonly type: 'search';
|
|
504
|
+
} & SearchNavbarItemProps)
|
|
505
|
+
);
|
|
506
|
+
|
|
507
|
+
export type NavbarItemType = Props['type'];
|
|
508
|
+
|
|
509
|
+
export default function NavbarItem(props: Props): JSX.Element;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
// original: https://github.com/facebook/docusaurus/blob/80203b385dd5a2a87039af3a73e141101574e440/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L1340
|
|
513
|
+
declare module '@theme-original/TOC' {
|
|
514
|
+
import type { TOCItem } from '@docusaurus/mdx-loader';
|
|
515
|
+
|
|
516
|
+
// `minHeadingLevel` only comes from doc/post front matter, and won't have a
|
|
517
|
+
// default set by Joi. See TOC, TOCInline, TOCCollapsible for examples.
|
|
518
|
+
export interface Props {
|
|
519
|
+
readonly toc: readonly TOCItem[];
|
|
520
|
+
readonly minHeadingLevel?: number;
|
|
521
|
+
readonly maxHeadingLevel?: number;
|
|
522
|
+
readonly className?: string;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
export default function TOC(props: Props): JSX.Element;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
// original: https://github.com/facebook/docusaurus/blob/80203b385dd5a2a87039af3a73e141101574e440/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L1328
|
|
529
|
+
declare module '@theme-original/TOCItems/Tree' {
|
|
530
|
+
import type { TOCTreeNode } from '@docusaurus/theme-common/internal';
|
|
531
|
+
|
|
532
|
+
export interface Props {
|
|
533
|
+
readonly toc: readonly TOCTreeNode[];
|
|
534
|
+
readonly className: string;
|
|
535
|
+
readonly linkClassName: string | null;
|
|
536
|
+
readonly isChild?: boolean;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
export default function TOCItems(props: Props): JSX.Element;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
// original: https://github.com/facebook/docusaurus/blob/8b877d27d4b1bcd5c2ee13dde8332407a1c26447/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L1381
|
|
543
|
+
declare module '@theme-original/TOCCollapsible/CollapseButton' {
|
|
544
|
+
import type { ComponentProps } from 'react';
|
|
545
|
+
|
|
546
|
+
export interface Props extends ComponentProps<'button'> {
|
|
547
|
+
collapsed: boolean;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
export default function TOCCollapsibleCollapseButton(
|
|
551
|
+
props: Props
|
|
552
|
+
): JSX.Element;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
// original: https://github.com/facebook/docusaurus/blob/a6de0f2725c68854bb37acab25705c4a7709f230/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L1424
|
|
556
|
+
declare module '@theme-original/Logo' {
|
|
557
|
+
import type { ComponentProps } from 'react';
|
|
558
|
+
|
|
559
|
+
export interface Props extends ComponentProps<'a'> {
|
|
560
|
+
readonly imageClassName?: string;
|
|
561
|
+
readonly titleClassName?: string;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
export default function Logo(props: Props): JSX.Element;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
// original: https://github.com/facebook/docusaurus/blob/a6de0f2725c68854bb37acab25705c4a7709f230/packages/docusaurus-theme-classic/src/theme-classic.d.ts#L805C1-L814C3
|
|
568
|
+
declare module '@theme/Heading' {
|
|
569
|
+
import type { ComponentProps } from 'react';
|
|
570
|
+
|
|
571
|
+
type HeadingType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
572
|
+
|
|
573
|
+
export interface Props extends ComponentProps<HeadingType> {
|
|
574
|
+
readonly as: HeadingType;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
export default function Heading(props: Props): JSX.Element;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
declare module '@theme/Demo/default_scope' {
|
|
581
|
+
export type ScopeType = Record<string, unknown>;
|
|
582
|
+
|
|
583
|
+
export const demoDefaultScope: ScopeType;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
declare module '@theme/Demo/actions' {
|
|
587
|
+
import type { ComponentType } from 'react';
|
|
588
|
+
import type { DemoSourceMeta } from '@elastic/eui-docusaurus-theme/components/demo/demo';
|
|
589
|
+
|
|
590
|
+
export type ActionComponentProps = {
|
|
591
|
+
activeSource: DemoSourceMeta;
|
|
592
|
+
sources: DemoSourceMeta[];
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
export type ActionComponent = ComponentType<ActionComponentProps>;
|
|
596
|
+
|
|
597
|
+
export const extraActions: ActionComponent[];
|
|
598
|
+
}
|