@apify/docusaurus-plugin-typedoc-api 4.2.10 → 4.2.11-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 (367) hide show
  1. package/lib/_virtual/_commonjsHelpers.js +44 -0
  2. package/lib/_virtual/_commonjsHelpers.js.map +1 -0
  3. package/lib/node_modules/boolbase/index.js +18 -0
  4. package/lib/node_modules/boolbase/index.js.map +1 -0
  5. package/lib/node_modules/cheerio/lib/esm/api/attributes.js +568 -0
  6. package/lib/node_modules/cheerio/lib/esm/api/attributes.js.map +1 -0
  7. package/lib/node_modules/cheerio/lib/esm/api/css.js +113 -0
  8. package/lib/node_modules/cheerio/lib/esm/api/css.js.map +1 -0
  9. package/lib/node_modules/cheerio/lib/esm/api/forms.js +92 -0
  10. package/lib/node_modules/cheerio/lib/esm/api/forms.js.map +1 -0
  11. package/lib/node_modules/cheerio/lib/esm/api/manipulation.js +807 -0
  12. package/lib/node_modules/cheerio/lib/esm/api/manipulation.js.map +1 -0
  13. package/lib/node_modules/cheerio/lib/esm/api/traversing.js +842 -0
  14. package/lib/node_modules/cheerio/lib/esm/api/traversing.js.map +1 -0
  15. package/lib/node_modules/cheerio/lib/esm/cheerio.js +41 -0
  16. package/lib/node_modules/cheerio/lib/esm/cheerio.js.map +1 -0
  17. package/lib/node_modules/cheerio/lib/esm/index.js +112 -0
  18. package/lib/node_modules/cheerio/lib/esm/index.js.map +1 -0
  19. package/lib/node_modules/cheerio/lib/esm/load.js +110 -0
  20. package/lib/node_modules/cheerio/lib/esm/load.js.map +1 -0
  21. package/lib/node_modules/cheerio/lib/esm/options.js +32 -0
  22. package/lib/node_modules/cheerio/lib/esm/options.js.map +1 -0
  23. package/lib/node_modules/cheerio/lib/esm/parse.js +78 -0
  24. package/lib/node_modules/cheerio/lib/esm/parse.js.map +1 -0
  25. package/lib/node_modules/cheerio/lib/esm/parsers/parse5-adapter.js +57 -0
  26. package/lib/node_modules/cheerio/lib/esm/parsers/parse5-adapter.js.map +1 -0
  27. package/lib/node_modules/cheerio/lib/esm/static.js +191 -0
  28. package/lib/node_modules/cheerio/lib/esm/static.js.map +1 -0
  29. package/lib/node_modules/cheerio/lib/esm/utils.js +105 -0
  30. package/lib/node_modules/cheerio/lib/esm/utils.js.map +1 -0
  31. package/lib/node_modules/cheerio/node_modules/htmlparser2/lib/esm/Parser.js +381 -0
  32. package/lib/node_modules/cheerio/node_modules/htmlparser2/lib/esm/Parser.js.map +1 -0
  33. package/lib/node_modules/cheerio/node_modules/htmlparser2/lib/esm/Tokenizer.js +888 -0
  34. package/lib/node_modules/cheerio/node_modules/htmlparser2/lib/esm/Tokenizer.js.map +1 -0
  35. package/lib/node_modules/cheerio/node_modules/htmlparser2/lib/esm/index.js +69 -0
  36. package/lib/node_modules/cheerio/node_modules/htmlparser2/lib/esm/index.js.map +1 -0
  37. package/lib/node_modules/cheerio-select/lib/esm/helpers.js +22 -0
  38. package/lib/node_modules/cheerio-select/lib/esm/helpers.js.map +1 -0
  39. package/lib/node_modules/cheerio-select/lib/esm/index.js +252 -0
  40. package/lib/node_modules/cheerio-select/lib/esm/index.js.map +1 -0
  41. package/lib/node_modules/cheerio-select/lib/esm/positionals.js +37 -0
  42. package/lib/node_modules/cheerio-select/lib/esm/positionals.js.map +1 -0
  43. package/lib/node_modules/css-select/lib/esm/attributes.js +155 -0
  44. package/lib/node_modules/css-select/lib/esm/attributes.js.map +1 -0
  45. package/lib/node_modules/css-select/lib/esm/compile.js +118 -0
  46. package/lib/node_modules/css-select/lib/esm/compile.js.map +1 -0
  47. package/lib/node_modules/css-select/lib/esm/general.js +155 -0
  48. package/lib/node_modules/css-select/lib/esm/general.js.map +1 -0
  49. package/lib/node_modules/css-select/lib/esm/index.js +115 -0
  50. package/lib/node_modules/css-select/lib/esm/index.js.map +1 -0
  51. package/lib/node_modules/css-select/lib/esm/pseudo-selectors/aliases.js +38 -0
  52. package/lib/node_modules/css-select/lib/esm/pseudo-selectors/aliases.js.map +1 -0
  53. package/lib/node_modules/css-select/lib/esm/pseudo-selectors/filters.js +151 -0
  54. package/lib/node_modules/css-select/lib/esm/pseudo-selectors/filters.js.map +1 -0
  55. package/lib/node_modules/css-select/lib/esm/pseudo-selectors/index.js +47 -0
  56. package/lib/node_modules/css-select/lib/esm/pseudo-selectors/index.js.map +1 -0
  57. package/lib/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js +88 -0
  58. package/lib/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js.map +1 -0
  59. package/lib/node_modules/css-select/lib/esm/pseudo-selectors/subselects.js +85 -0
  60. package/lib/node_modules/css-select/lib/esm/pseudo-selectors/subselects.js.map +1 -0
  61. package/lib/node_modules/css-select/lib/esm/sort.js +70 -0
  62. package/lib/node_modules/css-select/lib/esm/sort.js.map +1 -0
  63. package/lib/node_modules/css-what/lib/es/index.js +18 -0
  64. package/lib/node_modules/css-what/lib/es/index.js.map +1 -0
  65. package/lib/node_modules/css-what/lib/es/parse.js +397 -0
  66. package/lib/node_modules/css-what/lib/es/parse.js.map +1 -0
  67. package/lib/node_modules/css-what/lib/es/stringify.js +95 -0
  68. package/lib/node_modules/css-what/lib/es/stringify.js.map +1 -0
  69. package/lib/node_modules/css-what/lib/es/types.js +43 -0
  70. package/lib/node_modules/css-what/lib/es/types.js.map +1 -0
  71. package/lib/node_modules/dom-serializer/lib/esm/foreignNames.js +7 -0
  72. package/lib/node_modules/dom-serializer/lib/esm/foreignNames.js.map +1 -0
  73. package/lib/node_modules/dom-serializer/lib/esm/index.js +146 -0
  74. package/lib/node_modules/dom-serializer/lib/esm/index.js.map +1 -0
  75. package/lib/node_modules/domelementtype/lib/esm/index.js +62 -0
  76. package/lib/node_modules/domelementtype/lib/esm/index.js.map +1 -0
  77. package/lib/node_modules/domhandler/lib/esm/index.js +166 -0
  78. package/lib/node_modules/domhandler/lib/esm/index.js.map +1 -0
  79. package/lib/node_modules/domhandler/lib/esm/node.js +352 -0
  80. package/lib/node_modules/domhandler/lib/esm/node.js.map +1 -0
  81. package/lib/node_modules/domutils/lib/esm/feeds.js +176 -0
  82. package/lib/node_modules/domutils/lib/esm/feeds.js.map +1 -0
  83. package/lib/node_modules/domutils/lib/esm/helpers.js +142 -0
  84. package/lib/node_modules/domutils/lib/esm/helpers.js.map +1 -0
  85. package/lib/node_modules/domutils/lib/esm/index.js +56 -0
  86. package/lib/node_modules/domutils/lib/esm/index.js.map +1 -0
  87. package/lib/node_modules/domutils/lib/esm/legacy.js +144 -0
  88. package/lib/node_modules/domutils/lib/esm/legacy.js.map +1 -0
  89. package/lib/node_modules/domutils/lib/esm/manipulation.js +137 -0
  90. package/lib/node_modules/domutils/lib/esm/manipulation.js.map +1 -0
  91. package/lib/node_modules/domutils/lib/esm/querying.js +149 -0
  92. package/lib/node_modules/domutils/lib/esm/querying.js.map +1 -0
  93. package/lib/node_modules/domutils/lib/esm/stringify.js +80 -0
  94. package/lib/node_modules/domutils/lib/esm/stringify.js.map +1 -0
  95. package/lib/node_modules/domutils/lib/esm/traversal.js +128 -0
  96. package/lib/node_modules/domutils/lib/esm/traversal.js.map +1 -0
  97. package/lib/node_modules/entities/lib/esm/decode.js +495 -0
  98. package/lib/node_modules/entities/lib/esm/decode.js.map +1 -0
  99. package/lib/node_modules/entities/lib/esm/decode_codepoint.js +52 -0
  100. package/lib/node_modules/entities/lib/esm/decode_codepoint.js.map +1 -0
  101. package/lib/node_modules/entities/lib/esm/encode.js +68 -0
  102. package/lib/node_modules/entities/lib/esm/encode.js.map +1 -0
  103. package/lib/node_modules/entities/lib/esm/escape.js +103 -0
  104. package/lib/node_modules/entities/lib/esm/escape.js.map +1 -0
  105. package/lib/node_modules/entities/lib/esm/generated/decode-data-html.js +8 -0
  106. package/lib/node_modules/entities/lib/esm/generated/decode-data-html.js.map +1 -0
  107. package/lib/node_modules/entities/lib/esm/generated/decode-data-xml.js +8 -0
  108. package/lib/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +1 -0
  109. package/lib/node_modules/entities/lib/esm/generated/encode-html.js +264 -0
  110. package/lib/node_modules/entities/lib/esm/generated/encode-html.js.map +1 -0
  111. package/lib/node_modules/entities/lib/esm/index.js +122 -0
  112. package/lib/node_modules/entities/lib/esm/index.js.map +1 -0
  113. package/lib/node_modules/nth-check/lib/esm/compile.js +111 -0
  114. package/lib/node_modules/nth-check/lib/esm/compile.js.map +1 -0
  115. package/lib/node_modules/nth-check/lib/esm/index.js +73 -0
  116. package/lib/node_modules/nth-check/lib/esm/index.js.map +1 -0
  117. package/lib/node_modules/nth-check/lib/esm/parse.js +71 -0
  118. package/lib/node_modules/nth-check/lib/esm/parse.js.map +1 -0
  119. package/lib/node_modules/parse5/dist/common/doctype.js +49 -0
  120. package/lib/node_modules/parse5/dist/common/doctype.js.map +1 -0
  121. package/lib/node_modules/parse5/dist/common/error-codes.js +66 -0
  122. package/lib/node_modules/parse5/dist/common/error-codes.js.map +1 -0
  123. package/lib/node_modules/parse5/dist/common/foreign-content.js +134 -0
  124. package/lib/node_modules/parse5/dist/common/foreign-content.js.map +1 -0
  125. package/lib/node_modules/parse5/dist/common/html.js +316 -0
  126. package/lib/node_modules/parse5/dist/common/html.js.map +1 -0
  127. package/lib/node_modules/parse5/dist/common/token.js +24 -0
  128. package/lib/node_modules/parse5/dist/common/token.js.map +1 -0
  129. package/lib/node_modules/parse5/dist/common/unicode.js +72 -0
  130. package/lib/node_modules/parse5/dist/common/unicode.js.map +1 -0
  131. package/lib/node_modules/parse5/dist/index.js +58 -0
  132. package/lib/node_modules/parse5/dist/index.js.map +1 -0
  133. package/lib/node_modules/parse5/dist/parser/formatting-element-list.js +115 -0
  134. package/lib/node_modules/parse5/dist/parser/formatting-element-list.js.map +1 -0
  135. package/lib/node_modules/parse5/dist/parser/index.js +3387 -0
  136. package/lib/node_modules/parse5/dist/parser/index.js.map +1 -0
  137. package/lib/node_modules/parse5/dist/parser/open-element-stack.js +286 -0
  138. package/lib/node_modules/parse5/dist/parser/open-element-stack.js.map +1 -0
  139. package/lib/node_modules/parse5/dist/serializer/index.js +160 -0
  140. package/lib/node_modules/parse5/dist/serializer/index.js.map +1 -0
  141. package/lib/node_modules/parse5/dist/tokenizer/index.js +3142 -0
  142. package/lib/node_modules/parse5/dist/tokenizer/index.js.map +1 -0
  143. package/lib/node_modules/parse5/dist/tokenizer/preprocessor.js +195 -0
  144. package/lib/node_modules/parse5/dist/tokenizer/preprocessor.js.map +1 -0
  145. package/lib/node_modules/parse5/dist/tree-adapters/default.js +180 -0
  146. package/lib/node_modules/parse5/dist/tree-adapters/default.js.map +1 -0
  147. package/lib/node_modules/parse5-htmlparser2-tree-adapter/dist/index.js +218 -0
  148. package/lib/node_modules/parse5-htmlparser2-tree-adapter/dist/index.js.map +1 -0
  149. package/lib/packages/plugin/src/components/AnchorLink.js.map +1 -0
  150. package/lib/packages/plugin/src/components/ApiChangelog.js.map +1 -0
  151. package/lib/packages/plugin/src/components/ApiDataContext.js.map +1 -0
  152. package/lib/packages/plugin/src/components/ApiIndex.js.map +1 -0
  153. package/lib/{components → packages/plugin/src/components}/ApiItem.js +97 -2
  154. package/lib/packages/plugin/src/components/ApiItem.js.map +1 -0
  155. package/lib/packages/plugin/src/components/ApiItemLayout.js.map +1 -0
  156. package/lib/packages/plugin/src/components/ApiOptionsLayout.js.map +1 -0
  157. package/lib/{components → packages/plugin/src/components}/ApiPage.js +0 -3
  158. package/lib/packages/plugin/src/components/ApiPage.js.map +1 -0
  159. package/lib/packages/plugin/src/components/Breadcrumb.js.map +1 -0
  160. package/lib/packages/plugin/src/components/Comment.js.map +1 -0
  161. package/lib/packages/plugin/src/components/CommentBadges.js.map +1 -0
  162. package/lib/packages/plugin/src/components/DefaultValue.js.map +1 -0
  163. package/lib/packages/plugin/src/components/Flags.js.map +1 -0
  164. package/lib/packages/plugin/src/components/Footer.js.map +1 -0
  165. package/lib/packages/plugin/src/components/Hierarchy.js.map +1 -0
  166. package/lib/packages/plugin/src/components/Icon.js.map +1 -0
  167. package/lib/packages/plugin/src/components/Index.js.map +1 -0
  168. package/lib/{components → packages/plugin/src/components}/Markdown.js +0 -2
  169. package/lib/packages/plugin/src/components/Markdown.js.map +1 -0
  170. package/lib/packages/plugin/src/components/Member.js.map +1 -0
  171. package/lib/packages/plugin/src/components/MemberDeclaration.js.map +1 -0
  172. package/lib/{components → packages/plugin/src/components}/MemberGetterSetter.js +0 -1
  173. package/lib/packages/plugin/src/components/MemberGetterSetter.js.map +1 -0
  174. package/lib/packages/plugin/src/components/MemberReference.js.map +1 -0
  175. package/lib/{components → packages/plugin/src/components}/MemberSignatureBody.js +2 -7
  176. package/lib/packages/plugin/src/components/MemberSignatureBody.js.map +1 -0
  177. package/lib/packages/plugin/src/components/MemberSignatureTitle.js.map +1 -0
  178. package/lib/packages/plugin/src/components/MemberSignatures.js.map +1 -0
  179. package/lib/packages/plugin/src/components/MemberSources.js.map +1 -0
  180. package/lib/packages/plugin/src/components/Members.js.map +1 -0
  181. package/lib/packages/plugin/src/components/MembersGroup.js.map +1 -0
  182. package/lib/packages/plugin/src/components/Parameter.js.map +1 -0
  183. package/lib/{components → packages/plugin/src/components}/Reflection.js +0 -1
  184. package/lib/packages/plugin/src/components/Reflection.js.map +1 -0
  185. package/lib/{components → packages/plugin/src/components}/SourceLink.js +5 -1
  186. package/lib/packages/plugin/src/components/SourceLink.js.map +1 -0
  187. package/lib/{components → packages/plugin/src/components}/Type.js +2 -3
  188. package/lib/packages/plugin/src/components/Type.js.map +1 -0
  189. package/lib/packages/plugin/src/components/TypeAndParent.js.map +1 -0
  190. package/lib/packages/plugin/src/components/TypeParameters.js.map +1 -0
  191. package/lib/packages/plugin/src/components/TypeParametersGeneric.js.map +1 -0
  192. package/lib/packages/plugin/src/components/VersionBanner.js.map +1 -0
  193. package/lib/packages/plugin/src/hooks/useBreadcrumbs.js.map +1 -0
  194. package/lib/packages/plugin/src/hooks/useGitRefName.js.map +1 -0
  195. package/lib/packages/plugin/src/hooks/useMinimalLayout.js.map +1 -0
  196. package/lib/packages/plugin/src/hooks/useReflection.js.map +1 -0
  197. package/lib/packages/plugin/src/hooks/useReflectionMap.js.map +1 -0
  198. package/lib/{index.js → packages/plugin/src/index.js} +23 -10
  199. package/lib/packages/plugin/src/index.js.map +1 -0
  200. package/lib/packages/plugin/src/markdownLoader.js.map +1 -0
  201. package/lib/{plugin → packages/plugin/src/plugin}/data.js +1 -9
  202. package/lib/packages/plugin/src/plugin/data.js.map +1 -0
  203. package/lib/packages/plugin/src/plugin/python/consts.js +47 -0
  204. package/lib/packages/plugin/src/plugin/python/consts.js.map +1 -0
  205. package/lib/packages/plugin/src/plugin/python/index.js +36 -0
  206. package/lib/packages/plugin/src/plugin/python/index.js.map +1 -0
  207. package/lib/packages/plugin/src/plugin/python/inheritance.js +71 -0
  208. package/lib/packages/plugin/src/plugin/python/inheritance.js.map +1 -0
  209. package/lib/packages/plugin/src/plugin/python/packageVersions.js +46 -0
  210. package/lib/packages/plugin/src/plugin/python/packageVersions.js.map +1 -0
  211. package/lib/packages/plugin/src/plugin/python/transformation.js +359 -0
  212. package/lib/packages/plugin/src/plugin/python/transformation.js.map +1 -0
  213. package/lib/packages/plugin/src/plugin/python/type-parsing/index.js +79 -0
  214. package/lib/packages/plugin/src/plugin/python/type-parsing/index.js.map +1 -0
  215. package/lib/packages/plugin/src/plugin/python/types.js +2 -0
  216. package/lib/packages/plugin/src/plugin/python/types.js.map +1 -0
  217. package/lib/packages/plugin/src/plugin/python/utils.js +106 -0
  218. package/lib/packages/plugin/src/plugin/python/utils.js.map +1 -0
  219. package/lib/packages/plugin/src/plugin/sidebar.js.map +1 -0
  220. package/lib/{plugin → packages/plugin/src/plugin}/structure/0.23.js +0 -2
  221. package/lib/packages/plugin/src/plugin/structure/0.23.js.map +1 -0
  222. package/lib/packages/plugin/src/plugin/url.js.map +1 -0
  223. package/lib/packages/plugin/src/plugin/version.js.map +1 -0
  224. package/lib/packages/plugin/src/types.js +2 -0
  225. package/lib/packages/plugin/src/types.js.map +1 -0
  226. package/lib/packages/plugin/src/utils/helpers.js.map +1 -0
  227. package/lib/packages/plugin/src/utils/hierarchy.js.map +1 -0
  228. package/lib/{utils → packages/plugin/src/utils}/icons.js +1 -2
  229. package/lib/packages/plugin/src/utils/icons.js.map +1 -0
  230. package/lib/packages/plugin/src/utils/links.js.map +1 -0
  231. package/lib/packages/plugin/src/utils/markdown.js.map +1 -0
  232. package/lib/packages/plugin/src/utils/reexports.js +96 -0
  233. package/lib/packages/plugin/src/utils/reexports.js.map +1 -0
  234. package/lib/packages/plugin/src/utils/visibility.js.map +1 -0
  235. package/package.json +3 -2
  236. package/src/components/ApiItem.tsx +103 -9
  237. package/src/components/ApiItemLayout.tsx +4 -2
  238. package/src/components/ApiOptionsLayout.tsx +18 -16
  239. package/src/components/ApiPage.tsx +0 -2
  240. package/src/components/DefaultValue.tsx +0 -1
  241. package/src/components/Flags.tsx +1 -1
  242. package/src/components/Markdown.tsx +0 -1
  243. package/src/components/Member.tsx +19 -17
  244. package/src/components/MemberGetterSetter.tsx +0 -1
  245. package/src/components/MemberSignatureBody.tsx +42 -38
  246. package/src/components/MemberSignatureTitle.tsx +18 -15
  247. package/src/components/Reflection.tsx +1 -1
  248. package/src/components/SourceLink.tsx +6 -8
  249. package/src/components/Type.tsx +6 -14
  250. package/src/components/VersionBanner.tsx +5 -1
  251. package/src/index.ts +39 -9
  252. package/src/plugin/data.ts +6 -12
  253. package/src/plugin/python/consts.ts +50 -0
  254. package/src/plugin/python/docspec-gen/__init__.py +0 -0
  255. package/src/plugin/python/docspec-gen/generate_ast.py +73 -0
  256. package/src/plugin/python/docspec-gen/google_docstring_processor.py +185 -0
  257. package/src/plugin/python/index.ts +47 -0
  258. package/src/plugin/python/inheritance.ts +80 -0
  259. package/src/plugin/python/packageVersions.ts +43 -0
  260. package/src/plugin/python/transformation.ts +444 -0
  261. package/src/plugin/python/type-parsing/index.ts +88 -0
  262. package/src/plugin/python/type-parsing/parse_types.py +82 -0
  263. package/src/plugin/python/types.ts +83 -0
  264. package/src/plugin/python/utils.ts +123 -0
  265. package/src/plugin/structure/0.23.ts +0 -2
  266. package/src/plugin/version.ts +2 -2
  267. package/src/types.ts +9 -0
  268. package/src/utils/icons.ts +4 -3
  269. package/src/utils/reexports.ts +105 -0
  270. package/lib/components/AnchorLink.js.map +0 -1
  271. package/lib/components/ApiChangelog.js.map +0 -1
  272. package/lib/components/ApiDataContext.js.map +0 -1
  273. package/lib/components/ApiIndex.js.map +0 -1
  274. package/lib/components/ApiItem.js.map +0 -1
  275. package/lib/components/ApiItemLayout.js.map +0 -1
  276. package/lib/components/ApiOptionsLayout.js.map +0 -1
  277. package/lib/components/ApiPage.js.map +0 -1
  278. package/lib/components/Breadcrumb.js.map +0 -1
  279. package/lib/components/Comment.js.map +0 -1
  280. package/lib/components/CommentBadges.js.map +0 -1
  281. package/lib/components/DefaultValue.js.map +0 -1
  282. package/lib/components/Flags.js.map +0 -1
  283. package/lib/components/Footer.js.map +0 -1
  284. package/lib/components/Hierarchy.js.map +0 -1
  285. package/lib/components/Icon.js.map +0 -1
  286. package/lib/components/Index.js.map +0 -1
  287. package/lib/components/Markdown.js.map +0 -1
  288. package/lib/components/Member.js.map +0 -1
  289. package/lib/components/MemberDeclaration.js.map +0 -1
  290. package/lib/components/MemberGetterSetter.js.map +0 -1
  291. package/lib/components/MemberReference.js.map +0 -1
  292. package/lib/components/MemberSignatureBody.js.map +0 -1
  293. package/lib/components/MemberSignatureTitle.js.map +0 -1
  294. package/lib/components/MemberSignatures.js.map +0 -1
  295. package/lib/components/MemberSources.js.map +0 -1
  296. package/lib/components/Members.js.map +0 -1
  297. package/lib/components/MembersGroup.js.map +0 -1
  298. package/lib/components/Parameter.js.map +0 -1
  299. package/lib/components/Reflection.js.map +0 -1
  300. package/lib/components/SourceLink.js.map +0 -1
  301. package/lib/components/Type.js.map +0 -1
  302. package/lib/components/TypeAndParent.js.map +0 -1
  303. package/lib/components/TypeParameters.js.map +0 -1
  304. package/lib/components/TypeParametersGeneric.js.map +0 -1
  305. package/lib/components/VersionBanner.js.map +0 -1
  306. package/lib/hooks/useBreadcrumbs.js.map +0 -1
  307. package/lib/hooks/useGitRefName.js.map +0 -1
  308. package/lib/hooks/useMinimalLayout.js.map +0 -1
  309. package/lib/hooks/useReflection.js.map +0 -1
  310. package/lib/hooks/useReflectionMap.js.map +0 -1
  311. package/lib/index.js.map +0 -1
  312. package/lib/markdownLoader.js.map +0 -1
  313. package/lib/plugin/data.js.map +0 -1
  314. package/lib/plugin/sidebar.js.map +0 -1
  315. package/lib/plugin/structure/0.23.js.map +0 -1
  316. package/lib/plugin/url.js.map +0 -1
  317. package/lib/plugin/version.js.map +0 -1
  318. package/lib/utils/helpers.js.map +0 -1
  319. package/lib/utils/hierarchy.js.map +0 -1
  320. package/lib/utils/icons.js.map +0 -1
  321. package/lib/utils/links.js.map +0 -1
  322. package/lib/utils/markdown.js.map +0 -1
  323. package/lib/utils/visibility.js.map +0 -1
  324. /package/lib/{types.js → node_modules/cheerio/lib/esm/types.js} +0 -0
  325. /package/lib/{types.js.map → node_modules/cheerio/lib/esm/types.js.map} +0 -0
  326. /package/lib/{components → packages/plugin/src/components}/AnchorLink.js +0 -0
  327. /package/lib/{components → packages/plugin/src/components}/ApiChangelog.js +0 -0
  328. /package/lib/{components → packages/plugin/src/components}/ApiDataContext.js +0 -0
  329. /package/lib/{components → packages/plugin/src/components}/ApiIndex.js +0 -0
  330. /package/lib/{components → packages/plugin/src/components}/ApiItemLayout.js +0 -0
  331. /package/lib/{components → packages/plugin/src/components}/ApiOptionsLayout.js +0 -0
  332. /package/lib/{components → packages/plugin/src/components}/Breadcrumb.js +0 -0
  333. /package/lib/{components → packages/plugin/src/components}/Comment.js +0 -0
  334. /package/lib/{components → packages/plugin/src/components}/CommentBadges.js +0 -0
  335. /package/lib/{components → packages/plugin/src/components}/DefaultValue.js +0 -0
  336. /package/lib/{components → packages/plugin/src/components}/Flags.js +0 -0
  337. /package/lib/{components → packages/plugin/src/components}/Footer.js +0 -0
  338. /package/lib/{components → packages/plugin/src/components}/Hierarchy.js +0 -0
  339. /package/lib/{components → packages/plugin/src/components}/Icon.js +0 -0
  340. /package/lib/{components → packages/plugin/src/components}/Index.js +0 -0
  341. /package/lib/{components → packages/plugin/src/components}/Member.js +0 -0
  342. /package/lib/{components → packages/plugin/src/components}/MemberDeclaration.js +0 -0
  343. /package/lib/{components → packages/plugin/src/components}/MemberReference.js +0 -0
  344. /package/lib/{components → packages/plugin/src/components}/MemberSignatureTitle.js +0 -0
  345. /package/lib/{components → packages/plugin/src/components}/MemberSignatures.js +0 -0
  346. /package/lib/{components → packages/plugin/src/components}/MemberSources.js +0 -0
  347. /package/lib/{components → packages/plugin/src/components}/Members.js +0 -0
  348. /package/lib/{components → packages/plugin/src/components}/MembersGroup.js +0 -0
  349. /package/lib/{components → packages/plugin/src/components}/Parameter.js +0 -0
  350. /package/lib/{components → packages/plugin/src/components}/TypeAndParent.js +0 -0
  351. /package/lib/{components → packages/plugin/src/components}/TypeParameters.js +0 -0
  352. /package/lib/{components → packages/plugin/src/components}/TypeParametersGeneric.js +0 -0
  353. /package/lib/{components → packages/plugin/src/components}/VersionBanner.js +0 -0
  354. /package/lib/{hooks → packages/plugin/src/hooks}/useBreadcrumbs.js +0 -0
  355. /package/lib/{hooks → packages/plugin/src/hooks}/useGitRefName.js +0 -0
  356. /package/lib/{hooks → packages/plugin/src/hooks}/useMinimalLayout.js +0 -0
  357. /package/lib/{hooks → packages/plugin/src/hooks}/useReflection.js +0 -0
  358. /package/lib/{hooks → packages/plugin/src/hooks}/useReflectionMap.js +0 -0
  359. /package/lib/{markdownLoader.js → packages/plugin/src/markdownLoader.js} +0 -0
  360. /package/lib/{plugin → packages/plugin/src/plugin}/sidebar.js +0 -0
  361. /package/lib/{plugin → packages/plugin/src/plugin}/url.js +0 -0
  362. /package/lib/{plugin → packages/plugin/src/plugin}/version.js +0 -0
  363. /package/lib/{utils → packages/plugin/src/utils}/helpers.js +0 -0
  364. /package/lib/{utils → packages/plugin/src/utils}/hierarchy.js +0 -0
  365. /package/lib/{utils → packages/plugin/src/utils}/links.js +0 -0
  366. /package/lib/{utils → packages/plugin/src/utils}/markdown.js +0 -0
  367. /package/lib/{utils → packages/plugin/src/utils}/visibility.js +0 -0
