@apify/docusaurus-plugin-typedoc-api 3.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 +21 -0
- package/README.md +290 -0
- package/assets/styles-8ad572ec.css +303 -0
- package/lib/components/AnchorLink.js +22 -0
- package/lib/components/AnchorLink.js.map +1 -0
- package/lib/components/ApiChangelog.js +28 -0
- package/lib/components/ApiChangelog.js.map +1 -0
- package/lib/components/ApiDataContext.js +16 -0
- package/lib/components/ApiDataContext.js.map +1 -0
- package/lib/components/ApiIndex.js +80 -0
- package/lib/components/ApiIndex.js.map +1 -0
- package/lib/components/ApiItem.js +86 -0
- package/lib/components/ApiItem.js.map +1 -0
- package/lib/components/ApiItemLayout.js +69 -0
- package/lib/components/ApiItemLayout.js.map +1 -0
- package/lib/components/ApiPage.js +69 -0
- package/lib/components/ApiPage.js.map +1 -0
- package/lib/components/Breadcrumb.js +38 -0
- package/lib/components/Breadcrumb.js.map +1 -0
- package/lib/components/Comment.js +56 -0
- package/lib/components/Comment.js.map +1 -0
- package/lib/components/CommentBadges.js +35 -0
- package/lib/components/CommentBadges.js.map +1 -0
- package/lib/components/DefaultValue.js +49 -0
- package/lib/components/DefaultValue.js.map +1 -0
- package/lib/components/Flags.js +27 -0
- package/lib/components/Flags.js.map +1 -0
- package/lib/components/Footer.js +18 -0
- package/lib/components/Footer.js.map +1 -0
- package/lib/components/Hierarchy.js +27 -0
- package/lib/components/Hierarchy.js.map +1 -0
- package/lib/components/Icon.js +27 -0
- package/lib/components/Icon.js.map +1 -0
- package/lib/components/Index.js +87 -0
- package/lib/components/Index.js.map +1 -0
- package/lib/components/Markdown.js +204 -0
- package/lib/components/Markdown.js.map +1 -0
- package/lib/components/Member.js +68 -0
- package/lib/components/Member.js.map +1 -0
- package/lib/components/MemberDeclaration.js +64 -0
- package/lib/components/MemberDeclaration.js.map +1 -0
- package/lib/components/MemberGetterSetter.js +61 -0
- package/lib/components/MemberGetterSetter.js.map +1 -0
- package/lib/components/MemberReference.js +38 -0
- package/lib/components/MemberReference.js.map +1 -0
- package/lib/components/MemberSignatureBody.js +91 -0
- package/lib/components/MemberSignatureBody.js.map +1 -0
- package/lib/components/MemberSignatureTitle.js +52 -0
- package/lib/components/MemberSignatureTitle.js.map +1 -0
- package/lib/components/MemberSignatures.js +61 -0
- package/lib/components/MemberSignatures.js.map +1 -0
- package/lib/components/MemberSources.js +33 -0
- package/lib/components/MemberSources.js.map +1 -0
- package/lib/components/Members.js +51 -0
- package/lib/components/Members.js.map +1 -0
- package/lib/components/MembersGroup.js +39 -0
- package/lib/components/MembersGroup.js.map +1 -0
- package/lib/components/Parameter.js +145 -0
- package/lib/components/Parameter.js.map +1 -0
- package/lib/components/Reflection.js +112 -0
- package/lib/components/Reflection.js.map +1 -0
- package/lib/components/SourceLink.js +37 -0
- package/lib/components/SourceLink.js.map +1 -0
- package/lib/components/Type.js +341 -0
- package/lib/components/Type.js.map +1 -0
- package/lib/components/TypeAndParent.js +27 -0
- package/lib/components/TypeAndParent.js.map +1 -0
- package/lib/components/TypeParameters.js +36 -0
- package/lib/components/TypeParameters.js.map +1 -0
- package/lib/components/TypeParametersGeneric.js +27 -0
- package/lib/components/TypeParametersGeneric.js.map +1 -0
- package/lib/components/VersionBanner.js +39 -0
- package/lib/components/VersionBanner.js.map +1 -0
- package/lib/hooks/useBreadcrumbs.js +9 -0
- package/lib/hooks/useBreadcrumbs.js.map +1 -0
- package/lib/hooks/useGitRefName.js +9 -0
- package/lib/hooks/useGitRefName.js.map +1 -0
- package/lib/hooks/useMinimalLayout.js +9 -0
- package/lib/hooks/useMinimalLayout.js.map +1 -0
- package/lib/hooks/useReflection.js +19 -0
- package/lib/hooks/useReflection.js.map +1 -0
- package/lib/hooks/useReflectionMap.js +9 -0
- package/lib/hooks/useReflectionMap.js.map +1 -0
- package/lib/index.js +320 -0
- package/lib/index.js.map +1 -0
- package/lib/markdownLoader.js +11 -0
- package/lib/markdownLoader.js.map +1 -0
- package/lib/plugin/data.js +332 -0
- package/lib/plugin/data.js.map +1 -0
- package/lib/plugin/sidebar.js +105 -0
- package/lib/plugin/sidebar.js.map +1 -0
- package/lib/plugin/structure/0.23.js +48 -0
- package/lib/plugin/structure/0.23.js.map +1 -0
- package/lib/plugin/url.js +49 -0
- package/lib/plugin/url.js.map +1 -0
- package/lib/plugin/version.js +83 -0
- package/lib/plugin/version.js.map +1 -0
- package/lib/types.js +2 -0
- package/lib/types.js.map +1 -0
- package/lib/utils/hierarchy.js +35 -0
- package/lib/utils/hierarchy.js.map +1 -0
- package/lib/utils/icons.js +124 -0
- package/lib/utils/icons.js.map +1 -0
- package/lib/utils/links.js +10 -0
- package/lib/utils/links.js.map +1 -0
- package/lib/utils/markdown.js +69 -0
- package/lib/utils/markdown.js.map +1 -0
- package/lib/utils/visibility.js +25 -0
- package/lib/utils/visibility.js.map +1 -0
- package/package.json +57 -0
- package/src/components/AnchorLink.tsx +14 -0
- package/src/components/ApiChangelog.tsx +26 -0
- package/src/components/ApiDataContext.ts +17 -0
- package/src/components/ApiIndex.tsx +109 -0
- package/src/components/ApiItem.tsx +110 -0
- package/src/components/ApiItemLayout.tsx +96 -0
- package/src/components/ApiPage.tsx +78 -0
- package/src/components/Breadcrumb.tsx +41 -0
- package/src/components/Comment.tsx +74 -0
- package/src/components/CommentBadges.tsx +40 -0
- package/src/components/DefaultValue.tsx +48 -0
- package/src/components/Flags.tsx +29 -0
- package/src/components/Footer.tsx +13 -0
- package/src/components/Hierarchy.tsx +27 -0
- package/src/components/Icon.tsx +20 -0
- package/src/components/Index.tsx +109 -0
- package/src/components/Markdown.tsx +241 -0
- package/src/components/Member.tsx +64 -0
- package/src/components/MemberDeclaration.tsx +67 -0
- package/src/components/MemberGetterSetter.tsx +69 -0
- package/src/components/MemberReference.tsx +43 -0
- package/src/components/MemberSignatureBody.tsx +121 -0
- package/src/components/MemberSignatureTitle.tsx +65 -0
- package/src/components/MemberSignatures.tsx +64 -0
- package/src/components/MemberSources.tsx +42 -0
- package/src/components/Members.tsx +62 -0
- package/src/components/MembersGroup.tsx +47 -0
- package/src/components/Parameter.tsx +165 -0
- package/src/components/README.md +9 -0
- package/src/components/Reflection.tsx +136 -0
- package/src/components/SourceLink.tsx +46 -0
- package/src/components/Type.tsx +377 -0
- package/src/components/TypeAndParent.tsx +26 -0
- package/src/components/TypeParameters.tsx +37 -0
- package/src/components/TypeParametersGeneric.tsx +25 -0
- package/src/components/VersionBanner.tsx +44 -0
- package/src/components/styles.css +303 -0
- package/src/hooks/useBreadcrumbs.ts +6 -0
- package/src/hooks/useGitRefName.ts +6 -0
- package/src/hooks/useMinimalLayout.ts +6 -0
- package/src/hooks/useReflection.ts +18 -0
- package/src/hooks/useReflectionMap.ts +7 -0
- package/src/index.ts +420 -0
- package/src/markdownLoader.ts +10 -0
- package/src/plugin/data.ts +389 -0
- package/src/plugin/sidebar.ts +139 -0
- package/src/plugin/structure/0.23.ts +58 -0
- package/src/plugin/url.ts +49 -0
- package/src/plugin/version.ts +118 -0
- package/src/types.ts +165 -0
- package/src/utils/hierarchy.ts +46 -0
- package/src/utils/icons.ts +103 -0
- package/src/utils/links.ts +10 -0
- package/src/utils/markdown.ts +82 -0
- package/src/utils/visibility.ts +31 -0
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--tsd-muted-text: var(--ifm-color-secondary-darkest);
|
|
3
|
+
--tsd-font-small: var(--ifm-h6-font-size);
|
|
4
|
+
--tsd-spacing-vertical: 0.75rem;
|
|
5
|
+
--tsd-spacing-vertical-full: 2rem;
|
|
6
|
+
--tsd-spacing-horizontal: 1rem;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.tsd-panel {
|
|
10
|
+
border: 1px solid var(--ifm-card-background-color);
|
|
11
|
+
border-radius: var(--ifm-global-radius);
|
|
12
|
+
margin-bottom: var(--ifm-spacing-vertical);
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.tsd-panel > .tsd-panel {
|
|
17
|
+
margin: var(--tsd-spacing-horizontal);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.tsd-panel-header {
|
|
21
|
+
background-color: var(--ifm-card-background-color);
|
|
22
|
+
padding: var(--tsd-spacing-vertical) var(--tsd-spacing-horizontal);
|
|
23
|
+
margin: 0;
|
|
24
|
+
position: relative;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.tsd-panel-content {
|
|
28
|
+
margin: 0;
|
|
29
|
+
padding: var(--tsd-spacing-vertical) var(--tsd-spacing-horizontal);
|
|
30
|
+
border-bottom: 1px solid var(--ifm-card-background-color);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.tsd-panel-content:empty {
|
|
34
|
+
display: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.tsd-panel-content:last-child {
|
|
38
|
+
border-bottom: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.tsd-panel-content > *:first-child {
|
|
42
|
+
margin-top: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.tsd-panel-group,
|
|
46
|
+
.tsd-footer {
|
|
47
|
+
margin-top: var(--tsd-spacing-vertical-full);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.tsd-panel-header .tsd-anchor {
|
|
51
|
+
margin-left: 0.5rem;
|
|
52
|
+
float: right;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.tsd-panel-header .tsd-anchor-id {
|
|
56
|
+
position: absolute;
|
|
57
|
+
top: -4.5rem;
|
|
58
|
+
right: 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.tsd-divider {
|
|
62
|
+
margin: var(--tsd-spacing-vertical) -1rem;
|
|
63
|
+
border: 1px solid var(--ifm-card-background-color);
|
|
64
|
+
border-bottom: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.tsd-header-flags {
|
|
68
|
+
float: right;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.tsd-header-member-fullname {
|
|
72
|
+
display: inline-block;
|
|
73
|
+
margin-top: -1rem;
|
|
74
|
+
margin-bottom: 1.5rem;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.tsd-footer {
|
|
78
|
+
text-align: center;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
html[data-theme='light'] .tsd-panel-header {
|
|
82
|
+
background-color: var(--ifm-hover-overlay);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
html[data-theme='light'] .tsd-panel,
|
|
86
|
+
html[data-theme='light'] .tsd-panel-content {
|
|
87
|
+
border-color: var(--ifm-hover-overlay);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* LISTS */
|
|
91
|
+
|
|
92
|
+
.tsd-hierarchy,
|
|
93
|
+
.tsd-type-parameters {
|
|
94
|
+
list-style: square;
|
|
95
|
+
margin: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.tsd-index-list,
|
|
99
|
+
.tsd-signatures,
|
|
100
|
+
.tsd-descriptions,
|
|
101
|
+
.tsd-sources ul,
|
|
102
|
+
.tsd-sources p {
|
|
103
|
+
margin: 0;
|
|
104
|
+
padding: 0;
|
|
105
|
+
list-style: none;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.tsd-index-list {
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-wrap: wrap;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.tsd-index-list li {
|
|
114
|
+
width: 100%;
|
|
115
|
+
padding-right: 1rem;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@media screen and (min-width: 576px) {
|
|
119
|
+
.tsd-index-list li {
|
|
120
|
+
width: 50%;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@media screen and (min-width: 997px) {
|
|
125
|
+
.tsd-index-list li {
|
|
126
|
+
width: 33%;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* SPACING */
|
|
131
|
+
|
|
132
|
+
.tsd-parameters h5,
|
|
133
|
+
.tsd-type-parameters-title,
|
|
134
|
+
.tsd-parameters-title,
|
|
135
|
+
.tsd-returns-title {
|
|
136
|
+
margin: 0;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.tsd-comment,
|
|
140
|
+
.tsd-comment > .markdown,
|
|
141
|
+
.tsd-sources,
|
|
142
|
+
.tsd-descriptions,
|
|
143
|
+
.tsd-type-declaration,
|
|
144
|
+
.tsd-type-parameters,
|
|
145
|
+
.tsd-parameters {
|
|
146
|
+
margin-top: var(--tsd-spacing-vertical);
|
|
147
|
+
margin-bottom: 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.tsd-comment-root {
|
|
151
|
+
margin-top: 0;
|
|
152
|
+
margin-bottom: var(--tsd-spacing-vertical-full);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* SOURCES */
|
|
156
|
+
|
|
157
|
+
.tsd-sources,
|
|
158
|
+
.tsd-footer {
|
|
159
|
+
color: var(--tsd-muted-text);
|
|
160
|
+
font-size: var(--tsd-font-small);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.tsd-sources ul,
|
|
164
|
+
.tsd-sources p {
|
|
165
|
+
margin: 0;
|
|
166
|
+
padding: 0;
|
|
167
|
+
list-style: none;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.tsd-footer a,
|
|
171
|
+
.tsd-sources a {
|
|
172
|
+
color: var(--tsd-muted-text);
|
|
173
|
+
text-decoration: underline;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.tsd-footer a:hover,
|
|
177
|
+
.tsd-sources a:hover {
|
|
178
|
+
color: var(--ifm-link-color);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* SIGNATURES */
|
|
182
|
+
|
|
183
|
+
.tsd-description > *,
|
|
184
|
+
.tsd-parameters {
|
|
185
|
+
margin-top: var(--tsd-spacing-vertical);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.tsd-description > *:first-child {
|
|
189
|
+
margin-top: 0;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.tsd-signature-inactive {
|
|
193
|
+
opacity: 0.35;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.tsd-signature-default-value {
|
|
197
|
+
margin-left: 0.2rem;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* FLAGS */
|
|
201
|
+
|
|
202
|
+
.tsd-flag-group:first-child {
|
|
203
|
+
margin-right: 0.5rem;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.tsd-flag-group:last-child {
|
|
207
|
+
margin-left: 0.5rem;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.tsd-flag {
|
|
211
|
+
display: inline-block;
|
|
212
|
+
padding: 3px 6px;
|
|
213
|
+
border-radius: var(--ifm-global-radius);
|
|
214
|
+
color: var(--ifm-footer-title-color);
|
|
215
|
+
background-color: var(--ifm-footer-background-color);
|
|
216
|
+
text-indent: 0;
|
|
217
|
+
font-size: var(--tsd-font-small);
|
|
218
|
+
font-weight: normal;
|
|
219
|
+
margin-top: -1px;
|
|
220
|
+
opacity: 0.65;
|
|
221
|
+
vertical-align: middle;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.tsd-flag:not(:first-child) {
|
|
225
|
+
margin-left: 0.25rem;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/* MODIFIERS */
|
|
229
|
+
|
|
230
|
+
.badge-group {
|
|
231
|
+
font-size: var(--tsd-font-small);
|
|
232
|
+
vertical-align: middle;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.tsd-panel-header .badge-group {
|
|
236
|
+
display: inline-block;
|
|
237
|
+
margin-left: 0.25em;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.badge-group > span {
|
|
241
|
+
margin-right: 0.25rem;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/* SYNTAX */
|
|
245
|
+
|
|
246
|
+
.tsd-generics {
|
|
247
|
+
font-weight: normal;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.tsd-signature-symbol,
|
|
251
|
+
.tsd-signature-type-generic {
|
|
252
|
+
color: var(--tsd-muted-text);
|
|
253
|
+
font-weight: normal;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.tsd-signature-type {
|
|
257
|
+
font-style: italic;
|
|
258
|
+
font-weight: normal;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.tsd-pressable {
|
|
262
|
+
cursor: pointer;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.tsd-kind-icon .codicon {
|
|
266
|
+
margin-right: 0.5rem;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.codicon[class*='codicon-'] {
|
|
270
|
+
vertical-align: middle;
|
|
271
|
+
display: inline-block;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/*
|
|
275
|
+
This is copied from Docusaurus:
|
|
276
|
+
https://github.com/facebook/docusaurus/blob/master/packages/docusaurus-theme-classic/src/theme/DocItem/styles.module.css#L19
|
|
277
|
+
*/
|
|
278
|
+
|
|
279
|
+
@media only screen and (min-width: 997px) {
|
|
280
|
+
.apiItemCol {
|
|
281
|
+
max-width: 75% !important;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/* Prevent hydration FOUC, as the mobile TOC needs to be server-rendered */
|
|
285
|
+
.apiTocMobile {
|
|
286
|
+
display: none;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/* DOCUSAURUS */
|
|
291
|
+
|
|
292
|
+
.tsd-kind-icon {
|
|
293
|
+
word-break: break-all;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.apiPage .menu__link:not(.menu__link--sublist),
|
|
297
|
+
.apiPage .table-of-contents__link,
|
|
298
|
+
.tsd-truncate {
|
|
299
|
+
display: block;
|
|
300
|
+
white-space: nowrap;
|
|
301
|
+
overflow: hidden;
|
|
302
|
+
text-overflow: ellipsis;
|
|
303
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import type { JSONOutput } from 'typedoc';
|
|
3
|
+
import { ApiDataContext } from '../components/ApiDataContext';
|
|
4
|
+
|
|
5
|
+
export function useReflection<T = JSONOutput.DeclarationReflection>(id?: number): T | null {
|
|
6
|
+
const { reflections } = useContext(ApiDataContext);
|
|
7
|
+
|
|
8
|
+
// 0 is a valid ID
|
|
9
|
+
if (id === undefined) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if (reflections[id]) {
|
|
14
|
+
return reflections[id] as unknown as T;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
throw new Error(`Unable to find declaration with ID ${id}`);
|
|
18
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import { ApiDataContext } from '../components/ApiDataContext';
|
|
3
|
+
import type { DeclarationReflectionMap } from '../types';
|
|
4
|
+
|
|
5
|
+
export function useReflectionMap(): DeclarationReflectionMap {
|
|
6
|
+
return useContext(ApiDataContext).reflections;
|
|
7
|
+
}
|