@@ -1,6 +1,6 @@
1
1
  // https://github.com/TypeStrong/typedoc-default-themes/blob/master/src/default/partials/member.signature.body.hbs
2
2
 
3
- import { Fragment, useContext } from 'react'
3
+ import { Fragment, useContext } from 'react';
4
4
  import type { JSONOutput, Models } from 'typedoc';
5
5
  import { type GlobalData } from '@docusaurus/types';
6
6
  import { usePluginData } from '@docusaurus/useGlobalData';
@@ -57,7 +57,6 @@ function intoReturnComment(comment?: JSONOutput.Comment): JSONOutput.Comment | u
57
57
 
58
58
  const HIDE_TAGS = ['@returns', '@param'];
59
59
 
60
- // eslint-disable-next-line complexity
61
60
  export function MemberSignatureBody({ hideSources, sig }: MemberSignatureBodyProps) {
62
61
  const minimal = useMinimalLayout();
63
62
  const showTypes = sig.typeParameter && sig.typeParameter.length > 0;
@@ -67,39 +66,37 @@ export function MemberSignatureBody({ hideSources, sig }: MemberSignatureBodyPro
67
66
  const { reflections } = useContext(ApiDataContext);
68
67
  const { isPython } = usePluginData('docusaurus-plugin-typedoc-api') as GlobalData;
69
68
 
70
-
71
69
  if (isPython) {
72
- // eslint-disable-next-line
73
70
  sig.parameters = sig.parameters?.reduce<typeof sig.parameters>((acc, param) => {
74
71
  // @ts-expect-error Silence ts errors
75
72
  switch (param.type?.name) {
76
73
  case 'Unpack':
77
74
  // @ts-expect-error Silence ts errors
78
- // eslint-disable-next-line
79
- acc.push(...reflections[param.type.typeArguments[0].target].children.map(x => ({...x, flags: {'keyword-only': true}})));
75
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
76
+ acc.push(...(reflections[param.type.typeArguments[0].target]?.children ?? []).map((x) => ({...x, flags: { 'keyword-only': true } })),
77
+ );
80
78
  break;
81
79
  default:
82
80
  acc.push(param);
83
81
  break;
84
82
  }
85
-
83
+
86
84
  return acc;
87
85
  }, []);
88
-
89
- // eslint-disable-next-line
86
+
90
87
  sig.parameters = sig.parameters?.reduce<typeof sig.parameters>((acc, param) => {
91
88
  // @ts-expect-error Silence ts errors
92
89
  switch (param.type?.name) {
93
90
  case 'NotRequired':
94
91
  // @ts-expect-error Silence ts errors
95
92
  // eslint-disable-next-line
96
- acc.push({...param, type: param.type.typeArguments[0]});
93
+ acc.push({ ...param, type: param.type.typeArguments[0] });
97
94
  break;
98
95
  default:
99
96
  acc.push(param);
100
97
  break;
101
98
  }
102
-
99
+
103
100
  return acc;
104
101
  }, []);
105
102
  }
@@ -152,7 +149,9 @@ export function MemberSignatureBody({ hideSources, sig }: MemberSignatureBodyPro
152
149
  <li key={reflectionChild.id}>
153
150
  <h5>
154
151
  <Flags flags={reflectionChild.flags} />
155
- {reflectionChild.flags?.isRest && <span className="tsd-signature-symbol">...</span>}
152
+ {reflectionChild.flags?.isRest && (
153
+ <span className="tsd-signature-symbol">...</span>
154
+ )}
156
155
  {`${reflectionChild.name}: `}
157
156
  <Type type={reflectionChild.type} />
158
157
  <DefaultValue
@@ -162,37 +161,42 @@ export function MemberSignatureBody({ hideSources, sig }: MemberSignatureBodyPro
162
161
  />
163
162
  </h5>
164
163
 
165
- <Comment comment={reflectionChild.comment as unknown as JSONOutput.Comment} />
164
+ <Comment
165
+ comment={reflectionChild.comment as unknown as JSONOutput.Comment}
166
+ />
166
167
  </li>
167
168
  ))}
168
169
  </ul>
169
170
  )}
170
171
 
171
- {param.type?.type === 'union' && (
172
- ((param.type.types.filter(
173
- (unionType) => unionType.type === 'reflection')) as unknown as Models.ReflectionType[]).map(
174
- (unionReflectionType) => (
175
- <ul key={unionReflectionType.declaration.id}>
176
- {unionReflectionType.declaration?.children?.map((unionChild) => (
177
- <li key={unionChild.id}>
178
- <h5>
179
- <Flags flags={unionChild.flags} />
180
- {unionChild.flags?.isRest && <span className="tsd-signature-symbol">...</span>}
181
- {`${unionChild.name}: `}
182
- <Type type={unionChild.type} />
183
- <DefaultValue
184
- comment={unionChild.comment as unknown as JSONOutput.Comment}
185
- type={unionChild.type}
186
- value={unionChild.defaultValue}
187
- />
188
- </h5>
189
-
190
- <Comment comment={unionChild.comment as unknown as JSONOutput.Comment} />
191
- </li>
192
- ))}
193
- </ul>
194
- ))
195
- )}
172
+ {param.type?.type === 'union' &&
173
+ (
174
+ param.type.types.filter(
175
+ (unionType) => unionType.type === 'reflection',
176
+ ) as unknown as Models.ReflectionType[]
177
+ ).map((unionReflectionType) => (
178
+ <ul key={unionReflectionType.declaration.id}>
179
+ {unionReflectionType.declaration?.children?.map((unionChild) => (
180
+ <li key={unionChild.id}>
181
+ <h5>
182
+ <Flags flags={unionChild.flags} />
183
+ {unionChild.flags?.isRest && (
184
+ <span className="tsd-signature-symbol">...</span>
185
+ )}
186
+ {`${unionChild.name}: `}
187
+ <Type type={unionChild.type} />
188
+ <DefaultValue
189
+ comment={unionChild.comment as unknown as JSONOutput.Comment}
190
+ type={unionChild.type}
191
+ value={unionChild.defaultValue}
192
+ />
193
+ </h5>
194
+
195
+ <Comment comment={unionChild.comment as unknown as JSONOutput.Comment} />
196
+ </li>
197
+ ))}
198
+ </ul>
199
+ ))}
196
200
  </Fragment>
197
201
  ))}
198
202
  </ul>
@@ -3,7 +3,7 @@
3
3
 
4
4
  import { Fragment } from 'react';
5
5
  import { usePluginData } from '@docusaurus/useGlobalData';
6
- import type { GlobalData,TSDSignatureReflection } from '../types';
6
+ import type { GlobalData, TSDSignatureReflection } from '../types';
7
7
  import { escapeMdx } from '../utils/helpers';
8
8
  import { Type } from './Type';
9
9
  import { TypeParametersGeneric } from './TypeParametersGeneric';
@@ -18,13 +18,15 @@ export function MemberSignatureTitle({ useArrow, hideName, sig }: MemberSignatur
18
18
  const { isPython } = usePluginData('docusaurus-plugin-typedoc-api') as GlobalData;
19
19
  // add `*` before the first keyword-only parameter
20
20
  const parametersCopy = sig.parameters?.slice() ?? [];
21
- const firstKeywordOnlyIndex = parametersCopy.findIndex((param) => Object.keys(param.flags).includes('keyword-only'));
21
+ const firstKeywordOnlyIndex = parametersCopy.findIndex((param) =>
22
+ Object.keys(param.flags).includes('keyword-only'),
23
+ );
22
24
  if (firstKeywordOnlyIndex >= 0) {
23
25
  parametersCopy.splice(firstKeywordOnlyIndex, 0, {
24
26
  id: 999_999,
25
27
  name: '*',
26
28
  kind: 32_768,
27
- flags: { },
29
+ flags: {},
28
30
  variant: 'param',
29
31
  });
30
32
  }
@@ -32,7 +34,10 @@ export function MemberSignatureTitle({ useArrow, hideName, sig }: MemberSignatur
32
34
  return (
33
35
  <>
34
36
  {!hideName && sig.name !== '__type' ? (
35
- <span>{sig.modifiers ? `${sig.modifiers.join(' ')} ` : ''}<b>{escapeMdx(sig.name)}</b></span>
37
+ <span>
38
+ {sig.modifiers ? `${sig.modifiers.join(' ')} ` : ''}
39
+ <b>{escapeMdx(sig.name)}</b>
40
+ </span>
36
41
  ) : // Constructor signature
37
42
  sig.kind === 16_384 ? (
38
43
  <>
@@ -52,17 +57,15 @@ export function MemberSignatureTitle({ useArrow, hideName, sig }: MemberSignatur
52
57
  <span>
53
58
  {param.flags?.isRest && <span className="tsd-signature-symbol">...</span>}
54
59
  {escapeMdx(param.name)}
55
- {
56
- !isPython && (
57
- <>
58
- <span className="tsd-signature-symbol">
59
- {(param.flags?.isOptional || 'defaultValue' in param) && '?'}
60
- {': '}
61
- </span>
62
- <Type type={param.type} />
63
- </>
64
- )
65
- }
60
+ {!isPython && (
61
+ <>
62
+ <span className="tsd-signature-symbol">
63
+ {(param.flags?.isOptional || 'defaultValue' in param) && '?'}
64
+ {': '}
65
+ </span>
66
+ <Type type={param.type} />
67
+ </>
68
+ )}
66
69
  </span>
67
70
  </Fragment>
68
71
  ))}
@@ -17,7 +17,7 @@ import { TypeParameters } from './TypeParameters';
17
17
  export interface ReflectionProps {
18
18
  reflection: TSDDeclarationReflection | TSDReflection | TSDSignatureReflection;
19
19
  }
20
- // eslint-disable-next-line complexity
20
+
21
21
  export function Reflection({ reflection }: ReflectionProps) {
22
22
  const hierarchy = useMemo(() => createHierarchy(reflection), [reflection]);
23
23
 
@@ -1,4 +1,5 @@
1
1
  import type { JSONOutput } from 'typedoc';
2
+ import type { DocusaurusConfig } from '@docusaurus/types';
2
3
  import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
3
4
  import { useGitRefName } from '../hooks/useGitRefName';
4
5
 
@@ -11,6 +12,10 @@ export interface SourceLinkProps {
11
12
  sources?: JSONOutput.SourceReference[];
12
13
  }
13
14
 
15
+ export function resolveGithubUrl(source: JSONOutput.SourceReference, siteConfig: DocusaurusConfig, gitRefName: string): string {
16
+ return source.url || `https://${siteConfig.githubHost}${siteConfig.githubPort ? `:${siteConfig.githubPort}` : ''}/${siteConfig.organizationName}/${siteConfig.projectName}/blob/${gitRefName}/${replaceWithSrc(source.fileName)}#L${source.line}`;
17
+ }
18
+
14
19
  export function SourceLink({ sources = [] }: SourceLinkProps) {
15
20
  const { siteConfig } = useDocusaurusContext();
16
21
  const gitRefName = useGitRefName();
@@ -25,14 +30,7 @@ export function SourceLink({ sources = [] }: SourceLinkProps) {
25
30
  <a
26
31
  key={source.fileName}
27
32
  className="tsd-anchor"
28
- href={
29
- source.url ||
30
- `https://${siteConfig.githubHost}${
31
- siteConfig.githubPort ? `:${siteConfig.githubPort}` : ''
32
- }/${siteConfig.organizationName}/${
33
- siteConfig.projectName
34
- }/blob/${gitRefName}/${replaceWithSrc(source.fileName)}#L${source.line}`
35
- }
33
+ href={resolveGithubUrl(source, siteConfig, gitRefName)}
36
34
  rel="noreferrer"
37
35
  target="_blank"
38
36
  >
@@ -39,7 +39,6 @@ export interface TypeProps {
39
39
  type?: { type: string; value?: unknown };
40
40
  }
41
41
 
42
- // eslint-disable-next-line complexity
43
42
  export function Type({ needsParens = false, type: base }: TypeProps) {
44
43
  const reflections = useReflectionMap();
45
44
  const { isPython } = usePluginData('docusaurus-plugin-typedoc-api') as GlobalData;
@@ -135,7 +134,8 @@ export function Type({ needsParens = false, type: base }: TypeProps) {
135
134
  case 'literal': {
136
135
  const type = base as JSONOutput.LiteralType;
137
136
 
138
- if (isPython && type.value === null) {
137
+ if (isPython && (type.value === null
138
+ || (typeof type.value === 'object' && Object.keys(type.value).length === 0))) {
139
139
  return <span className="tsd-signature-type">None</span>;
140
140
  }
141
141
 
@@ -217,10 +217,10 @@ export function Type({ needsParens = false, type: base }: TypeProps) {
217
217
  }
218
218
 
219
219
  case 'reference': {
220
- const type = base as JSONOutput.ReferenceType;
220
+ const type = base as JSONOutput.ReferenceType & { ref?: TSDDeclarationReflection };
221
221
  // eslint-disable-next-line
222
222
  const reflectionIdentifier = type.target ?? (type as any).id;
223
- const ref = reflectionIdentifier ? reflections[Number(reflectionIdentifier)] : null;
223
+ const ref = type.ref ?? (reflectionIdentifier ? reflections[Number(reflectionIdentifier)] : null);
224
224
  const genericClass = ref?.id && !ref.sources ? 'tsd-signature-type-generic' : '';
225
225
 
226
226
  return (
@@ -238,22 +238,14 @@ export function Type({ needsParens = false, type: base }: TypeProps) {
238
238
  )}
239
239
  {type.typeArguments && type.typeArguments.length > 0 && (
240
240
  <>
241
- <span className="tsd-signature-symbol">
242
- {
243
- isPython ? '[' : '<'
244
- }
245
- </span>
241
+ <span className="tsd-signature-symbol">{isPython ? '[' : '<'}</span>
246
242
  {type.typeArguments.map((t, i) => (
247
243
  <Fragment key={t.type + i}>
248
244
  {i > 0 && <span className="tsd-signature-symbol">, </span>}
249
245
  <Type type={t} />
250
246
  </Fragment>
251
247
  ))}
252
- <span className="tsd-signature-symbol">
253
- {
254
- isPython ? ']' : '>'
255
- }
256
- </span>
248
+ <span className="tsd-signature-symbol">{isPython ? ']' : '>'}</span>
257
249
  </>
258
250
  )}
259
251
  </>
@@ -1,6 +1,10 @@
1
1
  import { useCallback } from 'react';
2
2
  import Link from '@docusaurus/Link';
3
- import { useDocsPreferredVersion, useDocsVersion, useDocVersionSuggestions } from '@docusaurus/plugin-content-docs/client';
3
+ import {
4
+ useDocsPreferredVersion,
5
+ useDocsVersion,
6
+ useDocVersionSuggestions,
7
+ } from '@docusaurus/plugin-content-docs/client';
4
8
  import { ThemeClassNames } from '@docusaurus/theme-common';
5
9
 
6
10
  export function VersionBanner(): JSX.Element | null {
package/src/index.ts CHANGED
@@ -13,6 +13,7 @@ import {
13
13
  generateJson,
14
14
  loadPackageJsonAndDocs,
15
15
  } from './plugin/data';
16
+ import { processPythonDocs } from './plugin/python';
16
17
  import { extractSidebar } from './plugin/sidebar';
17
18
  import { getVersionedDocsDirPath, readVersionsMetadata } from './plugin/version';
18
19
  import type {
@@ -26,6 +27,7 @@ import type {
26
27
  TSDDeclarationReflection,
27
28
  VersionMetadata,
28
29
  } from './types';
30
+ import { injectReexports } from './utils/reexports';
29
31
 
30
32
  const DEFAULT_OPTIONS: Required<DocusaurusPluginTypeDocApiOptions> = {
31
33
  banner: '',
@@ -57,6 +59,8 @@ const DEFAULT_OPTIONS: Required<DocusaurusPluginTypeDocApiOptions> = {
57
59
  rehypePlugins: [],
58
60
  versions: {},
59
61
  python: false,
62
+ pythonOptions: {},
63
+ reexports: [],
60
64
  };
61
65
 
62
66
  async function importFile<T>(file: string): Promise<T> {
@@ -167,9 +171,8 @@ export default function typedocApiPlugin(
167
171
  options.changelogName,
168
172
  );
169
173
 
170
- // eslint-disable-next-line no-param-reassign
171
174
  cfg.packageName = packageJson.name;
172
- // eslint-disable-next-line no-param-reassign
175
+
173
176
  cfg.packageVersion = packageJson.version;
174
177
  });
175
178
 
@@ -195,15 +198,33 @@ export default function typedocApiPlugin(
195
198
  if (metadata.versionName === CURRENT_VERSION_NAME) {
196
199
  const outFile = path.join(context.generatedFilesDir, `api-typedoc-${pluginId}.json`);
197
200
 
201
+ if (!fs.existsSync(context.generatedFilesDir)) {
202
+ fs.mkdirSync(context.generatedFilesDir, { recursive: true });
203
+ }
204
+
198
205
  if (options.pathToCurrentVersionTypedocJSON) {
199
- if (!fs.existsSync(context.generatedFilesDir)){
200
- fs.mkdirSync(context.generatedFilesDir, { recursive: true });
201
- }
202
206
  fs.copyFileSync(options.pathToCurrentVersionTypedocJSON, outFile);
207
+ } else if (Object.keys(options.pythonOptions).length > 0) {
208
+ if (
209
+ !options.pythonOptions.pythonModulePath ||
210
+ !options.pythonOptions.moduleShortcutsPath
211
+ ) {
212
+ throw new Error('Python options are missing required fields');
213
+ }
214
+
215
+ processPythonDocs({
216
+ pythonModulePath: options.pythonOptions.pythonModulePath,
217
+ moduleShortcutsPath: options.pythonOptions.moduleShortcutsPath,
218
+ outPath: outFile,
219
+ });
203
220
  } else {
204
221
  await generateJson(projectRoot, entryPoints, outFile, options);
205
222
  }
206
223
 
224
+ if (options.reexports && options.reexports.length > 0) {
225
+ await injectReexports(outFile, options.reexports);
226
+ }
227
+
207
228
  packages = flattenAndGroupPackages(
208
229
  packageConfigs,
209
230
  await importFile(outFile),
@@ -266,7 +287,7 @@ export default function typedocApiPlugin(
266
287
  }
267
288
 
268
289
  actions.setGlobalData({
269
- isPython: !!options.python,
290
+ isPython: !!(options.python || options.pythonOptions),
270
291
  } as GlobalData);
271
292
 
272
293
  const docs: PropVersionDocs = {};
@@ -330,7 +351,10 @@ export default function typedocApiPlugin(
330
351
  return {
331
352
  path: info.permalink,
332
353
  exact: true,
333
- component: path.join(__dirname, `./components/ApiItem.${process.env.TYPEDOC_PLUGIN_DEV ? 'tsx' : 'js'}`),
354
+ component: path.join(
355
+ __dirname,
356
+ `./components/ApiItem.${process.env.TYPEDOC_PLUGIN_DEV ? 'tsx' : 'js'}`,
357
+ ),
334
358
  modules,
335
359
  sidebar: 'api',
336
360
  // Map the ID here instead of creating a JSON data file,
@@ -399,7 +423,10 @@ export default function typedocApiPlugin(
399
423
  {
400
424
  path: indexPermalink,
401
425
  exact: false,
402
- component: path.join(__dirname, `./components/ApiPage.${process.env.TYPEDOC_PLUGIN_DEV ? 'tsx' : 'js'}`),
426
+ component: path.join(
427
+ __dirname,
428
+ `./components/ApiPage.${process.env.TYPEDOC_PLUGIN_DEV ? 'tsx' : 'js'}`,
429
+ ),
403
430
  routes,
404
431
  modules: {
405
432
  options: optionsData,
@@ -463,7 +490,10 @@ export default function typedocApiPlugin(
463
490
  remarkPlugins: options.remarkPlugins,
464
491
  rehypePlugins: options.rehypePlugins,
465
492
  siteDir: context.siteDir,
466
- staticDirs: [...context.siteConfig.staticDirectories, path.join(context.siteDir, 'static')],
493
+ staticDirs: [
494
+ ...context.siteConfig.staticDirectories,
495
+ path.join(context.siteDir, 'static'),
496
+ ],
467
497
  // Since this isn't a doc/blog page, we can get
468
498
  // away with it being a partial!
469
499
  isMDXPartial: () => true,
@@ -1,7 +1,7 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
3
  import * as TypeDoc from 'typedoc';
4
- import { type InlineTagDisplayPart, type JSONOutput, ReflectionKind } from 'typedoc'
4
+ import { type InlineTagDisplayPart, type JSONOutput, ReflectionKind } from 'typedoc';
5
5
  import ts from 'typescript';
6
6
  import { normalizeUrl } from '@docusaurus/utils';
7
7
  import type {
@@ -110,7 +110,6 @@ export function createReflectionMap(
110
110
  ): TSDDeclarationReflectionMap {
111
111
  const map: TSDDeclarationReflectionMap = {};
112
112
 
113
- // eslint-disable-next-line complexity
114
113
  items.forEach((item) => {
115
114
  // Add @reference categories to reflection.
116
115
  const referenceCategories: Record<string, { title: string; children: number[] }> = {};
@@ -133,7 +132,6 @@ export function createReflectionMap(
133
132
 
134
133
  // Update categories with reference categories.
135
134
  if (!item.categories) {
136
- // eslint-disable-next-line no-param-reassign
137
135
  item.categories = [];
138
136
  }
139
137
  for (const category of Object.values(referenceCategories)) {
@@ -170,7 +168,7 @@ export function loadPackageJsonAndDocs(
170
168
  }
171
169
  }
172
170
 
173
- if(!found) {
171
+ if (!found) {
174
172
  // TODO: load the actual package information from pyproject.toml or similar
175
173
  return {
176
174
  packageJson: {
@@ -179,7 +177,7 @@ export function loadPackageJsonAndDocs(
179
177
  },
180
178
  readmePath: '',
181
179
  changelogPath: '',
182
- }
180
+ };
183
181
  }
184
182
 
185
183
  const readmePath = path.join(currentDir, readmeFileName);
@@ -203,7 +201,6 @@ export function addMetadataToReflections(
203
201
  const permalink = `/${joinUrl(urlPrefix, packageSlug)}`;
204
202
 
205
203
  if (project.children) {
206
- // eslint-disable-next-line no-param-reassign
207
204
  project.children = project.children.map((child) => {
208
205
  migrateToVersion0230(child);
209
206
 
@@ -213,7 +210,6 @@ export function addMetadataToReflections(
213
210
 
214
211
  // We need to go another level deeper and only use fragments
215
212
  if (child.kind === ReflectionKind.Namespace && child.children) {
216
- // eslint-disable-next-line no-param-reassign
217
213
  child.children = child.children.map((grandChild) => ({
218
214
  ...grandChild,
219
215
  permalink: normalizeUrl([`${childPermalink}#${grandChild.name}`]),
@@ -251,7 +247,7 @@ function mergeReflections(base: TSDDeclarationReflection, next: TSDDeclarationRe
251
247
  });
252
248
 
253
249
  // We can remove refs since were merging all reflections into one
254
- // eslint-disable-next-line no-param-reassign
250
+
255
251
  base.groups = base.groups.filter((group) => group.title !== 'References');
256
252
  }
257
253
  }
@@ -390,14 +386,13 @@ function buildSourceFileNameMap(
390
386
  const map: Record<string, boolean> = {};
391
387
  const cwd = process.cwd();
392
388
 
393
- if(project.symbolIdMap) {
389
+ if (project.symbolIdMap) {
394
390
  Object.values(project.symbolIdMap).forEach((symbol) => {
395
391
  // absolute
396
392
  map[path.normalize(path.join(cwd, symbol.sourceFileName))] = true;
397
393
  });
398
394
  }
399
395
 
400
-
401
396
  modChildren.forEach((child) => {
402
397
  child.sources?.forEach((sf) => {
403
398
  // relative
@@ -458,9 +453,8 @@ export function flattenAndGroupPackages(
458
453
  changelogPath,
459
454
  };
460
455
 
461
- // eslint-disable-next-line no-param-reassign
462
456
  cfg.packageName = packages[cfg.packagePath].packageName;
463
- // eslint-disable-next-line no-param-reassign
457
+
464
458
  cfg.packageVersion = packages[cfg.packagePath].packageVersion;
465
459
  }
466
460
 
@@ -0,0 +1,50 @@
1
+ export const REPO_ROOT_PLACEHOLDER = 'REPO_ROOT_PLACEHOLDER';
2
+
3
+ export const APIFY_CLIENT_REPO_URL = 'https://github.com/apify/apify-client-python';
4
+ export const APIFY_SDK_REPO_URL = 'https://github.com/apify/apify-sdk-python';
5
+ export const APIFY_SHARED_REPO_URL = 'https://github.com/apify/apify-shared-python';
6
+ export const CRAWLEE_PYTHON_REPO_URL = 'https://github.com/apify/crawlee-python';
7
+
8
+ export const REPO_URL_PER_PACKAGE = {
9
+ apify: APIFY_SDK_REPO_URL,
10
+ apify_client: APIFY_CLIENT_REPO_URL,
11
+ apify_shared: APIFY_SHARED_REPO_URL,
12
+ crawlee: CRAWLEE_PYTHON_REPO_URL,
13
+ };
14
+
15
+ // Taken from https://github.com/TypeStrong/typedoc/blob/v0.23.24/src/lib/models/reflections/kind.ts, modified
16
+ export const TYPEDOC_KINDS = {
17
+ class: {
18
+ kind: 128,
19
+ kindString: 'Class',
20
+ },
21
+ data: {
22
+ kind: 1024,
23
+ kindString: 'Property',
24
+ },
25
+ enum: {
26
+ kind: 8,
27
+ kindString: 'Enumeration',
28
+ },
29
+ enumValue: {
30
+ kind: 16,
31
+ kindString: 'Enumeration Member',
32
+ },
33
+ function: {
34
+ kind: 2048,
35
+ kindString: 'Method',
36
+ },
37
+ };
38
+
39
+ export const GROUP_ORDER = [
40
+ 'Classes',
41
+ 'Abstract classes',
42
+ 'Data structures',
43
+ 'Errors',
44
+ 'Functions',
45
+ 'Constructors',
46
+ 'Methods',
47
+ 'Properties',
48
+ 'Constants',
49
+ 'Enumeration Members',
50
+ ];
File without changes
@@ -0,0 +1,73 @@
1
+ """
2
+ Replaces the default pydoc-markdown shell script with a custom Python script calling the pydoc-markdown API directly.
3
+
4
+ This script generates an AST from the Python source code in the `src` directory and prints it as a JSON object.
5
+ """
6
+
7
+ from pydoc_markdown.interfaces import Context
8
+ from pydoc_markdown.contrib.loaders.python import PythonLoader
9
+ from pydoc_markdown.contrib.processors.filter import FilterProcessor
10
+ from pydoc_markdown.contrib.processors.crossref import CrossrefProcessor
11
+ from google_docstring_processor import ApifyGoogleProcessor
12
+ from docspec import dump_module
13
+
14
+ import argparse
15
+
16
+ import json
17
+ import os
18
+
19
+ def search_for_git_root(path):
20
+ if os.path.exists(os.path.join(path, '.git')):
21
+ return path
22
+ else:
23
+ parent = os.path.dirname(path)
24
+ if parent == path:
25
+ return None
26
+ return search_for_git_root(parent)
27
+
28
+ def main():
29
+ parser = argparse.ArgumentParser()
30
+ parser.add_argument("-i", "--input", help = "Path to the Python module to generate the AST from.", required=True)
31
+ parser.add_argument("output", help = "Path to store the generated AST as a JSON file in.")
32
+
33
+ args = parser.parse_args()
34
+ project_path = os.path.abspath(args.input)
35
+
36
+ repo_root_path = search_for_git_root(project_path)
37
+ if not repo_root_path:
38
+ raise Exception("Could not find git root directory. Are you sure the Python module is in a git repository?")
39
+
40
+ context = Context(directory='.')
41
+ loader = PythonLoader(search_path=[project_path])
42
+ filter = FilterProcessor(
43
+ documented_only=False,
44
+ skip_empty_modules=False,
45
+ )
46
+ crossref = CrossrefProcessor()
47
+ google = ApifyGoogleProcessor()
48
+
49
+ loader.init(context)
50
+ filter.init(context)
51
+ google.init(context)
52
+ crossref.init(context)
53
+
54
+ processors = [filter, google, crossref]
55
+
56
+ dump = []
57
+
58
+ modules = list(loader.load())
59
+
60
+ for processor in processors:
61
+ processor.process(modules, None)
62
+
63
+ for module in modules:
64
+ dump.append(dump_module(module))
65
+
66
+ with open(args.output, 'w') as f:
67
+ f.write(json.dumps(dump, indent=4).replace(
68
+ repo_root_path,
69
+ 'REPO_ROOT_PLACEHOLDER'
70
+ ))
71
+
72
+ if __name__ == "__main__":
73
+ main()